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.8d2b7cd3....

1254 lines
2.1 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[67],{39060:function(){"use strict"},76596:function(){"use strict"},25346:function(Pn,vi){"use strict";vi.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},68055:function(Pn,vi){"use strict";vi.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"}},74042:function(){"use strict";function Pn(Qt,et,nt,ct){nt===void 0&&(nt=0),ct===void 0&&(ct=1/0),this._name=Qt,this._defaultValue=et,this._minimum=nt,this._maximum=ct}Object.defineProperty(Pn.prototype,"name",{get:function(){return this._name},set:function(Qt){if(typeof Qt!="string"||Qt==="")throw new Error("Shape name must be a valid string.");this._name=Qt}}),Object.defineProperty(Pn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("The default value must be a real number, not: "+Qt);this._defaultValue=Qt}}),Object.defineProperty(Pn.prototype,"minimum",{get:function(){return this._minimum},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("Minimum must be a real number, not: "+Qt);this._minimum=Qt}}),Object.defineProperty(Pn.prototype,"maximum",{get:function(){return this._maximum},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("Maximum must be a real number, not: "+Qt);this._maximum=Qt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Qt,et){var nt=go.Shape._FigureParameters[Qt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Qt,et,nt){if(!(nt instanceof Pn))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[Qt];ct||(ct=[],go.Shape._FigureParameters[Qt]=ct),ct[et]=nt};var vi=[];function ne(Qt,et){var nt=vi.pop();return nt===void 0?new go.Point(Qt,et):(nt.x=Qt,nt.y=et,nt)}function Nt(){var Qt=vi.pop();return Qt===void 0?new go.Point:Qt}function Fe(Qt){vi.push(Qt)}function Te(Qt,et,nt,ct,lt,gt,yt,Et,Tt){Tt||(Tt=new go.Point);var Yt=Qt-nt,Xt=lt-yt,he=NaN,fe=NaN;if(Yt===0)if(Xt===0)Qt===nt&&(he=Qt,fe=et);else{var ue=(gt-Et)/Xt,Ye=gt-ue*lt;he=Qt,fe=ue*he+Ye}else if(Xt===0){var Le=(et-ct)/Yt,sn=et-Le*Qt;he=lt,fe=Le*he+sn}else{var Le=(et-ct)/Yt,ue=(gt-Et)/Xt,sn=et-Le*Qt,Ye=gt-ue*lt;he=(Ye-sn)/(Le-ue),fe=Le*he+sn}return Tt.x=he,Tt.y=fe,Tt}function tn(Qt,et,nt,ct,lt,gt,yt,Et,Tt,Yt,Xt,he,fe,ue){var Ye=1-Tt,Le=Tt,sn=Qt*Ye+nt*Le,vn=et*Ye+ct*Le,On=nt*Ye+lt*Le,ri=ct*Ye+gt*Le,Vn=lt*Ye+yt*Le,Qi=gt*Ye+Et*Le,Gn=sn*Ye+On*Le,Ce=vn*Ye+ri*Le,_t=On*Ye+Vn*Le,Bn=ri*Ye+Qi*Le,Si=Gn*Ye+_t*Le,ei=Ce*Ye+Bn*Le;Yt.x=sn,Yt.y=vn,Xt.x=Gn,Xt.y=Ce,he.x=Si,he.y=ei,fe.x=_t,fe.y=Bn,ue.x=Vn,ue.y=Qi}var be=new go.Spot(.156,.156),xe=new go.Spot(.844,.844),ye=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Pn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=5),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*ye,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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=be,lt.spot2=xe,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Qt,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(Qt,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(Qt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,ye*et,0,et,(1-ye)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Qt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,ye*nt,(1-ye)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Qt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,ye*nt,ye*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Qt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-ye)*et,0,0,(1-ye)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Qt,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(Qt,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(Qt,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(Qt,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 Pn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Qt,et,nt){var ct=Qt?Qt.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 De=[];function Me(){var Qt=De.pop();return Qt===void 0?[]:Qt}function se(Qt){Qt.length=0,De.push(Qt)}function hn(Qt){for(var et=Me(),nt=.5,ct=.5,lt=Math.PI*1.5,gt=0,yt=0;yt<Qt;yt++)gt=2*Math.PI/Qt*yt+lt,et[yt]=new go.Point(ct+nt*Math.cos(gt),ct+nt*Math.sin(gt));return et.push(et[0]),et}function Be(Qt){var et=un(Qt),nt=Me();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 un(Qt){for(var et=hn(Qt),nt=Me(),ct=Math.floor(et.length/2),lt=et.length-1,gt=Qt%2===0?2:1,yt=0;yt<lt;yt++){var Et=et[yt],Tt=et[yt+1],Yt=et[(ct+yt-1)%lt],Xt=et[(ct+yt+gt)%lt];nt[yt*2]=Et,nt[yt*2+1]=Te(Et.x,Et.y,Yt.x,Yt.y,Tt.x,Tt.y,Xt.x,Xt.y,new go.Point)}return nt[nt.length]=nt[0],se(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=un(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(Qt,et,nt){var ct=Be(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(Qt,et,nt){var ct=Be(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(Qt,et,nt){var ct=Be(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(Qt,et,nt){var ct=Be(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(Qt,et,nt){var ct=Be(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(Qt,et,nt){var ct=Be(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 Pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Pn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN,lt=Qt?Qt.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 Pn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Qt,et,nt){var ct=Qt?Qt.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 Et=Math.max(lt-ct,0);return Et>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,et/2+Et,et/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Et,Et).close())),gt.spot1=be,gt.spot2=xe,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Qt,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(Qt,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 Pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Pn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN,lt=Qt?Qt.parameter2:NaN;isNaN(ct)&&(ct=0),isNaN(lt)&&(lt=315);var gt=ct%360;gt<0&&(gt+=360);var yt=lt%360,Et=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(Et,Et).add(new go.PathSegment(go.PathSegment.Arc,gt,yt,Et,Et,Et,Et).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Qt,et,nt){var ct=ye/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 Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Qt,et,nt){var ct=Qt?Qt.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,Et=Math.atan2(nt,et),Tt=ct-Math.min(Math.cos(Et)*ct/2,gt),Yt=ct-Math.min(Math.sin(Et)*ct/2,yt),lt=new go.Geometry,Xt=new go.PathFigure(Tt,0,!0);return lt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,et-Tt,0)),Xt.add(new go.PathSegment(go.PathSegment.Line,et,Yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.8*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,et-Tt,nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,Tt,nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,Yt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Qt,et,nt){var ct=Qt?Qt.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 Pn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Qt,et,nt){var ct=Qt?Qt.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(Qt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,ye*et,0,et,(.5-ye/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+ye/2)*nt,ye*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Qt,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(Qt,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(Qt,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(Qt,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,Et=0,Tt=gt*ye;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Tt+Et)*nt,(.5-Tt+yt)*et,(.5+gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Et)*nt,(.5+Tt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Tt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt)*et,(.5-Tt+Et)*nt,(.5+Tt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Tt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt+.05)*et,(.5-Tt+Et-.02)*nt)),gt=.2,yt=0,Et=-.3,Tt=gt*ye,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Et)*nt,(.5+Tt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Tt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt)*et,(.5-Tt+Et)*nt,(.5+Tt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Et)*nt,(.5-Tt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt)*et,(.5-Tt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Tt+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Tt+Et)*nt,(.5-Tt+yt)*et,(.5+gt+Et)*nt)),gt=.2,yt=-.3,Et=0,Tt=gt*ye,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt-.05)*et,(.5-Tt+Et-.02)*nt,(.5+Tt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Et)*nt,(.5-Tt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt)*et,(.5-Tt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Tt+Et)*nt,(.5-Tt+yt)*et,(.5+gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Tt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Tt+Et)*nt).close()),ct.setSpots(.06,.33,.93,.68),ct}),go.Shape.defineFigureGenerator("YinYang",function(Qt,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,Et=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+gt)*et,Et*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*yt,nt*Et,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)),Et=.75,lt=new go.PathFigure((yt+gt)*et,Et*nt,!0),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*yt,nt*Et,gt*et,gt*et).close()),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Peace",function(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=.5,yt=.5,Et=.5,Tt=new go.PathFigure(yt*et,(Et-gt)*nt);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),gt=.4,lt=ye*.4;var Yt=Nt(),Xt=Nt(),he=Nt(),fe=Nt();tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.42,Yt,Xt,he,fe,fe);var ue=Nt(),Ye=Nt(),Le=Nt();tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.58,fe,fe,Le,ue,Ye);var sn=Nt(),vn=Nt(),On=Nt();tn(yt,Et+gt,yt-lt,Et+gt,yt-gt,Et+lt,yt-gt,Et,.42,sn,vn,On,fe,fe);var ri=Nt(),Vn=Nt(),Qi=Nt();return tn(yt,Et+gt,yt-lt,Et+gt,yt-gt,Et+lt,yt-gt,Et,.58,fe,fe,Qi,ri,Vn),Tt.add(new go.PathSegment(go.PathSegment.Move,Qi.x*et,Qi.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,ri.x*et,ri.y*nt,Vn.x*et,Vn.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,he.x*et,he.y*nt,Yt.x*et,Yt.y*nt,Xt.x*et,Xt.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,Qi.x*et,Qi.y*nt).close()),Tt.add(new go.PathSegment(go.PathSegment.Move,On.x*et,On.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,Le.x*et,Le.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,ue.x*et,ue.y*nt,Ye.x*et,Ye.y*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,On.x*et,On.y*nt,sn.x*et,sn.y*nt,vn.x*et,vn.y*nt).close()),Fe(Yt),Fe(Xt),Fe(he),Fe(fe),Fe(ue),Fe(Ye),Fe(Le),Fe(sn),Fe(vn),Fe(On),Fe(ri),Fe(Vn),Fe(Qi),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Fragile",function(Qt,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 Pn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Qt,et,nt){var ct=Qt?Qt.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.4,gt=.4,yt=.5,Et=.5,Tt=Nt(),Yt=Nt(),Xt=Nt(),he=Nt(),fe=new go.PathFigure((yt-gt)*et,Et*nt,!1);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.44,Xt,he,Yt,Tt,Tt),fe.add(new go.PathSegment(go.PathSegment.Bezier,Yt.x*et,Yt.y*nt,Xt.x*et,Xt.y*nt,he.x*et,he.y*nt));var ue=ne(Yt.x,Yt.y);tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.56,Tt,Tt,Yt,Xt,he);var Ye=ne(Yt.x,Yt.y);fe.add(new go.PathSegment(go.PathSegment.Line,(ue.x*.1+.95*.9)*et,ue.y*.1*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,.85*et,ue.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,(Ye.x*.1+.9)*et,.15*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,(Ye.x*.1+.9)*et,(Ye.y*.1+.05*.9)*nt)),fe.add(new go.PathSegment(go.PathSegment.Line,Ye.x*et,Ye.y*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,Xt.x*et,Xt.y*nt,he.x*et,he.y*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),gt=.35,lt=ye*.35;var Le=new go.PathFigure(yt*et,(Et-gt)*nt,!1);ct.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt));var sn=new go.PathFigure((yt-gt)*et,Et*nt,!1);return ct.add(sn),Fe(Tt),Fe(Yt),Fe(Xt),Fe(he),Fe(ue),Fe(Ye),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(Qt,et,nt){var ct=new go.Geometry,lt=.375,gt=0,yt=-.125,Et=lt*ye,Tt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Et+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Et+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Et+yt)*nt,(.5+Et+gt)*et,(.5-lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt,(.5-Et+gt)*et,(.5+lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,gt=0,yt=-.125,Et=lt*ye;var Tt=new go.PathFigure((1-.5+lt+gt)*et,(.5+yt)*nt,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Et+yt)*nt,(.5+Et+gt)*et,(.5+lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Et+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Et+yt)*nt));var Tt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);return ct.add(Tt),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(Qt,et,nt){var ct=Qt?Qt.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(Qt,et,nt){var ct=Qt?Qt.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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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 Pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Pn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=Qt?Qt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ct)*et,yt=(.5-lt/2)*nt,Et=(.5+lt/2)*nt,Tt=new go.Geometry,Yt=new go.PathFigure(0,yt,!0);Tt.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,Et)),Yt.add(new go.PathSegment(go.PathSegment.Line,0,Et).close()),Tt.spot1=new go.Spot(0,yt/nt);var Xt=Te(0,Et/nt,1,Et/nt,gt/et,1,1,.5,Nt());return Tt.spot2=new go.Spot(Xt.x,Xt.y),Fe(Xt),Tt}),go.Shape.setFigureParameter("Arrow2",0,new Pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Pn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=30),ct>et&&(ct=et);var lt=Qt?Qt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var gt=et-ct,yt=(nt-lt)/2,Et=yt+lt,Tt=new go.Geometry,Yt=new go.PathFigure(0,yt,!0);Tt.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,gt,Et)),Yt.add(new go.PathSegment(go.PathSegment.Line,0,Et).close()),Tt.spot1=new go.Spot(0,yt/nt);var Xt=Te(0,Et/nt,1,Et/nt,gt/et,1,1,.5,Nt());return Tt.spot2=new go.Spot(Xt.x,Xt.y),Fe(Xt),Tt}),go.Shape.defineFigureGenerator("Chevron",function(Qt,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(Qt,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 Pn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Tt=Te(0,.5,.3,0,0,lt/nt,.1,lt/nt,Nt());return yt.spot1=new go.Spot(Tt.x,Tt.y),Tt=Te(.7,1,1,.5,0,gt/nt,1,gt/nt,Tt),yt.spot2=new go.Spot(Tt.x,Tt.y),Fe(Tt),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Pn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Qt?Qt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Et=(nt-lt)/2,Tt=Et+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Et=0,Tt=nt):(gt=0,yt=nt,Et=0,Tt=nt));var Yt=new go.Geometry,Xt=new go.PathFigure(et,.5*nt,!0);Yt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Tt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Tt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et).close());var he=Te(0,.5,.3,Et/nt,0,gt/nt,1,gt/nt,Nt());return Yt.spot1=new go.Spot(he.x,he.y),he=Te(.7,Tt/nt,1,.5,0,yt/nt,1,yt/nt,he),Yt.spot2=new go.Spot(he.x,he.y),Fe(he),Yt}),go.Shape.setFigureParameter("IBeamArrow",0,new Pn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(0,lt/nt);var Tt=Te(.7,1,1,.5,0,gt/nt,1,gt/nt,Nt());return yt.spot2=new go.Spot(Tt.x,Tt.y),Fe(Tt),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Pn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Qt?Qt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Et=(nt-lt)/2,Tt=Et+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Et=0,Tt=nt):(gt=0,yt=nt,Et=0,Tt=nt));var Yt=new go.Geometry,Xt=new go.PathFigure(et,.5*nt,!0);Yt.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Tt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Tt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,Tt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,Et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Et)),Xt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Xt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et).close()),Yt.spot1=new go.Spot(0,gt/nt);var he=Te(.7,Tt/nt,1,.5,0,yt/nt,1,yt/nt,Nt());return Yt.spot2=new go.Spot(he.x,he.y),Fe(he),Yt}),go.Shape.setFigureParameter("Pointer",0,new Pn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Qt,et,nt){var ct=Qt?Qt.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=Te(.2,.65,1,.65,0,1,1,.5,Nt());return lt.spot2=new go.Spot(yt.x,yt.y),Fe(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new Pn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Qt,et,nt){var ct=Qt?Qt.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=Te(0,.65,1,.65,0,1,1,.5,Nt());return lt.spot2=new go.Spot(yt.x,yt.y),Fe(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new Pn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=.4);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,.3);var Tt=Te(.7,1,1,.5,0,gt/nt,1,gt/nt,Nt());return yt.spot2=new go.Spot(Tt.x,Tt.y),Fe(Tt),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Pn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Qt,et,nt){var ct=Qt?Qt.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,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,lt/nt);var Tt=Te(.7,1,1,.5,0,gt/nt,1,gt/nt,Nt());return yt.spot2=new go.Spot(Tt.x,Tt.y),Fe(Tt),yt}),go.Shape.setFigureParameter("SquareArrow",0,new Pn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Qt,et,nt){var ct=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=ye*.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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=ye*.5,yt=new go.PathFigure(0,ct,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,ye*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ct,(.5+gt)*et,0,1*et,ye*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-ye*ct,(.5+gt)*et,1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,1*nt,0,nt-ye*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,0,ct));var Et=new go.PathFigure(et,ct,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ct,1*et,2*ct-ye*ct,(.5+gt)*et,2*ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,ct,(.5-gt)*et,2*ct,0,2*ct-ye*ct)),lt.spot1=new go.Spot(0,0,0,2*ct),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=ye*.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,ye*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,(.5+gt)*et,0,et,ye*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-ye*ct,(.5+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,nt,0,nt-ye*ct));var Et=new go.PathFigure(0,nt-ct,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ct,0,nt-ct-ye*ct,(.5-gt)*et,nt-2*ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ct,(.5+gt)*et,nt-2*ct,et,nt-ct-ye*ct)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ct),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=ye*.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-ye*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-ye*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ye*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,ye*ct,0));var Et=new go.PathFigure(ct,0,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,2*ct,.5*nt,ct+ye*ct,0,2*ct,(.5-gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,ct,nt,2*ct,(.5+gt)*nt,ct+ye*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(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=ye*.5,yt=new go.PathFigure(et-ct,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-ye*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-ye*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,ye*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,ye*ct,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0));var Et=new go.PathFigure(et-ct,0,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ct,.5*nt,et-ct-ye*ct,0,et-2*ct,(.5-gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et-2*ct,(.5+gt)*nt,et-ct-ye*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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.2,gt=.1,yt=ye*lt,Et=ye*gt,Tt=.5,Yt=.1,Xt=new go.PathFigure(Tt*et,(Yt+gt)*nt,!0);ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-lt)*et,Yt*nt,(Tt-yt)*et,(Yt+gt)*nt,(Tt-lt)*et,(Yt+Et)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-gt)*nt,(Tt-lt)*et,(Yt-Et)*nt,(Tt-yt)*et,(Yt-gt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+lt)*et,Yt*nt,(Tt+yt)*et,(Yt-gt)*nt,(Tt+lt)*et,(Yt-Et)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt+gt)*nt,(Tt+lt)*et,(Yt+Et)*nt,(Tt+yt)*et,(Yt+gt)*nt));var he=.05,fe=ye*he;Tt=.05,Yt=.25;var ue=new go.PathFigure(.5*et,.2*nt,!0);return ct.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Tt=.95,Yt=.25,ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+he)*et,Yt*nt,(Tt+fe)*et,(Yt-he)*nt,(Tt+he)*et,(Yt-fe)*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),he=.025,fe=ye*he,Tt=.825,Yt=.35,ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-he)*nt,(Tt+he)*et,(Yt-fe)*nt,(Tt+fe)*et,(Yt-he)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-he)*et,Yt*nt,(Tt-fe)*et,(Yt-he)*nt,(Tt-he)*et,(Yt-fe)*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),he=.05,fe=ye*he,Tt=.5,Yt=.7,ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-he)*nt,(Tt+he)*et,(Yt-fe)*nt,(Tt+fe)*et,(Yt-he)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-he)*et,Yt*nt,(Tt-fe)*et,(Yt-he)*nt,(Tt-he)*et,(Yt-fe)*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),he=.025,fe=ye*he,Tt=.175,Yt=.35,ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-he)*nt,(Tt+he)*et,(Yt-fe)*nt,(Tt+fe)*et,(Yt-he)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-he)*et,Yt*nt,(Tt-fe)*et,(Yt-he)*nt,(Tt-he)*et,(Yt-fe)*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),he=.05,fe=ye*he,Tt=.05,Yt=.25,ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-he)*nt,(Tt-he)*et,(Yt-fe)*nt,(Tt-fe)*et,(Yt-he)*nt)),ue.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 Pn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Qt,et,nt){var ct=Qt?Qt.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=ye*.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 Et=new go.PathFigure(et,.1*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+lt)*et,.4*nt)),Et.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=ye*.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 Et=new go.PathFigure(et,.1*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Et.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=ye*.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 Et=new go.PathFigure(0,lt*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ct}),go.Shape.defineFigureGenerator("DividedProcess",function(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.parameter1:NaN,gt=Qt?Qt.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 Et=new go.PathFigure(lt*et,0,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ct}),go.Shape.defineFigureGenerator("Junction",function(Qt,et,nt){var ct=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,yt=ye*.5,Et=.5,Tt=new go.PathFigure(et,Et*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,nt,et,(Et+yt)*nt,(Et+yt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,Et*nt,(Et-yt)*et,nt,0,(Et+yt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,0,0,(Et-yt)*nt,(Et-yt)*et,0)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,et,Et*nt,(Et+yt)*et,0,et,(Et-yt)*nt));var Yt=new go.PathFigure((gt+lt)*et,(gt+lt)*nt,!1);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),Yt.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*et,gt*nt)),ct}),go.Shape.defineFigureGenerator("LinedDocument",function(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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 Et=new go.PathFigure(.5*lt*et,lt*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),ct}),go.Shape.defineFigureGenerator("OffPageConnector",function(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.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 Et=new go.PathFigure(et,.5*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ct}),go.Shape.defineFigureGenerator("PaperTape",function(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.parameter1:NaN,gt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.parameter1:NaN,gt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=Qt?Qt.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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.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 Et=new go.PathFigure(et,gt*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var Tt=new go.PathFigure(.8*et,.75*nt,!1);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ct}),go.Shape.defineFigureGenerator("Ground",function(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.1,gt=.1,yt=.9,Et=.5,Tt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Tt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Yt=new go.PathFigure((yt+gt)*et,Et*nt,!0);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.4,.75),ct}),go.Shape.defineFigureGenerator("NandGate",function(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=ye*.4,yt=ye*.1,Et=.1,Tt=.9,Yt=.5,Xt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+lt)*et,nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Xt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Xt.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((Tt+Et)*et,Yt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt+Et)*nt,(Tt+Et)*et,(Yt+yt)*nt,(Tt+yt)*et,(Yt+Et)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et)*et,Yt*nt,(Tt-yt)*et,(Yt+Et)*nt,(Tt-Et)*et,(Yt+yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-Et)*nt,(Tt-Et)*et,(Yt-yt)*nt,(Tt-yt)*et,(Yt-Et)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et)*et,Yt*nt,(Tt+yt)*et,(Yt-Et)*nt,(Tt+Et)*et,(Yt-yt)*nt)),ct.spot1=new go.Spot(0,.05),ct.spot2=new go.Spot(.55,.95),ct}),go.Shape.defineFigureGenerator("NorGate",function(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*lt,yt=0,Et=.5,Tt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.7*et,(Et-gt)*nt)),lt=.1,gt=ye*.1,yt=.9,Et=.5;var Yt=new go.PathFigure((yt-lt)*et,Et*nt,!0);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.6,.75),ct}),go.Shape.defineFigureGenerator("OrGate",function(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*lt,yt=0,Et=.5,Tt=new go.PathFigure(0,0,!0);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt+gt)*et,(Et-lt)*nt,.8*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Et+gt)*nt,(yt+gt+gt)*et,(Et+lt)*nt)),Tt.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(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*lt,yt=.2,Et=.5,Tt=new go.PathFigure(.1*et,0,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Yt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.7*et,(Et-gt)*nt)),lt=.1,gt=ye*.1,yt=.9,Et=.5;var Xt=new go.PathFigure((yt-lt)*et,Et*nt,!0);return ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.65,.75),ct}),go.Shape.defineFigureGenerator("XorGate",function(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*lt,yt=.2,Et=.5,Tt=new go.PathFigure(.1*et,0,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Yt=new go.PathFigure(.2*et,0,!0);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.9*et,(Et-gt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Yt.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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.1,gt=.1,yt=.1,Et=.5,Tt=new go.PathFigure((yt-lt*.5)*et,nt,!1);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.3,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.5,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.7,Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.9,Tt.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(Qt,et,nt){var ct=new go.Geometry,lt=ye*.5,gt=.5,yt=.5,Et=.5,Tt=new go.PathFigure((yt-gt)*et,Et*nt,!1);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Move,(yt-gt+.1)*et,Et*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt-.1)*et,Et*nt,yt*et,(Et-gt)*nt,yt*et,(Et+gt)*nt)),ct}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=et,gt=nt;et=et*.38,nt=nt*.6;var yt=ye*.8,Et=.8,Tt=0,Yt=.5,Xt=(lt-et)/2,he=(gt-nt)/2,fe=new go.PathFigure(Tt*et+Xt,(Yt+Et)*nt+he,!0);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et)*et+Xt,Yt*nt+he,(Tt-yt)*et+Xt,(Yt+Et)*nt+he,(Tt-Et)*et+Xt,(Yt+yt)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt-Et)*nt+he,(Tt-Et)*et+Xt,(Yt-yt)*nt+he,(Tt-yt)*et+Xt,(Yt-Et)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et+yt*.5)*et+Xt,Yt*nt+he,Tt*et+Xt,(Yt-Et)*nt+he,(Tt-Et+yt*.5)*et+Xt,(Yt-yt)*nt+he)),fe.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt+Et)*nt+he,(Tt-Et+yt*.5)*et+Xt,(Yt+yt)*nt+he,Tt*et+Xt,(Yt+Et)*nt+he).close()),yt=ye*.4,Et=.4,Tt=.2,Yt=.5;var ue=new go.PathFigure(Tt*et+Xt,(Yt+Et)*nt+he,!0);ct.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et)*et+Xt,Yt*nt+he,(Tt-yt)*et+Xt,(Yt+Et)*nt+he,(Tt-Et)*et+Xt,(Yt+yt)*nt+he)),ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt-Et)*nt+he,(Tt-Et)*et+Xt,(Yt-yt)*nt+he,(Tt-yt)*et+Xt,(Yt-Et)*nt+he)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et+yt*.5)*et+Xt,Yt*nt+he,Tt*et+Xt,(Yt-Et)*nt+he,(Tt-Et+yt*.5)*et+Xt,(Yt-yt)*nt+he)),ue.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt+Et)*nt+he,(Tt-Et+yt*.5)*et+Xt,(Yt+yt)*nt+he,Tt*et+Xt,(Yt+Et)*nt+he).close()),yt=ye*.2,Et=.2,Tt=.5,Yt=.5;var Ye=new go.PathFigure((Tt-Et)*et+Xt,Yt*nt+he,!0);ct.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt-Et)*nt+he,(Tt-Et)*et+Xt,(Yt-yt)*nt+he,(Tt-yt)*et+Xt,(Yt-Et)*nt+he)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et)*et+Xt,Yt*nt+he,(Tt+yt)*et+Xt,(Yt-Et)*nt+he,(Tt+Et)*et+Xt,(Yt-yt)*nt+he)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt+Et)*nt+he,(Tt+Et)*et+Xt,(Yt+yt)*nt+he,(Tt+yt)*et+Xt,(Yt+Et)*nt+he)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-Et)*et+Xt,Yt*nt+he,(Tt-yt)*et+Xt,(Yt+Et)*nt+he,(Tt-Et)*et+Xt,(Yt+yt)*nt+he)),yt=ye*.4,Et=.4,Tt=.8,Yt=.5;var Le=new go.PathFigure(Tt*et+Xt,(Yt-Et)*nt+he,!0);ct.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et)*et+Xt,Yt*nt+he,(Tt+yt)*et+Xt,(Yt-Et)*nt+he,(Tt+Et)*et+Xt,(Yt-yt)*nt+he)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt+Et)*nt+he,(Tt+Et)*et+Xt,(Yt+yt)*nt+he,(Tt+yt)*et+Xt,(Yt+Et)*nt+he)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et-yt*.5)*et+Xt,Yt*nt+he,Tt*et+Xt,(Yt+Et)*nt+he,(Tt+Et-yt*.5)*et+Xt,(Yt+yt)*nt+he)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt-Et)*nt+he,(Tt+Et-yt*.5)*et+Xt,(Yt-yt)*nt+he,Tt*et+Xt,(Yt-Et)*nt+he).close()),yt=ye*.8,Et=.8,Tt=1,Yt=.5;var sn=new go.PathFigure(Tt*et+Xt,(Yt-Et)*nt+he,!0);return ct.add(sn),sn.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et)*et+Xt,Yt*nt+he,(Tt+yt)*et+Xt,(Yt-Et)*nt+he,(Tt+Et)*et+Xt,(Yt-yt)*nt+he)),sn.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt+Et)*nt+he,(Tt+Et)*et+Xt,(Yt+yt)*nt+he,(Tt+yt)*et+Xt,(Yt+Et)*nt+he)),sn.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+Et-yt*.5)*et+Xt,Yt*nt+he,Tt*et+Xt,(Yt+Et)*nt+he,(Tt+Et-yt*.5)*et+Xt,(Yt+yt)*nt+he)),sn.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et+Xt,(Yt-Et)*nt+he,(Tt+Et-yt*.5)*et+Xt,(Yt-yt)*nt+he,Tt*et+Xt,(Yt-Et)*nt+he).close()),ct}),go.Shape.defineFigureGenerator("Email",function(Qt,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(Qt,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 Et=new go.PathFigure(0,.5*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ct}),go.Shape.defineFigureGenerator("Power",function(Qt,et,nt){var ct=new go.Geometry,lt=ye*.4,gt=.4,yt=.5,Et=.5,Tt=Nt(),Yt=Nt(),Xt=Nt(),he=Nt();tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.5,Tt,Tt,Yt,Xt,he);var fe=ne(Yt.x,Yt.y),ue=new go.PathFigure(Yt.x*et,Yt.y*nt,!0);ct.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,Xt.x*et,Xt.y*nt,he.x*et,he.y*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),tn(yt-gt,Et,yt-gt,Et-lt,yt-lt,Et-gt,yt,Et-gt,.5,Xt,he,Yt,Tt,Tt),ue.add(new go.PathSegment(go.PathSegment.Bezier,Yt.x*et,Yt.y*nt,Xt.x*et,Xt.y*nt,he.x*et,he.y*nt)),lt=ye*.3,gt=.3,tn(yt-gt,Et,yt-gt,Et-lt,yt-lt,Et-gt,yt,Et-gt,.5,Xt,he,Yt,Tt,Tt),ue.add(new go.PathSegment(go.PathSegment.Line,Yt.x*et,Yt.y*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,he.x*et,he.y*nt,Xt.x*et,Xt.y*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),tn(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.5,Tt,Tt,Yt,Xt,he),ue.add(new go.PathSegment(go.PathSegment.Bezier,Yt.x*et,Yt.y*nt,he.x*et,he.y*nt,Xt.x*et,Xt.y*nt).close());var ue=new go.PathFigure(.45*et,0,!0);return ct.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),Fe(Tt),Fe(Yt),Fe(Xt),Fe(he),Fe(fe),ct.spot1=new go.Spot(.25,.45),ct.spot2=new go.Spot(.75,.8),ct}),go.Shape.defineFigureGenerator("Fallout",function(Qt,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,Et,Tt){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Et)*et,(.8+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Et)*et,(.5+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Et)*et,(.5+Tt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Et)*et,(.8+Tt)*nt).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ct}),go.Shape.defineFigureGenerator("IrritationHazard",function(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=0,yt=0,Et=lt*ye,Tt=.4*Math.SQRT2/2+.5,Yt=.5-.5*Math.SQRT2/2,Xt=1,he=.5,fe=.5,ue=0,Ye=new go.PathFigure(Tt*et,(1-Yt)*nt,!1);return ct.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Xt*et,he*nt,Xt*et,.7*nt,Xt*et,he*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(fe+gt)*et,(ue+gt)*nt,(.5+lt+gt)*et,(.5-Et+gt)*nt,(.5+Et+gt)*et,(.5-lt+gt)*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt,(.5-Et+gt)*et,.9*nt)),Ye.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),Ye.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),Ye.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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,Et=.5,Tt=yt,Yt=Math.PI/4,Xt=4*(1-Math.cos(Yt))/(3*Math.sin(Yt)),he=Xt*.5,fe=yt,ue=yt,Ye=Xt*fe,Le=Xt*ue;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-fe)*et,Tt*nt,(Et-(Ye+fe)/2)*et,(Tt+(ue+Le)/2)*nt,(Et-fe)*et,(Tt+Le)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Tt-ue)*nt,(Et-fe)*et,(Tt-Le)*nt,(Et-Ye)*et,(Tt-ue)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+fe)*et,Tt*nt,(Et+Ye)*et,(Tt-ue)*nt,(Et+fe)*et,(Tt-Le)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Et+fe)*et,(Tt+Le)*nt,(Et+(Ye+fe)/2)*et,(Tt+(ue+Le)/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 sn=new go.PathFigure(.2*et,nt,!1);ct.add(sn),sn.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var vn=new go.PathFigure(.8*et,nt,!1);return ct.add(vn),vn.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*.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 Et=new go.PathFigure(lt*et,0,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ct}),go.Shape.defineFigureGenerator("Package",function(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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,Et=ye*.1,Tt=.2,Yt=.9,Xt=new go.PathFigure((Tt-yt)*et,Yt*nt,!0);ct.add(Xt),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-yt)*nt,(Tt-yt)*et,(Yt-Et)*nt,(Tt-Et)*et,(Yt-yt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+yt)*et,Yt*nt,(Tt+Et)*et,(Yt-yt)*nt,(Tt+yt)*et,(Yt-Et)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt+yt)*nt,(Tt+yt)*et,(Yt+Et)*nt,(Tt+Et)*et,(Yt+yt)*nt)),Xt.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-yt)*et,Yt*nt,(Tt-Et)*et,(Yt+yt)*nt,(Tt-yt)*et,(Yt+Et)*nt).close()),yt=.1,Et=ye*.1,Tt=.8,Yt=.9;var he=new go.PathFigure((Tt-yt)*et,Yt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt-yt)*nt,(Tt-yt)*et,(Yt-Et)*nt,(Tt-Et)*et,(Yt-yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Tt+yt)*et,Yt*nt,(Tt+Et)*et,(Yt-yt)*nt,(Tt+yt)*et,(Yt-Et)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Tt*et,(Yt+yt)*nt,(Tt+yt)*et,(Yt+Et)*nt,(Tt+Et)*et,(Yt+yt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Tt-yt)*et,Yt*nt,(Tt-Et)*et,(Yt+yt)*nt,(Tt-yt)*et,(Yt+Et)*nt).close()),ct}),go.Shape.defineFigureGenerator("KanbanPost",function(Qt,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(Qt,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 Et=new go.PathFigure(.5*et,.7*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Tt=.1,Yt=ye*.1,Xt=.1,he=.9,fe=new go.PathFigure((Xt-Tt)*et,he*nt,!0);ct.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,Xt*et,(he-Tt)*nt,(Xt-Tt)*et,(he-Yt)*nt,(Xt-Yt)*et,(he-Tt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(Xt+Tt)*et,he*nt,(Xt+Yt)*et,(he-Tt)*nt,(Xt+Tt)*et,(he-Yt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,Xt*et,(he+Tt)*nt,(Xt+Tt)*et,(he+Yt)*nt,(Xt+Yt)*et,(he+Tt)*nt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(Xt-Tt)*et,he*nt,(Xt-Yt)*et,(he+Tt)*nt,(Xt-Tt)*et,(he+Yt)*nt)),Tt=.1,Yt=ye*.1,Xt=.4,he=.9;var ue=new go.PathFigure((Xt-Tt)*et,he*nt,!0);return ct.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,Xt*et,(he-Tt)*nt,(Xt-Tt)*et,(he-Yt)*nt,(Xt-Yt)*et,(he-Tt)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Xt+Tt)*et,he*nt,(Xt+Yt)*et,(he-Tt)*nt,(Xt+Tt)*et,(he-Yt)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,Xt*et,(he+Tt)*nt,(Xt+Tt)*et,(he+Yt)*nt,(Xt+Yt)*et,(he+Tt)*nt)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(Xt-Tt)*et,he*nt,(Xt-Yt)*et,(he+Tt)*nt,(Xt-Tt)*et,(he+Yt)*nt)),ct}),go.Shape.defineFigureGenerator("RailShipment",function(Qt,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 Xt=.05,he=ye*.05,fe=.175,ue=.95,Et=new go.PathFigure((fe-Xt)*et,ue*nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue-Xt)*nt,(fe-Xt)*et,(ue-he)*nt,(fe-he)*et,(ue-Xt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(fe+Xt)*et,ue*nt,(fe+he)*et,(ue-Xt)*nt,(fe+Xt)*et,(ue-he)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue+Xt)*nt,(fe+Xt)*et,(ue+he)*nt,(fe+he)*et,(ue+Xt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(fe-Xt)*et,ue*nt,(fe-he)*et,(ue+Xt)*nt,(fe-Xt)*et,(ue+he)*nt));var Xt=.05,he=ye*.05,fe=.375,ue=.95,Tt=new go.PathFigure((fe-Xt)*et,ue*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue-Xt)*nt,(fe-Xt)*et,(ue-he)*nt,(fe-he)*et,(ue-Xt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(fe+Xt)*et,ue*nt,(fe+he)*et,(ue-Xt)*nt,(fe+Xt)*et,(ue-he)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue+Xt)*nt,(fe+Xt)*et,(ue+he)*nt,(fe+he)*et,(ue+Xt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(fe-Xt)*et,ue*nt,(fe-he)*et,(ue+Xt)*nt,(fe-Xt)*et,(ue+he)*nt));var Xt=.05,he=ye*.05,fe=.625,ue=.95,Yt=new go.PathFigure((fe-Xt)*et,ue*nt,!0);ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue-Xt)*nt,(fe-Xt)*et,(ue-he)*nt,(fe-he)*et,(ue-Xt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(fe+Xt)*et,ue*nt,(fe+he)*et,(ue-Xt)*nt,(fe+Xt)*et,(ue-he)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue+Xt)*nt,(fe+Xt)*et,(ue+he)*nt,(fe+he)*et,(ue+Xt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(fe-Xt)*et,ue*nt,(fe-he)*et,(ue+Xt)*nt,(fe-Xt)*et,(ue+he)*nt));var Xt=.05,he=ye*.05,fe=.825,ue=.95,Ye=new go.PathFigure((fe-Xt)*et,ue*nt,!0);ct.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue-Xt)*nt,(fe-Xt)*et,(ue-he)*nt,(fe-he)*et,(ue-Xt)*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(fe+Xt)*et,ue*nt,(fe+he)*et,(ue-Xt)*nt,(fe+Xt)*et,(ue-he)*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,fe*et,(ue+Xt)*nt,(fe+Xt)*et,(ue+he)*nt,(fe+he)*et,(ue+Xt)*nt)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(fe-Xt)*et,ue*nt,(fe-he)*et,(ue+Xt)*nt,(fe-Xt)*et,(ue+he)*nt).close());var Le=new go.PathFigure(0,nt,!1);return ct.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct}),go.Shape.defineFigureGenerator("Warehouse",function(Qt,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 Et=.05,Tt=ye*.05,Yt=.35,Xt=.775,he=new go.PathFigure((Yt-Et)*et,Xt*nt,!0);return ct.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,Yt*et,(Xt-Et)*nt,(Yt-Et)*et,(Xt-Tt)*nt,(Yt-Tt)*et,(Xt-Et)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+Et)*et,Xt*nt,(Yt+Tt)*et,(Xt-Et)*nt,(Yt+Et)*et,(Xt-Tt)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,Yt*et,(Xt+Et)*nt,(Yt+Et)*et,(Xt+Tt)*nt,(Yt+Tt)*et,(Xt+Et)*nt)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Yt-Et)*et,Xt*nt,(Yt-Tt)*et,(Xt+Et)*nt,(Yt-Et)*et,(Xt+Tt)*nt).close()),ct}),go.Shape.defineFigureGenerator("ControlCenter",function(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.3,gt=ye*.3,yt=.5,Et=.7,Tt=new go.PathFigure((yt-lt)*et,Et*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt));var Yt=new go.PathFigure(0,.7*nt,!1);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ct}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*.5,yt=.5,Et=.5,Tt=new go.PathFigure((yt-lt)*et,Et*nt,!0);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt));var Yt=new go.PathFigure(.15*et,.5*nt,!1);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Flag",function(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=.5,gt=ye*.5,yt=.5,Et=.5,Tt=new go.PathFigure((yt-lt)*et,Et*nt,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt).close()),lt=.05,gt=ye*.05,yt=.5,Et=.8;var Yt=new go.PathFigure((yt-lt)*et,Et*nt,!1);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt).close()),Yt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),Yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),Yt.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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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 Et=new go.PathFigure(.678*et,.85*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Tt=new go.PathFigure(.5*et,.1*nt,!1);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Tt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ct}),go.Shape.defineFigureGenerator("Staircase",function(Qt,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(Qt,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 Et=new go.PathFigure(et*.612,nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),Et.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),Et.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Tt=new go.PathFigure(et*.816,nt,!0);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ct}),go.Shape.defineFigureGenerator("PC",function(Qt,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 Et=new go.PathFigure(et*.055,.18*nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Tt=new go.PathFigure(et*1,0,!0);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ct}),go.Shape.defineFigureGenerator("Plane",function(Qt,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(Qt,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(Qt,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 Et=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Tt=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ct}),go.Shape.defineFigureGenerator("FloppyDisk",function(Qt,et,nt){var ct=new go.Geometry,lt=8,gt=lt*ye,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 Et=new go.PathFigure(et*.83,0,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Tt=new go.PathFigure(et*.83,nt*1,!1);ct.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Tt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Yt=new go.PathFigure(et*.78,nt*.05,!1);return ct.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),Yt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),Yt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ct}),go.Shape.defineFigureGenerator("SpeechBubble",function(Qt,et,nt){var ct=Qt?Qt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=15),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*ye,gt=nt*.8,yt=new go.Geometry,Et=new go.PathFigure(ct,0,!0);return yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et-ct,0)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,et-lt,0,et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt-ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,gt,et,gt-lt,et-lt,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,ct,gt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ct,lt,gt,0,gt-lt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,ct)),Et.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(Qt,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(Qt,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(Qt,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(Qt,et,nt){var ct=new go.Geometry,lt=15,gt=lt*ye,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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(Qt,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")},84072: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 Pn={},vi="5.0",ne={},Nt=null,Fe=!1,Te=!1,tn=null,be=!1,xe=null,ye=null,De=0;De<arguments.length;De++){var Me=arguments[De];if(Me!==null)switch(typeof Me){case"number":vi=Me.toFixed(1);break;case"string":Me.match(new RegExp("^[0-9]\\.[0-9]+$"))?vi=Me:tn=Me;break;case"object":typeof Me.is3D!="undefined"?Nt=Me:ne=Me;break;case"boolean":Fe=Me,Te=!0;break}}Nt===null&&(Nt={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&&!Te&&(Fe=!0)),tn!==null&&ne.id===void 0&&(ne.id=tn);var se="",hn="",Be=!1,un=null,Qt=null,et=null,nt=!1,ct=null,lt=null,gt=null,yt=null,Et=null;ne.height!==void 0&&(ne.height=Math.round(ne.height)),ne.width!==void 0&&(ne.width=Math.round(ne.width));var Tt=function(_e){return parseFloat(_e)>4?parseFloat(_e):5};Pn.setHTML5Codebase=function(_e,Mn){ye=_e,Bn(_e,Mn)},Pn.setJavaCodebase=Pn.setJavaCodebaseVersion=Pn.isCompiledInstalled=Pn.setPreCompiledScriptPath=Pn.setPreCompiledResourcePath=function(){},Pn.setHTML5CodebaseVersion=function(_e,Mn){var _n=parseFloat(_e);if(_n!==NaN&&_n<5){console.log("The GeoGebra HTML5 codebase version "+_n+" is deprecated. Using version latest instead.");return}xe=_e,_t(_e,Mn)},Pn.getHTML5CodebaseVersion=function(){return Qt},Pn.getParameters=function(){return ne},Pn.setFontsCSSURL=function(_e){yt=_e},Pn.setGiacJSURL=function(_e){},Pn.setJNLPFile=function(_e){se=_e},Pn.setJNLPBaseDir=function(_e){},Pn.inject=function(){function _e(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Mn="auto",_n=ne.id,fi,Kn=!1,Pi=0;Pi<arguments.length;Pi++){var le=arguments[Pi];typeof le=="string"?(le=le.toLowerCase(),le.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Mn=le:_n=arguments[Pi]):typeof le=="boolean"?Kn=le:le instanceof HTMLElement&&(fi=le)}bn();function bn(){if(!be){setTimeout(bn,200);return}Mn=Gn(Mn);var ci=fi||document.getElementById(_n);if(!ci){console.log("possibly bug on ajax loading? ");return}if(Pn.removeExistingApplet(ci,!1),ne.width===void 0&&ci.clientWidth&&(ne.width=ci.clientWidth),ne.height===void 0&&ci.clientHeight&&(ne.height=ci.clientHeight),!(ne.width&&ne.height)&&Mn==="html5"&&(delete ne.width,delete ne.height),un=Mn,Mn==="screenshot")vn(ci,ne);else{var Ht=!1;ne.hasOwnProperty("playButton")&&ne.playButton||ne.hasOwnProperty("clickToLoad")&&ne.clickToLoad?Ht=!0:ne.hasOwnProperty("playButtonAutoDecide")&&ne.playButtonAutoDecide&&(Ht=(!Yt()||_e())&&Xt()),Ht?(un="screenshot",ri(ci,ne,Kn,Mn)):sn(ci,ne,Kn)}}};function Yt(){try{return window.self!==window.top}catch(_e){return!0}}function Xt(){return ne.hasOwnProperty("screenshotGenerator")&&ne.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pn.getViews=function(){return Nt},Pn.isJavaInstalled=function(){return!1};var he=function(_e){var Mn=function(Pi){var le=JSON.parse(Pi),bn=function(Lt){return Lt.type=="G"||Lt.type=="E"},ci=le.elements?le.elements.filter(bn)[0]:le;if(!ci||!ci.url){_n();return}ne.fileName=ci.url,fe(ci.settings||{}),Nt.is3D=!0;var Ht="https://www.geogebra.org/images/";Pn.setPreviewImage(ct||ci.previewUrl,Ht+"GeoGebra_loading.png",Ht+"applet_play.png"),_e()},_n=function(){ne.onError&&ne.onError(),Si("Error: Fetching material (id "+ne.material_id+") failed.",ne)},fi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Kn="/materials/"+ne.material_id+"?scope=basic";ue("https://"+fi+"/api/proxy.php?path="+encodeURIComponent(Kn),Mn,_n)};function fe(_e){var Mn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(_n){_e[_n]=!!_e[_n]}),Mn.forEach(function(_n){ne[_n]===void 0&&_e[_n]!==void 0&&(ne[_n]=_e[_n])}),ne.showToolBarHelp===void 0&&(ne.showToolBarHelp=ne.showToolBar)}function ue(_e,Mn,_n){var fi=new XMLHttpRequest;fi.open("GET",_e),fi.onload=function(){Mn(fi.responseText)},fi.onerror=_n,fi.send()}Pn.isHTML5Installed=function(){return!0},Pn.getLoadedAppletType=function(){return un},Pn.setPreviewImage=function(_e,Mn,_n){ct=_e,lt=Mn,gt=_n},Pn.removeExistingApplet=function(_e,Mn){var _n;typeof _e=="string"&&(_e=document.getElementById(_e)),un=null;var fi=null;for(_n=0;_n<_e.childNodes.length;_n++){var Kn=_e.childNodes[_n],Pi=Kn.className;Pi==="applet_screenshot"?Mn?(Kn.style.display="block",un="screenshot"):Kn.style.display="none":Pi!=="applet_scaler prerender"&&(_e.removeChild(Kn),fi=Pi&&Pi.indexOf("appletParameters")!=-1?Kn.id:null,_n--)}var le=ne.id!==void 0?ne.id:fi,bn=window[le];bn&&typeof bn.getBase64=="function"&&(bn.remove(),window[le]=null)},Pn.refreshHitPoints=function(){if(Tt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var _e=Pn.getAppletObject();return _e&&typeof _e.recalculateEnvironments=="function"?(_e.recalculateEnvironments(),!0):!1},Pn.startAnimation=function(){var _e=Pn.getAppletObject();return _e&&typeof _e.startAnimation=="function"?(_e.startAnimation(),!0):!1},Pn.stopAnimation=function(){var _e=Pn.getAppletObject();return _e&&typeof _e.stopAnimation=="function"?(_e.stopAnimation(),!0):!1},Pn.getAppletObject=function(){var _e=ne.id!==void 0?ne.id:"ggbApplet";return window[_e]},Pn.resize=function(){};var Ye=function(_e,Mn,_n){var fi=document.createElement("param");fi.setAttribute("name",Mn),fi.setAttribute("value",_n),_e.appendChild(fi)},Le=function(_e){return _e&&_e!=="false"},sn=function(_e,Mn,_n){Tt(Qt)<=4.2&&(_n=!0);var fi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Qt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(fi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Kn=document.createElement("div");Kn.classList.add("appletParameters","notranslate");var Pi=Mn.width,le=Mn.height;if(Mn.disableAutoScale=Mn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Mn.disableAutoScale,Mn.width!==void 0)if(Tt(Qt)<=4.4)Le(Mn.showToolBar)&&(Mn.height-=7),Le(Mn.showAlgebraInput)&&(Mn.height-=37),Mn.width<605&&Le(Mn.showToolBar)&&(Mn.width=605,Pi=605);else{var bn=100;(Le(Mn.showToolBar)||Le(Mn.showMenuBar))&&(Mn.hasOwnProperty("customToolBar")&&(Mn.customToolbar=Mn.customToolBar),bn=Le(Mn.showMenuBar)?245:155),Pi<bn&&(Mn.width=bn,Pi=bn)}Kn.style.border="none",Kn.style.display="inline-block";for(var ci in Mn)Mn.hasOwnProperty(ci)&&ci!=="appletOnLoad"&&Kn.setAttribute("data-param-"+ci,Mn[ci]);yt&&Kn.setAttribute("data-param-fontscssurl",yt),Pn.resize=function(){GGBAppletUtils.responsiveResize(_e,Mn)},window.addEventListener("resize",function(an){Pn.resize()});var Ht=typeof Mn.appletOnLoad=="function"?Mn.appletOnLoad:function(){};if(!_n&&Mn.width!==void 0){Mn.hasOwnProperty("showSplash")||Kn.setAttribute("data-param-showSplash","false");var Lt=_e.querySelector(".applet_scaler.prerender"),Ct=Lt!==null;if(Ct)var Ut=Lt.querySelector(".ggb_preview");else{var Ut=Qi(Pi,le,Mn.borderColor,!1);Lt=document.createElement("div"),Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.style.width=Pi+"px",Lt.style.height=le+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Lt,"66%"),Tt(Qt)>=5?(Mn.appletOnLoad=function(an){var Sn=_e.querySelector(".ggb_preview");Sn&&Sn.parentNode.removeChild(Sn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ht(an)},Ct||Lt.appendChild(Ut)):Kn.appendChild(Ut),Lt.appendChild(Kn),Ct||_e.appendChild(Lt),setTimeout(function(){Pn.resize()},1)}else{var Kt=document.createElement("div");Kt.className="applet_scaler",Kt.style.position="relative",Kt.style.display="block",Kt.appendChild(Kn),_e.appendChild(Kt),Mn.appletOnLoad=function(an){Pn.resize(),Ht(an)}}function kt(an,Sn){Sn&&typeof Sn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(an,Sn.appletOnLoad):renderGGBElement(an),Si("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Sn)}function Pe(an,Sn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:an,params:Sn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(jn){kt(jn.article,jn.params)}),html5AppletsToProcess=null)},Tt(Qt)<5&&(an.className+=" geogebraweb")):kt(an,Sn)}if(fi){scriptLoadStarted=!0;for(var dn=0;dn<Kn.childNodes.length;dn++){var Xe=Kn.childNodes[dn].tagName;Xe==="TABLE"&&(Kn.removeChild(Kn.childNodes[dn]),dn--)}if(ggbHTML5LoadedScript!==null){var Ze=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ze!=null&&Ze.parentNode.removeChild(Ze)}var Qe=document.createElement("script"),ln=function(){Pe(Kn,Mn)};Qe.src=hn+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Qt,ggbHTML5LoadedScript=Qe.src,Si("GeoGebra HTML5 codebase loaded: '"+hn+"'.",Mn),!ye&&(!xe||xe=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ln()):hn.requirejs?__webpack_require__.e(822).then(function(){var an=[__webpack_require__(20822)];ln.apply(null,an)}.bind(this)).catch(__webpack_require__.oe):(Qe.onload=ln,_e.appendChild(Qe))}else Pe(Kn,Mn);Mn.height=le,Mn.width=Pi},vn=function(_e,Mn,_n){var fi=Qi(Mn.width,Mn.height,Mn.borderColor,_n),Kn=document.createElement("div");Kn.style.position="relative",Kn.style.display="block",Kn.style.width=Mn.width+"px",Kn.style.height=Mn.height+"px",Kn.className="applet_screenshot applet_scaler"+(_n?" applet_screenshot_play":""),Kn.appendChild(fi);var Pi=GGBAppletUtils.getScale(Mn,_e,_n);_n?(_e.appendChild(Vn()),window.GGBT_wsf_view||(_e.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Kn,"66%"),_e.appendChild(Kn),Pi!==1&&!isNaN(Pi)&&(GGBAppletUtils.scaleElement(Kn,Pi),Kn.style.width=Mn.width+"px",Kn.style.height=Mn.height+"px",Kn.parentNode.style.width=Mn.width*Pi+"px",Kn.parentNode.style.height=Mn.height*Pi+"px"),Pn.resize=function(){On(_e,fi,Kn,_n)},window.addEventListener("resize",function(le){Pn.resize()}),Pn.resize()};function On(_e,Mn,_n,fi){if(_e.contains(Mn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(_e)}var Kn=GGBAppletUtils.getScale(ne,_e,fi);_n.parentNode!==null&&(!isNaN(Kn)&&Kn!==1?(GGBAppletUtils.scaleElement(_n,Kn),_n.parentNode.style.width=ne.width*Kn+"px",_n.parentNode.style.height=ne.height*Kn+"px"):(GGBAppletUtils.scaleElement(_n,1),_n.parentNode.style.width=ne.width+"px",_n.parentNode.style.height=ne.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(_e),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pn.onExitFullscreen=function(_e,Mn){Mn.appendChild(_e)};var ri=function(_e,Mn,_n,fi){vn(_e,Mn,!0);for(var Kn=function(){var bn=[];for(le=0;le<_e.childNodes.length;le++)bn.push(_e.childNodes[le]);if(window.GGBT_wsf_view){var ci=window.GGBT_wsf_view.renderFullScreen(_e,Mn.id),Ht=document.getElementById("fullscreencontainer"),Lt=jQuery(_e).find(".fullscreencontent");Lt.length>0?(ci.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Ht).append(Lt),window.dispatchEvent(new Event("resize"))):sn(ci,Mn,!1),window.GGBT_wsf_view.launchFullScreen(Ht)}else un=fi,sn(_e,Mn,!1);if(!window.GGBT_wsf_view)for(le=0;le<bn.length;le++)_e.removeChild(bn[le])},Pi=_e.getElementsByClassName("ggb_preview_play"),le=0;le<Pi.length;le++)Pi[le].addEventListener("click",Kn,!1),Pi[le].addEventListener("ontouchstart",Kn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(_e),Xt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Vn=function(){var _e=document.createElement("div");if(_e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Mn='.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");}',_n=document.createElement("style");_n.styleSheet?_n.styleSheet.cssText=Mn:_n.appendChild(document.createTextNode(Mn)),document.getElementsByTagName("head")[0].appendChild(_n)}return _e},Qi=function(_e,Mn,_n,fi){var Kn=document.createElement("div");Kn.className="ggb_preview",Kn.style.position="absolute",Kn.style.zIndex="90",Kn.style.width=_e-2+"px",Kn.style.height=Mn-2+"px",Kn.style.top="0px",Kn.style.left="0px",Kn.style.overflow="hidden",Kn.style.backgroundColor="white";var Pi="lightgrey";_n!==void 0&&(_n==="none"?Pi="transparent":Pi=_n),Kn.style.border="1px solid "+Pi;var le=document.createElement("img");if(le.style.position="relative",le.style.zIndex="1000",le.style.top="-1px",le.style.left="-1px",ct!==null&&le.setAttribute("src",ct),le.style.opacity=.7,lt!==null){var bn,ci,Ht;if(!fi){bn=document.createElement("img"),bn.style.position="absolute",bn.style.zIndex="1001",bn.style.opacity=1,le.style.opacity=.3,ci=360,ci>_e/4*3&&(ci=_e/4*3),Ht=ci/5.8,bn.setAttribute("src",lt),bn.setAttribute("width",ci),bn.setAttribute("height",Ht);var Lt=(_e-ci)/2,Ct=(Mn-Ht)/2;bn.style.left=Lt+"px",bn.style.top=Ct+"px",Kn.appendChild(bn)}}return Kn.appendChild(le),Kn},Gn=function(_e){return _e=_e.toLowerCase(),_e==="html5"||_e==="screenshot"?_e:"html5"},Ce=["web","webSimple","web3d","tablet","tablet3d","phone"],_t=function(_e,Mn){if(Qt=_e,Mn){Bn(Qt,!0);return}var _n=!Fe;if(_n){var fi=Tt(Qt);!isNaN(fi)&&fi<4.4&&(_n=!1)}var Kn,Pi;window.location.protocol.substr(0,4)==="http"?Kn=window.location.protocol:Kn="http:";var le=Qt.indexOf("//");le>0?Pi=Qt:le===0?Pi=Kn+Qt:Pi="https://www.geogebra.org/apps/5.2.814.0/";for(var bn in Ce)if(Qt.slice(Ce[bn].length*-1)===Ce[bn]||Qt.slice((Ce[bn].length+1)*-1)===Ce[bn]+"/"){Bn(Pi,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&_n&&!Nt.is3D&&!Nt.AV&&!Nt.SV&&!Nt.CV&&!Nt.EV2&&!Nt.CP&&!Nt.PC&&!Nt.DA&&!Nt.FI&&!Nt.PV&&!Le(ne.showToolBar)&&!Le(ne.showMenuBar)&&!Le(ne.showAlgebraInput)&&!Le(ne.enableRightClick)&&(!ne.appName||ne.appName=="classic")?Pi+="webSimple/":Pi+="web3d/",Bn(Pi,!1)},Bn=function(_e,Mn){if(_e.requirejs){hn=_e;return}_e.slice(-1)!=="/"&&(_e+="/"),hn=_e,Mn===null&&(Mn=_e.indexOf("http")===-1),Be=Mn,et="web.nocache.js",nt=!1;var _n=hn.split("/");_n.length>1&&(!Mn&&_n[_n.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):Ce.indexOf(_n[_n.length-2])>=0&&(et=_n[_n.length-2]+".nocache.js")),_n=_e.split("/"),Qt=_n[_n.length-3],Qt.substr(0,4)==="test"?Qt=Qt.substr(4,1)+"."+Qt.substr(5,1):(Qt.substr(0,3)==="war"||Qt.substr(0,4)==="beta")&&(Qt="5.0");var fi=parseFloat(Qt);fi!==NaN&&fi<5&&_e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+fi+" is deprecated. Using version latest instead."),_t("5.0",Mn))},Si=function(_e,Mn){window.console&&window.console.log&&(!Mn||typeof Mn.showLogging=="undefined"||Mn.showLogging&&Mn.showLogging!=="false")&&console.log(_e)};ne.material_id!==void 0?he(ei):ei();function ei(){var _e=vi;xe!==null?_e=xe:parseFloat(_e)<5&&(_e="5.0"),_t(_e,!1),ye!==null&&Bn(ye,Be),be=!0}return Pn},GGBAppletUtils=function(){"use strict";function Pn(){return window.GGBT_wsf_edit!==void 0}function vi(be,xe){xe!=1?(be.style.transformOrigin="0% 0% 0px",be.style.webkitTransformOrigin="0% 0% 0px",be.style.transform="scale("+xe+","+xe+")",be.style.webkitTransform="scale("+xe+","+xe+")",be.style.maxWidth="initial",be.querySelector(".ggb_preview")!==null&&(be.querySelector(".ggb_preview").style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[0]!==void 0&&(be.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),be.querySelectorAll(".ggb_preview img")[1]!==void 0&&(be.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(be.style.transform="none",be.style.webkitTransform="none")}function ne(be,xe,ye,De,Me,se){var hn=null;if(se!=null&&se!="")for(var Be=be.parentNode;Be!=null;)if((" "+Be.className+" ").indexOf(" "+se+" ")>-1){hn=Be;break}else Be=Be.parentNode;var un=0,Qt=0,et=0,nt=0,ct=0,lt=0,gt=0;if(hn)un=hn.offsetWidth,Qt=Math.max(De?hn.offsetWidth:0,hn.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(un=Math.min(window.innerWidth,document.documentElement.clientWidth),Qt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=un):(un=window.innerWidth,Qt=window.innerHeight,et=window.innerWidth),be){var yt=be.getBoundingClientRect();yt.left>0&&yt.left<=un&&(Me===void 0||!Me)&&(document.dir==="rtl"?(ct=un-yt.width-yt.left,lt=et<=480?10:30):(lt=yt.left,ct=et<=480?10:30),nt=lt+ct)}if(be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Et=be.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return be&&((ye===void 0||!ye)&&xe>0&&xe+nt<un?un=xe:un-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ye===void 0||!ye)&&(Qt-=gt)),{width:un,height:Qt}}function Nt(be,xe,ye,De,Me){if(be.isScreenshoGenerator)return 1;var se=De!==void 0&&De,hn=be.noScaleMargin!=null&&be.noScaleMargin,Be=function(Et){return Et&&Et!=="false"},un=Be(be.autoHeight),Qt=ne(xe,be.width,ye,un,se&&window.GGBT_wsf_view||hn,Me),et=parseInt(Qt.width),nt=be.width,ct=be.height;if(nt===void 0){var lt=xe.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,ct=lt.offsetHeight)}var gt=et/nt,yt=se?1:Qt.height/ct;return ye!==void 0&&!ye&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function Fe(be,xe,ye){var De=1,Me,se=!1;if(be.hasOwnProperty("allowUpscale")&&(se=be.allowUpscale),be.hasOwnProperty("scale")&&(De=parseFloat(be.scale),(isNaN(De)||De===null||De===0)&&(De=1),De>1&&(se=!0)),xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(se=!0),!(be.hasOwnProperty("disableAutoScale")&&be.disableAutoScale))Me=Nt(be,xe,se,ye,be.scaleContainerClass);else return De;return se&&(!be.hasOwnProperty("scale")||De===1)?Me:Math.min(De,Me)}function Te(be){var xe=Math.min(window.innerWidth,document.documentElement.clientWidth),ye=Math.min(window.innerHeight,document.documentElement.clientHeight),De=be.getBoundingClientRect(),Me=(xe-De.width)/2,se=(ye-De.height)/2;se<0&&(se=0),be.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Me<40?be.style.left="40px":be.style.left=Me+"px",be.style.top=se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(se<40?be.style.top="40px":be.style.top=se+"px",be.style.left=Me+"px")}function tn(be,xe){var ye=be.querySelector(".appletParameters");if(ye){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xe.id!==ye.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(be)}if(ye.parentElement&&/fullscreen/.test(ye.parentElement.className))return;var De=Fe(xe,be);Pn()&&ye.setAttribute("data-param-scale",De);for(var Me=null,se=0;se<be.childNodes.length;se++)if(be.childNodes[se].className!==void 0&&be.childNodes[se].className.match(/^applet_scaler/)){Me=be.childNodes[se];break}if(Me!==null&&Me.querySelector(".noscale")!==null)return;var hn=xe.id!==void 0?xe.id:"ggbApplet",Be=window[hn];(Be==null||!Be.recalculateEnvironments)&&Me!==null&&!Me.className.match(/fullscreen/)&&(Me.parentNode.style.transform="",!isNaN(De)&&De!==1?(Me.parentNode.style.width=xe.width*De+"px",Me.parentNode.style.height=xe.height*De+"px",vi(Me,De)):(vi(Me,1),Me.parentNode.style.width=xe.width+"px",Me.parentNode.style.height=xe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Te(be),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ye).parents(".content-added-content"))}}return{responsiveResize:tn,isFlexibleWorksheetEditor:Pn,positionCenter:Te,getScale:Fe,scaleElement:vi}}();__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 Pn=n.location.search;return Pn.indexOf(J)!=-1||Pn.indexOf(K)!=-1}function q(Pn,vi){}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(Pn){var vi=s[L].bindings;s[L].bindings=function(){for(var ne=vi?vi():{},Nt=Pn[webModule.__softPermutationId],Fe=O;Fe<Nt.length;Fe++){var Te=Nt[Fe];ne[Te[O]]=Te[P]}return ne}};var t;function u(){return v(),t}function v(){if(!t){var Pn=o.createElement(Q);if(Pn.id=L,Pn.style.cssText=R+S,Pn.tabIndex=-1,o.body.appendChild(Pn),t=Pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var vi=document.compatMode==U?V:W;t.write(vi+X),t.close()}}}function w(Pn){function vi(Nt){function Fe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Te=Fe();if(Te){Nt();return}function tn(){if(!Te){if(!Fe())return;Te=!0,Nt(),o.removeEventListener&&o.removeEventListener(Z,tn,!1),be&&clearInterval(be)}}o.addEventListener&&o.addEventListener(Z,tn,!1);var be=setInterval(function(){tn()},$)}function ne(Nt){var Fe=u(),Te=Fe.body,tn=Fe.createElement(_);tn.language=ab,tn.crossOrigin=W,tn.src=Nt,webModule.__errFn&&(tn.onerror=function(){webModule.__errFn(L,new Error(bb+Nt))}),Te.appendChild(tn)}vi(function(){ne(Pn)})}webModule.__startLoadingFragment=function(Pn){return C(Pn)},webModule.__installRunAsyncCode=function(Pn){var vi=u(),ne=vi.body,Nt=vi.createElement(_);Nt.language=ab,Nt.text=Pn,ne.appendChild(Nt),ne.removeChild(Nt)};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(Pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pn){var vi=c[Pn];return vi==null?null:vi},r=d,webModule.__errFn=e}function B(){function Pn(be){var xe=be.lastIndexOf(rb);xe==-1&&(xe=be.length);var ye=be.indexOf(sb);ye==-1&&(ye=be.length);var De=be.lastIndexOf(tb,Math.min(ye,xe));return De>=O?be.substring(O,De+P):W}function vi(be){if(!be.match(/^\w+:\/\//)){var xe=o.createElement(ub);xe.src=be+vb,be=Pn(xe.src)}return be}function ne(){var be=__gwt_getMetaProperty(wb);return be!=null?be:W}function Nt(){for(var be=o.getElementsByTagName(_),xe=O;xe<be.length;++xe)if(be[xe].src.indexOf(xb)!=-1)return Pn(be[xe].src);return W}function Fe(){var be=o.getElementsByTagName(yb);return be.length>O?be[be.length-P].href:W}function Te(){var be=o.location;return be.href==be.protocol+zb+be.host+be.pathname+be.search+be.hash}var tn=ne();return tn==W&&(tn=Nt()),tn==W&&(tn=Fe()),tn==W&&Te()&&(tn=Pn(o.location.href)),tn=vi(tn),tn}function C(Pn){return Pn.match(/^\//)||Pn.match(/^[a-zA-Z]+:\/\//)?Pn:webModule.__moduleBase+Pn}function D(){var Pn=[],vi=O,ne=[],Nt=[];function Fe(be){var xe=Nt[be](),ye=ne[be];if(xe in ye)return xe;var De=[];for(var Me in ye)De[ye[Me]]=Me;throw r&&r(be,De,xe),null}if(__gwt_isKnownPropertyValue=function(be,xe){return xe in ne[be]},webModule.__getPropMap=function(){var be={};for(var xe in ne)ne.hasOwnProperty(xe)&&(be[xe]=Fe(xe));return be},webModule.__computePropValue=Fe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Te;try{Te=Cb;var tn=Te.indexOf(Db);tn!=-1&&(vi=parseInt(Te.substring(tn+P),$),Te=Te.substring(O,tn))}catch(be){}return webModule.__softPermutationId=vi,C(Te+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})()},77665:function(Pn,vi,ne){"use strict";ne.d(vi,{Ax:function(){return tn},Ds:function(){return be},KI:function(){return ye},SI:function(){return Te},f1:function(){return Fe}});var Nt=ne(13952);function Fe(De){let Me=!0;if(De.length>0){for(let se=0;se<De.length;se++)if(De[se].compile_success==0||!De[se].compile_success){Me=!1;break}}else Me=!1;return Me}function Te(De,Me=""){let se=[];for(let hn=0;hn<De.length;hn++){let Be=De[hn],un=Me?`${Me}/${Be.name}`:`${Be.name}`;se.push({title:Be.name,type:Be.type,isLeaf:Be.type!=="tree",key:un})}return se}function tn(De,Me,se){for(let hn=0;hn<De.length;hn++){let Be=De[hn];if(Be.key===Me){Be.children=se;break}Be.children&&tn(Be.children,Me,se)}return De}function be(De,Me,se){let hn;return function(){let Be=this,un=arguments,Qt=function(){hn=null,se||De.apply(Be,un)},et=se&&!hn;clearTimeout(hn),hn=setTimeout(Qt,Me),et&&De.apply(Be,un)}}const xe=!0,ye=Nt.Z.API_SERVER},89837:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return hn}});var Nt=ne(59301),Fe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Te=ne(92310),tn=ne.n(Te),be=ne(29787),xe=ne(2859),ye=ne(52430),De=ne(89299),Me=(Be,un,Qt)=>new Promise((et,nt)=>{var ct=yt=>{try{gt(Qt.next(yt))}catch(Et){nt(Et)}},lt=yt=>{try{gt(Qt.throw(yt))}catch(Et){nt(Et)}},gt=yt=>yt.done?et(yt.value):Promise.resolve(yt.value).then(ct,lt);gt((Qt=Qt.apply(Be,un)).next())}),hn=({data:Be,className:un,fullWidth:Qt,style:et={},onClose:nt,onOk:ct,showFullTools:lt,noAssociationId:gt})=>{const yt=(0,Nt.useRef)(null),Et=(0,Nt.useRef)(null),Tt=(0,Nt.useRef)(null),Yt=(0,Nt.useRef)(null),[Xt,he]=(0,Nt.useState)(!1),[fe,ue]=(0,Nt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Nt.useEffect)(()=>(Tt.current||(Tt.current=document.createElement("style"),document.head.appendChild(Tt.current)),Be!=null&&Be.visible?(document.body.setAttribute("data-custom","y-hidden"),Tt.current.innerHTML=" html { overflow-y: hidden; }",Be!=null&&Be.src&&Ye()):(document.body.removeAttribute("data-custom"),Tt.current&&(document.head.removeChild(Tt.current),Tt.current=null)),()=>{document.body.removeAttribute("data-custom"),Tt.current&&(document.head.removeChild(Tt.current),Tt.current=null)}),[Be==null?void 0:Be.visible]);const Ye=()=>Me(void 0,null,function*(){he(!0),ue("\u6B63\u5728\u52A0\u8F7D\u4E2D");const On=yield(0,De.ZJ)(Be==null?void 0:Be.src);yt.current.src="",yt.current.src=On,yt.current.onload=function(){vn()},he(!1),ue("")}),Le=On=>Me(void 0,null,function*(){he(!0),ue("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ri=yield(0,ye.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Be.title,file:On.dataUrl}});ri!=null&&ri.id&&!gt?(yield(0,ye.ZP)(`/api/attachments/${Be.id}/add_subitem.json`,{method:"post",body:{subitem_id:ri==null?void 0:ri.id,settings:JSON.stringify(On.state)}})).status===0&&ct():ri!=null&&ri.id&&ct(ri),he(!1),ue("")}),sn=()=>{const On=document.querySelector('a[href="https://markerjs.com/"]');On&&On.parentNode&&(On.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(Vn=>{const Qi=document.querySelector(Vn.name);Qi&&Qi.setAttribute("title",Vn.title)})},vn=()=>{Et.current=new xe.hP(yt.current),Et.current.targetRoot=Yt.current,Et.current.addEventListener("render",Le),Et.current.addEventListener("beforeclose",nt),lt&&(Et.current.availableMarkerTypes=Et.current.ALL_MARKER_TYPES,Et.current.uiStyleSettings.redoButtonVisible=!0,Et.current.uiStyleSettings.notesButtonVisible=!0,Et.current.uiStyleSettings.zoomButtonVisible=!0,Et.current.uiStyleSettings.zoomOutButtonVisible=!0,Et.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Et.current.uiStyleSettings,Et.current.show(),Be!=null&&Be.snapshotData&&Et.current.restoreState(Be.snapshotData),setTimeout(()=>{window.scrollTo(0,0),sn()},300)};return Nt.createElement(Nt.Fragment,null,(Be==null?void 0:Be.visible)&&Nt.createElement(be.Z,{spinning:Xt,tip:fe,style:{position:"absolute",width:"100vw"}},Nt.createElement("div",{ref:Yt,className:tn()(Fe.imageDimensions,un,Qt?Fe.fullWidth:""),style:et},Nt.createElement("img",{className:Fe.img,ref:yt}))))}},53267:function(Pn,vi,ne){"use strict";var Nt=ne(59301),Fe=ne(77019),Te=ne(5269),tn=ne(20554),be=ne(99571),xe=ne(98573),ye=ne(25346),De=ne(48136),Me=ne(59301);const se=(0,Nt.forwardRef)(({callback:hn,showSaveButton:Be,value:un=""},Qt)=>{const et=(0,Nt.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=Et=>{et.current.setValue(et.current.getValue()+" "+Et.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Me.createElement(Fe.Z,{className:ye.Z.lists,gutter:[10,10]},nt.map((Et,Tt)=>Me.createElement(Te.Z,{flex:"110px",className:ye.Z.item},Me.createElement("div",null,Me.createElement(xe.Z,{value:`$$${Et.value}$$`}),Et.name),Me.createElement("div",{className:ye.Z.children},Et.children.map((Yt,Xt)=>Me.createElement("div",{key:Xt},Me.createElement("h1",null,Yt.name),Me.createElement(Fe.Z,{gutter:[10,10]},Yt.data.map((he,fe)=>Me.createElement(Te.Z,{key:fe,onClick:()=>lt(he),className:ye.Z.diamond},Me.createElement(xe.Z,{value:"`$$"+he.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Me.createElement(Fe.Z,{className:ye.Z.lists,gutter:[10,10]},ct.map((Et,Tt)=>Me.createElement(Te.Z,{flex:"110px",className:ye.Z.item},Me.createElement("div",null,Me.createElement(xe.Z,{value:"`$$"+Et.value+"$$`"}),Et.name),Me.createElement("div",{className:ye.Z.children},Et.children.map((Yt,Xt)=>Me.createElement("div",{key:Xt},Yt.name&&Me.createElement("h1",null,Yt.name),Me.createElement(Fe.Z,{gutter:[10,10]},Yt.data.map((he,fe)=>Me.createElement(Te.Z,{key:fe,onClick:()=>lt(he),className:ye.Z.diamond},Me.createElement(xe.Z,{value:"`$$"+he.value+"$$`"}))))))))))}],yt=()=>{var Et=document.createElement("div");Et.innerHTML=et.current.getValue();var Tt=Et.innerText;return hn&&hn(Tt),Tt};return(0,Nt.useImperativeHandle)(Qt,()=>({getData:yt})),Me.createElement("div",{className:ye.Z.mathWrap},Me.createElement(tn.default,{defaultActiveKey:"1",items:gt}),Me.createElement("math-field",{locale:"zh_cn",className:ye.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},un||""),Be&&Me.createElement("div",{className:ye.Z.button},Me.createElement(be.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});vi.Z=se},63604:function(Pn,vi,ne){"use strict";var Nt=ne(59301),Fe=ne(93314),Te=ne(99571),tn=Object.defineProperty,be=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,se=(Qt,et,nt)=>et in Qt?tn(Qt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Qt[et]=nt,hn=(Qt,et)=>{for(var nt in et||(et={}))De.call(et,nt)&&se(Qt,nt,et[nt]);if(ye)for(var nt of ye(et))Me.call(et,nt)&&se(Qt,nt,et[nt]);return Qt},Be=(Qt,et)=>be(Qt,xe(et));const un=({img:Qt,buttonProps:et={},styles:nt={},customText:ct,ButtonText:lt,ButtonClick:gt,Buttonclass:yt,ButtonTwo:Et,imgStyles:Tt,loading:Yt=!1,className:Xt=""})=>Nt.createElement("section",{className:`tc animated fadeIn ${Xt}`,style:hn({color:"#999",margin:"100px auto",visibility:Yt?"hidden":"visible"},nt)},Nt.createElement("img",{src:Qt||Fe,style:Be(hn({},Tt),{pointerEvents:"none",userSelect:"none"})}),Nt.createElement("p",{className:"mt20 font14"},ct||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&Nt.createElement(Te.ZP,hn({className:yt,onClick:gt},et),lt),Et&&Et);vi.Z=un},23416:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return yt}});var Nt=ne(59301),Fe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Te=ne(99571),tn=ne(70557),be=ne(58531),xe=ne(25399),ye=ne(89299),De=ne(68606),Me=ne(63604),se=ne(13952),hn=ne(59669),Be=ne(59301),un=Object.defineProperty,Qt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(Et,Tt,Yt)=>Tt in Et?un(Et,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):Et[Tt]=Yt,lt=(Et,Tt)=>{for(var Yt in Tt||(Tt={}))et.call(Tt,Yt)&&ct(Et,Yt,Tt[Yt]);if(Qt)for(var Yt of Qt(Tt))nt.call(Tt,Yt)&&ct(Et,Yt,Tt[Yt]);return Et},gt=(Et,Tt,Yt)=>new Promise((Xt,he)=>{var fe=Le=>{try{Ye(Yt.next(Le))}catch(sn){he(sn)}},ue=Le=>{try{Ye(Yt.throw(Le))}catch(sn){he(sn)}},Ye=Le=>Le.done?Xt(Le.value):Promise.resolve(Le.value).then(fe,ue);Ye((Yt=Yt.apply(Et,Tt)).next())}),yt=({editOffice:Et="view",data:Tt,theme:Yt,type:Xt,filename:he,monacoEditor:fe,className:ue,style:Ye,close:Le,onClose:sn,hasMask:vn,disabledDownload:On,onImgDimensions:ri,showNodata:Vn,recordInfo:Qi})=>{const[Gn,Ce]=(0,Nt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[_t,Bn]=(0,Nt.useState)(""),[Si,ei]=(0,Nt.useState)(),_e=window.ENV==="build"?"/react/build":"",Mn=location.host.startsWith("localhost")?se.Z.PROXY_SERVER:se.Z.API_SERVER,fi=10*(1024*1024),Kn=(0,Nt.useRef)();Tt!=null&&Tt.startsWith("/api")&&Xt!=="txt"&&(Tt=se.Z.API_SERVER+Tt);const Pi=Ht=>Ht.substring(Ht.lastIndexOf("/")+1).split(".").pop();he&&fe&&(fe.filename=he),(0,Nt.useEffect)(()=>{var Ht,Lt;const Ct=(Lt=(Ht=document.cookie)==null?void 0:Ht.replace(/\s/g,""))==null?void 0:Lt.split(";");Ct==null||Ct.map(Ut=>{let Kt=Ut.split("=");Kt[0]==="_educoder_session"&&Bn(Kt[1])})},[]),(0,Nt.useEffect)(()=>{Xt==="office"&&(Tt.indexOf("bigfilescdn.")>-1||Tt.indexOf("bigfiles1")>-1?ei({url:Tt,fileType:Pi(Tt),model:Tt.indexOf("model=edit")?"edit":"view"}):le())},[Xt,Tt]);const le=()=>gt(void 0,null,function*(){console.log("data:",Tt);let Ht=Tt;Tt.startsWith("http")||(Ht=location.origin+Ht);let Lt=new URL(Ht).pathname.split("/").pop();const Ct=yield(0,De.gJ)({attachment_id:Lt});Ct.url=Mn+Ct.url,ei(Ct)}),bn=()=>{if(Tt.startsWith("http")||Tt.startsWith("blob:")){ci();return}(0,ye.Sv)(he||"educoder",Tt,he)},ci=()=>{Qi&&(0,hn.fc)({id:Qi==null?void 0:Qi.id,watch_type:1,course_id:Qi==null?void 0:Qi.course_id}),(0,ye.Nd)(he||"educoder",decodeURIComponent(Tt))};return Be.createElement("div",{style:lt({},Ye||{}),className:`${vn&&Fe.bgBlack} ${Xt?Fe.wrp:"hide"}`},Le&&Be.createElement("div",{className:Fe.close,ref:Kn},!!ri&&Be.createElement(xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Kn.current},Be.createElement("span",{onClick:()=>{sn(),ri()}},Be.createElement("i",{className:"icon-yulanpizhu"}))),!On&&Be.createElement(xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Kn.current},Be.createElement("span",{onClick:ci},Be.createElement("i",{className:"icon-quxiaozhiding"}))),Be.createElement(xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Kn.current},Be.createElement("span",{className:"",onClick:sn},Be.createElement("i",{className:"icon-guanbi1"})))),Be.createElement("div",{className:`${Fe[ue]} ${ue} ${Fe.monaco} ${Xt==="txt"?"show":"hide"}`},Xt==="txt"&&Be.createElement(Be.Fragment,null,Be.createElement(be.ZP,lt({},fe)))),Xt==="audio"&&Be.createElement("audio",{src:`${(Tt==null?void 0:Tt.indexOf("http://"))>-1||(Tt==null?void 0:Tt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Tt}`,autoPlay:!0}),Xt==="video"&&Be.createElement(Be.Fragment,null,(Tt==null?void 0:Tt.indexOf("http"))>-1?Be.createElement("video",{controls:!0,src:`${Tt}`,autoPlay:!0}):Be.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Tt}`,autoPlay:!0})),Xt==="office"&&Si&&Be.createElement("iframe",{src:`${_e}/office.html?key=${Si.key}&url=${btoa(Si.url)}&callbackUrl=${Mn+(Si.callbackUrl||"")}&fileType=${Si.fileType}&title=${Si.title||""}&model=${Et}&officeServer=${se.Z.ONLYOFFICE}&disabledDownload=${!!On}`}),Xt==="html"&&Be.createElement("iframe",{src:Tt+"&disposition=inline"}),Xt==="pdf"&&Be.createElement("iframe",{src:`${_e}/js/pdfview/index.html?filename=${he||"educoder.pdf"}&url=${encodeURIComponent(Tt)}&disabledDownload=${!!On}`}),Xt==="image"&&Be.createElement("img",{src:`${(Tt==null?void 0:Tt.indexOf("http://"))>-1||(Tt==null?void 0:Tt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Tt}`}),(Xt==="other"||Xt==="download")&&Be.createElement(Be.Fragment,null,Vn?Be.createElement(Me.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Be.createElement(Te.ZP,{icon:Be.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:bn,disabled:On},"\u4E0B\u8F7D")}):Be.createElement(Te.ZP,{type:"primary",size:"middle",onClick:bn,disabled:On},Be.createElement(tn.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},98573:function(Pn,vi,ne){"use strict";ne.d(vi,{z:function(){return Xt},Z:function(){return he}});var Nt=ne(59301),Fe=ne(14752),Te=ne(48421),tn=ne(64018),be=ne(79710),xe=ne(13952),ye=ne(89299),De=ne(15342),Me=ne(1012),se=ne(23416),hn=ne(59301),un=({html:fe})=>{const ue=(0,Nt.useRef)(null),Ye=(0,Nt.useRef)(null),Le=`.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 36px !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,Nt.useEffect)(()=>{const sn=ue.current.attachShadow({mode:"open"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=fe,sn.appendChild(Ye.current);const vn=document.createElement("style");return vn.textContent=Le,sn.appendChild(vn),()=>{sn.innerHTML=""}},[]),(0,Nt.useEffect)(()=>{Ye.current&&(Ye.current.innerHTML=fe)},[fe]),hn.createElement("div",{ref:ue})},Qt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,lt=(fe,ue,Ye)=>ue in fe?Qt(fe,ue,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):fe[ue]=Ye,gt=(fe,ue)=>{for(var Ye in ue||(ue={}))nt.call(ue,Ye)&&lt(fe,Ye,ue[Ye]);if(et)for(var Ye of et(ue))ct.call(ue,Ye)&&lt(fe,Ye,ue[Ye]);return fe};const yt="@\u2581\u2581@",Et="@\u2581@",Tt=/<pre[^>]*>/g;function Yt(fe){let ue=document.createElement("div");return ue.innerHTML=fe,ue.childNodes.length===0?"":ue.childNodes[0].nodeValue}const Xt=(fe,ue)=>{fe=fe||"";const Ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Le=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,sn=/\(\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 ue?fe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ye,(On,ri,Vn,Qi,Gn,Ce,_t)=>{const Bn=ri||Qi||Ce,Si=Vn||Gn||_t||"?";return xe.Z.API_SERVER+"/api/attachments/"+Bn+Si+"&t="+(0,ye.Jn)(Bn,Date.now())+(On.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(fe=fe.replace(vn,(On,ri,Vn,Qi,Gn,Ce,_t)=>{const Bn=ri||Qi||Ce,Si=Vn||Gn||_t||"?";return xe.Z.API_SERVER+"/attachments/download/"+Bn+Si+"&t="+(0,ye.Jn)(Bn,Date.now())+(On.indexOf(")")>-1?")":"&")}).replace(Ye,(On,ri,Vn,Qi,Gn,Ce,_t)=>{const Bn=ri||Qi||Ce,Si=Vn||Gn||_t||"?";return xe.Z.API_SERVER+"/api/attachments/"+Bn+Si+"&t="+(0,ye.Jn)(Bn,Date.now())+(On.indexOf(")")>-1?")":"&")}).replace(Le,(On,ri,Vn,Qi,Gn)=>{const Ce=ri||Qi,_t=Vn||Gn||"";return'"'+xe.Z.API_SERVER+"/api/attachments/"+Ce+_t+Ce+_t+"&t="+(0,ye.Jn)(Ce,Date.now())}).replace(sn,(On,ri,Vn,Qi,Gn)=>{const Ce=ri||Qi,_t=Vn||Gn||"";return"("+xe.Z.API_SERVER+"/files/uploads/"+Ce+_t+Ce+_t+"&t="+(0,ye.Jn)(Ce,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,`
`),fe)};var he=({value:fe="",className:ue,showTextOnly:Ye,showLines:Le,style:sn={},stylesPrev:vn={},highlightKeywords:On,showProgramFill:ri,isProgramFill:Vn,disabledFill:Qi=!1,programFillValue:Gn,onFillChange:Ce=Si=>{},onFillBlur:_t=()=>{},onFillFocus:Bn=()=>{}})=>{let Si=String(fe);const[ei,_e]=(0,Nt.useState)(""),[Mn,_n]=(0,Nt.useState)("office"),[fi,Kn]=(0,Nt.useState)([]),Pi=(0,Nt.useRef)("a"+(0,Me.Z)()),le={},bn=(Qe,ln,an)=>{const Sn=document.createElement(Qe===Et?"input":"textarea");Sn.style.width="100%",Sn.style.height=Qe===Et?"40px":"151px",Sn.rows=5,Sn.spellcheck=!1,Sn.name="edu-program-fill",Sn.placeholder="\u8BF7\u8F93\u5165",Sn.dataset.id=ln;const jn=Object.keys(le).length;return le[jn]=Sn,`<span class="edu-program-fill-wrap ${Qe===Et?"":"show"}" style="width:${Qe===Et?"400px":"100%"}" title=${an||""}><span>${Sn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ci(Qe){return Qe=Qe.replace(/!\[.*?\]\(.*?\)/g,""),Qe=Qe.replace(/\[.*?\]\(.*?\)/g,""),Qe=Qe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Qe=Qe.replace(/<embed.*?>/g,""),Qe=Qe.replace(/<img.*?>/g,""),Qe=Qe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Qe=Qe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Qe=Qe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Qe=Qe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Qe}const Ht=Qe=>Qe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ln,an){let Sn=an.replace(/(\n|\r)/g,"").split("}"),jn=[];return Sn.map(Wn=>{Wn!=""&&jn.push(`.${Pi.current} ${Wn}`)}),`<style>${jn.join("}")}</style>`}),Lt=(0,Nt.useMemo)(()=>{try{const Sn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,jn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Wn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,wn=/\(\/attachments\/download\//g;Si=Si.replace(wn,"("+xe.Z.API_SERVER+"/attachments/download/").replace(Sn,"("+xe.Z.API_SERVER+"/api/attachments/").replace(jn,'"'+xe.Z.API_SERVER+"/api/attachments/").replace(Wn,'"'+xe.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(Sn){}if(ri){let Sn=-1;return Si=Si.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(jn,Wn,wn){var qn;return++Sn,bn(jn,Sn,(qn=Gn==null?void 0:Gn[Sn])==null?void 0:qn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ht(Si||"")}</pre>`}let Qe=Ht(Si);Qe=(0,Te.ZP)(Qe);const ln=(0,Te.ez)();Si.match(/\[TOC\]/)&&(Qe=Qe.replace("<p>[TOC]</p>",(0,Te.Qv)()),(0,Te.Iy)()),Qe=Qe.replace(/(__special_katext_id_\d+__)/g,(Sn,jn)=>{const{type:Wn,expression:wn}=ln[jn];return(0,De.renderToString)(Yt(wn)||"",{displayMode:Wn==="block",throwOnError:!1,output:"html"})}),Qe=Qe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Te.AL)();const an=document.createElement("div");if(an.innerHTML=Qe,Ye)return an.innerText;if(On){const Sn=On.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return kt(an,Sn),an.innerHTML}return setTimeout(()=>Xe(),500),an.innerHTML},[Si,On]);(0,Nt.useEffect)(()=>{Pe.current&&Pe.current.querySelectorAll(["input","textarea"]).forEach(ln=>{ln.oninput=Ct,ln.onblur=Ut,ln.onfocus=Kt})},[fi]),(0,Nt.useEffect)(()=>{var Qe,ln,an,Sn,jn;if(Gn!=null&&Gn.length)try{const Wn=Pe.current.querySelectorAll(".edu-program-fill-score"),wn=Pe.current.querySelectorAll('[name="edu-program-fill"]');for(const[qn,di]of wn.entries())di.value=((Qe=Gn==null?void 0:Gn[qn])==null?void 0:Qe.value)||"",((ln=Gn==null?void 0:Gn[qn])==null?void 0:ln.type)==="warning"?di.className="program-fill-warning":((an=Gn==null?void 0:Gn[qn])==null?void 0:an.type)==="success"?di.className="program-fill-success":di.className="";for(const[qn,di]of Wn.entries())di.innerHTML=(Sn=Gn==null?void 0:Gn[qn])!=null&&Sn.score?`${(jn=Gn==null?void 0:Gn[qn])==null?void 0:jn.score}\u5206`:"";Kn(Gn)}catch(Wn){console.log(Wn,"error")}},[Gn]);const Ct=Qe=>{fi[Qe.target.dataset.id]=fi[Qe.target.dataset.id]||{},fi[Qe.target.dataset.id].value=Qe.target.value,Kn([...fi]),Ce(fi,Qe.target.dataset.id)},Ut=Qe=>{fi[Qe.target.dataset.id]=fi[Qe.target.dataset.id]||{},fi[Qe.target.dataset.id].value=Qe.target.value,Kn([...fi]),_t(fi,Qe.target.dataset.id)},Kt=Qe=>{fi[Qe.target.dataset.id]=fi[Qe.target.dataset.id]||{},fi[Qe.target.dataset.id].value=Qe.target.value,Kn([...fi]),Bn(fi,Qe.target.dataset.id)};function kt(Qe,ln){return Qe.childNodes.forEach(an=>{var Sn;if(an.childNodes.length>0)kt(an,ln);else if(an.nodeName!=="IMG")if(an.innerHTML)an.innerHTML=(Sn=an.innerHTML)==null?void 0:Sn.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const jn=document.createElement("span");jn.innerHTML=an.textContent.replace(new RegExp(ln,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),an.replaceWith(jn)}})}const Pe=(0,Nt.useRef)();Te.jb.WebkitLineClamp=Le,Le&&(sn=gt(gt({},sn),Te.jb));function dn(Qe){let ln=Qe.target;if(ln.tagName.toUpperCase()==="A"){let an=ln.getAttribute("href");if(an.indexOf("office")>-1)Qe.preventDefault(),_e(an),_n("office");else if(an.indexOf("application/pdf")>-1)Qe.preventDefault(),_e(an),_n("pdf");else if(an.indexOf("text/html")>-1)Qe.preventDefault(),_e(an),_n("html");else if(an.startsWith("#")){Qe.preventDefault();let Sn=document.getElementById(an.replace("#",""));Sn&&Sn.scrollIntoView(!0)}}}const Xe=()=>{var Qe;const ln=(Qe=Pe.current)==null?void 0:Qe.querySelectorAll("video");ln==null||ln.forEach(an=>{if(an.oncontextmenu=()=>!1,an.src.indexOf(".m3u8")>-1&&!an.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var Sn=new be.ZP;Sn.loadSource(an.src),Sn.attachMedia(an)}}})};(0,Nt.useEffect)(()=>{if(Pe.current&&Lt&&Lt.match(Tt)&&window.PR.prettyPrint(),Pe.current)return Pe.current.addEventListener("click",dn),()=>{var Qe;(Qe=Pe.current)==null||Qe.removeEventListener("click",dn),(0,Te.AL)(),(0,Te.Iy)()}},[Lt,Pe.current,dn]),(0,Nt.useEffect)(()=>{var Qe;const ln=an=>{an.preventDefault(),an.clipboardData.setData("text",window.getSelection().toString())};return(Qe=Pe.current)==null||Qe.addEventListener("copy",ln),()=>{var an;(an=Pe.current)==null||an.removeEventListener("copy",ln)}},[Pe.current]);const Ze=Qe=>/<style[\s\S]*?>/i.test(Qe||"");return Nt.createElement(Nt.Fragment,null,Ye&&Nt.createElement("div",{ref:Pe},Lt),!Ye&&!Ze(Lt)&&Nt.createElement("div",{ref:Pe,style:gt({},sn),className:`${ue||""} ${Qi?"disabled-fill":""} markdown-body ${Pi.current}`,dangerouslySetInnerHTML:{__html:Lt}}),!Ye&&Ze(Lt)&&Nt.createElement(un,{html:Lt}),Nt.createElement(se.Z,{close:!0,data:ei,type:ei!=null&&ei.length?Mn:"",style:gt({},vn),onClose:()=>_e("")}))}},41539:function(Pn,vi,ne){"use strict";ne.d(vi,{h:function(){return Et}});var Nt=ne(59301),Fe=ne(82326),Te=ne(28284),tn=ne(99571),be=ne(89780),xe=ne.n(be),ye=ne(39060),De=ne(76596),Me=Object.defineProperty,se=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,et=(Tt,Yt,Xt)=>Yt in Tt?Me(Tt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):Tt[Yt]=Xt,nt=(Tt,Yt)=>{for(var Xt in Yt||(Yt={}))un.call(Yt,Xt)&&et(Tt,Xt,Yt[Xt]);if(Be)for(var Xt of Be(Yt))Qt.call(Yt,Xt)&&et(Tt,Xt,Yt[Xt]);return Tt},ct=(Tt,Yt)=>se(Tt,hn(Yt));const lt=Fe.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"]};vi.Z=({callback:Tt,onCancel:Yt})=>{const[Xt,he]=(0,Nt.useState)("python");function fe(Ye){he(yt[Ye][1])}function ue(Ye){Tt(Ye)}return Nt.createElement(Te.default,ct(nt({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ue,style:{width:500}}),Nt.createElement(Te.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Nt.createElement(Fe.default,{getPopupContainer:Ye=>Ye.parentNode,onChange:fe},Object.keys(yt).map(Ye=>Nt.createElement(lt,{key:Ye,value:Ye},yt[Ye][0])))),Nt.createElement(Te.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Nt.createElement(Et,{mode:Xt})),Nt.createElement("div",{className:"flex-container flex-end"},Nt.createElement(tn.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Nt.createElement(tn.ZP,{type:"ghost",onClick:Yt},"\u53D6\u6D88")))};function Et({value:Tt,onChange:Yt,mode:Xt,options:he={}}){const fe=(0,Nt.useRef)(),[ue,Ye]=(0,Nt.useState)();return(0,Nt.useEffect)(()=>{if(ue){let Le=function(sn){const vn=sn.getValue();Yt&&Yt(vn)};return ue.on("change",Le),()=>{ue.off("change",Le)}}},[ue,Yt]),(0,Nt.useEffect)(()=>{ue&&ue.setOption("mode",Xt)},[ue,Xt]),(0,Nt.useEffect)(()=>{ue&&(Tt!==ue.getValue()||Tt==="")&&setTimeout(()=>{ue.setValue(Tt||"")},300)},[ue,Tt]),(0,Nt.useEffect)(()=>{if(fe.current&&!ue){const Le=xe().fromTextArea(fe.current,nt({mode:Xt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},he));Ye(Le)}},[fe.current,ue]),Nt.createElement("div",{className:"my-codemirror-container"},Nt.createElement("textarea",{ref:fe}))}},4213:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return xi}});var Nt=ne(59301),Fe=ne(89780),Te=ne.n(Fe),tn=ne(76374),be=ne(39060),xe=ne(6313),ye=ne(25717),De=ne(99498),Me=ne(25419),se=ne(67549),hn=ne(98573),Be=({value:Se="",className:we,showTextOnly:de,showLines:Nn,style:Un={}})=>{const mi=(0,Nt.useMemo)(()=>"",[Se]);return Nt.createElement(Nt.Fragment,null,Nt.createElement("div",{dangerouslySetInnerHTML:{__html:mi}}))},un=ne(59301),Qt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,yt=(Se,we,de)=>we in Se?Qt(Se,we,{enumerable:!0,configurable:!0,writable:!0,value:de}):Se[we]=de,Et=(Se,we)=>{for(var de in we||(we={}))lt.call(we,de)&&yt(Se,de,we[de]);if(ct)for(var de of ct(we))gt.call(we,de)&&yt(Se,de,we[de]);return Se},Tt=(Se,we)=>et(Se,nt(we));let Yt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Xt({onActionCallback:Se,title:we,icon:de,actionName:Nn,className:Un="",children:mi}){function on(){Se(Nn)}return un.createElement("a",{title:we,className:Un,onClick:on},un.createElement("i",{className:`${de}`}),mi)}var he=({watch:Se,showNullButton:we,showNullProgramButton:de,onActionCallback:Nn,fullScreen:Un,insertTemp:mi,hidetoolBar:on,extraUse:Oe})=>{const pe=[...Yt,{title:`${Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Se?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return un.createElement("ul",{className:"markdown-toolbar-container"},!on&&pe.map((ge,cn)=>un.createElement("li",{key:cn},ge.actionName?un.createElement(Xt,Tt(Et({},ge),{onActionCallback:Nn})):un.createElement("span",{className:"v-line"}))),we?un.createElement("li",null,un.createElement(Xt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Nn},un.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,de?un.createElement(un.Fragment,null,un.createElement("li",null,un.createElement(Xt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Nn},un.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),un.createElement("li",null,un.createElement(Xt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Nn},un.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,mi&&un.createElement("li",null,un.createElement(Xt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${mi}`,onActionCallback:Nn},un.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Oe&&un.createElement("li",null,Oe),un.createElement("li",{className:"btn-full-screen"},un.createElement(Xt,{icon:`${Un?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Un?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Nn})))},fe=ne(51498),ue=ne(28284),Ye=ne(37568),Le=ne(99571),sn=Object.defineProperty,vn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Gn=(Se,we,de)=>we in Se?sn(Se,we,{enumerable:!0,configurable:!0,writable:!0,value:de}):Se[we]=de,Ce=(Se,we)=>{for(var de in we||(we={}))Vn.call(we,de)&&Gn(Se,de,we[de]);if(ri)for(var de of ri(we))Qi.call(we,de)&&Gn(Se,de,we[de]);return Se},_t=(Se,we)=>vn(Se,On(we));const Bn={labelCol:{span:4},wrapperCol:{span:20}};var Si=({callback:Se,onCancel:we})=>{function de(Nn){Se(Nn)}return Nt.createElement(ue.default,_t(Ce({},Bn),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:de,style:{width:500}}),Nt.createElement(ue.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Nt.createElement(Ye.default,null)),Nt.createElement(ue.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Nt.createElement(Ye.default,null)),Nt.createElement("div",{className:"flex-container flex-end"},Nt.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Nt.createElement(Le.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))},ei=ne(41539),_e=ne(35944),Mn=ne(62957),_n=ne(77019),fi=ne(89837),Kn=ne(59301),Pi=({callback:Se,onCancel:we})=>{const de=document.createElement("canvas"),Nn=de.getContext("2d");de.width=1e3,de.height=800,Nn.fillStyle="#ffffff",Nn.fillRect(0,0,de.width,de.height);const Un=de.toDataURL("image/png");return Kn.createElement(Mn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Kn.createElement(_n.Z,{style:{height:"100vh"}},Kn.createElement(fi.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Un,visible:!0,title:String(Date.now())},onOk:mi=>{Se({src:mi.url})},onClose:we})))},le=ne(12378);function bn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(bn,go.CommandHandler),bn.prototype.canAlignSelection=function(){var Se=this.diagram;return!(Se===null||Se.isReadOnly||Se.isModelReadOnly||Se.selection.count<2)},bn.prototype.alignLeft=function(){var Se=this.diagram;Se.startTransaction("aligning left");var we=1/0;Se.selection.each(function(de){de instanceof go.Link||(we=Math.min(de.position.x,we))}),Se.selection.each(function(de){de instanceof go.Link||de.move(new go.Point(we,de.position.y))}),Se.commitTransaction("aligning left")},bn.prototype.alignRight=function(){var Se=this.diagram;Se.startTransaction("aligning right");var we=-1/0;Se.selection.each(function(de){if(!(de instanceof go.Link)){var Nn=de.actualBounds.x+de.actualBounds.width;we=Math.max(Nn,we)}}),Se.selection.each(function(de){de instanceof go.Link||de.move(new go.Point(we-de.actualBounds.width,de.position.y))}),Se.commitTransaction("aligning right")},bn.prototype.alignTop=function(){var Se=this.diagram;Se.startTransaction("alignTop");var we=1/0;Se.selection.each(function(de){de instanceof go.Link||(we=Math.min(de.position.y,we))}),Se.selection.each(function(de){de instanceof go.Link||de.move(new go.Point(de.position.x,we))}),Se.commitTransaction("alignTop")},bn.prototype.alignBottom=function(){var Se=this.diagram;Se.startTransaction("aligning bottom");var we=-1/0;Se.selection.each(function(de){if(!(de instanceof go.Link)){var Nn=de.actualBounds.y+de.actualBounds.height;we=Math.max(Nn,we)}}),Se.selection.each(function(de){de instanceof go.Link||de.move(new go.Point(de.actualBounds.x,we-de.actualBounds.height))}),Se.commitTransaction("aligning bottom")},bn.prototype.alignCenterX=function(){var Se=this.diagram,we=Se.selection.first();if(we){Se.startTransaction("aligning Center X");var de=we.actualBounds.x+we.actualBounds.width/2;Se.selection.each(function(Nn){Nn instanceof go.Link||Nn.move(new go.Point(de-Nn.actualBounds.width/2,Nn.actualBounds.y))}),Se.commitTransaction("aligning Center X")}},bn.prototype.alignCenterY=function(){var Se=this.diagram,we=Se.selection.first();if(we){Se.startTransaction("aligning Center Y");var de=we.actualBounds.y+we.actualBounds.height/2;Se.selection.each(function(Nn){Nn instanceof go.Link||Nn.move(new go.Point(Nn.actualBounds.x,de-Nn.actualBounds.height/2))}),Se.commitTransaction("aligning Center Y")}},bn.prototype.alignColumn=function(Se){var we=this.diagram;we.startTransaction("align Column"),Se===void 0&&(Se=0),Se=parseFloat(Se);var de=new Array;we.selection.each(function(Oe){Oe instanceof go.Link||de.push(Oe)});for(var Nn=0;Nn<de.length-1;Nn++){var Un=de[Nn],mi=Un.actualBounds.y+Un.actualBounds.height+Se,on=de[Nn+1];on.move(new go.Point(Un.actualBounds.x,mi))}we.commitTransaction("align Column")},bn.prototype.alignRow=function(Se){Se===void 0&&(Se=0),Se=parseFloat(Se);var we=this.diagram;we.startTransaction("align Row");var de=new Array;we.selection.each(function(Oe){Oe instanceof go.Link||de.push(Oe)});for(var Nn=0;Nn<de.length-1;Nn++){var Un=de[Nn],mi=Un.actualBounds.x+Un.actualBounds.width+Se,on=de[Nn+1];on.move(new go.Point(mi,Un.actualBounds.y))}we.commitTransaction("align Row")},bn.prototype.canRotate=function(Se){var we=this.diagram;return!(we===null||we.isReadOnly||we.isModelReadOnly||we.selection.count<1)},bn.prototype.rotate=function(Se){Se===void 0&&(Se=90);var we=this.diagram;we.startTransaction("rotate "+Se.toString());var we=this.diagram;we.selection.each(function(de){de instanceof go.Link||de instanceof go.Group||(de.angle+=Se)}),we.commitTransaction("rotate "+Se.toString())},bn.prototype.pullToFront=function(){var Se=this.diagram;Se.startTransaction("pullToFront");var we=new go.Map;Se.selection.each(function(de){we.set(de.layer,0)}),we.iteratorKeys.each(function(de){var Nn=0;de.parts.each(function(Un){if(!Un.isSelected){var mi=Un.zOrder;isNaN(mi)?Un.zOrder=0:Nn=Math.max(Nn,mi)}}),we.set(de,Nn)}),Se.selection.each(function(de){bn._assignZOrder(de,we.get(de.layer)+1)}),Se.commitTransaction("pullToFront")},bn.prototype.pushToBack=function(){var Se=this.diagram;Se.startTransaction("pushToBack");var we=new go.Map;Se.selection.each(function(de){we.set(de.layer,0)}),we.iteratorKeys.each(function(de){var Nn=0;de.parts.each(function(Un){if(!Un.isSelected){var mi=Un.zOrder;isNaN(mi)?Un.zOrder=0:Nn=Math.min(Nn,mi)}}),we.set(de,Nn)}),Se.selection.each(function(de){bn._assignZOrder(de,we.get(de.layer)-1-bn._findGroupDepth(de))}),Se.commitTransaction("pushToBack")},bn._assignZOrder=function(Se,we,de){de===void 0&&(de=Se),Se.layer===de.layer&&(Se.zOrder=we),Se instanceof go.Group&&Se.memberParts.each(function(Nn){bn._assignZOrder(Nn,we+1,de)})},bn._findGroupDepth=function(Se){if(Se instanceof go.Group){var we=0;return Se.memberParts.each(function(de){we=Math.max(we,bn._findGroupDepth(de))}),we+1}else return 0},bn.prototype.doKeyDown=function(){var Se=this.diagram;if(Se!==null){var we=Se.lastInput;if(we.key==="Up"||we.key==="Down"||we.key==="Left"||we.key==="Right"){var de=this.arrowKeyBehavior;if(de==="none")return;if(de==="select"){this._arrowKeySelect();return}else if(de==="move"){this._arrowKeyMove();return}else if(de==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},bn.prototype._getAllParts=function(){var Se=new Array;return this.diagram.nodes.each(function(we){Se.push(we)}),this.diagram.parts.each(function(we){Se.push(we)}),Se},bn.prototype._arrowKeyMove=function(){var Se=this.diagram,we=Se.lastInput,de=0,Nn=0;if(we.control||we.meta)de=1,Nn=1;else if(Se.grid!==null){var Un=Se.grid.gridCellSize;Nn=Un.width,de=Un.height}Se.startTransaction("arrowKeyMove"),Se.selection.each(function(mi){we.key==="Up"?mi.move(new go.Point(mi.actualBounds.x,mi.actualBounds.y-de)):we.key==="Down"?mi.move(new go.Point(mi.actualBounds.x,mi.actualBounds.y+de)):we.key==="Left"?mi.move(new go.Point(mi.actualBounds.x-Nn,mi.actualBounds.y)):we.key==="Right"&&mi.move(new go.Point(mi.actualBounds.x+Nn,mi.actualBounds.y))}),Se.commitTransaction("arrowKeyMove")},bn.prototype._arrowKeySelect=function(){var Se=this.diagram,we=Se.lastInput,de=null;we.key==="Up"?de=this._findNearestPartTowards(270):we.key==="Down"?de=this._findNearestPartTowards(90):we.key==="Left"?de=this._findNearestPartTowards(180):we.key==="Right"&&(de=this._findNearestPartTowards(0)),de!==null&&(we.shift?de.isSelected=!0:we.control||we.meta?de.isSelected=!de.isSelected:Se.select(de))},bn.prototype._findNearestPartTowards=function(Se){var we=this.diagram.selection.first();if(we===null)return null;for(var de=we.actualBounds.center,Nn=this._getAllParts(),Un=1/0,mi=we,on=0;on<Nn.length;on++){var Oe=Nn[on];if(Oe!==we&&Oe.canSelect()){var pe=Oe.actualBounds.center,ge=de.directionPoint(pe),cn=this._angleCloseness(ge,Se);if(cn<=45){var Zt=de.distanceSquaredPoint(pe);Zt*=1+Math.sin(cn*Math.PI/180),Zt<Un&&(Un=Zt,mi=Oe)}}}return mi},bn.prototype._angleCloseness=function(Se,we){return Math.min(Math.abs(we-Se),Math.min(Math.abs(we+360-Se),Math.abs(we-360-Se)))},bn.prototype._arrowKeyTree=function(){var Se=this.diagram,we=Se.selection.first();if(we instanceof go.Node){var de=Se.lastInput;if(de.key==="Right"){if(!we.isTreeLeaf)if(!we.isTreeExpanded)Se.commandHandler.canExpandTree(we)&&Se.commandHandler.expandTree(we);else{var Nn=this._sortTreeChildrenByY(we).first();Nn!==null&&Se.select(Nn)}}else if(de.key==="Left")if(!we.isTreeLeaf&&we.isTreeExpanded)Se.commandHandler.canCollapseTree(we)&&Se.commandHandler.collapseTree(we);else{var Un=we.findTreeParentNode();Un!==null&&Se.select(Un)}else if(de.key==="Up"){var Un=we.findTreeParentNode();if(Un!==null){var mi=this._sortTreeChildrenByY(Un),on=mi.indexOf(we);if(on>0){for(var Oe=mi.elt(on-1);Oe!==null&&Oe.isTreeExpanded&&!Oe.isTreeLeaf;){var pe=this._sortTreeChildrenByY(Oe);Oe=pe.last()}Oe!==null&&Se.select(Oe)}else Se.select(Un)}}else if(de.key==="Down")if(we.isTreeExpanded&&!we.isTreeLeaf){var Nn=this._sortTreeChildrenByY(we).first();Nn!==null&&Se.select(Nn)}else for(;we!==null;){var Un=we.findTreeParentNode();if(Un===null)break;var mi=this._sortTreeChildrenByY(Un),on=mi.indexOf(we);if(on<mi.length-1){Se.select(mi.elt(on+1));break}else we=Un}var ge=Se.selection.first();ge!==null&&Se.scrollToRect(ge.actualBounds)}},bn.prototype._sortTreeChildrenByY=function(Se){var we=new go.List().addAll(Se.findTreeChildrenNodes());return we.sort(function(de,Nn){var Un=de.location,mi=Nn.location;return Un.y<mi.y?-1:Un.y>mi.y?1:Un.x<mi.x?-1:Un.x>mi.x?1:0}),we},bn.prototype.copyToClipboard=function(Se){go.CommandHandler.prototype.copyToClipboard.call(this,Se),this._lastPasteOffset.set(this.pasteOffset)},bn.prototype.pasteFromClipboard=function(){var Se=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Se,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Se},Object.defineProperty(bn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Se){if(Se!=="move"&&Se!=="select"&&Se!=="scroll"&&Se!=="tree"&&Se!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Se);this._arrowKeyBehavior=Se}}),Object.defineProperty(bn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Se){if(!(Se instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Se);this._pasteOffset.set(Se)}});var ci=bn,Ht=ne(74042),Lt=ne(5269),Ct=ne(52430),Ut={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Kt=ne(64681),kt=ne(59301),Pe=(Se,we,de)=>new Promise((Nn,Un)=>{var mi=pe=>{try{Oe(de.next(pe))}catch(ge){Un(ge)}},on=pe=>{try{Oe(de.throw(pe))}catch(ge){Un(ge)}},Oe=pe=>pe.done?Nn(pe.value):Promise.resolve(pe.value).then(mi,on);Oe((de=de.apply(Se,we)).next())});function dn({onCancel:Se,callback:we}){let de=(0,Nt.useRef)(),Nn=(0,Nt.useRef)(),Un=(0,Nt.useRef)(),mi=(0,Nt.useRef)(!1);const on=(0,Nt.useRef)(!1),[Oe,pe]=(0,Nt.useState)(0);function ge(){const Zt=le.bx.make,Ue={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"};de.current=new le.S0(Nn.current,{padding:20,grid:Zt(le.s_,"Grid",Zt(le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Zt(le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:kn=>{var ai=kn.diagram.commandHandler.addTopLevelParts(kn.diagram.selection,!0);ai||kn.diagram.currentTool.doCancel()},commandHandler:Zt(ci),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:kn=>{var ai=kn.subject;ai.location=ai.location.copy().snapToGridPoint(kn.diagram.grid.gridOrigin,kn.diagram.grid.gridCellSize),setTimeout(()=>{kn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:kn=>{var ai=kn.subject;setTimeout(()=>{kn.diagram.commandHandler.editTextBlock()})},LinkRelinked:kn=>{var ai=kn.parameter.part;ai.invalidateConnectedLinks();var gi=kn.subject;kn.diagram.toolManager.linkingTool.isForwards?gi.toNode.invalidateConnectedLinks():gi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),de.current.nodeTemplate=Zt(le.NB,"Auto",{locationSpot:le.z6.Center,locationObjectName:"SHAPE",desiredSize:new le.$u(120,60),minSize:new le.$u(40,40),resizable:!0,resizeCellSize:new le.$u(10,10),rotatable:!0},new le.KX("location","loc",le.E9.parse).makeTwoWay(le.E9.stringify),new le.KX("desiredSize","size",le.$u.parse).makeTwoWay(le.$u.stringify),Zt(le.bn,{name:"SHAPE",fill:Ue.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:le.z6.AllSides,toSpot:le.z6.AllSides},new le.KX("figure"),new le.KX("fill"),new le.KX("stroke","borderColor"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),Zt(le.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Zt(le.al,{margin:1,textAlign:"center",overflow:le.al.OverflowEllipsis,editable:!0},new le.KX("text").makeTwoWay(),new le.KX("stroke","color"))),de.current.nodeTemplate.toolTip=Zt("ToolTip",Zt(le.s_,"Vertical",{maxSize:new le.$u(200,NaN)},Zt(le.al,{font:"bold 10pt sans-serif",textAlign:"center"},new le.KX("text")),Zt(le.al,{font:"10pt sans-serif",textAlign:"center"},new le.KX("text","details"))));function fn(kn,ai){var gi=(Bi,Li)=>{Bi.handled=!0,Bi.diagram.model.commit(Xi=>{var nr=Li.part.adornedPart,qt=new le.E9().setRectSpot(nr.actualBounds,kn);qt.subtract(nr.location),qt.scale(2,2),qt.x+=Math.sign(qt.x)*130,qt.y+=Math.sign(qt.y)*130,qt.add(nr.location),qt.snapToGridPoint(Bi.diagram.grid.gridOrigin,Bi.diagram.grid.gridCellSize);var $t=Xi.copyNodeData(nr.data);Xi.setGroupKeyForNodeData($t,Xi.getGroupKeyForNodeData(nr.data)),Xi.addNodeData($t);var Vt={from:nr.key,to:Xi.getKeyForNodeData($t)};Xi.addLinkData(Vt);var Ne=Bi.diagram.findNodeForData($t);Ne.location=qt,Bi.diagram.select(Ne),setTimeout(()=>{Bi.diagram.commandHandler.editTextBlock()},20)})};return Zt(le.bn,{figure:ai,alignment:kn,alignmentFocus:kn.opposite(),width:kn.equals(le.z6.Top)||kn.equals(le.z6.Bottom)?25:18,height:kn.equals(le.z6.Top)||kn.equals(le.z6.Bottom)?18:25,fill:"orange",stroke:Ue.white,strokeWidth:4,mouseEnter:(Bi,Li)=>Li.fill="dodgerblue",mouseLeave:(Bi,Li)=>Li.fill="orange",isActionable:!0,click:gi,contextClick:gi})}function Rn(kn){return Zt(le.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:(ai,gi)=>gi.fill="dodgerblue",mouseLeave:(ai,gi)=>gi.fill="orange",click:(ai,gi)=>{ai.diagram.commandHandler.showContextMenu(gi.part.adornedPart)}},kn||{})}de.current.nodeTemplate.selectionAdornmentTemplate=Zt(le.uz,"Spot",Zt(le.Vm,{padding:10}),fn(le.z6.Top,"TriangleUp"),fn(le.z6.Left,"TriangleLeft"),fn(le.z6.Right,"TriangleRight"),fn(le.z6.Bottom,"TriangleDown"),Rn({alignment:new le.z6(.75,0)}));function He(kn,ai){return(gi,Bi)=>{gi.handled=!0,gi.diagram.model.commit(Li=>{Li.set(Bi.part.adornedPart.data,kn,ai)})}}function xn(kn,ai){return ai||(ai="color"),Zt(le.bn,{width:16,height:16,stroke:"lightgray",fill:kn,margin:1,background:"transparent",mouseEnter:(gi,Bi)=>Bi.stroke="dodgerblue",mouseLeave:(gi,Bi)=>Bi.stroke="lightgray",click:He(ai,kn),contextClick:He(ai,kn)})}function Xn(){return[Zt("ContextMenuButton",Zt(le.s_,"Horizontal",xn(Ue.white,"fill"),xn(Ue.beige,"fill"),xn(Ue.extralightblue,"fill"),xn(Ue.extralightred,"fill"))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",xn(Ue.lightgray,"fill"),xn(Ue.lightgreen,"fill"),xn(Ue.lightblue,"fill"),xn(Ue.lightred,"fill")))]}function Qn(){return[Zt("ContextMenuButton",Zt(le.s_,"Horizontal",xn(Ue.black),xn(Ue.green),xn(Ue.blue),xn(Ue.red))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",xn(Ue.white),xn(Ue.magenta),xn(Ue.purple),xn(Ue.orange)))]}function yi(kn,ai){return ai||(ai="thickness"),Zt(le.bn,"LineH",{width:16,height:16,strokeWidth:kn,margin:1,background:"transparent",mouseEnter:(gi,Bi)=>Bi.background="dodgerblue",mouseLeave:(gi,Bi)=>Bi.background="transparent",click:He(ai,kn),contextClick:He(ai,kn)})}function ni(kn,ai){return ai||(ai="dash"),Zt(le.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:kn,margin:1,background:"transparent",mouseEnter:(gi,Bi)=>Bi.background="dodgerblue",mouseLeave:(gi,Bi)=>Bi.background="transparent",click:He(ai,kn),contextClick:He(ai,kn)})}function En(){return[Zt("ContextMenuButton",Zt(le.s_,"Horizontal",yi(1),yi(2),yi(3),yi(4))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",ni(null),ni([2,4]),ni([4,4])))]}function Jn(kn,ai){return ai||(ai="figure"),Zt(le.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:kn,margin:1,background:"transparent",mouseEnter:(gi,Bi)=>Bi.fill="dodgerblue",mouseLeave:(gi,Bi)=>Bi.fill="lightgray",click:He(ai,kn),contextClick:He(ai,kn)})}de.current.nodeTemplate.contextMenu=Zt("ContextMenu",Zt("ContextMenuButton",Zt(le.s_,"Horizontal",Jn("Rectangle"),Jn("RoundedRectangle"),Jn("Ellipse"),Jn("Diamond"))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",Jn("Parallelogram2"),Jn("ManualOperation"),Jn("Procedure"),Jn("Cylinder1"))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",Jn("Terminator"),Jn("CreateRequest"),Jn("Document"),Jn("TriangleDown"))),Xn(),Qn(),En()),de.current.groupTemplate=Zt(le.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:le.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(kn,ai)=>{var gi=ai.addMembers(ai.diagram.selection,!0);gi||ai.diagram.currentTool.doCancel()},avoidable:!1},new le.KX("location","loc",le.E9.parse).makeTwoWay(le.E9.stringify),Zt(le.s_,"Auto",{name:"BODY"},Zt(le.bn,{parameter1:10,fill:Ue.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:le.z6.AllSides,toSpot:le.z6.AllSides},new le.KX("fill"),new le.KX("stroke","color"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),Zt(le.Vm,{background:"transparent",margin:20})),Zt(le.al,{alignment:le.z6.Top,alignmentFocus:le.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new le.KX("text"),new le.KX("stroke","color"))),de.current.groupTemplate.selectionAdornmentTemplate=Zt(le.uz,"Spot",Zt(le.s_,"Auto",Zt(le.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Zt(le.Vm,{margin:1.5})),Rn({alignment:le.z6.TopRight,alignmentFocus:le.z6.BottomRight})),de.current.groupTemplate.contextMenu=Zt("ContextMenu",Xn(),Qn(),En()),de.current.linkTemplate=Zt(le.rU,{layerName:"Foreground",routing:le.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new le.KX("fromSpot","fromSpot",le.z6.parse),new le.KX("toSpot","toSpot",le.z6.parse),new le.KX("fromShortLength","dir",kn=>kn>=1?10:0),new le.KX("toShortLength","dir",kn=>kn>=1?10:0),new le.KX("points").makeTwoWay(),Zt(le.bn,{strokeWidth:2},new le.KX("stroke","color"),new le.KX("strokeWidth","thickness"),new le.KX("strokeDashArray","dash")),Zt(le.bn,{segmentIndex:0,segmentOffset:new le.E9(15,0),segmentOrientation:le.rU.OrientAlong,alignmentFocus:le.z6.Right,figure:"circle",width:10,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",kn=>kn===1)),Zt(le.bn,{segmentIndex:-1,segmentOffset:new le.E9(-10,6),segmentOrientation:le.rU.OrientPlus90,alignmentFocus:le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",kn=>kn>=1),new le.KX("width","thickness",kn=>7+3*kn),new le.KX("height","thickness",kn=>7+3*kn),new le.KX("segmentOffset","thickness",kn=>new le.E9(-15,4+1.5*kn))),Zt(le.bn,{segmentIndex:0,segmentOffset:new le.E9(15,-6),segmentOrientation:le.rU.OrientMinus90,alignmentFocus:le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new le.KX("fill","color"),new le.KX("visible","dir",kn=>kn===2),new le.KX("width","thickness",kn=>7+3*kn),new le.KX("height","thickness",kn=>7+3*kn),new le.KX("segmentOffset","thickness",kn=>new le.E9(-15,4+1.5*kn))),Zt(le.al,{alignmentFocus:new le.z6(0,1,-4,0),editable:!0},new le.KX("text").makeTwoWay(),new le.KX("stroke","color"))),de.current.linkTemplate.selectionAdornmentTemplate=Zt(le.uz,Zt(le.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ki(2)},new le.KX("pathPattern","thickness",Ki)),Rn({alignmentFocus:new le.z6(0,0,-6,-4)}));function Ki(kn){return Zt(le.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(kn+4).toString()+" H3"})}function qi(kn){var ai="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return kn===0?ai="M0 0 M16 16 M0 8 L16 8":kn===2&&(ai="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Zt(le.bn,{geometryString:ai,margin:2,background:"transparent",mouseEnter:(gi,Bi)=>Bi.background="dodgerblue",mouseLeave:(gi,Bi)=>Bi.background="transparent",click:He("dir",kn),contextClick:He("dir",kn)})}function rr(kn){var ai=(gi,Bi)=>{gi.handled=!0,gi.diagram.model.commit(Li=>{var Xi=Bi.part.adornedPart;Li.set(Xi.data,kn?"toSpot":"fromSpot",le.z6.stringify(le.z6.AllSides)),(kn?Xi.toNode:Xi.fromNode).invalidateConnectedLinks()})};return Zt(le.bn,{width:12,height:12,fill:"transparent",mouseEnter:(gi,Bi)=>Bi.background="dodgerblue",mouseLeave:(gi,Bi)=>Bi.background="transparent",click:ai,contextClick:ai})}function Ge(kn,ai){var gi=0,Bi=le.z6.RightSide;kn.equals(le.z6.Top)?(gi=270,Bi=le.z6.TopSide):kn.equals(le.z6.Left)?(gi=180,Bi=le.z6.LeftSide):kn.equals(le.z6.Bottom)&&(gi=90,Bi=le.z6.BottomSide),ai||(gi-=180);var Li=(Xi,nr)=>{Xi.handled=!0,Xi.diagram.model.commit(qt=>{var $t=nr.part.adornedPart;qt.set($t.data,ai?"toSpot":"fromSpot",le.z6.stringify(Bi)),(ai?$t.toNode:$t.fromNode).invalidateConnectedLinks()})};return Zt(le.bn,{alignment:kn,alignmentFocus:kn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:gi,background:"transparent",mouseEnter:(Xi,nr)=>nr.background="dodgerblue",mouseLeave:(Xi,nr)=>nr.background="transparent",click:Li,contextClick:Li})}de.current.linkTemplate.contextMenu=Zt("ContextMenu",Qn(),En(),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",qi(0),qi(1),qi(2))),Zt("ContextMenuButton",Zt(le.s_,"Horizontal",Zt(le.s_,"Spot",rr(!1),Ge(le.z6.Top,!1),Ge(le.z6.Left,!1),Ge(le.z6.Right,!1),Ge(le.z6.Bottom,!1)),Zt(le.s_,"Spot",{margin:new le.Zt(0,0,0,2)},rr(!0),Ge(le.z6.Top,!0),Ge(le.z6.Left,!0),Ge(le.z6.Right,!0),Ge(le.z6.Bottom,!0)))));const eo=`{ "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 vr=["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 Or(kn){return console.log("shapeName:",kn),vr.indexOf(kn)>=0}var Re=new le.YI(Un.current,{maxSelectionCount:1,linkTemplate:Zt(le.rU,{locationSpot:le.z6.Center,selectionAdornmentTemplate:Zt(le.uz,"Link",{locationSpot:le.z6.Center},Zt(le.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Zt(le.bn,{toArrow:"Standard",stroke:null}))},{routing:le.rU.AvoidsNodes,curve:le.rU.JumpOver,corner:5,toShortLength:4},new le.KX("points"),Zt(le.bn,{isPanelMain:!0,strokeWidth:2}),Zt(le.bn,{toArrow:"Standard",stroke:null})),model:new le.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...le.bn.getFigureGenerators().toArray().map(kn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:kn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return de.current.addDiagramListener("TextEdited",function(kn){var ai;const gi=kn.subject.part;var Bi=(ai=document.activeElement)==null?void 0:ai.value;typeof Bi=="string"&&Bi.trim()===""&&de.current.model.commit(function(Li){Li.set(gi.data,"text","\u672A\u547D\u540D"),de.current.commandHandler.stopCommand()},"increment")}),Re.nodeTemplate=Zt(le.NB,"Auto",{locationSpot:le.z6.Center},new le.KX("location","location",le.E9.parse).makeTwoWay(le.E9.stringify),Zt(le.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 le.KX("stroke").makeTwoWay(),new le.KX("fill").makeTwoWay(),new le.KX("figure")),Zt(le.al,{margin:new le.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new le.$u(16,16),maxSize:new le.$u(10,NaN),textAlign:"center",editable:!0},new le.KX("key").makeTwoWay())),setTimeout(()=>{de.current.grid=Zt(le.s_,"Grid",Zt(le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Zt(le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),de.current.grid.visible=!0,de.current.grid.gridCellStroke="darkgray",de.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=de.current,de.current}const cn=()=>Pe(this,null,function*(){var Zt,Ue=de.current.makeImage();const fn=yield(0,Ct.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ue.src,file_data:JSON.stringify({login:(Zt=(0,Kt.eY)())==null?void 0:Zt.login,data:JSON.parse(de.current.model.toJson())})}});we({src:fn.url})});return(0,Nt.useEffect)(()=>(setTimeout(()=>{ge()},500),pe(Oe+1),()=>{de.current=null}),[]),kt.createElement("div",{ref:on,className:"body-overflow-initial"},kt.createElement(Mn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Oe,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:kt.createElement(_n.Z,null,kt.createElement(Lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),kt.createElement(Lt.Z,{onClick:()=>{var Zt,Ue,fn=de.current.selection.first();if(mi.current=!mi.current,document.activeElement&&fn){let Rn=(Ue=(Zt=document.activeElement)==null?void 0:Zt.value)==null?void 0:Ue.trim();typeof Rn=="string"&&de.current.model.commit(function(He){He.set(fn.data,"text",Rn||"\u672A\u547D\u540D"),de.current.commandHandler.stopCommand()},"increment")}pe(Oe+1)}},kt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Se},kt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:mi.current?"none":"block"},className:Ut.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:Ut.myPaletteDiv,ref:Un})),kt.createElement("div",{style:{flex:1,position:"relative"}},kt.createElement("div",{ref:Nn,style:{height:"80vh"}}))),kt.createElement("div",{className:"tr"},kt.createElement(Le.ZP,{size:"large",onClick:cn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Xe=dn,Ze=ne(47889),Qe=ne(71051);const ln=Ze.ZP.Group,an={margin:"0 8px"};var Sn=({callback:Se,onCancel:we})=>{function de(Nn){Se(Nn)}return Nt.createElement(ue.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:de},Nt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Nt.createElement("span",{style:an},"\u5355\u5143\u683C\u6570\uFF1A"),Nt.createElement("span",{style:an},"\u884C\u6570"),Nt.createElement(ue.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Nt.createElement(Qe.Z,null)),Nt.createElement("span",{style:an},"\u5217\u6570"),Nt.createElement(ue.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Nt.createElement(Qe.Z,null))),Nt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Nt.createElement("span",{style:an},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Nt.createElement(ue.default.Item,{name:"align"},Nt.createElement(ln,null,Nt.createElement(Ze.ZP,{value:"default"},Nt.createElement("i",{className:"fa fa-align-justify"})),Nt.createElement(Ze.ZP,{value:"left"},Nt.createElement("i",{className:"fa fa-align-left"})),Nt.createElement(Ze.ZP,{value:"center"},Nt.createElement("i",{className:"fa fa-align-center"})),Nt.createElement(Ze.ZP,{value:"right"},Nt.createElement("i",{className:"fa fa-align-right"}))))),Nt.createElement("div",{className:"flex-container flex-end"},Nt.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Nt.createElement(Le.ZP,{type:"ghost",onClick:we},"\u53D6\u6D88")))},jn=ne(71411),Wn=ne(84072),wn=ne.n(Wn),di=(0,Nt.forwardRef)(({use3d:Se,width:we,height:de,callback:Nn,showSaveButton:Un},mi)=>{const on=(0,Nt.useRef)(),Oe=(0,Nt.useRef)(),[pe,ge]=(0,Nt.useState)(!1),cn=(0,Nt.useRef)({id:on,appName:"graphing",width:we||1e3,height:de||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Nt.useEffect)(()=>{Oe.current=new(wn())(cn.current,!0),window.onload=function(){Oe.current.inject("applet_container")}},[]);const Zt=()=>{var Ue=window.ggbApplet.getPNGBase64(1,!0,72);return Nn&&Nn(Ue),Ue};return(0,Nt.useEffect)(()=>{cn.current.appName=pe?"3D":"graphing",Oe.current.inject("applet_container")},[pe]),(0,Nt.useEffect)(()=>{ge(Se)},[Se]),(0,Nt.useImperativeHandle)(mi,()=>({getImgData:Zt})),Nt.createElement(Nt.Fragment,null,Nt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:on}),Nt.createElement(_n.Z,{align:"middle"},Nt.createElement(Lt.Z,{flex:1},Nt.createElement(jn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:pe,onChange:Ue=>ge(Ue)})),Nt.createElement(Lt.Z,null,Nt.createElement(Le.ZP,{size:"large",onClick:Zt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),hr=ne(53267),tr=ne(6767);const ro="link",pr="upload-image",er="add-flowchart",ur="draw-image",Lo="add-flowchart",Bo="code-block",Ur="add-table",Er="------------",lo={default:Er,left:`:${Er}`,center:`:${Er}:`,right:`${Er}:`};var Vo=ne(47458);function ko(){}let Eo=0;const jr=1e4,Br="\u2581",Gr="@\u2581\u2581@",Pt="@\u2581@",$i=`
**\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`,Hr=["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 Dr(Se){return/^\d+$/.test(Se)?`${Se}px`:Se}const Ko=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Fs={[Ko+"-B"]:"bold",[Ko+"-I"]:"italic"},Fi={[ro]:"\u6DFB\u52A0\u94FE\u63A5",[Bo]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[pr]:"\u6DFB\u52A0\u56FE\u7247",[ur]:"\u6DFB\u52A0\u753B\u56FE",[er]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ur]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var xi=({defaultValue:Se="",onChange:we,width:de="100%",height:Nn=400,miniToolbar:Un=!1,isFocus:mi=!1,watch:on,insertTemp:Oe,mode:pe="markdown",id:ge="markdown-editor-id",showResizeBar:cn=!1,noStorage:Zt=!1,showNullButton:Ue=!1,showNullProgramButton:fn=!1,hidetoolBar:Rn=!1,fullScreen:He=!1,onBlur:xn,onCMBeforeChange:Xn,onFullScreen:Qn,className:yi="",disablePaste:ni=!1,disabled:En=!1,disabledFill:Jn=!1,placeholder:Ki="",values:qi="",extraUse:rr})=>{const[Ge,eo]=(0,Nt.useState)(null),[vr,Or]=(0,Nt.useState)(Se),[Re,kn]=(0,Nt.useState)(on),[ai,gi]=(0,Nt.useState)(He),[Bi,Li]=(0,Nt.useState)(""),[Xi,nr]=(0,Nt.useState)(0),[qt,$t]=(0,Nt.useState)(Nn),[Vt,Ne]=(0,Nt.useState)(!1),[Ae,Je]=(0,Nt.useState)(0),[yn,Fn]=(0,Nt.useState)(0),wi=(0,Nt.useRef)(),si=(0,Nt.useRef)(),Ln=(0,Nt.useRef)(),Hn=(0,Nt.useRef)();(0,Nt.useEffect)(()=>{const $n=window.scrollY||window.pageYOffset;Or(qi),Ge==null||Ge.setValue(qi),window.scrollTo(0,$n)},[qi]),(0,Nt.useEffect)(()=>{Qn==null||Qn(ai)},[ai]),(0,Nt.useEffect)(()=>{if(wi.current){let $n=function(rn,ui){var or;if(ni){ui.preventDefault();return}const Mr=ui.clipboardData;if(Mr){const wr=Mr.types.toString(),Pr=Mr.items;if(wr==="Files"||Mr.types.indexOf("Files")>-1){if(ui.preventDefault(),pe=="stex")return;try{let Nr=Pr[1];((or=Pr[0])==null?void 0:or.kind)==="file"&&(Nr=Pr[0]);const Xr=Nr.getAsFile(),To=Xr.name.split(".").pop();(0,_e.I)(Xr,Co=>{var Oo,ke,Rr;Co.id?((Oo=Xr==null?void 0:Xr.type)==null?void 0:Oo.indexOf("image"))>-1?pi.replaceSelection(`<img width="100%" src="/api/attachments/${Co.id}?type=${Co.content_type})" alt="" />`):((ke=Xr==null?void 0:Xr.type)==null?void 0:ke.indexOf("video"))>-1?pi.replaceSelection(`<video width="100%" controls src="/api/attachments/${Co.id}"></video>`):((Rr=Xr==null?void 0:Xr.type)==null?void 0:Rr.indexOf("pdf"))>-1?pi.replaceSelection(`<a href="/api/attachments/${Co.id}?type=${Xr.type}&disposition=inline" target="_blank">${Xr.name}</a>`):Hr.includes(To)?pi.replaceSelection(`<a href="/api/attachments/${Co.id}?type=office&disposition=inline" target="_blank">${Xr.name}</a>`):pi.replaceSelection(`[${Xr.name}](/api/attachments/${Co.id}?type=${Co.content_type})`):(Co==null?void 0:Co.status)===401&&(document.location.href="/user/login")})}catch(Nr){tr.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const pi=Te().fromTextArea(wi.current,{mode:pe,lineNumbers:!Un,lineWrapping:!0,value:Se,autoCloseTags:!0,autoCloseBrackets:!0});return pi.on("keyup",function(rn,ui){ui.keyCode===8&&(rn.getValue()==""?pi.setOption("placeholder",Ki):pi.setOption("placeholder",null))}),pi.on("keydown",function(rn,ui){if(ui.keyCode===8){var or=Ri(rn);or&&ui.preventDefault()}}),mi&&pi.focus(),pi.on("paste",$n),En&&pi.on("beforeChange",function(rn,ui){(ui.origin==="paste"||ui.origin==="+input")&&ui.cancel()}),eo(pi),()=>{pi.off("paste",$n)}}},[]);const Wi=(0,Nt.useCallback)(()=>{if(si.current)try{}catch($n){console.log($n,"---- to set md editor body height")}},[qt,si,ai]);(0,Nt.useEffect)(()=>{function $n(){let pi=new tn.Z(rn=>{for(let ui of rn)(ui.target.offsetHeight>0||ui.target.offsetWidth>0)&&(Wi(),Ge.setSize("100%","100%"),Ge.refresh())});return pi.observe(wi.current.parentElement),pi}if(Ge){const pi=$n();return()=>{var rn,ui;(rn=wi.current)!=null&&rn.parentElement&&pi.unobserve((ui=wi.current)==null?void 0:ui.parentElement)}}},[Ge,Wi]),(0,Nt.useEffect)(()=>{if(Ge){let $n=[];for(const[pi,rn]of Object.entries(Fs)){let ui={[pi]:()=>{Tn(rn)}};$n.push(ui),Ge.addKeyMap(ui)}return()=>{for(let pi of $n)Ge.removeKeyMap(pi)}}},[Ge]),(0,Nt.useEffect)(()=>{He!==ai&&gi(He)},[He]),(0,Vo.Z)(()=>{if(!Zt&&Xi>0){let $n=new Date().getTime(),pi=window.sessionStorage.getItem(ge);$n>=Xi+jr&&(!pi||pi!==vr)&&(window.sessionStorage.setItem(ge,vr),Ne(!0))}},jr),(0,Nt.useEffect)(()=>{kn(on)},[Ge,on]),(0,Nt.useEffect)(()=>{Ge&&mi&&Ge.focus()},[Ge,mi]),(0,Nt.useEffect)(()=>{if(Re&&Ge){let $n=function(rn){let ui=rn.target;if(Hn.current){let or=ui.scrollTop/ui.scrollHeight;Hn.current.scrollTop=Hn.current.scrollHeight*or}};const pi=Ge.getScrollerElement();return pi.addEventListener("scroll",$n),()=>{pi.removeEventListener("scroll",$n)}}},[Ge,Re]),(0,Nt.useEffect)(()=>{if(Ge&&Xn){let $n=function(pi,rn){Xn(pi,rn)};return Ge.on("beforeChange",$n),()=>{Ge.off("beforeChange",$n)}}},[Ge,Xn]),(0,Nt.useEffect)(()=>{if(Ge&&xn){let $n=function(){xn(Ge.getValue())};return Ge.on("blur",$n),()=>{Ge.off("blur",$n)}}},[Ge,xn]);function Ri($n,pi){var rn=$n.getDoc(),ui=rn.getCursor(),or=rn.getLine(ui.line),Mr=or.charAt(ui.ch-1),wr=or.lastIndexOf("@\u2581@",ui.ch),Pr=or.lastIndexOf("@\u2581\u2581@",ui.ch),Nr=wr>Pr?wr:Pr,Xr=wr>Pr?3:4;if(Gr.indexOf(Mr)===-1)return null;if(console.log("change1:",pi,$n,or,ui,Nr,wr,Pr,Mr),Nr>=0&&ui.ch-Nr<5){var To=Nr+Xr;return rn.replaceRange("",{line:ui.line,ch:Nr},{line:ui.line,ch:To}),{line:ui.line,ch:To}}return null}(0,Nt.useEffect)(()=>{if(Ge){let $n=function(pi,rn){const ui=pi.getValue();Or(ui),nr(new Date().getTime()),pi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),we&&(fn?we(ui,li(ui)):we(ui))};return Ge.on("change",$n),()=>{Ge.off("change",$n)}}},[Ge,we]),(0,Nt.useEffect)(()=>{if(Ge)if(Se==null)Ge.setValue(""),Or("");else{const $n=window.scrollY||window.pageYOffset;Se!==Ge.getValue()&&(Ge.setValue(Se),Or(Se),Ge.setCursor(En?1:Ge.lineCount(),0),window.scrollTo(0,$n))}},[Ge,Se]);const Tn=(0,Nt.useCallback)($n=>{const pi=Ge.getCursor(),rn=Ge.getSelection();let ui=rn.split(`
`);switch($n){case"bold":return Ge.replaceSelection("**"+rn+"**"),rn===""&&Ge.setCursor(pi.line,pi.ch+2),Ge.focus();case"italic":return Ge.replaceSelection("*"+rn+"*"),rn===""&&Ge.setCursor(pi.line,pi.ch+1),Ge.focus();case"code":return Ge.replaceSelection("`"+rn+"`"),rn===""&&Ge.setCursor(pi.line,pi.ch+1),Ge.focus();case"inline-latex":return Li("inline-latex"),Ge.focus();case"latex":return Ge.replaceSelection("```latex\n"+rn+"\n```"),Ge.setCursor(pi.line+1,rn.length+1),Ge.focus();case"line-break":return Ge.replaceSelection(`<br/>
`),Ge.focus();case"list-ul":return rn===""?Ge.replaceSelection("- "+rn):Ge.replaceSelection(ui.map(or=>or===""?"":`- ${or}`).join(`
`)),Ge.focus();case"list-ol":return rn===""?Ge.replaceSelection("1. "+rn):Ge.replaceSelection(ui.map((or,Mr)=>or===""?"":`${Mr+1}. ${or}`).join(`
`)),Ge.focus();case"add-null-ch":return rn===""&&Ge.setCursor(pi.line,pi.ch),Ge.replaceSelection(Br),Ge.focus();case"add-signal":return rn===""&&Ge.setCursor(pi.line,pi.ch),Ge.replaceSelection(Pt),Ge.focus();case"add-multiple":return rn===""&&Ge.setCursor(pi.line,pi.ch),Ge.replaceSelection(Gr),Ge.focus();case"inster-template-1":return rn===""&&Ge.setCursor(pi.line,pi.ch),Ge.replaceSelection($i),Ge.focus();case"eraser":return Ge.setValue(""),Ge.focus();case"trigger-watch":return kn(!Re),Ge.focus();case"trigger-full-screen":return gi(!ai),Ge.focus();case ro:Li(ro);return;case Bo:Li(Bo);return;case pr:Li(pr);return;case ur:Li(ur);return;case"maths-latex":Li("maths-latex");return;case er:Li(er);return;case Ur:Li(Ur);return;default:throw new Error}},[Ge,Re,ai]),Ot=(0,Nt.useCallback)(($n,pi)=>{var rn,ui,or,Mr,wr,Pr;switch(Li(""),Bi){case ro:const{title:Oo,link:ke}=$n;return Ge.replaceSelection(`[${Oo}](${ke})`),Ge.focus();case Bo:const{language:Rr,content:Js}=$n;return Ge.replaceSelection(["```"+Rr,Js,"```"].join(`
`)),Ge.focus();case"maths-latex":for(var Nr=atob($n),Xr=new Uint8Array(Nr.length),To=0;To<Nr.length;To++)Xr[To]=Nr.charCodeAt(To);var Co=new Blob([Xr],{type:"image/png"});(0,_e.I)(Co,na=>{na.id?Ge.replaceSelection(`![,](/api/attachments/${na.id}?type=${na.content_type})`):(na==null?void 0:na.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ge.replaceSelection("`$$"+$n+"$$`");break;case pr:case ur:case Lo:const{src:fs,alt:xa}=$n,io=pi,Nl=(or=(ui=(rn=io==null?void 0:io.name)==null?void 0:rn.split("."))==null?void 0:ui.pop)==null?void 0:or.call(ui);return((Mr=io==null?void 0:io.type)==null?void 0:Mr.indexOf("image"))>-1||!(io!=null&&io.type)?io!=null&&io.align||io!=null&&io.width?Ge.replaceSelection(`<p style="text-align:${io.align||"initial"}"><img width="${io.width?io.width+"%":"initial"}" src="${fs}" alt="${xa||""}" /></p>`):Ge.replaceSelection(`<img width="100%" src="${fs}" alt="${xa||""}" />`):((wr=io==null?void 0:io.type)==null?void 0:wr.indexOf("video"))>-1?Ge.replaceSelection(`<video width="100%" controls src="${fs}"></video>`):((Pr=io==null?void 0:io.type)==null?void 0:Pr.indexOf("pdf"))>-1?Ge.replaceSelection(`<a href="${fs}?type=${io.type}&disposition=inline" target="_blank">${io.name}</a>`):Hr.includes(Nl)?Ge.replaceSelection(`<a href="${fs}?type=office&disposition=inline" target="_blank">${io.name}</a>`):Ge.replaceSelection(`[${io.name}](${fs})`),Ge.focus();case Ur:const{row:Wa,col:Ao,align:_o}=$n;let al=`
`;for(let na=0;na<Wa;na++){let Ql=[],ha=[];for(let Vi=0;Vi<Ao;Vi++)na===1&&ha.push(lo[_o]),Ql.push(" ");na===1&&(al+=`| ${ha.join(" | ")} |
`),al+=`| ${Ql.join(Ao===1?"":" | ")} |
`}return Ge.replaceSelection(al+`
`),Ge.focus();default:throw new Error}},[Ge,Bi]),Yi=(0,Nt.useMemo)(()=>{switch(Bi){case ro:return Nt.createElement(Si,{callback:Ot,onCancel:ki});case Bo:return Nt.createElement(ei.Z,{callback:Ot,onCancel:ki});case pr:return Nt.createElement(_e.Z,{callback:Ot,onCancel:ki});case er:return Nt.createElement(Xe,{callback:Ot,onCancel:ki});case Ur:return Nt.createElement(Sn,{callback:Ot,onCancel:ki});case"maths-latex":return Nt.createElement(di,{showSaveButton:!0,callback:Ot});case"inline-latex":return Nt.createElement(hr.Z,{showSaveButton:!0,callback:Ot});default:return null}},[Bi]);function ki(){Li("")}(0,Nt.useEffect)(()=>{if(Ln.current){let $n=function(wr){or=!0,Mr=wr.pageY},pi=function(){or=!1},rn=function(wr){if(or){let Pr=wr.pageY-Mr;Pr<0&&(Pr=0),Pr>300&&(Pr=300);let Nr=Nn+Pr+"px";$t(Nr)}},ui=Ln.current,or=!1,Mr=0;return ui.addEventListener("mousedown",$n),document.addEventListener("mousemove",rn),document.addEventListener("mouseup",pi),()=>{ui.removeEventListener("mousedown",$n),document.removeEventListener("mousemove",rn),document.removeEventListener("mouseup",pi)}}},[Ge,Ln]),(0,Nt.useEffect)(()=>{$t(Nn)},[Nn]);const Ui=Dr(de),ji=Dr(qt),Gi={width:Ui,height:ji},Zn=(0,Nt.useMemo)(()=>{if(Xi){let $n=new Date(Xi),pi=$n.getHours(),rn=$n.getMinutes(),ui=$n.getSeconds();return pi=pi<10?"0"+pi:pi,rn=rn<10?"0"+rn:rn,ui=ui<10?"0"+ui:ui,`${pi}:${rn}:${ui}`}return 0},[Xi]),li=$n=>{const pi=[];if(fn){let rn=-1;$n=$n.replace(/(@▁▁@|@▁@)/g,function(ui,or,Mr){pi.push({multiLine:ui!==Pt})})}return pi};function Ei(){window.sessionStorage.removeItem(ge),Ne(!1),nr(0)}function oi(){Ne(!1),nr(0),Ge.setValue(window.sessionStorage.getItem(ge))}(0,Nt.useEffect)(()=>{Fi[Bi]&&Bi!==ur&&Bi!==er&&setTimeout(()=>{const $n=document.getElementsByClassName("markdown-popup-form")[0],pi=window.innerWidth/2-$n.offsetWidth/2,rn=window.innerHeight/2-$n.offsetHeight/2;Je(pi),Fn(rn)},0)},[Bi]);const Ai=$n=>{$n.preventDefault();const pi=$n.clientX-Ae,rn=$n.clientY-yn;document.body.onmousemove=ui=>{let or=ui.clientX-pi,Mr=ui.clientY-rn;const wr=document.getElementsByClassName("markdown-popup-form")[0],Pr=window.innerWidth-wr.offsetWidth,Nr=window.innerHeight-wr.offsetHeight;or=Math.max(0,Math.min(or,Pr)),Mr=Math.max(0,Math.min(Mr,Nr)),Cr(ui.clientX,ui.clientY,pi,rn)&&(Je(or),Fn(Mr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Cr=($n,pi,rn,ui)=>{const or=document.body.clientHeight,Mr=document.body.clientWidth;return $n<20&&rn>$n||$n>Mr-20&&rn<$n||pi<20&&ui>pi||pi>or-20&&ui<pi?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Nt.createElement(Nt.Fragment,null,Nt.createElement("div",{className:"markdown-editor-wrapper",ref:si},Nt.createElement("div",{className:`markdown-editor-container ${yi} ${Re?"on-preview":""} ${Un?"mini":""} ${ai?"full-screen":""}`,style:Gi},Nt.createElement(he,{insertTemp:Oe,watch:Re,fullScreen:ai,showNullButton:Ue,showNullProgramButton:fn,onActionCallback:Tn,hidetoolBar:Rn,extraUse:rr}),Nt.createElement("div",{className:"markdown-editor-body"},Nt.createElement("div",{className:"codemirror-container"},Nt.createElement("textarea",{ref:wi,placeholder:Ki})),Re?Nt.createElement("div",{ref:Hn,className:"preview-container"},pe==="stex"&&Nt.createElement(Be,{value:vr}),pe!=="stex"&&Nt.createElement(hn.Z,{disabledFill:Jn,showProgramFill:fn,value:vr})):null))),cn?Nt.createElement("a",{ref:Ln,className:"editor-resize"}):null,Bi===ur&&Nt.createElement(Pi,{callback:Ot,onCancel:ki}),Bi===er&&Nt.createElement(Xe,{callback:Ot,onCancel:ki}),Nt.createElement(fe.Z,null,Fi[Bi]&&Bi!==ur&&Bi!==er?Nt.createElement(Mn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ae,top:yn},title:Nt.createElement("div",{style:{cursor:"move"},onMouseDown:Ai},Fi[Bi]),open:!0,onCancel:ki,footer:null,destroyOnClose:!0,width:Bi===er?"1200px":null,height:Bi===er?"80vh":null,className:"markdown-popup-form"},Yi):null))}},35944:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return Yt},I:function(){return he}});var Nt=ne(28284),Fe=ne(6767),Te=ne(37568),tn=ne(77736),be=ne(71051),xe=ne(47889),ye=ne(99571),De=ne(77665),Me=ne(59301),se=ne(59301),hn=Object.defineProperty,Be=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(fe,ue,Ye)=>ue in fe?hn(fe,ue,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):fe[ue]=Ye,lt=(fe,ue)=>{for(var Ye in ue||(ue={}))et.call(ue,Ye)&&ct(fe,Ye,ue[Ye]);if(Qt)for(var Ye of Qt(ue))nt.call(ue,Ye)&&ct(fe,Ye,ue[Ye]);return fe},gt=(fe,ue)=>Be(fe,un(ue));const{useForm:yt}=Nt.default,Et={width:280,marginRight:10},Tt={labelCol:{span:5},wrapperCol:{span:19}};var Yt=({callback:fe,onCancel:ue})=>{const[Ye]=yt();let Le=(0,Me.useRef)();function sn(ri){Le.current.width=Ye.getFieldValue("width"),Le.current.align=Ye.getFieldValue("align"),fe(ri,Le.current)}function vn(ri,Vn){if(ri.status===-1){Fe.ZP.error(ri.message);return}Ye.setFieldsValue({src:`/api/attachments/${ri.id}`,type:Vn.type})}function On(ri){let Vn=ri.target.files[0];Le.current=Vn,he(Vn,vn)}return se.createElement(Nt.default,gt(lt({form:Ye},Tt),{className:"upload-image-panel",onFinish:sn,style:{width:470,overflow:"hidden"}}),se.createElement(Nt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},se.createElement("div",{className:"flex-container"},se.createElement(Nt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},se.createElement(Te.default,{style:Et})),se.createElement(Xt,{onFileChange:On}))),se.createElement(Nt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},se.createElement(Te.default,{style:{width:264}})),se.createElement(Nt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},se.createElement(tn.Z,null,se.createElement(Nt.default.Item,{name:"width",style:{margin:0}},se.createElement(be.Z,{style:{width:264}})),se.createElement("span",{className:"ml8"},"%"))),se.createElement(Nt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},se.createElement(xe.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(Nt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},se.createElement(ye.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),se.createElement(ye.ZP,{type:"default",onClick:ue},"\u53D6\u6D88"))))};function Xt({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,ue){if(!fe)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ye=new FormData;Ye.append("editormd-image-file",fe),Ye.append("file_param_name","editormd-image-file"),Ye.append("byxhr","true");var Le=new window.XMLHttpRequest;Le.withCredentials=!0,Le.addEventListener("load",function(sn){ue(JSON.parse(sn.target.responseText),fe)},!1),Le.addEventListener("error",function(sn){console.error(sn)},!1),Le.open("POST",`${De.KI}/api/attachments.json`),Le.send(Ye)}},51498:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return Te}});var Nt=ne(59301),Fe=ne(4676);class Te extends Nt.Component{constructor(be){super(be);const xe=window.document;this.node=xe.createElement("div"),xe.body.appendChild(this.node)}render(){const{children:be}=this.props;return(0,Fe.createPortal)(be,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58531:function(Pn,vi,ne){"use strict";ne.d(vi,{SV:function(){return dn},ZP:function(){return Pe}});var Nt=ne(59301),Fe=ne(76374);const Te={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"]},tn={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"]},be={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(`
`)}]},xe={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(`
`)}]},ye={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 De=ne(53184),Me=ne.n(De),se=Object.defineProperty,hn=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(Xe,Ze,Qe)=>Ze in Xe?se(Xe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Xe[Ze]=Qe,ct=(Xe,Ze)=>{for(var Qe in Ze||(Ze={}))Qt.call(Ze,Qe)&&nt(Xe,Qe,Ze[Qe]);if(un)for(var Qe of un(Ze))et.call(Ze,Qe)&&nt(Xe,Qe,Ze[Qe]);return Xe},lt=(Xe,Ze)=>hn(Xe,Be(Ze)),gt=(Xe,Ze,Qe)=>new Promise((ln,an)=>{var Sn=wn=>{try{Wn(Qe.next(wn))}catch(qn){an(qn)}},jn=wn=>{try{Wn(Qe.throw(wn))}catch(qn){an(qn)}},Wn=wn=>wn.done?ln(wn.value):Promise.resolve(wn.value).then(Sn,jn);Wn((Qe=Qe.apply(Xe,Ze)).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"]}},Et=(Xe,Ze)=>Ze.map(Qe=>({label:Qe,kind:Xe.languages.CompletionItemKind.Keyword,insertText:Qe})),Tt=Xe=>Object.keys(yt.tables).map(Ze=>({label:Ze,kind:Xe.languages.CompletionItemKind.Variable,insertText:Ze})),Yt=(Xe,Ze)=>{const Qe=yt.tables[Xe];return Qe?Qe.map(ln=>({label:ln,kind:Ze.languages.CompletionItemKind.Field,insertText:ln})):[]};function Xt(Xe,Ze,Qe,ln,an){let Sn=Ze.getWordUntilPosition(Qe),jn={startLineNumber:Qe.lineNumber,endLineNumber:Qe.lineNumber,startColumn:Sn.startColumn,endColumn:Sn.endColumn},Wn=ln.map(wn=>({label:wn,kind:Xe.languages.CompletionItemKind.Keyword,insertText:wn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jn}));return an.map(wn=>{Wn.push(lt(ct({},wn),{range:jn}))}),Wn}var he=Xe=>{yt.languages.map(an=>(Xe.languages.registerDocumentFormattingEditProvider(an,{provideDocumentFormattingEdits(Sn,jn,Wn){return gt(this,null,function*(){const wn=Me()(Sn.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:Sn.getFullModelRange(),text:wn}]})}}),an));const Ze=be.quickKey.map(an=>({label:an.label,kind:Xe.languages.CompletionItemKind.Method,insertText:an.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Qe=xe.quickKey.map(an=>({label:an.label,kind:Xe.languages.CompletionItemKind.Method,insertText:an.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ln=tn.quickKey.map(an=>({label:an.label,kind:Xe.languages.CompletionItemKind.Method,insertText:an.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Xe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(an,Sn){var jn=an.getWordUntilPosition(Sn),Wn={startLineNumber:Sn.lineNumber,endLineNumber:Sn.lineNumber,startColumn:jn.startColumn,endColumn:jn.endColumn},wn=an.getLineContent(Sn.lineNumber).substring(jn.startColumn-2,jn.endColumn);return{suggestions:[...be.keywords.map(qn=>({label:qn,kind:Xe.languages.CompletionItemKind.Function,documentation:qn,insertText:qn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn})),...be.quickKey.map(qn=>({label:qn.label,kind:Xe.languages.CompletionItemKind.Function,documentation:qn.content,insertText:wn.startsWith("#")?qn.content.replace(/#/,""):qn.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn}))]}}}),Xe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(an,Sn){var jn=an.getWordUntilPosition(Sn),Wn={startLineNumber:Sn.lineNumber,endLineNumber:Sn.lineNumber,startColumn:jn.startColumn,endColumn:jn.endColumn};return{suggestions:[...Te.keywords.map(wn=>({label:wn,kind:Xe.languages.CompletionItemKind.Function,documentation:wn,insertText:wn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn}))]}}}),Xe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(an,Sn){var jn=an.getWordUntilPosition(Sn),Wn={startLineNumber:Sn.lineNumber,endLineNumber:Sn.lineNumber,startColumn:jn.startColumn,endColumn:jn.endColumn},wn=an.getLineContent(Sn.lineNumber).substring(jn.startColumn-2,jn.endColumn);return{suggestions:[...tn.keywords.map(qn=>({label:qn,kind:Xe.languages.CompletionItemKind.Function,documentation:qn,insertText:qn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn})),...tn.quickKey.map(qn=>({label:qn.label,kind:Xe.languages.CompletionItemKind.Function,documentation:qn.content,insertText:wn.startsWith("#")?qn.content.replace(/#/,""):qn.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn}))]}}}),Xe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(an,Sn){var jn=an.getWordUntilPosition(Sn),Wn={startLineNumber:Sn.lineNumber,endLineNumber:Sn.lineNumber,startColumn:jn.startColumn,endColumn:jn.endColumn},wn=an.getLineContent(Sn.lineNumber).substring(jn.startColumn-2,jn.endColumn);return{suggestions:[...ye.keywords.map(qn=>({label:qn,kind:Xe.languages.CompletionItemKind.Function,documentation:qn,insertText:qn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn})),...ye.quickKey.map(qn=>({label:qn.label,kind:Xe.languages.CompletionItemKind.Function,documentation:qn.content,insertText:wn.startsWith("#")?qn.content.replace(/#/,""):qn.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn}))]}}}),Xe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(an,Sn){var jn=an.getWordUntilPosition(Sn),Wn={startLineNumber:Sn.lineNumber,endLineNumber:Sn.lineNumber,startColumn:jn.startColumn,endColumn:jn.endColumn},wn=an.getLineContent(Sn.lineNumber).substring(jn.startColumn-2,jn.endColumn);return{suggestions:[...xe.keywords.map(qn=>({label:qn,kind:Xe.languages.CompletionItemKind.Function,documentation:qn,insertText:qn,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn})),...xe.quickKey.map(qn=>({label:qn.label,kind:Xe.languages.CompletionItemKind.Function,documentation:qn.content,insertText:wn.startsWith("#")?qn.content.replace(/#/,""):qn.content,insertTextRules:Xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Wn}))]}}})};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 ue=Object.defineProperty,Ye=(Xe,Ze,Qe)=>Ze in Xe?ue(Xe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Xe[Ze]=Qe,Le=(Xe,Ze,Qe)=>Ye(Xe,typeof Ze!="symbol"?Ze+"":Ze,Qe);const sn=class p1{constructor(Ze,Qe,ln){this.placeholder=Ze,this.editor=Qe,this.monaco=ln,Qe.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)}};Le(sn,"ID","editor.widget.placeholderHint");var On=sn,ri=ne(96236),Vn=ne(6767),Qi=ne(25399),Gn=ne(89392),Ce=ne(41312),_t=ne(56102),Bn=Object.defineProperty,Si=Object.defineProperties,ei=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Mn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,fi=(Xe,Ze,Qe)=>Ze in Xe?Bn(Xe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Xe[Ze]=Qe,Kn=(Xe,Ze)=>{for(var Qe in Ze||(Ze={}))Mn.call(Ze,Qe)&&fi(Xe,Qe,Ze[Qe]);if(_e)for(var Qe of _e(Ze))_n.call(Ze,Qe)&&fi(Xe,Qe,Ze[Qe]);return Xe},Pi=(Xe,Ze)=>Si(Xe,ei(Ze)),le=(Xe,Ze)=>{var Qe={};for(var ln in Xe)Mn.call(Xe,ln)&&Ze.indexOf(ln)<0&&(Qe[ln]=Xe[ln]);if(Xe!=null&&_e)for(var ln of _e(Xe))Ze.indexOf(ln)<0&&_n.call(Xe,ln)&&(Qe[ln]=Xe[ln]);return Qe},bn=(Xe,Ze,Qe)=>new Promise((ln,an)=>{var Sn=wn=>{try{Wn(Qe.next(wn))}catch(qn){an(qn)}},jn=wn=>{try{Wn(Qe.throw(wn))}catch(qn){an(qn)}},Wn=wn=>wn.done?ln(wn.value):Promise.resolve(wn.value).then(Sn,jn);Wn((Qe=Qe.apply(Xe,Ze)).next())});function ci(Xe){return/^\d+$/.test(Xe)?`${Xe}px`:Xe}function Ht(){}let Lt=!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 Ut(Xe=[]){let Ze=Xe;if(Array.isArray(Xe)){for(let Qe=0;Qe<Xe.length;Qe++){let ln=Ct[Xe[Qe]];if(ln)return ln}return Ze[0]}return Ct[Ze]||Ze}let Kt=null;const kt=()=>bn(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Xe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Xe)}});var Pe=Xe=>{var Ze=Xe,{width:Qe="100%",height:ln="100%",value:an,language:Sn="javascript",style:jn={},options:Wn={},overrideServices:wn={},theme:qn="vs-dark",onEditBlur:di,isCopy:hr=!1,onSave:tr,autoHeight:ro=!1,forbidCopy:pr=!1,onChange:er=Ht,editorDidMount:ur=Ht,onFocus:Lo=Ht,onBreakPoint:Bo=Ht,breakPointValue:Ur=[],filename:Er="educoder.txt",errorLine:lo,errorContent:Vo="",highlightLine:ko,openBreakPoint:Eo=!1,placeholder:jr="",showMiniMap:Br=!0}=Ze,Gr=le(Ze,["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,Nt.useRef)(),$i=(0,Nt.useRef)({}),Hr=(0,Nt.useRef)(),Dr=(0,Nt.useRef)(),oo=(0,Nt.useRef)([]),Ko=(0,Nt.useRef)(!1),Fs=(0,Nt.useRef)(),Fi=(0,Nt.useRef)(),xi=(0,Nt.useRef)(!1),[Se,we]=(0,Nt.useState)(!1);function de(){let Xn;return Pt.current&&(Xn=new Fe.Z(Qn=>{for(let yi of Qn)(yi.target.offsetHeight>0||yi.target.offsetWidth>0)&&$i.current.instance.layout()}),Xn.observe(Pt.current)),Xn}function Nn(){Vn.ZP.warning({content:decodeURIComponent(fe),key:"monaco-editor-tip"})}const Un=()=>{let Xn=$i.current.instance;if(an!=null&&Xn&&Se){const Qn=Xn.getModel();Qn&&an!==Qn.getValue()&&(Lt=!0,Qn.setValue(an),Xn.layout(),Lt=!1)}};(0,Nt.useEffect)(()=>{const Xn=Ce.Z.subscribe("formatDocument",Qn=>{var yi;let ni=$i.current.instance;(yi=ni==null?void 0:ni.getAction)==null||yi.call(ni,"editor.action.formatDocument").run()});return window.updateMonacoValue=Qn=>{er(Qn)},Xn},[]),(0,Nt.useEffect)(()=>{var Xn;let Qn=$i.current.instance;Dr.current&&clearTimeout(Dr.current),Dr.current=setTimeout(()=>{Un()},500),an&&(an!=null&&an.length)&&((Xn=Qn==null?void 0:Qn.updateOptions)==null||Xn.call(Qn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(an.split(/\r\n|\r|\n/g).length))+3,5)}))},[an,Se,$i.current]),(0,Nt.useEffect)(()=>{if(lo&&$i.current&&$i.current.instance){let Qn=$i.current.instance;Qn.changeViewZones(function(yi){var ni=document.createElement("div");ni.style.padding="10px 20px",ni.style.width="calc(100% - 20px)",ni.className="my-error-line-wrp",ni.innerHTML=Vo,yi.addZone({afterLineNumber:lo||11,heightInLines:3,domNode:ni})});var Xn={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}};Qn.addOverlayWidget(Xn),Qn.revealPositionInCenter({lineNumber:20,column:1})}},[lo,$i.current,Se]);const mi=(Xn="",Qn)=>{if(!Xn||Xn.trim()==="")return!0;const ni=$i.current.instance.getModel().getLineTokens(Qn);let En=!1;for(let Jn=0;Jn<2;Jn++)ni.getStandardTokenType(Jn)===1&&(En=!0);return En};(0,Nt.useEffect)(()=>{var Xn;const Qn=(Xn=$i.current)==null?void 0:Xn.instance;if(Qn&&Se&&pr){const yi=Qn.onDidBlurEditorWidget(()=>{xi.current=!1}),ni=Qn.onDidFocusEditorText(()=>{xi.current=!0});return()=>{yi.dispose(),ni.dispose()}}},[$i.current,Se,pr]),(0,Nt.useEffect)(()=>{var Xn;if((Xn=$i.current)!=null&&Xn.instance&&Se&&Eo){let Qn=$i.current.instance,yi=Qn.getModel();if(!yi)return;(()=>{var kn;let ai=[],gi=[];const Bi=yi.getAllDecorations();for(let Xi of Bi)Xi.options.className==="highlighted-line"&&(ai.push((kn=Xi==null?void 0:Xi.range)==null?void 0:kn.startLineNumber),gi.push(Xi==null?void 0:Xi.id));if(ko===ai[0])return;yi.deltaDecorations(gi,[]);const Li=yi.getLineCount();ko&&ko<=Li&&(Qn.deltaDecorations([],[{range:new Kt.Range(ko,1,ko,yi.getLineMaxColumn(ko)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Qn.revealLineInCenter(ko))})();const En=(kn=!1)=>{var ai;let gi=[],Bi=[];const Li=yi.getAllDecorations();for(let Xi of Li)Xi.options.linesDecorationsClassName==="breakpoints-select"&&(gi.push((ai=Xi==null?void 0:Xi.range)==null?void 0:ai.startLineNumber),Bi.push(Xi==null?void 0:Xi.id));if(kn)return{lines:gi,ids:Bi};Bo(gi)},Jn=kn=>bn(void 0,null,function*(){let ai={range:new Kt.Range(kn,1,kn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield yi.deltaDecorations([],[ai]),En()}),Ki=kn=>bn(void 0,null,function*(){let ai=[];const gi=Qn.getLineDecorations(kn);for(let Bi of gi)Bi.options.linesDecorationsClassName==="breakpoints-select"&&ai.push(Bi.id);yield yi.deltaDecorations(ai,[]),En()}),qi=kn=>{let ai=Qn.getLineDecorations(kn);for(let gi of ai)if(gi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Gn.isEqual)(Ur,En(!0).lines)){yi.deltaDecorations(En(!0).ids,[]);const kn=Ur.map(ai=>({range:new Kt.Range(ai,1,ai,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));yi.deltaDecorations([],kn)}const rr=Qn.onDidChangeModelContent(kn=>{let ai=Qn.getPosition();if(ai){let gi=ai.lineNumber;clearTimeout(Fi.current),Fi.current=setTimeout(()=>{mi(yi.getLineContent(gi),gi)?Ki(gi):qi(gi)?(Ki(gi),Jn(gi)):En()},100)}}),Ge=Qn.onMouseDown(kn=>{var ai,gi,Bi;if(kn.target.detail&&((Bi=(gi=(ai=kn.target)==null?void 0:ai.element)==null?void 0:gi.className)!=null&&Bi.includes("line-numbers"))){let Li=kn.target.position.lineNumber;if(mi(yi.getLineContent(Li),Li))return;qi(Li)?Ki(Li):Jn(Li)}}),eo=kn=>{let ai={range:new Kt.Range(kn,1,kn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};oo.current=Qn.deltaDecorations(oo.current,[ai])},vr=()=>{oo.current=Qn.deltaDecorations(oo.current,[])},Or=Qn.onMouseMove(kn=>{var ai,gi,Bi;if(vr(),kn.target.detail&&((Bi=(gi=(ai=kn.target)==null?void 0:ai.element)==null?void 0:gi.className)!=null&&Bi.includes("line-numbers"))){let Li=kn.target.position.lineNumber;if(mi(yi.getLineContent(Li),Li))return;eo(Li)}}),Re=Qn.onMouseLeave(()=>{vr()});return()=>{rr.dispose(),Ge.dispose(),Or.dispose(),Re.dispose()}}},[$i.current,Se,Ur,ko,Eo,Sn]),(0,Nt.useEffect)(()=>{var Xn;(Xn=$i.current)!=null&&Xn.instance&&Eo&&$i.current.instance.setPosition({lineNumber:0,column:0})},[ko]);function on(){let Xn=$i.current.instance;if(Xn){const Qn=Xn.getSelection(),yi=$i.current.pastePos||{},ni=new Kt.Range(yi.startLineNumber||Qn.endLineNumber,yi.startColumn||Qn.endColumn,yi.endLineNumber||Qn.endLineNumber,yi.endColumn||Qn.endColumn);setTimeout(()=>{Xn.executeEdits("",[{range:ni,text:""}])},300)}}function Oe(Xn){(window.navigator.platform.match("Mac")?Xn.metaKey:Xn.ctrlKey)&&Xn.keyCode==83&&(Xn.preventDefault(),tr())}const pe=()=>{if(ro&&$i.current.instance){const Xn=$i.current.instance.getContentHeight();He(Xn<ln?ln:Xn)}else He(ln)};function ge(Xn){var Qn=document.createEvent("MouseEvents");Qn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Xn.dispatchEvent(Qn)}const cn=Xn=>{if(!xi.current)return;const{keyCode:Qn,ctrlKey:yi,metaKey:ni,target:En,type:Jn}=Xn;return(Jn==="paste"||(Qn===67||Qn===86)&&(ni||yi))&&En.nodeName==="TEXTAREA"&&(Nn(),Xn.preventDefault()),!1};function Zt(Xn,Qn){var yi=window.URL||window.webkitURL||window,ni=new Blob([Qn]),En=document.createElementNS("http://www.w3.org/1999/xhtml","a");En.href=yi.createObjectURL(ni),En.download=Xn,ge(En)}(0,Nt.useEffect)(()=>{pe()},[pe]),(0,Nt.useEffect)(()=>{Pt.current&&!Se&&Promise.all([ne.e(8909),ne.e(503)]).then(ne.bind(ne,71448)).then(Xn=>{try{Kt=Xn,$i.current.instance=Kt.editor.create(Pt.current,{value:an,language:Ut(Sn),theme:qn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Br||!1}},wn);const Qn=$i.current.instance;let En=[...ri.BH._menuItems].find(rr=>rr[0]._debugName=="EditorContext")[1],Jn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ki=(rr,Ge)=>{var eo,vr;let Or=rr._first;do Ge.includes((vr=(eo=Or.element)==null?void 0:eo.command)==null?void 0:vr.id)&&rr._remove(Or);while(Or=Or.next)};if(ur(Qn,Kt),setTimeout(()=>{pe(),$i.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Zt(Er||"educoder.txt",Qn.getValue())}})},500),$i.current.subscription=Qn.onDidChangeModelContent(rr=>{Ko.current?clearTimeout(Fs.current):(pe(),er(Qn.getValue(),rr)),Fs.current=setTimeout(()=>{Ko.current=!1},500)}),window.Monaco||he(Kt,Ut(Sn)),pr&&(Ki(En,Jn),Pt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",cn),window.removeEventListener("paste",cn),window.addEventListener("keydown",cn),window.addEventListener("paste",cn)),window.Monaco=Kt,di&&Qn.onDidBlurEditorWidget(()=>{di(Qn.getValue())}),Lo&&Qn.onDidFocusEditorText(()=>{pr&&kt(),Lo(Qn.getValue())}),pr){kt();try{Qn.onDidPaste(rr=>{const Ge=Qn.getSelection(),eo=$i.current.pastePos||{},vr=new Kt.Range(eo.startLineNumber||Ge.endLineNumber,eo.startColumn||Ge.endColumn,eo.endLineNumber||Ge.endLineNumber,eo.endColumn||Ge.endColumn);Qn.executeEdits("",[{range:rr.range,text:""}])})}catch(rr){}}let qi=de();return jr&&typeof jr=="string"&&new On(jr,Qn,Kt),we(!0),()=>{const rr=$i.current.instance;rr.dispose();const Ge=rr.getModel();Ge&&Ge.dispose(),$i.current.subscription&&$i.current.subscription.dispose(),qi.unobserve(Pt.current)}}catch(Qn){}})},[]),(0,Nt.useEffect)(()=>{if($i.current.instance&&Se)return document.addEventListener("keydown",Oe,!1),()=>{document.removeEventListener("keydown",Oe)}},[tr,Se]),(0,Nt.useEffect)(()=>{let Xn=$i.current.instance;if(Xn&&Se){let Qn=Ut(Sn);Kt.editor.setModelLanguage(Xn.getModel(),Qn)}},[Sn,Se]),(0,Nt.useEffect)(()=>{$i.current.instance&&Se&&Kt.editor.setTheme(qn)},[qn,Se]),(0,Nt.useEffect)(()=>{let Xn=$i.current.instance;Hr.current=Wn,Xn&&Se&&(Xn.updateOptions(Kn({},Wn)),setTimeout(()=>{Xn.getModel().updateOptions(Kn({},Wn))},200))},[JSON.stringify(Wn),Se]),(0,Nt.useEffect)(()=>{let Xn=$i.current.instance;Xn&&Se&&Xn.layout()},[Qe,ln,Se]);const[Ue,fn]=(0,Nt.useState)(ci(Qe)),[Rn,He]=(0,Nt.useState)(ci(ln)),xn=Pi(Kn({},jn),{width:Ue,height:Rn,position:"relative"});return Nt.createElement("div",{className:"my-monaco-editor",ref:Pt,style:xn},hr&&Nt.createElement(_t.CopyToClipboard,{text:an,onCopy:()=>Vn.ZP.success("\u590D\u5236\u6210\u529F")},Nt.createElement(Qi.Z,{title:"\u590D\u5236\u4EE3\u7801"},Nt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Nt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function dn({width:Xe="100%",height:Ze="100%",original:Qe,modified:ln,language:an,options:Sn={}}){const jn=(0,Nt.useRef)(),[Wn,wn]=(0,Nt.useState)(null);function qn(ro){let pr;return jn.current&&(pr=new Fe.Z(er=>{for(let ur of er)(ur.target.offsetHeight>0||ur.target.offsetWidth>0)&&ro.layout()}),pr.observe(jn.current)),pr}(0,Nt.useEffect)(()=>(jn.current&&Promise.all([ne.e(8909),ne.e(9404)]).then(ne.bind(ne,2550)).then(ro=>{Kt=ro;const pr=Kt.editor.createDiffEditor(jn.current,Pi(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},Sn),{wordWrap:!0}));wn(pr);let er=qn(pr);return()=>{pr.dispose();const ur=pr.getModel();ur&&ur.dispose(),er.unobserve(jn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Nt.useEffect)(()=>{Wn&&Wn.setModel({original:Kt.editor.createModel(Qe,an),modified:Kt.editor.createModel(ln,an)})},[Qe,ln,an,Wn]);const di=ci(Xe),hr=ci(Ze),tr={width:di,height:hr};return Nt.createElement("div",{className:"my-diff-editor",ref:jn,style:tr})}},38776:function(Pn,vi,ne){"use strict";ne.d(vi,{jL:function(){return be},w9:function(){return Mn},QD:function(){return pr},cQ:function(){return _t},op:function(){return wn},O5:function(){return Fs},_b:function(){return Er},t7:function(){return lt},Gi:function(){return bn},YG:function(){return Pi},qp:function(){return hn},vr:function(){return Lo},qE:function(){return hr},Je:function(){return Et},wb:function(){return ri},cq:function(){return Kt},tp:function(){return Qt}});var Nt=ne(59301),Fe={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"},Te="data:image/png;base64,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",be=({dataSource:Fi=[],img:xi,imgWidth:Se=346,title:we,sunTitle:de,bannerExtraContent:Nn})=>Nt.createElement("div",{className:Fe.banner},Nt.createElement("div",{className:Fe.content},Nt.createElement("aside",null,Nt.createElement("p",null,Nt.createElement("b",null,we),Nt.createElement("span",null,de)),Fi.length>0&&Nt.createElement("div",{className:Fe.btns},Fi.map((Un,mi)=>Nt.createElement("div",{key:mi,onClick:Un.click},Un.name,Un.sign?Nt.createElement("img",{src:Te,width:39}):null))),Nn),xi&&Nt.createElement("img",{style:{marginTop:33,marginRight:38},src:xi,width:Se}))),xe={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"},ye=ne(92310),De=ne.n(ye),Me=ne(89392),hn=({dataSource:Fi=[],value:xi,onChange:Se,onTitleChange:we,className:de,title:Nn,titleWidth:Un=41,style:mi={},fontColor:on="#6A7283",showCount:Oe})=>{const[pe,ge]=(0,Nt.useState)(0),[cn,Zt]=(0,Nt.useState)(!1),Ue=(0,Nt.useRef)(null),fn=(0,Nt.useRef)(null);return(0,Nt.useEffect)(()=>{var Rn;Fi.length!==0&&(((Rn=Ue==null?void 0:Ue.current)==null?void 0:Rn.clientHeight)>97?ge(1):ge(0)),Fi.length===0&&ge(0),Zt(!1)},[Fi]),Nt.createElement("div",{className:De()(xe.row,de),style:mi},Nt.createElement("div",{onClick:(0,Me.throttle)(()=>we==null?void 0:we(),2e3),style:{width:Un,marginTop:cn?12:4},className:`${xe.title} ${we?"current":""}`},Nn),Nt.createElement("div",{className:cn?`${xe.tagsWrap} ${xe.tagsBorderWrap}`:xe.tagsWrap},Nt.createElement("div",{className:xe.bar,ref:fn,style:pe>0?{height:pe===1?97:"auto",overflow:pe===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Nt.createElement("div",{className:xe.tag,ref:Ue},Fi==null?void 0:Fi.map(Rn=>Nt.createElement("span",{onClick:()=>Se(Rn.id),key:Rn.id,style:{color:on},className:xi===Rn.id?xe.active:""},Nt.createElement("span",{title:Rn.name,className:xe.name},Rn.name),!!Oe&&Nt.createElement("span",{className:xe.num},Rn.count))))),!!pe&&Nt.createElement(Nt.Fragment,null,pe===1?Nt.createElement("div",{onClick:()=>{var Rn;ge(2),((Rn=Ue==null?void 0:Ue.current)==null?void 0:Rn.clientHeight)>245?Zt(!0):Zt(!1)},className:xe.action},"\u5C55\u5F00",Nt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Nt.createElement("div",{onClick:()=>{fn.current.scrollTop=0,ge(1),Zt(!1)},className:xe.action},"\u6536\u8D77",Nt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Be={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"},Qt=({dataSource:Fi=[],value:xi,onChange:Se,className:we,style:de={}})=>Nt.createElement("div",{style:de,className:De()(Be.tabs,we)},Fi.map(Nn=>Nt.createElement("span",{onClick:()=>Se(Nn.id),className:xi===Nn.id?Be.active:"",key:Nn.id},Nn.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:Fi=[],value:xi="",onChange:Se,onInputChange:we=()=>{},className:de,style:Nn={},placeholder:Un,allowClear:mi=!1})=>{var on;const[Oe,pe]=(0,Nt.useState)(""),[ge,cn]=(0,Nt.useState)("");(0,Nt.useEffect)(()=>{var fn;let Rn=xi;(fn=JSON.stringify(xi))!=null&&fn.includes("{")&&(pe(xi.id),Rn=xi.value||"");try{cn(decodeURIComponent(Rn||""))}catch(He){cn(decodeURIComponent(Rn||""))}},[xi]);const Zt=()=>{Se(encodeURIComponent(ge),Oe||null)},Ue=fn=>{fn!==Oe&&(pe(fn),Se(encodeURIComponent(ge),fn))};return Nt.createElement("div",{className:De()(et.input,de),style:Nn},!!Fi.length&&Nt.createElement("div",{className:et.dropdown},Nt.createElement("div",{className:et.text},(on=Fi.find(fn=>fn.id===Oe))==null?void 0:on.name,Nt.createElement("i",{className:"iconfont icon-zhankai4"}),Nt.createElement("b",{className:et.b1}),Nt.createElement("b",{className:et.b2})),Nt.createElement("div",{className:et.menu},Fi.map((fn,Rn)=>Nt.createElement("div",{key:Rn,onClick:()=>Ue(fn.id)},fn.name)))),Nt.createElement(nt.default,{onPressEnter:Zt,value:ge,onChange:fn=>{cn(fn.target.value),we(encodeURIComponent(fn.target.value),Oe||null)},bordered:!1,placeholder:Un}),Nt.createElement("i",{onClick:Zt,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"},Et=({value:Fi,onChange:xi,className:Se,total:we,pageSize:de,style:Nn={}})=>{const Un=Fi<2,mi=Fi>=Math.ceil(we/de);return we<=de?Nt.createElement(Nt.Fragment,null):Nt.createElement("div",{className:De()(gt.quickPager,Se),style:Nn},Nt.createElement("div",{onClick:()=>{Un||xi(Fi-1,"prev")},className:Un?gt.disabled:""},"\u4E0A\u4E00\u9875"),Nt.createElement("div",{onClick:()=>{mi||xi(Fi+1,"next")},className:mi?gt.disabled:""},"\u4E0B\u4E00\u9875"))},Tt={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"},Yt=ne(29787),Xt=ne(25399),he=ne(58018),fe=ne(13952),ue=ne(89299),Ye=ne(96908),Le=ne(57177),sn=ne(81378),vn=ne(63604),ri=({className:Fi,dataSource:xi=[],col:Se=4,right:we,bottom:de=23,precision:Nn=0,wrapWidth:Un=1200,trackEventItems:mi,loading:on})=>{const Oe=Math.floor((Un-(Se-1)*we)/Se);return Nt.createElement(Yt.Z,{spinning:on},Nt.createElement("div",{className:De()(Tt.list,Fi)},!!xi.length&&xi.map((pe,ge)=>{const{name:cn,id:Zt,identifier:Ue,power:fn,cover_image_id:Rn,pic:He}=pe;return Nt.createElement("div",{className:Tt.wrap,key:Zt,style:{width:Oe,marginRight:(1+ge)%Se===0?0:we+Nn,marginBottom:de}},Nt.createElement("a",{target:"_blank",href:`/shixuns/${Ue}/challenges`,className:Tt.li,onClick:xn=>{xn.preventDefault(),mi&&(0,ue.L9)([mi]),fn&&(0,ue.xg)(`/shixuns/${Ue}/challenges`)}},Nt.createElement("div",{className:Tt.img},Nt.createElement("img",{className:Tt.cover,src:`${He}`}),pe.is_jupyter&&Nt.createElement("img",{className:Tt.sign,src:Ye}),pe.is_jupyter_lab&&Nt.createElement("img",{className:Tt.sign,src:Le}),pe.is_unity_3d&&Nt.createElement("img",{className:Tt.sign,src:sn})),Nt.createElement("div",{className:Tt.name},Nt.createElement(Xt.Z,{title:cn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Nt.createElement("span",{className:Tt.e},cn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Nt.createElement("div",{className:Tt.tags},Nt.createElement(Xt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Nt.createElement("span",null,Nt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Nt.createElement("span",null,pe.challenges_count))),!!pe.myshixuns_count&&Nt.createElement(Xt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Nt.createElement("span",null,Nt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Nt.createElement("span",null,pe.myshixuns_count))),Nt.createElement(Xt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Nt.createElement("span",null,Nt.createElement("span",null,pe.level))),Nt.createElement("div",{className:Tt.rate},Nt.createElement(he.Z,{allowHalf:!0,disabled:!0,defaultValue:pe.score_info}),Nt.createElement("span",null,"\xA0",pe.score_info?`${pe.score_info}\u5206`:"5\u5206")))),!fn&&Nt.createElement("div",{className:Tt.lockWrap},Nt.createElement("img",{src:`${fe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Nt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!xi.length&&Nt.createElement(vn.Z,null)))},Vn={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"},Qi=ne(64681),Gn=ne(59301),_t=({className:Fi,dataSource:xi=[],col:Se=4,right:we,bottom:de=23,precision:Nn=0,wrapWidth:Un=1200,trackEventItems:mi,loading:on,onRemove:Oe=()=>{},isCurrent:pe=!0,showAlias:ge=!1})=>{const cn=Math.floor((Un-(Se-1)*we)/Se),Zt=[{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 Gn.createElement(Yt.Z,{spinning:on},Gn.createElement("div",{className:De()(Vn.list,Fi)},!!(xi!=null&&xi.length)&&(xi==null?void 0:xi.map((Ue,fn)=>{var Rn;const{name:He,id:xn,identifier:Xn,featured:Qn,school_name:yi,image_url:ni,excellent:En,is_plan:Jn}=Ue;return Gn.createElement("div",{key:xn,className:Vn.wrap,style:{width:cn,marginRight:(1+fn)%Se===0?0:we+Nn,marginBottom:de}},Gn.createElement("a",{className:Vn.li,onClick:Ki=>{Ki.preventDefault(),Ki.stopPropagation(),mi&&(0,ue.L9)([mi]),(0,ue.xg)(`/paths/${Xn}`)}},Gn.createElement("div",{className:Vn.img},Gn.createElement("img",{className:Vn.cover,src:`${ni}`}),pe&&(0,Qi.bg)()&&(Ue==null?void 0:Ue.studying)&&Gn.createElement("div",{className:`${Vn.movebq} user-path-items`,onClick:Ki=>{Ki.stopPropagation(),Oe(Ue)}},Gn.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Gn.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Rn=Ue==null?void 0:Ue.subject_tags)==null?void 0:Rn.map((Ki,qi)=>{var rr,Ge;if(qi===0){const vr=(rr=Zt.find(Or=>Or.name==Ki))==null?void 0:rr.swimg;return Gn.createElement("img",{className:Vn.sign,src:vr,style:{left:"-4px"}})}const eo=(Ge=Zt.find(vr=>vr.name==Ki))==null?void 0:Ge.ptimg;return Gn.createElement("img",{className:Vn.sign,src:eo,style:{left:`${48+52*(qi-1)+2*qi}px`}})}),Gn.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Ue==null?void 0:Ue.excellent)&&Gn.createElement("div",{className:Vn.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Gn.createElement("div",{className:Vn.name},Gn.createElement(Xt.Z,{title:ge&&(Ue!=null&&Ue.excellent_alias_name)?Gn.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${He}`,Gn.createElement("br",null),Gn.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Ue==null?void 0:Ue.excellent_alias_name}`)):He},Gn.createElement("span",{className:Vn.e},ge&&(Ue==null?void 0:Ue.excellent_alias_name)||He))),Gn.createElement(Xt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${yi}`},Gn.createElement("div",{className:Vn.unit},Gn.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),yi)),Gn.createElement("div",{className:Vn.tags},Gn.createElement("div",null,Gn.createElement(Xt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Gn.createElement("span",null,Gn.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Gn.createElement("span",null,Ue.stages_count))),Gn.createElement(Xt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Gn.createElement("span",null,Gn.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Gn.createElement("span",null,Ue.members_count)))))))})),!xi.length&&Gn.createElement(vn.Z,null)))},Bn={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"},Si="data:image/png;base64,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",ei=ne(59301),Mn=({className:Fi,dataSource:xi=[],col:Se=4,right:we,bottom:de=23,precision:Nn=0,wrapWidth:Un=1200,trackEventItems:mi,loading:on,handleVery:Oe=()=>!0})=>{const pe=Math.floor((Un-(Se-1)*we)/Se);return ei.createElement(Yt.Z,{spinning:on},ei.createElement("div",{className:De()(Bn.list,Fi)},!!xi.length&&xi.map((ge,cn)=>{const{subject_identifier:Zt,id:Ue,identifier:fn,power:Rn}=ge,He=ge.is_public!=0&&ge.is_public;return ei.createElement("div",{className:Bn.wrap,key:Ue,style:{width:pe,marginRight:(1+cn)%Se===0?0:we+Nn,marginBottom:de}},ei.createElement("a",{className:Bn.li,onClick:xn=>{xn.preventDefault(),Oe(ge==null?void 0:ge.first_category_url)&&(mi&&(0,ue.L9)([mi]),(0,ue.xg)(ge.first_category_url))}},ei.createElement("div",{className:Bn.top},ei.createElement(Xt.Z,{title:ge.name},ei.createElement("div",{className:Bn.name},ge.name)),ei.createElement("img",{className:Bn.img,src:fe.Z.IMG_SERVER+"/images/"+ge.avatar_url}),ei.createElement("div",{className:Bn.text,title:ge.creator},ge.creator),Zt&&ei.createElement("div",{className:Bn.btns},ei.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ei.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),He&&ei.createElement("div",{className:Bn.sign},"\u516C\u5F00")),ei.createElement("div",{className:Bn.bottom},ge.visits>0&&ei.createElement(Xt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ei.createElement("span",null,ei.createElement("i",{className:"iconfont icon-liulanyan"}),ei.createElement("span",null,ge.visits))),ge.course_members_count>0&&ei.createElement(Xt.Z,{title:"\u6210\u5458",placement:"bottom"},ei.createElement("span",null,ei.createElement("i",{className:"iconfont icon-chengyuan"}),ge.course_members_count)),ge.tasks_count>0&&ei.createElement(Xt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ei.createElement("span",null,ei.createElement("i",{className:"iconfont icon-zuoye"}),ge.tasks_count)),ge.is_end?ei.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ei.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ge.is_accessible&&ei.createElement("div",{className:Bn.lockWrap},ei.createElement("img",{src:`${fe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ei.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!xi.length&&ei.createElement(vn.Z,null)))},_n={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"},fi=ne(44993),Pi=({dataSource:Fi=[],value:xi,onChange:Se,className:we,style:de={},tabBarExtraContent:Nn})=>Nt.createElement("div",{className:De()(_n.tabs,we),style:de},Nt.createElement("div",{className:_n.tabsWrap},Fi.map((Un,mi)=>!(Un!=null&&Un.hide)&&Nt.createElement("aside",{className:_n.tab,onClick:()=>{Se(Un.id),Un.link&&fi.history.push(Un.link)},key:mi},Nt.createElement("div",{className:xi===Un.id?_n.active:""},Un.name),(Un==null?void 0:Un.resetCount)==null&&(Un==null?void 0:Un.total)!==void 0&&Nt.createElement("span",null,"\uFF08",Un==null?void 0:Un.total,"\uFF09"),(Un==null?void 0:Un.resetCount)!==void 0&&(Un==null?void 0:Un.total)!==void 0&&Nt.createElement(Xt.Z,{title:(Un==null?void 0:Un.tip)!=null?Un==null?void 0:Un.tip:""},Nt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Nt.createElement("span",{style:{color:"#000"}},Un==null?void 0:Un.resetCount),"/",Nt.createElement("span",null,Un==null?void 0:Un.total),"\uFF09"))))),Nt.createElement("div",{className:_n.tabBar},Nn)),bn=({className:Fi,style:xi={},children:Se})=>Nt.createElement("div",{className:De()(Fi),style:xi},Se),ci={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"},Ht=ne(75727),Lt=ne(93041);const Ct=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Kt=({sortValue:Fi,dropValue:xi,className:Se,onSort:we,onDrop:de,dataSource:Nn=Ct})=>{var Un;return Nt.createElement("div",{className:De()(ci.orderWrap,Se)},Nt.createElement(Ht.Z,{dropdownRender:()=>Nt.createElement(Lt.default,null,Nn.map((mi,on)=>Nt.createElement(Lt.default.Item,{key:on,onClick:()=>de(mi.id)},mi.name)))},Nt.createElement("span",{className:ci.orderTextWrap},(Un=Nn.find(mi=>xi===mi.id))==null?void 0:Un.name)),Nt.createElement("span",{className:ci.orderIconWrap},Nt.createElement("span",{className:ci.orderAsc},Nt.createElement("i",{className:Fi==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer}`,onClick:()=>we(Fi==="asc"?"desc":"asc")})),Nt.createElement("span",{className:ci.orderDesc},Nt.createElement("i",{className:Fi==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer}`,onClick:()=>we(Fi==="asc"?"desc":"asc")}))))},kt={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"},Pe=ne(99571),dn=Object.defineProperty,Xe=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ln=(Fi,xi,Se)=>xi in Fi?dn(Fi,xi,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Fi[xi]=Se,an=(Fi,xi)=>{for(var Se in xi||(xi={}))Ze.call(xi,Se)&&ln(Fi,Se,xi[Se]);if(Xe)for(var Se of Xe(xi))Qe.call(xi,Se)&&ln(Fi,Se,xi[Se]);return Fi},Sn=(Fi,xi)=>{var Se={};for(var we in Fi)Ze.call(Fi,we)&&xi.indexOf(we)<0&&(Se[we]=Fi[we]);if(Fi!=null&&Xe)for(var we of Xe(Fi))xi.indexOf(we)<0&&Qe.call(Fi,we)&&(Se[we]=Fi[we]);return Se},jn=(Fi,xi,Se)=>new Promise((we,de)=>{var Nn=on=>{try{mi(Se.next(on))}catch(Oe){de(Oe)}},Un=on=>{try{mi(Se.throw(on))}catch(Oe){de(Oe)}},mi=on=>on.done?we(on.value):Promise.resolve(on.value).then(Nn,Un);mi((Se=Se.apply(Fi,xi)).next())}),wn=Fi=>{var xi=Fi,{className:Se,style:we,children:de,loading:Nn=!1,openLoading:Un,onClick:mi=()=>{},size:on="middle",shape:Oe="round"}=xi,pe=Sn(xi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ge,cn]=(0,Nt.useState)(!1);return Nt.createElement(Pe.ZP,an({onClick:(0,Me.throttle)(Zt=>jn(void 0,null,function*(){Un&&cn(!0);try{yield mi(Zt)}catch(Ue){console.log("error",Ue)}Un&&cn(!1)}),2e3,{leading:!0,trailing:!1}),className:De()(kt.btn,kt[`${on}-${Oe}`],Se),style:we,size:on,shape:Oe,loading:ge||Nn},pe),de)},qn={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"},hr=({className:Fi,style:xi,children:Se=null,onClick:we,title:de})=>Nt.createElement("div",{className:De()(qn.head,Fi),style:xi},Nt.createElement("span",{className:"primary-hover",onClick:we},Nt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Nt.createElement("b",{title:de},de),Nt.createElement("div",{className:qn.node},Se)),tr={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"},pr=({confirmShow:Fi=!0,confirmTitle:xi,confirmClick:Se,cancelShow:we=!0,cancelTitle:de,cancelClick:Nn,className:Un,style:mi,confirmLoading:on=!1})=>Nt.createElement("div",{className:De()(tr.btns,Un),style:mi},Fi&&Nt.createElement(Pe.ZP,{loading:on,onClick:Se,type:"primary",className:tr.confirm},xi),we&&Nt.createElement(Pe.ZP,{onClick:Nn,className:tr.cancel},de)),er={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"},Lo=({className:Fi,style:xi={},LeftContent:Se,children:we,RightContent:de})=>Nt.createElement("div",{className:De()(er.fixedBottom,Fi),style:xi},Nt.createElement("div",{className:er.wrap},Nt.createElement("div",{className:er.left},Se),Nt.createElement("div",{className:er.center},we),Nt.createElement("div",{className:er.right},de))),Bo={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"},Er=({className:Fi,style:xi={},dataSource:Se=[]})=>Nt.createElement("div",{className:De()(Bo.crumbs,Fi),style:xi},Se.map((we,de)=>de<Se.length-1?Nt.createElement(Nt.Fragment,{key:de},we.path||we.onClick?Nt.createElement("span",{className:Bo.hover,onClick:we!=null&&we.onClick?we.onClick:()=>fi.history.push(we.path)},we.name):Nt.createElement("span",null,we.name),Nt.createElement("span",null,"\xA0",">","\xA0")):Nt.createElement("span",{key:de,style:{color:"#5F6368"}},we.name))),lo=ne(11938),Vo=Object.defineProperty,ko=Object.defineProperties,Eo=Object.getOwnPropertyDescriptors,jr=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Pt=(Fi,xi,Se)=>xi in Fi?Vo(Fi,xi,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Fi[xi]=Se,$i=(Fi,xi)=>{for(var Se in xi||(xi={}))Br.call(xi,Se)&&Pt(Fi,Se,xi[Se]);if(jr)for(var Se of jr(xi))Gr.call(xi,Se)&&Pt(Fi,Se,xi[Se]);return Fi},Hr=(Fi,xi)=>ko(Fi,Eo(xi)),Dr=(Fi,xi)=>{var Se={};for(var we in Fi)Br.call(Fi,we)&&xi.indexOf(we)<0&&(Se[we]=Fi[we]);if(Fi!=null&&jr)for(var we of jr(Fi))xi.indexOf(we)<0&&Gr.call(Fi,we)&&(Se[we]=Fi[we]);return Se};const{Countdown:oo}=lo.default;var Fs=Fi=>{var xi=Fi,{onChange:Se}=xi,we=Dr(xi,["onChange"]);const[de,Nn]=(0,Nt.useState)(null);(0,Nt.useEffect)(()=>{typeof de=="number"&&de>=0&&Se(de)},[de]);const Un=mi=>{const on=Math.floor(mi/1e3);Nn(on)};return Nt.createElement(oo,Hr($i({},we),{onChange:Un}))}},47458:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return Fe}});var Nt=ne(59301);function Fe(Te,tn){const be=(0,Nt.useRef)();(0,Nt.useEffect)(()=>{be.current=Te}),(0,Nt.useEffect)(()=>{function xe(){be.current()}if(tn!==null){let ye=setInterval(xe,tn);return()=>clearInterval(ye)}},[tn])}},87616:function(Pn,vi,ne){"use strict";ne.r(vi),ne.d(vi,{default:function(){return Pi}});var Nt=ne(59301),Fe=ne(6767),Te=ne(62957),tn=ne(29787),be=ne(37639),xe=ne(47889),ye=ne(77736),De={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"},Me=ne(52430),se=ne(44993),hn=ne(89299),Be=ne(13952),un=ne(68055),Qt=ne(61186),et=ne.n(Qt),nt="data:image/png;base64,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",ct=ne(4213),lt=ne(98573),gt=ne(56102),yt=ne(44164),Et=ne.n(yt),Tt=(le,bn,ci)=>new Promise((Ht,Lt)=>{var Ct=kt=>{try{Kt(ci.next(kt))}catch(Pe){Lt(Pe)}},Ut=kt=>{try{Kt(ci.throw(kt))}catch(Pe){Lt(Pe)}},Kt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Ut);Kt((ci=ci.apply(le,bn)).next())});const Yt=le=>{const bn=/```[a-z]*\n([\s\S]*?)```/g;return le.replace(bn,(ci,Ht)=>`<code>${Ht.trim()}</code>`)},Xt=(le,bn,ci)=>{const Ht={markdown:"text/markdown",html:"text/html"},Lt=new Blob([le],{type:Ht[ci]}),Ct=URL.createObjectURL(Lt),Ut=document.createElement("a");Ut.href=Ct,Ut.download=bn,Ut.click(),URL.revokeObjectURL(Ct)},he=le=>et()(le).format("YYYY-MM-DD HH:mm:ss"),fe=(le,bn,ci)=>le.map((Ht,Lt)=>`
${Lt!==0?`
<div class="message">
<p class="user-name">${bn}<span class="timestamp">${he(Ht.updated_at)}</span></p>
<pre class="code">${Yt(Ht.question)}</pre>
</div>`:""}
<div class="message">
<p class="user-name">${ci}<span class="timestamp">${he(Ht.updated_at)}</span></p>
<pre class="code">${Yt(Ht.answer)}</pre>
</div>
`).join(""),ue=(le,bn,ci)=>le.map((Ht,Lt)=>`${Lt!==0?`${bn}
${he(Ht.updated_at)}
${Ht.question}
`:""}${ci}
${he(Ht.updated_at)}
${Ht.answer}
`).join(""),Ye=(le,bn)=>Tt(void 0,null,function*(){const ci=fe(le.data,le.my_user_name,le.user_name),Ht=ue(le.data,le.my_user_name,le.user_name),Lt=`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=${Lt}>
${ci}
</div>
</body>
</html>
`;if(bn.key==="html")Xt(Ct,`\u4E0E${le.user_name}\u5BF9\u8BDD\u5185\u5BB9.html`,"html");else if(bn.key==="markdown")Xt(Ht,`\u4E0E${le.user_name}\u5BF9\u8BDD\u5185\u5BB9.md`,"markdown");else if(bn.key==="pdf"){const Ut=Te.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(Lt);if(!kt){console.error("PDF \u5143\u7D20\u672A\u627E\u5230");return}kt.style.width="auto",kt.style.height="auto",kt.style.position="initial";const Pe={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"},pagebreak:{mode:["avoid-all"]}};Et()().set(Pe).from(kt).toPdf().get("pdf").save(`\u4E0E${le.user_name}\u5BF9\u8BDD\u5185\u5BB9.pdf`).finally(()=>{Ut.destroy(),document.body.removeChild(Kt)})}});var Le={cursor:"cursor___XqlqI"},vn=({text:le,open:bn=!1,onTextChange:ci})=>{const[Ht,Lt]=(0,Nt.useState)(""),[Ct,Ut]=(0,Nt.useState)(0),[Kt,kt]=(0,Nt.useState)(!0);return(0,Nt.useEffect)(()=>{if(bn)if(Ct<le.length){kt(!1);const Pe=setTimeout(()=>{Lt(dn=>dn+le[Ct]),Ut(Ct+1),ci()},50);return()=>clearTimeout(Pe)}else kt(!0),ci();else Lt(le),Ut(0),kt(!0)},[Ct,le,bn]),Nt.createElement(lt.Z,{value:Ht+(Kt?"":`<span class='${Le.cursor}'></span>`)})},On={menuWrap:"menuWrap___GDodS",menuMask:"menuMask___dldKr",menu:"menu___OrkS3",itemTwo:"itemTwo___gOXTT",item:"item___XhZWJ",itemDisabled:"itemDisabled___pRoiI",menuWrapRight:"menuWrapRight___Tgo4N"},ri=ne(38776),Vn=ne(92310),Qi=ne.n(Vn),Ce=({disabled:le=!1,recoverDisabled:bn=!1,onFileType:ci,onRecover:Ht,onEmpty:Lt})=>{const[Ct,Ut]=(0,Nt.useState)(!1),[Kt,kt]=(0,Nt.useState)(!1),Pe=(0,Nt.useRef)(null),dn=[{key:"html",label:"\u5BFC\u51FA\u6210HTML"},{key:"markdown",label:"\u5BFC\u51FA\u6210Markdown"},{key:"pdf",label:"\u5BFC\u51FA\u6210PDF"}],Xe=()=>{if(!le){if(Pe.current){const Ze=Pe.current.getBoundingClientRect(),Qe=window.innerWidth-Ze.right;kt(Qe>300)}Ut(!0)}};return console.log(Kt),Nt.createElement("div",{ref:Pe,className:Qi()(On.menuWrap,Kt&&On.menuWrapRight),onMouseEnter:Xe,onMouseLeave:()=>Ut(!1)},Nt.createElement(ri.op,{disabled:le},Nt.createElement("i",{className:"iconfont icon-gengduo6 font12 mr5"}),"\u66F4\u591A\u64CD\u4F5C"),Nt.createElement("div",{className:On.menuMask,style:{display:Ct?"block":"none"}},Nt.createElement("div",{className:On.menu},Nt.createElement("div",{className:On.itemOne},Nt.createElement("div",{className:On.item,style:{cursor:"auto"}},Nt.createElement("span",null,"\u5BFC\u51FA\u5BF9\u8BDD"),Nt.createElement("div",{className:On.itemTwo},dn.map(Ze=>Nt.createElement("div",{key:Ze.key,onClick:()=>{Ut(!1),ci(Ze)},className:On.item},Ze.label)))),bn?Nt.createElement("div",{className:On.itemDisabled},"\u6062\u590D\u5BF9\u8BDD"):Nt.createElement("div",{onClick:Ze=>{Ut(!1),Ht(Ze)},className:On.item},"\u6062\u590D\u5BF9\u8BDD"),Nt.createElement("div",{onClick:Ze=>{Ut(!1),Lt(Ze)},className:On.item},"\u6E05\u7A7A\u5BF9\u8BDD")))))},_t=ne(59301),Bn=Object.defineProperty,Si=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Mn=(le,bn,ci)=>bn in le?Bn(le,bn,{enumerable:!0,configurable:!0,writable:!0,value:ci}):le[bn]=ci,_n=(le,bn)=>{for(var ci in bn||(bn={}))ei.call(bn,ci)&&Mn(le,ci,bn[ci]);if(Si)for(var ci of Si(bn))_e.call(bn,ci)&&Mn(le,ci,bn[ci]);return le},fi=(le,bn,ci)=>new Promise((Ht,Lt)=>{var Ct=kt=>{try{Kt(ci.next(kt))}catch(Pe){Lt(Pe)}},Ut=kt=>{try{Kt(ci.throw(kt))}catch(Pe){Lt(Pe)}},Kt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Ut);Kt((ci=ci.apply(le,bn)).next())}),Pi=({})=>{var le,bn,ci,Ht;const{id:Lt,position:Ct}=(0,hn.oP)(),[Ut,Kt]=(0,Nt.useState)(!0),[kt,Pe]=(0,Nt.useState)(!1),dn=(0,Nt.useRef)("bottomRight"),Xe=(0,Nt.useRef)();let[Ze,Qe]=(0,Nt.useState)({});const[ln,an]=(0,Nt.useState)(Number(Lt)),[Sn,jn]=(0,Nt.useState)([]),[Wn,wn]=(0,Nt.useState)(1),[qn,di]=(0,Nt.useState)(Number(Ct)),hr=(0,Nt.useRef)(Number(Ct)),[tr,ro]=(0,Nt.useState)([]),[pr,er]=(0,Nt.useState)(!1),[ur,Lo]=(0,Nt.useState)(!0),Bo=(0,Nt.useRef)(null),Ur=(0,Nt.useRef)(1),[Er,lo]=(0,Nt.useState)({});let[Vo,ko]=(0,Nt.useState)("");const[Eo,jr]=(0,Nt.useState)(!1),[Br,Gr]=(0,Nt.useState)(!1),[Pt]=(0,se.useSearchParams)();(0,Nt.useEffect)(()=>((0,se.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!1}),()=>{(0,se.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,Nt.useEffect)(()=>{$i()},[]),(0,Nt.useEffect)(()=>{Bo.current.scrollTop=Bo.current.scrollHeight},[Wn]),(0,Nt.useEffect)(()=>{const Oe=document.getElementById("wechat_QR_code_ids");return Oe.classList.add("hide"),()=>{Oe.classList.remove("hide")}},[]);const $i=()=>fi(void 0,null,function*(){var Oe,pe;const ge=yield(0,Me.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Lt}});if((ge==null?void 0:ge.status)===0){const cn=yield(0,Me.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Lt,challenge_id:Number(Ct)||""}});if(cn!=null&&cn.data){Lo(!1),jn((cn==null?void 0:cn.data)||[]);const Zt=(pe=(Oe=cn==null?void 0:cn.data)==null?void 0:Oe.find(Ue=>Ue.to_user_id===Number(Lt)))==null?void 0:pe.id;an(Zt),Hr(Zt),oo(Zt,Ct)}}}),Hr=Oe=>fi(void 0,null,function*(){const pe=yield(0,Me.ZP)("/api/chats/challenge_list.json",{method:"get",params:{id:Oe,challenge_id:qn||""}});pe!=null&&pe.challenges&&ro([{id:0,subject:"\u5168\u90E8"},...pe.challenges])}),Dr=(Oe,pe)=>fi(void 0,null,function*(){const ge=yield(0,Me.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Oe,challenge_id:pe||""}});ge!=null&&ge.data&&jn((ge==null?void 0:ge.data)||[]),Lo(!1)}),oo=(Oe,pe,ge)=>fi(void 0,null,function*(){var cn;Kt(!0);const Zt=yield(0,Me.ZP)(`/api/chats/${Oe}.json`,{method:"get",params:{challenge_id:Number(pe)||""}});if(Zt!=null&&Zt.data){ge&&(Zt.data[Zt.data.length-1].open=!0),lo(_n({},Zt)||{}),er(!0),Pe(!1);const Ue=(cn=Sn==null?void 0:Sn.find(fn=>fn.id===Oe))==null?void 0:cn.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=${Ue||Lt}&position=${pe}&homeworkId=${Pt.get("homeworkId")}`):se.history.replace(`/chatgpt?id=${Ue||Lt}&position=${pe}`),ge&&(wn(Math.random()),Dr(Ue,pe))}Kt(!1)}),Ko=Oe=>{var pe;ko(Oe),(pe=Oe==null?void 0:Oe.trim())==null||pe.length},Fs=Oe=>{Ur.current=Ur.current+1,an(Oe),di(0),ko(""),Pe(!1),oo(Oe,0),Hr(Oe)},Fi=()=>fi(void 0,null,function*(){var Oe;if(Vo.trim().length===0){Fe.ZP.error("\u4E0D\u80FD\u8F93\u5165\u7EAF\u7A7A\u683C");return}if(!Vo){Fe.ZP.warning("\u8BF7\u8F93\u5165\u4F60\u8981\u95EE\u7684\u95EE\u9898");return}Pe(!0);const pe=et()().format("YYYY-MM-DDTHH:mm:ss.SSSZ"),ge=_n({},Er);(Oe=ge==null?void 0:ge.data)==null||Oe.push({id:0,updated_at:pe,question:Vo,answer:_t.createElement("div",{className:De.animation},"\u8001\u5E08\u6B63\u5728\u56DE\u7B54\u4E2D\uFF0C\u8BF7\u7A0D\u540E")}),lo(ge),wn(Wn+1),ko(""),Ur.current=Ur.current+1;const cn=Ur.current,Zt=yield(0,Me.ZP)("/api/chats/get_answer",{method:"post",body:{chat_id:ln,to_user_id:Lt,question:Vo,challenge_id:qn||"",time:pe}});cn===Ur.current&&(Zt==null?void 0:Zt.status)===0&&oo(ln,qn,!0)}),xi=()=>{oo(ln,qn),Dr(Lt,qn),jr(!1)},Se=(Oe,pe,ge="")=>fi(void 0,null,function*(){Kt(!0);let cn={};Pt.get("homeworkId")?cn={id:Oe,satisfied:pe,content:ge,homework_common_id:Pt.get("homeworkId")}:cn={id:Oe,satisfied:pe,content:ge};const Zt=yield(0,Me.ZP)("/api/chats/praise.json",{method:"post",body:cn});(Zt==null?void 0:Zt.status)===0&&oo(ln,qn)}),we=Oe=>{Oe.shiftKey&&Oe.keyCode===13||Oe.keyCode===13&&(Oe.preventDefault(),Fi())},de=Oe=>fi(void 0,null,function*(){Te.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:()=>fi(void 0,null,function*(){(yield(0,Me.ZP)("/api/chats/delete_one.json",{method:"delete",body:{id:Oe}})).status===0&&(Fe.ZP.success("\u5220\u9664\u6210\u529F"),oo(ln,qn))})})}),Nn=()=>fi(void 0,null,function*(){Kt(!0),Ur.current=Ur.current+1,(yield(0,Me.ZP)("/api/chats/stop_one.json",{method:"delete",body:{challenge_id:qn,id:ln}})).status===0&&oo(ln,qn),Kt(!1)}),Un=[`\u8BF7${Er==null?void 0:Er.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"],mi=Oe=>{Ye(Er,Oe)},on=()=>{};return _t.createElement("div",{className:De.wrap},_t.createElement("div",{className:De.head},_t.createElement("b",null,"\u5B9E\u8BAD >"),"\u6559\u5B66\u8F85\u5BFC\uFF08beta\u7248\u672C\uFF09"),_t.createElement("div",{className:De.content},_t.createElement(tn.Z,{spinning:ur},_t.createElement("div",{className:De.left,onClick:()=>{Gr(!1)}},_t.createElement("div",{className:De.title},_t.createElement("span",null,"\u95EE\u7B54\u5217\u8868"),_t.createElement("div",{className:Qi()(De.add,kt&&De.disabledElement),onClick:()=>fi(void 0,null,function*(){if(kt)return;Lo(!0);const Oe=yield(0,Me.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Lt,new_chat:!0}});if(Oe.status===0){const pe=Oe==null?void 0:Oe.id;if(pe===ln){Fe.ZP.warning("\u5F53\u524D\u5DF2\u7ECF\u5728\u65B0\u5BF9\u8BDD\u7A97\u53E3"),Lo(!1);return}yield Dr(-1,0),an(pe),di(0),yield oo(pe,0)}Lo(!1)})})),_t.createElement("div",{className:De.leftBar},Sn.map(Oe=>_t.createElement("div",{key:Oe.id,onClick:()=>Fs(Oe.id),className:`${De.li} ${Oe.id===ln?De.active:""}`},Oe!=null&&Oe.avatar?_t.createElement("img",{src:`${Be.Z.IMG_SERVER}/images/${Oe==null?void 0:Oe.avatar}`}):_t.createElement("img",{src:nt}),_t.createElement("aside",null,_t.createElement("p",null,_t.createElement("b",{title:Oe.user_name},Oe.user_name),_t.createElement("span",null,Oe.time)),_t.createElement("div",null,Oe.last_message))))))),_t.createElement("div",{className:De.right},pr&&_t.createElement("div",{className:De.title,onClick:()=>{Gr(!1)}},_t.createElement("section",{className:De.center},_t.createElement("span",null,"\u4E0E",Er==null?void 0:Er.user_name,"\u8001\u5E08\u6C9F\u901A\u4E2D\u2026"),_t.createElement("div",{className:De.tabs},_t.createElement("i",{className:"iconfont icon-lianjie3"}),_t.createElement("span",null,"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",Er!=null&&Er.challenge_name?`${(bn=(le=Er==null?void 0:Er.data[0])==null?void 0:le.shixun)==null?void 0:bn.name} \u5B9E\u8BAD---\u7B2C${Er==null?void 0:Er.challenge_position}\u5173`:"\u5168\u90E8"),_t.createElement("span",{onClick:()=>{kt||(hr.current=qn,jr(!0))},className:Qi()(De.cut,kt&&De.disabledElement)},"\u5207\u6362")),_t.createElement(Ce,{disabled:kt,recoverDisabled:!(Er!=null&&Er.can_recycle),onFileType:mi,onRecover:()=>fi(void 0,null,function*(){Kt(!0),(yield(0,Me.ZP)("/api/chats/recycle.json",{method:"post",body:{challenge_id:qn,id:ln}})).status===0&&(Fe.ZP.success("\u6062\u590D\u5BF9\u8BDD\u6210\u529F"),Dr(Lt,qn),oo(ln,qn)),Kt(!1)}),onEmpty:()=>{Te.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:()=>fi(void 0,null,function*(){(yield(0,Me.ZP)("/api/chats/clean.json",{method:"delete",body:{challenge_id:qn,id:ln}})).status===0&&(Fe.ZP.success("\u6E05\u7A7A\u5BF9\u8BDD\u6210\u529F"),Dr(Lt,qn),oo(ln,qn))})})}}))),_t.createElement("div",{onClick:()=>{Gr(!1)},className:De.rightBar,ref:Bo},_t.createElement(tn.Z,{spinning:Ut},!((ci=Er==null?void 0:Er.data)!=null&&ci.length)&&_t.createElement("div",{className:De.empty}),(Ht=Er==null?void 0:Er.data)==null?void 0:Ht.map((Oe,pe)=>{var ge,cn,Zt;return _t.createElement(Nt.Fragment,{key:pe},!!Oe.question&&_t.createElement("div",{className:De.li},_t.createElement("img",{src:`${Be.Z.IMG_SERVER}/images/${Er==null?void 0:Er.my_avatar}`,style:{borderRadius:"50%",width:56,height:56}}),_t.createElement("aside",null,_t.createElement("p",null,_t.createElement("b",null,Er.my_user_name),_t.createElement("span",null,et()(Oe.updated_at).format("YYYY-MM-DD HH:mm"))),_t.createElement(lt.Z,{value:Oe.question}),_t.createElement("div",{className:De.action},_t.createElement(gt.CopyToClipboard,{text:Oe.question,onCopy:()=>Fe.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},_t.createElement("div",{className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&_t.createElement("div",{onClick:()=>de(Oe.id),className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")))),!!Oe.answer&&_t.createElement("div",{style:pe===0?{borderTop:0}:{},className:`${De.li} ${De.active}`},Er!=null&&Er.avatar?_t.createElement("img",{src:`${Be.Z.IMG_SERVER}/images/${Er==null?void 0:Er.avatar}`,style:{borderRadius:"50%",width:56,height:56}}):_t.createElement("img",{src:nt,style:{borderRadius:"50%",width:56,height:56}}),_t.createElement("aside",null,_t.createElement("p",null,_t.createElement("div",{style:{display:"flex"}},_t.createElement("b",{style:{marginRight:"20px"}},Er.user_name),(ge=Oe.shixun)!=null&&ge.name?_t.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",(cn=Oe.shixun)==null?void 0:cn.name," \u5B9E\u8BAD---\u7B2C",(Zt=Oe.challenge)==null?void 0:Zt.position,"\u5173"):_t.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A\u5168\u90E8")),_t.createElement("span",null,et()(Oe.updated_at).format("YYYY-MM-DD HH:mm"))),Oe.id===0?Oe.answer:_t.createElement(vn,{onTextChange:on,open:!!(Oe!=null&&Oe.open),text:Oe.answer}),Oe.id===0&&_t.createElement("div",{className:De.action},_t.createElement("div",{onClick:Nn,className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-tingzhishengcheng"}),"\u505C\u6B62\u751F\u6210")),(Oe==null?void 0:Oe.id)!==0&&_t.createElement("div",{className:De.action},!!Oe.question&&_t.createElement(_t.Fragment,null,_t.createElement("div",{onClick:()=>{Vo=Oe.question,Fi()},className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-zhongxinshengcheng"}),"\u91CD\u65B0\u751F\u6210"),_t.createElement(gt.CopyToClipboard,{text:Oe.answer,onCopy:()=>Fe.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},_t.createElement("div",{className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&_t.createElement("div",{onClick:()=>de(Oe.id),className:De.tagBtn},_t.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")),_t.createElement("span",{style:{marginLeft:"auto"},onClick:()=>{Se(Oe.id,Oe.satisfied===1?-1:1)},className:`mr30 ${Oe.satisfied===1?De.actActive:""}`},_t.createElement("i",{className:"iconfont icon-yijiejue"}),"\u5DF2\u89E3\u51B3"),_t.createElement(be.Z,{autoAdjustOverflow:!1,destroyTooltipOnHide:!0,open:Ze[pe],getPopupContainer:Ue=>Ue,placement:dn.current,content:_t.createElement("div",{className:De.box,onMouseLeave:Ue=>{clearTimeout(Xe.current),Ze[pe]=!1,Qe(_n({},Ze))},onMouseOver:()=>{clearTimeout(Xe.current)}},_t.createElement("p",null,"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5\uFF1A"),Un.map((Ue,fn)=>{const Rn=Ue===Oe.content;return _t.createElement("div",{onClick:()=>{Se(Oe.id,Rn?-1:0,Rn?"":Ue)},className:Rn?De.hot:"",key:Ue},Ue)}))},_t.createElement("span",{onMouseOver:Ue=>{clearTimeout(Xe.current),window.innerHeight-Ue.target.getBoundingClientRect().top<350?dn.current="topRight":dn.current="bottomRight",Ze={},Ze[pe]=!0,Qe(_n({},Ze))},onMouseOut:Ue=>{Xe.current=setTimeout(()=>{clearTimeout(Xe.current),Ze[pe]=!1,Qe(_n({},Ze))},800)},className:`${De.unsolved} ${Oe.satisfied===0?De.actActive:""}`},_t.createElement("i",{className:"iconfont icon-weijiejuezhengchang"}),"\u672A\u89E3\u51B3"))))))}))),pr&&_t.createElement("div",{className:De.answers},!Br&&_t.createElement("div",{className:De.open_md,onClick:()=>{Gr(!0)}},"\u8BF7\u8F93\u5165\u4F60\u7684\u95EE\u9898"),_t.createElement("div",{className:Br?"md_container":"md_container hide",style:{marginTop:20}},_t.createElement(ct.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Vo,height:240,width:1e3,onChange:Ko,className:De.md_editor}),_t.createElement("div",{className:De.tip_container,style:{display:"flex"},onClick:()=>{Gr(!1)}},_t.createElement("div",{className:De.btn_send,onClick:Fi},"\u53D1\u9001")))))),_t.createElement(Te.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,onCancel:()=>{di(hr.current),jr(!1)},onOk:xi,open:Eo,wrapClassName:un.Z.CustomCss,title:"\u66F4\u6362\u5173\u8054",width:"666px"},_t.createElement("div",null,_t.createElement(xe.ZP.Group,{value:qn,onChange:Oe=>di(Oe.target.value)},_t.createElement(ye.Z,{direction:"vertical"},tr==null?void 0:tr.map(Oe=>{var pe;return _t.createElement(xe.ZP,{key:Oe.id,value:Oe.id},Oe.id===0?Oe.subject:`${(pe=Oe.shixun)==null?void 0:pe.name} \u5B9E\u8BAD---\u7B2C${Oe==null?void 0:Oe.challenge_position}\u5173`)}))))))}},48421:function(Pn,vi,ne){"use strict";ne.d(vi,{AL:function(){return Et},Iy:function(){return hn},Qv:function(){return Qt},ez:function(){return yt},jb:function(){return Be}});var Nt=ne(32834),Fe=ne.n(Nt),Te=ne(11690),tn=ne.n(Te);let be=1;function xe(fe,ue){const Ye=fe.match(/^(\s+)(?:```)/);if(Ye===null)return ue;const Le=Ye[1];return ue.split(`
`).map(sn=>{const vn=sn.match(/^\s+/);if(vn===null)return sn;const[On]=vn;return On.length>=Le.length?sn.slice(Le.length):sn}).join(`
`)}let ye=[],De=["<ul>"];const Me=new(Fe()).Renderer,se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function hn(){ye.length=0,De=["<ul>"]}const Be={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function un(fe,ue,Ye,Le){if(ue>=fe.length||fe[ue].level<=Ye)return ue;var sn=fe[ue];Le.push("<li><a href='#"+be+sn.anchor+"'>"+sn.text+"</a>"),ue++;var vn=[];return ue=un(fe,ue,sn.level,vn),vn.length>0&&(Le.push("<ul>"),vn.forEach(function(On){Le.push(On)}),Le.push("</ul>")),Le.push("</li>"),ue=un(fe,ue,Ye,Le),ue}function Qt(){return un(ye,0,0,De),De.push("</ul>"),De.join("")}const et={heading(fe){const ue=se.exec(fe);if(be+=1,ue)return{type:"heading",raw:ue[0],depth:ue[1].length,text:ue[2]}},fences(fe){const ue=this.rules.block.fences.exec(fe);if(ue){const Ye=ue[0];let Le=xe(Ye,ue[3]||"");const sn=ue[2]?ue[2].trim():ue[2];if(["latex","katex","math"].indexOf(sn)>=0){const vn=lt(),On=Le;Le=vn,gt[vn]={type:"block",expression:On}}return{type:"code",raw:Ye,lang:sn,text:Le}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ct=0;const lt=()=>`__special_katext_id_${ct++}__`;let gt={};function yt(){return gt}function Et(){ct=0,gt={}}function Tt(fe){return fe=fe.replace(nt,(ue,Ye)=>{const Le=lt();return gt[Le]={type:"inline",expression:Ye},Le}),fe}const Yt=Me.listitem;Me.listitem=function(fe){return Yt(Tt(fe))};const Xt=Me.paragraph;Me.paragraph=function(fe){return Xt(Tt(fe))};const he=Me.tablecell;Me.tablecell=function(fe,ue){return he(Tt(fe),ue)},Me.code=function(fe,ue,Ye){const Le=(ue||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?`<p class='editormd-tex'>${fe}</p>`:`<pre class="prettyprint linenums"><code class="language-${ue}">${Ye?fe:(0,Te.escape)(fe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ye?fe:(0,Te.escape)(fe,!0))+"</code></pre>"},Me.heading=function(fe,ue,Ye){let Le=this.options.headerPrefix+Ye.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ye.push({anchor:Le,level:ue,text:fe}),"<h"+ue+' id="'+be+Le+'">'+fe+"</h"+ue+">"},Fe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Fe().use({tokenizer:et,renderer:Me}),vi.ZP=Fe()},99498:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){Nt.defineOption("placeholder","",function(De,Me,se){var hn=se&&se!=Nt.Init;if(Me&&!hn)De.on("blur",be),De.on("change",xe),De.on("swapDoc",xe),Nt.on(De.getInputField(),"compositionupdate",De.state.placeholderCompose=function(){tn(De)}),xe(De);else if(!Me&&hn){De.off("blur",be),De.off("change",xe),De.off("swapDoc",xe),Nt.off(De.getInputField(),"compositionupdate",De.state.placeholderCompose),Fe(De);var Be=De.getWrapperElement();Be.className=Be.className.replace(" CodeMirror-empty","")}Me&&!De.hasFocus()&&be(De)});function Fe(De){De.state.placeholder&&(De.state.placeholder.parentNode.removeChild(De.state.placeholder),De.state.placeholder=null)}function Te(De){Fe(De);var Me=De.state.placeholder=document.createElement("pre");Me.style.cssText="height: 0; overflow: visible",Me.style.direction=De.getOption("direction"),Me.className="CodeMirror-placeholder CodeMirror-line-like";var se=De.getOption("placeholder");typeof se=="string"&&(se=document.createTextNode(se)),Me.appendChild(se),De.display.lineSpace.insertBefore(Me,De.display.lineSpace.firstChild)}function tn(De){setTimeout(function(){var Me=!1,se=De.getInputField();se.nodeName=="TEXTAREA"?Me=!se.value:De.lineCount()==1&&(Me=!/[^\u200b]/.test(se.querySelector(".CodeMirror-line").textContent)),Me?Te(De):Fe(De)},20)}function be(De){ye(De)&&Te(De)}function xe(De){var Me=De.getWrapperElement(),se=ye(De);Me.className=Me.className.replace(" CodeMirror-empty","")+(se?" CodeMirror-empty":""),se?Te(De):Fe(De)}function ye(De){return De.lineCount()===1&&De.getLine(0)===""}})},25717:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){var Fe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Te=Nt.Pos;Nt.defineOption("autoCloseBrackets",!1,function(et,nt,ct){ct&&ct!=Nt.Init&&(et.removeKeyMap(be),et.state.closeBrackets=null),nt&&(xe(tn(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(be))});function tn(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:Fe[nt]}var be={Backspace:Me,Enter:se};function xe(et){for(var nt=0;nt<et.length;nt++){var ct=et.charAt(nt),lt="'"+ct+"'";be[lt]||(be[lt]=ye(ct))}}xe(Fe.pairs+"`");function ye(et){return function(nt){return Be(nt,et)}}function De(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ct=et.getModeAt(et.getCursor());return ct.closeBrackets||nt}function Me(et){var nt=De(et);if(!nt||et.getOption("disableInput"))return Nt.Pass;for(var ct=tn(nt,"pairs"),lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return Nt.Pass;var yt=un(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return Nt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Et=lt[gt].head;et.replaceRange("",Te(Et.line,Et.ch-1),Te(Et.line,Et.ch+1),"+delete")}}function se(et){var nt=De(et),ct=nt&&tn(nt,"explode");if(!ct||et.getOption("disableInput"))return Nt.Pass;for(var lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return Nt.Pass;var yt=un(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return Nt.Pass}et.operation(function(){var Et=et.lineSeparator()||`
`;et.replaceSelection(Et+Et,null),et.execCommand("goCharLeft"),lt=et.listSelections();for(var Tt=0;Tt<lt.length;Tt++){var Yt=lt[Tt].head.line;et.indentLine(Yt,null,!0),et.indentLine(Yt+1,null,!0)}})}function hn(et){var nt=Nt.cmpPos(et.anchor,et.head)>0;return{anchor:new Te(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new Te(et.head.line,et.head.ch+(nt?1:-1))}}function Be(et,nt){var ct=De(et);if(!ct||et.getOption("disableInput"))return Nt.Pass;var lt=tn(ct,"pairs"),gt=lt.indexOf(nt);if(gt==-1)return Nt.Pass;for(var yt=tn(ct,"closeBefore"),Et=tn(ct,"triples"),Tt=lt.charAt(gt+1)==nt,Yt=et.listSelections(),Xt=gt%2==0,he,fe=0;fe<Yt.length;fe++){var ue=Yt[fe],Ye=ue.head,Le,sn=et.getRange(Ye,Te(Ye.line,Ye.ch+1));if(Xt&&!ue.empty())Le="surround";else if((Tt||!Xt)&&sn==nt)Tt&&Qt(et,Ye)?Le="both":Et.indexOf(nt)>=0&&et.getRange(Ye,Te(Ye.line,Ye.ch+3))==nt+nt+nt?Le="skipThree":Le="skip";else if(Tt&&Ye.ch>1&&Et.indexOf(nt)>=0&&et.getRange(Te(Ye.line,Ye.ch-2),Ye)==nt+nt){if(Ye.ch>2&&/\bstring/.test(et.getTokenTypeAt(Te(Ye.line,Ye.ch-2))))return Nt.Pass;Le="addFour"}else if(Tt){var vn=Ye.ch==0?" ":et.getRange(Te(Ye.line,Ye.ch-1),Ye);if(!Nt.isWordChar(sn)&&vn!=nt&&!Nt.isWordChar(vn))Le="both";else return Nt.Pass}else if(Xt&&(sn.length===0||/\s/.test(sn)||yt.indexOf(sn)>-1))Le="both";else return Nt.Pass;if(!he)he=Le;else if(he!=Le)return Nt.Pass}var On=gt%2?lt.charAt(gt-1):nt,ri=gt%2?nt:lt.charAt(gt+1);et.operation(function(){if(he=="skip")et.execCommand("goCharRight");else if(he=="skipThree")for(var Vn=0;Vn<3;Vn++)et.execCommand("goCharRight");else if(he=="surround"){for(var Qi=et.getSelections(),Vn=0;Vn<Qi.length;Vn++)Qi[Vn]=On+Qi[Vn]+ri;et.replaceSelections(Qi,"around"),Qi=et.listSelections().slice();for(var Vn=0;Vn<Qi.length;Vn++)Qi[Vn]=hn(Qi[Vn]);et.setSelections(Qi)}else he=="both"?(et.replaceSelection(On+ri,null),et.triggerElectric(On+ri),et.execCommand("goCharLeft")):he=="addFour"&&(et.replaceSelection(On+On+On+On,"before"),et.execCommand("goCharRight"))})}function un(et,nt){var ct=et.getRange(Te(nt.line,nt.ch-1),Te(nt.line,nt.ch+1));return ct.length==2?ct:null}function Qt(et,nt){var ct=et.getTokenAt(Te(nt.line,nt.ch+1));return/\bstring/.test(ct.type)&&ct.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(Pn,vi,ne){(function(Nt){Nt(ne(89780),ne(32855))})(function(Nt){Nt.defineOption("autoCloseTags",!1,function(Me,se,hn){if(hn!=Nt.Init&&hn&&Me.removeKeyMap("autoCloseTags"),!!se){var Be={name:"autoCloseTags"};(typeof se!="object"||se.whenClosing!==!1)&&(Be["'/'"]=function(un){return xe(un)}),(typeof se!="object"||se.whenOpening!==!1)&&(Be["'>'"]=function(un){return tn(un)}),Me.addKeyMap(Be)}});var Fe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Te=["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 tn(Me){if(Me.getOption("disableInput"))return Nt.Pass;for(var se=Me.listSelections(),hn=[],Be=Me.getOption("autoCloseTags"),un=0;un<se.length;un++){if(!se[un].empty())return Nt.Pass;var Qt=se[un].head,et=Me.getTokenAt(Qt),nt=Nt.innerMode(Me.getMode(),et.state),ct=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ct),gt=lt&&lt.name;if(!gt)return Nt.Pass;var yt=nt.mode.configuration=="html",Et=typeof Be=="object"&&Be.dontCloseTags||yt&&Fe,Tt=typeof Be=="object"&&Be.indentTags||yt&&Te;et.end>Qt.ch&&(gt=gt.slice(0,gt.length-et.end+Qt.ch));var Yt=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Qt.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&&lt.close||et.string.indexOf("/")==Qt.ch-et.start-1||Et&&ye(Et,Yt)>-1||De(Me,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ct)||[],gt,Qt,!0))return Nt.Pass;var Xt=typeof Be=="object"&&Be.emptyTags;if(Xt&&ye(Xt,gt)>-1){hn[un]={text:"/>",newPos:Nt.Pos(Qt.line,Qt.ch+2)};continue}var he=Tt&&ye(Tt,Yt)>-1;hn[un]={indent:he,text:">"+(he?`
`:"")+"</"+gt+">",newPos:he?Nt.Pos(Qt.line+1,0):Nt.Pos(Qt.line,Qt.ch+1)}}for(var fe=typeof Be=="object"&&Be.dontIndentOnAutoClose,un=se.length-1;un>=0;un--){var ue=hn[un];Me.replaceRange(ue.text,se[un].head,se[un].anchor,"+insert");var Ye=Me.listSelections().slice(0);Ye[un]={head:ue.newPos,anchor:ue.newPos},Me.setSelections(Ye),!fe&&ue.indent&&(Me.indentLine(ue.newPos.line,null,!0),Me.indentLine(ue.newPos.line+1,null,!0))}}function be(Me,se){for(var hn=Me.listSelections(),Be=[],un=se?"/":"</",Qt=Me.getOption("autoCloseTags"),et=typeof Qt=="object"&&Qt.dontIndentOnSlash,nt=0;nt<hn.length;nt++){if(!hn[nt].empty())return Nt.Pass;var ct=hn[nt].head,lt=Me.getTokenAt(ct),gt=Nt.innerMode(Me.getMode(),lt.state),yt=gt.state;if(se&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ct.ch-1))return Nt.Pass;var Et,Tt=gt.mode.name!="xml"&&Me.getMode().name=="htmlmixed";if(Tt&&gt.mode.name=="javascript")Et=un+"script";else if(Tt&&gt.mode.name=="css")Et=un+"style";else{var Yt=gt.mode.xmlCurrentContext&&gt.mode.xmlCurrentContext(yt);if(!Yt||Yt.length&&De(Me,Yt,Yt[Yt.length-1],ct))return Nt.Pass;Et=un+Yt[Yt.length-1]}Me.getLine(ct.line).charAt(lt.end)!=">"&&(Et+=">"),Be[nt]=Et}if(Me.replaceSelections(Be),hn=Me.listSelections(),!et)for(var nt=0;nt<hn.length;nt++)(nt==hn.length-1||hn[nt].head.line<hn[nt+1].head.line)&&Me.indentLine(hn[nt].head.line)}function xe(Me){return Me.getOption("disableInput")?Nt.Pass:be(Me,!0)}Nt.commands.closeTag=function(Me){return be(Me)};function ye(Me,se){if(Me.indexOf)return Me.indexOf(se);for(var hn=0,Be=Me.length;hn<Be;++hn)if(Me[hn]==se)return hn;return-1}function De(Me,se,hn,Be,un){if(!Nt.scanForClosingTag)return!1;var Qt=Math.min(Me.lastLine()+1,Be.line+500),et=Nt.scanForClosingTag(Me,Be,null,Qt);if(!et||et.tag!=hn)return!1;for(var nt=un?1:0,ct=se.length-1;ct>=0&&se[ct]==hn;ct--)++nt;Be=et.to;for(var ct=1;ct<nt;ct++){var lt=Nt.scanForClosingTag(Me,Be,null,Qt);if(!lt||lt.tag!=hn)return!1;Be=lt.to}return!0}})},32855:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){"use strict";var Fe=Nt.Pos;function Te(ct,lt){return ct.line-lt.line||ct.ch-lt.ch}var tn="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",be=tn+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",xe=new RegExp("<(/?)(["+tn+"]["+be+"]*)","g");function ye(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 De(ct,lt){var gt=ct.cm.getTokenTypeAt(Fe(ct.line,lt));return gt&&/\btag\b/.test(gt)}function Me(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(Me(ct))continue;return}if(!De(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 Be(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf("<",ct.ch-1):-1;if(lt==-1){if(se(ct))continue;return}if(!De(ct,lt+1)){ct.ch=lt;continue}xe.lastIndex=lt,ct.ch=lt;var gt=xe.exec(ct.text);if(gt&&gt.index==lt)return gt}}function un(ct){for(;;){xe.lastIndex=ct.ch;var lt=xe.exec(ct.text);if(!lt){if(Me(ct))continue;return}if(!De(ct,lt.index+1)){ct.ch=lt.index+1;continue}return ct.ch=lt.index+lt[0].length,lt}}function Qt(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf(">",ct.ch-1):-1;if(lt==-1){if(se(ct))continue;return}if(!De(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=un(ct),Et,Tt=ct.line,Yt=ct.ch-(yt?yt[0].length:0);if(!yt||!(Et=hn(ct)))return;if(Et!="selfClose")if(yt[1]){for(var Xt=gt.length-1;Xt>=0;--Xt)if(gt[Xt]==yt[2]){gt.length=Xt;break}if(Xt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:Fe(Tt,Yt),to:Fe(ct.line,ct.ch)}}else gt.push(yt[2])}}function nt(ct,lt){for(var gt=[];;){var yt=Qt(ct);if(!yt)return;if(yt=="selfClose"){Be(ct);continue}var Et=ct.line,Tt=ct.ch,Yt=Be(ct);if(!Yt)return;if(Yt[1])gt.push(Yt[2]);else{for(var Xt=gt.length-1;Xt>=0;--Xt)if(gt[Xt]==Yt[2]){gt.length=Xt;break}if(Xt<0&&(!lt||lt==Yt[2]))return{tag:Yt[2],from:Fe(ct.line,ct.ch),to:Fe(Et,Tt)}}}}Nt.registerHelper("fold","xml",function(ct,lt){for(var gt=new ye(ct,lt.line,0);;){var yt=un(gt);if(!yt||gt.line!=lt.line)return;var Et=hn(gt);if(!Et)return;if(!yt[1]&&Et!="selfClose"){var Tt=Fe(gt.line,gt.ch),Yt=et(gt,yt[2]);return Yt&&Te(Yt.from,Tt)>0?{from:Tt,to:Yt.from}:null}}}),Nt.findMatchingTag=function(ct,lt,gt){var yt=new ye(ct,lt.line,lt.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Et=hn(yt),Tt=Et&&Fe(yt.line,yt.ch),Yt=Et&&Be(yt);if(!(!Et||!Yt||Te(yt,lt)>0)){var Xt={from:Fe(yt.line,yt.ch),to:Tt,tag:Yt[2]};return Et=="selfClose"?{open:Xt,close:null,at:"open"}:Yt[1]?{open:nt(yt,Yt[2]),close:Xt,at:"close"}:(yt=new ye(ct,Tt.line,Tt.ch,gt),{open:Xt,close:et(yt,Yt[2]),at:"open"})}}},Nt.findEnclosingTag=function(ct,lt,gt,yt){for(var Et=new ye(ct,lt.line,lt.ch,gt);;){var Tt=nt(Et,yt);if(!Tt)break;var Yt=new ye(ct,lt.line,lt.ch,gt),Xt=et(Yt,Tt.tag);if(Xt)return{open:Tt,close:Xt}}},Nt.scanForClosingTag=function(ct,lt,gt,yt){var Et=new ye(ct,lt.line,lt.ch,yt?{from:0,to:yt}:null);return et(Et,gt)}})},89780:function(Pn){(function(vi,ne){Pn.exports=ne()})(this,function(){"use strict";var vi=navigator.userAgent,ne=navigator.platform,Nt=/gecko\/\d/i.test(vi),Fe=/MSIE \d/.test(vi),Te=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vi),tn=/Edge\/(\d+)/.exec(vi),be=Fe||Te||tn,xe=be&&(Fe?document.documentMode||6:+(tn||Te)[1]),ye=!tn&&/WebKit\//.test(vi),De=ye&&/Qt\/\d+\.\d+/.test(vi),Me=!tn&&/Chrome\//.test(vi),se=/Opera\//.test(vi),hn=/Apple Computer/.test(navigator.vendor),Be=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(vi),un=/PhantomJS/.test(vi),Qt=!tn&&/AppleWebKit/.test(vi)&&/Mobile\/\w+/.test(vi),et=/Android/.test(vi),nt=Qt||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(vi),ct=Qt||/Mac/.test(ne),lt=/\bCrOS\b/.test(vi),gt=/win/i.test(ne),yt=se&&vi.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(se=!1,ye=!0);var Et=ct&&(De||se&&(yt==null||yt<12.11)),Tt=Nt||be&&xe>=9;function Yt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Xt=function(it,st){var ht=it.className,ut=Yt(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 ue(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 Ye(it,st,ht,ut){var dt=ue(it,st,ht,ut);return dt.setAttribute("role","presentation"),dt}var Le;document.createRange?Le=function(it,st,ht,ut){var dt=document.createRange();return dt.setEnd(ut||it,ht),dt.setStart(it,st),dt}:Le=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 sn(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 vn(){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 On(it,st){var ht=it.className;Yt(st).test(ht)||(it.className+=(ht?" ":"")+st)}function ri(it,st){for(var ht=it.split(" "),ut=0;ut<ht.length;ut++)ht[ut]&&!Yt(ht[ut]).test(st)&&(st+=" "+ht[ut]);return st}var Vn=function(it){it.select()};Qt?Vn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:be&&(Vn=function(it){try{it.select()}catch(st){}});function Qi(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Gn(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 Ce(it,st,ht,ut,dt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Ft=ut||0,bt=dt||0;;){var zt=it.indexOf(" ",Ft);if(zt<0||zt>=st)return bt+(st-Ft);bt+=zt-Ft,bt+=ht-bt%ht,Ft=zt+1}}var _t=function(){this.id=null,this.f=null,this.time=0,this.handler=Qi(this.onTimeout,this)};_t.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},_t.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 Bn(it,st){for(var ht=0;ht<it.length;++ht)if(it[ht]==st)return ht;return-1}var Si=50,ei={toString:function(){return"CodeMirror.Pass"}},_e={scroll:!1},Mn={origin:"*mouse"},_n={origin:"+move"};function fi(it,st,ht){for(var ut=0,dt=0;;){var Ft=it.indexOf(" ",ut);Ft==-1&&(Ft=it.length);var bt=Ft-ut;if(Ft==it.length||dt+bt>=st)return ut+Math.min(bt,st-dt);if(dt+=Ft-ut,dt+=ht-dt%ht,ut=Ft+1,dt>=st)return ut}}var Kn=[""];function Pi(it){for(;Kn.length<=it;)Kn.push(le(Kn)+" ");return Kn[it]}function le(it){return it[it.length-1]}function bn(it,st){for(var ht=[],ut=0;ut<it.length;ut++)ht[ut]=st(it[ut],ut);return ht}function ci(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 Lt(it,st){var ht;return Object.create?ht=Object.create(it):(Ht.prototype=it,ht=new Ht),st&&Gn(st,ht),ht}var Ct=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ut(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&&Ut(it)?!0:st.test(it):Ut(it)}function kt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Pe=/[\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 dn(it){return it.charCodeAt(0)>=768&&Pe.test(it)}function Xe(it,st,ht){for(;(ht<0?st>0:st<it.length)&&dn(it.charAt(st));)st+=ht;return st}function Ze(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 Qe(it,st,ht,ut){if(!it)return ut(st,ht,"ltr",0);for(var dt=!1,Ft=0;Ft<it.length;++Ft){var bt=it[Ft];(bt.from<ht&&bt.to>st||st==ht&&bt.to==st)&&(ut(Math.max(bt.from,st),Math.min(bt.to,ht),bt.level==1?"rtl":"ltr",Ft),dt=!0)}dt||ut(st,ht,"ltr")}var ln=null;function an(it,st,ht){var ut;ln=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:ln=dt),Ft.from==st&&(Ft.from!=Ft.to&&ht!="before"?ut=dt:ln=dt)}return ut!=null?ut:ln}var Sn=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]/,bt=/[Lb1n]/,zt=/[1n]/;function Rt(ee,Ie,re){this.level=ee,this.from=Ie,this.to=re}return function(ee,Ie){var re=Ie=="ltr"?"L":"R";if(ee.length==0||Ie=="ltr"&&!ut.test(ee))return!1;for(var Ve=ee.length,Ke=[],Dn=0;Dn<Ve;++Dn)Ke.push(ht(ee.charCodeAt(Dn)));for(var Yn=0,hi=re;Yn<Ve;++Yn){var Mi=Ke[Yn];Mi=="m"?Ke[Yn]=hi:hi=Mi}for(var Zi=0,zi=re;Zi<Ve;++Zi){var lr=Ke[Zi];lr=="1"&&zi=="r"?Ke[Zi]="n":Ft.test(lr)&&(zi=lr,lr=="r"&&(Ke[Zi]="R"))}for(var kr=1,Hi=Ke[0];kr<Ve-1;++kr){var qr=Ke[kr];qr=="+"&&Hi=="1"&&Ke[kr+1]=="1"?Ke[kr]="1":qr==","&&Hi==Ke[kr+1]&&(Hi=="1"||Hi=="n")&&(Ke[kr]=Hi),Hi=qr}for(var As=0;As<Ve;++As){var $s=Ke[As];if($s==",")Ke[As]="N";else if($s=="%"){var vs=void 0;for(vs=As+1;vs<Ve&&Ke[vs]=="%";++vs);for(var qa=As&&Ke[As-1]=="!"||vs<Ve&&Ke[vs]=="1"?"1":"N",Aa=As;Aa<vs;++Aa)Ke[Aa]=qa;As=vs-1}}for(var Ys=0,Ga=re;Ys<Ve;++Ys){var pa=Ke[Ys];Ga=="L"&&pa=="1"?Ke[Ys]="L":Ft.test(pa)&&(Ga=pa)}for(var Di=0;Di<Ve;++Di)if(dt.test(Ke[Di])){var mo=void 0;for(mo=Di+1;mo<Ve&&dt.test(Ke[mo]);++mo);for(var us=(Di?Ke[Di-1]:re)=="L",ts=(mo<Ve?Ke[mo]:re)=="L",ma=us==ts?us?"L":"R":re,So=Di;So<mo;++So)Ke[So]=ma;Di=mo-1}for(var _r=[],$a,ks=0;ks<Ve;)if(bt.test(Ke[ks])){var Tu=ks;for(++ks;ks<Ve&&bt.test(Ke[ks]);++ks);_r.push(new Rt(0,Tu,ks))}else{var El=ks,Fa=_r.length,tl=Ie=="rtl"?1:0;for(++ks;ks<Ve&&Ke[ks]!="L";++ks);for(var Yo=El;Yo<ks;)if(zt.test(Ke[Yo])){El<Yo&&(_r.splice(Fa,0,new Rt(1,El,Yo)),Fa+=tl);var ta=Yo;for(++Yo;Yo<ks&&zt.test(Ke[Yo]);++Yo);_r.splice(Fa,0,new Rt(2,ta,Yo)),Fa+=tl,El=Yo}else++Yo;El<ks&&_r.splice(Fa,0,new Rt(1,El,ks))}return Ie=="ltr"&&(_r[0].level==1&&($a=ee.match(/^\s+/))&&(_r[0].from=$a[0].length,_r.unshift(new Rt(0,0,$a[0].length))),le(_r).level==1&&($a=ee.match(/\s+$/))&&(le(_r).to-=$a[0].length,_r.push(new Rt(0,Ve-$a[0].length,Ve)))),Ie=="rtl"?_r.reverse():_r}}();function jn(it,st){var ht=it.order;return ht==null&&(ht=it.order=Sn(it.text,st)),ht}var Wn=[],wn=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]||Wn).concat(ht)}};function qn(it,st){return it._handlers&&it._handlers[st]||Wn}function di(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=Bn(dt,ht);Ft>-1&&(ut[st]=dt.slice(0,Ft).concat(dt.slice(Ft+1)))}}}function hr(it,st){var ht=qn(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}}),hr(it,ht||st.type,it,st),Bo(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)Bn(ht,st[ut])==-1&&ht.push(st[ut])}function pr(it,st){return qn(it,st).length>0}function er(it){it.prototype.on=function(st,ht){wn(this,st,ht)},it.prototype.off=function(st,ht){di(this,st,ht)}}function ur(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Lo(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Bo(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Ur(it){ur(it),Lo(it)}function Er(it){return it.target||it.srcElement}function lo(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 Vo=function(){if(be&&xe<9)return!1;var it=ue("div");return"draggable"in it||"dragDrop"in it}(),ko;function Eo(it){if(ko==null){var st=ue("span","\u200B");fe(it,ue("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(ko=st.offsetWidth<=1&&st.offsetHeight>2&&!(be&&xe<8))}var ht=ko?ue("span","\u200B"):ue("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ht.setAttribute("cm-text",""),ht}var jr;function Br(it){if(jr!=null)return jr;var st=fe(it,document.createTextNode("A\u062EA")),ht=Le(st,0,1).getBoundingClientRect(),ut=Le(st,1,2).getBoundingClientRect();return he(it),!ht||ht.left==ht.right?!1:jr=ut.right-ht.right<3}var Gr=`
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),bt=Ft.indexOf("\r");bt!=-1?(ht.push(Ft.slice(0,bt)),st+=bt+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},$i=function(){var it=ue("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Hr=null;function Dr(it){if(Hr!=null)return Hr;var st=fe(it,ue("span","x")),ht=st.getBoundingClientRect(),ut=Le(st,0,1).getBoundingClientRect();return Hr=Math.abs(ht.left-ut.left)>1}var oo={},Ko={};function Fs(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),oo[it]=st}function Fi(it,st){Ko[it]=st}function xi(it){if(typeof it=="string"&&Ko.hasOwnProperty(it))it=Ko[it];else if(it&&typeof it.name=="string"&&Ko.hasOwnProperty(it.name)){var st=Ko[it.name];typeof st=="string"&&(st={name:st}),it=Lt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return xi("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return xi("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Se(it,st){st=xi(st);var ht=oo[st.name];if(!ht)return Se(it,"text/plain");var ut=ht(it,st);if(we.hasOwnProperty(st.name)){var dt=we[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 bt in st.modeProps)ut[bt]=st.modeProps[bt];return ut}var we={};function de(it,st){var ht=we.hasOwnProperty(it)?we[it]:we[it]={};Gn(st,ht)}function Nn(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 Un(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 mi(it,st,ht){return it.startState?it.startState(st,ht):!0}var on=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};on.prototype.eol=function(){return this.pos>=this.string.length},on.prototype.sol=function(){return this.pos==this.lineStart},on.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},on.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},on.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},on.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},on.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},on.prototype.skipToEnd=function(){this.pos=this.string.length},on.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},on.prototype.backUp=function(it){this.pos-=it},on.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},on.prototype.indentation=function(){return Ce(this.string,null,this.tabSize)-(this.lineStart?Ce(this.string,this.lineStart,this.tabSize):0)},on.prototype.match=function(it,st,ht){if(typeof it=="string"){var ut=function(bt){return ht?bt.toLowerCase():bt},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)}},on.prototype.current=function(){return this.string.slice(this.start,this.pos)},on.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},on.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},on.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Oe(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 pe(it,st,ht){var ut=[],dt=st.line;return it.iter(st.line,ht.line+1,function(Ft){var bt=Ft.text;dt==ht.line&&(bt=bt.slice(0,ht.ch)),dt==st.line&&(bt=bt.slice(st.ch)),ut.push(bt),++dt}),ut}function ge(it,st,ht){var ut=[];return it.iter(st,ht,function(dt){ut.push(dt.text)}),ut}function cn(it,st){var ht=st-it.height;if(ht)for(var ut=it;ut;ut=ut.parent)ut.height+=ht}function Zt(it){if(it.parent==null)return null;for(var st=it.parent,ht=Bn(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 Ue(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 bt=0;bt<it.lines.length;++bt){var zt=it.lines[bt],Rt=zt.height;if(st<Rt)break;st-=Rt}return ht+bt}function fn(it,st){return st>=it.first&&st<it.first+it.size}function Rn(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function He(it,st,ht){if(ht===void 0&&(ht=null),!(this instanceof He))return new He(it,st,ht);this.line=it,this.ch=st,this.sticky=ht}function xn(it,st){return it.line-st.line||it.ch-st.ch}function Xn(it,st){return it.sticky==st.sticky&&xn(it,st)==0}function Qn(it){return He(it.line,it.ch)}function yi(it,st){return xn(it,st)<0?st:it}function ni(it,st){return xn(it,st)<0?it:st}function En(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function Jn(it,st){if(st.line<it.first)return He(it.first,0);var ht=it.first+it.size-1;return st.line>ht?He(ht,Oe(it,ht).text.length):Ki(st,Oe(it,st.line).text.length)}function Ki(it,st){var ht=it.ch;return ht==null||ht>st?He(it.line,st):ht<0?He(it.line,0):it}function qi(it,st){for(var ht=[],ut=0;ut<st.length;ut++)ht[ut]=Jn(it,st[ut]);return ht}var rr=function(it,st){this.state=it,this.lookAhead=st},Ge=function(it,st,ht,ut){this.state=st,this.doc=it,this.line=ht,this.maxLookAhead=ut||0,this.baseTokens=null,this.baseTokenPos=1};Ge.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Ge.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}},Ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ge.fromSaved=function(it,st,ht){return st instanceof rr?new Ge(it,Nn(it.mode,st.state),ht,st.lookAhead):new Ge(it,Nn(it.mode,st),ht)},Ge.prototype.save=function(it){var st=it!==!1?Nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new rr(st,this.maxLookAhead):st};function eo(it,st,ht,ut){var dt=[it.state.modeGen],Ft={};Xi(it,st.text,it.doc.mode,ht,function(ee,Ie){return dt.push(ee,Ie)},Ft,ut);for(var bt=ht.state,zt=function(ee){ht.baseTokens=dt;var Ie=it.state.overlays[ee],re=1,Ve=0;ht.state=!0,Xi(it,st.text,Ie.mode,ht,function(Ke,Dn){for(var Yn=re;Ve<Ke;){var hi=dt[re];hi>Ke&&dt.splice(re,1,Ke,dt[re+1],hi),re+=2,Ve=Math.min(Ke,hi)}if(Dn)if(Ie.opaque)dt.splice(Yn,re-Yn,Ke,"overlay "+Dn),re=Yn+2;else for(;Yn<re;Yn+=2){var Mi=dt[Yn+1];dt[Yn+1]=(Mi?Mi+" ":"")+"overlay "+Dn}},Ft),ht.state=bt,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 vr(it,st,ht){if(!st.styles||st.styles[0]!=it.state.modeGen){var ut=Or(it,Zt(st)),dt=st.text.length>it.options.maxHighlightLength&&Nn(it.doc.mode,ut.state),Ft=eo(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 Or(it,st,ht){var ut=it.doc,dt=it.display;if(!ut.mode.startState)return new Ge(ut,!0,st);var Ft=nr(it,st,ht),bt=Ft>ut.first&&Oe(ut,Ft-1).stateAfter,zt=bt?Ge.fromSaved(ut,bt,Ft):new Ge(ut,mi(ut.mode),Ft);return ut.iter(Ft,st,function(Rt){Re(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 Re(it,st,ht,ut){var dt=it.doc.mode,Ft=new on(st,it.options.tabSize,ht);for(Ft.start=Ft.pos=ut||0,st==""&&kn(dt,ht.state);!Ft.eol();)ai(dt,Ft,ht.state),Ft.start=Ft.pos}function kn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ht=Un(it,st);if(ht.mode.blankLine)return ht.mode.blankLine(ht.state)}}function ai(it,st,ht,ut){for(var dt=0;dt<10;dt++){ut&&(ut[0]=Un(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 gi=function(it,st,ht){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ht};function Bi(it,st,ht,ut){var dt=it.doc,Ft=dt.mode,bt;st=Jn(dt,st);var zt=Oe(dt,st.line),Rt=Or(it,st.line,ht),ee=new on(zt.text,it.options.tabSize,Rt),Ie;for(ut&&(Ie=[]);(ut||ee.pos<st.ch)&&!ee.eol();)ee.start=ee.pos,bt=ai(Ft,ee,Rt.state),ut&&Ie.push(new gi(ee,bt,Nn(dt.mode,Rt.state)));return ut?Ie:new gi(ee,bt,Rt.state)}function Li(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 Xi(it,st,ht,ut,dt,Ft,bt){var zt=ht.flattenSpans;zt==null&&(zt=it.options.flattenSpans);var Rt=0,ee=null,Ie=new on(st,it.options.tabSize,ut),re,Ve=it.options.addModeClass&&[null];for(st==""&&Li(kn(ht,ut.state),Ft);!Ie.eol();){if(Ie.pos>it.options.maxHighlightLength?(zt=!1,bt&&Re(it,st,ut,Ie.pos),Ie.pos=st.length,re=null):re=Li(ai(ht,Ie,ut.state,Ve),Ft),Ve){var Ke=Ve[0].name;Ke&&(re="m-"+(re?Ke+" "+re:Ke))}if(!zt||ee!=re){for(;Rt<Ie.start;)Rt=Math.min(Ie.start,Rt+5e3),dt(Rt,ee);ee=re}Ie.start=Ie.pos}for(;Rt<Ie.pos;){var Dn=Math.min(Ie.pos,Rt+5e3);dt(Dn,ee),Rt=Dn}}function nr(it,st,ht){for(var ut,dt,Ft=it.doc,bt=ht?-1:st-(it.doc.mode.innerMode?1e3:100),zt=st;zt>bt;--zt){if(zt<=Ft.first)return Ft.first;var Rt=Oe(Ft,zt-1),ee=Rt.stateAfter;if(ee&&(!ht||zt+(ee instanceof rr?ee.lookAhead:0)<=Ft.modeFrontier))return zt;var Ie=Ce(Rt.text,null,it.options.tabSize);(dt==null||ut>Ie)&&(dt=zt-1,ut=Ie)}return dt}function qt(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=Oe(it,ut).stateAfter;if(dt&&(!(dt instanceof rr)||ut+dt.lookAhead<st)){ht=ut+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ht)}}var $t=!1,Vt=!1;function Ne(){$t=!0}function Ae(){Vt=!0}function Je(it,st,ht){this.marker=it,this.from=st,this.to=ht}function yn(it,st){if(it)for(var ht=0;ht<it.length;++ht){var ut=it[ht];if(ut.marker==st)return ut}}function Fn(it,st){for(var ht,ut=0;ut<it.length;++ut)it[ut]!=st&&(ht||(ht=[])).push(it[ut]);return ht}function wi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function si(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],bt=Ft.marker,zt=Ft.from==null||(bt.inclusiveLeft?Ft.from<=st:Ft.from<st);if(zt||Ft.from==st&&bt.type=="bookmark"&&(!ht||!Ft.marker.insertLeft)){var Rt=Ft.to==null||(bt.inclusiveRight?Ft.to>=st:Ft.to>st);(ut||(ut=[])).push(new Je(bt,Ft.from,Rt?null:Ft.to))}}return ut}function Ln(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],bt=Ft.marker,zt=Ft.to==null||(bt.inclusiveRight?Ft.to>=st:Ft.to>st);if(zt||Ft.from==st&&bt.type=="bookmark"&&(!ht||Ft.marker.insertLeft)){var Rt=Ft.from==null||(bt.inclusiveLeft?Ft.from<=st:Ft.from<st);(ut||(ut=[])).push(new Je(bt,Rt?null:Ft.from-st,Ft.to==null?null:Ft.to-st))}}return ut}function Hn(it,st){if(st.full)return null;var ht=fn(it,st.from.line)&&Oe(it,st.from.line).markedSpans,ut=fn(it,st.to.line)&&Oe(it,st.to.line).markedSpans;if(!ht&&!ut)return null;var dt=st.from.ch,Ft=st.to.ch,bt=xn(st.from,st.to)==0,zt=si(ht,dt,bt),Rt=Ln(ut,Ft,bt),ee=st.text.length==1,Ie=le(st.text).length+(ee?dt:0);if(zt)for(var re=0;re<zt.length;++re){var Ve=zt[re];if(Ve.to==null){var Ke=yn(Rt,Ve.marker);Ke?ee&&(Ve.to=Ke.to==null?null:Ke.to+Ie):Ve.to=dt}}if(Rt)for(var Dn=0;Dn<Rt.length;++Dn){var Yn=Rt[Dn];if(Yn.to!=null&&(Yn.to+=Ie),Yn.from==null){var hi=yn(zt,Yn.marker);hi||(Yn.from=Ie,ee&&(zt||(zt=[])).push(Yn))}else Yn.from+=Ie,ee&&(zt||(zt=[])).push(Yn)}zt&&(zt=Wi(zt)),Rt&&Rt!=zt&&(Rt=Wi(Rt));var Mi=[zt];if(!ee){var Zi=st.text.length-2,zi;if(Zi>0&&zt)for(var lr=0;lr<zt.length;++lr)zt[lr].to==null&&(zi||(zi=[])).push(new Je(zt[lr].marker,null,null));for(var kr=0;kr<Zi;++kr)Mi.push(zi);Mi.push(Rt)}return Mi}function Wi(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 Ri(it,st,ht){var ut=null;if(it.iter(st.line,ht.line+1,function(Ke){if(Ke.markedSpans)for(var Dn=0;Dn<Ke.markedSpans.length;++Dn){var Yn=Ke.markedSpans[Dn].marker;Yn.readOnly&&(!ut||Bn(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 bt=ut[Ft],zt=bt.find(0),Rt=0;Rt<dt.length;++Rt){var ee=dt[Rt];if(!(xn(ee.to,zt.from)<0||xn(ee.from,zt.to)>0)){var Ie=[Rt,1],re=xn(ee.from,zt.from),Ve=xn(ee.to,zt.to);(re<0||!bt.inclusiveLeft&&!re)&&Ie.push({from:ee.from,to:zt.from}),(Ve>0||!bt.inclusiveRight&&!Ve)&&Ie.push({from:zt.to,to:ee.to}),dt.splice.apply(dt,Ie),Rt+=Ie.length-3}}return dt}function Tn(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 Yi(it){return it.inclusiveLeft?-1:0}function ki(it){return it.inclusiveRight?1:0}function Ui(it,st){var ht=it.lines.length-st.lines.length;if(ht!=0)return ht;var ut=it.find(),dt=st.find(),Ft=xn(ut.from,dt.from)||Yi(it)-Yi(st);if(Ft)return-Ft;var bt=xn(ut.to,dt.to)||ki(it)-ki(st);return bt||st.id-it.id}function ji(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||Ui(ut,dt.marker)<0)&&(ut=dt.marker);return ut}function Gi(it){return ji(it,!0)}function Zn(it){return ji(it,!1)}function li(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||Ui(ut,Ft.marker)<0)&&(ut=Ft.marker)}return ut}function Ei(it,st,ht,ut,dt){var Ft=Oe(it,st),bt=Vt&&Ft.markedSpans;if(bt)for(var zt=0;zt<bt.length;++zt){var Rt=bt[zt];if(Rt.marker.collapsed){var ee=Rt.marker.find(0),Ie=xn(ee.from,ht)||Yi(Rt.marker)-Yi(dt),re=xn(ee.to,ut)||ki(Rt.marker)-ki(dt);if(!(Ie>=0&&re<=0||Ie<=0&&re>=0)&&(Ie<=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?xn(ee.to,ht)>=0:xn(ee.to,ht)>0)||Ie>=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?xn(ee.from,ut)<=0:xn(ee.from,ut)<0)))return!0}}}function oi(it){for(var st;st=Gi(it);)it=st.find(-1,!0).line;return it}function Ai(it){for(var st;st=Zn(it);)it=st.find(1,!0).line;return it}function Cr(it){for(var st,ht;st=Zn(it);)it=st.find(1,!0).line,(ht||(ht=[])).push(it);return ht}function $n(it,st){var ht=Oe(it,st),ut=oi(ht);return ht==ut?st:Zt(ut)}function pi(it,st){if(st>it.lastLine())return st;var ht=Oe(it,st),ut;if(!rn(it,ht))return st;for(;ut=Zn(ht);)ht=ut.find(1,!0).line;return Zt(ht)+1}function rn(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&&ui(it,st,ut))return!0}}}function ui(it,st,ht){if(ht.to==null){var ut=ht.marker.find(1,!0);return ui(it,ut.line,yn(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)&&ui(it,st,dt))return!0}function or(it){it=oi(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 bt=0;bt<Ft.children.length;++bt){var zt=Ft.children[bt];if(zt==ht)break;st+=zt.height}return st}function Mr(it){if(it.height==0)return 0;for(var st=it.text.length,ht,ut=it;ht=Gi(ut);){var dt=ht.find(0,!0);ut=dt.from.line,st+=dt.from.ch-dt.to.ch}for(ut=it;ht=Zn(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 wr(it){var st=it.display,ht=it.doc;st.maxLine=Oe(ht,ht.first),st.maxLineLength=Mr(st.maxLine),st.maxLineChanged=!0,ht.iter(function(ut){var dt=Mr(ut);dt>st.maxLineLength&&(st.maxLineLength=dt,st.maxLine=ut)})}var Pr=function(it,st,ht){this.text=it,Ot(this,st),this.height=ht?ht(this):1};Pr.prototype.lineNo=function(){return Zt(this)},er(Pr);function Nr(it,st,ht,ut){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Tn(it),Ot(it,ht);var dt=ut?ut(it):1;dt!=it.height&&cn(it,dt)}function Xr(it){it.parent=null,Tn(it)}var To={},Co={};function Oo(it,st){if(!it||/^\s*$/.test(it))return null;var ht=st.addModeClass?Co:To;return ht[it]||(ht[it]=it.replace(/\S+/g,"cm-$&"))}function ke(it,st){var ht=Ye("span",null,null,ye?"padding-right: .1px":null),ut={pre:Ye("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,bt=void 0;ut.pos=0,ut.addToken=Js,Br(it.display.measure)&&(bt=jn(Ft,it.doc.direction))&&(ut.addToken=xa(ut.addToken,bt)),ut.map=[];var zt=st!=it.display.externalMeasured&&Zt(Ft);Nl(Ft,ut,vr(it,Ft,zt)),Ft.styleClasses&&(Ft.styleClasses.bgClass&&(ut.bgClass=ri(Ft.styleClasses.bgClass,ut.bgClass||"")),Ft.styleClasses.textClass&&(ut.textClass=ri(Ft.styleClasses.textClass,ut.textClass||""))),ut.map.length==0&&ut.map.push(0,0,ut.content.appendChild(Eo(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(ye){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 hr(it,"renderLine",it,st.line,ut.pre),ut.pre.className&&(ut.textClass=ri(ut.pre.className,ut.textClass||"")),ut}function Rr(it){var st=ue("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Js(it,st,ht,ut,dt,Ft,bt){if(st){var zt=it.splitSpaces?fs(st,it.trailingSpace):st,Rt=it.cm.state.specialChars,ee=!1,Ie;if(!Rt.test(st))it.col+=st.length,Ie=document.createTextNode(zt),it.map.push(it.pos,it.pos+st.length,Ie),be&&xe<9&&(ee=!0),it.pos+=st.length;else{Ie=document.createDocumentFragment();for(var re=0;;){Rt.lastIndex=re;var Ve=Rt.exec(st),Ke=Ve?Ve.index-re:st.length-re;if(Ke){var Dn=document.createTextNode(zt.slice(re,re+Ke));be&&xe<9?Ie.appendChild(ue("span",[Dn])):Ie.appendChild(Dn),it.map.push(it.pos,it.pos+Ke,Dn),it.col+=Ke,it.pos+=Ke}if(!Ve)break;re+=Ke+1;var Yn=void 0;if(Ve[0]==" "){var hi=it.cm.options.tabSize,Mi=hi-it.col%hi;Yn=Ie.appendChild(ue("span",Pi(Mi),"cm-tab")),Yn.setAttribute("role","presentation"),Yn.setAttribute("cm-text"," "),it.col+=Mi}else Ve[0]=="\r"||Ve[0]==`
`?(Yn=Ie.appendChild(ue("span",Ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Yn.setAttribute("cm-text",Ve[0]),it.col+=1):(Yn=it.cm.options.specialCharPlaceholder(Ve[0]),Yn.setAttribute("cm-text",Ve[0]),be&&xe<9?Ie.appendChild(ue("span",[Yn])):Ie.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||bt){var Zi=ht||"";ut&&(Zi+=ut),dt&&(Zi+=dt);var zi=ue("span",[Ie],Zi,Ft);if(bt)for(var lr in bt)bt.hasOwnProperty(lr)&&lr!="style"&&lr!="class"&&zi.setAttribute(lr,bt[lr]);return it.content.appendChild(zi)}it.content.appendChild(Ie)}}function fs(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 xa(it,st){return function(ht,ut,dt,Ft,bt,zt,Rt){dt=dt?dt+" cm-force-border":"cm-force-border";for(var ee=ht.pos,Ie=ee+ut.length;;){for(var re=void 0,Ve=0;Ve<st.length&&(re=st[Ve],!(re.to>ee&&re.from<=ee));Ve++);if(re.to>=Ie)return it(ht,ut,dt,Ft,bt,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 io(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 Nl(it,st,ht){var ut=it.markedSpans,dt=it.text,Ft=0;if(!ut){for(var bt=1;bt<ht.length;bt+=2)st.addToken(st,dt.slice(Ft,Ft=ht[bt]),Oo(ht[bt+1],st.cm.options));return}for(var zt=dt.length,Rt=0,ee=1,Ie="",re,Ve,Ke=0,Dn,Yn,hi,Mi,Zi;;){if(Ke==Rt){Dn=Yn=hi=Ve="",Zi=null,Mi=null,Ke=1/0;for(var zi=[],lr=void 0,kr=0;kr<ut.length;++kr){var Hi=ut[kr],qr=Hi.marker;if(qr.type=="bookmark"&&Hi.from==Rt&&qr.widgetNode)zi.push(qr);else if(Hi.from<=Rt&&(Hi.to==null||Hi.to>Rt||qr.collapsed&&Hi.to==Rt&&Hi.from==Rt)){if(Hi.to!=null&&Hi.to!=Rt&&Ke>Hi.to&&(Ke=Hi.to,Yn=""),qr.className&&(Dn+=" "+qr.className),qr.css&&(Ve=(Ve?Ve+";":"")+qr.css),qr.startStyle&&Hi.from==Rt&&(hi+=" "+qr.startStyle),qr.endStyle&&Hi.to==Ke&&(lr||(lr=[])).push(qr.endStyle,Hi.to),qr.title&&((Zi||(Zi={})).title=qr.title),qr.attributes)for(var As in qr.attributes)(Zi||(Zi={}))[As]=qr.attributes[As];qr.collapsed&&(!Mi||Ui(Mi.marker,qr)<0)&&(Mi=Hi)}else Hi.from>Rt&&Ke>Hi.from&&(Ke=Hi.from)}if(lr)for(var $s=0;$s<lr.length;$s+=2)lr[$s+1]==Ke&&(Yn+=" "+lr[$s]);if(!Mi||Mi.from==Rt)for(var vs=0;vs<zi.length;++vs)io(st,0,zi[vs]);if(Mi&&(Mi.from||0)==Rt){if(io(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,Ke);;){if(Ie){var Aa=Rt+Ie.length;if(!Mi){var Ys=Aa>qa?Ie.slice(0,qa-Rt):Ie;st.addToken(st,Ys,re?re+Dn:Dn,hi,Rt+Ys.length==Ke?Yn:"",Ve,Zi)}if(Aa>=qa){Ie=Ie.slice(qa-Rt),Rt=qa;break}Rt=Aa,hi=""}Ie=dt.slice(Ft,Ft=ht[ee++]),re=Oo(ht[ee++],st.cm.options)}}}function Wa(it,st,ht){this.line=st,this.rest=Cr(st),this.size=this.rest?Zt(le(this.rest))-ht+1:1,this.node=this.text=null,this.hidden=rn(it,st)}function Ao(it,st,ht){for(var ut=[],dt,Ft=st;Ft<ht;Ft=dt){var bt=new Wa(it.doc,Oe(it.doc,Ft),Ft);dt=Ft+bt.size,ut.push(bt)}return ut}var _o=null;function al(it){_o?_o.ops.push(it):it.ownsGroup=_o={ops:[it],delayedCallbacks:[]}}function na(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 Ql(it,st){var ht=it.ownsGroup;if(ht)try{na(ht)}finally{_o=null,st(ht)}}var ha=null;function Vi(it,st){var ht=qn(it,st);if(ht.length){var ut=Array.prototype.slice.call(arguments,2),dt;_o?dt=_o.delayedCallbacks:ha?dt=ha:(dt=ha=[],setTimeout(js,0));for(var Ft=function(zt){dt.push(function(){return ht[zt].apply(null,ut)})},bt=0;bt<ht.length;++bt)Ft(bt)}}function js(){var it=ha;ha=null;for(var st=0;st<it.length;++st)it[st]()}function lu(it,st,ht,ut){for(var dt=0;dt<st.changes.length;dt++){var Ft=st.changes[dt];Ft=="text"?mn(it,st):Ft=="gutter"?Ir(it,st,ht,ut):Ft=="class"?ar(it,st):Ft=="widget"&&Mo(it,st,ut)}st.changes=null}function Ua(it){return it.node==it.text&&(it.node=ue("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),be&&xe<8&&(it.node.style.zIndex=2)),it.node}function Qr(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=Ua(st);st.background=ut.insertBefore(ue("div",null,ht),ut.firstChild),it.display.input.setUneditable(st.background)}}function $r(it,st){var ht=it.display.externalMeasured;return ht&&ht.line==st.line?(it.display.externalMeasured=null,st.measure=ht.measure,ht.built):ke(it,st)}function mn(it,st){var ht=st.text.className,ut=$r(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,ar(it,st)):ht&&(st.text.className=ht)}function ar(it,st){Qr(it,st),st.line.wrapClass?Ua(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 Ir(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=Ua(st);st.gutterBackground=ue("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 bt=Ua(st),zt=st.gutter=ue("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px");if(it.display.input.setUneditable(zt),bt.insertBefore(zt,st.text),st.line.gutterClass&&(zt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Ft||!Ft["CodeMirror-linenumbers"])&&(st.lineNumber=zt.appendChild(ue("div",Rn(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,Ie=Ft.hasOwnProperty(ee)&&Ft[ee];Ie&&zt.appendChild(ue("div",[Ie],"CodeMirror-gutter-elt","left: "+ut.gutterLeft[ee]+"px; width: "+ut.gutterWidth[ee]+"px"))}}}function Mo(it,st,ht){st.alignable&&(st.alignable=null);for(var ut=Yt("CodeMirror-linewidget"),dt=st.node.firstChild,Ft=void 0;dt;dt=Ft)Ft=dt.nextSibling,ut.test(dt.className)&&st.node.removeChild(dt);qs(it,st,ht)}function Da(it,st,ht,ut){var dt=$r(it,st);return st.text=st.node=dt.pre,dt.bgClass&&(st.bgClass=dt.bgClass),dt.textClass&&(st.textClass=dt.textClass),ar(it,st),Ir(it,st,ht,ut),qs(it,st,ut),st.node}function qs(it,st,ht){if(sr(it,st.line,st,ht,!0),st.rest)for(var ut=0;ut<st.rest.length;ut++)sr(it,st.rest[ut],st,ht,!1)}function sr(it,st,ht,ut,dt){if(st.widgets)for(var Ft=Ua(ht),bt=0,zt=st.widgets;bt<zt.length;++bt){var Rt=zt[bt],ee=ue("div",[Rt.node],"CodeMirror-linewidget"+(Rt.className?" "+Rt.className:""));Rt.handleMouseEvents||ee.setAttribute("cm-ignore-events","true"),Vr(Rt,ee,ht,ut),it.display.input.setUneditable(ee),dt&&Rt.above?Ft.insertBefore(ee,ht.gutter||ht.text):Ft.appendChild(ee),Vi(Rt,"redraw")}}function Vr(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 ca(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!sn(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,ue("div",[it.node],null,ht))}return it.height=it.node.parentNode.offsetHeight}function Ls(it,st){for(var ht=Er(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 ia(it){return it.lineSpace.offsetTop}function Ya(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function Vs(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=fe(it.measure,ue("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 Es(it){return Si-it.display.nativeBarWidth}function Hs(it){return it.display.scroller.clientWidth-Es(it)-it.display.barWidth}function Ss(it){return it.display.scroller.clientHeight-Es(it)-it.display.barHeight}function Lh(it,st,ht){var ut=it.options.lineWrapping,dt=ut&&Hs(it);if(!st.measure.heights||ut&&st.measure.width!=dt){var Ft=st.measure.heights=[];if(ut){st.measure.width=dt;for(var bt=st.text.firstChild.getClientRects(),zt=0;zt<bt.length-1;zt++){var Rt=bt[zt],ee=bt[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 ms(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(Zt(it.rest[dt])>ht)return{map:it.measure.maps[dt],cache:it.measure.caches[dt],before:!0}}function Yu(it,st){st=oi(st);var ht=Zt(st),ut=it.display.externalMeasured=new Wa(it.doc,st,ht);ut.lineN=ht;var dt=ut.built=ke(it,ut);return ut.text=dt.pre,fe(it.display.lineMeasure,dt.pre),ut}function Ul(it,st,ht,ut){return ll(it,No(it,st),ht,ut)}function tA(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[ul(it,st)];var ht=it.display.externalMeasured;if(ht&&st>=ht.lineN&&st<ht.lineN+ht.size)return ht}function No(it,st){var ht=Zt(st),ut=tA(it,ht);ut&&!ut.text?ut=null:ut&&ut.changes&&(lu(it,ut,ht,mf(it)),it.curOp.forceUpdate=!0),ut||(ut=Yu(it,st));var dt=ms(ut,st,ht);return{line:st,view:ut,rect:null,map:dt.map,cache:dt.cache,before:dt.before,hasHeights:!1}}function ll(it,st,ht,ut,dt){st.before&&(ht=-1);var Ft=ht+(ut||""),bt;return st.cache.hasOwnProperty(Ft)?bt=st.cache[Ft]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Lh(it,st.view,st.rect),st.hasHeights=!0),bt=es(it,st,ht,ut),bt.bogus||(st.cache[Ft]=bt)),{left:bt.left,right:bt.right,top:dt?bt.rtop:bt.top,bottom:dt?bt.rbottom:bt.bottom}}var Au={left:0,right:0,top:0,bottom:0};function Xu(it,st,ht){for(var ut,dt,Ft,bt,zt,Rt,ee=0;ee<it.length;ee+=3)if(zt=it[ee],Rt=it[ee+1],st<zt?(dt=0,Ft=1,bt="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&&(bt="right")),dt!=null){if(ut=it[ee+2],zt==Rt&&ht==(ut.insertLeft?"left":"right")&&(bt=ht),ht=="left"&&dt==0)for(;ee&&it[ee-2]==it[ee-3]&&it[ee-1].insertLeft;)ut=it[(ee-=3)+2],bt="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],bt="right";break}return{node:ut,start:dt,end:Ft,collapse:bt,coverStart:zt,coverEnd:Rt}}function Zu(it,st){var ht=Au;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 es(it,st,ht,ut){var dt=Xu(st.map,ht,ut),Ft=dt.node,bt=dt.start,zt=dt.end,Rt=dt.collapse,ee;if(Ft.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;bt&&dn(st.line.text.charAt(dt.coverStart+bt));)--bt;for(;dt.coverStart+zt<dt.coverEnd&&dn(st.line.text.charAt(dt.coverStart+zt));)++zt;if(be&&xe<9&&bt==0&&zt==dt.coverEnd-dt.coverStart?ee=Ft.parentNode.getBoundingClientRect():ee=Zu(Le(Ft,bt,zt).getClientRects(),ut),ee.left||ee.right||bt==0)break;zt=bt,bt=bt-1,Rt="right"}be&&xe<11&&(ee=Fc(it.display.measure,ee))}else{bt>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(be&&xe<9&&!bt&&(!ee||!ee.left&&!ee.right)){var Ve=Ft.parentNode.getClientRects()[0];Ve?ee={left:Ve.left,right:Ve.left+$u(it.display),top:Ve.top,bottom:Ve.bottom}:ee=Au}for(var Ke=ee.top-st.rect.top,Dn=ee.bottom-st.rect.top,Yn=(Ke+Dn)/2,hi=st.view.measure.heights,Mi=0;Mi<hi.length-1&&!(Yn<hi[Mi]);Mi++);var Zi=Mi?hi[Mi-1]:0,zi=hi[Mi],lr={left:(Rt=="right"?ee.right:ee.left)-st.rect.left,right:(Rt=="left"?ee.left:ee.right)-st.rect.left,top:Zi,bottom:zi};return!ee.left&&!ee.right&&(lr.bogus=!0),it.options.singleCursorHeightPerLine||(lr.rtop=Ke,lr.rbottom=Dn),lr}function Fc(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Dr(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 Ju(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 Ba(it){it.display.externalMeasure=null,he(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)Ju(it.display.view[st])}function Al(it){Ba(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function xs(){return Me&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Io(){return Me&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qo(it){var st=0;if(it.widgets)for(var ht=0;ht<it.widgets.length;++ht)it.widgets[ht].above&&(st+=ca(it.widgets[ht]));return st}function bs(it,st,ht,ut,dt){if(!dt){var Ft=qo(st);ht.top+=Ft,ht.bottom+=Ft}if(ut=="line")return ht;ut||(ut="local");var bt=or(st);if(ut=="local"?bt+=ia(it.display):bt-=it.display.viewOffset,ut=="page"||ut=="window"){var zt=it.display.lineSpace.getBoundingClientRect();bt+=zt.top+(ut=="window"?0:Io());var Rt=zt.left+(ut=="window"?0:xs());ht.left+=Rt,ht.right+=Rt}return ht.top+=bt,ht.bottom+=bt,ht}function Po(it,st,ht){if(ht=="div")return st;var ut=st.left,dt=st.top;if(ht=="page")ut-=xs(),dt-=Io();else if(ht=="local"||!ht){var Ft=it.display.sizer.getBoundingClientRect();ut+=Ft.left,dt+=Ft.top}var bt=it.display.lineSpace.getBoundingClientRect();return{left:ut-bt.left,top:dt-bt.top}}function Zr(it,st,ht,ut,dt){return ut||(ut=Oe(it.doc,st.line)),bs(it,ut,Ul(it,ut,st.ch,dt),ht)}function fo(it,st,ht,ut,dt,Ft){ut=ut||Oe(it.doc,st.line),dt||(dt=No(it,ut));function bt(Dn,Yn){var hi=ll(it,dt,Dn,Yn?"right":"left",Ft);return Yn?hi.left=hi.right:hi.right=hi.left,bs(it,ut,hi,ht)}var zt=jn(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 bt(ee=="before"?Rt-1:Rt,ee=="before");function Ie(Dn,Yn,hi){var Mi=zt[Yn],Zi=Mi.level==1;return bt(hi?Dn-1:Dn,Zi!=hi)}var re=an(zt,Rt,ee),Ve=ln,Ke=Ie(Rt,re,ee=="before");return Ve!=null&&(Ke.other=Ie(Rt,Ve,ee!="before")),Ke}function fa(it,st){var ht=0;st=Jn(it.doc,st),it.options.lineWrapping||(ht=$u(it.display)*st.ch);var ut=Oe(it.doc,st.line),dt=or(ut)+ia(it.display);return{left:ht,right:ht,top:dt,bottom:dt+ut.height}}function ds(it,st,ht,ut,dt){var Ft=He(it,st,ht);return Ft.xRel=dt,ut&&(Ft.outside=ut),Ft}function os(it,st,ht){var ut=it.doc;if(ht+=it.display.viewOffset,ht<0)return ds(ut.first,0,null,-1,-1);var dt=Ue(ut,ht),Ft=ut.first+ut.size-1;if(dt>Ft)return ds(ut.first+ut.size-1,Oe(ut,Ft).text.length,null,1,1);st<0&&(st=0);for(var bt=Oe(ut,dt);;){var zt=en(it,bt,dt,st,ht),Rt=li(bt,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;bt=Oe(ut,dt=ee.line)}}function Ii(it,st,ht,ut){ut-=qo(st);var dt=st.text.length,Ft=Ze(function(bt){return ll(it,ht,bt-1).bottom<=ut},dt,0);return dt=Ze(function(bt){return ll(it,ht,bt).top>ut},Ft,dt),{begin:Ft,end:dt}}function Bl(it,st,ht,ut){ht||(ht=No(it,st));var dt=bs(it,st,ll(it,ht,ut),"line").top;return Ii(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 en(it,st,ht,ut,dt){dt-=or(st);var Ft=No(it,st),bt=qo(st),zt=0,Rt=st.text.length,ee=!0,Ie=jn(st,it.doc.direction);if(Ie){var re=(it.options.lineWrapping?qu:BA)(it,st,ht,Ft,Ie,ut,dt);ee=re.level!=1,zt=ee?re.from:re.to-1,Rt=ee?re.to:re.from-1}var Ve=null,Ke=null,Dn=Ze(function(kr){var Hi=ll(it,Ft,kr);return Hi.top+=bt,Hi.bottom+=bt,oe(Hi,ut,dt,!1)?(Hi.top<=dt&&Hi.left<=ut&&(Ve=kr,Ke=Hi),!0):!1},zt,Rt),Yn,hi,Mi=!1;if(Ke){var Zi=ut-Ke.left<Ke.right-ut,zi=Zi==ee;Dn=Ve+(zi?0:1),hi=zi?"after":"before",Yn=Zi?Ke.left:Ke.right}else{!ee&&(Dn==Rt||Dn==zt)&&Dn++,hi=Dn==0?"after":Dn==st.text.length?"before":ll(it,Ft,Dn-(ee?1:0)).bottom+bt<=dt==ee?"after":"before";var lr=fo(it,He(ht,Dn,hi),"line",st,Ft);Yn=lr.left,Mi=dt<lr.top?-1:dt>=lr.bottom?1:0}return Dn=Xe(st.text,Dn,1),ds(ht,Dn,hi,Mi,ut-Yn)}function BA(it,st,ht,ut,dt,Ft,bt){var zt=Ze(function(re){var Ve=dt[re],Ke=Ve.level!=1;return oe(fo(it,He(ht,Ke?Ve.to:Ve.from,Ke?"before":"after"),"line",st,ut),Ft,bt,!0)},0,dt.length-1),Rt=dt[zt];if(zt>0){var ee=Rt.level!=1,Ie=fo(it,He(ht,ee?Rt.from:Rt.to,ee?"after":"before"),"line",st,ut);oe(Ie,Ft,bt,!0)&&Ie.top>bt&&(Rt=dt[zt-1])}return Rt}function qu(it,st,ht,ut,dt,Ft,bt){var zt=Ii(it,st,ut,bt),Rt=zt.begin,ee=zt.end;/\s/.test(st.text.charAt(ee-1))&&ee--;for(var Ie=null,re=null,Ve=0;Ve<dt.length;Ve++){var Ke=dt[Ve];if(!(Ke.from>=ee||Ke.to<=Rt)){var Dn=Ke.level!=1,Yn=ll(it,ut,Dn?Math.min(ee,Ke.to)-1:Math.max(Rt,Ke.from)).right,hi=Yn<Ft?Ft-Yn+1e9:Yn-Ft;(!Ie||re>hi)&&(Ie=Ke,re=hi)}}return Ie||(Ie=dt[dt.length-1]),Ie.from<Rt&&(Ie={from:Rt,to:Ie.to,level:Ie.level}),Ie.to>ee&&(Ie={from:Ie.from,to:ee,level:Ie.level}),Ie}var Ts;function CA(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Ts==null){Ts=ue("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Ts.appendChild(document.createTextNode("x")),Ts.appendChild(ue("br"));Ts.appendChild(document.createTextNode("x"))}fe(it.measure,Ts);var ht=Ts.offsetHeight/50;return ht>3&&(it.cachedTextHeight=ht),he(it.measure),ht||1}function $u(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=ue("span","xxxxxxxxxx"),ht=ue("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 mf(it){for(var st=it.display,ht={},ut={},dt=st.gutters.clientLeft,Ft=st.gutters.firstChild,bt=0;Ft;Ft=Ft.nextSibling,++bt){var zt=it.display.gutterSpecs[bt].className;ht[zt]=Ft.offsetLeft+Ft.clientLeft+dt,ut[zt]=Ft.clientWidth}return{fixedPos:uu(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ht,gutterWidth:ut,wrapperWidth:st.wrapper.clientWidth}}function uu(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function ss(it){var st=CA(it.display),ht=it.options.lineWrapping,ut=ht&&Math.max(5,it.display.scroller.clientWidth/$u(it.display)-3);return function(dt){if(rn(it.doc,dt))return 0;var Ft=0;if(dt.widgets)for(var bt=0;bt<dt.widgets.length;bt++)dt.widgets[bt].height&&(Ft+=dt.widgets[bt].height);return ht?Ft+(Math.ceil(dt.text.length/ut)||1)*st:Ft+st}}function gr(it){var st=it.doc,ht=ss(it);st.iter(function(ut){var dt=ht(ut);dt!=ut.height&&cn(ut,dt)})}function Ca(it,st,ht,ut){var dt=it.display;if(!ht&&Er(st).getAttribute("cm-not-content")=="true")return null;var Ft,bt,zt=dt.lineSpace.getBoundingClientRect();try{Ft=st.clientX-zt.left,bt=st.clientY-zt.top}catch(re){return null}var Rt=os(it,Ft,bt),ee;if(ut&&Rt.xRel>0&&(ee=Oe(it.doc,Rt.line).text).length==Rt.ch){var Ie=Ce(ee,ee.length,it.options.tabSize)-ee.length;Rt=He(Rt.line,Math.max(0,Math.round((Ft-Vs(it.display).left)/$u(it.display))-Ie))}return Rt}function ul(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 ns(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&&$n(it.doc,st)<dt.viewTo&&Ms(it);else if(ht<=dt.viewFrom)Vt&&pi(it.doc,ht+ut)>dt.viewFrom?Ms(it):(dt.viewFrom+=ut,dt.viewTo+=ut);else if(st<=dt.viewFrom&&ht>=dt.viewTo)Ms(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):Ms(it)}else if(ht>=dt.viewTo){var bt=Oa(it,st,st,-1);bt?(dt.view=dt.view.slice(0,bt.index),dt.viewTo=bt.lineN):Ms(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(Ao(it,zt.lineN,Rt.lineN)).concat(dt.view.slice(Rt.index)),dt.viewTo+=ut):Ms(it)}var ee=dt.externalMeasured;ee&&(ht<ee.lineN?ee.lineN+=ut:st<ee.lineN+ee.size&&(dt.externalMeasured=null))}function zr(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[ul(it,st)];if(Ft.node!=null){var bt=Ft.changes||(Ft.changes=[]);Bn(bt,ht)==-1&&bt.push(ht)}}}function Ms(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=ul(it,st),Ft,bt=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+=bt[Rt].size;if(zt!=st){if(ut>0){if(dt==bt.length-1)return null;Ft=zt+bt[dt].size-st,dt++}else Ft=zt-st;st+=Ft,ht+=Ft}for(;$n(it.doc,ht)!=ht;){if(dt==(ut<0?0:bt.length-1))return null;ht+=ut*bt[dt-(ut<0?1:0)].size,dt+=ut}return{index:dt,lineN:ht}}function Ho(it,st,ht){var ut=it.display,dt=ut.view;dt.length==0||st>=ut.viewTo||ht<=ut.viewFrom?(ut.view=Ao(it,st,ht),ut.viewFrom=st):(ut.viewFrom>st?ut.view=Ao(it,st,ut.viewFrom).concat(ut.view):ut.viewFrom<st&&(ut.view=ut.view.slice(ul(it,st))),ut.viewFrom=st,ut.viewTo<ht?ut.view=ut.view.concat(Ao(it,ut.viewTo,ht)):ut.viewTo>ht&&(ut.view=ut.view.slice(0,ul(it,ht)))),ut.viewTo=ht}function hl(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 hu(it,st){st===void 0&&(st=!0);for(var ht=it.doc,ut={},dt=ut.cursors=document.createDocumentFragment(),Ft=ut.selection=document.createDocumentFragment(),bt=0;bt<ht.sel.ranges.length;bt++)if(!(!st&&bt==ht.sel.primIndex)){var zt=ht.sel.ranges[bt];if(!(zt.from().line>=it.display.viewTo||zt.to().line<it.display.viewFrom)){var Rt=zt.empty();(Rt||it.options.showCursorWhenSelecting)&&po(it,zt.head,dt),Rt||uo(it,zt,Ft)}}return ut}function po(it,st,ht){var ut=fo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),dt=ht.appendChild(ue("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(ue("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 uo(it,st,ht){var ut=it.display,dt=it.doc,Ft=document.createDocumentFragment(),bt=Vs(it.display),zt=bt.left,Rt=Math.max(ut.sizerWidth,Hs(it)-ut.sizer.offsetLeft)-bt.right,ee=dt.direction=="ltr";function Ie(zi,lr,kr,Hi){lr<0&&(lr=0),lr=Math.round(lr),Hi=Math.round(Hi),Ft.appendChild(ue("div",null,"CodeMirror-selected","position: absolute; left: "+zi+`px;
top: `+lr+"px; width: "+(kr==null?Rt-zi:kr)+`px;
height: `+(Hi-lr)+"px"))}function re(zi,lr,kr){var Hi=Oe(dt,zi),qr=Hi.text.length,As,$s;function vs(Ys,Ga){return Zr(it,He(zi,Ys),"div",Hi,Ga)}function qa(Ys,Ga,pa){var Di=Bl(it,Hi,null,Ys),mo=Ga=="ltr"==(pa=="after")?"left":"right",us=pa=="after"?Di.begin:Di.end-(/\s/.test(Hi.text.charAt(Di.end-1))?2:1);return vs(us,mo)[mo]}var Aa=jn(Hi,dt.direction);return Qe(Aa,lr||0,kr==null?qr:kr,function(Ys,Ga,pa,Di){var mo=pa=="ltr",us=vs(Ys,mo?"left":"right"),ts=vs(Ga-1,mo?"right":"left"),ma=lr==null&&Ys==0,So=kr==null&&Ga==qr,_r=Di==0,$a=!Aa||Di==Aa.length-1;if(ts.top-us.top<=3){var ks=(ee?ma:So)&&_r,Tu=(ee?So:ma)&&$a,El=ks?zt:(mo?us:ts).left,Fa=Tu?Rt:(mo?ts:us).right;Ie(El,us.top,Fa-El,us.bottom)}else{var tl,Yo,ta,bA;mo?(tl=ee&&ma&&_r?zt:us.left,Yo=ee?Rt:qa(Ys,pa,"before"),ta=ee?zt:qa(Ga,pa,"after"),bA=ee&&So&&$a?Rt:ts.right):(tl=ee?qa(Ys,pa,"before"):zt,Yo=!ee&&ma&&_r?Rt:us.right,ta=!ee&&So&&$a?zt:ts.left,bA=ee?qa(Ga,pa,"after"):Rt),Ie(tl,us.top,Yo-tl,us.bottom),us.bottom<ts.top&&Ie(zt,us.bottom,null,ts.top),Ie(ta,ts.top,bA-ta,ts.bottom)}(!As||da(us,As)<0)&&(As=us),da(ts,As)<0&&(As=ts),(!$s||da(us,$s)<0)&&($s=us),da(ts,$s)<0&&($s=ts)}),{start:As,end:$s}}var Ve=st.from(),Ke=st.to();if(Ve.line==Ke.line)re(Ve.line,Ve.ch,Ke.ch);else{var Dn=Oe(dt,Ve.line),Yn=Oe(dt,Ke.line),hi=oi(Dn)==oi(Yn),Mi=re(Ve.line,Ve.ch,hi?Dn.text.length+1:null).end,Zi=re(Ke.line,hi?0:null,Ke.ch).start;hi&&(Mi.top<Zi.top-2?(Ie(Mi.right,Mi.top,null,Mi.bottom),Ie(zt,Zi.top,Zi.left,Zi.bottom)):Ie(Mi.right,Mi.top,Zi.left-Mi.right,Mi.bottom)),Mi.bottom<Zi.top&&Ie(zt,Mi.bottom,null,Zi.top)}ht.appendChild(Ft)}function Qo(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()||th(it),st.cursorDiv.style.visibility=(ht=!ht)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function $o(it){it.state.focused||(it.display.input.focus(),vo(it))}function gs(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,th(it))},100)}function vo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(hr(it,"focus",it,st),it.state.focused=!0,On(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ye&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Qo(it))}function th(it,st){it.state.delayingBlurEvent||(it.state.focused&&(hr(it,"blur",it,st),it.state.focused=!1,Xt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function cr(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,bt=void 0,zt=0;if(!dt.hidden){if(be&&xe<8){var Rt=dt.node.offsetTop+dt.node.offsetHeight;bt=Rt-ht,ht=Rt}else{var ee=dt.node.getBoundingClientRect();bt=ee.bottom-ee.top,!Ft&&dt.text.firstChild&&(zt=dt.text.firstChild.getBoundingClientRect().right-ee.left-1)}var Ie=dt.line.height-bt;if((Ie>.005||Ie<-.005)&&(cn(dt.line,bt),eh(dt.line),dt.rest))for(var re=0;re<dt.rest.length;re++)eh(dt.rest[re]);if(zt>it.display.sizerWidth){var Ve=Math.ceil(zt/$u(it.display));Ve>it.display.maxLineLength&&(it.display.maxLineLength=Ve,it.display.maxLine=dt.line,it.display.maxLineChanged=!0)}}}}function eh(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 so(it,st,ht){var ut=ht&&ht.top!=null?Math.max(0,ht.top):it.scroller.scrollTop;ut=Math.floor(ut-ia(it));var dt=ht&&ht.bottom!=null?ht.bottom:ut+it.wrapper.clientHeight,Ft=Ue(st,ut),bt=Ue(st,dt);if(ht&&ht.ensure){var zt=ht.ensure.from.line,Rt=ht.ensure.to.line;zt<Ft?(Ft=zt,bt=Ue(st,or(Oe(st,zt))+it.wrapper.clientHeight)):Math.min(Rt,st.lastLine())>=bt&&(Ft=Ue(st,or(Oe(st,Rt))-it.wrapper.clientHeight),bt=Rt)}return{from:Ft,to:Math.max(bt,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&&!un){var Ft=ue("div","\u200B",null,`position: absolute;
top: `+(st.top-ht.viewOffset-ia(it.display))+`px;
height: `+(st.bottom-st.top+Es(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 zA(it,st,ht,ut){ut==null&&(ut=0);var dt;!it.options.lineWrapping&&st==ht&&(st=st.ch?He(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ht=st.sticky=="before"?He(st.line,st.ch+1,"before"):st);for(var Ft=0;Ft<5;Ft++){var bt=!1,zt=fo(it,st),Rt=!ht||ht==st?zt:fo(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),Ie=it.doc.scrollTop,re=it.doc.scrollLeft;if(ee.scrollTop!=null&&(nh(it,ee.scrollTop),Math.abs(it.doc.scrollTop-Ie)>1&&(bt=!0)),ee.scrollLeft!=null&&(jA(it,ee.scrollLeft),Math.abs(it.doc.scrollLeft-re)>1&&(bt=!0)),!bt)break}return dt}function Lc(it,st){var ht=sd(it,st);ht.scrollTop!=null&&nh(it,ht.scrollTop),ht.scrollLeft!=null&&jA(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=Ss(it),bt={};st.bottom-st.top>Ft&&(st.bottom=st.top+Ft);var zt=it.doc.height+Ya(ht),Rt=st.top<ut,ee=st.bottom>zt-ut;if(st.top<dt)bt.scrollTop=Rt?0:st.top;else if(st.bottom>dt+Ft){var Ie=Math.min(st.top,(ee?zt:st.bottom)-Ft);Ie!=dt&&(bt.scrollTop=Ie)}var re=it.options.fixedGutter?0:ht.gutters.offsetWidth,Ve=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ht.scroller.scrollLeft-re,Ke=Hs(it)-ht.gutters.offsetWidth,Dn=st.right-st.left>Ke;return Dn&&(st.right=st.left+Ke),st.left<10?bt.scrollLeft=0:st.left<Ve?bt.scrollLeft=Math.max(0,st.left+re-(Dn?0:10)):st.right>Ke+Ve-3&&(bt.scrollLeft=st.right+(Dn?0:10)-Ke),bt}function vf(it,st){st!=null&&(FA(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function KA(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 yo(it,st){FA(it),it.curOp.scrollToPos=st}function FA(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ht=fa(it,st.from),ut=fa(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 nh(it,st){Math.abs(it.doc.scrollTop-st)<2||(Nt||iA(it,{top:st}),Eh(it,st,!0),Nt&&iA(it),pu(it,100))}function Eh(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 jA(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 Dl(it){var st=it.display,ht=st.gutters.offsetWidth,ut=Math.round(it.doc.height+Ya(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+Es(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ht}}var cu=function(it,st,ht){this.cm=ht;var ut=this.vert=ue("div",[ue("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),dt=this.horiz=ue("div",[ue("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ut.tabIndex=dt.tabIndex=-1,it(ut),it(dt),wn(ut,"scroll",function(){ut.clientHeight&&st(ut.scrollTop,"vertical")}),wn(dt,"scroll",function(){dt.clientWidth&&st(dt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};cu.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}},cu.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},cu.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},cu.prototype.zeroWidthHack=function(){var it=ct&&!Be?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new _t,this.disableVert=new _t},cu.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)},cu.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var eA=function(){};eA.prototype.update=function(){return{bottom:0,right:0}},eA.prototype.setScrollLeft=function(){},eA.prototype.setScrollTop=function(){},eA.prototype.clear=function(){};function nA(it,st){st||(st=Dl(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&&cr(it),wf(it,Dl(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:cu,null:eA};function ld(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Xt(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),wn(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"?jA(it,st):nh(it,st)},it),it.display.scrollbars.addClass&&On(it.display.wrapper,it.display.scrollbars.addClass)}var rg=0;function fu(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},al(it.curOp)}function du(it){var st=it.curOp;st&&Ql(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++)as(st[Ft]);for(var bt=0;bt<st.length;bt++)gu(st[bt])}function qg(it){var st=it.cm,ht=st.display;sg(st),it.updateMaxLine&&wr(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 ih(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&&cr(st),it.barMeasure=Dl(st),ht.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Ul(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+Es(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ht.sizer.offsetLeft+it.adjustWidthTo-Hs(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ht.input.prepareSelection())}function as(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&jA(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ht=it.focus&&it.focus==vn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ht),(it.updatedDisplay||it.startHeight!=st.doc.height)&&nA(st,it.barMeasure),it.updatedDisplay&&vu(st,it.barMeasure),it.selectionChanged&&Qo(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ht&&$o(it.cm)}function gu(it){var st=it.cm,ht=st.display,ut=st.doc;if(it.updatedDisplay&&Ro(st,it.update),ht.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ht.wheelStartX=ht.wheelStartY=null),it.scrollTop!=null&&Eh(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&jA(st,it.scrollLeft,!0,!0),it.scrollToPos){var dt=zA(st,Jn(ut,it.scrollToPos.from),Jn(ut,it.scrollToPos.to),it.scrollToPos.margin);ig(st,dt)}var Ft=it.maybeHiddenMarkers,bt=it.maybeUnhiddenMarkers;if(Ft)for(var zt=0;zt<Ft.length;++zt)Ft[zt].lines.length||hr(Ft[zt],"hide");if(bt)for(var Rt=0;Rt<bt.length;++Rt)bt[Rt].lines.length&&hr(bt[Rt],"unhide");ht.wrapper.offsetHeight&&(ut.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&hr(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function bo(it,st){if(it.curOp)return st();fu(it);try{return st()}finally{du(it)}}function _s(it,st){return function(){if(it.curOp)return st.apply(it,arguments);fu(it);try{return st.apply(it,arguments)}finally{du(it)}}}function ra(it){return function(){if(this.curOp)return it.apply(this,arguments);fu(this);try{return it.apply(this,arguments)}finally{du(this)}}}function oa(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);fu(st);try{return it.apply(this,arguments)}finally{du(st)}}}function pu(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Qi(Rs,it))}function Rs(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ht=+new Date+it.options.workTime,ut=Or(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 bt=Ft.styles,zt=Ft.text.length>it.options.maxHighlightLength?Nn(st.mode,ut.state):null,Rt=eo(it,Ft,ut,!0);zt&&(ut.state=zt),Ft.styles=Rt.styles;var ee=Ft.styleClasses,Ie=Rt.classes;Ie?Ft.styleClasses=Ie:ee&&(Ft.styleClasses=null);for(var re=!bt||bt.length!=Ft.styles.length||ee!=Ie&&(!ee||!Ie||ee.bgClass!=Ie.bgClass||ee.textClass!=Ie.textClass),Ve=0;!re&&Ve<bt.length;++Ve)re=bt[Ve]!=Ft.styles[Ve];re&&dt.push(ut.line),Ft.stateAfter=ut.save(),ut.nextLine()}else Ft.text.length<=it.options.maxHighlightLength&&Re(it,Ft.text,ut),Ft.stateAfter=ut.line%5==0?ut.save():null,ut.nextLine();if(+new Date>ht)return pu(it,it.options.workDelay),!0}),st.highlightFrontier=ut.line,st.modeFrontier=Math.max(st.modeFrontier,ut.line),dt.length&&bo(it,function(){for(var Ft=0;Ft<dt.length;Ft++)zr(it,dt[Ft],"text")})}}var ih=function(it,st,ht){var ut=it.display;this.viewport=st,this.visible=so(ut,it.doc,st),this.editorIsHidden=!ut.wrapper.offsetWidth,this.wrapperHeight=ut.wrapper.clientHeight,this.wrapperWidth=ut.wrapper.clientWidth,this.oldDisplayWidth=Hs(it),this.force=ht,this.dims=mf(it),this.events=[]};ih.prototype.signal=function(it,st){pr(it,st)&&this.events.push(arguments)},ih.prototype.finish=function(){for(var it=0;it<this.events.length;it++)hr.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=Es(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Es(it)+"px",st.scrollbarsClipped=!0)}function ag(it){if(it.hasFocus())return null;var st=vn();if(!st||!sn(it.display.lineDiv,st))return null;var ht={activeElt:st};if(window.getSelection){var ut=window.getSelection();ut.anchorNode&&ut.extend&&sn(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==vn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&sn(document.body,it.anchorNode)&&sn(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 Ms(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&&hl(it)==0)return!1;Gs(it)&&(Ms(it),st.dims=mf(it));var dt=ut.first+ut.size,Ft=Math.max(st.visible.from-it.options.viewportMargin,ut.first),bt=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>bt&&ht.viewTo-bt<20&&(bt=Math.min(dt,ht.viewTo)),Vt&&(Ft=$n(it.doc,Ft),bt=pi(it.doc,bt));var zt=Ft!=ht.viewFrom||bt!=ht.viewTo||ht.lastWrapHeight!=st.wrapperHeight||ht.lastWrapWidth!=st.wrapperWidth;Ho(it,Ft,bt),ht.viewOffset=or(Oe(it.doc,ht.viewFrom)),it.display.mover.style.top=ht.viewOffset+"px";var Rt=hl(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,pu(it,400)),ht.updateLineNumbers=null,!0}function Ro(it,st){for(var ht=st.viewport,ut=!0;;ut=!1){if(!ut||!it.options.lineWrapping||st.oldDisplayWidth==Hs(it)){if(ht&&ht.top!=null&&(ht={top:Math.min(it.doc.height+Ya(it.display)-Ss(it),ht.top)}),st.visible=so(it.display,it.doc,ht),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ut&&(st.visible=so(it.display,it.doc,ht));if(!Sf(it,st))break;cr(it);var dt=Dl(it);Is(it),nA(it,dt),vu(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 iA(it,st){var ht=new ih(it,st);if(Sf(it,ht)){cr(it),Ro(it,ht);var ut=Dl(it);Is(it),nA(it,ut),vu(it,ut),ht.finish()}}function Ad(it,st,ht){var ut=it.display,dt=it.options.lineNumbers,Ft=ut.lineDiv,bt=Ft.firstChild;function zt(Dn){var Yn=Dn.nextSibling;return ye&&ct&&it.display.currentWheelTarget==Dn?Dn.style.display="none":Dn.parentNode.removeChild(Dn),Yn}for(var Rt=ut.view,ee=ut.viewFrom,Ie=0;Ie<Rt.length;Ie++){var re=Rt[Ie];if(!re.hidden)if(!re.node||re.node.parentNode!=Ft){var Ve=Da(it,re,ee,ht);Ft.insertBefore(Ve,bt)}else{for(;bt!=re.node;)bt=zt(bt);var Ke=dt&&st!=null&&st<=ee&&re.lineNumber;re.changes&&(Bn(re.changes,"gutter")>-1&&(Ke=!1),lu(it,re,ee,ht)),Ke&&(he(re.lineNumber),re.lineNumber.appendChild(document.createTextNode(Rn(it.options,ee)))),bt=re.node.nextSibling}ee+=re.size}for(;bt;)bt=zt(bt)}function mu(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function vu(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+Es(it)+"px"}function xf(it){var st=it.display,ht=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ut=uu(st)-st.scroller.scrollLeft+it.doc.scrollLeft,dt=st.gutters.offsetWidth,Ft=ut+"px",bt=0;bt<ht.length;bt++)if(!ht[bt].hidden){it.options.fixedGutter&&(ht[bt].gutter&&(ht[bt].gutter.style.left=Ft),ht[bt].gutterBackground&&(ht[bt].gutterBackground.style.left=Ft));var zt=ht[bt].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 Gs(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ht=Rn(it.options,st.first+st.size-1),ut=it.display;if(ht.length!=ut.lineNumChars){var dt=ut.measure.appendChild(ue("div",[ue("div",ht)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ft=dt.firstChild.offsetWidth,bt=dt.offsetWidth-Ft;return ut.lineGutter.style.width="",ut.lineNumInnerWidth=Math.max(Ft,ut.lineGutter.offsetWidth-bt)+1,ut.lineNumWidth=ut.lineNumInnerWidth+bt,ut.lineNumChars=ut.lineNumInnerWidth?ht.length:-1,ut.lineGutter.style.width=ut.lineNumWidth+"px",mu(it.display),!0}return!1}function sa(it,st){for(var ht=[],ut=!1,dt=0;dt<it.length;dt++){var Ft=it[dt],bt=null;if(typeof Ft!="string"&&(bt=Ft.style,Ft=Ft.className),Ft=="CodeMirror-linenumbers")if(st)ut=!0;else continue;ht.push({className:Ft,style:bt})}return st&&!ut&&ht.push({className:"CodeMirror-linenumbers",style:null}),ht}function rh(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,bt=dt.style,zt=st.appendChild(ue("div",null,"CodeMirror-gutter "+Ft));bt&&(zt.style.cssText=bt),Ft=="CodeMirror-linenumbers"&&(it.lineGutter=zt,zt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ht.length?"":"none",mu(it)}function Cl(it){rh(it.display),ns(it),xf(it)}function yu(it,st,ht,ut){var dt=this;this.input=ht,dt.scrollbarFiller=ue("div",null,"CodeMirror-scrollbar-filler"),dt.scrollbarFiller.setAttribute("cm-not-content","true"),dt.gutterFiller=ue("div",null,"CodeMirror-gutter-filler"),dt.gutterFiller.setAttribute("cm-not-content","true"),dt.lineDiv=Ye("div",null,"CodeMirror-code"),dt.selectionDiv=ue("div",null,null,"position: relative; z-index: 1"),dt.cursorDiv=ue("div",null,"CodeMirror-cursors"),dt.measure=ue("div",null,"CodeMirror-measure"),dt.lineMeasure=ue("div",null,"CodeMirror-measure"),dt.lineSpace=Ye("div",[dt.measure,dt.lineMeasure,dt.selectionDiv,dt.cursorDiv,dt.lineDiv],null,"position: relative; outline: none");var Ft=Ye("div",[dt.lineSpace],"CodeMirror-lines");dt.mover=ue("div",[Ft],null,"position: relative"),dt.sizer=ue("div",[dt.mover],"CodeMirror-sizer"),dt.sizerWidth=null,dt.heightForcer=ue("div",null,null,"position: absolute; height: "+Si+"px; width: 1px;"),dt.gutters=ue("div",null,"CodeMirror-gutters"),dt.lineGutter=null,dt.scroller=ue("div",[dt.sizer,dt.heightForcer,dt.gutters],"CodeMirror-scroll"),dt.scroller.setAttribute("tabIndex","-1"),dt.wrapper=ue("div",[dt.scrollbarFiller,dt.gutterFiller,dt.scroller],"CodeMirror"),be&&xe<8&&(dt.gutters.style.zIndex=-1,dt.scroller.style.paddingRight=0),!ye&&!(Nt&&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=sa(ut.gutters,ut.lineNumbers),rh(dt),ht.init(dt)}var cl=0,Ns=null;be?Ns=-.53:Nt?Ns=15:Me?Ns=-.7:hn&&(Ns=-1/3);function rA(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 fl(it){var st=rA(it);return st.x*=Ns,st.y*=Ns,st}function aa(it,st){var ht=rA(st),ut=ht.x,dt=ht.y,Ft=it.display,bt=Ft.scroller,zt=bt.scrollWidth>bt.clientWidth,Rt=bt.scrollHeight>bt.clientHeight;if(ut&&zt||dt&&Rt){if(dt&&ct&&ye){t:for(var ee=st.target,Ie=Ft.view;ee!=bt;ee=ee.parentNode)for(var re=0;re<Ie.length;re++)if(Ie[re].node==ee){it.display.currentWheelTarget=ee;break t}}if(ut&&!Nt&&!se&&Ns!=null){dt&&Rt&&nh(it,Math.max(0,bt.scrollTop+dt*Ns)),jA(it,Math.max(0,bt.scrollLeft+ut*Ns)),(!dt||dt&&Rt)&&ur(st),Ft.wheelStartX=null;return}if(dt&&Ns!=null){var Ve=dt*Ns,Ke=it.doc.scrollTop,Dn=Ke+Ft.wrapper.clientHeight;Ve<0?Ke=Math.max(0,Ke+Ve-50):Dn=Math.min(it.doc.height,Dn+Ve+50),iA(it,{top:Ke,bottom:Dn})}cl<20&&(Ft.wheelStartX==null?(Ft.wheelStartX=bt.scrollLeft,Ft.wheelStartY=bt.scrollTop,Ft.wheelDX=ut,Ft.wheelDY=dt,setTimeout(function(){if(Ft.wheelStartX!=null){var Yn=bt.scrollLeft-Ft.wheelStartX,hi=bt.scrollTop-Ft.wheelStartY,Mi=hi&&Ft.wheelDY&&hi/Ft.wheelDY||Yn&&Ft.wheelDX&&Yn/Ft.wheelDX;Ft.wheelStartX=Ft.wheelStartY=null,Mi&&(Ns=(Ns*cl+Mi)/(cl+1),++cl)}},200)):(Ft.wheelDX+=ut,Ft.wheelDY+=dt))}}var Ol=function(it,st){this.ranges=it,this.primIndex=st};Ol.prototype.primary=function(){return this.ranges[this.primIndex]},Ol.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(!Xn(ht.anchor,ut.anchor)||!Xn(ht.head,ut.head))return!1}return!0},Ol.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Go(Qn(this.ranges[st].anchor),Qn(this.ranges[st].head));return new Ol(it,this.primIndex)},Ol.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Ol.prototype.contains=function(it,st){st||(st=it);for(var ht=0;ht<this.ranges.length;ht++){var ut=this.ranges[ht];if(xn(st,ut.from())>=0&&xn(it,ut.to())<=0)return ht}return-1};var Go=function(it,st){this.anchor=it,this.head=st};Go.prototype.from=function(){return ni(this.anchor,this.head)},Go.prototype.to=function(){return yi(this.anchor,this.head)},Go.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(Ve,Ke){return xn(Ve.from(),Ke.from())}),ht=Bn(st,dt);for(var Ft=1;Ft<st.length;Ft++){var bt=st[Ft],zt=st[Ft-1],Rt=xn(zt.to(),bt.from());if(ut&&!bt.empty()?Rt>0:Rt>=0){var ee=ni(zt.from(),bt.from()),Ie=yi(zt.to(),bt.to()),re=zt.empty()?bt.from()==bt.head:zt.from()==zt.head;Ft<=ht&&--ht,st.splice(--Ft,2,new Go(re?Ie:ee,re?ee:Ie))}}return new Ol(st,ht)}function VA(it,st){return new Ol([new Go(it,st||it)],0)}function wu(it){return it.text?He(it.from.line+it.text.length-1,le(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Su(it,st){if(xn(it,st.from)<0)return it;if(xn(it,st.to)<=0)return wu(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+=wu(st).ch-st.to.ch),He(ht,ut)}function Ec(it,st){for(var ht=[],ut=0;ut<it.sel.ranges.length;ut++){var dt=it.sel.ranges[ut];ht.push(new Go(Su(dt.anchor,st),Su(dt.head,st)))}return Za(it.cm,ht,it.sel.primIndex)}function Mh(it,st,ht){return it.line==st.line?He(ht.line,it.ch-st.ch+ht.ch):He(ht.line+(it.line-st.line),it.ch)}function Mc(it,st,ht){for(var ut=[],dt=He(it.first,0),Ft=dt,bt=0;bt<st.length;bt++){var zt=st[bt],Rt=Mh(zt.from,dt,Ft),ee=Mh(wu(zt),dt,Ft);if(dt=zt.to,Ft=ee,ht=="around"){var Ie=it.sel.ranges[bt],re=xn(Ie.head,Ie.anchor)<0;ut[bt]=new Go(re?ee:Rt,re?Rt:ee)}else ut[bt]=new Go(Rt,Rt)}return new Ol(ut,it.sel.primIndex)}function Jr(it){it.doc.mode=Se(it.options,it.doc.modeOption),kc(it)}function kc(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,pu(it,100),it.state.modeGen++,it.curOp&&ns(it)}function ud(it,st){return st.from.ch==0&&st.to.ch==0&&le(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Bf(it,st,ht,ut){function dt(Zi){return ht?ht[Zi]:null}function Ft(Zi,zi,lr){Nr(Zi,zi,lr,ut),Vi(Zi,"change",Zi,st)}function bt(Zi,zi){for(var lr=[],kr=Zi;kr<zi;++kr)lr.push(new Pr(ee[kr],dt(kr),ut));return lr}var zt=st.from,Rt=st.to,ee=st.text,Ie=Oe(it,zt.line),re=Oe(it,Rt.line),Ve=le(ee),Ke=dt(ee.length-1),Dn=Rt.line-zt.line;if(st.full)it.insert(0,bt(0,ee.length)),it.remove(ee.length,it.size-ee.length);else if(ud(it,st)){var Yn=bt(0,ee.length-1);Ft(re,re.text,Ke),Dn&&it.remove(zt.line,Dn),Yn.length&&it.insert(zt.line,Yn)}else if(Ie==re)if(ee.length==1)Ft(Ie,Ie.text.slice(0,zt.ch)+Ve+Ie.text.slice(Rt.ch),Ke);else{var hi=bt(1,ee.length-1);hi.push(new Pr(Ve+Ie.text.slice(Rt.ch),Ke,ut)),Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0],dt(0)),it.insert(zt.line+1,hi)}else if(ee.length==1)Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0]+re.text.slice(Rt.ch),dt(0)),it.remove(zt.line+1,Dn);else{Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0],dt(0)),Ft(re,Ve+re.text.slice(Rt.ch),Ke);var Mi=bt(1,ee.length-1);Dn>1&&it.remove(zt.line+1,Dn-1),it.insert(zt.line+1,Mi)}Vi(it,"change",it,st)}function oA(it,st,ht){function ut(dt,Ft,bt){if(dt.linked)for(var zt=0;zt<dt.linked.length;++zt){var Rt=dt.linked[zt];if(Rt.doc!=Ft){var ee=bt&&Rt.sharedHist;ht&&!ee||(st(Rt.doc,ee),ut(Rt.doc,dt,ee))}}}ut(it,null,!0)}function Ws(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,gr(it),Jr(it),bc(it),it.options.lineWrapping||wr(it),it.options.mode=st.modeOption,ns(it)}function bc(it){(it.doc.direction=="rtl"?On:Xt)(it.display.lineDiv,"CodeMirror-rtl")}function tp(it){bo(it,function(){bc(it),ns(it)})}function kh(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:Qn(st.from),to:wu(st),text:pe(it,st.from,st.to)};return xu(it,ht,st.from.line,st.to.line+1),oA(it,function(ut){return xu(ut,ht,st.from.line,st.to.line+1)},!0),ht}function bh(it){for(;it.length;){var st=le(it);if(st.ranges)it.pop();else break}}function Th(it,st){if(st)return bh(it.done),le(it.done);if(it.done.length&&!le(it.done).ranges)return le(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),le(it.done)}function Tc(it,st,ht,ut){var dt=it.history;dt.undone.length=0;var Ft=+new Date,bt,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)=="*"))&&(bt=Th(dt,dt.lastOp==ut)))zt=le(bt.changes),xn(st.from,st.to)==0&&xn(st.from,zt.to)==0?zt.to=wu(st):bt.changes.push(Cf(it,st));else{var Rt=le(dt.done);for((!Rt||!Rt.ranges)&&Ih(it.sel,dt.done),bt={changes:[Cf(it,st)],generation:dt.generation},dt.done.push(bt);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||hr(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 Ic(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,le(dt.done),st))?dt.done[dt.done.length-1]=st:Ih(st,dt.done),dt.lastSelTime=+new Date,dt.lastSelOrigin=Ft,dt.lastSelOp=ht,ut&&ut.clearRedo!==!1&&bh(dt.undone)}function Ih(it,st){var ht=le(st);ht&&ht.ranges&&ht.equals(it)||st.push(it)}function xu(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(bt){bt.markedSpans&&((dt||(dt=st["spans_"+it.id]={}))[Ft]=bt.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 sA(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 fr(it,st){var ht=sA(it,st),ut=Hn(it,st);if(!ht)return ut;if(!ut)return ht;for(var dt=0;dt<ht.length;++dt){var Ft=ht[dt],bt=ut[dt];if(Ft&&bt)t:for(var zt=0;zt<bt.length;++zt){for(var Rt=bt[zt],ee=0;ee<Ft.length;++ee)if(Ft[ee].marker==Rt.marker)continue t;Ft.push(Rt)}else bt&&(ht[dt]=bt)}return ht}function _A(it,st,ht){for(var ut=[],dt=0;dt<it.length;++dt){var Ft=it[dt];if(Ft.ranges){ut.push(ht?Ol.prototype.deepCopy.call(Ft):Ft);continue}var bt=Ft.changes,zt=[];ut.push({changes:zt});for(var Rt=0;Rt<bt.length;++Rt){var ee=bt[Rt],Ie=void 0;if(zt.push({from:ee.from,to:ee.to,text:ee.text}),st)for(var re in ee)(Ie=re.match(/^spans_(\d+)$/))&&Bn(st,Number(Ie[1]))>-1&&(le(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=xn(st,dt)<0;Ft!=xn(ht,dt)<0?(dt=st,st=ht):Ft!=xn(st,ht)<0&&(st=ht)}return new Go(dt,st)}else return new Go(ht||st,st)}function Nh(it,st,ht,ut,dt){dt==null&&(dt=it.cm&&(it.cm.display.shift||it.extend)),Pa(it,new Ol([Pf(it.sel.primary(),st,ht,dt)],0),ut)}function aA(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 bt=Za(it.cm,ut,it.sel.primIndex);Pa(it,bt,ht)}function Bu(it,st,ht,ut){var dt=it.sel.ranges.slice(0);dt[st]=ht,Pa(it,Za(it.cm,dt,it.sel.primIndex),ut)}function Cu(it,st,ht,ut){Pa(it,VA(st,ht),ut)}function Qh(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 Go(Jn(it,dt[Ft].anchor),Jn(it,dt[Ft].head))},origin:ht&&ht.origin};return hr(it,"beforeSelectionChange",it,ut),it.cm&&hr(it.cm,"beforeSelectionChange",it.cm,ut),ut.ranges!=st.ranges?Za(it.cm,ut.ranges,ut.ranges.length-1):st}function oh(it,st,ht){var ut=it.history.done,dt=le(ut);dt&&dt.ranges?(ut[ut.length-1]=st,sh(it,st,ht)):Pa(it,st,ht)}function Pa(it,st,ht){sh(it,st,ht),Ic(it,it.sel,it.cm?it.cm.curOp.id:NaN,ht)}function sh(it,st,ht){(pr(it,"beforeSelectionChange")||it.cm&&pr(it.cm,"beforeSelectionChange"))&&(st=Qh(it,st,ht));var ut=ht&&ht.bias||(xn(st.primary().head,it.sel.primary().head)<0?-1:1);cd(it,ah(it,st,ut,!0)),!(ht&&ht.scroll===!1)&&it.cm&&KA(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)),Vi(it,"cursorActivity",it))}function lA(it){cd(it,ah(it,it.sel,null,!1))}function ah(it,st,ht,ut){for(var dt,Ft=0;Ft<st.ranges.length;Ft++){var bt=st.ranges[Ft],zt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Ft],Rt=Nc(it,bt.anchor,zt&&zt.anchor,ht,ut),ee=Nc(it,bt.head,zt&&zt.head,ht,ut);(dt||Rt!=bt.anchor||ee!=bt.head)&&(dt||(dt=st.ranges.slice(0,Ft)),dt[Ft]=new Go(Rt,ee))}return dt?Za(it.cm,dt,st.primIndex):st}function AA(it,st,ht,ut,dt){var Ft=Oe(it,st.line);if(Ft.markedSpans)for(var bt=0;bt<Ft.markedSpans.length;++bt){var zt=Ft.markedSpans[bt],Rt=zt.marker,ee="selectLeft"in Rt?!Rt.selectLeft:Rt.inclusiveLeft,Ie="selectRight"in Rt?!Rt.selectRight:Rt.inclusiveRight;if((zt.from==null||(ee?zt.from<=st.ch:zt.from<st.ch))&&(zt.to==null||(Ie?zt.to>=st.ch:zt.to>st.ch))){if(dt&&(hr(Rt,"beforeCursorEnter"),Rt.explicitlyCleared))if(Ft.markedSpans){--bt;continue}else break;if(!Rt.atomic)continue;if(ht){var re=Rt.find(ut<0?1:-1),Ve=void 0;if((ut<0?Ie:ee)&&(re=Ff(it,re,-ut,re&&re.line==st.line?Ft:null)),re&&re.line==st.line&&(Ve=xn(re,ht))&&(ut<0?Ve<0:Ve>0))return AA(it,re,st,ut,dt)}var Ke=Rt.find(ut<0?-1:1);return(ut<0?ee:Ie)&&(Ke=Ff(it,Ke,ut,Ke.line==st.line?Ft:null)),Ke?AA(it,Ke,st,ut,dt):null}}return st}function Nc(it,st,ht,ut,dt){var Ft=ut||1,bt=AA(it,st,ht,Ft,dt)||!dt&&AA(it,st,ht,Ft,!0)||AA(it,st,ht,-Ft,dt)||!dt&&AA(it,st,ht,-Ft,!0);return bt||(it.cantEdit=!0,He(it.first,0))}function Ff(it,st,ht,ut){return ht<0&&st.ch==0?st.line>it.first?Jn(it,He(st.line-1)):null:ht>0&&st.ch==(ut||Oe(it,st.line)).text.length?st.line<it.first+it.size-1?He(st.line+1,0):null:new He(st.line,st.ch+ht)}function Qs(it){it.setSelection(He(it.firstLine(),0),He(it.lastLine()),_e)}function lh(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,bt,zt){dt&&(ut.from=Jn(it,dt)),Ft&&(ut.to=Jn(it,Ft)),bt&&(ut.text=bt),zt!==void 0&&(ut.origin=zt)}),hr(it,"beforeChange",it,ut),it.cm&&hr(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 Pu(it,st,ht){if(it.cm){if(!it.cm.curOp)return _s(it.cm,Pu)(it,st,ht);if(it.cm.state.suppressEdits)return}if(!((pr(it,"beforeChange")||it.cm&&pr(it.cm,"beforeChange"))&&(st=lh(it,st,!0),!st))){var ut=$t&&!ht&&Ri(it,st.from,st.to);if(ut)for(var dt=ut.length-1;dt>=0;--dt)Ah(it,{from:ut[dt].from,to:ut[dt].to,text:dt?[""]:st.text,origin:st.origin});else Ah(it,st)}}function Ah(it,st){if(!(st.text.length==1&&st.text[0]==""&&xn(st.from,st.to)==0)){var ht=Ec(it,st);Tc(it,st,ht,it.cm?it.cm.curOp.id:NaN),Uh(it,st,ht,Hn(it,st));var ut=[];oA(it,function(dt,Ft){!Ft&&Bn(ut,dt.history)==-1&&(gd(dt.history,st),ut.push(dt.history)),Uh(dt,st,null,Hn(dt,st))})}}function Qc(it,st,ht){var ut=it.cm&&it.cm.state.suppressEdits;if(!(ut&&!ht)){for(var dt=it.history,Ft,bt=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(Ih(Ft,Rt),ht&&!Ft.equals(it.sel)){Pa(it,Ft,{clearRedo:!1});return}bt=Ft}else if(ut){zt.push(Ft);return}else break;var Ie=[];Ih(bt,Rt),Rt.push({changes:Ie,generation:dt.generation}),dt.generation=Ft.generation||++dt.maxGeneration;for(var re=pr(it,"beforeChange")||it.cm&&pr(it.cm,"beforeChange"),Ve=function(Yn){var hi=Ft.changes[Yn];if(hi.origin=st,re&&!lh(it,hi,!1))return zt.length=0,{};Ie.push(Cf(it,hi));var Mi=Yn?Ec(it,hi):le(zt);Uh(it,hi,Mi,fr(it,hi)),!Yn&&it.cm&&it.cm.scrollIntoView({from:hi.from,to:wu(hi)});var Zi=[];oA(it,function(zi,lr){!lr&&Bn(Zi,zi.history)==-1&&(gd(zi.history,hi),Zi.push(zi.history)),Uh(zi,hi,null,fr(zi,hi))})},Ke=Ft.changes.length-1;Ke>=0;--Ke){var Dn=Ve(Ke);if(Dn)return Dn.v}}}}function fd(it,st){if(st!=0&&(it.first+=st,it.sel=new Ol(bn(it.sel.ranges,function(dt){return new Go(He(dt.anchor.line+st,dt.anchor.ch),He(dt.head.line+st,dt.head.ch))}),it.sel.primIndex),it.cm)){ns(it.cm,it.first,it.first-st,st);for(var ht=it.cm.display,ut=ht.viewFrom;ut<ht.viewTo;ut++)zr(it.cm,ut,"gutter")}}function Uh(it,st,ht,ut){if(it.cm&&!it.cm.curOp)return _s(it.cm,Uh)(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:He(it.first,0),to:He(st.to.line+dt,st.to.ch),text:[le(st.text)],origin:st.origin}}var Ft=it.lastLine();st.to.line>Ft&&(st={from:st.from,to:He(Ft,Oe(it,Ft).text.length),text:[st.text[0]],origin:st.origin}),st.removed=pe(it,st.from,st.to),ht||(ht=Ec(it,st)),it.cm?lg(it.cm,st,ut):Bf(it,st,ut),sh(it,ht,_e),it.cantEdit&&Nc(it,He(it.firstLine(),0))&&(it.cantEdit=!1)}}function lg(it,st,ht){var ut=it.doc,dt=it.display,Ft=st.from,bt=st.to,zt=!1,Rt=Ft.line;it.options.lineWrapping||(Rt=Zt(oi(Oe(ut,Ft.line))),ut.iter(Rt,bt.line+1,function(Ke){if(Ke==dt.maxLine)return zt=!0,!0})),ut.sel.contains(st.from,st.to)>-1&&ro(it),Bf(ut,st,ht,ss(it)),it.options.lineWrapping||(ut.iter(Rt,Ft.line+st.text.length,function(Ke){var Dn=Mr(Ke);Dn>dt.maxLineLength&&(dt.maxLine=Ke,dt.maxLineLength=Dn,dt.maxLineChanged=!0,zt=!1)}),zt&&(it.curOp.updateMaxLine=!0)),qt(ut,Ft.line),pu(it,400);var ee=st.text.length-(bt.line-Ft.line)-1;st.full?ns(it):Ft.line==bt.line&&st.text.length==1&&!ud(it.doc,st)?zr(it,Ft.line,"text"):ns(it,Ft.line,bt.line+1,ee);var Ie=pr(it,"changes"),re=pr(it,"change");if(re||Ie){var Ve={from:Ft,to:bt,text:st.text,removed:st.removed,origin:st.origin};re&&Vi(it,"change",it,Ve),Ie&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Ve)}it.display.selForContextMenu=null}function uh(it,st,ht,ut,dt){var Ft;ut||(ut=ht),xn(ut,ht)<0&&(Ft=[ut,ht],ht=Ft[0],ut=Ft[1]),typeof st=="string"&&(st=it.splitLines(st)),Pu(it,{from:ht,to:ut,text:st,origin:dt})}function Hl(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],bt=!0;if(Ft.ranges){Ft.copied||(Ft=it[dt]=Ft.deepCopy(),Ft.copied=!0);for(var zt=0;zt<Ft.ranges.length;zt++)Hl(Ft.ranges[zt].anchor,st,ht,ut),Hl(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=He(ee.from.line+ut,ee.from.ch),ee.to=He(ee.to.line+ut,ee.to.ch);else if(st<=ee.to.line){bt=!1;break}}bt||(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 hh(it,st,ht,ut){var dt=st,Ft=st;return typeof st=="number"?Ft=Oe(it,En(it,st)):dt=Zt(st),dt==null?null:(ut(Ft,dt)&&it.cm&&zr(it.cm,dt,ht),Ft)}function Dh(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}Dh.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,Xr(dt),Vi(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 ps(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}ps.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),bt=ut.height;if(ut.removeInner(it,Ft),this.height-=bt-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 Dh))){var zt=[];this.collapse(zt),this.children=[new Dh(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 bt=dt.lines.length%25+25,zt=bt;zt<dt.lines.length;){var Rt=new Dh(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,bt),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 ps(st);if(it.parent){it.size-=ht.size,it.height-=ht.height;var dt=Bn(it.parent.children,it);it.parent.children.splice(dt+1,0,ht)}else{var ut=new ps(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 bt=Math.min(st,Ft-it);if(dt.iterN(it,bt,ht))return!0;if((st-=bt)==0)break;it=0}else it-=Ft}}};var WA=function(it,st,ht){if(ht)for(var ut in ht)ht.hasOwnProperty(ut)&&(this[ut]=ht[ut]);this.doc=it,this.node=st};WA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ht=this.line,ut=Zt(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=ca(this);cn(ht,Math.max(0,ht.height-Ft)),it&&(bo(it,function(){Uc(it,ht,-Ft),zr(it,ut,"widget")}),Vi(it,"lineWidgetCleared",it,this,ut))}},WA.prototype.changed=function(){var it=this,st=this.height,ht=this.doc.cm,ut=this.line;this.height=null;var dt=ca(this)-st;dt&&(rn(this.doc,ut)||cn(ut,ut.height+dt),ht&&bo(ht,function(){ht.curOp.forceUpdate=!0,Uc(ht,ut,dt),Vi(ht,"lineWidgetChanged",ht,it,Zt(ut))}))},er(WA);function Uc(it,st,ht){or(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&vf(it,ht)}function Lf(it,st,ht,ut){var dt=new WA(it,ht,ut),Ft=it.cm;return Ft&&dt.noHScroll&&(Ft.display.alignWidgets=!0),hh(it,st,"widget",function(bt){var zt=bt.widgets||(bt.widgets=[]);if(dt.insertAt==null?zt.push(dt):zt.splice(Math.min(zt.length-1,Math.max(0,dt.insertAt)),0,dt),dt.line=bt,Ft&&!rn(it,bt)){var Rt=or(bt)<it.scrollTop;cn(bt,bt.height+ca(dt)),Rt&&vf(Ft,dt.height),Ft.curOp.forceUpdate=!0}return!0}),Ft&&Vi(Ft,"lineWidgetAdded",Ft,dt,typeof st=="number"?st:Zt(st)),dt}var Ef=0,me=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Ef};me.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&fu(it),pr(this,"clear")){var ht=this.find();ht&&Vi(this,"clear",ht.from,ht.to)}for(var ut=null,dt=null,Ft=0;Ft<this.lines.length;++Ft){var bt=this.lines[Ft],zt=yn(bt.markedSpans,this);it&&!this.collapsed?zr(it,Zt(bt),"text"):it&&(zt.to!=null&&(dt=Zt(bt)),zt.from!=null&&(ut=Zt(bt))),bt.markedSpans=Fn(bt.markedSpans,zt),zt.from==null&&this.collapsed&&!rn(this.doc,bt)&&it&&cn(bt,CA(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Rt=0;Rt<this.lines.length;++Rt){var ee=oi(this.lines[Rt]),Ie=Mr(ee);Ie>it.display.maxLineLength&&(it.display.maxLine=ee,it.display.maxLineLength=Ie,it.display.maxLineChanged=!0)}ut!=null&&it&&this.collapsed&&ns(it,ut,dt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&lA(it.doc)),it&&Vi(it,"markerCleared",it,this,ut,dt),st&&du(it),this.parent&&this.parent.clear()}},me.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],bt=yn(Ft.markedSpans,this);if(bt.from!=null&&(ht=He(st?Ft:Zt(Ft),bt.from),it==-1))return ht;if(bt.to!=null&&(ut=He(st?Ft:Zt(Ft),bt.to),it==1))return ut}return ht&&{from:ht,to:ut}},me.prototype.changed=function(){var it=this,st=this.find(-1,!0),ht=this,ut=this.doc.cm;!st||!ut||bo(ut,function(){var dt=st.line,Ft=Zt(st.line),bt=tA(ut,Ft);if(bt&&(Ju(bt),ut.curOp.selectionChanged=ut.curOp.forceUpdate=!0),ut.curOp.updateMaxLine=!0,!rn(ht.doc,dt)&&ht.height!=null){var zt=ht.height;ht.height=null;var Rt=ca(ht)-zt;Rt&&cn(dt,dt.height+Rt)}Vi(ut,"markerChanged",ut,it)})},me.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||Bn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},me.prototype.detachLine=function(it){if(this.lines.splice(Bn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},er(me);function Fu(it,st,ht,ut,dt){if(ut&&ut.shared)return Ag(it,st,ht,ut,dt);if(it.cm&&!it.cm.curOp)return _s(it.cm,Fu)(it,st,ht,ut,dt);var Ft=new me(it,dt),bt=xn(st,ht);if(ut&&Gn(ut,Ft,!1),bt>0||bt==0&&Ft.clearWhenEmpty!==!1)return Ft;if(Ft.replacedWith&&(Ft.collapsed=!0,Ft.widgetNode=Ye("span",[Ft.replacedWith],"CodeMirror-widget"),ut.handleMouseEvents||Ft.widgetNode.setAttribute("cm-ignore-events","true"),ut.insertLeft&&(Ft.widgetNode.insertLeft=!0)),Ft.collapsed){if(Ei(it,st.line,st,ht,Ft)||st.line!=ht.line&&Ei(it,ht.line,st,ht,Ft))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ae()}Ft.addToHistory&&Tc(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&&oi(re)==Rt.display.maxLine&&(ee=!0),Ft.collapsed&&zt!=st.line&&cn(re,0),wi(re,new Je(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){rn(it,re)&&cn(re,0)}),Ft.clearOnEnter&&wn(Ft,"beforeCursorEnter",function(){return Ft.clear()}),Ft.readOnly&&(Ne(),(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)ns(Rt,st.line,ht.line+1);else if(Ft.className||Ft.startStyle||Ft.endStyle||Ft.css||Ft.attributes||Ft.title)for(var Ie=st.line;Ie<=ht.line;Ie++)zr(Rt,Ie,"text");Ft.atomic&&lA(Rt.doc),Vi(Rt,"markerAdded",Rt,Ft)}return Ft}var uA=function(it,st){this.markers=it,this.primary=st;for(var ht=0;ht<it.length;++ht)it[ht].parent=this};uA.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Vi(this,"clear")}},uA.prototype.find=function(it,st){return this.primary.find(it,st)},er(uA);function Ag(it,st,ht,ut,dt){ut=Gn(ut),ut.shared=!1;var Ft=[Fu(it,st,ht,ut,dt)],bt=Ft[0],zt=ut.widgetNode;return oA(it,function(Rt){zt&&(ut.widgetNode=zt.cloneNode(!0)),Ft.push(Fu(Rt,Jn(Rt,st),Jn(Rt,ht),ut,dt));for(var ee=0;ee<Rt.linked.length;++ee)if(Rt.linked[ee].isParent)return;bt=le(Ft)}),new uA(Ft,bt)}function Mf(it){return it.findMarks(He(it.first,0),it.clipPos(He(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),bt=it.clipPos(dt.to);if(xn(Ft,bt)){var zt=Fu(it,Ft,bt,ut.primary,ut.primary.type);ut.markers.push(zt),zt.parent=ut}}}function Dc(it){for(var st=function(ut){var dt=it[ut],Ft=[dt.primary.doc];oA(dt.primary.doc,function(Rt){return Ft.push(Rt)});for(var bt=0;bt<dt.markers.length;bt++){var zt=dt.markers[bt];Bn(Ft,zt.doc)==-1&&(zt.parent=null,dt.markers.splice(bt--,1))}},ht=0;ht<it.length;ht++)st(ht)}var ug=0,la=function(it,st,ht,ut,dt){if(!(this instanceof la))return new la(it,st,ht,ut,dt);ht==null&&(ht=0),ps.call(this,[new Dh([new Pr("",null)])]),this.first=ht,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ht;var Ft=He(ht,0);this.sel=VA(Ft),this.history=new kh(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}),Pa(this,VA(Ft),_e)};la.prototype=Lt(ps.prototype,{constructor:la,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=ge(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:oa(function(it){var st=He(this.first,0),ht=this.first+this.size-1;Pu(this,{from:st,to:He(ht,Oe(this,ht).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&PA(this.cm,0,0),Pa(this,VA(st),_e)}),replaceRange:function(it,st,ht,ut){st=Jn(this,st),ht=ht?Jn(this,ht):st,uh(this,it,st,ht,ut)},getRange:function(it,st,ht){var ut=pe(this,Jn(this,it),Jn(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(fn(this,it))return Oe(this,it)},getLineNumber:function(it){return Zt(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Oe(this,it)),oi(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return Jn(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:oa(function(it,st,ht){Cu(this,Jn(this,typeof it=="number"?He(it,st||0):it),null,ht)}),setSelection:oa(function(it,st,ht){Cu(this,Jn(this,it),Jn(this,st||it),ht)}),extendSelection:oa(function(it,st,ht){Nh(this,Jn(this,it),st&&Jn(this,st),ht)}),extendSelections:oa(function(it,st){aA(this,qi(this,it),st)}),extendSelectionsBy:oa(function(it,st){var ht=bn(this.sel.ranges,it);aA(this,qi(this,ht),st)}),setSelections:oa(function(it,st,ht){if(it.length){for(var ut=[],dt=0;dt<it.length;dt++)ut[dt]=new Go(Jn(this,it[dt].anchor),Jn(this,it[dt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Pa(this,Za(this.cm,ut,st),ht)}}),addSelection:oa(function(it,st,ht){var ut=this.sel.ranges.slice(0);ut.push(new Go(Jn(this,it),Jn(this,st||it))),Pa(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=pe(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=pe(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:oa(function(it,st,ht){for(var ut=[],dt=this.sel,Ft=0;Ft<dt.ranges.length;Ft++){var bt=dt.ranges[Ft];ut[Ft]={from:bt.from(),to:bt.to(),text:this.splitLines(it[Ft]),origin:ht}}for(var zt=st&&st!="end"&&Mc(this,ut,st),Rt=ut.length-1;Rt>=0;Rt--)Pu(this,ut[Rt]);zt?oh(this,zt):this.cm&&KA(this.cm)}),undo:oa(function(){Qc(this,"undo")}),redo:oa(function(){Qc(this,"redo")}),undoSelection:oa(function(){Qc(this,"undo",!0)}),redoSelection:oa(function(){Qc(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 kh(this.history.maxGeneration),oA(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:_A(this.history.done),undone:_A(this.history.undone)}},setHistory:function(it){var st=this.history=new kh(this.history.maxGeneration);st.done=_A(it.done.slice(0),null,!0),st.undone=_A(it.undone.slice(0),null,!0)},setGutterMarker:oa(function(it,st,ht){return hh(this,it,"gutter",function(ut){var dt=ut.gutterMarkers||(ut.gutterMarkers={});return dt[st]=ht,!ht&&kt(dt)&&(ut.gutterMarkers=null),!0})}),clearGutter:oa(function(it){var st=this;this.iter(function(ht){ht.gutterMarkers&&ht.gutterMarkers[it]&&hh(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(!fn(this,it)||(st=it,it=Oe(this,it),!it))return null}else if(st=Zt(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:oa(function(it,st,ht){return hh(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(Yt(ht).test(ut[dt]))return!1;ut[dt]+=" "+ht}return!0})}),removeLineClass:oa(function(it,st,ht){return hh(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 bt=Ft.match(Yt(ht));if(!bt)return!1;var zt=bt.index+bt[0].length;ut[dt]=Ft.slice(0,bt.index)+(!bt.index||zt==Ft.length?"":" ")+Ft.slice(zt)||null}else return!1;return!0})}),addLineWidget:oa(function(it,st,ht){return Lf(this,it,st,ht)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ht){return Fu(this,Jn(this,it),Jn(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=Jn(this,it),Fu(this,it,it,ht,"bookmark")},findMarksAt:function(it){it=Jn(this,it);var st=[],ht=Oe(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=Jn(this,it),st=Jn(this,st);var ut=[],dt=it.line;return this.iter(it.line,st.line+1,function(Ft){var bt=Ft.markedSpans;if(bt)for(var zt=0;zt<bt.length;zt++){var Rt=bt[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}),Jn(this,He(ht,st))},indexFromPos:function(it){it=Jn(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 la(ge(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 la(ge(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 wo&&(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),Dc(Mf(this));break}}if(it.history==this.history){var ut=[it.id];oA(it,function(dt){return ut.push(dt.id)},!0),it.history=new kh(null),it.history.done=_A(this.history.done,ut),it.history.undone=_A(this.history.undone,ut)}},iterLinkedDocs:function(it){oA(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Gr(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:oa(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))})}),la.prototype.eachLine=la.prototype.iter;var Oh=0;function bf(it){var st=this;if(cg(st),!(tr(st,it)||Ls(st.display,it))){ur(it),be&&(Oh=+new Date);var ht=Ca(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),bt=0,zt=function(){++bt==dt&&_s(st,function(){ht=Jn(st.doc,ht);var Ke={from:ht,to:ht,text:st.doc.splitLines(Ft.filter(function(Dn){return Dn!=null}).join(st.doc.lineSeparator())),origin:"paste"};Pu(st.doc,Ke),oh(st.doc,VA(Jn(st.doc,ht),Jn(st.doc,wu(Ke))))})()},Rt=function(Ke,Dn){if(st.options.allowDropFileTypes&&Bn(st.options.allowDropFileTypes,Ke.type)==-1){zt();return}var Yn=new FileReader;Yn.onerror=function(){return zt()},Yn.onload=function(){var hi=Yn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(hi)){zt();return}Ft[Dn]=hi,zt()},Yn.readAsText(Ke)},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 Ie=it.dataTransfer.getData("Text");if(Ie){var re;if(st.state.draggingText&&!st.state.draggingText.copy&&(re=st.listSelections()),sh(st.doc,VA(ht,ht)),re)for(var Ve=0;Ve<re.length;++Ve)uh(st.doc,"",re[Ve].anchor,re[Ve].head,"drag");st.replaceSelection(Ie,"around","paste"),st.display.input.focus()}}catch(Ke){}}}}function Tf(it,st){if(be&&(!it.state.draggingText||+new Date-Oh<100)){Ur(st);return}if(!(tr(it,st)||Ls(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!hn)){var ht=ue("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=Ca(it,st);if(ht){var ut=document.createDocumentFragment();po(it,ht,ut),it.display.dragCursor||(it.display.dragCursor=ue("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 Pl=!1;function Ja(){Pl||(Hh(),Pl=!0)}function Hh(){var it;wn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(pd)},100))}),wn(window,"blur",function(){return fg(th)})}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"},Oc=0;Oc<10;Oc++)LA[Oc+48]=LA[Oc+96]=String(Oc);for(var If=65;If<=90;If++)LA[If]=String.fromCharCode(If);for(var Hc=1;Hc<=12;Hc++)LA[Hc+111]=LA[Hc+63235]="F"+Hc;var dl={};dl.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"},dl.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"},dl.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"},dl.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"]},dl.default=ct?dl.macDefault:dl.pcDefault;function md(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ht,ut,dt,Ft,bt=0;bt<st.length-1;bt++){var zt=st[bt];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=bn(ht.split(" "),md),Ft=0;Ft<dt.length;Ft++){var bt=void 0,zt=void 0;Ft==dt.length-1?(zt=dt.join(" "),bt=ut):(zt=dt.slice(0,Ft+1).join(" "),bt="...");var Rt=st[zt];if(!Rt)st[zt]=bt;else if(Rt!=bt)throw new Error("Inconsistent bindings for "+zt)}delete it[ht]}for(var ee in st)it[ee]=st[ee];return it}function Fl(it,st,ht,ut){st=zs(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 Fl(it,st.fallthrough,ht,ut);for(var Ft=0;Ft<st.fallthrough.length;Ft++){var bt=Fl(it,st.fallthrough[Ft],ht,ut);if(bt)return bt}}}function Rh(it){var st=typeof it=="string"?it:LA[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Rc(it,st,ht){var ut=it;return st.altKey&&ut!="Alt"&&(it="Alt-"+it),(Et?st.metaKey:st.ctrlKey)&&ut!="Ctrl"&&(it="Ctrl-"+it),(Et?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),Rc(ht,it,st))}function zs(it){return typeof it=="string"?dl[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&&xn(Ft.from,le(ut).to)<=0;){var bt=ut.pop();if(xn(bt.from,Ft.from)<0){Ft.from=bt.from;break}}ut.push(Ft)}bo(it,function(){for(var zt=ut.length-1;zt>=0;zt--)uh(it.doc,"",ut[zt].from,ut[zt].to,"+delete");KA(it)})}function wd(it,st,ht){var ut=Xe(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 He(st.line,ut,ht<0?"after":"before")}function Gh(it,st,ht,ut,dt){if(it){st.doc.direction=="rtl"&&(dt=-dt);var Ft=jn(ht,st.doc.direction);if(Ft){var bt=dt<0?le(Ft):Ft[0],zt=dt<0==(bt.level==1),Rt=zt?"after":"before",ee;if(bt.level>0||st.doc.direction=="rtl"){var Ie=No(st,ht);ee=dt<0?ht.text.length-1:0;var re=ll(st,Ie,ee).top;ee=Ze(function(Ve){return ll(st,Ie,Ve).top==re},dt<0==(bt.level==1)?bt.from:bt.to-1,ee),Rt=="before"&&(ee=wd(ht,ee,1))}else ee=dt<0?bt.to:bt.from;return new He(ut,ee,Rt)}}return new He(ut,dt<0?ht.text.length:0,dt<0?"before":"after")}function zh(it,st,ht,ut){var dt=jn(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=an(dt,ht.ch,ht.sticky),bt=dt[Ft];if(it.doc.direction=="ltr"&&bt.level%2==0&&(ut>0?bt.to>ht.ch:bt.from<ht.ch))return Us(st,ht,ut);var zt=function(Mi,Zi){return wd(st,Mi instanceof He?Mi.ch:Mi,Zi)},Rt,ee=function(Mi){return it.options.lineWrapping?(Rt=Rt||No(it,st),Bl(it,st,Rt,Mi)):{begin:0,end:st.text.length}},Ie=ee(ht.sticky=="before"?zt(ht,-1):ht.ch);if(it.doc.direction=="rtl"||bt.level==1){var re=bt.level==1==ut<0,Ve=zt(ht,re?1:-1);if(Ve!=null&&(re?Ve<=bt.to&&Ve<=Ie.end:Ve>=bt.from&&Ve>=Ie.begin)){var Ke=re?"before":"after";return new He(ht.line,Ve,Ke)}}var Dn=function(Mi,Zi,zi){for(var lr=function(As,$s){return $s?new He(ht.line,zt(As,1),"before"):new He(ht.line,As,"after")};Mi>=0&&Mi<dt.length;Mi+=Zi){var kr=dt[Mi],Hi=Zi>0==(kr.level!=1),qr=Hi?zi.begin:zt(zi.end,-1);if(kr.from<=qr&&qr<kr.to||(qr=Hi?kr.from:zt(kr.to,-1),zi.begin<=qr&&qr<zi.end))return lr(qr,Hi)}},Yn=Dn(Ft+ut,ut,Ie);if(Yn)return Yn;var hi=ut>0?Ie.end:zt(Ie.begin,-1);return hi!=null&&!(ut>0&&hi==st.text.length)&&(Yn=Dn(ut>0?0:dt.length-1,ut,ee(hi)),Yn)?Yn:null}var Lu={selectAll:Qs,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),_e)},killLine:function(it){return ga(it,function(st){if(st.empty()){var ht=Oe(it.doc,st.head.line).text.length;return st.head.ch==ht&&st.head.line<it.lastLine()?{from:st.head,to:He(st.head.line+1,0)}:{from:st.head,to:He(st.head.line,ht)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return ga(it,function(st){return{from:He(st.from().line,0),to:Jn(it.doc,He(st.to().line+1,0))}})},delLineLeft:function(it){return ga(it,function(st){return{from:He(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(He(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(He(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return Kh(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 jh(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")},_n)},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")},_n)},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},_n)},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(),bt=Ce(it.getLine(Ft.line),Ft.ch,ut);st.push(Pi(ut-bt%ut))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return bo(it,function(){for(var st=it.listSelections(),ht=[],ut=0;ut<st.length;ut++)if(st[ut].empty()){var dt=st[ut].head,Ft=Oe(it.doc,dt.line).text;if(Ft){if(dt.ch==Ft.length&&(dt=new He(dt.line,dt.ch-1)),dt.ch>0)dt=new He(dt.line,dt.ch+1),it.replaceRange(Ft.charAt(dt.ch-1)+Ft.charAt(dt.ch-2),He(dt.line,dt.ch-2),dt,"+transpose");else if(dt.line>it.doc.first){var bt=Oe(it.doc,dt.line-1).text;bt&&(dt=new He(dt.line,1),it.replaceRange(Ft.charAt(0)+it.doc.lineSeparator()+bt.charAt(bt.length-1),He(dt.line-1,bt.length-1),dt,"+transpose"))}}ht.push(new Go(dt,dt))}it.setSelections(ht)})},newlineAndIndent:function(it){return bo(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);KA(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function Kh(it,st){var ht=Oe(it.doc,st),ut=oi(ht);return ut!=ht&&(st=Zt(ut)),Gh(!0,it,ut,st,1)}function jh(it,st){var ht=Oe(it.doc,st),ut=Ai(ht);return ut!=ht&&(st=Zt(ut)),Gh(!0,it,ht,st,-1)}function Sd(it,st){var ht=Kh(it,st.line),ut=Oe(it.doc,ht.line),dt=jn(ut,it.doc.direction);if(!dt||dt[0].level==0){var Ft=Math.max(ht.ch,ut.text.search(/\S/)),bt=st.line==ht.line&&st.ch<=Ft&&st.ch;return He(ht.line,bt?0:Ft,ht.sticky)}return ht}function Vh(it,st,ht){if(typeof st=="string"&&(st=Lu[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)!=ei}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=Fl(st,it.state.keyMaps[ut],ht,it);if(dt)return dt}return it.options.extraKeys&&Fl(st,it.options.extraKeys,ht,it)||Fl(st,it.options.keyMap,ht,it)}var EA=new _t;function ch(it,st,ht,ut){var dt=it.state.keySeq;if(dt){if(Rh(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())}),Gc(it,dt+" "+st,ht,ut))return!0}return Gc(it,st,ht,ut)}function Gc(it,st,ht,ut){var dt=xd(it,st,ut);return dt=="multi"&&(it.state.keySeq=st),dt=="handled"&&Vi(it,"keyHandled",it,st,ht),(dt=="handled"||dt=="multi")&&(ur(ht),Qo(it)),!!dt}function zc(it,st){var ht=yd(st,!0);return ht?st.shiftKey&&!it.state.keySeq?ch(it,"Shift-"+ht,st,function(ut){return Vh(it,ut,!0)})||ch(it,ht,st,function(ut){if(typeof ut=="string"?/^go[A-Z]/.test(ut):ut.motion)return Vh(it,ut)}):ch(it,ht,st,function(ut){return Vh(it,ut)}):!1}function Kc(it,st,ht){return ch(it,"'"+ht+"'",st,function(ut){return Vh(it,ut,!0)})}var Eu=null;function jc(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=vn(),!tr(st,it))){be&&xe<11&&it.keyCode==27&&(it.returnValue=!1);var ht=it.keyCode;st.display.shift=ht==16||it.shiftKey;var ut=zc(st,it);se&&(Eu=ut?ht:null,!ut&&ht==88&&!$i&&(ct?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),Nt&&!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;On(st,"CodeMirror-crosshair");function ht(ut){(ut.keyCode==18||!ut.altKey)&&(Xt(st,"CodeMirror-crosshair"),di(document,"keyup",ht),di(document,"mouseover",ht))}wn(document,"keyup",ht),wn(document,"mouseover",ht)}function Cd(it){it.keyCode==16&&(this.doc.sel.shift=!1),tr(this,it)}function hA(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Ls(st.display,it)||tr(st,it)||it.ctrlKey&&!it.altKey||ct&&it.metaKey)){var ht=it.keyCode,ut=it.charCode;if(se&&ht==Eu){Eu=null,ur(it);return}if(!(se&&(!it.which||it.which<10)&&zc(st,it))){var dt=String.fromCharCode(ut==null?ht:ut);dt!="\b"&&(Kc(st,it,dt)||st.display.input.onKeyPress(it))}}}var dg=400,_h=function(it,st,ht){this.time=it,this.pos=st,this.button=ht};_h.prototype.compare=function(it,st,ht){return this.time+dg>it&&xn(st,this.pos)==0&&ht==this.button};var YA,fh;function Nf(it,st){var ht=+new Date;return fh&&fh.compare(ht,it,st)?(YA=fh=null,"triple"):YA&&YA.compare(ht,it,st)?(fh=new _h(ht,it,st),YA=null,"double"):(YA=new _h(ht,it,st),fh=null,"single")}function Rl(it){var st=this,ht=st.display;if(!(tr(st,it)||ht.activeTouch&&ht.input.supportsTouch())){if(ht.input.ensurePolled(),ht.shift=it.shiftKey,Ls(ht,it)){ye||(ht.scroller.draggable=!1,setTimeout(function(){return ht.scroller.draggable=!0},100));return}if(!Df(st,it)){var ut=Ca(st,it),dt=lo(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):Er(it)==ht.scroller&&ur(it):dt==2?(ut&&Nh(st.doc,ut),setTimeout(function(){return ht.input.focus()},20)):dt==3&&(Tt?st.display.input.onContextMenu(it):gs(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,ch(it,Rc(Ft,dt),dt,function(bt){if(typeof bt=="string"&&(bt=Lu[bt]),!bt)return!1;var zt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),zt=bt(it,ht)!=ei}finally{it.state.suppressEdits=!1}return zt})}function Vc(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){be?setTimeout(Qi($o,it),0):it.curOp.focus=vn();var dt=Vc(it,ht,ut),Ft=it.doc.sel,bt;it.options.dragDrop&&Vo&&!it.isReadOnly()&&ht=="single"&&(bt=Ft.contains(st))>-1&&(xn((bt=Ft.ranges[bt]).from(),st)<0||st.xRel>0)&&(xn(bt.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,bt=_s(it,function(ee){ye&&(dt.scroller.draggable=!1),it.state.draggingText=!1,di(dt.wrapper.ownerDocument,"mouseup",bt),di(dt.wrapper.ownerDocument,"mousemove",zt),di(dt.scroller,"dragstart",Rt),di(dt.scroller,"drop",bt),Ft||(ur(ee),ut.addNew||Nh(it.doc,ht,null,null,ut.extend),ye&&!hn||be&&xe==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};ye&&(dt.scroller.draggable=!0),it.state.draggingText=bt,bt.copy=!ut.moveOnDrag,dt.scroller.dragDrop&&dt.scroller.dragDrop(),wn(dt.wrapper.ownerDocument,"mouseup",bt),wn(dt.wrapper.ownerDocument,"mousemove",zt),wn(dt.scroller,"dragstart",Rt),wn(dt.scroller,"drop",bt),gs(it),setTimeout(function(){return dt.input.focus()},20)}function Wh(it,st,ht){if(ht=="char")return new Go(st,st);if(ht=="word")return it.findWordAt(st);if(ht=="line")return new Go(He(st.line,0),Jn(it.doc,He(st.line+1,0)));var ut=ht(it,st);return new Go(ut.from,ut.to)}function gg(it,st,ht,ut){var dt=it.display,Ft=it.doc;ur(st);var bt,zt,Rt=Ft.sel,ee=Rt.ranges;if(ut.addNew&&!ut.extend?(zt=Ft.sel.contains(ht),zt>-1?bt=ee[zt]:bt=new Go(ht,ht)):(bt=Ft.sel.primary(),zt=Ft.sel.primIndex),ut.unit=="rectangle")ut.addNew||(bt=new Go(ht,ht)),ht=Ca(it,st,!0,!0),zt=-1;else{var Ie=Wh(it,ht,ut.unit);ut.extend?bt=Pf(bt,Ie.anchor,Ie.head,ut.extend):bt=Ie}ut.addNew?zt==-1?(zt=ee.length,Pa(Ft,Za(it,ee.concat([bt]),zt),{scroll:!1,origin:"*mouse"})):ee.length>1&&ee[zt].empty()&&ut.unit=="char"&&!ut.extend?(Pa(Ft,Za(it,ee.slice(0,zt).concat(ee.slice(zt+1)),0),{scroll:!1,origin:"*mouse"}),Rt=Ft.sel):Bu(Ft,zt,bt,Mn):(zt=0,Pa(Ft,new Ol([bt],0),Mn),Rt=Ft.sel);var re=ht;function Ve(zi){if(xn(re,zi)!=0)if(re=zi,ut.unit=="rectangle"){for(var lr=[],kr=it.options.tabSize,Hi=Ce(Oe(Ft,ht.line).text,ht.ch,kr),qr=Ce(Oe(Ft,zi.line).text,zi.ch,kr),As=Math.min(Hi,qr),$s=Math.max(Hi,qr),vs=Math.min(ht.line,zi.line),qa=Math.min(it.lastLine(),Math.max(ht.line,zi.line));vs<=qa;vs++){var Aa=Oe(Ft,vs).text,Ys=fi(Aa,As,kr);As==$s?lr.push(new Go(He(vs,Ys),He(vs,Ys))):Aa.length>Ys&&lr.push(new Go(He(vs,Ys),He(vs,fi(Aa,$s,kr))))}lr.length||lr.push(new Go(ht,ht)),Pa(Ft,Za(it,Rt.ranges.slice(0,zt).concat(lr),zt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(zi)}else{var Ga=bt,pa=Wh(it,zi,ut.unit),Di=Ga.anchor,mo;xn(pa.anchor,Di)>0?(mo=pa.head,Di=ni(Ga.from(),pa.anchor)):(mo=pa.anchor,Di=yi(Ga.to(),pa.head));var us=Rt.ranges.slice(0);us[zt]=Ld(it,new Go(Jn(Ft,Di),mo)),Pa(Ft,Za(it,us,zt),Mn)}}var Ke=dt.wrapper.getBoundingClientRect(),Dn=0;function Yn(zi){var lr=++Dn,kr=Ca(it,zi,!0,ut.unit=="rectangle");if(kr)if(xn(kr,re)!=0){it.curOp.focus=vn(),Ve(kr);var Hi=so(dt,Ft);(kr.line>=Hi.to||kr.line<Hi.from)&&setTimeout(_s(it,function(){Dn==lr&&Yn(zi)}),150)}else{var qr=zi.clientY<Ke.top?-20:zi.clientY>Ke.bottom?20:0;qr&&setTimeout(_s(it,function(){Dn==lr&&(dt.scroller.scrollTop+=qr,Yn(zi))}),50)}}function hi(zi){it.state.selectingText=!1,Dn=1/0,zi&&(ur(zi),dt.input.focus()),di(dt.wrapper.ownerDocument,"mousemove",Mi),di(dt.wrapper.ownerDocument,"mouseup",Zi),Ft.history.lastSelOrigin=null}var Mi=_s(it,function(zi){zi.buttons===0||!lo(zi)?hi(zi):Yn(zi)}),Zi=_s(it,hi);it.state.selectingText=Zi,wn(dt.wrapper.ownerDocument,"mousemove",Mi),wn(dt.wrapper.ownerDocument,"mouseup",Zi)}function Ld(it,st){var ht=st.anchor,ut=st.head,dt=Oe(it.doc,ht.line);if(xn(ht,ut)==0&&ht.sticky==ut.sticky)return st;var Ft=jn(dt);if(!Ft)return st;var bt=an(Ft,ht.ch,ht.sticky),zt=Ft[bt];if(zt.from!=ht.ch&&zt.to!=ht.ch)return st;var Rt=bt+(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 Ie=an(Ft,ut.ch,ut.sticky),re=Ie-bt||(ut.ch-ht.ch)*(zt.level==1?-1:1);Ie==Rt-1||Ie==Rt?ee=re<0:ee=re>0}var Ve=Ft[Rt+(ee?-1:0)],Ke=ee==(Ve.level==1),Dn=Ke?Ve.from:Ve.to,Yn=Ke?"after":"before";return ht.ch==Dn&&ht.sticky==Yn?st:new Go(new He(ht.line,Dn,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(Ve){return!1}if(dt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ut&&ur(st);var bt=it.display,zt=bt.lineDiv.getBoundingClientRect();if(Ft>zt.bottom||!pr(it,ht))return Bo(st);Ft-=zt.top-bt.viewOffset;for(var Rt=0;Rt<it.display.gutterSpecs.length;++Rt){var ee=bt.gutters.childNodes[Rt];if(ee&&ee.getBoundingClientRect().right>=dt){var Ie=Ue(it.doc,Ft),re=it.display.gutterSpecs[Rt];return hr(it,ht,it,Ie,re.className,st),Bo(st)}}}function Df(it,st){return Uf(it,st,"gutterClick",!0)}function _c(it,st){Ls(it.display,st)||dh(it,st)||tr(it,st,"contextmenu")||Tt||it.display.input.onContextMenu(st)}function dh(it,st){return pr(it,"gutterContextMenu")?Uf(it,st,"gutterContextMenu",!1):!1}function Yh(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Al(it)}var cA={toString:function(){return"CodeMirror.Init"}},Ed={},Wc={};function pg(it){var st=it.optionHandlers;function ht(ut,dt,Ft,bt){it.defaults[ut]=dt,Ft&&(st[ut]=bt?function(zt,Rt,ee){ee!=cA&&Ft(zt,Rt,ee)}:Ft)}it.defineOption=ht,it.Init=cA,ht("value","",function(ut,dt){return ut.setValue(dt)},!0),ht("mode",null,function(ut,dt){ut.doc.modeOption=dt,Jr(ut)},!0),ht("indentUnit",2,Jr,!0),ht("indentWithTabs",!1),ht("smartIndent",!0),ht("tabSize",4,function(ut){kc(ut),Al(ut),ns(ut)},!0),ht("lineSeparator",null,function(ut,dt){if(ut.doc.lineSep=dt,!!dt){var Ft=[],bt=ut.doc.first;ut.doc.iter(function(Rt){for(var ee=0;;){var Ie=Rt.text.indexOf(dt,ee);if(Ie==-1)break;ee=Ie+dt.length,Ft.push(He(bt,Ie))}bt++});for(var zt=Ft.length-1;zt>=0;zt--)uh(ut.doc,dt,Ft[zt],He(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!=cA&&ut.refresh()}),ht("specialCharPlaceholder",Rr,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){Yh(ut),Cl(ut)},!0),ht("keyMap","default",function(ut,dt,Ft){var bt=zs(dt),zt=Ft!=cA&&zs(Ft);zt&&zt.detach&&zt.detach(ut,bt),bt.attach&&bt.attach(ut,zt||null)}),ht("extraKeys",null),ht("configureMouse",null),ht("lineWrapping",!1,Md,!0),ht("gutters",[],function(ut,dt){ut.display.gutterSpecs=sa(dt,ut.options.lineNumbers),Cl(ut)},!0),ht("fixedGutter",!0,function(ut,dt){ut.display.gutters.style.left=dt?uu(ut.display)+"px":"0",ut.refresh()},!0),ht("coverGutterNextToScrollbar",!1,function(ut){return nA(ut)},!0),ht("scrollbarStyle","native",function(ut){ld(ut),nA(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=sa(ut.options.gutters,dt),Cl(ut)},!0),ht("firstLineNumber",1,Cl,!0),ht("lineNumberFormatter",function(ut){return ut},Cl,!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"&&(th(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,kc,!0),ht("addModeClass",!1,kc,!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,kc,!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!=cA;if(!st!=!ut){var dt=it.display.dragFunctions,Ft=st?wn:di;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?(On(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Xt(it.display.wrapper,"CodeMirror-wrap"),wr(it)),gr(it),ns(it),Al(it),setTimeout(function(){return nA(it)},100)}function wo(it,st){var ht=this;if(!(this instanceof wo))return new wo(it,st);this.options=st=st?Gn(st):{},Gn(Ed,st,!1);var ut=st.value;typeof ut=="string"?ut=new la(ut,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ut.modeOption=st.mode),this.doc=ut;var dt=new wo.inputStyles[st.inputStyle](this),Ft=this.display=new yu(it,ut,dt,st);Ft.wrapper.CodeMirror=this,Yh(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 _t,keySeq:null,specialChars:null},st.autofocus&&!nt&&Ft.input.focus(),be&&xe<11&&setTimeout(function(){return ht.display.input.reset(!0)},20),gh(this),Ja(),fu(this),this.curOp.forceUpdate=!0,Ws(this,ut),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ht.hasFocus()&&!ht.state.focused&&vo(ht)},20):th(this);for(var bt in Wc)Wc.hasOwnProperty(bt)&&Wc[bt](this,st[bt],cA);Gs(this),st.finishInit&&st.finishInit(this);for(var zt=0;zt<Mu.length;++zt)Mu[zt](this);du(this),ye&&st.lineWrapping&&getComputedStyle(Ft.lineDiv).textRendering=="optimizelegibility"&&(Ft.lineDiv.style.textRendering="auto")}wo.defaults=Ed,wo.optionHandlers=Wc;function gh(it){var st=it.display;wn(st.scroller,"mousedown",_s(it,Rl)),be&&xe<11?wn(st.scroller,"dblclick",_s(it,function(Rt){if(!tr(it,Rt)){var ee=Ca(it,Rt);if(!(!ee||Df(it,Rt)||Ls(it.display,Rt))){ur(Rt);var Ie=it.findWordAt(ee);Nh(it.doc,Ie.anchor,Ie.head)}}})):wn(st.scroller,"dblclick",function(Rt){return tr(it,Rt)||ur(Rt)}),wn(st.scroller,"contextmenu",function(Rt){return _c(it,Rt)}),wn(st.input.getField(),"contextmenu",function(Rt){st.scroller.contains(Rt.target)||_c(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 bt(Rt,ee){if(ee.left==null)return!0;var Ie=ee.left-Rt.left,re=ee.top-Rt.top;return Ie*Ie+re*re>20*20}wn(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)}}),wn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),wn(st.scroller,"touchend",function(Rt){var ee=st.activeTouch;if(ee&&!Ls(st,Rt)&&ee.left!=null&&!ee.moved&&new Date-ee.start<300){var Ie=it.coordsChar(st.activeTouch,"page"),re;!ee.prev||bt(ee,ee.prev)?re=new Go(Ie,Ie):!ee.prev.prev||bt(ee,ee.prev.prev)?re=it.findWordAt(Ie):re=new Go(He(Ie.line,0),Jn(it.doc,He(Ie.line+1,0))),it.setSelection(re.anchor,re.head),it.focus(),ur(Rt)}dt()}),wn(st.scroller,"touchcancel",dt),wn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(nh(it,st.scroller.scrollTop),jA(it,st.scroller.scrollLeft,!0),hr(it,"scroll",it))}),wn(st.scroller,"mousewheel",function(Rt){return aa(it,Rt)}),wn(st.scroller,"DOMMouseScroll",function(Rt){return aa(it,Rt)}),wn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Rt){tr(it,Rt)||Ur(Rt)},over:function(Rt){tr(it,Rt)||(hg(it,Rt),Ur(Rt))},start:function(Rt){return Tf(it,Rt)},drop:_s(it,bf),leave:function(Rt){tr(it,Rt)||cg(it)}};var zt=st.input.getField();wn(zt,"keyup",function(Rt){return Cd.call(it,Rt)}),wn(zt,"keydown",_s(it,jc)),wn(zt,"keypress",_s(it,hA)),wn(zt,"focus",function(Rt){return vo(it,Rt)}),wn(zt,"blur",function(Rt){return th(it,Rt)})}var Mu=[];wo.defineInitHook=function(it){return Mu.push(it)};function Ks(it,st,ht,ut){var dt=it.doc,Ft;ht==null&&(ht="add"),ht=="smart"&&(dt.mode.indent?Ft=Or(it,st).state:ht="prev");var bt=it.options.tabSize,zt=Oe(dt,st),Rt=Ce(zt.text,null,bt);zt.stateAfter&&(zt.stateAfter=null);var ee=zt.text.match(/^\s*/)[0],Ie;if(!ut&&!/\S/.test(zt.text))Ie=0,ht="not";else if(ht=="smart"&&(Ie=dt.mode.indent(Ft,zt.text.slice(ee.length),zt.text),Ie==ei||Ie>150)){if(!ut)return;ht="prev"}ht=="prev"?st>dt.first?Ie=Ce(Oe(dt,st-1).text,null,bt):Ie=0:ht=="add"?Ie=Rt+it.options.indentUnit:ht=="subtract"?Ie=Rt-it.options.indentUnit:typeof ht=="number"&&(Ie=Rt+ht),Ie=Math.max(0,Ie);var re="",Ve=0;if(it.options.indentWithTabs)for(var Ke=Math.floor(Ie/bt);Ke;--Ke)Ve+=bt,re+=" ";if(Ve<Ie&&(re+=Pi(Ie-Ve)),re!=ee)return uh(dt,re,He(st,0),He(st,ee.length),"+input"),zt.stateAfter=null,!0;for(var Dn=0;Dn<dt.sel.ranges.length;Dn++){var Yn=dt.sel.ranges[Dn];if(Yn.head.line==st&&Yn.head.ch<ee.length){var hi=He(st,ee.length);Bu(dt,Dn,new Go(hi,hi));break}}}var Ra=null;function ku(it){Ra=it}function Yc(it,st,ht,ut,dt){var Ft=it.doc;it.display.shift=!1,ut||(ut=Ft.sel);var bt=+new Date-200,zt=dt=="paste"||it.state.pasteIncoming>bt,Rt=Gr(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 Ie=0;Ie<Ra.text.length;Ie++)ee.push(Ft.splitLines(Ra.text[Ie]))}}else Rt.length==ut.ranges.length&&it.options.pasteLinesPerSelection&&(ee=bn(Rt,function(Mi){return[Mi]}));for(var re=it.curOp.updateInput,Ve=ut.ranges.length-1;Ve>=0;Ve--){var Ke=ut.ranges[Ve],Dn=Ke.from(),Yn=Ke.to();Ke.empty()&&(ht&&ht>0?Dn=He(Dn.line,Dn.ch-ht):it.state.overwrite&&!zt?Yn=He(Yn.line,Math.min(Oe(Ft,Yn.line).text.length,Yn.ch+le(Rt).length)):zt&&Ra&&Ra.lineWise&&Ra.text.join(`
`)==Rt.join(`
`)&&(Dn=Yn=He(Dn.line,0)));var hi={from:Dn,to:Yn,text:ee?ee[Ve%ee.length]:Rt,origin:dt||(zt?"paste":it.state.cutIncoming>bt?"cut":"+input")};Pu(it.doc,hi),Vi(it,"inputRead",it,hi)}st&&!zt&&Zh(it,st),KA(it),it.curOp.updateInput<2&&(it.curOp.updateInput=re),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Xh(it,st){var ht=it.clipboardData&&it.clipboardData.getData("Text");if(ht)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&bo(st,function(){return Yc(st,ht,0,null,"paste")}),!0}function Zh(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),bt=!1;if(Ft.electricChars){for(var zt=0;zt<Ft.electricChars.length;zt++)if(st.indexOf(Ft.electricChars.charAt(zt))>-1){bt=Ks(it,dt.head.line,"smart");break}}else Ft.electricInput&&Ft.electricInput.test(Oe(it.doc,dt.head.line).text.slice(0,dt.head.ch))&&(bt=Ks(it,dt.head.line,"smart"));bt&&Vi(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:He(dt,0),head:He(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=ue("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=ue("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ye?it.style.width="1000px":it.setAttribute("wrap","off"),Qt&&(it.style.border="1px solid black"),Rf(it),st}function XA(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,bt=Ft[ut];Ft[ut]==dt&&ut!="mode"||(Ft[ut]=dt,st.hasOwnProperty(ut)&&_s(this,st[ut])(this,dt,bt),hr(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"](zs(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:ra(function(ut,dt){var Ft=ut.token?ut:it.getMode(this.options,ut);if(Ft.startState)throw new Error("Overlays may not be stateful.");ci(this.state.overlays,{mode:Ft,modeSpec:ut,opaque:dt&&dt.opaque,priority:dt&&dt.priority||0},function(bt){return bt.priority}),this.state.modeGen++,ns(this)}),removeOverlay:ra(function(ut){for(var dt=this.state.overlays,Ft=0;Ft<dt.length;++Ft){var bt=dt[Ft].modeSpec;if(bt==ut||typeof ut=="string"&&bt.name==ut){dt.splice(Ft,1),this.state.modeGen++,ns(this);return}}}),indentLine:ra(function(ut,dt,Ft){typeof dt!="string"&&typeof dt!="number"&&(dt==null?dt=this.options.smartIndent?"smart":"prev":dt=dt?"add":"subtract"),fn(this.doc,ut)&&Ks(this,ut,dt,Ft)}),indentSelection:ra(function(ut){for(var dt=this.doc.sel.ranges,Ft=-1,bt=0;bt<dt.length;bt++){var zt=dt[bt];if(zt.empty())zt.head.line>Ft&&(Ks(this,zt.head.line,ut,!0),Ft=zt.head.line,bt==this.doc.sel.primIndex&&KA(this));else{var Rt=zt.from(),ee=zt.to(),Ie=Math.max(Ft,Rt.line);Ft=Math.min(this.lastLine(),ee.line-(ee.ch?0:1))+1;for(var re=Ie;re<Ft;++re)Ks(this,re,ut);var Ve=this.doc.sel.ranges;Rt.ch==0&&dt.length==Ve.length&&Ve[bt].from().ch>0&&Bu(this.doc,bt,new Go(Rt,Ve[bt].to()),_e)}}}),getTokenAt:function(ut,dt){return Bi(this,ut,dt)},getLineTokens:function(ut,dt){return Bi(this,He(ut),dt,!0)},getTokenTypeAt:function(ut){ut=Jn(this.doc,ut);var dt=vr(this,Oe(this.doc,ut.line)),Ft=0,bt=(dt.length-1)/2,zt=ut.ch,Rt;if(zt==0)Rt=dt[2];else for(;;){var ee=Ft+bt>>1;if((ee?dt[ee*2-1]:0)>=zt)bt=ee;else if(dt[ee*2+1]<zt)Ft=ee+1;else{Rt=dt[ee*2+2];break}}var Ie=Rt?Rt.indexOf("overlay "):-1;return Ie<0?Rt:Ie==0?null:Rt.slice(0,Ie-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 bt=ht[dt],zt=this.getModeAt(ut);if(typeof zt[dt]=="string")bt[zt[dt]]&&Ft.push(bt[zt[dt]]);else if(zt[dt])for(var Rt=0;Rt<zt[dt].length;Rt++){var ee=bt[zt[dt][Rt]];ee&&Ft.push(ee)}else zt.helperType&&bt[zt.helperType]?Ft.push(bt[zt.helperType]):bt[zt.name]&&Ft.push(bt[zt.name]);for(var Ie=0;Ie<bt._global.length;Ie++){var re=bt._global[Ie];re.pred(zt,this)&&Bn(Ft,re.val)==-1&&Ft.push(re.val)}return Ft},getStateAfter:function(ut,dt){var Ft=this.doc;return ut=En(Ft,ut==null?Ft.first+Ft.size-1:ut),Or(this,ut+1,dt).state},cursorCoords:function(ut,dt){var Ft,bt=this.doc.sel.primary();return ut==null?Ft=bt.head:typeof ut=="object"?Ft=Jn(this.doc,ut):Ft=ut?bt.from():bt.to(),fo(this,Ft,dt||"page")},charCoords:function(ut,dt){return Zr(this,Jn(this.doc,ut),dt||"page")},coordsChar:function(ut,dt){return ut=Po(this,ut,dt||"page"),os(this,ut.left,ut.top)},lineAtHeight:function(ut,dt){return ut=Po(this,{top:ut,left:0},dt||"page").top,Ue(this.doc,ut+this.display.viewOffset)},heightAtLine:function(ut,dt,Ft){var bt=!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,bt=!0),zt=Oe(this.doc,ut)}else zt=ut;return bs(this,zt,{top:0,left:0},dt||"page",Ft||bt).top+(bt?this.doc.height-or(zt):0)},defaultTextHeight:function(){return CA(this.display)},defaultCharWidth:function(){return $u(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ut,dt,Ft,bt,zt){var Rt=this.display;ut=fo(this,Jn(this.doc,ut));var ee=ut.bottom,Ie=ut.left;if(dt.style.position="absolute",dt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(dt),Rt.sizer.appendChild(dt),bt=="over")ee=ut.top;else if(bt=="above"||bt=="near"){var re=Math.max(Rt.wrapper.clientHeight,this.doc.height),Ve=Math.max(Rt.sizer.clientWidth,Rt.lineSpace.clientWidth);(bt=="above"||ut.bottom+dt.offsetHeight>re)&&ut.top>dt.offsetHeight?ee=ut.top-dt.offsetHeight:ut.bottom+dt.offsetHeight<=re&&(ee=ut.bottom),Ie+dt.offsetWidth>Ve&&(Ie=Ve-dt.offsetWidth)}dt.style.top=ee+"px",dt.style.left=dt.style.right="",zt=="right"?(Ie=Rt.sizer.clientWidth-dt.offsetWidth,dt.style.right="0px"):(zt=="left"?Ie=0:zt=="middle"&&(Ie=(Rt.sizer.clientWidth-dt.offsetWidth)/2),dt.style.left=Ie+"px"),Ft&&Lc(this,{left:Ie,top:ee,right:Ie+dt.offsetWidth,bottom:ee+dt.offsetHeight})},triggerOnKeyDown:ra(jc),triggerOnKeyPress:ra(hA),triggerOnKeyUp:Cd,triggerOnMouseDown:ra(Rl),execCommand:function(ut){if(Lu.hasOwnProperty(ut))return Lu[ut].call(null,this)},triggerElectric:ra(function(ut){Zh(this,ut)}),findPosH:function(ut,dt,Ft,bt){var zt=1;dt<0&&(zt=-1,dt=-dt);for(var Rt=Jn(this.doc,ut),ee=0;ee<dt&&(Rt=Jh(this.doc,Rt,zt,Ft,bt),!Rt.hitSide);++ee);return Rt},moveH:ra(function(ut,dt){var Ft=this;this.extendSelectionsBy(function(bt){return Ft.display.shift||Ft.doc.extend||bt.empty()?Jh(Ft.doc,bt.head,ut,dt,Ft.options.rtlMoveVisually):ut<0?bt.from():bt.to()},_n)}),deleteH:ra(function(ut,dt){var Ft=this.doc.sel,bt=this.doc;Ft.somethingSelected()?bt.replaceSelection("",null,"+delete"):ga(this,function(zt){var Rt=Jh(bt,zt.head,ut,dt,!1);return ut<0?{from:Rt,to:zt.head}:{from:zt.head,to:Rt}})}),findPosV:function(ut,dt,Ft,bt){var zt=1,Rt=bt;dt<0&&(zt=-1,dt=-dt);for(var ee=Jn(this.doc,ut),Ie=0;Ie<dt;++Ie){var re=fo(this,ee,"div");if(Rt==null?Rt=re.left:re.left=Rt,ee=bu(this,re,zt,Ft),ee.hitSide)break}return ee},moveV:ra(function(ut,dt){var Ft=this,bt=this.doc,zt=[],Rt=!this.display.shift&&!bt.extend&&bt.sel.somethingSelected();if(bt.extendSelectionsBy(function(Ie){if(Rt)return ut<0?Ie.from():Ie.to();var re=fo(Ft,Ie.head,"div");Ie.goalColumn!=null&&(re.left=Ie.goalColumn),zt.push(re.left);var Ve=bu(Ft,re,ut,dt);return dt=="page"&&Ie==bt.sel.primary()&&vf(Ft,Zr(Ft,Ve,"div").top-re.top),Ve},_n),zt.length)for(var ee=0;ee<bt.sel.ranges.length;ee++)bt.sel.ranges[ee].goalColumn=zt[ee]}),findWordAt:function(ut){var dt=this.doc,Ft=Oe(dt,ut.line).text,bt=ut.ch,zt=ut.ch;if(Ft){var Rt=this.getHelper(ut,"wordChars");(ut.sticky=="before"||zt==Ft.length)&&bt?--bt:++zt;for(var ee=Ft.charAt(bt),Ie=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)};bt>0&&Ie(Ft.charAt(bt-1));)--bt;for(;zt<Ft.length&&Ie(Ft.charAt(zt));)++zt}return new Go(He(ut.line,bt),He(ut.line,zt))},toggleOverwrite:function(ut){ut!=null&&ut==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?On(this.display.cursorDiv,"CodeMirror-overwrite"):Xt(this.display.cursorDiv,"CodeMirror-overwrite"),hr(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==vn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ra(function(ut,dt){PA(this,ut,dt)}),getScrollInfo:function(){var ut=this.display.scroller;return{left:ut.scrollLeft,top:ut.scrollTop,height:ut.scrollHeight-Es(this)-this.display.barHeight,width:ut.scrollWidth-Es(this)-this.display.barWidth,clientHeight:Ss(this),clientWidth:Hs(this)}},scrollIntoView:ra(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:He(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?yo(this,ut):yf(this,ut.from,ut.to,ut.margin)}),setSize:ra(function(ut,dt){var Ft=this,bt=function(Rt){return typeof Rt=="number"||/^\d+$/.test(String(Rt))?Rt+"px":Rt};ut!=null&&(this.display.wrapper.style.width=bt(ut)),dt!=null&&(this.display.wrapper.style.height=bt(dt)),this.options.lineWrapping&&Ba(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){zr(Ft,zt,"widget");break}}++zt}),this.curOp.forceUpdate=!0,hr(this,"refresh",this)}),operation:function(ut){return bo(this,ut)},startOperation:function(){return fu(this)},endOperation:function(){return du(this)},refresh:ra(function(){var ut=this.display.cachedTextHeight;ns(this),this.curOp.forceUpdate=!0,Al(this),PA(this,this.doc.scrollLeft,this.doc.scrollTop),mu(this.display),(ut==null||Math.abs(ut-CA(this.display))>.5||this.options.lineWrapping)&&gr(this),hr(this,"refresh",this)}),swapDoc:ra(function(ut){var dt=this.doc;return dt.cm=null,this.state.selectingText&&this.state.selectingText(),Ws(this,ut),Al(this),this.display.input.reset(),PA(this,ut.scrollLeft,ut.scrollTop),this.curOp.forceScroll=!0,Vi(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}},er(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,bt){it.registerHelper(ut,dt,bt),ht[ut]._global.push({pred:Ft,val:bt})}}function Jh(it,st,ht,ut,dt){var Ft=st,bt=ht,zt=Oe(it,st.line),Rt=dt&&it.direction=="rtl"?-ht:ht;function ee(){var Zi=st.line+Rt;return Zi<it.first||Zi>=it.first+it.size?!1:(st=new He(Zi,st.ch,st.sticky),zt=Oe(it,Zi))}function Ie(Zi){var zi;if(ut=="codepoint"){var lr=zt.text.charCodeAt(st.ch+(ut>0?0:-1));isNaN(lr)?zi=null:zi=new He(st.line,Math.max(0,Math.min(zt.text.length,st.ch+ht*(lr>=55296&&lr<56320?2:1))),-ht)}else dt?zi=zh(it.cm,zt,st,ht):zi=Us(zt,st,ht);if(zi==null)if(!Zi&&ee())st=Gh(dt,it.cm,zt,st.line,Rt);else return!1;else st=zi;return!0}if(ut=="char"||ut=="codepoint")Ie();else if(ut=="column")Ie(!0);else if(ut=="word"||ut=="group")for(var re=null,Ve=ut=="group",Ke=it.cm&&it.cm.getHelper(st,"wordChars"),Dn=!0;!(ht<0&&!Ie(!Dn));Dn=!1){var Yn=zt.text.charAt(st.ch)||`
`,hi=Kt(Yn,Ke)?"w":Ve&&Yn==`
`?"n":!Ve||/\s/.test(Yn)?null:"p";if(Ve&&!Dn&&!hi&&(hi="s"),re&&re!=hi){ht<0&&(ht=1,Ie(),st.sticky="after");break}if(hi&&(re=hi),ht>0&&!Ie(!Dn))break}var Mi=Nc(it,st,Ft,bt,!0);return Xn(Ft,Mi)&&(Mi.hitSide=!0),Mi}function bu(it,st,ht,ut){var dt=it.doc,Ft=st.left,bt;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);bt=(ht>0?st.bottom:st.top)+ht*Rt}else ut=="line"&&(bt=ht>0?st.bottom+3:st.top-3);for(var ee;ee=os(it,Ft,bt),!!ee.outside;){if(ht<0?bt<=0:bt>=dt.height){ee.hitSide=!0;break}bt+=ht*5}return ee}var Wo=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new _t,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Wo.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}wn(dt,"paste",function(zt){!Ft(zt)||tr(ut,zt)||Xh(zt,ut)||xe<=11&&setTimeout(_s(ut,function(){return st.updateFromDOM()}),20)}),wn(dt,"compositionstart",function(zt){st.composing={data:zt.data,done:!1}}),wn(dt,"compositionupdate",function(zt){st.composing||(st.composing={data:zt.data,done:!1})}),wn(dt,"compositionend",function(zt){st.composing&&(zt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),wn(dt,"touchstart",function(){return ht.forceCompositionEnd()}),wn(dt,"input",function(){st.composing||st.readFromDOMSoon()});function bt(zt){if(!(!Ft(zt)||tr(ut,zt))){if(ut.somethingSelected())ku({lineWise:!1,text:ut.getSelections()}),zt.type=="cut"&&ut.replaceSelection("",null,"cut");else if(ut.options.lineWiseCopyCut){var Rt=Hf(ut);ku({lineWise:!0,text:Rt.text}),zt.type=="cut"&&ut.operation(function(){ut.setSelections(Rt.ranges,0,_e),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 Ie=kd(),re=Ie.firstChild;ut.display.lineSpace.insertBefore(Ie,ut.display.lineSpace.firstChild),re.value=Ra.text.join(`
`);var Ve=document.activeElement;Vn(re),setTimeout(function(){ut.display.lineSpace.removeChild(Ie),Ve.focus(),Ve==dt&&ht.showPrimarySelection()},50)}}wn(dt,"copy",bt),wn(dt,"cut",bt)},Wo.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Wo.prototype.prepareSelection=function(){var it=hu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Wo.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Wo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wo.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),bt=MA(st,it.focusNode,it.focusOffset);if(!(Ft&&!Ft.bad&&bt&&!bt.bad&&xn(ni(Ft,bt),ut)==0&&xn(yi(Ft,bt),dt)==0)){var zt=st.display.view,Rt=ut.line>=st.display.viewFrom&&ZA(st,ut)||{node:zt[0].measure.map[2],offset:0},ee=dt.line<st.display.viewTo&&ZA(st,dt);if(!ee){var Ie=zt[zt.length-1].measure,re=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;ee={node:re[re.length-1],offset:re[re.length-2]-re[re.length-3]}}if(!Rt||!ee){it.removeAllRanges();return}var Ve=it.rangeCount&&it.getRangeAt(0),Ke;try{Ke=Le(Rt.node,Rt.offset,ee.offset,ee.node)}catch(Dn){}Ke&&(!Nt&&st.state.focused?(it.collapse(Rt.node,Rt.offset),Ke.collapsed||(it.removeAllRanges(),it.addRange(Ke))):(it.removeAllRanges(),it.addRange(Ke)),Ve&&it.anchorNode==null?it.addRange(Ve):Nt&&this.startGracePeriod()),this.rememberSelection()}},Wo.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)},Wo.prototype.showMultipleSelections=function(it){fe(this.cm.display.cursorDiv,it.cursors),fe(this.cm.display.selectionDiv,it.selection)},Wo.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Wo.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return sn(this.div,st)},Wo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wo.prototype.blur=function(){this.div.blur()},Wo.prototype.getField=function(){return this.div},Wo.prototype.supportsTouch=function(){return!0},Wo.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():bo(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)},Wo.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Wo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&Me&&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&&bo(st,function(){Pa(st.doc,VA(ht,ut),_e),(ht.bad||ut.bad)&&(st.curOp.selectionChanged=!0)})}}},Wo.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=He(ut.line-1,Oe(it.doc,ut.line-1).length)),dt.ch==Oe(it.doc,dt.line).text.length&&dt.line<it.lastLine()&&(dt=He(dt.line+1,0)),ut.line<st.viewFrom||dt.line>st.viewTo-1)return!1;var Ft,bt,zt;ut.line==st.viewFrom||(Ft=ul(it,ut.line))==0?(bt=Zt(st.view[0].line),zt=st.view[0].node):(bt=Zt(st.view[Ft].line),zt=st.view[Ft-1].node.nextSibling);var Rt=ul(it,dt.line),ee,Ie;if(Rt==st.view.length-1?(ee=st.viewTo-1,Ie=st.lineDiv.lastChild):(ee=Zt(st.view[Rt+1].line)-1,Ie=st.view[Rt+1].node.previousSibling),!zt)return!1;for(var re=it.doc.splitLines(Wl(it,zt,Ie,bt,ee)),Ve=pe(it.doc,He(bt,0),He(ee,Oe(it.doc,ee).text.length));re.length>1&&Ve.length>1;)if(le(re)==le(Ve))re.pop(),Ve.pop(),ee--;else if(re[0]==Ve[0])re.shift(),Ve.shift(),bt++;else break;for(var Ke=0,Dn=0,Yn=re[0],hi=Ve[0],Mi=Math.min(Yn.length,hi.length);Ke<Mi&&Yn.charCodeAt(Ke)==hi.charCodeAt(Ke);)++Ke;for(var Zi=le(re),zi=le(Ve),lr=Math.min(Zi.length-(re.length==1?Ke:0),zi.length-(Ve.length==1?Ke:0));Dn<lr&&Zi.charCodeAt(Zi.length-Dn-1)==zi.charCodeAt(zi.length-Dn-1);)++Dn;if(re.length==1&&Ve.length==1&&bt==ut.line)for(;Ke&&Ke>ut.ch&&Zi.charCodeAt(Zi.length-Dn-1)==zi.charCodeAt(zi.length-Dn-1);)Ke--,Dn++;re[re.length-1]=Zi.slice(0,Zi.length-Dn).replace(/^\u200b+/,""),re[0]=re[0].slice(Ke).replace(/\u200b+$/,"");var kr=He(bt,Ke),Hi=He(ee,Ve.length?le(Ve).length-Dn:0);if(re.length>1||re[0]||xn(kr,Hi))return uh(it.doc,re,kr,Hi,"+input"),!0},Wo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wo.prototype.reset=function(){this.forceCompositionEnd()},Wo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wo.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))},Wo.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&bo(this.cm,function(){return ns(it.cm)})},Wo.prototype.setUneditable=function(it){it.contentEditable="false"},Wo.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||_s(this.cm,Yc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Wo.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Wo.prototype.onContextMenu=function(){},Wo.prototype.resetPosition=function(){},Wo.prototype.needsContentAttribute=!0;function ZA(it,st){var ht=tA(it,st.line);if(!ht||ht.hidden)return null;var ut=Oe(it.doc,st.line),dt=ms(ht,ut,st.line),Ft=jn(ut,it.doc.direction),bt="left";if(Ft){var zt=an(Ft,st.ch);bt=zt%2?"right":"left"}var Rt=Xu(dt.map,st.ch,bt);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 Bs(it,st){return st&&(it.bad=!0),it}function Wl(it,st,ht,ut,dt){var Ft="",bt=!1,zt=it.doc.lineSeparator(),Rt=!1;function ee(Ke){return function(Dn){return Dn.id==Ke}}function Ie(){bt&&(Ft+=zt,Rt&&(Ft+=zt),bt=Rt=!1)}function re(Ke){Ke&&(Ie(),Ft+=Ke)}function Ve(Ke){if(Ke.nodeType==1){var Dn=Ke.getAttribute("cm-text");if(Dn){re(Dn);return}var Yn=Ke.getAttribute("cm-marker"),hi;if(Yn){var Mi=it.findMarks(He(ut,0),He(dt+1,0),ee(+Yn));Mi.length&&(hi=Mi[0].find(0))&&re(pe(it.doc,hi.from,hi.to).join(zt));return}if(Ke.getAttribute("contenteditable")=="false")return;var Zi=/^(pre|div|p|li|table|br)$/i.test(Ke.nodeName);if(!/^br$/i.test(Ke.nodeName)&&Ke.textContent.length==0)return;Zi&&Ie();for(var zi=0;zi<Ke.childNodes.length;zi++)Ve(Ke.childNodes[zi]);/^(pre|p)$/i.test(Ke.nodeName)&&(Rt=!0),Zi&&(bt=!0)}else Ke.nodeType==3&&re(Ke.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ve(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 Bs(it.clipPos(He(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 JA(Ft,st,ht)}}function JA(it,st,ht){var ut=it.text.firstChild,dt=!1;if(!st||!sn(ut,st))return Bs(He(Zt(it.line),0),!0);if(st==ut&&(dt=!0,st=ut.childNodes[ht],ht=0,!st)){var Ft=it.rest?le(it.rest):it.line;return Bs(He(Zt(Ft),Ft.text.length),dt)}var bt=st.nodeType==3?st:null,zt=st;for(!bt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(bt=st.firstChild,ht&&(ht=bt.nodeValue.length));zt.parentNode!=ut;)zt=zt.parentNode;var Rt=it.measure,ee=Rt.maps;function Ie(hi,Mi,Zi){for(var zi=-1;zi<(ee?ee.length:0);zi++)for(var lr=zi<0?Rt.map:ee[zi],kr=0;kr<lr.length;kr+=3){var Hi=lr[kr+2];if(Hi==hi||Hi==Mi){var qr=Zt(zi<0?it.line:it.rest[zi]),As=lr[kr]+Zi;return(Zi<0||Hi!=hi)&&(As=lr[kr+(Zi?1:0)]),He(qr,As)}}}var re=Ie(bt,zt,ht);if(re)return Bs(re,dt);for(var Ve=zt.nextSibling,Ke=bt?bt.nodeValue.length-ht:0;Ve;Ve=Ve.nextSibling){if(re=Ie(Ve,Ve.firstChild,0),re)return Bs(He(re.line,re.ch-Ke),dt);Ke+=Ve.textContent.length}for(var Dn=zt.previousSibling,Yn=ht;Dn;Dn=Dn.previousSibling){if(re=Ie(Dn,Dn.firstChild,-1),re)return Bs(He(re.line,re.ch+Yn),dt);Yn+=Dn.textContent.length}}var ls=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new _t,this.hasSelection=!1,this.composing=null};ls.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),Qt&&(dt.style.width="0px"),wn(dt,"input",function(){be&&xe>=9&&st.hasSelection&&(st.hasSelection=null),ht.poll()}),wn(dt,"paste",function(bt){tr(ut,bt)||Xh(bt,ut)||(ut.state.pasteIncoming=+new Date,ht.fastPoll())});function Ft(bt){if(!tr(ut,bt)){if(ut.somethingSelected())ku({lineWise:!1,text:ut.getSelections()});else if(ut.options.lineWiseCopyCut){var zt=Hf(ut);ku({lineWise:!0,text:zt.text}),bt.type=="cut"?ut.setSelections(zt.ranges,null,_e):(ht.prevInput="",dt.value=zt.text.join(`
`),Vn(dt))}else return;bt.type=="cut"&&(ut.state.cutIncoming=+new Date)}}wn(dt,"cut",Ft),wn(dt,"copy",Ft),wn(it.scroller,"paste",function(bt){if(!(Ls(it,bt)||tr(ut,bt))){if(!dt.dispatchEvent){ut.state.pasteIncoming=+new Date,ht.focus();return}var zt=new Event("paste");zt.clipboardData=bt.clipboardData,dt.dispatchEvent(zt)}}),wn(it.lineSpace,"selectstart",function(bt){Ls(it,bt)||ur(bt)}),wn(dt,"compositionstart",function(){var bt=ut.getCursor("from");ht.composing&&ht.composing.range.clear(),ht.composing={start:bt,range:ut.markText(bt,ut.getCursor("to"),{className:"CodeMirror-composing"})}}),wn(dt,"compositionend",function(){ht.composing&&(ht.poll(),ht.composing.range.clear(),ht.composing=null)})},ls.prototype.createField=function(it){this.wrapper=kd(),this.textarea=this.wrapper.firstChild},ls.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},ls.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ht=it.doc,ut=hu(it);if(it.options.moveInputWithCursor){var dt=fo(it,ht.sel.primary().head,"div"),Ft=st.wrapper.getBoundingClientRect(),bt=st.lineDiv.getBoundingClientRect();ut.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,dt.top+bt.top-Ft.top)),ut.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,dt.left+bt.left-Ft.left))}return ut},ls.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")},ls.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&&Vn(this.textarea),be&&xe>=9&&(this.hasSelection=ht)}else it||(this.prevInput=this.textarea.value="",be&&xe>=9&&(this.hasSelection=null))}},ls.prototype.getField=function(){return this.textarea},ls.prototype.supportsTouch=function(){return!1},ls.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||vn()!=this.textarea))try{this.textarea.focus()}catch(it){}},ls.prototype.blur=function(){this.textarea.blur()},ls.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ls.prototype.receivedFocus=function(){this.slowPoll()},ls.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},ls.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)},ls.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(be&&xe>=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 bt=0,zt=Math.min(ut.length,dt.length);bt<zt&&ut.charCodeAt(bt)==dt.charCodeAt(bt);)++bt;return bo(st,function(){Yc(st,dt.slice(bt),ut.length-bt,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},ls.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ls.prototype.onKeyPress=function(){be&&xe>=9&&(this.hasSelection=null),this.fastPoll()},ls.prototype.onContextMenu=function(it){var st=this,ht=st.cm,ut=ht.display,dt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Ft=Ca(ht,it),bt=ut.scroller.scrollTop;if(!Ft||se)return;var zt=ht.options.resetSelectionOnContextMenu;zt&&ht.doc.sel.contains(Ft)==-1&&_s(ht,Pa)(ht.doc,VA(Ft),_e);var Rt=dt.style.cssText,ee=st.wrapper.style.cssText,Ie=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",dt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-Ie.top-5)+"px; left: "+(it.clientX-Ie.left-5)+`px;
z-index: 1000; background: `+(be?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var re;ye&&(re=window.scrollY),ut.input.focus(),ye&&window.scrollTo(null,re),ut.input.reset(),ht.somethingSelected()||(dt.value=st.prevInput=" "),st.contextMenuPending=Ke,ut.selForContextMenu=ht.doc.sel,clearTimeout(ut.detectingSelectAll);function Ve(){if(dt.selectionStart!=null){var Yn=ht.somethingSelected(),hi="\u200B"+(Yn?dt.value:"");dt.value="\u21DA",dt.value=hi,st.prevInput=Yn?"":"\u200B",dt.selectionStart=1,dt.selectionEnd=hi.length,ut.selForContextMenu=ht.doc.sel}}function Ke(){if(st.contextMenuPending==Ke&&(st.contextMenuPending=!1,st.wrapper.style.cssText=ee,dt.style.cssText=Rt,be&&xe<9&&ut.scrollbars.setScrollTop(ut.scroller.scrollTop=bt),dt.selectionStart!=null)){(!be||be&&xe<9)&&Ve();var Yn=0,hi=function(){ut.selForContextMenu==ht.doc.sel&&dt.selectionStart==0&&dt.selectionEnd>0&&st.prevInput=="\u200B"?_s(ht,Qs)(ht):Yn++<10?ut.detectingSelectAll=setTimeout(hi,500):(ut.selForContextMenu=null,ut.input.reset())};ut.detectingSelectAll=setTimeout(hi,200)}}if(be&&xe>=9&&Ve(),Tt){Ur(it);var Dn=function(){di(window,"mouseup",Dn),setTimeout(Ke,20)};wn(window,"mouseup",Dn)}else setTimeout(Ke,50)},ls.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},ls.prototype.setUneditable=function(){},ls.prototype.needsContentAttribute=!1;function qh(it,st){if(st=st?Gn(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=vn();st.autofocus=ht==it||it.getAttribute("autofocus")!=null&&ht==document.body}function ut(){it.value=zt.getValue()}var dt;if(it.form&&(wn(it.form,"submit",ut),!st.leaveSubmitMethodAlone)){var Ft=it.form;dt=Ft.submit;try{var bt=Ft.submit=function(){ut(),Ft.submit=dt,Ft.submit(),Ft.submit=bt}}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&&(di(it.form,"submit",ut),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=dt))}},it.style.display="none";var zt=wo(function(Rt){return it.parentNode.insertBefore(Rt,it.nextSibling)},st);return zt}function Ll(it){it.off=di,it.on=wn,it.wheelEventPixels=fl,it.Doc=la,it.splitLines=Gr,it.countColumn=Ce,it.findColumn=fi,it.isWordChar=Ut,it.Pass=ei,it.signal=hr,it.Line=Pr,it.changeEnd=wu,it.scrollbarModel=ad,it.Pos=He,it.cmpPos=xn,it.modes=oo,it.mimeModes=Ko,it.resolveMode=xi,it.getMode=Se,it.modeExtensions=we,it.extendMode=de,it.copyState=Nn,it.startState=mi,it.innerMode=Un,it.commands=Lu,it.keyMap=dl,it.keyName=yd,it.isModifierKey=Rh,it.lookupKey=Fl,it.normalizeKeyMap=vd,it.StringStream=on,it.SharedTextMarker=uA,it.TextMarker=me,it.LineWidget=WA,it.e_preventDefault=ur,it.e_stopPropagation=Lo,it.e_stop=Ur,it.addClass=On,it.contains=sn,it.rmClass=Xt,it.keyNames=LA}pg(wo),XA(wo);var kA="iter insert remove copy getEditor constructor".split(" ");for(var $h in la.prototype)la.prototype.hasOwnProperty($h)&&Bn(kA,$h)<0&&(wo.prototype[$h]=function(it){return function(){return it.apply(this.doc,arguments)}}(la.prototype[$h]));return er(la),wo.inputStyles={textarea:ls,contenteditable:Wo},wo.defineMode=function(it){!wo.defaults.mode&&it!="null"&&(wo.defaults.mode=it),Fs.apply(this,arguments)},wo.defineMIME=Fi,wo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),wo.defineMIME("text/plain","null"),wo.defineExtension=function(it,st){wo.prototype[it]=st},wo.defineDocExtension=function(it,st){la.prototype[it]=st},wo.fromTextArea=qh,Ll(wo),wo.version="5.58.2",wo})},25419:function(Pn,vi,ne){(function(Nt){Nt(ne(89780),ne(15525),ne(98101))})(function(Nt){"use strict";Nt.defineMode("markdown",function(Fe,Te){var tn=Nt.getMode(Fe,"text/html"),be=tn.name=="null";function xe(Ce){if(Nt.findModeByName){var _t=Nt.findModeByName(Ce);_t&&(Ce=_t.mime||_t.mimes[0])}var Bn=Nt.getMode(Fe,Ce);return Bn.name=="null"?null:Bn}Te.highlightFormatting===void 0&&(Te.highlightFormatting=!1),Te.maxBlockquoteDepth===void 0&&(Te.maxBlockquoteDepth=0),Te.taskLists===void 0&&(Te.taskLists=!1),Te.strikethrough===void 0&&(Te.strikethrough=!1),Te.emoji===void 0&&(Te.emoji=!1),Te.fencedCodeBlockHighlighting===void 0&&(Te.fencedCodeBlockHighlighting=!0),Te.fencedCodeBlockDefaultMode===void 0&&(Te.fencedCodeBlockDefaultMode="text/plain"),Te.xml===void 0&&(Te.xml=!0),Te.tokenTypeOverrides===void 0&&(Te.tokenTypeOverrides={});var ye={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 De in ye)ye.hasOwnProperty(De)&&Te.tokenTypeOverrides[De]&&(ye[De]=Te.tokenTypeOverrides[De]);var Me=/^([*\-_])(?:\s*\1){2,}\s*$/,se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,hn=/^\[(x| )\](?=\s)/i,Be=Te.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,un=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Qt=/^[^#!\[\]*_\\<>` "'(~:]+/,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(Ce,_t,Bn){return _t.f=_t.inline=Bn,Bn(Ce,_t)}function yt(Ce,_t,Bn){return _t.f=_t.block=Bn,Bn(Ce,_t)}function Et(Ce){return!Ce||!/\S/.test(Ce.string)}function Tt(Ce){if(Ce.linkTitle=!1,Ce.linkHref=!1,Ce.linkText=!1,Ce.em=!1,Ce.strong=!1,Ce.strikethrough=!1,Ce.quote=0,Ce.indentedCode=!1,Ce.f==Xt){var _t=be;if(!_t){var Bn=Nt.innerMode(tn,Ce.htmlState);_t=Bn.mode.name=="xml"&&Bn.state.tagStart===null&&!Bn.state.context&&Bn.state.tokenize.isInText}_t&&(Ce.f=Ye,Ce.block=Yt,Ce.htmlState=null)}return Ce.trailingSpace=0,Ce.trailingSpaceNewLine=!1,Ce.prevLine=Ce.thisLine,Ce.thisLine={stream:null},null}function Yt(Ce,_t){var Bn=Ce.column()===_t.indentation,Si=Et(_t.prevLine.stream),ei=_t.indentedCode,_e=_t.prevLine.hr,Mn=_t.list!==!1,_n=(_t.listStack[_t.listStack.length-1]||0)+3;_t.indentedCode=!1;var fi=_t.indentation;if(_t.indentationDiff===null&&(_t.indentationDiff=_t.indentation,Mn)){for(_t.list=null;fi<_t.listStack[_t.listStack.length-1];)_t.listStack.pop(),_t.listStack.length?_t.indentation=_t.listStack[_t.listStack.length-1]:_t.list=!1;_t.list!==!1&&(_t.indentationDiff=fi-_t.listStack[_t.listStack.length-1])}var Kn=!Si&&!_e&&!_t.prevLine.header&&(!Mn||!ei)&&!_t.prevLine.fencedCodeEnd,Pi=(_t.list===!1||_e||Si)&&_t.indentation<=_n&&Ce.match(Me),le=null;if(_t.indentationDiff>=4&&(ei||_t.prevLine.fencedCodeEnd||_t.prevLine.header||Si))return Ce.skipToEnd(),_t.indentedCode=!0,ye.code;if(Ce.eatSpace())return null;if(Bn&&_t.indentation<=_n&&(le=Ce.match(Be))&&le[1].length<=6)return _t.quote=0,_t.header=le[1].length,_t.thisLine.header=!0,Te.highlightFormatting&&(_t.formatting="header"),_t.f=_t.inline,fe(_t);if(_t.indentation<=_n&&Ce.eat(">"))return _t.quote=Bn?1:_t.quote+1,Te.highlightFormatting&&(_t.formatting="quote"),Ce.eatSpace(),fe(_t);if(!Pi&&!_t.setext&&Bn&&_t.indentation<=_n&&(le=Ce.match(se))){var bn=le[1]?"ol":"ul";return _t.indentation=fi+Ce.current().length,_t.list=!0,_t.quote=0,_t.listStack.push(_t.indentation),_t.em=!1,_t.strong=!1,_t.code=!1,_t.strikethrough=!1,Te.taskLists&&Ce.match(hn,!1)&&(_t.taskList=!0),_t.f=_t.inline,Te.highlightFormatting&&(_t.formatting=["list","list-"+bn]),fe(_t)}else{if(Bn&&_t.indentation<=_n&&(le=Ce.match(et,!0)))return _t.quote=0,_t.fencedEndRE=new RegExp(le[1]+"+ *$"),_t.localMode=Te.fencedCodeBlockHighlighting&&xe(le[2]||Te.fencedCodeBlockDefaultMode),_t.localMode&&(_t.localState=Nt.startState(_t.localMode)),_t.f=_t.block=he,Te.highlightFormatting&&(_t.formatting="code-block"),_t.code=-1,fe(_t);if(_t.setext||(!Kn||!Mn)&&!_t.quote&&_t.list===!1&&!_t.code&&!Pi&&!nt.test(Ce.string)&&(le=Ce.lookAhead(1))&&(le=le.match(un)))return _t.setext?(_t.header=_t.setext,_t.setext=0,Ce.skipToEnd(),Te.highlightFormatting&&(_t.formatting="header")):(_t.header=le[0].charAt(0)=="="?1:2,_t.setext=_t.header),_t.thisLine.header=!0,_t.f=_t.inline,fe(_t);if(Pi)return Ce.skipToEnd(),_t.hr=!0,_t.thisLine.hr=!0,ye.hr;if(Ce.peek()==="[")return gt(Ce,_t,ri)}return gt(Ce,_t,_t.inline)}function Xt(Ce,_t){var Bn=tn.token(Ce,_t.htmlState);if(!be){var Si=Nt.innerMode(tn,_t.htmlState);(Si.mode.name=="xml"&&Si.state.tagStart===null&&!Si.state.context&&Si.state.tokenize.isInText||_t.md_inside&&Ce.current().indexOf(">")>-1)&&(_t.f=Ye,_t.block=Yt,_t.htmlState=null)}return Bn}function he(Ce,_t){var Bn=_t.listStack[_t.listStack.length-1]||0,Si=_t.indentation<Bn,ei=Bn+3;if(_t.fencedEndRE&&_t.indentation<=ei&&(Si||Ce.match(_t.fencedEndRE))){Te.highlightFormatting&&(_t.formatting="code-block");var _e;return Si||(_e=fe(_t)),_t.localMode=_t.localState=null,_t.block=Yt,_t.f=Ye,_t.fencedEndRE=null,_t.code=0,_t.thisLine.fencedCodeEnd=!0,Si?yt(Ce,_t,_t.block):_e}else return _t.localMode?_t.localMode.token(Ce,_t.localState):(Ce.skipToEnd(),ye.code)}function fe(Ce){var _t=[];if(Ce.formatting){_t.push(ye.formatting),typeof Ce.formatting=="string"&&(Ce.formatting=[Ce.formatting]);for(var Bn=0;Bn<Ce.formatting.length;Bn++)_t.push(ye.formatting+"-"+Ce.formatting[Bn]),Ce.formatting[Bn]==="header"&&_t.push(ye.formatting+"-"+Ce.formatting[Bn]+"-"+Ce.header),Ce.formatting[Bn]==="quote"&&(!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=Ce.quote?_t.push(ye.formatting+"-"+Ce.formatting[Bn]+"-"+Ce.quote):_t.push("error"))}if(Ce.taskOpen)return _t.push("meta"),_t.length?_t.join(" "):null;if(Ce.taskClosed)return _t.push("property"),_t.length?_t.join(" "):null;if(Ce.linkHref?_t.push(ye.linkHref,"url"):(Ce.strong&&_t.push(ye.strong),Ce.em&&_t.push(ye.em),Ce.strikethrough&&_t.push(ye.strikethrough),Ce.emoji&&_t.push(ye.emoji),Ce.linkText&&_t.push(ye.linkText),Ce.code&&_t.push(ye.code),Ce.image&&_t.push(ye.image),Ce.imageAltText&&_t.push(ye.imageAltText,"link"),Ce.imageMarker&&_t.push(ye.imageMarker)),Ce.header&&_t.push(ye.header,ye.header+"-"+Ce.header),Ce.quote&&(_t.push(ye.quote),!Te.maxBlockquoteDepth||Te.maxBlockquoteDepth>=Ce.quote?_t.push(ye.quote+"-"+Ce.quote):_t.push(ye.quote+"-"+Te.maxBlockquoteDepth)),Ce.list!==!1){var Si=(Ce.listStack.length-1)%3;Si?Si===1?_t.push(ye.list2):_t.push(ye.list3):_t.push(ye.list1)}return Ce.trailingSpaceNewLine?_t.push("trailing-space-new-line"):Ce.trailingSpace&&_t.push("trailing-space-"+(Ce.trailingSpace%2?"a":"b")),_t.length?_t.join(" "):null}function ue(Ce,_t){if(Ce.match(Qt,!0))return fe(_t)}function Ye(Ce,_t){var Bn=_t.text(Ce,_t);if(typeof Bn!="undefined")return Bn;if(_t.list)return _t.list=null,fe(_t);if(_t.taskList){var Si=Ce.match(hn,!0)[1]===" ";return Si?_t.taskOpen=!0:_t.taskClosed=!0,Te.highlightFormatting&&(_t.formatting="task"),_t.taskList=!1,fe(_t)}if(_t.taskOpen=!1,_t.taskClosed=!1,_t.header&&Ce.match(/^#+$/,!0))return Te.highlightFormatting&&(_t.formatting="header"),fe(_t);var ei=Ce.next();if(_t.linkTitle){_t.linkTitle=!1;var _e=ei;ei==="("&&(_e=")"),_e=(_e+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Mn="^\\s*(?:[^"+_e+"\\\\]+|\\\\\\\\|\\\\.)"+_e;if(Ce.match(new RegExp(Mn),!0))return ye.linkHref}if(ei==="`"){var _n=_t.formatting;Te.highlightFormatting&&(_t.formatting="code"),Ce.eatWhile("`");var fi=Ce.current().length;if(_t.code==0&&(!_t.quote||fi==1))return _t.code=fi,fe(_t);if(fi==_t.code){var Kn=fe(_t);return _t.code=0,Kn}else return _t.formatting=_n,fe(_t)}else if(_t.code)return fe(_t);if(ei==="\\"&&(Ce.next(),Te.highlightFormatting)){var Pi=fe(_t),le=ye.formatting+"-escape";return Pi?Pi+" "+le:le}if(ei==="!"&&Ce.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return _t.imageMarker=!0,_t.image=!0,Te.highlightFormatting&&(_t.formatting="image"),fe(_t);if(ei==="["&&_t.imageMarker&&Ce.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return _t.imageMarker=!1,_t.imageAltText=!0,Te.highlightFormatting&&(_t.formatting="image"),fe(_t);if(ei==="]"&&_t.imageAltText){Te.highlightFormatting&&(_t.formatting="image");var Pi=fe(_t);return _t.imageAltText=!1,_t.image=!1,_t.inline=_t.f=sn,Pi}if(ei==="["&&!_t.image)return _t.linkText&&Ce.match(/^.*?\]/)||(_t.linkText=!0,Te.highlightFormatting&&(_t.formatting="link")),fe(_t);if(ei==="]"&&_t.linkText){Te.highlightFormatting&&(_t.formatting="link");var Pi=fe(_t);return _t.linkText=!1,_t.inline=_t.f=Ce.match(/\(.*?\)| ?\[.*?\]/,!1)?sn:Ye,Pi}if(ei==="<"&&Ce.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){_t.f=_t.inline=Le,Te.highlightFormatting&&(_t.formatting="link");var Pi=fe(_t);return Pi?Pi+=" ":Pi="",Pi+ye.linkInline}if(ei==="<"&&Ce.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){_t.f=_t.inline=Le,Te.highlightFormatting&&(_t.formatting="link");var Pi=fe(_t);return Pi?Pi+=" ":Pi="",Pi+ye.linkEmail}if(Te.xml&&ei==="<"&&Ce.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var bn=Ce.string.indexOf(">",Ce.pos);if(bn!=-1){var ci=Ce.string.substring(Ce.start,bn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ci)&&(_t.md_inside=!0)}return Ce.backUp(1),_t.htmlState=Nt.startState(tn),yt(Ce,_t,Xt)}if(Te.xml&&ei==="<"&&Ce.match(/^\/\w*?>/))return _t.md_inside=!1,"tag";if(ei==="*"||ei==="_"){for(var Ht=1,Lt=Ce.pos==1?" ":Ce.string.charAt(Ce.pos-2);Ht<3&&Ce.eat(ei);)Ht++;var Ct=Ce.peek()||" ",Ut=!/\s/.test(Ct)&&(!ct.test(Ct)||/\s/.test(Lt)||ct.test(Lt)),Kt=!/\s/.test(Lt)&&(!ct.test(Lt)||/\s/.test(Ct)||ct.test(Ct)),kt=null,Pe=null;if(Ht%2&&(!_t.em&&Ut&&(ei==="*"||!Kt||ct.test(Lt))?kt=!0:_t.em==ei&&Kt&&(ei==="*"||!Ut||ct.test(Ct))&&(kt=!1)),Ht>1&&(!_t.strong&&Ut&&(ei==="*"||!Kt||ct.test(Lt))?Pe=!0:_t.strong==ei&&Kt&&(ei==="*"||!Ut||ct.test(Ct))&&(Pe=!1)),Pe!=null||kt!=null){Te.highlightFormatting&&(_t.formatting=kt==null?"strong":Pe==null?"em":"strong em"),kt===!0&&(_t.em=ei),Pe===!0&&(_t.strong=ei);var Kn=fe(_t);return kt===!1&&(_t.em=!1),Pe===!1&&(_t.strong=!1),Kn}}else if(ei===" "&&(Ce.eat("*")||Ce.eat("_"))){if(Ce.peek()===" ")return fe(_t);Ce.backUp(1)}if(Te.strikethrough){if(ei==="~"&&Ce.eatWhile(ei)){if(_t.strikethrough){Te.highlightFormatting&&(_t.formatting="strikethrough");var Kn=fe(_t);return _t.strikethrough=!1,Kn}else if(Ce.match(/^[^\s]/,!1))return _t.strikethrough=!0,Te.highlightFormatting&&(_t.formatting="strikethrough"),fe(_t)}else if(ei===" "&&Ce.match(/^~~/,!0)){if(Ce.peek()===" ")return fe(_t);Ce.backUp(2)}}if(Te.emoji&&ei===":"&&Ce.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){_t.emoji=!0,Te.highlightFormatting&&(_t.formatting="emoji");var dn=fe(_t);return _t.emoji=!1,dn}return ei===" "&&(Ce.match(/^ +$/,!1)?_t.trailingSpace++:_t.trailingSpace&&(_t.trailingSpaceNewLine=!0)),fe(_t)}function Le(Ce,_t){var Bn=Ce.next();if(Bn===">"){_t.f=_t.inline=Ye,Te.highlightFormatting&&(_t.formatting="link");var Si=fe(_t);return Si?Si+=" ":Si="",Si+ye.linkInline}return Ce.match(/^[^>]+/,!0),ye.linkInline}function sn(Ce,_t){if(Ce.eatSpace())return null;var Bn=Ce.next();return Bn==="("||Bn==="["?(_t.f=_t.inline=On(Bn==="("?")":"]"),Te.highlightFormatting&&(_t.formatting="link-string"),_t.linkHref=!0,fe(_t)):"error"}var vn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function On(Ce){return function(_t,Bn){var Si=_t.next();if(Si===Ce){Bn.f=Bn.inline=Ye,Te.highlightFormatting&&(Bn.formatting="link-string");var ei=fe(Bn);return Bn.linkHref=!1,ei}return _t.match(vn[Ce]),Bn.linkHref=!0,fe(Bn)}}function ri(Ce,_t){return Ce.match(/^([^\]\\]|\\.)*\]:/,!1)?(_t.f=Vn,Ce.next(),Te.highlightFormatting&&(_t.formatting="link"),_t.linkText=!0,fe(_t)):gt(Ce,_t,Ye)}function Vn(Ce,_t){if(Ce.match(/^\]:/,!0)){_t.f=_t.inline=Qi,Te.highlightFormatting&&(_t.formatting="link");var Bn=fe(_t);return _t.linkText=!1,Bn}return Ce.match(/^([^\]\\]|\\.)+/,!0),ye.linkText}function Qi(Ce,_t){return Ce.eatSpace()?null:(Ce.match(/^[^\s]+/,!0),Ce.peek()===void 0?_t.linkTitle=!0:Ce.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),_t.f=_t.inline=Ye,ye.linkHref+" url")}var Gn={startState:function(){return{f:Yt,prevLine:{stream:null},thisLine:{stream:null},block:Yt,htmlState:null,indentation:0,inline:Ye,text:ue,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(Ce){return{f:Ce.f,prevLine:Ce.prevLine,thisLine:Ce.thisLine,block:Ce.block,htmlState:Ce.htmlState&&Nt.copyState(tn,Ce.htmlState),indentation:Ce.indentation,localMode:Ce.localMode,localState:Ce.localMode?Nt.copyState(Ce.localMode,Ce.localState):null,inline:Ce.inline,text:Ce.text,formatting:!1,linkText:Ce.linkText,linkTitle:Ce.linkTitle,linkHref:Ce.linkHref,code:Ce.code,em:Ce.em,strong:Ce.strong,strikethrough:Ce.strikethrough,emoji:Ce.emoji,header:Ce.header,setext:Ce.setext,hr:Ce.hr,taskList:Ce.taskList,list:Ce.list,listStack:Ce.listStack.slice(0),quote:Ce.quote,indentedCode:Ce.indentedCode,trailingSpace:Ce.trailingSpace,trailingSpaceNewLine:Ce.trailingSpaceNewLine,md_inside:Ce.md_inside,fencedEndRE:Ce.fencedEndRE}},token:function(Ce,_t){if(_t.formatting=!1,Ce!=_t.thisLine.stream){if(_t.header=0,_t.hr=!1,Ce.match(/^\s*$/,!0))return Tt(_t),null;if(_t.prevLine=_t.thisLine,_t.thisLine={stream:Ce},_t.taskList=!1,_t.trailingSpace=0,_t.trailingSpaceNewLine=!1,!_t.localState&&(_t.f=_t.block,_t.f!=Xt)){var Bn=Ce.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(_t.indentation=Bn,_t.indentationDiff=null,Bn>0)return null}}return _t.f(Ce,_t)},innerMode:function(Ce){return Ce.block==Xt?{state:Ce.htmlState,mode:tn}:Ce.localState?{state:Ce.localState,mode:Ce.localMode}:{state:Ce,mode:Gn}},indent:function(Ce,_t,Bn){return Ce.block==Xt&&tn.indent?tn.indent(Ce.htmlState,_t,Bn):Ce.localState&&Ce.localMode.indent?Ce.localMode.indent(Ce.localState,_t,Bn):Nt.Pass},blankLine:Tt,getType:fe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Gn},"xml"),Nt.defineMIME("text/markdown","markdown"),Nt.defineMIME("text/x-markdown","markdown")})},98101:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){"use strict";Nt.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 Fe=0;Fe<Nt.modeInfo.length;Fe++){var Te=Nt.modeInfo[Fe];Te.mimes&&(Te.mime=Te.mimes[0])}Nt.findModeByMIME=function(tn){tn=tn.toLowerCase();for(var be=0;be<Nt.modeInfo.length;be++){var xe=Nt.modeInfo[be];if(xe.mime==tn)return xe;if(xe.mimes){for(var ye=0;ye<xe.mimes.length;ye++)if(xe.mimes[ye]==tn)return xe}}if(/\+xml$/.test(tn))return Nt.findModeByMIME("application/xml");if(/\+json$/.test(tn))return Nt.findModeByMIME("application/json")},Nt.findModeByExtension=function(tn){tn=tn.toLowerCase();for(var be=0;be<Nt.modeInfo.length;be++){var xe=Nt.modeInfo[be];if(xe.ext){for(var ye=0;ye<xe.ext.length;ye++)if(xe.ext[ye]==tn)return xe}}},Nt.findModeByFileName=function(tn){for(var be=0;be<Nt.modeInfo.length;be++){var xe=Nt.modeInfo[be];if(xe.file&&xe.file.test(tn))return xe}var ye=tn.lastIndexOf("."),De=ye>-1&&tn.substring(ye+1,tn.length);if(De)return Nt.findModeByExtension(De)},Nt.findModeByName=function(tn){tn=tn.toLowerCase();for(var be=0;be<Nt.modeInfo.length;be++){var xe=Nt.modeInfo[be];if(xe.name.toLowerCase()==tn)return xe;if(xe.alias){for(var ye=0;ye<xe.alias.length;ye++)if(xe.alias[ye].toLowerCase()==tn)return xe}}}})},67549:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){"use strict";Nt.defineMode("stex",function(Fe,Te){"use strict";function tn(Qt,et){Qt.cmdState.push(et)}function be(Qt){return Qt.cmdState.length>0?Qt.cmdState[Qt.cmdState.length-1]:null}function xe(Qt){var et=Qt.cmdState.pop();et&&et.closeBracket()}function ye(Qt){for(var et=Qt.cmdState,nt=et.length-1;nt>=0;nt--){var ct=et[nt];if(ct.name!="DEFAULT")return ct}return{styleIdentifier:function(){return null}}}function De(Qt,et,nt){return function(){this.name=Qt,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 Me={};Me.importmodule=De("importmodule","tag",["string","builtin"]),Me.documentclass=De("documentclass","tag",["","atom"]),Me.usepackage=De("usepackage","tag",["atom"]),Me.begin=De("begin","tag",["atom"]),Me.end=De("end","tag",["atom"]),Me.label=De("label","tag",["atom"]),Me.ref=De("ref","tag",["atom"]),Me.eqref=De("eqref","tag",["atom"]),Me.cite=De("cite","tag",["atom"]),Me.bibitem=De("bibitem","tag",["atom"]),Me.Bibitem=De("Bibitem","tag",["atom"]),Me.RBibitem=De("RBibitem","tag",["atom"]),Me.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function se(Qt,et){Qt.f=et}function hn(Qt,et){var nt;if(Qt.match(/^\\[a-zA-Z@]+/)){var ct=Qt.current().slice(1);return nt=Me.hasOwnProperty(ct)?Me[ct]:Me.DEFAULT,nt=new nt,tn(et,nt),se(et,un),nt.style}if(Qt.match(/^\\[$&%#{}_]/)||Qt.match(/^\\[,;!\/\\]/))return"tag";if(Qt.match("\\["))return se(et,function(gt,yt){return Be(gt,yt,"\\]")}),"keyword";if(Qt.match("\\("))return se(et,function(gt,yt){return Be(gt,yt,"\\)")}),"keyword";if(Qt.match("$$"))return se(et,function(gt,yt){return Be(gt,yt,"$$")}),"keyword";if(Qt.match("$"))return se(et,function(gt,yt){return Be(gt,yt,"$")}),"keyword";var lt=Qt.next();if(lt=="%")return Qt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=be(et),nt)nt.closeBracket(lt),se(et,un);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=Me.DEFAULT,nt=new nt,tn(et,nt),"bracket"):/\d/.test(lt)?(Qt.eatWhile(/[\w.%]/),"atom"):(Qt.eatWhile(/[\w\-_]/),nt=ye(et),nt.name=="begin"&&(nt.argument=Qt.current()),nt.styleIdentifier())}function Be(Qt,et,nt){if(Qt.eatSpace())return null;if(nt&&Qt.match(nt))return se(et,hn),"keyword";if(Qt.match(/^\\[a-zA-Z@]+/))return"tag";if(Qt.match(/^[a-zA-Z]+/))return"variable-2";if(Qt.match(/^\\[$&%#{}_]/)||Qt.match(/^\\[,;!\/]/)||Qt.match(/^[\^_&]/))return"tag";if(Qt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Qt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ct=Qt.next();return ct=="{"||ct=="}"||ct=="["||ct=="]"||ct=="("||ct==")"?"bracket":ct=="%"?(Qt.skipToEnd(),"comment"):"error"}function un(Qt,et){var nt=Qt.peek(),ct;return nt=="{"||nt=="["?(ct=be(et),ct.openBracket(nt),Qt.eat(nt),se(et,hn),"bracket"):/[ \t\r]/.test(nt)?(Qt.eat(nt),null):(se(et,hn),xe(et),hn(Qt,et))}return{startState:function(){var Qt=Te.inMathMode?function(et,nt){return Be(et,nt)}:hn;return{cmdState:[],f:Qt}},copyState:function(Qt){return{cmdState:Qt.cmdState.slice(),f:Qt.f}},token:function(Qt,et){return et.f(Qt,et)},blankLine:function(Qt){Qt.f=hn,Qt.cmdState.length=0},lineComment:"%"}}),Nt.defineMIME("text/x-stex","stex"),Nt.defineMIME("text/x-latex","stex")})},15525:function(Pn,vi,ne){(function(Nt){Nt(ne(89780))})(function(Nt){"use strict";var Fe={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},Te={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};Nt.defineMode("xml",function(tn,be){var xe=tn.indentUnit,ye={},De=be.htmlMode?Fe:Te;for(var Me in De)ye[Me]=De[Me];for(var Me in be)ye[Me]=be[Me];var se,hn;function Be(Le,sn){function vn(Vn){return sn.tokenize=Vn,Vn(Le,sn)}var On=Le.next();if(On=="<")return Le.eat("!")?Le.eat("[")?Le.match("CDATA[")?vn(et("atom","]]>")):null:Le.match("--")?vn(et("comment","-->")):Le.match("DOCTYPE",!0,!0)?(Le.eatWhile(/[\w\._\-]/),vn(nt(1))):null:Le.eat("?")?(Le.eatWhile(/[\w\._\-]/),sn.tokenize=et("meta","?>"),"meta"):(se=Le.eat("/")?"closeTag":"openTag",sn.tokenize=un,"tag bracket");if(On=="&"){var ri;return Le.eat("#")?Le.eat("x")?ri=Le.eatWhile(/[a-fA-F\d]/)&&Le.eat(";"):ri=Le.eatWhile(/[\d]/)&&Le.eat(";"):ri=Le.eatWhile(/[\w\.\-:]/)&&Le.eat(";"),ri?"atom":"error"}else return Le.eatWhile(/[^&<]/),null}Be.isInText=!0;function un(Le,sn){var vn=Le.next();if(vn==">"||vn=="/"&&Le.eat(">"))return sn.tokenize=Be,se=vn==">"?"endTag":"selfcloseTag","tag bracket";if(vn=="=")return se="equals",null;if(vn=="<"){sn.tokenize=Be,sn.state=yt,sn.tagName=sn.tagStart=null;var On=sn.tokenize(Le,sn);return On?On+" tag error":"tag error"}else return/[\'\"]/.test(vn)?(sn.tokenize=Qt(vn),sn.stringStartCol=Le.column(),sn.tokenize(Le,sn)):(Le.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Qt(Le){var sn=function(vn,On){for(;!vn.eol();)if(vn.next()==Le){On.tokenize=un;break}return"string"};return sn.isInAttribute=!0,sn}function et(Le,sn){return function(vn,On){for(;!vn.eol();){if(vn.match(sn)){On.tokenize=Be;break}vn.next()}return Le}}function nt(Le){return function(sn,vn){for(var On;(On=sn.next())!=null;){if(On=="<")return vn.tokenize=nt(Le+1),vn.tokenize(sn,vn);if(On==">")if(Le==1){vn.tokenize=Be;break}else return vn.tokenize=nt(Le-1),vn.tokenize(sn,vn)}return"meta"}}function ct(Le,sn,vn){this.prev=Le.context,this.tagName=sn,this.indent=Le.indented,this.startOfLine=vn,(ye.doNotIndent.hasOwnProperty(sn)||Le.context&&Le.context.noIndent)&&(this.noIndent=!0)}function lt(Le){Le.context&&(Le.context=Le.context.prev)}function gt(Le,sn){for(var vn;;){if(!Le.context||(vn=Le.context.tagName,!ye.contextGrabbers.hasOwnProperty(vn)||!ye.contextGrabbers[vn].hasOwnProperty(sn)))return;lt(Le)}}function yt(Le,sn,vn){return Le=="openTag"?(vn.tagStart=sn.column(),Et):Le=="closeTag"?Tt:yt}function Et(Le,sn,vn){return Le=="word"?(vn.tagName=sn.current(),hn="tag",he):ye.allowMissingTagName&&Le=="endTag"?(hn="tag bracket",he(Le,sn,vn)):(hn="error",Et)}function Tt(Le,sn,vn){if(Le=="word"){var On=sn.current();return vn.context&&vn.context.tagName!=On&&ye.implicitlyClosed.hasOwnProperty(vn.context.tagName)&&lt(vn),vn.context&&vn.context.tagName==On||ye.matchClosing===!1?(hn="tag",Yt):(hn="tag error",Xt)}else return ye.allowMissingTagName&&Le=="endTag"?(hn="tag bracket",Yt(Le,sn,vn)):(hn="error",Xt)}function Yt(Le,sn,vn){return Le!="endTag"?(hn="error",Yt):(lt(vn),yt)}function Xt(Le,sn,vn){return hn="error",Yt(Le,sn,vn)}function he(Le,sn,vn){if(Le=="word")return hn="attribute",fe;if(Le=="endTag"||Le=="selfcloseTag"){var On=vn.tagName,ri=vn.tagStart;return vn.tagName=vn.tagStart=null,Le=="selfcloseTag"||ye.autoSelfClosers.hasOwnProperty(On)?gt(vn,On):(gt(vn,On),vn.context=new ct(vn,On,ri==vn.indented)),yt}return hn="error",he}function fe(Le,sn,vn){return Le=="equals"?ue:(ye.allowMissing||(hn="error"),he(Le,sn,vn))}function ue(Le,sn,vn){return Le=="string"?Ye:Le=="word"&&ye.allowUnquoted?(hn="string",he):(hn="error",he(Le,sn,vn))}function Ye(Le,sn,vn){return Le=="string"?Ye:he(Le,sn,vn)}return{startState:function(Le){var sn={tokenize:Be,state:yt,indented:Le||0,tagName:null,tagStart:null,context:null};return Le!=null&&(sn.baseIndent=Le),sn},token:function(Le,sn){if(!sn.tagName&&Le.sol()&&(sn.indented=Le.indentation()),Le.eatSpace())return null;se=null;var vn=sn.tokenize(Le,sn);return(vn||se)&&vn!="comment"&&(hn=null,sn.state=sn.state(se||vn,Le,sn),hn&&(vn=hn=="error"?vn+" error":hn)),vn},indent:function(Le,sn,vn){var On=Le.context;if(Le.tokenize.isInAttribute)return Le.tagStart==Le.indented?Le.stringStartCol+1:Le.indented+xe;if(On&&On.noIndent)return Nt.Pass;if(Le.tokenize!=un&&Le.tokenize!=Be)return vn?vn.match(/^(\s*)/)[0].length:0;if(Le.tagName)return ye.multilineTagIndentPastTag!==!1?Le.tagStart+Le.tagName.length+2:Le.tagStart+xe*(ye.multilineTagIndentFactor||1);if(ye.alignCDATA&&/<!\[CDATA\[/.test(sn))return 0;var ri=sn&&/^<(\/)?([\w_:\.-]*)/.exec(sn);if(ri&&ri[1])for(;On;)if(On.tagName==ri[2]){On=On.prev;break}else if(ye.implicitlyClosed.hasOwnProperty(On.tagName))On=On.prev;else break;else if(ri)for(;On;){var Vn=ye.contextGrabbers[On.tagName];if(Vn&&Vn.hasOwnProperty(ri[2]))On=On.prev;else break}for(;On&&On.prev&&!On.startOfLine;)On=On.prev;return On?On.indent+xe:Le.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ye.htmlMode?"html":"xml",helperType:ye.htmlMode?"html":"xml",skipAttribute:function(Le){Le.state==ue&&(Le.state=he)},xmlCurrentTag:function(Le){return Le.tagName?{name:Le.tagName,close:Le.type=="closeTag"}:null},xmlCurrentContext:function(Le){for(var sn=[],vn=Le.context;vn;vn=vn.prev)vn.tagName&&sn.push(vn.tagName);return sn.reverse()}}}),Nt.defineMIME("text/xml","xml"),Nt.defineMIME("application/xml","xml"),Nt.mimeModes.hasOwnProperty("text/html")||Nt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},6330:function(Pn,vi,ne){"use strict";ne.d(vi,{HT:function(){return Un},iZ:function(){return Se}});var Nt={},Fe=function(qt,$t,Vt,Ne,Ae){var Je=new Worker(Nt[$t]||(Nt[$t]=URL.createObjectURL(new Blob([qt+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return Je.onmessage=function(yn){var Fn=yn.data,wi=Fn.$e$;if(wi){var si=new Error(wi[0]);si.code=wi[1],si.stack=wi[2],Ae(si,null)}else Ae(null,Fn)},Je.postMessage(Vt,Ne),Je},Te=Uint8Array,tn=Uint16Array,be=Int32Array,xe=new Te([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]),ye=new Te([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]),De=new Te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Me=function(qt,$t){for(var Vt=new tn(31),Ne=0;Ne<31;++Ne)Vt[Ne]=$t+=1<<qt[Ne-1];for(var Ae=new be(Vt[30]),Ne=1;Ne<30;++Ne)for(var Je=Vt[Ne];Je<Vt[Ne+1];++Je)Ae[Je]=Je-Vt[Ne]<<5|Ne;return{b:Vt,r:Ae}},se=Me(xe,2),hn=se.b,Be=se.r;hn[28]=258,Be[258]=28;for(var un=Me(ye,0),Qt=un.b,et=un.r,nt=new tn(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(qt,$t,Vt){for(var Ne=qt.length,Ae=0,Je=new tn($t);Ae<Ne;++Ae)qt[Ae]&&++Je[qt[Ae]-1];var yn=new tn($t);for(Ae=1;Ae<$t;++Ae)yn[Ae]=yn[Ae-1]+Je[Ae-1]<<1;var Fn;if(Vt){Fn=new tn(1<<$t);var wi=15-$t;for(Ae=0;Ae<Ne;++Ae)if(qt[Ae])for(var si=Ae<<4|qt[Ae],Ln=$t-qt[Ae],Hn=yn[qt[Ae]-1]++<<Ln,Wi=Hn|(1<<Ln)-1;Hn<=Wi;++Hn)Fn[nt[Hn]>>wi]=si}else for(Fn=new tn(Ne),Ae=0;Ae<Ne;++Ae)qt[Ae]&&(Fn[Ae]=nt[yn[qt[Ae]-1]++]>>15-qt[Ae]);return Fn},yt=new Te(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 Et=new Te(32),ct=0;ct<32;++ct)Et[ct]=5;var Tt=gt(yt,9,0),Yt=gt(yt,9,1),Xt=gt(Et,5,0),he=gt(Et,5,1),fe=function(qt){for(var $t=qt[0],Vt=1;Vt<qt.length;++Vt)qt[Vt]>$t&&($t=qt[Vt]);return $t},ue=function(qt,$t,Vt){var Ne=$t/8|0;return(qt[Ne]|qt[Ne+1]<<8)>>($t&7)&Vt},Ye=function(qt,$t){var Vt=$t/8|0;return(qt[Vt]|qt[Vt+1]<<8|qt[Vt+2]<<16)>>($t&7)},Le=function(qt){return(qt+7)/8|0},sn=function(qt,$t,Vt){return($t==null||$t<0)&&($t=0),(Vt==null||Vt>qt.length)&&(Vt=qt.length),new Te(qt.subarray($t,Vt))},vn={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},On=["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"],ri=function(qt,$t,Vt){var Ne=new Error($t||On[qt]);if(Ne.code=qt,Error.captureStackTrace&&Error.captureStackTrace(Ne,ri),!Vt)throw Ne;return Ne},Vn=function(qt,$t,Vt,Ne){var Ae=qt.length,Je=Ne?Ne.length:0;if(!Ae||$t.f&&!$t.l)return Vt||new Te(0);var yn=!Vt,Fn=yn||$t.i!=2,wi=$t.i;yn&&(Vt=new Te(Ae*3));var si=function(Wa){var Ao=Vt.length;if(Wa>Ao){var _o=new Te(Math.max(Ao*2,Wa));_o.set(Vt),Vt=_o}},Ln=$t.f||0,Hn=$t.p||0,Wi=$t.b||0,Ri=$t.l,Tn=$t.d,Ot=$t.m,Yi=$t.n,ki=Ae*8;do{if(!Ri){Ln=ue(qt,Hn,1);var Ui=ue(qt,Hn+1,3);if(Hn+=3,Ui)if(Ui==1)Ri=Yt,Tn=he,Ot=9,Yi=5;else if(Ui==2){var li=ue(qt,Hn,31)+257,Ei=ue(qt,Hn+10,15)+4,oi=li+ue(qt,Hn+5,31)+1;Hn+=14;for(var Ai=new Te(oi),Cr=new Te(19),$n=0;$n<Ei;++$n)Cr[De[$n]]=ue(qt,Hn+$n*3,7);Hn+=Ei*3;for(var pi=fe(Cr),rn=(1<<pi)-1,ui=gt(Cr,pi,1),$n=0;$n<oi;){var or=ui[ue(qt,Hn,rn)];Hn+=or&15;var ji=or>>4;if(ji<16)Ai[$n++]=ji;else{var Mr=0,wr=0;for(ji==16?(wr=3+ue(qt,Hn,3),Hn+=2,Mr=Ai[$n-1]):ji==17?(wr=3+ue(qt,Hn,7),Hn+=3):ji==18&&(wr=11+ue(qt,Hn,127),Hn+=7);wr--;)Ai[$n++]=Mr}}var Pr=Ai.subarray(0,li),Nr=Ai.subarray(li);Ot=fe(Pr),Yi=fe(Nr),Ri=gt(Pr,Ot,1),Tn=gt(Nr,Yi,1)}else ri(1);else{var ji=Le(Hn)+4,Gi=qt[ji-4]|qt[ji-3]<<8,Zn=ji+Gi;if(Zn>Ae){wi&&ri(0);break}Fn&&si(Wi+Gi),Vt.set(qt.subarray(ji,Zn),Wi),$t.b=Wi+=Gi,$t.p=Hn=Zn*8,$t.f=Ln;continue}if(Hn>ki){wi&&ri(0);break}}Fn&&si(Wi+131072);for(var Xr=(1<<Ot)-1,To=(1<<Yi)-1,Co=Hn;;Co=Hn){var Mr=Ri[Ye(qt,Hn)&Xr],Oo=Mr>>4;if(Hn+=Mr&15,Hn>ki){wi&&ri(0);break}if(Mr||ri(2),Oo<256)Vt[Wi++]=Oo;else if(Oo==256){Co=Hn,Ri=null;break}else{var ke=Oo-254;if(Oo>264){var $n=Oo-257,Rr=xe[$n];ke=ue(qt,Hn,(1<<Rr)-1)+hn[$n],Hn+=Rr}var Js=Tn[Ye(qt,Hn)&To],fs=Js>>4;Js||ri(3),Hn+=Js&15;var Nr=Qt[fs];if(fs>3){var Rr=ye[fs];Nr+=Ye(qt,Hn)&(1<<Rr)-1,Hn+=Rr}if(Hn>ki){wi&&ri(0);break}Fn&&si(Wi+131072);var xa=Wi+ke;if(Wi<Nr){var io=Je-Nr,Nl=Math.min(Nr,xa);for(io+Wi<0&&ri(3);Wi<Nl;++Wi)Vt[Wi]=Ne[io+Wi]}for(;Wi<xa;++Wi)Vt[Wi]=Vt[Wi-Nr]}}$t.l=Ri,$t.p=Co,$t.b=Wi,$t.f=Ln,Ri&&(Ln=1,$t.m=Ot,$t.d=Tn,$t.n=Yi)}while(!Ln);return Wi!=Vt.length&&yn?sn(Vt,0,Wi):Vt.subarray(0,Wi)},Qi=function(qt,$t,Vt){Vt<<=$t&7;var Ne=$t/8|0;qt[Ne]|=Vt,qt[Ne+1]|=Vt>>8},Gn=function(qt,$t,Vt){Vt<<=$t&7;var Ne=$t/8|0;qt[Ne]|=Vt,qt[Ne+1]|=Vt>>8,qt[Ne+2]|=Vt>>16},Ce=function(qt,$t){for(var Vt=[],Ne=0;Ne<qt.length;++Ne)qt[Ne]&&Vt.push({s:Ne,f:qt[Ne]});var Ae=Vt.length,Je=Vt.slice();if(!Ae)return{t:_n,l:0};if(Ae==1){var yn=new Te(Vt[0].s+1);return yn[Vt[0].s]=1,{t:yn,l:1}}Vt.sort(function(Zn,li){return Zn.f-li.f}),Vt.push({s:-1,f:25001});var Fn=Vt[0],wi=Vt[1],si=0,Ln=1,Hn=2;for(Vt[0]={s:-1,f:Fn.f+wi.f,l:Fn,r:wi};Ln!=Ae-1;)Fn=Vt[Vt[si].f<Vt[Hn].f?si++:Hn++],wi=Vt[si!=Ln&&Vt[si].f<Vt[Hn].f?si++:Hn++],Vt[Ln++]={s:-1,f:Fn.f+wi.f,l:Fn,r:wi};for(var Wi=Je[0].s,Ne=1;Ne<Ae;++Ne)Je[Ne].s>Wi&&(Wi=Je[Ne].s);var Ri=new tn(Wi+1),Tn=_t(Vt[Ln-1],Ri,0);if(Tn>$t){var Ne=0,Ot=0,Yi=Tn-$t,ki=1<<Yi;for(Je.sort(function(li,Ei){return Ri[Ei.s]-Ri[li.s]||li.f-Ei.f});Ne<Ae;++Ne){var Ui=Je[Ne].s;if(Ri[Ui]>$t)Ot+=ki-(1<<Tn-Ri[Ui]),Ri[Ui]=$t;else break}for(Ot>>=Yi;Ot>0;){var ji=Je[Ne].s;Ri[ji]<$t?Ot-=1<<$t-Ri[ji]++-1:++Ne}for(;Ne>=0&&Ot;--Ne){var Gi=Je[Ne].s;Ri[Gi]==$t&&(--Ri[Gi],++Ot)}Tn=$t}return{t:new Te(Ri),l:Tn}},_t=function(qt,$t,Vt){return qt.s==-1?Math.max(_t(qt.l,$t,Vt+1),_t(qt.r,$t,Vt+1)):$t[qt.s]=Vt},Bn=function(qt){for(var $t=qt.length;$t&&!qt[--$t];);for(var Vt=new tn(++$t),Ne=0,Ae=qt[0],Je=1,yn=function(wi){Vt[Ne++]=wi},Fn=1;Fn<=$t;++Fn)if(qt[Fn]==Ae&&Fn!=$t)++Je;else{if(!Ae&&Je>2){for(;Je>138;Je-=138)yn(32754);Je>2&&(yn(Je>10?Je-11<<5|28690:Je-3<<5|12305),Je=0)}else if(Je>3){for(yn(Ae),--Je;Je>6;Je-=6)yn(8304);Je>2&&(yn(Je-3<<5|8208),Je=0)}for(;Je--;)yn(Ae);Je=1,Ae=qt[Fn]}return{c:Vt.subarray(0,Ne),n:$t}},Si=function(qt,$t){for(var Vt=0,Ne=0;Ne<$t.length;++Ne)Vt+=qt[Ne]*$t[Ne];return Vt},ei=function(qt,$t,Vt){var Ne=Vt.length,Ae=Le($t+2);qt[Ae]=Ne&255,qt[Ae+1]=Ne>>8,qt[Ae+2]=qt[Ae]^255,qt[Ae+3]=qt[Ae+1]^255;for(var Je=0;Je<Ne;++Je)qt[Ae+Je+4]=Vt[Je];return(Ae+4+Ne)*8},_e=function(qt,$t,Vt,Ne,Ae,Je,yn,Fn,wi,si,Ln){Qi($t,Ln++,Vt),++Ae[256];for(var Hn=Ce(Ae,15),Wi=Hn.t,Ri=Hn.l,Tn=Ce(Je,15),Ot=Tn.t,Yi=Tn.l,ki=Bn(Wi),Ui=ki.c,ji=ki.n,Gi=Bn(Ot),Zn=Gi.c,li=Gi.n,Ei=new tn(19),oi=0;oi<Ui.length;++oi)++Ei[Ui[oi]&31];for(var oi=0;oi<Zn.length;++oi)++Ei[Zn[oi]&31];for(var Ai=Ce(Ei,7),Cr=Ai.t,$n=Ai.l,pi=19;pi>4&&!Cr[De[pi-1]];--pi);var rn=si+5<<3,ui=Si(Ae,yt)+Si(Je,Et)+yn,or=Si(Ae,Wi)+Si(Je,Ot)+yn+14+3*pi+Si(Ei,Cr)+2*Ei[16]+3*Ei[17]+7*Ei[18];if(wi>=0&&rn<=ui&&rn<=or)return ei($t,Ln,qt.subarray(wi,wi+si));var Mr,wr,Pr,Nr;if(Qi($t,Ln,1+(or<ui)),Ln+=2,or<ui){Mr=gt(Wi,Ri,0),wr=Wi,Pr=gt(Ot,Yi,0),Nr=Ot;var Xr=gt(Cr,$n,0);Qi($t,Ln,ji-257),Qi($t,Ln+5,li-1),Qi($t,Ln+10,pi-4),Ln+=14;for(var oi=0;oi<pi;++oi)Qi($t,Ln+3*oi,Cr[De[oi]]);Ln+=3*pi;for(var To=[Ui,Zn],Co=0;Co<2;++Co)for(var Oo=To[Co],oi=0;oi<Oo.length;++oi){var ke=Oo[oi]&31;Qi($t,Ln,Xr[ke]),Ln+=Cr[ke],ke>15&&(Qi($t,Ln,Oo[oi]>>5&127),Ln+=Oo[oi]>>12)}}else Mr=Tt,wr=yt,Pr=Xt,Nr=Et;for(var oi=0;oi<Fn;++oi){var Rr=Ne[oi];if(Rr>255){var ke=Rr>>18&31;Gn($t,Ln,Mr[ke+257]),Ln+=wr[ke+257],ke>7&&(Qi($t,Ln,Rr>>23&31),Ln+=xe[ke]);var Js=Rr&31;Gn($t,Ln,Pr[Js]),Ln+=Nr[Js],Js>3&&(Gn($t,Ln,Rr>>5&8191),Ln+=ye[Js])}else Gn($t,Ln,Mr[Rr]),Ln+=wr[Rr]}return Gn($t,Ln,Mr[256]),Ln+wr[256]},Mn=new be([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_n=new Te(0),fi=function(qt,$t,Vt,Ne,Ae,Je){var yn=Je.z||qt.length,Fn=new Te(Ne+yn+5*(1+Math.ceil(yn/7e3))+Ae),wi=Fn.subarray(Ne,Fn.length-Ae),si=Je.l,Ln=(Je.r||0)&7;if($t){Ln&&(wi[0]=Je.r>>3);for(var Hn=Mn[$t-1],Wi=Hn>>13,Ri=Hn&8191,Tn=(1<<Vt)-1,Ot=Je.p||new tn(32768),Yi=Je.h||new tn(Tn+1),ki=Math.ceil(Vt/3),Ui=2*ki,ji=function(al){return(qt[al]^qt[al+1]<<ki^qt[al+2]<<Ui)&Tn},Gi=new be(25e3),Zn=new tn(288),li=new tn(32),Ei=0,oi=0,Ai=Je.i||0,Cr=0,$n=Je.w||0,pi=0;Ai+2<yn;++Ai){var rn=ji(Ai),ui=Ai&32767,or=Yi[rn];if(Ot[ui]=or,Yi[rn]=ui,$n<=Ai){var Mr=yn-Ai;if((Ei>7e3||Cr>24576)&&(Mr>423||!si)){Ln=_e(qt,wi,0,Gi,Zn,li,oi,Cr,pi,Ai-pi,Ln),Cr=Ei=oi=0,pi=Ai;for(var wr=0;wr<286;++wr)Zn[wr]=0;for(var wr=0;wr<30;++wr)li[wr]=0}var Pr=2,Nr=0,Xr=Ri,To=ui-or&32767;if(Mr>2&&rn==ji(Ai-To))for(var Co=Math.min(Wi,Mr)-1,Oo=Math.min(32767,Ai),ke=Math.min(258,Mr);To<=Oo&&--Xr&&ui!=or;){if(qt[Ai+Pr]==qt[Ai+Pr-To]){for(var Rr=0;Rr<ke&&qt[Ai+Rr]==qt[Ai+Rr-To];++Rr);if(Rr>Pr){if(Pr=Rr,Nr=To,Rr>Co)break;for(var Js=Math.min(To,Rr-2),fs=0,wr=0;wr<Js;++wr){var xa=Ai-To+wr&32767,io=Ot[xa],Nl=xa-io&32767;Nl>fs&&(fs=Nl,or=xa)}}}ui=or,or=Ot[ui],To+=ui-or&32767}if(Nr){Gi[Cr++]=268435456|Be[Pr]<<18|et[Nr];var Wa=Be[Pr]&31,Ao=et[Nr]&31;oi+=xe[Wa]+ye[Ao],++Zn[257+Wa],++li[Ao],$n=Ai+Pr,++Ei}else Gi[Cr++]=qt[Ai],++Zn[qt[Ai]]}}for(Ai=Math.max(Ai,$n);Ai<yn;++Ai)Gi[Cr++]=qt[Ai],++Zn[qt[Ai]];Ln=_e(qt,wi,si,Gi,Zn,li,oi,Cr,pi,Ai-pi,Ln),si||(Je.r=Ln&7|wi[Ln/8|0]<<3,Ln-=7,Je.h=Yi,Je.p=Ot,Je.i=Ai,Je.w=$n)}else{for(var Ai=Je.w||0;Ai<yn+si;Ai+=65535){var _o=Ai+65535;_o>=yn&&(wi[Ln/8|0]=si,_o=yn),Ln=ei(wi,Ln+1,qt.subarray(Ai,_o))}Je.i=yn}return sn(Fn,0,Ne+Le(Ln)+Ae)},Kn=null,Pi=function(){var qt=-1;return{p:function($t){for(var Vt=qt,Ne=0;Ne<$t.length;++Ne)Vt=Kn[Vt&255^$t[Ne]]^Vt>>>8;qt=Vt},d:function(){return~qt}}},le=function(){var qt=1,$t=0;return{p:function(Vt){for(var Ne=qt,Ae=$t,Je=Vt.length|0,yn=0;yn!=Je;){for(var Fn=Math.min(yn+2655,Je);yn<Fn;++yn)Ae+=Ne+=Vt[yn];Ne=(Ne&65535)+15*(Ne>>16),Ae=(Ae&65535)+15*(Ae>>16)}qt=Ne,$t=Ae},d:function(){return qt%=65521,$t%=65521,(qt&255)<<24|(qt&65280)<<8|($t&255)<<8|$t>>8}}},bn=function(qt,$t,Vt,Ne,Ae){if(!Ae&&(Ae={l:1},$t.dictionary)){var Je=$t.dictionary.subarray(-32768),yn=new Te(Je.length+qt.length);yn.set(Je),yn.set(qt,Je.length),qt=yn,Ae.w=Je.length}return fi(qt,$t.level==null?6:$t.level,$t.mem==null?Ae.l?Math.ceil(Math.max(8,Math.min(13,Math.log(qt.length)))*1.5):20:12+$t.mem,Vt,Ne,Ae)},ci=function(qt,$t){var Vt={};for(var Ne in qt)Vt[Ne]=qt[Ne];for(var Ne in $t)Vt[Ne]=$t[Ne];return Vt},Ht=function(qt,$t,Vt){for(var Ne=qt(),Ae=qt.toString(),Je=Ae.slice(Ae.indexOf("[")+1,Ae.lastIndexOf("]")).replace(/\s+/g,"").split(","),yn=0;yn<Ne.length;++yn){var Fn=Ne[yn],wi=Je[yn];if(typeof Fn=="function"){$t+=";"+wi+"=";var si=Fn.toString();if(Fn.prototype)if(si.indexOf("[native code]")!=-1){var Ln=si.indexOf(" ",8)+1;$t+=si.slice(Ln,si.indexOf("(",Ln))}else{$t+=si;for(var Hn in Fn.prototype)$t+=";"+wi+".prototype."+Hn+"="+Fn.prototype[Hn].toString()}else $t+=si}else Vt[wi]=Fn}return $t},Lt=null,Ct=function(qt){var $t=[];for(var Vt in qt)qt[Vt].buffer&&$t.push((qt[Vt]=new qt[Vt].constructor(qt[Vt])).buffer);return $t},Ut=function(qt,$t,Vt,Ne){if(!Lt[Vt]){for(var Ae="",Je={},yn=qt.length-1,Fn=0;Fn<yn;++Fn)Ae=Ht(qt[Fn],Ae,Je);Lt[Vt]={c:Ht(qt[yn],Ae,Je),e:Je}}var wi=ci({},Lt[Vt].e);return Fe(Lt[Vt].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+$t.toString()+"}",Vt,wi,Ct(wi),Ne)},Kt=function(){return[Te,tn,be,xe,ye,De,hn,Qt,Yt,he,nt,On,gt,fe,ue,Ye,Le,sn,ri,Vn,jr,Qe,ln]},kt=function(){return[Te,tn,be,xe,ye,De,Be,et,Tt,yt,Xt,Et,nt,Mn,_n,gt,Qi,Gn,Ce,_t,Bn,Si,ei,_e,Le,sn,fi,bn,lo,Qe]},Pe=function(){return[hr,pr,di,Pi,Kn]},dn=function(){return[tr,ro]},Xe=function(){return[er,di,le]},Ze=function(){return[ur]},Qe=function(qt){return postMessage(qt,[qt.buffer])},ln=function(qt){return qt&&{out:qt.size&&new Te(qt.size),dictionary:qt.dictionary}},an=function(qt,$t,Vt,Ne,Ae,Je){var yn=Ut(Vt,Ne,Ae,function(Fn,wi){yn.terminate(),Je(Fn,wi)});return yn.postMessage([qt,$t],$t.consume?[qt.buffer]:[]),function(){yn.terminate()}},Sn=function(qt){return qt.ondata=function($t,Vt){return postMessage([$t,Vt],[$t.buffer])},function($t){$t.data.length?(qt.push($t.data[0],$t.data[1]),postMessage([$t.data[0].length])):qt.flush()}},jn=function(qt,$t,Vt,Ne,Ae,Je,yn){var Fn,wi=Ut(qt,Ne,Ae,function(si,Ln){si?(wi.terminate(),$t.ondata.call($t,si)):Array.isArray(Ln)?Ln.length==1?($t.queuedSize-=Ln[0],$t.ondrain&&$t.ondrain(Ln[0])):(Ln[1]&&wi.terminate(),$t.ondata.call($t,si,Ln[0],Ln[1])):yn(Ln)});wi.postMessage(Vt),$t.queuedSize=0,$t.push=function(si,Ln){$t.ondata||ri(5),Fn&&$t.ondata(ri(4,0,1),null,!!Ln),$t.queuedSize+=si.length,wi.postMessage([si,Fn=Ln],[si.buffer])},$t.terminate=function(){wi.terminate()},Je&&($t.flush=function(){wi.postMessage([])})},Wn=function(qt,$t){return qt[$t]|qt[$t+1]<<8},wn=function(qt,$t){return(qt[$t]|qt[$t+1]<<8|qt[$t+2]<<16|qt[$t+3]<<24)>>>0},qn=function(qt,$t){return wn(qt,$t)+wn(qt,$t+4)*4294967296},di=function(qt,$t,Vt){for(;Vt;++$t)qt[$t]=Vt,Vt>>>=8},hr=function(qt,$t){var Vt=$t.filename;if(qt[0]=31,qt[1]=139,qt[2]=8,qt[8]=$t.level<2?4:$t.level==9?2:0,qt[9]=3,$t.mtime!=0&&di(qt,4,Math.floor(new Date($t.mtime||Date.now())/1e3)),Vt){qt[3]=8;for(var Ne=0;Ne<=Vt.length;++Ne)qt[Ne+10]=Vt.charCodeAt(Ne)}},tr=function(qt){(qt[0]!=31||qt[1]!=139||qt[2]!=8)&&ri(6,"invalid gzip data");var $t=qt[3],Vt=10;$t&4&&(Vt+=(qt[10]|qt[11]<<8)+2);for(var Ne=($t>>3&1)+($t>>4&1);Ne>0;Ne-=!qt[Vt++]);return Vt+($t&2)},ro=function(qt){var $t=qt.length;return(qt[$t-4]|qt[$t-3]<<8|qt[$t-2]<<16|qt[$t-1]<<24)>>>0},pr=function(qt){return 10+(qt.filename?qt.filename.length+1:0)},er=function(qt,$t){var Vt=$t.level,Ne=Vt==0?0:Vt<6?1:Vt==9?3:2;if(qt[0]=120,qt[1]=Ne<<6|($t.dictionary&&32),qt[1]|=31-(qt[0]<<8|qt[1])%31,$t.dictionary){var Ae=le();Ae.p($t.dictionary),di(qt,2,Ae.d())}},ur=function(qt,$t){return((qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31)&&ri(6,"invalid zlib data"),(qt[1]>>5&1)==+!$t&&ri(6,"invalid zlib data: "+(qt[1]&32?"need":"unexpected")+" dictionary"),(qt[1]>>3&4)+2};function Lo(qt,$t){return typeof qt=="function"&&($t=qt,qt={}),this.ondata=$t,qt}var Bo=null,Ur=null;function Er(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[kt],function(Ne){return Qe(lo(Ne.data[0],Ne.data[1]))},0,Vt)}function lo(qt,$t){return bn(qt,$t||{},0,0)}var Vo=null,ko=null;function Eo(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[Kt],function(Ne){return Qe(jr(Ne.data[0],ln(Ne.data[1])))},1,Vt)}function jr(qt,$t){return Vn(qt,{i:2},$t&&$t.out,$t&&$t.dictionary)}var Br=null,Gr=null;function Pt(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[kt,Pe,function(){return[$i]}],function(Ne){return Qe($i(Ne.data[0],Ne.data[1]))},2,Vt)}function $i(qt,$t){$t||($t={});var Vt=Pi(),Ne=qt.length;Vt.p(qt);var Ae=bn(qt,$t,pr($t),8),Je=Ae.length;return hr(Ae,$t),di(Ae,Je-8,Vt.d()),di(Ae,Je-4,Ne),Ae}var Hr=null,Dr=null;function oo(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[Kt,dn,function(){return[Ko]}],function(Ne){return Qe(Ko(Ne.data[0],Ne.data[1]))},3,Vt)}function Ko(qt,$t){var Vt=tr(qt);return Vt+8>qt.length&&ri(6,"invalid gzip data"),Vn(qt.subarray(Vt,-8),{i:2},$t&&$t.out||new Te(ro(qt)),$t&&$t.dictionary)}var Fs=null,Fi=null;function xi(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[kt,Xe,function(){return[Se]}],function(Ne){return Qe(Se(Ne.data[0],Ne.data[1]))},4,Vt)}function Se(qt,$t){$t||($t={});var Vt=le();Vt.p(qt);var Ne=bn(qt,$t,$t.dictionary?6:2,4);return er(Ne,$t),di(Ne,Ne.length-4,Vt.d()),Ne}var we=null,de=null;function Nn(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),an(qt,$t,[Kt,Ze,function(){return[Un]}],function(Ne){return Qe(Un(Ne.data[0],ln(Ne.data[1])))},5,Vt)}function Un(qt,$t){return Vn(qt.subarray(ur(qt,$t&&$t.dictionary),-4),{i:2},$t&&$t.out,$t&&$t.dictionary)}var mi=null,on=null;function Oe(qt,$t,Vt){return Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7),qt[0]==31&&qt[1]==139&&qt[2]==8?oo(qt,$t,Vt):(qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31?Eo(qt,$t,Vt):Nn(qt,$t,Vt)}function pe(qt,$t){return qt[0]==31&&qt[1]==139&&qt[2]==8?Ko(qt,$t):(qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31?jr(qt,$t):Un(qt,$t)}var ge=function(qt,$t,Vt,Ne){for(var Ae in qt){var Je=qt[Ae],yn=$t+Ae,Fn=Ne;Array.isArray(Je)&&(Fn=ci(Ne,Je[1]),Je=Je[0]),Je instanceof Te?Vt[yn]=[Je,Fn]:(Vt[yn+="/"]=[new Te(0),Fn],ge(Je,yn,Vt,Ne))}},cn=typeof TextEncoder!="undefined"&&new TextEncoder,Zt=typeof TextDecoder!="undefined"&&new TextDecoder,Ue=0;try{Zt.decode(_n,{stream:!0}),Ue=1}catch(qt){}var fn=function(qt){for(var $t="",Vt=0;;){var Ne=qt[Vt++],Ae=(Ne>127)+(Ne>223)+(Ne>239);if(Vt+Ae>qt.length)return{s:$t,r:sn(qt,Vt-1)};Ae?Ae==3?(Ne=((Ne&15)<<18|(qt[Vt++]&63)<<12|(qt[Vt++]&63)<<6|qt[Vt++]&63)-65536,$t+=String.fromCharCode(55296|Ne>>10,56320|Ne&1023)):Ae&1?$t+=String.fromCharCode((Ne&31)<<6|qt[Vt++]&63):$t+=String.fromCharCode((Ne&15)<<12|(qt[Vt++]&63)<<6|qt[Vt++]&63):$t+=String.fromCharCode(Ne)}},Rn=null,He=null;function xn(qt,$t){if($t){for(var Vt=new Te(qt.length),Ne=0;Ne<qt.length;++Ne)Vt[Ne]=qt.charCodeAt(Ne);return Vt}if(cn)return cn.encode(qt);for(var Ae=qt.length,Je=new Te(qt.length+(qt.length>>1)),yn=0,Fn=function(Ln){Je[yn++]=Ln},Ne=0;Ne<Ae;++Ne){if(yn+5>Je.length){var wi=new Te(yn+8+(Ae-Ne<<1));wi.set(Je),Je=wi}var si=qt.charCodeAt(Ne);si<128||$t?Fn(si):si<2048?(Fn(192|si>>6),Fn(128|si&63)):si>55295&&si<57344?(si=65536+(si&1047552)|qt.charCodeAt(++Ne)&1023,Fn(240|si>>18),Fn(128|si>>12&63),Fn(128|si>>6&63),Fn(128|si&63)):(Fn(224|si>>12),Fn(128|si>>6&63),Fn(128|si&63))}return sn(Je,0,yn)}function Xn(qt,$t){if($t){for(var Vt="",Ne=0;Ne<qt.length;Ne+=16384)Vt+=String.fromCharCode.apply(null,qt.subarray(Ne,Ne+16384));return Vt}else{if(Zt)return Zt.decode(qt);var Ae=fn(qt),Je=Ae.s,Vt=Ae.r;return Vt.length&&ri(8),Je}}var Qn=function(qt){return qt==1?3:qt<6?2:qt==9?1:0},yi=function(qt,$t){return $t+30+Wn(qt,$t+26)+Wn(qt,$t+28)},ni=function(qt,$t,Vt){var Ne=Wn(qt,$t+28),Ae=Xn(qt.subarray($t+46,$t+46+Ne),!(Wn(qt,$t+8)&2048)),Je=$t+46+Ne,yn=wn(qt,$t+20),Fn=Vt&&yn==4294967295?En(qt,Je):[yn,wn(qt,$t+24),wn(qt,$t+42)],wi=Fn[0],si=Fn[1],Ln=Fn[2];return[Wn(qt,$t+10),wi,si,Ae,Je+Wn(qt,$t+30)+Wn(qt,$t+32),Ln]},En=function(qt,$t){for(;Wn(qt,$t)!=1;$t+=4+Wn(qt,$t+2));return[qn(qt,$t+12),qn(qt,$t+4),qn(qt,$t+20)]},Jn=function(qt){var $t=0;if(qt)for(var Vt in qt){var Ne=qt[Vt].length;Ne>65535&&ri(9),$t+=Ne+4}return $t},Ki=function(qt,$t,Vt,Ne,Ae,Je,yn,Fn){var wi=Ne.length,si=Vt.extra,Ln=Fn&&Fn.length,Hn=Jn(si);di(qt,$t,yn!=null?33639248:67324752),$t+=4,yn!=null&&(qt[$t++]=20,qt[$t++]=Vt.os),qt[$t]=20,$t+=2,qt[$t++]=Vt.flag<<1|(Je<0&&8),qt[$t++]=Ae&&8,qt[$t++]=Vt.compression&255,qt[$t++]=Vt.compression>>8;var Wi=new Date(Vt.mtime==null?Date.now():Vt.mtime),Ri=Wi.getFullYear()-1980;if((Ri<0||Ri>119)&&ri(10),di(qt,$t,Ri<<25|Wi.getMonth()+1<<21|Wi.getDate()<<16|Wi.getHours()<<11|Wi.getMinutes()<<5|Wi.getSeconds()>>1),$t+=4,Je!=-1&&(di(qt,$t,Vt.crc),di(qt,$t+4,Je<0?-Je-2:Je),di(qt,$t+8,Vt.size)),di(qt,$t+12,wi),di(qt,$t+14,Hn),$t+=16,yn!=null&&(di(qt,$t,Ln),di(qt,$t+6,Vt.attrs),di(qt,$t+10,yn),$t+=14),qt.set(Ne,$t),$t+=wi,Hn)for(var Tn in si){var Ot=si[Tn],Yi=Ot.length;di(qt,$t,+Tn),di(qt,$t+2,Yi),qt.set(Ot,$t+4),$t+=4+Yi}return Ln&&(qt.set(Fn,$t),$t+=Ln),$t},qi=function(qt,$t,Vt,Ne,Ae){di(qt,$t,101010256),di(qt,$t+8,Vt),di(qt,$t+10,Vt),di(qt,$t+12,Ne),di(qt,$t+16,Ae)},rr=null,Ge=null,eo=null,vr=null;function Or(qt,$t,Vt){Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7);var Ne={};ge(qt,"",Ne,$t);var Ae=Object.keys(Ne),Je=Ae.length,yn=0,Fn=0,wi=Je,si=new Array(Je),Ln=[],Hn=function(){for(var Yi=0;Yi<Ln.length;++Yi)Ln[Yi]()},Wi=function(Yi,ki){Li(function(){Vt(Yi,ki)})};Li(function(){Wi=Vt});var Ri=function(){var Yi=new Te(Fn+22),ki=yn,Ui=Fn-yn;Fn=0;for(var ji=0;ji<wi;++ji){var Gi=si[ji];try{var Zn=Gi.c.length;Ki(Yi,Fn,Gi,Gi.f,Gi.u,Zn);var li=30+Gi.f.length+Jn(Gi.extra),Ei=Fn+li;Yi.set(Gi.c,Ei),Ki(Yi,yn,Gi,Gi.f,Gi.u,Zn,Fn,Gi.m),yn+=16+li+(Gi.m?Gi.m.length:0),Fn=Ei+Zn}catch(oi){return Wi(oi,null)}}qi(Yi,yn,si.length,Ui,ki),Wi(null,Yi)};Je||Ri();for(var Tn=function(Yi){var ki=Ae[Yi],Ui=Ne[ki],ji=Ui[0],Gi=Ui[1],Zn=Pi(),li=ji.length;Zn.p(ji);var Ei=xn(ki),oi=Ei.length,Ai=Gi.comment,Cr=Ai&&xn(Ai),$n=Cr&&Cr.length,pi=Jn(Gi.extra),rn=Gi.level==0?0:8,ui=function(or,Mr){if(or)Hn(),Wi(or,null);else{var wr=Mr.length;si[Yi]=ci(Gi,{size:li,crc:Zn.d(),c:Mr,f:Ei,m:Cr,u:oi!=ki.length||Cr&&Ai.length!=$n,compression:rn}),yn+=30+oi+pi+wr,Fn+=76+2*(oi+pi)+($n||0)+wr,--Je||Ri()}};if(oi>65535&&ui(ri(11,0,1),null),!rn)ui(null,ji);else if(li<16e4)try{ui(null,lo(ji,Gi))}catch(or){ui(or,null)}else Ln.push(Er(ji,Gi,ui))},Ot=0;Ot<wi;++Ot)Tn(Ot);return Hn}function Re(qt,$t){$t||($t={});var Vt={},Ne=[];ge(qt,"",Vt,$t);var Ae=0,Je=0;for(var yn in Vt){var Fn=Vt[yn],wi=Fn[0],si=Fn[1],Ln=si.level==0?0:8,Hn=xn(yn),Wi=Hn.length,Ri=si.comment,Tn=Ri&&xn(Ri),Ot=Tn&&Tn.length,Yi=Jn(si.extra);Wi>65535&&ri(11);var ki=Ln?lo(wi,si):wi,Ui=ki.length,ji=Pi();ji.p(wi),Ne.push(ci(si,{size:wi.length,crc:ji.d(),c:ki,f:Hn,m:Tn,u:Wi!=yn.length||Tn&&Ri.length!=Ot,o:Ae,compression:Ln})),Ae+=30+Wi+Yi+Ui,Je+=76+2*(Wi+Yi)+(Ot||0)+Ui}for(var Gi=new Te(Je+22),Zn=Ae,li=Je-Ae,Ei=0;Ei<Ne.length;++Ei){var Hn=Ne[Ei];Ki(Gi,Hn.o,Hn,Hn.f,Hn.u,Hn.c.length);var oi=30+Hn.f.length+Jn(Hn.extra);Gi.set(Hn.c,Hn.o+oi),Ki(Gi,Ae,Hn,Hn.f,Hn.u,Hn.c.length,Hn.o,Hn.m),Ae+=16+oi+(Hn.m?Hn.m.length:0)}return qi(Gi,Ae,Ne.length,li,Zn),Gi}var kn=null,ai=null,gi=null,Bi=null,Li=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(qt){qt()};function Xi(qt,$t,Vt){Vt||(Vt=$t,$t={}),typeof Vt!="function"&&ri(7);var Ne=[],Ae=function(){for(var Yi=0;Yi<Ne.length;++Yi)Ne[Yi]()},Je={},yn=function(Yi,ki){Li(function(){Vt(Yi,ki)})};Li(function(){yn=Vt});for(var Fn=qt.length-22;wn(qt,Fn)!=101010256;--Fn)if(!Fn||qt.length-Fn>65558)return yn(ri(13,0,1),null),Ae;var wi=Wn(qt,Fn+8);if(wi){var si=wi,Ln=wn(qt,Fn+16),Hn=Ln==4294967295||si==65535;if(Hn){var Wi=wn(qt,Fn-12);Hn=wn(qt,Wi)==101075792,Hn&&(si=wi=wn(qt,Wi+32),Ln=wn(qt,Wi+48))}for(var Ri=$t&&$t.filter,Tn=function(Yi){var ki=ni(qt,Ln,Hn),Ui=ki[0],ji=ki[1],Gi=ki[2],Zn=ki[3],li=ki[4],Ei=ki[5],oi=yi(qt,Ei);Ln=li;var Ai=function($n,pi){$n?(Ae(),yn($n,null)):(pi&&(Je[Zn]=pi),--wi||yn(null,Je))};if(!Ri||Ri({name:Zn,size:ji,originalSize:Gi,compression:Ui}))if(!Ui)Ai(null,sn(qt,oi,oi+ji));else if(Ui==8){var Cr=qt.subarray(oi,oi+ji);if(Gi<524288||ji>.8*Gi)try{Ai(null,jr(Cr,{out:new Te(Gi)}))}catch($n){Ai($n,null)}else Ne.push(Eo(Cr,{size:Gi},Ai))}else Ai(ri(14,"unknown compression type "+Ui,1),null);else Ai(null,null)},Ot=0;Ot<si;++Ot)Tn(Ot)}else yn(null,{});return Ae}function nr(qt,$t){for(var Vt={},Ne=qt.length-22;wn(qt,Ne)!=101010256;--Ne)(!Ne||qt.length-Ne>65558)&&ri(13);var Ae=Wn(qt,Ne+8);if(!Ae)return{};var Je=wn(qt,Ne+16),yn=Je==4294967295||Ae==65535;if(yn){var Fn=wn(qt,Ne-12);yn=wn(qt,Fn)==101075792,yn&&(Ae=wn(qt,Fn+32),Je=wn(qt,Fn+48))}for(var wi=$t&&$t.filter,si=0;si<Ae;++si){var Ln=ni(qt,Je,yn),Hn=Ln[0],Wi=Ln[1],Ri=Ln[2],Tn=Ln[3],Ot=Ln[4],Yi=Ln[5],ki=yi(qt,Yi);Je=Ot,(!wi||wi({name:Tn,size:Wi,originalSize:Ri,compression:Hn}))&&(Hn?Hn==8?Vt[Tn]=jr(qt.subarray(ki,ki+Wi),{out:new Te(Ri)}):ri(14,"unknown compression type "+Hn):Vt[Tn]=sn(qt,ki,ki+Wi))}return Vt}},12378:function(Pn,vi,ne){"use strict";ne.d(vi,{$u:function(){return Me},BD:function(){return Ht},E9:function(){return De},FF:function(){return ko},FJ:function(){return yt},Hn:function(){return gt},KX:function(){return Tt},NB:function(){return Qe},S0:function(){return le},UL:function(){return se},Vk:function(){return lt},Vm:function(){return an},YI:function(){return bn},ZA:function(){return Te},Zt:function(){return hn},al:function(){return kt},bn:function(){return Kt},bx:function(){return Lt},g2:function(){return ci},h1:function(){return ue},hD:function(){return er},l4:function(){return xe},rU:function(){return ln},s_:function(){return Ct},uz:function(){return Ze},z6:function(){return Be}}),Pn=ne.hmd(Pn),function(){var Pt;function $i(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Hr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:$i(a)}}function Dr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var oo=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ko;if(typeof Object.setPrototypeOf=="function")Ko=Object.setPrototypeOf;else{var Fs;t:{var Fi={a:!0},xi={};try{xi.__proto__=Fi,Fs=xi.a;break t}catch(a){}Fs=!1}Ko=Fs?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Se=Ko;function we(a,y){if(a.prototype=oo(y.prototype),a.prototype.constructor=a,Se)Se(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 de=typeof ne.g!="undefined"&&ne.g!=null?ne.g:self,Nn=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},Un=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function mi(a,y){if(y){var x=de;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&&Un(x,a,{writable:!0,value:y})}}mi("Object.assign",function(a){return a||Nn}),mi("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 on=typeof globalThis=="object"&&globalThis||typeof ne.g=="object"&&ne.g.global===ne.g&&ne.g||typeof self=="object"&&self.self===self&&self||{};on.requestAnimationFrame===void 0&&(on.setImmediate===void 0?on.requestAnimationFrame=function(a){on.setTimeout(a,0)}:on.requestAnimationFrame=on.setImmediate);function Oe(){}function pe(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&on.clearTimeout(x),x=ge(function(){x=-1,a.apply(E,b)},y)}}function ge(a,y){return on.setTimeout(a,y)}function cn(a){return on.document.createElement(a)}function Zt(a){throw Error(a)}function Ue(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Zt(a)}function fn(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),Zt(x+" is not in the range "+y+": "+a)}function Rn(a){on.console&&on.console.log(a)}function He(a){return typeof a=="object"&&a!==null}function xn(a){return Array.isArray(a)||on.NodeList&&a instanceof on.NodeList||on.HTMLCollection&&a instanceof on.HTMLCollection}function Xn(a){return Array.prototype.slice.call(a)}function Qn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Zt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function yi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Zt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ni(){var a=Or.pop();return a===void 0?[]:a}function En(a){a.length=0,Or.push(a)}function Jn(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(He(a)&&a.constructor)return Jn(a.constructor);return typeof a}function Ki(a){var y=a;return He(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 qi(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 rr(a,y,x){Object.defineProperty(so.prototype,a,{get:y,set:x})}function Ge(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var eo=on.navigator!==void 0&&0<on.navigator.userAgent.indexOf("Trident/7"),vr=on.navigator!==void 0&&on.navigator.platform!==void 0&&on.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Or=[];Object.freeze([]),Oe.className="Util",Oe.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Oe.adym="gojs.net",Oe.vfo="28e645fdb266",Oe.className="Util";function Re(a,y,x){Je(this),this.j=a,this.xa=y,this.o=x}Re.prototype.toString=function(){return"EnumValue."+this.xa};function kn(a,y){return y==null||y===""?null:a[y]}de.Object.defineProperties(Re.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Re.className="EnumValue";function ai(){this.ew=[]}ai.prototype.toString=function(){return this.ew.join("")},ai.prototype.add=function(a){a!==""&&this.ew.push(a)},ai.className="StringBuilder";function gi(){}gi.className="PropertyCollection";var Bi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){on.console&&on.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 Li(){}Li.prototype.reset=function(){},Li.prototype.next=function(){return!1},Li.prototype.Ad=function(){return!1},Li.prototype.first=function(){return null},Li.prototype.any=function(){return!1},Li.prototype.all=function(){return!0},Li.prototype.each=function(){return this},Li.prototype.map=function(){return this},Li.prototype.filter=function(){return this},Li.prototype.de=function(){},Li.prototype.toString=function(){return"EmptyIterator"},de.Object.defineProperties(Li.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Li.prototype.first=Li.prototype.first,Li.prototype.hasNext=Li.prototype.Ad,Li.prototype.next=Li.prototype.next,Li.prototype.reset=Li.prototype.reset;var Xi=null;Li.className="EmptyIterator",Xi=new Li;function nr(a){this.key=-1,this.value=a}nr.prototype.reset=function(){this.key=-1},nr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},nr.prototype.Ad=function(){return this.next()},nr.prototype.first=function(){return this.key=0,this.value},nr.prototype.any=function(a){return this.key=-1,a(this.value)},nr.prototype.all=function(a){return this.key=-1,a(this.value)},nr.prototype.each=function(a){return this.key=-1,a(this.value),this},nr.prototype.map=function(a){return new nr(a(this.value))},nr.prototype.filter=function(a){return a(this.value)?new nr(this.value):Xi},nr.prototype.de=function(){this.value=null},nr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},de.Object.defineProperties(nr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),nr.prototype.first=nr.prototype.first,nr.prototype.hasNext=nr.prototype.Ad,nr.prototype.next=nr.prototype.next,nr.prototype.reset=nr.prototype.reset,nr.className="SingletonIterator";function qt(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}qt.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},qt.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},qt.prototype.Ad=function(){return this.next()},qt.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},qt.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},qt.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},qt.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},qt.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},qt.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},qt.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},qt.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},de.Object.defineProperties(qt.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}}}),qt.prototype.first=qt.prototype.first,qt.prototype.hasNext=qt.prototype.Ad,qt.prototype.next=qt.prototype.next,qt.prototype.reset=qt.prototype.reset,qt.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+")"},de.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){Je(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Zt("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()#"+Fn(this)},Pt.add=function(a){return a===null?this:(this._isFrozen&&Ue(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&&Ue(this);var y=this.s;if(xn(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&&Ue(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)&&fn(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)&&fn(a,"0 <= i < length",Vt,"setElt:i"),this._isFrozen&&Ue(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&&Ue(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&&fn(a,">= 0",Vt,"insertAt:i"),this._isFrozen&&Ue(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&&Ue(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)&&fn(a,"0 <= i < length",Vt,"removeAt:i"),this._isFrozen&&Ue(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&&Ue(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 Ae,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Pt.sort=function(a){return this._isFrozen&&Ue(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&&Ue(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&fn(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&&Ue(this),this.s.reverse(),this.xb(),this},de.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 Xi;var a=this.Sa;return a!==null?(a.reset(),a):new qt(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Xi;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 Ne(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ne.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ne.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)},Ne.prototype.Ad=function(){return this.next()},Ne.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},Ne.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},Ne.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},Ne.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},Ne.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},Ne.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},Ne.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ne.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},de.Object.defineProperties(Ne.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ne.prototype.first=Ne.prototype.first,Ne.prototype.hasNext=Ne.prototype.Ad,Ne.prototype.next=Ne.prototype.next,Ne.prototype.reset=Ne.prototype.reset,Ne.className="SetIterator";function Ae(a){Je(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=Ae.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()#"+Fn(this)},Pt.add=function(a){if(a===null)return this;this._isFrozen&&Ue(this,a);var y=a;return He(a)&&(y=yn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Wi(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&&Ue(this),xn(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 He(a)&&(y=Fn(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},Ae.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ae.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ae.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Ae.prototype.map=function(a){for(var y=new Ae,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Ae.prototype.filter=function(a){for(var y=new Ae,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Pt=Ae.prototype,Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ue(this,a);var y=a;if(He(a)&&(y=Fn(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&&Ue(this),xn(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&&Ue(this);var y=new Ae;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&&Ue(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Ae.prototype.copy=function(){var a=new Ae,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Ae.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},Ae.prototype.Hv=function(){var a=new Vt,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Je(a){a.__gohashid=wi++}function yn(a){var y=a.__gohashid;return y===void 0&&(y=wi++,a.__gohashid=y),y}function Fn(a){return a.__gohashid}de.Object.defineProperties(Ae.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Xi;var a=this.Sa;return a!==null?(a.reset(),a):new Ne(this)}}}),Ae.prototype.toList=Ae.prototype.Hv,Ae.prototype.toArray=Ae.prototype.Fa,Ae.prototype.clear=Ae.prototype.clear,Ae.prototype.retainAll=Ae.prototype.pA,Ae.prototype.removeAll=Ae.prototype.hp,Ae.prototype.delete=Ae.prototype.delete,Ae.prototype.remove=Ae.prototype.remove,Ae.prototype.first=Ae.prototype.first,Ae.prototype.containsAny=Ae.prototype.Ty,Ae.prototype.containsAll=Ae.prototype.Sy,Ae.prototype.has=Ae.prototype.has,Ae.prototype.contains=Ae.prototype.contains,Ae.prototype.addAll=Ae.prototype.addAll,Ae.prototype.add=Ae.prototype.add,Ae.prototype.thaw=Ae.prototype.ka,Ae.prototype.freeze=Ae.prototype.freeze;var wi=1;Ae.className="Set",Ae.uniqueHash=Je,Ae.hashIdUnique=yn,Ae.hashId=Fn;function si(a){this.ma=a,this.qa=a.Ja,this.sa=null}si.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},si.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)},si.prototype.Ad=function(){return this.next()},si.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},si.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},si.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},si.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},si.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},si.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},si.prototype.de=function(){this.value=this.key=null,this.qa=-1},si.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},de.Object.defineProperties(si.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),si.prototype.first=si.prototype.first,si.prototype.hasNext=si.prototype.Ad,si.prototype.next=si.prototype.next,si.prototype.reset=si.prototype.reset,si.className="MapKeySetIterator";function Ln(a){Ae.call(this),Je(this),this._isFrozen=!0,this.ma=a}we(Ln,Ae),Pt=Ln.prototype,Pt.freeze=function(){return this},Pt.ka=function(){return this},Pt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Pt.add=function(){Zt("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(){Zt("This Set is read-only: "+this.toString())},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){Zt("This Set is read-only: "+this.toString())},Pt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ln.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ln.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ln.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ln.prototype.map=function(a){for(var y=new Ae,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ln.prototype.filter=function(a){for(var y=new Ae,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Ln.prototype.copy=function(){return new Ln(this.ma)},Ln.prototype.Iv=function(){var a=new Ae,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ln.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},Ln.prototype.Hv=function(){var a=new Vt,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},de.Object.defineProperties(Ln.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Xi:new si(this.ma)}}}),Ln.prototype.toList=Ln.prototype.Hv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.first=Ln.prototype.first,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="MapKeySet";function Hn(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Hn.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Hn.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)},Hn.prototype.Ad=function(){return this.next()},Hn.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},Hn.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},Hn.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},Hn.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},Hn.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},Hn.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},Hn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Hn.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},de.Object.defineProperties(Hn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hn.prototype.first=Hn.prototype.first,Hn.prototype.hasNext=Hn.prototype.Ad,Hn.prototype.next=Hn.prototype.next,Hn.prototype.reset=Hn.prototype.reset,Hn.className="MapValueSetIterator";function Wi(a,y){this.key=a,this.value=y,this.ll=this.va=null}Wi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Wi.className="KeyValuePair";function Ri(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ri.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Ri.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)},Ri.prototype.Ad=function(){return this.next()},Ri.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},Ri.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},Ri.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},Ri.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},Ri.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},Ri.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},Ri.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Ri.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},de.Object.defineProperties(Ri.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ri.prototype.first=Ri.prototype.first,Ri.prototype.hasNext=Ri.prototype.Ad,Ri.prototype.next=Ri.prototype.next,Ri.prototype.reset=Ri.prototype.reset,Ri.className="MapIterator";function Tn(a){Je(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"&&Zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=Tn.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()#"+Fn(this)},Pt.add=function(a,y){this._isFrozen&&Ue(this,a);var x=a;He(a)&&(x=yn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Wi(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(xn(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 Tn)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},Tn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Tn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Tn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Tn.prototype.map=function(a){for(var y=new Tn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Tn.prototype.filter=function(a){for(var y=new Tn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Pt=Tn.prototype,Pt.contains=function(a){var y=a;return He(a)&&(y=Fn(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 He(a)&&(y=Fn(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&&Ue(this,a);var y=a;if(He(a)&&(y=Fn(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&&Ue(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()},Tn.prototype.copy=function(){var a=new Tn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Tn.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 Wi(b.key,b.value),x++}return y},Tn.prototype.Lf=function(){return new Ln(this)},de.Object.defineProperties(Tn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Xi;var a=this.Sa;return a!==null?(a.reset(),a):new Ri(this)}},iteratorKeys:{get:function(){return 0>=this.count?Xi:new si(this)}},iteratorValues:{get:function(){if(0>=this.count)return Xi;var a=this.jf;return a!==null?(a.reset(),a):new Hn(this)}}}),Tn.prototype.toKeySet=Tn.prototype.Lf,Tn.prototype.toArray=Tn.prototype.Fa,Tn.prototype.clear=Tn.prototype.clear,Tn.prototype.delete=Tn.prototype.delete,Tn.prototype.remove=Tn.prototype.remove,Tn.prototype.get=Tn.prototype.get,Tn.prototype.getValue=Tn.prototype.I,Tn.prototype.has=Tn.prototype.has,Tn.prototype.contains=Tn.prototype.contains,Tn.prototype.first=Tn.prototype.first,Tn.prototype.addAll=Tn.prototype.addAll,Tn.prototype.set=Tn.prototype.set,Tn.prototype.add=Tn.prototype.add,Tn.prototype.thaw=Tn.prototype.ka,Tn.prototype.freeze=Tn.prototype.freeze,Tn.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):Zt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Yi,ki,Ui,ji,Gi;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)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zn(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 li(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 Ei(a.x-this.x,a.y-this.y)},Pt.direction=function(a,y){return Ei(a-this.x,y-this.y)};function Ei(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 oi(a,y){return y.Cd(a),a}function Ai(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 Cr(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function $n(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=pi.pop();return a===void 0?new Ot:a},Ot.allocAt=function(a,y){var x=pi.pop();return x===void 0?new Ot(a,y):(x.x=a,x.y=y,x)},Ot.free=function(a){pi.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 pi=[];Ot.className="Point",Ot.parse=Zn,Ot.stringify=li,Ot.distanceLineSegmentSquared=Ai,Ot.distanceSquared=Cr,Ot.direction=$n,Ot.Origin=Yi=new Ot(0,0).ja(),Ot.InfiniteTopLeft=ki=new Ot(-1/0,-1/0).ja(),Ot.InfiniteBottomRight=Ui=new Ot(1/0,1/0).ja(),Ot.SixPoint=ji=new Ot(6,6).ja(),Ot.NoPoint=Gi=new Ot(NaN,NaN).ja(),Ot.parse=Zn,Ot.stringify=li,Ot.distanceLineSegmentSquared=Ai,Ot.distanceSquared=Cr,Ot.direction=$n;function rn(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):Zt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ui,or,Mr,wr,Pr,Nr,Xr;rn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},rn.prototype.h=function(a,y){return this.width=a,this.height=y,this},rn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},rn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},rn.prototype.copy=function(){var a=new rn;return a.width=this.width,a.height=this.height,a},Pt=rn.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)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function To(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 rn(x,b)}return new rn}function Co(a){return a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Size("+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof rn?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)},rn.alloc=function(){var a=Oo.pop();return a===void 0?new rn:a},rn.free=function(a){Oo.push(a)},rn.prototype.isReal=rn.prototype.w,rn.prototype.inflate=rn.prototype.Bc,rn.prototype.equalsApprox=rn.prototype.Xa,rn.prototype.equalTo=rn.prototype.hi,rn.prototype.equals=rn.prototype.D,rn.prototype.set=rn.prototype.set,rn.prototype.setTo=rn.prototype.sg;var Oo=[];rn.className="Size",rn.parse=To,rn.stringify=Co,rn.ZeroSize=ui=new rn(0,0).ja(),rn.OneSize=or=new rn(1,1).ja(),rn.SixSize=Mr=new rn(6,6).ja(),rn.EightSize=wr=new rn(8,8).ja(),rn.TenSize=Pr=new rn(10,10).ja(),rn.InfiniteSize=Nr=new rn(1/0,1/0).ja(),rn.NoSize=Xr=new rn(NaN,NaN).ja(),rn.parse=To,rn.stringify=Co;function ke(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 rn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Zt("Incorrect second argument supplied to Rect constructor "+y)):Zt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Pt=ke.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 Rr(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},ke.prototype.copy=function(){var a=new ke;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Pt=ke.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Js(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 ke(x,b,z,tt)}return new ke}function fs(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 ke?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 xa(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 io(this,y,a,y,a)},Pt.Co=function(a){return io(this,a.top,a.right,a.bottom,a.left)},Pt.Fv=function(a){return io(this,-a.top,-a.right,-a.bottom,-a.left)},Pt.Hz=function(a,y,x,E){return io(this,a,y,x,E)};function io(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 Nl(this,a.x,a.y,a.width,a.height)},Pt.Uu=function(a,y,x,E){return Nl(this,a,y,x,E)};function Nl(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 Wa(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 Ao(this,a.x,a.y,0,0)},Pt.ed=function(a){return Ao(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),Ao(this,a,y,x,E)};function Ao(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 _o(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 al(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},ke.alloc=function(){var a=ha.pop();return a===void 0?new ke:a},ke.allocAt=function(a,y,x,E){var b=ha.pop();return b===void 0?new ke(a,y,x,E):b.h(a,y,x,E)},ke.free=function(a){ha.push(a)},de.Object.defineProperties(ke.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 rn(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}}}),ke.prototype.isEmpty=ke.prototype.Mz,ke.prototype.isReal=ke.prototype.w,ke.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return oe.Fx(a,y,x,E,b,z,tt,rt)},ke.prototype.setSpot=ke.prototype.yi,ke.prototype.union=ke.prototype.Kv,ke.prototype.unionRect=ke.prototype.ed,ke.prototype.unionPoint=ke.prototype.Ye,ke.prototype.intersects=ke.prototype.Vu,ke.prototype.intersectsRect=ke.prototype.Yc,ke.prototype.intersect=ke.prototype.Uu,ke.prototype.intersectRect=ke.prototype.Ex,ke.prototype.grow=ke.prototype.Hz,ke.prototype.subtractMargin=ke.prototype.Fv,ke.prototype.addMargin=ke.prototype.Co,ke.prototype.inflate=ke.prototype.Bc,ke.prototype.offset=ke.prototype.offset,ke.prototype.contains=ke.prototype.contains,ke.prototype.containsRect=ke.prototype.Re,ke.prototype.containsPoint=ke.prototype.ca,ke.prototype.equalsApprox=ke.prototype.Xa,ke.prototype.equalTo=ke.prototype.hi,ke.prototype.equals=ke.prototype.D,ke.prototype.setSize=ke.prototype.tA,ke.prototype.setPoint=ke.prototype.dd,ke.prototype.set=ke.prototype.set,ke.prototype.setTo=ke.prototype.sg;var na=null,Ql=null,ha=[];ke.className="Rect",ke.parse=Js,ke.stringify=fs,ke.contains=_o,ke.intersects=al,ke.ZeroRect=na=new ke(0,0,0,0).ja(),ke.NoRect=Ql=new ke(NaN,NaN,NaN,NaN).ja(),ke.parse=Js,ke.stringify=fs,ke.contains=_o,ke.intersects=al;function Vi(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):Zt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Vi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Vi.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Vi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Vi.prototype.copy=function(){var a=new Vi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Pt=Vi.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)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function js(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 Vi;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Vi(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Vi(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Vi(x,b):new Vi(x,b,z,tt)}return new Vi}function lu(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 Vi?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)},Vi.alloc=function(){var a=$r.pop();return a===void 0?new Vi:a},Vi.free=function(a){$r.push(a)},Vi.prototype.isReal=Vi.prototype.w,Vi.prototype.equalsApprox=Vi.prototype.Xa,Vi.prototype.equalTo=Vi.prototype.hi,Vi.prototype.equals=Vi.prototype.D,Vi.prototype.set=Vi.prototype.set,Vi.prototype.setTo=Vi.prototype.sg;var Ua=null,Qr=null,$r=[];Vi.className="Margin",Vi.parse=js,Vi.stringify=lu,Vi.ZeroMargin=Ua=new Vi(0,0,0,0).ja(),Vi.TwoMargin=Qr=new Vi(2,2,2,2).ja(),Vi.parse=js,Vi.stringify=lu;function mn(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 ar,Ir,Mo,Da,qs,sr,Vr,ca,Ls,ia,Ya,Vs,Es,Hs,Ss,Lh,ms,Yu,Ul,tA,No,ll,Au,Xu,Zu,es,Fc,Ju,Ba,Al,xs,Io,qo,bs,Po,Zr;mn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},mn.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},mn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},mn.prototype.copy=function(){var a=new mn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Pt=mn.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)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function fo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function fa(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ar;if(a==="TopLeft")return Ir;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Mo;if(a==="TopRight")return Da;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return qs;if(a==="Center")return sr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Vr;if(a==="BottomLeft")return ca;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ls;if(a==="BottomRight")return ia;if(a==="TopSide")return Ya;if(a==="LeftSide")return Vs;if(a==="RightSide")return Es;if(a==="BottomSide")return Hs;if(a==="TopBottomSides")return Ss;if(a==="LeftRightSides")return Lh;if(a==="TopLeftSides")return ms;if(a==="TopRightSides")return Yu;if(a==="BottomLeftSides")return Ul;if(a==="BottomRightSides")return tA;if(a==="NotTopSide")return No;if(a==="NotLeftSide")return ll;if(a==="NotRightSide")return Au;if(a==="NotBottomSide")return Xu;if(a==="AllSides")return Zu;if(a==="Default")return es;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 mn(x,b,z,tt)}return new mn}function ds(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(ar)?"None":this.D(Ir)?"TopLeft":this.D(Mo)?"Top":this.D(Da)?"TopRight":this.D(qs)?"Left":this.D(sr)?"Center":this.D(Vr)?"Right":this.D(ca)?"BottomLeft":this.D(Ls)?"Bottom":this.D(ia)?"BottomRight":this.D(Ya)?"TopSide":this.D(Vs)?"LeftSide":this.D(Es)?"RightSide":this.D(Hs)?"BottomSide":this.D(Ss)?"TopBottomSides":this.D(Lh)?"LeftRightSides":this.D(ms)?"TopLeftSides":this.D(Yu)?"TopRightSides":this.D(Ul)?"BottomLeftSides":this.D(tA)?"BottomRightSides":this.D(No)?"NotTopSide":this.D(ll)?"NotLeftSide":this.D(Au)?"NotRightSide":this.D(Xu)?"NotBottomSide":this.D(Zu)?"AllSides":this.D(es)?"Default":"None"},Pt.D=function(a){return a instanceof mn?(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 mn(.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(Fc))a=Vs;else if(a.D(Ju))a=Es;else if(a.D(Ba))a=Ya;else if(a.D(Al))a=Hs;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},mn.alloc=function(){var a=os.pop();return a===void 0?new mn:a},mn.free=function(a){os.push(a)},mn.prototype.isDefault=mn.prototype.Xb,mn.prototype.isNone=mn.prototype.ys,mn.prototype.isSide=mn.prototype.$c,mn.prototype.isNoSpot=mn.prototype.Mc,mn.prototype.isSpot=mn.prototype.sb,mn.prototype.includesSide=mn.prototype.Hf,mn.prototype.opposite=mn.prototype.gv,mn.prototype.equals=mn.prototype.D,mn.prototype.set=mn.prototype.set,mn.prototype.setTo=mn.prototype.sg;var os=[];mn.className="Spot",mn.parse=fa,mn.stringify=ds,mn.None=ar=fo(new mn(0,0,0,0),0).ja(),mn.Default=es=fo(new mn(0,0,-1,0),-1).ja(),mn.TopLeft=Ir=new mn(0,0,0,0).ja(),mn.TopCenter=Mo=new mn(.5,0,0,0).ja(),mn.TopRight=Da=new mn(1,0,0,0).ja(),mn.LeftCenter=qs=new mn(0,.5,0,0).ja(),mn.Center=sr=new mn(.5,.5,0,0).ja(),mn.RightCenter=Vr=new mn(1,.5,0,0).ja(),mn.BottomLeft=ca=new mn(0,1,0,0).ja(),mn.BottomCenter=Ls=new mn(.5,1,0,0).ja(),mn.BottomRight=ia=new mn(1,1,0,0).ja(),mn.MiddleTop=xs=Mo,mn.MiddleLeft=Io=qs,mn.MiddleRight=qo=Vr,mn.MiddleBottom=bs=Ls,mn.Top=Ba=Mo,mn.Left=Fc=qs,mn.Right=Ju=Vr,mn.Bottom=Al=Ls,mn.TopSide=Ya=fo(new mn(0,0,1,1),1).ja(),mn.LeftSide=Vs=fo(new mn(0,0,1,2),1).ja(),mn.RightSide=Es=fo(new mn(0,0,1,4),1).ja(),mn.BottomSide=Hs=fo(new mn(0,0,1,8),1).ja(),mn.TopBottomSides=Ss=fo(new mn(0,0,1,9),1).ja(),mn.LeftRightSides=Lh=fo(new mn(0,0,1,6),1).ja(),mn.TopLeftSides=ms=fo(new mn(0,0,1,3),1).ja(),mn.TopRightSides=Yu=fo(new mn(0,0,1,5),1).ja(),mn.BottomLeftSides=Ul=fo(new mn(0,0,1,10),1).ja(),mn.BottomRightSides=tA=fo(new mn(0,0,1,12),1).ja(),mn.NotTopSide=No=fo(new mn(0,0,1,14),1).ja(),mn.NotLeftSide=ll=fo(new mn(0,0,1,13),1).ja(),mn.NotRightSide=Au=fo(new mn(0,0,1,11),1).ja(),mn.NotBottomSide=Xu=fo(new mn(0,0,1,7),1).ja(),mn.AllSides=Zu=fo(new mn(0,0,1,15),1).ja(),Po=new mn(.156,.156).ja(),Zr=new mn(.844,.844).ja(),mn.parse=fa,mn.stringify=ds;function Ii(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Ii.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Ii.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Ii.prototype.copy=function(){var a=new Ii;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Ii.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Ii.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Ii.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Ii.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Ii.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Ii.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Ii.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Ii.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Pt=Ii.prototype,Pt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Pt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Pt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Pt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Pt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Pt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,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},Ii.alloc=function(){var a=Bl.pop();return a===void 0?new Ii:a},Ii.free=function(a){Bl.push(a)},Ii.prototype.transformRect=Ii.prototype.pp,Ii.prototype.transformPoint=Ii.prototype.Ga,Ii.prototype.scale=Ii.prototype.scale,Ii.prototype.translate=Ii.prototype.translate,Ii.prototype.rotate=Ii.prototype.rotate,Ii.prototype.invert=Ii.prototype.Vj,Ii.prototype.multiplyInverted=Ii.prototype.bv,Ii.prototype.multiply=Ii.prototype.multiply,Ii.prototype.reset=Ii.prototype.reset,Ii.prototype.isIdentity=Ii.prototype.ws,Ii.prototype.equals=Ii.prototype.D,Ii.prototype.setTransform=Ii.prototype.setTransform,Ii.prototype.set=Ii.prototype.set;var Bl=[];Ii.className="Transform",Ii.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 $n(((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))Ao(at,a,y,0,0),Ao(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))Ao(rt,a,y,0,0),Ao(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 jt=(E+Gt)/2,Jt=(x+Dt)/2,te=1/0,ie=!1,ve=0,An=0;return oe.Eo(a,y,Bt,Mt,E,x,jt,Jt,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,ve=xt.x,An=xt.y)),oe.Eo(jt,Jt,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,ve=xt.x,An=xt.y),ie&&(xt.x=ve,xt.y=An),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 jt=(E+Gt)/2,Jt=(x+Dt)/2;xt+=oe.Fo(a,y,Bt,Mt,E,x,jt,Jt,ot,at,At,ft,pt),xt+=oe.Fo(jt,Jt,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 jt=(Gt-a)*(Gt-a)+(Dt-y)*(Dt-y);jt<ft&&(ft=jt,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):!!(_o(a,y,x,E,b,z)||_o(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 gi,um:new gi,Mf:new gi,Nf:0,vm:100};oe.za=oe.AA;function en(a){Je(this),this.l=2,a===void 0&&(a=en.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===en.o?this.ee=new Vt:(en.V===null&&(en.V=new Vt().freeze()),this.ee=en.V),this.aq=this.ee.Ja,this.Ip=new ke().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ir,this.gg=ia,this.Rk=this.Sk=NaN,this.Uf=Ve}en.prototype.copy=function(){var a=new en;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===en.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},en.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},en.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==en.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},en.prototype.ka=function(){if(Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==en.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},en.prototype.Xa=function(a){if(!(a instanceof en))return!1;if(this.type!==a.type)return this.type===en.j&&a.type===en.o?BA(this,a):a.type===en.j&&this.type===en.o?BA(a,this):!1;if(this.type===en.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 BA(a,y){return a.type!==en.j||y.type!==en.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===zr&&oe.B(a.endX,y.endX)&&oe.B(a.endY,y.endY))))}en.ia=function(a){return a.toString()},en.prototype.qb=function(a){a.classType===en&&(this.type=a)},en.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case en.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 en.u:var y=new ke(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 en.F:if(y=new ke(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 en.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()}},en.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},en.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 Ci=parseFloat(E()),yr=parseFloat(E());Gt===Gt.toLowerCase()&&(Ci=Jt.x+Ci,yr=Jt.y+yr),bi.h(Ci,yr)}function z(){return b(Jt),Jt}function tt(){return b(jt),jt}function rt(){var bi=Dt.toLowerCase();return bi!=="c"&&bi!=="s"&&bi!=="q"&&bi!=="t"?Jt:new Ot(2*Jt.x-jt.x,2*Jt.y-jt.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=ni();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,En(ot)}}var Mt=-1,Gt="",Dt="";ot=new Ot(0,0);var jt=new Ot(0,0),Jt=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(Jt);!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();)Jt=new Ot((Gt===Gt.toLowerCase()?Jt.x:0)+parseFloat(E()),Jt.y),a.lineTo(Jt.x,Jt.y);break;case"V":for(;!x();)Jt=new Ot(Jt.x,(Gt===Gt.toLowerCase()?Jt.y:0)+parseFloat(E())),a.lineTo(Jt.x,Jt.y);break;case"C":for(;!x();){Bt=new Ot,b(Bt);var ve=tt(),An=z();lc(a,Bt.x,Bt.y,ve.x,ve.y,An.x,An.y)}break;case"S":for(;!x();)Bt=rt(),ve=tt(),An=z(),lc(a,Bt.x,Bt.y,ve.x,ve.y,An.x,An.y);break;case"Q":for(;!x();)Bt=tt(),ve=z(),p0(a,Bt.x,Bt.y,ve.x,ve.y);break;case"T":for(;!x();)jt=Bt=rt(),ve=z(),p0(a,Bt.x,Bt.y,ve.x,ve.y);break;case"B":for(;!x();){Bt=parseFloat(E()),ve=parseFloat(E()),An=parseFloat(E());var In=parseFloat(E()),Cn=parseFloat(E()),$e=Cn,ze=!1;x()||($e=parseFloat(E()),x()||(ze=parseFloat(E())!==0)),Gt===Gt.toLowerCase()&&(An+=Jt.x,In+=Jt.y),a.arcTo(Bt,ve,An,In,Cn,$e,ze)}break;case"A":for(;!x();)Bt=Math.abs(parseFloat(E())),ve=Math.abs(parseFloat(E())),An=parseFloat(E()),Cn=In=!1,ze=$e=0,$e=E(),$e.length===1?(In=!!parseFloat($e),Cn=!!parseFloat(E()),$e=parseFloat(E())):$e.length===2?(In=!!parseFloat($e[0]),Cn=!!parseFloat($e[1]),$e=parseFloat(E())):(In=!!parseFloat($e[0]),Cn=!!parseFloat($e[1]),$e=parseFloat($e.slice(2))),ze=parseFloat(E()),Gt===Gt.toLowerCase()&&($e=Jt.x+$e,ze=Jt.y+ze),Jt.h($e,ze),x1(a,Bt,ve,An,In,Cn,$e,ze);break;case"Z":S1(a),Jt.assign(ot);break;case"F":for(Bt="",ve=1;at[Mt+ve];)if(at[Mt+ve]==="0")pt=!0,ve++;else if(at[Mt+ve].match(/[Uu]/)!==null)ve++;else if(at[Mt+ve].match(ie)===null)ve++;else{Bt=at[Mt+ve];break}Bt.match(/[Mm]/)?At=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Bt="",ve=1;at[Mt+ve];)if(at[Mt+ve].match(/[Ff]/)!==null)ve++;else if(at[Mt+ve].match(ie)===null)ve++;else{Bt=at[Mt+ve];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},en.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)},en.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===en.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},en.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===en.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),qu(this,a,!1),Ao(a,0,0,0,0),a.freeze()},en.prototype.ix=function(){var a=new ke;return qu(this,a,!0),a};function qu(a,y,x){switch(a.type){case en.j:case en.u:case en.F:x?y.h(a.od,a.pd,0,0):Ao(y,a.od,a.pd,0,0),Ao(y,a.Dc,a.Ec,0,0);break;case en.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):Ao(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 zr:case ns:ot=ft.endX,at=ft.endY,Ao(y,ot,at,0,0);break;case Ms: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 Ho:case hl:var pt=ft.type===Ho?Ca(ft,z):ul(ft,z,ot,at),xt=pt.length;if(xt===0){ot=ft.type===Ho?ft.centerX:ft.endX,at=ft.type===Ho?ft.centerY:ft.endY,Ao(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:Zt("Unknown Segment type: "+ft.type)}}}break;default:Zt("Unknown Geometry type: "+a.type)}}en.prototype.normalize=function(){this._isFrozen&&Ue(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ot(-a.x,-a.y)},en.prototype.offset=function(a,y){return this._isFrozen&&Ue(this),this.transform(1,0,0,1,a,y),this},en.prototype.scale=function(a,y){return this._isFrozen&&Ue(this),this.transform(a,0,0,y,0,0),this},en.prototype.rotate=function(a,y,x){this._isFrozen&&Ue(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Ii.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Ii.free(E),this},Pt=en.prototype,Pt.transform=function(a,y,x,E,b,z){switch(this.type){case en.j:case en.u:case en.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 en.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 zr:case ns:tt=Bt.endX,rt=Bt.endY,Bt.endX=tt*a+rt*x+b,Bt.endY=tt*y+rt*E+z;break;case Ms: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 Ho: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 hl: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:Zt("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 en.j:return oe.Yb(x,E,b,z,y,a.x,a.y);case en.u:var tt=ke.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),ke.free(tt),a;case en.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 en.o:return Ts(this,a,y,!0,!1);default:return!1}};function Ts(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 jt=ot,Jt=at,te=Dt.s,ie=0;ie<=Dt.length;ie++){var ve=void 0;if(ie!==Dt.length){ve=te[ie];var An=ve.type;a=ve.endX,ft=ve.endY}else An=zr,a=jt,ft=Jt;switch(An){case ns:if(jt=CA(z,y,tt,y,ot,at,jt,Jt),isNaN(jt))return!0;rt+=jt,jt=a,Jt=ft;break;case zr:if(ot=CA(z,y,tt,y,ot,at,a,ft),isNaN(ot))return!0;rt+=ot;break;case Ms:At=oe.Fo(ot,at,ve.point1X,ve.point1Y,ve.point2X,ve.point2Y,a,ft,tt,y,z,y,.5),rt+=At;break;case Oa:At=oe.Fo(ot,at,(ot+2*ve.point1X)/3,(at+2*ve.point1Y)/3,(2*ve.point1X+a)/3,(2*ve.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=At;break;case Ho:case hl:An=ve.type===Ho?Ca(ve,Mt):ul(ve,Mt,ot,at);var In=An.length;if(In===0){if(ot=CA(z,y,tt,y,ot,at,ve.type===Ho?ve.centerX:ve.endX,ve.type===Ho?ve.centerY:ve.endY),isNaN(ot))return!0;rt+=ot;break}ve=null;for(var Cn=0;Cn<In;Cn++){if(ve=An[Cn],Cn===0){if(At=CA(z,y,tt,y,ot,at,ve[0],ve[1]),isNaN(At))return!0;rt+=At}At=oe.Fo(ve[0],ve[1],ve[2],ve[3],ve[4],ve[5],ve[6],ve[7],tt,y,z,y,.5),rt+=At}ve!==null&&(a=ve[6],ft=ve[7]);break;default:Zt("Unknown Segment type: "+ve.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 $u(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===en.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===en.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===en.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===en.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===en.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 jt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);jt<b&&(b=jt,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 mf(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===en.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===en.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===en.F){var z=new ss;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new gr(Ho);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=Ca(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(uu(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 ns:4<=E.length&&(y.push(E),x.push(uu(E))),E=[],E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY,rt=tt,ot=z;break;case zr:E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY;break;case Ms: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 Ho:var xt=Ca(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 hl:if(xt=ul(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:Zt("Segment not of valid type: "+pt.type)}pt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(uu(E)))}}}function uu(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(Cr(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&&Ue(this),this.fg=new mn(a,y,b,z).freeze(),this.gg=new mn(x,E,tt,rt).freeze(),this},de.Object.defineProperties(en.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 mf(this),this.tk}},flattenedLengths:{get:function(){return mf(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===en.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===en.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&&Ue(this,a),this.na=a,a===en.o?this.ee=new Vt:(en.V===null&&(en.V=new Vt().freeze()),this.ee=en.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ue(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ue(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ue(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ue(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ue(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ue(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ue(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ue(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),en.prototype.setSpots=en.prototype.pm,en.prototype.add=en.prototype.add,en.prototype.getFractionForPoint=en.prototype.xx,en.prototype.getPointAndAngleAlongPath=en.prototype.Qu,en.prototype.getAngleAlongPath=en.prototype.wx,en.prototype.getPointAlongPath=en.prototype.Pu,en.prototype.containsPoint=en.prototype.ca,en.prototype.transform=en.prototype.transform,en.prototype.rotate=en.prototype.rotate,en.prototype.scale=en.prototype.scale,en.prototype.offset=en.prototype.offset,en.prototype.normalize=en.prototype.normalize,en.prototype.computeBoundsWithoutOrigin=en.prototype.ix,en.prototype.equalsApprox=en.prototype.Xa,en.className="Geometry",en.j=new Re(en,"Line",0),en.u=new Re(en,"Rectangle",1),en.F=new Re(en,"Ellipse",2),en.o=new Re(en,"Path",3),en.V=null,en.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",en.className="Geometry",en.stringify=en.ia,en.fillPath=en.nb,en.parse=en.parse,en.Line=en.j,en.Rectangle=en.u,en.Ellipse=en.F,en.Path=en.o;function ss(a,y,x,E,b){Je(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}ss.prototype.copy=function(){var a=new ss;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=ss.prototype,Pt.Xa=function(a){if(!(a instanceof ss&&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 ns:z=At.endX,tt=At.endY,E=At.endX,b=At.endY;break;case zr:if(oe.Yb(E,b,At.endX,At.endY,x,a,y))return!0;E=At.endX,b=At.endY;break;case Ms: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 Ho:case hl:var ft=At.type===Ho?Ca(At,this):ul(At,this,E,b),pt=ft.length,xt=At.type===Ho?At.centerX:At.endX,Bt=At.type===Ho?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:Zt("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},de.Object.defineProperties(ss.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&&Ue(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ue(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ue(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ue(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ue(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ue(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ss.prototype.add=ss.prototype.add,ss.prototype.equalsApprox=ss.prototype.Xa,ss.className="PathFigure";function gr(a,y,x,E,b,z,tt,rt){Je(this),a===void 0&&(a=zr),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===hl?(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===Ho&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Ho&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}gr.prototype.copy=function(){var a=new gr;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=gr.prototype,Pt.Xa=function(a){if(!(a instanceof gr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ns:case zr:return oe.B(this.endX,a.endX)&&oe.B(this.endY,a.endY);case Ms: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 Ho: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 hl: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===gr&&(this.type=a)},Pt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ns:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case zr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ms: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 Ho: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 hl: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 Ca(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=Ii.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),en.Ha(z,tt),Ii.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function ul(a,y,x,E){function b(Mt,Gt,Dt,jt){return(Mt*jt<Gt*Dt?-1:1)*Math.acos((Mt*Dt+Gt*jt)/(Math.sqrt(Mt*Mt+Gt*Gt)*Math.sqrt(Dt*Dt+jt*jt)))}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=Ii.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,xt),en.Ha(y,z),Ii.free(z),a.ae=y,a.ae}de.Object.defineProperties(gr.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&&Ue(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ue(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ue(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ue(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ue(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ue(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ue(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ue(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ue(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&fn(a,">= zero",gr,"radiusX"),this._isFrozen&&Ue(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&fn(a,">= zero",gr,"radiusY"),this._isFrozen&&Ue(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ue(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&&Ue(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&&Ue(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&&Ue(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&&Ue(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),gr.prototype.equalsApprox=gr.prototype.Xa;var ns=new Re(gr,"Move",0),zr=new Re(gr,"Line",1),Ms=new Re(gr,"Bezier",2),Oa=new Re(gr,"QuadraticBezier",3),Ho=new Re(gr,"Arc",4),hl=new Re(gr,"SvgArc",4);gr.className="PathSegment",gr.Move=ns,gr.Line=zr,gr.Bezier=Ms,gr.QuadraticBezier=Oa,gr.Arc=Ho,gr.SvgArc=hl;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||Rc(x,a,y),y},Is.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Rc(x,a,y),y.assign(x.Ps(y))),y},de.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 hu(){this.H=null,this.xa="",this.ar=this.Lr=null}hu.prototype.copy=function(){var a=new hu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},hu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},de.Object.defineProperties(hu.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}}}),hu.className="DiagramEvent";function po(){this.Fm=uo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}po.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},po.prototype.copy=function(){var a=new po;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=He(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=He(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=He(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=He(y)&&typeof y.J=="function"?y.J():y,a},po.prototype.qb=function(a){a.classType===po&&(this.change=a)},po.prototype.toString=function(){var a="";return a=this.change===da?a+"* ":this.change===uo?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+=Ki(this.object)),this.oldValue!==null&&(a+=" old: "+Ki(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ki(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},po.prototype.I=function(a){return a?this.oldValue:this.newValue},po.prototype.Dz=function(a){return a?this.oldParam:this.newParam},po.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},po.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},po.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},po.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},de.Object.defineProperties(po.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}}}),po.prototype.redo=po.prototype.redo,po.prototype.canRedo=po.prototype.canRedo,po.prototype.undo=po.prototype.undo,po.prototype.canUndo=po.prototype.canUndo,po.prototype.getParam=po.prototype.Dz,po.prototype.getValue=po.prototype.I,po.prototype.clear=po.prototype.clear;var da=new Re(po,"Transaction",-1),uo=new Re(po,"Property",0),Qo=new Re(po,"Insert",1),$o=new Re(po,"Remove",2);po.className="ChangedEvent",po.Transaction=da,po.Property=uo,po.Insert=Qo,po.Remove=$o;function gs(){this.o=new Vt().freeze(),this.xa="",this.j=!1}gs.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},gs.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()},gs.prototype.canUndo=function(){return this.isComplete},gs.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()}},gs.prototype.canRedo=function(){return this.isComplete},gs.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()}},gs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Tn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===uo&&E.object){var b=y.get(E.object);b||(b=new Tn,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()}},de.Object.defineProperties(gs.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}}}),gs.prototype.optimize=gs.prototype.ak,gs.prototype.redo=gs.prototype.redo,gs.prototype.canRedo=gs.prototype.canRedo,gs.prototype.undo=gs.prototype.undo,gs.prototype.canUndo=gs.prototype.canUndo,gs.prototype.clear=gs.prototype.clear,gs.className="Transaction";function vo(){this.Pt=new Ae,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}vo.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},vo.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},vo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Pt=vo.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=""),th(this,!0,a)},Pt.Kf=function(){return th(this,!1,"")};function th(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Rn("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()}},vo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},vo.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){Rn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},vo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},vo.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){Rn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},vo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new po;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)},vo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new gs);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||Rn("Change not within a transaction: "+x.toString()))}},vo.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},de.Object.defineProperties(vo.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}}}),vo.prototype.handleChanged=vo.prototype.Tu,vo.prototype.redo=vo.prototype.redo,vo.prototype.undo=vo.prototype.undo,vo.prototype.canUndo=vo.prototype.canUndo,vo.prototype.discardHistoryAfterIndex=vo.prototype.lx,vo.prototype.rollbackTransaction=vo.prototype.Kf,vo.prototype.commitTransaction=vo.prototype.eb,vo.prototype.startTransaction=vo.prototype.Ea,vo.prototype.removeModel=vo.prototype.Rx,vo.prototype.addModel=vo.prototype.Xw,vo.prototype.clear=vo.prototype.clear,vo.className="UndoManager";function cr(){Je(this),this.H=uA,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Is,this.Zr=-1}cr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Jn(this.constructor)},cr.prototype.updateAdornments=function(){},cr.prototype.canStart=function(){return this.isEnabled},cr.prototype.doStart=function(){},cr.prototype.doActivate=function(){this.isActive=!0},cr.prototype.doDeactivate=function(){this.isActive=!1},cr.prototype.doStop=function(){},cr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},cr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},cr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},cr.prototype.doMouseMove=function(){},cr.prototype.doMouseUp=function(){this.stopTool()},cr.prototype.doMouseWheel=function(){},cr.prototype.canStartMultiTouch=function(){return!0},cr.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)},cr.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)},cr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},cr.prototype.doKeyUp=function(){},cr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},cr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},cr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(vr?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||(vr?y.meta:y.control)||y.shift||a.clearSelection()}},cr.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,eh(a,E,x),E.handled};function eh(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)}}}cr.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}},cr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},cr.prototype.doCurrentObjectChanged=function(){},cr.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===Lc&&!y.shift||b===zA&&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===Lc&&y.shift||b===zA&&!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)}}},cr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},cr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=ge(function(){x.doWaitAfter(E)},a)},cr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&on.clearTimeout(this.Zr),this.Zr=-1},cr.prototype.doWaitAfter=function(){},cr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof mr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},cr.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},de.Object.defineProperties(cr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof me&&(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}}}),cr.prototype.startTransaction=cr.prototype.Ea,cr.className="Tool";function so(){cr.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 rn(2,2).ja(),this.Ha=5e3,this.ia=zA,this.u=vf,this.Mp=this.j=null,this.zj=-1}we(so,cr),so.prototype.initializeStandardTools=function(){},so.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof mr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},so.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===KA&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===KA)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===zA?this.mouseWheelBehavior=Lc:this.mouseWheelBehavior===Lc&&(this.mouseWheelBehavior=zA)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},so.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===KA)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)}so.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof mr&&(y===a||y.rg(a))||this.hideToolTip()},so.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()))},so.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)},so.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 mr)||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()},so.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof mr){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 rA&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(on.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=ge(function(){b.hideToolTip()},a)}},so.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}},so.prototype.hideToolTip=function(){this.zj!==-1&&(on.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof mr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof rA&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},so.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()},so.prototype.doMouseWheel=function(){this.standardMouseWheel()},so.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},so.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},so.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},so.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},so.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)},de.Object.defineProperties(so.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 mr?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}}}),so.prototype.replaceStandardTool=so.prototype.gb;var zA=new Re(so,"WheelScroll",0),Lc=new Re(so,"WheelZoom",1),sd=new Re(so,"WheelNone",2),vf=new Re(so,"GestureZoom",3),KA=new Re(so,"GestureCancel",4),PA=new Re(so,"GestureNone",5);so.className="ToolManager",so.WheelScroll=zA,so.WheelZoom=Lc,so.WheelNone=sd,so.GestureZoom=vf,so.GestureCancel=KA,so.GestureNone=PA;function yo(){cr.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 Ae().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var FA;we(yo,cr),yo.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},yo.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},yo.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,(vr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},yo.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),as=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&&la(a),Kc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,as=this,gu=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 nn?(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))}}yo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},yo.prototype.Pd=function(a){return a===void 0?new kA(Yi):this.isGridSnapEnabled?new kA(new Ot(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new kA(a.copy())},yo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),nh(this),Eu(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);cu(b),Dl(b),nh(b),b.diagram.ug()}y.clear()}cu(this),this.tl.h(NaN,NaN),gu!==null&&(gu.currentCursor=""),as=gu=null,Dl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Oh(a,!0)},yo.prototype.stopTransaction=function(){var a=this.diagram,y=cr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function nh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,ad(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Eh(){var a=as;Dl(a),nA(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}yo.prototype.doCancel=function(){Dl(this),nA(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},yo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},yo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function jA(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")):nA(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 Tn,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 nn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,yf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,hc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Dl(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 nn&&(x.value.point=new Ot(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function cu(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 eA(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&&(la(E),E.hk())}yo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&ch(E,a,y,this.dragOptions,x)};function nA(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 nn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),hc(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),fu(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&&as===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&&as===null||(a.doDragOver(y,E),!a.isActive&&as===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)}yo.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 mr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},yo.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&&as===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(sr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ot.free(a),tt}function fu(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)}}}}yo.prototype.doDragOver=function(){};function du(a,y){var x=a.diagram;a.dragsLink&&fu(a,!0),nh(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||as!==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||as!==null){for(a=ke.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof gn&&qg(x,E,a);ke.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 nn},!0,function(b){return b instanceof nn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}yo.prototype.doDropOnto=function(){},yo.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()?(jA(this,!1),Kc(a,this.copiedParts),eA(this,this.copiedParts,!1),Eu(a,this.copiedParts)):this.mayMove()?(Dl(this),eA(this,this.draggedParts,!0)):this.mayDragOut()?(jA(this,!1),eA(this,this.copiedParts,!1)):Dl(this),wf(this,a.lastInput.documentPoint))}},yo.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?(Dl(this),jA(this,!0),Kc(a,this.copiedParts),eA(this,this.copiedParts,!1),Eu(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,Dl(this),this.mayMove()&&(eA(this,this.draggedParts,!0),wf(this,a.lastInput.documentPoint))),this.Ym=!0,du(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&$g(this),a.Ya(),Eu(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},yo.prototype.simulatedMouseMove=function(a,y,x){if(as===null)return!1;var E=as.diagram;x instanceof me||(x=null);var b=gu;return x!==b&&(b!==null&&b!==E&&(b.ug(),as.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),gu=x,x!==null&&x!==E&&(Eh(),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)},yo.prototype.simulatedMouseUp=function(a,y,x){if(as===null)return!1;var E=gu,b=as.diagram;if(x===null)return as.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),as.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;gu=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Eh(),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=as,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())}}yo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(vr?!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())},yo.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())},yo.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())},yo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},yo.prototype.Az=function(){return as},yo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=as;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},yo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ga(a),a.animationManager.Cc(),a=as,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},yo.prototype.doSimulatedDragLeave=function(){var a=as;a!==null&&a.doSimulatedDragOut(),this.doCancel()},yo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=as;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;og(this,y.draggedParts.Lf(),!1,a.firstInput),eA(this,this.copiedParts,!1),wf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},yo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=as;if(y!==null){var x=y.diagram;if(y.Ym=!0,Dl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),og(this,y.draggedParts.Lf(),!0,a.lastInput),eA(this,this.copiedParts,!1);var E=new Ae;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),du(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=ke.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,ke.free(z),z=a.Fr,tt=new Tn,rt=Ot.alloc(),ot=y.iterator;ot.next();)at=ot.value,at instanceof nn&&at.canCopy()&&(At=x.I(at),At!==null&&(At.points=at.points,hc(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,hc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}yo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},yo.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Ot},de.Object.defineProperties(yo.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}}}),yo.prototype.getDraggingSource=yo.prototype.Az;var as=null,gu=null;yo.className="DraggingTool",FA=new Vt,rr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),so.prototype.doCancel=function(){as!==null&&as.doCancel(),cr.prototype.doCancel.call(this)};function bo(){cr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new nn,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=or,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=or,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 Tn,this.Of=this.gj=this.Pf=null}we(bo,cr),bo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},bo.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=rn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,rn.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=sr,z=Ot.alloc(),x.location=y.ga(sr,z),Ot.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},bo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=or,y.fromSpot=ar,y.toSpot=ar),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},bo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},bo.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)}},bo.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},bo.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(sr,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},bo.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},bo.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},bo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},bo.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},bo.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)},bo.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 Ae;return E.add(a),_s(this,x,y,E)};function _s(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),_s(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),_s(a,y.labeledLink,x,E))))}bo.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!==Yc){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!ra(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!ra(this,a,y,x,!0)}if(E===Xh)return a===y?a=!0:(E=new Ae,E.add(y),a=oa(this,E,a,y,x)),!a;if(E===Zh)return!ra(this,a,y,x,!1);if(E===Hf)return a===y?a=!0:(E=new Ae,E.add(y),a=pu(this,E,a,y,x)),!a}return!0};function ra(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&&ra(a,tt,x,E,b)))return!0}return!1}function oa(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&&oa(a,y,tt,E,b)))return!0}return!1}function pu(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&&pu(a,y,rt,E,b))return!0}}return!1}de.Object.defineProperties(bo.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}}}),bo.className="LinkingBaseTool";function Rs(){bo.call(this),this.name="Linking",this.V={},this.F=null,this.K=ih,this.Xd=null}we(Rs,bo),Rs.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},Rs.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===ih||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===ih||x===ag)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Rs.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)},Rs.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()},Rs.prototype.doStop=function(){bo.prototype.doStop.call(this),this.startObject=null},Rs.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)}}},Rs.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof nn)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)},Rs.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Rs.prototype.doNoLink=function(){},de.Object.defineProperties(Rs.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 ih=new Re(Rs,"Either",0),sg=new Re(Rs,"ForwardsOnly",0),ag=new Re(Rs,"BackwardsOnly",0);Rs.className="LinkingTool",Rs.Either=ih,Rs.ForwardsOnly=sg,Rs.BackwardsOnly=ag;function Xa(){bo.call(this),this.name="Relinking";var a=new Oi;a.figure="Diamond",a.desiredSize=wr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Oi,a.figure="Diamond",a.desiredSize=wr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new ke}we(Xa,bo),Xa.prototype.updateAdornments=function(a){if(a!==null&&a instanceof nn){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 mr;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 mr&&x.adornedPart instanceof nn))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=ui),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ui),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===cc)&&(x=Ma),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(){bo.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)}de.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 mr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Xa.className="RelinkingTool",rr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),rr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Ro(){cr.call(this),this.name="LinkReshaping";var a=new Oi;a.figure="Rectangle",a.desiredSize=Mr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Oi,a.figure="Diamond",a.desiredSize=wr,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}we(Ro,cr),Ro.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ad},Ro.prototype.om=function(a,y){a.reshapingBehavior=y},Ro.prototype.updateAdornments=function(a){if(a!==null&&a instanceof nn){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)}},Ro.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new mr,b.type=je.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==bl)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,vu),rt.cursor="n-resize"):oe.B(ot.y,at.y)&&(this.om(rt,mu),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,vu),rt.cursor="n-resize"):oe.B(ot.y,at.y)&&(this.om(rt,mu),rt.cursor="w-resize")):tt!==z&&(this.om(rt,xf),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},Ro.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Ro.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Ro.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},Ro.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 nn){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}}},Ro.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Ro.prototype.stopTransaction=function(){var a=this.diagram,y=cr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ro.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Ro.prototype.getResegmentingPoint=function(){return this.handle.ga(sr)},Ro.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Ro.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&&(iA(this,tt,E,b,z,!0)||iA(this,tt,E,b,z,!1))){var rt=y.points.copy();iA(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&&(iA(this,E,b,z,tt,!0)||iA(this,E,b,z,tt,!1))&&(rt=y.points.copy(),iA(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 iA(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}Ro.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===vu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===mu&&(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===vu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===mu&&(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(sr,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(sr,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()},Ro.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case xf:return a;case vu:return new Ot(y.i(x).x,a.y);case mu:return new Ot(a.x,y.i(x).y);default:case Ad:return y.i(x)}},de.Object.defineProperties(Ro.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 mr))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}}}),Ro.prototype.setReshapingBehavior=Ro.prototype.om,Ro.prototype.getReshapingBehavior=Ro.prototype.Ru;var Ad=new Re(Ro,"None",0),mu=new Re(Ro,"Horizontal",1),vu=new Re(Ro,"Vertical",2),xf=new Re(Ro,"All",3);Ro.className="LinkReshapingTool",Ro.None=Ad,Ro.Horizontal=mu,Ro.Vertical=vu,Ro.All=xf,rr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Gs(){cr.call(this),this.name="Resizing",this.o=new rn(1,1).freeze(),this.j=new rn(9999,9999).freeze(),this.yg=new rn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Oi;a.alignmentFocus=sr,a.figure="Rectangle",a.desiredSize=Mr,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 rn,this.Tn=new Ot,this.rt=new rn(0,0),this.qt=new rn(1/0,1/0),this.pt=new rn(1,1)}we(Gs,cr),Gs.prototype.updateAdornments=function(a){if(!(a===null||a instanceof nn)){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(),Zc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Gs.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new mr,y.type=je.Spot,y.locationSpot=sr;var x=new Ea;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ir)),y.add(this.makeHandle(a,Da)),y.add(this.makeHandle(a,ia)),y.add(this.makeHandle(a,ca)),y.add(this.makeHandle(a,xs)),y.add(this.makeHandle(a,qo)),y.add(this.makeHandle(a,bs)),y.add(this.makeHandle(a,Io))}else if(Yl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Gs.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Gs.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=sr),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)}},Gs.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},Gs.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))},Gs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Gs.prototype.stopTransaction=function(){var a=this.diagram,y=cr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Gs.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Gs.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)}},Gs.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()},Gs.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()}},Gs.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=sr);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},Gs.prototype.computeReshape=function(){var a=Ke;return this.adornedObject instanceof Oi&&(a=Hm(this.adornedObject)),!(a===Dn||this.diagram.lastInput.shift)},Gs.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},Gs.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},Gs.prototype.computeCellSize=function(){var a=new rn(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},de.Object.defineProperties(Gs.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 mr))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 mr)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}}}),Gs.className="ResizingTool",rr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function sa(){cr.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=wr,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}we(sa,cr),sa.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)}},sa.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new mr,y.type=je.Position,y.locationSpot=sr;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},sa.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},sa.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)},sa.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(sr)},sa.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)},sa.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},sa.prototype.stopTransaction=function(){var a=this.diagram,y=cr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},sa.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},sa.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},sa.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()},sa.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()}},sa.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},de.Object.defineProperties(sa.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 mr))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 mr)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}}}),sa.className="RotatingTool",rr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function rh(){cr.call(this),this.name="ClickSelecting"}we(rh,cr),rh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},rh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},rh.className="ClickSelectingTool";function Cl(){cr.call(this),this.name="Action",this.pk=null}we(Cl,cr),Cl.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},Cl.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()},Cl.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))}},Cl.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()},Cl.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())},Cl.prototype.doStop=function(){this.pk=null},Cl.className="ActionTool";function yu(){cr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ot(0,0)}we(yu,cr),yu.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)},yu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},yu.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);He(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ot.allocAt(a.x,a.y);this.isGridSnapEnabled&&zc(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},de.Object.defineProperties(yu.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}}}),yu.className="ClickCreatingTool";function cl(){cr.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}we(cl,cr),cl.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))},cl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},cl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},cl.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=rn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),rn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},cl.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()},cl.prototype.computeBoxBounds=function(){var a=this.diagram;return new ke(a.firstInput.documentPoint,a.lastInput.documentPoint)},cl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),vr?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)}},de.Object.defineProperties(cl.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}}}),cl.className="DragSelectingTool";function Ns(){cr.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(on.document,"scroll",a.Kw,!1),a.stopTool()}}we(Ns,cr),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(on.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)}},de.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",rr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),rr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),rr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),rr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),rr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function rA(){this.F=this.u=this.j=this.o=null}de.Object.defineProperties(rA.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}}}),rA.className="HTMLInfo";function fl(a,y,x){this.text=a,this.hx=y,this.visible=x}fl.className="ContextMenuButtonInfo";function aa(){cr.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()}}we(aa,cr);function Ol(a){var y=new rA;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Su=y,a.tu=function(){a.stopTool()},y=cn("div");var x=cn("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=cn("style");on.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",Go,!1),E.addEventListener(y,"selectstart",Go,!1),E.addEventListener(x,"contextmenu",Go,!1)),y.className="goCXforeground",x.className="goCXbackground",on.document.body&&(on.document.body.appendChild(y),on.document.body.appendChild(x)),Mc=y,Mh=x,Ec=!0}function Go(a){return a.preventDefault(),!1}aa.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)},aa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},aa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},aa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof me||(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},aa.prototype.doActivate=function(){},aa.prototype.doMouseDown=function(){if(cr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof mr){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)},aa.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof mr){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 rA||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(VA(a,!0),a.isActive||a.stopTool())}aa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function VA(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=Su,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 mr&&!a.currentContextMenu.visible&&a.stopTool()}}aa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},aa.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof mr){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 rA&&a.show(y,x,this);this.currentContextMenu=a},aa.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}},aa.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof mr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof rA&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function wu(a){var y=new Vt;return y.add(new fl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new fl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new fl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new fl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new fl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new fl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new fl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new fl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new fl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new fl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new fl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new fl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new fl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}aa.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=wu(this)),Mc.innerHTML="",Mh.addEventListener("pointerdown",this.tu,!1);var y=this,x=cn("ul");x.className="goCXul",Mc.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=cn("li"),z.className="goCXli";var tt=cn("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)}}Mc.style.display="block",Mh.style.display="block"},aa.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Su){Mc.style.display="none",Mh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Mh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},de.Object.defineProperties(aa.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof mr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Ec===!1&&Su===null&&wo&&Ol(this),Su},set:function(a){a===null&&(Ec=!0),Su=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Su=null,Ec=!1,Mh=null,Mc=null;aa.className="ContextMenuTool",rr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Jr(){cr.call(this),this.name="TextEditing",this.Zh=new Wr,this.ia=null,this.V=kh,this.vj=null,this.qa=bh,this.u=1,this.F=!0,this.o=null,this.j=new rA,this.kt=null,kc(this,this.j)}we(Jr,cr);function kc(a,y){if(wo){var x=cn("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(bc)):b==="Tab"?(a.acceptText(Ws),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==bh){var E=a.kt;a.qa===Th&&(a.qa=Tc),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==bh){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 Wr&&z instanceof Jr)if(z.state===Ic)x.style.border="3px solid red",x.focus();else{var tt=E.ga(sr),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)}}}Jr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||xu&&xu!==this&&(xu.acceptText(oA),xu&&xu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Wr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===kh&&!y.isSelected||this.starting===Cf&&2>a.lastInput.clickCount)):!1},Jr.prototype.doStart=function(){xu=this,this.textBlock!==null&&this.doActivate()},Jr.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 Wr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Th;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new ke(this.textBlock.ga(Ir),this.textBlock.ga(ia));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Jr.prototype.doCancel=function(){this.stopTool()},Jr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Jr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(oA)},Jr.prototype.acceptText=function(a){switch(a){case oA:this.qa===Ih?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Th||this.qa===Ic||this.qa===Tc)&&(this.qa=hd,ud(this));break;case Bf:case bc:case Ws:(bc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Th||this.qa===Ic||this.qa===Tc)&&(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=Ih,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=Ic,a.doError(b,z))}}Jr.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)},Jr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Jr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=bh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Jr.prototype.doStop=function(){xu=null},Jr.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)))},Jr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},de.Object.defineProperties(Jr.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)}}}),Jr.prototype.measureTemporaryTextBlock=Jr.prototype.Lx;var Bf=new Re(Jr,"LostFocus",0),oA=new Re(Jr,"MouseDown",1),Ws=new Re(Jr,"Tab",2),bc=new Re(Jr,"Enter",3),tp=new Re(Jr,"SingleClick",0),kh=new Re(Jr,"SingleClickSelected",1),Cf=new Re(Jr,"DoubleClick",2),bh=new Re(Jr,"StateNone",0),Th=new Re(Jr,"StateActive",1),Tc=new Re(Jr,"StateEditing",2),hd=new Re(Jr,"StateValidating",3),Ic=new Re(Jr,"StateInvalid",4),Ih=new Re(Jr,"StateValidated",5),xu=null;Jr.className="TextEditingTool",Jr.LostFocus=Bf,Jr.MouseDown=oA,Jr.Tab=Ws,Jr.Enter=bc,Jr.SingleClick=tp,Jr.SingleClickSelected=kh,Jr.DoubleClick=Cf,Jr.StateNone=bh,Jr.StateActive=Th,Jr.StateEditing=Tc,Jr.StateValidating=hd,Jr.StateInvalid=Ic,Jr.StateValidated=Ih,rr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ha(a){ah||(cd(),ah=!0),this.H=uA,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=AA,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ae,this.ce=new Qs,this.ce.Yd=this,this.Ei=new Ae,this.pu=new Ae,this.Sr=new Ae,this.pr=new Ae,a&&Object.assign(this,a)}Ha.prototype.Xe=function(a){this.H=a},Ha.prototype.canStart=function(){return!0};function sA(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Us(a.H),a.zb=!0)}function fr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===AA?(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===Nc&&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(),lh(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Ks&&E!==null&&(delete E.start.scale,delete E.end.scale),on.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&la(x),bf(x),a.zb=!1,y.start(),y.bc&&(Bu(a),x.Ya(),fd(y,0),ga(x,!0),Cu(a),x.R("AnimationStarting",a)))}))}}function _A(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pf(a,y,x,E){a.isTicking||_A(a)||y instanceof nn&&(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 Nh(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 me){rt=!0;break t}}rt=!1}rt?Qc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Bu(b),ga(b.H),Cu(b)),on.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),on.requestAnimationFrame(function(){x()}))}function aA(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Bu(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 Cu(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(),lh(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),lh(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),Pa(this,a))},Pt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Pu(this.ce,y,"position",y.position,y.position),Pa(this,a))};function Qh(a,y,x){!a.zb||y.D(x)||_A(a)||(a.H.pi||(y=x.copy()),Pu(a.ce,a.H,"position",y,x))}function oh(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Pa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function sh(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 Tn;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 ke(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=sh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=sh(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=sh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=sh(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)}),lA=y}de.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&&fn(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 lA=null,ah=!1,AA=new Re(Ha,"Default",1),Nc=new Re(Ha,"AnimateLocations",2),Ff=new Re(Ha,"None",3);Ha.className="AnimationManager",Ha.defineAnimationEffect=function(a,y){ah||(cd(),ah=!0),lA.add(a,y)},Ha.Default=AA,Ha.AnimateLocations=Nc,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=Uh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Yi,this.vc=new Tn,this.Tt=new Tn,this.yl=new Ae,this.Ut=new Ae,this.dw=XA,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,Qc(this,!0),Bu(this.Yd),ga(this.H),Cu(this.Yd),this.H.redraw()};function lh(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 me?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===AA&&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=Jh),Bu(y),this.yl.each(function(E){E.data=null,a.add(E)}),Cu(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Nh(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 me?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 Pu(this,a,y,x,E,b),this};function Pu(a,y,x,E,b,z){var tt=a.vc;if(y instanceof me&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&($A(E),np(),E=[We.j,We.u,We.o,We.F],$A(b),np(),b=[We.j,We.u,We.o,We.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,at=rt.end;ot[x]===void 0&&(ot[x]=Ah(E)),at[x]=Ah(b)}else ot={},at={},ot[x]=Ah(E),at[x]=Ah(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 uh(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=Ah(y.location):z&&(rt.Ku[x]=Ah(E))}function Ah(a){return a instanceof Ot||a instanceof rn?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 Qc(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),Bu(x),fd(a,b),ga(a.H,!0),Cu(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=lA,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,Bu(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=lA;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(),Oh(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),Cu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),lh(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(Ir),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(Ir);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},de.Object.defineProperties(Qs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&fn(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:Zt("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 Uh(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=Uh,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 uh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}uh.className="AnimationState";function Hl(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=hh))}Hl.prototype.copy=function(){var a=new Hl(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))}de.Object.defineProperties(Hl.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 Re(Hl,"Default",1),hh=new Re(Hl,"Immediate",2),Dh=new Re(Hl,"Bundled",3);Hl.className="AnimationTrigger",Hl.Default=gd,Hl.Immediate=hh,Hl.Bundled=Dh;function ps(a){Je(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=ps.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 nn?z++:ot instanceof mr?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&&Fn(E)&&(rt+=" #"+Fn(E)),x instanceof gn?rt+=" "+Ki(E):x instanceof nn&&(rt+=" "+Ki(x.fromNode)+" "+Ki(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||Zc(rt)!==!1)&&rt.isVisible()&&(b.assign(a),oi(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 Ae||(E=new Ae),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||Zc(ot)!==!1)&&ot.isVisible()){z.assign(a),oi(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 Ae||(b=new Ae),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||Zc(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||Zc(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 Ae)&&(z=b),b=!0),z instanceof Vt||z instanceof Ae||(z=new Ae),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||Zc(ft)!==!1)&&ft.isVisible()){rt.assign(a),oi(rt,ft.oe),ot.h(a.x+y,a.y),oi(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=ni();for(var b=ni(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof nn){if(tt.fd===!1)continue}else if(tt instanceof mr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Wa(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]);En(a),En(b)}}};function WA(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=WA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=ke.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(ke.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Uc(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=WA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,at=ke.alloc(),At=0;At<z;At++){var ft=b[At];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,at,!1)}ke.free(at),y.globalAlpha=tt}}}Pt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!Zc(y))a.Hs(y);else{if(E!==null&&y instanceof nn&&(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 La?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(mo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(mo(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),mo(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Pt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(uo,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}de.Object.defineProperties(ps.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===""&&Zt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Zt("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)&&fn(a,"0 <= value <= 1",ps,"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))}}}),ps.prototype.findObjectsNear=ps.prototype.og,ps.prototype.findObjectsIn=ps.prototype.Cf,ps.prototype.findObjectsAt=ps.prototype.ji,ps.prototype.findObjectAt=ps.prototype.ic,ps.className="Layer";function me(a,y){if(JA||(ls(),JA=!0),Je(this),uA=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,wo){var x=this,E=function(){x.removeEventListener(on.document,"DOMContentLoaded",E,!1),x.setRTL()};on.document.body!==null?this.setRTL():x.addEventListener(on.document,"DOMContentLoaded",E,!1)}this.ol=null,Of.add("Model",br);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===uo&&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 co,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 qh,a!==void 0&&(typeof a=="string"||on.Element&&a instanceof Element?Dc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Fu,uA;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 Tn,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 Ii,a.zu=new Ot(NaN,NaN).freeze(),a.ut=new ke(NaN,NaN,NaN,NaN).freeze(),a.rj=new Vi(0,0,0,0).freeze(),a.sj=XA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ks,a.zk=es,a.Fg=Ks,a.pq=es,a.yt=Ir,a.Bt=Ir,a.Fc=!0,a.pn=!1,a.De=new Ae,a.Eh=new Tn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Vi(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 Ae,a.Ht=!0,a.uu=bu,a.pw=!1,a.wu=Yc,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 Tn,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 Vi(5).freeze(),a.Hw=new Ae().freeze(),a.Nt=999999999,a.nw=new Ae().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 Ae,a.ow=new Ae,a.Xh=null,a.aw=new rn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ot,bounds:new ke,Py:new rn,bA:new rn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new ke(NaN,NaN,NaN,NaN).freeze(),a.wo=new rn(NaN,NaN).freeze(),a.Sp=new ke(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Tn;var y=new gn,x=new Wr;x.bind(new Xo("text","",Ki)),y.add(x),a.ny=y,a.Lg.add("",y),y=new gn,x=new Wr,x.stroke="brown",x.bind(new Xo("text","",Ki)),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 rn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Tn,y=new Ti,y.selectionObjectName="GROUPPANEL",y.type=je.Vertical,x=new Wr,x.font="bold 12pt sans-serif",x.bind(new Xo("text","",Ki)),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 Ea,E.padding=new Vi(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Tn,y=new nn,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 nn,x=new Oi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new mr,y.type=je.Auto,x=new Oi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ea,x.margin=new Vi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new mr,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 br,a.toolManager=new so,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=Gi,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}me.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),gh=null,Mu="",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 Ae().freeze(),a.nw=new Ae().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(),Or=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function kf(){return null}me.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),Rl(this),this.Wg=!0,Tf(this),this.layout=new co,this.Wg=!1,this.model=Pv(),this.model.undoManager=new vo,this.vb=this.rn=!1,this.N()},me.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=on.document.body);var y=cn("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},me.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=on.document.body);var y=0;if(wo){var x=Md;y=Fu,x===null&&(x=Md=cn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Fu=cn("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||vr||(y=11)}this.Db=y,this.Gw=!0},me.prototype.qb=function(a){a.classType===me&&(this.autoScale=a)},me.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 Dc(a,y){if(wo){if(y!=null||Zt("Diagram setup requires an argument DIV."),a.Ka!==null&&Zt("Diagram has already completed setup."),typeof y=="string"?a.Ka=on.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Zt("No DIV or DIV id supplied: "+y),a.Ka===null&&Zt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Zt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&on.ResizeObserver){var x=pe(function(){a.$b()},250);a.ol=new on.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}on.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=on.go;var b=new Ml(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",on.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 Ml(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,wo){b=cn("div");var z=cn("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=pe(function(){a.Yh=null,a.N()},300),a.Ov=pe(function(){bf(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=dl(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(),Fl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,dl(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),Rh(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():Fl(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=on.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,Rh(a,At,rt),rt.targetObject=null,a.doMouseMove(),Fl(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=on.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 me&&at.H!==a&&Rh(at.H,tt,ot),at===null&&(at=tt.target),Rh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=md(tt,at),ot.targetObject=null,a.doMouseUp(),Fl(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"+$h[1]+$h[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)}}me.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},me.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(on,"resize",a.Ov,!1)}function la(a){30<a.Sq&&(a.Yh=1)}function Oh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Bi&&Bi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}me.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:on.devicePixelRatio||1},me.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},me.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},me.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},me.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},me.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},me.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},me.prototype.doFocus=function(){this.focus()},me.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=on.scrollX||on.pageXOffset,y=on.scrollY||on.pageYOffset;this.ta.focus(),on.scrollTo(a,y)}},me.prototype.Oy=function(){this.H.R("GainedFocus")},me.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===Ks&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Tf(a){var y=new ps;y.name="Background",a.Al(y),y=new ps,y.name="",a.Al(y),y=new ps,y.name="Foreground",a.Al(y),y=new ps,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ps,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ps,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):Vh(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Vh(this.H)}me.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"))}},me.prototype.computeBounds=function(a){return a===void 0&&(a=new ke),Us(this),Pl(this,a)};function Pl(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}me.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(xn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof nn||(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 nn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new ke(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=ke.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,ke.free(E),Ot.free(b),Ot.free(x)}x=a.yh,y&&a.Fg!==Ks&&(x=a.Fg);var z=x!==Ks?Hh(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()?sr: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 ke(x,E,b,tt),z,y,!1)}}function Hh(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===ku?(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}me.prototype.zoomToFit=function(){var a=this.sj;this.sj=XA,this.scale=Hh(this,Ra),a!==XA&&(Ja(this,!1),pd(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Pt=me.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===ku)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===ku?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(Ir,y)),Ot.free(y)}else this.eq=null,this.fq=Gi};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(Ir,at),rt=at.x-a.fq.x/a.scale,ot=at.y-a.fq.y/a.scale,b=ar,Ot.free(at)}(z||a.scrollMode===XA)&&(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),Qh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Rl(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),Oc(this,a,function(E){return E.part},y?function(E){return E instanceof ii&&E.canSelect()}:null,x)};function Oc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Vt||b instanceof Ae||(b=new Ae),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 Ae||(E=new Ae),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 Ae||(b=new Ae),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 Ae;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 Ae||(b=new Ae),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),Hc(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 Ae)&&(z=b),b=!0),z instanceof Vt||z instanceof Ae||(z=new Ae),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 Hc(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 Ae)&&(z=b),b=!0),z instanceof Vt||z instanceof Ae||(z=new Ae),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}me.prototype.acceptEvent=function(a){return dl(this,a,a instanceof MouseEvent)};function dl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Rh(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),vr&&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,vr&&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 Fl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}me.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=dl(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(),Fl(x,a)},me.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=dl(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(),Fl(x,a)},me.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=dl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Fl(x,a)},me.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=dl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Fl(x,a)},me.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?oi(new Ot(y,a),this.Ab):new Ot(y,a)};function Rh(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 Rc(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))}}me.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function yd(a){a.ld||Us(a),a.Va()}me.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Pt=me.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&&ge(function(){E.ld=!1,sA(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;on.requestAnimationFrame(function(){y.kg&&y.bd()})}},Pt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ga(this))};function zs(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Vh(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];Yo(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),zs(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(hA(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),zs(a,!0,!1),tt=!1,z?(x=ke.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"),zs(a,!0,!1),ke.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ks?a.scale=Hh(a,a.Fg):a.yh!==Ks?a.scale=Hh(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!==Ks)a.scale=Hh(a,a.Fg);else if(a.yh!==Ks)a.scale=Hh(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),hA(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 Ae,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()&&Gh(this,x);for(a.reset();a.next();)x=a.value,x instanceof nn&&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 mr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Gh(a,y){for(var x=ni(),E=ni(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Ti?(tl(z)||ta(z)||Xc(z))&&Gh(a,z):z instanceof nn?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(En(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();En(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&&Zt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){jh(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),Lu(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?Ll(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Ii.prototype.Cd=Ii.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,jh(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),Lu(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?Ll(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Ii.prototype.Cd=Ii.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Bi&&Bi.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 zh(a,y,x,E,b,z,tt,rt,ot,at){if(a.Ka!==null){a.ta===null&&Zt("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),at===void 0&&(at=!1),jh(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 ke(z.x,z.y,E.width/b,E.height/b),Bt=xt.copy();Bt.Co(x),hA(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=Ii.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 La&&Id(y,Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),Ii.free(Gt),Lu(a,y),y.globalAlpha=a.pb;var Dt=a.Qj("Grid");if(tt){var jt=new Ae,Jt=tt.iterator;for(Jt.reset();Jt.next();){var te=Jt.value;te instanceof ii&&(at||te.layer!==Dt)&&(te.Gj(),jt.add(te))}for(at=0;at<pt;at++)Uc(ft[at],y,a,jt,ot);jt.each(function(ve){return ve.Gj()})}else for(jt=0;jt<pt;jt++){var ie=ft[jt];ie===Dt?at&&ie.gc(y,a,!0):ie.gc(y,a,ot)}a.$i=!1,a.Yf&&Ll(a.Yf,a)&&a.Vp()}finally{a.Ca=At,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,pt,a,a.viewportBounds),hA(a),a.ib instanceof La&&(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 gi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(vr||eo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Lu(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 gi,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 Kh(this,a),this};function Kh(a,y){var x=a instanceof je,E=a instanceof me,b;for(b in y){b===""&&Zt("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])),He(z)?tt=b.substr(rt+1):Zt("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!qi(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&qi(a.toolManager,tt))z=a.toolManager;else if(E&&Ld(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof zn&&tt==="Changed"){a.Pe(y[tt]);continue}else Zt('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 Tn,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")},me.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!==Jh&&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=ke.alloc(),Qf(this,this.computeBounds(E)),ke.free(E)),E=this.ta,E===null||E instanceof Xs)))){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),Ll(this.Yf,this)&&a.clearRect(0,0,ot,at),E=ni(),a=ni(),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 ke(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),oi(At,Mt),oi(xt,Mt),E.push(new ke(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 ke(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),oi(At,Mt),oi(xt,Mt),E.push(new ke(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Ll(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 ke(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),oi(At,Mt),oi(xt,Mt),E.push(new ke(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),zs(this,!1,!0),this.Ka===null&&Zt("No div specified"),this.ta===null&&Zt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(jh(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),Lu(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){at=WA(tt,b),ft=tt.Zq,ft.length=0,At=this.scale,pt=ke.alloc(),xt=tt.Pa.s,Mt=xt.length,Bt=ot.length;for(var Gt=0;Gt<Mt;Gt++){var Dt=xt[Gt],jt=Yf(Dt,Dt.actualBounds);t:{for(var Jt=2/At,te=4/At,ie=0;ie<Bt;ie++){var ve=ot[ie];if(ve.width!==0&&ve.height!==0&&jt.Vu(ve.x-Jt,ve.y-Jt,ve.width+te,ve.height+te)){jt=!0;break t}}jt=!1}jt&&tt.Oj(b,Dt,this,ft,At,pt,!0)}ke.free(pt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&Ll(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}En(E),En(a),this.ld=!1}}else this.bd();x&&(la(this),this.bd(),Oh(this,!0))}else x?(la(this),this.bd(),Oh(this,!0)):this.bd()}};function jh(a){a.pn!==!1&&(a.pn=!1,Sd(a,a.Aa,a.ya))}function Sd(a,y,x){Rl(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Vh(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,Rl(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,jt=0,Jt=0,te=0,ie=At.width,ve=At.height,An=a.rj;a.contentAlignment.sb()?(Gt.width>ie&&(Dt=An.left,jt=An.right),Gt.height>ve&&(Jt=An.top,te=An.bottom)):(Dt=An.left,jt=An.right,Jt=An.top,te=An.bottom);var In=Gt.width+Dt+jt,Cn=Gt.height+Jt+te;An=a.scale;var $e=In>ot/An,ze=Cn>at/An;if(!(z||a.gf||a.Be||$e||ze))return!0;Dt=Gt.x-Dt,ot=At.x,jt=Gt.right+jt,at=At.right+tt,Jt=Gt.y-Jt;var bi=At.y;Gt=Gt.bottom+te,At=At.bottom+rt;var Ci="1px";if(te="1px",a.scrollMode===XA&&($e||ze)&&($e&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($e=1,Dt+1<ot&&($e=Math.max((ot-Dt)*An+a.Aa,$e)),jt>at+1&&($e=Math.max((jt-at)*An+a.Aa,$e)),ie+tt+1<In&&($e=Math.max((In-ie)*An+a.Aa,$e)),Ci=$e.toString()+"px"),ze&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($e=1,Jt+1<bi&&($e=Math.max((bi-Jt)*An+a.ya,$e)),Gt>At+1&&($e=Math.max((Gt-At)*An+a.ya,$e)),ve+rt+1<Cn&&($e=Math.max((Cn-ve)*An+a.ya,$e)),te=$e.toString()+"px")),$e=Ci!=="1px",ze=te!=="1px",$e&&ze||!$e&&!ze||(ze&&(at-=a.Db),$e&&(At-=a.Db),In<ie+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Dt+1<ot&&(tt=Math.max((ot-Dt)*An+a.Aa,tt)),jt>at+1&&(tt=Math.max((jt-at)*An+a.Aa,tt)),ie+1<In&&(tt=Math.max((In-ie)*An+a.Aa,tt)),Ci=tt.toString()+"px"),$e=Ci!=="1px",tt=a.ya,$e!==a.Be&&(tt=$e?a.ya-a.Db:a.ya+a.Db),Cn<ve+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Jt+1<bi&&(rt=Math.max((bi-Jt)*An+tt,rt)),Gt>At+1&&(rt=Math.max((Gt-At)*An+tt,rt)),ve+1<Cn&&(rt=Math.max((Cn-ve)*An+tt,rt)),te=rt.toString()+"px"),ze=te!=="1px"),a.qr&&$e===a.Be&&ze===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if($e!==a.Be&&(Ci==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=$e,Mt.style.width=Ci,ze!==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(),ze?(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&&Rl(a),a.gf=ze,Mt.style.height=te,a.gu=!0,z&&(a.pn=!0),y=Bt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ie+1<In?y=(a.position.x-Dt)*An:Dt+1<ot?y=Bt.scrollWidth-Bt.clientWidth:jt>at+1&&(y=a.position.x*An)),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&&(ve+1<Cn?Bt.scrollTop=(a.position.y-Jt)*An:Jt+1<bi?Bt.scrollTop=Bt.scrollHeight-Bt.clientHeight:Gt>At+1&&(Bt.scrollTop=a.position.y*An)),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=ke.allocAt(b,ft,pt,xt),a.onViewportBoundsChanged(x,a.viewportBounds,An,z),ke.free(x),!1):!0}Pt=me.prototype,Pt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Zt("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&&Zt('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(Qo,"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;dA(a,function(x){YA(y,x)}),(a instanceof mr||a instanceof Ti&&a.placeholder!==null)&&a.v(),a.data!==null&&dA(a,function(x){xv(y.partManager,x)}),ta(a)!==!0&&Xc(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&&dA(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($o,"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),xn(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 Ae,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)},me.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Gc(this)),this.toolManager!==null){var b=new Tn;if(a!==null)if(xn(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)}ch(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=Gc(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 nn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)EA(a,y,x.value,E,b);else x instanceof mr||y.add(x,a.Pd(b,x,x.location))}function ch(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)||Kc(a,y);for(var rt=ni(),ot=ni(),at=y.iterator,At=Ot.alloc();at.next();){var ft=at.key,pt=at.value;if(ft.Zc()){var xt=jc(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 nn&&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 nn)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)),hc(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(),zc(a,xt,At,Gt,E)),At.assign(xt.dragComputation(xt,At,Gt)).re(Bt),y.add(xt,a.Pd(E,xt,At)),hc(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)),hc(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)),hc(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)),hc(xt,tt.x-At.x,tt.y-At.y))}Ot.free(z),Ot.free(tt),Ot.free(b),Ot.free(at),En(rt),En(ot),x||(Us(a),Eu(a,y))}}me.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(),zc(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 Gc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function zc(a,y,x,E,b){if(b===void 0&&(b=Gc(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 Kc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof nn&&(y.suspendsRouting=!0)}function Eu(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof nn&&(x.suspendsRouting=!1,lv(x)&&x.bb())}a.Mr=!1}}function jc(a,y,x){return y=y.containingGroup,y!==null&&(a=jc(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Pt=me.prototype,Pt.Pd=function(a,y,x){if(x===void 0)return new kA(Yi);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&&Zt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Zt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Zt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Zt("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&&Zt("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(Qo,"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($o,"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(Qo,"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($o,"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(Qo,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Pt.kA=function(a){if(a.diagram!==this&&Zt("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($o,"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 po;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(uo,a,this,y,x,E,b)},me.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===uo){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===Qo){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 is&&(ot.isRow?hy(tt,rt,y?void 0:ot):cy(tt,rt,y?void 0:ot));else if(tt instanceof ps){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 me?typeof rt=="number"&&ot instanceof ps&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):Zt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===$o){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 is&&(xt.isRow?hy(ft,pt,y?xt:void 0):cy(ft,pt,y?xt:void 0));else if(ft instanceof ps){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 me?typeof pt=="number"&&xt instanceof ps&&(y?(xt.Xe(this),this.Wa.Gb(pt,xt)):this.Wa.mb(pt)):Zt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==da&&Zt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},me.prototype.Ea=function(a){return this.undoManager.Ea(a)},me.prototype.eb=function(a){return this.undoManager.eb(a)},me.prototype.Kf=function(){return this.undoManager.Kf()},me.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}},me.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},me.prototype.rp=function(){this.partManager.rp()};function Cd(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Rl(a),a.N(),a.Ee=!0,E.zb&&(_A(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Rl(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(Vs)?rt=0:at.Hf(Es)&&(rt=z-1):rt=at.sb()?at.x*(z-1):z/2),isNaN(ot)&&(at.$c()?at.Hf(Ya)?ot=0:at.Hf(Hs)&&(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,Rl(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Ja(a,!1),E.zb&&(_A(E)||E.ce.add(E.H,"scale",y,a.Ca))}}me.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!==Ks||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof so&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ig(b,this)),this.vb||this.invalidateViewport(a,y),hA(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 hA(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=rn.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||(vh(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=ke.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){ke.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,ke.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),rn.free(E),x.part.location=y,Ot.free(y)}}me.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)}},me.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))},me.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),xn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ii||Zt("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||Zt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},me.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=me.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 Ae().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||Zt("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}Zt("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):Zt("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 ke(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),oi(a.copy(),this.Ab)};function dg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function _h(a){return a=Of.get(a),a!==null?new a:new br}me.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||fr(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(),aA(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;ge(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function YA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)fh(a,y[E])}function fh(a,y){if(y instanceof ja){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Ae&&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 Ae&&x.Bg.remove(a),xg(E));break}}}}}me.prototype.Wd=function(){this.partManager.Wd()},me.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},me.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},me.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},me.prototype.Vb=function(a){return this.partManager.Vb(a)},me.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Pt=me.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:Dr(Hr(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:Dr(Hr(y)))};function Rl(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=ke.alloc();Qf(this,this.computeBounds(a)),ke.free(a)}},Pt.rz=function(){for(var a=new Ae,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&&Vc(this,!0),this.ld?Fd(this,!1):(this.Jk=!0,ga(this))};function Vc(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||sA(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Wh(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||fr(z),a.aa=x}}}function Wh(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Wh(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),Gh(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 Tn,E=new Tn;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;Zt("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 hu;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 _c(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},me.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Pl(this,a):a.assign(this.documentBounds)};function _c(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=dh(a,x)),x===null){y=ke.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&&Yh(a,tt,E,y)}ke.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=ke.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof gn&&Yh(a,tt,E,y);ke.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ow(b);return b}function dh(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?dh(a,y.containingGroup):null}function Yh(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(fc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=fc}else if(y instanceof Ti)for(y=y.memberParts;y.next();)b=y.value,b instanceof gn&&Yh(a,b,x,E)}}function cA(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}me.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=ge(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=ke.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qf(a,y),ke.free(y),a.Fc=!0,a.bd(),Ed(a))}},a.vp))}me.prototype.ug=function(){this.vk!==-1&&(on.clearTimeout(this.vk),this.vk=-1)},me.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=ke.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(Yi)||(y=new Ot(y.x+z.x/b,y.y+z.y/b)),ke.free(E),Ot.free(z),y},Pt=me.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 Wc(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):on.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 on.requestAnimationFrame(function(){E()}),null}Pt.Wz=function(a){return wo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Pt.Jx=function(a){return a===void 0&&(a={}),Wc(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"&&Zt('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"&&Zt("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 rn(1/0,1/0):new rn(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 Vi(at):at instanceof Vi||Zt("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 Ml(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,zh(a,E.context,at,new rn(ft.width,ft.height),a.Ca,a.pa,ot,At,Bt,y),E.context):(a.Xm=!1,zh(a,Mt,at,new rn(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 jt=a.Wa.s,Jt=jt.length,te=0;te<Jt;te++){var ie=jt[te];if(ie.visible&&ie.isTemporary){ie=ie.Pa.s;for(var ve=ie.length,An=0;An<ve;An++){var In=ie[An];In.isInDocumentBounds&&In.isVisible()&&(In=In.actualBounds,In.w()&&Dt.ed(In))}}}if(jt=new Ot(Dt.x,Dt.y),ot!==null){for(Jt=new ke(0,0,0,0),te=!0,ie=ot.iterator,ie.reset();ie.next();)ve=ie.value,ve instanceof ii&&(An=ve.layer,An!==null&&!An.visible||An!==null&&!Bt&&An.isTemporary||!ve.isVisible()||(ve=ve.actualBounds,ve.w()&&(te?(te=!1,Jt.assign(ve)):Jt.ed(ve))));Dt.width=Jt.width,Dt.height=Jt.height,jt.x=Jt.x,jt.y=Jt.y}return rt!==null&&rt.w()&&(jt=rt,z||(z=Gt)),Jt=rt=0,at!==null&&(rt=at.left+at.right,Jt=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-Jt))),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-Jt)/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+=Jt):at=new Vi(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,zh(a,E.context,at,new rn(Math.ceil(b),Math.ceil(Dt)),z,jt,ot,At,Bt,y),E.context):(a.Xm=!1,zh(a,Mt,at,new rn(Math.ceil(b),Math.ceil(Dt)),z,jt,ot,At,Bt,y),a.Xm=!0,ft.context)}de.Object.defineProperties(me.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 Xs(this,on.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 Xs(this,on.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(on,"resize",this.Ov,!1),this.removeEventListener(on,"wheel",this.$j,!0),uA===this&&(uA=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Dc(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)&&fn(a,"0 <= value <= 1",me,"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&&fn(a,">= 0",me,"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&&fn(a,">= 0",me,"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 fn(a,">= 0",me,"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&&Zt("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,sA(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=_h(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(on,"pointermove",this.dk,!0),this.addEventListener(on,"pointerdown",this.ui,!0),this.addEventListener(on,"pointerup",this.fk,!0),this.addEventListener(on,"pointerout",this.ek,!0),this.addEventListener(on,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(on,"wheel",this.$j,!0),this.addEventListener(on,"selectstart",this.preventDefault,!1)):(this.removeEventListener(on,"pointermove",this.dk,!0),this.removeEventListener(on,"pointerdown",this.ui,!0),this.removeEventListener(on,"pointerup",this.fk,!0),this.removeEventListener(on,"pointerout",this.ek,!0),this.removeEventListener(on,"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(on,"wheel",this.$j,!0),this.removeEventListener(on,"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),Qh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Rl(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&&Zt("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),hA(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),Rl(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||Zt("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 Vi(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===XA&&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!==Ks&&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()||Zt("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()||Zt("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)):fn(a,"> 0",me,"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)):fn(a,"> 0",me,"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 Vi(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&&Zt("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!==bu&&a!==Wo&&a!==ZA&&Zt("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 rn(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 Vi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),de.Object.defineProperties(me,{licenseKey:{get:function(){return Gf.jc()},set:function(a){Gf.add(a.replace(/\s/g,""))}},version:{get:function(){return Bs}}}),me.prototype.makeImageData=me.prototype.Jx,me.prototype.makeImage=me.prototype.Wz,me.prototype.cacheGroupExternalLinks=me.prototype.Fu,me.prototype.addRenderer=me.prototype.bs,me.prototype.makeSVG=me.prototype.av,me.prototype.makeSvg=me.prototype.Cs,me.prototype.stopAutoScroll=me.prototype.ug,me.prototype.doAutoScroll=me.prototype.gs,me.prototype.isUnoccupied=me.prototype.Yj,me.prototype.raiseDiagramEvent=me.prototype.R,me.prototype.removeDiagramListener=me.prototype.am,me.prototype.addDiagramListener=me.prototype.Bj,me.prototype.findTreeRoots=me.prototype.yz,me.prototype.layoutDiagram=me.prototype.Uz,me.prototype.findTopLevelGroups=me.prototype.qz,me.prototype.findTopLevelNodesAndLinks=me.prototype.rz,me.prototype.ensureBounds=me.prototype.Va,me.prototype.findLinksByExample=me.prototype.ls,me.prototype.findNodesByExample=me.prototype.ms,me.prototype.findLinkForData=me.prototype.Kc,me.prototype.findNodeForData=me.prototype.ii,me.prototype.findPartForData=me.prototype.Lc,me.prototype.findLinkForKey=me.prototype.findLinkForKey,me.prototype.findNodeForKey=me.prototype.Vb,me.prototype.findPartForKey=me.prototype.findPartForKey,me.prototype.rebuildParts=me.prototype.Wd,me.prototype.transformViewToDoc=me.prototype.Ps,me.prototype.transformRectDocToView=me.prototype.zA,me.prototype.transformDocToView=me.prototype.op,me.prototype.centerRect=me.prototype.es,me.prototype.scrollToRect=me.prototype.tv,me.prototype.scroll=me.prototype.scroll,me.prototype.highlightCollection=me.prototype.Jz,me.prototype.highlight=me.prototype.Iz,me.prototype.selectCollection=me.prototype.rA,me.prototype.select=me.prototype.select,me.prototype.updateAllRelationshipsFromData=me.prototype.rp,me.prototype.updateAllTargetBindings=me.prototype.updateAllTargetBindings,me.prototype.commit=me.prototype.commit,me.prototype.rollbackTransaction=me.prototype.Kf,me.prototype.commitTransaction=me.prototype.eb,me.prototype.startTransaction=me.prototype.Ea,me.prototype.raiseChanged=me.prototype.g,me.prototype.raiseChangedEvent=me.prototype.cb,me.prototype.removeChangedListener=me.prototype.ik,me.prototype.addChangedListener=me.prototype.Pe,me.prototype.removeModelChangedListener=me.prototype.mA,me.prototype.addModelChangedListener=me.prototype.Yw,me.prototype.findLayer=me.prototype.Qj,me.prototype.removeLayer=me.prototype.kA,me.prototype.addLayerAfter=me.prototype.Cy,me.prototype.addLayerBefore=me.prototype.Ww,me.prototype.addLayer=me.prototype.Al,me.prototype.moveParts=me.prototype.moveParts,me.prototype.copyParts=me.prototype.Kj,me.prototype.removeParts=me.prototype.Is,me.prototype.remove=me.prototype.remove,me.prototype.add=me.prototype.add,me.prototype.clearDelayedGeometries=me.prototype.bx,me.prototype.setProperties=me.prototype.nm,me.prototype.attach=me.prototype.Du,me.prototype.set=me.prototype.set,me.prototype.resetInputOptions=me.prototype.Sx,me.prototype.setInputOption=me.prototype.sA,me.prototype.getInputOption=me.prototype.Ql,me.prototype.resetRenderingHints=me.prototype.Tx,me.prototype.setRenderingHint=me.prototype.Xx,me.prototype.getRenderingHint=me.prototype.Gf,me.prototype.maybeUpdate=me.prototype.bd,me.prototype.requestUpdate=me.prototype.$b,me.prototype.delayInitialization=me.prototype.Xy,me.prototype.isUpdateRequested=me.prototype.Pz,me.prototype.invalidateDocumentBounds=me.prototype.Ya,me.prototype.findObjectsNear=me.prototype.og,me.prototype.findPartsNear=me.prototype.mz,me.prototype.findObjectsIn=me.prototype.Cf,me.prototype.findPartsIn=me.prototype.ux,me.prototype.findObjectsAt=me.prototype.ji,me.prototype.findPartsAt=me.prototype.lz,me.prototype.findObjectAt=me.prototype.ic,me.prototype.findPartAt=me.prototype.Ol,me.prototype.focusObject=me.prototype.zz,me.prototype.alignDocument=me.prototype.Jy,me.prototype.zoomToRect=me.prototype.BA,me.prototype.zoomToFit=me.prototype.zoomToFit,me.prototype.diagramScroll=me.prototype.kx,me.prototype.focus=me.prototype.focus;var Of=new Tn,Md=null,wo=on.document!==void 0,gh=null,Mu="",Ks=new Re(me,"None",0),Ra=new Re(me,"Uniform",1),ku=new Re(me,"UniformToFill",2),Yc=new Re(me,"CycleAll",10),Xh=new Re(me,"CycleNotDirected",11),Zh=new Re(me,"CycleNotDirectedFast",12),Hf=new Re(me,"CycleNotUndirected",13),Rf=new Re(me,"CycleDestinationTree",14),kd=new Re(me,"CycleSourceTree",15),XA=new Re(me,"DocumentScroll",1),Jh=new Re(me,"InfiniteScroll",2),bu=new Re(me,"TreeParentCollapsed",21),Wo=new Re(me,"AllParentsCollapsed",22),ZA=new Re(me,"AnyParentsCollapsed",23),Gf=new Vt,Bs="2.3.10",Wl="image",MA=null,JA=!1;function ls(){if(wo){var a=on.document.createElement("canvas"),y=a.getContext("2d"),x=Ge("7ca11abfd022028846");y[x]=Ge("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Oe.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ii.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",oe.za],b=1;5>b;b++)y[Ge("7ca11abfd7330390")](Ge(E[b-1]),10,15*b);for(y[x]=Ge("39f046ebb36e4b"),x=1;5>x;x++)y[Ge("7ca11abfd7330390")](Ge(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Ii.prototype.Cd=Ii.prototype.Eu),MA=a}}me.className="Diagram",me.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=on.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof me?y.H:null},me.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},me.useDOM=function(a){wo=a?on.document!==void 0:!1},me.isUsingDOM=function(){return wo},me.None=Ks,me.Uniform=Ra,me.UniformToFill=ku,me.CycleAll=Yc,me.CycleNotDirected=Xh,me.CycleNotDirectedFast=Zh,me.CycleNotUndirected=Hf,me.CycleDestinationTree=Rf,me.CycleSourceTree=kd,me.DocumentScroll=XA,me.InfiniteScroll=Jh,me.TreeParentCollapsed=bu,me.AllParentsCollapsed=Wo,me.AnyParentsCollapsed=ZA;function qh(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Ll(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=on[Ge("76a715b2f73f148a")][Ge("72ba13b5")]||"";if(a.Rc=!0,wo){var E=me[Ge("76a115b6ed251eaf4692")];if(E)for(var b=Gf.iterator;b.next()&&(E=b.value,E=Ge(E).split(Ge("39e9")),!(6>E.length));){var z=Ge(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Ge(Oe[Ge("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=on[Ge("74a900bae4370f8b51")][Ge("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Ge("73a612b6fb191d")](Ge("3aad1ab6e022098b4dc4")),z=Ge(E[2]),-1<tt&&(rt=rt[Ge("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Ge("76ad18b4f73e")],rt=x[Ge("73a612b6fb191d")](Ge("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Ge("73a612b6fb191d")](z),0>tt&&z!==Ge("7da71ca0ad381e90")&&(tt=y[Ge("73a612b6fb191d")](Ge("76a715b2ef3e149757"))),0>tt&&(tt=y[Ge("73a612b6fb191d")](Ge("76a715b2ef3e149757"))),0>tt&&(tt=y[Ge("73a612b6fb191d")](Ge("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Ge("73a612b6fb191d")](Ge("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Ge("73a612b6fb191d")](Ge("35"))||y[Ge("73a612b6fb191d")](Ge("35"))===-1),!a.Rc||x[Ge("73a612b6fb191d")](Ge("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ge("73a612b6fb191d")](z)),!a.Rc)||(tt=on[Ge("76a715b2f73f148a")][Ge("69ad17a1e03e")],rt=tt[Ge("73a612b6fb191d")](Ge("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Ge("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=on.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[Ge("79a417a0f0181a8946")]=E,on.document[Ge("78a712aa")]){on.document[Ge("78a712aa")][Ge("7bb806b6ed32388c4a875b")](tt),ot=on.getComputedStyle(tt).getPropertyValue(Ge("78a704b7e62456904c9b12701b6532a8"));var at=on.getComputedStyle(tt).getPropertyValue(Ge("75b817b0ea2202"));if(on.document[Ge("78a712aa")][Ge("68ad1bbcf533388c4a875b")](tt),ot){if(tt=on[Ge("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(Ge("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[Ge("76ad18b4f73e")],b=x[Ge("73a612b6fb191d")](Ge("35e7"))+2;b<At;b++)y+=x[b];x=y[Ge("73a612b6fb191d")](Ge("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ge("73a612b6fb191d")](Ge("35")))}}}return 0<a.Rc&&a!==a.wy}qh.className="DiagramHelper";function kA(a){this.j=a===void 0?new Ot:a,this.o=new Ot}de.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 $h="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 rn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ir,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"||on.Element&&a instanceof Element)var x=me.call(this,a)||this;else x=me.call(this)||this,y=a;return ut(x),y&&x.nm(y),x}we(ht,me);function ut(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Mo,a.layout=new Ds}ht.prototype.reset=function(){me.prototype.reset.call(this),ut(this)},ht.className="Palette";function dt(a,y){if(typeof a=="string"||on.Element&&a instanceof Element)var x=me.call(this,a)||this;else x=me.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 Vi(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(),bt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&bt(E)},x.autoScale=Ra,x.vb=!1,y&&Object.assign(x,y),x}we(dt,me),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(jh(this),this.ql===null){var x=new Ml(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}}}me.prototype.redraw.call(this)},dt.prototype.gc=function(){if(this.Ka===null&&Zt("No div specified"),this.ta===null&&Zt("No canvas specified"),!(this.ta instanceof Xs)&&(Zm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){jh(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=ke.alloc().assign(a.viewportBounds).ed(y.viewportBounds),hA(y,b),ke.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=WA(rt,b),at.gc(b,ot),b.globalAlpha=rt);else{for(var At=WA(rt,b),ft=ot.scale,pt=ke.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)}ke.free(pt),b.globalAlpha=At}}}}}function bt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=rn.alloc();b.h(x.width,x.height),E.desiredSize=b,rn.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 na;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(),bt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},de.Object.defineProperties(dt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof dt&&Zt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),bt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),bt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),dt.className="Overview";function zt(){yo.call(this),this.j=null}we(zt,yo),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,yo.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(){Je(this),this.H=uA,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=na,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=vr?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 so&&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 Ae,x=a.selection.iterator;x.next();)Jc(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 Ae;for(a=a.selection.iterator;a.next();)Jc(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)gh=null,Mu="";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),gh=x,Mu=y.model.dataFormat}}y.R("ClipboardChanged",x)},Rt.prototype.pasteFromClipboard=function(){var a=new Ae,y=gh;if(y===null)return a;var x=this.diagram;if(Mu!==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);ch(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||gh===null||gh.count===0||Mu!==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===Ks&&(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!==Ks?!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===Ks&&(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!==Ks?!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;sA(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=na):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),fr(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;sA(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(){ge(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 mr)ee(a,y.adornedPart,x);else if(y instanceof nn){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"),sA(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"),sA(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);He(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 Ie(a){var y=ni();for(a=a.iterator;a.next();){var x=a.value;x instanceof nn||y.push(x)}a=new Ae,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 En(y),a}Rt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof nn)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 nn)){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=Ie(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"),sA(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"),sA(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 Wr&&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 Wr))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 Wr&&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(sr):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,VA(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 Tn,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 nn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},de.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||Zt("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(){Je(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ot(NaN,NaN).freeze(),this.jd=Xr,this.Ab=new Ii,this.wh=new Ii,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Ua,this.uc=new ke(NaN,NaN,NaN,NaN).freeze(),this.Ib=new ke(NaN,NaN,NaN,NaN).freeze(),this.dc=new ke(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=es,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 Ve,Ke,Dn,Yn,hi,Mi,Zi,zi,lr,kr;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=Xn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},re.prototype.Vw=function(a){var y=this.Dh;if(xn(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===nn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Zt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===re&&(this.stretch=a)},Pt.toString=function(){return Jn(this.constructor)+"#"+Fn(this)},Pt.th=function(){this.A!==null&&(this.A.nc=!0)};function Hi(a){a.A===null?a.A=new tc:a.A.nc&&(a.A=a.A.copy())}Pt.Xc=function(){if(this.ba===null){var a=new Td;a.Xi=ar,a.yj=ar,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===uo&&ks(this)&&qr(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 Tn),tt=z.undoManager.transactionLevel===0,a.startCondition===hh?tt=!0:a.startCondition===Dh&&(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()):(sA(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&&dA(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function qr(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(uo,a,this,y,x)},Pt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Ii);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function As(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?Ai(a.x,a.y,0,0,0,E.height)<=y||Ai(a.x,a.y,0,E.height,E.width,E.height)<=y||Ai(a.x,a.y,E.width,E.height,E.width,0)<=y||Ai(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=_o(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 mr||this instanceof Oi?_o(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 _o(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=ke.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),ke.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=ke.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),ke.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 mn){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 ke);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),Ao(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Ao(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Ao(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 Ke:tt=b=0,rt&&(y=a=1/0);break;case Ve: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 hi: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()||Zt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Yo(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=ke.alloc();z.assign(this.Ib),this.Ib.ka(),ta(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&&ac(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 Wr&&(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()||Zt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),bA(this,!1),ke.free(z)},Pt=re.prototype,Pt.eh=function(){};function $s(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=Ke),y){case Ke:(x>E||z>b)&&(Yo(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Ve:Yo(a,!0),a.measure(E,b,0,0);break;case Yn:Yo(a,!0),a.measure(E,z,0,0);break;case hi:Yo(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(),xa(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&&ac(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&&(mo(this,a,at,!0,!0,ot,rt),at instanceof Fr&&at.type===_i?(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&&(mo(this,a,At,!0,!1,ot,rt),At instanceof Fr&&At.type===_i?(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&&us(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,jt=pt.m22,Jt=pt.dy,te,ie=te=0;pt=te*Bt+ie*Mt+Gt;var ve=te*Dt+ie*jt+Jt;te=xt.width+ft,ie=0;var An=te*Bt+ie*Mt+Gt;te=te*Dt+ie*jt+Jt,ie=Math.min(pt,An);var In=Math.min(ve,te),Cn=Math.max(pt+0,An)-ie,$e=Math.max(ve+0,te)-In;pt=ie,ve=In,te=xt.width+ft,ie=xt.height+ft,An=te*Bt+ie*Mt+Gt,te=te*Dt+ie*jt+Jt,ie=Math.min(pt,An),In=Math.min(ve,te),Cn=Math.max(pt+Cn,An)-ie,$e=Math.max(ve+$e,te)-In,pt=ie,ve=In,te=0,ie=xt.height+ft,An=te*Bt+ie*Mt+Gt,te=te*Dt+ie*jt+Jt,ie=Math.min(pt,An),In=Math.min(ve,te),Cn=Math.max(pt+Cn,An)-ie,$e=Math.max(ve+$e,te)-In,pt=ie,ve=In,ft=y.viewportBounds,xt=ft.x,Bt=ft.y,pt=!(pt>ft.width+xt||xt>Cn+pt||ve>ft.height+Bt||Bt>$e+ve)}if(pt){if(pt=(this.l&256)!==0,a.clipInsteadOfFill&&(pt=!1),this instanceof Wr&&(a.font=this.font),pt){if(ve=rt.se()?rt.naturalBounds:rt.actualBounds,Cn=Math.max(tt.x,ve.x),$e=Math.max(tt.y,ve.y),ft=Math.min(tt.right,ve.right)-Cn,xt=Math.min(tt.bottom,ve.bottom)-$e,Bt=this.tb,Bt!==null&&(Cn=Bt.x,$e=Bt.y,ft=Bt.width,xt=Bt.height),Cn>tt.width+tt.x||tt.x>ve.width+ve.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Cn,$e,ft,xt),a.clip()}if(At){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(ve=at.shadowOffset,a.Ev(ve.x*y.scale*this.scale*y.Mb,ve.y*y.scale*this.scale*y.Mb,at.shadowBlur),qA(a),a.shadowColor=at.shadowColor)}ot&&this.shadowVisible===!0?qA(a):ot&&this.shadowVisible===!1&&fA(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&&vs(this,rt)&&this.shadowVisible===null&&fA(a),this.Ma!==null&&(a.yc(),Aa(this,a,at,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||vs(this,rt))?($a(this,!0),this.shadowVisible===null&&fA(a)):$a(this,!1),this.hh(a,y),ot&&this.l&512&&qA(a),At&&ot&&fA(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 vs(a,y){return y===null?!1:(ac(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){mo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Fr&&a.areaBackground.type===_i?(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 Aa(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;mo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Fr&&a.Ma.type===_i?(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 Ys(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 La))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&&Ys(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),qA(y),y.shadowColor=a.shadowColor}a instanceof Wr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof je;var rt=a instanceof je?ac(a):!1;a.l&4096&&us(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]),Aa(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],Aa(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&&qA(y),rt&&a.shadowVisible===!0?qA(y):rt&&a.shadowVisible===!1&&fA(y),b=a.panel,rt&&vs(a,b)&&a.shadowVisible===null&&fA(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||vs(a,b))?($a(a,!0),a.shadowVisible===null&&fA(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&&qA(y),a.Dd()&&fA(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&&Ys(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"+wi++,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=Hr(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?ac(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]),Aa(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 mo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===ir)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 oc)&&x.xe&&(x.type===ho||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===Ni)At=y.createLinearGradient(ft,pt,xt,Bt);else if(x.type===_i)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===ho)try{At=y.createPattern(x.pattern,"repeat")}catch(jt){At=null}if(x.type!==ho&&(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===ho&&x.yk!==-1)){x.yk=-1;var Dt=a.diagram;Dt!==null&&x.yk===-1&&ge(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 us(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){El(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)}El(a,!1),Fa(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Fa(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,Fa(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,sr),a.rotate(this.Kb,z.x,z.y),Ot.free(z)}},Pt.v=function(a){if(!tl(this)){a===void 0&&(a=!1),Yo(this,!0),bA(this,!0);var y=this.panel;y===null||a||y.v()}},Pt.Uj=function(){tl(this)||(Yo(this,!0),bA(this,!0))};function ts(a){if(!ta(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)&&(El(this,!0),Fa(this,!0))},Pt.Wu=function(){Fa(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?So(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===je.Auto&&E.Pb()===a?_r(a,Ve,y):x===Mi?E!==null?E.type===je.Spot&&E.Pb()===a?_r(a,Ve,y):(x=E.defaultStretch,x===Mi?_r(a,Ke,y):_r(a,x,y)):_r(a,Ke,y):_r(a,x,y)}function So(a,y,x,E){var b=a.stretch;if(b!==Mi)return _r(a,b,E);var z=b=null;switch(y.stretch){case hi:z=!0;break;case Ve:z=!0}switch(x.stretch){case Yn:b=!0;break;case Ve:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Yn||y===Ve),z===null&&(z=y===hi||y===Ve),b===!0&&z===!0?_r(a,Ve,E):b===!0?_r(a,Yn,E):z===!0?_r(a,hi,E):_r(a,Ke,E)}function _r(a,y,x){if(x)return y;if(y===Ke||(x=a.desiredSize,x.w()))return Ke;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Yn)return Ke;if(y===Ve)return hi}else{if(y===hi)return Ke;if(y===Ve)return Yn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===hi)return Ke;if(y===Ve)return Yn}else{if(y===Yn)return Ke;if(y===Ve)return hi}return y}function $a(a,y){a.l=y?a.l|512:a.l&-513}function ks(a){return(a.l&1024)!==0}function Tu(a,y){a.l=y?a.l|1024:a.l&-1025}function El(a,y){a.l=y?a.l|2048:a.l&-2049}function Fa(a,y){a.l=y?a.l|4096:a.l&-4097}function tl(a){return(a.l&8192)!==0}function Yo(a,y){a.l=y?a.l|8192:a.l&-8193}function ta(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,ts(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 ph(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){ph(x)}):ph(a))}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Xo(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&fy(a)&&Zt("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 Kh(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 Tn),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=Xn(arguments),E=z(x),He(E)||Zt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=on.go[a]}if(E===null&&(b!=null&&b.constructor||Zt("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 me&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Dc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Zt("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 Wr)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=gA.I(y),y!==null&&(a.type=y);else if(a instanceof Fr){var x=kn(Fr,y);x!==null?a.type=x:Zt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof en?(y=kn(en,y),y!==null&&(a.type=y)):a instanceof gr&&(y=kn(gr,y),y!==null&&(a.type=y));else if(y instanceof re)a instanceof je||Zt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof is){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 is?o0(E,y):Zt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Re)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Lr)a.type=y;else if(y instanceof Xo)a instanceof re||a instanceof is?a.bind(y):Zt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Hl)a instanceof re?a.Jv(y):Zt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ss)a instanceof en&&a.type===en.o?a.figures.add(y):Zt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof gr)a instanceof ss?a.segments.add(y):Zt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof co)a instanceof me||a instanceof Ti?a.layout=y:Zt("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 Fr){x=new gi;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);Kh(a,x)}else if(a instanceof is){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Zt("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)&&Zt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new gi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);Kh(a,b)}else Kh(a,y);else Zt('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}de.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 tc),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 tc),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 tc),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:Ma},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new mh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ma&&(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 mh),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 mh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Yi},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new mh),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)&&fn(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 Fr&&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 Fr&&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&&Zt("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),ks(this)&&(a=this.part,a!==null&&(qr(this,a,"width"),qr(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 rn(a,this.jd.height).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),ks(this)&&(a=this.part,a!==null&&qr(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 rn(this.jd.width,a).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),ks(this)&&(a=this.part,a!==null&&qr(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ui},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:Nr},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 Vi(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&&us(this),this.Ab}},oe:{get:function(){return this.l&4096&&us(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:Ke},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()&&Zt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ts(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&&fn(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&&fn(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&&fn(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&&fn(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||Zt("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:ar},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),ph(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&fn(a,">= 0",re,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),ph(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),ph(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&&fn(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:ar},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),ph(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&fn(a,">= 0",re,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),ph(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),ph(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&&fn(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 Tn,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 mn(0,0,2.76142374915397,2.761423749153969),spot2:new mn(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:wr},new Xo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Xo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof mr&&(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:wr},new Xo("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 mr&&(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(mr,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 mn(0,0,4,6),spot2:new mn(1,1,-4,-4)}))}),TA("ContextMenu",function(){return el(mr,je.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ot(0,3),shadowBlur:5},new Xo("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 mn(0,0,2,3),y.spot2=new mn(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 Xo("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 rn(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:Ve,geometryStretch:Dn,visible:!1},y!==""?new Xo("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 Vi(0,1,0,0)});var y=el(je,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Vi(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=Ke=new Re(re,"None",0),re.Default=Mi=new Re(re,"Default",0),re.Vertical=hi=new Re(re,"Vertical",4),re.Horizontal=Yn=new Re(re,"Horizontal",5),re.Fill=Ve=new Re(re,"Fill",3),re.Uniform=Dn=new Re(re,"Uniform",1),re.UniformToFill=Zi=new Re(re,"UniformToFill",2),re.FlipVertical=zi=new Re(re,"FlipVertical",1),re.FlipHorizontal=lr=new Re(re,"FlipHorizontal",2),re.FlipBoth=kr=new Re(re,"FlipBoth",3),re.make=el,re.getBuilders=function(){var a=new Tn,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;Zt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},re.takeBuilderArgument=bd;function tc(){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=ui,this.o=Nr,this.hg=Mi,this.ob=this.Bi=1,this.Pf=Ke,this.Pc=this.Ci=this.gd=null,this.Oc="category"}tc.prototype.copy=function(){var a=new tc;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 mh(){this.u=-1/0,this.o=0,this.F=Yi,this.rr=Ma,this.j=this.V="None"}mh.prototype.copy=function(){var a=new mh;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},mh.className="LinkElementSettings";function Td(){this.yj=this.Xi=es,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 ec(){this.ha=[1,0,0,1,0,0]}ec.prototype.copy=function(){var a=new ec;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},ec.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},ec.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},ec.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)}},ec.className="STransform";function Iu(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Iu.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Iu.className="SGradient";function Xs(a,y,x){this.ownerDocument=a=y===void 0?on.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 La(this,x)}Xs.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},Xs.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),He(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},Xs.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Xs.prototype.focus=function(){this.Oa.focus()},Xs.prototype.mx=function(){this.ownerDocument=null},de.Object.defineProperties(Xs.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}}}),Xs.className="SVGSurface";function La(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 ec,this.j=vg(this),this.Nj=vg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=wi++,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=La.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 Iu("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"+wi++,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 Iu("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')"),nc(this,Wl,z,this.rb),this.addElement(Wl,z)},Pt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),ic(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]},nc(this,"fill",a,this.rb),this.addElement("rect",a)},Pt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},nc(this,"fill",a,this.rb),ic(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},nc(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 nc(a,y,x,E){y==="fill"?ic(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 ic(a,y){a.fillStyle instanceof Iu?y.fill=rc(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 Iu?y.setAttributeNS(null,"fill",rc(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 Iu)y.stroke=rc(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 rc(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"+wi++,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=Xn(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,nc(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 ec;rt.ha=[y,x,E,b,z,tt],y={},nc(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 fA(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function qA(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(){},La.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},La.prototype.getImageData=function(){return null},La.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()))}La.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},La.className="SVGContext",me.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Xs(this,on.document));var y=new Xs(this,on.document,!0);a===void 0&&(a=new gi);var x=this;return Wc(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)},me.prototype.makeSvg=me.prototype.Cs,me.prototype.av=function(a){return this.Cs(a)},me.prototype.makeSVG=me.prototype.av;function Ml(a,y,x,E){this.ownerDocument=y=y===void 0?on.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new oc(y,x,E),y.H=a}Ml.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},Ml.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Ml.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ml.prototype.focus=function(){this.Oa.focus()},Ml.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},de.Object.defineProperties(Ml.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}}}),Ml.className="CanvasSurface";function oc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Zt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Ii,this.isTemporary=!!x}Pt=oc.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()},oc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Pt=oc.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 Fr&&a.type===_i){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(){},de.Object.defineProperties(oc.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([]);oc.className="CanvasSurfaceContext";function Dd(){this.F=this.o=this.u=this.j=0}Dd.className="ColorNumbers";function Fr(a,y){ti||(wt(),ti=!0),Je(this),this._isFrozen=!1,a===void 0?(this.na=ir,this.xk="black"):typeof a=="string"?(this.na=ir,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ni?(this.Qd=Mo,this.Lk=Ls):this.Lk=a===_i?this.Qd=sr:this.Qd=ar,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Fr.prototype.copy=function(){var a=new Fr;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=Fr.prototype,Pt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Pt.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Pt.qb=function(a){a.classType===Fr&&(this.type=a)},Pt.toString=function(){var a="Brush(";if(this.type===ir)a+=this.color;else if(a=this.type===Ni?a+"Linear ":this.type===_i?a+"Radial ":this.type===ho?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&&Ue(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&fn(a,"0 <= loc <= 1",Fr,"addColorStop:loc"),this.we===null&&(this.we=new Tn),this.we.add(a,y),this.na===ir&&(this.type=Ni),this.xe=null,this},Pt.Vz=function(a,y){if(this._isFrozen&&Ue(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Sr:y,this.type===ir)$A(this.color),this.color=jf(a,y);else if((this.type===Ni||this.type===_i)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)$A(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?Sr:x,$A(a),jf(y,x)}Pt.Wy=function(a,y){if(this._isFrozen&&Ue(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Sr:y,this.type===ir)$A(this.color),this.color=jf(-a,y);else if((this.type===Ni||this.type===_i)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)$A(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?Sr:x,$A(a),jf(-y,x)}function ep(a,y,x){$A(a),a=ce.j;var E=ce.u,b=ce.o,z=ce.F;return $A(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===ir)return Kf(this.color);if((this.type===Ni||this.type===_i)&&this.colorStops!==null){var a=this.colorStops;if(this.type===_i)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 Fr?a.Gx():($A(a),128>(299*ce.j+587*ce.u+114*ce.o)/1e3):!1}function jf(a,y){switch(y){case Sr:y=100*ip(ce.j);var x=100*ip(ce.u),E=100*ip(ce.o);return qe.j=.4124564*y+.3575761*x+.1804375*E,qe.u=.2126729*y+.7151522*x+.072175*E,qe.o=.0193339*y+.119192*x+.9503041*E,qe.F=ce.F,y=vt(qe.j/ae[0]),x=vt(qe.u/ae[1]),E=vt(qe.o/ae[2]),pn.j=116*x-16,pn.u=500*(y-x),pn.o=200*(x-E),pn.F=qe.F,pn.j=Math.min(100,Math.max(0,pn.j+100*a)),a=(pn.j+16)/116,y=a-pn.o/200,qe.j=ae[0]*mt(pn.u/500+a),qe.u=ae[1]*(pn.j>Wt*It?Math.pow(a,3):pn.j/Wt),qe.o=ae[2]*mt(y),qe.F=pn.F,a=-.969266*qe.j+1.8760108*qe.u+.041556*qe.o,y=.0556434*qe.j+-.2040259*qe.u+1.0572252*qe.o,ce.j=255*rp((3.2404542*qe.j+-1.5371385*qe.u+-.4985314*qe.o)/100),ce.u=255*rp(a/100),ce.o=255*rp(y/100),ce.F=qe.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 xr:return np(),We.o=Math.min(100,Math.max(0,We.o+100*a)),"hsla("+We.j+", "+We.u+"%, "+We.o+"%, "+We.F+")";default:Zt("Unknown color space: "+y)}}function $A(a){ti||(wt(),ti=!0);var y=Ee;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))}We.j=Math.round(tt),We.u=Math.round(100*a),We.o=Math.round(100*b),We.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>It?Math.pow(a,1/3):(Wt*a+16)/116}function mt(a){var y=a*a*a;return y>It?y:(116*a-16)/Wt}function St(a,y){typeof a!="string"&&(a instanceof Fr||Zt("Value for "+y+" must be a color string or a Brush, not "+a))}function wt(){Ee=wo?new Ml(null,void 0,{willReadFrequently:!0}).context:null}de.Object.defineProperties(Fr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ue(this,a),this.na=a,this.start.Mc()&&(a===Ni?this.start=Mo:a===_i&&(this.start=sr)),this.end.Mc()&&(a===Ni?this.end=Ls:a===_i&&(this.end=sr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ue(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ue(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ue(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ue(this,a),0>a&&fn(a,">= zero",Fr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ue(this,a),0>a&&fn(a,">= zero",Fr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ue(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ue(this,a),this.cr=a,this.xe=null}}}),Fr.prototype.isDark=Fr.prototype.Gx,Fr.prototype.darkenBy=Fr.prototype.Wy,Fr.prototype.lightenBy=Fr.prototype.Vz,Fr.prototype.addColorStop=Fr.prototype.addColorStop;var It=216/24389,Wt=24389/27,ae=[95.047,100,108.883],Ee=null,ce=new Dd,We=new Dd,qe=new Dd,pn=new Dd,ti=!1;Fr.className="Brush";var ir;Fr.Solid=ir=new Re(Fr,"Solid",0);var Ni;Fr.Linear=Ni=new Re(Fr,"Linear",1);var _i;Fr.Radial=_i=new Re(Fr,"Radial",2);var ho;Fr.Pattern=ho=new Re(Fr,"Pattern",4);var Sr;Fr.Lab=Sr=new Re(Fr,"Lab",5);var xr;Fr.HSL=xr=new Re(Fr,"HSL",6),Fr.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},Fr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;ti||(wt(),ti=!0);var y=Ee;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)},Fr.lighten=function(a){return e0(a)},Fr.lightenBy=e0,Fr.darken=function(a){return n0(a)},Fr.darkenBy=n0,Fr.mix=ep,Fr.isDark=Kf;function Lr(){this.xa="Base"}Lr.prototype.measure=function(){},Lr.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Lr.prototype.arrange=function(){},Lr.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Lr.prototype.iA=function(a){a.Uj()},Lr.prototype.gc=function(){},de.Object.defineProperties(Lr.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return je}}}),Lr.prototype.remeasureObject=Lr.prototype.iA,Lr.prototype.arrangeElement=Lr.prototype.Ly,Lr.prototype.measureElement=Lr.prototype.Yz,Lr.className="PanelLayout";function xo(){this.xa="Base"}we(xo,Lr),xo.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),Ao(b,pt,xt,ft,At)}}},xo.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 to(){this.xa="Base"}we(to,Lr),to.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=ni(),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!==Ke&&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));En(y)},to.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===Ve||Gt===hi)&&(Mt=Math.max(x.height-xt-Bt,0)),xt=Mt+xt+Bt,Bt=At.alignment,Bt.Xb()&&(Bt=a.defaultAlignment),Bt.sb()||(Bt=sr),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 dr(){this.xa="Base"}we(dr,Lr),dr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=ni();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!==Ke&&At!==hi)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,Rr(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);En(x)}},dr.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===Ve||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=sr),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 Uo(){this.xa="Base"}we(Uo,Lr),Uo.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=ke.allocAt(-at.left,-at.top,xt,Bt),Dt=ke.allocAt(0,0,z,tt);zo(ot,Dt,!0),z=Dt.width,tt=Dt.height;for(var jt=!0,Jt=za(a),te=0;te<rt;te++){var ie=E[te];pt=y;var ve=x;if(ie!==ot&&(ie.visible||ie===Jt)){at=ie.margin;var An=at.left,In=at.top;switch(xt=at.right+at.left,Bt=at.top+at.bottom,at=ma(ie,!1),at){case Ve:pt=z,ve=tt,In=An=Bt=xt=0;break;case Yn:pt=z,An=xt=0;break;case hi:ve=tt,In=Bt=0}ie.measure(pt,ve,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=sr);var Cn=ie.alignmentFocus;if(Cn.Xb()&&(Cn=sr),ve=null,ie instanceof je&&ie.$e!==""&&(ve=ie.fb(ie.$e),ve===ie&&(ve=null)),An=Dt.x-An,In=Dt.y-In,ve!==null){for(ie.arrange(0,0,pt.width,pt.height),pt=ve.actualBounds,pt=Ot.allocAt(pt.x+(Cn.x*pt.width-Cn.offsetX),pt.y+(Cn.y*pt.height-Cn.offsetY)),ve=ve.panel;ve!==ie;)ve.transform.Ga(pt),ve=ve.panel;An+=at.x*z+at.offsetX-pt.x,In+=at.y*tt+at.offsetY-pt.y,Ot.free(pt)}else An+=at.x*z+at.offsetX-(Cn.x*pt.width+Cn.offsetX),In+=at.y*tt+at.offsetY-(Cn.y*pt.height+Cn.offsetY);jt?(jt=!1,b.h(An,In,xt,Bt)):Ao(b,An,In,xt,Bt)}}switch(jt?b.assign(Gt):Mt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Ao(b,Gt.x,Gt.y,Gt.width,Gt.height),ke.free(Gt),ke.free(Dt),at=ot.stretch,at===Mi&&(at=ma(ot,!1)),at){case Ke:return;case Ve:if(!isFinite(y)&&!isFinite(x))return;break;case Yn:if(!isFinite(y))return;break;case hi: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=ke.allocAt(-at.left,-at.top,xt,Bt),zo(ot,Dt,!0),z=Dt.width,tt=Dt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Jt||(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=sr),x=x.alignmentFocus,x.Xb()&&(x=sr),jt?(jt=!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)):Ao(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));jt?b.assign(Gt):Mt?b.Uu(Dt.x,Dt.y,Dt.width,Dt.height):Ao(b,Gt.x,Gt.y,Gt.width,Gt.height),ke.free(Dt)},Uo.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=ke.allocAt(0,0,tt,rt),zo(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=sr);var Bt=ft.alignmentFocus;if(Bt.Xb()&&(Bt=sr),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)}}ke.free(tt)};function zo(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 no(){this.xa="Base"}we(no,Lr),no.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),jt=Dt.x*Gt+Dt.offsetX;Dt=Dt.y*at+Dt.offsetY;var Jt=Im(ot),te=Jt.x*Gt+Jt.offsetX;for(Jt=Jt.y*at+Jt.offsetY,isFinite(y)&&(At=Math.max(Math.abs(jt-te)-Bt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Dt-Jt)-Bt,0)),Bt=rn.alloc(),Bt.h(0,0),a=za(a),Jt=0;Jt<rt;Jt++)Dt=E[Jt],Dt===ot||!Dt.visible&&Dt!==a||(at=Dt.margin,Gt=at.right+at.left,jt=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+jt,0),Bt.h(Math.max(Gt,Bt.width),Math.max(at,Bt.height)));if(rt===1)b.width=Gt,b.height=at,rn.free(Bt);else{switch(Dt=Tm(ot),Jt=Im(ot),rt=E=0,Jt.x!==Dt.x&&Jt.y!==Dt.y&&(E=Bt.width/Math.abs(Jt.x-Dt.x),rt=Bt.height/Math.abs(Jt.y-Dt.y)),rn.free(Bt),Bt=0,Mt!==null&&(Bt=Mt.strokeWidth*Mt.scale,Hm(Mt)===Dn&&(E=rt=Math.max(E,rt))),E+=Math.abs(Dt.offsetX)+Math.abs(Jt.offsetX)+Bt,rt+=Math.abs(Dt.offsetY)+Math.abs(Jt.offsetY)+Bt,Mt=ot.stretch,Mt===Mi&&(Mt=ma(ot,!1)),Mt){case Ke:tt=z=0;break;case Ve:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Yn:isFinite(y)&&(E=y),tt=0;break;case hi: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}},no.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=ke.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,Ao(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=sr),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&&(_o(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 ke(z.x,z.y,z.width,z.height))));ke.free(z)};function ea(){this.xa="Base",this.name="Table"}we(ea,Lr),ea.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=ni(),rt=ni(),ot=0;ot<z;ot++){var at=E[ot],At=at instanceof je?at:null;if(At!==null&&ac(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&&(Yo(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))}En(tt);var jt=ni(),Jt=ni(),te=ni(),ie={count:0},ve={count:0},An=y,In=x,Cn=a.rowDefs,$e=a.colDefs,ze=null;z=Cn.length;for(var bi=0;bi<z;bi++)ze=Cn[bi],ze!==void 0&&(ze.actual=0);z=$e.length;for(var Ci=0;Ci<z;Ci++)ze=$e[Ci],ze!==void 0&&(ze.actual=0);for(var yr=Mt.length,Kr=0,ys=0;ys<yr;ys++)Mt[ys]&&(Kr=Math.max(Kr,Mt[ys].length));var Ps=Math.min(a.topIndex,yr-1),ya=Math.min(a.leftIndex,Kr-1),ws=0;yr=Mt.length;for(var mc=za(a),Zo=0;Zo<yr;Zo++)if(Mt[Zo]){Kr=Mt[Zo].length;var DA=a.Fb(Zo);DA.actual=0;for(var wa=DA.oc=0;wa<Kr;wa++)if(Mt[Zo][wa]){var vc=a.Eb(wa);jt[wa]===void 0&&(vc.actual=0,vc.oc=0,jt[wa]=!0);for(var Il=Mt[Zo][wa],Jl=Il.length,yl=0;yl<Jl;yl++){var il=Il[yl];if(il.visible||il===mc){var Af=1<il.rowSpan||1<il.columnSpan;Af&&(Zo<Ps||wa<ya||Jt.push(il));var OA=il.margin,Gg=OA.right+OA.left,wl=OA.top+OA.bottom,Sa=So(il,DA,vc,!1),Kp=il.desiredSize,Xd=!isNaN(Kp.height),ru=!isNaN(Kp.width)&&Xd;if(Af||Sa===Ke||ru||Zo<Ps||wa<ya||(ie[wa]!==void 0||Sa!==Ve&&Sa!==Yn||(ie[wa]=-1,ie.count++),ve[Zo]!==void 0||Sa!==Ve&&Sa!==hi||(ve[Zo]=-1,ve.count++),te.push(il)),il.measure(1/0,1/0,0,0),!(Zo<Ps||wa<ya)){var rl=il.measuredBounds,$f=Math.max(rl.width+Gg,0),Sl=Math.max(rl.height+wl,0);if(il.rowSpan===1&&(Sa===Ke||Sa===Yn)){ze=a.Fb(Zo);var uf=ze.Wc();ws=Math.max(Sl-ze.actual,0),ws+uf>In&&(ws=Math.max(In-uf,0));var ym=ze.oa===0;ze.oc=ze.oc+ws,ze.actual=ze.oa+ws,In=Math.max(In-(ws+(ym?uf:0)),0)}if(il.columnSpan===1&&(Sa===Ke||Sa===hi)){ze=a.Eb(wa);var jp=ze.Wc();ws=Math.max($f-ze.actual,0),ws+jp>An&&(ws=Math.max(An-jp,0));var ey=ze.oa===0;ze.oc=ze.oc+ws,ze.actual=ze.oa+ws,An=Math.max(An-(ws+(ey?jp:0)),0)}Af&&il.Uj()}}}}}En(jt);var Vu=0,Sh=0;z=a.columnCount;for(var Zd=0;Zd<z;Zd++){var hf=$e[Zd];hf!==void 0&&(Vu+=isNaN(hf.Hc)?hf.oc:hf.Hc,hf.oc!==0&&(Vu+=hf.Wc()))}z=a.rowCount;for(var zg=0;zg<z;zg++){var cf=Cn[zg];cf!==void 0&&(Sh+=isNaN(cf.Hc)?cf.oc:cf.Hc,cf.oc!==0&&(Sh+=cf.Wc()))}An=Math.max(y-Vu,0);var _u=In=Math.max(x-Sh,0),yc=An;z=te.length;for(var ol=0;ol<z;ol++){var ou=te[ol],wm=a.Fb(ou.row),xh=a.Eb(ou.column),Kg=ou.measuredBounds,HA=ou.margin,td=HA.right+HA.left,su=HA.top+HA.bottom;ie[ou.column]=xh.oc===0&&ie[ou.column]!==void 0?Math.max(Kg.width+td,ie[ou.column]):null,ve[ou.row]=wm.oc===0&&ve[ou.row]!==void 0?Math.max(Kg.height+su,ve[ou.row]):null}var Jd=0,jg=0,SA;for(SA in ve)SA!=="count"&&(Jd+=ve[SA]);for(SA in ie)SA!=="count"&&(jg+=ie[SA]);for(var Os=rn.alloc(),Vp=0;Vp<z;Vp++){var Na=te[Vp];if(Na.visible||Na===mc){var Jo=a.Fb(Na.row),Qa=a.Eb(Na.column),Bh=0;isFinite(Qa.width)?Bh=Qa.width:(isFinite(An)&&ie[Na.column]!==null?jg===0?Bh=Qa.actual+An:Bh=ie[Na.column]/jg*yc:ie[Na.column]!==null?Bh=An:Bh=Qa.actual||An,Bh=Math.max(0,Bh-Qa.Wc()));var wc=0;switch(isFinite(Jo.height)?wc=Jo.height:(isFinite(In)&&ve[Na.row]!==null?Jd===0?wc=Jo.actual+In:wc=ve[Na.row]/Jd*_u:ve[Na.row]!==null?wc=In:wc=Jo.actual||In,wc=Math.max(0,wc-Jo.Wc())),Os.h(Math.max(Qa.minimum,Math.min(Bh,Qa.maximum)),Math.max(Jo.minimum,Math.min(wc,Jo.maximum))),Sa=So(Na,Jo,Qa,!1),Sa){case Yn:Os.height=Math.max(Os.height,Jo.actual+In);break;case hi:Os.width=Math.max(Os.width,Qa.actual+An)}var ed=Na.margin,ny=ed.right+ed.left,Sm=ed.top+ed.bottom;Na.Uj(),Na.measure(Os.width,Os.height,Qa.minimum,Jo.minimum);var Vg=Na.measuredBounds,nd=Math.max(Vg.width+ny,0),qd=Math.max(Vg.height+Sm,0);isFinite(An)&&(nd=Math.min(nd,Os.width)),isFinite(In)&&(qd=Math.min(qd,Os.height));var sl=0;sl=Jo.actual,Jo.actual=Math.max(Jo.actual,qd),Jo.oc=Math.max(Jo.oc,qd),ws=Jo.actual-sl,In=Math.max(In-ws,0),ve[Na.row]===null&&(_u=Math.max(_u-ws,0)),sl=Qa.actual,Qa.actual=Math.max(Qa.actual,nd),Qa.oc=Math.max(Qa.oc,nd),ws=Qa.actual-sl,An=Math.max(An-ws,0),ie[Na.column]===null&&(yc=Math.max(yc-ws,0))}}En(te);var Ch=rn.alloc(),RA=ni(),_l=ni();if(z=Jt.length,z!==0){for(var ff=0;ff<yr;ff++)if(Mt[ff]){Kr=Mt[ff].length;var _g=a.Fb(ff);RA[ff]=_g.actual;for(var df=0;df<Kr;df++)if(Mt[ff][df]){var xm=a.Eb(df);_l[df]=xm.actual}}}for(var Wg=0;Wg<z;Wg++){var Do=Jt[Wg];if(Do.visible||Do===mc){var xA=a.Fb(Do.row),ql=a.Eb(Do.column);switch(Os.h(Math.max(ql.minimum,Math.min(y,ql.maximum)),Math.max(xA.minimum,Math.min(x,xA.maximum))),Sa=So(Do,xA,ql,!1),Sa){case Ve:_l[ql.index]!==0&&(Os.width=Math.min(Os.width,_l[ql.index])),RA[xA.index]!==0&&(Os.height=Math.min(Os.height,RA[xA.index]));break;case Yn:_l[ql.index]!==0&&(Os.width=Math.min(Os.width,_l[ql.index]));break;case hi:RA[xA.index]!==0&&(Os.height=Math.min(Os.height,RA[xA.index]))}isFinite(ql.width)&&(Os.width=ql.width),isFinite(xA.height)&&(Os.height=xA.height),Ch.h(0,0);for(var Bm=ql.minimum,xl=xA.minimum,Sc=1;Sc<Do.rowSpan&&!(Do.row+Sc>=a.rowCount);Sc++)ze=a.Fb(Do.row+Sc),ws=0,ws=Sa===Ve||Sa===hi?Math.max(ze.minimum,RA[Do.row+Sc]===0?ze.maximum:Math.min(RA[Do.row+Sc],ze.maximum)):Math.max(ze.minimum,isNaN(ze.Hc)?ze.maximum:Math.min(ze.Hc,ze.maximum)),Ch.height+=ws,xl+=ze.minimum;for(var $l=1;$l<Do.columnSpan&&!(Do.column+$l>=a.columnCount);$l++)ze=a.Eb(Do.column+$l),ws=0,ws=Sa===Ve||Sa===Yn?Math.max(ze.minimum,_l[Do.column+$l]===0?ze.maximum:Math.min(_l[Do.column+$l],ze.maximum)):Math.max(ze.minimum,isNaN(ze.Hc)?ze.maximum:Math.min(ze.Hc,ze.maximum)),Ch.width+=ws,Bm+=ze.minimum;Os.width+=Ch.width,Os.height+=Ch.height;var Yg=Do.margin,gf=Yg.right+Yg.left,_p=Yg.top+Yg.bottom;Do.measure(Os.width,Os.height,Bm,xl);for(var Xg=Do.measuredBounds,au=Math.max(Xg.width+gf,0),id=Math.max(Xg.height+_p,0),pf=0,Zg=0;Zg<Do.rowSpan&&!(Do.row+Zg>=a.rowCount);Zg++)ze=a.Fb(Do.row+Zg),pf+=ze.total||0;if(pf<id){var xc=id-pf,Wu=id-pf;if(Do.spanAllocation!==null)for(var Bc=Do.spanAllocation,Ph=0;Ph<Do.rowSpan&&!(0>=xc)&&!(Do.row+Ph>=a.rowCount);Ph++){ze=a.Fb(Do.row+Ph);var Cc=ze.oa||0,rd=Bc(Do,ze,Wu);ze.actual=Math.min(ze.maximum,Cc+rd),ze.oa!==Cc&&(xc-=ze.oa-Cc)}for(;0<xc;){var GA=ze.oa||0;if(isNaN(ze.height)&&ze.maximum>GA&&(ze.actual=Math.min(ze.maximum,GA+xc),ze.oa!==GA&&(xc-=ze.oa-GA)),ze.index===0)break;ze=a.Fb(ze.index-1)}}for(var $d=0,Pc=0;Pc<Do.columnSpan&&!(Do.column+Pc>=a.columnCount);Pc++)ze=a.Eb(Do.column+Pc),$d+=ze.total||0;if($d<au){var tg=au-$d,iy=au-$d;if(Do.spanAllocation!==null)for(var Fh=Do.spanAllocation,od=0;od<Do.columnSpan&&!(0>=tg)&&!(Do.column+od>=a.columnCount);od++){ze=a.Eb(Do.column+od);var Wp=ze.oa||0,ry=Fh(Do,ze,iy);ze.actual=Math.min(ze.maximum,Wp+ry),ze.oa!==Wp&&(tg-=ze.oa-Wp)}for(;0<tg;){var Cm=ze.oa||0;if(isNaN(ze.width)&&ze.maximum>Cm&&(ze.actual=Math.min(ze.maximum,Cm+tg),ze.oa!==Cm&&(tg-=ze.oa-Cm)),ze.index===0)break;ze=a.Eb(ze.index-1)}}}}En(Jt),rn.free(Ch),rn.free(Os),RA!==void 0&&En(RA),_l!==void 0&&En(_l);var eg=0,ng=0,Pm=a.desiredSize,g1=a.maxSize;Sa=ma(a,!0);var Yp=Sh=Vu=0,Xp=0;z=a.columnCount;for(var Fm=0;Fm<z;Fm++)$e[Fm]!==void 0&&(ze=a.Eb(Fm),isFinite(ze.width)?(Yp+=ze.width,Yp+=ze.Wc()):s0(ze)===sp?(Yp+=ze.oa,Yp+=ze.Wc()):ze.oa!==0&&(Vu+=ze.oa,Vu+=ze.Wc()));isFinite(Pm.width)?eg=Math.min(Pm.width,g1.width):eg=Sa!==Ke&&isFinite(y)?y:Vu,eg=Math.max(eg,a.minSize.width),eg=Math.max(eg-Yp,0);for(var J1=Vu===0?1:Math.max(eg/Vu,1),Lm=0;Lm<z;Lm++)$e[Lm]!==void 0&&(ze=a.Eb(Lm),isFinite(ze.width)||s0(ze)===sp||(ze.actual=ze.oa*J1),ze.position=b.width,ze.oa!==0&&(b.width+=ze.oa,b.width+=ze.Wc()));z=a.rowCount;for(var Em=0;Em<z;Em++)Cn[Em]!==void 0&&(ze=a.Fb(Em),isFinite(ze.height)?(Xp+=ze.height,Xp+=ze.Wc()):s0(ze)===sp?(Xp+=ze.oa,Xp+=ze.Wc()):ze.oa!==0&&(Sh+=ze.oa,Sh+=ze.Wc()));isFinite(Pm.height)?ng=Math.min(Pm.height,g1.height):ng=Sa!==Ke&&isFinite(x)?x:Sh,ng=Math.max(ng,a.minSize.height),ng=Math.max(ng-Xp,0);for(var q1=Sh===0?1:Math.max(ng/Sh,1),Mm=0;Mm<z;Mm++)Cn[Mm]!==void 0&&(ze=a.Fb(Mm),isFinite(ze.height)||s0(ze)===sp||(ze.actual=ze.oa*q1),ze.position=b.height,ze.oa!==0&&(b.height+=ze.oa,b.height+=ze.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,ze=a.Fb(Zp.row),ay=ze.actual):(ze=a.Eb(Zp.column),sy=ze.actual,ay=b.height),Zp.measuredBounds.h(0,0,sy,ay),Yo(Zp,!1)}En(rt),a.inRowsCols=Mt},ea.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 jt=y[Dt];if(jt instanceof je&&jt.visible&&ac(jt)){if(jt.type===je.TableRow){rt=a.Fb(jt.row);var Jt=a.Eb(Gt)}else rt=a.Fb(Mt),Jt=a.Eb(jt.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Mt,xt))),rt=Jt.position+pt+z,Jt.oa!==0&&(rt+=Jt.Io(Math.max(Gt,Bt))),Jt=jt.measuredBounds,jt.Uk(),jt.actualBounds.ka();var te=jt.actualBounds,ie=ke.allocAt(te.x,te.y,te.width,te.height);te.x=jt.type===je.TableRow?z:rt,te.y=jt.type===je.TableColumn?b:ot,te.width=Jt.width,te.height=Jt.height,jt.actualBounds.freeze(),bA(jt,!1),xa(ie,te)||At===null||(At.oh(),jt.Pn(At)),ke.free(ie)}}for(Dt=rn.alloc(),jt=0;jt<at;jt++)if(tt[jt]){for(At=tt[jt].length,Jt=a.Fb(jt),ot=Jt.position+ft+b,Jt.oa!==0&&(ot+=Jt.Io(Math.max(Mt,xt))),te=0;te<At;te++)if(tt[jt][te]){ie=a.Eb(te),rt=ie.position+pt+z,ie.oa!==0&&(rt+=ie.Io(Math.max(Gt,Bt)));for(var ve=tt[jt][te],An=ve.length,In=0;In<An;In++){var Cn=ve[In],$e=Cn.measuredBounds;Dt.h(0,0);for(var ze=1;ze<Cn.rowSpan&&!(jt+ze>=a.rowCount);ze++){var bi=a.Fb(jt+ze);bi.oa!==0&&(Dt.height+=bi.total)}for(ze=1;ze<Cn.columnSpan&&!(te+ze>=a.columnCount);ze++)bi=a.Eb(te+ze),bi.oa!==0&&(Dt.width+=bi.total);var Ci=ie.oa+Dt.width,yr=Jt.oa+Dt.height;ze=rt,bi=ot;var Kr=Ci,ys=yr,Ps=rt,ya=ot,ws=Ci,mc=yr;rt+Ci>x.width&&(ws=Math.max(x.width-rt,0)),ot+yr>x.height&&(mc=Math.max(x.height-ot,0));var Zo=Cn.alignment;if(Zo.Xb()){Zo=a.defaultAlignment,Zo.sb()||(Zo=sr);var DA=Zo.x,wa=Zo.y,vc=Zo.offsetX;Zo=Zo.offsetY;var Il=ie.alignment,Jl=Jt.alignment;Il.sb()&&(DA=Il.x,vc=Il.offsetX),Jl.sb()&&(wa=Jl.y,Zo=Jl.offsetY)}else DA=Zo.x,wa=Zo.y,vc=Zo.offsetX,Zo=Zo.offsetY;(isNaN(DA)||isNaN(wa))&&(wa=DA=.5,Zo=vc=0),Il=$e.width,Jl=$e.height;var yl=Cn.margin,il=yl.left+yl.right,Af=yl.top+yl.bottom,OA=So(Cn,Jt,ie,!1);!isNaN(Cn.desiredSize.width)||OA!==Ve&&OA!==Yn||(Il=Math.max(Ci-il,0)),!isNaN(Cn.desiredSize.height)||OA!==Ve&&OA!==hi||(Jl=Math.max(yr-Af,0)),Ci=Cn.maxSize,yr=Cn.minSize,Il=Math.min(Ci.width,Il),Jl=Math.min(Ci.height,Jl),Il=Math.max(yr.width,Il),Jl=Math.max(yr.height,Jl),Ci=Jl+Af,ze+=Kr*DA-(Il+il)*DA+vc+yl.left,bi+=ys*wa-Ci*wa+Zo+yl.top,Cn.visible&&(_o(Ps,ya,ws,mc,ze,bi,$e.width,$e.height)?Cn.arrange(ze,bi,Il,Jl):Cn.arrange(ze,bi,Il,Jl,new ke(Ps,ya,ws,mc)))}}}for(rn.free(Dt),a=0;a<E;a++)x=y[a],z=x instanceof je?x:null,z!==null&&ac(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function gl(){this.xa="Base"}we(gl,Lr),gl.prototype.measure=function(){},gl.prototype.arrange=function(){};function kl(){this.xa="Base"}we(kl,Lr),kl.prototype.measure=function(){},kl.prototype.arrange=function(){};function hs(){this.xa="Base"}we(hs,Lr),hs.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&Zt("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===Dn?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&&(Yo(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)},hs.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=sr),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"}we(va,Lr),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],jt=[];if(xt.push(jt),Dt.visible){var Jt=Dt.interval;if(!(0>Jt)){Dt=vh(Dt.figure);for(var te=0;te<Mt;te++)if(te!==Gt){var ie=Bt[te];ie.visible&&vh(ie.figure)===Dt&&(ie=ie.interval,ie>Jt&&jt.push(ie))}}}}for(Bt=a.O.s,Mt=Bt.length,Gt=0;Gt<Mt;Gt++){var ve=Bt[Gt];if(ve.visible&&(jt=ve.interval||1,Dt=Math.abs(jt),!(2>b*Dt*x))){if(Jt=ve.segmentIndex,(!isFinite(Jt)||isNaN(Jt))&&(Jt=0),0>Jt&&(Jt=Dt-Math.min(-Jt,Dt)),Jt=Math.round(Jt%Dt),Dt=ve.opacity,te=1,Dt!==1){if(Dt===0)continue;te=y.globalAlpha,y.globalAlpha=te*Dt}ie=xt[Gt];var An=!1,In=ve.strokeDashArray;if(In!==null&&(An=!0,y.js(In,ve.strokeDashOffset)),ve.figure==="LineV"&&ve.stroke!==null&&0<ve.strokeWidth){for(y.lineWidth=ve.strokeWidth,mo(a,y,ve.stroke,!1,!1,z,tt),y.beginPath(),In=ve=Math.floor((pt-b)/b);In<=ve+at;In++){var Cn=In*b+pt;0<=Cn&&Cn<=rt&&tu(In,jt,Jt,ie)&&(y.moveTo(Cn,0),y.lineTo(Cn,ot))}y.stroke(),y.Se()}else if(ve.figure==="LineH"&&ve.stroke!==null&&0<ve.strokeWidth){for(y.lineWidth=ve.strokeWidth,mo(a,y,ve.stroke,!1,!1,z,tt),y.beginPath(),In=ve=Math.floor((ft-E)/E);In<=ve+At;In++)Cn=In*E+ft,0<=Cn&&Cn<=ot&&tu(In,jt,Jt,ie)&&(y.moveTo(0,Cn),y.lineTo(rt,Cn));y.stroke(),y.Se()}else if(ve.figure==="BarV"&&ve.fill!==null)for(mo(a,y,ve.fill,!0,!1,z,tt),ve=ve.width,isNaN(ve)&&(ve=b),Cn=In=Math.floor((pt-b)/b);Cn<=In+at;Cn++){var $e=Cn*b+pt;0<=$e+ve&&$e<=rt&&tu(Cn,jt,Jt,ie)&&y.fillRect($e,0,ve,ot)}else if(ve.figure==="BarH"&&ve.fill!==null)for(mo(a,y,ve.fill,!0,!1,z,tt),ve=ve.height,isNaN(ve)&&(ve=E),Cn=In=Math.floor((ft-E)/E);Cn<=In+At;Cn++)$e=Cn*E+ft,0<=$e+ve&&$e<=ot&&tu(Cn,jt,Jt,ie)&&y.fillRect(0,$e,rt,ve);An&&y.fs(),Dt!==1&&(y.globalAlpha=te)}}y.restore(),y.Vc(!1)};function tu(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 pl(){this.xa="Base"}we(pl,Lr),pl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof mr||a instanceof nn){var tt=null,rt=null;if(a instanceof nn&&(tt=a),a instanceof mr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof nn){var ot=tt;if(z===0)Rr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var at=a instanceof mr?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){Gl(a,rt,pt,at);var Bt=at.measuredBounds;x.ed(Bt),xt.push(Bt)}Bt=Ii.alloc();for(var Mt=Ot.alloc(),Gt=Ot.alloc(),Dt=0;Dt<z;Dt++){var jt=E[Dt];if(jt!==at)if(jt.isPanelMain&&jt instanceof Oi){Gl(a,rt,pt,jt);var Jt=jt.measuredBounds;x.ed(Jt),xt.push(Jt)}else if(2>ft)jt.measure(1/0,1/0,0,0),Jt=jt.measuredBounds,x.ed(Jt),xt.push(Jt);else{var te=jt.segmentIndex,ie=jt.segmentFraction,ve=jt.alignmentFocus;ve.Mc()&&(ve=sr);var An=jt.segmentOrientation,In=jt.segmentOffset;if(isNaN(te)){var Cn=ot.ua;Jt=ni(),Cn.Qu(ie,Jt);var $e=Ot.allocAt(Jt[0],Jt[1]);if($e.add(ot.i(0)),Cn.type===en.j?$e.offset(-Cn.startX,-Cn.startY):(Cn=Cn.figures.first(),Cn!==null&&$e.offset(-Cn.startX,-Cn.startY)),Cn=Jt[2],An!==Ma){var ze=ot.computeAngle(jt,An,Cn);jt.Kb=ze}ze=$e.x-y.x;var bi=$e.y-y.y;Ot.free($e),En(Jt)}else if(te<-ft||te>=ft)Jt=Ot.alloc(),ot.vg(),ot.computeMidPoint(Jt),Cn=ot.midAngle,An!==Ma&&(ze=ot.computeAngle(jt,An,Cn),jt.Kb=ze),ze=Jt.x-y.x,bi=Jt.y-y.y,Ot.free(Jt);else{if(ze=0,0<=te?(bi=At.M(te),Jt=te<ft-1?At.M(te+1):bi):(ze=ft+te,bi=At.M(ze),Jt=0<ze?At.M(ze-1):bi),bi.Xa(Jt)){0<=te?(Cn=0<te?At.M(te-1):bi,ze=te<ft-2?At.M(te+2):Jt):(Cn=ze<ft-1?At.M(ze+1):bi,ze=1<ze?At.M(ze-2):Jt),$e=Cn.Bf(bi);var Ci=Jt.Bf(ze);Cn=$e>Ci+10?0<=te?Cn.ab(bi):bi.ab(Cn):Ci>$e+10?0<=te?Jt.ab(ze):ze.ab(Jt):0<=te?Cn.ab(ze):ze.ab(Cn)}else Cn=0<=te?bi.ab(Jt):Jt.ab(bi);An!==Ma&&(ze=ot.computeAngle(jt,An,Cn),jt.Kb=ze),ze=bi.x+(Jt.x-bi.x)*ie-y.x,bi=bi.y+(Jt.y-bi.y)*ie-y.y}jt.measure(1/0,1/0,0,0),Jt=jt.measuredBounds,$e=jt.naturalBounds;var yr=0;jt instanceof Oi&&(yr=jt.strokeWidth),Ci=$e.width+yr;var Kr=$e.height+yr;Bt.reset(),Bt.translate(-Jt.x,-Jt.y),Bt.scale(jt.scale,jt.scale),Bt.rotate(An===Ma?jt.angle:Cn,Ci/2,Kr/2),An!==pp&&An!==vp||Bt.rotate(90,Ci/2,Kr/2),An!==mp&&An!==yp||Bt.rotate(-90,Ci/2,Kr/2),An===b0&&(45<Cn&&135>Cn||225<Cn&&315>Cn)&&Bt.rotate(-Cn,Ci/2,Kr/2),$e=new ke(0,0,Ci,Kr),Mt.xi($e,ve),Bt.Ga(Mt),ve=-Mt.x+yr/2*jt.scale,jt=-Mt.y+yr/2*jt.scale,Gt.assign(In),yr=isNaN(In.x);var ys=isNaN(In.y);if(yr||ys){Ci=Ci/2+3,Kr=Kr/2+3;var Ps=45<=Cn&&135>=Cn,ya=225<=Cn&&315>=Cn;An===Ma&&(Ps||ya)?(Gt.x=ys?Ci:In.y,Gt.y=yr?Kr:In.x,Ps?0<=te||isNaN(te)&&.5>ie||!yr||(Gt.y=-Kr):ya&&((0<=te||isNaN(te)&&.5>ie)&&yr&&(Gt.y=-Kr),ys&&(Gt.x=-Ci))):(yr&&(Gt.x=0<=te||isNaN(te)&&.5>ie?Ci:-Ci),ys&&(Gt.y=-Kr),Gt.rotate(Cn))}else Gt.rotate(Cn);ze+=Gt.x,bi+=Gt.y,$e.set(Jt),$e.h(ze+ve,bi+jt,Jt.width,Jt.height),xt.push($e),x.ed($e)}}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),Rr(b,x.width||0,x.height||0),Ii.free(Bt),Ot.free(Mt),Ot.free(Gt)}}}},pl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof mr||a instanceof nn){var E=a,b=null;a instanceof mr&&(b=a,E=b.adornedPart);var z=a instanceof mr?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 nn)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=ni();xt.Qu(ot,Bt);var Mt=Ot.allocAt(Bt[0],Bt[1]);Mt.add(ft.i(0)),xt.type===en.j||(xt=xt.figures.first()),Mt.offset(-xt.startX,-xt.startY),xt=Bt[2],at!==Ma&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Mt.x;var Gt=Mt.y;Ot.free(Mt),En(Bt)}else if(rt<-x||rt>=x)Bt=Ot.alloc(),xt=ft,Gt=Bt,xt.vg(),xt.computeMidPoint(Gt),xt=ft.midAngle,at!==Ma&&(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),jt=Gt.Bf(Mt);xt=Dt>jt+10?0<=rt?xt.ab(Bt):Bt.ab(xt):jt>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!==Ma&&(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=sr),Bt=Ii.alloc(),Bt.reset(),Bt.scale(tt.scale,tt.scale),Bt.rotate(tt.angle,0,0);var Jt=tt.naturalBounds;Mt=ke.allocAt(0,0,Jt.width,Jt.height),Dt=Ot.alloc(),Dt.xi(Mt,pt),Bt.Ga(Dt),pt=-Dt.x,jt=-Dt.y;var te=Jt.width,ie=Jt.height;Jt=Ot.alloc(),Jt.assign(At);var ve=isNaN(At.x),An=isNaN(At.y);if(ve||An){te=te/2+3,ie=ie/2+3;var In=45<=xt&&135>=xt,Cn=225<=xt&&315>=xt;at===Ma&&(In||Cn)?(Jt.x=An?te:At.y,Jt.y=ve?ie:At.x,In?0<=rt||isNaN(rt)&&.5>ot||!ve||(Jt.y=-ie):Cn&&((0<=rt||isNaN(rt)&&.5>ot)&&ve&&(Jt.y=-ie),An&&(Jt.x=-te))):(ve&&(Jt.x=0<=rt||isNaN(rt)&&.5>ot?te:-te),An&&(Jt.y=-ie),Jt.rotate(xt))}else Jt.rotate(xt);ft+=Jt.x,Gt+=Jt.y,Bt.pp(Mt),pt+=Mt.x,jt+=Mt.y,rt=Ot.allocAt(ft+pt,Gt+jt),tt.move(rt),Ot.free(rt),Ot.free(Jt),Ot.free(Dt),ke.free(Mt),Ii.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 Gl(a,y,x,E){if(tl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof mr&&a.type===je.Link&&a.adornedObject instanceof Oi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof nn&&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 mr&&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),Yo(E,!1)}}function eu(){this.xa="Base"}we(eu,Lr),eu.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 ke(-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,jt=Mt.length,Jt=0,te=0,ie=ni(),ve=0;ve<jt;ve++){var An=Mt[ve],In=[];te=Jt=0;for(var Cn=An.length,$e=0;$e<Cn;$e+=2){var ze=An[$e],bi=An[$e+1];if($e!==0){var Ci=180*Math.atan2(bi-te,ze-Jt)/Math.PI;0>Ci&&(Ci+=360),In.push(Ci)}Jt=ze,te=bi}ie.push(In)}if(a.graduatedIntervals===null){for(var yr=[],Kr=a.O.s,ys=Kr.length,Ps=0;Ps<ys;Ps++){var ya=Kr[Ps],ws=[];if(yr.push(ws),ya.visible){var mc=ya.interval;if(!(0>mc)){for(var Zo=0;Zo<ys;Zo++)if(Zo!==Ps){var DA=Kr[Zo];if(DA.visible&&ya.constructor===DA.constructor){var wa=DA.interval;wa>mc&&ws.push(wa)}}}}}a.graduatedIntervals=yr}var vc=a.graduatedIntervals,Il=a.O.s,Jl=Il.length,yl=0,il=0,Af=Dt;a.graduatedMarks=[];for(var OA,Gg=0;Gg<Jl;Gg++){var wl=Il[Gg];if(OA=[],wl.visible&&wl!==rt){var Sa=Math.abs(wl.interval),Kp=a.graduatedTickUnit;if(!(2>Kp*Sa*Dt/a.graduatedRange&&wl.graduatedSkip===null)){var Xd=Gt[0][0],ru=0,rl=0;il=Dt*wl.graduatedStart-1e-4,Af=Dt*wl.graduatedEnd+1e-4;var $f=Kp*Sa,Sl=a.graduatedTickBase;if(Sl<a.graduatedMin){var uf=(a.graduatedMin-Sl)/$f;uf=uf%1===0?uf:Math.floor(uf+1),Sl+=uf*$f}else Sl>a.graduatedMin+$f&&(Sl-=Math.floor((Sl-a.graduatedMin)/$f)*$f);for(var ym=vc[Gg],jp=Sl,ey=1e-6*a.graduatedMax,Vu=1;Sl<=a.graduatedMax+ey;Vu++){t:{for(var Sh=ym.length,Zd=0;Zd<Sh;Zd++){var hf=(Sl-a.graduatedTickBase)%(ym[Zd]*a.graduatedTickUnit),zg=1e-6*a.graduatedTickUnit;if(hf<zg&&hf>-zg){var cf=!1;break t}}cf=!0}if(cf&&(Sl>a.graduatedMax&&(Sl=a.graduatedMax),wl.graduatedSkip===null||wl instanceof Wr&&!wl.graduatedSkip(Sl,wl)||wl instanceof Oi&&!wl.graduatedSkip(Sl,wl))&&(yl=(Sl-a.graduatedMin)*Dt/a.graduatedRange,yl>Dt&&(yl=Dt),il<=yl&&yl<=Af)){for(var _u=ie[ru][rl],yc=Gt[ru][rl];ru<Gt.length;){for(;yl>Xd&&rl<Gt[ru].length-1;)rl++,_u=ie[ru][rl],yc=Gt[ru][rl],Xd+=yc;if(yl<=Xd)break;ru++,rl=0,_u=ie[ru][rl],yc=Gt[ru][rl],Xd+=yc}var ol=Mt[ru],ou=ol[2*rl],wm=ol[2*rl+1],xh=(yl-(Xd-yc))/yc,Kg=new Ot(ou+(ol[2*rl+2]-ou)*xh+Bt/2-xt.bounds.x,wm+(ol[2*rl+3]-wm)*xh+Bt/2-xt.bounds.y);Kg.scale(rt.scale,rt.scale);t:{var HA=_u,td=ie[ru];if(!(.5005>xh&&.4995<xh)){var su=HA;if(.5>xh?0<rl?su=td[rl-1]:oe.$(ol[0],ol[ol.length-2])&&oe.$(ol[1],ol[ol.length-1])&&(su=td[td.length-1]):.5<xh&&(rl+1<td.length?su=td[rl+1]:oe.$(ol[0],ol[ol.length-2])&&oe.$(ol[1],ol[ol.length-1])&&(su=td[0])),HA!==su){var Jd=Math.abs(HA-su);if(180<Jd&&(HA<su?HA+=360:su+=360,Jd=Math.abs(HA-su)),5e-4>xh||.9995<xh){_u=(HA+su)/2%360;break t}if(10>Jd){var jg=1-Math.abs(.5-xh);_u=(HA*jg+su*(1-jg))%360;break t}}}_u=HA}if(wl instanceof Wr){var SA="";wl.graduatedFunction!==null?(SA=wl.graduatedFunction(Sl,wl),SA=SA!=null?SA.toString():""):SA=(+Sl.toFixed(2)).toString(),SA!==""&&OA.push({$l:Kg,angle:_u,text:SA})}else OA.push({$l:Kg,angle:_u})}Sl=jp+Vu*$f}}}a.graduatedMarks.push(OA)}En(ie);var Os=a.graduatedMarks;if(Os!==null)for(var Vp=E.length,Na=0;Na<Vp;Na++){var Jo=E[Na],Qa=Os[Na];if(Jo.visible&&Jo!==rt&&Qa.length!==0){if(Jo instanceof Oi){var Bh=a,wc=b,ed=Jo.alignmentFocus;ed.Mc()&&(ed=Mo);var ny=Jo.angle;Jo.Kb=0,Jo.measure(1/0,1/0,0,0),Jo.Kb=ny;var Sm=Jo.measuredBounds,Vg=Sm.width,nd=Sm.height,qd=ke.allocAt(0,0,Vg,nd),sl=Ot.alloc();sl.xi(qd,ed),ke.free(qd);for(var Ch=-sl.x,RA=-sl.y,_l=new ke,ff=Qa.length,_g=0;_g<ff;_g++)for(var df=Qa[_g],xm=df.$l.x,Wg=df.$l.y,Do=df.angle,xA=0;4>xA;xA++){switch(xA){case 0:sl.h(Ch,RA);break;case 1:sl.h(Ch+Vg,RA);break;case 2:sl.h(Ch,RA+nd);break;case 3:sl.h(Ch+Vg,RA+nd)}sl.rotate(Do+Jo.angle),sl.offset(xm,Wg),_g===0&&xA===0?_l.h(sl.x,sl.y,0,0):_l.Ye(sl),sl.offset(-xm,-Wg),sl.rotate(-Do-Jo.angle)}Ot.free(sl),Bh.graduatedBounds!==null&&Bh.graduatedBounds.push(_l),Ao(wc,_l.x,_l.y,_l.width,_l.height)}else if(Jo instanceof Wr){var ql=a,Bm=b;ql.temporaryTextBlock===null&&(ql.temporaryTextBlock=new Wr);var xl=ql.temporaryTextBlock;yy(xl,Jo);var Sc=Jo.alignmentFocus;Sc.Mc()&&(Sc=Mo);for(var $l=Jo.segmentOrientation,Yg=Jo.segmentOffset,gf=new ke,_p=0,Xg=0,au=0,id=0,pf=0,Zg=Qa.length,xc=0;xc<Zg;xc++){var Wu=Qa[xc];_p=Wu.$l.x,Xg=Wu.$l.y,au=Wu.angle,pf=id=Jo.angle,$l!==Ma&&(pf=$l===gp||$l===k0?au+Jo.angle:au,id=nn.computeAngle($l,pf)),xl.Kb=id,xl.text=Wu.text||"",xl.measure(1/0,1/0,0,0);var Bc=xl.measuredBounds,Ph=xl.naturalBounds,Cc=Ph.width,rd=Ph.height,GA=Ii.alloc();GA.reset(),GA.translate(-Bc.x,-Bc.y),GA.scale(xl.scale,xl.scale),GA.rotate(pf,Cc/2,rd/2),$l!==pp&&$l!==vp||GA.rotate(90,Cc/2,rd/2),$l!==mp&&$l!==yp||GA.rotate(-90,Cc/2,rd/2),$l===b0&&(45<au&&135>au||225<au&&315>au)&&GA.rotate(-au,Cc/2,rd/2);var $d=ke.allocAt(0,0,Cc,rd),Pc=Ot.alloc();Pc.xi($d,Sc),GA.Ga(Pc);var tg=-Pc.x,iy=-Pc.y,Fh=Ot.alloc();Fh.assign(Yg),isNaN(Fh.x)&&(Fh.x=Cc/2+3),isNaN(Fh.y)&&(Fh.y=-(rd/2+3)),Fh.rotate(au),_p+=Fh.x+tg,Xg+=Fh.y+iy;var od=new ke(_p,Xg,Bc.width,Bc.height),Wp=new ke(Bc.x,Bc.y,Bc.width,Bc.height),ry=new ke(Ph.x,Ph.y,Ph.width,Ph.height);Wu.Sz=id,Wu.lineCount=xl.lineCount,Wu.lines=[xl.Cb,xl.Ih,xl.df,xl.Le,xl.Qc,xl.Qb,xl.ze],Wu.actualBounds=od,Wu.measuredBounds=Wp,Wu.naturalBounds=ry,xc===0?gf.assign(od):gf.ed(od),Ot.free(Fh),Ot.free(Pc),ke.free($d),Ii.free(GA)}ql.graduatedBounds!==null&&ql.graduatedBounds.push(gf),Ao(Bm,gf.x,gf.y,gf.width,gf.height)}Yo(Jo,!1)}}},eu.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}}},eu.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 La,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=Mo);for(var jt=0;jt<Bt;jt++){var Jt=xt[jt].$l,te=xt[jt].angle,ie=Dt,ve=pt.Ab;ve.reset(),ve.translate(Jt.x+rt.x,Jt.y+rt.y),ve.rotate(te+pt.angle,0,0),ve.translate(-Mt.width*ie.x+ie.offsetX+Gt/2,-Mt.height*ie.y+ie.offsetY+Gt/2),ve.scale(pt.scale,pt.scale),El(pt,!1),pt.wh.set(pt.Ab),pt.Kk=pt.scale,Fa(pt,!1),pt.gc(y,x),b&&(a.svg.appendChild(pt.svg),pt.svg=null),pt.Ab.reset()}}}else if(pt instanceof Wr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Wr),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,jt=Dt.lines,jt!==void 0&&(Mt.Cb=jt[0],Mt.Ih=jt[1],Mt.df=jt[2],Mt.Le=jt[3],Mt.Qc=jt[4],Mt.Qb=jt[5],Mt.ze=jt[6]),Dt.naturalBounds&&(Mt.dc=Dt.naturalBounds),Dt.actualBounds&&(jt=Dt.actualBounds,Mt.arrange(jt.x,jt.y,jt.width,jt.height)),jt=Dt.actualBounds,Mt.arrange(jt.x,jt.y,jt.width,jt.height),Jt=Dt.measuredBounds,Dt=Dt.naturalBounds,te=Mt.Ab,te.reset(),te.translate(jt.x+rt.x,jt.y+rt.y),te.translate(-Jt.x,-Jt.y),Mt.no(te,Dt.x,Dt.y,Dt.width,Dt.height),El(Mt,!1),Mt.wh.set(Mt.Ab),Mt.Kk=Mt.scale,Fa(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=gA.I(a);x!==null&&(this.na=x)}else a instanceof Lr?this.na=a:a&&(this.na=je.Position,y=a);this.na===null&&Zt("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=Ua,this.Tm=es,this.Uf=Mi,this.$g=null,this.$e="",this.jg=new ke(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Dn,this.jn=Pr,this.kn=Yi,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}we(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(Qo,"elements",a,null,b,null,tt)}}return a}return null},Pt=je.prototype,Pt.toString=function(){return"Panel("+this.type.name+")#"+Fn(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 La){var x=a.yd;a.yd=vg(a,"gojs-ts"),Nu(this,a),a.nh.pop(),a.yd=x}else Nu(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 Nu(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Qu(a,y,!0,x,!0),E!==null&&Qu(a,y,!1,E,!0),x!==null&&sc(a,y,!0,x),E!==null&&sc(a,y,!1,E),x!==null&&Qu(a,y,!0,x,!1),E!==null&&Qu(a,y,!1,E,!1)}function sc(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){mo(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 Qu(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=Uu(a,!0),at=Uu(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,mo(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 Uu(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 vh(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,Nu(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 Ea||b instanceof je||b instanceof Wr||z!==Ke)&&b.v(!0)}}}},Pt.Uj=function(){if(!tl(this)){Yo(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)){El(this,!0),Fa(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Pt.Wu=function(){Fa(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),Rr(b,a,ot),Rr(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=Ke),a){case Ke:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Ve: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 hi: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(_o(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)&&(oi(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 dA(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 ac(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),ta(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:oi(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),_o(-(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()?oi(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()?oi(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=_o(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:oi(Ot.allocAt(a.x,a.y),this.transform);if(b=_o(0,0,b.width,b.height,tt.x,tt.y),ac(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()?oi(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=Ii.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Ii.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=Ii.alloc(),pt.set(tt),(At!==null?At.Cf(a,y,x,E,b,pt):As(ft,a,E,pt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Ii.free(pt))}}return z===void 0&&Ii.free(tt),E}return z===void 0&&Ii.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:oi(Ot.allocAt(a.x,a.y),this.transform),at=rt?y:oi(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||Ai(ot.x,ot.y,0,0,0,tt.height)<=At||Ai(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=At||Ai(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=At||Ai(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,oi(ot.set(a),Mt),oi(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===es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ir),y}function Im(a){var y=null;return a instanceof Oi&&(y=a.spot2,y===es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ia),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&&Zt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Zt("Cannot make a Panel contain itself: "+this.toString()),Zt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Zt("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||Zt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==je.Graduated||y instanceof Oi||y instanceof Wr||Zt("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 Tn),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 Zt("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($o,"elements",this,y,null,E,null),x.cb(Qo,"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),Yo(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($o,"elements",this,E,null,a,null))},Pt.Fb=function(a){0>a&&fn(a,">= 0",je,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new is;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Qo,"rowdefs",this,null,x,null,a)}return y[a]},Pt.oA=function(a){if(0>a&&fn(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($o,"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 is?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&&fn(a,">= 0",je,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new is;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Qo,"coldefs",this,null,x,null,a)}return y[a]},Pt.jA=function(a){if(0>a&&fn(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($o,"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 is?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 is(y)),this},Pt.By=function(a,y){return(a=this.Eb(a))&&o0(a,new is(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&&Zt("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(Tu(At,!1),ft=ft.iterator;ft.next();){var pt=ft.value;pt.mode===Lp&&Tu(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){Tu(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):Rn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof is?(tt=Fn(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof re?(tt=Fn(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):Zt("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&&ac(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 Tn),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=jo(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Zt("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,Rn('No item template Panel found for category "'+y+'" on '+a),Rn(" Using default item template."),a=new je,y=new Wr,y.bind(new Xo("text","",Ki)),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 nu(a,y){y.name=a,gA.add(a,y)}de.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&&fn(a,">= 0",je,"padding"),a=new Vi(a)):(0>a.left&&fn(a.left,">= 0",je,"padding:value.left"),0>a.right&&fn(a.right,">= 0",je,"padding:value.right"),0>a.top&&fn(a.top,">= 0",je,"padding:value.top"),0>a.bottom&&fn(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:Ua},set:function(a){typeof a=="number"&&(a=new Vi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new zl),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 Fr)&&(a instanceof Fr&&a.freeze(),this.T===null&&(this.T=new zl),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 zl),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)||Zt("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 zl),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 Fr)&&(a instanceof Fr&&a.freeze(),this.T===null&&(this.T=new zl),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 zl),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)||Zt("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 zl),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 zl),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||Zt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&hA(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()||Zt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&hA(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 yh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ks(this)&&(a=this.part,a!==null&&qr(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 yh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ks(this)&&(a=this.part,a!==null&&qr(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 yh),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 yh),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 yh,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 yh,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 yh,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 yh,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 zl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new zl),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 zl),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 zl),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)&&Zt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new zl),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)&&Zt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new zl),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 mr);Yl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof nn?(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 tc),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 Tn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ii||a.isPanelMain)&&Zt("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))}}}),de.Object.defineProperties(je,{Position:{get:function(){return gA.I("Position")}},Horizontal:{get:function(){return gA.I("Horizontal")}},Vertical:{get:function(){return gA.I("Vertical")}},Spot:{get:function(){return gA.I("Spot")}},Auto:{get:function(){return gA.I("Auto")}},Table:{get:function(){return gA.I("Table")}},Viewbox:{get:function(){return gA.I("Viewbox")}},TableRow:{get:function(){return gA.I("TableRow")}},TableColumn:{get:function(){return gA.I("TableColumn")}},Link:{get:function(){return gA.I("Link")}},Grid:{get:function(){return gA.I("Grid")}},Graduated:{get:function(){return gA.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,gA=new Tn;je.className="Panel",je.definePanelLayout=nu,nu("Position",new xo),nu("Vertical",new dr),nu("Auto",new no),nu("Link",new pl);function yh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}yh.prototype.copy=function(){var a=new yh;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},yh.className="GradPanelSettings";function zl(){this.Pc=[],this.Oc=[],this.j=this.ob=a0,this.hb=this.Hb=0,this.Qp=Ua,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}zl.prototype.copy=function(a){for(var y=new zl,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},zl.className="TablePanelSettings";function is(a){Je(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=es,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))}is.prototype.copy=function(){var a=new is;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=Xn(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=Xn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Pt=is.prototype,Pt.qb=function(a){a.classType===is&&(this.sizing=a)},Pt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Fn(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(uo,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 Xo(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fy(y)&&Zt("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},de.Object.defineProperties(is.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&&fn(a,">= 0",is,"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&&fn(a,">= 0",is,"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))&&fn(a,">= 0",is,"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&&fn(a,">= 0",is,"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 Vi(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 Fr&&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)||Zt("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 Fr&&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}}}),is.prototype.computeEffectiveSpacing=is.prototype.Wc,is.prototype.computeEffectiveSpacingTop=is.prototype.Io;var Om=new Re(is,"Default",0),sp=new Re(is,"None",1),a0=new Re(is,"ProportionalExtra",2);is.className="RowColumnDefinition",is.Default=Om,is.None=sp,is.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)}we(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=Xn(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===Ke||a===Dn||a===Zi||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)+")#"+Fn(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=ni(),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 jt=0;.1<=Mt;){if(jt===0&&(At?(b=x,b-=at,Mt-=at,At=!1):b=x,b===0&&(b=1)),b>Mt){En(Gt);return}b>Bt?(jt=b-Bt,b=Bt):jt=0;var Jt=Math.sqrt(b*b/(1+pt*pt));if(0>ft&&(Jt=-Jt),rt+=Jt,ot+=pt*Jt,a.translate(rt,ot),a.rotate(xt),a.translate(-(tt/2),-(z/2)),jt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-xt),a.translate(-rt,-ot),Mt-=b,Bt-=b,jt!==0){if(Dt++,Dt===Gt.length){En(Gt);return}Bt=Gt[Dt],ft=Bt[0],xt=Bt[1],pt=Bt[2],Bt=Bt[3],b=jt}}En(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&&mo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===je.Link&&rt instanceof mr&&rt.category==="Selection"&&rt.adornedObject instanceof Oi&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(mo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===en.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===en.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&&fA(a),a.jk(),rt&&z&&qA(a)),a.Se()}else if(b.type===en.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&&fA(a),a.jk(),rt&&z&&qA(a)),a.Se();else if(b.type===en.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 ns:a.moveTo(Mt.endX,Mt.endY);break;case zr:a.lineTo(Mt.endX,Mt.endY);break;case Ms: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 Ho: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=Ca(Mt,at),Gt=xt.length,Gt===0)a.lineTo(Mt.centerX,Mt.centerY);else for(var Dt=0;Dt<Gt;Dt++){var jt=xt[Dt];Dt===0&&a.lineTo(jt[0],jt[1]),a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7])}break;case hl:if(Dt=Gt=0,xt!==null&&xt.type===Ho){if(xt=Ca(xt,at),jt=xt.length,jt===0){a.lineTo(Mt.endX,Mt.endY);break}xt=xt[jt-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=ul(Mt,at,Gt,Dt),Gt=xt.length,Gt===0){a.lineTo(Mt.endX,Mt.endY);break}for(Dt=0;Dt<Gt;Dt++)jt=xt[Dt],a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7]);break;default:Zt("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&&fA(a),a.jk(),At&&rt&&qA(a))):(fA(a),At&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk(),qA(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=ni(),z.type===en.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===en.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 ns: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 zr:E.push(Bt.endX),E.push(Bt.endY),tt=Bt.endX,b=Bt.endY;break;case Ms: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 Ho:if(Mt=Ca(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 hl:if(Mt=ul(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:Zt("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===en.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===en.F){if(b=new ss,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new gr(Ho),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=Ca(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)}En(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 mn){a.Mc()&&Zt("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 ke);var y=this.naturalBounds,x=this.oe;y=ke.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),Ao(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Ao(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Ao(a,E.x,E.y,0,0),ke.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!==en.j||y||(b+=2);var z=ke.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return ke.free(z),!1;if(E=b+1e-4,x.type===en.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:(ke.free(z),oe.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===en.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 ke.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),ke.free(z),a}if(x.type===en.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 ke.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),ke.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===en.o)return ke.free(z),this.fill===null?$u(x,a.x,a.y,b):Ts(x,a,b,1<this.strokeWidth,y);Zt("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):Zt("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,at=tt.width;var At=tt.height;switch(ma(this,!0)){case Ke:E=x=0;break;case Ve: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 hi: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 Ke:break;case Ve:rt=at,ot=At;break;case Dn:x=Math.min(at/rt,At/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:Zt(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?Ve:y:y===Mi?Rm[a.figure].defaultStretch:y}Pt.eh=function(a,y,x,E){$s(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===en.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=ni(),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 En(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);En(y)}else if(at.type===en.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===en.F){y=ke.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}ke.free(y)}else if(at.type===en.o){pt=Ot.alloc();var Bt=rt-z,Mt=ot-tt,Gt=Bt*Bt+Mt*Mt,Dt=z,jt=tt;if(0<Gt&&xt.contains(Dt,jt)&&(pt.x=Dt,pt.y=jt,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,jt-=Mt;xt.contains(Dt,jt);)Dt-=Bt,jt-=Mt;for(b.x=rt,b.y=ot,Mt=0;Mt<at.figures.count;Mt++){var Jt=at.figures.s[Mt],te=Jt.isFilled?Dt:z,ie=Jt.isFilled?jt:tt,ve=Jt.segments;xt=Jt.startX,Bt=Jt.startY;for(var An=xt,In=Bt,Cn=0;Cn<ve.count;Cn++){var $e=ve.s[Cn],ze=$e.type,bi=$e.endX,Ci=$e.endY,yr=!1;switch(ze){case ns:An=bi,In=Ci;break;case zr:yr=A0(xt,Bt,bi,Ci,te,ie,rt,ot,pt);break;case Ms:yr=oe.Eo(xt,Bt,$e.point1X,$e.point1Y,$e.point2X,$e.point2Y,bi,Ci,te,ie,rt,ot,.6,pt);break;case Oa:yr=oe.Eo(xt,Bt,xt+2/3*($e.point1X-xt),Bt+2/3*($e.point1Y-Bt),bi+2/3*($e.point1X-bi),Ci+2/3*($e.point1Y-Ci),bi,Ci,te,ie,rt,ot,.6,pt);break;case Ho:case hl:ze=$e.type===Ho?Ca($e,Jt):ul($e,Jt,xt,Bt);var Kr=ze.length;if(Kr===0){yr=A0(xt,Bt,$e.type===Ho?$e.centerX:$e.endX,$e.type===Ho?$e.centerY:$e.endY,te,ie,rt,ot,pt);break}for(Ci=null,bi=0;bi<Kr;bi++){if(Ci=ze[bi],bi===0&&A0(xt,Bt,Ci[0],Ci[1],te,ie,rt,ot,pt)){var ys=l0(te,ie,pt,Gt,b);ys<Gt&&(Gt=ys,At=!0)}oe.Eo(Ci[0],Ci[1],Ci[2],Ci[3],Ci[4],Ci[5],Ci[6],Ci[7],te,ie,rt,ot,.6,pt)&&(ys=l0(te,ie,pt,Gt,b),ys<Gt&&(Gt=ys,At=!0))}bi=Ci[6],Ci=Ci[7];break;default:Zt("Unknown Segment type: "+ze)}xt=bi,Bt=Ci,yr&&(yr=l0(te,ie,pt,Gt,b),yr<Gt&&(Gt=yr,At=!0)),$e.isClosed&&(bi=An,Ci=In,A0(xt,Bt,bi,Ci,te,ie,rt,ot,pt)&&($e=l0(te,ie,pt,Gt,b),$e<Gt&&(Gt=$e,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 Zt("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=Ii.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),Ii.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 jt=Gt.length,Jt=0;Jt<jt;Jt+=2)if(Dt.zd(Gt[Jt],Gt[Jt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width;if(tt=tt.y+tt.height,Cr(a.x,a.y,rt,ot)<=b&&Cr(a.x,a.y,at,ot)<=b&&Cr(a.x,a.y,rt,tt)<=b&&Cr(a.x,a.y,at,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,at=y.endX,tt=y.endY,y.type===en.j){if(x=(rt-at)*(a.x-at)+(ot-tt)*(a.y-tt),Ai(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===en.u)return y=!1,x&&(y=Ai(a.x,a.y,rt,ot,rt,tt)<=b||Ai(a.x,a.y,rt,ot,at,ot)<=b||Ai(a.x,a.y,at,ot,at,tt)<=b||Ai(a.x,a.y,rt,tt,at,tt)<=b),y;if(y.type===en.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 Ai(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!(Cr(y,z,-At,0)>=b||Cr(y,z,0,-ft)>=b||Cr(y,z,0,ft)>=b||Cr(y,z,At,0)>=b)}else if(y.type===en.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&&Ai(a.x,a.y,z,rt,z,at)>b&&Ai(a.x,a.y,z,rt,ot,rt)>b&&Ai(a.x,a.y,ot,at,z,at)>b&&Ai(a.x,a.y,ot,at,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?$u(y,a.x,a.y,z):Ts(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 ns:case zr:if(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b)return!1;break;case Ms:var pt=ni();if(oe.Qe(tt,At,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),En(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case Oa:if(pt=ni(),oe.ep(tt,At,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),En(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case Ho:case hl:pt=ft.type===Ho?Ca(ft,z):ul(ft,z,tt,At);var xt=pt.length;if(xt===0){if(tt=ft.type===Ho?ft.centerX:ft.endX,At=ft.type===Ho?ft.centerY:ft.endY,a.zd(tt,At)>b)return!1;break}ft=null;for(var Bt=ni(),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 En(Bt),!1;En(Bt),ft!==null&&(tt=ft[6],At=ft[7]);break;default:Zt("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=qo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new mn(1-qo.x,qo.y)))}Oi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Du[a.toArrow];else a.fromArrow!=="None"?E=Du[a.fromArrow]:(E=oe.Ze[a.figure],typeof E=="string"&&(E=oe.Ze[E]),E===void 0&&Zt("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=Du[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Du[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=en.parse(oe.um[E],!1),Du[E]=a,x!==E&&(Du[x]=E),E}}return typeof y=="string"?y:y instanceof en?a:null}de.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),ks(this)&&(a=this.part,a!==null&&qr(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=en.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 Fr&&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 Fr&&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 fn(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"?fn(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"?fn(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)||Zt("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()])||Zt("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?Zt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new mh),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?Zt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new mh),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:es},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:es},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 Ou),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&hA(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 Ou),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 Ou),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 Ou),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 Du=new gi,Rm=new gi;Oi.className="Shape",Oi.getFigureGenerators=function(){var a=new Tn,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 Tn;for(E in oe.um)if(Du[E]===void 0){var y=en.parse(oe.um[E],!1);Du[E]=y,y=E.toLowerCase(),y!==E&&(Du[y]=E)}for(var x in Du)if(x!==x.toLowerCase()){var E=Du[x];E instanceof en&&a.add(x,E)}return a.freeze(),a},Oi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=en.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Zt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Du;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=es}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 Wr(a,y){return re.call(this),d0||(Ka=wo?new Ml(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}we(Wr,re),Wr.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 iu(a){a.da===null?a.da=new Ym:a.da.nc&&(a.da=a.da.copy())}Pt=Wr.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===Wr?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;mo(this,a,this.xc,!0,!1,x,E),(ot||at)&&mo(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 La&&(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 kr: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 kr: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 La&&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 La&&y.ad.classList.add("gojs-td"))}},Pt.kk=function(a,y,x){if(!re.prototype.kk.call(this,a,y,x))return!1;if(mo(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)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,pA(rt)),rt=at+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=pA(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);pA(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=up,y=pA(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),Rr(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){$s(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=pA(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=pA(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=pA(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);pA(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=up;var At=pA(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);pA(y)>x;){var ft=1;for(at=pA(y.substr(0,ft)),At=0;at<=x;)ft++,At=at,at=pA(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=pA(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=pA(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=pA(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 pA(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=rn.alloc();zm(a,z,y,ot),b+=ot.height,rn.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}de.Object.defineProperties(Wr.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"||(iu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Ke},set:function(a){var y=this.flip;y!==a&&(iu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ba},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),iu(this),this.da.Yr=a,ts(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=rn.alloc();zm(this,this.ec,999999,a);var y=a.width;rn.free(a),a=Sy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Rr(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&&(iu(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&&(iu(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 Fr&&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&&(iu(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&&(iu(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 Ou),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 Ou),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 Ou),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 Ou),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 Ou),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&&(iu(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&&(iu(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&&(iu(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&&(iu(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&&(iu(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&&fn(a,"> 0",Wr,"maxLines"),iu(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 Re(Wr,"None",0),xy=new Re(Wr,"WrapFit",1),jm=new Re(Wr,"WrapDesiredSize",2),By=new Re(Wr,"WrapBreakAll",3),Vm=new Re(Wr,"OverflowClip",0),c0=new Re(Wr,"OverflowEllipsis",1),Ap=new Re(Wr,"FormatTrim",0),Cy=new Re(Wr,"FormatNone",0),y1=/[ \u200b\u00ad]/,_m=new gi,Py=0,f0=new gi,Wm=0,up="...",Fy="",Ka=null,d0=!1;Wr.className="TextBlock";function Ym(){this.nc=!1,this.Hd=null,this.Xf=Ke,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=Ba,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},Wr.getEllipsis=function(){return up},Wr.setEllipsis=function(a){up=a,f0=new gi,Wm=0},Wr.getBaseline=function(){return u0},Wr.setBaseline=function(a){u0=a},Wr.getUnderline=function(){return h0},Wr.setUnderline=function(a){h0=a},Wr.isValidFont=function(a){if(d0||(Ka=wo?new Ml(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},Wr.FormatNone=Cy,Wr.FormatTrim=Ap,Wr.None=Km,Wr.OverflowClip=Vm,Wr.OverflowEllipsis=c0,Wr.WrapBreakAll=By,Wr.WrapDesiredSize=jm,Wr.WrapFit=xy;function Ou(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Ou.prototype.copy=function(){var a=new Ou;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Ou.className="GradElementSettings";function ja(a,y){re.call(this),this.Eg=null,this.qo="",this.Xg=Ql,this.Nk=Ve,this.Zg=this.Hd=null,this.Mk=sr,this.Xf=Ke,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;we(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===Ke||a===Dn||a===Zi?this.imageStretch=a:re.prototype.qb.call(this,a)},ja.prototype.toString=function(){return"Picture("+this.source+")#"+Fn(this)};function xg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],g0--):(Sg=new gi,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()||(Yo(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=ni();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);En(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 oc)){var b=a instanceof La;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 Ke: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 Ve:ft=E.width,pt=E.height;break;case Dn:case Zi:xt===Dn?(xt=Math.min(E.height/pt,E.width/ft),ft*=xt,pt*=xt):xt===Zi&&(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 jt=w1;if(!b){if(x.sq&&Dt!==void 0&&4<Mt&&Gt>jt*jt)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 Ml(null).context;try{b.drawImage(this.Eg,0,0)}catch(Jt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Jt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?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 kr: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 La&&(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(Jt){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 La&&(this.bt=[z,tt,ot,rt,b,Bt,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Jt){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 kr: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===Ve||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===Ve||z===hi?(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)),Rr(this.dc,a,y),this.Ge(0,0,a,y)},ja.prototype.eh=function(a,y,x,E){$s(this,a,y,x,E)},de.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||Zt("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 Ae),E!==null&&x&&fh(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()||(Yo(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(wo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<g0&&(xg(),x=Sg),E=cn("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 gi,ja.clearCache=xg;function Ey(){this.gi=null}function My(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Ml(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 en,this.mc=null}Bg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new en,this.mc=null};function Cg(a,y,x,E,b,z){a.mc=new ss,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 gr(ns);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 gr(zr);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function lc(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new gr(Ms);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 gr(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 gr(Ho);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 gr(hl,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 ua(a,y){var x=a.toLowerCase(),E=oe.Ze;E[a]=y,E[x]=a}ua("Rectangle",function(a,y,x){a="r"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new en(en.u),E.endX=y,E.endY=x,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ua("Square",function(a,y,x){a="s"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new en(en.u),E.endX=y,E.endY=x,E.defaultStretch=Dn,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ua("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 en().add(new ss(a,0,!0).add(new gr(zr,y-a,0)).add(new gr(Ms,y,a,y-z,0,y,z)).add(new gr(zr,y,x-a)).add(new gr(Ms,y-a,x,y,x-z,y-z,x)).add(new gr(zr,a,x)).add(new gr(Ms,0,x-a,z,x,0,x-z)).add(new gr(zr,0,a)).add(new gr(Ms,a,0,0,z,z,0).close())),1<z&&(b.spot1=new mn(0,0,z,z),b.spot2=new mn(1,1,-z,-z)),oe.Nf<oe.vm&&(oe.Mf[E]=b,oe.Nf++),b}),ua("Border","RoundedRectangle"),ua("Ellipse",function(a,y,x){a="e"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new en(en.F),E.endX=y,E.endY=x,E.spot1=Po,E.spot2=Zr,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ua("Circle",function(a,y,x){a="c"+y+","+x;var E=oe.Mf[a];return E!==void 0||(E=new en(en.F),E.endX=y,E.endY=x,E.spot1=Po,E.spot2=Zr,E.defaultStretch=Dn,oe.Nf<oe.vm&&(oe.Mf[a]=E,oe.Nf++)),E}),ua("TriangleRight",function(a,y,x){return new en().add(new ss(0,0).add(new gr(zr,y,.5*x)).add(new gr(zr,0,x).close())).pm(0,.25,.5,.75)}),ua("TriangleDown",function(a,y,x){return new en().add(new ss(0,0).add(new gr(zr,y,0)).add(new gr(zr,.5*y,x).close())).pm(.25,0,.75,.5)}),ua("TriangleLeft",function(a,y,x){return new en().add(new ss(y,x).add(new gr(zr,0,.5*x)).add(new gr(zr,y,0).close())).pm(.5,.25,1,.75)}),ua("TriangleUp",function(a,y,x){return new en().add(new ss(y,x).add(new gr(zr,0,x)).add(new gr(zr,.5*y,0).close())).pm(.25,.5,.75,1)}),ua("Triangle","TriangleUp"),ua("Diamond",function(a,y,x){return new en().add(new ss(.5*y,0).add(new gr(zr,0,.5*x)).add(new gr(zr,.5*y,x)).add(new gr(zr,y,.5*x).close())).pm(.25,.25,.75,.75)}),ua("LineH",function(a,y,x){return a=new en(en.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ua("LineV",function(a,y,x){return a=new en(en.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ua("None","Rectangle"),ua("BarH","Rectangle"),ua("BarV","Rectangle"),ua("MinusLine","LineH"),ua("PlusLine",function(a,y,x){return new en().add(new ss(0,x/2,!1).add(new gr(zr,y,x/2)).add(new gr(ns,y/2,0)).add(new gr(zr,y/2,x)))}),ua("XLine",function(a,y,x){return new en().add(new ss(0,x,!1).add(new gr(zr,y,0)).add(new gr(ns,0,0)).add(new gr(zr,y,x)))}),ua("LineRight",function(a,y,x){return new en().add(new ss(.25*y,0,!1).add(new gr(zr,.75*y,.5*x)).add(new gr(zr,.25*y,x)))}),ua("LineDown",function(a,y,x){return new en().add(new ss(0,.25*x,!1).add(new gr(zr,.5*y,.75*x)).add(new gr(zr,y,.25*x)))}),ua("LineLeft",function(a,y,x){return new en().add(new ss(.75*y,0,!1).add(new gr(zr,.25*y,.5*x)).add(new gr(zr,.75*y,x)))}),ua("LineUp",function(a,y,x){return new en().add(new ss(0,.75*x,!1).add(new gr(zr,.5*y,.25*x)).add(new gr(zr,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=Xr,this.ir=null,this.jr="",this.lr=es,this.Gq="",this.Hq=Ir,this.Pq=ki,this.Kq=Ui,this.Up=null,this.Cq=127,this.zr=ji,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 Lr||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 ke,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}we(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=Jn(this.constructor)+"#"+Fn(this);return this.data!==null&&(a+="("+Ki(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===Qo&&y==="elements"?b instanceof je?dA(b,function(ot){xv(rt.partManager,ot),YA(rt,ot)}):fh(rt,b):a===$o&&y==="elements"&&(b instanceof je?dA(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&&dA(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 Tn),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=ni();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);En(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 mr))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(Xc(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,Xc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Qy(a,y,x),x=a.Ib;var E=ke.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),ke.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 Ii);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=sr;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 Tn),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 Ac(a,y,x,E){E===void 0&&(E=new Ot),x=x.Mc()?sr: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 ke),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(ta(this)===!1)Ty(this);else{bA(this,!1);var a=this.Ib,y=ke.alloc();y.assign(a);var x=Zc(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),ke.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=ke.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),ke.free(b)}!(this.G&65536)&&a.D(y)||Oy(this,E,x),x.N(),!a.w()&&!y.w()||xa(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())),Xc(this)===!1&&ta(this)===!1&&(v0(this),Ty(this)),!0};function Ny(a,y,x,E,b){y===null||a instanceof mr||(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;Xc(this)||ta(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 mr||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&&cA(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?Zc(a)?(Wa(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,Rn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Rn(" Old class: "+Jn(a.constructor)+", new class: "+Jn(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 Xc(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 Zc(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&&!ta(this)&&!Xc(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&&ts(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 Jc(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof mr)){if(a.add(y),y instanceof gn){if(x&&y instanceof Ti)for(var tt=y.memberParts;tt.next();)Jc(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)&&Jc(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)Jc(a,y.value,x,E-1,b,z)}else if(y instanceof nn)for(y=y.labelNodes;y.next();)Jc(a,y.value,x,E,b,z)}}de.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?Xi: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($o,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Qo,"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 mr?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:ki},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:Ui},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:Ir},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,ta(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 mr)){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 mr?this instanceof mr&&(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 nn||(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 nn?(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:Xr},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:es},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&&Zt("Cannot make a Group a member of itself: "+this.toString()),Zt("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 Ae,Jc(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 Zt("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:ji},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 mr(a,y){a===void 0||a instanceof Lr||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)}we(mr,ii),mr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},mr.prototype.updateRelationshipsFromData=function(){},mr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof nn&&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)}}},mr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ta(a))},mr.prototype.Zc=function(){return!1},mr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Qo&&y==="elements"){if(b instanceof Ea)this.$a===null&&(this.$a=b);else if(b instanceof je){var rt=b.Nl(function(ot){return ot instanceof Ea});rt instanceof Ea&&this.$a===null&&(this.$a=rt)}}else a===$o&&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)},mr.prototype.updateAdornments=function(){},mr.prototype.Lj=function(){},de.Object.defineProperties(mr.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}}}),mr.className="Adornment";function nv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Qr,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 Lr||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)}we(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 uc(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 Ae),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===Qo&&y==="elements"?this.wc=null:a===$o&&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)||(ml(x.fromPort),ml(x.toPort),x.bb())}};function jy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ml(x.fromPort),ml(x.toPort),x.bb())}}function ml(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ml(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=bu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===bu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Wo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===ZA&&(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 Ae,y=new Ae;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 qt(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 qt(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 qt(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 Ae,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 Ae,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new nr(x):Xi},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 Ae,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new nr(x):Xi},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 Ae,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new nr(x):Xi},Pt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new qt(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 qt(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){ml(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){ml(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 Tn: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=ni()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);En(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 Ae;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 qt(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 nr(x):Xi},Pt.wz=function(a){a===void 0&&(a=1/0);var y=new Ae;return Jc(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 Ae;x.add(this),Xy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===bu),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 Ae;x.add(this),Jy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===bu),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}de.Object.defineProperties(gn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:x0},set:function(a){var y=this.portSpreading;y!==a&&(uc(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&&cA(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Qr},set:function(a){typeof a=="number"&&(a=new Vi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),uc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&cA(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&&(uc(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&&(uc(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&&(uc(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),ts(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&&(uc(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 Re(gn,"SpreadingNone",10),x0=new Re(gn,"SpreadingEvenly",11),rv=new Re(gn,"SpreadingPacked",12);gn.className="Node",gn.SpreadingNone=C1,gn.SpreadingEvenly=x0,gn.SpreadingPacked=rv;function Ti(a,y){a===void 0||a instanceof Lr||typeof a=="string"?gn.call(this,a):(gn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Ae,this.$a=null,this.Sc=new co,this.Sc.group=this,this.gl=new Ae,this.tb=this.$p=null,y&&Object.assign(this,y)}we(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 Ea});y instanceof Ea?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 nn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Pt.gk=function(a,y,x,E,b,z,tt){if(a===Qo&&y==="elements"){if(b instanceof Ea)this.$a===null?this.$a=b:this.$a!==b&&Zt("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 Ea});rt instanceof Ea&&(this.$a===null?this.$a=rt:this.$a!==rt&&Zt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===$o&&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 ke),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 nn||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()&&ta(y))return!1}else if(y instanceof nn&&y.isVisible()&&ta(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 nn&&!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 nn&&!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=Ie(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=Ie(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()?(ml(x.fromPort),ml(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(ml(x.fromPort),ml(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 Ae,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 Ae,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 Ae;return a(this,y),y},Pt.Rj=function(){var a=new Ae;return Jc(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 nn)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 nn)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 Ae,y=this.Rj().iterator;y.next();)b=y.value,b instanceof nn&&(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 nn&&(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)}},de.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&&Zt("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&&(uc(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&&(uc(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&&(uc(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&&(uc(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 Ea(a){re.call(this),this.yb=Ua,this.ko=new ke(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}we(Ea,re),Ea.prototype.cloneProtected=function(a){re.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ea.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return _o(0,0,y.width,y.height,a.x,a.y)},Ea.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ti||a instanceof mr)||Zt("Placeholder is not inside a Group or Adornment."),a instanceof Ti){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Rr(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"?Ir:a.locationSpot,Ot.alloc()),a.location=rt,Ot.free(rt)),isNaN(at)||isNaN(tt)?(a=z.ga(Ir,Ot.alloc()),at=ke.allocAt(a.x,a.y,0,0),at.Ye(z.ga(ia,a)),at.Ye(z.ga(Da,a)),at.Ye(z.ga(ca,a)),Rr(y,at.width+E||0,at.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ot.free(a),ke.free(at)):(Rr(y,at+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ea.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ea.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=ke.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)),ke.free(x),E&&y instanceof Ti&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ea.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 nn&&(!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},de.Object.defineProperties(Ea.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Vi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ea.className="Placeholder";function nn(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=Ma,this.Om=0,this.Qm=Ma,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 ke,this.ua=new en,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)}we(nn,ii),nn.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=nn.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&&ml(y),a=a.toPort,a!==null&&ml(a)},Pt.qb=function(a){a.classType===nn?(a.value&2)===2?this.routing=a:a===bl||a===cc||a===Lg?this.curve=a:a===dp||a===E0||a===M0?this.adjusting=a:a!==hv&&a!==Ma&&Zt("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),ta(a)||Xc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ta(a)||Xc(a)))},Pt.zv=function(){return!1},Pt.Av=function(){},Pt.Zc=function(){return!1},nn.prototype.computeAngle=function(a,y,x){return nn.computeAngle(y,x)},nn.computeAngle=function(a,y){switch(a){default:case Ma: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=nn.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 Ae),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))},nn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},nn.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)),hc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},nn.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},nn.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},nn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Gi),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()===bl))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()===bl){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},nn.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()===bl))return this.ua.wx(.5);if(this.computeCurve()===bl&&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=nn.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 hc(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),ts(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&&oh(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&&oh(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()}}},nn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rd||(Rd=new gn,Rd.desiredSize=ui,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=ui,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===bl;this.Wf=at&&!At?ft=!0:!1;var pt=this.computeAdjusting()===Ma||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,jt=Bt;oe.B(ot,0)?jt=0<rt?jt-at:jt+at:(Dt=(0>ot?-1:1)*ft+xt,jt=At*(Dt-xt)+Bt),this.Fj(),this.ne(z),this.yf(Mt,Gt),this.yf(Dt,jt),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=ke.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))),ke.free(rt))}else{ft=this.isAvoiding,pt&&(At&&ft||at)&&this.Fj();var Jt=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>Jt&&(xt-=180)),0>xt?xt+=360:360<=xt&&(xt-=360),at&&(Gt+=Math.abs(Jt)*(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(sr,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=jt=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>Jt&&(te+=180)),0>te?te+=360:360<=te&&(te-=360),at&&(ie+=Math.abs(Jt)*(At?1:2)),te===0?Dt=ie:te===90?jt=ie:te===180?Dt=-ie:te===270?jt=-ie:(Dt=ie*Math.cos(te*Math.PI/180),jt=ie*Math.sin(te*Math.PI/180)),x.Mc()&&at&&(x=b.ga(sr,Ot.alloc()),tt=Ot.allocAt(x.x+1e3*Dt,x.y+1e3*jt),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+jt)),!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}nn.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)}nn.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 ke(y.ga(Ir,ot),y.ga(ia,at)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,at),(x.Hf(Vs)||x.Hf(Es))&&a.y>=At.y&&a.y<=At.y+At.height?rt.y=a.y:(x.Hf(Ya)||x.Hf(Hs))&&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},nn.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(sr,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(sr,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},nn.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)},nn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=sr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===es?ar:y)):(a=y||this.toPort,a===null?a=sr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===es?ar:y)),a};function Fg(a){return a===ar||a.x===.5&&a.y===.5}function P0(a){return a.x===.5&&a.y===.5?a:sr}nn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ma&&4<this.pointsCount?this.computeMidPoint(new Ot):(a=y.Zn,a=a!==null?lw(a,this):null,a!==null?a.Zo:y.ga(sr))},nn.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},nn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Ii.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Ii.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,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=Ii.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(),jt=Ot.alloc(),Jt=Ii.alloc();Jt.set(Bt),Jt.bv(At.transform),Jt.Vj(),Dt.x=pt,Dt.y=Mt,Dt.transform(Jt),Gt.x=rt,Gt.y=Mt,Gt.transform(Jt),Bt=!1,Wf(At,Gt,Dt,jt)?Bt=!0:(Gt.x=pt,Gt.y=xt,Gt.transform(Jt),Wf(At,Gt,Dt,jt)?Bt=!0:(Dt.x=rt,Dt.y=xt,Dt.transform(Jt),Wf(At,Gt,Dt,jt)?Bt=!0:(Gt.x=rt,Gt.y=Mt,Gt.transform(Jt),Wf(At,Gt,Dt,jt)&&(Bt=!0)))),Ii.free(Jt),Ot.free(Gt),Ot.free(Dt),Ot.free(jt),rt=Bt}}else rt=At.fh(rt,ft)}else rt=As(At,a,E,ft);rt&&(pt=At,y!==null&&(pt=y(At)),pt&&(x===null||x(pt))&&b.add(pt)),Ii.free(ft)}}}return z===void 0&&Ii.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Ii.free(tt),!1},nn.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?bl:this.curve},nn.prototype.computeCorner=function(){if(this.curve===bl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},nn.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},nn.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(sr).ab(x.ga(sr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===bl&&(a*=1.333)}}return a},nn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ma&&x.bb()}},nn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iw;var y=this.Sf;if(y!==null){for(var x=ni(),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),En(x)}}return a},nn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},nn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},nn.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 jt=b+Dt*(tt-b),Jt=z+Dt*(ft-z);y=Math.sqrt((Mt-jt)*(Mt-jt)+(Gt-Jt)*(Gt-Jt)),Gt<Bt*(Mt-jt)+Jt&&(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}},nn.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=_c(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=Hu(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=Hu(xt,ft.x,ft.y)),!xt.abort&&ot<Mg&&Hu(xt,ft.x,ft.y)!==fc?(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)}},nn.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=_c(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=Hu(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&&Hu(y,At,ft)!==at-1&&(Hu(y,x-rt,E)===at-1?(b=180,At=x-rt,ft=E):Hu(y,x+rt,E)===at-1?(b=0,At=x+rt,ft=E):Hu(y,x,E-ot)===at-1?(b=270,At=x,ft=E-ot):Hu(y,x,E+ot)===at-1&&(b=90,At=x,ft=E+ot));at>Zf&&Hu(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),Hu(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),Hu(y,tt,At)===at-1&&Av(a,y,tt,At,z,!1,z))),a.yf(x,E)}nn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Ai(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=Ai(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},nn.prototype.qc=function(){this.lk=!1,this.v()},nn.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)}}},nn.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===bl&&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=en.o,rt=by(a),this.computeShortLength(!0)!==0&&(b=Od(this,b,!0,z)),Cg(rt,b.x,b.y,!1),tt===bl&&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)),lc(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 jt=Bt.x;Bt=Bt.y;var Jt=Mt*F0(Gt,pt,Dt,xt);Mt*=F0(Dt,xt,jt,Bt),oe.$(pt,xt)&&oe.$(Dt,jt)&&(Dt>Gt?Bt>xt?(z.x=Dt-Jt,z.y=xt-Jt,b.x=Dt+Mt,b.y=xt+Mt):(z.x=Dt-Jt,z.y=xt+Jt,b.x=Dt+Mt,b.y=xt-Mt):Bt>xt?(z.x=Dt+Jt,z.y=xt-Jt,b.x=Dt-Mt,b.y=xt+Mt):(z.x=Dt+Jt,z.y=xt+Jt,b.x=Dt-Mt,b.y=xt-Mt)),oe.$(Gt,Dt)&&oe.$(xt,Bt)&&(xt>pt?(jt>Dt?(z.x=Dt-Jt,z.y=xt-Jt,b.x=Dt+Mt):(z.x=Dt+Jt,z.y=xt-Jt,b.x=Dt-Mt),b.y=xt+Mt):(jt>Dt?(z.x=Dt-Jt,z.y=xt+Jt,b.x=Dt+Mt):(z.x=Dt+Jt,z.y=xt+Jt,b.x=Dt-Mt),b.y=xt-Mt)),(oe.$(Gt,Dt)&&oe.$(Dt,jt)||oe.$(pt,xt)&&oe.$(xt,Bt))&&(Gt=.5*(Gt+jt),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)),lc(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,Yi)),at=.5*(at+At.x),tt=.5*(tt+At.y),lc(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,Yi)),lc(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,Yi)),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=Jt=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,jt=ie,pt.x>z.x?te=pt.x-Bt:te=pt.x+Bt,Dt.y>pt.y?jt=pt.y+Jt:jt=pt.y-Jt,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,jt+Gt),z.h(xt,jt)}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=Jt=Math.min(Bt,Math.abs(Dt.x-pt.x)/2),oe.B(Jt,0)?(Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt)):(te=pt.x,ie=pt.y,xt=te,jt=ie,pt.y>z.y?ie=pt.y-Bt:ie=pt.y+Bt,Dt.x>pt.x?xt=pt.x+Jt:xt=pt.x-Jt,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,jt+Gt),z.h(xt,jt))):(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=en.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}nn.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===cc?Cg(y,xt,Bt,!1):lc(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===cc?Cg(y,ft,xt,!1):lc(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===cc?Cg(y,Bt,ft,!1):lc(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===cc?Cg(y,xt,At,!1):lc(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 nn){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===cc}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()))}nn.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 nn&&(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 nn&&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())}}nn.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},nn.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},nn.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)},nn.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&&(yi(y.links,a),y.Sl()))}nn.prototype.ph=function(){return!0},de.Object.defineProperties(nn.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&&ml(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&ml(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&&ml(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&ml(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:es},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&&ml(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&&fn(a,">= 0",nn,"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:es},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&&ml(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&&fn(a,">= 0",nn,"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?Xi: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()===bl&&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(!He(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 Zt("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&&oh(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===cc||y===Lg||a===cc||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)}}}),nn.prototype.invalidateOtherJumpOvers=nn.prototype.Xo,nn.prototype.findClosestSegment=nn.prototype.ez,nn.prototype.updateRoute=nn.prototype.vg,nn.prototype.invalidateRoute=nn.prototype.bb,nn.prototype.rollbackRoute=nn.prototype.rv,nn.prototype.commitRoute=nn.prototype.zf,nn.prototype.startRoute=nn.prototype.uh,nn.prototype.clearPoints=nn.prototype.Fj,nn.prototype.removePoint=nn.prototype.pv,nn.prototype.addPointAt=nn.prototype.yf,nn.prototype.addPoint=nn.prototype.ne,nn.prototype.insertPointAt=nn.prototype.m,nn.prototype.insertPoint=nn.prototype.Kz,nn.prototype.setPointAt=nn.prototype.L,nn.prototype.setPoint=nn.prototype.dd,nn.prototype.getPoint=nn.prototype.i,nn.prototype.getOtherPort=nn.prototype.Cz,nn.prototype.getOtherNode=nn.prototype.To;var Rd=null,Gd=null,hv=new Re(nn,"Normal",1),L1=new Re(nn,"Orthogonal",2),E1=new Re(nn,"AvoidsNodes",6),nw=new Re(nn,"AvoidsNodesStraight",7),Ma=new Re(nn,"None",0),bl=new Re(nn,"Bezier",9),cc=new Re(nn,"JumpGap",10),Lg=new Re(nn,"JumpOver",11),dp=new Re(nn,"End",17),E0=new Re(nn,"Scale",18),M0=new Re(nn,"Stretch",19),gp=new Re(nn,"OrientAlong",21),pp=new Re(nn,"OrientPlus90",22),mp=new Re(nn,"OrientMinus90",23),cv=new Re(nn,"OrientOpposite",24),k0=new Re(nn,"OrientUpright",25),vp=new Re(nn,"OrientPlus90Upright",26),yp=new Re(nn,"OrientMinus90Upright",27),b0=new Re(nn,"OrientUpright45",28),iw=16,rw=14,wp=8;nn.className="Link",nn.Normal=hv,nn.Orthogonal=L1,nn.AvoidsNodes=E1,nn.AvoidsNodesStraight=nw,nn.None=Ma,nn.Bezier=bl,nn.JumpGap=cc,nn.JumpOver=Lg,nn.End=dp,nn.Scale=E0,nn.Stretch=M0,nn.OrientAlong=gp,nn.OrientPlus90=pp,nn.OrientMinus90=mp,nn.OrientOpposite=cv,nn.OrientUpright=k0,nn.OrientPlus90Upright=vp,nn.OrientMinus90Upright=yp,nn.OrientUpright45=b0,nn.EndSegmentStep=8,nn.CurvinessStart=iw,nn.SpacingMin=rw,nn.OrthoShortCut=wp;function T0(a,y,x,E){Je(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){Je(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 Hu(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]===fc)return!1}return!0};function Ru(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)Ru(a,y,x,1,!b,z,tt,rt,ot),Ru(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>at;x+=E)Ru(a,y,x,1,!b,z,tt,rt,ot),Ru(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<at;y+=E)Ru(a,y,x,1,!b,z,tt,rt,ot),Ru(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>at;y+=E)Ru(a,y,x,1,!b,z,tt,rt,ot),Ru(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=fc,At=Zf;for(a.ac[y][x]=At;at===fc&&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=fc,At=Mg;for(a.ac[y][x]=At;at===fc&&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]===fc?(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]===fc?(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=ni(),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 Ru(a,rt,ot,1,!1,z,y,ft,pt),Ru(a,rt,ot,-1,!1,z,y,ft,pt),Ru(a,rt,ot,1,!0,z,y,ft,pt),Ru(a,rt,ot,-1,!0,z,y,ft,pt);En(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++}}}de.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new ke(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 fc=0,Zf=1,Mg=999999,fv=Mg+1,dv=Mg+2;Sp.className="PositionArray";function zd(){Je(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(Ir,Ot.alloc()),ot=a.port.ga(ia,Ot.alloc());for(b=ke.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(Ir,rt),ft.ga(Da,ot),ft.ga(ia,tt),ft.ga(ca,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,jt=1,Jt=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,Jt=Dt.y-ie.y,Bt){case 8:pt>Math.abs(Mt)?(jt=Math.abs(Mt)/pt,pt=Math.abs(Mt)):jt=1;break;case 2:xt>Math.abs(Jt)?(jt=Math.abs(Jt)/xt,xt=Math.abs(Jt)):jt=1;break;case 1:ft>Math.abs(Mt)?(jt=Math.abs(Mt)/ft,ft=Math.abs(Mt)):jt=1;break;default:case 4:At>Math.abs(Jt)?(jt=Math.abs(Jt)/At,At=Math.abs(Jt)):jt=1}Dt=0}var ve=te.Zo;if(E===rv){switch(te=te.link.computeThickness(),te*=jt,ve.set(ie),Bt){case 8:ve.x=ie.x+Mt/2+pt/2-Dt-te/2;break;case 2:ve.y=ie.y+Jt/2+xt/2-Dt-te/2;break;case 1:ve.x=ie.x+Mt/2-ft/2+Dt+te/2;break;default:case 4:ve.y=ie.y+Jt/2-At/2+Dt+te/2}Dt+=te}else{var An=.5;E===x0&&(An=(te.Uo+1)/(te.Gl+1)),ve.x=ie.x+Mt*An,ve.y=ie.y+Jt*An}}}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,ke.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,ar,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 co(a){Je(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)}co.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},co.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},co.prototype.qb=function(){},co.prototype.toString=function(){var a=Jn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},co.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())}}},co.prototype.createNetwork=function(){return new Yr(this)},co.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof me?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ti?y.lg(a.memberParts):y.lg(a.iterator),y},co.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")}},co.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()}},co.prototype.doLayout=function(a){var y=new Ae;a instanceof me?(qc(this,y,a.nodes,!0,this.rh,!0,!1,!0),qc(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ti?qc(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},co.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++}},co.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 nn)&&(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++}}},co.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ti&&a.rh)};function qc(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?qc(a,y,ot.memberParts,!1,b,z,tt,rt):(xp(ot),y.add(ot))):tt&&ot instanceof nn?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()}co.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new ke),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},co.prototype.ex=function(a){var y=new Ae;return a instanceof me?(qc(this,y,a.nodes,!0,null,!0,!0,!0),qc(this,y,a.links,!0,null,!0,!0,!0),qc(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ti?qc(this,y,a.memberParts,!1,null,!0,!0,!0):qc(this,y,a.iterator,!1,null,!0,!0,!0),y},co.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(Ir),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},de.Object.defineProperties(co.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())}}}),co.prototype.collectParts=co.prototype.ex,co.prototype.getLayoutBounds=co.prototype.ni,co.prototype.invalidateLayout=co.prototype.C,co.className="Layout";function Yr(a){Je(this),this.Sc=a,this.wf=new Ae,this.ye=new Ae,this.Es=new Tn,this.zs=new Tn}Yr.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 Ae,this.ye=new Ae,this.Es=new Tn,this.zs=new Tn},Yr.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},Yr.prototype.createVertex=function(){return new cs(this)},Yr.prototype.createEdge=function(){return new vl(this)},Yr.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 nn){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 nn&&(!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))}}},Yr.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=Yr.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=ni(),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]);En(a)},Yr.prototype.deleteArtificialVertexes=function(){for(var a=ni(),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=ni(),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]);En(a),En(y)};function k1(a){for(var y=ni(),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]);En(y)}Yr.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))}}Yr.prototype.dz=function(){for(var a=new Ae,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},de.Object.defineProperties(Yr.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}}}),Yr.prototype.findAllParts=Yr.prototype.dz,Yr.prototype.splitIntoSubNetworks=Yr.prototype.Zx,Yr.prototype.deleteSelfEdges=Yr.prototype.Ko,Yr.prototype.reverseEdge=Yr.prototype.gm,Yr.prototype.linkVertexes=Yr.prototype.Zj,Yr.prototype.findEdge=Yr.prototype.Lo,Yr.prototype.deleteLink=Yr.prototype.Yy,Yr.prototype.deleteEdge=Yr.prototype.Mj,Yr.prototype.addLink=Yr.prototype.Dy,Yr.prototype.addEdge=Yr.prototype.Bo,Yr.prototype.findVertex=Yr.prototype.ki,Yr.prototype.deleteNode=Yr.prototype.Zy,Yr.prototype.deleteVertex=Yr.prototype.Iu,Yr.prototype.addNode=Yr.prototype.Bl,Yr.prototype.addVertex=Yr.prototype.dh,Yr.prototype.addParts=Yr.prototype.lg,Yr.className="LayoutNetwork";function cs(a){Je(this),this.ob=a,this.j=new ke(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}cs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Vt,this.mg=new Vt},cs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Fn(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},cs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;He(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=ke.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(sr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),ke.free(x);return}ke.free(x)}a.moveTo(y.x,y.y)}},cs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},cs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},cs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},cs.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}de.Object.defineProperties(cs.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=ke.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),ke.free(x),!(a instanceof Ti)&&(a=a.locationObject.ga(sr),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 Ae,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ae,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ae,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}}}),cs.prototype.deleteDestinationEdge=cs.prototype.Jl,cs.prototype.addDestinationEdge=cs.prototype.zl,cs.prototype.deleteSourceEdge=cs.prototype.Kl,cs.prototype.addSourceEdge=cs.prototype.Cl,cs.className="LayoutVertex",cs.standardComparer=yv,cs.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 vl(a){Je(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}vl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},vl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Fn(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},vl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},vl.prototype.commit=function(){},vl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},de.Object.defineProperties(vl.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)}}}),vl.prototype.getOtherVertex=vl.prototype.Ax,vl.className="LayoutEdge";function Ds(a){co.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new rn(NaN,NaN).freeze(),this.tf=new rn(10,10).freeze(),this.Jb=Bp,this.Rb=U0,this.nd=Cp,this.hd=uw,a&&Object.assign(this,a)}we(Ds,co),Ds.prototype.cloneProtected=function(a){co.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:Zt("Unknown enum value: "+a):co.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=ke.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,jt=0;jt<b.length;jt++){var Jt=b[jt],te=this.ni(Jt,at),ie=Math.ceil((te.width+rt)/At)*At,ve=Math.ceil((te.height+ot)/ft)*ft;switch(pt){case IA:var An=Math.abs(Bt-te.width);break;default:An=Bt+te.width}switch((0<z&&Gt>z-1||0<tt&&0<Gt&&An-xt>tt)&&(E.push(new ke(0,Mt,tt+rt,Dt)),Gt=0,Bt=xt,Mt+=Dt,Dt=0),Dt=Math.max(Dt,ve),pt){case IA:te=-te.width;break;default:te=0}switch(Jt.moveTo(Bt+te,Mt),pt){case IA:Bt-=ie;break;default:Bt+=ie}Gt++}E.push(new ke(0,Mt,tt+rt,Dt)),ke.free(at);break;case Bp:for(ot=tt,At=z,ft=y,pt=x,tt=ke.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=Ac(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 In=Dt=this.arrangementOrigin.x;for(jt=this.arrangementOrigin.y,Mt=0,ot>=at&&(ot-=at),at=Jt=0,ie=Math.max(this.cellSize.height,1),te=z=0,ve=!0,Gt=Ot.alloc(),An=0;An<b.length;An++){var Cn=b[An],$e=this.ni(Cn,tt),ze=Ac(Cn,Cn.locationObject,Cn.locationSpot,rt);if(0<Mt)switch(Bt){case IA:In=(In-Dt-($e.width-ze.x))/xt,In=oe.$(Math.round(In),In)?Math.round(In):Math.floor(In),In=In*xt+Dt;break;default:In=(In-Dt+ze.x)/xt,In=oe.$(Math.round(In),In)?Math.round(In):Math.ceil(In),In=In*xt+Dt}else switch(Bt){case IA:Jt=In+ze.x+$e.width;break;default:Jt=In-ze.x}switch(Bt){case IA:var bi=-(In+ze.x)+Jt;break;default:bi=In+$e.width-ze.x-Jt}if(0<At&&Mt>At-1||0<ot&&0<Mt&&bi>ot){for(E.push(new ke(0,ve?jt-z:jt,ot+ft,te+z+pt)),In=0;In<Mt&&An!==Mt;In++){bi=b[An-Mt+In];var Ci=Ac(bi,bi.locationObject,bi.locationSpot,Gt);bi.moveTo(bi.position.x,bi.position.y+z-Ci.y)}te+=pt,jt=ve?jt+te:jt+(te+z),Mt=te=z=0,In=Dt,ve=!1}switch(In===Dt&&(at=Bt===IA?Math.max(at,$e.width-ze.x):Math.min(at,-ze.x)),z=Math.max(z,ze.y),te=Math.max(te,$e.height-ze.y),isFinite(ie)&&(te=Math.max(te,Math.max($e.height,ie)-ze.y)),ve?Cn.moveTo(In-ze.x,jt-ze.y):Cn.moveTo(In-ze.x,jt),Bt){case IA:In-=ze.x+ft;break;default:In+=$e.width-ze.x+ft}Mt++}if(E.push(new ke(0,jt,ot+ft,(ve?te:te+z)+pt)),b.length!==Mt)for(ot=0;ot<Mt;ot++)At=b[b.length-Mt+ot],ft=Ac(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);ke.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}de.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 Re(Ds,"Position",0),Bp=new Re(Ds,"Location",1),U0=new Re(Ds,"LeftToRight",2),IA=new Re(Ds,"RightToLeft",3),wv=new Re(Ds,"Forward",4),D0=new Re(Ds,"Reverse",5),Cp=new Re(Ds,"Ascending",6),O0=new Re(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 br(){this.On=new Ae,this.Dn=new Ae,this.Pa=new Ae,this.cf=new Tn,this.bf=new Tn,this.aj=new Tn,this.H=null,this.tp=!1}Pt=br.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 nn?this.Dn.add(a):a instanceof mr||this.Pa.add(a);y=a.data,y===null||a instanceof mr||(a instanceof nn?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 nn?this.Dn.remove(a):a instanceof mr||this.Pa.remove(a);y=a.data,y===null||a instanceof mr||(a instanceof nn?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)&&Zt('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||Zt('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 nn||Zt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=ni(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=ni(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=ni(),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]);En(y),En(x),En(a)}},br.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},br.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&&Vc(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)}}br.prototype.insertLink=function(){return null},br.prototype.resolveReferencesForData=function(){},br.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,Rn('No Group template found for category "'+x+'"'),Rn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(dw||(dw=!0,Rn('No Node template found for category "'+x+'"'),Rn(" Using default node template")),y=a.ny))),y}br.prototype.getLinkCategoryForData=function(){return""},br.prototype.setLinkCategoryForData=function(){},br.prototype.setFromNodeForLink=function(){},br.prototype.setToNodeForLink=function(){},br.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,Rn('No Link template found for category "'+a+'"'),Rn(" Using default link template")),x=y.my)),x},br.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},br.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},br.prototype.ip=function(a){a=this.Lc(a),a!==null&&(xd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},br.prototype.unresolveReferencesForPart=function(){},br.prototype.removeDataForLink=function(){},br.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},br.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)},br.prototype.findLinkForKey=function(){return null},Pt=br.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 Ae;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(He(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 Ae;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(He(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(xn(z)){if(!xn(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(He(y)&&He(x)){if(!Sv(a,y,x))return!1}else if(y!==x)return!1;return!0}br.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===uo){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===Qo){var tt=a.newValue;E==="nodeDataArray"&&He(tt)&&hw(this,tt),y.isModified=!0}else if(x===$o){var rt=a.oldValue;E==="nodeDataArray"&&He(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===uo){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===Qo||x===$o){var At=a.change===Qo,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}}}}},br.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)},br.prototype.rp=function(){for(var a=this.H.model,y=new Ae,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()},br.prototype.refreshDataBoundLinks=function(){},br.prototype.updateRelationshipsFromData=function(){},br.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=ni()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);En(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function xv(a,y){var x=y.Hh;if(xn(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){dA(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(xn(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}}}}br.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Tn;if(xn(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 Ae;for(var z=new Tn,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof nn)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 Tn;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 nn||tt===null||(tt.containingGroup=z)}else if(y instanceof nn&&z instanceof nn)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}br.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof nn||(E=b.copyNodeData(E),He(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 nn||(b=y.copyNodeData(E)),He(b)&&(x.data=b)));return x},de.Object.defineProperties(br.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}}}),br.prototype.updateAllRelationshipsFromData=br.prototype.rp,br.prototype.findLinksByExample=br.prototype.ls,br.prototype.findNodesByExample=br.prototype.ms,br.prototype.findLinkForData=br.prototype.Kc,br.prototype.findNodeForData=br.prototype.ii,br.prototype.findPartForData=br.prototype.Lc,br.prototype.findNodeForKey=br.prototype.Vb,br.prototype.removeModeledPart=br.prototype.ip,br.prototype.removeModeledParts=br.prototype.Gs,br.prototype.rebuildParts=br.prototype.Wd;var dw=!1,gw=!1,pw=!1;br.className="PartManager";function Cs(a){br.apply(this,arguments)}we(Cs,br),Cs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mw(this,a.linkDataArray)},Cs.prototype.addModeledParts=function(a){for(br.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Pg(a.value);Vc(this.diagram,!1)};function mw(a,y){y.forEach(function(x){vw(a,x)}),Vc(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=Tl(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=Tl(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}}}}Cs.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)})}Cs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Cs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Cs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Cs.prototype.findPartForKey=function(a){var y=br.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Cs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Cs.prototype.doModelChanged=function(a){var y=this;if(br.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===uo){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,jt=a.newValue;Array.isArray(Dt)&&Dt.forEach(function(ze){0<=jt.indexOf(ze)||(ze=y.Vb(ze),ze!==null&&(ze.labeledLink=null))}),Array.isArray(jt)&&jt.forEach(function(ze){ze=y.Vb(ze),ze!==null&&(ze.labeledLink=Gt)})}}else if(b==="linkCategory"){var Jt=this.Kc(a.object),te=a.newValue;Jt!==null&&typeof te=="string"&&(Jt.category=te)}else b==="linkDataArray"&&(yw(this,a.oldValue),mw(this,a.newValue));x.isModified=!0}else if(E===Qo){var ie=a.newValue;if(b==="linkDataArray"&&typeof ie=="object"&&ie!==null)vw(this,ie);else if(b==="linkLabelKeys"&&tf(ie)){var ve=this.Kc(a.object),An=this.Vb(ie);ve!==null&&An!==null&&(An.labeledLink=ve)}x.isModified=!0}else if(E===$o){var In=a.oldValue;if(b==="linkDataArray"&&typeof In=="object"&&In!==null)this.ip(In);else if(b==="linkLabelKeys"&&tf(In)){var Cn=this.Vb(In);Cn!==null&&(Cn.labeledLink=null)}x.isModified=!0}}else if(E===uo){var $e=a.propertyName;a.object!==x.model||$e!=="linkFromKeyProperty"&&$e!=="linkToKeyProperty"&&$e!=="linkFromPortIdProperty"&&$e!=="linkToPortIdProperty"&&$e!=="linkLabelKeysProperty"&&$e!=="nodeIsGroupProperty"&&$e!=="nodeGroupKeyProperty"&&$e!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Cs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Ae,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)})},Cs.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 nn){var b=Tl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=Tl(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 Ae().addAll(y);var tt=new Ae;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 mr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ti)&&(a.containingGroup=y)}}},Cs.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&&(Tl(y,tt,!0)===x&&(z.link.fromNode=b),Tl(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))}},Cs.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)}}},Cs.prototype.copyPartData=function(a,y){var x=br.prototype.copyPartData.call(this,a,y);if(a instanceof nn)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},Cs.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 nn){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},Cs.prototype.findLinkForKey=Cs.prototype.findLinkForKey,Cs.prototype.findPartForKey=Cs.prototype.findPartForKey,Cs.prototype.removeAllModeledParts=Cs.prototype.removeAllModeledParts,Cs.prototype.addModeledParts=Cs.prototype.addModeledParts,Cs.prototype.addAllModeledParts=Cs.prototype.addAllModeledParts,Cs.className="GraphLinksPartManager";function Kl(){br.apply(this,arguments),this.Sg=null}we(Kl,br);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||!ra(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}}}Kl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Kl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Kl.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}},Kl.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))},Kl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Kl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Kl.prototype.doModelChanged=function(a){if(br.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===uo){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===uo){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Kl.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)))}}},Kl.prototype.updateDataBindings=function(a,y){br.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Kl.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))}},Kl.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($o,"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)}},Kl.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},Kl.prototype.findLinkForKey=Kl.prototype.findLinkForKey,Kl.className="TreePartManager";function zn(a,y){this.kl=new Ae,this.il=new Ae,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Je(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Tn,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 Tn,this.Lt=new Vt,this.Wg=!1,this.o=null,this.undoManager=new vo,a!==void 0&&(xn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}zn.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},zn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},zn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},zn.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)+":"+Ki(b)}}return y},zn.prototype.xA=function(a){a.change!==da&&Zt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof gs?(Sw(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},zn.prototype.Qv=function(a,y){var x=this,E=!1,b=new Ae,z=new Ae,tt=new Ae,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Qo?b.add(ft.newValue):ft.change===$o&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==uo||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 zn||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},zn.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=wi++,E.set(ft,pt),b.set(ft,y))}if(!He(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new Tn),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new Tn),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 rn||y instanceof ke||y instanceof Vi||y instanceof mn)ot=y.copy(),tt(y,ot);else{if(y instanceof Fr||y instanceof en||y instanceof Re)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 Ae)ot=new Ae().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Tn)ot=new Tn().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=zn.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,He(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": `+$c(this,this.nodeDataArray,!0)},Pt.kv=function(a){ww(this,a),a=a.nodeDataArray,xn(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 Ae,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Tn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===uo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Qo||z===$o)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function xw(a,y){for(var x=new Ae,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(He(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 Ae,z=new Ae,tt=new Ae,rt=this.vh;a.changes.each(function(At){At.model===x&&(At.modelChange==="nodeDataArray"?At.change===Qo?b.add(At.newValue):At.change===$o&&tt.add(At.oldValue):x.lb(At.object)?z.add(At.object):At.change!==uo||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 zn||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)+$c(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+$c(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Wv:this.Yv)+$c(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)&&Zt("applyIncrementalJson cannot change Model properties"),ww(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Tn;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&&Zt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof gs?(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=on.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Zt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Zt("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)},zn.constructGraphLinksModel=function(){return new zn},Pt=zn.prototype,Pt.dm=function(a){if(xn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(He(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Zt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(He(a)){for(y in a)if(x=a[y],He(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()):xn(a)?$c(this,a):He(a)?Cv(this,a):typeof a=="function"?"null":a.toString()};function $c(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new ai;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 ka(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:ka(x.x),y:ka(x.y)};else if(x instanceof rn)y={class:"go.Size",width:ka(x.width),height:ka(x.height)};else if(x instanceof ke)y={class:"go.Rect",x:ka(x.x),y:ka(x.y),width:ka(x.width),height:ka(x.height)};else if(x instanceof Vi)y={class:"go.Margin",top:ka(x.top),right:ka(x.right),bottom:ka(x.bottom),left:ka(x.left)};else if(x instanceof mn)x.sb()?y={class:"go.Spot",x:ka(x.x),y:ka(x.y),offsetX:ka(x.offsetX),offsetY:ka(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Fr){if(y={class:"go.Brush",type:x.type.name},x.type===ir?y.color=x.color:(x.type===Ni||x.type===_i)&&(y.start=x.start,y.end=x.end,x.type===_i&&(x.startRadius!==0&&(y.startRadius=ka(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ka(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 en?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ka(x.startX)),x.startY!==0&&(y.startY=ka(x.startY)),x.endX!==0&&(y.endX=ka(x.endX)),x.endY!==0&&(y.endY=ka(x.endY)),x.spot1.D(Ir)||(y.spot1=x.spot1),x.spot2.D(ia)||(y.spot2=x.spot2),x.type===en.o&&(y.path=en.ia(x))):x instanceof Re&&(y={class:"go.EnumValue",classType:Fp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=jo(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 ba(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(ba(a.x),ba(a.y));else if(y==="Size")x=new rn(ba(a.width),ba(a.height));else if(y==="Rect")x=new ke(ba(a.x),ba(a.y),ba(a.width),ba(a.height));else if(y==="Margin")x=new Vi(ba(a.top),ba(a.right),ba(a.bottom),ba(a.left));else if(y==="Spot")typeof a.enum=="string"?x=fa(a.enum):x=new mn(ba(a.x),ba(a.y),ba(a.offsetX),ba(a.offsetY));else if(y==="Brush"){if(x=new Fr,x.type=kn(Fr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof mn&&(x.start=a.start),a.end instanceof mn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ba(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ba(a.endRadius)),a=a.colorStops,He(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=en.parse(a.path):x=new en,x.type=kn(en,a.type),typeof a.startX=="number"&&(x.startX=ba(a.startX)),typeof a.startY=="number"&&(x.startY=ba(a.startY)),typeof a.endX=="number"&&(x.endX=ba(a.endX)),typeof a.endY=="number"&&(x.endY=ba(a.endY)),a.spot1 instanceof mn&&(x.spot1=a.spot1),a.spot2 instanceof mn&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Fv(E),typeof E=="function"&&(x=kn(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){rs(this,"",a,y,x,E,b,z,tt)},Pt.g=function(a,y,x,E,b){rs(this,"",uo,a,this,y,x,E,b)},Pt.Fs=function(a,y,x,E,b,z){rs(this,"",uo,y,a,x,E,b,z)};function rs(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var at=new po;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)}zn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===uo){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===Qo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,He(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&yi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Qn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!xn(E)&&a.propertyName&&(E=jo(a.object,a.propertyName)),xn(E)&&typeof x=="number"&&(a=a.newValue,y?yi(E,x):Qn(E,x,a))):Zt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===$o?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,He(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Qn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&yi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!xn(E)&&a.propertyName&&(E=jo(a.object,a.propertyName)),xn(E)&&typeof x=="number"&&(a=a.oldValue,y?Qn(E,x,a):yi(E,x))):Zt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==da&&Zt("unknown ChangedEvent: "+a.toString())},zn.prototype.Ea=function(a){return this.undoManager.Ea(a)},zn.prototype.eb=function(a){return this.undoManager.eb(a)},zn.prototype.Kf=function(){return this.undoManager.Kf()},zn.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=zn.prototype,Pt.La=function(a,y){y===void 0&&(y=""),rs(this,"SourceChanged",da,y,a,null,null)},Pt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=jo(a,y),y!==void 0)){if(tf(y))return y;Zt("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=jo(a,x);E!==y&&this.hc(y)===null&&(ao(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),rs(this,"nodeKey",uo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else ao(a,x,y)}};function tf(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&&Zt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&tf(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&&(yn(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&&Zt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Qn(a.Tc,E,y)),rs(a,"nodeDataArray",Qo,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Pt.Fy=function(a){if(xn(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;yi(a.Tc,E)}rs(a,"nodeDataArray",$o,"nodeDataArray",a,y,null,E,null),a.qp(y)}Pt.nA=function(a){if(xn(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&&xn(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 Ae&&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 Ae,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 Ae&&(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 Ae?a:null)}Pt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},zn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):z0(this,a,!0),He(a)&&Je(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 Je(E),E}if(x&&He(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=jo(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 zn||z instanceof vo||z instanceof gs||z instanceof po||(z=z0(a,z,!1)),ao(x,E,z)}return Je(x),x}return y instanceof Ot||y instanceof rn||y instanceof ke||y instanceof mn||y instanceof Vi?y.copy():y}zn.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,Rn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Rn(" Is that really your intent?"));var E=jo(a,y);E!==x&&(ao(a,y,x),this.Fs(a,y,E,x))},Pt=zn.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),Qn(a,y,x),rs(this,"",Qo,"",a,null,x,null,y)},Pt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Zt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];yi(a,y),rs(this,"",$o,"",a,x,null,y,null)},Pt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=jo(a,y),y===void 0))return"";if(typeof y=="string")return y;Zt("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=jo(a,x);E===void 0&&(E=""),E!==y&&(ao(a,x,y),rs(this,"nodeCategory",uo,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 zn}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 mA[a]?mA[a]:on.go!==void 0&&on.go[a]?on.go[a]:null}function jo(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){}}de.Object.defineProperties(zn.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===""&&Zt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Zt("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];He(b)||Zt("Model.nodeDataArray must only contain Objects, not: "+b),yn(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(rs(this,"nodeDataArray",uo,"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"}}}),zn.prototype.setCategoryForNodeData=zn.prototype.jm,zn.prototype.getCategoryForNodeData=zn.prototype.Ro,zn.prototype.removeArrayItem=zn.prototype.ov,zn.prototype.insertArrayItem=zn.prototype.ts,zn.prototype.addArrayItem=zn.prototype.Ay,zn.prototype.assignAllDataProperties=zn.prototype.Do,zn.prototype.set=zn.prototype.set,zn.prototype.clearUnresolvedReferences=zn.prototype.Qy,zn.prototype.mergeNodeDataArray=zn.prototype.$z,zn.prototype.removeNodeDataCollection=zn.prototype.nA,zn.prototype.removeNodeData=zn.prototype.cm,zn.prototype.addNodeDataCollection=zn.prototype.Fy,zn.prototype.addNodeData=zn.prototype.xf,zn.prototype.makeNodeDataKeyUnique=zn.prototype.$u,zn.prototype.findNodeDataForKey=zn.prototype.hc,zn.prototype.containsNodeData=zn.prototype.lb,zn.prototype.setKeyForNodeData=zn.prototype.km,zn.prototype.getKeyForNodeData=zn.prototype.wa,zn.prototype.updateTargetBindings=zn.prototype.La,zn.prototype.commit=zn.prototype.commit,zn.prototype.rollbackTransaction=zn.prototype.Kf,zn.prototype.commitTransaction=zn.prototype.eb,zn.prototype.startTransaction=zn.prototype.Ea,zn.prototype.raiseDataChanged=zn.prototype.Fs,zn.prototype.raiseChanged=zn.prototype.g,zn.prototype.raiseChangedEvent=zn.prototype.cb,zn.prototype.removeChangedListener=zn.prototype.ik,zn.prototype.addChangedListener=zn.prototype.Pe,zn.prototype.writeJsonValue=zn.prototype.sm,zn.prototype.replaceJsonObjects=zn.prototype.dm,zn.prototype.applyIncrementalJSON=zn.prototype.Ky,zn.prototype.applyIncrementalJson=zn.prototype.Zw,zn.prototype.toJSON=zn.prototype.toJSON,zn.prototype.toJson=zn.prototype.np,zn.prototype.toIncrementalJSON=zn.prototype.yA,zn.prototype.toIncrementalJson=zn.prototype.$x,zn.prototype.toIncrementalData=zn.prototype.xA,zn.prototype.clear=zn.prototype.clear;var Fw=!1,mA={};zn.className="Model",zn.fromJSON=zn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=on.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Zt("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=on[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof zn?y=a:Zt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=zn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},zn.safePropertyValue=jo,zn.safePropertySet=ao,mA.Brush=Fr,mA.ChangedEvent=po,mA.Geometry=en,mA.Margin=Vi,mA.Panel=je,mA.Point=Ot,mA.Rect=ke,mA.Size=rn,mA.Spot=mn,mA.Transaction=gs,mA.UndoManager=vo;function Xo(a,y,x,E){Je(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 Ae}Xo.prototype.copy=function(){var a=new Xo;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=Xo.prototype,Pt.qb=function(a){a.classType===Xo&&(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==="")Rn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=jo(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=jo(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)}}}},de.Object.defineProperties(Xo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ue(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ue(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ue(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ue(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ue(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ue(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ue(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ue(this),this.el=a}}}),Xo.prototype.updateSource=Xo.prototype.sp,Xo.prototype.updateTarget=Xo.prototype.Mv,Xo.prototype.ofModel=Xo.prototype.dA,Xo.prototype.ofObject=Xo.prototype.cp,Xo.prototype.makeTwoWay=Xo.prototype.Kx;var T1="Binding",Ew=new Re(Xo,"OneWay",1),Lp=new Re(Xo,"TwoWay",2);Xo.className="Binding",Xo.parseEnum=function(a,y){return function(x){return x=kn(a,x),x===null?y:x}},Xo.toString=Ki,Xo.OneWay=Ew,Xo.TwoWay=Lp;function Ar(a,y,x){zn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Ae,this.wb=new Tn,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&&(xn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}we(Ar,zn),Ar.constructGraphLinksModel=zn.constructGraphLinksModel,Ar.prototype.cloneProtected=function(a){zn.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(){zn.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)+":"+Ki(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+Tl(this,b,!0)+"-->"+Tl(this,b,!1)}return y},Pt.Qv=function(a,y){this.linkKeyProperty===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=zn.prototype.Qv.call(this,a,y),E=this,b=new Ae,z=new Ae,tt=new Ae,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Qo?b.add(At.newValue):At.change===$o&&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 zn||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=zn.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){zn.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=zn.prototype.Rv.call(this),y=`,
"linkDataArray": `+$c(this,this.linkDataArray,!0);return a+y},Pt.kv=function(a){zn.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 Ae,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===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=zn.prototype.Pv.call(this,a,y),E=this,b=new Ae,z=new Ae,tt=new Ae,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Qo?b.add(At.newValue):At.change===$o&&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 zn||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)+$c(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+$c(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Vv:this.Xv)+$c(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)&&Zt("applyIncrementalJson cannot change Model properties"),zn.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===uo){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===Qo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,He(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===$o){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,He(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}}zn.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 Tl(this,a,!0)},Pt.wv=function(a,y){bg(this,a,y,!0)},Pt.Bx=function(a){return Tl(this,a,!1)},Pt.Bv=function(a,y){bg(this,a,y,!1)};function Tl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=jo(y,a),a!==void 0))){if(tf(a))return a;Zt((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=jo(y,b);z!==x&&(QA(a,z,y),ao(y,b,x),a.hc(x)===null&&NA(a,x,y),rs(a,E?"linkFromKey":"linkToKey",uo,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=jo(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=jo(y,b);z===void 0&&(z=""),z!==x&&(ao(y,b,x),rs(a,E?"linkFromPortId":"linkToPortId",uo,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=jo(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=jo(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)}rs(this,"linkLabelKeys",uo,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=jo(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),rs(this,"linkLabelKeys",Qo,x,a,null,y,null,b)))}else Zt(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=jo(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(QA(this,y,a),rs(this,"linkLabelKeys",$o,x,a,y,null,b,null)))}else E!==void 0&&Zt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Pt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=jo(a,y),y!==void 0)){if(tf(y))return y;Zt("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=jo(a,x);E!==y&&this.jh(y)===null&&(ao(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),rs(this,"linkKey",uo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else ao(a,x,y)}},Pt.jh=function(a){return a===null&&Zt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&tf(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&&(yn(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&&Zt("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)),rs(a,"linkDataArray",Qo,"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(rs(a,"linkDataArray",$o,"linkDataArray",a,y,null,E,null),x=Tl(a,y,!0),QA(a,x,y),x=Tl(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===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&xn(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=Tl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&NA(a,x,y),x=Tl(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),He(a)&&(Je(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:!!jo(a,y)},Pt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=jo(a,y),y!==void 0)){if(tf(y))return y;Zt("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=jo(a,x);E!==y&&(QA(this,E,a),ao(a,x,y),this.hc(y)===null&&NA(this,y,a),rs(this,"nodeGroupKey",uo,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=zn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||jo(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=jo(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&&jo(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Pt.jp=function(a,y){zn.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(Tl(this,E,!0)===b){var tt=this.lf;ao(E,tt,z),rs(this,"linkFromKey",uo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(Tl(this,E,!1)===b&&(tt=this.mf,ao(E,tt,z),rs(this,"linkToKey",uo,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,rs(this,"linkLabelKeys",Qo,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),rs(this,"nodeGroupKey",uo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.Lv=function(){zn.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){zn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=ni();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;rs(this,"nodeGroupKey",uo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(Tl(this,E,!0)===a&&(b=this.lf,rs(this,"linkFromKey",uo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),Tl(this,E,!1)===a&&(b=this.mf,rs(this,"linkToKey",uo,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&&(rs(this,"linkLabelKeys",Qo,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)QA(this,a,x[y]);En(x)}},Pt.em=function(a){zn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&NA(this,y,a)},Pt.qp=function(a){zn.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=jo(a,y),y===void 0))return"";if(typeof y=="string")return y;Zt("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=jo(a,x);E===void 0&&(E=""),E!==y&&(ao(a,x,y),rs(this,"linkCategory",uo,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){zn.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},de.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];He(b)||Zt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),yn(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 Ae,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,rs(this,"linkDataArray",uo,"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",mA.GraphLinksModel=Ar,zn.constructGraphLinksModel=zn.constructGraphLinksModel=function(){return new Ar},zn.initDiagramModel=Pv=function(){return new Ar};function Ta(a,y){zn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(xn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}we(Ta,zn),Ta.constructGraphLinksModel=zn.constructGraphLinksModel,Ta.prototype.cloneProtected=function(a){zn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Pt=Ta.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)+":"+Ki(b)}}return y},Pt.rm=function(){var a=zn.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){zn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Pt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Zt("applyIncrementalJson cannot change Model properties"),zn.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=jo(a,y),y!==void 0)){if(tf(y))return y;Zt("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=jo(a,x);E!==y&&(QA(this,E,a),ao(a,x,y),this.hc(y)===null&&NA(this,y,a),rs(this,"nodeParentKey",uo,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=jo(a,y),y===void 0)?"":typeof y=="string"?y:(Zt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ta.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ta.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=jo(a,x);E===void 0&&(E=""),E!==y&&(ao(a,x,y),rs(this,"parentLinkCategory",uo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else ao(a,x,y)}},Ta.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ta.prototype.copyNodeData=function(a){return a===null?null:(a=zn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||jo(a,this.Ke)===void 0||ao(a,this.Ke,void 0),a)},Ta.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=jo(a,y);E!==x&&(ao(a,y,x),this.Fs(a,y,E,x))},Pt=Ta.prototype,Pt.jp=function(a,y){zn.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),rs(this,"nodeParentKey",uo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.fm=function(a){zn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=ni();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;rs(this,"nodeParentKey",uo,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]);En(x)}},Pt.em=function(a){zn.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){zn.prototype.qp.call(this,a);var y=this.mh(a);QA(this,y,a)},Pt.lm=function(a,y){zn.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},de.Object.defineProperties(Ta.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"}}}),Ta.prototype.setParentLinkCategoryForNodeData=Ta.prototype.Ms,Ta.prototype.getParentLinkCategoryForNodeData=Ta.prototype.ss,Ta.prototype.setParentKeyForNodeData=Ta.prototype.qe,Ta.prototype.getParentKeyForNodeData=Ta.prototype.mh,Ta.className="TreeModel",mA.TreeModel=Ta;function Fo(a){co.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=vA,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=vA,this.K=Ia,this.nd=Ng,this.hd=yv,this.tf=6,this.Nn=J0,a&&Object.assign(this,a)}we(Fo,co),Fo.prototype.cloneProtected=function(a){co.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},Fo.prototype.qb=function(a){a.classType===Fo?a===X0||a===Z0||a===W0||a===Y0||a===Ng?this.sorting=a:a===Jf||a===Ig||a===Ia||a===nf?this.direction=a:a===dc||a===ef||a===vA||a===yA?this.arrangement=a:(a===Kd||a===J0)&&(this.nodeDiameterFormula=a):co.prototype.qb.call(this,a)},Fo.prototype.createNetwork=function(){return new Qg(this)},Fo.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===yA&&ot===Kd?rt=vA:rt===yA&&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===yA&&a.reverse(),E=new Vt,E.addAll(a),E.addAll(x)):(this.arrangement===yA&&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===Ia?1:-1)/ot,Mt=E.M(xt).diameter;isNaN(Mt)&&(Mt=rf(E.M(xt),Bt)),360>pt&&(xt===0||xt===E.length-1)&&(Mt/=2),b+=Mt,z++}if(isNaN(at)||rt===yA){if(isNaN(y)&&(y=6),rt!==vA&&rt!==yA){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)&&rf(xt,0),isNaN(b.diameter)&&rf(b,0),z=Math.max(z,(xt.diameter+b.diameter)/2);tt=z+y,rt===dc?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!==yA?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===vA||rt===yA)&&(y=(xt-b)/(360<=pt?ot:ot-1));else if(rt===vA||rt===yA)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)&&rf(Bt,0),isNaN(Mt.diameter)&&rf(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!==yA)if(this.direction===Jf||this.direction===Ig){switch(tt=0,E){case ef:tt=180*_0(this,rt,pt,at,ot)/Math.PI;break;case vA:ot=y=0,tt=a.first(),tt!==null&&(y=rf(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=rf(tt,Math.PI/2)),tt=180*_0(this,rt,pt,at,ft+(y+ot)/2)/Math.PI;break;case dc:tt=At/y.length}if(this.direction===Jf){switch(E){case ef:kp(this,a,at,nf);break;case vA:Mp(this,a,at,nf);break;case dc:Ep(this,a,At/2,at,nf)}switch(E){case ef:kp(this,x,at+tt,Ia);break;case vA:Mp(this,x,at+tt,Ia);break;case dc:Ep(this,x,At/2,at+tt,Ia)}}else{switch(E){case ef:kp(this,x,at,nf);break;case vA:Mp(this,x,at,nf);break;case dc:Ep(this,x,At/2,at,nf)}switch(E){case ef:kp(this,a,at+tt,Ia);break;case vA:Mp(this,a,at+tt,Ia);break;case dc:Ep(this,a,At/2,at+tt,Ia)}}}else switch(E){case ef:kp(this,y,at,this.direction);break;case vA:Mp(this,y,at,this.direction);break;case dc:Ep(this,y,At,at,this.direction);break;case yA:Iw(this,y,At,at,this.direction)}else Iw(this,y,At,at-At/2,Ia)}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===Ia?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)&&rf(at,0),isNaN(At.diameter)&&rf(At,0),at=_0(a,b,z,E===Ia?x:-x,(at.diameter+At.diameter)/2+tt),x+=E===Ia?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===Ia?x:-x,tt),x+=E===Ia?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===Ia?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===Ia?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===Ia?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===Ia)){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===Ia)){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}Fo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Fo.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))},Fo.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}}Fo.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:Zt("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}Fo.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,jt=0;jt<tt.length;jt++){var Jt=z[tt[jt]],te=z[rt[jt]];if(Jt<te){var ie=Jt;Jt=te}else ie=te;if(ie<Mt&&Mt<=Jt)for(te=0;te<Gt.length;te++){var ve=Gt[te];0>x.indexOf(ve)||ie<z[ve]&&z[ve]<Jt||ie===z[ve]||Jt===z[ve]||Dt++}else for(te=0;te<Gt.length;te++)ve=Gt[te],0>x.indexOf(ve)||ie<z[ve]&&z[ve]<Jt&&ie!==z[ve]&&Jt!==z[ve]&&Dt++}for(Gt=Dt,jt=Dt=0;jt<y[at].length;jt++)ie=x.indexOf(y[at][jt]),0<=ie&&(ie=Math.abs(Mt-(ie>=Mt?ie+1:ie)),Dt+=ie<x.length+1-ie?ie:x.length+1-ie);for(jt=0;jt<tt.length;jt++)ie=z[tt[jt]],Jt=z[rt[jt]],ie>=Mt&&ie++,Jt>=Mt&&Jt++,ie>Jt&&(te=Jt,Jt=ie,ie=te),Jt-ie<(x.length+2)/2==(ie<Mt&&Mt<=Jt)&&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},de.Object.defineProperties(Fo.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!==yA&&a!==vA&&a!==ef&&a!==dc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ia&&a!==nf&&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 vA=new Re(Fo,"ConstantSpacing",0),ef=new Re(Fo,"ConstantDistance",1),dc=new Re(Fo,"ConstantAngle",2),yA=new Re(Fo,"Packed",3),Ia=new Re(Fo,"Clockwise",4),nf=new Re(Fo,"Counterclockwise",5),Jf=new Re(Fo,"BidirectionalLeft",6),Ig=new Re(Fo,"BidirectionalRight",7),W0=new Re(Fo,"Forwards",8),Y0=new Re(Fo,"Reverse",9),X0=new Re(Fo,"Ascending",10),Z0=new Re(Fo,"Descending",11),Ng=new Re(Fo,"Optimized",12),J0=new Re(Fo,"Pythagorean",13),Kd=new Re(Fo,"Circular",14);Fo.className="CircularLayout",Fo.ConstantSpacing=vA,Fo.ConstantDistance=ef,Fo.ConstantAngle=dc,Fo.Packed=yA,Fo.Clockwise=Ia,Fo.Counterclockwise=nf,Fo.BidirectionalLeft=Jf,Fo.BidirectionalRight=Ig,Fo.Forwards=W0,Fo.Reverse=Y0,Fo.Ascending=X0,Fo.Descending=Z0,Fo.Optimized=Ng,Fo.Pythagorean=J0,Fo.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){Yr.call(this,a)}we(Qg,Yr),Qg.prototype.createVertex=function(){return new Tp(this)},Qg.prototype.createEdge=function(){return new q0(this)},Qg.className="CircularNetwork";function Tp(a){cs.call(this,a),this.u=this.Si=NaN}we(Tp,cs);function rf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===yA)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}de.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){vl.call(this,a)}we(q0,vl),q0.className="CircularEdge";function Zs(a){co.call(this),this.ah=null,this.An=0,this.$d=new rn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}we(Zs,co),Zs.prototype.cloneProtected=function(a){co.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},Zs.prototype.createNetwork=function(){return new jd(this)},Zs.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=ni(),At=0;At<rt+y.vertexes.count+2;At++)at[At]=null;rt=0,tt.reset();for(var ft=ke.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(ke.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(En(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},Zs.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},Zs.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 ke(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 ke(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}Zs.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Zs.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}Zs.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},Zs.prototype.moveFixedVertex=function(){},Zs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Zs.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=es,y.toSpot=es)}},Zs.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=ke.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,ke.free(x)}x=ke.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()}ke.free(x)},Zs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Zs.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Zs.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Zs.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Zs.prototype.electricalFieldX=function(){return 0},Zs.prototype.electricalFieldY=function(){return 0},Zs.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Zs.prototype.gravitationalFieldX=function(){return 0},Zs.prototype.gravitationalFieldY=function(){return 0},Zs.prototype.isFixed=function(a){return a.isFixed},de.Object.defineProperties(Zs.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"&&Zt('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())}}}),Zs.className="ForceDirectedLayout";function zw(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}zw.className="ForceDirectedSubnet";function jd(a){Yr.call(this,a)}we(jd,Yr),jd.prototype.createVertex=function(){return new Ip(this)},jd.prototype.createEdge=function(){return new Np(this)},jd.className="ForceDirectedNetwork";function Ip(a){cs.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}we(Ip,cs),de.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){vl.call(this,a),this.j=this.o=NaN}we(Np,vl),de.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 Tr(a){co.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)}we(Tr,co),Tr.prototype.cloneProtected=function(a){co.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},Tr.prototype.qb=function(a){a.classType===Tr?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:Zt("Unknown enum value: "+a):co.prototype.qb.call(this,a)},Tr.prototype.createNetwork=function(){return new Dg(this)},Tr.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()?(Ac(ft,pt,sr,xt),xt.x+=ft.actualBounds.x-Mt.x,xt.y+=ft.actualBounds.y-Mt.y):(Ac(ft,pt,sr,xt),xt.w()||xt.assign(Bt)):xt.assign(Bt):Mt.w()?(Ac(ft,pt,sr,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()?(Ac(ot,rt,sr,At),At.x+=ot.actualBounds.x-ft.x,At.y+=ot.actualBounds.y-ft.y):(Ac(ot,rt,sr,At),At.w()||At.assign(at)):At.assign(at):ft.w()?(Ac(ot,rt,sr,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 jt=Mt.fromNode;if(pt=Mt.toNode,jt!==null&&pt!==null){var Jt=im(this,!0),te=im(this,!1),ie=this.setsPortSpots?Jt:Mt.computeSpot(!0,Gt);Bt=this.setsPortSpots?te:Mt.computeSpot(!1,Dt);var ve=Mt.isOrthogonal;ie.$c()&&ie.Hf(te)&&Bt.$c()&&Bt.Hf(Jt)?ft=0:(Jt=Mt.getLinkPoint(jt,Gt,ie,!0,ve,pt,Dt,Ot.alloc()),te=Mt.getLinkDirection(jt,Gt,Jt,ie,!0,ve,pt,Dt),Ot.free(Jt),ie.ys()||te!==Jw(this,E,!0)?this.setsPortSpots&&jt!==null&&jt.ports.count===1&&E.rev&&(ft+=1):ft+=1,ie=Mt.getLinkPoint(pt,Dt,Bt,!1,ve,jt,Gt,Ot.alloc()),Mt=Mt.getLinkDirection(pt,Dt,ie,Bt,!1,ve,jt,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=of(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),sf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Tr.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}Tr.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},Tr.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 jl(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=of(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,jt=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Jt=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<Jt.length;pt++)Bt=Jt[pt],Bt.valid&&Bt.fromVertex.layer!==y&&(Mt=Bt.fromVertex.index,Bt=Bt.portFromPos,(ft<Mt||ft===Mt&&xt<Bt)&&jt++,(Mt<ft||Mt===ft&&Bt<xt)&&Dt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Jt=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<Jt.length;pt++)Bt=Jt[pt],Bt.valid&&Bt.toVertex.layer!==y&&(Mt=Bt.toVertex.index,Gt=Bt.portToPos,(ft<Mt||ft===Mt&&At<Gt)&&jt++,(Mt<ft||Mt===ft&&Gt<At)&&Dt++)}z[tt*b+ot]=Dt,z[ot*b+tt]=jt}}return sf(a,y,E),z}Tr.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=of(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)}}}sf(E,b,z),y+=rt}return y}Tr.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=of(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 sf(a,y,E),z}function jw(a,y,x){for(var E=of(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 sf(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)}}Tr.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++}Tr.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}Tr.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))}Tr.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(jl(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))}jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(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?jl(this,y):(a=b,y=_a(this))}}jl(this,y)};function em(a,y,x){var E=of(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);sf(a,y,E)}function Xl(a,y,x){var E=of(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),jt=a.nodeMinColumnSpace(E[z+1],!0),Jt=a.nodeMinColumnSpace(E[z+1],!1);Gt=Bt-Gt+jt,Dt=Mt-Dt+Jt;var te=E[z].sourceEdges.iterator;for(te.reset();te.next();)if(jt=te.value,Jt=jt.fromVertex,jt.valid&&Jt.layer===y){for(jt=0;E[jt]!==Jt;)jt++;jt<z&&(pt+=2*(z-jt),xt+=2*(z+1-jt)),jt===z+1&&(pt+=1),jt>z+1&&(pt+=4*(jt-z),xt+=4*(jt-(z+1)))}for(te=E[z].destinationEdges.iterator,te.reset();te.next();)if(jt=te.value,Jt=jt.toVertex,jt.valid&&Jt.layer===y){for(jt=0;E[jt]!==Jt;)jt++;jt===z+1&&(xt+=1)}for(te=E[z+1].sourceEdges.iterator,te.reset();te.next();)if(jt=te.value,Jt=jt.fromVertex,jt.valid&&Jt.layer===y){for(jt=0;E[jt]!==Jt;)jt++;jt<z&&(pt+=2*(z+1-jt),xt+=2*(z-jt)),jt===z&&(xt+=1),jt>z+1&&(pt+=4*(jt-(z+1)),xt+=4*(jt-z))}for(te=E[z+1].destinationEdges.iterator,te.reset();te.next();)if(jt=te.value,Jt=jt.toVertex,jt.valid&&Jt.layer===y){for(jt=0;E[jt]!==Jt;)jt++;jt===z&&(pt+=1)}jt=Jt=0,te=tt[E[z].index];var ie=rt[E[z].index],ve=tt[E[z+1].index],An=rt[E[z+1].index];te!==-1&&(Jt+=Math.abs(te-Bt),jt+=Math.abs(te-Dt)),ie!==-1&&(Jt+=Math.abs(ie-Bt),jt+=Math.abs(ie-Dt)),ve!==-1&&(Jt+=Math.abs(ve-Mt),jt+=Math.abs(ve-Gt)),An!==-1&&(Jt+=Math.abs(An-Mt),jt+=Math.abs(An-Gt)),(xt<pt-.5||xt===pt&&ft<At-.5||xt===pt&&ft===At&&jt<Jt-.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 sf(a,y,E),ot}Tr.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=of(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,jt=Dt.fromVertex;if(Dt.valid&&jt.layer!==y){var Jt=Mv(Dt),te=Dt.portFromColOffset;Dt=Dt.portToColOffset,jt=jt.column,pt+=(Math.abs(At+Dt-(jt+te))+1)*Jt,Bt+=(Math.abs(xt+Dt-(jt+te))+1)*Jt,Mt+=(Math.abs(ft+Dt-(jt+te))+1)*Jt}}if(0<=x)for(Gt=b[E].destinationEdges.iterator;Gt.next();)Dt=Gt.value,jt=Dt.toVertex,Dt.valid&&jt.layer!==y&&(Jt=Mv(Dt),te=Dt.portFromColOffset,Dt=Dt.portToColOffset,jt=jt.column,pt+=(Math.abs(At+te-(jt+Dt))+1)*Jt,Bt+=(Math.abs(xt+te-(jt+Dt))+1)*Jt,Mt+=(Math.abs(ft+te-(jt+Dt))+1)*Jt);Dt=te=Jt=0,Gt=tt[b[E].index],jt=rt[b[E].index],Gt!==-1&&(Jt+=Math.abs(Gt-At),te+=Math.abs(Gt-xt),Dt+=Math.abs(Gt-ft)),jt!==-1&&(Jt+=Math.abs(jt-At),te+=Math.abs(jt-xt),Dt+=Math.abs(jt-ft)),Bt<pt||Bt===pt&&te<Jt?(at=ot=!0,b[E].column=xt):(Mt<pt||Mt===pt&&Dt<Jt)&&(at=ot=!0,b[E].column=ft)}return sf(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=of(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)}sf(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?jl(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?jl(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=ni(),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 Ae,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=Hr(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)),En(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(xt){var Bt=ni();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,En(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=Hr(at.sourceEdgesArrayAccess),xt=pt.next();!xt.done;xt=pt.next())xt=xt.value,xt.valid&&ft.push(xt);at.bo=ft}for(at=Hr(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}}}Tr.prototype.verticalAlignment=function(a,y,x){V1(a),a=Hr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Hr(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=Hr(y),tt=z.next();!tt.done;tt=z.next()){var rt=Hr(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=Hr(y),rt=z.next();!rt.done;rt=z.next()){rt=Hr(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=Hr(y),tt=x.next();!tt.done;tt=x.next())for(z=Hr(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 Tn,y=Hr(y),tt=y.next();!tt.done;tt=y.next())for(x=Hr(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&&Zt("Could not determine previous vertex in layer"),y[x][a-1]}Tr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=ni(),b=ni(),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)));En(E),En(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}Tr.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?xs:bs:a.K===90?y?bs:xs:a.K===180?y?Io:qo:y?qo:Io}Tr.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()},Tr.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 ke(0,0,x,Math.abs(this.Ta[0]))):y.push(new ke(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new ke(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new ke(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new ke(0,0,Math.abs(this.Ta[0]),x)):y.push(new ke(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new ke(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new ke(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Tr.prototype.commitLayers=function(){},Tr.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===bl&&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===ar&&(E=!0),rt!==null&&ot===ar&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(sr),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(sr),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===bl)pt=!0,Gt=y.pointsCount,4<Gt&&y.points.removeRange(2,Gt-3),Gt===4&&(Mt=2);else{Gt=y.pointsCount;var Dt=at===ar,jt=ot===ar;2<Gt&&Dt&&jt?y.points.removeRange(1,Gt-2):3<Gt&&Dt&&!jt?y.points.removeRange(1,Gt-3):3<Gt&&!Dt&&jt?y.points.removeRange(2,Gt-2):4<Gt&&!Dt&&!jt&&y.points.removeRange(2,Gt-3)}if(x.rev){for(;ft!==null&&At!==ft;){var Jt=Gt=null;for(Dt=ft.sourceEdges.iterator;Dt.next()&&(jt=Dt.value,jt.link!==x.link||(Gt=jt.fromVertex,Jt=jt.toVertex,Gt.node!==null)););if(Gt===null)break;if(Gt!==At){Dt=y.i(Mt-1).x,jt=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,jt),y.m(Mt++,Dt,ie)):(Jt!==null?Jt.centerY:jt)!==ie&&(Jt=this.Ta[Gt.layer-1]+this.Rf.x,y.m(Mt++,Jt,jt),y.m(Mt++,Jt,ie)):Mt===y.firstPickIndex+1?(y.m(Mt++,Dt,jt),y.m(Mt++,te,jt)):(Jt!==null?Jt.centerX:Dt)!==te&&(Jt=this.Ta[Gt.layer-1]+this.Rf.y,y.m(Mt++,Dt,Jt),y.m(Mt++,te,Jt));else if(Mt===y.firstPickIndex+1){Jt=Math.max(10,this.he[ft.layer]);var ve=Math.max(10,this.Ld[ft.layer]);if(pt)this.K===180?te<=ft.bounds.x?(ft=ft.bounds.x,y.m(Mt++,ft-Jt,ie),y.m(Mt++,ft,ie),y.m(Mt++,ft+ve,ie)):(y.m(Mt++,te-Jt,ie),y.m(Mt++,te,ie),y.m(Mt++,te+ve,ie)):this.K===90?ie>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Mt++,te,ft+ve),y.m(Mt++,te,ft),y.m(Mt++,te,ft-Jt)):(y.m(Mt++,te,ie+ve),y.m(Mt++,te,ie),y.m(Mt++,te,ie-Jt)):this.K===270?ie<=ft.bounds.y?(ft=ft.bounds.y,y.m(Mt++,te,ft-Jt),y.m(Mt++,te,ft),y.m(Mt++,te,ft+ve)):(y.m(Mt++,te,ie-Jt),y.m(Mt++,te,ie),y.m(Mt++,te,ie+ve)):this.K===0&&(te>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Mt++,ft+ve,ie),y.m(Mt++,ft,ie),y.m(Mt++,ft-Jt,ie)):(y.m(Mt++,te+ve,ie),y.m(Mt++,te,ie),y.m(Mt++,te-Jt,ie)));else{y.m(Mt++,Dt,jt);var An=0;this.K===180||this.K===0?((this.K===180?te>=ft.bounds.right:te<=ft.bounds.x)&&(An=(this.K===0?-Jt:ve)/2),y.m(Mt++,Dt+An,ie)):((this.K===270?ie>=ft.bounds.bottom:ie<=ft.bounds.y)&&(An=(this.K===90?-Jt:ve)/2),y.m(Mt++,te,jt+An)),y.m(Mt++,te,ie)}}else Jt=Math.max(10,this.he[Gt.layer]),ve=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te-Jt-Bt,ie),y.m(Mt++,Math.min(te-Jt+Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.max(te+ve-Bt/2,te),ie),y.m(Mt++,te+ve+Bt,ie)):this.K===90?(y.m(Mt++,te,ie+ve+Bt),y.m(Mt++,te,Math.max(ie+ve-Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.min(ie-Jt+Bt/2,ie)),y.m(Mt++,te,ie-Jt-Bt)):this.K===270?(y.m(Mt++,te,ie-Jt-Bt),y.m(Mt++,te,Math.min(ie-Jt+Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.max(ie+ve-Bt/2,ie)),y.m(Mt++,te,ie+ve+Bt)):(y.m(Mt++,te+ve+Bt,ie),y.m(Mt++,Math.max(te+ve-Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.min(te-Jt+Bt/2,te),ie),y.m(Mt++,te-Jt-Bt,ie)):y.m(Mt++,te,ie)}ft=Gt}(rt===null||at!==ar||xt)&&(Dt=y.i(Mt-1).x,jt=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=jt,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,jt),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?(Jt=Math.max(10,this.he[At.layer]),ve=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,jt),y.L(Mt-1,ft+ve,jt)):this.K===90&&ie<=At.bounds.bottom?(ft=At.bounds.y,y.L(Mt-2,Dt,ft),y.L(Mt-1,Dt,ft-Jt)):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+ve)):this.K===0&&te<=At.bounds.right&&(ft=At.bounds.x,y.L(Mt-2,ft,jt),y.L(Mt-1,ft-Jt,jt))):(Jt=Math.max(10,this.he[At.layer]),ve=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?ve:-Jt)/2),y.m(Mt++,te+xt,jt)):((this.K===270?ie<=At.bounds.y:ie>=At.bounds.bottom)&&(xt=(this.K===90?ve:-Jt)/2),y.m(Mt++,Dt,ie+xt)),y.m(Mt++,te,ie)))}else{for(;At!==null&&At!==ft;){for(Jt=Gt=null,At=At.destinationEdges.iterator;At.next()&&(Dt=At.value,Dt.link!==x.link||(Gt=Dt.toVertex,Jt=Dt.fromVertex,Jt.node!==null&&(Jt=null),Gt.node!==null)););if(Gt===null)break;Gt!==ft&&(Dt=y.i(Mt-1).x,jt=y.i(Mt-1).y,te=Gt.centerX,ie=Gt.centerY,xt?this.K===180||this.K===0?(Jt!==null?Jt.centerY:jt)!==ie&&(Jt=this.Ta[Gt.layer]+this.Rf.x,Mt===y.firstPickIndex+1&&(Jt=this.K===0?Math.max(Jt,Dt):Math.min(Jt,Dt)),y.m(Mt++,Jt,jt),y.m(Mt++,Jt,ie)):(Jt!==null?Jt.centerX:Dt)!==te&&(Jt=this.Ta[Gt.layer]+this.Rf.y,Mt===y.firstPickIndex+1&&(Jt=this.K===90?Math.max(Jt,jt):Math.min(Jt,jt)),y.m(Mt++,Dt,Jt),y.m(Mt++,te,Jt)):(Jt=Math.max(10,this.he[Gt.layer]),ve=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te+ve+Bt,ie),y.m(Mt++,Math.max(te+ve-Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.min(te-Jt+Bt/2,te),ie),y.m(Mt++,te-Jt-Bt,ie)):this.K===90?(y.m(Mt++,te,ie-Jt-Bt),y.m(Mt++,te,Math.min(ie-Jt+Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.max(ie+ve-Bt/2,ie)),y.m(Mt++,te,ie+ve+Bt)):this.K===270?(y.m(Mt++,te,ie+ve+Bt),y.m(Mt++,te,Math.max(ie+ve-Bt/2,ie)),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,te,Math.min(ie-Jt+Bt/2,ie)),y.m(Mt++,te,ie-Jt-Bt)):(y.m(Mt++,te-Jt-Bt,ie),y.m(Mt++,Math.min(te-Jt+Bt/2,te),ie),y.m(Mt++,te,ie),y.m(Mt++,te,ie),y.m(Mt++,Math.max(te+ve-Bt/2,te),ie),y.m(Mt++,te+ve+Bt,ie)):this.K===180?(y.m(Mt++,te+ve,ie),y.m(Mt++,te-Jt,ie)):this.K===90?(y.m(Mt++,te,ie-Jt),y.m(Mt++,te,ie+ve)):this.K===270?(y.m(Mt++,te,ie+ve),y.m(Mt++,te,ie-Jt)):(y.m(Mt++,te-Jt,ie),y.m(Mt++,te+ve,ie)))),At=Gt}xt&&(Dt=y.i(Mt-1).x,jt=y.i(Mt-1).y,te=y.i(Mt).x,ie=y.i(Mt).y,this.K===180||this.K===0?jt!==ie&&(Jt=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++,Jt,jt),y.m(Mt++,Jt,ie)):Dt!==te&&(Jt=this.K===90?Math.min(Math.max((ie+jt)/2,this.Ta[ft.layer]+this.Rf.y),ie):Math.max(Math.min((ie+jt)/2,this.Ta[ft.layer]+this.Rf.y),ie),y.m(Mt++,Dt,Jt),y.m(Mt++,te,Jt)))}E!==null&&pt&&4<=y.pointsCount&&(tt!==null&&(tt=at===ar?y.getLinkPointFromPoint(b,tt,tt.ga(sr),y.i(3),!0):y.i(0),at===ar&&(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===ar?y.getLinkPointFromPoint(z,rt,rt.ga(sr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===ar&&(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()},Tr.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 af;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 af,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=Tr.prototype,Pt.Vx=function(a,y){return a instanceof af&&y instanceof af&&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 af&&y instanceof af&&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 af&&y instanceof af&&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)&&Zt("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 of(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 sf(a,y,x){a.He[a.tc[y]]=x}de.Object.defineProperties(Tr.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()):Zt("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 Re(Tr,"CycleDepthFirst",0),Nv=new Re(Tr,"CycleGreedy",1),Up=new Re(Tr,"CycleFromLayers",2),om=new Re(Tr,"LayerOptimalLinkLength",0),Qv=new Re(Tr,"LayerLongestPathSink",1),Uv=new Re(Tr,"LayerLongestPathSource",2),sm=new Re(Tr,"InitDepthFirstOut",0),Dv=new Re(Tr,"InitDepthFirstIn",1),Ov=new Re(Tr,"InitNaive",2),Hv=new Re(Tr,"AggressiveNone",0),am=new Re(Tr,"AggressiveLess",1),Rv=new Re(Tr,"AggressiveMore",2),W1=8;Tr.className="LayeredDigraphLayout",Tr.CycleDepthFirst=rm,Tr.CycleGreedy=Nv,Tr.CycleFromLayers=Up,Tr.LayerOptimalLinkLength=om,Tr.LayerLongestPathSink=Qv,Tr.LayerLongestPathSource=Uv,Tr.InitDepthFirstOut=sm,Tr.InitDepthFirstIn=Dv,Tr.InitNaive=Ov,Tr.AggressiveNone=Hv,Tr.AggressiveLess=am,Tr.AggressiveMore=Rv,Tr.PackNone=0,Tr.PackExpand=1,Tr.PackStraighten=2,Tr.PackMedian=4,Tr.PackAll=15,Tr.AlignNone=0,Tr.AlignUpperLeft=1,Tr.AlignUpperRight=2,Tr.AlignLowerLeft=4,Tr.AlignLowerRight=8,Tr.AlignAll=15;function af(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}af.className="SegInfo";function Dg(a){Yr.call(this,a)}we(Dg,Yr),Dg.prototype.createVertex=function(){return new Vl(this)},Dg.prototype.createEdge=function(){return new Dp(this)},Dg.className="LayeredDigraphNetwork";function Vl(a){cs.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}we(Vl,cs);function r1(a,y){return a.index-y.index}function lm(a,y){if(!a.$n){for(var x=[],E=Hr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Hr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Zt("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Hr(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=Hr(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}Vl.prototype.Cl=function(a){cs.prototype.Cl.call(this,a),this.bo=this.co=null},Vl.prototype.Kl=function(a){cs.prototype.Kl.call(this,a),this.bo=this.co=null},Vl.prototype.zl=function(a){cs.prototype.zl.call(this,a),this.$n=this.ao=null},Vl.prototype.Jl=function(a){cs.prototype.Jl.call(this,a),this.$n=this.ao=null},de.Object.defineProperties(Vl.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)}}}),Vl.prototype.deleteDestinationEdge=Vl.prototype.Jl,Vl.prototype.addDestinationEdge=Vl.prototype.zl,Vl.prototype.deleteSourceEdge=Vl.prototype.Kl,Vl.prototype.addSourceEdge=Vl.prototype.Cl,Vl.className="LayeredDigraphVertex";function Dp(a){vl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}we(Dp,vl),de.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 Ji(a){co.call(this),this.Ub=new Ae,this.Wn=cm,this.ud=Gu,this.vo=dm,this.Bq=qv,this.$v=[],this.td=!0,this.Rb=gm,this.$d=new rn(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)}we(Ji,co),Ji.prototype.cloneProtected=function(a){co.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)},Ji.prototype.qb=function(a){a.classType===Ji?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:Zt("Unknown enum value: "+a):co.prototype.qb.call(this,a)},Ji.prototype.createNetwork=function(){return new Yd(this)},Ji.prototype.makeNetwork=function(a){function y(E){if(E instanceof gn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof nn){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 me?(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},Ji.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 me&&(y=a),this.path===cm&&y!==null?this.ud=y.isTreePathToChildren?Gu:_d:this.ud=this.path===cm?Gu: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 Ae,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 Ae,this.isValidLayout=!0};function X1(a){var y=new Ae;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ji.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Gu:x.sourceEdges.count===0&&this.Ub.add(x);break;case _d:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Zt("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 Gu: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:Zt("Unhandled path value "+a.ud.toString())}}return E}function zv(a,y){if(y!==null){switch(a.ud){case Gu: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:Zt("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}Ji.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===ju&&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}}Ji.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Z1(this,a)),a.parent!==null&&a.parent.alignment===ju){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])}}Ji.prototype.assignTreeVertexValues=function(){};function A1(a,y){if(y!==null){y.alignment!==ju&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)A1(a,y[E])}}Ji.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:Zt("Unhandled sorting value "+a.sorting.toString())}},Ji.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ji.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=lf(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=ke.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,ke.free(b))};function lf(a){return a===gc||a===ju||a===pc||a===wh}function Op(a){return a===gc||a===ju}function Kv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(lf(x)){if(Op(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===pc)return!0}}return!1}Ji.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=lf(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=Io,Mt.toSpot=qo}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=qo,Mt.toSpot=Io;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=qo,Mt.toSpot=Io;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=Io,Mt.toSpot=qo;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=xs,Mt.toSpot=bs;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=bs,Mt.toSpot=xs;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=bs,Mt.toSpot=xs;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=xs,Mt.toSpot=bs;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===Gu)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)}},Ji.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===ju)u1(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=lf(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=wA(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===zu;var at=ot===Ku,At=lf(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,jt=0,Jt=0,te=null,ie=null,ve=0,An=0,In=0,Cn=0,$e=0,ze=0,bi=0,Ci=0;if(At&&!Op(ot)&&135<b&&tt.reverse(),Op(ot))if(1<rt)for(var yr=0;yr<rt;yr++)yr%2===0&&yr!==rt-1&&(Ci=Math.max(Ci,y?tt[yr].Da.width:tt[yr].Da.height));else rt===1&&(Ci=y?tt[0].Da.width:tt[0].Da.height);if(At){switch(ot){case gc:jt=135>b?h1(this,a,tt,Ci,Dt,jt):c1(this,a,tt,Ci,Dt,jt),Ci=jt.x,Dt=jt.width,jt=jt.height;break;case pc:for(te=0;te<rt;te++)ie=tt[te],ft=ie.Da,Jt=ze===0?0:Bt,y?(ie.S.h(z-ft.width,Cn+Jt),Dt=Math.max(Dt,ft.width),jt=Math.max(jt,Cn+Jt+ft.height),Cn+=Jt+ft.height):(ie.S.h(In+Jt,z-ft.height),Dt=Math.max(Dt,In+Jt+ft.width),jt=Math.max(jt,ft.height),In+=Jt+ft.width),ze++;break;case wh:for(te=0;te<rt;te++)ie=tt[te],z=ie.Da,ft=ze===0?0:Bt,y?(ie.S.h(pt/2+a.focus.x,Cn+ft),Dt=Math.max(Dt,z.width),jt=Math.max(jt,Cn+ft+z.height),Cn+=ft+z.height):(ie.S.h(In+ft,pt/2+a.focus.y),Dt=Math.max(Dt,In+ft+z.width),jt=Math.max(jt,z.height),In+=ft+z.width),ze++}te=nl(this,2),ie=nl(this,2),y?(te[0].h(0,0),te[1].h(0,jt),ie[0].h(Dt,0)):(te[0].h(0,0),te[1].h(Dt,0),ie[0].h(0,jt)),ie[1].h(Dt,jt)}else for(yr=0;yr<rt;yr++){var Kr=tt[yr],ys=Kr.Da;if(y){0<ft&&0<ze&&In+pt+ys.width>ft&&(In<z&&qf(a,ot,z-In,0,bi,yr-1),$e++,ze=0,bi=yr,Jt=jt,In=0,Cn=135<b?-jt-Bt:jt+Bt),um(this,Kr,0,Cn);var Ps=0;if(ze===0)te=Kr.Yo,ie=Kr.kp,ve=ys.width,An=ys.height,(te===null||ie===null||b!==wA(Kr))&&(te=nl(this,2),ie=nl(this,2),te[0].h(0,0),te[1].h(0,An),ie[0].h(ve,0),ie[1].h(ve,An));else{var ya=ni();An=f1(this,a,Kr,te,ie,ve,An,ya),Ps=An.x,te=ya[0],ie=ya[1],ve=An.width,An=An.height,En(ya),In<ys.width&&0>Ps&&(Vd(a,-Ps,0,bi,yr-1),hm(te,-Ps,0),hm(ie,-Ps,0),Ps=0)}Kr.S.h(Ps,Cn),Dt=Math.max(Dt,ve),jt=Math.max(jt,Jt+($e===0?0:Bt)+ys.height),In=ve}else 0<ft&&0<ze&&Cn+pt+ys.height>ft&&(Cn<z&&qf(a,ot,0,z-Cn,bi,yr-1),$e++,ze=0,bi=yr,Jt=Dt,Cn=0,In=135<b?-Dt-Bt:Dt+Bt),um(this,Kr,In,0),Ps=0,ze===0?(te=Kr.Yo,ie=Kr.kp,ve=ys.width,An=ys.height,(te===null||ie===null||b!==wA(Kr))&&(te=nl(this,2),ie=nl(this,2),te[0].h(0,0),te[1].h(ve,0),ie[0].h(0,An),ie[1].h(ve,An))):(ya=ni(),An=f1(this,a,Kr,te,ie,ve,An,ya),Ps=An.x,te=ya[0],ie=ya[1],ve=An.width,An=An.height,En(ya),Cn<ys.height&&0>Ps&&(Vd(a,0,-Ps,bi,yr-1),hm(te,0,-Ps),hm(ie,0,-Ps),Ps=0)),Kr.S.h(In,Ps),jt=Math.max(jt,An),Dt=Math.max(Dt,Jt+($e===0?0:Bt)+ys.width),Cn=An;ze++}switch(0<$e&&(y?(jt+=Math.max(0,x),In<Dt&&qf(a,ot,Dt-In,0,bi,rt-1),0<Mt&&(at||Vd(a,Mt,0,0,rt-1),Dt+=Mt)):(Dt+=Math.max(0,x),Cn<jt&&qf(a,ot,0,jt-Cn,bi,rt-1),0<Mt&&(at||Vd(a,0,Mt,0,rt-1),jt+=Mt))),Mt=at=0,ot){case Hg:y?at+=Dt/2-a.focus.x-xt/2:Mt+=jt/2-a.focus.y-xt/2;break;case Wd:0<$e?y?at+=Dt/2-a.focus.x-xt/2:Mt+=jt/2-a.focus.y-xt/2:y?(Ci=tt[0].S.x+tt[0].la.x,at+=Ci+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Ci)/2-a.focus.x-xt/2):(Ci=tt[0].S.y+tt[0].la.y,Mt+=Ci+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Ci)/2-a.focus.y-xt/2);break;case zu:y?(at-=xt,Dt+=xt):(Mt-=xt,jt+=xt);break;case Ku:y?(at+=Dt-a.width+xt,Dt+=xt):(Mt+=jt-a.height+xt,jt+=xt);break;case gc:y?1<rt?at+=Ci+pt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Mt+=Ci+pt/2-a.focus.y:Mt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case pc:y?at+=Dt+pt/2-a.focus.x:Mt+=jt+pt/2-a.focus.y;break;case wh:break;default:jt=this.customAlignment(a,at,Mt,Dt,jt),at=jt[0],Mt=jt[1],Dt=jt[2],jt=jt[3]}for(xt=0;xt<rt;xt++)Ci=tt[xt],y?Ci.S.h(Ci.S.x+Ci.la.x-at,Ci.S.y+(135<b?(At?-jt:-Ci.Da.height)+Ci.la.y-x:Gt+x+Ci.la.y)):Ci.S.h(Ci.S.x+(135<b?(At?-Dt:-Ci.Da.width)+Ci.la.x-x:E+x+Ci.la.x),Ci.S.y+Ci.la.y-Mt);if(rt=tt=0,At?y?(Dt=jv(a,Dt,at),0>at&&(at=0),135<b&&(Mt+=jt+x),jt+=Gt+x,ot===wh&&(tt+=pt/2+a.focus.x),rt+=Gt+x):(135<b&&(at+=Dt+x),Dt+=E+x,jt=Vv(a,jt,Mt),0>Mt&&(Mt=0),ot===wh&&(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+=jt+x),jt=Math.max(Math.max(jt,Gt),jt+Gt+x),rt+=Gt+x):(135<b&&(at+=Dt+x),Dt=Math.max(Math.max(Dt,E),Dt+E+x),a.comments===null?Gt>jt&&(jt=_v(ot,0,Gt-jt),tt=jt.x,rt=jt.y,jt=Gt,Mt=0):jt=Vv(a,jt,Mt),0>Mt&&(rt-=Mt,Mt=0),tt+=E+x),0<$e)b=nl(this,4),$e=nl(this,4),y?(b[2].h(0,Gt+x),b[3].h(b[2].x,jt),$e[2].h(Dt,b[2].y),$e[3].h($e[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Dt,b[2].y),$e[2].h(b[2].x,jt),$e[3].h(b[3].x,$e[2].y));else{for(b=nl(this,te.length+2),$e=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],$e[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])),$e[0].h(at+E,0),$e[1].h($e[0].x,Gt),$e[2].y<$e[1].y&&($e[2].x<$e[0].x?$e[2].assign($e[1]):$e[1].assign($e[2])),$e[3].y<$e[2].y&&($e[3].x<$e[0].x?$e[3].assign($e[2]):$e[2].assign($e[3])),b[2].y-=x/2,$e[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])),$e[0].h(0,Mt+Gt),$e[1].h(E,$e[0].y),$e[2].x<$e[1].x&&($e[2].y<$e[0].y?$e[2].assign($e[1]):$e[1].assign($e[2])),$e[3].x<$e[2].x&&($e[3].y<$e[0].y?$e[3].assign($e[2]):$e[2].assign($e[3])),b[2].x-=x/2,$e[2].x-=x/2),UA(this,te),UA(this,ie),a.Yo=b,a.kp=$e,a.la.h(at,Mt),a.Da.h(Dt,jt)}break;default:Zt("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=lf(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=wA(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===zu,ft=at===Ku;rt=lf(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 jt=y.height,Jt=0,te=0,ie=0,ve=0,An=0,In=0,Cn=0,$e=0,ze=0,bi=0;if(rt&&!Op(at)&&135<E&&b.reverse(),Op(at))if(1<tt)for(var Ci=0;Ci<tt;Ci++){var yr=b[Ci],Kr=yr.Da;Ci%2===0&&Ci!==tt-1?ze=Math.max(ze,(x?Kr.width:Kr.height)+a.computeBusNodeSpacing(yr)-xt):Ci%2!==0&&(bi=Math.max(bi,(x?Kr.width:Kr.height)+a.computeBusNodeSpacing(yr)-xt))}else tt===1&&(ze=x?b[0].Da.width:b[0].Da.height);if(rt)switch(at){case gc:case ju:te=135>E?h1(a,y,b,ze,Jt,te):c1(a,y,b,ze,Jt,te),ze=te.x,Jt=te.width,te=te.height;break;case pc:for(pt=0;pt<tt;pt++)Mt=b[pt],ie=Mt.Da,bi=Cn===0?0:Gt,x?(Mt.S.h(z-ie.width,An+bi),Jt=Math.max(Jt,ie.width),te=Math.max(te,An+bi+ie.height),An+=bi+ie.height):(Mt.S.h(ve+bi,z-ie.height),Jt=Math.max(Jt,ve+bi+ie.width),te=Math.max(te,ie.height),ve+=bi+ie.width),Cn++;break;case wh:for(z=0;z<tt;z++)pt=b[z],Mt=pt.Da,ie=Cn===0?0:Gt,x?(pt.S.h(xt/2+y.focus.x,An+ie),Jt=Math.max(Jt,Mt.width),te=Math.max(te,An+ie+Mt.height),An+=ie+Mt.height):(pt.S.h(ve+ie,xt/2+y.focus.y),Jt=Math.max(Jt,ve+ie+Mt.width),te=Math.max(te,Mt.height),ve+=ie+Mt.width),Cn++}else for(bi=0;bi<tt;bi++)Ci=b[bi],yr=Ci.Da,x?(0<pt&&0<Cn&&ve+xt+yr.width>pt&&(ve<z&&qf(y,at,z-ve,0,$e,bi-1),In++,Cn=0,$e=bi,ie=te,ve=0,An=135<E?-te-Gt:te+Gt),Kr=Cn===0?Mt:xt,um(a,Ci,0,An),Ci.S.h(ve+Kr,An),Jt=Math.max(Jt,ve+Kr+yr.width),te=Math.max(te,ie+(In===0?0:Gt)+yr.height),ve+=Kr+yr.width):(0<pt&&0<Cn&&An+xt+yr.height>pt&&(An<z&&qf(y,at,0,z-An,$e,bi-1),In++,Cn=0,$e=bi,ie=Jt,An=0,ve=135<E?-Jt-Gt:Jt+Gt),Kr=Cn===0?Mt:xt,um(a,Ci,ve,0),Ci.S.h(ve,An+Kr),te=Math.max(te,An+Kr+yr.height),Jt=Math.max(Jt,ie+(In===0?0:Gt)+yr.width),An+=Kr+yr.height),Cn++;switch(0<In&&(x?(te+=Math.max(0,ot),ve<Jt&&qf(y,at,Jt-ve,0,$e,tt-1),0<Dt&&(ft||Vd(y,Dt,0,0,tt-1),Jt+=Dt)):(Jt+=Math.max(0,ot),An<te&&qf(y,at,0,te-An,$e,tt-1),0<Dt&&(ft||Vd(y,0,Dt,0,tt-1),te+=Dt))),Dt=ft=0,at){case Hg:x?ft+=Jt/2-y.focus.x-Bt/2:Dt+=te/2-y.focus.y-Bt/2;break;case Wd:0<In?x?ft+=Jt/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 zu:x?(ft-=Bt,Jt+=Bt):(Dt-=Bt,te+=Bt);break;case Ku:x?(ft+=Jt-y.width+Bt,Jt+=Bt):(Dt+=te-y.height+Bt,te+=Bt);break;case gc:case ju:x?1<tt?ft+=ze+xt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Dt+=ze+xt/2-y.focus.y:Dt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case pc:x?ft+=Jt+xt/2-y.focus.x:Dt+=te+xt/2-y.focus.y;break;case wh:break;default:a=a.customAlignment(y,ft,Dt,Jt,te),ft=a[0],Dt=a[1],Jt=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:jt+ot+Bt.la.y)):Bt.S.h(Bt.S.x+(135<E?(rt?-Jt:-Bt.Da.width)+Bt.la.x-ot:At+ot+Bt.la.x),Bt.S.y+Bt.la.y-Dt);x?(Jt=jv(y,Jt,ft),0>ft&&(ft=0),135<E&&(Dt+=te+ot),te=Math.max(Math.max(te,jt),te+jt+ot)):(135<E&&(ft+=Jt+ot),Jt=Math.max(Math.max(Jt,At),Jt+At+ot),te=Vv(y,te,Dt),0>Dt&&(Dt=0)),y.la.h(ft,Dt),y.Da.h(Jt,te)}}Ji.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 ke(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new ke(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=wA(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 jt=At===0?0:ot;if(at){var Jt=a.computeBusNodeSpacing(Gt)-rt;Gt.S.h(ft+Jt,pt+jt),b=Math.max(b,ft+Dt.width+Jt),z=Math.max(z,pt+jt+Dt.height),pt+=jt+Dt.height}else Jt=a.computeBusNodeSpacing(Gt)-rt,Gt.S.h(ft+jt,pt+Jt),b=Math.max(b,ft+jt+Dt.width),z=Math.max(z,pt+Dt.height+Jt),ft+=jt+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 ke(E,0,b,z)}function c1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new ke(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new ke(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=wA(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 jt=At===0?0:ot;if(at){var Jt=a.computeBusNodeSpacing(Gt)-rt;pt-=jt+Dt.height,Gt.S.h(ft+Jt,pt),b=Math.max(b,ft+Dt.width+Jt),z=Math.max(z,Math.abs(pt))}else Jt=a.computeBusNodeSpacing(Gt)-rt,ft-=jt+Dt.width,Gt.S.h(ft,pt+Jt),z=Math.max(z,pt+Dt.height+Jt),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 ke(E,0,b,z)}Ji.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ji.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 zu:return a.width>y?a.width:y;case Ku:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case gc:case ju:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case pc:return a.width-a.focus.x+a.nodeSpacing/2+y;case wh: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 zu:return a.height>y?a.height:y;case Ku:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case gc:case ju:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case pc:return a.height-a.focus.y+a.nodeSpacing/2+y;case wh: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 zu:x=y=0;break;case Ku:break;default:Zt("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 Gu: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:Zt("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=wA(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!==wA(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 jt=Gt;Gt=jt.x,jt=jt.y,b+1<xt.length&&(jt=xt[b+1],Gt=jt.x,jt=jt.y,Gt+=E);var Jt=pt;z.y===at?Jt=ot-z.x:z.y>at&&z.y<jt?Jt=ot+(z.y-at)/(jt-at)*(Gt-ot)-z.x:at>z.y&&at<Dt.y&&(Jt=ot-(z.x+(at-z.y)/(Dt.y-z.y)*(Dt.x-z.x))),Jt<pt&&(pt=Jt),Dt.y<=z.y?x++:jt<=at?b++:(Dt.y<=jt&&x++,jt<=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 ke(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]),jt=Gt,Gt=jt.x,jt=jt.y,b+1<xt.length&&(jt=xt[b+1],Gt=jt.x,jt=jt.y,jt+=pt),Jt=E,z.x===ot?Jt=at-z.y:z.x>ot&&z.x<Gt?Jt=at+(z.x-ot)/(Gt-ot)*(jt-at)-z.y:ot>z.x&&ot<Dt.x&&(Jt=at-(z.y+(ot-z.x)/(Dt.x-z.x)*(Dt.y-z.y))),Jt<E&&(E=Jt),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 ke(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)}Ji.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:Zt("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:Zt("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)}}}Ji.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ji.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ji.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 ke(0,z,x,rt))):this.angle===90?(b.push(new ke(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new ke(z,0,rt,x))):(b.push(new ke(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Ji.prototype.commitLayers=function(){},Ji.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ji.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])}}Ji.prototype.setPortSpots=function(a){var y=a.alignment;if(lf(y)){var x=this.ud===Gu,E=wA(a);switch(E){case 0:var b=qo;break;case 90:b=bs;break;case 180:b=Io;break;default:b=xs}var z=a.children,tt=z.length;switch(y){case gc:case ju: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?Io:xs;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=Io;break;case 90:ot=xs;break;case 180:ot=qo;break;default:ot=bs}else y%2===0&&(ot=E===90||E===270?qo:bs);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case pc:for(E=E===90||E===270?qo:bs,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 wh:for(E=E===90||E===270?Io:xs,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=wA(a),this.ud===Gu){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=qo;break;case 90:E.fromSpot=bs;break;case 180:E.fromSpot=Io;break;default:E.fromSpot=xs}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=Io;break;case 90:E.toSpot=xs;break;case 180:E.toSpot=qo;break;default:E.toSpot=bs}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=qo;break;case 90:E.toSpot=bs;break;case 180:E.toSpot=Io;break;default:E.toSpot=xs}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=Io;break;case 90:E.fromSpot=xs;break;case 180:E.fromSpot=qo;break;default:E.fromSpot=bs}else E.fromSpot=a.childPortSpot}};function wA(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ji.prototype.computeLayerSpacing=function(a){var y=wA(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},Ji.prototype.computeNodeIndent=function(a){var y=wA(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)},de.Object.defineProperties(Ji.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()):Zt("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 Re(Ji,"PathDefault",-1),Gu=new Re(Ji,"PathDestination",0),_d=new Re(Ji,"PathSource",1),Og=new Re(Ji,"SortingForwards",10),Hp=new Re(Ji,"SortingReverse",11),Rp=new Re(Ji,"SortingAscending",12),Gp=new Re(Ji,"SortingDescending",13),Hg=new Re(Ji,"AlignmentCenterSubtrees",20),Wd=new Re(Ji,"AlignmentCenterChildren",21),zu=new Re(Ji,"AlignmentStart",22),Ku=new Re(Ji,"AlignmentEnd",23),gc=new Re(Ji,"AlignmentBus",24),ju=new Re(Ji,"AlignmentBusBranching",25),pc=new Re(Ji,"AlignmentTopLeftBus",26),wh=new Re(Ji,"AlignmentBottomRightBus",27),fm=new Re(Ji,"CompactionNone",30),zp=new Re(Ji,"CompactionBlock",31),dm=new Re(Ji,"StyleLayered",40),Yv=new Re(Ji,"StyleLastParents",41),Xv=new Re(Ji,"StyleAlternating",42),Zv=new Re(Ji,"StyleRootOnly",43),gm=new Re(Ji,"ArrangementVertical",50),Jv=new Re(Ji,"ArrangementHorizontal",51),pm=new Re(Ji,"ArrangementFixedRoots",52),qv=new Re(Ji,"LayerIndividual",60),$v=new Re(Ji,"LayerSiblings",61),mm=new Re(Ji,"LayerUniform",62);Ji.className="TreeLayout",Ji.PathDefault=cm,Ji.PathDestination=Gu,Ji.PathSource=_d,Ji.SortingForwards=Og,Ji.SortingReverse=Hp,Ji.SortingAscending=Rp,Ji.SortingDescending=Gp,Ji.AlignmentCenterSubtrees=Hg,Ji.AlignmentCenterChildren=Wd,Ji.AlignmentStart=zu,Ji.AlignmentEnd=Ku,Ji.AlignmentBus=gc,Ji.AlignmentBusBranching=ju,Ji.AlignmentTopLeftBus=pc,Ji.AlignmentBottomRightBus=wh,Ji.CompactionNone=fm,Ji.CompactionBlock=zp,Ji.StyleLayered=dm,Ji.StyleLastParents=Yv,Ji.StyleAlternating=Xv,Ji.StyleRootOnly=Zv,Ji.ArrangementVertical=gm,Ji.ArrangementHorizontal=Jv,Ji.ArrangementFixedRoots=pm,Ji.LayerIndividual=qv,Ji.LayerSiblings=$v,Ji.LayerUniform=mm;function Yd(a){Yr.call(this,a)}we(Yd,Yr),Yd.prototype.createVertex=function(){return new Zl(this)},Yd.prototype.createEdge=function(){return new Rg(this)},Yd.className="TreeNetwork";function Zl(a){cs.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 rn(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=es,this.wr=!0,this.Dp=es}we(Zl,cs),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)},de.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){vl.call(this,a),this.$t=new Ot(0,0)}we(Rg,vl),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 Gu:x=this.fromVertex,E=this.toVertex;break;case _d:x=this.toVertex,E=this.fromVertex;break;default:Zt("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=wA(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===bl,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===Ku?(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===zu?(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===Ku?(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===zu?(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===Ku?(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===zu?(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===Ku?(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===zu?(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))):Zt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=wA(x),y!==wA(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===bl,b=a.isOrthogonal,E=lf(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()))}}},de.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",so.prototype.initializeStandardTools=function(){this.gb("Action",new Cl,this.mouseDownTools),this.gb("Relinking",new Xa,this.mouseDownTools),this.gb("LinkReshaping",new Ro,this.mouseDownTools),this.gb("Rotating",new sa,this.mouseDownTools),this.gb("Resizing",new Gs,this.mouseDownTools),this.gb("Linking",new Rs,this.mouseMoveTools),this.gb("Dragging",new yo,this.mouseMoveTools),this.gb("DragSelecting",new cl,this.mouseMoveTools),this.gb("Panning",new Ns,this.mouseMoveTools),this.gb("ContextMenu",new aa,this.mouseUpTools),this.gb("TextEditing",new Jr,this.mouseUpTools),this.gb("ClickCreating",new yu,this.mouseUpTools),this.gb("ClickSelecting",new rh,this.mouseUpTools)},nu("Horizontal",new to),nu("Spot",new Uo),nu("Table",new ea),nu("Viewbox",new hs),nu("TableRow",new gl),nu("TableColumn",new kl),nu("Graduated",new eu),nu("Grid",new va),Of.add("GraphLinksModel",Cs),Of.add("TreeModel",Kl);var vm=on.go,ty={get licenseKey(){return me.licenseKey},set licenseKey(a){me.licenseKey=a},get version(){return me.version},Group:Ti,EnumValue:Re,List:Vt,Set:Ae,Map:Tn,Point:Ot,Size:rn,Rect:ke,Margin:Vi,Spot:mn,Geometry:en,PathFigure:ss,PathSegment:gr,InputEvent:Is,DiagramEvent:hu,ChangedEvent:po,Model:zn,GraphLinksModel:Ar,TreeModel:Ta,Binding:Xo,Transaction:gs,UndoManager:vo,CommandHandler:Rt,Tool:cr,DraggingTool:yo,DraggingInfo:kA,DraggingOptions:st,LinkingBaseTool:bo,LinkingTool:Rs,RelinkingTool:Xa,LinkReshapingTool:Ro,ResizingTool:Gs,RotatingTool:sa,ClickSelectingTool:rh,ActionTool:Cl,ClickCreatingTool:yu,HTMLInfo:rA,ContextMenuTool:aa,DragSelectingTool:cl,PanningTool:Ns,TextEditingTool:Jr,ToolManager:so,Animation:Qs,AnimationManager:Ha,AnimationTrigger:Hl,Layer:ps,Diagram:me,Palette:ht,Overview:dt,Brush:Fr,GraphObject:re,Panel:je,RowColumnDefinition:is,Shape:Oi,TextBlock:Wr,Picture:ja,Part:ii,Adornment:mr,Node:gn,Link:nn,Placeholder:Ea,Layout:co,LayoutNetwork:Yr,LayoutVertex:cs,LayoutEdge:vl,GridLayout:Ds,PanelLayout:Lr,CircularLayout:Fo,CircularNetwork:Qg,CircularVertex:Tp,CircularEdge:q0,ForceDirectedLayout:Zs,ForceDirectedNetwork:jd,ForceDirectedVertex:Ip,ForceDirectedEdge:Np,LayeredDigraphLayout:Tr,LayeredDigraphNetwork:Dg,LayeredDigraphVertex:Vl,LayeredDigraphEdge:Dp,TreeLayout:Ji,TreeNetwork:Yd,TreeVertex:Zl,TreeEdge:Rg};typeof vm=="object"&&vm.version&&Rn("WARNING: a `go` object on the root object is already defined. "+("Debug"in vm?"debug ":"")+"version: "+vm.version+", replaced with version: "+ty.version),me.prototype.go=ty,on.go=ty,typeof Pn.exports=="object"&&(Pn.exports=typeof ne.g!="undefined"?ne.g.go:self.go)}();var Nt=typeof ne.g!="undefined"?ne.g.go:self.go;const Fe=typeof ne.g!="undefined"?ne.g.go:self.go,Te=Fe.Group,tn=Fe.EnumValue,be=Fe.List,xe=Fe.Set,ye=Fe.Map,De=Fe.Point,Me=Fe.Size,se=Fe.Rect,hn=Fe.Margin,Be=Fe.Spot,un=Fe.Geometry,Qt=Fe.PathFigure,et=Fe.PathSegment,nt=Fe.InputEvent,ct=Fe.DiagramEvent,lt=Fe.ChangedEvent,gt=Fe.Model,yt=Fe.GraphLinksModel,Et=Fe.TreeModel,Tt=Fe.Binding,Yt=Fe.Transaction,Xt=Fe.UndoManager,he=Fe.CommandHandler,fe=Fe.Tool,ue=Fe.DraggingTool,Ye=Fe.DraggingInfo,Le=Fe.LinkingBaseTool,sn=Fe.LinkingTool,vn=Fe.RelinkingTool,On=Fe.LinkReshapingTool,ri=Fe.ResizingTool,Vn=Fe.RotatingTool,Qi=Fe.ClickSelectingTool,Gn=Fe.ActionTool,Ce=Fe.ClickCreatingTool,_t=Fe.HTMLInfo,Bn=Fe.ContextMenuTool,Si=Fe.DragSelectingTool,ei=Fe.PanningTool,_e=Fe.TextEditingTool,Mn=Fe.ToolManager,_n=Fe.Animation,fi=Fe.AnimationManager,Kn=Fe.AnimationTrigger,Pi=Fe.Layer,le=Fe.Diagram,bn=Fe.Palette,ci=Fe.Overview,Ht=Fe.Brush,Lt=Fe.GraphObject,Ct=Fe.Panel,Ut=Fe.RowColumnDefinition,Kt=Fe.Shape,kt=Fe.TextBlock,Pe=Fe.TextBlockMetrics,dn=Fe.Picture,Xe=Fe.Part,Ze=Fe.Adornment,Qe=Fe.Node,ln=Fe.Link,an=Fe.Placeholder,Sn=Fe.Layout,jn=Fe.LayoutNetwork,Wn=Fe.LayoutVertex,wn=Fe.LayoutEdge,qn=Fe.GridLayout,di=Fe.PanelLayout,hr=Fe.CircularLayout,tr=Fe.CircularNetwork,ro=Fe.CircularVertex,pr=Fe.CircularEdge,er=Fe.ForceDirectedLayout,ur=Fe.ForceDirectedNetwork,Lo=Fe.ForceDirectedVertex,Bo=Fe.ForceDirectedEdge,Ur=Fe.LayeredDigraphLayout,Er=Fe.LayeredDigraphNetwork,lo=Fe.LayeredDigraphVertex,Vo=Fe.LayeredDigraphEdge,ko=Fe.TreeLayout,Eo=Fe.TreeNetwork,jr=Fe.TreeVertex,Br=Fe.TreeEdge,Gr=Fe.version},64270:function(Pn){(function(vi,ne){Pn.exports=ne()})(this,function(){"use strict";var vi=function(vt,mt){return vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,wt){St.__proto__=wt}||function(St,wt){for(var It in wt)Object.prototype.hasOwnProperty.call(wt,It)&&(St[It]=wt[It])},vi(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");vi(vt,mt);function St(){this.constructor=vt}vt.prototype=mt===null?Object.create(mt):(St.prototype=mt.prototype,new St)}var Nt=function(){return Nt=Object.assign||function(mt){for(var St,wt=1,It=arguments.length;wt<It;wt++){St=arguments[wt];for(var Wt in St)Object.prototype.hasOwnProperty.call(St,Wt)&&(mt[Wt]=St[Wt])}return mt},Nt.apply(this,arguments)};function Fe(vt,mt,St,wt){function It(Wt){return Wt instanceof St?Wt:new St(function(ae){ae(Wt)})}return new(St||(St=Promise))(function(Wt,ae){function Ee(qe){try{We(wt.next(qe))}catch(pn){ae(pn)}}function ce(qe){try{We(wt.throw(qe))}catch(pn){ae(pn)}}function We(qe){qe.done?Wt(qe.value):It(qe.value).then(Ee,ce)}We((wt=wt.apply(vt,mt||[])).next())})}function Te(vt,mt){var St={label:0,sent:function(){if(Wt[0]&1)throw Wt[1];return Wt[1]},trys:[],ops:[]},wt,It,Wt,ae;return ae={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function Ee(We){return function(qe){return ce([We,qe])}}function ce(We){if(wt)throw new TypeError("Generator is already executing.");for(;St;)try{if(wt=1,It&&(Wt=We[0]&2?It.return:We[0]?It.throw||((Wt=It.return)&&Wt.call(It),0):It.next)&&!(Wt=Wt.call(It,We[1])).done)return Wt;switch(It=0,Wt&&(We=[We[0]&2,Wt.value]),We[0]){case 0:case 1:Wt=We;break;case 4:return St.label++,{value:We[1],done:!1};case 5:St.label++,It=We[1],We=[0];continue;case 7:We=St.ops.pop(),St.trys.pop();continue;default:if(Wt=St.trys,!(Wt=Wt.length>0&&Wt[Wt.length-1])&&(We[0]===6||We[0]===2)){St=0;continue}if(We[0]===3&&(!Wt||We[1]>Wt[0]&&We[1]<Wt[3])){St.label=We[1];break}if(We[0]===6&&St.label<Wt[1]){St.label=Wt[1],Wt=We;break}if(Wt&&St.label<Wt[2]){St.label=Wt[2],St.ops.push(We);break}Wt[2]&&St.ops.pop(),St.trys.pop();continue}We=mt.call(vt,St)}catch(qe){We=[6,qe],It=0}finally{wt=Wt=0}if(We[0]&5)throw We[1];return{value:We[0]?We[1]:void 0,done:!0}}}function tn(vt,mt,St){if(St||arguments.length===2)for(var wt=0,It=mt.length,Wt;wt<It;wt++)(Wt||!(wt in mt))&&(Wt||(Wt=Array.prototype.slice.call(mt,0,wt)),Wt[wt]=mt[wt]);return vt.concat(Wt||mt)}for(var be=function(){function vt(mt,St,wt,It){this.left=mt,this.top=St,this.width=wt,this.height=It}return vt.prototype.add=function(mt,St,wt,It){return new vt(this.left+mt,this.top+St,this.width+wt,this.height+It)},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(It){return It.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}(),xe=function(vt,mt){return be.fromClientRect(vt,mt.getBoundingClientRect())},ye=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)),It=Math.max(Math.max(mt.scrollHeight,St.scrollHeight),Math.max(mt.offsetHeight,St.offsetHeight),Math.max(mt.clientHeight,St.clientHeight));return new be(0,0,wt,It)},De=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var It=vt.charCodeAt(St++);if(It>=55296&&It<=56319&&St<wt){var Wt=vt.charCodeAt(St++);(Wt&64512)===56320?mt.push(((It&1023)<<10)+(Wt&1023)+65536):(mt.push(It),St--)}else mt.push(It)}return mt},Me=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=[],It=-1,Wt="";++It<St;){var ae=vt[It];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(It+1===St||wt.length>16384)&&(Wt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Wt},se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Be=0;Be<se.length;Be++)hn[se.charCodeAt(Be)]=Be;for(var un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),et=0;et<un.length;et++)Qt[un.charCodeAt(et)]=et;for(var nt=function(vt){var mt=vt.length*.75,St=vt.length,wt,It=0,Wt,ae,Ee,ce;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var We=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),qe=Array.isArray(We)?We:new Uint8Array(We);for(wt=0;wt<St;wt+=4)Wt=Qt[vt.charCodeAt(wt)],ae=Qt[vt.charCodeAt(wt+1)],Ee=Qt[vt.charCodeAt(wt+2)],ce=Qt[vt.charCodeAt(wt+3)],qe[It++]=Wt<<2|ae>>4,qe[It++]=(ae&15)<<4|Ee>>2,qe[It++]=(Ee&3)<<6|ce&63;return We},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,Et=2,Tt=yt-gt,Yt=65536>>gt,Xt=1<<gt,he=Xt-1,fe=1024>>gt,ue=Yt+fe,Ye=ue,Le=32,sn=Ye+Le,vn=65536>>yt,On=1<<Tt,ri=On-1,Vn=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},Qi=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},Gn=function(vt,mt){var St=nt(vt),wt=Array.isArray(St)?lt(St):new Uint32Array(St),It=Array.isArray(St)?ct(St):new Uint16Array(St),Wt=24,ae=Vn(It,Wt/2,wt[4]/2),Ee=wt[5]===2?Vn(It,(Wt+wt[4])/2):Qi(wt,Math.ceil((Wt+wt[4])/4));return new Ce(wt[0],wt[1],wt[2],wt[3],ae,Ee)},Ce=function(){function vt(mt,St,wt,It,Wt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=It,this.index=Wt,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<<Et)+(mt&he),this.data[St];if(mt<=65535)return St=this.index[Yt+(mt-55296>>gt)],St=(St<<Et)+(mt&he),this.data[St];if(mt<this.highStart)return St=sn-vn+(mt>>yt),St=this.index[St],St+=mt>>gt&ri,St=this.index[St],St=(St<<Et)+(mt&he),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),_t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Si=0;Si<_t.length;Si++)Bn[_t.charCodeAt(Si)]=Si;var ei="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==",_e=50,Mn=1,_n=2,fi=3,Kn=4,Pi=5,le=7,bn=8,ci=9,Ht=10,Lt=11,Ct=12,Ut=13,Kt=14,kt=15,Pe=16,dn=17,Xe=18,Ze=19,Qe=20,ln=21,an=22,Sn=23,jn=24,Wn=25,wn=26,qn=27,di=28,hr=29,tr=30,ro=31,pr=32,er=33,ur=34,Lo=35,Bo=36,Ur=37,Er=38,lo=39,Vo=40,ko=41,Eo=42,jr=43,Br=[9001,65288],Gr="!",Pt="\xD7",$i="\xF7",Hr=Gn(ei),Dr=[tr,Bo],oo=[Mn,_n,fi,Pi],Ko=[Ht,bn],Fs=[qn,wn],Fi=oo.concat(Ko),xi=[Er,lo,Vo,ur,Lo],Se=[kt,Ut],we=function(vt,mt){mt===void 0&&(mt="strict");var St=[],wt=[],It=[];return vt.forEach(function(Wt,ae){var Ee=Hr.get(Wt);if(Ee>_e?(It.push(!0),Ee-=_e):It.push(!1),["normal","auto","loose"].indexOf(mt)!==-1&&[8208,8211,12316,12448].indexOf(Wt)!==-1)return wt.push(ae),St.push(Pe);if(Ee===Kn||Ee===Lt){if(ae===0)return wt.push(ae),St.push(tr);var ce=St[ae-1];return Fi.indexOf(ce)===-1?(wt.push(wt[ae-1]),St.push(ce)):(wt.push(ae),St.push(tr))}if(wt.push(ae),Ee===ro)return St.push(mt==="strict"?ln:Ur);if(Ee===Eo||Ee===hr)return St.push(tr);if(Ee===jr)return Wt>=131072&&Wt<=196605||Wt>=196608&&Wt<=262141?St.push(Ur):St.push(tr);St.push(Ee)}),[wt,St,It]},de=function(vt,mt,St,wt){var It=wt[St];if(Array.isArray(vt)?vt.indexOf(It)!==-1:vt===It)for(var Wt=St;Wt<=wt.length;){Wt++;var ae=wt[Wt];if(ae===mt)return!0;if(ae!==Ht)break}if(It===Ht)for(var Wt=St;Wt>0;){Wt--;var Ee=wt[Wt];if(Array.isArray(vt)?vt.indexOf(Ee)!==-1:vt===Ee)for(var ce=St;ce<=wt.length;){ce++;var ae=wt[ce];if(ae===mt)return!0;if(ae!==Ht)break}if(Ee!==Ht)break}return!1},Nn=function(vt,mt){for(var St=vt;St>=0;){var wt=mt[St];if(wt===Ht)St--;else return wt}return 0},Un=function(vt,mt,St,wt,It){if(St[wt]===0)return Pt;var Wt=wt-1;if(Array.isArray(It)&&It[Wt]===!0)return Pt;var ae=Wt-1,Ee=Wt+1,ce=mt[Wt],We=ae>=0?mt[ae]:0,qe=mt[Ee];if(ce===_n&&qe===fi)return Pt;if(oo.indexOf(ce)!==-1)return Gr;if(oo.indexOf(qe)!==-1||Ko.indexOf(qe)!==-1)return Pt;if(Nn(Wt,mt)===bn)return $i;if(Hr.get(vt[Wt])===Lt||(ce===pr||ce===er)&&Hr.get(vt[Ee])===Lt||ce===le||qe===le||ce===ci||[Ht,Ut,kt].indexOf(ce)===-1&&qe===ci||[dn,Xe,Ze,jn,di].indexOf(qe)!==-1||Nn(Wt,mt)===an||de(Sn,an,Wt,mt)||de([dn,Xe],ln,Wt,mt)||de(Ct,Ct,Wt,mt))return Pt;if(ce===Ht)return $i;if(ce===Sn||qe===Sn)return Pt;if(qe===Pe||ce===Pe)return $i;if([Ut,kt,ln].indexOf(qe)!==-1||ce===Kt||We===Bo&&Se.indexOf(ce)!==-1||ce===di&&qe===Bo||qe===Qe||Dr.indexOf(qe)!==-1&&ce===Wn||Dr.indexOf(ce)!==-1&&qe===Wn||ce===qn&&[Ur,pr,er].indexOf(qe)!==-1||[Ur,pr,er].indexOf(ce)!==-1&&qe===wn||Dr.indexOf(ce)!==-1&&Fs.indexOf(qe)!==-1||Fs.indexOf(ce)!==-1&&Dr.indexOf(qe)!==-1||[qn,wn].indexOf(ce)!==-1&&(qe===Wn||[an,kt].indexOf(qe)!==-1&&mt[Ee+1]===Wn)||[an,kt].indexOf(ce)!==-1&&qe===Wn||ce===Wn&&[Wn,di,jn].indexOf(qe)!==-1)return Pt;if([Wn,di,jn,dn,Xe].indexOf(qe)!==-1)for(var pn=Wt;pn>=0;){var ti=mt[pn];if(ti===Wn)return Pt;if([di,jn].indexOf(ti)!==-1)pn--;else break}if([qn,wn].indexOf(qe)!==-1)for(var pn=[dn,Xe].indexOf(ce)!==-1?ae:Wt;pn>=0;){var ti=mt[pn];if(ti===Wn)return Pt;if([di,jn].indexOf(ti)!==-1)pn--;else break}if(Er===ce&&[Er,lo,ur,Lo].indexOf(qe)!==-1||[lo,ur].indexOf(ce)!==-1&&[lo,Vo].indexOf(qe)!==-1||[Vo,Lo].indexOf(ce)!==-1&&qe===Vo||xi.indexOf(ce)!==-1&&[Qe,wn].indexOf(qe)!==-1||xi.indexOf(qe)!==-1&&ce===qn||Dr.indexOf(ce)!==-1&&Dr.indexOf(qe)!==-1||ce===jn&&Dr.indexOf(qe)!==-1||Dr.concat(Wn).indexOf(ce)!==-1&&qe===an&&Br.indexOf(vt[Ee])===-1||Dr.concat(Wn).indexOf(qe)!==-1&&ce===Xe)return Pt;if(ce===ko&&qe===ko){for(var ir=St[Wt],Ni=1;ir>0&&(ir--,mt[ir]===ko);)Ni++;if(Ni%2!==0)return Pt}return ce===pr&&qe===er?Pt:$i},mi=function(vt,mt){mt||(mt={lineBreak:"normal",wordBreak:"normal"});var St=we(vt,mt.lineBreak),wt=St[0],It=St[1],Wt=St[2];(mt.wordBreak==="break-all"||mt.wordBreak==="break-word")&&(It=It.map(function(Ee){return[Wn,tr,Eo].indexOf(Ee)!==-1?Ur:Ee}));var ae=mt.wordBreak==="keep-all"?Wt.map(function(Ee,ce){return Ee&&vt[ce]>=19968&&vt[ce]<=40959}):void 0;return[wt,It,ae]},on=function(){function vt(mt,St,wt,It){this.codePoints=mt,this.required=St===Gr,this.start=wt,this.end=It}return vt.prototype.slice=function(){return Me.apply(void 0,this.codePoints.slice(this.start,this.end))},vt}(),Oe=function(vt,mt){var St=De(vt),wt=mi(St,mt),It=wt[0],Wt=wt[1],ae=wt[2],Ee=St.length,ce=0,We=0;return{next:function(){if(We>=Ee)return{done:!0,value:null};for(var qe=Pt;We<Ee&&(qe=Un(St,Wt,It,++We,ae))===Pt;);if(qe!==Pt||We===Ee){var pn=new on(St,qe,ce,We);return ce=We,{value:pn,done:!1}}return{done:!0,value:null}}}},pe=1,ge=2,cn=4,Zt=8,Ue=10,fn=47,Rn=92,He=9,xn=32,Xn=34,Qn=61,yi=35,ni=36,En=37,Jn=39,Ki=40,qi=41,rr=95,Ge=45,eo=33,vr=60,Or=62,Re=64,kn=91,ai=93,gi=61,Bi=123,Li=63,Xi=125,nr=124,qt=126,$t=128,Vt=65533,Ne=42,Ae=43,Je=44,yn=58,Fn=59,wi=46,si=0,Ln=8,Hn=11,Wi=14,Ri=31,Tn=127,Ot=-1,Yi=48,ki=97,Ui=101,ji=102,Gi=117,Zn=122,li=65,Ei=69,oi=70,Ai=85,Cr=90,$n=function(vt){return vt>=Yi&&vt<=57},pi=function(vt){return vt>=55296&&vt<=57343},rn=function(vt){return $n(vt)||vt>=li&&vt<=oi||vt>=ki&&vt<=ji},ui=function(vt){return vt>=ki&&vt<=Zn},or=function(vt){return vt>=li&&vt<=Cr},Mr=function(vt){return ui(vt)||or(vt)},wr=function(vt){return vt>=$t},Pr=function(vt){return vt===Ue||vt===He||vt===xn},Nr=function(vt){return Mr(vt)||wr(vt)||vt===rr},Xr=function(vt){return Nr(vt)||$n(vt)||vt===Ge},To=function(vt){return vt>=si&&vt<=Ln||vt===Hn||vt>=Wi&&vt<=Ri||vt===Tn},Co=function(vt,mt){return vt!==Rn?!1:mt!==Ue},Oo=function(vt,mt,St){return vt===Ge?Nr(mt)||Co(mt,St):Nr(vt)?!0:!!(vt===Rn&&Co(vt,mt))},ke=function(vt,mt,St){return vt===Ae||vt===Ge?$n(mt)?!0:mt===wi&&$n(St):$n(vt===wi?mt:vt)},Rr=function(vt){var mt=0,St=1;(vt[mt]===Ae||vt[mt]===Ge)&&(vt[mt]===Ge&&(St=-1),mt++);for(var wt=[];$n(vt[mt]);)wt.push(vt[mt++]);var It=wt.length?parseInt(Me.apply(void 0,wt),10):0;vt[mt]===wi&&mt++;for(var Wt=[];$n(vt[mt]);)Wt.push(vt[mt++]);var ae=Wt.length,Ee=ae?parseInt(Me.apply(void 0,Wt),10):0;(vt[mt]===Ei||vt[mt]===Ui)&&mt++;var ce=1;(vt[mt]===Ae||vt[mt]===Ge)&&(vt[mt]===Ge&&(ce=-1),mt++);for(var We=[];$n(vt[mt]);)We.push(vt[mt++]);var qe=We.length?parseInt(Me.apply(void 0,We),10):0;return St*(It+Ee*Math.pow(10,-ae))*Math.pow(10,ce*qe)},Js={type:2},fs={type:3},xa={type:4},io={type:13},Nl={type:8},Wa={type:21},Ao={type:9},_o={type:10},al={type:11},na={type:12},Ql={type:14},ha={type:23},Vi={type:1},js={type:25},lu={type:24},Ua={type:26},Qr={type:27},$r={type:28},mn={type:29},ar={type:31},Ir={type:32},Mo=function(){function vt(){this._value=[]}return vt.prototype.write=function(mt){this._value=this._value.concat(De(mt))},vt.prototype.read=function(){for(var mt=[],St=this.consumeToken();St!==Ir;)mt.push(St),St=this.consumeToken();return mt},vt.prototype.consumeToken=function(){var mt=this.consumeCodePoint();switch(mt){case Xn:return this.consumeStringToken(Xn);case yi:var St=this.peekCodePoint(0),wt=this.peekCodePoint(1),It=this.peekCodePoint(2);if(Xr(St)||Co(wt,It)){var Wt=Oo(St,wt,It)?ge:pe,ae=this.consumeName();return{type:5,value:ae,flags:Wt}}break;case ni:if(this.peekCodePoint(0)===Qn)return this.consumeCodePoint(),io;break;case Jn:return this.consumeStringToken(Jn);case Ki:return Js;case qi:return fs;case Ne:if(this.peekCodePoint(0)===Qn)return this.consumeCodePoint(),Ql;break;case Ae:if(ke(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case Je:return xa;case Ge:var Ee=mt,ce=this.peekCodePoint(0),We=this.peekCodePoint(1);if(ke(Ee,ce,We))return this.reconsumeCodePoint(mt),this.consumeNumericToken();if(Oo(Ee,ce,We))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();if(ce===Ge&&We===Or)return this.consumeCodePoint(),this.consumeCodePoint(),lu;break;case wi:if(ke(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case fn:if(this.peekCodePoint(0)===Ne)for(this.consumeCodePoint();;){var qe=this.consumeCodePoint();if(qe===Ne&&(qe=this.consumeCodePoint(),qe===fn))return this.consumeToken();if(qe===Ot)return this.consumeToken()}break;case yn:return Ua;case Fn:return Qr;case vr:if(this.peekCodePoint(0)===eo&&this.peekCodePoint(1)===Ge&&this.peekCodePoint(2)===Ge)return this.consumeCodePoint(),this.consumeCodePoint(),js;break;case Re:var pn=this.peekCodePoint(0),ti=this.peekCodePoint(1),ir=this.peekCodePoint(2);if(Oo(pn,ti,ir)){var ae=this.consumeName();return{type:7,value:ae}}break;case kn:return $r;case Rn:if(Co(mt,this.peekCodePoint(0)))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();break;case ai:return mn;case gi:if(this.peekCodePoint(0)===Qn)return this.consumeCodePoint(),Nl;break;case Bi:return al;case Xi:return na;case Gi:case Ai:var Ni=this.peekCodePoint(0),_i=this.peekCodePoint(1);return Ni===Ae&&(rn(_i)||_i===Li)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();case nr:if(this.peekCodePoint(0)===Qn)return this.consumeCodePoint(),Ao;if(this.peekCodePoint(0)===nr)return this.consumeCodePoint(),Wa;break;case qt:if(this.peekCodePoint(0)===Qn)return this.consumeCodePoint(),_o;break;case Ot:return Ir}return Pr(mt)?(this.consumeWhiteSpace(),ar):$n(mt)?(this.reconsumeCodePoint(mt),this.consumeNumericToken()):Nr(mt)?(this.reconsumeCodePoint(mt),this.consumeIdentLikeToken()):{type:6,value:Me(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();rn(St)&&mt.length<6;)mt.push(St),St=this.consumeCodePoint();for(var wt=!1;St===Li&&mt.length<6;)mt.push(St),St=this.consumeCodePoint(),wt=!0;if(wt){var It=parseInt(Me.apply(void 0,mt.map(function(ce){return ce===Li?Yi:ce})),16),Wt=parseInt(Me.apply(void 0,mt.map(function(ce){return ce===Li?oi:ce})),16);return{type:30,start:It,end:Wt}}var ae=parseInt(Me.apply(void 0,mt),16);if(this.peekCodePoint(0)===Ge&&rn(this.peekCodePoint(1))){this.consumeCodePoint(),St=this.consumeCodePoint();for(var Ee=[];rn(St)&&Ee.length<6;)Ee.push(St),St=this.consumeCodePoint();var Wt=parseInt(Me.apply(void 0,Ee),16);return{type:30,start:ae,end:Wt}}else return{type:30,start:ae,end:ae}},vt.prototype.consumeIdentLikeToken=function(){var mt=this.consumeName();return mt.toLowerCase()==="url"&&this.peekCodePoint(0)===Ki?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Ki?(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===Jn||St===Xn){var wt=this.consumeStringToken(this.consumeCodePoint());return wt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===qi)?(this.consumeCodePoint(),{type:22,value:wt.value}):(this.consumeBadUrlRemnants(),ha)}for(;;){var It=this.consumeCodePoint();if(It===Ot||It===qi)return{type:22,value:Me.apply(void 0,mt)};if(Pr(It))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===qi?(this.consumeCodePoint(),{type:22,value:Me.apply(void 0,mt)}):(this.consumeBadUrlRemnants(),ha);if(It===Xn||It===Jn||It===Ki||To(It))return this.consumeBadUrlRemnants(),ha;if(It===Rn)if(Co(It,this.peekCodePoint(0)))mt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),ha;else mt.push(It)}},vt.prototype.consumeWhiteSpace=function(){for(;Pr(this.peekCodePoint(0));)this.consumeCodePoint()},vt.prototype.consumeBadUrlRemnants=function(){for(;;){var mt=this.consumeCodePoint();if(mt===qi||mt===Ot)return;Co(mt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},vt.prototype.consumeStringSlice=function(mt){for(var St=5e4,wt="";mt>0;){var It=Math.min(St,mt);wt+=Me.apply(void 0,this._value.splice(0,It)),mt-=It}return this._value.shift(),wt},vt.prototype.consumeStringToken=function(mt){var St="",wt=0;do{var It=this._value[wt];if(It===Ot||It===void 0||It===mt)return St+=this.consumeStringSlice(wt),{type:0,value:St};if(It===Ue)return this._value.splice(0,wt),Vi;if(It===Rn){var Wt=this._value[wt+1];Wt!==Ot&&Wt!==void 0&&(Wt===Ue?(St+=this.consumeStringSlice(wt),wt=-1,this._value.shift()):Co(It,Wt)&&(St+=this.consumeStringSlice(wt),St+=Me(this.consumeEscapedCodePoint()),wt=-1))}wt++}while(!0)},vt.prototype.consumeNumber=function(){var mt=[],St=cn,wt=this.peekCodePoint(0);for((wt===Ae||wt===Ge)&&mt.push(this.consumeCodePoint());$n(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0);var It=this.peekCodePoint(1);if(wt===wi&&$n(It))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Zt;$n(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0),It=this.peekCodePoint(1);var Wt=this.peekCodePoint(2);if((wt===Ei||wt===Ui)&&((It===Ae||It===Ge)&&$n(Wt)||$n(It)))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Zt;$n(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());return[Rr(mt),St]},vt.prototype.consumeNumericToken=function(){var mt=this.consumeNumber(),St=mt[0],wt=mt[1],It=this.peekCodePoint(0),Wt=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(Oo(It,Wt,ae)){var Ee=this.consumeName();return{type:15,number:St,flags:wt,unit:Ee}}return It===En?(this.consumeCodePoint(),{type:16,number:St,flags:wt}):{type:17,number:St,flags:wt}},vt.prototype.consumeEscapedCodePoint=function(){var mt=this.consumeCodePoint();if(rn(mt)){for(var St=Me(mt);rn(this.peekCodePoint(0))&&St.length<6;)St+=Me(this.consumeCodePoint());Pr(this.peekCodePoint(0))&&this.consumeCodePoint();var wt=parseInt(St,16);return wt===0||pi(wt)||wt>1114111?Vt:wt}return mt===Ot?Vt:mt},vt.prototype.consumeName=function(){for(var mt="";;){var St=this.consumeCodePoint();if(Xr(St))mt+=Me(St);else if(Co(St,this.peekCodePoint(0)))mt+=Me(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(St),mt}},vt}(),Da=function(){function vt(mt){this._tokens=mt}return vt.create=function(mt){var St=new Mo;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||Es(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"?Ir:mt},vt.prototype.reconsumeToken=function(mt){this._tokens.unshift(mt)},vt}(),qs=function(vt){return vt.type===15},sr=function(vt){return vt.type===17},Vr=function(vt){return vt.type===20},ca=function(vt){return vt.type===0},Ls=function(vt,mt){return Vr(vt)&&vt.value===mt},ia=function(vt){return vt.type!==31},Ya=function(vt){return vt.type!==31&&vt.type!==4},Vs=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},Es=function(vt,mt){return mt===11&&vt.type===12||mt===28&&vt.type===29?!0:mt===2&&vt.type===3},Hs=function(vt){return vt.type===17||vt.type===15},Ss=function(vt){return vt.type===16||Hs(vt)},Lh=function(vt){return vt.length>1?[vt[0],vt[1]]:[vt[0]]},ms={type:17,number:0,flags:cn},Yu={type:16,number:50,flags:cn},Ul={type:16,number:100,flags:cn},tA=function(vt,mt,St){var wt=vt[0],It=vt[1];return[No(wt,mt),No(typeof It!="undefined"?It:wt,St)]},No=function(vt,mt){if(vt.type===16)return vt.number/100*mt;if(qs(vt))switch(vt.unit){case"rem":case"em":return 16*vt.number;case"px":default:return vt.number}return vt.number},ll="deg",Au="grad",Xu="rad",Zu="turn",es={name:"angle",parse:function(vt,mt){if(mt.type===15)switch(mt.unit){case ll:return Math.PI*mt.number/180;case Au:return Math.PI/200*mt.number;case Xu:return mt.number;case Zu:return Math.PI*2*mt.number}throw new Error("Unsupported angle type")}},Fc=function(vt){return vt.type===15&&(vt.unit===ll||vt.unit===Au||vt.unit===Xu||vt.unit===Zu)},Ju=function(vt){var mt=vt.filter(Vr).map(function(St){return St.value}).join(" ");switch(mt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ms,ms];case"to top":case"bottom":return Ba(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ms,Ul];case"to right":case"left":return Ba(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ul,Ul];case"to bottom":case"top":return Ba(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ul,ms];case"to left":case"right":return Ba(270)}return 0},Ba=function(vt){return Math.PI*vt/180},Al={name:"color",parse:function(vt,mt){if(mt.type===18){var St=fa[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),It=mt.value.substring(1,2),Wt=mt.value.substring(2,3);return qo(parseInt(wt+wt,16),parseInt(It+It,16),parseInt(Wt+Wt,16),1)}if(mt.value.length===4){var wt=mt.value.substring(0,1),It=mt.value.substring(1,2),Wt=mt.value.substring(2,3),ae=mt.value.substring(3,4);return qo(parseInt(wt+wt,16),parseInt(It+It,16),parseInt(Wt+Wt,16),parseInt(ae+ae,16)/255)}if(mt.value.length===6){var wt=mt.value.substring(0,2),It=mt.value.substring(2,4),Wt=mt.value.substring(4,6);return qo(parseInt(wt,16),parseInt(It,16),parseInt(Wt,16),1)}if(mt.value.length===8){var wt=mt.value.substring(0,2),It=mt.value.substring(2,4),Wt=mt.value.substring(4,6),ae=mt.value.substring(6,8);return qo(parseInt(wt,16),parseInt(It,16),parseInt(Wt,16),parseInt(ae,16)/255)}}if(mt.type===20){var Ee=os[mt.value.toUpperCase()];if(typeof Ee!="undefined")return Ee}return os.TRANSPARENT}},xs=function(vt){return(255&vt)===0},Io=function(vt){var mt=255&vt,St=255&vt>>8,wt=255&vt>>16,It=255&vt>>24;return mt<255?"rgba("+It+","+wt+","+St+","+mt/255+")":"rgb("+It+","+wt+","+St+")"},qo=function(vt,mt,St,wt){return(vt<<24|mt<<16|St<<8|Math.round(wt*255)<<0)>>>0},bs=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},Po=function(vt,mt){var St=mt.filter(Ya);if(St.length===3){var wt=St.map(bs),It=wt[0],Wt=wt[1],ae=wt[2];return qo(It,Wt,ae,1)}if(St.length===4){var Ee=St.map(bs),It=Ee[0],Wt=Ee[1],ae=Ee[2],ce=Ee[3];return qo(It,Wt,ae,ce)}return 0};function Zr(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 fo=function(vt,mt){var St=mt.filter(Ya),wt=St[0],It=St[1],Wt=St[2],ae=St[3],Ee=(wt.type===17?Ba(wt.number):es.parse(vt,wt))/(Math.PI*2),ce=Ss(It)?It.number/100:0,We=Ss(Wt)?Wt.number/100:0,qe=typeof ae!="undefined"&&Ss(ae)?No(ae,1):1;if(ce===0)return qo(We*255,We*255,We*255,1);var pn=We<=.5?We*(ce+1):We+ce-We*ce,ti=We*2-pn,ir=Zr(ti,pn,Ee+1/3),Ni=Zr(ti,pn,Ee),_i=Zr(ti,pn,Ee-1/3);return qo(ir*255,Ni*255,_i*255,qe)},fa={hsl:fo,hsla:fo,rgb:Po,rgba:Po},ds=function(vt,mt){return Al.parse(vt,Da.create(mt).parseComponentValue())},os={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},Ii={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(Vr(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bl={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},oe=function(vt,mt){var St=Al.parse(vt,mt[0]),wt=mt[1];return wt&&Ss(wt)?{color:St,stop:wt}:{color:St,stop:null}},en=function(vt,mt){var St=vt[0],wt=vt[vt.length-1];St.stop===null&&(St.stop=ms),wt.stop===null&&(wt.stop=Ul);for(var It=[],Wt=0,ae=0;ae<vt.length;ae++){var Ee=vt[ae].stop;if(Ee!==null){var ce=No(Ee,mt);ce>Wt?It.push(ce):It.push(Wt),Wt=ce}else It.push(null)}for(var We=null,ae=0;ae<It.length;ae++){var qe=It[ae];if(qe===null)We===null&&(We=ae);else if(We!==null){for(var pn=ae-We,ti=It[We-1],ir=(qe-ti)/(pn+1),Ni=1;Ni<=pn;Ni++)It[We+Ni-1]=ir*Ni;We=null}}return vt.map(function(_i,ho){var Sr=_i.color;return{color:Sr,stop:Math.max(Math.min(1,It[ho]/mt),0)}})},BA=function(vt,mt,St){var wt=mt/2,It=St/2,Wt=No(vt[0],mt)-wt,ae=It-No(vt[1],St);return(Math.atan2(ae,Wt)+Math.PI*2)%(Math.PI*2)},qu=function(vt,mt,St){var wt=typeof vt=="number"?vt:BA(vt,mt,St),It=Math.abs(mt*Math.sin(wt))+Math.abs(St*Math.cos(wt)),Wt=mt/2,ae=St/2,Ee=It/2,ce=Math.sin(wt-Math.PI/2)*Ee,We=Math.cos(wt-Math.PI/2)*Ee;return[It,Wt-We,Wt+We,ae-ce,ae+ce]},Ts=function(vt,mt){return Math.sqrt(vt*vt+mt*mt)},CA=function(vt,mt,St,wt,It){var Wt=[[0,0],[0,mt],[vt,0],[vt,mt]];return Wt.reduce(function(ae,Ee){var ce=Ee[0],We=Ee[1],qe=Ts(St-ce,wt-We);return(It?qe<ae.optimumDistance:qe>ae.optimumDistance)?{optimumCorner:Ee,optimumDistance:qe}:ae},{optimumDistance:It?1/0:-1/0,optimumCorner:null}).optimumCorner},$u=function(vt,mt,St,wt,It){var Wt=0,ae=0;switch(vt.size){case 0:vt.shape===0?Wt=ae=Math.min(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-It)):vt.shape===1&&(Wt=Math.min(Math.abs(mt),Math.abs(mt-wt)),ae=Math.min(Math.abs(St),Math.abs(St-It)));break;case 2:if(vt.shape===0)Wt=ae=Math.min(Ts(mt,St),Ts(mt,St-It),Ts(mt-wt,St),Ts(mt-wt,St-It));else if(vt.shape===1){var Ee=Math.min(Math.abs(St),Math.abs(St-It))/Math.min(Math.abs(mt),Math.abs(mt-wt)),ce=CA(wt,It,mt,St,!0),We=ce[0],qe=ce[1];Wt=Ts(We-mt,(qe-St)/Ee),ae=Ee*Wt}break;case 1:vt.shape===0?Wt=ae=Math.max(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-It)):vt.shape===1&&(Wt=Math.max(Math.abs(mt),Math.abs(mt-wt)),ae=Math.max(Math.abs(St),Math.abs(St-It)));break;case 3:if(vt.shape===0)Wt=ae=Math.max(Ts(mt,St),Ts(mt,St-It),Ts(mt-wt,St),Ts(mt-wt,St-It));else if(vt.shape===1){var Ee=Math.max(Math.abs(St),Math.abs(St-It))/Math.max(Math.abs(mt),Math.abs(mt-wt)),pn=CA(wt,It,mt,St,!1),We=pn[0],qe=pn[1];Wt=Ts(We-mt,(qe-St)/Ee),ae=Ee*Wt}break}return Array.isArray(vt.size)&&(Wt=No(vt.size[0],wt),ae=vt.size.length===2?No(vt.size[1],It):Wt),[Wt,ae]},mf=function(vt,mt){var St=Ba(180),wt=[];return Vs(mt).forEach(function(It,Wt){if(Wt===0){var ae=It[0];if(ae.type===20&&ae.value==="to"){St=Ju(It);return}else if(Fc(ae)){St=es.parse(vt,ae);return}}var Ee=oe(vt,It);wt.push(Ee)}),{angle:St,stops:wt,type:1}},uu=function(vt,mt){var St=Ba(180),wt=[];return Vs(mt).forEach(function(It,Wt){if(Wt===0){var ae=It[0];if(ae.type===20&&["top","left","right","bottom"].indexOf(ae.value)!==-1){St=Ju(It);return}else if(Fc(ae)){St=(es.parse(vt,ae)+Ba(270))%Ba(360);return}}var Ee=oe(vt,It);wt.push(Ee)}),{angle:St,stops:wt,type:1}},ss=function(vt,mt){var St=Ba(180),wt=[],It=1,Wt=0,ae=3,Ee=[];return Vs(mt).forEach(function(ce,We){var qe=ce[0];if(We===0){if(Vr(qe)&&qe.value==="linear"){It=1;return}else if(Vr(qe)&&qe.value==="radial"){It=2;return}}if(qe.type===18){if(qe.name==="from"){var pn=Al.parse(vt,qe.values[0]);wt.push({stop:ms,color:pn})}else if(qe.name==="to"){var pn=Al.parse(vt,qe.values[0]);wt.push({stop:Ul,color:pn})}else if(qe.name==="color-stop"){var ti=qe.values.filter(Ya);if(ti.length===2){var pn=Al.parse(vt,ti[1]),ir=ti[0];sr(ir)&&wt.push({stop:{type:16,number:ir.number*100,flags:ir.flags},color:pn})}}}}),It===1?{angle:(St+Ba(180))%Ba(360),stops:wt,type:It}:{size:ae,shape:Wt,stops:wt,position:Ee,type:It}},gr="closest-side",Ca="farthest-side",ul="closest-corner",ns="farthest-corner",zr="circle",Ms="ellipse",Oa="cover",Ho="contain",hl=function(vt,mt){var St=0,wt=3,It=[],Wt=[];return Vs(mt).forEach(function(ae,Ee){var ce=!0;if(Ee===0){var We=!1;ce=ae.reduce(function(pn,ti){if(We)if(Vr(ti))switch(ti.value){case"center":return Wt.push(Yu),pn;case"top":case"left":return Wt.push(ms),pn;case"right":case"bottom":return Wt.push(Ul),pn}else(Ss(ti)||Hs(ti))&&Wt.push(ti);else if(Vr(ti))switch(ti.value){case zr:return St=0,!1;case Ms:return St=1,!1;case"at":return We=!0,!1;case gr:return wt=0,!1;case Oa:case Ca:return wt=1,!1;case Ho:case ul:return wt=2,!1;case ns:return wt=3,!1}else if(Hs(ti)||Ss(ti))return Array.isArray(wt)||(wt=[]),wt.push(ti),!1;return pn},ce)}if(ce){var qe=oe(vt,ae);It.push(qe)}}),{size:wt,shape:St,stops:It,position:Wt,type:2}},Is=function(vt,mt){var St=0,wt=3,It=[],Wt=[];return Vs(mt).forEach(function(ae,Ee){var ce=!0;if(Ee===0?ce=ae.reduce(function(qe,pn){if(Vr(pn))switch(pn.value){case"center":return Wt.push(Yu),!1;case"top":case"left":return Wt.push(ms),!1;case"right":case"bottom":return Wt.push(Ul),!1}else if(Ss(pn)||Hs(pn))return Wt.push(pn),!1;return qe},ce):Ee===1&&(ce=ae.reduce(function(qe,pn){if(Vr(pn))switch(pn.value){case zr:return St=0,!1;case Ms:return St=1,!1;case Ho:case gr:return wt=0,!1;case Ca:return wt=1,!1;case ul:return wt=2,!1;case Oa:case ns:return wt=3,!1}else if(Hs(pn)||Ss(pn))return Array.isArray(wt)||(wt=[]),wt.push(pn),!1;return qe},ce)),ce){var We=oe(vt,ae);It.push(We)}}),{size:wt,shape:St,stops:It,position:Wt,type:2}},hu=function(vt){return vt.type===1},po=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=Qo[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 uo(vt){return!(vt.type===20&&vt.value==="none")&&(vt.type!==18||!!Qo[vt.name])}var Qo={"linear-gradient":mf,"-moz-linear-gradient":uu,"-ms-linear-gradient":uu,"-o-linear-gradient":uu,"-webkit-linear-gradient":uu,"radial-gradient":hl,"-moz-radial-gradient":Is,"-ms-radial-gradient":Is,"-o-radial-gradient":Is,"-webkit-radial-gradient":Is,"-webkit-gradient":ss},$o={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 Ya(wt)&&uo(wt)}).map(function(wt){return da.parse(vt,wt)})}},gs={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(Vr(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},vo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(vt,mt){return Vs(mt).map(function(St){return St.filter(Ss)}).map(Lh)}},th={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(vt,mt){return Vs(mt).map(function(St){return St.filter(Vr).map(function(wt){return wt.value}).join(" ")}).map(cr)}},cr=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}},eh;(function(vt){vt.AUTO="auto",vt.CONTAIN="contain",vt.COVER="cover"})(eh||(eh={}));var so={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(vt,mt){return Vs(mt).map(function(St){return St.filter(ig)})}},ig=function(vt){return Vr(vt)||Ss(vt)},zA=function(vt){return{name:"border-"+vt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Lc=zA("top"),sd=zA("right"),vf=zA("bottom"),KA=zA("left"),PA=function(vt){return{name:"border-radius-"+vt,initialValue:"0 0",prefix:!1,type:1,parse:function(mt,St){return Lh(St.filter(Ss))}}},yo=PA("top-left"),FA=PA("top-right"),yf=PA("bottom-right"),nh=PA("bottom-left"),Eh=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}}},jA=Eh("top"),Dl=Eh("right"),cu=Eh("bottom"),eA=Eh("left"),nA=function(vt){return{name:"border-"+vt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(mt,St){return qs(St)?St.number:0}}},wf=nA("top"),ad=nA("right"),ld=nA("bottom"),rg=nA("left"),fu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},du={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(Vr).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}},as;(function(vt){vt.NORMAL="normal",vt.STRICT="strict"})(as||(as={}));var gu={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"strict":return as.STRICT;case"normal":default:return as.NORMAL}}},bo={name:"line-height",initialValue:"normal",prefix:!1,type:4},_s=function(vt,mt){return Vr(vt)&&vt.value==="normal"?1.2*mt:vt.type===17?mt*vt.number:Ss(vt)?No(vt,mt):mt},ra={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)}},oa={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}}},pu={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}}},Rs=function(vt){return{name:"margin-"+vt,initialValue:"0",prefix:!1,type:4}},ih=Rs("top"),sg=Rs("right"),ag=Rs("bottom"),Xa=Rs("left"),Sf={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(Vr).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}})}},Ro={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"}}},iA=function(vt){return{name:"padding-"+vt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ad=iA("top"),mu=iA("right"),vu=iA("bottom"),xf=iA("left"),Gs={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}}},sa={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}},rh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Ls(mt[0],"none")?[]:Vs(mt).map(function(St){for(var wt={color:os.TRANSPARENT,offsetX:ms,offsetY:ms,blur:ms},It=0,Wt=0;Wt<St.length;Wt++){var ae=St[Wt];Hs(ae)?(It===0?wt.offsetX=ae:It===1?wt.offsetY=ae:wt.blur=ae,It++):wt.color=Al.parse(vt,ae)}return wt})}},Cl={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}},yu={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=rA[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+mt.name+'"');return St(mt.values)}return null}},cl=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 It=mt[4],Wt=mt[5];mt[6],mt[7],mt[8],mt[9],mt[10],mt[11];var ae=mt[12],Ee=mt[13];return mt[14],mt[15],mt.length===16?[St,wt,It,Wt,ae,Ee]:null},rA={matrix:cl,matrix3d:Ns},fl={type:16,number:50,flags:cn},aa=[fl,fl],Ol={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(vt,mt){var St=mt.filter(Ss);return St.length!==2?aa:[St[0],St[1]]}},Go={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 VA={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}}},wu={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(vt,mt){if(mt.type===20)return{auto:!0,order:0};if(sr(mt))return{auto:!1,order:mt.number};throw new Error("Invalid z-index number parsed")}},Su={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")}},Ec={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(vt,mt){return sr(mt)?mt.number:1}},Mh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Mc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(Vr).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})}},Jr={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(vt,mt){var St=[],wt=[];return mt.forEach(function(It){switch(It.type){case 20:case 0:St.push(It.value);break;case 17:St.push(It.number.toString());break;case 4:wt.push(St.join(" ")),St.length=0;break}}),St.length&&wt.push(St.join(" ")),wt.map(function(It){return It.indexOf(" ")===-1?It:"'"+It+"'"})}},kc={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(sr(mt))return mt.number;if(Vr(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(Vr).map(function(St){return St.value})}},oA={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"}}},Ws=function(vt,mt){return(vt&mt)!==0},bc={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=[],It=mt.filter(ia),Wt=0;Wt<It.length;Wt++){var ae=It[Wt],Ee=It[Wt+1];if(ae.type===20){var ce=Ee&&sr(Ee)?Ee.number:1;wt.push({counter:ae.value,increment:ce})}}return wt}},kh={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return[];for(var St=[],wt=mt.filter(ia),It=0;It<wt.length;It++){var Wt=wt[It],ae=wt[It+1];if(Vr(Wt)&&Wt.value!=="none"){var Ee=ae&&sr(ae)?ae.number:0;St.push({counter:Wt.value,reset:Ee})}}return St}},Cf={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(qs).map(function(St){return Su.parse(vt,St)})}},bh={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=[],It=mt.filter(ca);if(It.length%2!==0)return null;for(var Wt=0;Wt<It.length;Wt+=2){var ae=It[Wt].value,Ee=It[Wt+1].value;wt.push({open:ae,close:Ee})}return wt}},Th=function(vt,mt,St){if(!vt)return"";var wt=vt[Math.min(mt,vt.length-1)];return wt?St?wt.open:wt.close:""},Tc={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Ls(mt[0],"none")?[]:Vs(mt).map(function(St){for(var wt={color:255,offsetX:ms,offsetY:ms,blur:ms,spread:ms,inset:!1},It=0,Wt=0;Wt<St.length;Wt++){var ae=St[Wt];Ls(ae,"inset")?wt.inset=!0:Hs(ae)?(It===0?wt.offsetX=ae:It===1?wt.offsetY=ae:It===2?wt.blur=ae:wt.spread=ae,It++):wt.color=Al.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(Vr).forEach(function(It){switch(It.value){case"stroke":wt.push(1);break;case"fill":wt.push(0);break;case"markers":wt.push(2);break}}),St.forEach(function(It){wt.indexOf(It)===-1&&wt.push(It)}),wt}},Ic={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Ih={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(vt,mt){return qs(mt)?mt.number:0}},xu=function(){function vt(mt,St){var wt,It;this.animationDuration=fr(mt,Cf,St.animationDuration),this.backgroundClip=fr(mt,Ii,St.backgroundClip),this.backgroundColor=fr(mt,Bl,St.backgroundColor),this.backgroundImage=fr(mt,$o,St.backgroundImage),this.backgroundOrigin=fr(mt,gs,St.backgroundOrigin),this.backgroundPosition=fr(mt,vo,St.backgroundPosition),this.backgroundRepeat=fr(mt,th,St.backgroundRepeat),this.backgroundSize=fr(mt,so,St.backgroundSize),this.borderTopColor=fr(mt,Lc,St.borderTopColor),this.borderRightColor=fr(mt,sd,St.borderRightColor),this.borderBottomColor=fr(mt,vf,St.borderBottomColor),this.borderLeftColor=fr(mt,KA,St.borderLeftColor),this.borderTopLeftRadius=fr(mt,yo,St.borderTopLeftRadius),this.borderTopRightRadius=fr(mt,FA,St.borderTopRightRadius),this.borderBottomRightRadius=fr(mt,yf,St.borderBottomRightRadius),this.borderBottomLeftRadius=fr(mt,nh,St.borderBottomLeftRadius),this.borderTopStyle=fr(mt,jA,St.borderTopStyle),this.borderRightStyle=fr(mt,Dl,St.borderRightStyle),this.borderBottomStyle=fr(mt,cu,St.borderBottomStyle),this.borderLeftStyle=fr(mt,eA,St.borderLeftStyle),this.borderTopWidth=fr(mt,wf,St.borderTopWidth),this.borderRightWidth=fr(mt,ad,St.borderRightWidth),this.borderBottomWidth=fr(mt,ld,St.borderBottomWidth),this.borderLeftWidth=fr(mt,rg,St.borderLeftWidth),this.boxShadow=fr(mt,Tc,St.boxShadow),this.color=fr(mt,fu,St.color),this.direction=fr(mt,du,St.direction),this.display=fr(mt,Jg,St.display),this.float=fr(mt,$g,St.cssFloat),this.fontFamily=fr(mt,Jr,St.fontFamily),this.fontSize=fr(mt,kc,St.fontSize),this.fontStyle=fr(mt,oA,St.fontStyle),this.fontVariant=fr(mt,Bf,St.fontVariant),this.fontWeight=fr(mt,ud,St.fontWeight),this.letterSpacing=fr(mt,og,St.letterSpacing),this.lineBreak=fr(mt,gu,St.lineBreak),this.lineHeight=fr(mt,bo,St.lineHeight),this.listStyleImage=fr(mt,ra,St.listStyleImage),this.listStylePosition=fr(mt,oa,St.listStylePosition),this.listStyleType=fr(mt,pu,St.listStyleType),this.marginTop=fr(mt,ih,St.marginTop),this.marginRight=fr(mt,sg,St.marginRight),this.marginBottom=fr(mt,ag,St.marginBottom),this.marginLeft=fr(mt,Xa,St.marginLeft),this.opacity=fr(mt,Ec,St.opacity);var Wt=fr(mt,Sf,St.overflow);this.overflowX=Wt[0],this.overflowY=Wt[Wt.length>1?1:0],this.overflowWrap=fr(mt,Ro,St.overflowWrap),this.paddingTop=fr(mt,Ad,St.paddingTop),this.paddingRight=fr(mt,mu,St.paddingRight),this.paddingBottom=fr(mt,vu,St.paddingBottom),this.paddingLeft=fr(mt,xf,St.paddingLeft),this.paintOrder=fr(mt,hd,St.paintOrder),this.position=fr(mt,sa,St.position),this.textAlign=fr(mt,Gs,St.textAlign),this.textDecorationColor=fr(mt,Mh,(wt=St.textDecorationColor)!==null&&wt!==void 0?wt:St.color),this.textDecorationLine=fr(mt,Mc,(It=St.textDecorationLine)!==null&&It!==void 0?It:St.textDecoration),this.textShadow=fr(mt,rh,St.textShadow),this.textTransform=fr(mt,Cl,St.textTransform),this.transform=fr(mt,yu,St.transform),this.transformOrigin=fr(mt,Ol,St.transformOrigin),this.visibility=fr(mt,Go,St.visibility),this.webkitTextStrokeColor=fr(mt,Ic,St.webkitTextStrokeColor),this.webkitTextStrokeWidth=fr(mt,Ih,St.webkitTextStrokeWidth),this.wordBreak=fr(mt,VA,St.wordBreak),this.zIndex=fr(mt,wu,St.zIndex)}return vt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},vt.prototype.isTransparent=function(){return xs(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 Ws(this.display,4)||Ws(this.display,33554432)||Ws(this.display,268435456)||Ws(this.display,536870912)||Ws(this.display,67108864)||Ws(this.display,134217728)},vt}(),Ha=function(){function vt(mt,St){this.content=fr(mt,bc,St.content),this.quotes=fr(mt,bh,St.quotes)}return vt}(),sA=function(){function vt(mt,St){this.counterIncrement=fr(mt,tp,St.counterIncrement),this.counterReset=fr(mt,kh,St.counterReset)}return vt}(),fr=function(vt,mt,St){var wt=new Mo,It=St!==null&&typeof St!="undefined"?St.toString():mt.initialValue;wt.write(It);var Wt=new Da(wt.read());switch(mt.type){case 2:var ae=Wt.parseComponentValue();return mt.parse(vt,Vr(ae)?ae.value:mt.initialValue);case 0:return mt.parse(vt,Wt.parseComponentValue());case 1:return mt.parse(vt,Wt.parseComponentValues());case 4:return Wt.parseComponentValue();case 3:switch(mt.format){case"angle":return es.parse(vt,Wt.parseComponentValue());case"color":return Al.parse(vt,Wt.parseComponentValue());case"image":return da.parse(vt,Wt.parseComponentValue());case"length":var Ee=Wt.parseComponentValue();return Hs(Ee)?Ee:ms;case"length-percentage":var ce=Wt.parseComponentValue();return Ss(ce)?ce:ms;case"time":return Su.parse(vt,Wt.parseComponentValue())}break}},_A="data-html2canvas-debug",Pf=function(vt){var mt=vt.getAttribute(_A);switch(mt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Nh=function(vt,mt){var St=Pf(vt);return St===1||mt===St},aA=function(){function vt(mt,St){if(this.context=mt,this.textNodes=[],this.elements=[],this.flags=0,Nh(St,3))debugger;this.styles=new xu(mt,window.getComputedStyle(St,null)),Yh(St)&&(this.styles.animationDuration.some(function(wt){return wt>0})&&(St.style.animationDuration="0s"),this.styles.transform!==null&&(St.style.transform="none")),this.bounds=xe(this.context,St),Nh(St,4)&&(this.flags|=16)}return vt}(),Bu="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Cu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),oh=0;oh<Cu.length;oh++)Qh[Cu.charCodeAt(oh)]=oh;for(var Pa=function(vt){var mt=vt.length*.75,St=vt.length,wt,It=0,Wt,ae,Ee,ce;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var We=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),qe=Array.isArray(We)?We:new Uint8Array(We);for(wt=0;wt<St;wt+=4)Wt=Qh[vt.charCodeAt(wt)],ae=Qh[vt.charCodeAt(wt+1)],Ee=Qh[vt.charCodeAt(wt+2)],ce=Qh[vt.charCodeAt(wt+3)],qe[It++]=Wt<<2|ae>>4,qe[It++]=(ae&15)<<4|Ee>>2,qe[It++]=(Ee&3)<<6|ce&63;return We},sh=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},lA=5,ah=11,AA=2,Nc=ah-lA,Ff=65536>>lA,Qs=1<<lA,lh=Qs-1,Pu=1024>>lA,Ah=Ff+Pu,Qc=Ah,fd=32,Uh=Qc+fd,lg=65536>>ah,uh=1<<Nc,Hl=uh-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))},hh=function(vt,mt){var St=Pa(vt),wt=Array.isArray(St)?cd(St):new Uint32Array(St),It=Array.isArray(St)?sh(St):new Uint16Array(St),Wt=24,ae=dd(It,Wt/2,wt[4]/2),Ee=wt[5]===2?dd(It,(Wt+wt[4])/2):gd(wt,Math.ceil((Wt+wt[4])/4));return new Dh(wt[0],wt[1],wt[2],wt[3],ae,Ee)},Dh=function(){function vt(mt,St,wt,It,Wt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=It,this.index=Wt,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>>lA],St=(St<<AA)+(mt&lh),this.data[St];if(mt<=65535)return St=this.index[Ff+(mt-55296>>lA)],St=(St<<AA)+(mt&lh),this.data[St];if(mt<this.highStart)return St=Uh-lg+(mt>>ah),St=this.index[St],St+=mt>>lA&Hl,St=this.index[St],St=(St<<AA)+(mt&lh),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Uc=0;Uc<ps.length;Uc++)WA[ps.charCodeAt(Uc)]=Uc;var Lf=1,Ef=2,me=3,Fu=4,uA=5,Ag=7,Mf=8,kf=9,Dc=10,ug=11,la=12,Oh=13,bf=14,Tf=15,hg=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var It=vt.charCodeAt(St++);if(It>=55296&&It<=56319&&St<wt){var Wt=vt.charCodeAt(St++);(Wt&64512)===56320?mt.push(((It&1023)<<10)+(Wt&1023)+65536):(mt.push(It),St--)}else mt.push(It)}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=[],It=-1,Wt="";++It<St;){var ae=vt[It];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(It+1===St||wt.length>16384)&&(Wt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Wt},fg=hh(Bu),Pl="\xD7",Ja="\xF7",Hh=function(vt){return fg.get(vt)},pd=function(vt,mt,St){var wt=St-2,It=mt[wt],Wt=mt[St-1],ae=mt[St];if(Wt===Ef&&ae===me)return Pl;if(Wt===Ef||Wt===me||Wt===Fu||ae===Ef||ae===me||ae===Fu)return Ja;if(Wt===Mf&&[Mf,kf,ug,la].indexOf(ae)!==-1||(Wt===ug||Wt===kf)&&(ae===kf||ae===Dc)||(Wt===la||Wt===Dc)&&ae===Dc||ae===Oh||ae===uA||ae===Ag||Wt===Lf)return Pl;if(Wt===Oh&&ae===bf){for(;It===uA;)It=mt[--wt];if(It===bf)return Pl}if(Wt===Tf&&ae===Tf){for(var Ee=0;It===Tf;)Ee++,It=mt[--wt];if(Ee%2===0)return Pl}return Ja},LA=function(vt){var mt=hg(vt),St=mt.length,wt=0,It=0,Wt=mt.map(Hh);return{next:function(){if(wt>=St)return{done:!0,value:null};for(var ae=Pl;wt<St&&(ae=pd(mt,Wt,++wt))===Pl;);if(ae!==Pl||wt===St){var Ee=cg.apply(null,mt.slice(It,wt));return It=wt,{value:Ee,done:!1}}return{done:!0,value:null}}}},Oc=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 It=St.getBoundingClientRect(),Wt=Math.round(It.height);if(vt.body.removeChild(wt),Wt===mt)return!0}}return!1},Hc=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,It=De(wt.data).map(function(ce){return Me(ce)}),Wt=0,ae={},Ee=It.every(function(ce,We){St.setStart(wt,Wt),St.setEnd(wt,Wt+ce.length);var qe=St.getBoundingClientRect();Wt+=ce.length;var pn=qe.x>ae.x||qe.y>ae.y;return ae=qe,We===0?!0:pn});return vt.body.removeChild(mt),Ee},dl=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(It){return!1}return!0},Fl=function(vt){return vt[0]===0&&vt[1]===255&&vt[2]===0&&vt[3]===255},Rh=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 It=new Image,Wt=mt.toDataURL();It.src=Wt;var ae=Rc(St,St,0,0,It);return wt.fillStyle="red",wt.fillRect(0,0,St,St),yd(ae).then(function(Ee){wt.drawImage(Ee,0,0);var ce=wt.getImageData(0,0,St,St).data;wt.fillStyle="red",wt.fillRect(0,0,St,St);var We=vt.createElement("div");return We.style.backgroundImage="url("+Wt+")",We.style.height=St+"px",Fl(ce)?yd(Rc(St,St,0,0,We)):Promise.reject(!1)}).then(function(Ee){return wt.drawImage(Ee,0,0),Fl(wt.getImageData(0,0,St,St).data)}).catch(function(){return!1})},Rc=function(vt,mt,St,wt,It){var Wt="http://www.w3.org/2000/svg",ae=document.createElementNS(Wt,"svg"),Ee=document.createElementNS(Wt,"foreignObject");return ae.setAttributeNS(null,"width",vt.toString()),ae.setAttributeNS(null,"height",mt.toString()),Ee.setAttributeNS(null,"width","100%"),Ee.setAttributeNS(null,"height","100%"),Ee.setAttributeNS(null,"x",St.toString()),Ee.setAttributeNS(null,"y",wt.toString()),Ee.setAttributeNS(null,"externalResourcesRequired","true"),ae.appendChild(Ee),Ee.appendChild(It),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))})},zs={get SUPPORT_RANGE_BOUNDS(){var vt=If(document);return Object.defineProperty(zs,"SUPPORT_RANGE_BOUNDS",{value:vt}),vt},get SUPPORT_WORD_BREAKING(){var vt=zs.SUPPORT_RANGE_BOUNDS&&Hc(document);return Object.defineProperty(zs,"SUPPORT_WORD_BREAKING",{value:vt}),vt},get SUPPORT_SVG_DRAWING(){var vt=vd(document);return Object.defineProperty(zs,"SUPPORT_SVG_DRAWING",{value:vt}),vt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var vt=typeof Array.from=="function"&&typeof window.fetch=="function"?Rh(document):Promise.resolve(!1);return Object.defineProperty(zs,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:vt}),vt},get SUPPORT_CORS_IMAGES(){var vt=dl();return Object.defineProperty(zs,"SUPPORT_CORS_IMAGES",{value:vt}),vt},get SUPPORT_RESPONSE_TYPE(){var vt=md();return Object.defineProperty(zs,"SUPPORT_RESPONSE_TYPE",{value:vt}),vt},get SUPPORT_CORS_XHR(){var vt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(zs,"SUPPORT_CORS_XHR",{value:vt}),vt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var vt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(zs,"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 It=Kh(mt,St),Wt=[],ae=0;return It.forEach(function(Ee){if(St.textDecorationLine.length||Ee.trim().length>0)if(zs.SUPPORT_RANGE_BOUNDS){var ce=Gh(wt,ae,Ee.length).getClientRects();if(ce.length>1){var We=zh(Ee),qe=0;We.forEach(function(ti){Wt.push(new ga(ti,be.fromDOMRectList(vt,Gh(wt,qe+ae,ti.length).getClientRects()))),qe+=ti.length})}else Wt.push(new ga(Ee,be.fromDOMRectList(vt,ce)))}else{var pn=wt.splitText(Ee.length);Wt.push(new ga(Ee,Us(vt,wt))),wt=pn}else zs.SUPPORT_RANGE_BOUNDS||(wt=wt.splitText(Ee.length));ae+=Ee.length}),Wt},Us=function(vt,mt){var St=mt.ownerDocument;if(St){var wt=St.createElement("html2canvaswrapper");wt.appendChild(mt.cloneNode(!0));var It=mt.parentNode;if(It){It.replaceChild(wt,mt);var Wt=xe(vt,wt);return wt.firstChild&&It.replaceChild(wt.firstChild,wt),Wt}}return be.EMPTY},Gh=function(vt,mt,St){var wt=vt.ownerDocument;if(!wt)throw new Error("Node has no owner document");var It=wt.createRange();return It.setStart(vt,mt),It.setEnd(vt,mt+St),It},zh=function(vt){if(zs.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 Oc(vt)},Lu=function(vt,mt){if(zs.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)},Kh=function(vt,mt){return mt.letterSpacing!==0?zh(vt):Lu(vt,mt)},jh=[32,160,4961,65792,65793,4153,4241],Sd=function(vt,mt){for(var St=Oe(vt,{lineBreak:mt.lineBreak,wordBreak:mt.overflowWrap==="break-word"?"break-word":mt.wordBreak}),wt=[],It,Wt=function(){if(It.value){var ae=It.value.slice(),Ee=De(ae),ce="";Ee.forEach(function(We){jh.indexOf(We)===-1?ce+=Me(We):(ce.length&&wt.push(ce),wt.push(Me(We)),ce="")}),ce.length&&wt.push(ce)}};!(It=St.next()).done;)Wt();return wt},Vh=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,ch);case 2:return vt.toUpperCase();default:return vt}},EA=/(^|\s|:|-|\(|\))([a-z])/g,ch=function(vt,mt,St){return vt.length>0?mt+St.toUpperCase():vt},Gc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It.src=wt.currentSrc||wt.src,It.intrinsicWidth=wt.naturalWidth,It.intrinsicHeight=wt.naturalHeight,It.context.cache.addImage(It.src),It}return mt}(aA),zc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It.canvas=wt,It.intrinsicWidth=wt.width,It.intrinsicHeight=wt.height,It}return mt}(aA),Kc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this,Wt=new XMLSerializer,ae=xe(St,wt);return wt.setAttribute("width",ae.width+"px"),wt.setAttribute("height",ae.height+"px"),It.svg="data:image/svg+xml,"+encodeURIComponent(Wt.serializeToString(wt)),It.intrinsicWidth=wt.width.baseVal.value,It.intrinsicHeight=wt.height.baseVal.value,It.context.cache.addImage(It.svg),It}return mt}(aA),Eu=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It.value=wt.value,It}return mt}(aA),jc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It.start=wt.start,It.reversed=typeof wt.reversed=="boolean"&&wt.reversed===!0,It}return mt}(aA),Bd=[{type:15,flags:0,unit:"px",number:3}],Cd=[{type:16,flags:0,number:50}],hA=function(vt){return vt.width>vt.height?new be(vt.left+(vt.width-vt.height)/2,vt.top,vt.height,vt.height):vt.width<vt.height?new be(vt.left,vt.top+(vt.height-vt.width)/2,vt.width,vt.width):vt},dg=function(vt){var mt=vt.type===fh?new Array(vt.value.length+1).join("\u2022"):vt.value;return mt.length===0?vt.placeholder||"":mt},_h="checkbox",YA="radio",fh="password",Nf=707406591,Rl=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;switch(It.type=wt.type.toLowerCase(),It.checked=wt.checked,It.value=dg(wt),(It.type===_h||It.type===YA)&&(It.styles.backgroundColor=3739148031,It.styles.borderTopColor=It.styles.borderRightColor=It.styles.borderBottomColor=It.styles.borderLeftColor=2779096575,It.styles.borderTopWidth=It.styles.borderRightWidth=It.styles.borderBottomWidth=It.styles.borderLeftWidth=1,It.styles.borderTopStyle=It.styles.borderRightStyle=It.styles.borderBottomStyle=It.styles.borderLeftStyle=1,It.styles.backgroundClip=[0],It.styles.backgroundOrigin=[0],It.bounds=hA(It.bounds)),It.type){case _h:It.styles.borderTopRightRadius=It.styles.borderTopLeftRadius=It.styles.borderBottomRightRadius=It.styles.borderBottomLeftRadius=Bd;break;case YA:It.styles.borderTopRightRadius=It.styles.borderTopLeftRadius=It.styles.borderBottomRightRadius=It.styles.borderBottomLeftRadius=Cd;break}return It}return mt}(aA),Qf=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this,Wt=wt.options[wt.selectedIndex||0];return It.value=Wt&&Wt.text||"",It}return mt}(aA),Vc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It.value=wt.value,It}return mt}(aA),Pd=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;It.src=wt.src,It.width=parseInt(wt.width,10)||0,It.height=parseInt(wt.height,10)||0,It.backgroundColor=It.styles.backgroundColor;try{if(wt.contentWindow&&wt.contentWindow.document&&wt.contentWindow.document.documentElement){It.tree=Ld(St,wt.contentWindow.document.documentElement);var Wt=wt.contentWindow.document.documentElement?ds(St,getComputedStyle(wt.contentWindow.document.documentElement).backgroundColor):os.TRANSPARENT,ae=wt.contentWindow.document.body?ds(St,getComputedStyle(wt.contentWindow.document.body).backgroundColor):os.TRANSPARENT;It.backgroundColor=xs(Wt)?xs(ae)?It.styles.backgroundColor:ae:Wt}}catch(Ee){}return It}return mt}(aA),Fd=["OL","UL","MENU"],Wh=function(vt,mt,St,wt){for(var It=mt.firstChild,Wt=void 0;It;It=Wt)if(Wt=It.nextSibling,_c(It)&&It.data.trim().length>0)St.textNodes.push(new Vh(vt,It,St.styles));else if(dh(It))if(Hf(It)&&It.assignedNodes)It.assignedNodes().forEach(function(Ee){return Wh(vt,Ee,St,wt)});else{var ae=gg(vt,It);ae.styles.isVisible()&&(Uf(It,ae,wt)?ae.flags|=4:Df(ae.styles)&&(ae.flags|=2),Fd.indexOf(It.tagName)!==-1&&(ae.flags|=8),St.elements.push(ae),It.slot,It.shadowRoot?Wh(vt,It.shadowRoot,ae,wt):!Xh(It)&&!Md(It)&&!Zh(It)&&Wh(vt,It,ae,wt))}},gg=function(vt,mt){return Ks(mt)?new Gc(vt,mt):gh(mt)?new zc(vt,mt):Md(mt)?new Kc(vt,mt):Ed(mt)?new Eu(vt,mt):Wc(mt)?new jc(vt,mt):pg(mt)?new Rl(vt,mt):Zh(mt)?new Qf(vt,mt):Xh(mt)?new Vc(vt,mt):Ra(mt)?new Pd(vt,mt):new aA(vt,mt)},Ld=function(vt,mt){var St=gg(vt,mt);return St.flags|=4,Wh(vt,mt,St,St),St},Uf=function(vt,mt,St){return mt.styles.isPositionedWithZIndex()||mt.styles.opacity<1||mt.styles.isTransformed()||wo(vt)&&St.styles.isTransparent()},Df=function(vt){return vt.isPositioned()||vt.isFloating()},_c=function(vt){return vt.nodeType===Node.TEXT_NODE},dh=function(vt){return vt.nodeType===Node.ELEMENT_NODE},Yh=function(vt){return dh(vt)&&typeof vt.style!="undefined"&&!cA(vt)},cA=function(vt){return typeof vt.className=="object"},Ed=function(vt){return vt.tagName==="LI"},Wc=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"},wo=function(vt){return vt.tagName==="BODY"},gh=function(vt){return vt.tagName==="CANVAS"},Mu=function(vt){return vt.tagName==="VIDEO"},Ks=function(vt){return vt.tagName==="IMG"},Ra=function(vt){return vt.tagName==="IFRAME"},ku=function(vt){return vt.tagName==="STYLE"},Yc=function(vt){return vt.tagName==="SCRIPT"},Xh=function(vt){return vt.tagName==="TEXTAREA"},Zh=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,It=mt.counterReset,Wt=!0;wt!==null&&wt.forEach(function(Ee){var ce=St.counters[Ee.counter];ce&&Ee.increment!==0&&(Wt=!1,ce.length||ce.push(1),ce[Math.max(0,ce.length-1)]+=Ee.increment)});var ae=[];return Wt&&It.forEach(function(Ee){var ce=St.counters[Ee.counter];ae.push(Ee.counter),ce||(ce=St.counters[Ee.counter]=[]),ce.push(Ee.reset)}),ae},vt}(),XA={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"]},Jh={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"]},bu={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"]},Wo={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"]},ZA=function(vt,mt,St,wt,It,Wt){return vt<mt||vt>St?ht(vt,It,Wt.length>0):wt.integers.reduce(function(ae,Ee,ce){for(;vt>=Ee;)vt-=Ee,ae+=wt.values[ce];return ae},"")+Wt},Gf=function(vt,mt,St,wt){var It="";do St||vt--,It=wt(vt)+It,vt/=mt;while(vt*mt>=mt);return It},Bs=function(vt,mt,St,wt,It){var Wt=St-mt+1;return(vt<0?"-":"")+(Gf(Math.abs(vt),Wt,wt,function(ae){return Me(Math.floor(ae%Wt)+mt)})+It)},Wl=function(vt,mt,St){St===void 0&&(St=". ");var wt=mt.length;return Gf(Math.abs(vt),wt,!1,function(It){return mt[Math.floor(It%wt)]})+St},MA=1,JA=2,ls=4,qh=8,Ll=function(vt,mt,St,wt,It,Wt){if(vt<-9999||vt>9999)return ht(vt,4,It.length>0);var ae=Math.abs(vt),Ee=It;if(ae===0)return mt[0]+Ee;for(var ce=0;ae>0&&ce<=4;ce++){var We=ae%10;We===0&&Ws(Wt,MA)&&Ee!==""?Ee=mt[We]+Ee:We>1||We===1&&ce===0||We===1&&ce===1&&Ws(Wt,JA)||We===1&&ce===1&&Ws(Wt,ls)&&vt>100||We===1&&ce>1&&Ws(Wt,qh)?Ee=mt[We]+(ce>0?St[ce-1]:"")+Ee:We===1&&ce>0&&(Ee=St[ce-1]+Ee),ae=Math.floor(ae/10)}return(vt<0?wt:"")+Ee},kA="\u5341\u767E\u5343\u842C",$h="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ht=function(vt,mt,St){var wt=St?". ":"",It=St?"\u3001":"",Wt=St?", ":"",ae=St?" ":"";switch(mt){case 0:return"\u2022"+ae;case 1:return"\u25E6"+ae;case 2:return"\u25FE"+ae;case 5:var Ee=Bs(vt,48,57,!0,wt);return Ee.length<4?"0"+Ee:Ee;case 4:return Wl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",It);case 6:return ZA(vt,1,3999,XA,3,wt).toLowerCase();case 7:return ZA(vt,1,3999,XA,3,wt);case 8:return Bs(vt,945,969,!1,wt);case 9:return Bs(vt,97,122,!1,wt);case 10:return Bs(vt,65,90,!1,wt);case 11:return Bs(vt,1632,1641,!0,wt);case 12:case 49:return ZA(vt,1,9999,Jh,3,wt);case 35:return ZA(vt,1,9999,Jh,3,wt).toLowerCase();case 13:return Bs(vt,2534,2543,!0,wt);case 14:case 30:return Bs(vt,6112,6121,!0,wt);case 15:return Wl(vt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",It);case 16:return Wl(vt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",It);case 17:case 48:return Ll(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8CA0",It,JA|ls|qh);case 47:return Ll(vt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",$h,"\u8CA0",It,MA|JA|ls|qh);case 42:return Ll(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8D1F",It,JA|ls|qh);case 41:return Ll(vt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",$h,"\u8D1F",It,MA|JA|ls|qh);case 26:return Ll(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,It,0);case 25:return Ll(vt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,It,MA|JA|ls);case 31:return Ll(vt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,Wt,MA|JA|ls);case 33:return Ll(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,Wt,0);case 32:return Ll(vt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,Wt,MA|JA|ls);case 18:return Bs(vt,2406,2415,!0,wt);case 20:return ZA(vt,1,19999,Wo,3,wt);case 21:return Bs(vt,2790,2799,!0,wt);case 22:return Bs(vt,2662,2671,!0,wt);case 22:return ZA(vt,1,10999,bu,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 Bs(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",It);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",It);case 34:return Bs(vt,3792,3801,!0,wt);case 37:return Bs(vt,6160,6169,!0,wt);case 38:return Bs(vt,4160,4169,!0,wt);case 39:return Bs(vt,2918,2927,!0,wt);case 40:return Bs(vt,1776,1785,!0,wt);case 43:return Bs(vt,3046,3055,!0,wt);case 44:return Bs(vt,3174,3183,!0,wt);case 45:return Bs(vt,3664,3673,!0,wt);case 46:return Bs(vt,3872,3881,!0,wt);case 3:default:return Bs(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,It=bt(mt,St);if(!It.contentWindow)return Promise.reject("Unable to find iframe window");var Wt=mt.defaultView.pageXOffset,ae=mt.defaultView.pageYOffset,Ee=It.contentWindow,ce=Ee.document,We=ee(It).then(function(){return Fe(wt,void 0,void 0,function(){var qe,pn;return Te(this,function(ti){switch(ti.label){case 0:return this.scrolledElements.forEach(Dn),Ee&&(Ee.scrollTo(St.left,St.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ee.scrollY!==St.top||Ee.scrollX!==St.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ee.scrollX-St.left,Ee.scrollY-St.top,0,0))),qe=this.options.onclone,pn=this.clonedReferenceElement,typeof pn=="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:ti.sent(),ti.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Rt(ce)]:[3,4];case 3:ti.sent(),ti.label=4;case 4:return typeof qe=="function"?[2,Promise.resolve().then(function(){return qe(ce,pn)}).then(function(){return It})]:[2,It]}})})});return ce.open(),ce.write(Ve(document.doctype)+"<html></html>"),Ke(this.referenceElement.ownerDocument,Wt,ae),ce.replaceChild(ce.adoptNode(this.documentElement),ce.documentElement),ce.close(),We},vt.prototype.createElementClone=function(mt){if(Nh(mt,2))debugger;if(gh(mt))return this.createCanvasClone(mt);if(Mu(mt))return this.createVideoClone(mt);if(ku(mt))return this.createStyleClone(mt);var St=mt.cloneNode(!1);return Ks(St)&&(Ks(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(Wt,ae){return ae&&typeof ae.cssText=="string"?Wt+ae.cssText:Wt},""),It=mt.cloneNode(!1);return It.textContent=wt,It}}catch(Wt){if(this.context.logger.error("Unable to access cssRules property",Wt),Wt.name!=="SecurityError")throw Wt}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(We){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",mt)}}var It=mt.cloneNode(!1);try{It.width=mt.width,It.height=mt.height;var Wt=mt.getContext("2d"),ae=It.getContext("2d");if(ae)if(!this.options.allowTaint&&Wt)ae.putImageData(Wt.getImageData(0,0,mt.width,mt.height),0,0);else{var Ee=(St=mt.getContext("webgl2"))!==null&&St!==void 0?St:mt.getContext("webgl");if(Ee){var ce=Ee.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 It}catch(We){this.context.logger.info("Unable to clone canvas as it is tainted",mt)}return It},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(Wt){this.context.logger.info("Unable to clone video as it is tainted",mt)}var It=mt.ownerDocument.createElement("canvas");return It.width=mt.offsetWidth,It.height=mt.offsetHeight,It},vt.prototype.appendChildNode=function(mt,St,wt){(!dh(St)||!Yc(St)&&!St.hasAttribute(ut)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(St)))&&(!this.options.copyStyles||!dh(St)||!ku(St))&&mt.appendChild(this.cloneNode(St,wt))},vt.prototype.cloneChildNodes=function(mt,St,wt){for(var It=this,Wt=mt.shadowRoot?mt.shadowRoot.firstChild:mt.firstChild;Wt;Wt=Wt.nextSibling)if(dh(Wt)&&Hf(Wt)&&typeof Wt.assignedNodes=="function"){var ae=Wt.assignedNodes();ae.length&&ae.forEach(function(Ee){return It.appendChildNode(St,Ee,wt)})}else this.appendChildNode(St,Wt,wt)},vt.prototype.cloneNode=function(mt,St){if(_c(mt))return document.createTextNode(mt.data);if(!mt.ownerDocument)return mt.cloneNode(!1);var wt=mt.ownerDocument.defaultView;if(wt&&dh(mt)&&(Yh(mt)||cA(mt))){var It=this.createElementClone(mt);It.style.transitionProperty="none";var Wt=wt.getComputedStyle(mt),ae=wt.getComputedStyle(mt,":before"),Ee=wt.getComputedStyle(mt,":after");this.referenceElement===mt&&Yh(It)&&(this.clonedReferenceElement=It),wo(It)&&lr(It);var ce=this.counters.parse(new sA(this.context,Wt)),We=this.resolvePseudoContent(mt,It,ae,Ft.BEFORE);Rf(mt)&&(St=!0),Mu(mt)||this.cloneChildNodes(mt,It,St),We&&It.insertBefore(We,It.firstChild);var qe=this.resolvePseudoContent(mt,It,Ee,Ft.AFTER);return qe&&It.appendChild(qe),this.counters.pop(ce),(Wt&&(this.options.copyStyles||cA(mt))&&!Ra(mt)||St)&&re(Wt,It),(mt.scrollTop!==0||mt.scrollLeft!==0)&&this.scrolledElements.push([It,mt.scrollLeft,mt.scrollTop]),(Xh(mt)||Zh(mt))&&(Xh(It)||Zh(It))&&(It.value=mt.value),It}return mt.cloneNode(!1)},vt.prototype.resolvePseudoContent=function(mt,St,wt,It){var Wt=this;if(wt){var ae=wt.content,Ee=St.ownerDocument;if(!(!Ee||!ae||ae==="none"||ae==="-moz-alt-content"||wt.display==="none")){this.counters.parse(new sA(this.context,wt));var ce=new Ha(this.context,wt),We=Ee.createElement("html2canvaspseudoelement");re(wt,We),ce.content.forEach(function(pn){if(pn.type===0)We.appendChild(Ee.createTextNode(pn.value));else if(pn.type===22){var ti=Ee.createElement("img");ti.src=pn.value,ti.style.opacity="1",We.appendChild(ti)}else if(pn.type===18){if(pn.name==="attr"){var ir=pn.values.filter(Vr);ir.length&&We.appendChild(Ee.createTextNode(mt.getAttribute(ir[0].value)||""))}else if(pn.name==="counter"){var Ni=pn.values.filter(Ya),_i=Ni[0],ho=Ni[1];if(_i&&Vr(_i)){var Sr=Wt.counters.getCounterValue(_i.value),xr=ho&&Vr(ho)?pu.parse(Wt.context,ho.value):3;We.appendChild(Ee.createTextNode(ht(Sr,xr,!1)))}}else if(pn.name==="counters"){var Lr=pn.values.filter(Ya),_i=Lr[0],xo=Lr[1],ho=Lr[2];if(_i&&Vr(_i)){var to=Wt.counters.getCounterValues(_i.value),dr=ho&&Vr(ho)?pu.parse(Wt.context,ho.value):3,Uo=xo&&xo.type===0?xo.value:"",zo=to.map(function(gl){return ht(gl,dr,!1)}).join(Uo);We.appendChild(Ee.createTextNode(zo))}}}else if(pn.type===20)switch(pn.value){case"open-quote":We.appendChild(Ee.createTextNode(Th(ce.quotes,Wt.quoteDepth++,!0)));break;case"close-quote":We.appendChild(Ee.createTextNode(Th(ce.quotes,--Wt.quoteDepth,!1)));break;default:We.appendChild(Ee.createTextNode(pn.value))}}),We.className=Mi+" "+Zi;var qe=It===Ft.BEFORE?" "+Mi:" "+Zi;return cA(St)?St.className.baseValue+=qe:St.className+=qe,We}}},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 bt=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 It=wt.document;wt.onload=vt.onload=function(){wt.onload=vt.onload=null;var Wt=setInterval(function(){It.body.childNodes.length>0&&It.readyState==="complete"&&(clearInterval(Wt),mt(vt))},50)}})},Ie=["all","d","content"],re=function(vt,mt){for(var St=vt.length-1;St>=0;St--){var wt=vt.item(St);Ie.indexOf(wt)===-1&&mt.style.setProperty(wt,vt.getPropertyValue(wt))}return mt},Ve=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},Ke=function(vt,mt,St){vt&&vt.defaultView&&(mt!==vt.defaultView.pageXOffset||St!==vt.defaultView.pageYOffset)&&vt.defaultView.scrollTo(mt,St)},Dn=function(vt){var mt=vt[0],St=vt[1],wt=vt[2];mt.scrollLeft=St,mt.scrollTop=wt},Yn=":before",hi=":after",Mi="___html2canvas___pseudoelement_before",Zi="___html2canvas___pseudoelement_after",zi=`{
content: "" !important;
display: none !important;
}`,lr=function(vt){kr(vt,"."+Mi+Yn+zi+`
.`+Zi+hi+zi)},kr=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}(),qr=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 Fe(this,void 0,void 0,function(){var St,wt,It,Wt,ae=this;return Te(this,function(Ee){switch(Ee.label){case 0:return St=Hi.isSameOrigin(mt),wt=!Aa(mt)&&this._options.useCORS===!0&&zs.SUPPORT_CORS_IMAGES&&!St,It=!Aa(mt)&&!St&&!Ga(mt)&&typeof this._options.proxy=="string"&&zs.SUPPORT_CORS_XHR&&!wt,!St&&this._options.allowTaint===!1&&!Aa(mt)&&!Ga(mt)&&!It&&!wt?[2]:(Wt=mt,It?[4,this.proxy(Wt)]:[3,2]);case 1:Wt=Ee.sent(),Ee.label=2;case 2:return this.context.logger.debug("Added image "+mt.substring(0,256)),[4,new Promise(function(ce,We){var qe=new Image;qe.onload=function(){return ce(qe)},qe.onerror=We,(Ys(Wt)||wt)&&(qe.crossOrigin="anonymous"),qe.src=Wt,qe.complete===!0&&setTimeout(function(){return ce(qe)},500),ae._options.imageTimeout>0&&setTimeout(function(){return We("Timed out ("+ae._options.imageTimeout+"ms) loading image")},ae._options.imageTimeout)})];case 3:return[2,Ee.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 It=mt.substring(0,256);return new Promise(function(Wt,ae){var Ee=zs.SUPPORT_RESPONSE_TYPE?"blob":"text",ce=new XMLHttpRequest;ce.onload=function(){if(ce.status===200)if(Ee==="text")Wt(ce.response);else{var pn=new FileReader;pn.addEventListener("load",function(){return Wt(pn.result)},!1),pn.addEventListener("error",function(ti){return ae(ti)},!1),pn.readAsDataURL(ce.response)}else ae("Failed to proxy resource "+It+" with status code "+ce.status)},ce.onerror=ae;var We=wt.indexOf("?")>-1?"&":"?";if(ce.open("GET",""+wt+We+"url="+encodeURIComponent(mt)+"&responseType="+Ee),Ee!=="text"&&ce instanceof XMLHttpRequest&&(ce.responseType=Ee),St._options.imageTimeout){var qe=St._options.imageTimeout;ce.timeout=qe,ce.ontimeout=function(){return ae("Timed out ("+qe+"ms) proxying "+It)}}ce.send()})},vt}(),As=/^data:image\/svg\+xml/i,$s=/^data:image\/.*;base64,/i,vs=/^data:image\/.*/i,qa=function(vt){return zs.SUPPORT_SVG_DRAWING||!pa(vt)},Aa=function(vt){return vs.test(vt)},Ys=function(vt){return $s.test(vt)},Ga=function(vt){return vt.substr(0,4)==="blob"},pa=function(vt){return vt.substr(-3).toLowerCase()==="svg"||As.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}(),mo=function(vt,mt,St){return new Di(vt.x+(mt.x-vt.x)*St,vt.y+(mt.y-vt.y)*St)},us=function(){function vt(mt,St,wt,It){this.type=1,this.start=mt,this.startControl=St,this.endControl=wt,this.end=It}return vt.prototype.subdivide=function(mt,St){var wt=mo(this.start,this.startControl,mt),It=mo(this.startControl,this.endControl,mt),Wt=mo(this.endControl,this.end,mt),ae=mo(wt,It,mt),Ee=mo(It,Wt,mt),ce=mo(ae,Ee,mt);return St?new vt(this.start,wt,ae,ce):new vt(ce,Ee,Wt,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}(),ts=function(vt){return vt.type===1},ma=function(){function vt(mt){var St=mt.styles,wt=mt.bounds,It=tA(St.borderTopLeftRadius,wt.width,wt.height),Wt=It[0],ae=It[1],Ee=tA(St.borderTopRightRadius,wt.width,wt.height),ce=Ee[0],We=Ee[1],qe=tA(St.borderBottomRightRadius,wt.width,wt.height),pn=qe[0],ti=qe[1],ir=tA(St.borderBottomLeftRadius,wt.width,wt.height),Ni=ir[0],_i=ir[1],ho=[];ho.push((Wt+ce)/wt.width),ho.push((Ni+pn)/wt.width),ho.push((ae+_i)/wt.height),ho.push((We+ti)/wt.height);var Sr=Math.max.apply(Math,ho);Sr>1&&(Wt/=Sr,ae/=Sr,ce/=Sr,We/=Sr,pn/=Sr,ti/=Sr,Ni/=Sr,_i/=Sr);var xr=wt.width-ce,Lr=wt.height-ti,xo=wt.width-pn,to=wt.height-_i,dr=St.borderTopWidth,Uo=St.borderRightWidth,zo=St.borderBottomWidth,no=St.borderLeftWidth,ea=No(St.paddingTop,mt.bounds.width),gl=No(St.paddingRight,mt.bounds.width),kl=No(St.paddingBottom,mt.bounds.width),hs=No(St.paddingLeft,mt.bounds.width);this.topLeftBorderDoubleOuterBox=Wt>0||ae>0?_r(wt.left+no/3,wt.top+dr/3,Wt-no/3,ae-dr/3,So.TOP_LEFT):new Di(wt.left+no/3,wt.top+dr/3),this.topRightBorderDoubleOuterBox=Wt>0||ae>0?_r(wt.left+xr,wt.top+dr/3,ce-Uo/3,We-dr/3,So.TOP_RIGHT):new Di(wt.left+wt.width-Uo/3,wt.top+dr/3),this.bottomRightBorderDoubleOuterBox=pn>0||ti>0?_r(wt.left+xo,wt.top+Lr,pn-Uo/3,ti-zo/3,So.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo/3,wt.top+wt.height-zo/3),this.bottomLeftBorderDoubleOuterBox=Ni>0||_i>0?_r(wt.left+no/3,wt.top+to,Ni-no/3,_i-zo/3,So.BOTTOM_LEFT):new Di(wt.left+no/3,wt.top+wt.height-zo/3),this.topLeftBorderDoubleInnerBox=Wt>0||ae>0?_r(wt.left+no*2/3,wt.top+dr*2/3,Wt-no*2/3,ae-dr*2/3,So.TOP_LEFT):new Di(wt.left+no*2/3,wt.top+dr*2/3),this.topRightBorderDoubleInnerBox=Wt>0||ae>0?_r(wt.left+xr,wt.top+dr*2/3,ce-Uo*2/3,We-dr*2/3,So.TOP_RIGHT):new Di(wt.left+wt.width-Uo*2/3,wt.top+dr*2/3),this.bottomRightBorderDoubleInnerBox=pn>0||ti>0?_r(wt.left+xo,wt.top+Lr,pn-Uo*2/3,ti-zo*2/3,So.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo*2/3,wt.top+wt.height-zo*2/3),this.bottomLeftBorderDoubleInnerBox=Ni>0||_i>0?_r(wt.left+no*2/3,wt.top+to,Ni-no*2/3,_i-zo*2/3,So.BOTTOM_LEFT):new Di(wt.left+no*2/3,wt.top+wt.height-zo*2/3),this.topLeftBorderStroke=Wt>0||ae>0?_r(wt.left+no/2,wt.top+dr/2,Wt-no/2,ae-dr/2,So.TOP_LEFT):new Di(wt.left+no/2,wt.top+dr/2),this.topRightBorderStroke=Wt>0||ae>0?_r(wt.left+xr,wt.top+dr/2,ce-Uo/2,We-dr/2,So.TOP_RIGHT):new Di(wt.left+wt.width-Uo/2,wt.top+dr/2),this.bottomRightBorderStroke=pn>0||ti>0?_r(wt.left+xo,wt.top+Lr,pn-Uo/2,ti-zo/2,So.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo/2,wt.top+wt.height-zo/2),this.bottomLeftBorderStroke=Ni>0||_i>0?_r(wt.left+no/2,wt.top+to,Ni-no/2,_i-zo/2,So.BOTTOM_LEFT):new Di(wt.left+no/2,wt.top+wt.height-zo/2),this.topLeftBorderBox=Wt>0||ae>0?_r(wt.left,wt.top,Wt,ae,So.TOP_LEFT):new Di(wt.left,wt.top),this.topRightBorderBox=ce>0||We>0?_r(wt.left+xr,wt.top,ce,We,So.TOP_RIGHT):new Di(wt.left+wt.width,wt.top),this.bottomRightBorderBox=pn>0||ti>0?_r(wt.left+xo,wt.top+Lr,pn,ti,So.BOTTOM_RIGHT):new Di(wt.left+wt.width,wt.top+wt.height),this.bottomLeftBorderBox=Ni>0||_i>0?_r(wt.left,wt.top+to,Ni,_i,So.BOTTOM_LEFT):new Di(wt.left,wt.top+wt.height),this.topLeftPaddingBox=Wt>0||ae>0?_r(wt.left+no,wt.top+dr,Math.max(0,Wt-no),Math.max(0,ae-dr),So.TOP_LEFT):new Di(wt.left+no,wt.top+dr),this.topRightPaddingBox=ce>0||We>0?_r(wt.left+Math.min(xr,wt.width-Uo),wt.top+dr,xr>wt.width+Uo?0:Math.max(0,ce-Uo),Math.max(0,We-dr),So.TOP_RIGHT):new Di(wt.left+wt.width-Uo,wt.top+dr),this.bottomRightPaddingBox=pn>0||ti>0?_r(wt.left+Math.min(xo,wt.width-no),wt.top+Math.min(Lr,wt.height-zo),Math.max(0,pn-Uo),Math.max(0,ti-zo),So.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo,wt.top+wt.height-zo),this.bottomLeftPaddingBox=Ni>0||_i>0?_r(wt.left+no,wt.top+Math.min(to,wt.height-zo),Math.max(0,Ni-no),Math.max(0,_i-zo),So.BOTTOM_LEFT):new Di(wt.left+no,wt.top+wt.height-zo),this.topLeftContentBox=Wt>0||ae>0?_r(wt.left+no+hs,wt.top+dr+ea,Math.max(0,Wt-(no+hs)),Math.max(0,ae-(dr+ea)),So.TOP_LEFT):new Di(wt.left+no+hs,wt.top+dr+ea),this.topRightContentBox=ce>0||We>0?_r(wt.left+Math.min(xr,wt.width+no+hs),wt.top+dr+ea,xr>wt.width+no+hs?0:ce-no+hs,We-(dr+ea),So.TOP_RIGHT):new Di(wt.left+wt.width-(Uo+gl),wt.top+dr+ea),this.bottomRightContentBox=pn>0||ti>0?_r(wt.left+Math.min(xo,wt.width-(no+hs)),wt.top+Math.min(Lr,wt.height+dr+ea),Math.max(0,pn-(Uo+gl)),ti-(zo+kl),So.BOTTOM_RIGHT):new Di(wt.left+wt.width-(Uo+gl),wt.top+wt.height-(zo+kl)),this.bottomLeftContentBox=Ni>0||_i>0?_r(wt.left+no+hs,wt.top+to,Math.max(0,Ni-(no+hs)),_i-(zo+kl),So.BOTTOM_LEFT):new Di(wt.left+no+hs,wt.top+wt.height-(zo+kl))}return vt}(),So;(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"})(So||(So={}));var _r=function(vt,mt,St,wt,It){var Wt=4*((Math.sqrt(2)-1)/3),ae=St*Wt,Ee=wt*Wt,ce=vt+St,We=mt+wt;switch(It){case So.TOP_LEFT:return new us(new Di(vt,We),new Di(vt,We-Ee),new Di(ce-ae,mt),new Di(ce,mt));case So.TOP_RIGHT:return new us(new Di(vt,mt),new Di(vt+ae,mt),new Di(ce,We-Ee),new Di(ce,We));case So.BOTTOM_RIGHT:return new us(new Di(ce,mt),new Di(ce,mt+Ee),new Di(vt+ae,We),new Di(vt,We));case So.BOTTOM_LEFT:default:return new us(new Di(ce,We),new Di(ce-ae,We),new Di(vt,mt+Ee),new Di(vt,mt))}},$a=function(vt){return[vt.topLeftBorderBox,vt.topRightBorderBox,vt.bottomRightBorderBox,vt.bottomLeftBorderBox]},ks=function(vt){return[vt.topLeftContentBox,vt.topRightContentBox,vt.bottomRightContentBox,vt.bottomLeftContentBox]},Tu=function(vt){return[vt.topLeftPaddingBox,vt.topRightPaddingBox,vt.bottomRightPaddingBox,vt.bottomLeftPaddingBox]},El=function(){function vt(mt,St,wt){this.offsetX=mt,this.offsetY=St,this.matrix=wt,this.type=0,this.target=6}return vt}(),Fa=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}(),Yo=function(vt){return vt.type===0},ta=function(vt){return vt.type===1},bA=function(vt){return vt.type===2},ph=function(vt,mt){return vt.length===mt.length?vt.some(function(St,wt){return St===mt[wt]}):!1},Jp=function(vt,mt,St,wt,It){return vt.map(function(Wt,ae){switch(ae){case 0:return Wt.add(mt,St);case 1:return Wt.add(mt+wt,St);case 2:return Wt.add(mt+wt,St+It);case 3:return Wt.add(mt,St+It)}return Wt})},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,It=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Wt=this.container.styles.transform;this.effects.push(new El(wt,It,Wt))}if(this.container.styles.overflowX!==0){var ae=$a(this.curves),Ee=Tu(this.curves);ph(ae,Ee)?this.effects.push(new Fa(ae,6)):(this.effects.push(new Fa(ae,2)),this.effects.push(new Fa(Ee,4)))}}return vt.prototype.getEffects=function(mt){for(var St=[2,3].indexOf(this.container.styles.position)===-1,wt=this.parent,It=this.effects.slice(0);wt;){var Wt=wt.effects.filter(function(ce){return!ta(ce)});if(St||wt.container.styles.position!==0||!wt.parent){if(It.unshift.apply(It,Wt),St=[2,3].indexOf(wt.container.styles.position)===-1,wt.container.styles.overflowX!==0){var ae=$a(wt.curves),Ee=Tu(wt.curves);ph(ae,Ee)||It.unshift(new Fa(Ee,6))}}else It.unshift.apply(It,Wt);wt=wt.parent}return It.filter(function(ce){return Ws(ce.target,mt)})},vt}(),TA=function(vt,mt,St,wt){vt.container.elements.forEach(function(It){var Wt=Ws(It.flags,4),ae=Ws(It.flags,2),Ee=new mg(It,vt);Ws(It.styles.display,2048)&&wt.push(Ee);var ce=Ws(It.flags,8)?[]:wt;if(Wt||ae){var We=Wt||It.styles.isPositioned()?St:mt,qe=new el(Ee);if(It.styles.isPositioned()||It.styles.opacity<1||It.styles.isTransformed()){var pn=It.styles.zIndex.order;if(pn<0){var ti=0;We.negativeZIndex.some(function(Ni,_i){return pn>Ni.element.container.styles.zIndex.order?(ti=_i,!1):ti>0}),We.negativeZIndex.splice(ti,0,qe)}else if(pn>0){var ir=0;We.positiveZIndex.some(function(Ni,_i){return pn>=Ni.element.container.styles.zIndex.order?(ir=_i+1,!1):ir>0}),We.positiveZIndex.splice(ir,0,qe)}else We.zeroOrAutoZIndexOrTransformedOrOpacity.push(qe)}else It.styles.isFloating()?We.nonPositionedFloats.push(qe):We.nonPositionedInlineLevel.push(qe);TA(Ee,qe,Wt?qe:St,ce)}else It.styles.isInlineLevel()?mt.inlineLevel.push(Ee):mt.nonInlineLevel.push(Ee),TA(Ee,mt,St,ce);Ws(It.flags,8)&&bd(It,ce)})},bd=function(vt,mt){for(var St=vt instanceof jc?vt.start:1,wt=vt instanceof jc?vt.reversed:!1,It=0;It<mt.length;It++){var Wt=mt[It];Wt.container instanceof Eu&&typeof Wt.container.value=="number"&&Wt.container.value!==0&&(St=Wt.container.value),Wt.listValue=ht(St,Wt.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},tc=function(vt,mt){switch(mt){case 0:return Xs(vt.topLeftBorderBox,vt.topLeftPaddingBox,vt.topRightBorderBox,vt.topRightPaddingBox);case 1:return Xs(vt.topRightBorderBox,vt.topRightPaddingBox,vt.bottomRightBorderBox,vt.bottomRightPaddingBox);case 2:return Xs(vt.bottomRightBorderBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox);case 3:default:return Xs(vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox,vt.topLeftBorderBox,vt.topLeftPaddingBox)}},mh=function(vt,mt){switch(mt){case 0:return Xs(vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox,vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox);case 1:return Xs(vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox,vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox);case 2:return Xs(vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox,vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox);case 3:default:return Xs(vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox,vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox)}},Td=function(vt,mt){switch(mt){case 0:return Xs(vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox,vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox);case 1:return Xs(vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox,vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox);case 2:return Xs(vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox);case 3:default:return Xs(vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox,vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox)}},ec=function(vt,mt){switch(mt){case 0:return Iu(vt.topLeftBorderStroke,vt.topRightBorderStroke);case 1:return Iu(vt.topRightBorderStroke,vt.bottomRightBorderStroke);case 2:return Iu(vt.bottomRightBorderStroke,vt.bottomLeftBorderStroke);case 3:default:return Iu(vt.bottomLeftBorderStroke,vt.topLeftBorderStroke)}},Iu=function(vt,mt){var St=[];return ts(vt)?St.push(vt.subdivide(.5,!1)):St.push(vt),ts(mt)?St.push(mt.subdivide(.5,!0)):St.push(mt),St},Xs=function(vt,mt,St,wt){var It=[];return ts(vt)?It.push(vt.subdivide(.5,!1)):It.push(vt),ts(St)?It.push(St.subdivide(.5,!0)):It.push(St),ts(wt)?It.push(wt.subdivide(.5,!0).reverse()):It.push(wt),ts(mt)?It.push(mt.subdivide(.5,!1).reverse()):It.push(mt),It},La=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=No(mt.paddingLeft,St.width),It=No(mt.paddingRight,St.width),Wt=No(mt.paddingTop,St.width),ae=No(mt.paddingBottom,St.width);return St.add(wt+mt.borderLeftWidth,Wt+mt.borderTopWidth,-(mt.borderRightWidth+mt.borderLeftWidth+wt+It),-(mt.borderTopWidth+mt.borderBottomWidth+Wt+ae))},qp=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):La(mt)},$p=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):La(mt)},nc=function(vt,mt,St){var wt=qp(rc(vt.styles.backgroundOrigin,mt),vt),It=$p(rc(vt.styles.backgroundClip,mt),vt),Wt=t0(rc(vt.styles.backgroundSize,mt),St,wt),ae=Wt[0],Ee=Wt[1],ce=tA(rc(vt.styles.backgroundPosition,mt),wt.width-ae,wt.height-Ee),We=Qd(rc(vt.styles.backgroundRepeat,mt),ce,Wt,wt,It),qe=Math.round(wt.left+ce[0]),pn=Math.round(wt.top+ce[1]);return[We,qe,pn,ae,Ee]},ic=function(vt){return Vr(vt)&&vt.value===eh.AUTO},Nd=function(vt){return typeof vt=="number"},t0=function(vt,mt,St){var wt=mt[0],It=mt[1],Wt=mt[2],ae=vt[0],Ee=vt[1];if(!ae)return[0,0];if(Ss(ae)&&Ee&&Ss(Ee))return[No(ae,St.width),No(Ee,St.height)];var ce=Nd(Wt);if(Vr(ae)&&(ae.value===eh.CONTAIN||ae.value===eh.COVER)){if(Nd(Wt)){var We=St.width/St.height;return We<Wt!=(ae.value===eh.COVER)?[St.width,St.width/Wt]:[St.height*Wt,St.height]}return[St.width,St.height]}var qe=Nd(wt),pn=Nd(It),ti=qe||pn;if(ic(ae)&&(!Ee||ic(Ee))){if(qe&&pn)return[wt,It];if(!ce&&!ti)return[St.width,St.height];if(ti&&ce){var ir=qe?wt:It*Wt,Ni=pn?It:wt/Wt;return[ir,Ni]}var _i=qe?wt:St.width,ho=pn?It:St.height;return[_i,ho]}if(ce){var Sr=0,xr=0;return Ss(ae)?Sr=No(ae,St.width):Ss(Ee)&&(xr=No(Ee,St.height)),ic(ae)?Sr=xr*Wt:(!Ee||ic(Ee))&&(xr=Sr/Wt),[Sr,xr]}var Lr=null,xo=null;if(Ss(ae)?Lr=No(ae,St.width):Ee&&Ss(Ee)&&(xo=No(Ee,St.height)),Lr!==null&&(!Ee||ic(Ee))&&(xo=qe&&pn?Lr/wt*It:St.height),xo!==null&&ic(ae)&&(Lr=qe&&pn?xo/It*wt:St.width),Lr!==null&&xo!==null)return[Lr,xo];throw new Error("Unable to calculate background-size for element")},rc=function(vt,mt){var St=vt[mt];return typeof St=="undefined"?vt[0]:St},Qd=function(vt,mt,St,wt,It){var Wt=mt[0],ae=mt[1],Ee=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+Wt),Math.round(wt.top)),new Di(Math.round(wt.left+Wt+Ee),Math.round(wt.top)),new Di(Math.round(wt.left+Wt+Ee),Math.round(wt.height+wt.top)),new Di(Math.round(wt.left+Wt),Math.round(wt.height+wt.top))];case 1:return[new Di(Math.round(wt.left+Wt),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Wt+Ee),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Wt+Ee),Math.round(wt.top+ae+ce)),new Di(Math.round(wt.left+Wt),Math.round(wt.top+ae+ce))];default:return[new Di(Math.round(It.left),Math.round(It.top)),new Di(Math.round(It.left+It.width),Math.round(It.top)),new Di(Math.round(It.left+It.width),Math.round(It.height+It.top)),new Di(Math.round(It.left),Math.round(It.height+It.top))]}},vg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",fA="Hidden Text",qA=function(){function vt(mt){this._data={},this._document=mt}return vt.prototype.parseMetrics=function(mt,St){var wt=this._document.createElement("div"),It=this._document.createElement("img"),Wt=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),It.src=vg,It.width=1,It.height=1,It.style.margin="0",It.style.padding="0",It.style.verticalAlign="baseline",Wt.style.fontFamily=mt,Wt.style.fontSize=St,Wt.style.margin="0",Wt.style.padding="0",Wt.appendChild(this._document.createTextNode(fA)),wt.appendChild(Wt),wt.appendChild(It);var Ee=It.offsetTop-Wt.offsetTop+2;wt.removeChild(Wt),wt.appendChild(this._document.createTextNode(fA)),wt.style.lineHeight="normal",It.style.verticalAlign="super";var ce=It.offsetTop-wt.offsetTop+2;return ae.removeChild(wt),{baseline:Ee,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}(),Ml=1e4,oc=function(vt){ne(mt,vt);function mt(St,wt){var It=vt.call(this,St,wt)||this;return It._activeEffects=[],It.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),It.ctx=It.canvas.getContext("2d"),wt.canvas||(It.canvas.width=Math.floor(wt.width*wt.scale),It.canvas.height=Math.floor(wt.height*wt.scale),It.canvas.style.width=wt.width+"px",It.canvas.style.height=wt.height+"px"),It.fontMetrics=new qA(document),It.ctx.scale(It.options.scale,It.options.scale),It.ctx.translate(-wt.x,-wt.y),It.ctx.textBaseline="bottom",It._activeEffects=[],It.context.logger.debug("Canvas renderer initialized ("+wt.width+"x"+wt.height+") with scale "+wt.scale),It}return mt.prototype.applyEffects=function(St){for(var wt=this;this._activeEffects.length;)this.popEffect();St.forEach(function(It){return wt.applyEffect(It)})},mt.prototype.applyEffect=function(St){this.ctx.save(),bA(St)&&(this.ctx.globalAlpha=St.opacity),Yo(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)),ta(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 Fe(this,void 0,void 0,function(){var wt;return Te(this,function(It){switch(It.label){case 0:return wt=St.element.container.styles,wt.isVisible()?[4,this.renderStackContent(St)]:[3,2];case 1:It.sent(),It.label=2;case 2:return[2]}})})},mt.prototype.renderNode=function(St){return Fe(this,void 0,void 0,function(){return Te(this,function(wt){switch(wt.label){case 0:if(Ws(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,It){var Wt=this;if(wt===0)this.ctx.fillText(St.text,St.bounds.left,St.bounds.top+It);else{var ae=zh(St.text);ae.reduce(function(Ee,ce){return Wt.ctx.fillText(ce,Ee,St.bounds.top+It),Ee+Wt.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(""),It=n0(St.fontFamily).join(", "),Wt=qs(St.fontSize)?""+St.fontSize.number+St.fontSize.unit:St.fontSize.number+"px";return[[St.fontStyle,wt,St.fontWeight,Wt,It].join(" "),It,Wt]},mt.prototype.renderTextNode=function(St,wt){return Fe(this,void 0,void 0,function(){var It,Wt,ae,Ee,ce,We,qe,pn,ti=this;return Te(this,function(ir){return It=this.createFontStyle(wt),Wt=It[0],ae=It[1],Ee=It[2],this.ctx.font=Wt,this.ctx.direction=wt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ce=this.fontMetrics.getMetrics(ae,Ee),We=ce.baseline,qe=ce.middle,pn=wt.paintOrder,St.textBounds.forEach(function(Ni){pn.forEach(function(_i){switch(_i){case 0:ti.ctx.fillStyle=Io(wt.color),ti.renderTextWithLetterSpacing(Ni,wt.letterSpacing,We);var ho=wt.textShadow;ho.length&&Ni.text.trim().length&&(ho.slice(0).reverse().forEach(function(Sr){ti.ctx.shadowColor=Io(Sr.color),ti.ctx.shadowOffsetX=Sr.offsetX.number*ti.options.scale,ti.ctx.shadowOffsetY=Sr.offsetY.number*ti.options.scale,ti.ctx.shadowBlur=Sr.blur.number,ti.renderTextWithLetterSpacing(Ni,wt.letterSpacing,We)}),ti.ctx.shadowColor="",ti.ctx.shadowOffsetX=0,ti.ctx.shadowOffsetY=0,ti.ctx.shadowBlur=0),wt.textDecorationLine.length&&(ti.ctx.fillStyle=Io(wt.textDecorationColor||wt.color),wt.textDecorationLine.forEach(function(Sr){switch(Sr){case 1:ti.ctx.fillRect(Ni.bounds.left,Math.round(Ni.bounds.top+We),Ni.bounds.width,1);break;case 2:ti.ctx.fillRect(Ni.bounds.left,Math.round(Ni.bounds.top),Ni.bounds.width,1);break;case 3:ti.ctx.fillRect(Ni.bounds.left,Math.ceil(Ni.bounds.top+qe),Ni.bounds.width,1);break}}));break;case 1:wt.webkitTextStrokeWidth&&Ni.text.trim().length&&(ti.ctx.strokeStyle=Io(wt.webkitTextStrokeColor),ti.ctx.lineWidth=wt.webkitTextStrokeWidth,ti.ctx.lineJoin=window.chrome?"miter":"round",ti.ctx.strokeText(Ni.text,Ni.bounds.left,Ni.bounds.top+We)),ti.ctx.strokeStyle="",ti.ctx.lineWidth=0,ti.ctx.lineJoin="miter";break}})}),[2]})})},mt.prototype.renderReplacedElement=function(St,wt,It){if(It&&St.intrinsicWidth>0&&St.intrinsicHeight>0){var Wt=Id(St),ae=Tu(wt);this.path(ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(It,0,0,St.intrinsicWidth,St.intrinsicHeight,Wt.left,Wt.top,Wt.width,Wt.height),this.ctx.restore()}},mt.prototype.renderNodeContent=function(St){return Fe(this,void 0,void 0,function(){var wt,It,Wt,ae,Ee,ce,xr,xr,We,qe,pn,ti,xo,ir,Ni,to,_i,ho,Sr,xr,Lr,xo,to;return Te(this,function(dr){switch(dr.label){case 0:this.applyEffects(St.getEffects(4)),wt=St.container,It=St.curves,Wt=wt.styles,ae=0,Ee=wt.textNodes,dr.label=1;case 1:return ae<Ee.length?(ce=Ee[ae],[4,this.renderTextNode(ce,Wt)]):[3,4];case 2:dr.sent(),dr.label=3;case 3:return ae++,[3,1];case 4:if(!(wt instanceof Gc))return[3,8];dr.label=5;case 5:return dr.trys.push([5,7,,8]),[4,this.context.cache.match(wt.src)];case 6:return xr=dr.sent(),this.renderReplacedElement(wt,It,xr),[3,8];case 7:return dr.sent(),this.context.logger.error("Error loading image "+wt.src),[3,8];case 8:if(wt instanceof zc&&this.renderReplacedElement(wt,It,wt.canvas),!(wt instanceof Kc))return[3,12];dr.label=9;case 9:return dr.trys.push([9,11,,12]),[4,this.context.cache.match(wt.svg)];case 10:return xr=dr.sent(),this.renderReplacedElement(wt,It,xr),[3,12];case 11:return dr.sent(),this.context.logger.error("Error loading svg "+wt.svg.substring(0,255)),[3,12];case 12:return wt instanceof Pd&&wt.tree?(We=new mt(this.context,{scale:this.options.scale,backgroundColor:wt.backgroundColor,x:0,y:0,width:wt.width,height:wt.height}),[4,We.render(wt.tree)]):[3,14];case 13:qe=dr.sent(),wt.width&&wt.height&&this.ctx.drawImage(qe,0,0,wt.width,wt.height,wt.bounds.left,wt.bounds.top,wt.bounds.width,wt.bounds.height),dr.label=14;case 14:if(wt instanceof Rl&&(pn=Math.min(wt.bounds.width,wt.bounds.height),wt.type===_h?wt.checked&&(this.ctx.save(),this.path([new Di(wt.bounds.left+pn*.39363,wt.bounds.top+pn*.79),new Di(wt.bounds.left+pn*.16,wt.bounds.top+pn*.5549),new Di(wt.bounds.left+pn*.27347,wt.bounds.top+pn*.44071),new Di(wt.bounds.left+pn*.39694,wt.bounds.top+pn*.5649),new Di(wt.bounds.left+pn*.72983,wt.bounds.top+pn*.23),new Di(wt.bounds.left+pn*.84,wt.bounds.top+pn*.34085),new Di(wt.bounds.left+pn*.39363,wt.bounds.top+pn*.79)]),this.ctx.fillStyle=Io(Nf),this.ctx.fill(),this.ctx.restore()):wt.type===YA&&wt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(wt.bounds.left+pn/2,wt.bounds.top+pn/2,pn/4,0,Math.PI*2,!0),this.ctx.fillStyle=Io(Nf),this.ctx.fill(),this.ctx.restore())),km(wt)&&wt.value.length){switch(ti=this.createFontStyle(Wt),xo=ti[0],ir=ti[1],Ni=this.fontMetrics.getMetrics(xo,ir).baseline,this.ctx.font=xo,this.ctx.fillStyle=Io(Wt.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Fr(wt.styles.textAlign),to=Id(wt),_i=0,wt.styles.textAlign){case 1:_i+=to.width/2;break;case 2:_i+=to.width;break}ho=to.add(_i,0,0,-to.height/2+1),this.ctx.save(),this.path([new Di(to.left,to.top),new Di(to.left+to.width,to.top),new Di(to.left+to.width,to.top+to.height),new Di(to.left,to.top+to.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ga(wt.value,ho),Wt.letterSpacing,Ni),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ws(wt.styles.display,2048))return[3,20];if(wt.styles.listStyleImage===null)return[3,19];if(Sr=wt.styles.listStyleImage,Sr.type!==0)return[3,18];xr=void 0,Lr=Sr.url,dr.label=15;case 15:return dr.trys.push([15,17,,18]),[4,this.context.cache.match(Lr)];case 16:return xr=dr.sent(),this.ctx.drawImage(xr,wt.bounds.left-(xr.width+10),wt.bounds.top),[3,18];case 17:return dr.sent(),this.context.logger.error("Error loading list-style-image "+Lr),[3,18];case 18:return[3,20];case 19:St.listValue&&wt.styles.listStyleType!==-1&&(xo=this.createFontStyle(Wt)[0],this.ctx.font=xo,this.ctx.fillStyle=Io(Wt.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",to=new be(wt.bounds.left,wt.bounds.top+No(wt.styles.paddingTop,wt.bounds.width),wt.bounds.width,_s(Wt.lineHeight,Wt.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ga(St.listValue,to),Wt.letterSpacing,_s(Wt.lineHeight,Wt.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),dr.label=20;case 20:return[2]}})})},mt.prototype.renderStackContent=function(St){return Fe(this,void 0,void 0,function(){var wt,It,Sr,Wt,ae,Sr,Ee,ce,Sr,We,qe,Sr,pn,ti,Sr,ir,Ni,Sr,_i,ho,Sr;return Te(this,function(xr){switch(xr.label){case 0:if(Ws(St.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(St.element)];case 1:xr.sent(),wt=0,It=St.negativeZIndex,xr.label=2;case 2:return wt<It.length?(Sr=It[wt],[4,this.renderStack(Sr)]):[3,5];case 3:xr.sent(),xr.label=4;case 4:return wt++,[3,2];case 5:return[4,this.renderNodeContent(St.element)];case 6:xr.sent(),Wt=0,ae=St.nonInlineLevel,xr.label=7;case 7:return Wt<ae.length?(Sr=ae[Wt],[4,this.renderNode(Sr)]):[3,10];case 8:xr.sent(),xr.label=9;case 9:return Wt++,[3,7];case 10:Ee=0,ce=St.nonPositionedFloats,xr.label=11;case 11:return Ee<ce.length?(Sr=ce[Ee],[4,this.renderStack(Sr)]):[3,14];case 12:xr.sent(),xr.label=13;case 13:return Ee++,[3,11];case 14:We=0,qe=St.nonPositionedInlineLevel,xr.label=15;case 15:return We<qe.length?(Sr=qe[We],[4,this.renderStack(Sr)]):[3,18];case 16:xr.sent(),xr.label=17;case 17:return We++,[3,15];case 18:pn=0,ti=St.inlineLevel,xr.label=19;case 19:return pn<ti.length?(Sr=ti[pn],[4,this.renderNode(Sr)]):[3,22];case 20:xr.sent(),xr.label=21;case 21:return pn++,[3,19];case 22:ir=0,Ni=St.zeroOrAutoZIndexOrTransformedOrOpacity,xr.label=23;case 23:return ir<Ni.length?(Sr=Ni[ir],[4,this.renderStack(Sr)]):[3,26];case 24:xr.sent(),xr.label=25;case 25:return ir++,[3,23];case 26:_i=0,ho=St.positiveZIndex,xr.label=27;case 27:return _i<ho.length?(Sr=ho[_i],[4,this.renderStack(Sr)]):[3,30];case 28:xr.sent(),xr.label=29;case 29:return _i++,[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(It,Wt){var ae=ts(It)?It.start:It;Wt===0?wt.ctx.moveTo(ae.x,ae.y):wt.ctx.lineTo(ae.x,ae.y),ts(It)&&wt.ctx.bezierCurveTo(It.startControl.x,It.startControl.y,It.endControl.x,It.endControl.y,It.end.x,It.end.y)})},mt.prototype.renderRepeat=function(St,wt,It,Wt){this.path(St),this.ctx.fillStyle=wt,this.ctx.translate(It,Wt),this.ctx.fill(),this.ctx.translate(-It,-Wt)},mt.prototype.resizeImage=function(St,wt,It){var Wt;if(St.width===wt&&St.height===It)return St;var ae=(Wt=this.canvas.ownerDocument)!==null&&Wt!==void 0?Wt:document,Ee=ae.createElement("canvas");Ee.width=Math.max(1,wt),Ee.height=Math.max(1,It);var ce=Ee.getContext("2d");return ce.drawImage(St,0,0,St.width,St.height,0,0,wt,It),Ee},mt.prototype.renderBackgroundImage=function(St){return Fe(this,void 0,void 0,function(){var wt,It,Wt,ae,Ee,ce;return Te(this,function(We){switch(We.label){case 0:wt=St.styles.backgroundImage.length-1,It=function(qe){var pn,ti,ir,ea,pl,Gl,hs,va,zo,Ni,ea,pl,Gl,hs,va,_i,ho,Sr,xr,Lr,xo,to,dr,Uo,zo,no,ea,gl,kl,hs,va,tu,pl,Gl,eu,je,Nu,sc,Qu,Uu,vh,za;return Te(this,function(dA){switch(dA.label){case 0:if(qe.type!==0)return[3,5];pn=void 0,ti=qe.url,dA.label=1;case 1:return dA.trys.push([1,3,,4]),[4,Wt.context.cache.match(ti)];case 2:return pn=dA.sent(),[3,4];case 3:return dA.sent(),Wt.context.logger.error("Error loading background-image "+ti),[3,4];case 4:return pn&&(ir=nc(St,wt,[pn.width,pn.height,pn.width/pn.height]),ea=ir[0],pl=ir[1],Gl=ir[2],hs=ir[3],va=ir[4],zo=Wt.ctx.createPattern(Wt.resizeImage(pn,hs,va),"repeat"),Wt.renderRepeat(ea,zo,pl,Gl)),[3,6];case 5:hu(qe)?(Ni=nc(St,wt,[null,null,null]),ea=Ni[0],pl=Ni[1],Gl=Ni[2],hs=Ni[3],va=Ni[4],_i=qu(qe.angle,hs,va),ho=_i[0],Sr=_i[1],xr=_i[2],Lr=_i[3],xo=_i[4],to=document.createElement("canvas"),to.width=hs,to.height=va,dr=to.getContext("2d"),Uo=dr.createLinearGradient(Sr,Lr,xr,xo),en(qe.stops,ho).forEach(function(Vf){return Uo.addColorStop(Vf.stop,Io(Vf.color))}),dr.fillStyle=Uo,dr.fillRect(0,0,hs,va),hs>0&&va>0&&(zo=Wt.ctx.createPattern(to,"repeat"),Wt.renderRepeat(ea,zo,pl,Gl))):po(qe)&&(no=nc(St,wt,[null,null,null]),ea=no[0],gl=no[1],kl=no[2],hs=no[3],va=no[4],tu=qe.position.length===0?[Yu]:qe.position,pl=No(tu[0],hs),Gl=No(tu[tu.length-1],va),eu=$u(qe,pl,Gl,hs,va),je=eu[0],Nu=eu[1],je>0&&Nu>0&&(sc=Wt.ctx.createRadialGradient(gl+pl,kl+Gl,0,gl+pl,kl+Gl,je),en(qe.stops,je*2).forEach(function(Vf){return sc.addColorStop(Vf.stop,Io(Vf.color))}),Wt.path(ea),Wt.ctx.fillStyle=sc,je!==Nu?(Qu=St.bounds.left+.5*St.bounds.width,Uu=St.bounds.top+.5*St.bounds.height,vh=Nu/je,za=1/vh,Wt.ctx.save(),Wt.ctx.translate(Qu,Uu),Wt.ctx.transform(1,0,0,vh,0,0),Wt.ctx.translate(-Qu,-Uu),Wt.ctx.fillRect(gl,za*(kl-Uu)+Uu,hs,va*za),Wt.ctx.restore()):Wt.ctx.fill())),dA.label=6;case 6:return wt--,[2]}})},Wt=this,ae=0,Ee=St.styles.backgroundImage.slice(0).reverse(),We.label=1;case 1:return ae<Ee.length?(ce=Ee[ae],[5,It(ce)]):[3,4];case 2:We.sent(),We.label=3;case 3:return ae++,[3,1];case 4:return[2]}})})},mt.prototype.renderSolidBorder=function(St,wt,It){return Fe(this,void 0,void 0,function(){return Te(this,function(Wt){return this.path(tc(It,wt)),this.ctx.fillStyle=Io(St),this.ctx.fill(),[2]})})},mt.prototype.renderDoubleBorder=function(St,wt,It,Wt){return Fe(this,void 0,void 0,function(){var ae,Ee;return Te(this,function(ce){switch(ce.label){case 0:return wt<3?[4,this.renderSolidBorder(St,It,Wt)]:[3,2];case 1:return ce.sent(),[2];case 2:return ae=mh(Wt,It),this.path(ae),this.ctx.fillStyle=Io(St),this.ctx.fill(),Ee=Td(Wt,It),this.path(Ee),this.ctx.fill(),[2]}})})},mt.prototype.renderNodeBackgroundAndBorders=function(St){return Fe(this,void 0,void 0,function(){var wt,It,Wt,ae,Ee,ce,We,qe,pn=this;return Te(this,function(ti){switch(ti.label){case 0:return this.applyEffects(St.getEffects(2)),wt=St.container.styles,It=!xs(wt.backgroundColor)||wt.backgroundImage.length,Wt=[{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(rc(wt.backgroundClip,0),St.curves),It||wt.boxShadow.length?(this.ctx.save(),this.path(ae),this.ctx.clip(),xs(wt.backgroundColor)||(this.ctx.fillStyle=Io(wt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(St.container)]):[3,2];case 1:ti.sent(),this.ctx.restore(),wt.boxShadow.slice(0).reverse().forEach(function(ir){pn.ctx.save();var Ni=$a(St.curves),_i=ir.inset?0:Ml,ho=Jp(Ni,-_i+(ir.inset?1:-1)*ir.spread.number,(ir.inset?1:-1)*ir.spread.number,ir.spread.number*(ir.inset?-2:2),ir.spread.number*(ir.inset?-2:2));ir.inset?(pn.path(Ni),pn.ctx.clip(),pn.mask(ho)):(pn.mask(Ni),pn.ctx.clip(),pn.path(ho)),pn.ctx.shadowOffsetX=ir.offsetX.number+_i,pn.ctx.shadowOffsetY=ir.offsetY.number,pn.ctx.shadowColor=Io(ir.color),pn.ctx.shadowBlur=ir.blur.number,pn.ctx.fillStyle=ir.inset?Io(ir.color):"rgba(0,0,0,1)",pn.ctx.fill(),pn.ctx.restore()}),ti.label=2;case 2:Ee=0,ce=0,We=Wt,ti.label=3;case 3:return ce<We.length?(qe=We[ce],qe.style!==0&&!xs(qe.color)&&qe.width>0?qe.style!==2?[3,5]:[4,this.renderDashedDottedBorder(qe.color,qe.width,Ee,St.curves,2)]:[3,11]):[3,13];case 4:return ti.sent(),[3,11];case 5:return qe.style!==3?[3,7]:[4,this.renderDashedDottedBorder(qe.color,qe.width,Ee,St.curves,3)];case 6:return ti.sent(),[3,11];case 7:return qe.style!==4?[3,9]:[4,this.renderDoubleBorder(qe.color,qe.width,Ee,St.curves)];case 8:return ti.sent(),[3,11];case 9:return[4,this.renderSolidBorder(qe.color,Ee,St.curves)];case 10:ti.sent(),ti.label=11;case 11:Ee++,ti.label=12;case 12:return ce++,[3,3];case 13:return[2]}})})},mt.prototype.renderDashedDottedBorder=function(St,wt,It,Wt,ae){return Fe(this,void 0,void 0,function(){var Ee,ce,We,qe,pn,ti,ir,Ni,_i,ho,Sr,xr,Lr,xo,to,dr,to,dr;return Te(this,function(Uo){return this.ctx.save(),Ee=ec(Wt,It),ce=tc(Wt,It),ae===2&&(this.path(ce),this.ctx.clip()),ts(ce[0])?(We=ce[0].start.x,qe=ce[0].start.y):(We=ce[0].x,qe=ce[0].y),ts(ce[1])?(pn=ce[1].end.x,ti=ce[1].end.y):(pn=ce[1].x,ti=ce[1].y),It===0||It===2?ir=Math.abs(We-pn):ir=Math.abs(qe-ti),this.ctx.beginPath(),ae===3?this.formatPath(Ee):this.formatPath(ce.slice(0,2)),Ni=wt<3?wt*3:wt*2,_i=wt<3?wt*2:wt,ae===3&&(Ni=wt,_i=wt),ho=!0,ir<=Ni*2?ho=!1:ir<=Ni*2+_i?(Sr=ir/(2*Ni+_i),Ni*=Sr,_i*=Sr):(xr=Math.floor((ir+_i)/(Ni+_i)),Lr=(ir-xr*Ni)/(xr-1),xo=(ir-(xr+1)*Ni)/xr,_i=xo<=0||Math.abs(_i-Lr)<Math.abs(_i-xo)?Lr:xo),ho&&(ae===3?this.ctx.setLineDash([0,Ni+_i]):this.ctx.setLineDash([Ni,_i])),ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=wt):this.ctx.lineWidth=wt*2+1.1,this.ctx.strokeStyle=Io(St),this.ctx.stroke(),this.ctx.setLineDash([]),ae===2&&(ts(ce[0])&&(to=ce[3],dr=ce[0],this.ctx.beginPath(),this.formatPath([new Di(to.end.x,to.end.y),new Di(dr.start.x,dr.start.y)]),this.ctx.stroke()),ts(ce[1])&&(to=ce[1],dr=ce[2],this.ctx.beginPath(),this.formatPath([new Di(to.end.x,to.end.y),new Di(dr.start.x,dr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},mt.prototype.render=function(St){return Fe(this,void 0,void 0,function(){var wt;return Te(this,function(It){switch(It.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Io(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 It.sent(),this.applyEffects([]),[2,this.canvas]}})})},mt}(Ud),km=function(vt){return vt instanceof Vc||vt instanceof Qf?!0:vt instanceof Rl&&vt.type!==YA&&vt.type!==_h},Dd=function(vt,mt){switch(vt){case 0:return $a(mt);case 2:return ks(mt);case 1:default:return Tu(mt)}},Fr=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 It=vt.call(this,St,wt)||this;return It.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),It.ctx=It.canvas.getContext("2d"),It.options=wt,It.canvas.width=Math.floor(wt.width*wt.scale),It.canvas.height=Math.floor(wt.height*wt.scale),It.canvas.style.width=wt.width+"px",It.canvas.style.height=wt.height+"px",It.ctx.scale(It.options.scale,It.options.scale),It.ctx.translate(-wt.x,-wt.y),It.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+wt.width+"x"+wt.height+" at "+wt.x+","+wt.y+") with scale "+wt.scale),It}return mt.prototype.render=function(St){return Fe(this,void 0,void 0,function(){var wt,It;return Te(this,function(Wt){switch(Wt.label){case 0:return wt=Rc(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 It=Wt.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Io(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(It,-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,tn([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,tn([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,tn([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,tn([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.instances={},vt}(),$A=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 qr(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 Fe(void 0,void 0,void 0,function(){var St,wt,It,Wt,ae,Ee,ce,We,qe,pn,ti,ir,Ni,_i,ho,Sr,xr,Lr,xo,to,Uo,dr,Uo,zo,no,ea,gl,kl,hs,va,tu,pl,Gl,eu,je,Nu,sc,Qu,Uu,vh;return Te(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 It={allowTaint:(zo=mt.allowTaint)!==null&&zo!==void 0?zo:!1,imageTimeout:(no=mt.imageTimeout)!==null&&no!==void 0?no:15e3,proxy:mt.proxy,useCORS:(ea=mt.useCORS)!==null&&ea!==void 0?ea:!1},Wt=Nt({logging:(gl=mt.logging)!==null&&gl!==void 0?gl:!0,cache:mt.cache},It),ae={windowWidth:(kl=mt.windowWidth)!==null&&kl!==void 0?kl:wt.innerWidth,windowHeight:(hs=mt.windowHeight)!==null&&hs!==void 0?hs:wt.innerHeight,scrollX:(va=mt.scrollX)!==null&&va!==void 0?va:wt.pageXOffset,scrollY:(tu=mt.scrollY)!==null&&tu!==void 0?tu:wt.pageYOffset},Ee=new be(ae.scrollX,ae.scrollY,ae.windowWidth,ae.windowHeight),ce=new $A(Wt,Ee),We=(pl=mt.foreignObjectRendering)!==null&&pl!==void 0?pl:!1,qe={allowTaint:(Gl=mt.allowTaint)!==null&&Gl!==void 0?Gl:!1,onclone:mt.onclone,ignoreElements:mt.ignoreElements,inlineImages:We,copyStyles:We},ce.logger.debug("Starting document clone with size "+Ee.width+"x"+Ee.height+" scrolled to "+-Ee.left+","+-Ee.top),pn=new dt(ce,vt,qe),ti=pn.clonedReferenceElement,ti?[4,pn.toIFrame(St,Ee)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return ir=za.sent(),Ni=wo(ti)||Of(ti)?ye(ti.ownerDocument):xe(ce,ti),_i=Ni.width,ho=Ni.height,Sr=Ni.left,xr=Ni.top,Lr=rp(ce,ti,mt.backgroundColor),xo={canvas:mt.canvas,backgroundColor:Lr,scale:(je=(eu=mt.scale)!==null&&eu!==void 0?eu:wt.devicePixelRatio)!==null&&je!==void 0?je:1,x:((Nu=mt.x)!==null&&Nu!==void 0?Nu:0)+Sr,y:((sc=mt.y)!==null&&sc!==void 0?sc:0)+xr,width:(Qu=mt.width)!==null&&Qu!==void 0?Qu:Math.ceil(_i),height:(Uu=mt.height)!==null&&Uu!==void 0?Uu:Math.ceil(ho)},We?(ce.logger.debug("Document cloned, using foreign object rendering"),Uo=new ep(ce,xo),[4,Uo.render(ti)]):[3,3];case 2:return to=za.sent(),[3,5];case 3:return ce.logger.debug("Document cloned, element located at "+Sr+","+xr+" with size "+_i+"x"+ho+" using computed rendering"),ce.logger.debug("Starting DOM parsing"),dr=Ld(ce,ti),Lr===dr.styles.backgroundColor&&(dr.styles.backgroundColor=os.TRANSPARENT),ce.logger.debug("Starting renderer for element at "+xo.x+","+xo.y+" with size "+xo.width+"x"+xo.height),Uo=new oc(ce,xo),[4,Uo.render(dr)];case 4:to=za.sent(),za.label=5;case 5:return(!((vh=mt.removeContainer)!==null&&vh!==void 0)||vh)&&(dt.destroy(ir)||ce.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ce.logger.debug("Finished rendering"),[2,to]}})})},rp=function(vt,mt,St){var wt=mt.ownerDocument,It=wt.documentElement?ds(vt,getComputedStyle(wt.documentElement).backgroundColor):os.TRANSPARENT,Wt=wt.body?ds(vt,getComputedStyle(wt.body).backgroundColor):os.TRANSPARENT,ae=typeof St=="string"?ds(vt,St):St===null?os.TRANSPARENT:4294967295;return mt===wt.documentElement?xs(It)?xs(Wt)?ae:Wt:It:ae};return np})},2859:function(Pn,vi,ne){"use strict";ne.d(vi,{hP:function(){return ci}});var Nt=function(Ht,Lt){return(Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ct,Ut){Ct.__proto__=Ut}||function(Ct,Ut){for(var Kt in Ut)Object.prototype.hasOwnProperty.call(Ut,Kt)&&(Ct[Kt]=Ut[Kt])})(Ht,Lt)};function Fe(Ht,Lt){function Ct(){this.constructor=Ht}Nt(Ht,Lt),Ht.prototype=Lt===null?Object.create(Lt):(Ct.prototype=Lt.prototype,new Ct)}function Te(Ht,Lt,Ct,Ut){return new(Ct||(Ct=Promise))(function(Kt,kt){function Pe(Ze){try{Xe(Ut.next(Ze))}catch(Qe){kt(Qe)}}function dn(Ze){try{Xe(Ut.throw(Ze))}catch(Qe){kt(Qe)}}function Xe(Ze){var Qe;Ze.done?Kt(Ze.value):(Qe=Ze.value,Qe instanceof Ct?Qe:new Ct(function(ln){ln(Qe)})).then(Pe,dn)}Xe((Ut=Ut.apply(Ht,Lt||[])).next())})}function tn(Ht,Lt){var Ct,Ut,Kt,kt,Pe={label:0,sent:function(){if(1&Kt[0])throw Kt[1];return Kt[1]},trys:[],ops:[]};return kt={next:dn(0),throw:dn(1),return:dn(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function dn(Xe){return function(Ze){return function(Qe){if(Ct)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(Ct=1,Ut&&(Kt=2&Qe[0]?Ut.return:Qe[0]?Ut.throw||((Kt=Ut.return)&&Kt.call(Ut),0):Ut.next)&&!(Kt=Kt.call(Ut,Qe[1])).done)return Kt;switch(Ut=0,Kt&&(Qe=[2&Qe[0],Kt.value]),Qe[0]){case 0:case 1:Kt=Qe;break;case 4:return Pe.label++,{value:Qe[1],done:!1};case 5:Pe.label++,Ut=Qe[1],Qe=[0];continue;case 7:Qe=Pe.ops.pop(),Pe.trys.pop();continue;default:if(Kt=Pe.trys,!((Kt=Kt.length>0&&Kt[Kt.length-1])||Qe[0]!==6&&Qe[0]!==2)){Pe=0;continue}if(Qe[0]===3&&(!Kt||Qe[1]>Kt[0]&&Qe[1]<Kt[3])){Pe.label=Qe[1];break}if(Qe[0]===6&&Pe.label<Kt[1]){Pe.label=Kt[1],Kt=Qe;break}if(Kt&&Pe.label<Kt[2]){Pe.label=Kt[2],Pe.ops.push(Qe);break}Kt[2]&&Pe.ops.pop(),Pe.trys.pop();continue}Qe=Lt.call(Ht,Pe)}catch(ln){Qe=[6,ln],Ut=0}finally{Ct=Kt=0}if(5&Qe[0])throw Qe[1];return{value:Qe[0]?Qe[1]:void 0,done:!0}}([Xe,Ze])}}}function be(){for(var Ht=0,Lt=0,Ct=arguments.length;Lt<Ct;Lt++)Ht+=arguments[Lt].length;var Ut=Array(Ht),Kt=0;for(Lt=0;Lt<Ct;Lt++)for(var kt=arguments[Lt],Pe=0,dn=kt.length;Pe<dn;Pe++,Kt++)Ut[Kt]=kt[Pe];return Ut}var xe=function(){function Ht(){}return Ht.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ht.setAttributes=function(Lt,Ct){for(var Ut=0,Kt=Ct;Ut<Kt.length;Ut++){var kt=Kt[Ut],Pe=kt[0],dn=kt[1];Lt.setAttribute(Pe,dn)}},Ht.createRect=function(Lt,Ct,Ut){var Kt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Kt.setAttribute("width",Lt.toString()),Kt.setAttribute("height",Ct.toString()),Ut&&Ht.setAttributes(Kt,Ut),Kt},Ht.createLine=function(Lt,Ct,Ut,Kt,kt){var Pe=document.createElementNS("http://www.w3.org/2000/svg","line");return Pe.setAttribute("x1",Lt.toString()),Pe.setAttribute("y1",Ct.toString()),Pe.setAttribute("x2",Ut.toString()),Pe.setAttribute("y2",Kt.toString()),kt&&Ht.setAttributes(Pe,kt),Pe},Ht.createPolygon=function(Lt,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ut.setAttribute("points",Lt),Ct&&Ht.setAttributes(Ut,Ct),Ut},Ht.createCircle=function(Lt,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ut.setAttribute("cx",(Lt/2).toString()),Ut.setAttribute("cy",(Lt/2).toString()),Ut.setAttribute("r",Lt.toString()),Ct&&Ht.setAttributes(Ut,Ct),Ut},Ht.createEllipse=function(Lt,Ct,Ut){var Kt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Kt.setAttribute("cx",(Lt/2).toString()),Kt.setAttribute("cy",(Ct/2).toString()),Kt.setAttribute("rx",(Lt/2).toString()),Kt.setAttribute("ry",(Ct/2).toString()),Ut&&Ht.setAttributes(Kt,Ut),Kt},Ht.createGroup=function(Lt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","g");return Lt&&Ht.setAttributes(Ct,Lt),Ct},Ht.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ht.createMarker=function(Lt,Ct,Ut,Kt,kt,Pe,dn){var Xe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ht.setAttributes(Xe,[["id",Lt],["orient",Ct],["markerWidth",Ut.toString()],["markerHeight",Kt.toString()],["refX",kt.toString()],["refY",Pe.toString()]]),Xe.appendChild(dn),Xe},Ht.createText=function(Lt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","text");return Ct.setAttribute("x","0"),Ct.setAttribute("y","0"),Lt&&Ht.setAttributes(Ct,Lt),Ct},Ht.createTSpan=function(Lt,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ut.textContent=Lt,Ct&&Ht.setAttributes(Ut,Ct),Ut},Ht.createImage=function(Lt){var Ct=document.createElementNS("http://www.w3.org/2000/svg","image");return Lt&&Ht.setAttributes(Ct,Lt),Ct},Ht.createPoint=function(Lt,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ut.x=Lt,Ut.y=Ct,Ut},Ht.createPath=function(Lt,Ct){var Ut=document.createElementNS("http://www.w3.org/2000/svg","path");return Ut.setAttribute("d",Lt),Ct&&Ht.setAttributes(Ut,Ct),Ut},Ht}(),ye=function(){function Ht(){}return Ht.addKey=function(Lt){Ht.key=Lt},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}(),De=function(){function Ht(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ht.prototype.rasterize=function(Lt,Ct,Ut){var Kt=this;return new Promise(function(kt){var Pe=Ut!==void 0?Ut:document.createElement("canvas");Lt===null&&(Kt.markersOnly=!0,Kt.naturalSize=!1);var dn=document.createElementNS("http://www.w3.org/2000/svg","svg");dn.setAttribute("xmlns","http://www.w3.org/2000/svg"),dn.setAttribute("width",Ct.width.baseVal.valueAsString),dn.setAttribute("height",Ct.height.baseVal.valueAsString),dn.setAttribute("viewBox","0 0 "+Ct.viewBox.baseVal.width.toString()+" "+Ct.viewBox.baseVal.height.toString()),dn.innerHTML=Ct.innerHTML,Kt.naturalSize===!0?(dn.width.baseVal.value=Lt.naturalWidth,dn.height.baseVal.value=Lt.naturalHeight):Kt.width!==void 0&&Kt.height!==void 0&&(dn.width.baseVal.value=Kt.width,dn.height.baseVal.value=Kt.height),Pe.width=dn.width.baseVal.value,Pe.height=dn.height.baseVal.value;var Xe=dn.outerHTML,Ze=Pe.getContext("2d");Kt.markersOnly!==!0&&Ze.drawImage(Lt,0,0,Pe.width,Pe.height);var Qe=window.URL,ln=new Image(Pe.width,Pe.height);ln.setAttribute("crossOrigin","anonymous");var an=new Blob([Xe],{type:"image/svg+xml"}),Sn=Qe.createObjectURL(an);ln.onload=function(){Ze.drawImage(ln,0,0),Qe.revokeObjectURL(Sn);var jn=Pe.toDataURL(Kt.imageType,Kt.imageQuality);kt(jn)},ln.src=Sn})},Ht}(),Me=function(){},se=function(){function Ht(Lt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Lt+"_"}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(Lt){return this.styleSheet===void 0&&this.addStyleSheet(),Lt.name=""+this.classNamePrefix+Lt.localName,this.classes.push(Lt),this.styleSheet.sheet.insertRule("."+Lt.name+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length),Lt},Ht.prototype.addRule=function(Lt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Lt),this.styleSheet.sheet.insertRule(Lt.selector+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length)},Ht.prototype.addStyleSheet=function(){var Lt;this.styleSheet=document.createElement("style"),((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt: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 Be("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Be("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ht.prototype.removeStyleSheet=function(){var Lt;this.styleSheet&&(((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ht}(),hn=function(Ht,Lt){this.selector=Ht,this.style=Lt},Be=function(Ht,Lt){this.localName=Ht,this.style=Lt},un=function(){function Ht(Lt,Ct,Ut,Kt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Lt,this.displayMode=Ct,this.markerItems=Ut,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(Lt){var Ct=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ut=document.createElement("div");Ut.className=this.toolbarBlockStyleClass.name,Ut.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ut),this.addActionButton(Ut,'<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(Ut,'<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(Ut,'<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(Ut,'<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(Ut,'<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(Ut,'<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(Ut,'<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(Ut,'<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 Pe=document.createElement("div");Pe.className=""+Ct.toolbarButtonStyleClass.name,Pe.setAttribute("data-type-name",kt.typeName),Pe.innerHTML=kt.icon,Pe.addEventListener("click",function(){Ct.markerToolbarButtonClicked(Pe,kt)}),Ct.buttons.push(Pe),Ct.markerButtons.push(Pe)}),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(Lt){this.buttonClickListeners.push(Lt)},Ht.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Ht.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ht.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Lt=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<Lt||Ct===Lt&&this.markerButtons.length-1===Lt?this.markerButtonBlock.appendChild(this.markerButtons[Ct]):(Ct===Lt&&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 Lt=this;this.buttons.forEach(function(Ct){Ct.className=Ct.className.replace(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name,"").trim(),Ct.className=Ct.className.replace(Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Lt.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ct.className+=" "+(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name)})},Ht.prototype.addActionButton=function(Lt,Ct,Ut){var Kt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=Ct,kt.setAttribute("data-action",Ut),kt.addEventListener("click",function(){Kt.actionToolbarButtonClicked(kt,Ut)}),Ut){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}Lt.appendChild(kt),this.buttons.push(kt)},Ht.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Be("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 Be("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Be("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Be("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 Be("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Be("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
padding: `+Lt+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Be("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Be("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(Lt,Ct){this.setActiveButton(Lt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ut){return Ut("marker",Ct)}),this.markerButtonOverflowBlock.style.display="none"},Ht.prototype.actionToolbarButtonClicked=function(Lt,Ct){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ut){return Ut("action",Ct)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ht.prototype.setActiveButton=function(Lt){this.resetButtonStyles(),Lt.className=Lt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ht.prototype.setActiveMarkerButton=function(Lt){var Ct=this.markerButtons.find(function(Ut){return Ut.getAttribute("data-type-name")===Lt});Ct&&this.setActiveButton(Ct)},Ht.prototype.setCurrentMarker=function(Lt){var Ct=this;this.currentMarker=Lt,this.buttons.filter(function(Ut){return/delete|notes/.test(Ut.getAttribute("data-action"))}).forEach(function(Ut){Ct.currentMarker===void 0?(Ut.style.fillOpacity="0.4",Ut.style.pointerEvents="none"):(Ut.style.fillOpacity="1",Ut.style.pointerEvents="all")})},Ht}(),Qt=function(){function Ht(Lt,Ct,Ut,Kt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=Ct,this.uiStyleSettings=Ut,this.styles=Kt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ht.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new Be("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 Be("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Ct=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Be("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Be("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Be("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 Be("toolbox-panel-row_colors",`
background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Be("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 Be("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Be("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(Lt){var Ct;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,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(Lt){var Ct,Ut,Kt=this;this.panels=Lt,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+" "+((Ut=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ut!==void 0?Ut:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var Pe;kt.uiStyleSettings=Kt.uiStyleSettings;var dn=document.createElement("div");dn.className=Kt.toolboxButtonStyleClass.name+" "+((Pe=Kt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:Kt.toolboxButtonStyleColorsClass.name),dn.innerHTML=kt.icon,dn.title=kt.title,dn.addEventListener("click",function(){Kt.panelButtonClick(kt)}),Kt.panelButtons.push(dn),Kt.buttonRow.appendChild(dn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ht.prototype.panelButtonClick=function(Lt){var Ct=this,Ut=-1;if(Lt!==this.activePanel){Ut=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Kt=Lt.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=Lt}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,Pe){var dn,Xe;kt.className=Ct.toolboxButtonStyleClass.name+" "+(Pe===Ut?""+((dn=Ct.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&dn!==void 0?dn:Ct.toolboxActiveButtonStyleColorsClass.name):""+((Xe=Ct.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:Ct.toolboxButtonStyleColorsClass.name))})},Ht}(),et=function(Ht,Lt){this.title=Ht,this.icon=Lt},nt=function(Ht){function Lt(Ct,Ut,Kt,kt){var Pe=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 Pe.colors=[],Pe.addTransparent=!1,Pe.colorBoxes=[],Pe.colors=Ut,Pe.currentColor=Kt,Pe.setCurrentColor=Pe.setCurrentColor.bind(Pe),Pe.getColorBox=Pe.getColorBox.bind(Pe),Pe}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");return Ut.style.overflow="hidden",Ut.style.whiteSpace="nowrap",this.colors.forEach(function(Kt){var kt=Ct.getColorBox(Kt);Ut.appendChild(kt),Ct.colorBoxes.push(kt)}),Ut},Lt.prototype.getColorBox=function(Ct){var Ut=this,Kt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Kt,Pe=document.createElement("div");Pe.style.display="inline-block",Pe.style.boxSizing="content-box",Pe.style.width=kt-2+"px",Pe.style.height=kt-2+"px",Pe.style.padding="1px",Pe.style.marginRight="2px",Pe.style.marginBottom="2px",Pe.style.borderWidth="2px",Pe.style.borderStyle="solid",Pe.style.borderRadius=(kt+2)/2+"px",Pe.style.borderColor=Ct===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Pe.addEventListener("click",function(){Ut.setCurrentColor(Ct,Pe)});var dn=document.createElement("div");return dn.style.display="inline-block",dn.style.width=kt-2+"px",dn.style.height=kt-2+"px",dn.style.backgroundColor=Ct,dn.style.borderRadius=kt/2+"px",Ct==="transparent"&&(dn.style.fill=this.uiStyleSettings.toolboxAccentColor,dn.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>`),Pe.appendChild(dn),Pe},Lt.prototype.setCurrentColor=function(Ct,Ut){var Kt=this;this.currentColor=Ct,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ct)},Lt}(et),ct=function(){function Ht(Lt,Ct,Ut){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=Ct,this.globalSettings=Ut,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(Lt){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(Lt,Ct){},Ht.prototype.dblClick=function(Lt,Ct){},Ht.prototype.manipulate=function(Lt){},Ht.prototype.pointerUp=function(Lt){this.stateChanged()},Ht.prototype.dispose=function(){},Ht.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Ht.prototype.getState=function(){return{typeName:Ht.typeName,state:this.state,notes:this.notes}},Ht.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Ht.prototype.scale=function(Lt,Ct){},Ht.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Ht.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Ht.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Lt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Lt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Lt)&&this.onStateChanged(this)}},Ht.typeName="MarkerBase",Ht}(),lt=function(){function Ht(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ht.prototype.findGripByVisual=function(Lt){return this.topLeft.ownsTarget(Lt)?this.topLeft:this.topCenter.ownsTarget(Lt)?this.topCenter:this.topRight.ownsTarget(Lt)?this.topRight:this.centerLeft.ownsTarget(Lt)?this.centerLeft:this.centerRight.ownsTarget(Lt)?this.centerRight:this.bottomLeft.ownsTarget(Lt)?this.bottomLeft:this.bottomCenter.ownsTarget(Lt)?this.bottomCenter:this.bottomRight.ownsTarget(Lt)?this.bottomRight:void 0},Ht}(),gt=function(){function Ht(){this.GRIP_SIZE=10,this.visual=xe.createGroup(),this.visual.appendChild(xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(xe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ht.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Ht}(),yt=function(){function Ht(){}return Ht.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Ht.toSVGMatrix=function(Lt,Ct){return Lt.a=Ct.a,Lt.b=Ct.b,Lt.c=Ct.c,Lt.d=Ct.d,Lt.e=Ct.e,Lt.f=Ct.f,Lt},Ht}(),Et=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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(xe.createTransform()),kt.setupControlBox(),kt}return Fe(Lt,Ht),Object.defineProperty(Lt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"visual",{get:function(){return this._visual},set:function(Ct){this._visual=Ct;var Ut=xe.createTransform();this._visual.transform.baseVal.appendItem(Ut)},enumerable:!1,configurable:!0}),Lt.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))},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),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(Ut),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ut)){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 Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(Ct){var Ut=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",Ut==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(Ct){this.visual.style.transform="translate("+Ct.x+"px, "+Ct.y+"px)"},Lt.prototype.manipulate=function(Ct){var Ut=this.unrotatePoint(Ct);this.state==="creating"?this.resize(Ct):this.state==="move"?(this.left=this.manipulationStartLeft+(Ut.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ut.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ut):this.state==="rotate"&&this.rotate(Ct)},Lt.prototype.resize=function(Ct){var Ut=this.manipulationStartLeft,Kt=this.manipulationStartWidth,kt=this.manipulationStartTop,Pe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ut=this.manipulationStartLeft+Ct.x-this.manipulationStartX,Kt=this.manipulationStartWidth+this.manipulationStartLeft-Ut;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,Pe=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Pe=this.manipulationStartHeight+Ct.y-this.manipulationStartY}Kt>=0?(this.left=Ut,this.width=Kt):(this.left=Ut+Kt,this.width=-Kt),Pe>=0?(this.top=kt,this.height=Pe):(this.top=kt+Pe,this.height=-Pe),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(Ct){if(Math.abs(Ct.x-this.centerX)>.1){var Ut=Math.sign(Ct.x-this.centerX);this.rotationAngle=180*Math.atan((Ct.y-this.centerY)/(Ct.x-this.centerX))/Math.PI+90*Ut,this.applyRotation()}},Lt.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)},Lt.prototype.rotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Ut=this.container.getCTM(),Kt=xe.createPoint(Ct.x,Ct.y);return{x:(Kt=Kt.matrixTransform(Ut)).x,y:Kt.y}},Lt.prototype.unrotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Ut=this.container.getCTM();Ut=Ut.inverse();var Kt=xe.createPoint(Ct.x,Ct.y);return{x:(Kt=Kt.matrixTransform(Ut)).x,y:Kt.y}},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=xe.createGroup();var Ct=xe.createTransform();Ct.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ct),this.container.appendChild(this.controlBox),this.controlRect=xe.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=xe.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"},Lt.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()},Lt.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()},Lt.prototype.createGrip=function(){var Ct=new gt;return Ct.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Lt.prototype.positionGrips=function(){var Ct=this.controlGrips.topLeft.GRIP_SIZE,Ut=-Ct/2,Kt=Ut,kt=(this.width+this.CB_DISTANCE)/2-Ct/2,Pe=(this.height+this.CB_DISTANCE)/2-Ct/2,dn=this.height+this.CB_DISTANCE-Ct/2,Xe=this.width+this.CB_DISTANCE-Ct/2;this.positionGrip(this.controlGrips.topLeft.visual,Ut,Kt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Kt),this.positionGrip(this.controlGrips.topRight.visual,Xe,Kt),this.positionGrip(this.controlGrips.centerLeft.visual,Ut,Pe),this.positionGrip(this.controlGrips.centerRight.visual,Xe,Pe),this.positionGrip(this.controlGrips.bottomLeft.visual,Ut,dn),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,dn),this.positionGrip(this.controlGrips.bottomRight.visual,Xe,dn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Kt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(Ct,Ut,Kt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Ut,Kt),Ct.transform.baseVal.replaceItem(kt,0)},Lt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Lt.prototype.showControlBox=function(){this.controlBox.style.display=""},Lt.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))},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Ut=Ct;this.left=Ut.left,this.top=Ut.top,this.width=Ut.width,this.height=Ut.height,this.rotationAngle=Ut.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ut.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ut.containerTransformMatrix))},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut);var Kt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Kt.x*Ct,y:Kt.y*Ut});this.left=kt.x,this.top=kt.y,this.width=this.width*Ct,this.height=this.height*Ut,this.adjustControlBox()},Lt}(ct),Tt=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual)},Lt.prototype.createVisual=function(){this.visual=xe.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)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize()},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Lt.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.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))},Lt.prototype.restoreState=function(Ct){var Ut=Ct;this.fillColor=Ut.fillColor,this.strokeColor=Ut.strokeColor,this.strokeWidth=Ut.strokeWidth,this.strokeDasharray=Ut.strokeDasharray,this.opacity=Ut.opacity,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.setSize()},Lt.title="Rectangle marker",Lt}(Et),Yt=function(Ht){function Lt(Ct,Ut,Kt,kt){var Pe=Ht.call(this,Ct,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Pe.widths=[],Pe.widthBoxes=[],Pe.widths=Ut,Pe.currentWidth=Kt,Pe.setCurrentWidth=Pe.setCurrentWidth.bind(Pe),Pe}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");return Ut.style.display="flex",Ut.style.overflow="hidden",Ut.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)}),Ut.appendChild(kt);var Pe=document.createElement("div");Pe.innerText=Kt.toString(),Pe.style.marginRight="5px",kt.appendChild(Pe);var dn=document.createElement("div");dn.style.minHeight="20px",dn.style.flexGrow="2",dn.style.display="flex",dn.style.alignItems="center";var Xe=document.createElement("hr");Xe.style.minWidth="20px",Xe.style.border="0px",Xe.style.borderTop=Kt+"px solid "+Ct.uiStyleSettings.toolboxColor,Xe.style.flexGrow="2",dn.appendChild(Xe),kt.appendChild(dn),Ct.widthBoxes.push(kt)}),Ut},Lt.prototype.setCurrentWidth=function(Ct,Ut){var Kt=this;this.currentWidth=Ct,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(et),Xt=function(Ht){function Lt(Ct,Ut,Kt,kt){var Pe=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 Pe.styles=[],Pe.styleBoxes=[],Pe.styles=Ut,Pe.currentStyle=Kt,Pe.setCurrentStyle=Pe.setCurrentStyle.bind(Pe),Pe}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");return Ut.style.display="flex",Ut.style.overflow="hidden",Ut.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)}),Ut.appendChild(kt);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.overflow="hidden";var dn=`<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>`;Pe.innerHTML=dn,kt.appendChild(Pe),Ct.styleBoxes.push(kt)}),Ut},Lt.prototype.setCurrentStyle=function(Ct,Ut){var Kt=this;this.currentStyle=Ct,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(et),he=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Xt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Fe(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Lt}(Tt),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"},ue=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!!Ht.prototype.ownsTarget.call(this,Ct)||!(!this.grip1.ownsTarget(Ct)&&!this.grip2.ownsTarget(Ct))},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),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(Ut)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ut)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(Ct){var Ut=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",Ut==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.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)},Lt.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()},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=xe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){this.positionGrips()},Lt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Lt.prototype.createGrip=function(){var Ct=new gt;return Ct.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Lt.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)},Lt.prototype.positionGrip=function(Ct,Ut,Kt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Ut,Kt),Ct.transform.baseVal.replaceItem(kt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ht.prototype.getState.call(this))},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Ut=Ct;this.x1=Ut.x1,this.y1=Ut.y1,this.x2=Ut.x2,this.y2=Ut.y2},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.x1=this.x1*Ct,this.y1=this.y1*Ut,this.x2=this.x2*Ct,this.y2=this.y2*Ut,this.adjustVisual(),this.adjustControlBox()},Lt}(ct),Ye=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Xt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorLine&&Ct!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorLine=xe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=xe.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)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Lt.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()),xe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Ut=Ct;this.strokeColor=Ut.strokeColor,this.strokeWidth=Ut.strokeWidth,this.strokeDasharray=Ut.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Lt}(ue),Le=function(Ht){function Lt(Ct,Ut,Kt,kt){var Pe=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 Pe.fonts=[],Pe.fontBoxes=[],Pe.fonts=Ut,Pe.currentFont=Kt,Pe.setCurrentFont=Pe.setCurrentFont.bind(Pe),Pe}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");return Ut.style.overflow="hidden",Ut.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)}),Ut.appendChild(kt);var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.fontFamily=Kt,Pe.style.overflow="hidden";var dn=document.createElement("div");dn.style.whiteSpace="nowrap",dn.style.overflow="hidden",dn.style.textOverflow="ellipsis",dn.innerHTML="The quick brown fox jumps over the lazy dog",Pe.appendChild(dn),kt.appendChild(Pe),Ct.fontBoxes.push(kt)}),Ut},Lt.prototype.setCurrentFont=function(Ct,Ut){var Kt=this;this.currentFont=Ct,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(et),sn=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Le("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){if(Ht.prototype.ownsTarget.call(this,Ct)||Ct===this.visual||Ct===this.textElement||Ct===this.bgRectangle)return!0;var Ut=!1;return this.textElement.childNodes.forEach(function(Kt){Kt===Ct&&(Ut=!0)}),Ut},Lt.prototype.createVisual=function(){this.visual=xe.createGroup(),this.bgRectangle=xe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=xe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.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(Ut){Ct.textElement.appendChild(xe.createTSpan(Ut.trim()===""?" ":Ut.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var Ct=this.textElement.getBBox(),Ut=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;Ut=Math.min(Kt,kt)}return Ut},Lt.prototype.getTextPosition=function(Ct){var Ut=this.textElement.getBBox(),Kt=0,kt=0;return Ut.width>0&&Ut.height>0&&(Kt=(this.width-Ut.width*Ct)/2,kt=this.height/2-Ut.height*Ct/2),{x:Kt,y:kt}},Lt.prototype.sizeText=function(){var Ct=this.textElement.getBBox(),Ut=this.getTextScale(),Kt=this.getTextPosition(Ut);Kt.y-=Ct.y*Ut,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Kt.x+"px, "+Kt.y+"px) scale("+Ut+", "+Ut+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Kt.x,Kt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ut,Ut))},Lt.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)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(Ct){var Ut=this.state;Ut==="creating"&&(this._suppressMarkerCreateEvent=!0),Ht.prototype.pointerUp.call(this,Ct),this.setSize(),(Ut==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.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(Ut){Ut.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ut=Number.parseFloat(Ct.textEditor.style.fontSize);Ct.textEditor.clientWidth>=Number.parseInt(Ct.textEditor.style.maxWidth)&&Ut>.9;)Ut-=.1,Ct.textEditor.style.fontSize=Math.max(Ut,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ut){Ut.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ut){if(Ut.clipboardData){var Kt=Ut.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Kt)),Ut.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")},Lt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ct=this.getTextScale(),Ut=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};Ut.x-=kt.x/2,Ut.y-=kt.y/2,this.textEditor.style.top=Ut.y+"px",this.textEditor.style.left=Ut.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ut.x+"px",this.textEditor.style.fontSize=Math.max(16*Ct,12)+"px",this.textElement.style.display="none"}},Lt.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()},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ht.prototype.deselect.call(this)},Lt.prototype.dblClick=function(Ct,Ut){Ht.prototype.dblClick.call(this,Ct,Ut),this.showTextEditor()},Lt.prototype.setColor=function(Ct){this.textElement&&xe.setAttributes(this.textElement,[["fill",Ct]]),this.color=Ct,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ct)},Lt.prototype.setFont=function(Ct){this.textElement&&xe.setAttributes(this.textElement,[["font-family",Ct]]),this.fontFamily=Ct,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Lt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Lt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.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=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){var Ut=Ct;this.color=Ut.color,this.fontFamily=Ut.fontFamily,this.padding=Ut.padding,this.text=Ut.text,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.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>',Lt}(Et),vn=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=xe.createGroup(),this.drawingImage=xe.createImage(),this.visual.appendChild(this.drawingImage);var Ct=xe.createTransform();this.visual.transform.baseVal.appendItem(Ct),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Ct,Ut){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,Ut)},Lt.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)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.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)},Lt.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)},Lt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var Ct=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ut=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Kt=Ut[0],kt=Ut[1],Pe=Ut[2],dn=Ut[3],Xe=!1,Ze=0;Ze<this.canvasElement.height;Ze++)for(var Qe=0;Qe<this.canvasElement.width;Qe++)Ct.data[Ze*this.canvasElement.width*4+4*Qe+3]>0&&(Xe=!0,Ze<kt&&(kt=Ze),Qe<Kt&&(Kt=Qe),Ze>dn&&(dn=Ze),Qe>Pe&&(Pe=Qe));if(Xe){this.left=Kt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Pe-Kt)/this.pixelRatio,this.height=(dn-kt)/this.pixelRatio;var ln=document.createElement("canvas");ln.width=Pe-Kt,ln.height=dn-kt,ln.getContext("2d").putImageData(this.canvasContext.getImageData(Kt,kt,Pe-Kt,dn-kt),0,0),this.drawingImgUrl=ln.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(Ct){this.color=Ct,this.colorChanged(Ct)},Lt.prototype.setLineWidth=function(Ct){this.lineWidth=Ct},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({drawingImgUrl:this.drawingImgUrl},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.drawingImgUrl=Ct.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.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>',Lt}(Et),On=function(Ht){function Lt(Ct,Ut,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=Ut,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");Ut.style.display="flex",Ut.style.overflow="hidden",Ut.style.flexGrow="2";for(var Kt=function(dn){var Xe="both";switch(dn){case 0:Xe="both";break;case 1:Xe="start";break;case 2:Xe="end";break;case 3:Xe="none"}var Ze=document.createElement("div");if(Ze.style.display="flex",Ze.style.flexGrow="2",Ze.style.alignItems="center",Ze.style.justifyContent="space-between",Ze.style.padding="5px",Ze.style.borderWidth="2px",Ze.style.borderStyle="solid",Ze.style.borderColor=Xe===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",Ze.addEventListener("click",function(){Ct.setCurrentType(Xe,Ze)}),Ut.appendChild(Ze),Xe==="both"||Xe==="start"){var Qe=document.createElement("div");Qe.style.display="flex",Qe.style.alignItems="center",Qe.style.minHeight="20px",Qe.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>`,Qe.style.marginLeft="5px",Ze.appendChild(Qe)}var ln=document.createElement("div");ln.style.display="flex",ln.style.alignItems="center",ln.style.minHeight="20px",ln.style.flexGrow="2";var an=document.createElement("hr");if(an.style.minWidth="20px",an.style.border="0px",an.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),an.style.flexGrow="2",ln.appendChild(an),Ze.appendChild(ln),Xe==="both"||Xe==="end"){var Sn=document.createElement("div");Sn.style.display="flex",Sn.style.alignItems="center",Sn.style.minHeight="20px",Sn.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>`,Sn.style.marginRight="5px",Ze.appendChild(Sn)}kt.typeBoxes.push(Ze)},kt=this,Pe=0;Pe<4;Pe++)Kt(Pe);return Ut},Lt.prototype.setCurrentType=function(Ct,Ut){var Kt=this;this.currentType=Ct,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings!==void 0?Kt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(et),ri=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 On("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.arrow1&&Ct!==this.arrow2)},Lt.prototype.getArrowPoints=function(Ct,Ut){var Kt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return Ct-Kt/2+","+(Ut+kt/2)+" "+Ct+","+(Ut-kt/2)+" "+(Ct+Kt/2)+","+(Ut+kt/2)},Lt.prototype.createTips=function(){this.arrow1=xe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=xe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="creating"&&this.createTips()},Lt.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",xe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),xe.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 Ut=this.arrow1.transform.baseVal.getItem(0);Ut.setRotate(Ct,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ut,0);var Kt=this.arrow2.transform.baseVal.getItem(0);Kt.setRotate(Ct+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Kt,0)}},Lt.prototype.setArrowType=function(Ct){this.arrowType=Ct,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({arrowType:this.arrowType},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Ut=Ct;this.arrowType=Ut.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Lt}(Ye),Vn=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Fe(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Lt}(Tt),Qi=function(Ht){function Lt(Ct,Ut,Kt,kt){var Pe=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 Pe.opacities=[],Pe.opacityBoxes=[],Pe.opacities=Ut,Pe.currentOpacity=Kt,Pe.setCurrentOpacity=Pe.setCurrentOpacity.bind(Pe),Pe}return Fe(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Ut=document.createElement("div");return Ut.style.display="flex",Ut.style.overflow="hidden",Ut.style.flexGrow="2",Ut.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)}),Ut.appendChild(kt);var Pe=document.createElement("div");Pe.innerText=100*Kt+"%",kt.appendChild(Pe),Ct.opacityBoxes.push(kt)}),Ut},Lt.prototype.setCurrentOpacity=function(Ct,Ut){var Kt=this;this.currentOpacity=Ct,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Ut?Kt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(et),Gn=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Qi("Opacity",Kt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Fe(Lt,Ht),Lt.prototype.setOpacity=function(Ct){this.opacity=Ct,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.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>',Lt}(Vn),Ce='<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>',_t='<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>',Bn=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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,Ce),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new nt("Fill color",Kt.defaultColorSet,kt.bgColor,_t),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new Le("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(xe.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return Ht.prototype.ownsTarget.call(this,Ct)||this.tipGrip.ownsTarget(Ct)||this.tip===Ct},Lt.prototype.createTip=function(){xe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=xe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(Ct,Ut){this.state==="new"&&Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ut)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ht.prototype.pointerDown.call(this,Ct,Ut)},Lt.prototype.pointerUp=function(Ct){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ht.prototype.pointerUp.call(this,Ct);else{var Ut=this.state==="creating";Ht.prototype.pointerUp.call(this,Ct),this.setTipPoints(Ut),this.positionTip()}},Lt.prototype.manipulate=function(Ct){if(this.tipMoving){var Ut=this.unrotatePoint(Ct);this.tipPosition={x:Ut.x-this.manipulationStartLeft,y:Ut.y-this.manipulationStartTop},this.positionTip()}else Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.setBgColor=function(Ct){this.bgRectangle&&this.tip&&(xe.setAttributes(this.bgRectangle,[["fill",Ct]]),xe.setAttributes(this.tip,[["fill",Ct]])),this.bgColor=Ct,this.fillColorChanged(Ct)},Lt.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},Lt.prototype.setTipPoints=function(Ct){Ct===void 0&&(Ct=!1);var Ut=Math.min(this.height/2,15),Kt=this.height/5;Ct&&(this.tipPosition={x:Ut+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,Ut=Math.min(this.width/2,15),this.tipBase1Position={x:Ut,y:0},this.tipBase2Position={x:Ut+Kt,y:0}):(this.tipBase1Position={x:0,y:Ut},this.tipBase2Position={x:0,y:Ut+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,Ut=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ut-Kt,y:0},this.tipBase2Position={x:this.width-Ut,y:0}):(this.tipBase1Position={x:this.width,y:Ut},this.tipBase2Position={x:this.width,y:Ut+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,Ut=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ut-Kt,y:this.height},this.tipBase2Position={x:this.width-Ut,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ut-Kt},this.tipBase2Position={x:this.width,y:this.height-Ut}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Kt=this.width/5,Ut=Math.min(this.width/2,15),this.tipBase1Position={x:Ut,y:this.height},this.tipBase2Position={x:Ut+Kt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ut},this.tipBase2Position={x:0,y:this.height-Ut-Kt})},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.positionTip()},Lt.prototype.positionTip=function(){xe.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(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.select=function(){this.positionTip(),Ht.prototype.select.call(this)},Lt.prototype.getState=function(){var Ct=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){var Ut=Ct;this.bgColor=Ut.bgColor,this.tipPosition=Ut.tipPosition,Ht.prototype.restoreState.call(this,Ct),this.createTip(),this.setTipPoints()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.tipPosition={x:this.tipPosition.x*Ct,y:this.tipPosition.y*Ut},this.positionTip()},Lt.typeName="CalloutMarker",Lt.title="Callout marker",Lt.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>',Lt}(sn),Si=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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",be(Kt.defaultColorSet,["transparent"]),Kt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",be(Kt.defaultColorSet,["transparent"]),kt.fillColor,_t),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Xt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new Qi("Opacity",Kt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual)},Lt.prototype.createVisual=function(){this.visual=xe.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)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),xe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Lt.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize()},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Lt.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ct),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.setOpacity=function(Ct){this.opacity=Ct,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.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=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){var Ut=Ct;this.fillColor=Ut.fillColor,this.strokeColor=Ut.strokeColor,this.strokeWidth=Ut.strokeWidth,this.strokeDasharray=Ut.strokeDasharray,this.opacity=Ut.opacity,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.setSize()},Lt.typeName="EllipseMarker",Lt.title="Ellipse marker",Lt.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>',Lt}(Et),ei=function(Ht){function Lt(Ct,Ut,Kt){return Ht.call(this,Ct,Ut,Kt)||this}return Fe(Lt,Ht),Object.defineProperty(Lt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.tip1&&Ct!==this.tip2)},Lt.prototype.createTips=function(){this.tip1=xe.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(xe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=xe.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(xe.createTransform()),this.visual.appendChild(this.tip2)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ht.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(xe.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()]]),xe.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),Ut=this.tip1.transform.baseVal.getItem(0);Ut.setRotate(Ct,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ut,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(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.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>',Lt}(Ye),_e=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,Kt)||this;return kt.strokePanel.colors=Kt.defaultColorSet,kt.fillColor="transparent",kt}return Fe(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.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>',Lt}(Si),Mn=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(Lt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Lt)||(this.undoStack.push(Lt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Lt)&&this.redoStack.splice(0,this.redoStack.length))},Ht.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},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 Lt=this.undoStack.pop();return Lt!==void 0&&this.redoStack.push(Lt),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}(),_n=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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 Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Xt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorCurve&&Ct!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ct))},Lt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Lt.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorCurve=xe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=xe.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)},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),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(Ut)&&(this.activeGrip=this.curveGrip,this._state="resize")},Lt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),xe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Ht.prototype.setupControlBox.call(this),this.curveControlLine1=xe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=xe.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)},Lt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ht.prototype.addControlGrips.call(this)},Lt.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()))},Lt.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)},Lt.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)},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.adjustVisual()},Lt.prototype.scale=function(Ct,Ut){this.curveX=this.curveX*Ct,this.curveY=this.curveY*Ut,Ht.prototype.scale.call(this,Ct,Ut)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.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=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Ut=Ct;this.strokeColor=Ut.strokeColor,this.strokeWidth=Ut.strokeWidth,this.strokeDasharray=Ut.strokeDasharray,this.curveX=Ut.curveX,this.curveY=Ut.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.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>',Lt}(ue),fi=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,Ut,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",be(Kt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",be(Kt.defaultColorSet,["transparent"]),kt.fillColor,_t),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Yt("Line width",Kt.defaultStrokeWidths,Kt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Xt("Line style",Kt.defaultStrokeDasharrays,Kt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new Le("Font",Kt.defaultFontFamilies,Kt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new nt("Text color",Kt.defaultColorSet,kt.textColor,Ce),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return Fe(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.frame&&Ct!==this.captionBg&&Ct!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=xe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=xe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=xe.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=xe.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()},Lt.prototype.setCaptionText=function(Ct){this.captionText=Ct,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(Ct,Ut){Ht.prototype.pointerDown.call(this,Ct,Ut),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.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)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Lt.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),xe.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')"]]),xe.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')"]])},Lt.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(Ut){Ut.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ut){Ut.key==="Enter"&&Ct.finishTextEditing(Ct.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ut){Ut.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()},Lt.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"))},Lt.prototype.finishTextEditing=function(Ct){this.setCaptionText(Ct.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(Ct){this.captionElement&&xe.setAttributes(this.captionElement,[["font-family",Ct]]),this.fontFamily=Ct,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(Ct){this.captionElement&&xe.setAttributes(this.captionElement,[["fill",Ct]]),this.textColor=Ct,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),xe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.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},Lt.prototype.dblClick=function(Ct,Ut){Ht.prototype.dblClick.call(this,Ct,Ut),this.showTextEditor()},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.frame&&xe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Lt.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.captionBg&&xe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ct),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.frame&&xe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.frame&&xe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Lt.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},Lt.prototype.restoreState=function(Ct){var Ut=Ct;this.fillColor=Ut.fillColor,this.strokeColor=Ut.strokeColor,this.strokeWidth=Ut.strokeWidth,this.strokeDasharray=Ut.strokeDasharray,this.textColor=Ut.textColor,this.fontFamily=Ut.fontFamily,this.captionText=Ut.captionText,this.fontSize=Ut.fontSize,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Ut){Ht.prototype.scale.call(this,Ct,Ut),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.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>',Lt}(Et),Kn=function(){function Ht(Lt,Ct){Ct===void 0&&(Ct=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,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}(),Pi=function(Ht){function Lt(Ct,Ut,Kt){var kt=Ht.call(this,Ct,!1)||this;return kt.dataUrl=Ut,kt.state=Kt,kt}return Fe(Lt,Ht),Lt}(Kn),le=function(Ht){function Lt(Ct,Ut,Kt){Kt===void 0&&(Kt=!1);var kt=Ht.call(this,Ct,Kt)||this;return kt.marker=Ut,kt}return Fe(Lt,Ht),Lt}(Kn),bn=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(Lt,Ct){this[Lt].push(Ct)},Ht.prototype.removeEventListener=function(Lt,Ct){var Ut=this[Lt].indexOf(Ct);Ut>-1&&this[Lt].splice(Ut,1)},Ht}(),ci=function(){function Ht(Lt){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 Mn,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 bn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ht.instanceCounter++,this.styles=new se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Lt,this.targetRoot=document.body,this.width=Lt.clientWidth,this.height=Lt.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,vn,ri,sn,_e,Si,Gn,Bn,ei,Vn,Ye,_n,fi]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[he,vn,ri,sn,Si,Gn,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"BASIC_MARKER_TYPES",{get:function(){return[he,vn,ri,sn,Gn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var Ct=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Ut){if(typeof Ut=="string"){var Kt=Ct.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Ut});Kt!==void 0&&Ct._availableMarkerTypes.push(Kt)}else Ct._availableMarkerTypes.push(Ut)})},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(Lt){this._zoomLevel=Lt,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(),ye.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ht.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&Me.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Me.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ct){return Ct(new Kn(Lt))})},Ht.prototype.render=function(){return Te(this,void 0,void 0,function(){var Lt;return tn(this,function(Ct){switch(Ct.label){case 0:return this.setCurrentMarker(),(Lt=new De).naturalSize=this.renderAtNaturalSize,Lt.imageType=this.renderImageType,Lt.imageQuality=this.renderImageQuality,Lt.markersOnly=this.renderMarkersOnly,Lt.width=this.renderWidth,Lt.height=this.renderHeight,[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ct.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ct.sent()]}})})},Ht.prototype.close=function(Lt){var Ct=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Ut=!1;Lt||this.eventListeners.beforeclose.forEach(function(Kt){var kt=new Kn(Ct,!0);Kt(kt),kt.defaultPrevented&&(Ut=!0)}),Ut||(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 Lt,Ct=[],Ut=0;Ut<arguments.length;Ut++)Ct[Ut]=arguments[Ut];(Lt=this._availableMarkerTypes).push.apply(Lt,Ct)},Ht.prototype.addRenderEventListener=function(Lt){this.addEventListener("render",function(Ct){Lt(Ct.dataUrl,Ct.state)})},Ht.prototype.removeRenderEventListener=function(Lt){},Ht.prototype.addCloseEventListener=function(Lt){this.addEventListener("close",function(){Lt()})},Ht.prototype.removeCloseEventListener=function(Lt){},Ht.prototype.setupResizeObserver=function(){var Lt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Lt.resize(Lt.target.clientWidth,Lt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Lt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ht.prototype.onPopupTargetResize=function(){var Lt=1*this.target.clientWidth/this.target.clientHeight,Ct=this.editorCanvas.clientWidth/Lt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Ut=Ct<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Lt;this.resize(Ct,Ut)},Ht.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ht.prototype.resize=function(Lt,Ct){this._isResizing=!0;var Ut=Lt/this.imageWidth,Kt=Ct/this.imageHeight;this.imageWidth=Math.round(Lt),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(Ut,Kt),this._isResizing=!1},Ht.prototype.scaleMarkers=function(Lt,Ct){var Ut,Kt=this;this._currentMarker&&this._currentMarker instanceof sn?this._currentMarker.scale(Lt,Ct):(Ut=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==Kt._currentMarker&&kt.scale(Lt,Ct)}),Ut!==void 0&&this.setCurrentMarker(Ut)},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 Lt=this.editingTarget.getBoundingClientRect(),Ct=this.editorCanvas.getBoundingClientRect();this.left=Lt.left-Ct.left,this.top=Lt.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 Lt,Ct=[],Ut=0;Ut<arguments.length;Ut++)Ct[Ut]=arguments[Ut];this.defs=xe.createDefs(),this.addDefsToImage(),(Lt=this.defs).append.apply(Lt,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 Lt=document.createElement("a");Lt.href="https://markerjs.com/",Lt.target="_blank",Lt.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>',Lt.title="Powered by marker.js",Lt.style.display="grid",Lt.style.alignItems="center",Lt.style.justifyItems="center",Lt.style.padding="3px",Lt.style.width="20px",Lt.style.height="20px",this.logoUI.appendChild(Lt),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 Lt=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=Lt+"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 un(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 Qt(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(Lt){this.markerImage.removeChild(Lt.container),this.markers.indexOf(Lt)>-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.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(Lt,Ct){if(Lt==="marker"&&Ct!==void 0)this.createNewMarker(Ct);else if(Lt==="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 Lt=this;if(this._currentMarker!==void 0){var Ct=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Kt){var kt=new le(Lt,Lt._currentMarker,!0);Kt(kt),kt.defaultPrevented&&(Ct=!0)}),!Ct){var Ut=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 le(Lt,Ut))})}}},Ht.prototype.clear=function(){var Lt=this,Ct=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Pe){var dn=new le(Lt,void 0,!0);Pe(dn),dn.defaultPrevented&&(Ct=!0)}),!Ct)){this.setCurrentMarker();for(var Ut=function(Pe){var dn=Kt.markers[Pe];Kt.setCurrentMarker(Kt.markers[Pe]),Kt._currentMarker.dispose(),Kt.markerImage.removeChild(Kt._currentMarker.container),Kt.markers.splice(Kt.markers.indexOf(Kt._currentMarker),1),Kt.eventListeners.markerdelete.forEach(function(Xe){return Xe(new le(Lt,dn))})},Kt=this,kt=this.markers.length-1;kt>=0;kt--)Ut(kt);this.addUndoStep()}},Object.defineProperty(Ht.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ht.prototype.showNotesEditor=function(){var Lt;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=(Lt=this._currentMarker.notes)!==null&&Lt!==void 0?Lt:"",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 Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ct=this.getState(),Ut=this.undoRedoManager.getLastUndoStep();if(!Ut||Ut.width===Ct.width&&Ut.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(Lt))})}else this.undoRedoManager.replaceLastUndoStep(Ct),this.eventListeners.statechange.forEach(function(kt){return kt(new Kn(Lt))})}},Ht.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ht.prototype.undoStep=function(){var Lt=this,Ct=this.undoRedoManager.undo();Ct!==void 0&&(this.restoreState(Ct),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ut){return Ut(new Kn(Lt))}))},Ht.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ht.prototype.redoStep=function(){var Lt=this,Ct=this.undoRedoManager.redo();Ct!==void 0&&(this.restoreState(Ct),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ut){return Ut(new Kn(Lt))}))},Ht.prototype.stepZoom=function(){var Lt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Lt<this.zoomSteps.length-1?this.zoomSteps[Lt+1]:this.zoomSteps[0]},Ht.prototype.panTo=function(Lt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Lt.x,top:this.prevPanPoint.y-Lt.y}),this.prevPanPoint=Lt},Ht.prototype.startRenderAndClose=function(){return Te(this,void 0,void 0,function(){var Lt,Ct,Ut=this;return tn(this,function(Kt){switch(Kt.label){case 0:return[4,this.render()];case 1:return Lt=Kt.sent(),Ct=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new Pi(Ut,Lt,Ct))}),this.close(!0),[2]}})})},Ht.prototype.getState=function(Lt){Lt===!0&&this.setCurrentMarker();var Ct={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ut){return Ct.markers.push(Ut.getState())}),Ct},Ht.prototype.restoreState=function(Lt){var Ct=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Lt.markers.forEach(function(Ut){var Kt=Ct._availableMarkerTypes.find(function(Pe){return Pe.typeName===Ut.typeName});if(Kt!==void 0){var kt=Ct.addNewMarker(Kt);kt.restoreState(Ut),Ct.markers.push(kt)}}),Lt.width&&Lt.height&&(Lt.width!==this.imageWidth||Lt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Lt.width,this.imageHeight/Lt.height),this.eventListeners.restorestate.forEach(function(Ut){return Ut(new Kn(Ct))})},Ht.prototype.addNewMarker=function(Lt){var Ct=xe.createGroup();return this.markerImage.appendChild(Ct),new Lt(Ct,this.overlayContainer,this.settings)},Ht.prototype.createNewMarker=function(Lt){var Ct,Ut=this;(Ct=typeof Lt=="string"?this._availableMarkerTypes.find(function(Kt){return Kt.typeName===Lt}):Lt)&&(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 le(Ut,Ut._currentMarker))}))},Ht.prototype.markerCreated=function(Lt){var Ct=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Lt),this.setCurrentMarker(Lt),Lt instanceof vn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(vn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ut){return Ut(new le(Ct,Ct._currentMarker))})},Ht.prototype.colorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Lt,this.settings.defaultStrokeColor=Lt)},Ht.prototype.fillColorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Lt)},Ht.prototype.markerStateChanged=function(Lt){var Ct=this;this.eventListeners.markerchange.forEach(function(Ut){return Ut(new le(Ct,Lt))})},Ht.prototype.setCurrentMarker=function(Lt){var Ct=this;this._currentMarker!==Lt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ut){return Ut(new le(Ct,Ct._currentMarker))})),this._currentMarker=Lt,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(Ut){return Ut(new le(Ct,Ct._currentMarker))}))},Ht.prototype.onPointerDown=function(Lt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Lt.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(Ut){return Ut.ownsTarget(Lt.target)});Ct!==void 0?(this.setCurrentMarker(Ct),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Lt.clientX,y:Lt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY))},Ht.prototype.onDblClick=function(Lt){if(this._isFocused||this.focus(),this.mode==="select"){var Ct=this.markers.find(function(Ut){return Ut.ownsTarget(Lt.target)});Ct!==void 0&&Ct!==this._currentMarker&&this.setCurrentMarker(Ct),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target):this.setCurrentMarker()}},Ht.prototype.onPointerMove=function(Lt){this.touchPoints!==1&&Lt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Lt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)):this.zoomLevel>1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Ht.prototype.onPointerUp=function(Lt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)),this.isDragging=!1,this.addUndoStep()},Ht.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ht.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Ht.prototype.clientToLocalCoordinates=function(Lt,Ct){var Ut=this.markerImage.getBoundingClientRect();return{x:(Lt-Ut.left)/this.zoomLevel,y:(Ct-Ut.top)/this.zoomLevel}},Ht.prototype.onWindowResize=function(){this.positionUI()},Ht.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Lt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"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(Lt){ye.addKey(Lt)},Ht.prototype.addEventListener=function(Lt,Ct){this.eventListeners.addEventListener(Lt,Ct)},Ht.prototype.removeEventListener=function(Lt,Ct){this.eventListeners.removeEventListener(Lt,Ct)},Ht.prototype.renderState=function(Lt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Lt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ht.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ht.prototype.focus=function(){var Lt=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(Lt))}))},Ht.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ct){return Ct(new Kn(Lt))}))},Ht.instanceCounter=0,Ht}()},738:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return yt}});var Nt=ne(72308),Fe=ne(49618),Te=ne(52487),tn=ne(74416),be=ne(92310),xe=ne.n(be),ye=ne(18929),De=ne(10228),Me=ne(26112),se=ne(59301);function hn(Et,Tt){var Yt=Et.disabled,Xt=Et.prefixCls,he=Et.character,fe=Et.characterRender,ue=Et.index,Ye=Et.count,Le=Et.value,sn=Et.allowHalf,vn=Et.focused,On=Et.onHover,ri=Et.onClick,Vn=function(_e){On(_e,ue)},Qi=function(_e){ri(_e,ue)},Gn=function(_e){_e.keyCode===De.Z.ENTER&&ri(_e,ue)},Ce=ue+1,_t=new Set([Xt]);Le===0&&ue===0&&vn?_t.add("".concat(Xt,"-focused")):sn&&Le+.5>=Ce&&Le<Ce?(_t.add("".concat(Xt,"-half")),_t.add("".concat(Xt,"-active")),vn&&_t.add("".concat(Xt,"-focused"))):(Ce<=Le?_t.add("".concat(Xt,"-full")):_t.add("".concat(Xt,"-zero")),Ce===Le&&vn&&_t.add("".concat(Xt,"-focused")));var Bn=typeof he=="function"?he(Et):he,Si=se.createElement("li",{className:xe()(Array.from(_t)),ref:Tt},se.createElement("div",{onClick:Yt?null:Qi,onKeyDown:Yt?null:Gn,onMouseMove:Yt?null:Vn,role:"radio","aria-checked":Le>ue?"true":"false","aria-posinset":ue+1,"aria-setsize":Ye,tabIndex:Yt?-1:0},se.createElement("div",{className:"".concat(Xt,"-first")},Bn),se.createElement("div",{className:"".concat(Xt,"-second")},Bn)));return fe&&(Si=fe(Si,Et)),Si}var Be=se.forwardRef(hn);function un(){var Et=se.useRef({});function Tt(Xt){return Et.current[Xt]}function Yt(Xt){return function(he){Et.current[Xt]=he}}return[Tt,Yt]}function Qt(Et){var Tt=Et.pageXOffset,Yt="scrollLeft";if(typeof Tt!="number"){var Xt=Et.document;Tt=Xt.documentElement[Yt],typeof Tt!="number"&&(Tt=Xt.body[Yt])}return Tt}function et(Et){var Tt,Yt,Xt=Et.ownerDocument,he=Xt.body,fe=Xt&&Xt.documentElement,ue=Et.getBoundingClientRect();return Tt=ue.left,Yt=ue.top,Tt-=fe.clientLeft||he.clientLeft||0,Yt-=fe.clientTop||he.clientTop||0,{left:Tt,top:Yt}}function nt(Et){var Tt=et(Et),Yt=Et.ownerDocument,Xt=Yt.defaultView||Yt.parentWindow;return Tt.left+=Qt(Xt),Tt.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(Et,Tt){var Yt=Et.prefixCls,Xt=Yt===void 0?"rc-rate":Yt,he=Et.className,fe=Et.defaultValue,ue=Et.value,Ye=Et.count,Le=Ye===void 0?5:Ye,sn=Et.allowHalf,vn=sn===void 0?!1:sn,On=Et.allowClear,ri=On===void 0?!0:On,Vn=Et.keyboard,Qi=Vn===void 0?!0:Vn,Gn=Et.character,Ce=Gn===void 0?"\u2605":Gn,_t=Et.characterRender,Bn=Et.disabled,Si=Et.direction,ei=Si===void 0?"ltr":Si,_e=Et.tabIndex,Mn=_e===void 0?0:_e,_n=Et.autoFocus,fi=Et.onHoverChange,Kn=Et.onChange,Pi=Et.onFocus,le=Et.onBlur,bn=Et.onKeyDown,ci=Et.onMouseLeave,Ht=(0,tn.Z)(Et,ct),Lt=un(),Ct=(0,Te.Z)(Lt,2),Ut=Ct[0],Kt=Ct[1],kt=se.useRef(null),Pe=function(){if(!Bn){var Br;(Br=kt.current)===null||Br===void 0||Br.focus()}};se.useImperativeHandle(Tt,function(){return{focus:Pe,blur:function(){if(!Bn){var Br;(Br=kt.current)===null||Br===void 0||Br.blur()}}}});var dn=(0,ye.Z)(fe||0,{value:ue}),Xe=(0,Te.Z)(dn,2),Ze=Xe[0],Qe=Xe[1],ln=(0,ye.Z)(null),an=(0,Te.Z)(ln,2),Sn=an[0],jn=an[1],Wn=function(Br,Gr){var Pt=ei==="rtl",$i=Br+1;if(vn){var Hr=Ut(Br),Dr=nt(Hr),oo=Hr.clientWidth;(Pt&&Gr-Dr>oo/2||!Pt&&Gr-Dr<oo/2)&&($i-=.5)}return $i},wn=function(Br){Qe(Br),Kn==null||Kn(Br)},qn=se.useState(!1),di=(0,Te.Z)(qn,2),hr=di[0],tr=di[1],ro=function(){tr(!0),Pi==null||Pi()},pr=function(){tr(!1),le==null||le()},er=se.useState(null),ur=(0,Te.Z)(er,2),Lo=ur[0],Bo=ur[1],Ur=function(Br,Gr){var Pt=Wn(Gr,Br.pageX);Pt!==Sn&&(Bo(Pt),jn(null)),fi==null||fi(Pt)},Er=function(Br){Bn||(Bo(null),jn(null),fi==null||fi(void 0)),Br&&(ci==null||ci(Br))},lo=function(Br,Gr){var Pt=Wn(Gr,Br.pageX),$i=!1;ri&&($i=Pt===Ze),Er(),wn($i?0:Pt),jn($i?Pt:null)},Vo=function(Br){var Gr=Br.keyCode,Pt=ei==="rtl",$i=vn?.5:1;Qi&&(Gr===De.Z.RIGHT&&Ze<Le&&!Pt?(wn(Ze+$i),Br.preventDefault()):Gr===De.Z.LEFT&&Ze>0&&!Pt||Gr===De.Z.RIGHT&&Ze>0&&Pt?(wn(Ze-$i),Br.preventDefault()):Gr===De.Z.LEFT&&Ze<Le&&Pt&&(wn(Ze+$i),Br.preventDefault())),bn==null||bn(Br)};se.useEffect(function(){_n&&!Bn&&Pe()},[]);var ko=new Array(Le).fill(0).map(function(jr,Br){return se.createElement(Be,{ref:Kt(Br),index:Br,count:Le,disabled:Bn,prefixCls:"".concat(Xt,"-star"),allowHalf:vn,value:Lo===null?Ze:Lo,onClick:lo,onHover:Ur,key:jr||Br,character:Ce,characterRender:_t,focused:hr})}),Eo=xe()(Xt,he,(0,Fe.Z)((0,Fe.Z)({},"".concat(Xt,"-disabled"),Bn),"".concat(Xt,"-rtl"),ei==="rtl"));return se.createElement("ul",(0,Nt.Z)({className:Eo,onMouseLeave:Er,tabIndex:Bn?-1:Mn,onFocus:Bn?null:ro,onBlur:Bn?null:pr,onKeyDown:Bn?null:Vo,ref:kt},(0,Me.Z)(Ht,{aria:!0,data:!0,attr:!0})),ko)}var gt=se.forwardRef(lt),yt=gt},69582:function(Pn,vi,ne){"use strict";ne.d(vi,{ZP:function(){return ye}});var Nt=ne(52487),Fe=ne(59301),Te=ne(47273),tn=0,be=(0,Te.Z)();function xe(){var De;return be?(De=tn,tn+=1):De="TEST_OR_SSR",De}function ye(De){var Me=Fe.useState(),se=(0,Nt.Z)(Me,2),hn=se[0],Be=se[1];return Fe.useEffect(function(){Be("rc_select_".concat(xe()))},[]),De||hn}},45560:function(Pn,vi,ne){"use strict";ne.d(vi,{Ac:function(){return qn},Xo:function(){return hr},Wx:function(){return ro},ZP:function(){return Oe},lk:function(){return yt}});var Nt=ne(72308),Fe=ne(80702),Te=ne(49618),tn=ne(77321),be=ne(52487),xe=ne(74416),ye=ne(62853),De=ne(18929),Me=ne(48736),se=ne(59301),hn=ne(92310),Be=ne.n(hn),un=ne(34280),Qt=ne(49658),et=ne(8654),nt=function(ge){var cn=ge.className,Zt=ge.customizeIcon,Ue=ge.customizeIconProps,fn=ge.children,Rn=ge.onMouseDown,He=ge.onClick,xn=typeof Zt=="function"?Zt(Ue):Zt;return se.createElement("span",{className:cn,onMouseDown:function(Qn){Qn.preventDefault(),Rn==null||Rn(Qn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:He,"aria-hidden":!0},xn!==void 0?xn:se.createElement("span",{className:Be()(cn.split(/\s+/).map(function(Xn){return"".concat(Xn,"-icon")}))},fn))},ct=nt,lt=function(ge,cn,Zt,Ue,fn){var Rn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,He=arguments.length>6?arguments[6]:void 0,xn=arguments.length>7?arguments[7]:void 0,Xn=se.useMemo(function(){if((0,ye.Z)(Ue)==="object")return Ue.clearIcon;if(fn)return fn},[Ue,fn]),Qn=se.useMemo(function(){return!!(!Rn&&Ue&&(Zt.length||He)&&!(xn==="combobox"&&He===""))},[Ue,Rn,Zt.length,He,xn]);return{allowClear:Qn,clearIcon:se.createElement(ct,{className:"".concat(ge,"-clear"),onMouseDown:cn,customizeIcon:Xn},"\xD7")}},gt=se.createContext(null);function yt(){return se.useContext(gt)}function Et(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ge=se.useState(!1),cn=(0,be.Z)(ge,2),Zt=cn[0],Ue=cn[1],fn=se.useRef(null),Rn=function(){window.clearTimeout(fn.current)};se.useEffect(function(){return Rn},[]);var He=function(Xn,Qn){Rn(),fn.current=window.setTimeout(function(){Ue(Xn),Qn&&Qn()},pe)};return[Zt,He,Rn]}function Tt(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ge=se.useRef(null),cn=se.useRef(null);se.useEffect(function(){return function(){window.clearTimeout(cn.current)}},[]);function Zt(Ue){(Ue||ge.current===null)&&(ge.current=Ue),window.clearTimeout(cn.current),cn.current=window.setTimeout(function(){ge.current=null},pe)}return[function(){return ge.current},Zt]}function Yt(pe,ge,cn,Zt){var Ue=se.useRef(null);Ue.current={open:ge,triggerOpen:cn,customizedTrigger:Zt},se.useEffect(function(){function fn(Rn){var He;if(!((He=Ue.current)!==null&&He!==void 0&&He.customizedTrigger)){var xn=Rn.target;xn.shadowRoot&&Rn.composed&&(xn=Rn.composedPath()[0]||xn),Ue.current.open&&pe().filter(function(Xn){return Xn}).every(function(Xn){return!Xn.contains(xn)&&Xn!==xn})&&Ue.current.triggerOpen(!1)}}return window.addEventListener("mousedown",fn),function(){return window.removeEventListener("mousedown",fn)}},[])}var Xt=ne(10228);function he(pe){return pe&&![Xt.Z.ESC,Xt.Z.SHIFT,Xt.Z.BACKSPACE,Xt.Z.TAB,Xt.Z.WIN_KEY,Xt.Z.ALT,Xt.Z.META,Xt.Z.WIN_KEY_RIGHT,Xt.Z.CTRL,Xt.Z.SEMICOLON,Xt.Z.EQUALS,Xt.Z.CAPS_LOCK,Xt.Z.CONTEXT_MENU,Xt.Z.F1,Xt.Z.F2,Xt.Z.F3,Xt.Z.F4,Xt.Z.F5,Xt.Z.F6,Xt.Z.F7,Xt.Z.F8,Xt.Z.F9,Xt.Z.F10,Xt.Z.F11,Xt.Z.F12].includes(pe)}var fe=ne(26112),ue=ne(11780),Ye=function(ge,cn){var Zt,Ue=ge.prefixCls,fn=ge.id,Rn=ge.inputElement,He=ge.disabled,xn=ge.tabIndex,Xn=ge.autoFocus,Qn=ge.autoComplete,yi=ge.editable,ni=ge.activeDescendantId,En=ge.value,Jn=ge.maxLength,Ki=ge.onKeyDown,qi=ge.onMouseDown,rr=ge.onChange,Ge=ge.onPaste,eo=ge.onCompositionStart,vr=ge.onCompositionEnd,Or=ge.onBlur,Re=ge.open,kn=ge.attrs,ai=Rn||se.createElement("input",null),gi=ai,Bi=gi.ref,Li=gi.props,Xi=Li.onKeyDown,nr=Li.onChange,qt=Li.onMouseDown,$t=Li.onCompositionStart,Vt=Li.onCompositionEnd,Ne=Li.onBlur,Ae=Li.style;return(0,Me.Kp)(!("maxLength"in ai.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ai=se.cloneElement(ai,(0,tn.Z)((0,tn.Z)((0,tn.Z)({type:"search"},Li),{},{id:fn,ref:(0,et.sQ)(cn,Bi),disabled:He,tabIndex:xn,autoComplete:Qn||"off",autoFocus:Xn,className:Be()("".concat(Ue,"-selection-search-input"),(Zt=ai)===null||Zt===void 0||(Zt=Zt.props)===null||Zt===void 0?void 0:Zt.className),role:"combobox","aria-expanded":Re||!1,"aria-haspopup":"listbox","aria-owns":"".concat(fn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(fn,"_list"),"aria-activedescendant":Re?ni:void 0},kn),{},{value:yi?En:"",maxLength:Jn,readOnly:!yi,unselectable:yi?null:"on",style:(0,tn.Z)((0,tn.Z)({},Ae),{},{opacity:yi?null:0}),onKeyDown:function(yn){Ki(yn),Xi&&Xi(yn)},onMouseDown:function(yn){qi(yn),qt&&qt(yn)},onChange:function(yn){rr(yn),nr&&nr(yn)},onCompositionStart:function(yn){eo(yn),$t&&$t(yn)},onCompositionEnd:function(yn){vr(yn),Vt&&Vt(yn)},onPaste:Ge,onBlur:function(yn){Or(yn),Ne&&Ne(yn)}})),ai},Le=se.forwardRef(Ye),sn=Le;function vn(pe){return Array.isArray(pe)?pe:pe!==void 0?[pe]:[]}var On=typeof window!="undefined"&&window.document&&window.document.documentElement,ri=On;function Vn(pe){return pe!=null}function Qi(pe){return!pe&&pe!==0}function Gn(pe){return["string","number"].includes((0,ye.Z)(pe))}function Ce(pe){var ge=void 0;return pe&&(Gn(pe.title)?ge=pe.title.toString():Gn(pe.label)&&(ge=pe.label.toString())),ge}function _t(pe,ge){ri?se.useLayoutEffect(pe,ge):se.useEffect(pe,ge)}function Bn(pe){var ge;return(ge=pe.key)!==null&&ge!==void 0?ge:pe.value}var Si=function(ge){ge.preventDefault(),ge.stopPropagation()},ei=function(ge){var cn=ge.id,Zt=ge.prefixCls,Ue=ge.values,fn=ge.open,Rn=ge.searchValue,He=ge.autoClearSearchValue,xn=ge.inputRef,Xn=ge.placeholder,Qn=ge.disabled,yi=ge.mode,ni=ge.showSearch,En=ge.autoFocus,Jn=ge.autoComplete,Ki=ge.activeDescendantId,qi=ge.tabIndex,rr=ge.removeIcon,Ge=ge.maxTagCount,eo=ge.maxTagTextLength,vr=ge.maxTagPlaceholder,Or=vr===void 0?function(Gi){return"+ ".concat(Gi.length," ...")}:vr,Re=ge.tagRender,kn=ge.onToggleOpen,ai=ge.onRemove,gi=ge.onInputChange,Bi=ge.onInputPaste,Li=ge.onInputKeyDown,Xi=ge.onInputMouseDown,nr=ge.onInputCompositionStart,qt=ge.onInputCompositionEnd,$t=ge.onInputBlur,Vt=se.useRef(null),Ne=(0,se.useState)(0),Ae=(0,be.Z)(Ne,2),Je=Ae[0],yn=Ae[1],Fn=(0,se.useState)(!1),wi=(0,be.Z)(Fn,2),si=wi[0],Ln=wi[1],Hn="".concat(Zt,"-selection"),Wi=fn||yi==="multiple"&&He===!1||yi==="tags"?Rn:"",Ri=yi==="tags"||yi==="multiple"&&He===!1||ni&&(fn||si);_t(function(){yn(Vt.current.scrollWidth)},[Wi]);var Tn=function(Zn,li,Ei,oi,Ai){return se.createElement("span",{title:Ce(Zn),className:Be()("".concat(Hn,"-item"),(0,Te.Z)({},"".concat(Hn,"-item-disabled"),Ei))},se.createElement("span",{className:"".concat(Hn,"-item-content")},li),oi&&se.createElement(ct,{className:"".concat(Hn,"-item-remove"),onMouseDown:Si,onClick:Ai,customizeIcon:rr},"\xD7"))},Ot=function(Zn,li,Ei,oi,Ai,Cr){var $n=function(rn){Si(rn),kn(!fn)};return se.createElement("span",{onMouseDown:$n},Re({label:li,value:Zn,disabled:Ei,closable:oi,onClose:Ai,isMaxTag:!!Cr}))},Yi=function(Zn){var li=Zn.disabled,Ei=Zn.label,oi=Zn.value,Ai=!Qn&&!li,Cr=Ei;if(typeof eo=="number"&&(typeof Ei=="string"||typeof Ei=="number")){var $n=String(Cr);$n.length>eo&&(Cr="".concat($n.slice(0,eo),"..."))}var pi=function(ui){ui&&ui.stopPropagation(),ai(Zn)};return typeof Re=="function"?Ot(oi,Cr,li,Ai,pi):Tn(Zn,Cr,li,Ai,pi)},ki=function(Zn){if(!Ue.length)return null;var li=typeof Or=="function"?Or(Zn):Or;return typeof Re=="function"?Ot(void 0,li,!1,!1,void 0,!0):Tn({title:li},li,!1)},Ui=se.createElement("div",{className:"".concat(Hn,"-search"),style:{width:Je},onFocus:function(){Ln(!0)},onBlur:function(){Ln(!1)}},se.createElement(sn,{ref:xn,open:fn,prefixCls:Zt,id:cn,inputElement:null,disabled:Qn,autoFocus:En,autoComplete:Jn,editable:Ri,activeDescendantId:Ki,value:Wi,onKeyDown:Li,onMouseDown:Xi,onChange:gi,onPaste:Bi,onCompositionStart:nr,onCompositionEnd:qt,onBlur:$t,tabIndex:qi,attrs:(0,fe.Z)(ge,!0)}),se.createElement("span",{ref:Vt,className:"".concat(Hn,"-search-mirror"),"aria-hidden":!0},Wi,"\xA0")),ji=se.createElement(ue.Z,{prefixCls:"".concat(Hn,"-overflow"),data:Ue,renderItem:Yi,renderRest:ki,suffix:Ui,itemKey:Bn,maxCount:Ge});return se.createElement("span",{className:"".concat(Hn,"-wrap")},ji,!Ue.length&&!Wi&&se.createElement("span",{className:"".concat(Hn,"-placeholder")},Xn))},_e=ei,Mn=function(ge){var cn=ge.inputElement,Zt=ge.prefixCls,Ue=ge.id,fn=ge.inputRef,Rn=ge.disabled,He=ge.autoFocus,xn=ge.autoComplete,Xn=ge.activeDescendantId,Qn=ge.mode,yi=ge.open,ni=ge.values,En=ge.placeholder,Jn=ge.tabIndex,Ki=ge.showSearch,qi=ge.searchValue,rr=ge.activeValue,Ge=ge.maxLength,eo=ge.onInputKeyDown,vr=ge.onInputMouseDown,Or=ge.onInputChange,Re=ge.onInputPaste,kn=ge.onInputCompositionStart,ai=ge.onInputCompositionEnd,gi=ge.onInputBlur,Bi=ge.title,Li=se.useState(!1),Xi=(0,be.Z)(Li,2),nr=Xi[0],qt=Xi[1],$t=Qn==="combobox",Vt=$t||Ki,Ne=ni[0],Ae=qi||"";$t&&rr&&!nr&&(Ae=rr),se.useEffect(function(){$t&&qt(!1)},[$t,rr]);var Je=Qn!=="combobox"&&!yi&&!Ki?!1:!!Ae,yn=Bi===void 0?Ce(Ne):Bi,Fn=se.useMemo(function(){return Ne?null:se.createElement("span",{className:"".concat(Zt,"-selection-placeholder"),style:Je?{visibility:"hidden"}:void 0},En)},[Ne,Je,En,Zt]);return se.createElement("span",{className:"".concat(Zt,"-selection-wrap")},se.createElement("span",{className:"".concat(Zt,"-selection-search")},se.createElement(sn,{ref:fn,prefixCls:Zt,id:Ue,open:yi,inputElement:cn,disabled:Rn,autoFocus:He,autoComplete:xn,editable:Vt,activeDescendantId:Xn,value:Ae,onKeyDown:eo,onMouseDown:vr,onChange:function(si){qt(!0),Or(si)},onPaste:Re,onCompositionStart:kn,onCompositionEnd:ai,onBlur:gi,tabIndex:Jn,attrs:(0,fe.Z)(ge,!0),maxLength:$t?Ge:void 0})),!$t&&Ne?se.createElement("span",{className:"".concat(Zt,"-selection-item"),title:yn,style:Je?{visibility:"hidden"}:void 0},Ne.label):null,Fn)},_n=Mn,fi=function(ge,cn){var Zt=(0,se.useRef)(null),Ue=(0,se.useRef)(!1),fn=ge.prefixCls,Rn=ge.open,He=ge.mode,xn=ge.showSearch,Xn=ge.tokenWithEnter,Qn=ge.disabled,yi=ge.prefix,ni=ge.autoClearSearchValue,En=ge.onSearch,Jn=ge.onSearchSubmit,Ki=ge.onToggleOpen,qi=ge.onInputKeyDown,rr=ge.onInputBlur,Ge=ge.domRef;se.useImperativeHandle(cn,function(){return{focus:function(yn){Zt.current.focus(yn)},blur:function(){Zt.current.blur()}}});var eo=Tt(0),vr=(0,be.Z)(eo,2),Or=vr[0],Re=vr[1],kn=function(yn){var Fn=yn.which,wi=Zt.current instanceof HTMLTextAreaElement;!wi&&Rn&&(Fn===Xt.Z.UP||Fn===Xt.Z.DOWN)&&yn.preventDefault(),qi&&qi(yn),Fn===Xt.Z.ENTER&&He==="tags"&&!Ue.current&&!Rn&&(Jn==null||Jn(yn.target.value)),!(wi&&!Rn&&~[Xt.Z.UP,Xt.Z.DOWN,Xt.Z.LEFT,Xt.Z.RIGHT].indexOf(Fn))&&he(Fn)&&Ki(!0)},ai=function(){Re(!0)},gi=(0,se.useRef)(null),Bi=function(yn){En(yn,!0,Ue.current)!==!1&&Ki(!0)},Li=function(){Ue.current=!0},Xi=function(yn){Ue.current=!1,He!=="combobox"&&Bi(yn.target.value)},nr=function(yn){var Fn=yn.target.value;if(Xn&&gi.current&&/[\r\n]/.test(gi.current)){var wi=gi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Fn=Fn.replace(wi,gi.current)}gi.current=null,Bi(Fn)},qt=function(yn){var Fn=yn.clipboardData,wi=Fn==null?void 0:Fn.getData("text");gi.current=wi||""},$t=function(yn){var Fn=yn.target;if(Fn!==Zt.current){var wi=document.body.style.msTouchAction!==void 0;wi?setTimeout(function(){Zt.current.focus()}):Zt.current.focus()}},Vt=function(yn){var Fn=Or();yn.target!==Zt.current&&!Fn&&!(He==="combobox"&&Qn)&&yn.preventDefault(),(He!=="combobox"&&(!xn||!Fn)||!Rn)&&(Rn&&ni!==!1&&En("",!0,!1),Ki())},Ne={inputRef:Zt,onInputKeyDown:kn,onInputMouseDown:ai,onInputChange:nr,onInputPaste:qt,onInputCompositionStart:Li,onInputCompositionEnd:Xi,onInputBlur:rr},Ae=He==="multiple"||He==="tags"?se.createElement(_e,(0,Nt.Z)({},ge,Ne)):se.createElement(_n,(0,Nt.Z)({},ge,Ne));return se.createElement("div",{ref:Ge,className:"".concat(fn,"-selector"),onClick:$t,onMouseDown:Vt},yi&&se.createElement("div",{className:"".concat(fn,"-prefix")},yi),Ae)},Kn=se.forwardRef(fi),Pi=Kn,le=ne(65352),bn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ci=function(ge){var cn=ge===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:cn,adjustY:1},htmlRegion:"scroll"}}},Ht=function(ge,cn){var Zt=ge.prefixCls,Ue=ge.disabled,fn=ge.visible,Rn=ge.children,He=ge.popupElement,xn=ge.animation,Xn=ge.transitionName,Qn=ge.dropdownStyle,yi=ge.dropdownClassName,ni=ge.direction,En=ni===void 0?"ltr":ni,Jn=ge.placement,Ki=ge.builtinPlacements,qi=ge.dropdownMatchSelectWidth,rr=ge.dropdownRender,Ge=ge.dropdownAlign,eo=ge.getPopupContainer,vr=ge.empty,Or=ge.getTriggerDOMNode,Re=ge.onPopupVisibleChange,kn=ge.onPopupMouseEnter,ai=(0,xe.Z)(ge,bn),gi="".concat(Zt,"-dropdown"),Bi=He;rr&&(Bi=rr(He));var Li=se.useMemo(function(){return Ki||ci(qi)},[Ki,qi]),Xi=xn?"".concat(gi,"-").concat(xn):Xn,nr=typeof qi=="number",qt=se.useMemo(function(){return nr?null:qi===!1?"minWidth":"width"},[qi,nr]),$t=Qn;nr&&($t=(0,tn.Z)((0,tn.Z)({},$t),{},{width:qi}));var Vt=se.useRef(null);return se.useImperativeHandle(cn,function(){return{getPopupElement:function(){var Ae;return(Ae=Vt.current)===null||Ae===void 0?void 0:Ae.popupElement}}}),se.createElement(le.Z,(0,Nt.Z)({},ai,{showAction:Re?["click"]:[],hideAction:Re?["click"]:[],popupPlacement:Jn||(En==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Li,prefixCls:gi,popupTransitionName:Xi,popup:se.createElement("div",{onMouseEnter:kn},Bi),ref:Vt,stretch:qt,popupAlign:Ge,popupVisible:fn,getPopupContainer:eo,popupClassName:Be()(yi,(0,Te.Z)({},"".concat(gi,"-empty"),vr)),popupStyle:$t,getTriggerDOMNode:Or,onPopupVisibleChange:Re}),Rn)},Lt=se.forwardRef(Ht),Ct=Lt,Ut=ne(68413);function Kt(pe,ge){var cn=pe.key,Zt;return"value"in pe&&(Zt=pe.value),cn!=null?cn:Zt!==void 0?Zt:"rc-index-key-".concat(ge)}function kt(pe){return typeof pe!="undefined"&&!Number.isNaN(pe)}function Pe(pe,ge){var cn=pe||{},Zt=cn.label,Ue=cn.value,fn=cn.options,Rn=cn.groupLabel,He=Zt||(ge?"children":"label");return{label:He,value:Ue||"value",options:fn||"options",groupLabel:Rn||He}}function dn(pe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=ge.fieldNames,Zt=ge.childrenAsData,Ue=[],fn=Pe(cn,!1),Rn=fn.label,He=fn.value,xn=fn.options,Xn=fn.groupLabel;function Qn(yi,ni){Array.isArray(yi)&&yi.forEach(function(En){if(ni||!(xn in En)){var Jn=En[He];Ue.push({key:Kt(En,Ue.length),groupOption:ni,data:En,label:En[Rn],value:Jn})}else{var Ki=En[Xn];Ki===void 0&&Zt&&(Ki=En.label),Ue.push({key:Kt(En,Ue.length),group:!0,data:En,label:Ki}),Qn(En[xn],!0)}})}return Qn(pe,!1),Ue}function Xe(pe){var ge=(0,tn.Z)({},pe);return"props"in ge||Object.defineProperty(ge,"props",{get:function(){return(0,Me.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ge}}),ge}var Ze=function(ge,cn,Zt){if(!cn||!cn.length)return null;var Ue=!1,fn=function He(xn,Xn){var Qn=(0,Ut.Z)(Xn),yi=Qn[0],ni=Qn.slice(1);if(!yi)return[xn];var En=xn.split(yi);return Ue=Ue||En.length>1,En.reduce(function(Jn,Ki){return[].concat((0,Fe.Z)(Jn),(0,Fe.Z)(He(Ki,ni)))},[]).filter(Boolean)},Rn=fn(ge,cn);return Ue?typeof Zt!="undefined"?Rn.slice(0,Zt):Rn:null},Qe=se.createContext(null),ln=Qe;function an(pe){var ge=pe.visible,cn=pe.values;if(!ge)return null;var Zt=50;return se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(cn.slice(0,Zt).map(function(Ue){var fn=Ue.label,Rn=Ue.value;return["number","string"].includes((0,ye.Z)(fn))?fn:Rn}).join(", ")),cn.length>Zt?", ...":null)}var Sn=["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"],jn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Wn=function(ge){return ge==="tags"||ge==="multiple"},wn=se.forwardRef(function(pe,ge){var cn,Zt=pe.id,Ue=pe.prefixCls,fn=pe.className,Rn=pe.showSearch,He=pe.tagRender,xn=pe.direction,Xn=pe.omitDomProps,Qn=pe.displayValues,yi=pe.onDisplayValuesChange,ni=pe.emptyOptions,En=pe.notFoundContent,Jn=En===void 0?"Not Found":En,Ki=pe.onClear,qi=pe.mode,rr=pe.disabled,Ge=pe.loading,eo=pe.getInputElement,vr=pe.getRawInputElement,Or=pe.open,Re=pe.defaultOpen,kn=pe.onDropdownVisibleChange,ai=pe.activeValue,gi=pe.onActiveValueChange,Bi=pe.activeDescendantId,Li=pe.searchValue,Xi=pe.autoClearSearchValue,nr=pe.onSearch,qt=pe.onSearchSplit,$t=pe.tokenSeparators,Vt=pe.allowClear,Ne=pe.prefix,Ae=pe.suffixIcon,Je=pe.clearIcon,yn=pe.OptionList,Fn=pe.animation,wi=pe.transitionName,si=pe.dropdownStyle,Ln=pe.dropdownClassName,Hn=pe.dropdownMatchSelectWidth,Wi=pe.dropdownRender,Ri=pe.dropdownAlign,Tn=pe.placement,Ot=pe.builtinPlacements,Yi=pe.getPopupContainer,ki=pe.showAction,Ui=ki===void 0?[]:ki,ji=pe.onFocus,Gi=pe.onBlur,Zn=pe.onKeyUp,li=pe.onKeyDown,Ei=pe.onMouseDown,oi=(0,xe.Z)(pe,Sn),Ai=Wn(qi),Cr=(Rn!==void 0?Rn:Ai)||qi==="combobox",$n=(0,tn.Z)({},oi);jn.forEach(function(Po){delete $n[Po]}),Xn==null||Xn.forEach(function(Po){delete $n[Po]});var pi=se.useState(!1),rn=(0,be.Z)(pi,2),ui=rn[0],or=rn[1];se.useEffect(function(){or((0,Qt.Z)())},[]);var Mr=se.useRef(null),wr=se.useRef(null),Pr=se.useRef(null),Nr=se.useRef(null),Xr=se.useRef(null),To=se.useRef(!1),Co=Et(),Oo=(0,be.Z)(Co,3),ke=Oo[0],Rr=Oo[1],Js=Oo[2];se.useImperativeHandle(ge,function(){var Po,Zr;return{focus:(Po=Nr.current)===null||Po===void 0?void 0:Po.focus,blur:(Zr=Nr.current)===null||Zr===void 0?void 0:Zr.blur,scrollTo:function(fa){var ds;return(ds=Xr.current)===null||ds===void 0?void 0:ds.scrollTo(fa)},nativeElement:Mr.current||wr.current}});var fs=se.useMemo(function(){var Po;if(qi!=="combobox")return Li;var Zr=(Po=Qn[0])===null||Po===void 0?void 0:Po.value;return typeof Zr=="string"||typeof Zr=="number"?String(Zr):""},[Li,qi,Qn]),xa=qi==="combobox"&&typeof eo=="function"&&eo()||null,io=typeof vr=="function"&&vr(),Nl=(0,et.x1)(wr,io==null||(cn=io.props)===null||cn===void 0?void 0:cn.ref),Wa=se.useState(!1),Ao=(0,be.Z)(Wa,2),_o=Ao[0],al=Ao[1];(0,un.Z)(function(){al(!0)},[]);var na=(0,De.Z)(!1,{defaultValue:Re,value:Or}),Ql=(0,be.Z)(na,2),ha=Ql[0],Vi=Ql[1],js=_o?ha:!1,lu=!Jn&&ni;(rr||lu&&js&&qi==="combobox")&&(js=!1);var Ua=lu?!1:js,Qr=se.useCallback(function(Po){var Zr=Po!==void 0?Po:!js;rr||(Vi(Zr),js!==Zr&&(kn==null||kn(Zr)))},[rr,js,Vi,kn]),$r=se.useMemo(function(){return($t||[]).some(function(Po){return[`
`,`\r
`].includes(Po)})},[$t]),mn=se.useContext(ln)||{},ar=mn.maxCount,Ir=mn.rawValues,Mo=function(Zr,fo,fa){if(!(Ai&&kt(ar)&&(Ir==null?void 0:Ir.size)>=ar)){var ds=!0,os=Zr;gi==null||gi(null);var Ii=Ze(Zr,$t,kt(ar)?ar-Ir.size:void 0),Bl=fa?null:Ii;return qi!=="combobox"&&Bl&&(os="",qt==null||qt(Bl),Qr(!1),ds=!1),nr&&fs!==os&&nr(os,{source:fo?"typing":"effect"}),ds}},Da=function(Zr){!Zr||!Zr.trim()||nr(Zr,{source:"submit"})};se.useEffect(function(){!js&&!Ai&&qi!=="combobox"&&Mo("",!1,!1)},[js]),se.useEffect(function(){ha&&rr&&Vi(!1),rr&&!To.current&&Rr(!1)},[rr]);var qs=Tt(),sr=(0,be.Z)(qs,2),Vr=sr[0],ca=sr[1],Ls=se.useRef(!1),ia=function(Zr){var fo=Vr(),fa=Zr.key,ds=fa==="Enter";if(ds&&(qi!=="combobox"&&Zr.preventDefault(),js||Qr(!0)),ca(!!fs),fa==="Backspace"&&!fo&&Ai&&!fs&&Qn.length){for(var os=(0,Fe.Z)(Qn),Ii=null,Bl=os.length-1;Bl>=0;Bl-=1){var oe=os[Bl];if(!oe.disabled){os.splice(Bl,1),Ii=oe;break}}Ii&&yi(os,{type:"remove",values:[Ii]})}for(var en=arguments.length,BA=new Array(en>1?en-1:0),qu=1;qu<en;qu++)BA[qu-1]=arguments[qu];if(js&&(!ds||!Ls.current)){var Ts;ds&&(Ls.current=!0),(Ts=Xr.current)===null||Ts===void 0||Ts.onKeyDown.apply(Ts,[Zr].concat(BA))}li==null||li.apply(void 0,[Zr].concat(BA))},Ya=function(Zr){for(var fo=arguments.length,fa=new Array(fo>1?fo-1:0),ds=1;ds<fo;ds++)fa[ds-1]=arguments[ds];if(js){var os;(os=Xr.current)===null||os===void 0||os.onKeyUp.apply(os,[Zr].concat(fa))}Zr.key==="Enter"&&(Ls.current=!1),Zn==null||Zn.apply(void 0,[Zr].concat(fa))},Vs=function(Zr){var fo=Qn.filter(function(fa){return fa!==Zr});yi(fo,{type:"remove",values:[Zr]})},Es=function(){Ls.current=!1},Hs=se.useRef(!1),Ss=function(){Rr(!0),rr||(ji&&!Hs.current&&ji.apply(void 0,arguments),Ui.includes("focus")&&Qr(!0)),Hs.current=!0},Lh=function(){To.current=!0,Rr(!1,function(){Hs.current=!1,To.current=!1,Qr(!1)}),!rr&&(fs&&(qi==="tags"?nr(fs,{source:"submit"}):qi==="multiple"&&nr("",{source:"blur"})),Gi&&Gi.apply(void 0,arguments))},ms=[];se.useEffect(function(){return function(){ms.forEach(function(Po){return clearTimeout(Po)}),ms.splice(0,ms.length)}},[]);var Yu=function(Zr){var fo,fa=Zr.target,ds=(fo=Pr.current)===null||fo===void 0?void 0:fo.getPopupElement();if(ds&&ds.contains(fa)){var os=setTimeout(function(){var en=ms.indexOf(os);if(en!==-1&&ms.splice(en,1),Js(),!ui&&!ds.contains(document.activeElement)){var BA;(BA=Nr.current)===null||BA===void 0||BA.focus()}});ms.push(os)}for(var Ii=arguments.length,Bl=new Array(Ii>1?Ii-1:0),oe=1;oe<Ii;oe++)Bl[oe-1]=arguments[oe];Ei==null||Ei.apply(void 0,[Zr].concat(Bl))},Ul=se.useState({}),tA=(0,be.Z)(Ul,2),No=tA[1];function ll(){No({})}var Au;io&&(Au=function(Zr){Qr(Zr)}),Yt(function(){var Po;return[Mr.current,(Po=Pr.current)===null||Po===void 0?void 0:Po.getPopupElement()]},Ua,Qr,!!io);var Xu=se.useMemo(function(){return(0,tn.Z)((0,tn.Z)({},pe),{},{notFoundContent:Jn,open:js,triggerOpen:Ua,id:Zt,showSearch:Cr,multiple:Ai,toggleOpen:Qr})},[pe,Jn,Ua,js,Zt,Cr,Ai,Qr]),Zu=!!Ae||Ge,es;Zu&&(es=se.createElement(ct,{className:Be()("".concat(Ue,"-arrow"),(0,Te.Z)({},"".concat(Ue,"-arrow-loading"),Ge)),customizeIcon:Ae,customizeIconProps:{loading:Ge,searchValue:fs,open:js,focused:ke,showSearch:Cr}}));var Fc=function(){var Zr;Ki==null||Ki(),(Zr=Nr.current)===null||Zr===void 0||Zr.focus(),yi([],{type:"clear",values:Qn}),Mo("",!1,!1)},Ju=lt(Ue,Fc,Qn,Vt,Je,rr,fs,qi),Ba=Ju.allowClear,Al=Ju.clearIcon,xs=se.createElement(yn,{ref:Xr}),Io=Be()(Ue,fn,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Ue,"-focused"),ke),"".concat(Ue,"-multiple"),Ai),"".concat(Ue,"-single"),!Ai),"".concat(Ue,"-allow-clear"),Vt),"".concat(Ue,"-show-arrow"),Zu),"".concat(Ue,"-disabled"),rr),"".concat(Ue,"-loading"),Ge),"".concat(Ue,"-open"),js),"".concat(Ue,"-customize-input"),xa),"".concat(Ue,"-show-search"),Cr)),qo=se.createElement(Ct,{ref:Pr,disabled:rr,prefixCls:Ue,visible:Ua,popupElement:xs,animation:Fn,transitionName:wi,dropdownStyle:si,dropdownClassName:Ln,direction:xn,dropdownMatchSelectWidth:Hn,dropdownRender:Wi,dropdownAlign:Ri,placement:Tn,builtinPlacements:Ot,getPopupContainer:Yi,empty:ni,getTriggerDOMNode:function(Zr){return wr.current||Zr},onPopupVisibleChange:Au,onPopupMouseEnter:ll},io?se.cloneElement(io,{ref:Nl}):se.createElement(Pi,(0,Nt.Z)({},pe,{domRef:wr,prefixCls:Ue,inputElement:xa,ref:Nr,id:Zt,prefix:Ne,showSearch:Cr,autoClearSearchValue:Xi,mode:qi,activeDescendantId:Bi,tagRender:He,values:Qn,open:js,onToggleOpen:Qr,activeValue:ai,searchValue:fs,onSearch:Mo,onSearchSubmit:Da,onRemove:Vs,tokenWithEnter:$r,onInputBlur:Es}))),bs;return io?bs=qo:bs=se.createElement("div",(0,Nt.Z)({className:Io},$n,{ref:Mr,onMouseDown:Yu,onKeyDown:ia,onKeyUp:Ya,onFocus:Ss,onBlur:Lh}),se.createElement(an,{visible:ke&&!js,values:Qn}),qo,es,Ba&&Al),se.createElement(gt.Provider,{value:Xu},bs)}),qn=wn,di=function(){return null};di.isSelectOptGroup=!0;var hr=di,tr=function(){return null};tr.isSelectOption=!0;var ro=tr,pr=ne(80547),er=ne(2738),ur=ne(45680);function Lo(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Bo=["disabled","title","children","style","className"];function Ur(pe){return typeof pe=="string"||typeof pe=="number"}var Er=function(ge,cn){var Zt=yt(),Ue=Zt.prefixCls,fn=Zt.id,Rn=Zt.open,He=Zt.multiple,xn=Zt.mode,Xn=Zt.searchValue,Qn=Zt.toggleOpen,yi=Zt.notFoundContent,ni=Zt.onPopupScroll,En=se.useContext(ln),Jn=En.maxCount,Ki=En.flattenOptions,qi=En.onActiveValue,rr=En.defaultActiveFirstOption,Ge=En.onSelect,eo=En.menuItemSelectedIcon,vr=En.rawValues,Or=En.fieldNames,Re=En.virtual,kn=En.direction,ai=En.listHeight,gi=En.listItemHeight,Bi=En.optionRender,Li="".concat(Ue,"-item"),Xi=(0,pr.Z)(function(){return Ki},[Rn,Ki],function(ki,Ui){return Ui[0]&&ki[1]!==Ui[1]}),nr=se.useRef(null),qt=se.useMemo(function(){return He&&kt(Jn)&&(vr==null?void 0:vr.size)>=Jn},[He,Jn,vr==null?void 0:vr.size]),$t=function(Ui){Ui.preventDefault()},Vt=function(Ui){var ji;(ji=nr.current)===null||ji===void 0||ji.scrollTo(typeof Ui=="number"?{index:Ui}:Ui)},Ne=se.useCallback(function(ki){return xn==="combobox"?!1:vr.has(ki)},[xn,(0,Fe.Z)(vr).toString(),vr.size]),Ae=function(Ui){for(var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Gi=Xi.length,Zn=0;Zn<Gi;Zn+=1){var li=(Ui+Zn*ji+Gi)%Gi,Ei=Xi[li]||{},oi=Ei.group,Ai=Ei.data;if(!oi&&!(Ai!=null&&Ai.disabled)&&(Ne(Ai.value)||!qt))return li}return-1},Je=se.useState(function(){return Ae(0)}),yn=(0,be.Z)(Je,2),Fn=yn[0],wi=yn[1],si=function(Ui){var ji=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;wi(Ui);var Gi={source:ji?"keyboard":"mouse"},Zn=Xi[Ui];if(!Zn){qi(null,-1,Gi);return}qi(Zn.value,Ui,Gi)};(0,se.useEffect)(function(){si(rr!==!1?Ae(0):-1)},[Xi.length,Xn]);var Ln=se.useCallback(function(ki){return xn==="combobox"?String(ki).toLowerCase()===Xn.toLowerCase():vr.has(ki)},[xn,Xn,(0,Fe.Z)(vr).toString(),vr.size]);(0,se.useEffect)(function(){var ki=setTimeout(function(){if(!He&&Rn&&vr.size===1){var ji=Array.from(vr)[0],Gi=Xi.findIndex(function(Zn){var li=Zn.data;return li.value===ji});Gi!==-1&&(si(Gi),Vt(Gi))}});if(Rn){var Ui;(Ui=nr.current)===null||Ui===void 0||Ui.scrollTo(void 0)}return function(){return clearTimeout(ki)}},[Rn,Xn]);var Hn=function(Ui){Ui!==void 0&&Ge(Ui,{selected:!vr.has(Ui)}),He||Qn(!1)};if(se.useImperativeHandle(cn,function(){return{onKeyDown:function(Ui){var ji=Ui.which,Gi=Ui.ctrlKey;switch(ji){case Xt.Z.N:case Xt.Z.P:case Xt.Z.UP:case Xt.Z.DOWN:{var Zn=0;if(ji===Xt.Z.UP?Zn=-1:ji===Xt.Z.DOWN?Zn=1:Lo()&&Gi&&(ji===Xt.Z.N?Zn=1:ji===Xt.Z.P&&(Zn=-1)),Zn!==0){var li=Ae(Fn+Zn,Zn);Vt(li),si(li,!0)}break}case Xt.Z.TAB:case Xt.Z.ENTER:{var Ei,oi=Xi[Fn];oi&&!(oi!=null&&(Ei=oi.data)!==null&&Ei!==void 0&&Ei.disabled)&&!qt?Hn(oi.value):Hn(void 0),Rn&&Ui.preventDefault();break}case Xt.Z.ESC:Qn(!1),Rn&&Ui.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ui){Vt(Ui)}}}),Xi.length===0)return se.createElement("div",{role:"listbox",id:"".concat(fn,"_list"),className:"".concat(Li,"-empty"),onMouseDown:$t},yi);var Wi=Object.keys(Or).map(function(ki){return Or[ki]}),Ri=function(Ui){return Ui.label};function Tn(ki,Ui){var ji=ki.group;return{role:ji?"presentation":"option",id:"".concat(fn,"_list_").concat(Ui)}}var Ot=function(Ui){var ji=Xi[Ui];if(!ji)return null;var Gi=ji.data||{},Zn=Gi.value,li=ji.group,Ei=(0,fe.Z)(Gi,!0),oi=Ri(ji);return ji?se.createElement("div",(0,Nt.Z)({"aria-label":typeof oi=="string"&&!li?oi:null},Ei,{key:Ui},Tn(ji,Ui),{"aria-selected":Ln(Zn)}),Zn):null},Yi={role:"listbox",id:"".concat(fn,"_list")};return se.createElement(se.Fragment,null,Re&&se.createElement("div",(0,Nt.Z)({},Yi,{style:{height:0,width:0,overflow:"hidden"}}),Ot(Fn-1),Ot(Fn),Ot(Fn+1)),se.createElement(ur.Z,{itemKey:"key",ref:nr,data:Xi,height:ai,itemHeight:gi,fullHeight:!1,onMouseDown:$t,onScroll:ni,virtual:Re,direction:kn,innerProps:Re?null:Yi},function(ki,Ui){var ji=ki.group,Gi=ki.groupOption,Zn=ki.data,li=ki.label,Ei=ki.value,oi=Zn.key;if(ji){var Ai,Cr=(Ai=Zn.title)!==null&&Ai!==void 0?Ai:Ur(li)?li.toString():void 0;return se.createElement("div",{className:Be()(Li,"".concat(Li,"-group"),Zn.className),title:Cr},li!==void 0?li:oi)}var $n=Zn.disabled,pi=Zn.title,rn=Zn.children,ui=Zn.style,or=Zn.className,Mr=(0,xe.Z)(Zn,Bo),wr=(0,er.Z)(Mr,Wi),Pr=Ne(Ei),Nr=$n||!Pr&&qt,Xr="".concat(Li,"-option"),To=Be()(Li,Xr,or,(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat(Xr,"-grouped"),Gi),"".concat(Xr,"-active"),Fn===Ui&&!Nr),"".concat(Xr,"-disabled"),Nr),"".concat(Xr,"-selected"),Pr)),Co=Ri(ki),Oo=!eo||typeof eo=="function"||Pr,ke=typeof Co=="number"?Co:Co||Ei,Rr=Ur(ke)?ke.toString():void 0;return pi!==void 0&&(Rr=pi),se.createElement("div",(0,Nt.Z)({},(0,fe.Z)(wr),Re?{}:Tn(ki,Ui),{"aria-selected":Ln(Ei),className:To,title:Rr,onMouseMove:function(){Fn===Ui||Nr||si(Ui)},onClick:function(){Nr||Hn(Ei)},style:ui}),se.createElement("div",{className:"".concat(Xr,"-content")},typeof Bi=="function"?Bi(ki,{index:Ui}):ke),se.isValidElement(eo)||Pr,Oo&&se.createElement(ct,{className:"".concat(Li,"-option-state"),customizeIcon:eo,customizeIconProps:{value:Ei,disabled:Nr,isSelected:Pr}},Pr?"\u2713":null))}))},lo=se.forwardRef(Er),Vo=lo,ko=function(pe,ge){var cn=se.useRef({values:new Map,options:new Map}),Zt=se.useMemo(function(){var fn=cn.current,Rn=fn.values,He=fn.options,xn=pe.map(function(yi){if(yi.label===void 0){var ni;return(0,tn.Z)((0,tn.Z)({},yi),{},{label:(ni=Rn.get(yi.value))===null||ni===void 0?void 0:ni.label})}return yi}),Xn=new Map,Qn=new Map;return xn.forEach(function(yi){Xn.set(yi.value,yi),Qn.set(yi.value,ge.get(yi.value)||He.get(yi.value))}),cn.current.values=Xn,cn.current.options=Qn,xn},[pe,ge]),Ue=se.useCallback(function(fn){return ge.get(fn)||cn.current.options.get(fn)},[ge]);return[Zt,Ue]};function Eo(pe,ge){return vn(pe).join("").toUpperCase().includes(ge)}var jr=function(pe,ge,cn,Zt,Ue){return se.useMemo(function(){if(!cn||Zt===!1)return pe;var fn=ge.options,Rn=ge.label,He=ge.value,xn=[],Xn=typeof Zt=="function",Qn=cn.toUpperCase(),yi=Xn?Zt:function(En,Jn){return Ue?Eo(Jn[Ue],Qn):Jn[fn]?Eo(Jn[Rn!=="children"?Rn:"label"],Qn):Eo(Jn[He],Qn)},ni=Xn?function(En){return Xe(En)}:function(En){return En};return pe.forEach(function(En){if(En[fn]){var Jn=yi(cn,ni(En));if(Jn)xn.push(En);else{var Ki=En[fn].filter(function(qi){return yi(cn,ni(qi))});Ki.length&&xn.push((0,tn.Z)((0,tn.Z)({},En),{},(0,Te.Z)({},fn,Ki)))}return}yi(cn,ni(En))&&xn.push(En)}),xn},[pe,Zt,Ue,cn,ge])},Br=ne(69582),Gr=ne(11592),Pt=["children","value"],$i=["children"];function Hr(pe){var ge=pe,cn=ge.key,Zt=ge.props,Ue=Zt.children,fn=Zt.value,Rn=(0,xe.Z)(Zt,Pt);return(0,tn.Z)({key:cn,value:fn!==void 0?fn:cn,children:Ue},Rn)}function Dr(pe){var ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Gr.Z)(pe).map(function(cn,Zt){if(!se.isValidElement(cn)||!cn.type)return null;var Ue=cn,fn=Ue.type.isSelectOptGroup,Rn=Ue.key,He=Ue.props,xn=He.children,Xn=(0,xe.Z)(He,$i);return ge||!fn?Hr(cn):(0,tn.Z)((0,tn.Z)({key:"__RC_SELECT_GRP__".concat(Rn===null?Zt:Rn,"__"),label:Rn},Xn),{},{options:Dr(xn)})}).filter(function(cn){return cn})}var oo=function(ge,cn,Zt,Ue,fn){return se.useMemo(function(){var Rn=ge,He=!ge;He&&(Rn=Dr(cn));var xn=new Map,Xn=new Map,Qn=function(En,Jn,Ki){Ki&&typeof Ki=="string"&&En.set(Jn[Ki],Jn)},yi=function ni(En){for(var Jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ki=0;Ki<En.length;Ki+=1){var qi=En[Ki];!qi[Zt.options]||Jn?(xn.set(qi[Zt.value],qi),Qn(Xn,qi,Zt.label),Qn(Xn,qi,Ue),Qn(Xn,qi,fn)):ni(qi[Zt.options],!0)}};return yi(Rn),{options:Rn,valueOptions:xn,labelOptions:Xn}},[ge,cn,Zt,Ue,fn])},Ko=oo;function Fs(pe){var ge=se.useRef();ge.current=pe;var cn=se.useCallback(function(){return ge.current.apply(ge,arguments)},[]);return cn}function Fi(pe){var ge=pe.mode,cn=pe.options,Zt=pe.children,Ue=pe.backfill,fn=pe.allowClear,Rn=pe.placeholder,He=pe.getInputElement,xn=pe.showSearch,Xn=pe.onSearch,Qn=pe.defaultOpen,yi=pe.autoFocus,ni=pe.labelInValue,En=pe.value,Jn=pe.inputValue,Ki=pe.optionLabelProp,qi=isMultiple(ge),rr=xn!==void 0?xn:qi||ge==="combobox",Ge=cn||convertChildrenToData(Zt);if(warning(ge!=="tags"||Ge.every(function(Re){return!Re.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ge==="tags"||ge==="combobox"){var eo=Ge.some(function(Re){return Re.options?Re.options.some(function(kn){return typeof("value"in kn?kn.value:kn.key)=="number"}):typeof("value"in Re?Re.value:Re.key)=="number"});warning(!eo,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ge!=="combobox"||!Ki,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ge==="combobox"||!Ue,"`backfill` only works with `combobox` mode."),warning(ge==="combobox"||!He,"`getInputElement` only work with `combobox` mode."),noteOnce(ge!=="combobox"||!He||!fn||!Rn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Xn&&!rr&&ge!=="combobox"&&ge!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Qn||yi,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),En!=null){var vr=toArray(En);warning(!ni||vr.every(function(Re){return _typeof(Re)==="object"&&("key"in Re||"value"in Re)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!qi||Array.isArray(En),"`value` should be array when `mode` is `multiple` or `tags`")}if(Zt){var Or=null;toNodeArray(Zt).some(function(Re){if(!React.isValidElement(Re)||!Re.type)return!1;var kn=Re,ai=kn.type;if(ai.isSelectOption)return!1;if(ai.isSelectOptGroup){var gi=toNodeArray(Re.props.children).every(function(Bi){return!React.isValidElement(Bi)||!Re.type||Bi.type.isSelectOption?!0:(Or=Bi.type,!1)});return!gi}return Or=ai,!0}),Or&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Or.displayName||Or.name||Or,"`.")),warning(Jn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function xi(pe,ge){if(pe){var cn=function Zt(Ue){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rn=0;Rn<Ue.length;Rn++){var He=Ue[Rn];if(He[ge==null?void 0:ge.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!fn&&Array.isArray(He[ge==null?void 0:ge.options])&&Zt(He[ge==null?void 0:ge.options],!0))break}};cn(pe)}}var Se=null,we=["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"],de=["inputValue"];function Nn(pe){return!pe||(0,ye.Z)(pe)!=="object"}var Un=se.forwardRef(function(pe,ge){var cn=pe.id,Zt=pe.mode,Ue=pe.prefixCls,fn=Ue===void 0?"rc-select":Ue,Rn=pe.backfill,He=pe.fieldNames,xn=pe.inputValue,Xn=pe.searchValue,Qn=pe.onSearch,yi=pe.autoClearSearchValue,ni=yi===void 0?!0:yi,En=pe.onSelect,Jn=pe.onDeselect,Ki=pe.dropdownMatchSelectWidth,qi=Ki===void 0?!0:Ki,rr=pe.filterOption,Ge=pe.filterSort,eo=pe.optionFilterProp,vr=pe.optionLabelProp,Or=pe.options,Re=pe.optionRender,kn=pe.children,ai=pe.defaultActiveFirstOption,gi=pe.menuItemSelectedIcon,Bi=pe.virtual,Li=pe.direction,Xi=pe.listHeight,nr=Xi===void 0?200:Xi,qt=pe.listItemHeight,$t=qt===void 0?20:qt,Vt=pe.labelRender,Ne=pe.value,Ae=pe.defaultValue,Je=pe.labelInValue,yn=pe.onChange,Fn=pe.maxCount,wi=(0,xe.Z)(pe,we),si=(0,Br.ZP)(cn),Ln=Wn(Zt),Hn=!!(!Or&&kn),Wi=se.useMemo(function(){return rr===void 0&&Zt==="combobox"?!1:rr},[rr,Zt]),Ri=se.useMemo(function(){return Pe(He,Hn)},[JSON.stringify(He),Hn]),Tn=(0,De.Z)("",{value:Xn!==void 0?Xn:xn,postState:function($r){return $r||""}}),Ot=(0,be.Z)(Tn,2),Yi=Ot[0],ki=Ot[1],Ui=Ko(Or,kn,Ri,eo,vr),ji=Ui.valueOptions,Gi=Ui.labelOptions,Zn=Ui.options,li=se.useCallback(function(Qr){var $r=vn(Qr);return $r.map(function(mn){var ar,Ir,Mo,Da,qs;if(Nn(mn))ar=mn;else{var sr;Mo=mn.key,Ir=mn.label,ar=(sr=mn.value)!==null&&sr!==void 0?sr:Mo}var Vr=ji.get(ar);if(Vr){var ca;if(Ir===void 0&&(Ir=Vr==null?void 0:Vr[vr||Ri.label]),Mo===void 0&&(Mo=(ca=Vr==null?void 0:Vr.key)!==null&&ca!==void 0?ca:ar),Da=Vr==null?void 0:Vr.disabled,qs=Vr==null?void 0:Vr.title,0)var Ls}return{label:Ir,value:ar,key:Mo,disabled:Da,title:qs}})},[Ri,vr,ji]),Ei=(0,De.Z)(Ae,{value:Ne}),oi=(0,be.Z)(Ei,2),Ai=oi[0],Cr=oi[1],$n=se.useMemo(function(){var Qr,$r=Ln&&Ai===null?[]:Ai,mn=li($r);return Zt==="combobox"&&Qi((Qr=mn[0])===null||Qr===void 0?void 0:Qr.value)?[]:mn},[Ai,li,Zt,Ln]),pi=ko($n,ji),rn=(0,be.Z)(pi,2),ui=rn[0],or=rn[1],Mr=se.useMemo(function(){if(!Zt&&ui.length===1){var Qr=ui[0];if(Qr.value===null&&(Qr.label===null||Qr.label===void 0))return[]}return ui.map(function($r){var mn;return(0,tn.Z)((0,tn.Z)({},$r),{},{label:(mn=typeof Vt=="function"?Vt($r):$r.label)!==null&&mn!==void 0?mn:$r.value})})},[Zt,ui,Vt]),wr=se.useMemo(function(){return new Set(ui.map(function(Qr){return Qr.value}))},[ui]);se.useEffect(function(){if(Zt==="combobox"){var Qr,$r=(Qr=ui[0])===null||Qr===void 0?void 0:Qr.value;ki(Vn($r)?String($r):"")}},[ui]);var Pr=Fs(function(Qr,$r){var mn=$r!=null?$r:Qr;return(0,Te.Z)((0,Te.Z)({},Ri.value,Qr),Ri.label,mn)}),Nr=se.useMemo(function(){if(Zt!=="tags")return Zn;var Qr=(0,Fe.Z)(Zn),$r=function(ar){return ji.has(ar)};return(0,Fe.Z)(ui).sort(function(mn,ar){return mn.value<ar.value?-1:1}).forEach(function(mn){var ar=mn.value;$r(ar)||Qr.push(Pr(ar,mn.label))}),Qr},[Pr,Zn,ji,ui,Zt]),Xr=jr(Nr,Ri,Yi,Wi,eo),To=se.useMemo(function(){return Zt!=="tags"||!Yi||Xr.some(function(Qr){return Qr[eo||"value"]===Yi})||Xr.some(function(Qr){return Qr[Ri.value]===Yi})?Xr:[Pr(Yi)].concat((0,Fe.Z)(Xr))},[Pr,eo,Zt,Xr,Yi,Ri]),Co=function Qr($r){var mn=(0,Fe.Z)($r).sort(function(ar,Ir){return Ge(ar,Ir,{searchValue:Yi})});return mn.map(function(ar){return Array.isArray(ar.options)?(0,tn.Z)((0,tn.Z)({},ar),{},{options:ar.options.length>0?Qr(ar.options):ar.options}):ar})},Oo=se.useMemo(function(){return Ge?Co(To):To},[To,Ge,Yi]),ke=se.useMemo(function(){return dn(Oo,{fieldNames:Ri,childrenAsData:Hn})},[Oo,Ri,Hn]),Rr=function($r){var mn=li($r);if(Cr(mn),yn&&(mn.length!==ui.length||mn.some(function(Mo,Da){var qs;return((qs=ui[Da])===null||qs===void 0?void 0:qs.value)!==(Mo==null?void 0:Mo.value)}))){var ar=Je?mn:mn.map(function(Mo){return Mo.value}),Ir=mn.map(function(Mo){return Xe(or(Mo.value))});yn(Ln?ar:ar[0],Ln?Ir:Ir[0])}},Js=se.useState(null),fs=(0,be.Z)(Js,2),xa=fs[0],io=fs[1],Nl=se.useState(0),Wa=(0,be.Z)(Nl,2),Ao=Wa[0],_o=Wa[1],al=ai!==void 0?ai:Zt!=="combobox",na=se.useCallback(function(Qr,$r){var mn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ar=mn.source,Ir=ar===void 0?"keyboard":ar;_o($r),Rn&&Zt==="combobox"&&Qr!==null&&Ir==="keyboard"&&io(String(Qr))},[Rn,Zt]),Ql=function($r,mn,ar){var Ir=function(){var Vs,Es=or($r);return[Je?{label:Es==null?void 0:Es[Ri.label],value:$r,key:(Vs=Es==null?void 0:Es.key)!==null&&Vs!==void 0?Vs:$r}:$r,Xe(Es)]};if(mn&&En){var Mo=Ir(),Da=(0,be.Z)(Mo,2),qs=Da[0],sr=Da[1];En(qs,sr)}else if(!mn&&Jn&&ar!=="clear"){var Vr=Ir(),ca=(0,be.Z)(Vr,2),Ls=ca[0],ia=ca[1];Jn(Ls,ia)}},ha=Fs(function(Qr,$r){var mn,ar=Ln?$r.selected:!0;ar?mn=Ln?[].concat((0,Fe.Z)(ui),[Qr]):[Qr]:mn=ui.filter(function(Ir){return Ir.value!==Qr}),Rr(mn),Ql(Qr,ar),Zt==="combobox"?io(""):(!Wn||ni)&&(ki(""),io(""))}),Vi=function($r,mn){Rr($r);var ar=mn.type,Ir=mn.values;(ar==="remove"||ar==="clear")&&Ir.forEach(function(Mo){Ql(Mo.value,!1,ar)})},js=function($r,mn){if(ki($r),io(null),mn.source==="submit"){var ar=($r||"").trim();if(ar){var Ir=Array.from(new Set([].concat((0,Fe.Z)(wr),[ar])));Rr(Ir),Ql(ar,!0),ki("")}return}mn.source!=="blur"&&(Zt==="combobox"&&Rr($r),Qn==null||Qn($r))},lu=function($r){var mn=$r;Zt!=="tags"&&(mn=$r.map(function(Ir){var Mo=Gi.get(Ir);return Mo==null?void 0:Mo.value}).filter(function(Ir){return Ir!==void 0}));var ar=Array.from(new Set([].concat((0,Fe.Z)(wr),(0,Fe.Z)(mn))));Rr(ar),ar.forEach(function(Ir){Ql(Ir,!0)})},Ua=se.useMemo(function(){var Qr=Bi!==!1&&qi!==!1;return(0,tn.Z)((0,tn.Z)({},Ui),{},{flattenOptions:ke,onActiveValue:na,defaultActiveFirstOption:al,onSelect:ha,menuItemSelectedIcon:gi,rawValues:wr,fieldNames:Ri,virtual:Qr,direction:Li,listHeight:nr,listItemHeight:$t,childrenAsData:Hn,maxCount:Fn,optionRender:Re})},[Fn,Ui,ke,na,al,ha,gi,wr,Ri,Bi,qi,Li,nr,$t,Hn,Re]);return se.createElement(ln.Provider,{value:Ua},se.createElement(qn,(0,Nt.Z)({},wi,{id:si,prefixCls:fn,ref:ge,omitDomProps:de,mode:Zt,displayValues:Mr,onDisplayValuesChange:Vi,direction:Li,searchValue:Yi,onSearch:js,autoClearSearchValue:ni,onSearchSplit:lu,dropdownMatchSelectWidth:qi,OptionList:Vo,emptyOptions:!ke.length,activeValue:xa,activeDescendantId:"".concat(si,"_list_").concat(Ao)})))}),mi=Un;mi.Option=ro,mi.OptGroup=hr;var on=mi,Oe=on},63158:function(Pn,vi,ne){"use strict";var Nt=ne(72308),Fe=ne(49618),Te=ne(52487),tn=ne(74416),be=ne(59301),xe=ne(92310),ye=ne.n(xe),De=ne(18929),Me=ne(10228),se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],hn=be.forwardRef(function(Be,un){var Qt,et=Be.prefixCls,nt=et===void 0?"rc-switch":et,ct=Be.className,lt=Be.checked,gt=Be.defaultChecked,yt=Be.disabled,Et=Be.loadingIcon,Tt=Be.checkedChildren,Yt=Be.unCheckedChildren,Xt=Be.onClick,he=Be.onChange,fe=Be.onKeyDown,ue=(0,tn.Z)(Be,se),Ye=(0,De.Z)(!1,{value:lt,defaultValue:gt}),Le=(0,Te.Z)(Ye,2),sn=Le[0],vn=Le[1];function On(Gn,Ce){var _t=sn;return yt||(_t=Gn,vn(_t),he==null||he(_t,Ce)),_t}function ri(Gn){Gn.which===Me.Z.LEFT?On(!1,Gn):Gn.which===Me.Z.RIGHT&&On(!0,Gn),fe==null||fe(Gn)}function Vn(Gn){var Ce=On(!sn,Gn);Xt==null||Xt(Ce,Gn)}var Qi=ye()(nt,ct,(Qt={},(0,Fe.Z)(Qt,"".concat(nt,"-checked"),sn),(0,Fe.Z)(Qt,"".concat(nt,"-disabled"),yt),Qt));return be.createElement("button",(0,Nt.Z)({},ue,{type:"button",role:"switch","aria-checked":sn,disabled:yt,className:Qi,ref:un,onKeyDown:ri,onClick:Vn}),Et,be.createElement("span",{className:"".concat(nt,"-inner")},be.createElement("span",{className:"".concat(nt,"-inner-checked")},Tt),be.createElement("span",{className:"".concat(nt,"-inner-unchecked")},Yt)))});hn.displayName="Switch",vi.Z=hn},22711:function(Pn,vi,ne){"use strict";ne.r(vi),ne.d(vi,{ResizableTextArea:function(){return Le},default:function(){return ri}});var Nt=ne(72308),Fe=ne(49618),Te=ne(77321),tn=ne(80702),be=ne(52487),xe=ne(74416),ye=ne(92310),De=ne.n(ye),Me=ne(36901),se=ne(66003),hn=ne(30292),Be=ne(18929),un=ne(59301),Qt=ne(62853),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={},Et;function Tt(Vn){var Qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gn=Vn.getAttribute("id")||Vn.getAttribute("data-reactid")||Vn.getAttribute("name");if(Qi&&yt[Gn])return yt[Gn];var Ce=window.getComputedStyle(Vn),_t=Ce.getPropertyValue("box-sizing")||Ce.getPropertyValue("-moz-box-sizing")||Ce.getPropertyValue("-webkit-box-sizing"),Bn=parseFloat(Ce.getPropertyValue("padding-bottom"))+parseFloat(Ce.getPropertyValue("padding-top")),Si=parseFloat(Ce.getPropertyValue("border-bottom-width"))+parseFloat(Ce.getPropertyValue("border-top-width")),ei=gt.map(function(Mn){return"".concat(Mn,":").concat(Ce.getPropertyValue(Mn))}).join(";"),_e={sizingStyle:ei,paddingSize:Bn,borderSize:Si,boxSizing:_t};return Qi&&Gn&&(yt[Gn]=_e),_e}function Yt(Vn){var Qi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Et||(Et=document.createElement("textarea"),Et.setAttribute("tab-index","-1"),Et.setAttribute("aria-hidden","true"),Et.setAttribute("name","hiddenTextarea"),document.body.appendChild(Et)),Vn.getAttribute("wrap")?Et.setAttribute("wrap",Vn.getAttribute("wrap")):Et.removeAttribute("wrap");var _t=Tt(Vn,Qi),Bn=_t.paddingSize,Si=_t.borderSize,ei=_t.boxSizing,_e=_t.sizingStyle;Et.setAttribute("style","".concat(_e,";").concat(lt)),Et.value=Vn.value||Vn.placeholder||"";var Mn=void 0,_n=void 0,fi,Kn=Et.scrollHeight;if(ei==="border-box"?Kn+=Si:ei==="content-box"&&(Kn-=Bn),Gn!==null||Ce!==null){Et.value=" ";var Pi=Et.scrollHeight-Bn;Gn!==null&&(Mn=Pi*Gn,ei==="border-box"&&(Mn=Mn+Bn+Si),Kn=Math.max(Mn,Kn)),Ce!==null&&(_n=Pi*Ce,ei==="border-box"&&(_n=_n+Bn+Si),fi=Kn>_n?"":"hidden",Kn=Math.min(_n,Kn))}var le={height:Kn,overflowY:fi,resize:"none"};return Mn&&(le.minHeight=Mn),_n&&(le.maxHeight=_n),le}var Xt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],he=0,fe=1,ue=2,Ye=un.forwardRef(function(Vn,Qi){var Gn=Vn,Ce=Gn.prefixCls,_t=Gn.defaultValue,Bn=Gn.value,Si=Gn.autoSize,ei=Gn.onResize,_e=Gn.className,Mn=Gn.style,_n=Gn.disabled,fi=Gn.onChange,Kn=Gn.onInternalAutoSize,Pi=(0,xe.Z)(Gn,Xt),le=(0,Be.Z)(_t,{value:Bn,postState:function(ur){return ur!=null?ur:""}}),bn=(0,be.Z)(le,2),ci=bn[0],Ht=bn[1],Lt=function(ur){Ht(ur.target.value),fi==null||fi(ur)},Ct=un.useRef();un.useImperativeHandle(Qi,function(){return{textArea:Ct.current}});var Ut=un.useMemo(function(){return Si&&(0,Qt.Z)(Si)==="object"?[Si.minRows,Si.maxRows]:[]},[Si]),Kt=(0,be.Z)(Ut,2),kt=Kt[0],Pe=Kt[1],dn=!!Si,Xe=function(){try{if(document.activeElement===Ct.current){var ur=Ct.current,Lo=ur.selectionStart,Bo=ur.selectionEnd,Ur=ur.scrollTop;Ct.current.setSelectionRange(Lo,Bo),Ct.current.scrollTop=Ur}}catch(Er){}},Ze=un.useState(ue),Qe=(0,be.Z)(Ze,2),ln=Qe[0],an=Qe[1],Sn=un.useState(),jn=(0,be.Z)(Sn,2),Wn=jn[0],wn=jn[1],qn=function(){an(he)};(0,nt.Z)(function(){dn&&qn()},[Bn,kt,Pe,dn]),(0,nt.Z)(function(){if(ln===he)an(fe);else if(ln===fe){var er=Yt(Ct.current,!1,kt,Pe);an(ue),wn(er)}else Xe()},[ln]);var di=un.useRef(),hr=function(){ct.Z.cancel(di.current)},tr=function(ur){ln===ue&&(ei==null||ei(ur),Si&&(hr(),di.current=(0,ct.Z)(function(){qn()})))};un.useEffect(function(){return hr},[]);var ro=dn?Wn:null,pr=(0,Te.Z)((0,Te.Z)({},Mn),ro);return(ln===he||ln===fe)&&(pr.overflowY="hidden",pr.overflowX="hidden"),un.createElement(et.Z,{onResize:tr,disabled:!(Si||ei)},un.createElement("textarea",(0,Nt.Z)({},Pi,{ref:Ct,style:pr,className:De()(Ce,_e,(0,Fe.Z)({},"".concat(Ce,"-disabled"),_n)),disabled:_n,value:ci,onChange:Lt})))}),Le=Ye,sn=["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"],vn=un.forwardRef(function(Vn,Qi){var Gn,Ce=Vn.defaultValue,_t=Vn.value,Bn=Vn.onFocus,Si=Vn.onBlur,ei=Vn.onChange,_e=Vn.allowClear,Mn=Vn.maxLength,_n=Vn.onCompositionStart,fi=Vn.onCompositionEnd,Kn=Vn.suffix,Pi=Vn.prefixCls,le=Pi===void 0?"rc-textarea":Pi,bn=Vn.showCount,ci=Vn.count,Ht=Vn.className,Lt=Vn.style,Ct=Vn.disabled,Ut=Vn.hidden,Kt=Vn.classNames,kt=Vn.styles,Pe=Vn.onResize,dn=Vn.onClear,Xe=Vn.onPressEnter,Ze=Vn.readOnly,Qe=Vn.autoSize,ln=Vn.onKeyDown,an=(0,xe.Z)(Vn,sn),Sn=(0,Be.Z)(Ce,{value:_t,defaultValue:Ce}),jn=(0,be.Z)(Sn,2),Wn=jn[0],wn=jn[1],qn=Wn==null?"":String(Wn),di=un.useState(!1),hr=(0,be.Z)(di,2),tr=hr[0],ro=hr[1],pr=un.useRef(!1),er=un.useState(null),ur=(0,be.Z)(er,2),Lo=ur[0],Bo=ur[1],Ur=(0,un.useRef)(null),Er=(0,un.useRef)(null),lo=function(){var pe;return(pe=Er.current)===null||pe===void 0?void 0:pe.textArea},Vo=function(){lo().focus()};(0,un.useImperativeHandle)(Qi,function(){var Oe;return{resizableTextArea:Er.current,focus:Vo,blur:function(){lo().blur()},nativeElement:((Oe=Ur.current)===null||Oe===void 0?void 0:Oe.nativeElement)||lo()}}),(0,un.useEffect)(function(){ro(function(Oe){return!Ct&&Oe})},[Ct]);var ko=un.useState(null),Eo=(0,be.Z)(ko,2),jr=Eo[0],Br=Eo[1];un.useEffect(function(){if(jr){var Oe;(Oe=lo()).setSelectionRange.apply(Oe,(0,tn.Z)(jr))}},[jr]);var Gr=(0,se.Z)(ci,bn),Pt=(Gn=Gr.max)!==null&&Gn!==void 0?Gn:Mn,$i=Number(Pt)>0,Hr=Gr.strategy(qn),Dr=!!Pt&&Hr>Pt,oo=function(pe,ge){var cn=ge;!pr.current&&Gr.exceedFormatter&&Gr.max&&Gr.strategy(ge)>Gr.max&&(cn=Gr.exceedFormatter(ge,{max:Gr.max}),ge!==cn&&Br([lo().selectionStart||0,lo().selectionEnd||0])),wn(cn),(0,hn.rJ)(pe.currentTarget,pe,ei,cn)},Ko=function(pe){pr.current=!0,_n==null||_n(pe)},Fs=function(pe){pr.current=!1,oo(pe,pe.currentTarget.value),fi==null||fi(pe)},Fi=function(pe){oo(pe,pe.target.value)},xi=function(pe){pe.key==="Enter"&&Xe&&Xe(pe),ln==null||ln(pe)},Se=function(pe){ro(!0),Bn==null||Bn(pe)},we=function(pe){ro(!1),Si==null||Si(pe)},de=function(pe){wn(""),Vo(),(0,hn.rJ)(lo(),pe,ei)},Nn=Kn,Un;Gr.show&&(Gr.showFormatter?Un=Gr.showFormatter({value:qn,count:Hr,maxLength:Pt}):Un="".concat(Hr).concat($i?" / ".concat(Pt):""),Nn=un.createElement(un.Fragment,null,Nn,un.createElement("span",{className:De()("".concat(le,"-data-count"),Kt==null?void 0:Kt.count),style:kt==null?void 0:kt.count},Un)));var mi=function(pe){var ge;Pe==null||Pe(pe),(ge=lo())!==null&&ge!==void 0&&ge.style.height&&Bo(!0)},on=!Qe&&!bn&&!_e;return un.createElement(Me.BaseInput,{ref:Ur,value:qn,allowClear:_e,handleReset:de,suffix:Nn,prefixCls:le,classNames:(0,Te.Z)((0,Te.Z)({},Kt),{},{affixWrapper:De()(Kt==null?void 0:Kt.affixWrapper,(0,Fe.Z)((0,Fe.Z)({},"".concat(le,"-show-count"),bn),"".concat(le,"-textarea-allow-clear"),_e))}),disabled:Ct,focused:tr,className:De()(Ht,Dr&&"".concat(le,"-out-of-range")),style:(0,Te.Z)((0,Te.Z)({},Lt),Lo&&!on?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Un=="string"?Un:void 0}},hidden:Ut,readOnly:Ze,onClear:dn},un.createElement(Le,(0,Nt.Z)({},an,{autoSize:Qe,maxLength:Mn,onKeyDown:xi,onChange:Fi,onFocus:Se,onBlur:we,onCompositionStart:Ko,onCompositionEnd:Fs,className:De()(Kt==null?void 0:Kt.textarea),style:(0,Te.Z)((0,Te.Z)({},kt==null?void 0:kt.textarea),{},{resize:Lt==null?void 0:Lt.resize}),disabled:Ct,prefixCls:le,onResize:mi,ref:Er,readOnly:Ze})))}),On=vn,ri=On},45680:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return ci}});var Nt=ne(72308),Fe=ne(62853),Te=ne(77321),tn=ne(49618),be=ne(52487),xe=ne(74416),ye=ne(92310),De=ne.n(ye),Me=ne(29301),se=ne(70425),hn=ne(34280),Be=ne(59301),un=ne(4676),Qt=Be.forwardRef(function(Ht,Lt){var Ct=Ht.height,Ut=Ht.offsetY,Kt=Ht.offsetX,kt=Ht.children,Pe=Ht.prefixCls,dn=Ht.onInnerResize,Xe=Ht.innerProps,Ze=Ht.rtl,Qe=Ht.extra,ln={},an={display:"flex",flexDirection:"column"};return Ut!==void 0&&(ln={height:Ct,position:"relative",overflow:"hidden"},an=(0,Te.Z)((0,Te.Z)({},an),{},(0,tn.Z)((0,tn.Z)((0,tn.Z)((0,tn.Z)((0,tn.Z)({transform:"translateY(".concat(Ut,"px)")},Ze?"marginRight":"marginLeft",-Kt),"position","absolute"),"left",0),"right",0),"top",0))),Be.createElement("div",{style:ln},Be.createElement(Me.Z,{onResize:function(jn){var Wn=jn.offsetHeight;Wn&&dn&&dn()}},Be.createElement("div",(0,Nt.Z)({style:an,className:De()((0,tn.Z)({},"".concat(Pe,"-holder-inner"),Pe)),ref:Lt},Xe),kt,Qe)))});Qt.displayName="Filler";var et=Qt;function nt(Ht){var Lt=Ht.children,Ct=Ht.setRef,Ut=Be.useCallback(function(Kt){Ct(Kt)},[]);return Be.cloneElement(Lt,{ref:Ut})}function ct(Ht,Lt,Ct,Ut,Kt,kt,Pe,dn){var Xe=dn.getKey;return Ht.slice(Lt,Ct+1).map(function(Ze,Qe){var ln=Lt+Qe,an=Pe(Ze,ln,{style:{width:Ut},offsetX:Kt}),Sn=Xe(Ze);return Be.createElement(nt,{key:Sn,setRef:function(Wn){return kt(Ze,Wn)}},an)})}function lt(Ht,Lt,Ct,Ut){var Kt=Ct-Ht,kt=Lt-Ct,Pe=Math.min(Kt,kt)*2;if(Ut<=Pe){var dn=Math.floor(Ut/2);return Ut%2?Ct+dn+1:Ct-dn}return Kt>kt?Ct-(Ut-kt):Ct+(Ut-Kt)}function gt(Ht,Lt,Ct){var Ut=Ht.length,Kt=Lt.length,kt,Pe;if(Ut===0&&Kt===0)return null;Ut<Kt?(kt=Ht,Pe=Lt):(kt=Lt,Pe=Ht);var dn={__EMPTY_ITEM__:!0};function Xe(jn){return jn!==void 0?Ct(jn):dn}for(var Ze=null,Qe=Math.abs(Ut-Kt)!==1,ln=0;ln<Pe.length;ln+=1){var an=Xe(kt[ln]),Sn=Xe(Pe[ln]);if(an!==Sn){Ze=ln,Qe=Qe||an!==Xe(Pe[ln+1]);break}}return Ze===null?null:{index:Ze,multiple:Qe}}function yt(Ht,Lt,Ct){var Ut=Be.useState(Ht),Kt=(0,be.Z)(Ut,2),kt=Kt[0],Pe=Kt[1],dn=Be.useState(null),Xe=(0,be.Z)(dn,2),Ze=Xe[0],Qe=Xe[1];return Be.useEffect(function(){var ln=gt(kt||[],Ht||[],Lt);(ln==null?void 0:ln.index)!==void 0&&(Ct==null||Ct(ln.index),Qe(Ht[ln.index])),Pe(Ht)},[Ht]),[Ze]}var Et=ne(16089),Tt=(typeof navigator=="undefined"?"undefined":(0,Fe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Yt=Tt,Xt=function(Ht,Lt,Ct,Ut){var Kt=(0,Be.useRef)(!1),kt=(0,Be.useRef)(null);function Pe(){clearTimeout(kt.current),Kt.current=!0,kt.current=setTimeout(function(){Kt.current=!1},50)}var dn=(0,Be.useRef)({top:Ht,bottom:Lt,left:Ct,right:Ut});return dn.current.top=Ht,dn.current.bottom=Lt,dn.current.left=Ct,dn.current.right=Ut,function(Xe,Ze){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ln=Xe?Ze<0&&dn.current.left||Ze>0&&dn.current.right:Ze<0&&dn.current.top||Ze>0&&dn.current.bottom;return Qe&&ln?(clearTimeout(kt.current),Kt.current=!1):(!ln||Kt.current)&&Pe(),!Kt.current&&ln}};function he(Ht,Lt,Ct,Ut,Kt,kt,Pe){var dn=(0,Be.useRef)(0),Xe=(0,Be.useRef)(null),Ze=(0,Be.useRef)(null),Qe=(0,Be.useRef)(!1),ln=Xt(Lt,Ct,Ut,Kt);function an(di,hr){if(Et.Z.cancel(Xe.current),!ln(!1,hr)){var tr=di;if(!tr._virtualHandled)tr._virtualHandled=!0;else return;dn.current+=hr,Ze.current=hr,Yt||tr.preventDefault(),Xe.current=(0,Et.Z)(function(){var ro=Qe.current?10:1;Pe(dn.current*ro,!1),dn.current=0})}}function Sn(di,hr){Pe(hr,!0),Yt||di.preventDefault()}var jn=(0,Be.useRef)(null),Wn=(0,Be.useRef)(null);function wn(di){if(Ht){Et.Z.cancel(Wn.current),Wn.current=(0,Et.Z)(function(){jn.current=null},2);var hr=di.deltaX,tr=di.deltaY,ro=di.shiftKey,pr=hr,er=tr;(jn.current==="sx"||!jn.current&&ro&&tr&&!hr)&&(pr=tr,er=0,jn.current="sx");var ur=Math.abs(pr),Lo=Math.abs(er);jn.current===null&&(jn.current=kt&&ur>Lo?"x":"y"),jn.current==="y"?an(di,er):Sn(di,pr)}}function qn(di){Ht&&(Qe.current=di.detail===Ze.current)}return[wn,qn]}function fe(Ht,Lt,Ct,Ut){var Kt=Be.useMemo(function(){return[new Map,[]]},[Ht,Ct.id,Ut]),kt=(0,be.Z)(Kt,2),Pe=kt[0],dn=kt[1],Xe=function(Qe){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qe,an=Pe.get(Qe),Sn=Pe.get(ln);if(an===void 0||Sn===void 0)for(var jn=Ht.length,Wn=dn.length;Wn<jn;Wn+=1){var wn,qn=Ht[Wn],di=Lt(qn);Pe.set(di,Wn);var hr=(wn=Ct.get(di))!==null&&wn!==void 0?wn:Ut;if(dn[Wn]=(dn[Wn-1]||0)+hr,di===Qe&&(an=Wn),di===ln&&(Sn=Wn),an!==void 0&&Sn!==void 0)break}return{top:dn[an-1]||0,bottom:dn[Sn]}};return Xe}var ue=ne(96949),Ye=ne(55090),Le=function(){function Ht(){(0,ue.Z)(this,Ht),(0,tn.Z)(this,"maps",void 0),(0,tn.Z)(this,"id",0),(0,tn.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Ye.Z)(Ht,[{key:"set",value:function(Ct,Ut){this.maps[Ct]=Ut,this.id+=1,this.diffKeys.add(Ct)}},{key:"get",value:function(Ct){return this.maps[Ct]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ht}(),sn=Le;function vn(Ht){var Lt=parseFloat(Ht);return isNaN(Lt)?0:Lt}function On(Ht,Lt,Ct){var Ut=Be.useState(0),Kt=(0,be.Z)(Ut,2),kt=Kt[0],Pe=Kt[1],dn=(0,Be.useRef)(new Map),Xe=(0,Be.useRef)(new sn),Ze=(0,Be.useRef)(0);function Qe(){Ze.current+=1}function ln(){var Sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Qe();var jn=function(){var qn=!1;dn.current.forEach(function(di,hr){if(di&&di.offsetParent){var tr=di.offsetHeight,ro=getComputedStyle(di),pr=ro.marginTop,er=ro.marginBottom,ur=vn(pr),Lo=vn(er),Bo=tr+ur+Lo;Xe.current.get(hr)!==Bo&&(Xe.current.set(hr,Bo),qn=!0)}}),qn&&Pe(function(di){return di+1})};if(Sn)jn();else{Ze.current+=1;var Wn=Ze.current;Promise.resolve().then(function(){Wn===Ze.current&&jn()})}}function an(Sn,jn){var Wn=Ht(Sn),wn=dn.current.get(Wn);jn?(dn.current.set(Wn,jn),ln()):dn.current.delete(Wn),!wn!=!jn&&(jn?Lt==null||Lt(Sn):Ct==null||Ct(Sn))}return(0,Be.useEffect)(function(){return Qe},[]),[an,ln,Xe.current,kt]}var ri=14/15;function Vn(Ht,Lt,Ct){var Ut=(0,Be.useRef)(!1),Kt=(0,Be.useRef)(0),kt=(0,Be.useRef)(0),Pe=(0,Be.useRef)(null),dn=(0,Be.useRef)(null),Xe,Ze=function(Sn){if(Ut.current){var jn=Math.ceil(Sn.touches[0].pageX),Wn=Math.ceil(Sn.touches[0].pageY),wn=Kt.current-jn,qn=kt.current-Wn,di=Math.abs(wn)>Math.abs(qn);di?Kt.current=jn:kt.current=Wn;var hr=Ct(di,di?wn:qn,!1,Sn);hr&&Sn.preventDefault(),clearInterval(dn.current),hr&&(dn.current=setInterval(function(){di?wn*=ri:qn*=ri;var tr=Math.floor(di?wn:qn);(!Ct(di,tr,!0)||Math.abs(tr)<=.1)&&clearInterval(dn.current)},16))}},Qe=function(){Ut.current=!1,Xe()},ln=function(Sn){Xe(),Sn.touches.length===1&&!Ut.current&&(Ut.current=!0,Kt.current=Math.ceil(Sn.touches[0].pageX),kt.current=Math.ceil(Sn.touches[0].pageY),Pe.current=Sn.target,Pe.current.addEventListener("touchmove",Ze,{passive:!1}),Pe.current.addEventListener("touchend",Qe,{passive:!0}))};Xe=function(){Pe.current&&(Pe.current.removeEventListener("touchmove",Ze),Pe.current.removeEventListener("touchend",Qe))},(0,hn.Z)(function(){return Ht&&Lt.current.addEventListener("touchstart",ln,{passive:!0}),function(){var an;(an=Lt.current)===null||an===void 0||an.removeEventListener("touchstart",ln),Xe(),clearInterval(dn.current)}},[Ht])}function Qi(Ht){return Math.floor(Math.pow(Ht,.5))}function Gn(Ht,Lt){var Ct="touches"in Ht?Ht.touches[0]:Ht;return Ct[Lt?"pageX":"pageY"]-window[Lt?"scrollX":"scrollY"]}function Ce(Ht,Lt,Ct){Be.useEffect(function(){var Ut=Lt.current;if(Ht&&Ut){var Kt=!1,kt,Pe,dn=function(){Et.Z.cancel(kt)},Xe=function an(){dn(),kt=(0,Et.Z)(function(){Ct(Pe),an()})},Ze=function(Sn){if(!(Sn.target.draggable||Sn.button!==0)){var jn=Sn;jn._virtualHandled||(jn._virtualHandled=!0,Kt=!0)}},Qe=function(){Kt=!1,dn()},ln=function(Sn){if(Kt){var jn=Gn(Sn,!1),Wn=Ut.getBoundingClientRect(),wn=Wn.top,qn=Wn.bottom;if(jn<=wn){var di=wn-jn;Pe=-Qi(di),Xe()}else if(jn>=qn){var hr=jn-qn;Pe=Qi(hr),Xe()}else dn()}};return Ut.addEventListener("mousedown",Ze),Ut.ownerDocument.addEventListener("mouseup",Qe),Ut.ownerDocument.addEventListener("mousemove",ln),function(){Ut.removeEventListener("mousedown",Ze),Ut.ownerDocument.removeEventListener("mouseup",Qe),Ut.ownerDocument.removeEventListener("mousemove",ln),dn()}}},[Ht])}var _t=10;function Bn(Ht,Lt,Ct,Ut,Kt,kt,Pe,dn){var Xe=Be.useRef(),Ze=Be.useState(null),Qe=(0,be.Z)(Ze,2),ln=Qe[0],an=Qe[1];return(0,hn.Z)(function(){if(ln&&ln.times<_t){if(!Ht.current){an(function(Gr){return(0,Te.Z)({},Gr)});return}kt();var Sn=ln.targetAlign,jn=ln.originAlign,Wn=ln.index,wn=ln.offset,qn=Ht.current.clientHeight,di=!1,hr=Sn,tr=null;if(qn){for(var ro=Sn||jn,pr=0,er=0,ur=0,Lo=Math.min(Lt.length-1,Wn),Bo=0;Bo<=Lo;Bo+=1){var Ur=Kt(Lt[Bo]);er=pr;var Er=Ct.get(Ur);ur=er+(Er===void 0?Ut:Er),pr=ur}for(var lo=ro==="top"?wn:qn-wn,Vo=Lo;Vo>=0;Vo-=1){var ko=Kt(Lt[Vo]),Eo=Ct.get(ko);if(Eo===void 0){di=!0;break}if(lo-=Eo,lo<=0)break}switch(ro){case"top":tr=er-wn;break;case"bottom":tr=ur-qn+wn;break;default:{var jr=Ht.current.scrollTop,Br=jr+qn;er<jr?hr="top":ur>Br&&(hr="bottom")}}tr!==null&&Pe(tr),tr!==ln.lastTop&&(di=!0)}di&&an((0,Te.Z)((0,Te.Z)({},ln),{},{times:ln.times+1,targetAlign:hr,lastTop:tr}))}},[ln,Ht.current]),function(Sn){if(Sn==null){dn();return}if(Et.Z.cancel(Xe.current),typeof Sn=="number")Pe(Sn);else if(Sn&&(0,Fe.Z)(Sn)==="object"){var jn,Wn=Sn.align;"index"in Sn?jn=Sn.index:jn=Lt.findIndex(function(di){return Kt(di)===Sn.key});var wn=Sn.offset,qn=wn===void 0?0:wn;an({times:0,index:jn,offset:qn,originAlign:Wn})}}}var Si=Be.forwardRef(function(Ht,Lt){var Ct=Ht.prefixCls,Ut=Ht.rtl,Kt=Ht.scrollOffset,kt=Ht.scrollRange,Pe=Ht.onStartMove,dn=Ht.onStopMove,Xe=Ht.onScroll,Ze=Ht.horizontal,Qe=Ht.spinSize,ln=Ht.containerSize,an=Ht.style,Sn=Ht.thumbStyle,jn=Ht.showScrollBar,Wn=Be.useState(!1),wn=(0,be.Z)(Wn,2),qn=wn[0],di=wn[1],hr=Be.useState(null),tr=(0,be.Z)(hr,2),ro=tr[0],pr=tr[1],er=Be.useState(null),ur=(0,be.Z)(er,2),Lo=ur[0],Bo=ur[1],Ur=!Ut,Er=Be.useRef(),lo=Be.useRef(),Vo=Be.useState(jn),ko=(0,be.Z)(Vo,2),Eo=ko[0],jr=ko[1],Br=Be.useRef(),Gr=function(){jn===!0||jn===!1||(clearTimeout(Br.current),jr(!0),Br.current=setTimeout(function(){jr(!1)},3e3))},Pt=kt-ln||0,$i=ln-Qe||0,Hr=Be.useMemo(function(){if(Kt===0||Pt===0)return 0;var de=Kt/Pt;return de*$i},[Kt,Pt,$i]),Dr=function(Nn){Nn.stopPropagation(),Nn.preventDefault()},oo=Be.useRef({top:Hr,dragging:qn,pageY:ro,startTop:Lo});oo.current={top:Hr,dragging:qn,pageY:ro,startTop:Lo};var Ko=function(Nn){di(!0),pr(Gn(Nn,Ze)),Bo(oo.current.top),Pe(),Nn.stopPropagation(),Nn.preventDefault()};Be.useEffect(function(){var de=function(on){on.preventDefault()},Nn=Er.current,Un=lo.current;return Nn.addEventListener("touchstart",de,{passive:!1}),Un.addEventListener("touchstart",Ko,{passive:!1}),function(){Nn.removeEventListener("touchstart",de),Un.removeEventListener("touchstart",Ko)}},[]);var Fs=Be.useRef();Fs.current=Pt;var Fi=Be.useRef();Fi.current=$i,Be.useEffect(function(){if(qn){var de,Nn=function(on){var Oe=oo.current,pe=Oe.dragging,ge=Oe.pageY,cn=Oe.startTop;Et.Z.cancel(de);var Zt=Er.current.getBoundingClientRect(),Ue=ln/(Ze?Zt.width:Zt.height);if(pe){var fn=(Gn(on,Ze)-ge)*Ue,Rn=cn;!Ur&&Ze?Rn-=fn:Rn+=fn;var He=Fs.current,xn=Fi.current,Xn=xn?Rn/xn:0,Qn=Math.ceil(Xn*He);Qn=Math.max(Qn,0),Qn=Math.min(Qn,He),de=(0,Et.Z)(function(){Xe(Qn,Ze)})}},Un=function(){di(!1),dn()};return window.addEventListener("mousemove",Nn,{passive:!0}),window.addEventListener("touchmove",Nn,{passive:!0}),window.addEventListener("mouseup",Un,{passive:!0}),window.addEventListener("touchend",Un,{passive:!0}),function(){window.removeEventListener("mousemove",Nn),window.removeEventListener("touchmove",Nn),window.removeEventListener("mouseup",Un),window.removeEventListener("touchend",Un),Et.Z.cancel(de)}}},[qn]),Be.useEffect(function(){return Gr(),function(){clearTimeout(Br.current)}},[Kt]),Be.useImperativeHandle(Lt,function(){return{delayHidden:Gr}});var xi="".concat(Ct,"-scrollbar"),Se={position:"absolute",visibility:Eo?null:"hidden"},we={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ze?(Se.height=8,Se.left=0,Se.right=0,Se.bottom=0,we.height="100%",we.width=Qe,Ur?we.left=Hr:we.right=Hr):(Se.width=8,Se.top=0,Se.bottom=0,Ur?Se.right=0:Se.left=0,we.width="100%",we.height=Qe,we.top=Hr),Be.createElement("div",{ref:Er,className:De()(xi,(0,tn.Z)((0,tn.Z)((0,tn.Z)({},"".concat(xi,"-horizontal"),Ze),"".concat(xi,"-vertical"),!Ze),"".concat(xi,"-visible"),Eo)),style:(0,Te.Z)((0,Te.Z)({},Se),an),onMouseDown:Dr,onMouseMove:Gr},Be.createElement("div",{ref:lo,className:De()("".concat(xi,"-thumb"),(0,tn.Z)({},"".concat(xi,"-thumb-moving"),qn)),style:(0,Te.Z)((0,Te.Z)({},we),Sn),onMouseDown:Ko}))}),ei=Si,_e=20;function Mn(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ct=Ht/Lt*Ht;return isNaN(Ct)&&(Ct=0),Ct=Math.max(Ct,_e),Math.floor(Ct)}var _n=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],fi=[],Kn={overflowY:"auto",overflowAnchor:"none"};function Pi(Ht,Lt){var Ct=Ht.prefixCls,Ut=Ct===void 0?"rc-virtual-list":Ct,Kt=Ht.className,kt=Ht.height,Pe=Ht.itemHeight,dn=Ht.fullHeight,Xe=dn===void 0?!0:dn,Ze=Ht.style,Qe=Ht.data,ln=Ht.children,an=Ht.itemKey,Sn=Ht.virtual,jn=Ht.direction,Wn=Ht.scrollWidth,wn=Ht.component,qn=wn===void 0?"div":wn,di=Ht.onScroll,hr=Ht.onVirtualScroll,tr=Ht.onVisibleChange,ro=Ht.innerProps,pr=Ht.extraRender,er=Ht.styles,ur=Ht.showScrollBar,Lo=ur===void 0?"optional":ur,Bo=(0,xe.Z)(Ht,_n),Ur=Be.useCallback(function(Zn){return typeof an=="function"?an(Zn):Zn==null?void 0:Zn[an]},[an]),Er=On(Ur,null,null),lo=(0,be.Z)(Er,4),Vo=lo[0],ko=lo[1],Eo=lo[2],jr=lo[3],Br=!!(Sn!==!1&&kt&&Pe),Gr=Be.useMemo(function(){return Object.values(Eo.maps).reduce(function(Zn,li){return Zn+li},0)},[Eo.id,Eo.maps]),Pt=Br&&Qe&&(Math.max(Pe*Qe.length,Gr)>kt||!!Wn),$i=jn==="rtl",Hr=De()(Ut,(0,tn.Z)({},"".concat(Ut,"-rtl"),$i),Kt),Dr=Qe||fi,oo=(0,Be.useRef)(),Ko=(0,Be.useRef)(),Fs=(0,Be.useRef)(),Fi=(0,Be.useState)(0),xi=(0,be.Z)(Fi,2),Se=xi[0],we=xi[1],de=(0,Be.useState)(0),Nn=(0,be.Z)(de,2),Un=Nn[0],mi=Nn[1],on=(0,Be.useState)(!1),Oe=(0,be.Z)(on,2),pe=Oe[0],ge=Oe[1],cn=function(){ge(!0)},Zt=function(){ge(!1)},Ue={getKey:Ur};function fn(Zn){we(function(li){var Ei;typeof Zn=="function"?Ei=Zn(li):Ei=Zn;var oi=Li(Ei);return oo.current.scrollTop=oi,oi})}var Rn=(0,Be.useRef)({start:0,end:Dr.length}),He=(0,Be.useRef)(),xn=yt(Dr,Ur),Xn=(0,be.Z)(xn,1),Qn=Xn[0];He.current=Qn;var yi=Be.useMemo(function(){if(!Br)return{scrollHeight:void 0,start:0,end:Dr.length-1,offset:void 0};if(!Pt){var Zn;return{scrollHeight:((Zn=Ko.current)===null||Zn===void 0?void 0:Zn.offsetHeight)||0,start:0,end:Dr.length-1,offset:void 0}}for(var li=0,Ei,oi,Ai,Cr=Dr.length,$n=0;$n<Cr;$n+=1){var pi=Dr[$n],rn=Ur(pi),ui=Eo.get(rn),or=li+(ui===void 0?Pe:ui);or>=Se&&Ei===void 0&&(Ei=$n,oi=li),or>Se+kt&&Ai===void 0&&(Ai=$n),li=or}return Ei===void 0&&(Ei=0,oi=0,Ai=Math.ceil(kt/Pe)),Ai===void 0&&(Ai=Dr.length-1),Ai=Math.min(Ai+1,Dr.length-1),{scrollHeight:li,start:Ei,end:Ai,offset:oi}},[Pt,Br,Se,Dr,jr,kt]),ni=yi.scrollHeight,En=yi.start,Jn=yi.end,Ki=yi.offset;Rn.current.start=En,Rn.current.end=Jn,Be.useLayoutEffect(function(){var Zn=Eo.getRecord();if(Zn.size===1){var li=Array.from(Zn)[0],Ei=Dr[En];if(Ei){var oi=Ur(Ei);if(oi===li){var Ai=Eo.get(li),Cr=Ai-Pe;fn(function($n){return $n+Cr})}}}Eo.resetRecord()},[ni]);var qi=Be.useState({width:0,height:kt}),rr=(0,be.Z)(qi,2),Ge=rr[0],eo=rr[1],vr=function(li){eo({width:li.offsetWidth,height:li.offsetHeight})},Or=(0,Be.useRef)(),Re=(0,Be.useRef)(),kn=Be.useMemo(function(){return Mn(Ge.width,Wn)},[Ge.width,Wn]),ai=Be.useMemo(function(){return Mn(Ge.height,ni)},[Ge.height,ni]),gi=ni-kt,Bi=(0,Be.useRef)(gi);Bi.current=gi;function Li(Zn){var li=Zn;return Number.isNaN(Bi.current)||(li=Math.min(li,Bi.current)),li=Math.max(li,0),li}var Xi=Se<=0,nr=Se>=gi,qt=Un<=0,$t=Un>=Wn,Vt=Xt(Xi,nr,qt,$t),Ne=function(){return{x:$i?-Un:Un,y:Se}},Ae=(0,Be.useRef)(Ne()),Je=(0,se.zX)(function(Zn){if(hr){var li=(0,Te.Z)((0,Te.Z)({},Ne()),Zn);(Ae.current.x!==li.x||Ae.current.y!==li.y)&&(hr(li),Ae.current=li)}});function yn(Zn,li){var Ei=Zn;li?((0,un.flushSync)(function(){mi(Ei)}),Je()):fn(Ei)}function Fn(Zn){var li=Zn.currentTarget.scrollTop;li!==Se&&fn(li),di==null||di(Zn),Je()}var wi=function(li){var Ei=li,oi=Wn?Wn-Ge.width:0;return Ei=Math.max(Ei,0),Ei=Math.min(Ei,oi),Ei},si=(0,se.zX)(function(Zn,li){li?((0,un.flushSync)(function(){mi(function(Ei){var oi=Ei+($i?-Zn:Zn);return wi(oi)})}),Je()):fn(function(Ei){var oi=Ei+Zn;return oi})}),Ln=he(Br,Xi,nr,qt,$t,!!Wn,si),Hn=(0,be.Z)(Ln,2),Wi=Hn[0],Ri=Hn[1];Vn(Br,oo,function(Zn,li,Ei,oi){var Ai=oi;return Vt(Zn,li,Ei)?!1:!Ai||!Ai._virtualHandled?(Ai&&(Ai._virtualHandled=!0),Wi({preventDefault:function(){},deltaX:Zn?li:0,deltaY:Zn?0:li}),!0):!1}),Ce(Pt,oo,function(Zn){fn(function(li){return li+Zn})}),(0,hn.Z)(function(){function Zn(Ei){var oi=Xi&&Ei.detail<0,Ai=nr&&Ei.detail>0;Br&&!oi&&!Ai&&Ei.preventDefault()}var li=oo.current;return li.addEventListener("wheel",Wi,{passive:!1}),li.addEventListener("DOMMouseScroll",Ri,{passive:!0}),li.addEventListener("MozMousePixelScroll",Zn,{passive:!1}),function(){li.removeEventListener("wheel",Wi),li.removeEventListener("DOMMouseScroll",Ri),li.removeEventListener("MozMousePixelScroll",Zn)}},[Br,Xi,nr]),(0,hn.Z)(function(){if(Wn){var Zn=wi(Un);mi(Zn),Je({x:Zn})}},[Ge.width,Wn]);var Tn=function(){var li,Ei;(li=Or.current)===null||li===void 0||li.delayHidden(),(Ei=Re.current)===null||Ei===void 0||Ei.delayHidden()},Ot=Bn(oo,Dr,Eo,Pe,Ur,function(){return ko(!0)},fn,Tn);Be.useImperativeHandle(Lt,function(){return{nativeElement:Fs.current,getScrollInfo:Ne,scrollTo:function(li){function Ei(oi){return oi&&(0,Fe.Z)(oi)==="object"&&("left"in oi||"top"in oi)}Ei(li)?(li.left!==void 0&&mi(wi(li.left)),Ot(li.top)):Ot(li)}}}),(0,hn.Z)(function(){if(tr){var Zn=Dr.slice(En,Jn+1);tr(Zn,Dr)}},[En,Jn,Dr]);var Yi=fe(Dr,Ur,Eo,Pe),ki=pr==null?void 0:pr({start:En,end:Jn,virtual:Pt,offsetX:Un,offsetY:Ki,rtl:$i,getSize:Yi}),Ui=ct(Dr,En,Jn,Wn,Un,Vo,ln,Ue),ji=null;kt&&(ji=(0,Te.Z)((0,tn.Z)({},Xe?"height":"maxHeight",kt),Kn),Br&&(ji.overflowY="hidden",Wn&&(ji.overflowX="hidden"),pe&&(ji.pointerEvents="none")));var Gi={};return $i&&(Gi.dir="rtl"),Be.createElement("div",(0,Nt.Z)({ref:Fs,style:(0,Te.Z)((0,Te.Z)({},Ze),{},{position:"relative"}),className:Hr},Gi,Bo),Be.createElement(Me.Z,{onResize:vr},Be.createElement(qn,{className:"".concat(Ut,"-holder"),style:ji,ref:oo,onScroll:Fn,onMouseEnter:Tn},Be.createElement(et,{prefixCls:Ut,height:ni,offsetX:Un,offsetY:Ki,scrollWidth:Wn,onInnerResize:ko,ref:Ko,innerProps:ro,rtl:$i,extra:ki},Ui))),Pt&&ni>kt&&Be.createElement(ei,{ref:Or,prefixCls:Ut,scrollOffset:Se,scrollRange:ni,rtl:$i,onScroll:yn,onStartMove:cn,onStopMove:Zt,spinSize:ai,containerSize:Ge.height,style:er==null?void 0:er.verticalScrollBar,thumbStyle:er==null?void 0:er.verticalScrollBarThumb,showScrollBar:Lo}),Pt&&Wn>Ge.width&&Be.createElement(ei,{ref:Re,prefixCls:Ut,scrollOffset:Un,scrollRange:Wn,rtl:$i,onScroll:yn,onStartMove:cn,onStopMove:Zt,spinSize:kn,containerSize:Ge.width,horizontal:!0,style:er==null?void 0:er.horizontalScrollBar,thumbStyle:er==null?void 0:er.horizontalScrollBarThumb,showScrollBar:Lo}))}var le=Be.forwardRef(Pi);le.displayName="List";var bn=le,ci=bn},93314:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},96908:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},57177:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},81378:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},16722:function(Pn,vi,ne){"use strict";ne.d(vi,{Z:function(){return De}});const Nt=Me=>typeof Me=="object"&&Me!=null&&Me.nodeType===1,Fe=(Me,se)=>(!se||Me!=="hidden")&&Me!=="visible"&&Me!=="clip",Te=(Me,se)=>{if(Me.clientHeight<Me.scrollHeight||Me.clientWidth<Me.scrollWidth){const hn=getComputedStyle(Me,null);return Fe(hn.overflowY,se)||Fe(hn.overflowX,se)||(Be=>{const un=(Qt=>{if(!Qt.ownerDocument||!Qt.ownerDocument.defaultView)return null;try{return Qt.ownerDocument.defaultView.frameElement}catch(et){return null}})(Be);return!!un&&(un.clientHeight<Be.scrollHeight||un.clientWidth<Be.scrollWidth)})(Me)}return!1},tn=(Me,se,hn,Be,un,Qt,et,nt)=>Qt<Me&&et>se||Qt>Me&&et<se?0:Qt<=Me&&nt<=hn||et>=se&&nt>=hn?Qt-Me-Be:et>se&&nt<hn||Qt<Me&&nt>hn?et-se+un:0,be=Me=>{const se=Me.parentElement;return se==null?Me.getRootNode().host||null:se},xe=(Me,se)=>{var hn,Be,un,Qt;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ct,boundary:lt,skipOverflowHiddenElements:gt}=se,yt=typeof lt=="function"?lt:ei=>ei!==lt;if(!Nt(Me))throw new TypeError("Invalid target");const Et=document.scrollingElement||document.documentElement,Tt=[];let Yt=Me;for(;Nt(Yt)&&yt(Yt);){if(Yt=be(Yt),Yt===Et){Tt.push(Yt);break}Yt!=null&&Yt===document.body&&Te(Yt)&&!Te(document.documentElement)||Yt!=null&&Te(Yt,gt)&&Tt.push(Yt)}const Xt=(Be=(hn=window.visualViewport)==null?void 0:hn.width)!=null?Be:innerWidth,he=(Qt=(un=window.visualViewport)==null?void 0:un.height)!=null?Qt:innerHeight,{scrollX:fe,scrollY:ue}=window,{height:Ye,width:Le,top:sn,right:vn,bottom:On,left:ri}=Me.getBoundingClientRect(),{top:Vn,right:Qi,bottom:Gn,left:Ce}=(ei=>{const _e=window.getComputedStyle(ei);return{top:parseFloat(_e.scrollMarginTop)||0,right:parseFloat(_e.scrollMarginRight)||0,bottom:parseFloat(_e.scrollMarginBottom)||0,left:parseFloat(_e.scrollMarginLeft)||0}})(Me);let _t=nt==="start"||nt==="nearest"?sn-Vn:nt==="end"?On+Gn:sn+Ye/2-Vn+Gn,Bn=ct==="center"?ri+Le/2-Ce+Qi:ct==="end"?vn+Qi:ri-Ce;const Si=[];for(let ei=0;ei<Tt.length;ei++){const _e=Tt[ei],{height:Mn,width:_n,top:fi,right:Kn,bottom:Pi,left:le}=_e.getBoundingClientRect();if(et==="if-needed"&&sn>=0&&ri>=0&&On<=he&&vn<=Xt&&(_e===Et&&!Te(_e)||sn>=fi&&On<=Pi&&ri>=le&&vn<=Kn))return Si;const bn=getComputedStyle(_e),ci=parseInt(bn.borderLeftWidth,10),Ht=parseInt(bn.borderTopWidth,10),Lt=parseInt(bn.borderRightWidth,10),Ct=parseInt(bn.borderBottomWidth,10);let Ut=0,Kt=0;const kt="offsetWidth"in _e?_e.offsetWidth-_e.clientWidth-ci-Lt:0,Pe="offsetHeight"in _e?_e.offsetHeight-_e.clientHeight-Ht-Ct:0,dn="offsetWidth"in _e?_e.offsetWidth===0?0:_n/_e.offsetWidth:0,Xe="offsetHeight"in _e?_e.offsetHeight===0?0:Mn/_e.offsetHeight:0;if(Et===_e)Ut=nt==="start"?_t:nt==="end"?_t-he:nt==="nearest"?tn(ue,ue+he,he,Ht,Ct,ue+_t,ue+_t+Ye,Ye):_t-he/2,Kt=ct==="start"?Bn:ct==="center"?Bn-Xt/2:ct==="end"?Bn-Xt:tn(fe,fe+Xt,Xt,ci,Lt,fe+Bn,fe+Bn+Le,Le),Ut=Math.max(0,Ut+ue),Kt=Math.max(0,Kt+fe);else{Ut=nt==="start"?_t-fi-Ht:nt==="end"?_t-Pi+Ct+Pe:nt==="nearest"?tn(fi,Pi,Mn,Ht,Ct+Pe,_t,_t+Ye,Ye):_t-(fi+Mn/2)+Pe/2,Kt=ct==="start"?Bn-le-ci:ct==="center"?Bn-(le+_n/2)+kt/2:ct==="end"?Bn-Kn+Lt+kt:tn(le,Kn,_n,ci,Lt+kt,Bn,Bn+Le,Le);const{scrollLeft:Ze,scrollTop:Qe}=_e;Ut=Xe===0?0:Math.max(0,Math.min(Qe+Ut/Xe,_e.scrollHeight-Mn/Xe+Pe)),Kt=dn===0?0:Math.max(0,Math.min(Ze+Kt/dn,_e.scrollWidth-_n/dn+kt)),_t+=Qe-Ut,Bn+=Ze-Kt}Si.push({el:_e,top:Ut,left:Kt})}return Si},ye=Me=>Me===!1?{block:"end",inline:"nearest"}:(se=>se===Object(se)&&Object.keys(se).length!==0)(Me)?Me:{block:"start",inline:"nearest"};function De(Me,se){if(!Me.isConnected||!(un=>{let Qt=un;for(;Qt&&Qt.parentNode;){if(Qt.parentNode===document)return!0;Qt=Qt.parentNode instanceof ShadowRoot?Qt.parentNode.host:Qt.parentNode}return!1})(Me))return;const hn=(un=>{const Qt=window.getComputedStyle(un);return{top:parseFloat(Qt.scrollMarginTop)||0,right:parseFloat(Qt.scrollMarginRight)||0,bottom:parseFloat(Qt.scrollMarginBottom)||0,left:parseFloat(Qt.scrollMarginLeft)||0}})(Me);if((un=>typeof un=="object"&&typeof un.behavior=="function")(se))return se.behavior(xe(Me,se));const Be=typeof se=="boolean"||se==null?void 0:se.behavior;for(const{el:un,top:Qt,left:et}of xe(Me,ye(se))){const nt=Qt-hn.top+hn.bottom,ct=et-hn.left+hn.right;un.scroll({top:nt,left:ct,behavior:Be})}}}}]);