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.
1239 lines
2.6 MiB
1239 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[5382],{39060:function(){"use strict"},76596:function(){"use strict"},25346:function(Rn,An){"use strict";An.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74042:function(){"use strict";function Rn(fe,z,te,se){te===void 0&&(te=0),se===void 0&&(se=1/0),this._name=fe,this._defaultValue=z,this._minimum=te,this._maximum=se}Object.defineProperty(Rn.prototype,"name",{get:function(){return this._name},set:function(fe){if(typeof fe!="string"||fe==="")throw new Error("Shape name must be a valid string.");this._name=fe}}),Object.defineProperty(Rn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("The default value must be a real number, not: "+fe);this._defaultValue=fe}}),Object.defineProperty(Rn.prototype,"minimum",{get:function(){return this._minimum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Minimum must be a real number, not: "+fe);this._minimum=fe}}),Object.defineProperty(Rn.prototype,"maximum",{get:function(){return this._maximum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Maximum must be a real number, not: "+fe);this._maximum=fe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(fe,z){var te=go.Shape._FigureParameters[fe];return te?te[z]:null},go.Shape.setFigureParameter=function(fe,z,te){if(!(te instanceof Rn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+te);if(te.defaultValue<te.minimum||te.defaultValue>te.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+te.defaultValue);var se=go.Shape._FigureParameters[fe];se||(se=[],go.Shape._FigureParameters[fe]=se),se[z]=te};var An=[];function pt(fe,z){var te=An.pop();return te===void 0?new go.Point(fe,z):(te.x=fe,te.y=z,te)}function st(){var fe=An.pop();return fe===void 0?new go.Point:fe}function Ut(fe){An.push(fe)}function oe(fe,z,te,se,ie,le,ce,pe,xe){xe||(xe=new go.Point);var je=fe-te,De=ie-ce,Fe=NaN,Te=NaN;if(je===0)if(De===0)fe===te&&(Fe=fe,Te=z);else{var Me=(le-pe)/De,Be=le-Me*ie;Fe=fe,Te=Me*Fe+Be}else if(De===0){var Ge=(z-se)/je,Ye=z-Ge*fe;Fe=ie,Te=Ge*Fe+Ye}else{var Ge=(z-se)/je,Me=(le-pe)/De,Ye=z-Ge*fe,Be=le-Me*ie;Fe=(Be-Ye)/(Ge-Me),Te=Ge*Fe+Ye}return xe.x=Fe,xe.y=Te,xe}function Ue(fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me){var Be=1-xe,Ge=xe,Ye=fe*Be+te*Ge,Ke=z*Be+se*Ge,Ve=te*Be+ie*Ge,ot=se*Be+le*Ge,ut=ie*Be+ce*Ge,ft=le*Be+pe*Ge,St=Ye*Be+Ve*Ge,Qe=Ke*Be+ot*Ge,rt=Ve*Be+ut*Ge,wt=ot*Be+ft*Ge,Ct=St*Be+rt*Ge,bt=Qe*Be+wt*Ge;je.x=Ye,je.y=Ke,De.x=St,De.y=Qe,Fe.x=Ct,Fe.y=bt,Te.x=rt,Te.y=wt,Me.x=ut,Me.y=ft}var _e=new go.Spot(.156,.156),de=new go.Spot(.844,.844),ve=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Rn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=5),se=Math.min(se,z/3),se=Math.min(se,te/3);var ie=se*ve,le=new go.Geometry().add(new go.PathFigure(se,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-se,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,se,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,te-se)).add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,te-ie,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,se,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ie,te,0,te-ie)).add(new go.PathSegment(go.PathSegment.Line,0,se)).add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,te).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,te).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=0,se.startY=te/2,se.endX=z,se.endY=te/2,se}),go.Shape.defineFigureGenerator("LineV",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=z/2,se.startY=0,se.endX=z/2,se.endY=te,se}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,te/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,te)))}),go.Shape.defineFigureGenerator("XLine",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)))}),go.Shape.defineFigureGenerator("LineRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.25*z,te)))}),go.Shape.defineFigureGenerator("LineDown",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.25*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*te)).add(new go.PathSegment(go.PathSegment.Line,z,.25*te)))}),go.Shape.defineFigureGenerator("LineLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*z,te)))}),go.Shape.defineFigureGenerator("LineUp",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.75*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,z,.75*te)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(fe,z,te){var se=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(se*z,(1-se)*te,!1).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,se*te)).add(new go.PathSegment(go.PathSegment.Move,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Move,0,te/2)).add(new go.PathSegment(go.PathSegment.Line,z,te/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,te)))}),go.Shape.defineFigureGenerator("CircleLine",function(fe,z,te){var se=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close()));return ie.spot1=_e,ie.spot2=de,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=0,se.startY=0,se.endX=z,se.endY=te,se}),go.Shape.defineFigureGenerator("Line2",function(fe,z,te){var se=new go.Geometry(go.Geometry.Line);return se.startX=z,se.startY=0,se.endX=0,se.endY=te,se}),go.Shape.defineFigureGenerator("Curve1",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,te,ve*z,0,z,(1-ve)*te)))}),go.Shape.defineFigureGenerator("Curve2",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,te,0,ve*te,(1-ve)*z,te)))}),go.Shape.defineFigureGenerator("Curve3",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,ve*te,ve*z,te)))}),go.Shape.defineFigureGenerator("Curve4",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,(1-ve)*z,0,0,(1-ve)*te)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Rn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=.1:se<-1?se=-1:se>1&&(se=1);var ie=Math.abs(se)*z;if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Rn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=10:se<-z?se=-z:se>z&&(se=z);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new Rn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=.2:se<.5?se=-.5:se>.5&&(se=.5);var ie=Math.abs(se)*z;if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Rn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=20:se<-z?se=-z/2:se>z&&(se=z/2);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new Rn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)?se=10:se<-z?se=-z/2:se>z&&(se=z/2);var ie=Math.abs(se);if(se===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=te,le}else{var le=new go.Geometry;return se>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,te)).add(new go.PathSegment(go.PathSegment.Line,ie,te).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var Ee=[];function ke(){var fe=Ee.pop();return fe===void 0?[]:fe}function Se(fe){fe.length=0,Ee.push(fe)}function Ae(fe){for(var z=ke(),te=.5,se=.5,ie=Math.PI*1.5,le=0,ce=0;ce<fe;ce++)le=2*Math.PI/fe*ce+ie,z[ce]=new go.Point(se+te*Math.cos(le),se+te*Math.sin(le));return z.push(z[0]),z}function me(fe){var z=Pe(fe),te=ke();te[0]=z[0];for(var se=1,ie=1;se<z.length;se+=2,ie+=3)te[ie]=z[se],te[ie+1]=z[se],te[ie+2]=z[se+1];return Se(z),te}function Pe(fe){for(var z=Ae(fe),te=ke(),se=Math.floor(z.length/2),ie=z.length-1,le=fe%2===0?2:1,ce=0;ce<ie;ce++){var pe=z[ce],xe=z[ce+1],je=z[(se+ce-1)%ie],De=z[(se+ce+le)%ie];te[ce*2]=pe,te[ce*2+1]=oe(pe.x,pe.y,je.x,je.y,xe.x,xe.y,De.x,De.y,new go.Point)}return te[te.length]=te[0],Se(z),te}go.Shape.defineFigureGenerator("Pentagon",function(fe,z,te){var se=Ae(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<5;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(fe,z,te){var se=Ae(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<6;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(fe,z,te){var se=Ae(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<7;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(fe,z,te){var se=Ae(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<8;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(fe,z,te){var se=Ae(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<9;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(fe,z,te){var se=Ae(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<10;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(fe,z,te){var se=Ae(12),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<12;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(fe,z,te){var se=Pe(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<10;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(fe,z,te){var se=Pe(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<12;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(fe,z,te){var se=Pe(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<14;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(fe,z,te){var se=Pe(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<16;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(fe,z,te){var se=Pe(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<18;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(fe,z,te){var se=Pe(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<20;ce++)le.add(new go.PathSegment(go.PathSegment.Line,se[ce].x*z,se[ce].y*te));return le.add(new go.PathSegment(go.PathSegment.Line,se[0].x*z,se[0].y*te).close()),Se(se),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(fe,z,te){var se=me(5),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(fe,z,te){var se=me(6),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(fe,z,te){var se=me(7),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(fe,z,te){var se=me(8),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(fe,z,te){var se=me(9),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(fe,z,te){var se=me(10),ie=new go.Geometry,le=new go.PathFigure(se[0].x*z,se[0].y*te,!0);ie.add(le);for(var ce=1;ce<se.length;ce+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,se[ce+2].x*z,se[ce+2].y*te,se[ce].x*z,se[ce].y*te,se[ce+1].x*z,se[ce+1].y*te));return le.segments.last().close(),Se(se),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new Rn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Rn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(fe,z,te){var se=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(se)&&(se=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ce=new go.PathFigure(0,0,!0);return le.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se<z/2&&ie<te/2&&(ce.add(new go.PathSegment(go.PathSegment.Move,se,ie)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,ie).close())),le.setSpots(0,0,1,1,se,ie,-se,-ie),le}),go.Shape.setFigureParameter("Ring",0,new Rn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=8);var ie=z/2,le=new go.Geometry,ce=new go.PathFigure(z,z/2,!0);le.add(ce),ce.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var pe=Math.max(ie-se,0);return pe>0&&(ce.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),ce.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,pe,pe).close())),le.spot1=_e,le.spot2=de,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*te,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*te,-.09239631*z,.07836421*te,.1406031*z,-.0542823*te)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*te,.2450511*z,-.00697547*te,.3776197*z,-.01112067*te)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*te,.4539471*z,0,.6066018*z,-.02526587*te)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*te,.6914277*z,-.01904177*te,.8921095*z,-.01220843*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*te,1.036446*z,.04105738*te,1.020377*z,.3022052*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*te,1.04448*z,.360238*te,.992256*z,.5219009*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*te,1.032337*z,.5771781*te,1.018411*z,.8120651*te)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*te,1.028411*z,.9571472*te,.8556702*z,1.052487*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*te,.7431877*z,1.009325*te,.5624123*z,1.021761*te)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*te,.4820677*z,1.031761*te,.3030112*z,1.002796*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*te,.2329994*z,1.01518*te,.03213784*z,1.01518*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*te,-.02812061*z,.9032597*te,-.01205169*z,.6835638*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*te,-.01812061*z,.6089503*te,-.00606892*z,.4555777*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*te,-.01606892*z,.3892545*te,-.01205169*z,.1944299*te))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(fe,z,te){var se=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(se*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,se*te)).add(new go.PathSegment(go.PathSegment.Line,z,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Line,se*z,te)).add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te)).add(new go.PathSegment(go.PathSegment.Line,0,se*te).close())).setSpots(se/2,se/2,1-se/2,1-se/2)}),go.Shape.setFigureParameter("Pie",0,new Rn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Rn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(fe,z,te){var se=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(se)&&(se=0),isNaN(ie)&&(ie=315);var le=se%360;le<0&&(le+=360);var ce=ie%360,pe=Math.min(z,te)/2;return new go.Geometry().add(new go.PathFigure(pe,pe).add(new go.PathSegment(go.PathSegment.Arc,le,ce,pe,pe,pe,pe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(fe,z,te){var se=ve/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,le*te,z,(1-se)*te,(ie+se)*z,(le+se)*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Rn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=30);var ie=Math.min(se,z)/2,le=z/2,ce=te/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Rn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=10);var ie=Math.min(se,z)/2,le=z/2,ce=te/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,te)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ce-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ce-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new Rn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(fe,z,te){var se=fe?fe.parameter1:NaN;if((isNaN(se)||se<0)&&(se=30),z===0||te===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=te,ie}else{var le=z/2,ce=te/2,pe=Math.atan2(te,z),xe=se-Math.min(Math.cos(pe)*se/2,le),je=se-Math.min(Math.sin(pe)*se/2,ce),ie=new go.Geometry,De=new go.PathFigure(xe,0,!0);return ie.add(De),De.add(new go.PathSegment(go.PathSegment.Line,le,.2*te)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,0)),De.add(new go.PathSegment(go.PathSegment.Line,z,je)),De.add(new go.PathSegment(go.PathSegment.Line,.8*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,z,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,z-xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,le,.8*te)),De.add(new go.PathSegment(go.PathSegment.Line,xe,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te-je)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Rn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=10);var ie=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*te).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new Rn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+se/2)*z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+se/2)*z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-se/2)*z,(1-se)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-se/2)*z,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,se*te).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new Rn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,te,Math.abs(1-se)*z,.25*te,Math.abs(1-se)*z,.75*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,se*z,.75*te,se*z,.25*te).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,ve*z,0,z,(.5-ve/2)*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,(.5+ve/2)*te,ve*z,te).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,te,z,0,z,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*te,.5*z,.25*te).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,.1*z,.8*te,0,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*te,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,.5*te,.9*z,.8*te).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*te)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.6*z,.2*te,z,.25*te)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*te,z,.8*te,.6*z,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,.5*z,.75*te,.55*z,.95*te)).add(new go.PathSegment(go.PathSegment.Line,.25*z,te)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*te,.45*z,.95*te,.5*z,.75*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.4*z,.8*te,0,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*te,0,.25*te,.4*z,.2*te).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.4*z,.6*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,te,.5*z,.75*te,.45*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*te,.55*z,.95*te,.5*z,.75*te));var le=.2,ce=.3,pe=0,xe=le*ve;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ce)*z,(.5+pe)*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce)*z,(.5-xe+pe)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce+.05)*z,(.5-xe+pe-.02)*te)),le=.2,ce=0,pe=-.3,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ce)*z,(.5+pe)*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce)*z,(.5-xe+pe)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ce)*z,(.5+pe)*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-xe+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),le=.2,ce=-.3,pe=0,xe=le*ve,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5-le+pe)*te,(1-.5+le+ce-.05)*z,(.5-xe+pe-.02)*te,(.5+xe+ce)*z,(.5-le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ce)*z,(.5+pe)*te,(.5-xe+ce)*z,(.5-le+pe)*te,(.5-le+ce)*z,(.5-xe+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ce)*z,(.5+le+pe)*te,(.5-le+ce)*z,(.5+xe+pe)*te,(.5-xe+ce)*z,(.5+le+pe)*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*te,(.5+xe+ce)*z,(.5+le+pe)*te,(.5+le+ce)*z,(.5+xe+pe)*te).close()),se.setSpots(.06,.33,.93,.68),se}),go.Shape.defineFigureGenerator("YinYang",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ce=.5,pe=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ce+le)*z,pe*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ce,te*pe,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),pe=.75,ie=new go.PathFigure((ce+le)*z,pe*te,!0),se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ce,te*pe,le*z,le*z).close()),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Peace",function(fe,z,te){var se=.8535533905932737,ie=.5*z,le=.5*te;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,le,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ie,te)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,se*te)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,se*z,se*te)))}),go.Shape.defineFigureGenerator("NotAllowed",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=.5,pe=.5,xe=new go.PathFigure(ce*z,(pe-le)*te);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),le=.4,ie=ve*.4;var je=st(),De=st(),Fe=st(),Te=st();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.42,je,De,Fe,Te,Te);var Me=st(),Be=st(),Ge=st();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.58,Te,Te,Ge,Me,Be);var Ye=st(),Ke=st(),Ve=st();Ue(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.42,Ye,Ke,Ve,Te,Te);var ot=st(),ut=st(),ft=st();return Ue(ce,pe+le,ce-ie,pe+le,ce-le,pe+ie,ce-le,pe,.58,Te,Te,ft,ot,ut),xe.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,ot.x*z,ot.y*te,ut.x*z,ut.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*te,je.x*z,je.y*te,De.x*z,De.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,ft.x*z,ft.y*te).close()),xe.add(new go.PathSegment(go.PathSegment.Move,Ve.x*z,Ve.y*te)),xe.add(new go.PathSegment(go.PathSegment.Line,Ge.x*z,Ge.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,Me.x*z,Me.y*te,Be.x*z,Be.y*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Ve.x*z,Ve.y*te,Ye.x*z,Ye.y*te,Ke.x*z,Ke.y*te).close()),Ut(je),Ut(De),Ut(Fe),Ut(Te),Ut(Me),Ut(Be),Ut(Ge),Ut(Ye),Ut(Ke),Ut(Ve),Ut(ot),Ut(ut),Ut(ft),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Fragile",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*te)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*te,z,.25*te,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,te)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*te,0,.25*te).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Rn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=30),se>z&&(se=z);var ie=(z-se)/2,le=ie+se;return new go.Geometry().add(new go.PathFigure(le,.5*te).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,.55*te).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*te)).add(new go.PathSegment(go.PathSegment.Line,z,.45*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*te).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(fe,z,te){var se=new go.Geometry,ie=ve*.4,le=.4,ce=.5,pe=.5,xe=st(),je=st(),De=st(),Fe=st(),Te=new go.PathFigure((ce-le)*z,pe*te,!1);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.44,De,Fe,je,xe,xe),Te.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te));var Me=pt(je.x,je.y);Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.56,xe,xe,je,De,Fe);var Be=pt(je.x,je.y);Te.add(new go.PathSegment(go.PathSegment.Line,(Me.x*.1+.95*.9)*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,Me.y*.1*te)),Te.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,0)),Te.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,.15*te)),Te.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*z,(Be.y*.1+.05*.9)*te)),Te.add(new go.PathSegment(go.PathSegment.Line,Be.x*z,Be.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),le=.35,ie=ve*.35;var Ge=new go.PathFigure(ce*z,(pe-le)*te,!1);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te));var Ye=new go.PathFigure((ce-le)*z,pe*te,!1);return se.add(Ye),Ut(xe),Ut(je),Ut(De),Ut(Fe),Ut(Me),Ut(Be),se.spot1=new go.Spot(.202,.257),se.spot2=new go.Spot(.792,.739),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("GenderFemale",function(fe,z,te){var se=new go.Geometry,ie=.375,le=0,ce=-.125,pe=ie*ve,xe=new go.PathFigure((.525+le)*z,(.5+ie+ce)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ce)*te,(.5+pe+le)*z,(.5+ie+ce)*te,(.5+ie+le)*z,(.5+pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ce)*te,(1-.5+ie+le)*z,(.5-pe+ce)*te,(.5+pe+le)*z,(.5-ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ce)*te,(.5-ie+le)*z,(.5+pe+ce)*te,(.5-pe+le)*z,(.5+ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*z,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*te).close()),ie=.325,le=0,ce=-.125,pe=ie*ve;var xe=new go.PathFigure((1-.5+ie+le)*z,(.5+ce)*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ce)*te,(.5+ie+le)*z,(.5+pe+ce)*te,(.5+pe+le)*z,(.5+ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5+ie+ce)*te,(.5-ie+le)*z,(.5+pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ce)*te,(.5+pe+le)*z,(.5-ie+ce)*te,(1-.5+ie+le)*z,(.5-pe+ce)*te));var xe=new go.PathFigure((.525+le)*z,(.5+ie+ce)*te,!1);return se.add(xe),se.spot1=new go.Spot(.232,.136),se.spot2=new go.Spot(.682,.611),se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("LogicImplies",function(fe,z,te){var se=fe?fe.parameter1:NaN;return isNaN(se)&&(se=.2),new go.Geometry().add(new go.PathFigure((1-se)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(fe,z,te){var se=fe?fe.parameter1:NaN;return isNaN(se)&&(se=.2),new go.Geometry().add(new go.PathFigure((1-se)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-se)*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Move,se*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,se*z,te))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)))}),go.Shape.defineFigureGenerator("LogicAnd",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(fe,z,te){var se=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*te,.5*z,.5*te)));return se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("LogicTruth",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Move,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Move,z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)))}),go.Shape.defineFigureGenerator("LogicForAll",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,te)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,z,.5*te)).add(new go.PathSegment(go.PathSegment.Move,0,te)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(fe,z,te){var se=.5;return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,0,se*te)).add(new go.PathSegment(go.PathSegment.Arc,180,180,se*z,se*te,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,z,te))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(fe,z,te){var se=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,se*te)).add(new go.PathSegment(go.PathSegment.Arc,0,180,se*z,se*te,se*z,se*te)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Rn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Rn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-se)*z,ce=(.5-ie/2)*te,pe=(.5+ie/2)*te,xe=new go.Geometry,je=new go.PathFigure(0,ce,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ce)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,ce/te);var De=oe(0,pe/te,1,pe/te,le/z,1,1,.5,st());return xe.spot2=new go.Spot(De.x,De.y),Ut(De),xe}),go.Shape.setFigureParameter("Arrow2",0,new Rn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Rn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=30),se>z&&(se=z);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,te/2);var le=z-se,ce=(te-ie)/2,pe=ce+ie,xe=new go.Geometry,je=new go.PathFigure(0,ce,!0);xe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ce)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Line,le,te)),je.add(new go.PathSegment(go.PathSegment.Line,le,pe)),je.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),xe.spot1=new go.Spot(0,ce/te);var De=oe(0,pe/te,1,pe/te,le/z,1,1,.5,st());return xe.spot2=new go.Spot(De.x,De.y),Ut(De),xe}),go.Shape.defineFigureGenerator("Chevron",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("DoubleArrow",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*te).close()),se}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Rn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var xe=oe(0,.5,.3,0,0,ie/te,.1,ie/te,st());return ce.spot1=new go.Spot(xe.x,xe.y),xe=oe(.7,1,1,.5,0,le/te,1,le/te,xe),ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Rn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Rn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(te-se)/2,ce=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,ce=le+se,pe=0,xe=te):(le=0,ce=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var Fe=oe(0,.5,.3,pe/te,0,le/te,1,le/te,st());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Ut(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new Rn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(0,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,st());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("IBeamArrow2",0,new Rn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Rn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(te-se)/2,ce=le+se,pe=(te-ie)/2,xe=pe+ie;(se>te||ie>te)&&(ie>se?(se=se*te/ie,le=(te-se)/2,ce=le+se,pe=0,xe=te):(le=0,ce=te,pe=0,xe=te));var je=new go.Geometry,De=new go.PathFigure(z,.5*te,!0);je.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ce)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),je.spot1=new go.Spot(0,le/te);var Fe=oe(.7,xe/te,1,.5,0,ce/te,1,ce/te,st());return je.spot2=new go.Spot(Fe.x,Fe.y),Ut(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new Rn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.1);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(se,.35);var ce=oe(.2,.65,1,.65,0,1,1,.5,st());return ie.spot2=new go.Spot(ce.x,ce.y),Ut(ce),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Rn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.3);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,se*z,.75*te,se*z,.25*te).close()),ie.spot1=new go.Spot(se,.35);var ce=oe(0,.65,1,.65,0,1,1,.5,st());return ie.spot2=new go.Spot(ce.x,ce.y),Ut(ce),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Rn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.4);var ie=(.5-se/2)*te,le=(.5+se/2)*te,ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(.2,.3);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,st());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Rn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=50);var ie=(te-se)/2,le=ie+se;se>te&&(ie=0,le=te);var ce=new go.Geometry,pe=new go.PathFigure(z,.5*te,!0);ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ce.spot1=new go.Spot(.2,ie/te);var xe=oe(.7,1,1,.5,0,le/te,1,le/te,st());return ce.spot2=new go.Spot(xe.x,xe.y),Ut(xe),ce}),go.Shape.setFigureParameter("SquareArrow",0,new Rn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.7);var ie=new go.Geometry,le=new go.PathFigure(z,.5*te,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,se*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(se,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(0,.9*te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te).close()),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.97),se}),go.Shape.defineFigureGenerator("Cone2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.9*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*te,(1-.85/.9)*z,te,.85/.9*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*te).close());var le=new go.PathFigure(0,.9*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*te,(1-.85/.9)*z,.8*te,.85/.9*z,.8*te)),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.82),se}),go.Shape.defineFigureGenerator("Cube1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var le=new go.PathFigure(.5*z,te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(.5,.85),se}),go.Shape.defineFigureGenerator("Cube2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.3*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(.7,1),se}),go.Shape.defineFigureGenerator("Cylinder1",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,te/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(0,se,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,1*z,se,(.5+le)*z,0,1*z,ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*te,1*z,te-ve*se,(.5+le)*z,1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,(.5-le)*z,1*te,0,te-ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,0,se));var pe=new go.PathFigure(z,se,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*se,1*z,2*se-ve*se,(.5+le)*z,2*se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,se,(.5-le)*z,2*se,0,2*se-ve*se)),ie.spot1=new go.Spot(0,0,0,2*se),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,te/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(0,te-se,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,0,se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,ve*se,(.5-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,se,(.5+le)*z,0,z,ve*se)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-se)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,te-ve*se,(.5+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,(.5-le)*z,te,0,te-ve*se));var pe=new go.PathFigure(0,te-se,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te-2*se,0,te-se-ve*se,(.5-le)*z,te-2*se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,te-se,(.5+le)*z,te-2*se,z,te-se-ve*se)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*se),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,z/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(se,0,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,(.5-le)*te,ve*se,0));var pe=new go.PathFigure(se,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,2*se,.5*te,se+ve*se,0,2*se,(.5-le)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,se,te,2*se,(.5+le)*te,se+ve*se,te)),ie.spot1=new go.Spot(0,0,2*se,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=5),se=Math.min(se,z/3);var ie=new go.Geometry,le=ve*.5,ce=new go.PathFigure(z-se,0,!0);ie.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,z-ve*se,0,z,(.5-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z,(.5+le)*te,z-ve*se,te)),ce.add(new go.PathSegment(go.PathSegment.Line,se,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,ve*se,te,0,(.5+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,(.5-le)*te,ve*se,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z-se,0));var pe=new go.PathFigure(z-se,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-2*se,.5*te,z-se-ve*se,0,z-2*se,(.5-le)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-se,te,z-2*se,(.5+le)*te,z-se-ve*se,te)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*se,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,.25*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(.25*z,.25*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.408,.172),se.spot2=new go.Spot(.833,.662),se}),go.Shape.defineFigureGenerator("Prism2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.25*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(0,te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*te)),se.spot1=new go.Spot(.25,.5),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("Pyramid1",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te).close());var le=new go.PathFigure(.5*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.25,.367),se.spot2=new go.Spot(.75,.875),se}),go.Shape.defineFigureGenerator("Pyramid2",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var le=new go.PathFigure(.5*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*te)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),se.spot1=new go.Spot(.25,.367),se.spot2=new go.Spot(.75,.875),se}),go.Shape.defineFigureGenerator("Actor",function(fe,z,te){var se=new go.Geometry,ie=.2,le=.1,ce=ve*ie,pe=ve*le,xe=.5,je=.1,De=new go.PathFigure(xe*z,(je+le)*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ie)*z,je*te,(xe-ce)*z,(je+le)*te,(xe-ie)*z,(je+pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-le)*te,(xe-ie)*z,(je-pe)*te,(xe-ce)*z,(je-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ie)*z,je*te,(xe+ce)*z,(je-le)*te,(xe+ie)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+le)*te,(xe+ie)*z,(je+pe)*te,(xe+ce)*z,(je+le)*te));var Fe=.05,Te=ve*Fe;xe=.05,je=.25;var Me=new go.PathFigure(.5*z,.2*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*te)),xe=.95,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe+Fe)*z,je*te,(xe+Te)*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.825,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te)),Fe=.05,Te=ve*Fe,xe=.5,je=.7,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*te)),Fe=.025,Te=ve*Fe,xe=.175,je=.35,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe+Fe)*z,(je-Te)*te,(xe+Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*z,je*te,(xe-Te)*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),Me.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),Fe=.05,Te=ve*Fe,xe=.05,je=.25,Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-Fe)*te,(xe-Fe)*z,(je-Te)*te,(xe-Te)*z,(je-Fe)*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),se.spot1=new go.Spot(.2,.2),se.spot2=new go.Spot(.8,.65),se}),go.Shape.setFigureParameter("Card",0,new Rn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(fe,z,te){var se=fe?fe.parameter1:NaN;isNaN(se)&&(se=.2);var ie=new go.Geometry,le=new go.PathFigure(z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,se*te)),le.add(new go.PathSegment(go.PathSegment.Line,se*z,0).close()),ie.spot1=new go.Spot(0,se),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te));var le=new go.PathFigure(.5*z,.5*te,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),se.spot1=new go.Spot(.25,0),se.spot2=new go.Spot(.75,.25),se}),go.Shape.defineFigureGenerator("CreateRequest",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(0,ie*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*te)),se}),go.Shape.defineFigureGenerator("Database",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(z,.1*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,(.5+ie)*z,0,z,(.1-le)*te));var pe=new go.PathFigure(z,.1*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,z,(.1+le)*te,(.5+ie)*z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-ie)*z,.2*te,0,(.1+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,z,(.2+le)*te,(.5+ie)*z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-ie)*z,.3*te,0,(.2+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*te,z,(.3+le)*te,(.5+ie)*z,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,(.5-ie)*z,.4*te,0,(.3+le)*te)),se.spot1=new go.Spot(0,.4),se.spot2=new go.Spot(1,.9),se}),go.Shape.defineFigureGenerator("DataStorage",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,z,0,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*te,.25*z,.1*te).close()),se.spot1=new go.Spot(.226,0),se.spot2=new go.Spot(.81,1),se}),go.Shape.defineFigureGenerator("DiskStorage",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.1,ce=new go.PathFigure(z,.1*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.9+le)*te,(.5+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-ie)*z,te,0,(.9+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*te,(.5-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,(.5+ie)*z,0,z,(.1-le)*te));var pe=new go.PathFigure(z,.1*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,z,(.1+le)*te,(.5+ie)*z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-ie)*z,.2*te,0,(.1+le)*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*te,z,(.2+le)*te,(.5+ie)*z,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-ie)*z,.3*te,0,(.2+le)*te)),se.spot1=new go.Spot(0,.3),se.spot2=new go.Spot(1,.9),se}),go.Shape.defineFigureGenerator("Display",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,te,z,0,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close()),se.spot1=new go.Spot(.25,0),se.spot2=new go.Spot(.75,1),se}),go.Shape.defineFigureGenerator("DividedEvent",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=ve*.2,ce=new go.PathFigure(0,.2*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*te,(.2-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*te,(.8+le)*z,0,z,(.2-le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,te,z,(.8+le)*te,(.8+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-le)*z,te,0,(.8+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.2*te));var pe=new go.PathFigure(0,ie*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),se}),go.Shape.defineFigureGenerator("DividedProcess",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(0,ie*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,ie*te)),se}),go.Shape.defineFigureGenerator("Document",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(1,.6),se}),go.Shape.defineFigureGenerator("ExternalOrganization",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,0,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Move,z,ie*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*te)),se}),go.Shape.defineFigureGenerator("ExternalProcess",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var le=new go.PathFigure(.1*z,.4*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*te)),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("File",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(.75*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Interrupt",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te));var le=new go.PathFigure(z,.5*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,te));var ce=new go.PathFigure(z,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("InternalStorage",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ce=new go.PathFigure(0,0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(ie*z,0,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),pe.add(new go.PathSegment(go.PathSegment.Move,0,le*te)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*te)),se}),go.Shape.defineFigureGenerator("Junction",function(fe,z,te){var se=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ce=ve*.5,pe=.5,xe=new go.PathFigure(z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,te,z,(pe+ce)*te,(pe+ce)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-ce)*z,te,0,(pe+ce)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-ce)*te,(pe-ce)*z,0)),xe.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*te,(pe+ce)*z,0,z,(pe-ce)*te));var je=new go.PathFigure((le+ie)*z,(le+ie)*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*te)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*te)),se}),go.Shape.defineFigureGenerator("LinedDocument",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close());var le=new go.PathFigure(.1*z,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*te)),se.spot1=new go.Spot(.1,0),se.spot2=new go.Spot(1,.6),se}),go.Shape.defineFigureGenerator("LoopLimit",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("MagneticTape",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(.5*z,te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*te,z,(le+ie)*te,(le+ie)*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.8),se}),go.Shape.defineFigureGenerator("ManualInput",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te).close()),se.spot1=new go.Spot(0,.25),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("MessageFromUser",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se}),go.Shape.defineFigureGenerator("MicroformProcessing",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("MicroformRecording",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(1,.75),se}),go.Shape.defineFigureGenerator("MultiDocument",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*te,.96*z,.47*te,.93*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*te,.86*z,.57*te,.83*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.4*z,.4*te,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.8,.77),se}),go.Shape.defineFigureGenerator("MultiProcess",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,.1*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te).close());var le=new go.PathFigure(.2*z,.1*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*te)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*te)),se.spot1=new go.Spot(0,.2),se.spot2=new go.Spot(.8,1),se}),go.Shape.defineFigureGenerator("OfflineStorage",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ce=new go.PathFigure(0,0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close());var pe=new go.PathFigure(.5*ie*z,ie*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*te)),se}),go.Shape.defineFigureGenerator("OffPageConnector",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(.75,1),se}),go.Shape.defineFigureGenerator("Or",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(z,le*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te));var pe=new go.PathFigure(z,.5*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),se}),go.Shape.defineFigureGenerator("PaperTape",function(fe,z,te){var se=new go.Geometry;te=te/.8;var ie=new go.PathFigure(0,.7*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*te,.5*z,.6*te,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*z,.4*te,.5*z,te).close()),se.spot1=new go.Spot(0,.49),se.spot2=new go.Spot(1,.75),se}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ce=new go.PathFigure(0,0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ce=new go.PathFigure(0,0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("Procedure",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure((1-ie)*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),se}),go.Shape.defineFigureGenerator("Process",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Sort",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var le=new go.PathFigure(0,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.5),se}),go.Shape.defineFigureGenerator("Start",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*te,.25*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*te,.25*z,.5*te));var ce=new go.PathFigure(ie*z,0,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,ie*z,te)),ce.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,te)),se.spot1=new go.Spot(ie,0),se.spot2=new go.Spot(1-ie,1),se}),go.Shape.defineFigureGenerator("Terminator",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*te,.25*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*te,.25*z,.5*te)),se.spot1=new go.Spot(.23,0),se.spot2=new go.Spot(.77,1),se}),go.Shape.defineFigureGenerator("TransmittalTape",function(fe,z,te){var se=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*te).close()),se.spot1=go.Spot.TopLeft,se}),go.Shape.defineFigureGenerator("AndGate",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=new go.PathFigure(0,0,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(.5+ie)*z,0,z,(.5-ie)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,(.5+ie)*te,(.5+ie)*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(.55,1),se}),go.Shape.defineFigureGenerator("Buffer",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("Clock",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=new go.PathFigure(z,le*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,te,z,(le+ie)*te,(le+ie)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,le*te,(le-ie)*z,te,0,(le+ie)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*te,(le-ie)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,le*te,(le+ie)*z,0,z,(le-ie)*te));var pe=new go.PathFigure(z,le*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*te));var xe=new go.PathFigure(.8*z,.75*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*te)),se}),go.Shape.defineFigureGenerator("Ground",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,te)),se}),go.Shape.defineFigureGenerator("Inverter",function(fe,z,te){var se=new go.Geometry,ie=ve*.1,le=.1,ce=.9,pe=.5,xe=new go.PathFigure(.8*z,.5*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,0,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te));var je=new go.PathFigure((ce+le)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.4,.75),se}),go.Shape.defineFigureGenerator("NandGate",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=ve*.4,ce=ve*.1,pe=.1,xe=.9,je=.5,De=new go.PathFigure(.8*z,.5*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,.8*z,(.5+le)*te,(.4+ie)*z,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,te)),De.add(new go.PathSegment(go.PathSegment.Line,0,0)),De.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),De.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(.4+ie)*z,0,.8*z,(.5-le)*te));var Fe=new go.PathFigure((xe+pe)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z,je*te,(xe-ce)*z,(je+pe)*te,(xe-pe)*z,(je+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z,je*te,(xe+ce)*z,(je-pe)*te,(xe+pe)*z,(je-ce)*te)),se.spot1=new go.Spot(0,.05),se.spot2=new go.Spot(.55,.95),se}),go.Shape.defineFigureGenerator("NorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=0,pe=.5,xe=new go.PathFigure(.8*z,.5*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.7*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*te,.25*z,.25*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(ce+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,ce=.9,pe=.5;var je=new go.PathFigure((ce-ie)*z,pe*te,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),se.spot1=new go.Spot(.2,.25),se.spot2=new go.Spot(.6,.75),se}),go.Shape.defineFigureGenerator("OrGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=0,pe=.5,xe=new go.PathFigure(0,0,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(ce+le+le)*z,(pe-ie)*te,.8*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.8*z,(pe+le)*te,(ce+le+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*te,.25*z,.25*te).close()),se.spot1=new go.Spot(.2,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("XnorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.8*z,.5*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.7*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*te,(ce+le)*z,(pe-ie)*te,.7*z,(pe-le)*te)),ie=.1,le=ve*.1,ce=.9,pe=.5;var De=new go.PathFigure((ce-ie)*z,pe*te,!0);return se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),se.spot1=new go.Spot(.4,.25),se.spot2=new go.Spot(.65,.75),se}),go.Shape.defineFigureGenerator("XorGate",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*ie,ce=.2,pe=.5,xe=new go.PathFigure(.1*z,0,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,te,.35*z,.25*te,.35*z,.75*te));var je=new go.PathFigure(.2*z,0,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,(ce+le)*z,(pe-ie)*te,.9*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,te,.9*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*te,.45*z,.25*te).close()),se.spot1=new go.Spot(.4,.25),se.spot2=new go.Spot(.8,.75),se}),go.Shape.defineFigureGenerator("Capacitor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("Resistor",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*te)),se}),go.Shape.defineFigureGenerator("Inductor",function(fe,z,te){var se=new go.Geometry,ie=ve*.1,le=.1,ce=.1,pe=.5,xe=new go.PathFigure((ce-ie*.5)*z,te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.3,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.5,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.7,xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,te,(ce+le)*z,0,(ce+ie)*z,te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,0,(ce-ie)*z,te,(ce-le)*z,0)),ce=.9,xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie*.5)*z,te,(ce+le)*z,0,(ce+ie)*z,te)),se}),go.Shape.defineFigureGenerator("ACvoltageSource",function(fe,z,te){var se=new go.Geometry,ie=ve*.5,le=.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-le)*z,pe*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe-le)*te,(ce+le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,(ce-le+.1)*z,pe*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le-.1)*z,pe*te,ce*z,(pe-le)*te,ce*z,(pe+le)*te)),se}),go.Shape.defineFigureGenerator("DCvoltageSource",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.75*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("Diode",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se.spot1=new go.Spot(0,.25),se.spot2=new go.Spot(.5,.75),se}),go.Shape.defineFigureGenerator("Wifi",function(fe,z,te){var se=new go.Geometry,ie=z,le=te;z=z*.38,te=te*.6;var ce=ve*.8,pe=.8,xe=0,je=.5,De=(ie-z)/2,Fe=(le-te)/2,Te=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je-ce)*te+Fe)),Te.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je+ce)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),ce=ve*.4,pe=.4,xe=.2,je=.5;var Me=new go.PathFigure(xe*z+De,(je+pe)*te+Fe,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe+ce*.5)*z+De,je*te+Fe,xe*z+De,(je-pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je-ce)*te+Fe)),Me.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe-pe+ce*.5)*z+De,(je+ce)*te+Fe,xe*z+De,(je+pe)*te+Fe).close()),ce=ve*.2,pe=.2,xe=.5,je=.5;var Be=new go.PathFigure((xe-pe)*z+De,je*te+Fe,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe-pe)*z+De,(je-ce)*te+Fe,(xe-ce)*z+De,(je-pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe-pe)*z+De,je*te+Fe,(xe-ce)*z+De,(je+pe)*te+Fe,(xe-pe)*z+De,(je+ce)*te+Fe)),ce=ve*.4,pe=.4,xe=.8,je=.5;var Ge=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je+ce)*te+Fe)),Ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je-ce)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),ce=ve*.8,pe=.8,xe=1,je=.5;var Ye=new go.PathFigure(xe*z+De,(je-pe)*te+Fe,!0);return se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe)*z+De,je*te+Fe,(xe+ce)*z+De,(je-pe)*te+Fe,(xe+pe)*z+De,(je-ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je+pe)*te+Fe,(xe+pe)*z+De,(je+ce)*te+Fe,(xe+ce)*z+De,(je+pe)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(xe+pe-ce*.5)*z+De,je*te+Fe,xe*z+De,(je+pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je+ce)*te+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,xe*z+De,(je-pe)*te+Fe,(xe+pe-ce*.5)*z+De,(je-ce)*te+Fe,xe*z+De,(je-pe)*te+Fe).close()),se}),go.Shape.defineFigureGenerator("Email",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Move,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*te)),se}),go.Shape.defineFigureGenerator("Ethernet",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,te,!0,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,te).close());var ce=new go.PathFigure(.6*z,te,!0,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.6*z,te).close());var pe=new go.PathFigure(0,.5*te,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*te)),se}),go.Shape.defineFigureGenerator("Power",function(fe,z,te){var se=new go.Geometry,ie=ve*.4,le=.4,ce=.5,pe=.5,xe=st(),je=st(),De=st(),Fe=st();Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,je,De,Fe);var Te=pt(je.x,je.y),Me=new go.PathFigure(je.x*z,je.y*te,!0);se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,(ce-ie)*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te)),Ue(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,De.x*z,De.y*te,Fe.x*z,Fe.y*te)),ie=ve*.3,le=.3,Ue(ce-le,pe,ce-le,pe-ie,ce-ie,pe-le,ce,pe-le,.5,De,Fe,je,xe,xe),Me.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce-le)*z,pe*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+le)*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ce+le)*z,pe*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),Ue(ce,pe-le,ce+ie,pe-le,ce+le,pe-ie,ce+le,pe,.5,xe,xe,je,De,Fe),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*te,Fe.x*z,Fe.y*te,De.x*z,De.y*te).close());var Me=new go.PathFigure(.45*z,0,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*te)),Me.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Ut(xe),Ut(je),Ut(De),Ut(Fe),Ut(Te),se.spot1=new go.Spot(.25,.45),se.spot2=new go.Spot(.75,.8),se}),go.Shape.defineFigureGenerator("Fallout",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te/2,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,te/2,z/2,te/2));function le(ce,pe,xe){ce.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+xe)*te)),ce.add(new go.PathSegment(go.PathSegment.Line,(.3+pe)*z,(.8+xe)*te).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),se}),go.Shape.defineFigureGenerator("IrritationHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close()),se.spot1=new go.Spot(.3,.3),se.spot2=new go.Spot(.7,.7),se}),go.Shape.defineFigureGenerator("ElectricalHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*te).close()),se}),go.Shape.defineFigureGenerator("FireHazard",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*te,.45*z,.44*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*te,.48*z,.17*te,.54*z,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*te,.59*z,.29*te,.58*z,.28*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*te,.8*z,.34*te,.88*z,.43*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*te,.87*z,.48*te,.88*z,.43*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,te,1.17*z,.76*te,.82*z,.8*te).close()),se.spot1=new go.Spot(.07,.445),se.spot2=new go.Spot(.884,.958),se}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(fe,z,te){var se=new go.Geometry,ie=.5,le=0,ce=0,pe=ie*ve,xe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,De=1,Fe=.5,Te=.5,Me=0,Be=new go.PathFigure(xe*z,(1-je)*te,!1);return se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,De*z,Fe*te,De*z,.7*te,De*z,Fe*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+le)*z,(Me+le)*te,(.5+ie+le)*z,(.5-pe+le)*te,(.5+pe+le)*z,(.5-ie+le)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ce)*te,(.5-pe+le)*z,(.5-ie+ce)*te,(.5-ie+le)*z,(.5-pe+ce)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*te,(.5-ie+le)*z,(.5+pe+ce)*te,(.5-pe+le)*z,.9*te)),Be.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*te)),Be.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*te)),Be.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*te)),se}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),se}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(z,te,!1);se.add(le);var ce=new go.PathFigure(0,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.2*z,.35*te,.3*z,.35*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.7*z,.65*te,.8*z,.65*te)),se}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te).close()),se}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.2*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te).close());var ie=new go.PathFigure(0,.2*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),se}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.7*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*te,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,te,.4*z,.5*te,z,.5*te).close());var le=new go.PathFigure(.45*z,.73*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*te)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*te)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*te)),se}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*te,(1-.12)*z,.46*te,(1-.02)*z,.54*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*te,.02*z,.54*te,.12*z,.46*te)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*te));var ce=.5-.285,pe=.5,xe=ce,je=Math.PI/4,De=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=De*.5,Te=ce,Me=ce,Be=De*Te,Ge=De*Me;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Te)*z,xe*te,(pe-(Be+Te)/2)*z,(xe+(Me+Ge)/2)*te,(pe-Te)*z,(xe+Ge)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(xe-Me)*te,(pe-Te)*z,(xe-Ge)*te,(pe-Be)*z,(xe-Me)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Te)*z,xe*te,(pe+Be)*z,(xe-Me)*te,(pe+Te)*z,(xe-Ge)*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*te,(pe+Te)*z,(xe+Ge)*te,(pe+(Be+Te)/2)*z,(xe+(Me+Ge)/2)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*te)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*te)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*te));var Ye=new go.PathFigure(.2*z,te,!1);se.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*te));var Ke=new go.PathFigure(.8*z,te,!1);return se.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*te)),se}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,te).close());var le=new go.PathFigure(.2*z,.2*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*te)),se}),go.Shape.defineFigureGenerator("BpmnEventError",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie);var le=new go.PathFigure(z,te,!1);se.add(le);var ce=new go.PathFigure(.1*z,te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te).close()),se}),go.Shape.defineFigureGenerator("Caution",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.05*z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*te,0,te,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*te,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,te,z,te,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,te));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*te,le*z,le*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*te,.575*z,.725*te,.625*z,.375*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*te,.375*z,.375*te,.425*z,.725*te)),se}),go.Shape.defineFigureGenerator("Recycle",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.45*z,.95*te,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*te,.17*z,.95*te,.15*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*te,0,.675*te,0,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*te));var le=new go.PathFigure(.475*z,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*te)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*te,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*te)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*te)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*te)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*te,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*te));var ce=new go.PathFigure(.675*z,.575*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*te,z,.8*te,z,.85*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Line,z,.775*te)),ce.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*te)),se}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=new go.PathFigure(z,ie*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,te,z,(ie+le)*te,(ie+le)*z,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*te,(ie-le)*z,te,0,(ie+le)*te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*te,(ie-le)*z,0)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*te,(ie+le)*z,0,z,(ie-le)*te));var pe=new go.PathFigure(ie*z,0,!1);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,te)),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*te)),pe.add(new go.PathSegment(go.PathSegment.Move,0,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Move,z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*te)),se}),go.Shape.defineFigureGenerator("Package",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.15*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var le=new go.PathFigure(0,.15*te,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*te).close()),se.spot1=new go.Spot(0,.1),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Class",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*te).close());var ce=new go.PathFigure(0,.5*te,!1);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,.5*te).close()),se}),go.Shape.defineFigureGenerator("Component",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close());var le=new go.PathFigure(0,.2*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*te)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close());var ce=new go.PathFigure(0,.6*te,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,0,.6*te).close()),se}),go.Shape.defineFigureGenerator("Boat Shipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.15*z,.6*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*te));var le=new go.PathFigure(.15*z,.6*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*te)),se}),go.Shape.defineFigureGenerator("Customer/Supplier",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se}),go.Shape.defineFigureGenerator("Workcell",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se}),go.Shape.defineFigureGenerator("Supermarket",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),se}),go.Shape.defineFigureGenerator("TruckShipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*te).close());var ce=.1,pe=ve*.1,xe=.2,je=.9,De=new go.PathFigure((xe-ce)*z,je*te,!0);se.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,je*te,(xe+pe)*z,(je-ce)*te,(xe+ce)*z,(je-pe)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,je*te,(xe-pe)*z,(je+ce)*te,(xe-ce)*z,(je+pe)*te).close()),ce=.1,pe=ve*.1,xe=.8,je=.9;var Fe=new go.PathFigure((xe-ce)*z,je*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je-ce)*te,(xe-ce)*z,(je-pe)*te,(xe-pe)*z,(je-ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ce)*z,je*te,(xe+pe)*z,(je-ce)*te,(xe+ce)*z,(je-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*z,(je+ce)*te,(xe+ce)*z,(je+pe)*te,(xe+pe)*z,(je+ce)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ce)*z,je*te,(xe-pe)*z,(je+ce)*te,(xe-ce)*z,(je+pe)*te).close()),se}),go.Shape.defineFigureGenerator("KanbanPost",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,te)),se}),go.Shape.defineFigureGenerator("Forklift",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ce=new go.PathFigure(.5*z,.8*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*te));var pe=new go.PathFigure(.5*z,.7*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*te));var xe=.1,je=ve*.1,De=.1,Fe=.9,Te=new go.PathFigure((De-xe)*z,Fe*te,!0);se.add(Te),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Te.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),xe=.1,je=ve*.1,De=.4,Fe=.9;var Me=new go.PathFigure((De-xe)*z,Fe*te,!0);return se.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-xe)*te,(De-xe)*z,(Fe-je)*te,(De-je)*z,(Fe-xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*z,Fe*te,(De+je)*z,(Fe-xe)*te,(De+xe)*z,(Fe-je)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+xe)*te,(De+xe)*z,(Fe+je)*te,(De+je)*z,(Fe+xe)*te)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*z,Fe*te,(De-je)*z,(Fe+xe)*te,(De-xe)*z,(Fe+je)*te)),se}),go.Shape.defineFigureGenerator("RailShipment",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.1*z,.4*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*te).close());var le=new go.PathFigure(.45*z,.7*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*te));var ce=new go.PathFigure(.55*z,.4*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*te).close());var De=.05,Fe=ve*.05,Te=.175,Me=.95,pe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.375,Me=.95,xe=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.625,Me=.95,je=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te));var De=.05,Fe=ve*.05,Te=.825,Me=.95,Be=new go.PathFigure((Te-De)*z,Me*te,!0);se.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me-De)*te,(Te-De)*z,(Me-Fe)*te,(Te-Fe)*z,(Me-De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te+De)*z,Me*te,(Te+Fe)*z,(Me-De)*te,(Te+De)*z,(Me-Fe)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Te*z,(Me+De)*te,(Te+De)*z,(Me+Fe)*te,(Te+Fe)*z,(Me+De)*te)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Te-De)*z,Me*te,(Te-Fe)*z,(Me+De)*te,(Te-De)*z,(Me+Fe)*te).close());var Ge=new go.PathFigure(0,te,!1);return se.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Line,z,te).close()),se}),go.Shape.defineFigureGenerator("Warehouse",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*te).close());var ce=new go.PathFigure(.15*z,te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.4*z,te)),ce.add(new go.PathSegment(go.PathSegment.Line,.15*z,te).close());var pe=.05,xe=ve*.05,je=.35,De=.775,Fe=new go.PathFigure((je-pe)*z,De*te,!0);return se.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De-pe)*te,(je-pe)*z,(De-xe)*te,(je-xe)*z,(De-pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+pe)*z,De*te,(je+xe)*z,(De-pe)*te,(je+pe)*z,(De-xe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(De+pe)*te,(je+pe)*z,(De+xe)*te,(je+xe)*z,(De+pe)*te)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-pe)*z,De*te,(je-xe)*z,(De+pe)*te,(je-pe)*z,(De+xe)*te).close()),se}),go.Shape.defineFigureGenerator("ControlCenter",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te).close()),se}),go.Shape.defineFigureGenerator("Bluetooth",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.75*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*te)),se}),go.Shape.defineFigureGenerator("Globe",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*te,.75*z,0,z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,z,.75*te,.75*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.25*z,te,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*te,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,te,.15*z,.25*te,.15*z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*te,.85*z,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*te,.35*z,.3*te,.65*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*te,.35*z,.7*te,.65*z,.7*te)),se}),go.Shape.defineFigureGenerator("Wave",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.25*te,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*te,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*te,.425*z,.5*te,.575*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*te,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*te,.1*z,.5*te,.2*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*te,.425*z,te,.575*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*te,.8*z,.5*te,.9*z,.5*te)),se}),go.Shape.defineFigureGenerator("Operator",function(fe,z,te){var se=new go.Geometry,ie=.3,le=ve*.3,ce=.5,pe=.7,xe=new go.PathFigure((ce-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te));var je=new go.PathFigure(0,.7*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*te,0,0,z,0)),se}),go.Shape.defineFigureGenerator("TripleFanBlades",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.65*z,.3*te,.65*z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*te,.35*z,.3*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.3*z,.6*te,.1*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.2*z,te,.35*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,te,.7*z,.6*te,.9*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*te,.8*z,te,.65*z,.95*te)),se}),go.Shape.defineFigureGenerator("CentrifugalPump",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z,0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,0,.075*te,0,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,te,0,te,.4*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*te,.8*z,te,.85*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),se}),go.Shape.defineFigureGenerator("Battery",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*te));var le=new go.PathFigure(0,.6*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*te)),se}),go.Shape.defineFigureGenerator("Delete",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-ie)*z,pe*te,!0);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te));var je=new go.PathFigure(.15*z,.5*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*te)),se}),go.Shape.defineFigureGenerator("Flag",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.1*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*te,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*te,.65*z,.2*te,.85*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*te,.85*z,.6*te,.65*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.35*z,.4*te,.15*z,.4*te).close()),se}),go.Shape.defineFigureGenerator("Help",function(fe,z,te){var se=new go.Geometry,ie=.5,le=ve*.5,ce=.5,pe=.5,xe=new go.PathFigure((ce-ie)*z,pe*te,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te).close()),ie=.05,le=ve*.05,ce=.5,pe=.8;var je=new go.PathFigure((ce-ie)*z,pe*te,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe-ie)*te,(ce-ie)*z,(pe-le)*te,(ce-le)*z,(pe-ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce+ie)*z,pe*te,(ce+le)*z,(pe-ie)*te,(ce+ie)*z,(pe-le)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,ce*z,(pe+ie)*te,(ce+ie)*z,(pe+le)*te,(ce+le)*z,(pe+ie)*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ce-ie)*z,pe*te,(ce-le)*z,(pe+ie)*te,(ce-ie)*z,(pe+le)*te).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*te)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*te,.75*z,.475*te,.75*z,.225*te)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*te,.4*z,.2*te,.3*z,.25*te)),se}),go.Shape.defineFigureGenerator("Location",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.5*z,te,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*te,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*te,.5*z,0,.025*z,.025*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Lock",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*te)),se}),go.Shape.defineFigureGenerator("Unlocked",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var le=new go.PathFigure(.2*z,.5*te,!1);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*te)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*te)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*te,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*te)),se}),go.Shape.defineFigureGenerator("Gear",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*te,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*te,.79840625*z,.39915625*te,.7834375*z,.3635*te)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*te)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*te,.64228125*z,.2188125*te,.603875*z,.2021875*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*te,.39759375*z,.20190625*te,.36053125*z,.2176875*te)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*te)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*te,.21765625*z,.36059375*te,.201875*z,.397625*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*te)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*te,.20221875*z,.603875*te,.21884375*z,.64228125*te)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*te,.36353125*z,.78340625*te,.3991875*z,.79840625*te)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*te,.602375*z,.79809375*te,.63946875*z,.78234375*te)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*te,.78234375*z,.63940625*te,.798125*z,.602375*te)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*te)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*te,.1*z,.1*te).close()))}),go.Shape.defineFigureGenerator("Hand",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.5*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*te,0,.375*te,.05*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*te,.3*z,.225*te,.4*z,.175*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*te,.46*z,.05*te,.525*z,.05*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*te,.525*z,.275*te,.475*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*te,z,.4*te,z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*te,.675*z,.55*te,.675*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*te,.65*z,.7*te,.65*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,te,.61*z,.85*te,.61*z,te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,.435*z,te,0,te).close()),se}),go.Shape.defineFigureGenerator("Map",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,.2*te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*te)),se}),go.Shape.defineFigureGenerator("Eject",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,te)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.7).close());var le=new go.PathFigure(0,te*.6,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*te)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),se}),go.Shape.defineFigureGenerator("Pencil",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*te)).add(new go.PathSegment(go.PathSegment.Line,z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,te)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*te).close()))}),go.Shape.defineFigureGenerator("Building",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*1,te*1,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,te*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,te*.85).close());var le=new go.PathFigure(.126*z,.85*te,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*te)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*te).close());var ce=new go.PathFigure(.402*z,.85*te,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*te)),ce.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*te).close());var pe=new go.PathFigure(.678*z,.85*te,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*te).close());var xe=new go.PathFigure(.5*z,.1*te,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*te)),xe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*te).close()),se}),go.Shape.defineFigureGenerator("Staircase",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te*1,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*.95).close()),se}),go.Shape.defineFigureGenerator("5Bars",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,te*1,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,te*(1-.184)).close());var le=new go.PathFigure(z*.204,te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,te*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,te*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,te*1).close());var ce=new go.PathFigure(z*.408,te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.408,te*(1-.184*2))),ce.add(new go.PathSegment(go.PathSegment.Line,z*.592,te*(1-.184*3))),ce.add(new go.PathSegment(go.PathSegment.Line,z*.592,te*1).close());var pe=new go.PathFigure(z*.612,te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.612,te*(1-.184*3))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,te*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,te*1).close());var xe=new go.PathFigure(z*.816,te,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.816,te*(1-.184*4))),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-.184*5))),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1).close()),se}),go.Shape.defineFigureGenerator("PC",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*te,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.1).close());var ce=new go.PathFigure(z*.055,.13*te,!0);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.13)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.16)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.16).close());var pe=new go.PathFigure(z*.055,.18*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.18)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,te*.21)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.055,te*.21).close());var xe=new go.PathFigure(z*1,0,!0);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.65)),xe.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.65).close()),se}),go.Shape.defineFigureGenerator("Plane",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(.55*z,te,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*te,0,.4*te,.225*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*te)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*te,.975*z,0,z,.08*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*te)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,te).close()),se}),go.Shape.defineFigureGenerator("Key",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*1,te*.5,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*te)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*te)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*te).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*te)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*te,.075*z,.075*te).close()),se}),go.Shape.defineFigureGenerator("FilmTape",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(0,0,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),te*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1));var le=new go.PathFigure(0,0,!1);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,te*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1));var ce=new go.PathFigure(z*.11,te*.1,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.1)),ce.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),te*.8)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.11,te*.8).close());var pe=new go.PathFigure(z*(.11+.24133333*1+.028*1),te*.1,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),te*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),te*.8)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),te*.8).close());var xe=new go.PathFigure(z*(.11+.24133333*2+.028*2),te*.1,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),te*.1)),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),te*.8)),xe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),te*.8).close()),se}),go.Shape.defineFigureGenerator("FloppyDisk",function(fe,z,te){var se=new go.Geometry,ie=8,le=ie*ve,ce=new go.PathFigure(ie,0,!1);se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.14)),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),ce.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*0).close());var xe=new go.PathFigure(z*.83,te*1,!1);se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,z*.83,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,z*.17,te*1).close());var je=new go.PathFigure(z*.78,te*.05,!1);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,te*.25).close()),se}),go.Shape.defineFigureGenerator("SpeechBubble",function(fe,z,te){var se=fe?fe.parameter1:NaN;(isNaN(se)||se<0)&&(se=15),se=Math.min(se,z/3),se=Math.min(se,te/3);var ie=se*ve,le=te*.8,ce=new go.Geometry,pe=new go.PathFigure(se,0,!0);return ce.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z-se,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,se,z-ie,0,z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le-se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-se,le,z,le-ie,z-ie,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,te)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),pe.add(new go.PathSegment(go.PathSegment.Line,se,le)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,le-se,ie,le,0,le-ie)),pe.add(new go.PathSegment(go.PathSegment.Line,0,se)),pe.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ie,ie,0).close()),ie>1?(ce.spot1=new go.Spot(0,0,ie,ie),ce.spot2=new go.Spot(1,.8,-ie,-ie)):(ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.8)),ce}),go.Shape.defineFigureGenerator("Repeat",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*.45,!0);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,te*.45).close());var le=new go.PathFigure(z*1,te*.55,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*.55).close()),se}),go.Shape.defineFigureGenerator("Windows",function(fe,z,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*te)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*te).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*te)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*te).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*te).close()))}),go.Shape.defineFigureGenerator("Terminal",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*.1,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*.9).close());var le=new go.PathFigure(z*.1,te*.2,!0);se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,te*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,te*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,te*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,te*.25).close());var ce=new go.PathFigure(z*.28,te*.37,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.37)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.41)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.28,te*.41).close()),se}),go.Shape.defineFigureGenerator("Beaker",function(fe,z,te){var se=new go.Geometry,ie=15,le=ie*ve,ce=new go.PathFigure(z*.62,te*.475,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z,te-ie)),ce.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,te,z,te-le,z-le,te)),ce.add(new go.PathSegment(go.PathSegment.Line,ie,te)),ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ie,le,te,0,te-le)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.475)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.38,te*.03)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*0)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.62,te*.03).close()),le>1?(se.spot1=new go.Spot(0,0,le,le),se.spot2=new go.Spot(1,1,-le,-le)):(se.spot1=go.Spot.TopLeft,se.spot2=go.Spot.BottomRight),se}),go.Shape.defineFigureGenerator("Download",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close());var ce=new go.PathFigure(z*.4,te*0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.66)),ce.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.44)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*0).close()),se}),go.Shape.defineFigureGenerator("Bin",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close()),se}),go.Shape.defineFigureGenerator("Upload",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*0,te*1,!0);se.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,te*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*(1-le)).close());var ce=new go.PathFigure(z*.5,te*0,!0);return se.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,z*.26,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.4,te*.63)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.63)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.6,te*.25)),ce.add(new go.PathSegment(go.PathSegment.Line,z*.74,te*.25).close()),se}),go.Shape.defineFigureGenerator("EmptyDrink",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.15,te*0,!1);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1).close()),se}),go.Shape.defineFigureGenerator("Drink",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.15,te*0,!1);se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,te*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,te*1).close());var le=new go.PathFigure(z*.235,te*.28,!0);return se.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,te*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,te*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,te*.97).close()),se}),go.Shape.defineFigureGenerator("4Arrows",function(fe,z,te){var se=new go.Geometry,ie=new go.PathFigure(z*.5,te*0,!0);return se.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,te*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,te*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,te*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,te*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,te*.25).close()),se}),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 Rn={},An="5.0",pt={},st=null,Ut=!1,oe=!1,Ue=null,_e=!1,de=null,ve=null,Ee=0;Ee<arguments.length;Ee++){var ke=arguments[Ee];if(ke!==null)switch(typeof ke){case"number":An=ke.toFixed(1);break;case"string":ke.match(new RegExp("^[0-9]\\.[0-9]+$"))?An=ke:Ue=ke;break;case"object":typeof ke.is3D!="undefined"?st=ke:pt=ke;break;case"boolean":Ut=ke,oe=!0;break}}st===null&&(st={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},pt.material_id!==void 0&&!oe&&(Ut=!0)),Ue!==null&&pt.id===void 0&&(pt.id=Ue);var Se="",Ae="",me=!1,Pe=null,fe=null,z=null,te=!1,se=null,ie=null,le=null,ce=null,pe=null;pt.height!==void 0&&(pt.height=Math.round(pt.height)),pt.width!==void 0&&(pt.width=Math.round(pt.width));var xe=function(ct){return parseFloat(ct)>4?parseFloat(ct):5};Rn.setHTML5Codebase=function(ct,xt){ve=ct,wt(ct,xt)},Rn.setJavaCodebase=Rn.setJavaCodebaseVersion=Rn.isCompiledInstalled=Rn.setPreCompiledScriptPath=Rn.setPreCompiledResourcePath=function(){},Rn.setHTML5CodebaseVersion=function(ct,xt){var dt=parseFloat(ct);if(dt!==NaN&&dt<5){console.log("The GeoGebra HTML5 codebase version "+dt+" is deprecated. Using version latest instead.");return}de=ct,rt(ct,xt)},Rn.getHTML5CodebaseVersion=function(){return fe},Rn.getParameters=function(){return pt},Rn.setFontsCSSURL=function(ct){ce=ct},Rn.setGiacJSURL=function(ct){},Rn.setJNLPFile=function(ct){Se=ct},Rn.setJNLPBaseDir=function(ct){},Rn.inject=function(){function ct(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var xt="auto",dt=pt.id,Mt,yt=!1,Ft=0;Ft<arguments.length;Ft++){var mt=arguments[Ft];typeof mt=="string"?(mt=mt.toLowerCase(),mt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?xt=mt:dt=arguments[Ft]):typeof mt=="boolean"?yt=mt:mt instanceof HTMLElement&&(Mt=mt)}vt();function vt(){if(!_e){setTimeout(vt,200);return}xt=St(xt);var tt=Mt||document.getElementById(dt);if(!tt){console.log("possibly bug on ajax loading? ");return}if(Rn.removeExistingApplet(tt,!1),pt.width===void 0&&tt.clientWidth&&(pt.width=tt.clientWidth),pt.height===void 0&&tt.clientHeight&&(pt.height=tt.clientHeight),!(pt.width&&pt.height)&&xt==="html5"&&(delete pt.width,delete pt.height),Pe=xt,xt==="screenshot")Ke(tt,pt);else{var He=!1;pt.hasOwnProperty("playButton")&&pt.playButton||pt.hasOwnProperty("clickToLoad")&&pt.clickToLoad?He=!0:pt.hasOwnProperty("playButtonAutoDecide")&&pt.playButtonAutoDecide&&(He=(!je()||ct())&&De()),He?(Pe="screenshot",ot(tt,pt,yt,xt)):Ye(tt,pt,yt)}}};function je(){try{return window.self!==window.top}catch(ct){return!0}}function De(){return pt.hasOwnProperty("screenshotGenerator")&&pt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Rn.getViews=function(){return st},Rn.isJavaInstalled=function(){return!1};var Fe=function(ct){var xt=function(Ft){var mt=JSON.parse(Ft),vt=function(we){return we.type=="G"||we.type=="E"},tt=mt.elements?mt.elements.filter(vt)[0]:mt;if(!tt||!tt.url){dt();return}pt.fileName=tt.url,Te(tt.settings||{}),st.is3D=!0;var He="https://www.geogebra.org/images/";Rn.setPreviewImage(se||tt.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),ct()},dt=function(){pt.onError&&pt.onError(),Ct("Error: Fetching material (id "+pt.material_id+") failed.",pt)},Mt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",yt="/materials/"+pt.material_id+"?scope=basic";Me("https://"+Mt+"/api/proxy.php?path="+encodeURIComponent(yt),xt,dt)};function Te(ct){var xt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(dt){ct[dt]=!!ct[dt]}),xt.forEach(function(dt){pt[dt]===void 0&&ct[dt]!==void 0&&(pt[dt]=ct[dt])}),pt.showToolBarHelp===void 0&&(pt.showToolBarHelp=pt.showToolBar)}function Me(ct,xt,dt){var Mt=new XMLHttpRequest;Mt.open("GET",ct),Mt.onload=function(){xt(Mt.responseText)},Mt.onerror=dt,Mt.send()}Rn.isHTML5Installed=function(){return!0},Rn.getLoadedAppletType=function(){return Pe},Rn.setPreviewImage=function(ct,xt,dt){se=ct,ie=xt,le=dt},Rn.removeExistingApplet=function(ct,xt){var dt;typeof ct=="string"&&(ct=document.getElementById(ct)),Pe=null;var Mt=null;for(dt=0;dt<ct.childNodes.length;dt++){var yt=ct.childNodes[dt],Ft=yt.className;Ft==="applet_screenshot"?xt?(yt.style.display="block",Pe="screenshot"):yt.style.display="none":Ft!=="applet_scaler prerender"&&(ct.removeChild(yt),Mt=Ft&&Ft.indexOf("appletParameters")!=-1?yt.id:null,dt--)}var mt=pt.id!==void 0?pt.id:Mt,vt=window[mt];vt&&typeof vt.getBase64=="function"&&(vt.remove(),window[mt]=null)},Rn.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ct=Rn.getAppletObject();return ct&&typeof ct.recalculateEnvironments=="function"?(ct.recalculateEnvironments(),!0):!1},Rn.startAnimation=function(){var ct=Rn.getAppletObject();return ct&&typeof ct.startAnimation=="function"?(ct.startAnimation(),!0):!1},Rn.stopAnimation=function(){var ct=Rn.getAppletObject();return ct&&typeof ct.stopAnimation=="function"?(ct.stopAnimation(),!0):!1},Rn.getAppletObject=function(){var ct=pt.id!==void 0?pt.id:"ggbApplet";return window[ct]},Rn.resize=function(){};var Be=function(ct,xt,dt){var Mt=document.createElement("param");Mt.setAttribute("name",xt),Mt.setAttribute("value",dt),ct.appendChild(Mt)},Ge=function(ct){return ct&&ct!=="false"},Ye=function(ct,xt,dt){xe(fe)<=4.2&&(dt=!0);var Mt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(Mt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var yt=document.createElement("div");yt.classList.add("appletParameters","notranslate");var Ft=xt.width,mt=xt.height;if(xt.disableAutoScale=xt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():xt.disableAutoScale,xt.width!==void 0)if(xe(fe)<=4.4)Ge(xt.showToolBar)&&(xt.height-=7),Ge(xt.showAlgebraInput)&&(xt.height-=37),xt.width<605&&Ge(xt.showToolBar)&&(xt.width=605,Ft=605);else{var vt=100;(Ge(xt.showToolBar)||Ge(xt.showMenuBar))&&(xt.hasOwnProperty("customToolBar")&&(xt.customToolbar=xt.customToolBar),vt=Ge(xt.showMenuBar)?245:155),Ft<vt&&(xt.width=vt,Ft=vt)}yt.style.border="none",yt.style.display="inline-block";for(var tt in xt)xt.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&yt.setAttribute("data-param-"+tt,xt[tt]);ce&&yt.setAttribute("data-param-fontscssurl",ce),Rn.resize=function(){GGBAppletUtils.responsiveResize(ct,xt)},window.addEventListener("resize",function(Et){Rn.resize()});var He=typeof xt.appletOnLoad=="function"?xt.appletOnLoad:function(){};if(!dt&&xt.width!==void 0){xt.hasOwnProperty("showSplash")||yt.setAttribute("data-param-showSplash","false");var we=ct.querySelector(".applet_scaler.prerender"),Ne=we!==null;if(Ne)var Xe=we.querySelector(".ggb_preview");else{var Xe=ft(Ft,mt,xt.borderColor,!1);we=document.createElement("div"),we.className="applet_scaler",we.style.position="relative",we.style.display="block",we.style.width=Ft+"px",we.style.height=mt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),xe(fe)>=5?(xt.appletOnLoad=function(Et){var Ot=ct.querySelector(".ggb_preview");Ot&&Ot.parentNode.removeChild(Ot),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(we),window.GGBT_wsf_view&&$(window).trigger("resize"),He(Et)},Ne||we.appendChild(Xe)):yt.appendChild(Xe),we.appendChild(yt),Ne||ct.appendChild(we),setTimeout(function(){Rn.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(yt),ct.appendChild(nt),xt.appletOnLoad=function(Et){Rn.resize(),He(Et)}}function Ie(Et,Ot){Ot&&typeof Ot.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Et,Ot.appletOnLoad):renderGGBElement(Et),Ct("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ot)}function Re(Et,Ot){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Et,params:Ot}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(qt){Ie(qt.article,qt.params)}),html5AppletsToProcess=null)},xe(fe)<5&&(Et.className+=" geogebraweb")):Ie(Et,Ot)}if(Mt){scriptLoadStarted=!0;for(var Ze=0;Ze<yt.childNodes.length;Ze++){var et=yt.childNodes[Ze].tagName;et==="TABLE"&&(yt.removeChild(yt.childNodes[Ze]),Ze--)}if(ggbHTML5LoadedScript!==null){var ht=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ht!=null&&ht.parentNode.removeChild(ht)}var at=document.createElement("script"),Dt=function(){Re(yt,xt)};at.src=Ae+z,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=at.src,Ct("GeoGebra HTML5 codebase loaded: '"+Ae+"'.",xt),!ve&&(!de||de=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Dt()):Ae.requirejs?__webpack_require__.e(822).then(function(){var Et=[__webpack_require__(20822)];Dt.apply(null,Et)}.bind(this)).catch(__webpack_require__.oe):(at.onload=Dt,ct.appendChild(at))}else Re(yt,xt);xt.height=mt,xt.width=Ft},Ke=function(ct,xt,dt){var Mt=ft(xt.width,xt.height,xt.borderColor,dt),yt=document.createElement("div");yt.style.position="relative",yt.style.display="block",yt.style.width=xt.width+"px",yt.style.height=xt.height+"px",yt.className="applet_screenshot applet_scaler"+(dt?" applet_screenshot_play":""),yt.appendChild(Mt);var Ft=GGBAppletUtils.getScale(xt,ct,dt);dt?(ct.appendChild(ut()),window.GGBT_wsf_view||(ct.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(yt,"66%"),ct.appendChild(yt),Ft!==1&&!isNaN(Ft)&&(GGBAppletUtils.scaleElement(yt,Ft),yt.style.width=xt.width+"px",yt.style.height=xt.height+"px",yt.parentNode.style.width=xt.width*Ft+"px",yt.parentNode.style.height=xt.height*Ft+"px"),Rn.resize=function(){Ve(ct,Mt,yt,dt)},window.addEventListener("resize",function(mt){Rn.resize()}),Rn.resize()};function Ve(ct,xt,dt,Mt){if(ct.contains(xt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ct.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ct)}var yt=GGBAppletUtils.getScale(pt,ct,Mt);dt.parentNode!==null&&(!isNaN(yt)&&yt!==1?(GGBAppletUtils.scaleElement(dt,yt),dt.parentNode.style.width=pt.width*yt+"px",dt.parentNode.style.height=pt.height*yt+"px"):(GGBAppletUtils.scaleElement(dt,1),dt.parentNode.style.width=pt.width+"px",dt.parentNode.style.height=pt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ct),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Rn.onExitFullscreen=function(ct,xt){xt.appendChild(ct)};var ot=function(ct,xt,dt,Mt){Ke(ct,xt,!0);for(var yt=function(){var vt=[];for(mt=0;mt<ct.childNodes.length;mt++)vt.push(ct.childNodes[mt]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(ct,xt.id),He=document.getElementById("fullscreencontainer"),we=jQuery(ct).find(".fullscreencontent");we.length>0?(tt.remove(),we.attr("id","fullscreencontent").show(),jQuery(He).append(we),window.dispatchEvent(new Event("resize"))):Ye(tt,xt,!1),window.GGBT_wsf_view.launchFullScreen(He)}else Pe=Mt,Ye(ct,xt,!1);if(!window.GGBT_wsf_view)for(mt=0;mt<vt.length;mt++)ct.removeChild(vt[mt])},Ft=ct.getElementsByClassName("ggb_preview_play"),mt=0;mt<Ft.length;mt++)Ft[mt].addEventListener("click",yt,!1),Ft[mt].addEventListener("ontouchstart",yt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ct),De()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ut=function(){var ct=document.createElement("div");if(ct.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var xt='.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");}',dt=document.createElement("style");dt.styleSheet?dt.styleSheet.cssText=xt:dt.appendChild(document.createTextNode(xt)),document.getElementsByTagName("head")[0].appendChild(dt)}return ct},ft=function(ct,xt,dt,Mt){var yt=document.createElement("div");yt.className="ggb_preview",yt.style.position="absolute",yt.style.zIndex="90",yt.style.width=ct-2+"px",yt.style.height=xt-2+"px",yt.style.top="0px",yt.style.left="0px",yt.style.overflow="hidden",yt.style.backgroundColor="white";var Ft="lightgrey";dt!==void 0&&(dt==="none"?Ft="transparent":Ft=dt),yt.style.border="1px solid "+Ft;var mt=document.createElement("img");if(mt.style.position="relative",mt.style.zIndex="1000",mt.style.top="-1px",mt.style.left="-1px",se!==null&&mt.setAttribute("src",se),mt.style.opacity=.7,ie!==null){var vt,tt,He;if(!Mt){vt=document.createElement("img"),vt.style.position="absolute",vt.style.zIndex="1001",vt.style.opacity=1,mt.style.opacity=.3,tt=360,tt>ct/4*3&&(tt=ct/4*3),He=tt/5.8,vt.setAttribute("src",ie),vt.setAttribute("width",tt),vt.setAttribute("height",He);var we=(ct-tt)/2,Ne=(xt-He)/2;vt.style.left=we+"px",vt.style.top=Ne+"px",yt.appendChild(vt)}}return yt.appendChild(mt),yt},St=function(ct){return ct=ct.toLowerCase(),ct==="html5"||ct==="screenshot"?ct:"html5"},Qe=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(ct,xt){if(fe=ct,xt){wt(fe,!0);return}var dt=!Ut;if(dt){var Mt=xe(fe);!isNaN(Mt)&&Mt<4.4&&(dt=!1)}var yt,Ft;window.location.protocol.substr(0,4)==="http"?yt=window.location.protocol:yt="http:";var mt=fe.indexOf("//");mt>0?Ft=fe:mt===0?Ft=yt+fe:Ft="https://www.geogebra.org/apps/5.2.814.0/";for(var vt in Qe)if(fe.slice(Qe[vt].length*-1)===Qe[vt]||fe.slice((Qe[vt].length+1)*-1)===Qe[vt]+"/"){wt(Ft,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dt&&!st.is3D&&!st.AV&&!st.SV&&!st.CV&&!st.EV2&&!st.CP&&!st.PC&&!st.DA&&!st.FI&&!st.PV&&!Ge(pt.showToolBar)&&!Ge(pt.showMenuBar)&&!Ge(pt.showAlgebraInput)&&!Ge(pt.enableRightClick)&&(!pt.appName||pt.appName=="classic")?Ft+="webSimple/":Ft+="web3d/",wt(Ft,!1)},wt=function(ct,xt){if(ct.requirejs){Ae=ct;return}ct.slice(-1)!=="/"&&(ct+="/"),Ae=ct,xt===null&&(xt=ct.indexOf("http")===-1),me=xt,z="web.nocache.js",te=!1;var dt=Ae.split("/");dt.length>1&&(!xt&&dt[dt.length-2]==="webSimple"?(z="webSimple.nocache.js",te=!0):Qe.indexOf(dt[dt.length-2])>=0&&(z=dt[dt.length-2]+".nocache.js")),dt=ct.split("/"),fe=dt[dt.length-3],fe.substr(0,4)==="test"?fe=fe.substr(4,1)+"."+fe.substr(5,1):(fe.substr(0,3)==="war"||fe.substr(0,4)==="beta")&&(fe="5.0");var Mt=parseFloat(fe);Mt!==NaN&&Mt<5&&ct.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mt+" is deprecated. Using version latest instead."),rt("5.0",xt))},Ct=function(ct,xt){window.console&&window.console.log&&(!xt||typeof xt.showLogging=="undefined"||xt.showLogging&&xt.showLogging!=="false")&&console.log(ct)};pt.material_id!==void 0?Fe(bt):bt();function bt(){var ct=An;de!==null?ct=de:parseFloat(ct)<5&&(ct="5.0"),rt(ct,!1),ve!==null&&wt(ve,me),_e=!0}return Rn},GGBAppletUtils=function(){"use strict";function Rn(){return window.GGBT_wsf_edit!==void 0}function An(_e,de){de!=1?(_e.style.transformOrigin="0% 0% 0px",_e.style.webkitTransformOrigin="0% 0% 0px",_e.style.transform="scale("+de+","+de+")",_e.style.webkitTransform="scale("+de+","+de+")",_e.style.maxWidth="initial",_e.querySelector(".ggb_preview")!==null&&(_e.querySelector(".ggb_preview").style.maxWidth="initial"),_e.querySelectorAll(".ggb_preview img")[0]!==void 0&&(_e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),_e.querySelectorAll(".ggb_preview img")[1]!==void 0&&(_e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(_e.style.transform="none",_e.style.webkitTransform="none")}function pt(_e,de,ve,Ee,ke,Se){var Ae=null;if(Se!=null&&Se!="")for(var me=_e.parentNode;me!=null;)if((" "+me.className+" ").indexOf(" "+Se+" ")>-1){Ae=me;break}else me=me.parentNode;var Pe=0,fe=0,z=0,te=0,se=0,ie=0,le=0;if(Ae)Pe=Ae.offsetWidth,fe=Math.max(Ee?Ae.offsetWidth:0,Ae.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Pe=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),z=Pe):(Pe=window.innerWidth,fe=window.innerHeight,z=window.innerWidth),_e){var ce=_e.getBoundingClientRect();ce.left>0&&ce.left<=Pe&&(ke===void 0||!ke)&&(document.dir==="rtl"?(se=Pe-ce.width-ce.left,ie=z<=480?10:30):(ie=ce.left,se=z<=480?10:30),te=ie+se)}if(_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=_e.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,le=40)}}return _e&&((ve===void 0||!ve)&&de>0&&de+te<Pe?Pe=de:Pe-=te,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ve===void 0||!ve)&&(fe-=le)),{width:Pe,height:fe}}function st(_e,de,ve,Ee,ke){if(_e.isScreenshoGenerator)return 1;var Se=Ee!==void 0&&Ee,Ae=_e.noScaleMargin!=null&&_e.noScaleMargin,me=function(pe){return pe&&pe!=="false"},Pe=me(_e.autoHeight),fe=pt(de,_e.width,ve,Pe,Se&&window.GGBT_wsf_view||Ae,ke),z=parseInt(fe.width),te=_e.width,se=_e.height;if(te===void 0){var ie=de.querySelector(".appletParameters");ie&&(te=ie.offsetWidth,se=ie.offsetHeight)}var le=z/te,ce=Se?1:fe.height/se;return ve!==void 0&&!ve&&(le=Math.min(1,le),ce=Math.min(1,ce)),Math.min(le,ce)}function Ut(_e,de,ve){var Ee=1,ke,Se=!1;if(_e.hasOwnProperty("allowUpscale")&&(Se=_e.allowUpscale),_e.hasOwnProperty("scale")&&(Ee=parseFloat(_e.scale),(isNaN(Ee)||Ee===null||Ee===0)&&(Ee=1),Ee>1&&(Se=!0)),de&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(_e.hasOwnProperty("disableAutoScale")&&_e.disableAutoScale))ke=st(_e,de,Se,ve,_e.scaleContainerClass);else return Ee;return Se&&(!_e.hasOwnProperty("scale")||Ee===1)?ke:Math.min(Ee,ke)}function oe(_e){var de=Math.min(window.innerWidth,document.documentElement.clientWidth),ve=Math.min(window.innerHeight,document.documentElement.clientHeight),Ee=_e.getBoundingClientRect(),ke=(de-Ee.width)/2,Se=(ve-Ee.height)/2;Se<0&&(Se=0),_e.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ke<40?_e.style.left="40px":_e.style.left=ke+"px",_e.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?_e.style.top="40px":_e.style.top=Se+"px",_e.style.left=ke+"px")}function Ue(_e,de){var ve=_e.querySelector(".appletParameters");if(ve){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(de.id!==ve.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(_e)}if(ve.parentElement&&/fullscreen/.test(ve.parentElement.className))return;var Ee=Ut(de,_e);Rn()&&ve.setAttribute("data-param-scale",Ee);for(var ke=null,Se=0;Se<_e.childNodes.length;Se++)if(_e.childNodes[Se].className!==void 0&&_e.childNodes[Se].className.match(/^applet_scaler/)){ke=_e.childNodes[Se];break}if(ke!==null&&ke.querySelector(".noscale")!==null)return;var Ae=de.id!==void 0?de.id:"ggbApplet",me=window[Ae];(me==null||!me.recalculateEnvironments)&&ke!==null&&!ke.className.match(/fullscreen/)&&(ke.parentNode.style.transform="",!isNaN(Ee)&&Ee!==1?(ke.parentNode.style.width=de.width*Ee+"px",ke.parentNode.style.height=de.height*Ee+"px",An(ke,Ee)):(An(ke,1),ke.parentNode.style.width=de.width+"px",ke.parentNode.style.height=de.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe(_e),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ve).parents(".content-added-content"))}}return{responsiveResize:Ue,isFlexibleWorksheetEditor:Rn,positionCenter:oe,getScale:Ut,scaleElement:An}}();__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 Rn=n.location.search;return Rn.indexOf(J)!=-1||Rn.indexOf(K)!=-1}function q(Rn,An){}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(Rn){var An=s[L].bindings;s[L].bindings=function(){for(var pt=An?An():{},st=Rn[webModule.__softPermutationId],Ut=O;Ut<st.length;Ut++){var oe=st[Ut];pt[oe[O]]=oe[P]}return pt}};var t;function u(){return v(),t}function v(){if(!t){var Rn=o.createElement(Q);if(Rn.id=L,Rn.style.cssText=R+S,Rn.tabIndex=-1,o.body.appendChild(Rn),t=Rn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var An=document.compatMode==U?V:W;t.write(An+X),t.close()}}}function w(Rn){function An(st){function Ut(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Ut();if(oe){st();return}function Ue(){if(!oe){if(!Ut())return;oe=!0,st(),o.removeEventListener&&o.removeEventListener(Z,Ue,!1),_e&&clearInterval(_e)}}o.addEventListener&&o.addEventListener(Z,Ue,!1);var _e=setInterval(function(){Ue()},$)}function pt(st){var Ut=u(),oe=Ut.body,Ue=Ut.createElement(_);Ue.language=ab,Ue.crossOrigin=W,Ue.src=st,webModule.__errFn&&(Ue.onerror=function(){webModule.__errFn(L,new Error(bb+st))}),oe.appendChild(Ue)}An(function(){pt(Rn)})}webModule.__startLoadingFragment=function(Rn){return C(Rn)},webModule.__installRunAsyncCode=function(Rn){var An=u(),pt=An.body,st=An.createElement(_);st.language=ab,st.text=Rn,pt.appendChild(st),pt.removeChild(st)};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(Rn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Rn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Rn){var An=c[Rn];return An==null?null:An},r=d,webModule.__errFn=e}function B(){function Rn(_e){var de=_e.lastIndexOf(rb);de==-1&&(de=_e.length);var ve=_e.indexOf(sb);ve==-1&&(ve=_e.length);var Ee=_e.lastIndexOf(tb,Math.min(ve,de));return Ee>=O?_e.substring(O,Ee+P):W}function An(_e){if(!_e.match(/^\w+:\/\//)){var de=o.createElement(ub);de.src=_e+vb,_e=Rn(de.src)}return _e}function pt(){var _e=__gwt_getMetaProperty(wb);return _e!=null?_e:W}function st(){for(var _e=o.getElementsByTagName(_),de=O;de<_e.length;++de)if(_e[de].src.indexOf(xb)!=-1)return Rn(_e[de].src);return W}function Ut(){var _e=o.getElementsByTagName(yb);return _e.length>O?_e[_e.length-P].href:W}function oe(){var _e=o.location;return _e.href==_e.protocol+zb+_e.host+_e.pathname+_e.search+_e.hash}var Ue=pt();return Ue==W&&(Ue=st()),Ue==W&&(Ue=Ut()),Ue==W&&oe()&&(Ue=Rn(o.location.href)),Ue=An(Ue),Ue}function C(Rn){return Rn.match(/^\//)||Rn.match(/^[a-zA-Z]+:\/\//)?Rn:webModule.__moduleBase+Rn}function D(){var Rn=[],An=O,pt=[],st=[];function Ut(_e){var de=st[_e](),ve=pt[_e];if(de in ve)return de;var Ee=[];for(var ke in ve)Ee[ve[ke]]=ke;throw r&&r(_e,Ee,de),null}if(__gwt_isKnownPropertyValue=function(_e,de){return de in pt[_e]},webModule.__getPropMap=function(){var _e={};for(var de in pt)pt.hasOwnProperty(de)&&(_e[de]=Ut(de));return _e},webModule.__computePropValue=Ut,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var Ue=oe.indexOf(Db);Ue!=-1&&(An=parseInt(oe.substring(Ue+P),$),oe=oe.substring(O,Ue))}catch(_e){}return webModule.__softPermutationId=An,C(oe+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(Rn,An,pt){"use strict";pt.d(An,{Ax:function(){return Ue},Ds:function(){return _e},KI:function(){return ve},SI:function(){return oe},f1:function(){return Ut}});var st=pt(13952);function Ut(Ee){let ke=!0;if(Ee.length>0){for(let Se=0;Se<Ee.length;Se++)if(Ee[Se].compile_success==0||!Ee[Se].compile_success){ke=!1;break}}else ke=!1;return ke}function oe(Ee,ke=""){let Se=[];for(let Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae],Pe=ke?`${ke}/${me.name}`:`${me.name}`;Se.push({title:me.name,type:me.type,isLeaf:me.type!=="tree",key:Pe})}return Se}function Ue(Ee,ke,Se){for(let Ae=0;Ae<Ee.length;Ae++){let me=Ee[Ae];if(me.key===ke){me.children=Se;break}me.children&&Ue(me.children,ke,Se)}return Ee}function _e(Ee,ke,Se){let Ae;return function(){let me=this,Pe=arguments,fe=function(){Ae=null,Se||Ee.apply(me,Pe)},z=Se&&!Ae;clearTimeout(Ae),Ae=setTimeout(fe,ke),z&&Ee.apply(me,Pe)}}const de=!0,ve=st.Z.API_SERVER},89837:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ae}});var st=pt(59301),Ut={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=pt(92310),Ue=pt.n(oe),_e=pt(29787),de=pt(2859),ve=pt(52430),Ee=pt(89299),ke=(me,Pe,fe)=>new Promise((z,te)=>{var se=ce=>{try{le(fe.next(ce))}catch(pe){te(pe)}},ie=ce=>{try{le(fe.throw(ce))}catch(pe){te(pe)}},le=ce=>ce.done?z(ce.value):Promise.resolve(ce.value).then(se,ie);le((fe=fe.apply(me,Pe)).next())}),Ae=({data:me,className:Pe,fullWidth:fe,style:z={},onClose:te,onOk:se,showFullTools:ie,noAssociationId:le})=>{const ce=(0,st.useRef)(null),pe=(0,st.useRef)(null),xe=(0,st.useRef)(null),je=(0,st.useRef)(null),[De,Fe]=(0,st.useState)(!1),[Te,Me]=(0,st.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,st.useEffect)(()=>(xe.current||(xe.current=document.createElement("style"),document.head.appendChild(xe.current)),me!=null&&me.visible?(document.body.setAttribute("data-custom","y-hidden"),xe.current.innerHTML=" html { overflow-y: hidden; }",me!=null&&me.src&&Be()):(document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)),()=>{document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)}),[me==null?void 0:me.visible]);const Be=()=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ve=yield(0,Ee.ZJ)(me==null?void 0:me.src);ce.current.src="",ce.current.src=Ve,ce.current.onload=function(){Ke()},Fe(!1),Me("")}),Ge=Ve=>ke(void 0,null,function*(){Fe(!0),Me("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,ve.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:me.title,file:Ve.dataUrl}});ot!=null&&ot.id&&!le?(yield(0,ve.ZP)(`/api/attachments/${me.id}/add_subitem.json`,{method:"post",body:{subitem_id:ot==null?void 0:ot.id,settings:JSON.stringify(Ve.state)}})).status===0&&se():ot!=null&&ot.id&&se(ot),Fe(!1),Me("")}),Ye=()=>{const Ve=document.querySelector('a[href="https://markerjs.com/"]');Ve&&Ve.parentNode&&(Ve.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(ut=>{const ft=document.querySelector(ut.name);ft&&ft.setAttribute("title",ut.title)})},Ke=()=>{pe.current=new de.hP(ce.current),pe.current.targetRoot=je.current,pe.current.addEventListener("render",Ge),pe.current.addEventListener("beforeclose",te),ie&&(pe.current.availableMarkerTypes=pe.current.ALL_MARKER_TYPES,pe.current.uiStyleSettings.redoButtonVisible=!0,pe.current.uiStyleSettings.notesButtonVisible=!0,pe.current.uiStyleSettings.zoomButtonVisible=!0,pe.current.uiStyleSettings.zoomOutButtonVisible=!0,pe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=pe.current.uiStyleSettings,pe.current.show(),me!=null&&me.snapshotData&&pe.current.restoreState(me.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return st.createElement(st.Fragment,null,(me==null?void 0:me.visible)&&st.createElement(_e.Z,{spinning:De,tip:Te,style:{position:"absolute",width:"100vw"}},st.createElement("div",{ref:je,className:Ue()(Ut.imageDimensions,Pe,fe?Ut.fullWidth:""),style:z},st.createElement("img",{className:Ut.img,ref:ce}))))}},53267:function(Rn,An,pt){"use strict";var st=pt(59301),Ut=pt(77019),oe=pt(5269),Ue=pt(20554),_e=pt(99571),de=pt(98573),ve=pt(25346),Ee=pt(48136),ke=pt(59301);const Se=(0,st.forwardRef)(({callback:Ae,showSaveButton:me,value:Pe=""},fe)=>{const z=(0,st.useRef)(),te=[{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 "}]}]}],se=[{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}`}]}]}],ie=pe=>{z.current.setValue(z.current.getValue()+" "+pe.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ke.createElement(Ut.Z,{className:ve.Z.lists,gutter:[10,10]},te.map((pe,xe)=>ke.createElement(oe.Z,{flex:"110px",className:ve.Z.item},ke.createElement("div",null,ke.createElement(de.Z,{value:`$$${pe.value}$$`}),pe.name),ke.createElement("div",{className:ve.Z.children},pe.children.map((je,De)=>ke.createElement("div",{key:De},ke.createElement("h1",null,je.name),ke.createElement(Ut.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ke.createElement(Ut.Z,{className:ve.Z.lists,gutter:[10,10]},se.map((pe,xe)=>ke.createElement(oe.Z,{flex:"110px",className:ve.Z.item},ke.createElement("div",null,ke.createElement(de.Z,{value:"`$$"+pe.value+"$$`"}),pe.name),ke.createElement("div",{className:ve.Z.children},pe.children.map((je,De)=>ke.createElement("div",{key:De},je.name&&ke.createElement("h1",null,je.name),ke.createElement(Ut.Z,{gutter:[10,10]},je.data.map((Fe,Te)=>ke.createElement(oe.Z,{key:Te,onClick:()=>ie(Fe),className:ve.Z.diamond},ke.createElement(de.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ce=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var xe=pe.innerText;return Ae&&Ae(xe),xe};return(0,st.useImperativeHandle)(fe,()=>({getData:ce})),ke.createElement("div",{className:ve.Z.mathWrap},ke.createElement(Ue.default,{defaultActiveKey:"1",items:le}),ke.createElement("math-field",{locale:"zh_cn",className:ve.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},Pe||""),me&&ke.createElement("div",{className:ve.Z.button},ke.createElement(_e.ZP,{size:"large",onClick:ce,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});An.Z=Se},63604:function(Rn,An,pt){"use strict";var st=pt(59301),Ut=pt(93314),oe=pt(99571),Ue=Object.defineProperty,_e=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Se=(fe,z,te)=>z in fe?Ue(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:te}):fe[z]=te,Ae=(fe,z)=>{for(var te in z||(z={}))Ee.call(z,te)&&Se(fe,te,z[te]);if(ve)for(var te of ve(z))ke.call(z,te)&&Se(fe,te,z[te]);return fe},me=(fe,z)=>_e(fe,de(z));const Pe=({img:fe,buttonProps:z={},styles:te={},customText:se,ButtonText:ie,ButtonClick:le,Buttonclass:ce,ButtonTwo:pe,imgStyles:xe,loading:je=!1,className:De=""})=>st.createElement("section",{className:`tc animated fadeIn ${De}`,style:Ae({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},te)},st.createElement("img",{src:fe||Ut,style:me(Ae({},xe),{pointerEvents:"none",userSelect:"none"})}),st.createElement("p",{className:"mt20 font14"},se||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&st.createElement(oe.ZP,Ae({className:ce,onClick:le},z),ie),pe&&pe);An.Z=Pe},23416:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return ce}});var st=pt(59301),Ut={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=pt(99571),Ue=pt(70557),_e=pt(58531),de=pt(25399),ve=pt(89299),Ee=pt(68606),ke=pt(63604),Se=pt(13952),Ae=pt(59669),me=pt(59301),Pe=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(pe,xe,je)=>xe in pe?Pe(pe,xe,{enumerable:!0,configurable:!0,writable:!0,value:je}):pe[xe]=je,ie=(pe,xe)=>{for(var je in xe||(xe={}))z.call(xe,je)&&se(pe,je,xe[je]);if(fe)for(var je of fe(xe))te.call(xe,je)&&se(pe,je,xe[je]);return pe},le=(pe,xe,je)=>new Promise((De,Fe)=>{var Te=Ge=>{try{Be(je.next(Ge))}catch(Ye){Fe(Ye)}},Me=Ge=>{try{Be(je.throw(Ge))}catch(Ye){Fe(Ye)}},Be=Ge=>Ge.done?De(Ge.value):Promise.resolve(Ge.value).then(Te,Me);Be((je=je.apply(pe,xe)).next())}),ce=({editOffice:pe="view",data:xe,issaver:je,onSaver:De,theme:Fe,type:Te,filename:Me,monacoEditor:Be,className:Ge,style:Ye,close:Ke,onClose:Ve,hasMask:ot,disabledDownload:ut,onImgDimensions:ft,showNodata:St,recordInfo:Qe})=>{const[rt,wt]=(0,st.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ct,bt]=(0,st.useState)(""),[ct,xt]=(0,st.useState)(),dt=window.ENV==="build"?"/react/build":"",Mt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Ft=10*(1024*1024),mt=(0,st.useRef)();xe!=null&&xe.startsWith("/api")&&Te!=="txt"&&(xe=Se.Z.API_SERVER+xe);const vt=Xe=>Xe.substring(Xe.lastIndexOf("/")+1).split(".").pop();Me&&Be&&(Be.filename=Me),(0,st.useEffect)(()=>{var Xe,nt;const Ie=(nt=(Xe=document.cookie)==null?void 0:Xe.replace(/\s/g,""))==null?void 0:nt.split(";");Ie==null||Ie.map(Re=>{let Ze=Re.split("=");Ze[0]==="_educoder_session"&&bt(Ze[1])})},[]),(0,st.useEffect)(()=>{Te==="office"&&(xe.indexOf("bigfilescdn.")>-1||xe.indexOf("bigfiles1")>-1?xt({url:xe,fileType:vt(xe),model:xe.indexOf("model=edit")?"edit":"view"}):He())},[Te,xe]);function tt(Xe){return le(this,null,function*(){Xe.data.type==="pdfdata"&&(De(Xe.data.data),window.removeEventListener("message",tt,!1)),console.log("mess---:",Xe.data)})}const He=()=>le(void 0,null,function*(){console.log("data:",xe);let Xe=xe;xe.startsWith("http")||(Xe=location.origin+Xe);let nt=new URL(Xe).pathname.split("/").pop();const Ie=yield(0,Ee.gJ)({attachment_id:nt});Ie.url=Mt+Ie.url,xt(Ie)}),we=()=>{if(xe.startsWith("http")||xe.startsWith("blob:")){Ne();return}(0,ve.Sv)(Me||"educoder",xe,Me)},Ne=()=>{Qe&&(0,Ae.fc)({id:Qe==null?void 0:Qe.id,watch_type:1,course_id:Qe==null?void 0:Qe.course_id}),(0,ve.Nd)(Me||"educoder",decodeURIComponent(xe))};return me.createElement("div",{style:ie({},Ye||{}),className:`${ot&&Ut.bgBlack} ${Te?Ut.wrp:"hide"}`},Ke&&me.createElement("div",{className:Ut.close,ref:mt},!!ft&&me.createElement(de.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>mt.current},me.createElement("span",{onClick:()=>{Ve(),ft()}},me.createElement("i",{className:"icon-yulanpizhu"}))),!ut&&me.createElement(de.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>mt.current},me.createElement("span",{onClick:Ne},me.createElement("i",{className:"icon-quxiaozhiding"}))),je&&me.createElement(de.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>mt.current},me.createElement("span",{className:"",onClick:()=>{const Xe=document.getElementById("pdfiframe");window.addEventListener("message",tt,!1),setTimeout(()=>{Xe.contentWindow.postMessage("getData","*")},300)}},me.createElement("i",{className:"icon-baocun"}))),me.createElement(de.Z,{title:"\u5173\u95ED",getPopupContainer:()=>mt.current},me.createElement("span",{className:"",onClick:()=>{Ve()}},me.createElement("i",{className:"icon-guanbi1"})))),me.createElement("div",{className:`${Ut[Ge]} ${Ge} ${Ut.monaco} ${Te==="txt"?"show":"hide"}`},Te==="txt"&&me.createElement(me.Fragment,null,me.createElement(_e.ZP,ie({},Be)))),Te==="audio"&&me.createElement("audio",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${xe}`,autoPlay:!0}),Te==="video"&&me.createElement(me.Fragment,null,(xe==null?void 0:xe.indexOf("http"))>-1?me.createElement("video",{controls:!0,src:`${xe}`,autoPlay:!0}):me.createElement("video",{controls:!0,src:`data:video/mp4;base64,${xe}`,autoPlay:!0})),Te==="office"&&ct&&me.createElement("iframe",{src:`${dt}/office.html?key=${ct.key}&url=${btoa(ct.url)}&callbackUrl=${Mt+(ct.callbackUrl||"")}&fileType=${ct.fileType}&title=${ct.title||""}&model=${pe}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!ut}`}),Te==="html"&&me.createElement("iframe",{src:xe+"&disposition=inline"}),Te==="pdf"&&me.createElement("iframe",{id:"pdfiframe",src:`${dt}/js/pdfview/index.html?filename=${Me||"educoder.pdf"}&url=${encodeURIComponent(xe)}&disabledDownload=${!!ut}&model=${pe}`}),Te==="image"&&me.createElement("img",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${xe}`}),(Te==="other"||Te==="download")&&me.createElement(me.Fragment,null,St?me.createElement(ke.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:me.createElement(oe.ZP,{icon:me.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:we,disabled:ut},"\u4E0B\u8F7D")}):me.createElement(oe.ZP,{type:"primary",size:"middle",onClick:we,disabled:ut},me.createElement(Ue.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},98573:function(Rn,An,pt){"use strict";pt.d(An,{z:function(){return De},Z:function(){return Fe}});var st=pt(59301),Ut=pt(14752),oe=pt(48421),Ue=pt(64018),_e=pt(79710),de=pt(13952),ve=pt(89299),Ee=pt(15342),ke=pt(1012),Se=pt(23416),Ae=pt(59301),Pe=({html:Te})=>{const Me=(0,st.useRef)(null),Be=(0,st.useRef)(null),Ge=`.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,st.useEffect)(()=>{const Ye=Me.current.attachShadow({mode:"open"});Be.current=document.createElement("div"),Be.current.className="markdown-body",Be.current.innerHTML=Te,Ye.appendChild(Be.current);const Ke=document.createElement("style");return Ke.textContent=Ge,Ye.appendChild(Ke),()=>{Ye.innerHTML=""}},[]),(0,st.useEffect)(()=>{Be.current&&(Be.current.innerHTML=Te)},[Te]),Ae.createElement("div",{ref:Me})},fe=Object.defineProperty,z=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(Te,Me,Be)=>Me in Te?fe(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,le=(Te,Me)=>{for(var Be in Me||(Me={}))te.call(Me,Be)&&ie(Te,Be,Me[Be]);if(z)for(var Be of z(Me))se.call(Me,Be)&&ie(Te,Be,Me[Be]);return Te};const ce="@\u2581\u2581@",pe="@\u2581@",xe=/<pre[^>]*>/g;function je(Te){let Me=document.createElement("div");return Me.innerHTML=Te,Me.childNodes.length===0?"":Me.childNodes[0].nodeValue}const De=(Te,Me)=>{Te=Te||"";const Be=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ge=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ke=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Me?Te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Be,(Ve,ot,ut,ft,St,Qe,rt)=>{const wt=ot||ft||Qe,Ct=ut||St||rt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Te=Te.replace(Ke,(Ve,ot,ut,ft,St,Qe,rt)=>{const wt=ot||ft||Qe,Ct=ut||St||rt||"?";return de.Z.API_SERVER+"/attachments/download/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Be,(Ve,ot,ut,ft,St,Qe,rt)=>{const wt=ot||ft||Qe,Ct=ut||St||rt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+Ct+"&t="+(0,ve.Jn)(wt,Date.now())+(Ve.indexOf(")")>-1?")":"&")}).replace(Ge,(Ve,ot,ut,ft,St)=>{const Qe=ot||ft,rt=ut||St||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+Qe+rt+Qe+rt+"&t="+(0,ve.Jn)(Qe,Date.now())}).replace(Ye,(Ve,ot,ut,ft,St)=>{const Qe=ot||ft,rt=ut||St||"";return"("+de.Z.API_SERVER+"/files/uploads/"+Qe+rt+Qe+rt+"&t="+(0,ve.Jn)(Qe,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,`
|
|
`),Te)};var Fe=({value:Te="",className:Me,showTextOnly:Be,showLines:Ge,style:Ye={},stylesPrev:Ke={},highlightKeywords:Ve,showProgramFill:ot,isProgramFill:ut,disabledFill:ft=!1,programFillValue:St,onFillChange:Qe=Ct=>{},onFillBlur:rt=()=>{},onFillFocus:wt=()=>{}})=>{let Ct=String(Te);const[bt,ct]=(0,st.useState)(""),[xt,dt]=(0,st.useState)("office"),[Mt,yt]=(0,st.useState)([]),Ft=(0,st.useRef)("a"+(0,ke.Z)()),mt={},vt=(at,Dt,Et)=>{const Ot=document.createElement(at===pe?"input":"textarea");Ot.style.width="100%",Ot.style.height=at===pe?"40px":"151px",Ot.rows=5,Ot.spellcheck=!1,Ot.name="edu-program-fill",Ot.placeholder="\u8BF7\u8F93\u5165",Ot.dataset.id=Dt;const qt=Object.keys(mt).length;return mt[qt]=Ot,`<span class="edu-program-fill-wrap ${at===pe?"":"show"}" style="width:${at===pe?"400px":"100%"}" title=${Et||""}><span>${Ot.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function tt(at){return at=at.replace(/!\[.*?\]\(.*?\)/g,""),at=at.replace(/\[.*?\]\(.*?\)/g,""),at=at.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),at=at.replace(/<embed.*?>/g,""),at=at.replace(/<img.*?>/g,""),at=at.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),at=at.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),at=at.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),at=at.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),at}const He=at=>at.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Dt,Et){let Ot=Et.replace(/(\n|\r)/g,"").split("}"),qt=[];return Ot.map(Qt=>{Qt!=""&&qt.push(`.${Ft.current} ${Qt}`)}),`<style>${qt.join("}")}</style>`}),we=(0,st.useMemo)(()=>{try{const Ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,qt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Qt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Xt=/\(\/attachments\/download\//g;Ct=Ct.replace(Xt,"("+de.Z.API_SERVER+"/attachments/download/").replace(Ot,"("+de.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+de.Z.API_SERVER+"/api/attachments/").replace(Qt,'"'+de.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(Ot){}if(ot){let Ot=-1;return Ct=Ct.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(qt,Qt,Xt){var Wt;return++Ot,vt(qt,Ot,(Wt=St==null?void 0:St[Ot])==null?void 0:Wt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${He(Ct||"")}</pre>`}let at=He(Ct);at=(0,oe.ZP)(at);const Dt=(0,oe.ez)();Ct.match(/\[TOC\]/)&&(at=at.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),at=at.replace(/(__special_katext_id_\d+__)/g,(Ot,qt)=>{const{type:Qt,expression:Xt}=Dt[qt];return(0,Ee.renderToString)(je(Xt)||"",{displayMode:Qt==="block",throwOnError:!1,output:"html"})}),at=at.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Et=document.createElement("div");if(Et.innerHTML=at,Be)return Et.innerText;if(Ve){const Ot=Ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ie(Et,Ot),Et.innerHTML}return setTimeout(()=>et(),500),Et.innerHTML},[Ct,Ve]);(0,st.useEffect)(()=>{Re.current&&Re.current.querySelectorAll(["input","textarea"]).forEach(Dt=>{Dt.oninput=Ne,Dt.onblur=Xe,Dt.onfocus=nt})},[Mt]),(0,st.useEffect)(()=>{var at,Dt,Et,Ot,qt;if(St!=null&&St.length)try{const Qt=Re.current.querySelectorAll(".edu-program-fill-score"),Xt=Re.current.querySelectorAll('[name="edu-program-fill"]');for(const[Wt,un]of Xt.entries())un.value=((at=St==null?void 0:St[Wt])==null?void 0:at.value)||"",((Dt=St==null?void 0:St[Wt])==null?void 0:Dt.type)==="warning"?un.className="program-fill-warning":((Et=St==null?void 0:St[Wt])==null?void 0:Et.type)==="success"?un.className="program-fill-success":un.className="";for(const[Wt,un]of Qt.entries())un.innerHTML=(Ot=St==null?void 0:St[Wt])!=null&&Ot.score?`${(qt=St==null?void 0:St[Wt])==null?void 0:qt.score}\u5206`:"";yt(St)}catch(Qt){console.log(Qt,"error")}},[St]);const Ne=at=>{Mt[at.target.dataset.id]=Mt[at.target.dataset.id]||{},Mt[at.target.dataset.id].value=at.target.value,yt([...Mt]),Qe(Mt,at.target.dataset.id)},Xe=at=>{Mt[at.target.dataset.id]=Mt[at.target.dataset.id]||{},Mt[at.target.dataset.id].value=at.target.value,yt([...Mt]),rt(Mt,at.target.dataset.id)},nt=at=>{Mt[at.target.dataset.id]=Mt[at.target.dataset.id]||{},Mt[at.target.dataset.id].value=at.target.value,yt([...Mt]),wt(Mt,at.target.dataset.id)};function Ie(at,Dt){return at.childNodes.forEach(Et=>{var Ot;if(Et.childNodes.length>0)Ie(Et,Dt);else if(Et.nodeName!=="IMG")if(Et.innerHTML)Et.innerHTML=(Ot=Et.innerHTML)==null?void 0:Ot.replace(new RegExp(Dt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const qt=document.createElement("span");qt.innerHTML=Et.textContent.replace(new RegExp(Dt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Et.replaceWith(qt)}})}const Re=(0,st.useRef)();oe.jb.WebkitLineClamp=Ge,Ge&&(Ye=le(le({},Ye),oe.jb));function Ze(at){let Dt=at.target;if(Dt.tagName.toUpperCase()==="A"){let Et=Dt.getAttribute("href");if(Et.indexOf("office")>-1)at.preventDefault(),ct(Et),dt("office");else if(Et.indexOf("application/pdf")>-1)at.preventDefault(),ct(Et),dt("pdf");else if(Et.indexOf("text/html")>-1)at.preventDefault(),ct(Et),dt("html");else if(Et.startsWith("#")){at.preventDefault();let Ot=document.getElementById(Et.replace("#",""));Ot&&Ot.scrollIntoView(!0)}}}const et=()=>{var at;const Dt=(at=Re.current)==null?void 0:at.querySelectorAll("video");Dt==null||Dt.forEach(Et=>{if(Et.oncontextmenu=()=>!1,Et.src.indexOf(".m3u8")>-1&&!Et.canPlayType("application/vnd.apple.mpegurl")){if(_e.ZP.isSupported()){var Ot=new _e.ZP;Ot.loadSource(Et.src),Ot.attachMedia(Et)}}})};(0,st.useEffect)(()=>{if(Re.current&&we&&we.match(xe)&&window.PR.prettyPrint(),Re.current)return Re.current.addEventListener("click",Ze),()=>{var at;(at=Re.current)==null||at.removeEventListener("click",Ze),(0,oe.AL)(),(0,oe.Iy)()}},[we,Re.current,Ze]),(0,st.useEffect)(()=>{var at;const Dt=Et=>{Et.preventDefault(),Et.clipboardData.setData("text",window.getSelection().toString())};return(at=Re.current)==null||at.addEventListener("copy",Dt),()=>{var Et;(Et=Re.current)==null||Et.removeEventListener("copy",Dt)}},[Re.current]);const ht=at=>/<style[\s\S]*?>/i.test(at||"");return st.createElement(st.Fragment,null,Be&&st.createElement("div",{ref:Re},we),!Be&&!ht(we)&&st.createElement("div",{ref:Re,style:le({},Ye),className:`${Me||""} ${ft?"disabled-fill":""} markdown-body ${Ft.current}`,dangerouslySetInnerHTML:{__html:we}}),!Be&&ht(we)&&st.createElement(Pe,{html:we}),st.createElement(Se.Z,{close:!0,data:bt,type:bt!=null&&bt.length?xt:"",style:le({},Ke),onClose:()=>ct("")}))}},12230:function(Rn,An,pt){"use strict";pt.d(An,{cT:function(){return Te},pe:function(){return je}});var st=pt(59301),Ut=pt(14566),oe=pt(6767),Ue=pt(52430),_e=pt(28209),de=pt.n(_e),ve=pt(1012),Ee=pt(44993),ke=pt(47257),Se=pt.n(ke),Ae=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Be,Ge,Ye)=>Ge in Be?Ae(Be,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Be[Ge]=Ye,ie=(Be,Ge)=>{for(var Ye in Ge||(Ge={}))z.call(Ge,Ye)&&se(Be,Ye,Ge[Ye]);if(fe)for(var Ye of fe(Ge))te.call(Ge,Ye)&&se(Be,Ye,Ge[Ye]);return Be},le=(Be,Ge)=>me(Be,Pe(Ge)),ce=(Be,Ge)=>{var Ye={};for(var Ke in Be)z.call(Be,Ke)&&Ge.indexOf(Ke)<0&&(Ye[Ke]=Be[Ke]);if(Be!=null&&fe)for(var Ke of fe(Be))Ge.indexOf(Ke)<0&&te.call(Be,Ke)&&(Ye[Ke]=Be[Ke]);return Ye},pe=(Be,Ge,Ye)=>new Promise((Ke,Ve)=>{var ot=St=>{try{ft(Ye.next(St))}catch(Qe){Ve(Qe)}},ut=St=>{try{ft(Ye.throw(St))}catch(Qe){Ve(Qe)}},ft=St=>St.done?Ke(St.value):Promise.resolve(St.value).then(ot,ut);ft((Ye=Ye.apply(Be,Ge)).next())});const{Dragger:xe}=Ut.default,je=Be=>{const Ge="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ke=de().enc.Utf8.parse(Ge);let Ve=de().enc.Utf8.parse(Ye);var ot=de().AES.decrypt(Be,Ke,{iv:Ve,mode:de().mode.CBC});return ot.toString(de().enc.Utf8)};let De;const Fe=Be=>pe(void 0,[Be],function*({identifier:Ge,oldFilename:Ye,newFilename:Ke}){var Ve,ot,ut,ft,St,Qe;const rt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});rt.data=JSON.parse(je(rt.data));const wt=new OSS({endpoint:(Ve=rt==null?void 0:rt.data)==null?void 0:Ve.end_point,region:(ot=rt==null?void 0:rt.data)==null?void 0:ot.region,accessKeyId:(ut=rt==null?void 0:rt.data)==null?void 0:ut.access_key_id,accessKeySecret:(ft=rt==null?void 0:rt.data)==null?void 0:ft.access_key_secret,bucket:(St=rt==null?void 0:rt.data)==null?void 0:St.bucket,stsToken:(Qe=rt==null?void 0:rt.data)==null?void 0:Qe.security_token});return new Promise((Ct,bt)=>{console.log(11111,`${Ge}/${Ye}`,`${Ge}/${Ke}`,rt.data),wt.copy(`/${Ge}/${Ye}`,`/${Ge}/${Ke}`).then(ct=>{console.log("\u62F7\u8D1D\u6210\u529F",ct)}).catch(ct=>{console.log(ct)})})}),Te=(Be,Ge,Ye)=>pe(void 0,null,function*(){var Ke,Ve,ot,ut,ft,St;Ge.file_name=Be.name;const Qe=yield(0,Ue.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",je(Qe.data)),Qe.data=JSON.parse(je(Qe.data));const rt=Be.name.split(".");rt.pop();const wt=Ge.realFileName?rt.join(""):(0,ve.Z)(),Ct=new(Se())({endpoint:(Ke=Qe==null?void 0:Qe.data)==null?void 0:Ke.end_point,region:(Ve=Qe==null?void 0:Qe.data)==null?void 0:Ve.region,accessKeyId:(ot=Qe==null?void 0:Qe.data)==null?void 0:ot.access_key_id,accessKeySecret:(ut=Qe==null?void 0:Qe.data)==null?void 0:ut.access_key_secret,bucket:(ft=Qe==null?void 0:Qe.data)==null?void 0:ft.bucket,stsToken:(St=Qe==null?void 0:Qe.data)==null?void 0:St.security_token});return new Promise((bt,ct)=>{var xt;Ct.multipartUpload(`${wt}`,new Blob([Be],{type:Be.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(xt=Qe==null?void 0:Qe.data)==null?void 0:xt.callback_url,host:Qe==null?void 0:Qe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ue.rz)(Ge)}})).then(function(dt){var Mt;Be.response=(Mt=dt.data)==null?void 0:Mt.data,bt(dt==null?void 0:dt.data)}).catch(function(dt){ct(dt),console.log("err:",dt)})})}),Me=Be=>{var Ge=Be,{user:Ye,cancelUpload:Ke}=Ge,Ve=ce(Ge,["user","cancelUpload"]);const[ot,ut]=(0,st.useState)([]);let[ft,St]=(0,st.useState)();const Qe={onRemove:wt=>{ut([...ot.filter(Ct=>Ct.name!==wt.name)]),Ve.onChange(ot.filter(Ct=>Ct.name!==wt.name))},disabled:Ve.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(wt=>wt.file),customRequest:()=>{},beforeUpload:wt=>pe(void 0,null,function*(){let Ct=Ve.maxSize||1073741824;if(ot.filter(bt=>bt.name===wt.name).length){oe.ZP.info(`${wt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(wt==null?void 0:wt.size)>Ct?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Ct/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:wt.name,file:wt}),ut([...ot]),Ve.onChange(ot),!1)})},rt=(wt,Ct)=>pe(void 0,null,function*(){var bt,ct,xt,dt,Mt,yt;Ct.file_name=wt.name;const Ft=wt.name,mt=yield(0,Ue.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(mt.data=JSON.parse(je(mt.data)),(mt==null?void 0:mt.status)!==0){ot[ot.findIndex(He=>He.name===Ft)].status="error",ot[ot.findIndex(He=>He.name===Ft)].file.status="error",Ve.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(Se())({endpoint:(bt=mt==null?void 0:mt.data)==null?void 0:bt.end_point,region:(ct=mt==null?void 0:mt.data)==null?void 0:ct.region,accessKeyId:(xt=mt==null?void 0:mt.data)==null?void 0:xt.access_key_id,accessKeySecret:(dt=mt==null?void 0:mt.data)==null?void 0:dt.access_key_secret,bucket:(Mt=mt==null?void 0:mt.data)==null?void 0:Mt.bucket,stsToken:(yt=mt==null?void 0:mt.data)==null?void 0:yt.security_token}),console.log(wt,"file"),St(ft);const vt=wt.name.split(".");vt.pop();const tt=Ft.indexOf(".")>-1?Ct.realFileName?vt.join("."):(0,ve.Z)():Ft;return new Promise((He,we)=>{var Ne;try{ft.multipartUpload(`${Ve.identifier}/${tt}${Ft.indexOf(".")>-1?"."+Ft.split(".").pop():""}`,new Blob([wt.file],{type:wt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xe,nt,Ie)=>{try{console.log("\u8FDB\u5EA6",Xe,nt,Ie);const Re=ot.findIndex(Ze=>Ze.name===Ft);ot[Re].file.percent=Xe*100,ot[Re].tempCheckpoint=nt,ut([...ot])}catch(Re){}},checkpoint:ot[ot.findIndex(Xe=>Xe.name===Ft)].tempCheckpoint,callback:{customValue:{id:Ft+""},url:(Ne=mt==null?void 0:mt.data)==null?void 0:Ne.callback_url,host:mt==null?void 0:mt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ue.rz)(Ct)}}).then(function(Xe){var nt,Ie,Re;const Ze=ot.findIndex(ht=>ht.name===Ft);let et="done";if(((nt=Xe.data)==null?void 0:nt.status)===0){wt.response=(Ie=Xe.data)==null?void 0:Ie.data;const ht=ot.findIndex(at=>at.name===Ft);ot[ht].status="done",ot[ht].file.status="done"}else oe.ZP.warning((Re=Xe.data)==null?void 0:Re.message),et="error";ot[Ze].status=et,ot[Ze].file.status=et,Ve.onChange(ot),He(Xe==null?void 0:Xe.data)}).catch(function(Xe){ot[ot.findIndex(nt=>nt.name===Ft)].status="error",ot[ot.findIndex(nt=>nt.name===Ft)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ut([...ot]),Ve.onChange(ot),we(Xe),console.log("err:",Xe)})}catch(Xe){}})});return(0,st.useEffect)(()=>{ot.every(wt=>wt==="done"||wt==="error")&&Ve.onComplete(ot)},[ot]),(0,st.useEffect)(()=>{Ke&&(ft==null||ft.cancel())},[Ke]),(0,st.useEffect)(()=>{Ve.uploading&&ot.map(wt=>pe(void 0,null,function*(){var Ct;if((!wt.status||wt.status==="error")&&!Ke){wt.status="uploading",wt.file.status="uploading";const bt=yield rt(wt,{login:(Ct=Ye==null?void 0:Ye.userInfo)==null?void 0:Ct.login,container_type:Ve.container_type,container_id:Ve.container_id,description:Ve.description,realFileName:Ve.realFileName})}}))},[Ve.uploading]),st.createElement(xe,le(ie({},Qe),{height:Ve.height,className:Ve.className}),st.createElement("p",{className:"ant-upload-hint"},Ve.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};An.ZP=(0,Ee.connect)(({loading:Be,globalSetting:Ge,user:Ye})=>({globalSetting:Ge,loading:Be.models.competitions,user:Ye}))(Me)},41539:function(Rn,An,pt){"use strict";pt.d(An,{h:function(){return pe}});var st=pt(59301),Ut=pt(82326),oe=pt(28284),Ue=pt(99571),_e=pt(89780),de=pt.n(_e),ve=pt(39060),Ee=pt(76596),ke=Object.defineProperty,Se=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,z=(xe,je,De)=>je in xe?ke(xe,je,{enumerable:!0,configurable:!0,writable:!0,value:De}):xe[je]=De,te=(xe,je)=>{for(var De in je||(je={}))Pe.call(je,De)&&z(xe,De,je[De]);if(me)for(var De of me(je))fe.call(je,De)&&z(xe,De,je[De]);return xe},se=(xe,je)=>Se(xe,Ae(je));const ie=Ut.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},ce={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"]};An.Z=({callback:xe,onCancel:je})=>{const[De,Fe]=(0,st.useState)("python");function Te(Be){Fe(ce[Be][1])}function Me(Be){xe(Be)}return st.createElement(oe.default,se(te({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Me,style:{width:500}}),st.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},st.createElement(Ut.default,{getPopupContainer:Be=>Be.parentNode,onChange:Te},Object.keys(ce).map(Be=>st.createElement(ie,{key:Be,value:Be},ce[Be][0])))),st.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},st.createElement(pe,{mode:De})),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Ue.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function pe({value:xe,onChange:je,mode:De,options:Fe={}}){const Te=(0,st.useRef)(),[Me,Be]=(0,st.useState)();return(0,st.useEffect)(()=>{if(Me){let Ge=function(Ye){const Ke=Ye.getValue();je&&je(Ke)};return Me.on("change",Ge),()=>{Me.off("change",Ge)}}},[Me,je]),(0,st.useEffect)(()=>{Me&&Me.setOption("mode",De)},[Me,De]),(0,st.useEffect)(()=>{Me&&(xe!==Me.getValue()||xe==="")&&setTimeout(()=>{Me.setValue(xe||"")},300)},[Me,xe]),(0,st.useEffect)(()=>{if(Te.current&&!Me){const Ge=de().fromTextArea(Te.current,te({mode:De,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Be(Ge)}},[Te.current,Me]),st.createElement("div",{className:"my-codemirror-container"},st.createElement("textarea",{ref:Te}))}},4213:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return nr}});var st=pt(59301),Ut=pt(89780),oe=pt.n(Ut),Ue=pt(76374),_e=pt(39060),de=pt(6313),ve=pt(25717),Ee=pt(99498),ke=pt(25419),Se=pt(67549),Ae=pt(98573),me=({value:Vt="",className:Kt,showTextOnly:zt,showLines:Mn,style:Vn={}})=>{const vr=(0,st.useMemo)(()=>"",[Vt]);return st.createElement(st.Fragment,null,st.createElement("div",{dangerouslySetInnerHTML:{__html:vr}}))},Pe=pt(59301),fe=Object.defineProperty,z=Object.defineProperties,te=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ce=(Vt,Kt,zt)=>Kt in Vt?fe(Vt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Vt[Kt]=zt,pe=(Vt,Kt)=>{for(var zt in Kt||(Kt={}))ie.call(Kt,zt)&&ce(Vt,zt,Kt[zt]);if(se)for(var zt of se(Kt))le.call(Kt,zt)&&ce(Vt,zt,Kt[zt]);return Vt},xe=(Vt,Kt)=>z(Vt,te(Kt));let je=[{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 De({onActionCallback:Vt,title:Kt,icon:zt,actionName:Mn,className:Vn="",children:vr}){function vn(){Vt(Mn)}return Pe.createElement("a",{title:Kt,className:Vn,onClick:vn},Pe.createElement("i",{className:`${zt}`}),vr)}var Fe=({watch:Vt,showNullButton:Kt,showNullProgramButton:zt,onActionCallback:Mn,fullScreen:Vn,insertTemp:vr,hidetoolBar:vn,extraUse:Wn})=>{const Ht=[...je,{title:`${Vt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Vt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Pe.createElement("ul",{className:"markdown-toolbar-container"},!vn&&Ht.map((Jt,Xn)=>Pe.createElement("li",{key:Xn},Jt.actionName?Pe.createElement(De,xe(pe({},Jt),{onActionCallback:Mn})):Pe.createElement("span",{className:"v-line"}))),Kt?Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Mn},Pe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,zt?Pe.createElement(Pe.Fragment,null,Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Mn},Pe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Mn},Pe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vr&&Pe.createElement("li",null,Pe.createElement(De,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vr}`,onActionCallback:Mn},Pe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Wn&&Pe.createElement("li",null,Wn),Pe.createElement("li",{className:"btn-full-screen"},Pe.createElement(De,{icon:`${Vn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Vn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Mn})))},Te=pt(51498),Me=pt(28284),Be=pt(37568),Ge=pt(99571),Ye=Object.defineProperty,Ke=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,St=(Vt,Kt,zt)=>Kt in Vt?Ye(Vt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:zt}):Vt[Kt]=zt,Qe=(Vt,Kt)=>{for(var zt in Kt||(Kt={}))ut.call(Kt,zt)&&St(Vt,zt,Kt[zt]);if(ot)for(var zt of ot(Kt))ft.call(Kt,zt)&&St(Vt,zt,Kt[zt]);return Vt},rt=(Vt,Kt)=>Ke(Vt,Ve(Kt));const wt={labelCol:{span:4},wrapperCol:{span:20}};var Ct=({callback:Vt,onCancel:Kt})=>{function zt(Mn){Vt(Mn)}return st.createElement(Me.default,rt(Qe({},wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:zt,style:{width:500}}),st.createElement(Me.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},st.createElement(Be.default,null)),st.createElement(Me.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},st.createElement(Be.default,null)),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Ge.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},bt=pt(41539),ct=pt(35944),xt=pt(62957),dt=pt(77019),Mt=pt(89837),yt=pt(59301),Ft=({callback:Vt,onCancel:Kt})=>{const zt=document.createElement("canvas"),Mn=zt.getContext("2d");zt.width=1e3,zt.height=800,Mn.fillStyle="#ffffff",Mn.fillRect(0,0,zt.width,zt.height);const Vn=zt.toDataURL("image/png");return yt.createElement(xt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},yt.createElement(dt.Z,{style:{height:"100vh"}},yt.createElement(Mt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Vn,visible:!0,title:String(Date.now())},onOk:vr=>{Vt({src:vr.url})},onClose:Kt})))},mt=pt(12378);function vt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(vt,go.CommandHandler),vt.prototype.canAlignSelection=function(){var Vt=this.diagram;return!(Vt===null||Vt.isReadOnly||Vt.isModelReadOnly||Vt.selection.count<2)},vt.prototype.alignLeft=function(){var Vt=this.diagram;Vt.startTransaction("aligning left");var Kt=1/0;Vt.selection.each(function(zt){zt instanceof go.Link||(Kt=Math.min(zt.position.x,Kt))}),Vt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(Kt,zt.position.y))}),Vt.commitTransaction("aligning left")},vt.prototype.alignRight=function(){var Vt=this.diagram;Vt.startTransaction("aligning right");var Kt=-1/0;Vt.selection.each(function(zt){if(!(zt instanceof go.Link)){var Mn=zt.actualBounds.x+zt.actualBounds.width;Kt=Math.max(Mn,Kt)}}),Vt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(Kt-zt.actualBounds.width,zt.position.y))}),Vt.commitTransaction("aligning right")},vt.prototype.alignTop=function(){var Vt=this.diagram;Vt.startTransaction("alignTop");var Kt=1/0;Vt.selection.each(function(zt){zt instanceof go.Link||(Kt=Math.min(zt.position.y,Kt))}),Vt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(zt.position.x,Kt))}),Vt.commitTransaction("alignTop")},vt.prototype.alignBottom=function(){var Vt=this.diagram;Vt.startTransaction("aligning bottom");var Kt=-1/0;Vt.selection.each(function(zt){if(!(zt instanceof go.Link)){var Mn=zt.actualBounds.y+zt.actualBounds.height;Kt=Math.max(Mn,Kt)}}),Vt.selection.each(function(zt){zt instanceof go.Link||zt.move(new go.Point(zt.actualBounds.x,Kt-zt.actualBounds.height))}),Vt.commitTransaction("aligning bottom")},vt.prototype.alignCenterX=function(){var Vt=this.diagram,Kt=Vt.selection.first();if(Kt){Vt.startTransaction("aligning Center X");var zt=Kt.actualBounds.x+Kt.actualBounds.width/2;Vt.selection.each(function(Mn){Mn instanceof go.Link||Mn.move(new go.Point(zt-Mn.actualBounds.width/2,Mn.actualBounds.y))}),Vt.commitTransaction("aligning Center X")}},vt.prototype.alignCenterY=function(){var Vt=this.diagram,Kt=Vt.selection.first();if(Kt){Vt.startTransaction("aligning Center Y");var zt=Kt.actualBounds.y+Kt.actualBounds.height/2;Vt.selection.each(function(Mn){Mn instanceof go.Link||Mn.move(new go.Point(Mn.actualBounds.x,zt-Mn.actualBounds.height/2))}),Vt.commitTransaction("aligning Center Y")}},vt.prototype.alignColumn=function(Vt){var Kt=this.diagram;Kt.startTransaction("align Column"),Vt===void 0&&(Vt=0),Vt=parseFloat(Vt);var zt=new Array;Kt.selection.each(function(Wn){Wn instanceof go.Link||zt.push(Wn)});for(var Mn=0;Mn<zt.length-1;Mn++){var Vn=zt[Mn],vr=Vn.actualBounds.y+Vn.actualBounds.height+Vt,vn=zt[Mn+1];vn.move(new go.Point(Vn.actualBounds.x,vr))}Kt.commitTransaction("align Column")},vt.prototype.alignRow=function(Vt){Vt===void 0&&(Vt=0),Vt=parseFloat(Vt);var Kt=this.diagram;Kt.startTransaction("align Row");var zt=new Array;Kt.selection.each(function(Wn){Wn instanceof go.Link||zt.push(Wn)});for(var Mn=0;Mn<zt.length-1;Mn++){var Vn=zt[Mn],vr=Vn.actualBounds.x+Vn.actualBounds.width+Vt,vn=zt[Mn+1];vn.move(new go.Point(vr,Vn.actualBounds.y))}Kt.commitTransaction("align Row")},vt.prototype.canRotate=function(Vt){var Kt=this.diagram;return!(Kt===null||Kt.isReadOnly||Kt.isModelReadOnly||Kt.selection.count<1)},vt.prototype.rotate=function(Vt){Vt===void 0&&(Vt=90);var Kt=this.diagram;Kt.startTransaction("rotate "+Vt.toString());var Kt=this.diagram;Kt.selection.each(function(zt){zt instanceof go.Link||zt instanceof go.Group||(zt.angle+=Vt)}),Kt.commitTransaction("rotate "+Vt.toString())},vt.prototype.pullToFront=function(){var Vt=this.diagram;Vt.startTransaction("pullToFront");var Kt=new go.Map;Vt.selection.each(function(zt){Kt.set(zt.layer,0)}),Kt.iteratorKeys.each(function(zt){var Mn=0;zt.parts.each(function(Vn){if(!Vn.isSelected){var vr=Vn.zOrder;isNaN(vr)?Vn.zOrder=0:Mn=Math.max(Mn,vr)}}),Kt.set(zt,Mn)}),Vt.selection.each(function(zt){vt._assignZOrder(zt,Kt.get(zt.layer)+1)}),Vt.commitTransaction("pullToFront")},vt.prototype.pushToBack=function(){var Vt=this.diagram;Vt.startTransaction("pushToBack");var Kt=new go.Map;Vt.selection.each(function(zt){Kt.set(zt.layer,0)}),Kt.iteratorKeys.each(function(zt){var Mn=0;zt.parts.each(function(Vn){if(!Vn.isSelected){var vr=Vn.zOrder;isNaN(vr)?Vn.zOrder=0:Mn=Math.min(Mn,vr)}}),Kt.set(zt,Mn)}),Vt.selection.each(function(zt){vt._assignZOrder(zt,Kt.get(zt.layer)-1-vt._findGroupDepth(zt))}),Vt.commitTransaction("pushToBack")},vt._assignZOrder=function(Vt,Kt,zt){zt===void 0&&(zt=Vt),Vt.layer===zt.layer&&(Vt.zOrder=Kt),Vt instanceof go.Group&&Vt.memberParts.each(function(Mn){vt._assignZOrder(Mn,Kt+1,zt)})},vt._findGroupDepth=function(Vt){if(Vt instanceof go.Group){var Kt=0;return Vt.memberParts.each(function(zt){Kt=Math.max(Kt,vt._findGroupDepth(zt))}),Kt+1}else return 0},vt.prototype.doKeyDown=function(){var Vt=this.diagram;if(Vt!==null){var Kt=Vt.lastInput;if(Kt.key==="Up"||Kt.key==="Down"||Kt.key==="Left"||Kt.key==="Right"){var zt=this.arrowKeyBehavior;if(zt==="none")return;if(zt==="select"){this._arrowKeySelect();return}else if(zt==="move"){this._arrowKeyMove();return}else if(zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},vt.prototype._getAllParts=function(){var Vt=new Array;return this.diagram.nodes.each(function(Kt){Vt.push(Kt)}),this.diagram.parts.each(function(Kt){Vt.push(Kt)}),Vt},vt.prototype._arrowKeyMove=function(){var Vt=this.diagram,Kt=Vt.lastInput,zt=0,Mn=0;if(Kt.control||Kt.meta)zt=1,Mn=1;else if(Vt.grid!==null){var Vn=Vt.grid.gridCellSize;Mn=Vn.width,zt=Vn.height}Vt.startTransaction("arrowKeyMove"),Vt.selection.each(function(vr){Kt.key==="Up"?vr.move(new go.Point(vr.actualBounds.x,vr.actualBounds.y-zt)):Kt.key==="Down"?vr.move(new go.Point(vr.actualBounds.x,vr.actualBounds.y+zt)):Kt.key==="Left"?vr.move(new go.Point(vr.actualBounds.x-Mn,vr.actualBounds.y)):Kt.key==="Right"&&vr.move(new go.Point(vr.actualBounds.x+Mn,vr.actualBounds.y))}),Vt.commitTransaction("arrowKeyMove")},vt.prototype._arrowKeySelect=function(){var Vt=this.diagram,Kt=Vt.lastInput,zt=null;Kt.key==="Up"?zt=this._findNearestPartTowards(270):Kt.key==="Down"?zt=this._findNearestPartTowards(90):Kt.key==="Left"?zt=this._findNearestPartTowards(180):Kt.key==="Right"&&(zt=this._findNearestPartTowards(0)),zt!==null&&(Kt.shift?zt.isSelected=!0:Kt.control||Kt.meta?zt.isSelected=!zt.isSelected:Vt.select(zt))},vt.prototype._findNearestPartTowards=function(Vt){var Kt=this.diagram.selection.first();if(Kt===null)return null;for(var zt=Kt.actualBounds.center,Mn=this._getAllParts(),Vn=1/0,vr=Kt,vn=0;vn<Mn.length;vn++){var Wn=Mn[vn];if(Wn!==Kt&&Wn.canSelect()){var Ht=Wn.actualBounds.center,Jt=zt.directionPoint(Ht),Xn=this._angleCloseness(Jt,Vt);if(Xn<=45){var jt=zt.distanceSquaredPoint(Ht);jt*=1+Math.sin(Xn*Math.PI/180),jt<Vn&&(Vn=jt,vr=Wn)}}}return vr},vt.prototype._angleCloseness=function(Vt,Kt){return Math.min(Math.abs(Kt-Vt),Math.min(Math.abs(Kt+360-Vt),Math.abs(Kt-360-Vt)))},vt.prototype._arrowKeyTree=function(){var Vt=this.diagram,Kt=Vt.selection.first();if(Kt instanceof go.Node){var zt=Vt.lastInput;if(zt.key==="Right"){if(!Kt.isTreeLeaf)if(!Kt.isTreeExpanded)Vt.commandHandler.canExpandTree(Kt)&&Vt.commandHandler.expandTree(Kt);else{var Mn=this._sortTreeChildrenByY(Kt).first();Mn!==null&&Vt.select(Mn)}}else if(zt.key==="Left")if(!Kt.isTreeLeaf&&Kt.isTreeExpanded)Vt.commandHandler.canCollapseTree(Kt)&&Vt.commandHandler.collapseTree(Kt);else{var Vn=Kt.findTreeParentNode();Vn!==null&&Vt.select(Vn)}else if(zt.key==="Up"){var Vn=Kt.findTreeParentNode();if(Vn!==null){var vr=this._sortTreeChildrenByY(Vn),vn=vr.indexOf(Kt);if(vn>0){for(var Wn=vr.elt(vn-1);Wn!==null&&Wn.isTreeExpanded&&!Wn.isTreeLeaf;){var Ht=this._sortTreeChildrenByY(Wn);Wn=Ht.last()}Wn!==null&&Vt.select(Wn)}else Vt.select(Vn)}}else if(zt.key==="Down")if(Kt.isTreeExpanded&&!Kt.isTreeLeaf){var Mn=this._sortTreeChildrenByY(Kt).first();Mn!==null&&Vt.select(Mn)}else for(;Kt!==null;){var Vn=Kt.findTreeParentNode();if(Vn===null)break;var vr=this._sortTreeChildrenByY(Vn),vn=vr.indexOf(Kt);if(vn<vr.length-1){Vt.select(vr.elt(vn+1));break}else Kt=Vn}var Jt=Vt.selection.first();Jt!==null&&Vt.scrollToRect(Jt.actualBounds)}},vt.prototype._sortTreeChildrenByY=function(Vt){var Kt=new go.List().addAll(Vt.findTreeChildrenNodes());return Kt.sort(function(zt,Mn){var Vn=zt.location,vr=Mn.location;return Vn.y<vr.y?-1:Vn.y>vr.y?1:Vn.x<vr.x?-1:Vn.x>vr.x?1:0}),Kt},vt.prototype.copyToClipboard=function(Vt){go.CommandHandler.prototype.copyToClipboard.call(this,Vt),this._lastPasteOffset.set(this.pasteOffset)},vt.prototype.pasteFromClipboard=function(){var Vt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Vt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Vt},Object.defineProperty(vt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Vt){if(Vt!=="move"&&Vt!=="select"&&Vt!=="scroll"&&Vt!=="tree"&&Vt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Vt);this._arrowKeyBehavior=Vt}}),Object.defineProperty(vt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Vt){if(!(Vt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Vt);this._pasteOffset.set(Vt)}});var tt=vt,He=pt(74042),we=pt(5269),Ne=pt(52430),Xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},nt=pt(64681),Ie=pt(59301),Re=(Vt,Kt,zt)=>new Promise((Mn,Vn)=>{var vr=Ht=>{try{Wn(zt.next(Ht))}catch(Jt){Vn(Jt)}},vn=Ht=>{try{Wn(zt.throw(Ht))}catch(Jt){Vn(Jt)}},Wn=Ht=>Ht.done?Mn(Ht.value):Promise.resolve(Ht.value).then(vr,vn);Wn((zt=zt.apply(Vt,Kt)).next())});function Ze({onCancel:Vt,callback:Kt}){let zt=(0,st.useRef)(),Mn=(0,st.useRef)(),Vn=(0,st.useRef)(),vr=(0,st.useRef)(!1);const vn=(0,st.useRef)(!1),[Wn,Ht]=(0,st.useState)(0);function Jt(){const jt=mt.bx.make,ln={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"};zt.current=new mt.S0(Mn.current,{padding:20,grid:jt(mt.s_,"Grid",jt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),jt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:qn=>{var rr=qn.diagram.commandHandler.addTopLevelParts(qn.diagram.selection,!0);rr||qn.diagram.currentTool.doCancel()},commandHandler:jt(tt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:qn=>{var rr=qn.subject;rr.location=rr.location.copy().snapToGridPoint(qn.diagram.grid.gridOrigin,qn.diagram.grid.gridCellSize),setTimeout(()=>{qn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:qn=>{var rr=qn.subject;setTimeout(()=>{qn.diagram.commandHandler.editTextBlock()})},LinkRelinked:qn=>{var rr=qn.parameter.part;rr.invalidateConnectedLinks();var pr=qn.subject;qn.diagram.toolManager.linkingTool.isForwards?pr.toNode.invalidateConnectedLinks():pr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),zt.current.nodeTemplate=jt(mt.NB,"Auto",{locationSpot:mt.z6.Center,locationObjectName:"SHAPE",desiredSize:new mt.$u(120,60),minSize:new mt.$u(40,40),resizable:!0,resizeCellSize:new mt.$u(10,10),rotatable:!0},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),new mt.KX("desiredSize","size",mt.$u.parse).makeTwoWay(mt.$u.stringify),jt(mt.bn,{name:"SHAPE",fill:ln.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("figure"),new mt.KX("fill"),new mt.KX("stroke","borderColor"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),jt(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),zt.current.nodeTemplate.toolTip=jt("ToolTip",jt(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},jt(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),jt(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function Nn(qn,rr){var pr=(wr,Ar)=>{wr.handled=!0,wr.diagram.model.commit(Kr=>{var Qr=Ar.part.adornedPart,qr=new mt.E9().setRectSpot(Qr.actualBounds,qn);qr.subtract(Qr.location),qr.scale(2,2),qr.x+=Math.sign(qr.x)*130,qr.y+=Math.sign(qr.y)*130,qr.add(Qr.location),qr.snapToGridPoint(wr.diagram.grid.gridOrigin,wr.diagram.grid.gridCellSize);var lr=Kr.copyNodeData(Qr.data);Kr.setGroupKeyForNodeData(lr,Kr.getGroupKeyForNodeData(Qr.data)),Kr.addNodeData(lr);var rn={from:Qr.key,to:Kr.getKeyForNodeData(lr)};Kr.addLinkData(rn);var ir=wr.diagram.findNodeForData(lr);ir.location=qr,wr.diagram.select(ir),setTimeout(()=>{wr.diagram.commandHandler.editTextBlock()},20)})};return jt(mt.bn,{figure:rr,alignment:qn,alignmentFocus:qn.opposite(),width:qn.equals(mt.z6.Top)||qn.equals(mt.z6.Bottom)?25:18,height:qn.equals(mt.z6.Top)||qn.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:ln.white,strokeWidth:4,mouseEnter:(wr,Ar)=>Ar.fill="dodgerblue",mouseLeave:(wr,Ar)=>Ar.fill="orange",isActionable:!0,click:pr,contextClick:pr})}function Yn(qn){return jt(mt.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:(rr,pr)=>pr.fill="dodgerblue",mouseLeave:(rr,pr)=>pr.fill="orange",click:(rr,pr)=>{rr.diagram.commandHandler.showContextMenu(pr.part.adornedPart)}},qn||{})}zt.current.nodeTemplate.selectionAdornmentTemplate=jt(mt.uz,"Spot",jt(mt.Vm,{padding:10}),Nn(mt.z6.Top,"TriangleUp"),Nn(mt.z6.Left,"TriangleLeft"),Nn(mt.z6.Right,"TriangleRight"),Nn(mt.z6.Bottom,"TriangleDown"),Yn({alignment:new mt.z6(.75,0)}));function sn(qn,rr){return(pr,wr)=>{pr.handled=!0,pr.diagram.model.commit(Ar=>{Ar.set(wr.part.adornedPart.data,qn,rr)})}}function Dn(qn,rr){return rr||(rr="color"),jt(mt.bn,{width:16,height:16,stroke:"lightgray",fill:qn,margin:1,background:"transparent",mouseEnter:(pr,wr)=>wr.stroke="dodgerblue",mouseLeave:(pr,wr)=>wr.stroke="lightgray",click:sn(rr,qn),contextClick:sn(rr,qn)})}function Jn(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",Dn(ln.white,"fill"),Dn(ln.beige,"fill"),Dn(ln.extralightblue,"fill"),Dn(ln.extralightred,"fill"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",Dn(ln.lightgray,"fill"),Dn(ln.lightgreen,"fill"),Dn(ln.lightblue,"fill"),Dn(ln.lightred,"fill")))]}function jn(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",Dn(ln.black),Dn(ln.green),Dn(ln.blue),Dn(ln.red))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",Dn(ln.white),Dn(ln.magenta),Dn(ln.purple),Dn(ln.orange)))]}function Bn(qn,rr){return rr||(rr="thickness"),jt(mt.bn,"LineH",{width:16,height:16,strokeWidth:qn,margin:1,background:"transparent",mouseEnter:(pr,wr)=>wr.background="dodgerblue",mouseLeave:(pr,wr)=>wr.background="transparent",click:sn(rr,qn),contextClick:sn(rr,qn)})}function er(qn,rr){return rr||(rr="dash"),jt(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:qn,margin:1,background:"transparent",mouseEnter:(pr,wr)=>wr.background="dodgerblue",mouseLeave:(pr,wr)=>wr.background="transparent",click:sn(rr,qn),contextClick:sn(rr,qn)})}function _n(){return[jt("ContextMenuButton",jt(mt.s_,"Horizontal",Bn(1),Bn(2),Bn(3),Bn(4))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",er(null),er([2,4]),er([4,4])))]}function sr(qn,rr){return rr||(rr="figure"),jt(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:qn,margin:1,background:"transparent",mouseEnter:(pr,wr)=>wr.fill="dodgerblue",mouseLeave:(pr,wr)=>wr.fill="lightgray",click:sn(rr,qn),contextClick:sn(rr,qn)})}zt.current.nodeTemplate.contextMenu=jt("ContextMenu",jt("ContextMenuButton",jt(mt.s_,"Horizontal",sr("Rectangle"),sr("RoundedRectangle"),sr("Ellipse"),sr("Diamond"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",sr("Parallelogram2"),sr("ManualOperation"),sr("Procedure"),sr("Cylinder1"))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",sr("Terminator"),sr("CreateRequest"),sr("Document"),sr("TriangleDown"))),Jn(),jn(),_n()),zt.current.groupTemplate=jt(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(qn,rr)=>{var pr=rr.addMembers(rr.diagram.selection,!0);pr||rr.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),jt(mt.s_,"Auto",{name:"BODY"},jt(mt.bn,{parameter1:10,fill:ln.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("fill"),new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.Vm,{background:"transparent",margin:20})),jt(mt.al,{alignment:mt.z6.Top,alignmentFocus:mt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new mt.KX("text"),new mt.KX("stroke","color"))),zt.current.groupTemplate.selectionAdornmentTemplate=jt(mt.uz,"Spot",jt(mt.s_,"Auto",jt(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),jt(mt.Vm,{margin:1.5})),Yn({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),zt.current.groupTemplate.contextMenu=jt("ContextMenu",Jn(),jn(),_n()),zt.current.linkTemplate=jt(mt.rU,{layerName:"Foreground",routing:mt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new mt.KX("fromSpot","fromSpot",mt.z6.parse),new mt.KX("toSpot","toSpot",mt.z6.parse),new mt.KX("fromShortLength","dir",qn=>qn>=1?10:0),new mt.KX("toShortLength","dir",qn=>qn>=1?10:0),new mt.KX("points").makeTwoWay(),jt(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),jt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,0),segmentOrientation:mt.rU.OrientAlong,alignmentFocus:mt.z6.Right,figure:"circle",width:10,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",qn=>qn===1)),jt(mt.bn,{segmentIndex:-1,segmentOffset:new mt.E9(-10,6),segmentOrientation:mt.rU.OrientPlus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",qn=>qn>=1),new mt.KX("width","thickness",qn=>7+3*qn),new mt.KX("height","thickness",qn=>7+3*qn),new mt.KX("segmentOffset","thickness",qn=>new mt.E9(-15,4+1.5*qn))),jt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,-6),segmentOrientation:mt.rU.OrientMinus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",qn=>qn===2),new mt.KX("width","thickness",qn=>7+3*qn),new mt.KX("height","thickness",qn=>7+3*qn),new mt.KX("segmentOffset","thickness",qn=>new mt.E9(-15,4+1.5*qn))),jt(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),zt.current.linkTemplate.selectionAdornmentTemplate=jt(mt.uz,jt(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Fr(2)},new mt.KX("pathPattern","thickness",Fr)),Yn({alignmentFocus:new mt.z6(0,0,-6,-4)}));function Fr(qn){return jt(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(qn+4).toString()+" H3"})}function zr(qn){var rr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return qn===0?rr="M0 0 M16 16 M0 8 L16 8":qn===2&&(rr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),jt(mt.bn,{geometryString:rr,margin:2,background:"transparent",mouseEnter:(pr,wr)=>wr.background="dodgerblue",mouseLeave:(pr,wr)=>wr.background="transparent",click:sn("dir",qn),contextClick:sn("dir",qn)})}function Dr(qn){var rr=(pr,wr)=>{pr.handled=!0,pr.diagram.model.commit(Ar=>{var Kr=wr.part.adornedPart;Ar.set(Kr.data,qn?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(qn?Kr.toNode:Kr.fromNode).invalidateConnectedLinks()})};return jt(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(pr,wr)=>wr.background="dodgerblue",mouseLeave:(pr,wr)=>wr.background="transparent",click:rr,contextClick:rr})}function pn(qn,rr){var pr=0,wr=mt.z6.RightSide;qn.equals(mt.z6.Top)?(pr=270,wr=mt.z6.TopSide):qn.equals(mt.z6.Left)?(pr=180,wr=mt.z6.LeftSide):qn.equals(mt.z6.Bottom)&&(pr=90,wr=mt.z6.BottomSide),rr||(pr-=180);var Ar=(Kr,Qr)=>{Kr.handled=!0,Kr.diagram.model.commit(qr=>{var lr=Qr.part.adornedPart;qr.set(lr.data,rr?"toSpot":"fromSpot",mt.z6.stringify(wr)),(rr?lr.toNode:lr.fromNode).invalidateConnectedLinks()})};return jt(mt.bn,{alignment:qn,alignmentFocus:qn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:pr,background:"transparent",mouseEnter:(Kr,Qr)=>Qr.background="dodgerblue",mouseLeave:(Kr,Qr)=>Qr.background="transparent",click:Ar,contextClick:Ar})}zt.current.linkTemplate.contextMenu=jt("ContextMenu",jn(),_n(),jt("ContextMenuButton",jt(mt.s_,"Horizontal",zr(0),zr(1),zr(2))),jt("ContextMenuButton",jt(mt.s_,"Horizontal",jt(mt.s_,"Spot",Dr(!1),pn(mt.z6.Top,!1),pn(mt.z6.Left,!1),pn(mt.z6.Right,!1),pn(mt.z6.Bottom,!1)),jt(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},Dr(!0),pn(mt.z6.Top,!0),pn(mt.z6.Left,!0),pn(mt.z6.Right,!0),pn(mt.z6.Bottom,!0)))));const Ni=`{ "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 ni=["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 ki(qn){return console.log("shapeName:",qn),ni.indexOf(qn)>=0}var hn=new mt.YI(Vn.current,{maxSelectionCount:1,linkTemplate:jt(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:jt(mt.uz,"Link",{locationSpot:mt.z6.Center},jt(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),jt(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),jt(mt.bn,{isPanelMain:!0,strokeWidth:2}),jt(mt.bn,{toArrow:"Standard",stroke:null})),model:new mt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...mt.bn.getFigureGenerators().toArray().map(qn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:qn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return zt.current.addDiagramListener("TextEdited",function(qn){var rr;const pr=qn.subject.part;var wr=(rr=document.activeElement)==null?void 0:rr.value;typeof wr=="string"&&wr.trim()===""&&zt.current.model.commit(function(Ar){Ar.set(pr.data,"text","\u672A\u547D\u540D"),zt.current.commandHandler.stopCommand()},"increment")}),hn.nodeTemplate=jt(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),jt(mt.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 mt.KX("stroke").makeTwoWay(),new mt.KX("fill").makeTwoWay(),new mt.KX("figure")),jt(mt.al,{margin:new mt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new mt.$u(16,16),maxSize:new mt.$u(10,NaN),textAlign:"center",editable:!0},new mt.KX("key").makeTwoWay())),setTimeout(()=>{zt.current.grid=jt(mt.s_,"Grid",jt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),jt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),zt.current.grid.visible=!0,zt.current.grid.gridCellStroke="darkgray",zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=zt.current,zt.current}const Xn=()=>Re(this,null,function*(){var jt,ln=zt.current.makeImage();const Nn=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:ln.src,file_data:JSON.stringify({login:(jt=(0,nt.eY)())==null?void 0:jt.login,data:JSON.parse(zt.current.model.toJson())})}});Kt({src:Nn.url})});return(0,st.useEffect)(()=>(setTimeout(()=>{Jt()},500),Ht(Wn+1),()=>{zt.current=null}),[]),Ie.createElement("div",{ref:vn,className:"body-overflow-initial"},Ie.createElement(xt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Wn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ie.createElement(dt.Z,null,Ie.createElement(we.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ie.createElement(we.Z,{onClick:()=>{var jt,ln,Nn=zt.current.selection.first();if(vr.current=!vr.current,document.activeElement&&Nn){let Yn=(ln=(jt=document.activeElement)==null?void 0:jt.value)==null?void 0:ln.trim();typeof Yn=="string"&&zt.current.model.commit(function(sn){sn.set(Nn.data,"text",Yn||"\u672A\u547D\u540D"),zt.current.commandHandler.stopCommand()},"increment")}Ht(Wn+1)}},Ie.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Vt},Ie.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:vr.current?"none":"block"},className:Xe.flowChartWrp},Ie.createElement("div",{style:{display:"flex",height:"100%"}},Ie.createElement("div",{style:{width:"300px",height:"100%"}},Ie.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ie.createElement("div",{style:{height:"calc(100% - 50px)"},className:Xe.myPaletteDiv,ref:Vn})),Ie.createElement("div",{style:{flex:1,position:"relative"}},Ie.createElement("div",{ref:Mn,style:{height:"80vh"}}))),Ie.createElement("div",{className:"tr"},Ie.createElement(Ge.ZP,{size:"large",onClick:Xn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var et=Ze,ht=pt(47889),at=pt(71051);const Dt=ht.ZP.Group,Et={margin:"0 8px"};var Ot=({callback:Vt,onCancel:Kt})=>{function zt(Mn){Vt(Mn)}return st.createElement(Me.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:zt},st.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},st.createElement("span",{style:Et},"\u5355\u5143\u683C\u6570\uFF1A"),st.createElement("span",{style:Et},"\u884C\u6570"),st.createElement(Me.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},st.createElement(at.Z,null)),st.createElement("span",{style:Et},"\u5217\u6570"),st.createElement(Me.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},st.createElement(at.Z,null))),st.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},st.createElement("span",{style:Et},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),st.createElement(Me.default.Item,{name:"align"},st.createElement(Dt,null,st.createElement(ht.ZP,{value:"default"},st.createElement("i",{className:"fa fa-align-justify"})),st.createElement(ht.ZP,{value:"left"},st.createElement("i",{className:"fa fa-align-left"})),st.createElement(ht.ZP,{value:"center"},st.createElement("i",{className:"fa fa-align-center"})),st.createElement(ht.ZP,{value:"right"},st.createElement("i",{className:"fa fa-align-right"}))))),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Ge.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},qt=pt(71411),Qt=pt(84072),Xt=pt.n(Qt),un=(0,st.forwardRef)(({use3d:Vt,width:Kt,height:zt,callback:Mn,showSaveButton:Vn},vr)=>{const vn=(0,st.useRef)(),Wn=(0,st.useRef)(),[Ht,Jt]=(0,st.useState)(!1),Xn=(0,st.useRef)({id:vn,appName:"graphing",width:Kt||1e3,height:zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,st.useEffect)(()=>{Wn.current=new(Xt())(Xn.current,!0),window.onload=function(){Wn.current.inject("applet_container")}},[]);const jt=()=>{var ln=window.ggbApplet.getPNGBase64(1,!0,72);return Mn&&Mn(ln),ln};return(0,st.useEffect)(()=>{Xn.current.appName=Ht?"3D":"graphing",Wn.current.inject("applet_container")},[Ht]),(0,st.useEffect)(()=>{Jt(Vt)},[Vt]),(0,st.useImperativeHandle)(vr,()=>({getImgData:jt})),st.createElement(st.Fragment,null,st.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:vn}),st.createElement(dt.Z,{align:"middle"},st.createElement(we.Z,{flex:1},st.createElement(qt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ht,onChange:ln=>Jt(ln)})),st.createElement(we.Z,null,st.createElement(Ge.ZP,{size:"large",onClick:jt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),on=pt(53267),cn=pt(6767);const bn="link",xn="upload-image",kn="add-flowchart",On="draw-image",_r="add-flowchart",xr="code-block",$r="add-table",tr="------------",ii={default:tr,left:`:${tr}`,center:`:${tr}:`,right:`${tr}:`};var di=pt(47458);function li(){}let Mi=0;const yi=1e4,Jr="\u2581",Li="@\u2581\u2581@",qe="@\u2581@",Mr=`
|
|
**\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`,Lr=["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 br(Vt){return/^\d+$/.test(Vt)?`${Vt}px`:Vt}const kr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Hi={[kr+"-B"]:"bold",[kr+"-I"]:"italic"},gr={[bn]:"\u6DFB\u52A0\u94FE\u63A5",[xr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[xn]:"\u6DFB\u52A0\u56FE\u7247",[On]:"\u6DFB\u52A0\u753B\u56FE",[kn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[$r]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var nr=({defaultValue:Vt="",onChange:Kt,width:zt="100%",height:Mn=400,miniToolbar:Vn=!1,isFocus:vr=!1,watch:vn,insertTemp:Wn,mode:Ht="markdown",id:Jt="markdown-editor-id",showResizeBar:Xn=!1,noStorage:jt=!1,showNullButton:ln=!1,showNullProgramButton:Nn=!1,hidetoolBar:Yn=!1,fullScreen:sn=!1,onBlur:Dn,onCMBeforeChange:Jn,onFullScreen:jn,className:Bn="",disablePaste:er=!1,disabled:_n=!1,disabledFill:sr=!1,placeholder:Fr="",values:zr="",extraUse:Dr})=>{const[pn,Ni]=(0,st.useState)(null),[ni,ki]=(0,st.useState)(Vt),[hn,qn]=(0,st.useState)(vn),[rr,pr]=(0,st.useState)(sn),[wr,Ar]=(0,st.useState)(""),[Kr,Qr]=(0,st.useState)(0),[qr,lr]=(0,st.useState)(Mn),[rn,ir]=(0,st.useState)(!1),[an,cr]=(0,st.useState)(0),[Cr,Gr]=(0,st.useState)(0),Ri=(0,st.useRef)(),Fi=(0,st.useRef)(),Si=(0,st.useRef)(),Di=(0,st.useRef)();(0,st.useEffect)(()=>{const yr=window.scrollY||window.pageYOffset;ki(zr),pn==null||pn.setValue(zr),window.scrollTo(0,yr)},[zr]),(0,st.useEffect)(()=>{jn==null||jn(rr)},[rr]),(0,st.useEffect)(()=>{if(Ri.current){let yr=function(mn,dr){var Or;if(er){dr.preventDefault();return}const oi=dr.clipboardData;if(oi){const ei=oi.types.toString(),ui=oi.items;if(ei==="Files"||oi.types.indexOf("Files")>-1){if(dr.preventDefault(),Ht=="stex")return;try{let pi=ui[1];((Or=ui[0])==null?void 0:Or.kind)==="file"&&(pi=ui[0]);const hi=pi.getAsFile(),_i=hi.name.split(".").pop();(0,ct.I)(hi,zi=>{var mo,$t,vi;zi.id?((mo=hi==null?void 0:hi.type)==null?void 0:mo.indexOf("image"))>-1?ur.replaceSelection(`<img width="100%" src="/api/attachments/${zi.id}?type=${zi.content_type})" alt="" />`):(($t=hi==null?void 0:hi.type)==null?void 0:$t.indexOf("video"))>-1?ur.replaceSelection(`<video width="100%" controls src="/api/attachments/${zi.id}"></video>`):((vi=hi==null?void 0:hi.type)==null?void 0:vi.indexOf("pdf"))>-1?ur.replaceSelection(`<a href="/api/attachments/${zi.id}?type=${hi.type}&disposition=inline" target="_blank">${hi.name}</a>`):Lr.includes(_i)?ur.replaceSelection(`<a href="/api/attachments/${zi.id}?type=office&disposition=inline" target="_blank">${hi.name}</a>`):ur.replaceSelection(`[${hi.name}](/api/attachments/${zi.id}?type=${zi.content_type})`):(zi==null?void 0:zi.status)===401&&(document.location.href="/user/login")})}catch(pi){cn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ur=oe().fromTextArea(Ri.current,{mode:Ht,lineNumbers:!Vn,lineWrapping:!0,value:Vt,autoCloseTags:!0,autoCloseBrackets:!0});return ur.on("keyup",function(mn,dr){dr.keyCode===8&&(mn.getValue()==""?ur.setOption("placeholder",Fr):ur.setOption("placeholder",null))}),ur.on("keydown",function(mn,dr){if(dr.keyCode===8){var Or=dn(mn);Or&&dr.preventDefault()}}),vr&&ur.focus(),ur.on("paste",yr),_n&&ur.on("beforeChange",function(mn,dr){(dr.origin==="paste"||dr.origin==="+input")&&dr.cancel()}),Ni(ur),()=>{ur.off("paste",yr)}}},[]);const en=(0,st.useCallback)(()=>{if(Fi.current)try{}catch(yr){console.log(yr,"---- to set md editor body height")}},[qr,Fi,rr]);(0,st.useEffect)(()=>{function yr(){let ur=new Ue.Z(mn=>{for(let dr of mn)(dr.target.offsetHeight>0||dr.target.offsetWidth>0)&&(en(),pn.setSize("100%","100%"),pn.refresh())});return ur.observe(Ri.current.parentElement),ur}if(pn){const ur=yr();return()=>{var mn,dr;(mn=Ri.current)!=null&&mn.parentElement&&ur.unobserve((dr=Ri.current)==null?void 0:dr.parentElement)}}},[pn,en]),(0,st.useEffect)(()=>{if(pn){let yr=[];for(const[ur,mn]of Object.entries(Hi)){let dr={[ur]:()=>{tn(mn)}};yr.push(dr),pn.addKeyMap(dr)}return()=>{for(let ur of yr)pn.removeKeyMap(ur)}}},[pn]),(0,st.useEffect)(()=>{sn!==rr&&pr(sn)},[sn]),(0,di.Z)(()=>{if(!jt&&Kr>0){let yr=new Date().getTime(),ur=window.sessionStorage.getItem(Jt);yr>=Kr+yi&&(!ur||ur!==ni)&&(window.sessionStorage.setItem(Jt,ni),ir(!0))}},yi),(0,st.useEffect)(()=>{qn(vn)},[pn,vn]),(0,st.useEffect)(()=>{pn&&vr&&pn.focus()},[pn,vr]),(0,st.useEffect)(()=>{if(hn&&pn){let yr=function(mn){let dr=mn.target;if(Di.current){let Or=dr.scrollTop/dr.scrollHeight;Di.current.scrollTop=Di.current.scrollHeight*Or}};const ur=pn.getScrollerElement();return ur.addEventListener("scroll",yr),()=>{ur.removeEventListener("scroll",yr)}}},[pn,hn]),(0,st.useEffect)(()=>{if(pn&&Jn){let yr=function(ur,mn){Jn(ur,mn)};return pn.on("beforeChange",yr),()=>{pn.off("beforeChange",yr)}}},[pn,Jn]),(0,st.useEffect)(()=>{if(pn&&Dn){let yr=function(){Dn(pn.getValue())};return pn.on("blur",yr),()=>{pn.off("blur",yr)}}},[pn,Dn]);function dn(yr,ur){var mn=yr.getDoc(),dr=mn.getCursor(),Or=mn.getLine(dr.line),oi=Or.charAt(dr.ch-1),ei=Or.lastIndexOf("@\u2581@",dr.ch),ui=Or.lastIndexOf("@\u2581\u2581@",dr.ch),pi=ei>ui?ei:ui,hi=ei>ui?3:4;if(Li.indexOf(oi)===-1)return null;if(console.log("change1:",ur,yr,Or,dr,pi,ei,ui,oi),pi>=0&&dr.ch-pi<5){var _i=pi+hi;return mn.replaceRange("",{line:dr.line,ch:pi},{line:dr.line,ch:_i}),{line:dr.line,ch:_i}}return null}(0,st.useEffect)(()=>{if(pn){let yr=function(ur,mn){const dr=ur.getValue();ki(dr),Qr(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Kt&&(Nn?Kt(dr,Gn(dr)):Kt(dr))};return pn.on("change",yr),()=>{pn.off("change",yr)}}},[pn,Kt]),(0,st.useEffect)(()=>{if(pn)if(Vt==null)pn.setValue(""),ki("");else{const yr=window.scrollY||window.pageYOffset;Vt!==pn.getValue()&&(pn.setValue(Vt),ki(Vt),pn.setCursor(_n?1:pn.lineCount(),0),window.scrollTo(0,yr))}},[pn,Vt]);const tn=(0,st.useCallback)(yr=>{const ur=pn.getCursor(),mn=pn.getSelection();let dr=mn.split(`
|
|
`);switch(yr){case"bold":return pn.replaceSelection("**"+mn+"**"),mn===""&&pn.setCursor(ur.line,ur.ch+2),pn.focus();case"italic":return pn.replaceSelection("*"+mn+"*"),mn===""&&pn.setCursor(ur.line,ur.ch+1),pn.focus();case"code":return pn.replaceSelection("`"+mn+"`"),mn===""&&pn.setCursor(ur.line,ur.ch+1),pn.focus();case"inline-latex":return Ar("inline-latex"),pn.focus();case"latex":return pn.replaceSelection("```latex\n"+mn+"\n```"),pn.setCursor(ur.line+1,mn.length+1),pn.focus();case"line-break":return pn.replaceSelection(`<br/>
|
|
`),pn.focus();case"list-ul":return mn===""?pn.replaceSelection("- "+mn):pn.replaceSelection(dr.map(Or=>Or===""?"":`- ${Or}`).join(`
|
|
`)),pn.focus();case"list-ol":return mn===""?pn.replaceSelection("1. "+mn):pn.replaceSelection(dr.map((Or,oi)=>Or===""?"":`${oi+1}. ${Or}`).join(`
|
|
`)),pn.focus();case"add-null-ch":return mn===""&&pn.setCursor(ur.line,ur.ch),pn.replaceSelection(Jr),pn.focus();case"add-signal":return mn===""&&pn.setCursor(ur.line,ur.ch),pn.replaceSelection(qe),pn.focus();case"add-multiple":return mn===""&&pn.setCursor(ur.line,ur.ch),pn.replaceSelection(Li),pn.focus();case"inster-template-1":return mn===""&&pn.setCursor(ur.line,ur.ch),pn.replaceSelection(Mr),pn.focus();case"eraser":return pn.setValue(""),pn.focus();case"trigger-watch":return qn(!hn),pn.focus();case"trigger-full-screen":return pr(!rr),pn.focus();case bn:Ar(bn);return;case xr:Ar(xr);return;case xn:Ar(xn);return;case On:Ar(On);return;case"maths-latex":Ar("maths-latex");return;case kn:Ar(kn);return;case $r:Ar($r);return;default:throw new Error}},[pn,hn,rr]),lt=(0,st.useCallback)((yr,ur)=>{var mn,dr,Or,oi,ei,ui;switch(Ar(""),wr){case bn:const{title:mo,link:$t}=yr;return pn.replaceSelection(`[${mo}](${$t})`),pn.focus();case xr:const{language:vi,content:Ti}=yr;return pn.replaceSelection(["```"+vi,Ti,"```"].join(`
|
|
`)),pn.focus();case"maths-latex":for(var pi=atob(yr),hi=new Uint8Array(pi.length),_i=0;_i<pi.length;_i++)hi[_i]=pi.charCodeAt(_i);var zi=new Blob([hi],{type:"image/png"});(0,ct.I)(zi,Ao=>{Ao.id?pn.replaceSelection(``):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":pn.replaceSelection("`$$"+yr+"$$`");break;case xn:case On:case _r:const{src:Xr,alt:Pi}=yr,Wr=ur,eo=(Or=(dr=(mn=Wr==null?void 0:Wr.name)==null?void 0:mn.split("."))==null?void 0:dr.pop)==null?void 0:Or.call(dr);return((oi=Wr==null?void 0:Wr.type)==null?void 0:oi.indexOf("image"))>-1||!(Wr!=null&&Wr.type)?Wr!=null&&Wr.align||Wr!=null&&Wr.width?pn.replaceSelection(`<p style="text-align:${Wr.align||"initial"}"><img width="${Wr.width?Wr.width+"%":"initial"}" src="${Xr}" alt="${Pi||""}" /></p>`):pn.replaceSelection(`<img width="100%" src="${Xr}" alt="${Pi||""}" />`):((ei=Wr==null?void 0:Wr.type)==null?void 0:ei.indexOf("video"))>-1?pn.replaceSelection(`<video width="100%" controls src="${Xr}"></video>`):((ui=Wr==null?void 0:Wr.type)==null?void 0:ui.indexOf("pdf"))>-1?pn.replaceSelection(`<a href="${Xr}?type=${Wr.type}&disposition=inline" target="_blank">${Wr.name}</a>`):Lr.includes(eo)?pn.replaceSelection(`<a href="${Xr}?type=office&disposition=inline" target="_blank">${Wr.name}</a>`):pn.replaceSelection(`[${Wr.name}](${Xr})`),pn.focus();case $r:const{row:Gi,col:xi,align:qi}=yr;let ga=`
|
|
`;for(let Ao=0;Ao<Gi;Ao++){let Aa=[],ma=[];for(let Ur=0;Ur<xi;Ur++)Ao===1&&ma.push(ii[qi]),Aa.push(" ");Ao===1&&(ga+=`| ${ma.join(" | ")} |
|
|
`),ga+=`| ${Aa.join(xi===1?"":" | ")} |
|
|
`}return pn.replaceSelection(ga+`
|
|
`),pn.focus();default:throw new Error}},[pn,wr]),zn=(0,st.useMemo)(()=>{switch(wr){case bn:return st.createElement(Ct,{callback:lt,onCancel:Pn});case xr:return st.createElement(bt.Z,{callback:lt,onCancel:Pn});case xn:return st.createElement(ct.Z,{callback:lt,onCancel:Pn});case kn:return st.createElement(et,{callback:lt,onCancel:Pn});case $r:return st.createElement(Ot,{callback:lt,onCancel:Pn});case"maths-latex":return st.createElement(un,{showSaveButton:!0,callback:lt});case"inline-latex":return st.createElement(on.Z,{showSaveButton:!0,callback:lt});default:return null}},[wr]);function Pn(){Ar("")}(0,st.useEffect)(()=>{if(Si.current){let yr=function(ei){Or=!0,oi=ei.pageY},ur=function(){Or=!1},mn=function(ei){if(Or){let ui=ei.pageY-oi;ui<0&&(ui=0),ui>300&&(ui=300);let pi=Mn+ui+"px";lr(pi)}},dr=Si.current,Or=!1,oi=0;return dr.addEventListener("mousedown",yr),document.addEventListener("mousemove",mn),document.addEventListener("mouseup",ur),()=>{dr.removeEventListener("mousedown",yr),document.removeEventListener("mousemove",mn),document.removeEventListener("mouseup",ur)}}},[pn,Si]),(0,st.useEffect)(()=>{lr(Mn)},[Mn]);const In=br(zt),Qn=br(qr),ar={width:In,height:Qn},Sn=(0,st.useMemo)(()=>{if(Kr){let yr=new Date(Kr),ur=yr.getHours(),mn=yr.getMinutes(),dr=yr.getSeconds();return ur=ur<10?"0"+ur:ur,mn=mn<10?"0"+mn:mn,dr=dr<10?"0"+dr:dr,`${ur}:${mn}:${dr}`}return 0},[Kr]),Gn=yr=>{const ur=[];if(Nn){let mn=-1;yr=yr.replace(/(@▁▁@|@▁@)/g,function(dr,Or,oi){ur.push({multiLine:dr!==qe})})}return ur};function Hn(){window.sessionStorage.removeItem(Jt),ir(!1),Qr(0)}function Kn(){ir(!1),Qr(0),pn.setValue(window.sessionStorage.getItem(Jt))}(0,st.useEffect)(()=>{gr[wr]&&wr!==On&&wr!==kn&&setTimeout(()=>{const yr=document.getElementsByClassName("markdown-popup-form")[0],ur=window.innerWidth/2-yr.offsetWidth/2,mn=window.innerHeight/2-yr.offsetHeight/2;cr(ur),Gr(mn)},0)},[wr]);const Zn=yr=>{yr.preventDefault();const ur=yr.clientX-an,mn=yr.clientY-Cr;document.body.onmousemove=dr=>{let Or=dr.clientX-ur,oi=dr.clientY-mn;const ei=document.getElementsByClassName("markdown-popup-form")[0],ui=window.innerWidth-ei.offsetWidth,pi=window.innerHeight-ei.offsetHeight;Or=Math.max(0,Math.min(Or,ui)),oi=Math.max(0,Math.min(oi,pi)),Tr(dr.clientX,dr.clientY,ur,mn)&&(cr(Or),Gr(oi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Tr=(yr,ur,mn,dr)=>{const Or=document.body.clientHeight,oi=document.body.clientWidth;return yr<20&&mn>yr||yr>oi-20&&mn<yr||ur<20&&dr>ur||ur>Or-20&&dr<ur?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return st.createElement(st.Fragment,null,st.createElement("div",{className:"markdown-editor-wrapper",ref:Fi},st.createElement("div",{className:`markdown-editor-container ${Bn} ${hn?"on-preview":""} ${Vn?"mini":""} ${rr?"full-screen":""}`,style:ar},st.createElement(Fe,{insertTemp:Wn,watch:hn,fullScreen:rr,showNullButton:ln,showNullProgramButton:Nn,onActionCallback:tn,hidetoolBar:Yn,extraUse:Dr}),st.createElement("div",{className:"markdown-editor-body"},st.createElement("div",{className:"codemirror-container"},st.createElement("textarea",{ref:Ri,placeholder:Fr})),hn?st.createElement("div",{ref:Di,className:"preview-container"},Ht==="stex"&&st.createElement(me,{value:ni}),Ht!=="stex"&&st.createElement(Ae.Z,{disabledFill:sr,showProgramFill:Nn,value:ni})):null))),Xn?st.createElement("a",{ref:Si,className:"editor-resize"}):null,wr===On&&st.createElement(Ft,{callback:lt,onCancel:Pn}),wr===kn&&st.createElement(et,{callback:lt,onCancel:Pn}),st.createElement(Te.Z,null,gr[wr]&&wr!==On&&wr!==kn?st.createElement(xt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:an,top:Cr},title:st.createElement("div",{style:{cursor:"move"},onMouseDown:Zn},gr[wr]),open:!0,onCancel:Pn,footer:null,destroyOnClose:!0,width:wr===kn?"1200px":null,height:wr===kn?"80vh":null,className:"markdown-popup-form"},zn):null))}},35944:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return je},I:function(){return Fe}});var st=pt(28284),Ut=pt(6767),oe=pt(37568),Ue=pt(77736),_e=pt(71051),de=pt(47889),ve=pt(99571),Ee=pt(77665),ke=pt(59301),Se=pt(59301),Ae=Object.defineProperty,me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(Te,Me,Be)=>Me in Te?Ae(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ie=(Te,Me)=>{for(var Be in Me||(Me={}))z.call(Me,Be)&&se(Te,Be,Me[Be]);if(fe)for(var Be of fe(Me))te.call(Me,Be)&&se(Te,Be,Me[Be]);return Te},le=(Te,Me)=>me(Te,Pe(Me));const{useForm:ce}=st.default,pe={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Te,onCancel:Me})=>{const[Be]=ce();let Ge=(0,ke.useRef)();function Ye(ot){Ge.current.width=Be.getFieldValue("width"),Ge.current.align=Be.getFieldValue("align"),Te(ot,Ge.current)}function Ke(ot,ut){if(ot.status===-1){Ut.ZP.error(ot.message);return}Be.setFieldsValue({src:`/api/attachments/${ot.id}`,type:ut.type})}function Ve(ot){let ut=ot.target.files[0];Ge.current=ut,Fe(ut,Ke)}return Se.createElement(st.default,le(ie({form:Be},xe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(st.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(st.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(oe.default,{style:pe})),Se.createElement(De,{onFileChange:Ve}))),Se.createElement(st.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(st.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(Ue.Z,null,Se.createElement(st.default.Item,{name:"width",style:{margin:0}},Se.createElement(_e.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(st.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(de.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(st.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(ve.ZP,{type:"default",onClick:Me},"\u53D6\u6D88"))))};function De({onFileChange:Te}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Te}))}function Fe(Te,Me){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");let Be=new FormData;Be.append("editormd-image-file",Te),Be.append("file_param_name","editormd-image-file"),Be.append("byxhr","true");var Ge=new window.XMLHttpRequest;Ge.withCredentials=!0,Ge.addEventListener("load",function(Ye){Me(JSON.parse(Ye.target.responseText),Te)},!1),Ge.addEventListener("error",function(Ye){console.error(Ye)},!1),Ge.open("POST",`${Ee.KI}/api/attachments.json`),Ge.send(Be)}},51498:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return oe}});var st=pt(59301),Ut=pt(4676);class oe extends st.Component{constructor(_e){super(_e);const de=window.document;this.node=de.createElement("div"),de.body.appendChild(this.node)}render(){const{children:_e}=this.props;return(0,Ut.createPortal)(_e,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58531:function(Rn,An,pt){"use strict";pt.d(An,{SV:function(){return Ze},ZP:function(){return Re}});var st=pt(59301),Ut=pt(76374);const oe={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"]},Ue={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"]},_e={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(`
|
|
`)}]},de={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},ve={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var Ee=pt(53184),ke=pt.n(Ee),Se=Object.defineProperty,Ae=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,te=(et,ht,at)=>ht in et?Se(et,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):et[ht]=at,se=(et,ht)=>{for(var at in ht||(ht={}))fe.call(ht,at)&&te(et,at,ht[at]);if(Pe)for(var at of Pe(ht))z.call(ht,at)&&te(et,at,ht[at]);return et},ie=(et,ht)=>Ae(et,me(ht)),le=(et,ht,at)=>new Promise((Dt,Et)=>{var Ot=Xt=>{try{Qt(at.next(Xt))}catch(Wt){Et(Wt)}},qt=Xt=>{try{Qt(at.throw(Xt))}catch(Wt){Et(Wt)}},Qt=Xt=>Xt.done?Dt(Xt.value):Promise.resolve(Xt.value).then(Ot,qt);Qt((at=at.apply(et,ht)).next())});const ce={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"]}},pe=(et,ht)=>ht.map(at=>({label:at,kind:et.languages.CompletionItemKind.Keyword,insertText:at})),xe=et=>Object.keys(ce.tables).map(ht=>({label:ht,kind:et.languages.CompletionItemKind.Variable,insertText:ht})),je=(et,ht)=>{const at=ce.tables[et];return at?at.map(Dt=>({label:Dt,kind:ht.languages.CompletionItemKind.Field,insertText:Dt})):[]};function De(et,ht,at,Dt,Et){let Ot=ht.getWordUntilPosition(at),qt={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:Ot.startColumn,endColumn:Ot.endColumn},Qt=Dt.map(Xt=>({label:Xt,kind:et.languages.CompletionItemKind.Keyword,insertText:Xt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}));return Et.map(Xt=>{Qt.push(ie(se({},Xt),{range:qt}))}),Qt}var Fe=et=>{ce.languages.map(Et=>(et.languages.registerDocumentFormattingEditProvider(Et,{provideDocumentFormattingEdits(Ot,qt,Qt){return le(this,null,function*(){const Xt=ke()(Ot.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:Ot.getFullModelRange(),text:Xt}]})}}),Et));const ht=_e.quickKey.map(Et=>({label:Et.label,kind:et.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet})),at=de.quickKey.map(Et=>({label:Et.label,kind:et.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Dt=Ue.quickKey.map(Et=>({label:Et.label,kind:et.languages.CompletionItemKind.Method,insertText:Et.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet}));et.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Et,Ot){var qt=Et.getWordUntilPosition(Ot),Qt={startLineNumber:Ot.lineNumber,endLineNumber:Ot.lineNumber,startColumn:qt.startColumn,endColumn:qt.endColumn},Xt=Et.getLineContent(Ot.lineNumber).substring(qt.startColumn-2,qt.endColumn);return{suggestions:[..._e.keywords.map(Wt=>({label:Wt,kind:et.languages.CompletionItemKind.Function,documentation:Wt,insertText:Wt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt})),..._e.quickKey.map(Wt=>({label:Wt.label,kind:et.languages.CompletionItemKind.Function,documentation:Wt.content,insertText:Xt.startsWith("#")?Wt.content.replace(/#/,""):Wt.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}))]}}}),et.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Et,Ot){var qt=Et.getWordUntilPosition(Ot),Qt={startLineNumber:Ot.lineNumber,endLineNumber:Ot.lineNumber,startColumn:qt.startColumn,endColumn:qt.endColumn};return{suggestions:[...oe.keywords.map(Xt=>({label:Xt,kind:et.languages.CompletionItemKind.Function,documentation:Xt,insertText:Xt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}))]}}}),et.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Et,Ot){var qt=Et.getWordUntilPosition(Ot),Qt={startLineNumber:Ot.lineNumber,endLineNumber:Ot.lineNumber,startColumn:qt.startColumn,endColumn:qt.endColumn},Xt=Et.getLineContent(Ot.lineNumber).substring(qt.startColumn-2,qt.endColumn);return{suggestions:[...Ue.keywords.map(Wt=>({label:Wt,kind:et.languages.CompletionItemKind.Function,documentation:Wt,insertText:Wt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt})),...Ue.quickKey.map(Wt=>({label:Wt.label,kind:et.languages.CompletionItemKind.Function,documentation:Wt.content,insertText:Xt.startsWith("#")?Wt.content.replace(/#/,""):Wt.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}))]}}}),et.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Et,Ot){var qt=Et.getWordUntilPosition(Ot),Qt={startLineNumber:Ot.lineNumber,endLineNumber:Ot.lineNumber,startColumn:qt.startColumn,endColumn:qt.endColumn},Xt=Et.getLineContent(Ot.lineNumber).substring(qt.startColumn-2,qt.endColumn);return{suggestions:[...ve.keywords.map(Wt=>({label:Wt,kind:et.languages.CompletionItemKind.Function,documentation:Wt,insertText:Wt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt})),...ve.quickKey.map(Wt=>({label:Wt.label,kind:et.languages.CompletionItemKind.Function,documentation:Wt.content,insertText:Xt.startsWith("#")?Wt.content.replace(/#/,""):Wt.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}))]}}}),et.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Et,Ot){var qt=Et.getWordUntilPosition(Ot),Qt={startLineNumber:Ot.lineNumber,endLineNumber:Ot.lineNumber,startColumn:qt.startColumn,endColumn:qt.endColumn},Xt=Et.getLineContent(Ot.lineNumber).substring(qt.startColumn-2,qt.endColumn);return{suggestions:[...de.keywords.map(Wt=>({label:Wt,kind:et.languages.CompletionItemKind.Function,documentation:Wt,insertText:Wt,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt})),...de.quickKey.map(Wt=>({label:Wt.label,kind:et.languages.CompletionItemKind.Function,documentation:Wt.content,insertText:Xt.startsWith("#")?Wt.content.replace(/#/,""):Wt.content,insertTextRules:et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}))]}}})};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Me=Object.defineProperty,Be=(et,ht,at)=>ht in et?Me(et,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):et[ht]=at,Ge=(et,ht,at)=>Be(et,typeof ht!="symbol"?ht+"":ht,at);const Ye=class mx{constructor(ht,at,Dt){this.placeholder=ht,this.editor=at,this.monaco=Dt,at.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.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)}};Ge(Ye,"ID","editor.widget.placeholderHint");var Ve=Ye,ot=pt(96236),ut=pt(6767),ft=pt(25399),St=pt(89392),Qe=pt(41312),rt=pt(56102),wt=Object.defineProperty,Ct=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Mt=(et,ht,at)=>ht in et?wt(et,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):et[ht]=at,yt=(et,ht)=>{for(var at in ht||(ht={}))xt.call(ht,at)&&Mt(et,at,ht[at]);if(ct)for(var at of ct(ht))dt.call(ht,at)&&Mt(et,at,ht[at]);return et},Ft=(et,ht)=>Ct(et,bt(ht)),mt=(et,ht)=>{var at={};for(var Dt in et)xt.call(et,Dt)&&ht.indexOf(Dt)<0&&(at[Dt]=et[Dt]);if(et!=null&&ct)for(var Dt of ct(et))ht.indexOf(Dt)<0&&dt.call(et,Dt)&&(at[Dt]=et[Dt]);return at},vt=(et,ht,at)=>new Promise((Dt,Et)=>{var Ot=Xt=>{try{Qt(at.next(Xt))}catch(Wt){Et(Wt)}},qt=Xt=>{try{Qt(at.throw(Xt))}catch(Wt){Et(Wt)}},Qt=Xt=>Xt.done?Dt(Xt.value):Promise.resolve(Xt.value).then(Ot,qt);Qt((at=at.apply(et,ht)).next())});function tt(et){return/^\d+$/.test(et)?`${et}px`:et}function He(){}let we=!1;const Ne={"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 Xe(et=[]){let ht=et;if(Array.isArray(et)){for(let at=0;at<et.length;at++){let Dt=Ne[et[at]];if(Dt)return Dt}return ht[0]}return Ne[ht]||ht}let nt=null;const Ie=()=>vt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(et){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",et)}});var Re=et=>{var ht=et,{width:at="100%",height:Dt="100%",value:Et,language:Ot="javascript",style:qt={},options:Qt={},overrideServices:Xt={},theme:Wt="vs-dark",onEditBlur:un,isCopy:on=!1,onSave:cn,autoHeight:bn=!1,forbidCopy:xn=!1,onChange:kn=He,editorDidMount:On=He,onFocus:_r=He,onBreakPoint:xr=He,breakPointValue:$r=[],filename:tr="educoder.txt",errorLine:ii,errorContent:di="",highlightLine:li,openBreakPoint:Mi=!1,placeholder:yi="",showMiniMap:Jr=!0}=ht,Li=mt(ht,["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 qe=(0,st.useRef)(),Mr=(0,st.useRef)({}),Lr=(0,st.useRef)(),br=(0,st.useRef)(),Pr=(0,st.useRef)([]),kr=(0,st.useRef)(!1),Hi=(0,st.useRef)(),gr=(0,st.useRef)(),nr=(0,st.useRef)(!1),[Vt,Kt]=(0,st.useState)(!1);function zt(){let Jn;return qe.current&&(Jn=new Ut.Z(jn=>{for(let Bn of jn)(Bn.target.offsetHeight>0||Bn.target.offsetWidth>0)&&Mr.current.instance.layout()}),Jn.observe(qe.current)),Jn}function Mn(){ut.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const Vn=()=>{let Jn=Mr.current.instance;if(Et!=null&&Jn&&Vt){const jn=Jn.getModel();jn&&Et!==jn.getValue()&&(we=!0,jn.setValue(Et),Jn.layout(),we=!1)}};(0,st.useEffect)(()=>{const Jn=Qe.Z.subscribe("formatDocument",jn=>{var Bn;let er=Mr.current.instance;(Bn=er==null?void 0:er.getAction)==null||Bn.call(er,"editor.action.formatDocument").run()});return window.updateMonacoValue=jn=>{kn(jn)},Jn},[]),(0,st.useEffect)(()=>{var Jn;let jn=Mr.current.instance;br.current&&clearTimeout(br.current),br.current=setTimeout(()=>{Vn()},500),Et&&(Et!=null&&Et.length)&&((Jn=jn==null?void 0:jn.updateOptions)==null||Jn.call(jn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Et.split(/\r\n|\r|\n/g).length))+3,5)}))},[Et,Vt,Mr.current]),(0,st.useEffect)(()=>{if(ii&&Mr.current&&Mr.current.instance){let jn=Mr.current.instance;jn.changeViewZones(function(Bn){var er=document.createElement("div");er.style.padding="10px 20px",er.style.width="calc(100% - 20px)",er.className="my-error-line-wrp",er.innerHTML=di,Bn.addZone({afterLineNumber:ii||11,heightInLines:3,domNode:er})});var Jn={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}};jn.addOverlayWidget(Jn),jn.revealPositionInCenter({lineNumber:20,column:1})}},[ii,Mr.current,Vt]);const vr=(Jn="",jn)=>{if(!Jn||Jn.trim()==="")return!0;const er=Mr.current.instance.getModel().getLineTokens(jn);let _n=!1;for(let sr=0;sr<2;sr++)er.getStandardTokenType(sr)===1&&(_n=!0);return _n};(0,st.useEffect)(()=>{var Jn;const jn=(Jn=Mr.current)==null?void 0:Jn.instance;if(jn&&Vt&&xn){const Bn=jn.onDidBlurEditorWidget(()=>{nr.current=!1}),er=jn.onDidFocusEditorText(()=>{nr.current=!0});return()=>{Bn.dispose(),er.dispose()}}},[Mr.current,Vt,xn]),(0,st.useEffect)(()=>{var Jn;if((Jn=Mr.current)!=null&&Jn.instance&&Vt&&Mi){let jn=Mr.current.instance,Bn=jn.getModel();if(!Bn)return;(()=>{var qn;let rr=[],pr=[];const wr=Bn.getAllDecorations();for(let Kr of wr)Kr.options.className==="highlighted-line"&&(rr.push((qn=Kr==null?void 0:Kr.range)==null?void 0:qn.startLineNumber),pr.push(Kr==null?void 0:Kr.id));if(li===rr[0])return;Bn.deltaDecorations(pr,[]);const Ar=Bn.getLineCount();li&&li<=Ar&&(jn.deltaDecorations([],[{range:new nt.Range(li,1,li,Bn.getLineMaxColumn(li)),options:{isWholeLine:!0,className:"highlighted-line"}}]),jn.revealLineInCenter(li))})();const _n=(qn=!1)=>{var rr;let pr=[],wr=[];const Ar=Bn.getAllDecorations();for(let Kr of Ar)Kr.options.linesDecorationsClassName==="breakpoints-select"&&(pr.push((rr=Kr==null?void 0:Kr.range)==null?void 0:rr.startLineNumber),wr.push(Kr==null?void 0:Kr.id));if(qn)return{lines:pr,ids:wr};xr(pr)},sr=qn=>vt(void 0,null,function*(){let rr={range:new nt.Range(qn,1,qn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Bn.deltaDecorations([],[rr]),_n()}),Fr=qn=>vt(void 0,null,function*(){let rr=[];const pr=jn.getLineDecorations(qn);for(let wr of pr)wr.options.linesDecorationsClassName==="breakpoints-select"&&rr.push(wr.id);yield Bn.deltaDecorations(rr,[]),_n()}),zr=qn=>{let rr=jn.getLineDecorations(qn);for(let pr of rr)if(pr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,St.isEqual)($r,_n(!0).lines)){Bn.deltaDecorations(_n(!0).ids,[]);const qn=$r.map(rr=>({range:new nt.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Bn.deltaDecorations([],qn)}const Dr=jn.onDidChangeModelContent(qn=>{let rr=jn.getPosition();if(rr){let pr=rr.lineNumber;clearTimeout(gr.current),gr.current=setTimeout(()=>{vr(Bn.getLineContent(pr),pr)?Fr(pr):zr(pr)?(Fr(pr),sr(pr)):_n()},100)}}),pn=jn.onMouseDown(qn=>{var rr,pr,wr;if(qn.target.detail&&((wr=(pr=(rr=qn.target)==null?void 0:rr.element)==null?void 0:pr.className)!=null&&wr.includes("line-numbers"))){let Ar=qn.target.position.lineNumber;if(vr(Bn.getLineContent(Ar),Ar))return;zr(Ar)?Fr(Ar):sr(Ar)}}),Ni=qn=>{let rr={range:new nt.Range(qn,1,qn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Pr.current=jn.deltaDecorations(Pr.current,[rr])},ni=()=>{Pr.current=jn.deltaDecorations(Pr.current,[])},ki=jn.onMouseMove(qn=>{var rr,pr,wr;if(ni(),qn.target.detail&&((wr=(pr=(rr=qn.target)==null?void 0:rr.element)==null?void 0:pr.className)!=null&&wr.includes("line-numbers"))){let Ar=qn.target.position.lineNumber;if(vr(Bn.getLineContent(Ar),Ar))return;Ni(Ar)}}),hn=jn.onMouseLeave(()=>{ni()});return()=>{Dr.dispose(),pn.dispose(),ki.dispose(),hn.dispose()}}},[Mr.current,Vt,$r,li,Mi,Ot]),(0,st.useEffect)(()=>{var Jn;(Jn=Mr.current)!=null&&Jn.instance&&Mi&&Mr.current.instance.setPosition({lineNumber:0,column:0})},[li]);function vn(){let Jn=Mr.current.instance;if(Jn){const jn=Jn.getSelection(),Bn=Mr.current.pastePos||{},er=new nt.Range(Bn.startLineNumber||jn.endLineNumber,Bn.startColumn||jn.endColumn,Bn.endLineNumber||jn.endLineNumber,Bn.endColumn||jn.endColumn);setTimeout(()=>{Jn.executeEdits("",[{range:er,text:""}])},300)}}function Wn(Jn){(window.navigator.platform.match("Mac")?Jn.metaKey:Jn.ctrlKey)&&Jn.keyCode==83&&(Jn.preventDefault(),cn())}const Ht=()=>{if(bn&&Mr.current.instance){const Jn=Mr.current.instance.getContentHeight();sn(Jn<Dt?Dt:Jn)}else sn(Dt)};function Jt(Jn){var jn=document.createEvent("MouseEvents");jn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Jn.dispatchEvent(jn)}const Xn=Jn=>{if(!nr.current)return;const{keyCode:jn,ctrlKey:Bn,metaKey:er,target:_n,type:sr}=Jn;return(sr==="paste"||(jn===67||jn===86)&&(er||Bn))&&_n.nodeName==="TEXTAREA"&&(Mn(),Jn.preventDefault()),!1};function jt(Jn,jn){var Bn=window.URL||window.webkitURL||window,er=new Blob([jn]),_n=document.createElementNS("http://www.w3.org/1999/xhtml","a");_n.href=Bn.createObjectURL(er),_n.download=Jn,Jt(_n)}(0,st.useEffect)(()=>{Ht()},[Ht]),(0,st.useEffect)(()=>{qe.current&&!Vt&&Promise.all([pt.e(8909),pt.e(503)]).then(pt.bind(pt,71448)).then(Jn=>{try{nt=Jn,Mr.current.instance=nt.editor.create(qe.current,{value:Et,language:Xe(Ot),theme:Wt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Jr||!1}},Xt);const jn=Mr.current.instance;let _n=[...ot.BH._menuItems].find(Dr=>Dr[0]._debugName=="EditorContext")[1],sr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fr=(Dr,pn)=>{var Ni,ni;let ki=Dr._first;do pn.includes((ni=(Ni=ki.element)==null?void 0:Ni.command)==null?void 0:ni.id)&&Dr._remove(ki);while(ki=ki.next)};if(On(jn,nt),setTimeout(()=>{Ht(),Mr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{jt(tr||"educoder.txt",jn.getValue())}})},500),Mr.current.subscription=jn.onDidChangeModelContent(Dr=>{kr.current?clearTimeout(Hi.current):(Ht(),kn(jn.getValue(),Dr)),Hi.current=setTimeout(()=>{kr.current=!1},500)}),window.Monaco||Fe(nt,Xe(Ot)),xn&&(Fr(_n,sr),qe.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Xn),window.removeEventListener("paste",Xn),window.addEventListener("keydown",Xn),window.addEventListener("paste",Xn)),window.Monaco=nt,un&&jn.onDidBlurEditorWidget(()=>{un(jn.getValue())}),_r&&jn.onDidFocusEditorText(()=>{xn&&Ie(),_r(jn.getValue())}),xn){Ie();try{jn.onDidPaste(Dr=>{const pn=jn.getSelection(),Ni=Mr.current.pastePos||{},ni=new nt.Range(Ni.startLineNumber||pn.endLineNumber,Ni.startColumn||pn.endColumn,Ni.endLineNumber||pn.endLineNumber,Ni.endColumn||pn.endColumn);jn.executeEdits("",[{range:Dr.range,text:""}])})}catch(Dr){}}let zr=zt();return yi&&typeof yi=="string"&&new Ve(yi,jn,nt),Kt(!0),()=>{const Dr=Mr.current.instance;Dr.dispose();const pn=Dr.getModel();pn&&pn.dispose(),Mr.current.subscription&&Mr.current.subscription.dispose(),zr.unobserve(qe.current)}}catch(jn){}})},[]),(0,st.useEffect)(()=>{if(Mr.current.instance&&Vt)return document.addEventListener("keydown",Wn,!1),()=>{document.removeEventListener("keydown",Wn)}},[cn,Vt]),(0,st.useEffect)(()=>{let Jn=Mr.current.instance;if(Jn&&Vt){let jn=Xe(Ot);nt.editor.setModelLanguage(Jn.getModel(),jn)}},[Ot,Vt]),(0,st.useEffect)(()=>{Mr.current.instance&&Vt&&nt.editor.setTheme(Wt)},[Wt,Vt]),(0,st.useEffect)(()=>{let Jn=Mr.current.instance;Lr.current=Qt,Jn&&Vt&&(Jn.updateOptions(yt({},Qt)),setTimeout(()=>{Jn.getModel().updateOptions(yt({},Qt))},200))},[JSON.stringify(Qt),Vt]),(0,st.useEffect)(()=>{let Jn=Mr.current.instance;Jn&&Vt&&Jn.layout()},[at,Dt,Vt]);const[ln,Nn]=(0,st.useState)(tt(at)),[Yn,sn]=(0,st.useState)(tt(Dt)),Dn=Ft(yt({},qt),{width:ln,height:Yn,position:"relative"});return st.createElement("div",{className:"my-monaco-editor",ref:qe,style:Dn},on&&st.createElement(rt.CopyToClipboard,{text:Et,onCopy:()=>ut.ZP.success("\u590D\u5236\u6210\u529F")},st.createElement(ft.Z,{title:"\u590D\u5236\u4EE3\u7801"},st.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},st.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ze({width:et="100%",height:ht="100%",original:at,modified:Dt,language:Et,options:Ot={}}){const qt=(0,st.useRef)(),[Qt,Xt]=(0,st.useState)(null);function Wt(bn){let xn;return qt.current&&(xn=new Ut.Z(kn=>{for(let On of kn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&bn.layout()}),xn.observe(qt.current)),xn}(0,st.useEffect)(()=>(qt.current&&Promise.all([pt.e(8909),pt.e(9404)]).then(pt.bind(pt,2550)).then(bn=>{nt=bn;const xn=nt.editor.createDiffEditor(qt.current,Ft(yt({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},Ot),{wordWrap:!0}));Xt(xn);let kn=Wt(xn);return()=>{xn.dispose();const On=xn.getModel();On&&On.dispose(),kn.unobserve(qt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,st.useEffect)(()=>{Qt&&Qt.setModel({original:nt.editor.createModel(at,Et),modified:nt.editor.createModel(Dt,Et)})},[at,Dt,Et,Qt]);const un=tt(et),on=tt(ht),cn={width:un,height:on};return st.createElement("div",{className:"my-diff-editor",ref:qt,style:cn})}},38776:function(Rn,An,pt){"use strict";pt.d(An,{jL:function(){return _e},w9:function(){return xt},QD:function(){return xn},cQ:function(){return rt},op:function(){return Xt},O5:function(){return Hi},_b:function(){return tr},t7:function(){return ie},Gi:function(){return vt},YG:function(){return Ft},qp:function(){return Ae},vr:function(){return _r},qE:function(){return on},Je:function(){return pe},wb:function(){return ot},cq:function(){return nt},tp:function(){return fe}});var st=pt(59301),Ut={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"},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",_e=({dataSource:gr=[],img:nr,imgWidth:Vt=346,title:Kt,sunTitle:zt,bannerExtraContent:Mn})=>st.createElement("div",{className:Ut.banner},st.createElement("div",{className:Ut.content},st.createElement("aside",null,st.createElement("p",null,st.createElement("b",null,Kt),st.createElement("span",null,zt)),gr.length>0&&st.createElement("div",{className:Ut.btns},gr.map((Vn,vr)=>st.createElement("div",{key:vr,onClick:Vn.click},Vn.name,Vn.sign?st.createElement("img",{src:oe,width:39}):null))),Mn),nr&&st.createElement("img",{style:{marginTop:33,marginRight:38},src:nr,width:Vt}))),de={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ve=pt(92310),Ee=pt.n(ve),ke=pt(89392),Ae=({dataSource:gr=[],value:nr,onChange:Vt,onTitleChange:Kt,className:zt,title:Mn,titleWidth:Vn=41,style:vr={},fontColor:vn="#6A7283",showCount:Wn})=>{const[Ht,Jt]=(0,st.useState)(0),[Xn,jt]=(0,st.useState)(!1),ln=(0,st.useRef)(null),Nn=(0,st.useRef)(null);return(0,st.useEffect)(()=>{var Yn;gr.length!==0&&(((Yn=ln==null?void 0:ln.current)==null?void 0:Yn.clientHeight)>97?Jt(1):Jt(0)),gr.length===0&&Jt(0),jt(!1)},[gr]),st.createElement("div",{className:Ee()(de.row,zt),style:vr},st.createElement("div",{onClick:(0,ke.throttle)(()=>Kt==null?void 0:Kt(),2e3),style:{width:Vn,marginTop:Xn?12:4},className:`${de.title} ${Kt?"current":""}`},Mn),st.createElement("div",{className:Xn?`${de.tagsWrap} ${de.tagsBorderWrap}`:de.tagsWrap},st.createElement("div",{className:de.bar,ref:Nn,style:Ht>0?{height:Ht===1?97:"auto",overflow:Ht===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},st.createElement("div",{className:de.tag,ref:ln},gr==null?void 0:gr.map(Yn=>st.createElement("span",{onClick:()=>Vt(Yn.id),key:Yn.id,style:{color:vn},className:nr===Yn.id?de.active:""},st.createElement("span",{title:Yn.name,className:de.name},Yn.name),!!Wn&&st.createElement("span",{className:de.num},Yn.count))))),!!Ht&&st.createElement(st.Fragment,null,Ht===1?st.createElement("div",{onClick:()=>{var Yn;Jt(2),((Yn=ln==null?void 0:ln.current)==null?void 0:Yn.clientHeight)>245?jt(!0):jt(!1)},className:de.action},"\u5C55\u5F00",st.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):st.createElement("div",{onClick:()=>{Nn.current.scrollTop=0,Jt(1),jt(!1)},className:de.action},"\u6536\u8D77",st.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},me={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"},fe=({dataSource:gr=[],value:nr,onChange:Vt,className:Kt,style:zt={}})=>st.createElement("div",{style:zt,className:Ee()(me.tabs,Kt)},gr.map(Mn=>st.createElement("span",{onClick:()=>Vt(Mn.id),className:nr===Mn.id?me.active:"",key:Mn.id},Mn.name))),z={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"},te=pt(37568),ie=({dataSource:gr=[],value:nr="",onChange:Vt,onInputChange:Kt=()=>{},className:zt,style:Mn={},placeholder:Vn,allowClear:vr=!1})=>{var vn;const[Wn,Ht]=(0,st.useState)(""),[Jt,Xn]=(0,st.useState)("");(0,st.useEffect)(()=>{var Nn;let Yn=nr;(Nn=JSON.stringify(nr))!=null&&Nn.includes("{")&&(Ht(nr.id),Yn=nr.value||"");try{Xn(decodeURIComponent(Yn||""))}catch(sn){Xn(decodeURIComponent(Yn||""))}},[nr]);const jt=()=>{Vt(encodeURIComponent(Jt),Wn||null)},ln=Nn=>{Nn!==Wn&&(Ht(Nn),Vt(encodeURIComponent(Jt),Nn))};return st.createElement("div",{className:Ee()(z.input,zt),style:Mn},!!gr.length&&st.createElement("div",{className:z.dropdown},st.createElement("div",{className:z.text},(vn=gr.find(Nn=>Nn.id===Wn))==null?void 0:vn.name,st.createElement("i",{className:"iconfont icon-zhankai4"}),st.createElement("b",{className:z.b1}),st.createElement("b",{className:z.b2})),st.createElement("div",{className:z.menu},gr.map((Nn,Yn)=>st.createElement("div",{key:Yn,onClick:()=>ln(Nn.id)},Nn.name)))),st.createElement(te.default,{onPressEnter:jt,value:Jt,onChange:Nn=>{Xn(Nn.target.value),Kt(encodeURIComponent(Nn.target.value),Wn||null)},bordered:!1,placeholder:Vn}),st.createElement("i",{onClick:jt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},le={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"},pe=({value:gr,onChange:nr,className:Vt,total:Kt,pageSize:zt,style:Mn={}})=>{const Vn=gr<2,vr=gr>=Math.ceil(Kt/zt);return Kt<=zt?st.createElement(st.Fragment,null):st.createElement("div",{className:Ee()(le.quickPager,Vt),style:Mn},st.createElement("div",{onClick:()=>{Vn||nr(gr-1,"prev")},className:Vn?le.disabled:""},"\u4E0A\u4E00\u9875"),st.createElement("div",{onClick:()=>{vr||nr(gr+1,"next")},className:vr?le.disabled:""},"\u4E0B\u4E00\u9875"))},xe={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"},je=pt(29787),De=pt(25399),Fe=pt(58018),Te=pt(13952),Me=pt(89299),Be=pt(96908),Ge=pt(57177),Ye=pt(81378),Ke=pt(63604),ot=({className:gr,dataSource:nr=[],col:Vt=4,right:Kt,bottom:zt=23,precision:Mn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:vn})=>{const Wn=Math.floor((Vn-(Vt-1)*Kt)/Vt);return st.createElement(je.Z,{spinning:vn},st.createElement("div",{className:Ee()(xe.list,gr)},!!nr.length&&nr.map((Ht,Jt)=>{const{name:Xn,id:jt,identifier:ln,power:Nn,cover_image_id:Yn,pic:sn}=Ht;return st.createElement("div",{className:xe.wrap,key:jt,style:{width:Wn,marginRight:(1+Jt)%Vt===0?0:Kt+Mn,marginBottom:zt}},st.createElement("a",{target:"_blank",href:`/shixuns/${ln}/challenges`,className:xe.li,onClick:Dn=>{Dn.preventDefault(),vr&&(0,Me.L9)([vr]),Nn&&(0,Me.xg)(`/shixuns/${ln}/challenges`)}},st.createElement("div",{className:xe.img},st.createElement("img",{className:xe.cover,src:`${sn}`}),Ht.is_jupyter&&st.createElement("img",{className:xe.sign,src:Be}),Ht.is_jupyter_lab&&st.createElement("img",{className:xe.sign,src:Ge}),Ht.is_unity_3d&&st.createElement("img",{className:xe.sign,src:Ye})),st.createElement("div",{className:xe.name},st.createElement(De.Z,{title:Xn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},st.createElement("span",{className:xe.e},Xn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),st.createElement("div",{className:xe.tags},st.createElement(De.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},st.createElement("span",null,st.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),st.createElement("span",null,Ht.challenges_count))),!!Ht.myshixuns_count&&st.createElement(De.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},st.createElement("span",null,st.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),st.createElement("span",null,Ht.myshixuns_count))),st.createElement(De.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},st.createElement("span",null,st.createElement("span",null,Ht.level))),st.createElement("div",{className:xe.rate},st.createElement(Fe.Z,{allowHalf:!0,disabled:!0,defaultValue:Ht.score_info}),st.createElement("span",null,"\xA0",Ht.score_info?`${Ht.score_info}\u5206`:"5\u5206")))),!Nn&&st.createElement("div",{className:xe.lockWrap},st.createElement("img",{src:`${Te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),st.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!nr.length&&st.createElement(Ke.Z,null)))},ut={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"},ft=pt(64681),St=pt(59301),rt=({className:gr,dataSource:nr=[],col:Vt=4,right:Kt,bottom:zt=23,precision:Mn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:vn,onRemove:Wn=()=>{},isCurrent:Ht=!0,showAlias:Jt=!1})=>{const Xn=Math.floor((Vn-(Vt-1)*Kt)/Vt),jt=[{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 St.createElement(je.Z,{spinning:vn},St.createElement("div",{className:Ee()(ut.list,gr)},!!(nr!=null&&nr.length)&&(nr==null?void 0:nr.map((ln,Nn)=>{var Yn;const{name:sn,id:Dn,identifier:Jn,featured:jn,school_name:Bn,image_url:er,excellent:_n,is_plan:sr}=ln;return St.createElement("div",{key:Dn,className:ut.wrap,style:{width:Xn,marginRight:(1+Nn)%Vt===0?0:Kt+Mn,marginBottom:zt}},St.createElement("a",{className:ut.li,onClick:Fr=>{Fr.preventDefault(),Fr.stopPropagation(),vr&&(0,Me.L9)([vr]),(0,Me.xg)(`/paths/${Jn}`)}},St.createElement("div",{className:ut.img},St.createElement("img",{className:ut.cover,src:`${er}`}),Ht&&(0,ft.bg)()&&(ln==null?void 0:ln.studying)&&St.createElement("div",{className:`${ut.movebq} user-path-items`,onClick:Fr=>{Fr.stopPropagation(),Wn(ln)}},St.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),St.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Yn=ln==null?void 0:ln.subject_tags)==null?void 0:Yn.map((Fr,zr)=>{var Dr,pn;if(zr===0){const ni=(Dr=jt.find(ki=>ki.name==Fr))==null?void 0:Dr.swimg;return St.createElement("img",{className:ut.sign,src:ni,style:{left:"-4px"}})}const Ni=(pn=jt.find(ni=>ni.name==Fr))==null?void 0:pn.ptimg;return St.createElement("img",{className:ut.sign,src:Ni,style:{left:`${48+52*(zr-1)+2*zr}px`}})}),St.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ln==null?void 0:ln.excellent)&&St.createElement("div",{className:ut.bq},"\u5F00\u653E\u8BFE\u7A0B"))),St.createElement("div",{className:ut.name},St.createElement(De.Z,{title:Jt&&(ln!=null&&ln.excellent_alias_name)?St.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${sn}`,St.createElement("br",null),St.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ln==null?void 0:ln.excellent_alias_name}`)):sn},St.createElement("span",{className:ut.e},Jt&&(ln==null?void 0:ln.excellent_alias_name)||sn))),St.createElement(De.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Bn}`},St.createElement("div",{className:ut.unit},St.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Bn)),St.createElement("div",{className:ut.tags},St.createElement("div",null,St.createElement(De.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),St.createElement("span",null,ln.stages_count))),St.createElement(De.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),St.createElement("span",null,ln.members_count)))))))})),!nr.length&&St.createElement(Ke.Z,null)))},wt={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"},Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",bt=pt(59301),xt=({className:gr,dataSource:nr=[],col:Vt=4,right:Kt,bottom:zt=23,precision:Mn=0,wrapWidth:Vn=1200,trackEventItems:vr,loading:vn,handleVery:Wn=()=>!0})=>{const Ht=Math.floor((Vn-(Vt-1)*Kt)/Vt);return bt.createElement(je.Z,{spinning:vn},bt.createElement("div",{className:Ee()(wt.list,gr)},!!nr.length&&nr.map((Jt,Xn)=>{const{subject_identifier:jt,id:ln,identifier:Nn,power:Yn}=Jt,sn=Jt.is_public!=0&&Jt.is_public;return bt.createElement("div",{className:wt.wrap,key:ln,style:{width:Ht,marginRight:(1+Xn)%Vt===0?0:Kt+Mn,marginBottom:zt}},bt.createElement("a",{className:wt.li,onClick:Dn=>{Dn.preventDefault(),Wn(Jt==null?void 0:Jt.first_category_url)&&(vr&&(0,Me.L9)([vr]),(0,Me.xg)(Jt.first_category_url))}},bt.createElement("div",{className:wt.top},bt.createElement(De.Z,{title:Jt.name},bt.createElement("div",{className:wt.name},Jt.name)),bt.createElement("img",{className:wt.img,src:Te.Z.IMG_SERVER+"/images/"+Jt.avatar_url}),bt.createElement("div",{className:wt.text,title:Jt.creator},Jt.creator),jt&&bt.createElement("div",{className:wt.btns},bt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),bt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),sn&&bt.createElement("div",{className:wt.sign},"\u516C\u5F00")),bt.createElement("div",{className:wt.bottom},Jt.visits>0&&bt.createElement(De.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-liulanyan"}),bt.createElement("span",null,Jt.visits))),Jt.course_members_count>0&&bt.createElement(De.Z,{title:"\u6210\u5458",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan"}),Jt.course_members_count)),Jt.tasks_count>0&&bt.createElement(De.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-zuoye"}),Jt.tasks_count)),Jt.is_end?bt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):bt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Jt.is_accessible&&bt.createElement("div",{className:wt.lockWrap},bt.createElement("img",{src:`${Te.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),bt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!nr.length&&bt.createElement(Ke.Z,null)))},dt={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"},Mt=pt(44993),Ft=({dataSource:gr=[],value:nr,onChange:Vt,className:Kt,style:zt={},tabBarExtraContent:Mn})=>st.createElement("div",{className:Ee()(dt.tabs,Kt),style:zt},st.createElement("div",{className:dt.tabsWrap},gr.map((Vn,vr)=>!(Vn!=null&&Vn.hide)&&st.createElement("aside",{className:dt.tab,onClick:()=>{Vt(Vn.id),Vn.link&&Mt.history.push(Vn.link)},key:vr},st.createElement("div",{className:nr===Vn.id?dt.active:""},Vn.name),(Vn==null?void 0:Vn.resetCount)==null&&(Vn==null?void 0:Vn.total)!==void 0&&st.createElement("span",null,"\uFF08",Vn==null?void 0:Vn.total,"\uFF09"),(Vn==null?void 0:Vn.resetCount)!==void 0&&(Vn==null?void 0:Vn.total)!==void 0&&st.createElement(De.Z,{title:(Vn==null?void 0:Vn.tip)!=null?Vn==null?void 0:Vn.tip:""},st.createElement("span",{style:{color:"#9096A3"}},"\uFF08",st.createElement("span",{style:{color:"#000"}},Vn==null?void 0:Vn.resetCount),"/",st.createElement("span",null,Vn==null?void 0:Vn.total),"\uFF09"))))),st.createElement("div",{className:dt.tabBar},Mn)),vt=({className:gr,style:nr={},children:Vt})=>st.createElement("div",{className:Ee()(gr),style:nr},Vt),tt={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"},He=pt(75727),we=pt(93041);const Ne=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var nt=({sortValue:gr,dropValue:nr,className:Vt,onSort:Kt,onDrop:zt,dataSource:Mn=Ne})=>{var Vn;return st.createElement("div",{className:Ee()(tt.orderWrap,Vt)},st.createElement(He.Z,{dropdownRender:()=>st.createElement(we.default,null,Mn.map((vr,vn)=>st.createElement(we.default.Item,{key:vn,onClick:()=>zt(vr.id)},vr.name)))},st.createElement("span",{className:tt.orderTextWrap},(Vn=Mn.find(vr=>nr===vr.id))==null?void 0:Vn.name)),st.createElement("span",{className:tt.orderIconWrap},st.createElement("span",{className:tt.orderAsc},st.createElement("i",{className:gr==="asc"?`iconfont icon-sanjiaoxing-up font12 ${tt.cursorPointer} ${tt.active}`:`iconfont icon-sanjiaoxing-up font12 ${tt.cursorPointer}`,onClick:()=>Kt(gr==="asc"?"desc":"asc")})),st.createElement("span",{className:tt.orderDesc},st.createElement("i",{className:gr==="desc"?`iconfont icon-sanjiaoxing-down font12 ${tt.cursorPointer} ${tt.active}`:`iconfont icon-sanjiaoxing-down font12 ${tt.cursorPointer}`,onClick:()=>Kt(gr==="asc"?"desc":"asc")}))))},Ie={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"},Re=pt(99571),Ze=Object.defineProperty,et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,Dt=(gr,nr,Vt)=>nr in gr?Ze(gr,nr,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):gr[nr]=Vt,Et=(gr,nr)=>{for(var Vt in nr||(nr={}))ht.call(nr,Vt)&&Dt(gr,Vt,nr[Vt]);if(et)for(var Vt of et(nr))at.call(nr,Vt)&&Dt(gr,Vt,nr[Vt]);return gr},Ot=(gr,nr)=>{var Vt={};for(var Kt in gr)ht.call(gr,Kt)&&nr.indexOf(Kt)<0&&(Vt[Kt]=gr[Kt]);if(gr!=null&&et)for(var Kt of et(gr))nr.indexOf(Kt)<0&&at.call(gr,Kt)&&(Vt[Kt]=gr[Kt]);return Vt},qt=(gr,nr,Vt)=>new Promise((Kt,zt)=>{var Mn=vn=>{try{vr(Vt.next(vn))}catch(Wn){zt(Wn)}},Vn=vn=>{try{vr(Vt.throw(vn))}catch(Wn){zt(Wn)}},vr=vn=>vn.done?Kt(vn.value):Promise.resolve(vn.value).then(Mn,Vn);vr((Vt=Vt.apply(gr,nr)).next())}),Xt=gr=>{var nr=gr,{className:Vt,style:Kt,children:zt,loading:Mn=!1,openLoading:Vn,onClick:vr=()=>{},size:vn="middle",shape:Wn="round"}=nr,Ht=Ot(nr,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Jt,Xn]=(0,st.useState)(!1);return st.createElement(Re.ZP,Et({onClick:(0,ke.throttle)(jt=>qt(void 0,null,function*(){Vn&&Xn(!0);try{yield vr(jt)}catch(ln){console.log("error",ln)}Vn&&Xn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ee()(Ie.btn,Ie[`${vn}-${Wn}`],Vt),style:Kt,size:vn,shape:Wn,loading:Jt||Mn},Ht),zt)},Wt={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"},on=({className:gr,style:nr,children:Vt=null,onClick:Kt,title:zt})=>st.createElement("div",{className:Ee()(Wt.head,gr),style:nr},st.createElement("span",{className:"primary-hover",onClick:Kt},st.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),st.createElement("b",{title:zt},zt),st.createElement("div",{className:Wt.node},Vt)),cn={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"},xn=({confirmShow:gr=!0,confirmTitle:nr,confirmClick:Vt,cancelShow:Kt=!0,cancelTitle:zt,cancelClick:Mn,className:Vn,style:vr,confirmLoading:vn=!1})=>st.createElement("div",{className:Ee()(cn.btns,Vn),style:vr},gr&&st.createElement(Re.ZP,{loading:vn,onClick:Vt,type:"primary",className:cn.confirm},nr),Kt&&st.createElement(Re.ZP,{onClick:Mn,className:cn.cancel},zt)),kn={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"},_r=({className:gr,style:nr={},LeftContent:Vt,children:Kt,RightContent:zt})=>st.createElement("div",{className:Ee()(kn.fixedBottom,gr),style:nr},st.createElement("div",{className:kn.wrap},st.createElement("div",{className:kn.left},Vt),st.createElement("div",{className:kn.center},Kt),st.createElement("div",{className:kn.right},zt))),xr={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"},tr=({className:gr,style:nr={},dataSource:Vt=[]})=>st.createElement("div",{className:Ee()(xr.crumbs,gr),style:nr},Vt.map((Kt,zt)=>zt<Vt.length-1?st.createElement(st.Fragment,{key:zt},Kt.path||Kt.onClick?st.createElement("span",{className:xr.hover,onClick:Kt!=null&&Kt.onClick?Kt.onClick:()=>Mt.history.push(Kt.path)},Kt.name):st.createElement("span",null,Kt.name),st.createElement("span",null,"\xA0",">","\xA0")):st.createElement("span",{key:zt,style:{color:"#5F6368"}},Kt.name))),ii=pt(11938),di=Object.defineProperty,li=Object.defineProperties,Mi=Object.getOwnPropertyDescriptors,yi=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,qe=(gr,nr,Vt)=>nr in gr?di(gr,nr,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):gr[nr]=Vt,Mr=(gr,nr)=>{for(var Vt in nr||(nr={}))Jr.call(nr,Vt)&&qe(gr,Vt,nr[Vt]);if(yi)for(var Vt of yi(nr))Li.call(nr,Vt)&&qe(gr,Vt,nr[Vt]);return gr},Lr=(gr,nr)=>li(gr,Mi(nr)),br=(gr,nr)=>{var Vt={};for(var Kt in gr)Jr.call(gr,Kt)&&nr.indexOf(Kt)<0&&(Vt[Kt]=gr[Kt]);if(gr!=null&&yi)for(var Kt of yi(gr))nr.indexOf(Kt)<0&&Li.call(gr,Kt)&&(Vt[Kt]=gr[Kt]);return Vt};const{Countdown:Pr}=ii.default;var Hi=gr=>{var nr=gr,{onChange:Vt}=nr,Kt=br(nr,["onChange"]);const[zt,Mn]=(0,st.useState)(null);(0,st.useEffect)(()=>{typeof zt=="number"&&zt>=0&&Vt(zt)},[zt]);const Vn=vr=>{const vn=Math.floor(vr/1e3);Mn(vn)};return st.createElement(Pr,Lr(Mr({},Kt),{onChange:Vn}))}},47458:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ut}});var st=pt(59301);function Ut(oe,Ue){const _e=(0,st.useRef)();(0,st.useEffect)(()=>{_e.current=oe}),(0,st.useEffect)(()=>{function de(){_e.current()}if(Ue!==null){let ve=setInterval(de,Ue);return()=>clearInterval(ve)}},[Ue])}},52356:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ve}});var st=pt(59301),Ut=pt(37568),oe=pt(28284),Ue=pt(6767),_e=pt(62957),de=pt(29787),ve=pt(14566),Ee=pt(25399),ke=pt(60242),Se=pt(47889),Ae={flex_box_center:"flex_box_center___SntrE",flex_space_between:"flex_space_between___g4tse",flex_box_vertical_center:"flex_box_vertical_center___ooGcI",flex_box_center_end:"flex_box_center_end___UM2Cs",flex_box_column:"flex_box_column___vRGBc",prompt:"prompt___a_aRk",box:"box___X84XK",row:"row___wofpN",icon:"icon___ixIOQ"},me=pt(52430),Pe=pt(89299),fe=pt(12230),z=pt(1012),te=pt(47257),se=pt.n(te),ie=pt(7745),le=pt(38776),ce=pt(64681),pe=pt(44993),xe=pt(59301),je=Object.defineProperty,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Me=(ot,ut,ft)=>ut in ot?je(ot,ut,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ot[ut]=ft,Be=(ot,ut)=>{for(var ft in ut||(ut={}))Fe.call(ut,ft)&&Me(ot,ft,ut[ft]);if(De)for(var ft of De(ut))Te.call(ut,ft)&&Me(ot,ft,ut[ft]);return ot},Ge=(ot,ut,ft)=>new Promise((St,Qe)=>{var rt=bt=>{try{Ct(ft.next(bt))}catch(ct){Qe(ct)}},wt=bt=>{try{Ct(ft.throw(bt))}catch(ct){Qe(ct)}},Ct=bt=>bt.done?St(bt.value):Promise.resolve(bt.value).then(rt,wt);Ct((ft=ft.apply(ot,ut)).next())});const Ye=Ut.default.TextArea,Ke=({dataSetInfo:ot,attachmentInfo:ut,visible:ft,user:St,dispatch:Qe,onClose:rt=()=>{},onSuccess:wt=()=>{}})=>{var Ct,bt;const[ct,xt]=(0,st.useState)([]),[dt,Mt]=(0,st.useState)(!1),[yt,Ft]=(0,st.useState)(!1),[mt]=oe.default.useForm(),[vt,tt]=(0,st.useState)([]),[He,we]=(0,st.useState)({}),Ne=(0,st.useRef)([]);(0,st.useEffect)(()=>{if(ft){if(ot){const{title:Et,is_public:Ot,desc:qt,attachments:Qt,data_set_tags:Xt}=ot||{},Wt=Qt.map(on=>({id:String(Math.random()).slice(-6),name:on.title,response:{attachment_id:on.id},size:on.size,description:on.description||"",percent:100,status:"done"}));xt(Wt),tt(Xt);const un={title:Et,is_public:Ot,desc:qt};mt.setFieldsValue(un)}if(ut){const Et=ut.map(Ot=>({id:String(Math.random()).slice(-6),name:Ot.title,response:{attachment_id:Ot.id},size:Ot.size,description:Ot.description||"",percent:100,status:"done"}));xt(Et)}Xe()}},[ft]),(0,st.useEffect)(()=>{Ne.current=ct},[ct]),(0,st.useEffect)(()=>{ct!=null&&ct.length?mt.setFields([{name:"attachments",errors:[]}]):mt.setFields([{name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}])},[ct.length]),(0,st.useEffect)(()=>{vt!=null&&vt.length?mt.setFields([{name:"tag_ids",errors:[]}]):mt.setFields([{name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}])},[vt.length]);const Xe=()=>Ge(void 0,null,function*(){Ft(!0);const Et=yield(0,me.ZP)("/api/data_sets/extra_info.jsoin",{method:"get"});Et.status===0&&(we(Et==null?void 0:Et.data),Ft(!1))}),nt={multiple:!0,withCredentials:!0,showUploadList:!1,beforeUpload:Et=>Ge(void 0,null,function*(){var Ot,qt,Qt,Xt,Wt,un;if(((Xt=(Qt=(qt=(Ot=Et.name)==null?void 0:Ot.split("."))==null?void 0:qt.slice(0,-1))==null?void 0:Qt.join("."))==null?void 0:Xt.length)>60)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...He.data_set_filenames,...Ne.current.map(On=>On.name)].includes(Et.name))return Ue.ZP.warning(`\u300A${Et.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();const cn=Et.size/1024/1024/1024;let bn=He==null?void 0:He.data_sets_filesize;if(Ne.current.forEach(On=>{bn+=On==null?void 0:On.size}),bn=bn/1024/1024/1024,(0,ce.Ny)()){if(cn>50)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(50GB)`),Promise.reject()}else if(cn>2)return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();if(bn+cn>((Wt=St==null?void 0:St.userInfo)==null?void 0:Wt.cloud_space)&&!(He!=null&&He.current_user_no_limit))return Ue.ZP.warning(`\u300A${Et.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u50A8\u5B58\u7A7A\u95F4\u5927\u5C0F\u9650\u5236(${(un=St==null?void 0:St.userInfo)==null?void 0:un.cloud_space}GB)`),Promise.reject();const kn={id:String(Math.random()).slice(-6),name:Et.name,size:Et.size,file:Et,description:"",percent:0,status:"uploading"};return Ze(kn,{login:He==null?void 0:He.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),xt(On=>[...On,kn]),Promise.reject()})},Ie=Et=>Ge(void 0,null,function*(){var Ot,qt,Qt;const Xt=Ne.current.find(Wt=>Wt.name===Et.name);(Ot=Xt==null?void 0:Xt.response)!=null&&Ot.attachment_id&&(yield(0,me.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(qt=Xt==null?void 0:Xt.response)==null?void 0:qt.attachment_id}})),Xt!=null&&Xt.client&&((Qt=Xt==null?void 0:Xt.client)==null||Qt.cancel()),xt(Wt=>Wt.filter(un=>un.name!==Et.name))}),Re=()=>{var Et;(Et=Ne.current)==null||Et.forEach(Ot=>{var qt;Ot!=null&&Ot.client&&((qt=Ot==null?void 0:Ot.client)==null||qt.cancel())})};console.log(ct,"fileList1");const Ze=(Et,Ot)=>Ge(void 0,null,function*(){var qt,Qt,Xt,Wt,un,on,cn,bn,xn;Ot.file_name=Et.name;const kn=Et.name,On=yield(0,me.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((On==null?void 0:On.status)!==0){xt(tr=>(tr[tr.findIndex(ii=>ii.name===kn)].status="error",[...tr])),Ue.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}On.data=JSON.parse((0,fe.pe)(On.data));const _r=new(se())({endpoint:(qt=On==null?void 0:On.data)==null?void 0:qt.end_point,region:(Qt=On==null?void 0:On.data)==null?void 0:Qt.region,accessKeyId:(Xt=On==null?void 0:On.data)==null?void 0:Xt.access_key_id,accessKeySecret:(Wt=On==null?void 0:On.data)==null?void 0:Wt.access_key_secret,bucket:(un=On==null?void 0:On.data)==null?void 0:un.bucket,stsToken:(on=On==null?void 0:On.data)==null?void 0:on.security_token}),xr=Et.name.split(".");xr.pop();const $r=Ot.realFileName?xr.join("."):(0,z.Z)();_r.multipartUpload(`datasets/${Ot==null?void 0:Ot.login}/${$r}${kn.indexOf(".")>-1?"."+kn.split(".").pop():""}`,new Blob([Et.file],{type:Et.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(tr,ii,di)=>{console.log("\u8FDB\u5EA6",tr,ii,di),xt(li=>{const Mi=li.findIndex(yi=>yi.name===kn);return li[Mi].client=_r,li[Mi].percent=tr*100,li[Mi].checkpoint=ii,[...li]})},checkpoint:(bn=Ne.current[(cn=Ne.current)==null?void 0:cn.findIndex(tr=>tr.name===kn)])==null?void 0:bn.checkpoint,callback:{customValue:{id:kn+""},url:(xn=On==null?void 0:On.data)==null?void 0:xn.callback_url,host:On==null?void 0:On.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,me.rz)(Ot)}}).then(function(tr){xt(ii=>{var di,li,Mi;const yi=ii.findIndex(Li=>Li.name===kn);let Jr="done";return((di=tr.data)==null?void 0:di.status)===0?ii[yi].response=(li=tr.data)==null?void 0:li.data:(Ue.ZP.warning((Mi=tr.data)==null?void 0:Mi.message),Jr="error"),ii[yi].status=Jr,[...ii]})}).catch(function(tr){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",tr),(tr==null?void 0:tr.name)!=="cancel"&&xt(ii=>{const di=ii.findIndex(li=>li.name===kn);return ii[di].status="error",[...ii]})})}),et=Et=>(Et=Et||"",Et=String(Et),Et=Et.replace(/\s+/g,""),Et),ht=()=>Ge(void 0,null,function*(){var Et;const Ot=mt.getFieldsValue(),{title:qt,is_public:Qt,desc:Xt}=Ot,Wt=[];if(et(qt)||Wt.push({name:"title",errors:["\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"]}),ct!=null&&ct.length||Wt.push({name:"attachments",errors:["\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"]}),vt!=null&&vt.length||Wt.push({name:"tag_ids",errors:["\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"]}),Wt.length){mt.setFields(Wt);return}const un=ct.map(bn=>{var xn;return{attachment_id:(xn=bn.response)==null?void 0:xn.attachment_id,description:bn.description}});Mt(!0);const on={title:Ot.title,attachments:un,tag_ids:vt.map(bn=>bn.id),is_public:Qt,desc:Xt};let cn;ot?cn=yield(0,me.ZP)(`/api/data_sets/${ot==null?void 0:ot.id}.json`,{method:"put",body:on}):cn=yield(0,me.ZP)("/api/data_sets.json",{method:"post",body:on}),cn.status===0&&(Ue.ZP.success("\u64CD\u4F5C\u6210\u529F"),wt((Et=cn==null?void 0:cn.data)==null?void 0:Et.data_set_id),Qe({type:"user/getUserInfo"})),Mt(!1)}),at=Et=>{tt(Et)},Dt=ct.some(Et=>Et.status==="uploading");return console.log("fileList",ct),xe.createElement(_e.default,{destroyOnClose:!0,confirmLoading:dt,bodyStyle:{paddingLeft:16,paddingTop:20},okButtonProps:{disabled:Dt},title:ot?"\u7F16\u8F91\u6570\u636E\u96C6":"\u521B\u5EFA\u6570\u636E\u96C6",width:660,onCancel:()=>{if(Dt){_e.default.confirm({title:"\u5173\u95ED\u5F39\u6846\u63D0\u793A",content:"\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\uFF0C\u662F\u5426\u786E\u5B9A\u79BB\u5F00\uFF1F",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{rt()}});return}rt()},okText:"\u786E\u5B9A",onOk:ht,open:ft,afterClose:()=>{xt([]),tt([]),Mt(!1),Ft(!1),Re(),mt.resetFields()}},xe.createElement(de.Z,{spinning:yt},!(He!=null&&He.current_user_no_limit)&&!yt&&xe.createElement("div",{className:Ae.prompt},xe.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A:\u5E73\u53F0\u4E3A\u7528\u6237\u63D0\u4F9B\u4E86",xe.createElement("span",{style:{color:"#3061D0",margin:"0 5px"}},(Ct=St==null?void 0:St.userInfo)==null?void 0:Ct.cloud_space,"GB"),"\u7684\u6570\u636E\u96C6\u5B58\u50A8\u7A7A\u95F4\uFF0C\u60A8\u76EE\u524D\u5DF2\u4F7F\u7528\u4E86",xe.createElement("span",{style:{color:"#FF9D18",margin:"0 5px"}},((He==null?void 0:He.data_sets_filesize)/(1024*1024*1024)).toFixed(2),"GB")),xe.createElement(oe.default,{form:mt,colon:!1,labelCol:{span:4},wrapperCol:{span:20},size:"large"},xe.createElement(oe.default.Item,{label:"\u6570\u636E\u96C6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u6570\u636E\u96C6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement(Ut.default,{placeholder:"\u8BF7\u8F93\u5165\u6570\u636E\u96C6\u540D\u79F0",showCount:!0,maxLength:60})),xe.createElement(oe.default.Item,{style:{marginBottom:0},name:"attachments",label:"\u4E0A\u4F20\u6570\u636E\u96C6",rules:[{required:!0,message:"\u6570\u636E\u96C6\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement("div",{style:{position:"relative"}},xe.createElement(ve.default,Be({},nt),xe.createElement(le.op,{style:{borderRadius:2}},xe.createElement("i",{className:"icon-shangchuan3 mr5 font14"}),"\u4E0A\u4F20\u6587\u4EF6")),xe.createElement("div",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px",position:"absolute",left:"115px",top:"-2px"}},xe.createElement("div",null,"1.\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7",(0,ce.Ny)()?50:2,"G"),xe.createElement("div",null,"2.",He!=null&&He.current_user_no_limit?"":`\u4E2A\u4EBA\u4E0A\u4F20\u603B\u4F53\u79EF\u4E0D\u8D85\u8FC7${(bt=St==null?void 0:St.userInfo)==null?void 0:bt.cloud_space}GB\uFF0C`,"\u6587\u4EF6\u540D\u4E0D\u8D85\u8FC760\u5B57")))),xe.createElement("div",{className:Ae.box},ct.map(Et=>xe.createElement("div",{key:Et.id,className:Ae.row},xe.createElement("div",{className:Ae.icon},Et.status==="done"&&xe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),Et.status==="error"&&xe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),xe.createElement("div",{style:{width:176}},xe.createElement(Ee.Z,{title:Et==null?void 0:Et.name},xe.createElement("div",{style:{color:Et.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,Pe.tP)(Et==null?void 0:Et.name,9))),Et.status==="uploading"&&xe.createElement(ke.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:Et.percent,showInfo:!1,size:[168,4]})),xe.createElement("i",{onClick:()=>Ie(Et),className:"iconfont icon-shanchu14 font14 ml20 mr20",style:{cursor:"pointer",color:"#F65160"}}),xe.createElement(Ut.default,{value:Et.description,onChange:Ot=>{xt(qt=>{const Qt=qt.findIndex(Xt=>Xt.name===Et.name);return qt[Qt].description=Ot.target.value,[...qt]})},placeholder:"\u5907\u6CE8\u8BF4\u660E",showCount:!0,maxLength:255,style:{width:"286px"}})))),xe.createElement(oe.default.Item,{label:"\u6807\u7B7E",name:"tag_ids",rules:[{required:!0,message:"\u6570\u636E\u96C6\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A"}]},xe.createElement(ie.Z,{isTagsValue:!0,width:"514",selectWidth:"514",placeholder:"\u6DFB\u52A0\u6807\u7B7E",getDataSet:at,tags:vt})),xe.createElement(oe.default.Item,{initialValue:0,label:"\u662F\u5426\u516C\u5F00",name:"is_public",rules:[{required:!0}]},xe.createElement(Se.ZP.Group,null,xe.createElement(Se.ZP,{value:1},"\u662F"),xe.createElement(Se.ZP,{value:0},"\u5426"))),xe.createElement("div",{style:{position:"relative",left:"100px",top:"-20px",width:"400px",color:"#9096A3",fontSize:"12px"}},"\u516C\u5F00\u9700\u8981\u7BA1\u7406\u5458\u5BA1\u6838\u901A\u8FC7\u540E\u53EF\u88AB\u5176\u4ED6\u7528\u6237\u8BBF\u95EE"),xe.createElement(oe.default.Item,{label:"\u7B80\u4ECB\u6458\u8981",name:"desc",style:{marginBottom:0}},xe.createElement(Ye,{placeholder:"\u6B64\u6570\u636E\u96C6\u4E3B\u8981\u5305\u542B\u4EC0\u4E48\u5185\u5BB9\uFF0C\u53EF\u4EE5\u7528\u6765\u505A\u4EC0\u4E48\uFF1F"})))))};var Ve=(0,pe.connect)(({user:ot,dispatch:ut})=>({user:ot,dispatch:ut}))(Ke)},85860:function(Rn,An,pt){"use strict";pt.r(An),pt.d(An,{default:function(){return Lr}});var st=pt(59301),Ut=pt(44993),oe=pt(29787),Ue=pt(91882),_e=pt(25399),de=pt(62957),ve=pt(62673),Ee=pt(6767),ke=pt(75727),Se=pt(47889),Ae=pt(54172),me={flex_box_center:"flex_box_center___eNs_C",flex_space_between:"flex_space_between___oJc0d",flex_box_vertical_center:"flex_box_vertical_center___MoDEY",flex_box_center_end:"flex_box_center_end___BtlAV",flex_box_column:"flex_box_column___nUGZ8",bg:"bg___kj21E",wrap:"wrap___TtbC8",leftContent:"leftContent___FGaJd",header:"header___kobCa",headerBack:"headerBack___TI5PF",title:"title___B5Aew",time:"time___Ab938",introduction:"introduction___JKUBJ",from:"from___WId6_",bottom:"bottom___Expju",user_img:"user_img___igguI",user_name:"user_name___xNcx6",tags_name:"tags_name___xhTee",buttonList:"buttonList___ayDi1",buttonItem:"buttonItem___p_BX_",rightContent:"rightContent___XTwKA",share:"share___o0Kxt",publicStyle:"publicStyle___I8HuS",more:"more___ZQSDV",collectStyle:"collectStyle___FwPiJ",collectActiveStyle:"collectActiveStyle___vbqkD",content:"content___dl660",addTypeRadio:"addTypeRadio___iEl2Y",addBtn:"addBtn___SYc61",shixunTooltip:"shixunTooltip___krR3m",pageStyle:"pageStyle___UXmCF",pageCan:"pageCan___yNiQI",pageUnCan:"pageUnCan___M1D84",dropList:"dropList___KP6TZ",dropName:"dropName___hgrPU"},Pe=pt(13952),fe={flex_box_center:"flex_box_center___Kaphe",flex_space_between:"flex_space_between___dzJWD",flex_box_vertical_center:"flex_box_vertical_center___iwu7i",flex_box_center_end:"flex_box_center_end___izksF",flex_box_column:"flex_box_column___ntJPh",content:"content___gDHym",addTypeRadio:"addTypeRadio___oUKH0",introduceNoData:"introduceNoData___iILly",introduceAdd:"introduceAdd___v9keU",introduceText:"introduceText___iTf1W",introduceButton:"introduceButton___bwZMR",close:"close___csBZw",submit:"submit___SQ6af",introduceContent:"introduceContent___Yad8G",introduceTitle:"introduceTitle___DfmXh",introContentWrap:"introContentWrap___bmjAL",action:"action___DPbIq",fileTable:"fileTable___xqsXc",addBtn:"addBtn___em6e3",wrap:"wrap___Q3aN8",colorBlue:"colorBlue____HNqk",repeatedName:"repeatedName___RIjaL",row:"row___ngnyh",icon:"icon___fQvup"},z=pt(4213),te=pt(98573),se=pt(28284),ie=pt(37568),le=pt(14566),ce=pt(60242),pe=pt(36022),xe=pt(61186),je=pt.n(xe),De=pt(89299),Fe=pt(79809),Te=pt(52430),Me=pt(47257),Be=pt.n(Me),Ge=pt(12230),Ye=pt(1012),Ke=pt(64681),Ve=pt(59301),ot=Object.defineProperty,ut=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,wt=(br,Pr,kr)=>Pr in br?ot(br,Pr,{enumerable:!0,configurable:!0,writable:!0,value:kr}):br[Pr]=kr,Ct=(br,Pr)=>{for(var kr in Pr||(Pr={}))Qe.call(Pr,kr)&&wt(br,kr,Pr[kr]);if(St)for(var kr of St(Pr))rt.call(Pr,kr)&&wt(br,kr,Pr[kr]);return br},bt=(br,Pr)=>ut(br,ft(Pr)),ct=(br,Pr,kr)=>new Promise((Hi,gr)=>{var nr=zt=>{try{Kt(kr.next(zt))}catch(Mn){gr(Mn)}},Vt=zt=>{try{Kt(kr.throw(zt))}catch(Mn){gr(Mn)}},Kt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(nr,Vt);Kt((kr=kr.apply(br,Pr)).next())});const xt=({polls:br,globalSetting:Pr,loading:kr,dispatch:Hi,user:gr,dataSetInfo:nr,indexType:Vt,getInfo:Kt})=>{const zt=(0,Ut.useParams)(),[Mn,Vn]=(0,st.useState)(!1),[vr,vn]=(0,st.useState)(0),Wn=(0,st.useRef)(null),Ht=(0,st.useRef)(null),[Jt,Xn]=(0,st.useState)(""),[jt,ln]=(0,st.useState)(""),[Nn]=se.default.useForm(),[Yn,sn]=(0,st.useState)([]),Dn=(0,st.useRef)([]),[Jn,jn]=(0,st.useState)(!1),[Bn,er]=(0,st.useState)(!1),[_n,sr]=(0,st.useState)(""),Fr=Yn.some(lr=>lr.status==="uploading"),[zr,Dr]=(0,st.useState)(!1),[pn,Ni]=(0,st.useState)([]),[ni,ki]=(0,st.useState)(!1),[hn,qn]=(0,st.useState)(0),[rr,pr]=(0,st.useState)({page:1,limit:10,type:"",id:""}),wr=(lr,rn)=>ct(void 0,null,function*(){ki(!0);const ir=yield(0,pe.iw)({container_type:lr||(rr==null?void 0:rr.type),container_id:rn||(rr==null?void 0:rr.id),page:rr.page,limit:rr.limit});Ni(ir==null?void 0:ir.data),qn(ir==null?void 0:ir.total_count),ki(!1)});(0,st.useEffect)(()=>{var lr;((lr=Wn==null?void 0:Wn.current)==null?void 0:lr.clientHeight)>80?vn(1):vn(0)},[Jt]),(0,st.useEffect)(()=>{Dn.current=Yn},[Yn]),(0,st.useEffect)(()=>{Xn(nr==null?void 0:nr.introduce),ln(nr==null?void 0:nr.introduce)},[nr==null?void 0:nr.introduce]);const Ar={multiple:!1,withCredentials:!0,showUploadList:!1,fileList:Yn==null?void 0:Yn.map(lr=>lr.file),beforeUpload:lr=>ct(void 0,null,function*(){var rn,ir,an,cr,Cr;if(((cr=(an=(ir=(rn=lr.name)==null?void 0:rn.split("."))==null?void 0:ir.slice(0,-1))==null?void 0:an.join("."))==null?void 0:cr.length)>60)return Ee.ZP.warning(`\u300A${lr.name}\u300B\u6587\u4EF6\u540D\u79F0\u8FC7\u957F\uFF0C\u65E0\u6CD5\u4E0A\u4F20`),Promise.reject();if([...Dn.current.map(Si=>Si.name)].includes(lr.name))return Ee.ZP.warning(`\u300A${lr.name}\u300B\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`),Promise.reject();if(lr.size/1024/1024/1024>2)return Ee.ZP.warning(`\u300A${lr.name}\u300B\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u5355\u4E2A\u6587\u4EF6\u4E0A\u4F20\u5927\u5C0F\u9650\u5236(2GB)`),Promise.reject();const Fi={id:String(Math.random()).slice(-6),name:lr.name,size:lr.size,file:lr,description:"",percent:0,status:"uploading"};return qr(Fi,{login:(Cr=gr==null?void 0:gr.userInfo)==null?void 0:Cr.login,container_type:"DataSet",container_id:null,description:"",realFileName:!1}),sn(Si=>[...Si,Fi]),Promise.reject()})},Kr=lr=>ct(void 0,null,function*(){var rn,ir,an;const cr=Dn.current.find(Cr=>Cr.name===lr.name);(rn=cr==null?void 0:cr.response)!=null&&rn.attachment_id&&(yield(0,Te.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:{attachment_id:(ir=cr==null?void 0:cr.response)==null?void 0:ir.attachment_id}})),cr!=null&&cr.client&&((an=cr==null?void 0:cr.client)==null||an.cancel()),sn(Cr=>Cr.filter(Gr=>Gr.name!==lr.name))}),Qr=()=>{var lr;(lr=Dn.current)==null||lr.forEach(rn=>{var ir;rn!=null&&rn.client&&((ir=rn==null?void 0:rn.client)==null||ir.cancel())})},qr=(lr,rn)=>ct(void 0,null,function*(){var ir,an,cr,Cr,Gr,Ri,Fi,Si,Di;rn.file_name=lr.name;const en=lr.name,dn=yield(0,Te.ZP)("/api/buckets/get_data_set_token.json",{method:"get"});if((dn==null?void 0:dn.status)!==0){sn(Pn=>(Pn[Pn.findIndex(In=>In.name===en)].status="error",[...Pn])),Ee.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}dn.data=JSON.parse((0,Ge.pe)(dn.data));const tn=new(Be())({endpoint:(ir=dn==null?void 0:dn.data)==null?void 0:ir.end_point,region:(an=dn==null?void 0:dn.data)==null?void 0:an.region,accessKeyId:(cr=dn==null?void 0:dn.data)==null?void 0:cr.access_key_id,accessKeySecret:(Cr=dn==null?void 0:dn.data)==null?void 0:Cr.access_key_secret,bucket:(Gr=dn==null?void 0:dn.data)==null?void 0:Gr.bucket,stsToken:(Ri=dn==null?void 0:dn.data)==null?void 0:Ri.security_token}),lt=lr.name.split(".");lt.pop();const zn=rn.realFileName?lt.join("."):(0,Ye.Z)();tn.multipartUpload(`datasets/${rn==null?void 0:rn.login}/${zn}${en.indexOf(".")>-1?"."+en.split(".").pop():""}`,new Blob([lr.file],{type:lr.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Pn,In,Qn)=>{console.log("\u8FDB\u5EA6",Pn,In,Qn),console.log("client--",tn),sn(ar=>{const Sn=ar.findIndex(Gn=>Gn.name===en);return Sn!==-1&&(ar[Sn].client=tn,ar[Sn].percent=Pn*100,ar[Sn].checkpoint=In),[...ar]})},checkpoint:(Si=Dn.current[(Fi=Dn.current)==null?void 0:Fi.findIndex(Pn=>Pn.name===en)])==null?void 0:Si.checkpoint,callback:{customValue:{id:en+""},url:(Di=dn==null?void 0:dn.data)==null?void 0:Di.callback_url,host:dn==null?void 0:dn.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Te.rz)(rn)}}).then(function(Pn){sn(In=>{var Qn,ar,Sn;const Gn=In.findIndex(Kn=>Kn.name===en);let Hn="done";return Gn!==-1&&(((Qn=Pn.data)==null?void 0:Qn.status)===0?In[Gn].response=(ar=Pn.data)==null?void 0:ar.data:(Ee.ZP.warning((Sn=Pn.data)==null?void 0:Sn.message),Hn="error"),In[Gn].status=Hn),[...In]})}).catch(function(Pn){console.log("\u63A5\u53E3\u9519\u8BEF\uFF1A",Pn),(Pn==null?void 0:Pn.name)!=="cancel"&&sn(In=>{const Qn=In.findIndex(ar=>ar.name===en);return Qn!==-1&&(In[Qn].status="error"),[...In]})})});return Ve.createElement("div",{className:fe.content},!Mn&&!Jt&&Vt&&Ve.createElement("div",{className:fe.introduceNoData,onClick:()=>{Vn(!0)}},Ve.createElement("div",{className:fe.introduceAdd},Ve.createElement("i",{className:"icon icon-tianjia4 mr5 font12"})," \u6DFB\u52A0\u6570\u636E\u96C6\u4ECB\u7ECD"),Ve.createElement("div",{className:fe.introduceText},"\u8BA9\u4F60\u7684\u6570\u636E\u96C6\u66F4\u53D7\u6B22\u8FCE")),!Mn&&Jt&&Ve.createElement("div",{className:fe.introduceContent},Ve.createElement("div",{className:fe.introduceTitle},"\u6570\u636E\u96C6\u4ECB\u7ECD",Vt&&Ve.createElement("i",{className:"icon icon-bianji9 font14 ml10",style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{Vn(!0)}})),Ve.createElement("div",{className:fe.introContentWrap},Ve.createElement("div",null,Ve.createElement("div",{ref:Ht,style:vr>0?{height:vr===1?80:"auto",overflow:vr===1?"hidden":"auto"}:{paddingRight:0}},Ve.createElement("div",{ref:Wn},Ve.createElement(te.Z,{value:Jt,style:{fontSize:"14px"}}))),!!vr&&Ve.createElement(st.Fragment,null,vr===1?Ve.createElement("div",{onClick:()=>{vn(2)},className:fe.action},"\u5C55\u5F00",Ve.createElement("i",{className:"iconfont icon-zhankaixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})):Ve.createElement("div",{onClick:()=>{vn(1)},className:fe.action},"\u6536\u8D77",Ve.createElement("i",{className:"iconfont icon-shouqixiaojiantou",style:{fontSize:"10px",marginLeft:"3px"}})))))),Mn&&Ve.createElement("div",{style:{marginTop:"30px"}},Ve.createElement(z.Z,{watch:!0,onChange:lr=>{ln(lr)},defaultValue:jt,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5185\u5BB9\uFF0C\u6700\u591A5000\u4E2A\u5B57\u7B26"}),Ve.createElement("div",{className:fe.introduceButton},Ve.createElement("div",{className:fe.close,onClick:lr=>{lr.stopPropagation(),Vn(!1)}},"\u53D6\u6D88"),Ve.createElement("div",{className:fe.submit,onClick:lr=>{lr.stopPropagation(),(0,pe.R2)({id:zt==null?void 0:zt.id,introduce:jt}).then(rn=>{(rn==null?void 0:rn.status)==0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),Vn(!1),Kt(!0))})}},"\u786E\u8BA4"))),Ve.createElement("div",{className:fe.fileTable},Ve.createElement("div",null,"\u6587\u4EF6\u5217\u8868"),Vt&&Ve.createElement("div",{className:fe.addBtn,onClick:()=>{jn(!0)}},"\u4E0A\u4F20\u6587\u4EF6")),Ve.createElement(Ae.default,{dataSource:nr==null?void 0:nr.attachments,pagination:!1,style:{marginTop:"20px"},scroll:{y:300},columns:[{title:"\u6587\u4EF6",align:"left",width:400,dataIndex:"title",ellipsis:!0},{title:"\u5907\u6CE8",align:"left",dataIndex:"description",ellipsis:!0},{title:"\u521B\u5EFA\u65F6\u95F4",align:"left",ellipsis:!0,dataIndex:"created_on",render:lr=>Ve.createElement("span",{style:{color:"#666666"}},lr?je()(lr).format("YYYY-MM-DD"):"--")},{title:"\u6587\u4EF6\u5927\u5C0F",align:"left",dataIndex:"filesize",ellipsis:!0},{title:"\u4E0B\u8F7D\u6570",align:"center",dataIndex:"downloads",ellipsis:!0,render:(lr,rn)=>Ve.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){var ir;((0,Ke.Ny)()||((ir=gr==null?void 0:gr.userInfo)==null?void 0:ir.login)==="mfflo3p2e")&&(Dr(!0),rr.type=rn==null?void 0:rn.container_type,rr.id=rn==null?void 0:rn.container_id,rr.page=1,rr.limit=10,pr(Ct({},rr)),yield wr(rn==null?void 0:rn.container_type,rn==null?void 0:rn.container_id))})},lr||"0")},{title:"\u64CD\u4F5C",align:"right",dataIndex:"role",width:Vt?130:60,render:(lr,rn,ir)=>Ve.createElement("span",{style:{color:"#3061D0"}},Ve.createElement("div",{style:{display:"flex"}},Ve.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>ct(void 0,null,function*(){yield(0,De.Nd)(rn.title,rn==null?void 0:rn.download_url),yield(0,pe.SG)({id:rn==null?void 0:rn.id}),Kt()})},"\u4E0B\u8F7D"),Vt&&Ve.createElement("div",{style:{marginRight:"10px",color:"#3061D0",cursor:"pointer"},onClick:()=>{var an,cr,Cr,Gr;let Ri=(cr=rn==null?void 0:rn.title)==null?void 0:cr.substring(((an=rn==null?void 0:rn.title)==null?void 0:an.lastIndexOf("."))+1);Nn.setFieldsValue({title:(Gr=rn==null?void 0:rn.title)==null?void 0:Gr.substring(0,(Cr=rn==null?void 0:rn.title)==null?void 0:Cr.lastIndexOf(".")),description:rn==null?void 0:rn.description}),de.default.confirm({icon:null,title:"\u7F16\u8F91",width:700,centered:!0,content:Ve.createElement("div",null,Ve.createElement(se.default,{form:Nn,colon:!1,labelCol:{span:3},style:{marginBottom:"-20px"},wrapperCol:{span:21}},Ve.createElement(se.default.Item,{label:"\u6587\u4EF6\u540D\u79F0",name:"title",rules:[{required:!0,message:"\u5FC5\u586B\u9879"}]},Ve.createElement(ie.default,{placeholder:"\u6587\u4EF6\u540D\u79F0\u6700\u591A\u53EF\u8F93\u5165255\u5B57",size:"large",suffix:Ve.createElement("span",null,".",Ri)})),Ve.createElement(se.default.Item,{label:"\u5907\u6CE8",name:"description"},Ve.createElement(Fe.Z,{placeholder:"\u5907\u6CE8\u8BF4\u660E\uFF0C\u6700\u591A255\u5B57",size:"large"})))),onOk:()=>ct(void 0,null,function*(){yield Nn.validateFields(),(0,pe.A0)({id:zt==null?void 0:zt.id,attachment_id:rn.id,filename:Nn.getFieldValue("title")+"."+Ri,description:Nn.getFieldValue("description")}).then(Fi=>{(Fi==null?void 0:Fi.status)==0&&(Ee.ZP.success("\u7F16\u8F91\u6210\u529F"),Kt())})})})}},"\u7F16\u8F91"),Vt&&Ve.createElement("div",{style:{color:"#9096A3",cursor:"pointer"},onClick:()=>{de.default.confirm({icon:null,centered:!0,title:"\u63D0\u793A",content:"\u5220\u9664\u6570\u636E\u96C6\u4E0D\u4F1A\u5F71\u54CD\u5230\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4F46\u5220\u9664\u540E\u6570\u636E\u5C06\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>ct(void 0,null,function*(){(0,pe.Il)({attachment_id:rn==null?void 0:rn.id}).then(an=>{(an==null?void 0:an.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Hi({type:"user/getUserInfo"}),Kt(!0))})})})}},"\u5220\u9664")))}]}),Ve.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Jn,title:"\u4E0A\u4F20\u6587\u4EF6",okButtonProps:{loading:Bn,disabled:Fr},width:"1000px",onOk:()=>ct(void 0,null,function*(){const lr=Yn.map(ir=>{var an;return{attachment_id:(an=ir.response)==null?void 0:an.attachment_id,description:_n}});if(Yn.length===0){Ee.ZP.info("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6\uFF01");return}er(!0);const rn=yield(0,Te.ZP)(`/api/data_sets/${zt==null?void 0:zt.id}/upload_attachments.json`,{method:"post",body:{attachments:lr}});(rn==null?void 0:rn.status)==0&&(Ee.ZP.success("\u4E0A\u4F20\u6210\u529F\uFF01"),Kt(),jn(!1),Hi({type:"user/getUserInfo"})),er(!1)}),onCancel:()=>{if(Fr){de.default.confirm({title:"\u5173\u95ED\u5F39\u6846\u63D0\u793A",content:"\u6709\u6587\u4EF6\u672A\u4E0A\u4F20\uFF0C\u662F\u5426\u786E\u5B9A\u79BB\u5F00\uFF1F",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:()=>{jn(!1)}});return}jn(!1)},afterClose:()=>{sn([]),sr(""),er(!1),Qr()}},Ve.createElement("div",{className:fe.wrap},Ve.createElement("div",{className:"mb10"},Ve.createElement("span",{style:{color:"#ff4d4f",marginRight:"5px"}},"*"),"\u9009\u62E9\u6587\u4EF6 ",Ve.createElement("span",{className:"c-light-black"},"(\u5355\u4E2A\u6587\u4EF6\u4E0D\u8D85\u8FC72GB)")),Ve.createElement("div",null,Ve.createElement(le.default.Dragger,bt(Ct({},Ar),{height:300}),Ve.createElement("div",null,Ve.createElement("i",{className:`iconfont icon-shangchuan font50 ${fe.colorBlue}`})),Ve.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",Ve.createElement("span",{className:`${fe.colorBlue} ml5`},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),Ve.createElement("div",{className:fe.box},Yn.map(lr=>Ve.createElement("div",{key:lr.id,className:fe.row},Ve.createElement("div",{style:{display:"flex",alignItems:"center"}},Ve.createElement("div",{className:fe.icon},lr.status==="done"&&Ve.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),lr.status==="error"&&Ve.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),Ve.createElement("div",{style:{flex:1}},Ve.createElement(_e.Z,{title:lr==null?void 0:lr.name},Ve.createElement("div",{style:{width:"100%",color:lr.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,De.tP)(lr==null?void 0:lr.name,9))),lr.status==="uploading"&&Ve.createElement(ce.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:lr.percent,showInfo:!1,style:{width:"900px"}}))),Ve.createElement("i",{onClick:()=>Kr(lr),className:"iconfont icon-shanchu14 font14 ml20",style:{cursor:"pointer",color:"#F65160"}})))),Ve.createElement("div",{style:{marginTop:"20px"}},"\u5907\u6CE8\uFF1A"),Ve.createElement("div",null,Ve.createElement(ie.default,{allowClear:!0,value:_n,onChange:lr=>{sr(lr.target.value)},bordered:!1,showCount:!0,maxLength:255,placeholder:"\u8BF7\u586B\u5199\u5907\u6CE8\u4FE1\u606F"})))),Ve.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:zr,title:"\u4E0B\u8F7D\u4FE1\u606F",width:"730px",onCancel:()=>{Dr(!1)},footer:null},Ve.createElement("div",null,Ve.createElement(Ae.default,{dataSource:pn,scroll:{y:47*6},className:"mt10 mb10",loading:ni,pagination:{total:hn||0,onChange:(lr,rn)=>ct(void 0,null,function*(){rr.page=lr,rr.limit=rn,pr(Ct({},rr)),yield wr()}),onShowSizeChange:(lr,rn)=>ct(void 0,null,function*(){rr.page=1,rr.limit=rn,pr(Ct({},rr)),yield wr()}),current:rr==null?void 0:rr.page,pageSize:rr==null?void 0:rr.limit,showTotal:lr=>Ve.createElement(Ve.Fragment,null,"\u5171",Ve.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},lr),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:lr=>Ve.createElement("span",null,lr||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:lr=>Ve.createElement("span",null,lr||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:lr=>Ve.createElement("span",null,lr||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:lr=>Ve.createElement("span",{style:{color:"#666666"}},lr?je()(lr).format("YYYY-MM-DD"):"--")}]}))))};var dt=(0,Ut.connect)(({polls:br,loading:Pr,user:kr,globalSetting:Hi})=>({polls:br,globalSetting:Hi,user:kr,loading:Pr.effects}))(xt),Mt=pt(26227),yt=pt(77019),Ft=pt(5269),mt=pt(99571),vt={flex_box_center:"flex_box_center___kjELP",flex_space_between:"flex_space_between___IoBKu",flex_box_vertical_center:"flex_box_vertical_center___NuujF",flex_box_center_end:"flex_box_center_end___Kc5UK",flex_box_column:"flex_box_column___ebFBu",reply:"reply___xDf2z",replyList:"replyList___zMH5f",comment:"comment___qHsYF",content:"content___vTju0",commentItem:"commentItem___aGdcc",commentParItem:"commentParItem___XkqkQ",submitStyle:"submitStyle___RwXx8"},tt=pt(3832),He=pt(59301),we=Object.defineProperty,Ne=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Ze=(br,Pr,kr)=>Pr in br?we(br,Pr,{enumerable:!0,configurable:!0,writable:!0,value:kr}):br[Pr]=kr,et=(br,Pr)=>{for(var kr in Pr||(Pr={}))Ie.call(Pr,kr)&&Ze(br,kr,Pr[kr]);if(nt)for(var kr of nt(Pr))Re.call(Pr,kr)&&Ze(br,kr,Pr[kr]);return br},ht=(br,Pr)=>Ne(br,Xe(Pr)),at=(br,Pr,kr)=>new Promise((Hi,gr)=>{var nr=zt=>{try{Kt(kr.next(zt))}catch(Mn){gr(Mn)}},Vt=zt=>{try{Kt(kr.throw(zt))}catch(Mn){gr(Mn)}},Kt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(nr,Vt);Kt((kr=kr.apply(br,Pr)).next())});je().locale("ZH-cn");function Dt({user:br,vlist:Pr=[],dispatch:kr,params:Hi,id:gr,memo_replies:nr,forumsDetail:Vt}){return He.createElement("aside",{className:vt.comment},Pr.map(function(Kt,zt){var Mn,Vn;return He.createElement(yt.Z,{key:zt,className:vt.commentItem},He.createElement(Ft.Z,{span:24},He.createElement(yt.Z,null,He.createElement(Ft.Z,{flex:"1"},He.createElement("a",{href:`/users/${Kt.user_login}`,target:"_blank",style:{color:"#9096A3",fontSize:"12px"}},Kt==null?void 0:Kt.username),He.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Kt.time)),(Kt.can_delete||Kt.user_id===((Mn=br.userInfo)==null?void 0:Mn.user_id)||Kt.user_login===((Vn=br.userInfo)==null?void 0:Vn.login))&&He.createElement(Ft.Z,{className:"forums-comment-delete",style:{display:"none"}},He.createElement(_e.Z,{title:"\u5220\u9664"},He.createElement(Mt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:He.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>at(this,null,function*(){const vr=yield(0,tt.sW)({id:Kt.id,memo_type:"data_set"}),vn=nr.find(Wn=>Wn.id===gr).children.filter(Wn=>Wn.id!==Kt.id);nr.find(Wn=>Wn.id===gr).children=vn,kr({type:"forumsDetail/setForumsDetailData",payload:ht(et({},Vt.forumsDetailData),{memo_replies:[...nr],memo_type:"data_set"})})})})}}))))),He.createElement(Ft.Z,null,He.createElement(te.Z,{value:Kt.content,style:{color:"#232B40",fontSize:"14px"}})))}))}var Et=Dt,Ot=pt(59301),qt=Object.defineProperty,Qt=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,Wt=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable,cn=(br,Pr,kr)=>Pr in br?qt(br,Pr,{enumerable:!0,configurable:!0,writable:!0,value:kr}):br[Pr]=kr,bn=(br,Pr)=>{for(var kr in Pr||(Pr={}))un.call(Pr,kr)&&cn(br,kr,Pr[kr]);if(Wt)for(var kr of Wt(Pr))on.call(Pr,kr)&&cn(br,kr,Pr[kr]);return br},xn=(br,Pr)=>Qt(br,Xt(Pr)),kn=(br,Pr,kr)=>new Promise((Hi,gr)=>{var nr=zt=>{try{Kt(kr.next(zt))}catch(Mn){gr(Mn)}},Vt=zt=>{try{Kt(kr.throw(zt))}catch(Mn){gr(Mn)}},Kt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(nr,Vt);Kt((kr=kr.apply(br,Pr)).next())});je().locale("ZH-cn");const On=({user:br,forumsDetail:Pr,globalSetting:kr,loading:Hi,dispatch:gr,handleClick:nr,memoId:Vt},Kt)=>{const{memo:zt,memo_replies:Mn}=Pr.forumsDetailData||{},Vn=(0,Ut.useParams)(),[vr,vn]=(0,st.useState)(""),[Wn,Ht]=(0,st.useState)(""),[Jt,Xn]=(0,st.useState)(-1),[jt,ln]=(0,st.useState)(!1),[Nn,Yn]=(0,st.useState)(!1),[sn,Dn]=(0,st.useState)(1);(0,st.useEffect)(()=>{ln((zt==null?void 0:zt.reply_for_memo_count)>10)},[zt==null?void 0:zt.reply_for_memo_count]),(0,st.useEffect)(()=>{gr({type:"forumsDetail/getForumsDetailData",payload:{id:Vt,memo_type:"data_set"}})},[]);const Jn=()=>kn(void 0,null,function*(){var Bn;const er=sn+1;Dn(er);const _n=yield(0,tt.z5)({id:Vt,page:er,memo_type:"data_set"});_n!=null&&_n.memo_replies&&(gr({type:"forumsDetail/setForumsDetailData",payload:xn(bn({},Pr.forumsDetailData),{memo_replies:[...Mn,..._n.memo_replies]})}),ln(((Bn=_n.memo_replies)==null?void 0:Bn.length)===10))}),jn=Bn=>{var er,_n,sr,Fr;return xn(bn({},Bn),{image_url:(er=br.userInfo)==null?void 0:er.image_url,children:[],user_id:(_n=br.userInfo)==null?void 0:_n.user_id,user_login:(sr=br.userInfo)==null?void 0:sr.login,username:(Fr=br.userInfo)==null?void 0:Fr.username,time:`${(0,De.li)((new Date().getTime()-new Date(Bn.created_at).getTime())/1e3)}\u524D`})};return Ot.createElement("section",{className:vt.wrap},!!(Mn!=null&&Mn.length)&&Ot.createElement("aside",{className:vt.content},Ot.createElement("aside",{className:vt.replyList},Mn==null?void 0:Mn.map(function(Bn,er){var _n,sr,Fr;return Ot.createElement(yt.Z,{gutter:[12,12],key:er},Ot.createElement(Ft.Z,{flex:"40px"},Ot.createElement("a",{href:`/users/${Bn.user_login}`,target:"_blank"},Ot.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",width:"46",height:"46",src:`${Pe.Z.IMG_SERVER}/images/${Bn==null?void 0:Bn.image_url}`}))),Ot.createElement(Ft.Z,{flex:"1"},Ot.createElement(yt.Z,{align:"middle",className:vt.commentParItem},Ot.createElement(Ft.Z,{span:24},Ot.createElement(yt.Z,null,Ot.createElement(Ft.Z,{flex:"1"},Ot.createElement("a",{href:`/users/${Bn.user_login}`,target:"_blank"},Ot.createElement("span",{style:{color:"#9096A3",fontSize:"12px"}},Bn==null?void 0:Bn.username)),Ot.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},Bn.time)),(Bn.can_delete||Bn.user_id===((_n=br.userInfo)==null?void 0:_n.user_id)||Bn.user_login===((sr=br.userInfo)==null?void 0:sr.login))&&Ot.createElement(Ft.Z,{className:"forums-comment-par-delete",style:{display:"none"}},Ot.createElement(_e.Z,{title:"\u5220\u9664"},Ot.createElement(Mt.Z,{className:"current",onClick:()=>{de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ot.createElement("div",{className:"font16 tc"},"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417\uFF1F"),onOk:()=>kn(this,null,function*(){const zr=yield(0,tt.sW)({id:Bn.id,memo_type:"data_set"}),Dr=Mn.filter(pn=>pn.id!==Bn.id);gr({type:"forumsDetail/setForumsDetailData",payload:xn(bn({},Pr.forumsDetailData),{memo_replies:[...Dr],memo_type:"data_set"})})})})}}))))),Ot.createElement(Ft.Z,{span:24,style:{marginTop:"5px"}},Ot.createElement("div",{onClick:nr},Ot.createElement(te.Z,{value:Bn.content,style:{color:"#232B40",fontSize:"14px"}}))),!!((Fr=Bn==null?void 0:Bn.children)!=null&&Fr.length)&&Ot.createElement(Et,{user:br,id:Bn==null?void 0:Bn.id,vlist:Bn==null?void 0:Bn.children,dispatch:gr,params:Vn,memo_replies:Mn,forumsDetail:Pr}),Ot.createElement(Ft.Z,{span:24,className:"mt5 c-light-black"},Jt===er?Ot.createElement("aside",null,Ot.createElement(z.Z,{onChange:zr=>{Ht(zr)},height:150,isFocus:!0,placeholder:"\u6211\u8981\u56DE\u590D..."}),Ot.createElement(yt.Z,null,Ot.createElement(Ft.Z,{span:24,className:"tr"},Ot.createElement(mt.ZP,{type:"primary",size:"middle",onClick:()=>kn(this,null,function*(){if(Wn==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const zr=yield(0,tt.ts)({parent_id:Bn.id,content:Wn,memo_type:"data_set"});Ht(null),zr&&(Xn(-1),Mn.find(Dr=>Dr.id===zr.parent_id).children.push(jn(zr)),gr({type:"forumsDetail/setForumsDetailData",payload:xn(bn({},Pr.forumsDetailData),{memo:xn(bn({},zt),{reply_for_memo_count:(zt==null?void 0:zt.reply_for_memo_count)+1}),memo_replies:[...Mn],memo_type:"data_set"})}))}})},"\u53D1\u9001")))):Ot.createElement("div",{className:"tr",style:{textAlign:"left"}},Ot.createElement("span",{className:"iconfont icon-xiaopinglun mr30 current font14",onClick:()=>Xn(er)}),Ot.createElement(_e.Z,{title:Bn.user_praise?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Ot.createElement("span",{className:Bn.user_praise?"c-orange":"c-gery-888"},Ot.createElement("i",{className:"iconfont icon-dianzan4 mr5 current font14",onClick:()=>kn(this,null,function*(){const zr=yield(0,tt.vL)({id:Bn.id,container_type:"Memo",type:Bn.user_praise?0:1,memo_type:"data_set"});(zr==null?void 0:zr.praise_count)>=0&&(Mn.find(Dr=>Dr.id===Bn.id).user_praise=!Bn.user_praise,Mn.find(Dr=>Dr.id===Bn.id).praise_count=zr==null?void 0:zr.praise_count,gr({type:"forumsDetail/setForumsDetailData",payload:xn(bn({},Pr.forumsDetailData),{memo_replies:[...Mn],memo_type:"data_set"})}))})}),Bn.praise_count>0?Bn.praise_count:"")))))))}))),jt&&Ot.createElement("aside",{className:"bg-white pb20",style:{display:"flex",justifyContent:"center",marginTop:"20px"}},Ot.createElement(yt.Z,{justify:"space-between"},Ot.createElement(Ft.Z,null),Ot.createElement(Ft.Z,null,jt&&Ot.createElement("a",{style:{color:"#3061D0",fontSize:"14px"},onClick:Jn},"\u67E5\u770B\u66F4\u591A\u8BC4\u8BBA",Ot.createElement("i",{className:"icon icon-zhankaixiaojiantou ",style:{fontSize:"10px",marginLeft:"3px"}}))))),Ot.createElement("aside",{className:vt.reply},Ot.createElement(z.Z,{onBlur:()=>Yn(!1),isFocus:Nn,defaultValue:vr,id:"writeForumsReviewId",onChange:Bn=>{vn(Bn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),Ot.createElement(yt.Z,null,Ot.createElement(Ft.Z,{flex:"1"}),Ot.createElement(Ft.Z,null,Ot.createElement("div",{className:vt.submitStyle,style:{width:"60px",height:"32px",textAlign:"center"},onClick:()=>kn(void 0,null,function*(){if(vr==="")Ee.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");else{const Bn=yield(0,tt.ts)({parent_id:zt==null?void 0:zt.id,content:vr,memo_type:"data_set"});vn(null),Bn&&gr({type:"forumsDetail/setForumsDetailData",payload:xn(bn({},Pr.forumsDetailData),{memo:xn(bn({},zt),{reply_for_memo_count:(zt==null?void 0:zt.reply_for_memo_count)+1}),memo_replies:[jn(Bn),...Mn],memo_type:"data_set"})})}})},"\u53D1\u9001")))))};var _r=(0,Ut.connect)(({user:br,forumsDetail:Pr,loading:kr,globalSetting:Hi})=>({user:br,forumsDetail:Pr,globalSetting:Hi,loading:kr.models.forumsDetail}),null,null,{forwardRef:!0})((0,st.forwardRef)(On)),xr=pt(38776),$r=pt(52356),tr=pt(59301),ii=Object.defineProperty,di=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,yi=(br,Pr,kr)=>Pr in br?ii(br,Pr,{enumerable:!0,configurable:!0,writable:!0,value:kr}):br[Pr]=kr,Jr=(br,Pr)=>{for(var kr in Pr||(Pr={}))li.call(Pr,kr)&&yi(br,kr,Pr[kr]);if(di)for(var kr of di(Pr))Mi.call(Pr,kr)&&yi(br,kr,Pr[kr]);return br},Li=(br,Pr,kr)=>new Promise((Hi,gr)=>{var nr=zt=>{try{Kt(kr.next(zt))}catch(Mn){gr(Mn)}},Vt=zt=>{try{Kt(kr.throw(zt))}catch(Mn){gr(Mn)}},Kt=zt=>zt.done?Hi(zt.value):Promise.resolve(zt.value).then(nr,Vt);Kt((kr=kr.apply(br,Pr)).next())});let qe={public:"\u516C\u5F00\u6570\u636E\u96C6",mine:"\u6211\u7684\u6570\u636E\u96C6",share:"\u56E2\u961F\u5171\u4EAB",collect:"\u6211\u6536\u85CF\u7684"};const Mr=({polls:br,globalSetting:Pr,loading:kr,dispatch:Hi,user:gr})=>{var nr,Vt,Kt;const zt=(0,Ut.useParams)(),[Mn]=(0,Ut.useSearchParams)(),[Vn,vr]=(0,st.useState)(!1),[vn,Wn]=(0,st.useState)(1),[Ht,Jt]=(0,st.useState)(null),[Xn,jt]=(0,st.useState)(""),[ln,Nn]=(0,st.useState)(),[Yn,sn]=(0,st.useState)(1),[Dn,Jn]=(0,st.useState)(1),jn=(0,st.useRef)([]),[Bn,er]=(0,st.useState)([]),[_n,sr]=(0,st.useState)(!1),[Fr,zr]=(0,st.useState)(!1),[Dr,pn]=(0,st.useState)(!1),[Ni,ni]=(0,st.useState)([]),[ki,hn]=(0,st.useState)(!1),[qn,rr]=(0,st.useState)(0),[pr,wr]=(0,st.useState)({page:1,limit:10}),Ar=()=>Li(void 0,null,function*(){hn(!0);const ir=yield(0,pe.iw)({container_type:Ht==null?void 0:Ht.container_type,container_id:Ht==null?void 0:Ht.container_id,page:pr==null?void 0:pr.page,limit:pr==null?void 0:pr.limit});(ir==null?void 0:ir.status)==0&&(ni(ir==null?void 0:ir.data),rr(ir==null?void 0:ir.total_count),hn(!1))});(0,st.useEffect)(()=>{qr(),(0,Te.ZP)("/api/teach_group_shares.json",{method:"get"}).then(ir=>{(ir==null?void 0:ir.status)==0&&er(ir==null?void 0:ir.groups)})},[]),(0,st.useEffect)(()=>{vn==2&&Qr()},[vn,Yn]);const Kr=(ir,an)=>(ir=Math.max(ir,0),an=Math.max(an,1),Math.ceil(ir/an)),Qr=()=>{(0,pe.Ce)({id:zt==null?void 0:zt.id,page:Yn,limit:16}).then(ir=>{var an,cr;(ir==null?void 0:ir.status)==0&&(Nn((an=ir==null?void 0:ir.data)==null?void 0:an.shixuns),Jn(Kr((cr=ir==null?void 0:ir.data)==null?void 0:cr.count,16)))})},qr=(ir=!1)=>{zr(!0),(0,pe.Ru)(zt==null?void 0:zt.id).then(an=>{var cr,Cr;(an==null?void 0:an.status)==0&&(Jt(an==null?void 0:an.data),vr((0,Ke.Ny)()||((cr=an==null?void 0:an.data)==null?void 0:cr.is_creator)),jn.current=(Cr=an==null?void 0:an.data)==null?void 0:Cr.share_group_ids,ir&&jt(new Date),zr(!1))})},lr=()=>{sr(!1)},rn=()=>{qr(),sr(!1)};return tr.createElement(oe.Z,{spinning:Fr},tr.createElement("section",{className:me.bg},Ht&&tr.createElement(tr.Fragment,null,tr.createElement("div",{className:"edu-container"},tr.createElement("aside",{className:"mt10"},tr.createElement(Ue.Z,{separator:">"},tr.createElement(Ue.Z.Item,null,tr.createElement(Ut.Link,{to:"/dataset"},"\u6570\u636E\u96C6")),tr.createElement(Ue.Z.Item,null,tr.createElement(Ut.Link,{to:`/dataset?tabId=${Mn.get("tabId")}`},qe[Mn.get("tabId")])),tr.createElement(Ue.Z.Item,null,Ht==null?void 0:Ht.title))),tr.createElement("aside",{className:me.wrap},tr.createElement("div",{className:me.leftContent,style:{width:Vn?"78%":"87%"}},tr.createElement("div",{className:me.header},tr.createElement("div",{className:me.headerBack,onClick:()=>{Ut.history.push(`/dataset?tabId=${Mn.get("tabId")}`)}},tr.createElement("i",{className:"iconfont icon-fanhui4 ",style:{fontSize:"10px",margin:"0 3px 0 5px"}}),"\u8FD4\u56DE"),tr.createElement("div",{className:me.title},Ht==null?void 0:Ht.title),tr.createElement("div",{className:me.time},Ht==null?void 0:Ht.create_at)),tr.createElement("div",{className:me.introduction},Ht==null?void 0:Ht.desc),tr.createElement("div",{className:me.bottom},((nr=Ht==null?void 0:Ht.user_info)==null?void 0:nr.image_url)&&tr.createElement("img",{className:me.user_img,alt:"\u7528\u6237\u5934\u50CF",src:`${Pe.Z.IMG_SERVER}/images/${(Vt=Ht==null?void 0:Ht.user_info)==null?void 0:Vt.image_url}`}),tr.createElement("div",{className:me.user_name},Ht==null?void 0:Ht.user_info_name),(Kt=Ht==null?void 0:Ht.data_set_tags)==null?void 0:Kt.map((ir,an)=>{var cr;return an<3?tr.createElement("div",{key:an,className:me.tags_name},ir==null?void 0:ir.tag_name):an==3?tr.createElement(_e.Z,{key:an,title:(cr=Ht==null?void 0:Ht.data_set_tags)==null?void 0:cr.map((Cr,Gr)=>{var Ri;if(Gr>2)return(Cr==null?void 0:Cr.tag_name)+(Gr===((Ri=Ht==null?void 0:Ht.data_set_tags)==null?void 0:Ri.length)-1?"":"\u3001")}).join("")},tr.createElement("div",{key:an,className:me.tags_name},"...")):null}),tr.createElement("div",{className:me.buttonList},tr.createElement(_e.Z,{title:`\u5F15\u7528\u6570\uFF1A${Ht==null?void 0:Ht.used_count}`},tr.createElement("div",{className:`${me.buttonItem} current`},tr.createElement("i",{className:"iconfont icon-yinyong font12 mr5"}),Ht==null?void 0:Ht.used_count)),tr.createElement(_e.Z,{title:`\u6D4F\u89C8\u6570\uFF1A${Ht==null?void 0:Ht.visited_count}`},tr.createElement("div",{className:`${me.buttonItem} current`,onClick:()=>Li(void 0,null,function*(){var ir;((0,Ke.Ny)()||((ir=gr==null?void 0:gr.userInfo)==null?void 0:ir.login)==="mfflo3p2e")&&(pn(!0),pr.page=1,pr.limit=10,wr(Jr({},pr)),yield Ar())})},tr.createElement("i",{className:"iconfont icon-chakanrenshu font12 mr5"}),Ht==null?void 0:Ht.visited_count)),tr.createElement(_e.Z,{title:`\u8BC4\u8BBA\u6570\uFF1A${Ht==null?void 0:Ht.comment_count}`},tr.createElement("div",{className:`${me.buttonItem} current`},tr.createElement("i",{className:"iconfont icon-xiaopinglun font12 mr5"}),Ht==null?void 0:Ht.comment_count))))),tr.createElement("div",{className:me.rightContent,style:{width:Vn?"22%":"13%"}},Vn?tr.createElement("div",{style:{display:"flex",marginLeft:"auto"}},tr.createElement("div",{className:me.share,onClick:()=>Li(void 0,null,function*(){de.default.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u5171\u4EAB\u81F3\u6559\u7814\u56E2\u961F",maskClosable:!0,icon:null,content:tr.createElement("div",{className:`font14 ${me.overflow}`},tr.createElement("div",{className:me.tips},"\u63D0\u793A\uFF1A\u5171\u4EAB\u540E\u7684\u6570\u636E\u96C6\u652F\u6301\u56E2\u961F\u6210\u5458\u8FDB\u884C\u7F16\u8F91\uFF0C\u5982\u9700\u64A4\u9500\u672C\u6570\u636E\u96C6\u5BF9\u9009\u4E2D\u6559\u7814\u56E2\u961F\u7684\u5206\u4EAB\uFF0C\u53D6\u6D88\u9009\u4E2D\u5E76\u786E\u5B9A\u5373\u53EF\u3002"),tr.createElement(ve.default.Group,{style:{marginTop:"10px"},defaultValue:Ht==null?void 0:Ht.share_group_ids,onChange:ir=>{jn.current=ir}},Bn==null?void 0:Bn.map(ir=>tr.createElement(ve.default,{key:ir==null?void 0:ir.group_id,value:ir==null?void 0:ir.group_id},ir==null?void 0:ir.name)))),onOk:()=>{(0,pe.l5)({ids:[Ht==null?void 0:Ht.id],clazz:"DataSet",group_ids:jn.current}).then(ir=>{(ir==null?void 0:ir.status)==0&&(Ee.ZP.success("\u5171\u4EAB\u6210\u529F"),qr())})}})})},"\u5171\u4EAB"),tr.createElement("div",{className:me.publicStyle,onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",icon:null,cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:(Ht==null?void 0:Ht.public_status)==0?"\u7533\u8BF7\u516C\u5F00\u9700\u8981\u5F85\u5E73\u53F0\u7BA1\u7406\u5458\u5BA1\u6838\u901A\u8FC7\u540E\uFF0C\u81EA\u52A8\u516C\u5F00":(Ht==null?void 0:Ht.public_status)==1?"\u53D6\u6D88\u516C\u5F00\u540E\uFF0C\u5176\u4ED6\u7528\u6237\u5C06\u4E0D\u53EF\u89C1\uFF0C\u540C\u65F6\u518D\u6B21\u516C\u5F00\u9700\u8981\u91CD\u65B0\u8FDB\u884C\u7533\u8BF7":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00\u540E\uFF0C\u7533\u8BF7\u8BB0\u5F55\u5C06\u5220\u9664\uFF0C\u5982\u9700\u516C\u5F00\u8BF7\u518D\u6B21\u7533\u8BF7",onOk:()=>Li(void 0,null,function*(){let ir;switch(Ht==null?void 0:Ht.public_status){case 0:ir=(0,pe.To)(Ht==null?void 0:Ht.id);break;case 1:ir=(0,pe.a6)(Ht==null?void 0:Ht.id);break;case 2:ir=(0,pe.Dx)(Ht==null?void 0:Ht.id);break;default:return}ir.then(an=>{(an==null?void 0:an.status)===0&&(Ee.ZP.success("\u64CD\u4F5C\u6210\u529F"),qr())})})})}},(Ht==null?void 0:Ht.public_status)==0?"\u7533\u8BF7\u516C\u5F00":(Ht==null?void 0:Ht.public_status)==1?"\u53D6\u6D88\u516C\u5F00":"\u64A4\u9500\u7533\u8BF7\u516C\u5F00"),tr.createElement(ke.Z,{menu:{items:[{label:tr.createElement("div",null,"\u7F16\u8F91"),key:"4",onClick:()=>{sr(!0)}},{label:tr.createElement("div",{onClick:()=>{de.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,content:"\u5220\u9664\u6570\u636E\u96C6\u4E2D\u7684\u6587\u4EF6\u4E0D\u4F1A\u5F71\u54CD\u5230\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4F46\u5220\u9664\u540E\u6570\u636E\u5C06\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk(){return Li(this,null,function*(){(0,pe.pP)(Ht==null?void 0:Ht.id).then(ir=>{(ir==null?void 0:ir.status)==0&&(Ee.ZP.success("\u5220\u9664\u6210\u529F"),Ut.history.push("/dataset"))})})}})}},"\u5220\u9664"),key:"5"}]}},tr.createElement("div",{className:me.more},tr.createElement("i",{className:"iconfont icon-gengduo6 font12"})))):tr.createElement("div",{className:Ht!=null&&Ht.current_user_is_collect?me.collectActiveStyle:me.collectStyle,onClick:()=>{let ir;Ht!=null&&Ht.current_user_is_collect?ir=(0,pe.R9)({container_id:Ht==null?void 0:Ht.id,container_type:"DataSet"}):ir=(0,pe.nW)({container_id:Ht==null?void 0:Ht.id,container_type:"DataSet"}),ir.then(an=>{(an==null?void 0:an.status)===0&&qr()})}},tr.createElement("i",{className:"iconfont icon-shoucang4 font12"})," ",Ht==null?void 0:Ht.collect_count))),tr.createElement("div",{className:me.content},tr.createElement("div",{style:{display:"flex",alignItems:"center"}},tr.createElement(Se.ZP.Group,{className:me.addTypeRadio,optionType:"button",options:[{label:"\u8BE6\u60C5",value:1},{label:"\u5B9E\u8DF5\u9879\u76EE",value:2},{label:"\u8BA8\u8BBA",value:3}],onChange:ir=>{var an;Wn((an=ir==null?void 0:ir.target)==null?void 0:an.value)},value:vn}),tr.createElement("div",{className:me.addBtn,onClick:()=>{window.open(`/shixuns/new?dataSetId=${zt==null?void 0:zt.id}`)}},"\u521B\u5EFA\u5B9E\u8DF5\u9879\u76EE")),vn==1&&tr.createElement(dt,{dataSetInfo:Ht,getInfo:qr,key:Xn,indexType:Vn}),vn==2&&tr.createElement("div",null,tr.createElement("div",{className:me.shixunTooltip},tr.createElement("i",{className:"icon icon-tishi11 font12 mr10"}),"\u6E29\u99A8\u63D0\u793A\uFF1A\u4EC5\u5C55\u793A\u5F15\u7528\u8BE5\u6570\u636E\u96C6\u4E14\u516C\u5F00\u7684\u5B9E\u8DF5\u9879\u76EE"),tr.createElement(xr.wb,{dataSource:ln,right:23,col:4,precision:1,loading:!1,wrapWidth:1140,trackEventItems:["\u5B9E\u8DF5\u9879\u76EE","\u9996\u9875","\u5B9E\u8BAD\u5217\u8868\u67E5\u770B\u8BE6\u60C5"]}),Dn>1&&tr.createElement("div",{className:me.pageStyle},tr.createElement("div",{className:Yn==1?me.pageUnCan:me.pageCan,style:{marginRight:"10px"},onClick:()=>{Yn>1&&sn(Yn-1)}},"\u4E0A\u4E00\u9875"),tr.createElement("div",{className:Yn==Dn?me.pageUnCan:me.pageCan,style:{marginLeft:"10px"},onClick:()=>{Yn<Dn&&sn(Yn+1)}},"\u4E0B\u4E00\u9875"))),vn==3&&tr.createElement(_r,{memoId:Ht==null?void 0:Ht.memo_id})))),tr.createElement($r.Z,{dataSetInfo:Ht,visible:_n,onClose:lr,onSuccess:rn}),tr.createElement(de.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:Dr,title:"\u6D4F\u89C8\u4FE1\u606F",width:"730px",onCancel:()=>{pn(!1)},footer:null},tr.createElement("div",null,tr.createElement(Ae.default,{dataSource:Ni,loading:ki,className:"mt10 mb10",scroll:{y:47*6},pagination:{total:qn||0,onChange:(ir,an)=>{pr.page=ir,pr.limit=an,wr(Jr({},pr)),Ar()},current:pr==null?void 0:pr.page,pageSize:pr==null?void 0:pr.limit,showTotal:ir=>tr.createElement(tr.Fragment,null,"\u5171",tr.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},ir),"\u6761\u6570\u636E")},columns:[{title:"\u67E5\u770B\u4EBA",align:"left",width:150,dataIndex:"real_name",ellipsis:!0,render:ir=>tr.createElement("span",null,ir||"--")},{title:"\u5355\u4F4D",align:"left",width:260,ellipsis:!0,dataIndex:"school_name",render:ir=>tr.createElement("span",null,ir||"--")},{title:"\u90E8\u95E8",align:"left",width:150,ellipsis:!0,dataIndex:"department_name",render:ir=>tr.createElement("span",null,ir||"--")},{title:"\u67E5\u770B\u65F6\u95F4",dataIndex:"created_at",ellipsis:!0,render:ir=>tr.createElement("span",{style:{color:"#666666"}},ir?je()(ir).format("YYYY-MM-DD"):"--")}]})))))};var Lr=(0,Ut.connect)(({polls:br,loading:Pr,user:kr,globalSetting:Hi})=>({polls:br,globalSetting:Hi,user:kr,loading:Pr.effects}))(Mr)},7745:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ae}});var st=pt(59301),Ut=pt(44993),oe=pt(82326),Ue=pt(29787),_e=pt(6767),de={flex_box_center:"flex_box_center___OmLFa",flex_space_between:"flex_space_between___Pwqhp",flex_box_vertical_center:"flex_box_vertical_center___UJzms",flex_box_center_end:"flex_box_center_end___qMu25",flex_box_column:"flex_box_column___AimtA",selectList:"selectList___hGJUN",selectHeader:"selectHeader___HxdBZ",selectContent:"selectContent___oWjby",contentTitle:"contentTitle___xlVyW",contentTags:"contentTags___BGCLU",tagName:"tagName___MIGDL",tagNameActive:"tagNameActive___JCRev",activeStyle:"activeStyle___FvXnt",activeLabel:"activeLabel___RzW9T",activeValue:"activeValue___qxoch",activeItem:"activeItem___NfFjA",activeClose:"activeClose___Su7dS",activeSubmit:"activeSubmit___gjhQA"},ve=pt(36022),Ee=pt(59301),ke=(me,Pe,fe)=>new Promise((z,te)=>{var se=ce=>{try{le(fe.next(ce))}catch(pe){te(pe)}},ie=ce=>{try{le(fe.throw(ce))}catch(pe){te(pe)}},le=ce=>ce.done?z(ce.value):Promise.resolve(ce.value).then(se,ie);le((fe=fe.apply(me,Pe)).next())});const Se=({user:me,width:Pe,selectWidth:fe,tags:z,getDataSet:te,placeholder:se="\u5168\u90E8\u6807\u7B7E",isTagsValue:ie=!1})=>{const[le,ce]=(0,st.useState)([]),[pe,xe]=(0,st.useState)([]),[je,De]=(0,st.useState)(!1),Fe=(0,st.useRef)(null);(0,st.useEffect)(()=>{Te()},[]);const Te=()=>ke(void 0,null,function*(){De(!0),yield(0,ve.bj)({}).then(Be=>{(Be==null?void 0:Be.status)==0&&ce(Be==null?void 0:Be.data)}),De(!1)}),Me=z==null?void 0:z.map(Be=>Be.tag_name).join("\u3001");return Ee.createElement(oe.default,{onFocus:()=>{xe(z)},ref:Fe,style:{width:fe?fe+"px":300},placeholder:(z==null?void 0:z.length)>0?ie?Ee.createElement("span",{className:"c-grey-333"},Me):`\u5DF2\u9009\u4E2D${z==null?void 0:z.length}\u4E2A\u6807\u7B7E`:se,size:"large",dropdownStyle:{width:Pe+"px",zIndex:1e3},className:de.selectStyle,dropdownRender:()=>Ee.createElement("div",{className:de.selectList,style:{width:Pe+"px"}},Ee.createElement("div",{className:de.selectHeader},"\u8BF7\u9009\u62E91\uFF5E5\u4E2A\u6807\u7B7E"),Ee.createElement(Ue.Z,{spinning:je},Ee.createElement("div",{className:de.selectContent},le==null?void 0:le.map((Be,Ge)=>{var Ye;return Ee.createElement("aside",{key:Ge},Ee.createElement("div",{className:de.contentTitle,style:{marginTop:Ge>0?"20px":"0"}},Be==null?void 0:Be.tag_type_cn),Ee.createElement("div",{className:de.contentTags},(Ye=Be==null?void 0:Be.child)==null?void 0:Ye.map((Ke,Ve)=>{var ot;return Ee.createElement("div",{key:Ve,className:(ot=pe==null?void 0:pe.map(ut=>ut==null?void 0:ut.id))!=null&&ot.includes(Ke==null?void 0:Ke.id)?de.tagNameActive:de.tagName,onClick:()=>{var ut;(ut=pe==null?void 0:pe.map(ft=>ft==null?void 0:ft.id))!=null&&ut.includes(Ke==null?void 0:Ke.id)?xe(pe.filter(ft=>(ft==null?void 0:ft.id)!=(Ke==null?void 0:Ke.id))):(pe==null?void 0:pe.length)<5?xe([...pe,Ke]):_e.ZP.warning("\u6700\u591A\u53EF\u9009\u62E95\u4E2A\u6807\u7B7E")}},Ke==null?void 0:Ke.tag_name)})))}))),Ee.createElement("div",{className:de.activeStyle},Ee.createElement("div",{className:de.activeLabel},"\u5DF2\u9009\u6807\u7B7E:"),Ee.createElement("div",{className:de.activeValue,style:{width:Pe-120+"px"}},pe==null?void 0:pe.map((Be,Ge)=>Ee.createElement("div",{key:Ge,className:de.activeItem},Be==null?void 0:Be.tag_name,Ee.createElement("i",{className:"iconfont icon-guanbi11 ml5 mr5",style:{fontSize:"10px",cursor:"pointer"},onClick:()=>{xe(pe.filter(Ye=>(Ye==null?void 0:Ye.id)!==(Be==null?void 0:Be.id)))}}))))),Ee.createElement("div",{style:{display:"flex",marginBottom:"20px"}},Ee.createElement("div",{className:de.activeClose,onClick:Be=>{Be.stopPropagation(),te([...z]),xe([]),setTimeout(()=>{Fe.current&&Fe.current.blur()},10)}},"\u53D6\u6D88"),Ee.createElement("div",{className:de.activeSubmit,onClick:Be=>{Be.stopPropagation(),te([...pe]),xe([]),setTimeout(()=>{Fe.current&&Fe.current.blur()},10)}},"\u786E\u8BA4")))})};var Ae=(0,Ut.connect)(({user:me})=>({user:me}))(Se)},36022:function(Rn,An,pt){"use strict";pt.d(An,{A0:function(){return je},Ce:function(){return ie},Dx:function(){return me},Il:function(){return xe},R2:function(){return se},R9:function(){return z},Ru:function(){return te},SG:function(){return Fe},To:function(){return Ae},_S:function(){return Se},a6:function(){return Pe},bj:function(){return ke},iw:function(){return De},l5:function(){return pe},nW:function(){return fe},pP:function(){return ce},pi:function(){return le}});var st=pt(52430),Ut=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,de=(Te,Me,Be)=>Me in Te?Ut(Te,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Te[Me]=Be,ve=(Te,Me)=>{for(var Be in Me||(Me={}))Ue.call(Me,Be)&&de(Te,Be,Me[Be]);if(oe)for(var Be of oe(Me))_e.call(Me,Be)&&de(Te,Be,Me[Be]);return Te},Ee=(Te,Me,Be)=>new Promise((Ge,Ye)=>{var Ke=ut=>{try{ot(Be.next(ut))}catch(ft){Ye(ft)}},Ve=ut=>{try{ot(Be.throw(ut))}catch(ft){Ye(ft)}},ot=ut=>ut.done?Ge(ut.value):Promise.resolve(ut.value).then(Ke,Ve);ot((Be=Be.apply(Te,Me)).next())});function ke(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/data_sets/tags.json",{method:"get",params:ve({},Te)})})}function Se(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/data_sets.json",{method:"get",params:ve({},Te)})})}function Ae(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te}/apply_public.json`,{method:"post"})})}function me(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te}/revoke_apply_public.json`,{method:"post"})})}function Pe(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te}/cancel_public.json`,{method:"post"})})}function fe(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/collections.json",{method:"post",body:ve({},Te)})})}function z(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/collections/cancel.json",{method:"delete",body:ve({},Te)})})}function te(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te}.json`,{method:"get"})})}function se(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/edit_introduce.json`,{method:"put",body:ve({},Te)})})}function ie(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/used_shixuns.json`,{method:"get",params:ve({},Te)})})}function le(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/shixuns/${Te}/data_sets_list.json`,{method:"get"})})}function ce(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te}/delete.json`,{method:"delete"})})}function pe(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/teach_group_shares.json",{method:"post",body:ve({},Te)})})}function xe(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/data_sets/single_destroy_files.json",{method:"delete",body:ve({},Te)})})}function je(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/data_sets/${Te==null?void 0:Te.id}/edit_file_info.json`,{method:"put",body:ve({},Te)})})}function De(Te){return Ee(this,null,function*(){return(0,st.ZP)("/api/visit_logs.json",{method:"get",params:ve({},Te)})})}function Fe(Te){return Ee(this,null,function*(){return(0,st.ZP)(`/api/attachments/${Te==null?void 0:Te.id}/update_download.json`,{method:"get"})})}},48421:function(Rn,An,pt){"use strict";pt.d(An,{AL:function(){return pe},Iy:function(){return Ae},Qv:function(){return fe},ez:function(){return ce},jb:function(){return me}});var st=pt(32834),Ut=pt.n(st),oe=pt(11690),Ue=pt.n(oe);let _e=1;function de(Te,Me){const Be=Te.match(/^(\s+)(?:```)/);if(Be===null)return Me;const Ge=Be[1];return Me.split(`
|
|
`).map(Ye=>{const Ke=Ye.match(/^\s+/);if(Ke===null)return Ye;const[Ve]=Ke;return Ve.length>=Ge.length?Ye.slice(Ge.length):Ye}).join(`
|
|
`)}let ve=[],Ee=["<ul>"];const ke=new(Ut()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ae(){ve.length=0,Ee=["<ul>"]}const me={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Pe(Te,Me,Be,Ge){if(Me>=Te.length||Te[Me].level<=Be)return Me;var Ye=Te[Me];Ge.push("<li><a href='#"+_e+Ye.anchor+"'>"+Ye.text+"</a>"),Me++;var Ke=[];return Me=Pe(Te,Me,Ye.level,Ke),Ke.length>0&&(Ge.push("<ul>"),Ke.forEach(function(Ve){Ge.push(Ve)}),Ge.push("</ul>")),Ge.push("</li>"),Me=Pe(Te,Me,Be,Ge),Me}function fe(){return Pe(ve,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const z={heading(Te){const Me=Se.exec(Te);if(_e+=1,Me)return{type:"heading",raw:Me[0],depth:Me[1].length,text:Me[2]}},fences(Te){const Me=this.rules.block.fences.exec(Te);if(Me){const Be=Me[0];let Ge=de(Be,Me[3]||"");const Ye=Me[2]?Me[2].trim():Me[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ke=ie(),Ve=Ge;Ge=Ke,le[Ke]={type:"block",expression:Ve}}return{type:"code",raw:Be,lang:Ye,text:Ge}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let se=0;const ie=()=>`__special_katext_id_${se++}__`;let le={};function ce(){return le}function pe(){se=0,le={}}function xe(Te){return Te=Te.replace(te,(Me,Be)=>{const Ge=ie();return le[Ge]={type:"inline",expression:Be},Ge}),Te}const je=ke.listitem;ke.listitem=function(Te){return je(xe(Te))};const De=ke.paragraph;ke.paragraph=function(Te){return De(xe(Te))};const Fe=ke.tablecell;ke.tablecell=function(Te,Me){return Fe(xe(Te),Me)},ke.code=function(Te,Me,Be){const Ge=(Me||"").match(/\S*/)[0];return Ge?["latex","katex","math"].indexOf(Ge)>=0?`<p class='editormd-tex'>${Te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Me}">${Be?Te:(0,oe.escape)(Te,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Be?Te:(0,oe.escape)(Te,!0))+"</code></pre>"},ke.heading=function(Te,Me,Be){let Ge=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ve.push({anchor:Ge,level:Me,text:Te}),"<h"+Me+' id="'+_e+Ge+'">'+Te+"</h"+Me+">"},Ut().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ut().use({tokenizer:z,renderer:ke}),An.ZP=Ut()},47257:function(Rn){(function(An){(function(pt){if(1)Rn.exports=pt();else var st})(function(){var pt,st,Ut;return function(){function oe(Ue,_e,de){function ve(Se,Ae){if(!_e[Se]){if(!Ue[Se]){var me=void 0;if(!Ae&&me)return require(Se,!0);if(Ee)return Ee(Se,!0);var Pe=new Error("Cannot find module '"+Se+"'");throw Pe.code="MODULE_NOT_FOUND",Pe}var fe=_e[Se]={exports:{}};Ue[Se][0].call(fe.exports,function(z){var te=Ue[Se][1][z];return ve(te||z)},fe,fe.exports,oe,Ue,_e,de)}return _e[Se].exports}for(var Ee=void 0,ke=0;ke<de.length;ke++)ve(de[ke]);return ve}return oe}()({1:[function(oe,Ue,_e){"use strict";var de=oe("./browser/client");de.Buffer=oe("buffer").Buffer,de.urllib=oe("../shims/xhr"),de.version=oe("./browser/version").version,Ue.exports=de},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.slice.js");var ke=oe("assert"),Se=oe("../common/utils/checkBucketName"),Ae=Se.checkBucketName,me=_e;function Pe(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function fe(z){return z?Pe(z)?z:[z]:[]}me.useBucket=function(te){return Ae(te),this.options.bucket=te,this},me.setBucket=function(te){return Ae(te),this.options.bucket=te,this},me.getBucket=function(){return this.options.bucket},me.deleteBucket=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(ce);case 3:if(pe=je.sent,!(pe.status===200||pe.status===204)){je.next=6;break}return je.abrupt("return",{res:pe.res});case 6:return je.next=8,this.requestError(pe);case 8:throw je.sent;case 9:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketACL=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"acl",ce),pe.headers={"x-oss-acl":le},pe.successStatuses=[200],De.next=5,this.request(pe);case 5:return xe=De.sent,De.abrupt("return",{bucket:xe.headers.location&&xe.headers.location.substring(1)||null,res:xe.res});case 7:case"end":return De.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketACL=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("GET",ie,"acl",le),ce.successStatuses=[200],ce.xmlResponse=!0,je.next=5,this.request(ce);case 5:return pe=je.sent,je.abrupt("return",{acl:pe.data.AccessControlList.Grant,owner:{id:pe.data.Owner.ID,displayName:pe.data.Owner.DisplayName},res:pe.res});case 7:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"logging",ce),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(ie,`</TargetBucket>
|
|
`),le&&(xe+="<TargetPrefix>".concat(le,`</TargetPrefix>
|
|
`)),xe+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Fe.next=9,this.request(pe);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ce=this._bucketRequestParams("GET",ie,"logging",le),ce.successStatuses=[200],ce.xmlResponse=!0,De.next=5,this.request(ce);case 5:return pe=De.sent,xe=pe.data.LoggingEnabled,De.abrupt("return",{enable:!!xe,prefix:xe&&xe.TargetPrefix||null,res:pe.res});case 8:case"end":return De.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketLogging=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"logging",le),ce.successStatuses=[204,200],je.next=4,this.request(ce);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce){var pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:for(le=le||[],ke(le.length,"rules is required"),le.forEach(function(ot){ke(ot.allowedOrigin,"allowedOrigin is required"),ke(ot.allowedMethod,"allowedMethod is required")}),pe=this._bucketRequestParams("PUT",ie,"cors",ce),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,je=function(ut){xe+="<AllowedOrigin>".concat(ut,"</AllowedOrigin>")},De=function(ut){xe+="<AllowedMethod>".concat(ut,"</AllowedMethod>")},Fe=function(ut){xe+="<AllowedHeader>".concat(ut,"</AllowedHeader>")},Te=function(ut){xe+="<ExposeHeader>".concat(ut,"</ExposeHeader>")},Me=0,Be=le.length;Me<Be;Me++)Ge=le[Me],xe+="<CORSRule>",fe(Ge.allowedOrigin).forEach(je),fe(Ge.allowedMethod).forEach(De),fe(Ge.allowedHeader).forEach(Fe),fe(Ge.exposeHeader).forEach(Te),Ge.maxAgeSeconds&&(xe+="<MaxAgeSeconds>".concat(Ge.maxAgeSeconds,"</MaxAgeSeconds>")),xe+="</CORSRule>";return xe+="</CORSConfiguration>",pe.content=xe,pe.mime="xml",pe.successStatuses=[200],Ve.next=16,this.request(pe);case 16:return Ye=Ve.sent,Ve.abrupt("return",{res:Ye.res});case 18:case"end":return Ve.stop()}},se,this)}));function te(se,ie,le){return z.apply(this,arguments)}return te}(),me.getBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ce=this._bucketRequestParams("GET",ie,"cors",le),ce.successStatuses=[200],ce.xmlResponse=!0,Fe.next=5,this.request(ce);case 5:return pe=Fe.sent,xe=[],pe.data&&pe.data.CORSRule&&(je=pe.data.CORSRule,Pe(je)||(je=[je]),je.forEach(function(Te){var Me={};Object.keys(Te).forEach(function(Be){Me[Be.slice(0,1).toLowerCase()+Be.slice(1,Be.length)]=Te[Be]}),xe.push(Me)})),Fe.abrupt("return",{rules:xe,res:pe.res});case 9:case"end":return Fe.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketCORS=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ce=this._bucketRequestParams("DELETE",ie,"cors",le),ce.successStatuses=[204],je.next=4,this.request(ce);case 4:return pe=je.sent,je.abrupt("return",{res:pe.res});case 6:case"end":return je.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.putBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le,ce,pe){var xe,je,De,Fe;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(xe=this._bucketRequestParams("PUT",ie,"referer",pe),je=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
|
|
`),ce&&ce.length>0){for(je+=` <RefererList>
|
|
`,De=0;De<ce.length;De++)je+=" <Referer>".concat(ce[De],`</Referer>
|
|
`);je+=` </RefererList>
|
|
`}else je+=` <RefererList />
|
|
`;return je+="</RefererConfiguration>",xe.content=je,xe.mime="xml",xe.successStatuses=[200],Me.next=10,this.request(xe);case 10:return Fe=Me.sent,Me.abrupt("return",{res:Fe.res});case 12:case"end":return Me.stop()}},se,this)}));function te(se,ie,le,ce){return z.apply(this,arguments)}return te}(),me.getBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){var ce,pe,xe;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ce=this._bucketRequestParams("GET",ie,"referer",le),ce.successStatuses=[200],ce.xmlResponse=!0,De.next=5,this.request(ce);case 5:return pe=De.sent,xe=pe.data.RefererList.Referer||null,xe&&(Pe(xe)||(xe=[xe])),De.abrupt("return",{allowEmpty:pe.data.AllowEmptyReferer==="true",referers:xe,res:pe.res});case 9:case"end":return De.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me.deleteBucketReferer=function(){var z=(0,Ee.default)(ve.default.mark(function se(ie,le){return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return pe.abrupt("return",pe.sent);case 3:case"end":return pe.stop()}},se,this)}));function te(se,ie){return z.apply(this,arguments)}return te}(),me._bucketRequestParams=function(te,se,ie,le){return{method:te,bucket:se,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(oe,Ue,_e){(function(de,ve){(function(){"use strict";var Ee=oe("@babel/runtime/helpers/interopRequireDefault"),ke=Ee(oe("@babel/runtime/regenerator")),Se=Ee(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.to-string.js");var Ae=oe("debug")("ali-oss"),me=oe("xml2js"),Pe=oe("agentkeepalive"),fe=oe("merge-descriptors"),z=oe("platform"),te=oe("utility"),se=oe("urllib"),ie=oe("./version"),le=oe("bowser"),ce=oe("../common/signUtils"),pe=oe("../common/client/initOptions"),xe=oe("../common/utils/createRequest"),je=xe.createRequest,De=oe("../common/utils/encoder"),Fe=De.encoder,Te=oe("../common/client/getReqUrl"),Me=Te.getReqUrl,Be=oe("../common/utils/setSTSToken"),Ge=Be.setSTSToken,Ye=oe("../common/utils/retry"),Ke=Ye.retry,Ve=oe("../common/utils/isFunction"),ot=Ve.isFunction,ut=new Pe;function ft(){var bt=z.name,ct=z.version;bt&&bt.toLowerCase&&bt.toLowerCase()==="ie"&&ct.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function St(){return location&&location.protocol==="https:"}function Qe(bt,ct){if(ft(),!(this instanceof Qe))return new Qe(bt,ct);bt&&bt.inited?this.options=bt:this.options=Qe.initOptions(bt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=se,this.agent=this.options.agent||ut),this.ctx=ct,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Ue.exports=Qe,Qe.initOptions=function(ct){ct.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var xt=Object.assign({secure:St(),useFetch:!1},ct);return pe(xt)};var rt=Qe.prototype;rt.debug=Ae,fe(rt,oe("./object")),fe(rt,oe("./bucket")),fe(rt,oe("../common/bucket/getBucketWebsite")),fe(rt,oe("../common/bucket/putBucketWebsite")),fe(rt,oe("../common/bucket/deleteBucketWebsite")),fe(rt,oe("../common/bucket/getBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketLifecycle")),fe(rt,oe("../common/bucket/deleteBucketLifecycle")),fe(rt,oe("../common/bucket/putBucketVersioning")),fe(rt,oe("../common/bucket/getBucketVersioning")),fe(rt,oe("../common/bucket/getBucketInventory")),fe(rt,oe("../common/bucket/deleteBucketInventory")),fe(rt,oe("../common/bucket/listBucketInventory")),fe(rt,oe("../common/bucket/putBucketInventory")),fe(rt,oe("../common/bucket/abortBucketWorm")),fe(rt,oe("../common/bucket/completeBucketWorm")),fe(rt,oe("../common/bucket/extendBucketWorm")),fe(rt,oe("../common/bucket/getBucketWorm")),fe(rt,oe("../common/bucket/initiateBucketWorm")),fe(rt,oe("./managed-upload")),fe(rt,oe("../common/multipart-copy")),fe(rt,oe("../common/multipart")),fe(rt,oe("../common/parallel")),rt.signature=function(ct){return this.debug("authorization stringToSign: %s",ct,"info"),ce.computeSignature(this.options.accessKeySecret,ct,this.options.headerEncoding)},rt._getReqUrl=Me,rt.authorization=function(ct,xt,dt,Mt){var yt=ce.buildCanonicalString(ct.toUpperCase(),xt,{headers:Mt,parameters:dt});return ce.authorization(this.options.accessKeyId,this.options.accessKeySecret,yt,this.options.headerEncoding)},rt.request=function(){var bt=(0,Se.default)(ke.default.mark(function ct(xt){var dt=this;return ke.default.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!this.options.retryMax){yt.next=6;break}return yt.next=3,Ke(wt.bind(this),this.options.retryMax,{errorHandler:function(mt){var vt=function(He){if(xt.stream)return!1;var we=[-1,-2].includes(He.status),Ne=dt.options.requestErrorRetryHandle||function(){return!0};return we&&Ne(He)};return!!vt(mt)}})(xt);case 3:return yt.abrupt("return",yt.sent);case 6:return yt.abrupt("return",wt.call(this,xt));case 7:case"end":return yt.stop()}},ct,this)}));return function(ct){return bt.apply(this,arguments)}}();function wt(bt){return Ct.apply(this,arguments)}function Ct(){return Ct=(0,Se.default)(ke.default.mark(function bt(ct){var xt,dt,Mt,yt,Ft,mt;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){tt.next=3;break}return tt.next=3,Ge.call(this);case 3:return xt=je.call(this,ct),this.options.useFetch||(xt.params.mode="disable-fetch"),yt=!!ct.stream,tt.prev=6,tt.next=9,this.urllib.request(xt.url,xt.params);case 9:dt=tt.sent,this.debug("response %s %s, got %s, headers: %j",ct.method,xt.url,dt.status,dt.headers,"info"),tt.next=16;break;case 13:tt.prev=13,tt.t0=tt.catch(6),Mt=tt.t0;case 16:if(!(dt&&ct.successStatuses&&ct.successStatuses.indexOf(dt.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(dt);case 19:if(Ft=tt.sent,!(Ft.code==="RequestTimeTooSkewed"&&!yt)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(Ft.serverTime)-new Date,tt.next=24,this.request(ct);case 24:return tt.abrupt("return",tt.sent);case 25:Ft.params=ct,tt.next=32;break;case 28:if(!Mt){tt.next=32;break}return tt.next=31,this.requestError(Mt);case 31:Ft=tt.sent;case 32:if(!Ft){tt.next=34;break}throw Ft;case 34:if(!ct.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(dt.data);case 37:mt=tt.sent,dt.data=mt;case 39:return tt.abrupt("return",dt);case 40:case"end":return tt.stop()}},bt,this,[[6,13]])})),Ct.apply(this,arguments)}rt._getResource=function(ct){var xt="/";return ct.bucket&&(xt+="".concat(ct.bucket,"/")),ct.object&&(xt+=Fe(ct.object,this.options.headerEncoding)),xt},rt._escape=function(ct){return te.encodeURIComponent(ct).replace(/%2F/g,"/")},rt._getUserAgent=function(){var ct=ve&&ve.browser?"js":"nodejs",xt="aliyun-sdk-".concat(ct,"/").concat(ie.version),dt=z.description;return!dt&&ve&&(dt="Node.js ".concat(ve.version.slice(1)," on ").concat(ve.platform," ").concat(ve.arch)),this._checkUserAgent("".concat(xt," ").concat(dt))},rt._checkUserAgent=function(ct){var xt=ct.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return xt},rt.checkBrowserAndVersion=function(ct,xt){return le.name===ct&&le.version.split(".")[0]===xt},rt.parseXML=function(ct){return new Promise(function(xt,dt){de.isBuffer(ct)&&(ct=ct.toString()),me.parseString(ct,{explicitRoot:!1,explicitArray:!1},function(Mt,yt){Mt?dt(Mt):xt(yt)})})},rt.requestError=function(){var bt=(0,Se.default)(ke.default.mark(function xt(dt){var Mt,yt,Ft,mt;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Mt=null,!(!dt.data||!dt.data.length)){tt.next=5;break}dt.status===-1||dt.status===-2?(Mt=new Error(dt.message),Mt.name=dt.name,Mt.status=dt.status,Mt.code=dt.name):(dt.status===404?(Mt=new Error("Object not exists"),Mt.name="NoSuchKeyError",Mt.status=404,Mt.code="NoSuchKey"):dt.status===412?(Mt=new Error("Pre condition failed"),Mt.name="PreconditionFailedError",Mt.status=412,Mt.code="PreconditionFailed"):(Mt=new Error("Unknow error, status: ".concat(dt.status)),Mt.name="UnknownError",Mt.status=dt.status),Mt.requestId=dt.headers["x-oss-request-id"],Mt.host=""),tt.next=32;break;case 5:return yt=String(dt.data),this.debug("request response error data: %s",yt,"error"),tt.prev=7,tt.next=10,this.parseXML(yt);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:Ft=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(yt,"error"),tt.t1.message+=`
|
|
raw xml: `.concat(yt),tt.t1.status=dt.status,tt.t1.requestId=dt.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:mt=Ft.Message||"unknow request error, status: ".concat(dt.status),Ft.Condition&&(mt+=" (condition: ".concat(Ft.Condition,")")),Mt=new Error(mt),Mt.name=Ft.Code?"".concat(Ft.Code,"Error"):"UnknownError",Mt.status=dt.status,Mt.code=Ft.Code,Mt.requestId=Ft.RequestId,Mt.hostId=Ft.HostId,Mt.serverTime=Ft.ServerTime;case 32:return this.debug("generate error %j",Mt,"error"),tt.abrupt("return",Mt);case 34:case"end":return tt.stop()}},xt,this,[[7,16]])}));function ct(xt){return bt.apply(this,arguments)}return ct}()}).call(this)}).call(this,{isBuffer:oe("../../node_modules/is-buffer/index.js")},oe("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("util"),Ae=oe("path"),me=oe("mime"),Pe=oe("copy-to"),fe=oe("../common/utils/isBlob"),z=fe.isBlob,te=oe("../common/utils/isFile"),se=te.isFile,ie=oe("../common/utils/isBuffer"),le=ie.isBuffer,ce=_e;ce.multipartUpload=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ge){var Ye,Ke,Ve,ot,ut,ft,St,Qe,rt,wt=arguments;return Ee.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(Ye=wt.length>2&&wt[2]!==void 0?wt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){bt.next=8;break}return Ge&&se(Ge)&&(Ye.checkpoint.file=Ge),bt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return bt.abrupt("return",bt.sent);case 8:return Ke=102400,Ye.mime||(se(Ge)?Ye.mime=me.getType(Ae.extname(Ge.name)):z(Ge)?Ye.mime=Ge.type:le(Ge)?Ye.mime="":Ye.mime=me.getType(Ae.extname(Ge))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),bt.next=14,this._getFileSize(Ge);case 14:if(Ve=bt.sent,!(Ve<Ke)){bt.next=26;break}return Ye.contentLength=Ve,bt.next=19,this.put(Be,Ge,Ye);case 19:if(ot=bt.sent,!(Ye&&Ye.progress)){bt.next=23;break}return bt.next=23,Ye.progress(1);case 23:return ut={res:ot.res,bucket:this.options.bucket,name:Be,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(ut.data=ot.data),bt.abrupt("return",ut);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){bt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ke)){bt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ke));case 30:return bt.next=32,this.initMultipartUpload(Be,Ye);case 32:if(ft=bt.sent,St=ft.uploadId,Qe=this._getPartSize(Ve,Ye.partSize),rt={file:Ge,name:Be,fileSize:Ve,partSize:Qe,uploadId:St,doneParts:[]},!(Ye&&Ye.progress)){bt.next=39;break}return bt.next=39,Ye.progress(0,rt,ft.res);case 39:return bt.next=41,this._resumeMultipart(rt,Ye);case 41:return bt.abrupt("return",bt.sent);case 42:case"end":return bt.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),ce._resumeMultipart=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ge){var Ye,Ke,Ve,ot,ut,ft,St,Qe,rt,wt,Ct,bt,ct,xt,dt,Mt,yt,Ft,mt;return Ee.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ye=this,!this.isCancel()){tt.next=3;break}throw this._makeCancelEvent();case 3:return Ke=Be.file,Ve=Be.fileSize,ot=Be.partSize,ut=Be.uploadId,ft=Be.doneParts,St=Be.name,Qe=[],ft.length>0&&Pe(ft).to(Qe),rt=this._divideParts(Ve,ot),wt=rt.length,Ct=!1,bt=function(we,Ne){return new Promise(function(){var Xe=(0,ke.default)(Ee.default.mark(function nt(Ie,Re){var Ze,et,ht,at,Dt;return Ee.default.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:if(Ot.prev=0,we.isCancel()){Ot.next=29;break}return Ze=rt[Ne-1],Ot.next=5,we._createBuffer(Ke,Ze.start,Ze.end);case 5:return et=Ot.sent,ht={content:et,size:Ze.end-Ze.start},Ot.prev=7,Ot.next=10,we._uploadPart(St,ut,Ne,ht,Ge);case 10:at=Ot.sent,Ot.next=18;break;case 13:if(Ot.prev=13,Ot.t0=Ot.catch(7),Ot.t0.status!==404){Ot.next=17;break}throw we._makeAbortEvent();case 17:throw Ot.t0;case 18:if(!(!we.isCancel()&&!Ct)){Ot.next=26;break}if(Be.doneParts.push({number:Ne,etag:at.res.headers.etag}),!Ge.progress){Ot.next=23;break}return Ot.next=23,Ge.progress(ft.length/(wt+1),Be,at.res);case 23:Ie({number:Ne,etag:at.res.headers.etag}),Ot.next=27;break;case 26:Ie();case 27:Ot.next=30;break;case 29:Ie();case 30:Ot.next=41;break;case 32:Ot.prev=32,Ot.t1=Ot.catch(0),Dt=new Error,Dt.name=Ot.t1.name,Dt.message=Ot.t1.message,Dt.stack=Ot.t1.stack,Dt.partNum=Ne,Pe(Ot.t1).to(Dt),Re(Dt);case 41:case"end":return Ot.stop()}},nt,null,[[0,32],[7,13]])}));return function(nt,Ie){return Xe.apply(this,arguments)}}())},ct=Array.from(new Array(wt),function(He,we){return we+1}),xt=Qe.map(function(He){return He.number}),dt=ct.filter(function(He){return xt.indexOf(He)<0}),Mt=5,yt=Ge.parallel||Mt,tt.next=17,this._parallel(dt,yt,function(He){return new Promise(function(we,Ne){bt(Ye,He).then(function(Xe){Xe&&Qe.push(Xe),we()}).catch(function(Xe){Ne(Xe)})})});case 17:if(Ft=tt.sent,Ct=!0,mt=Ft.find(function(He){return He.name==="abort"}),!mt){tt.next=22;break}throw mt;case 22:if(!this.isCancel()){tt.next=25;break}throw bt=null,this._makeCancelEvent();case 25:if(!(Ft&&Ft.length>0)){tt.next=28;break}throw Ft[0].message="Failed to upload some parts with error: ".concat(Ft[0].toString()," part_num: ").concat(Ft[0].partNum),Ft[0];case 28:return tt.next=30,this.completeMultipartUpload(St,ut,Qe,Ge);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Me,this)}));function Te(Me,Be){return Fe.apply(this,arguments)}return Te}(),ce._getFileSize=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be){return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Be)){Ye.next=4;break}return Ye.abrupt("return",Be.length);case 4:if(!(z(Be)||se(Be))){Ye.next=6;break}return Ye.abrupt("return",Be.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Me)}));function Te(Me){return Fe.apply(this,arguments)}return Te}();var pe=oe("stream"),xe=pe.Readable;function je(Fe,Te){if(!(this instanceof je))return new je(Fe,Te);xe.call(this,Te),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,xe),je.prototype.readFileAndPush=function(Te){if(this.fileBuffer)for(var Me=!0;Me&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Be=this.start,Ge=Be+Te;Ge=Ge>this.fileBuffer.length?this.fileBuffer.length:Ge,this.start=Ge,Me=this.push(this.fileBuffer.slice(Be,Ge))}},je.prototype._read=function(Te){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Me=16*1024;Te=Te||Me;var Be=this;this.reader.onload=function(Ye){Be.fileBuffer=de.from(new Uint8Array(Ye.target.result)),Be.file=null,Be.readFileAndPush(Te)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Te)};function De(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Te,Me){var Be=new FileReader;Be.onload=function(Ge){Te(Ge.target.result)},Be.onerror=function(Ge){Me(Ge)},Be.readAsArrayBuffer(Fe)})}ce._createBuffer=function(){var Fe=(0,ke.default)(Ee.default.mark(function Me(Be,Ge,Ye){var Ke,Ve;return Ee.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(!(z(Be)||se(Be))){ut.next=8;break}return Ke=Be.slice(Ge,Ye),ut.next=4,De(Ke);case 4:return Ve=ut.sent,ut.abrupt("return",de.from(Ve));case 8:if(!le(Be)){ut.next=12;break}return ut.abrupt("return",Be.subarray(Ge,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ut.stop()}},Me)}));function Te(Me,Be,Ge){return Fe.apply(this,arguments)}return Te}(),ce._getPartSize=function(Te,Me){var Be=1e4,Ge=1*1024*1024;Me||(Me=Ge);var Ye=Math.ceil(Te/Be);return Me<Ye&&(Me=Ye,console.warn("partSize has been set to ".concat(Me,", because the partSize you provided causes partNumber to be greater than 10,000"))),Me},ce._divideParts=function(Te,Me){for(var Be=Math.ceil(Te/Me),Ge=[],Ye=0;Ye<Be;Ye++){var Ke=Me*Ye,Ve=Math.min(Ke+Me,Te);Ge.push({start:Ke,end:Ve})}return Ge}}).call(this)}).call(this,oe("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.promise.js");var ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("fs"),Se=oe("copy-to"),Ae=oe("path"),me=oe("mime"),Pe=oe("../common/callback"),fe=oe("merge-descriptors"),z=oe("../common/utils/isBlob"),te=z.isBlob,se=oe("../common/utils/isFile"),ie=se.isFile,le=oe("../common/utils/isBuffer"),ce=le.isBuffer,pe=oe("../common/utils/obj2xml"),xe=pe.obj2xml,je=_e;je.append=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ge=Ge||{},Ge.position===void 0&&(Ge.position="0"),Ge.subres={append:"",position:Ge.position},Ge.method="POST",Ve.next=6,this.put(Me,Be,Ge);case 6:return Ye=Ve.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ve.abrupt("return",Ye);case 9:case"end":return Ve.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.put=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye,Ke,Ve,ot,ut;return ve.default.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Ge=Ge||{},Ge.disabledMD5=Ge.disabledMD5===void 0?!0:!!Ge.disabledMD5,Ge.headers=Ge.headers||{},Me=this._objectName(Me),!ce(Be)){St.next=8;break}Ye=Be,St.next=19;break;case 8:if(!(te(Be)||ie(Be))){St.next=18;break}return Ge.mime||(ie(Be)?Ge.mime=me.getType(Ae.extname(Be.name)):Ge.mime=Be.type),St.next=12,this._createBuffer(Be,0,Be.size);case 12:return Ye=St.sent,St.next=15,this._getFileSize(Be);case 15:Ge.contentLength=St.sent,St.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Ge.meta,Ge.headers),Ke=Ge.method||"PUT",Ve=this._objectRequestParams(Ke,Me,Ge),Pe.encodeCallback(Ve,Ge),Ve.mime=Ge.mime,Ve.disabledMD5=Ge.disabledMD5,Ve.content=Ye,Ve.successStatuses=[200],St.next=29,this.request(Ve);case 29:return ot=St.sent,ut={name:Me,url:this._objectUrl(Me),res:ot.res},Ve.headers&&Ve.headers["x-oss-callback"]&&(ut.data=JSON.parse(ot.data.toString())),St.abrupt("return",ut);case 33:case"end":return St.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.putStream=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye,Ke,Ve,ot;return ve.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return Ge=Ge||{},Ge.headers=Ge.headers||{},Me=this._objectName(Me),Ge.contentLength?Ge.headers["Content-Length"]=Ge.contentLength:Ge.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ge.meta,Ge.headers),Ye=Ge.method||"PUT",Ke=this._objectRequestParams(Ye,Me,Ge),Pe.encodeCallback(Ke,Ge),Ke.mime=Ge.mime,Ke.stream=Be,Ke.successStatuses=[200],ft.next=13,this.request(Ke);case 13:return Ve=ft.sent,ot={name:Me,url:this._objectUrl(Me),res:Ve.res},Ke.headers&&Ke.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ve.data.toString())),ft.abrupt("return",ot);case 17:case"end":return ft.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),fe(je,oe("../common/object/copyObject")),fe(je,oe("../common/object/getObjectTagging")),fe(je,oe("../common/object/putObjectTagging")),fe(je,oe("../common/object/deleteObjectTagging")),fe(je,oe("../common/image")),fe(je,oe("../common/object/getBucketVersions")),fe(je,oe("../common/object/getACL")),fe(je,oe("../common/object/putACL")),fe(je,oe("../common/object/head")),fe(je,oe("../common/object/delete")),fe(je,oe("../common/object/get")),fe(je,oe("../common/object/putSymlink")),fe(je,oe("../common/object/getSymlink")),fe(je,oe("../common/object/deleteMulti")),fe(je,oe("../common/object/getObjectMeta")),fe(je,oe("../common/object/getObjectUrl")),fe(je,oe("../common/object/generateObjectUrl")),fe(je,oe("../common/object/signatureUrl")),fe(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be,Ge){var Ye;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,this.copy(Me,Me,{meta:Be||{},timeout:Ge&&Ge.timeout,ctx:Ge&&Ge.ctx});case 2:return Ye=Ve.sent,Ve.abrupt("return",Ye);case 4:case"end":return Ve.stop()}},Te,this)}));function Fe(Te,Me,Be){return De.apply(this,arguments)}return Fe}(),je.list=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me,Be){var Ge,Ye,Ke,Ve,ot;return ve.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return Ge=this._objectRequestParams("GET","",Be),Ge.query=Me,Ge.xmlResponse=!0,Ge.successStatuses=[200],ft.next=6,this.request(Ge);case 6:return Ye=ft.sent,Ke=Ye.data.Contents||[],Ve=this,Ke&&(Array.isArray(Ke)||(Ke=[Ke]),Ke=Ke.map(function(St){return{name:St.Key,url:Ve._objectUrl(St.Key),lastModified:St.LastModified,etag:St.ETag,type:St.Type,size:Number(St.Size),storageClass:St.StorageClass,owner:{id:St.Owner.ID,displayName:St.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(St){return St.Prefix})),ft.abrupt("return",{res:Ye.res,objects:Ke,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ft.stop()}},Te,this)}));function Fe(Te,Me){return De.apply(this,arguments)}return Fe}(),je.listV2=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){var Be,Ge,Ye,Ke,Ve,ot,ut,ft=arguments;return ve.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Be=ft.length>1&&ft[1]!==void 0?ft[1]:{},Ge=Me["continuation-token"]||Me.continuationToken,Ge&&(Be.subres=Object.assign({"continuation-token":Ge},Be.subres)),Ye=this._objectRequestParams("GET","",Be),Ye.query=Object.assign({"list-type":2},Me),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],Qe.next=11,this.request(Ye);case 11:return Ke=Qe.sent,Ve=Ke.data.Contents||[],ot=this,Ve&&(Array.isArray(Ve)||(Ve=[Ve]),Ve=Ve.map(function(rt){var wt=null;return rt.Owner&&(wt={id:rt.Owner.ID,displayName:rt.Owner.DisplayName}),{name:rt.Key,url:ot._objectUrl(rt.Key),lastModified:rt.LastModified,etag:rt.ETag,type:rt.Type,size:Number(rt.Size),storageClass:rt.StorageClass,owner:wt}})),ut=Ke.data.CommonPrefixes||null,ut&&(Array.isArray(ut)||(ut=[ut]),ut=ut.map(function(rt){return rt.Prefix})),Qe.abrupt("return",{res:Ke.res,objects:Ve,prefixes:ut,isTruncated:Ke.data.IsTruncated==="true",keyCount:+Ke.data.KeyCount,continuationToken:Ke.data.ContinuationToken||null,nextContinuationToken:Ke.data.NextContinuationToken||null});case 18:case"end":return Qe.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),je.restore=function(){var De=(0,Ee.default)(ve.default.mark(function Te(Me){var Be,Ge,Ye,Ke,Ve=arguments;return ve.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return Be=Ve.length>1&&Ve[1]!==void 0?Ve[1]:{type:"Archive"},Be=Be||{},Be.subres=Object.assign({restore:""},Be.subres),Be.versionId&&(Be.subres.versionId=Be.versionId),Ge=this._objectRequestParams("POST",Me,Be),Be.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Be.Days?Be.Days:2,JobParameters:{Tier:Be.JobParameters?Be.JobParameters:"Standard"}}},Ge.content=xe(Ye,{headers:!0}),Ge.mime="xml"),Ge.successStatuses=[202],ut.next=9,this.request(Ge);case 9:return Ke=ut.sent,ut.abrupt("return",{res:Ke.res});case 11:case"end":return ut.stop()}},Te,this)}));function Fe(Te){return De.apply(this,arguments)}return Fe}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Te,Me){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Me=Me||{},Te=this._objectName(Te);var Be={object:Te,bucket:this.options.bucket,method:Fe,subres:Me&&Me.subres,timeout:Me&&Me.timeout,ctx:Me&&Me.ctx};return Me.headers&&(Be.headers={},Se(Me.headers).to(Be.headers)),Be},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Te){Fe&&Object.keys(Fe).forEach(function(Me){Te["x-oss-meta-".concat(Me)]=Fe[Me]})},je._deleteFileSafe=function(Fe){var Te=this;return new Promise(function(Me){ke.exists(Fe,function(Be){Be?ke.unlink(Fe,function(Ge){Ge&&Te.debug("unlink %j error: %s",Fe,Ge,"error"),Me()}):Me()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(oe,Ue,_e){"use strict";_e.version="6.18.1"},{}],7:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.abortBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return ke.checkBucketName(Pe),z=this._bucketRequestParams("DELETE",Pe,"worm",fe),ie.next=4,this.request(z);case 4:return te=ie.sent,ie.abrupt("return",{res:te.res,status:te.status});case 6:case"end":return ie.stop()}},me,this)})),Ae.apply(this,arguments)}_e.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.completeBucketWorm=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe,fe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ke.checkBucketName(Pe),te=this._bucketRequestParams("POST",Pe,{wormId:fe},z),le.next=4,this.request(te);case 4:return se=le.sent,le.abrupt("return",{res:se.res,status:se.status});case 6:case"end":return le.stop()}},me,this)})),Ae.apply(this,arguments)}_e.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.deleteBucketInventory=void 0;var ke=oe("../utils/checkBucketName");function Se(me,Pe){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te,se,ie,le=arguments;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},te=Object.assign({inventory:"",inventoryId:fe},z.subres),ke.checkBucketName(Pe),se=this._bucketRequestParams("DELETE",Pe,te,z),se.successStatuses=[204],pe.next=7,this.request(se);case 7:return ie=pe.sent,pe.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return pe.stop()}},me,this)})),Ae.apply(this,arguments)}_e.deleteBucketInventory=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=_e;Ae.deleteBucketLifecycle=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"lifecycle",te),se.successStatuses=[204],ce.next=5,this.request(se);case 5:return ie=ce.sent,ce.abrupt("return",{res:ie.res});case 7:case"end":return ce.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=_e;Ae.deleteBucketWebsite=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Se(z),se=this._bucketRequestParams("DELETE",z,"website",te),se.successStatuses=[204],ce.next=5,this.request(se);case 5:return ie=ce.sent,ce.abrupt("return",{res:ie.res});case 7:case"end":return ce.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.extendBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Ae(Pe,fe,z,te){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z,te,se){var ie,le,ce;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return ke.checkBucketName(fe),ie=this._bucketRequestParams("POST",fe,{wormExtend:"",wormId:z},se),le={ExtendWormConfiguration:{RetentionPeriodInDays:te}},ie.mime="xml",ie.content=Se.obj2xml(le,{headers:!0}),ie.successStatuses=[200],xe.next=8,this.request(ie);case 8:return ce=xe.sent,xe.abrupt("return",{res:ce.res,status:ce.status});case 10:case"end":return xe.stop()}},Pe,this)})),me.apply(this,arguments)}_e.extendBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.getBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se,ie,le,ce=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=ce.length>2&&ce[2]!==void 0?ce[2]:{},se=Object.assign({inventory:"",inventoryId:z},te.subres),ke.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,se,te),ie.successStatuses=[200],ie.xmlResponse=!0,xe.next=8,this.request(ie);case 8:return le=xe.sent,xe.abrupt("return",{status:le.status,res:le.res,inventory:Se.formatInventoryConfig(le.data)});case 10:case"end":return xe.stop()}},Pe,this)})),me.apply(this,arguments)}_e.getBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isArray"),me=Ae.isArray,Pe=oe("../utils/formatObjKey"),fe=Pe.formatObjKey,z=_e;z.getBucketLifecycle=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),pe=this._bucketRequestParams("GET",le,"lifecycle",ce),pe.successStatuses=[200],pe.xmlResponse=!0,Fe.next=6,this.request(pe);case 6:return xe=Fe.sent,je=xe.data.Rule||null,je&&(me(je)||(je=[je]),je=je.map(function(Te){return Te.ID&&(Te.id=Te.ID,delete Te.ID),Te.Tag&&!me(Te.Tag)&&(Te.Tag=[Te.Tag]),fe(Te,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:xe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function se(ie,le){return te.apply(this,arguments)}return se}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=_e;Ae.getBucketVersioning=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Se(z),se=this._bucketRequestParams("GET",z,"versioning",te),se.xmlResponse=!0,se.successStatuses=[200],pe.next=6,this.request(se);case 6:return ie=pe.sent,le=ie.data.Status,pe.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return pe.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isObject"),me=Ae.isObject,Pe=_e;Pe.getBucketWebsite=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe;return ve.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(se),le=this._bucketRequestParams("GET",se,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return ce=je.sent,pe=[],ce.data.RoutingRules&&ce.data.RoutingRules.RoutingRule&&(me(ce.data.RoutingRules.RoutingRule)?pe=[ce.data.RoutingRules.RoutingRule]:pe=ce.data.RoutingRules.RoutingRule),je.abrupt("return",{index:ce.data.IndexDocument&&ce.data.IndexDocument.Suffix||"",supportSubDir:ce.data.IndexDocument&&ce.data.IndexDocument.SupportSubDir||"false",type:ce.data.IndexDocument&&ce.data.IndexDocument.Type,routingRules:pe,error:ce.data.ErrorDocument&&ce.data.ErrorDocument.Key||null,res:ce.res});case 10:case"end":return je.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.getBucketWorm=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ke.checkBucketName(fe),te=this._bucketRequestParams("GET",fe,"worm",z),te.successStatuses=[200],te.xmlResponse=!0,le.next=6,this.request(te);case 6:return se=le.sent,Se.dataFix(se.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},se.data),{res:se.res,status:se.status}));case 9:case"end":return le.stop()}},Pe,this)})),me.apply(this,arguments)}_e.getBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.initiateBucketWorm=void 0;var ke=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function Ae(Pe,fe,z){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z,te){var se,ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Se.checkBucketName(fe),se=this._bucketRequestParams("POST",fe,"worm",te),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},se.mime="xml",se.content=ke.obj2xml(ie,{headers:!0}),se.successStatuses=[200],pe.next=8,this.request(se);case 8:return le=pe.sent,pe.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return pe.stop()}},Pe,this)})),me.apply(this,arguments)}_e.initiateBucketWorm=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.listBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Ae(Pe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe){var z,te,se,ie,le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},te=z.continuationToken,se=Object.assign({inventory:""},te&&{"continuation-token":te},z.subres),ke.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,se,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ce=le.data,pe=le.res,xe=le.status,Fe.abrupt("return",{isTruncated:ce.IsTruncated==="true",nextContinuationToken:ce.NextContinuationToken,inventoryList:Se.formatInventoryConfig(ce.InventoryConfiguration,!0),status:xe,res:pe});case 12:case"end":return Fe.stop()}},Pe,this)})),me.apply(this,arguments)}_e.listBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.putBucketInventory=void 0;var ke=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Ae(Pe,fe){return me.apply(this,arguments)}function me(){return me=(0,Ee.default)(ve.default.mark(function Pe(fe,z){var te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return te=Me.length>2&&Me[2]!==void 0?Me[2]:{},se=Object.assign({inventory:"",inventoryId:z.id},te.subres),ke.checkBucketName(fe),ie=z.OSSBucketDestination,le=z.optionalFields,ce=z.includedObjectVersions,pe="acs:oss:::",xe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(xe).concat(ie.rolename),Bucket:"".concat(pe).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ce,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},De=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",fe,se,te),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,Ge.next=14,this.request(Fe);case 14:return Te=Ge.sent,Ge.abrupt("return",{status:Te.status,res:Te.res});case 16:case"end":return Ge.stop()}},Pe,this)})),me.apply(this,arguments)}_e.putBucketInventory=Ae},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.array.includes.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/isArray"),me=Ae.isArray,Pe=oe("../utils/deepCopy"),fe=Pe.deepCopy,z=oe("../utils/isObject"),te=z.isObject,se=oe("../utils/obj2xml"),ie=se.obj2xml,le=oe("../utils/checkObjectTag"),ce=le.checkObjectTag,pe=oe("../utils/getStrBytesCount"),xe=pe.getStrBytesCount,je=_e;je.putBucketLifecycle=function(){var Be=(0,Ee.default)(ve.default.mark(function Ye(Ke,Ve,ot){var ut,ft,St,Qe,rt;return ve.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Se(Ke),me(Ve)){Ct.next=3;break}throw new Error("rules must be Array");case 3:return ut=this._bucketRequestParams("PUT",Ke,"lifecycle",ot),ft=[],St={LifecycleConfiguration:{Rule:ft}},Ve.forEach(function(bt){De(bt),Me(bt),bt.id&&(bt.ID=bt.id,delete bt.id),ft.push(bt)}),Qe=ie(St,{headers:!0,firstUpperCase:!0}),ut.content=Qe,ut.mime="xml",ut.successStatuses=[200],Ct.next=13,this.request(ut);case 13:return rt=Ct.sent,Ct.abrupt("return",{res:rt.res});case 15:case"end":return Ct.stop()}},Ye,this)}));function Ge(Ye,Ke,Ve){return Be.apply(this,arguments)}return Ge}();function De(Be){Be.days&&(Be.expiration={days:Be.days}),Be.date&&(Be.expiration={createdBeforeDate:Be.date})}function Fe(Be,Ge){var Ye=Be.days,Ke=Be.createdBeforeDate;if(!Ye&&!Ke)throw new Error("".concat(Ge," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ke&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ke))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Te(Be){if(!me(Be)&&!te(Be))throw new Error("tag must be Object or Array");Be=te(Be)?[Be]:Be;var Ge={},Ye=fe(Be);Ye.forEach(function(Ke){Ge[Ke.key]=Ke.value}),ce(Ge)}function Me(Be){if(Be.id&&xe(Be.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Be.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Be.status))throw new Error("Status must be Enabled or Disabled");if(Be.transition){if(!["IA","Archive"].includes(Be.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Be.transition,"Transition")}if(Be.expiration){if(!Be.expiration.expiredObjectDeleteMarker)Fe(Be.expiration,"Expiration");else if(Be.expiration.days||Be.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Be.abortMultipartUpload&&Fe(Be.abortMultipartUpload,"AbortMultipartUpload"),!Be.expiration&&!Be.abortMultipartUpload&&!Be.transition&&!Be.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Be.tag){if(Be.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Te(Be.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.includes.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,Pe=_e;Pe.putBucketVersioning=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(se),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ce=this._bucketRequestParams("PUT",se,"versioning",le),pe={VersioningConfiguration:{Status:ie}},ce.mime="xml",ce.content=me(pe,{headers:!0}),Fe.next=10,this.request(ce);case 10:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 12:case"end":return Fe.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("../utils/obj2xml"),me=Ae.obj2xml,Pe=oe("../utils/isArray"),fe=Pe.isArray,z=_e;z.putBucketWebsite=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le){var ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(ce=Me.length>1&&Me[1]!==void 0?Me[1]:{},pe=Me.length>2?Me[2]:void 0,Se(le),xe=this._bucketRequestParams("PUT",le,"website",pe),je={Suffix:ce.index||"index.html"},De={IndexDocument:je},Fe={WebsiteConfiguration:De},ce.supportSubDir&&(je.SupportSubDir=ce.supportSubDir),ce.type&&(je.Type=ce.type),ce.error&&(De.ErrorDocument={Key:ce.error}),ce.routingRules===void 0){Ge.next=14;break}if(fe(ce.routingRules)){Ge.next=13;break}throw new Error("RoutingRules must be Array");case 13:De.RoutingRules={RoutingRule:ce.routingRules};case 14:return Fe=me(Fe),xe.content=Fe,xe.mime="xml",xe.successStatuses=[200],Ge.next=20,this.request(xe);case 20:return Te=Ge.sent,Ge.abrupt("return",{res:Te.res});case 22:case"end":return Ge.stop()}},ie,this)}));function se(ie){return te.apply(this,arguments)}return se}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),_e.encodeCallback=function(Ee,ke){if(Ee.headers=Ee.headers||{},!Object.prototype.hasOwnProperty.call(Ee.headers,"x-oss-callback")&&ke.callback){var Se={callbackUrl:encodeURI(ke.callback.url),callbackBody:ke.callback.body};ke.callback.host&&(Se.callbackHost=ke.callback.host),ke.callback.contentType&&(Se.callbackBodyType=ke.callback.contentType);var Ae=de.from(JSON.stringify(Se)).toString("base64");if(Ee.headers["x-oss-callback"]=Ae,ke.callback.customValue){var me={};Object.keys(ke.callback.customValue).forEach(function(Pe){me["x:".concat(Pe)]=ke.callback.customValue[Pe].toString()}),Ee.headers["x-oss-callback-var"]=de.from(JSON.stringify(me)).toString("base64")}}}}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var de=function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.getReqUrl=void 0;var ve=de(oe("copy-to")),Ee=de(oe("url")),ke=de(oe("merge-descriptors")),Se=de(oe("is-type-of")),Ae=oe("../utils/isIP"),me=oe("../utils/checkConfigValid");function Pe(fe){var z={},te=this.options.cname;me.checkConfigValid(this.options.endpoint,"endpoint"),ve.default(this.options.endpoint,!1).to(z),fe.bucket&&!te&&!Ae.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(fe.bucket,".").concat(z.host));var se="/";fe.bucket&&this.options.sldEnable&&(se+="".concat(fe.bucket,"/")),fe.object&&(se+=this._escape(fe.object).replace(/\+/g,"%2B")),z.pathname=se;var ie={};if(fe.query&&ke.default(ie,fe.query),fe.subres){var le={};Se.default.string(fe.subres)?le[fe.subres]="":Se.default.array(fe.subres)?fe.subres.forEach(function(ce){le[ce]=""}):le=fe.subres,ke.default(ie,le)}return z.query=ie,Ee.default.format(z)}_e.getReqUrl=Pe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.string.trim.js");var de=oe("humanize-ms"),ve=oe("url"),Ee=oe("../utils/checkBucketName"),ke=Ee.checkBucketName,Se=oe("../utils/setRegion"),Ae=Se.setRegion,me=oe("../utils/checkConfigValid"),Pe=me.checkConfigValid;function fe(z,te){Pe(z,"endpoint");var se=ve.parse(z);if(se.protocol||(se=ve.parse("http".concat(te?"s":"","://").concat(z))),se.protocol!=="http:"&&se.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return se}Ue.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&ke(z.bucket);var te=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(te.accessKeyId=te.accessKeyId.trim(),te.accessKeySecret=te.accessKeySecret.trim(),te.timeout&&(te.timeout=de(te.timeout)),te.endpoint)te.endpoint=fe(te.endpoint,te.secure);else if(te.region)te.endpoint=Ae(te.region,te.internal,te.secure);else throw new Error("require options.endpoint or options.region");return te.inited=!0,te}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(oe,Ue,_e){"use strict";var de=oe("merge-descriptors"),ve=_e;de(ve,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkBucketName"),Se=ke.checkBucketName,Ae=oe("querystring"),me=oe("js-base64"),Pe=me.Base64.encode,fe=_e;fe.processObjectSave=function(){var te=(0,Ee.default)(ve.default.mark(function ie(le,ce,pe,xe){var je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return z(le,"sourceObject"),z(ce,"targetObject"),z(pe,"process"),ce=this._objectName(ce),xe&&Se(xe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),De=xe?",b_".concat(Pe(xe)):"",ce=Pe(ce),Fe={"x-oss-process":"".concat(pe,"|sys/saveas,o_").concat(ce).concat(De)},je.content=Ae.stringify(Fe),Be.next=12,this.request(je);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,status:Te.res.status});case 14:case"end":return Be.stop()}},ie,this)}));function se(ie,le,ce,pe){return te.apply(this,arguments)}return se}();function z(te,se){if(!te)throw new Error("".concat(se," is required"));if(typeof te!="string")throw new Error("".concat(se," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.regexp.to-string.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("debug")("ali-oss:multipart-copy"),Se=oe("copy-to"),Ae=_e;Ae.uploadPartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie,le){var ce,pe,xe,je,De,Fe=arguments;return ve.default.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return ce=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ce.headers=ce.headers||{},pe=ce.versionId||ce.subres&&ce.subres.versionId||null,pe?xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(pe):xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ce.headers["x-oss-copy-source"]=xe,ie&&(ce.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ce.subres={partNumber:se,uploadId:te},je=this._objectRequestParams("PUT",z,ce),je.mime=ce.mime,je.successStatuses=[200],Me.next=12,this.request(je);case 12:return De=Me.sent,Me.abrupt("return",{name:z,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Me.stop()}},fe,this)}));function Pe(fe,z,te,se,ie){return me.apply(this,arguments)}return Pe}(),Ae.multipartUploadCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te){var se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ge=arguments;return ve.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return se=Ge.length>2&&Ge[2]!==void 0?Ge[2]:{},this.resetCancelFlag(),ie=se.versionId,le=ie===void 0?null:ie,ce={versionId:le},Ke.next=6,this._getObjectMeta(te.sourceBucketName,te.sourceKey,ce);case 6:if(pe=Ke.sent,xe=pe.res.headers["content-length"],te.startOffset=te.startOffset||0,te.endOffset=te.endOffset||xe,!(se.checkpoint&&se.checkpoint.uploadId)){Ke.next=14;break}return Ke.next=13,this._resumeMultipartCopy(se.checkpoint,te,se);case 13:return Ke.abrupt("return",Ke.sent);case 14:if(je=102400,De=te.endOffset-te.startOffset,!(De<je)){Ke.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(se.partSize&&se.partSize<je)){Ke.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ke.next=22,this.initMultipartUpload(z,se);case 22:if(Fe=Ke.sent,Te=Fe.uploadId,Me=this._getPartSize(De,se.partSize),Be={name:z,copySize:De,partSize:Me,uploadId:Te,doneParts:[]},!(se&&se.progress)){Ke.next=29;break}return Ke.next=29,se.progress(0,Be,Fe.res);case 29:return Ke.next=31,this._resumeMultipartCopy(Be,te,se);case 31:return Ke.abrupt("return",Ke.sent);case 32:case"end":return Ke.stop()}},fe,this)}));function Pe(fe,z){return me.apply(this,arguments)}return Pe}(),Ae._resumeMultipartCopy=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye,Ke,Ve,ot,ut,ft,St,Qe,rt;return ve.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(!this.isCancel()){Ct.next=2;break}throw this._makeCancelEvent();case 2:if(ie=se.versionId,le=ie===void 0?null:ie,ce={versionId:le},pe=z.copySize,xe=z.partSize,je=z.uploadId,De=z.doneParts,Fe=z.name,Te=this._divideMultipartCopyParts(pe,xe,te.startOffset),Me=Te.length,Be={headers:{}},se.copyheaders&&Se(se.copyheaders).to(Be.headers),le&&Se(ce).to(Be),Ge=function(ct,xt,dt){return new Promise(function(){var Mt=(0,Ee.default)(ve.default.mark(function yt(Ft,mt){var vt,tt,He;return ve.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,ct.isCancel()){Ne.next=22;break}return vt=Te[xt-1],tt="".concat(vt.start,"-").concat(vt.end-1),Ne.prev=4,Ne.next=7,ct.uploadPartCopy(Fe,je,xt,tt,dt,Be);case 7:He=Ne.sent,Ne.next=15;break;case 10:if(Ne.prev=10,Ne.t0=Ne.catch(4),Ne.t0.status!==404){Ne.next=14;break}throw ct._makeAbortEvent();case 14:throw Ne.t0;case 15:if(ct.isCancel()){Ne.next=22;break}if(ke("content-range ".concat(He.res.headers["content-range"])),De.push({number:xt,etag:He.res.headers.etag}),z.doneParts=De,!(se&&se.progress)){Ne.next=22;break}return Ne.next=22,se.progress(De.length/Me,z,He.res);case 22:Ft(),Ne.next=29;break;case 25:Ne.prev=25,Ne.t1=Ne.catch(0),Ne.t1.partNum=xt,mt(Ne.t1);case 29:case"end":return Ne.stop()}},yt,null,[[0,25],[4,10]])}));return function(yt,Ft){return Mt.apply(this,arguments)}}())},Ye=Array.from(new Array(Me),function(bt,ct){return ct+1}),Ke=De.map(function(bt){return bt.number}),Ve=Ye.filter(function(bt){return Ke.indexOf(bt)<0}),ot=5,ut=se.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||ut===1)){Ct.next=28;break}ft=0;case 18:if(!(ft<Ve.length)){Ct.next=26;break}if(!this.isCancel()){Ct.next=21;break}throw this._makeCancelEvent();case 21:return Ct.next=23,Ge(this,Ve[ft],te);case 23:ft++,Ct.next=18;break;case 26:Ct.next=40;break;case 28:return Ct.next=30,this._parallelNode(Ve,ut,Ge,te);case 30:if(St=Ct.sent,Qe=St.find(function(bt){return bt.name==="abort"}),!Qe){Ct.next=34;break}throw Qe;case 34:if(!this.isCancel()){Ct.next=36;break}throw this._makeCancelEvent();case 36:if(!(St&&St.length>0)){Ct.next=40;break}throw rt=St[0],rt.message="Failed to copy some parts with error: ".concat(rt.toString()," part_num: ").concat(rt.partNum),rt;case 40:return Ct.next=42,this.completeMultipartUpload(Fe,je,De,se);case 42:return Ct.abrupt("return",Ct.sent);case 43:case"end":return Ct.stop()}},fe,this)}));function Pe(fe,z,te){return me.apply(this,arguments)}return Pe}(),Ae._divideMultipartCopyParts=function(Pe,fe,z){for(var te=Math.ceil(Pe/fe),se=[],ie=0;ie<te;ie++){var le=fe*ie+z,ce=Math.min(le+fe,Pe+z);se.push({start:le,end:ce})}return se},Ae._getObjectMeta=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se){var ie,le;return ve.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ie=this.getBucket(),this.setBucket(z),pe.next=4,this.head(te,se);case 4:return le=pe.sent,this.setBucket(ie),pe.abrupt("return",le);case 7:case"end":return pe.stop()}},fe,this)}));function Pe(fe,z,te){return me.apply(this,arguments)}return Pe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("copy-to"),Ae=oe("./callback"),me=oe("./utils/deepCopy"),Pe=me.deepCopyWith,fe=oe("./utils/isBuffer"),z=fe.isBuffer,te=oe("./utils/omit"),se=te.omit,ie=_e;ie.listUploads=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je){var De,Fe,Te,Me;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return je=je||{},De={},Se(je).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=xe,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ge.next=10,this.request(Fe);case 10:return Te=Ge.sent,Me=Te.data.Upload||[],Array.isArray(Me)||(Me=[Me]),Me=Me.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),Ge.abrupt("return",{res:Te.res,uploads:Me,bucket:Te.data.Bucket,nextKeyMarker:Te.data.NextKeyMarker,nextUploadIdMarker:Te.data.NextUploadIdMarker,isTruncated:Te.data.IsTruncated==="true"});case 15:case"end":return Ge.stop()}},pe,this)}));function ce(pe,xe){return le.apply(this,arguments)}return ce}(),ie.listParts=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Te={},Se(Fe).to(Te),Te.subres={uploadId:je},Me=this._objectRequestParams("GET",xe,Te),Me.query=De,Me.xmlResponse=!0,Me.successStatuses=[200],Ye.next=10,this.request(Me);case 10:return Be=Ye.sent,Ye.abrupt("return",{res:Be.res,uploadId:Be.data.UploadId,bucket:Be.data.Bucket,name:Be.data.Key,partNumberMarker:Be.data.PartNumberMarker,nextPartNumberMarker:Be.data.NextPartNumberMarker,maxParts:Be.data.MaxParts,isTruncated:Be.data.IsTruncated,parts:Be.data.Part||[]});case 12:case"end":return Ye.stop()}},pe,this)}));function ce(pe,xe,je,De){return le.apply(this,arguments)}return ce}(),ie.abortMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De){var Fe,Te,Me;return Ee.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return this._stop(),De=De||{},Fe={},Se(De).to(Fe),Fe.subres={uploadId:je},Te=this._objectRequestParams("DELETE",xe,Fe),Te.successStatuses=[204],Ge.next=9,this.request(Te);case 9:return Me=Ge.sent,Ge.abrupt("return",{res:Me.res});case 11:case"end":return Ge.stop()}},pe,this)}));function ce(pe,xe,je){return le.apply(this,arguments)}return ce}(),ie.initMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je){var De,Fe,Te;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return je=je||{},De={},Se(je).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(je.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",xe,De),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Be.next=12,this.request(Fe);case 12:return Te=Be.sent,Be.abrupt("return",{res:Te.res,bucket:Te.data.Bucket,name:Te.data.Key,uploadId:Te.data.UploadId});case 14:case"end":return Be.stop()}},pe,this)}));function ce(pe,xe){return le.apply(this,arguments)}return ce}(),ie.uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te,Me,Be){var Ge,Ye;return Ee.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(Ge={size:Me-Te},Ye=de&&de.browser,!Ye){Ve.next=8;break}return Ve.next=5,this._createBuffer(Fe,Te,Me);case 5:Ge.content=Ve.sent,Ve.next=11;break;case 8:return Ve.next=10,this._createStream(Fe,Te,Me);case 10:Ge.stream=Ve.sent;case 11:return Ve.next=13,this._uploadPart(xe,je,De,Ge,Be);case 13:return Ve.abrupt("return",Ve.sent);case 14:case"end":return Ve.stop()}},pe,this)}));function ce(pe,xe,je,De,Fe,Te,Me){return le.apply(this,arguments)}return ce}(),ie.completeMultipartUpload=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe){var Te,Me,Be,Ge,Ye,Ke,Ve,ot;return Ee.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Te=De.concat().sort(function(St,Qe){return St.number-Qe.number}).filter(function(St,Qe,rt){return!Qe||St.number!==rt[Qe-1].number}),Me=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Be=0;Be<Te.length;Be++)Ge=Te[Be],Me+=`<Part>
|
|
`,Me+="<PartNumber>".concat(Ge.number,`</PartNumber>
|
|
`),Me+="<ETag>".concat(Ge.etag,`</ETag>
|
|
`),Me+=`</Part>
|
|
`;return Me+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=Pe(Fe,function(St){if(z(St))return null}),Ye.subres={uploadId:je},Ye.headers=se(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ke=this._objectRequestParams("POST",xe,Ye),Ae.encodeCallback(Ke,Ye),Ke.mime="xml",Ke.content=Me,Ke.headers&&Ke.headers["x-oss-callback"]||(Ke.xmlResponse=!0),Ke.successStatuses=[200],ft.next=17,this.request(Ke);case 17:if(Ve=ft.sent,!Fe.progress){ft.next=21;break}return ft.next=21,Fe.progress(1,null,Ve.res);case 21:return ot={res:Ve.res,bucket:Ke.bucket,name:xe,etag:Ve.res.headers.etag},Ke.headers&&Ke.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ve.data.toString())),ft.abrupt("return",ot);case 24:case"end":return ft.stop()}},pe,this)}));function ce(pe,xe,je,De){return le.apply(this,arguments)}return ce}(),ie._uploadPart=function(){var le=(0,ke.default)(Ee.default.mark(function pe(xe,je,De,Fe,Te){var Me,Be,Ge,Ye;return Ee.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Te=Te||{},Me={},Se(Te).to(Me),Me.headers=Me.headers||{},Me.headers["Content-Length"]=Fe.size,Me.headers=se(Me.headers,["x-oss-server-side-encryption"]),Me.subres={partNumber:De,uploadId:je},Be=this._objectRequestParams("PUT",xe,Me),Be.mime=Me.mime,Ge=de&&de.browser,Ge?Be.content=Fe.content:Be.stream=Fe.stream,Be.successStatuses=[200],Be.disabledMD5=Te.disabledMD5,Ve.next=15,this.request(Be);case 15:if(Ye=Ve.sent,Ye.res.headers.etag){Ve.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
https://help.aliyun.com/document_detail/32069.html`);case 18:return Fe.stream&&(Fe.stream=null,Be.stream=null),Ve.abrupt("return",{name:xe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ve.stop()}},pe,this)}));function ce(pe,xe,je,De,Fe){return le.apply(this,arguments)}return ce}()}).call(this)}).call(this,oe("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator")),Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("url"),Se=oe("utility"),Ae=oe("copy-to"),me=oe("../../common/signUtils"),Pe=oe("../utils/isIP"),fe=Pe.isIP,z=oe("../utils/setSTSToken"),te=z.setSTSToken,se=oe("../utils/isFunction"),ie=se.isFunction,le=_e;le.asyncSignatureUrl=function(){var ce=(0,Ee.default)(ve.default.mark(function xe(je,De){var Fe,Te,Me,Be,Ge;return ve.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(!fe(this.options.endpoint.hostname)){Ke.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(De=De||{},je=this._objectName(je),De.method=De.method||"GET",Fe=Se.timestamp()+(De.expires||1800),Te={bucket:this.options.bucket,object:je},Me=this._getResource(Te),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ke.next=11;break}return Ke.next=11,te.call(this);case 11:return this.options.stsToken&&(De["security-token"]=this.options.stsToken),Be=me._signatureForURL(this.options.accessKeySecret,De,Me,Fe),Ge=ke.parse(this._getReqUrl(Te)),Ge.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Be.Signature},Ae(Be.subResource).to(Ge.query),Ke.abrupt("return",Ge.format());case 17:case"end":return Ke.stop()}},xe,this)}));function pe(xe,je){return ce.apply(this,arguments)}return pe}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var Ee=de(oe("@babel/runtime/helpers/typeof")),ke=de(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("../utils/checkBucketName"),Ae=Se.checkBucketName,me=_e,Pe=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];me.copy=function(){var fe=(0,ke.default)(ve.default.mark(function te(se,ie,le,ce){var pe,xe,je;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,Ee.default)(le)==="object"&&(ce=le),ce=ce||{},ce.headers=ce.headers||{},Object.keys(ce.headers).forEach(function(Te){ce.headers["x-oss-copy-source-".concat(Te.toLowerCase())]=ce.headers[Te]}),(ce.meta||Object.keys(ce.headers).find(function(Te){return Pe.includes(Te.toLowerCase())}))&&(ce.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ce.meta,ce.headers),ie=this._getSourceName(ie,le),ce.versionId&&(ie="".concat(ie,"?versionId=").concat(ce.versionId)),ce.headers["x-oss-copy-source"]=ie,pe=this._objectRequestParams("PUT",se,ce),pe.xmlResponse=!0,pe.successStatuses=[200,304],Fe.next=14,this.request(pe);case 14:return xe=Fe.sent,je=xe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:xe.res});case 18:case"end":return Fe.stop()}},te,this)}));function z(te,se,ie,le){return fe.apply(this,arguments)}return z}(),me._getSourceName=function(z,te){return typeof te=="string"?z=this._objectName(z):z[0]!=="/"?te=this.options.bucket:(te=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Ae(te),z=encodeURIComponent(z),z="/".concat(te,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.delete=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("DELETE",Pe,fe),z.successStatuses=[204],le.next=7,this.request(z);case 7:return te=le.sent,le.abrupt("return",{res:te.res});case 9:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("utility"),Se=oe("../utils/obj2xml"),Ae=Se.obj2xml,me=_e;me.deleteMulti=function(){var Pe=(0,Ee.default)(ve.default.mark(function z(te){var se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye=arguments;return ve.default.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if(se=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!te||!te.length)){Ve.next=4;break}throw new Error("names is required");case 4:for(le=0;le<te.length;le++)ce={},typeof te[le]=="string"?ce.Key=ke.escape(this._objectName(te[le])):(pe=te[le],xe=pe.key,je=pe.versionId,ce.Key=ke.escape(this._objectName(xe)),ce.VersionId=je),ie.push(ce);return De={Delete:{Quiet:!!se.quiet,Object:ie}},Fe=Ae(De,{headers:!0}),se.subres=Object.assign({delete:""},se.subres),se.versionId&&(se.subres.versionId=se.versionId),Te=this._objectRequestParams("POST","",se),Te.mime="xml",Te.content=Fe,Te.xmlResponse=!0,Te.successStatuses=[200],Ve.next=16,this.request(Te);case 16:return Me=Ve.sent,Be=Me.data,Ge=Be&&Be.Deleted||null,Ge&&(Array.isArray(Ge)||(Ge=[Ge])),Ve.abrupt("return",{res:Me.res,deleted:Ge||[]});case 21:case"end":return Ve.stop()}},z,this)}));function fe(z){return Pe.apply(this,arguments)}return fe}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.deleteObjectTagging=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({tagging:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("DELETE",Pe,fe),z.successStatuses=[204],le.next=8,this.request(z);case 8:return te=le.sent,le.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.concat.js");var de=oe("url"),ve=oe("../utils/isIP"),Ee=ve.isIP,ke=_e;ke.generateObjectUrl=function(Ae,me){if(Ee(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(me)me[me.length-1]!=="/"&&(me+="/");else{me=this.options.endpoint.format();var Pe=de.parse(me),fe=this.options.bucket;Pe.hostname="".concat(fe,".").concat(Pe.hostname),Pe.host="".concat(fe,".").concat(Pe.host),me=Pe.format()}return me+this._escape(this._objectName(Ae))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=ve(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("fs"),Ae=oe("is-type-of"),me=_e;me.get=function(){var Pe=(0,ke.default)(Ee.default.mark(function z(te,se){var ie,le,ce,pe,xe,je,De,Fe,Te=arguments;return Ee.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ie=Te.length>2&&Te[2]!==void 0?Te[2]:{},le=null,ce=!1,Ae.writableStream(se)?le=se:Ae.string(se)?(le=Se.createWriteStream(se),ce=!0):ie=se,ie=ie||{},pe=de&&de.browser,xe=ie.responseCacheControl===null?"":"no-cache",je=pe&&xe?{"response-cache-control":xe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Be.prev=11,Fe=this._objectRequestParams("GET",te,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Be.next=17,this.request(Fe);case 17:De=Be.sent,ce&&le.destroy(),Be.next=28;break;case 21:if(Be.prev=21,Be.t0=Be.catch(11),!ce){Be.next=27;break}return le.destroy(),Be.next=27,this._deleteFileSafe(se);case 27:throw Be.t0;case 28:return Be.abrupt("return",{res:De.res,content:De.data});case 29:case"end":return Be.stop()}},z,this,[[11,21]])}));function fe(z,te){return Pe.apply(this,arguments)}return fe}()}).call(this)}).call(this,oe("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.getACL=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se=arguments;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=se.length>1&&se[1]!==void 0?se[1]:{},fe.subres=Object.assign({acl:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("GET",Pe,fe),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return te=le.sent,le.abrupt("return",{acl:te.data.AccessControlList.Grant,owner:{id:te.data.Owner.ID,displayName:te.data.Owner.DisplayName},res:te.res});case 11:case"end":return le.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e,Se=oe("../utils/isObject"),Ae=Se.isObject,me=oe("../utils/isArray"),Pe=me.isArray;ke.getBucketVersions=fe,ke.listObjectVersions=fe;function fe(){return z.apply(this,arguments)}function z(){return z=(0,Ee.default)(ve.default.mark(function ie(){var le,ce,pe,xe,je,De,Fe,Te,Me=arguments;return ve.default.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:if(le=Me.length>0&&Me[0]!==void 0?Me[0]:{},ce=Me.length>1&&Me[1]!==void 0?Me[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){Ge.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ce.subres=Object.assign({versions:""},ce.subres),ce.versionId&&(ce.subres.versionId=ce.versionId),pe=this._objectRequestParams("GET","",ce),pe.xmlResponse=!0,pe.successStatuses=[200],pe.query=se(le),Ge.next=12,this.request(pe);case 12:return xe=Ge.sent,je=xe.data.Version||[],De=xe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),De&&(Pe(De)||(De=[De]),De=De.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Te=xe.data.CommonPrefixes||null,Te&&(Pe(Te)||(Te=[Te]),Te=Te.map(function(Ye){return Ye.Prefix})),Ge.abrupt("return",{res:xe.res,objects:je,deleteMarker:De,prefixes:Te,nextMarker:xe.data.NextKeyMarker||null,NextVersionIdMarker:xe.data.NextVersionIdMarker||null,nextKeyMarker:xe.data.NextKeyMarker||null,nextVersionIdMarker:xe.data.NextVersionIdMarker||null,isTruncated:xe.data.IsTruncated==="true"});case 21:case"end":return Ge.stop()}},ie,this)})),z.apply(this,arguments)}function te(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function se(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Ae(ie)&&Object.keys(ie).forEach(function(ce){le[te(ce)]=ie[ce]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.getObjectMeta=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe){var z,te;return ve.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return fe=fe||{},Pe=this._objectName(Pe),fe.subres=Object.assign({objectMeta:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("HEAD",Pe,fe),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return te=ie.sent,ie.abrupt("return",{status:te.status,res:te.res});case 10:case"end":return ie.stop()}},me,this)}));function Ae(me,Pe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e,Se=oe("../utils/isObject"),Ae=Se.isObject;ke.getObjectTagging=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,ce,pe,xe=arguments;return ve.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return te=xe.length>1&&xe[1]!==void 0?xe[1]:{},te.subres=Object.assign({tagging:""},te.subres),te.versionId&&(te.subres.versionId=te.versionId),z=this._objectName(z),se=this._objectRequestParams("GET",z,te),se.successStatuses=[200],De.next=8,this.request(se);case 8:return ie=De.sent,De.next=11,this.parseXML(ie.data);case 11:return le=De.sent,ce=le.TagSet.Tag,ce=ce&&Ae(ce)?[ce]:ce||[],pe={},ce.forEach(function(Fe){pe[Fe.Key]=Fe.Value}),De.abrupt("return",{status:ie.status,res:ie.res,tag:pe});case 17:case"end":return De.stop()}},fe,this)}));function Pe(fe){return me.apply(this,arguments)}return Pe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(oe,Ue,_e){"use strict";var de=oe("../utils/isIP"),ve=de.isIP,Ee=_e;Ee.getObjectUrl=function(Se,Ae){if(ve(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Ae?Ae[Ae.length-1]!=="/"&&(Ae+="/"):Ae=this.options.endpoint.format(),Ae+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.getSymlink=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe){var fe,z,te,se,ie=arguments;return ve.default.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return fe=ie.length>1&&ie[1]!==void 0?ie[1]:{},fe.subres=Object.assign({symlink:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),Pe=this._objectName(Pe),z=this._objectRequestParams("GET",Pe,fe),z.successStatuses=[200],ce.next=8,this.request(z);case 8:return te=ce.sent,se=te.res.headers["x-oss-symlink-target"],ce.abrupt("return",{targetName:decodeURIComponent(se),res:te.res});case 11:case"end":return ce.stop()}},me,this)}));function Ae(me){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/checkEnv"),Se=ke.checkEnv,Ae=_e;Ae.head=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z){var te,se,ie,le,ce=arguments;return ve.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return te=ce.length>1&&ce[1]!==void 0?ce[1]:{},Se("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),te.subres=Object.assign({},te.subres),te.versionId&&(te.subres.versionId=te.versionId),se=this._objectRequestParams("HEAD",z,te),se.successStatuses=[200,304],xe.next=8,this.request(se);case 8:return ie=xe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),xe.abrupt("return",le);case 12:case"end":return xe.stop()}},fe,this)}));function Pe(fe){return me.apply(this,arguments)}return Pe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.putACL=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=fe,Pe=this._objectName(Pe),te=this._objectRequestParams("PUT",Pe,z),te.successStatuses=[200],le.next=10,this.request(te);case 10:return se=le.sent,le.abrupt("return",{res:se.res});case 12:case"end":return le.stop()}},me,this)}));function Ae(me,Pe,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.object.keys.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("../utils/obj2xml"),Se=ke.obj2xml,Ae=oe("../utils/checkObjectTag"),me=Ae.checkObjectTag,Pe=_e;Pe.putObjectTagging=function(){var fe=(0,Ee.default)(ve.default.mark(function te(se,ie){var le,ce,pe,xe,je=arguments;return ve.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},me(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),se=this._objectName(se),ce=this._objectRequestParams("PUT",se,le),ce.successStatuses=[200],ie=Object.keys(ie).map(function(Te){return{Key:Te,Value:ie[Te]}}),pe={Tagging:{TagSet:{Tag:ie}}},ce.mime="xml",ce.content=Se(pe),Fe.next=13,this.request(ce);case 13:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 15:case"end":return Fe.stop()}},te,this)}));function z(te,se){return fe.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=_e;ke.putSymlink=function(){var Se=(0,Ee.default)(ve.default.mark(function me(Pe,fe,z){var te,se;return ve.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},fe=this._escape(this._objectName(fe)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=fe,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),Pe=this._objectName(Pe),te=this._objectRequestParams("PUT",Pe,z),te.successStatuses=[200],le.next=13,this.request(te);case 13:return se=le.sent,le.abrupt("return",{res:se.res});case 15:case"end":return le.stop()}},me,this)}));function Ae(me,Pe,fe){return Se.apply(this,arguments)}return Ae}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,Ue,_e){"use strict";var de=oe("url"),ve=oe("utility"),Ee=oe("copy-to"),ke=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Ae=Se.isIP,me=_e;me.signatureUrl=function(fe,z){if(Ae(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},fe=this._objectName(fe),z.method=z.method||"GET";var te=ve.timestamp()+(z.expires||1800),se={bucket:this.options.bucket,object:fe},ie=this._getResource(se);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=ke._signatureForURL(this.options.accessKeySecret,z,ie,te),ce=de.parse(this._getReqUrl(se));return ce.query={OSSAccessKeyId:this.options.accessKeyId,Expires:te,Signature:le.Signature},Ee(le.subResource).to(ce.query),ce.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.function.name.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator")),ke=oe("./utils/isArray"),Se=ke.isArray,Ae=_e;Ae._parallelNode=function(){var me=(0,Ee.default)(ve.default.mark(function fe(z,te,se,ie){var le,ce,pe,xe,je,De,Fe,Te;return ve.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:le=this,ce=[],pe=[],xe=z.length/te,je=z.length%te,De=je===0?xe:(z.length-je)/te+1,Fe=1,Te=0;case 8:if(!(Te<z.length)){Be.next=26;break}if(!le.isCancel()){Be.next=11;break}return Be.abrupt("break",26);case 11:if(ie?pe.push(se(le,z[Te],ie)):pe.push(se(le,z[Te])),!(pe.length===te||Fe===De&&Te===z.length-1)){Be.next=23;break}return Be.prev=13,Fe+=1,Be.next=17,Promise.all(pe);case 17:Be.next=22;break;case 19:Be.prev=19,Be.t0=Be.catch(13),ce.push(Be.t0);case 22:pe=[];case 23:Te++,Be.next=8;break;case 26:return Be.abrupt("return",ce);case 27:case"end":return Be.stop()}},fe,this,[[13,19]])}));function Pe(fe,z,te,se){return me.apply(this,arguments)}return Pe}(),Ae._parallel=function(Pe,fe,z){var te=this;return new Promise(function(se){var ie=[];if(fe<=0||!Pe){se(ie);return}function le(Be){return function(){if(Be===null)throw new Error("Callback was already called.");var Ge=Be;Be=null;for(var Ye=arguments.length,Ke=new Array(Ye),Ve=0;Ve<Ye;Ve++)Ke[Ve]=arguments[Ve];Ge.apply(this,Ke)}}function ce(Be){var Ge=-1,Ye=Be.length;return function(){return++Ge<Ye&&!te.isCancel()?{value:Be[Ge],key:Ge}:null}}var pe=ce(Pe),xe=!1,je=0,De=!1;function Fe(Be){je-=1,Be?(xe=!0,ie.push(Be),se(ie)):xe&&je<=0?(xe=!0,se(ie)):De||(te.isCancel()?se(ie):Me())}function Te(Be,Ge){z(Be).then(function(Ye){Ge(null,Ye)}).catch(function(Ye){Ge(Ye)})}function Me(){for(De=!0;je<fe&&!xe&&!te.isCancel();){var Be=pe();if(Be===null||ie.length>0){xe=!0,je<=0&&se(ie);return}je+=1,Te(Be.value,le(Fe))}De=!1}Me()})},Ae.cancel=function(Pe){this.options.cancelFlag=!0,Se(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(fe){if(fe.destroyed===!1){var z={name:"cancel",message:"cancel"};fe.destroy(z)}}),this.multipartUploadStreams=[],Pe&&this.abortMultipartUpload(Pe.name,Pe.uploadId,Pe.options)},Ae.isCancel=function(){return this.options.cancelFlag},Ae.resetCancelFlag=function(){this.options.cancelFlag=!1},Ae._stop=function(){this.options.cancelFlag=!0},Ae._makeCancelEvent=function(){var Pe={status:0,name:"cancel"};return Pe},Ae._makeAbortEvent=function(){var Pe={status:0,name:"abort",message:"upload task has been abort"};return Pe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var ve=oe("./../../shims/crypto/crypto.js"),Ee=oe("is-type-of"),ke=oe("./utils/lowercaseKeyHeader"),Se=ke.lowercaseKeyHeader;_e.buildCanonicalizedResource=function(me,Pe){var fe="".concat(me),z="?";if(Ee.string(Pe)&&Pe.trim()!=="")fe+=z+Pe;else if(Ee.array(Pe))Pe.sort(),fe+=z+Pe.join("&");else if(Pe){var te=function(le,ce){return le[0]>ce[0]?1:le[0]<ce[0]?-1:0},se=function(le){fe+=z+le,(Pe[le]||Pe[le]===0)&&(fe+="=".concat(Pe[le])),z="&"};Object.keys(Pe).sort(te).forEach(se)}return fe},_e.buildCanonicalString=function(me,Pe,fe,z){fe=fe||{};var te=Se(fe.headers),se="x-oss-",ie=[],le={},ce=[me.toUpperCase(),te["content-md5"]||"",te["content-type"],z||te["x-oss-date"]];return Object.keys(te).forEach(function(pe){var xe=pe.toLowerCase();xe.indexOf(se)===0&&(le[xe]=String(te[pe]).trim())}),Object.keys(le).sort().forEach(function(pe){ie.push("".concat(pe,":").concat(le[pe]))}),ce=ce.concat(ie),ce.push(this.buildCanonicalizedResource(Pe,fe.parameters)),ce.join(`
|
|
`)},_e.computeSignature=function(me,Pe){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=ve.createHmac("sha1",me);return z.update(de.from(Pe,fe)).digest("base64")},_e.authorization=function(me,Pe,fe,z){return"OSS ".concat(me,":").concat(this.computeSignature(Pe,fe,z))},_e._signatureForURL=function(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fe=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,te=arguments.length>4?arguments[4]:void 0,se={},ie=Pe.subResource,le=ie===void 0?{}:ie;if(Pe.process){var ce="x-oss-process";le[ce]=Pe.process}if(Pe.trafficLimit){var pe="x-oss-traffic-limit";le[pe]=Pe.trafficLimit}if(Pe.response&&Object.keys(Pe.response).forEach(function(Fe){var Te="response-".concat(Fe.toLowerCase());le[Te]=Pe.response[Fe]}),Object.keys(Pe).forEach(function(Fe){var Te=Fe.toLowerCase(),Me=Pe[Fe];Te.indexOf("x-oss-")===0?se[Te]=Me:(Te.indexOf("content-md5")===0||Te.indexOf("content-type")===0)&&(se[Fe]=Me)}),Object.prototype.hasOwnProperty.call(Pe,"security-token")&&(le["security-token"]=Pe["security-token"]),Object.prototype.hasOwnProperty.call(Pe,"callback")){var xe={callbackUrl:encodeURI(Pe.callback.url),callbackBody:Pe.callback.body};if(Pe.callback.host&&(xe.callbackHost=Pe.callback.host),Pe.callback.contentType&&(xe.callbackBodyType=Pe.callback.contentType),le.callback=de.from(JSON.stringify(xe)).toString("base64"),Pe.callback.customValue){var je={};Object.keys(Pe.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=Pe.callback.customValue[Fe]}),le["callback-var"]=de.from(JSON.stringify(je)).toString("base64")}}var De=this.buildCanonicalString(Pe.method,fe,{headers:se,parameters:le},z.toString());return{Signature:this.computeSignature(me,De,te),subResource:le}}}).call(this)}).call(this,oe("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkBucketName=void 0,_e.checkBucketName=function(de){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=ve?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!Ee.test(de))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkConfigValid=void 0;var de={endpoint:ve,region:/^[a-zA-Z0-9\-_]+$/};function ve(Ee){return typeof Ee=="string"?/^[a-zA-Z0-9._:/-]+$/.test(Ee):Ee.host?/^[a-zA-Z0-9._:/-]+$/.test(Ee.host):!1}_e.checkConfigValid=function(Ee,ke){if(de[ke]){var Se=!0;if(de[ke]instanceof Function?Se=de[ke](Ee):Se=de[ke].test(Ee),!Se)throw new Error("The ".concat(ke," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(oe,Ue,_e){(function(de){(function(){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkEnv=void 0;function ve(Ee){de.browser&&console.warn(Ee)}_e.checkEnv=ve}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkObjectTag=void 0;var de=oe("./checkValid"),ve=de.checkValid,Ee=oe("./isObject"),ke=Ee.isObject,Se=[{validator:function(fe){if(typeof fe!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],Ae={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function me(Pe){if(!ke(Pe))throw new Error("tag must be Object");var fe=Object.entries(Pe);if(fe.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];fe.forEach(function(te){te.forEach(function(se,ie){ve(se,Ae[z[ie]])})})}_e.checkObjectTag=me},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkValid=void 0;function de(ve,Ee){Ee.forEach(function(ke){if(ke.validator)ke.validator(ve);else if(ke.pattern&&!ke.pattern.test(ve))throw new Error(ke.msg)})}_e.checkValid=de},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.createRequest=void 0;var ve=oe("./../../../shims/crypto/crypto.js"),Ee=oe("debug")("ali-oss"),ke=oe("mime"),Se=oe("dateformat"),Ae=oe("copy-to"),me=oe("path"),Pe=oe("./encoder"),fe=Pe.encoder,z=oe("./isIP"),te=z.isIP,se=oe("./setRegion"),ie=se.setRegion,le=oe("../client/getReqUrl"),ce=le.getReqUrl,pe=oe("./isDingTalk"),xe=pe.isDingTalk;function je(Te,Me){return Te[Me]||Te[Me.toLowerCase()]}function De(Te,Me){delete Te[Me],delete Te[Me.toLowerCase()]}function Fe(Te){var Me=new Date;this.options.amendTimeSkewed&&(Me=+new Date+this.options.amendTimeSkewed);var Be={"x-oss-date":Se(Me,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Be["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Be["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Be,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Be["x-oss-security-token"]=this.options.stsToken),Ae(Te.headers).to(Be),je(Be,"Content-Type")||(Te.mime&&Te.mime.indexOf("/")>0?Be["Content-Type"]=Te.mime:xe()?Be["Content-Type"]="application/octet-stream":Be["Content-Type"]=ke.getType(Te.mime||me.extname(Te.object||""))),je(Be,"Content-Type")||De(Be,"Content-Type"),Te.content&&(Te.disabledMD5||(!Te.headers||!Te.headers["Content-MD5"]?Be["Content-MD5"]=ve.createHash("md5").update(de.from(Te.content,"utf8")).digest("base64"):Be["Content-MD5"]=Te.headers["Content-MD5"]),Be["Content-Length"]||(Be["Content-Length"]=Te.content.length));var Ge=Object.prototype.hasOwnProperty;for(var Ye in Be)Be[Ye]&&Ge.call(Be,Ye)&&(Be[Ye]=fe(String(Be[Ye]),this.options.headerEncoding));var Ke=this._getResource(Te);if(Be.authorization=this.authorization(Te.method,Ke,Te.subres,Be,this.options.headerEncoding),te(this.options.endpoint.hostname)){var Ve=this.options,ot=Ve.region,ut=Ve.internal,ft=Ve.secure,St=ie(ot,ut,ft);Be.host="".concat(Te.bucket,".").concat(St.host)}var Qe=ce.bind(this)(Te);Ee("request %s %s, with headers %j, !!stream: %s",Te.method,Qe,Be,!!Te.stream);var rt=Te.timeout||this.options.timeout,wt={method:Te.method,content:Te.content,stream:Te.stream,headers:Be,timeout:rt,writeStream:Te.writeStream,customResponse:Te.customResponse,ctx:Te.ctx||this.ctx};return this.agent&&(wt.agent=this.agent),this.httpsAgent&&(wt.httpsAgent=this.httpsAgent),wt.enableProxy=!!this.options.enableProxy,wt.proxy=this.options.proxy?this.options.proxy:null,{url:Qe,params:wt}}_e.createRequest=Fe}).call(this)}).call(this,oe("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.dataFix=void 0;var de=oe("./isObject"),ve=["true","TRUE","1",1],Ee=["false","FALSE","0",0];function ke(me,Pe,fe){if(de.isObject(me)){var z=Pe.remove,te=z===void 0?[]:z,se=Pe.rename,ie=se===void 0?{}:se,le=Pe.camel,ce=le===void 0?[]:le,pe=Pe.bool,xe=pe===void 0?[]:pe,je=Pe.lowerFirst,De=je===void 0?!1:je;return te.forEach(function(Fe){return delete me[Fe]}),Object.entries(ie).forEach(function(Fe){me[Fe[0]]&&(me[Fe[1]]||(me[Fe[1]]=me[Fe[0]],delete me[Fe[0]]))}),ce.forEach(function(Fe){if(me[Fe]){var Te=Fe.replace(/^(.)/,function(Me){return Me.toLowerCase()}).replace(/-(\w)/g,function(Me,Be){return Be.toUpperCase()});me[Te]||(me[Te]=me[Fe])}}),xe.forEach(function(Fe){me[Fe]=Se(me[Fe])}),typeof fe=="function"&&fe(me),Ae(me,De),ke}}_e.dataFix=ke;function Se(me){return me?ve.includes(me)?!0:Ee.includes(me)?!1:me:!1}function Ae(me,Pe){Pe&&Object.keys(me).forEach(function(fe){var z=fe.replace(/^\w/,function(te){return te.toLowerCase()});typeof me[z]=="undefined"&&(me[z]=me[fe],delete me[fe])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var ve=de(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.deepCopyWith=_e.deepCopy=void 0;var Ee=oe("./isBuffer");_e.deepCopy=function(ke){if(ke===null||(0,ve.default)(ke)!=="object")return ke;if(Ee.isBuffer(ke))return ke.slice();var Se=Array.isArray(ke)?[]:{};return Object.keys(ke).forEach(function(Ae){Se[Ae]=_e.deepCopy(ke[Ae])}),Se},_e.deepCopyWith=function(ke,Se){function Ae(me,Pe,fe){var z=Se(me,Pe,fe);if(z!==void 0)return z;if(me===null||(0,ve.default)(me)!=="object")return me;if(Ee.isBuffer(me))return me.slice();var te=Array.isArray(me)?[]:{};return Object.keys(me).forEach(function(se){te[se]=Ae(me[se],se,me)}),te}return Se?Ae(ke,"",null):_e.deepCopy(ke)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.encoder=void 0;function ve(Ee){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return ke==="utf-8"?Ee:de.from(Ee).toString("latin1")}_e.encoder=ve}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.formatInventoryConfig=void 0;var de=oe("../utils/dataFix"),ve=oe("../utils/isObject"),Ee=oe("../utils/isArray"),ke=oe("../utils/formatObjKey");function Se(me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Pe&&ve.isObject(me)&&(me=[me]),Ee.isArray(me)?me=me.map(Ae):me=Ae(me),me}_e.formatInventoryConfig=Se;function Ae(me){return de.dataFix(me,{bool:["IsEnabled"]},function(Pe){var fe,z;Pe.prefix=Pe.Filter.Prefix,delete Pe.Filter,Pe.OSSBucketDestination=Pe.Destination.OSSBucketDestination,Pe.OSSBucketDestination.rolename=Pe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete Pe.OSSBucketDestination.RoleArn,Pe.OSSBucketDestination.bucket=Pe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete Pe.OSSBucketDestination.Bucket,delete Pe.Destination,Pe.frequency=Pe.Schedule.Frequency,delete Pe.Schedule.Frequency,!((fe=Pe==null?void 0:Pe.OptionalFields)===null||fe===void 0)&&fe.Field&&!Ee.isArray((z=Pe.OptionalFields)===null||z===void 0?void 0:z.Field)&&(Pe.OptionalFields.Field=[Pe.OptionalFields.Field])}),me=ke.formatObjKey(me,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),me}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var ve=de(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.formatObjKey=void 0;function Ee(Se,Ae,me){if(Se===null||(0,ve.default)(Se)!=="object")return Se;var Pe;if(Array.isArray(Se)){Pe=[];for(var fe=0;fe<Se.length;fe++)Pe.push(Ee(Se[fe],Ae,me))}else Pe={},Object.keys(Se).forEach(function(z){Pe[ke(z,Ae,me)]=Ee(Se[z],Ae,me)});return Pe}_e.formatObjKey=Ee;function ke(Se,Ae,me){return me&&me.exclude&&me.exclude.includes(Se)||(Ae==="firstUpperCase"?Se=Se.replace(/^./,function(Pe){return Pe.toUpperCase()}):Ae==="firstLowerCase"&&(Se=Se.replace(/^./,function(Pe){return Pe.toLowerCase()}))),Se}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.getStrBytesCount=void 0;function de(ve){for(var Ee=0,ke=0;ke<ve.length;ke++){var Se=ve.charAt(ke);/^[\u00-\uff]$/.test(Se)?Ee+=1:Ee+=2}return Ee}_e.getStrBytesCount=de},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.isArray=void 0,_e.isArray=function(de){return Object.prototype.toString.call(de)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,Ue,_e){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.isBlob=void 0;function de(ve){return typeof Blob!="undefined"&&ve instanceof Blob}_e.isBlob=de},{}],65:[function(oe,Ue,_e){(function(de){(function(){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.isBuffer=void 0;function ve(Ee){return de.isBuffer(Ee)}_e.isBuffer=ve}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.isDingTalk=void 0;function ve(){return!!(de.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}_e.isDingTalk=ve}).call(this)}).call(this,oe("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(oe,Ue,_e){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.isFile=void 0,_e.isFile=function(de){return typeof File!="undefined"&&de instanceof File}},{}],68:[function(oe,Ue,_e){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.isFunction=void 0,_e.isFunction=function(de){return typeof de=="function"}},{}],69:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.isIP=void 0,_e.isIP=function(de){var ve=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,Ee=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return ve.test(de)||Ee.test(de)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.isObject=void 0,_e.isObject=function(de){return Object.prototype.toString.call(de)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.lowercaseKeyHeader=void 0;var de=oe("./isObject");function ve(Ee){var ke={};return de.isObject(Ee)&&Object.keys(Ee).forEach(function(Se){ke[Se.toLowerCase()]=Ee[Se]}),ke}_e.lowercaseKeyHeader=ve},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.obj2xml=void 0;var de=oe("./formatObjKey");function ve(ke){return Object.prototype.toString.call(ke).replace(/(.*? |])/g,"").toLowerCase()}function Ee(ke,Se){var Ae="";return Se&&Se.headers&&(Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),Se&&Se.firstUpperCase&&(ke=de.formatObjKey(ke,"firstUpperCase")),ve(ke)==="object"?Object.keys(ke).forEach(function(me){ve(ke[me])!=="undefined"&&ve(ke[me])!=="null"&&(ve(ke[me])==="string"||ve(ke[me])==="number"?Ae+="<".concat(me,">").concat(ke[me],"</").concat(me,">"):ve(ke[me])==="object"?Ae+="<".concat(me,">").concat(Ee(ke[me]),"</").concat(me,">"):ve(ke[me])==="array"?Ae+=ke[me].map(function(Pe){return"<".concat(me,">").concat(Ee(Pe),"</").concat(me,">")}).join(""):Ae+="<".concat(me,">").concat(ke[me].toString(),"</").concat(me,">"))}):Ae+=ke.toString(),Ae}_e.obj2xml=Ee},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.symbol.iterator.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/es.object.assign.js");function de(Se,Ae){var me=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!me){if(Array.isArray(Se)||(me=ve(Se))||Ae&&Se&&typeof Se.length=="number"){me&&(Se=me);var Pe=0,fe=function(){};return{s:fe,n:function(){return Pe>=Se.length?{done:!0}:{done:!1,value:Se[Pe++]}},e:function(le){throw le},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,te=!1,se;return{s:function(){me=me.call(Se)},n:function(){var le=me.next();return z=le.done,le},e:function(le){te=!0,se=le},f:function(){try{!z&&me.return!=null&&me.return()}finally{if(te)throw se}}}}function ve(Se,Ae){if(Se){if(typeof Se=="string")return Ee(Se,Ae);var me=Object.prototype.toString.call(Se).slice(8,-1);if(me==="Object"&&Se.constructor&&(me=Se.constructor.name),me==="Map"||me==="Set")return Array.from(Se);if(me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(me))return Ee(Se,Ae)}}function Ee(Se,Ae){(Ae==null||Ae>Se.length)&&(Ae=Se.length);for(var me=0,Pe=new Array(Ae);me<Ae;me++)Pe[me]=Se[me];return Pe}Object.defineProperty(_e,"__esModule",{value:!0}),_e.omit=void 0;function ke(Se,Ae){var me=Object.assign({},Se),Pe=de(Ae),fe;try{for(Pe.s();!(fe=Pe.n()).done;){var z=fe.value;delete me[z]}}catch(te){Pe.e(te)}finally{Pe.f()}return me}_e.omit=ke},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(_e,"__esModule",{value:!0}),_e.retry=void 0;function de(ve,Ee){var ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,Ae=ke.retryDelay,me=Ae===void 0?500:Ae,Pe=ke.errorHandler,fe=Pe===void 0?function(){return!0}:Pe,z=function te(){for(var se=arguments.length,ie=new Array(se),le=0;le<se;le++)ie[le]=arguments[le];return new Promise(function(ce,pe){ve.apply(void 0,ie).then(function(xe){Se=0,ce(xe)}).catch(function(xe){Se<Ee&&fe(xe)?(Se++,setTimeout(function(){ce(te.apply(void 0,ie))},me)):(Se=0,pe(xe))})})};return z}_e.retry=de},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,Ue,_e){"use strict";var de=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.setRegion=void 0;var ve=de(oe("url")),Ee=oe("./checkConfigValid");function ke(Se){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ee.checkConfigValid(Se,"region");var Pe=me?"https://":"http://",fe=Ae?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(fe=".aliyuncs.com"),ve.default.parse(Pe+Se+fe)}_e.setRegion=ke},{"./checkConfigValid":52,url:472}],76:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.object.assign.js");var Ee=de(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(_e,"__esModule",{value:!0}),_e.checkCredentials=_e.setSTSToken=void 0;var ke=oe("./formatObjKey");function Se(){return Ae.apply(this,arguments)}function Ae(){return Ae=(0,Ee.default)(ve.default.mark(function Pe(){var fe,z;return ve.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(this.options||(this.options={}),fe=new Date,!this.stsTokenFreshTime){se.next=14;break}if(!(+fe-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){se.next=12;break}return this.stsTokenFreshTime=fe,se.next=7,this.options.refreshSTSToken();case 7:z=se.sent,z=ke.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),me(z),Object.assign(this.options,z);case 12:se.next=15;break;case 14:this.stsTokenFreshTime=fe;case 15:return se.abrupt("return",null);case 16:case"end":return se.stop()}},Pe,this)})),Ae.apply(this,arguments)}_e.setSTSToken=Se;function me(Pe){var fe=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(Pe);fe.forEach(function(te){if(!z.find(function(se){return se===te}))throw Error("refreshSTSToken must return contains ".concat(te))})}_e.checkCredentials=me},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(oe,Ue,_e){function de(Ee,ke,Se,Ae,me,Pe,fe){try{var z=Ee[Pe](fe),te=z.value}catch(se){Se(se);return}z.done?ke(te):Promise.resolve(te).then(Ae,me)}function ve(Ee){return function(){var ke=this,Se=arguments;return new Promise(function(Ae,me){var Pe=Ee.apply(ke,Se);function fe(te){de(Pe,Ae,me,fe,z,"next",te)}function z(te){de(Pe,Ae,me,fe,z,"throw",te)}fe(void 0)})}}Ue.exports=ve,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],78:[function(oe,Ue,_e){function de(ve){return ve&&ve.__esModule?ve:{default:ve}}Ue.exports=de,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],79:[function(oe,Ue,_e){function de(ve){"@babel/helpers - typeof";return Ue.exports=de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ee){return typeof Ee}:function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports,de(ve)}Ue.exports=de,Ue.exports.__esModule=!0,Ue.exports.default=Ue.exports},{}],80:[function(oe,Ue,_e){Ue.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,Ue,_e){Ue.exports=de,Ue.exports.HttpsAgent=de;function de(){}},{}],82:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("object-assign");function Ee(ot,ut){if(ot===ut)return 0;for(var ft=ot.length,St=ut.length,Qe=0,rt=Math.min(ft,St);Qe<rt;++Qe)if(ot[Qe]!==ut[Qe]){ft=ot[Qe],St=ut[Qe];break}return ft<St?-1:St<ft?1:0}function ke(ot){return de.Buffer&&typeof de.Buffer.isBuffer=="function"?de.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Ae=Object.prototype.hasOwnProperty,me=Array.prototype.slice,Pe=function(){return function(){}.name==="foo"}();function fe(ot){return Object.prototype.toString.call(ot)}function z(ot){return ke(ot)||typeof de.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ot):ot?!!(ot instanceof DataView||ot.buffer&&ot.buffer instanceof ArrayBuffer):!1}var te=Ue.exports=je,se=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(Pe)return ot.name;var ut=ot.toString(),ft=ut.match(se);return ft&&ft[1]}}te.AssertionError=function(ut){this.name="AssertionError",this.actual=ut.actual,this.expected=ut.expected,this.operator=ut.operator,ut.message?(this.message=ut.message,this.generatedMessage=!1):(this.message=pe(this),this.generatedMessage=!0);var ft=ut.stackStartFunction||xe;if(Error.captureStackTrace)Error.captureStackTrace(this,ft);else{var St=new Error;if(St.stack){var Qe=St.stack,rt=ie(ft),wt=Qe.indexOf(`
|
|
`+rt);if(wt>=0){var Ct=Qe.indexOf(`
|
|
`,wt+1);Qe=Qe.substring(Ct+1)}this.stack=Qe}}},Se.inherits(te.AssertionError,Error);function le(ot,ut){return typeof ot=="string"?ot.length<ut?ot:ot.slice(0,ut):ot}function ce(ot){if(Pe||!Se.isFunction(ot))return Se.inspect(ot);var ut=ie(ot),ft=ut?": "+ut:"";return"[Function"+ft+"]"}function pe(ot){return le(ce(ot.actual),128)+" "+ot.operator+" "+le(ce(ot.expected),128)}function xe(ot,ut,ft,St,Qe){throw new te.AssertionError({message:ft,actual:ot,expected:ut,operator:St,stackStartFunction:Qe})}te.fail=xe;function je(ot,ut){ot||xe(ot,!0,ut,"==",te.ok)}te.ok=je,te.equal=function(ut,ft,St){ut!=ft&&xe(ut,ft,St,"==",te.equal)},te.notEqual=function(ut,ft,St){ut==ft&&xe(ut,ft,St,"!=",te.notEqual)},te.deepEqual=function(ut,ft,St){De(ut,ft,!1)||xe(ut,ft,St,"deepEqual",te.deepEqual)},te.deepStrictEqual=function(ut,ft,St){De(ut,ft,!0)||xe(ut,ft,St,"deepStrictEqual",te.deepStrictEqual)};function De(ot,ut,ft,St){if(ot===ut)return!0;if(ke(ot)&&ke(ut))return Ee(ot,ut)===0;if(Se.isDate(ot)&&Se.isDate(ut))return ot.getTime()===ut.getTime();if(Se.isRegExp(ot)&&Se.isRegExp(ut))return ot.source===ut.source&&ot.global===ut.global&&ot.multiline===ut.multiline&&ot.lastIndex===ut.lastIndex&&ot.ignoreCase===ut.ignoreCase;if((ot===null||typeof ot!="object")&&(ut===null||typeof ut!="object"))return ft?ot===ut:ot==ut;if(z(ot)&&z(ut)&&fe(ot)===fe(ut)&&!(ot instanceof Float32Array||ot instanceof Float64Array))return Ee(new Uint8Array(ot.buffer),new Uint8Array(ut.buffer))===0;if(ke(ot)!==ke(ut))return!1;St=St||{actual:[],expected:[]};var Qe=St.actual.indexOf(ot);return Qe!==-1&&Qe===St.expected.indexOf(ut)?!0:(St.actual.push(ot),St.expected.push(ut),Te(ot,ut,ft,St))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Te(ot,ut,ft,St){if(ot==null||ut===null||ut===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(ut))return ot===ut;if(ft&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(ut))return!1;var Qe=Fe(ot),rt=Fe(ut);if(Qe&&!rt||!Qe&&rt)return!1;if(Qe)return ot=me.call(ot),ut=me.call(ut),De(ot,ut,ft);var wt=Ve(ot),Ct=Ve(ut),bt,ct;if(wt.length!==Ct.length)return!1;for(wt.sort(),Ct.sort(),ct=wt.length-1;ct>=0;ct--)if(wt[ct]!==Ct[ct])return!1;for(ct=wt.length-1;ct>=0;ct--)if(bt=wt[ct],!De(ot[bt],ut[bt],ft,St))return!1;return!0}te.notDeepEqual=function(ut,ft,St){De(ut,ft,!1)&&xe(ut,ft,St,"notDeepEqual",te.notDeepEqual)},te.notDeepStrictEqual=Me;function Me(ot,ut,ft){De(ot,ut,!0)&&xe(ot,ut,ft,"notDeepStrictEqual",Me)}te.strictEqual=function(ut,ft,St){ut!==ft&&xe(ut,ft,St,"===",te.strictEqual)},te.notStrictEqual=function(ut,ft,St){ut===ft&&xe(ut,ft,St,"!==",te.notStrictEqual)};function Be(ot,ut){if(!ot||!ut)return!1;if(Object.prototype.toString.call(ut)=="[object RegExp]")return ut.test(ot);try{if(ot instanceof ut)return!0}catch(ft){}return Error.isPrototypeOf(ut)?!1:ut.call({},ot)===!0}function Ge(ot){var ut;try{ot()}catch(ft){ut=ft}return ut}function Ye(ot,ut,ft,St){var Qe;if(typeof ut!="function")throw new TypeError('"block" argument must be a function');typeof ft=="string"&&(St=ft,ft=null),Qe=Ge(ut),St=(ft&&ft.name?" ("+ft.name+").":".")+(St?" "+St:"."),ot&&!Qe&&xe(Qe,ft,"Missing expected exception"+St);var rt=typeof St=="string",wt=!ot&&Se.isError(Qe),Ct=!ot&&Qe&&!ft;if((wt&&rt&&Be(Qe,ft)||Ct)&&xe(Qe,ft,"Got unwanted exception"+St),ot&&Qe&&ft&&!Be(Qe,ft)||!ot&&Qe)throw Qe}te.throws=function(ot,ut,ft){Ye(!0,ot,ut,ft)},te.doesNotThrow=function(ot,ut,ft){Ye(!1,ot,ut,ft)},te.ifError=function(ot){if(ot)throw ot};function Ke(ot,ut){ot||xe(ot,!0,ut,"==",Ke)}te.strict=ve(Ke,te,{equal:te.strictEqual,deepEqual:te.deepStrictEqual,notEqual:te.notStrictEqual,notDeepEqual:te.notDeepStrictEqual}),te.strict.strict=te.strict;var Ve=Object.keys||function(ot){var ut=[];for(var ft in ot)Ae.call(ot,ft)&&ut.push(ft);return ut}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(oe,Ue,_e){typeof Object.create=="function"?Ue.exports=function(ve,Ee){ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}})}:Ue.exports=function(ve,Ee){ve.super_=Ee;var ke=function(){};ke.prototype=Ee.prototype,ve.prototype=new ke,ve.prototype.constructor=ve}},{}],84:[function(oe,Ue,_e){Ue.exports=function(ve){return ve&&typeof ve=="object"&&typeof ve.copy=="function"&&typeof ve.fill=="function"&&typeof ve.readUInt8=="function"}},{}],85:[function(oe,Ue,_e){(function(de,ve){(function(){var Ee=/%[sdj%]/g;_e.format=function(Ct){if(!Te(Ct)){for(var bt=[],ct=0;ct<arguments.length;ct++)bt.push(Ae(arguments[ct]));return bt.join(" ")}for(var ct=1,xt=arguments,dt=xt.length,Mt=String(Ct).replace(Ee,function(Ft){if(Ft==="%%")return"%";if(ct>=dt)return Ft;switch(Ft){case"%s":return String(xt[ct++]);case"%d":return Number(xt[ct++]);case"%j":try{return JSON.stringify(xt[ct++])}catch(mt){return"[Circular]"}default:return Ft}}),yt=xt[ct];ct<dt;yt=xt[++ct])je(yt)||!Ye(yt)?Mt+=" "+yt:Mt+=" "+Ae(yt);return Mt},_e.deprecate=function(Ct,bt){if(Be(ve.process))return function(){return _e.deprecate(Ct,bt).apply(this,arguments)};if(de.noDeprecation===!0)return Ct;var ct=!1;function xt(){if(!ct){if(de.throwDeprecation)throw new Error(bt);de.traceDeprecation?console.trace(bt):console.error(bt),ct=!0}return Ct.apply(this,arguments)}return xt};var ke={},Se;_e.debuglog=function(Ct){if(Be(Se)&&(Se=de.env.NODE_DEBUG||""),Ct=Ct.toUpperCase(),!ke[Ct])if(new RegExp("\\b"+Ct+"\\b","i").test(Se)){var bt=de.pid;ke[Ct]=function(){var ct=_e.format.apply(_e,arguments);console.error("%s %d: %s",Ct,bt,ct)}}else ke[Ct]=function(){};return ke[Ct]};function Ae(Ct,bt){var ct={seen:[],stylize:Pe};return arguments.length>=3&&(ct.depth=arguments[2]),arguments.length>=4&&(ct.colors=arguments[3]),xe(bt)?ct.showHidden=bt:bt&&_e._extend(ct,bt),Be(ct.showHidden)&&(ct.showHidden=!1),Be(ct.depth)&&(ct.depth=2),Be(ct.colors)&&(ct.colors=!1),Be(ct.customInspect)&&(ct.customInspect=!0),ct.colors&&(ct.stylize=me),z(ct,Ct,ct.depth)}_e.inspect=Ae,Ae.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ae.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function me(Ct,bt){var ct=Ae.styles[bt];return ct?"\x1B["+Ae.colors[ct][0]+"m"+Ct+"\x1B["+Ae.colors[ct][1]+"m":Ct}function Pe(Ct,bt){return Ct}function fe(Ct){var bt={};return Ct.forEach(function(ct,xt){bt[ct]=!0}),bt}function z(Ct,bt,ct){if(Ct.customInspect&&bt&&ot(bt.inspect)&&bt.inspect!==_e.inspect&&!(bt.constructor&&bt.constructor.prototype===bt)){var xt=bt.inspect(ct,Ct);return Te(xt)||(xt=z(Ct,xt,ct)),xt}var dt=te(Ct,bt);if(dt)return dt;var Mt=Object.keys(bt),yt=fe(Mt);if(Ct.showHidden&&(Mt=Object.getOwnPropertyNames(bt)),Ve(bt)&&(Mt.indexOf("message")>=0||Mt.indexOf("description")>=0))return se(bt);if(Mt.length===0){if(ot(bt)){var Ft=bt.name?": "+bt.name:"";return Ct.stylize("[Function"+Ft+"]","special")}if(Ge(bt))return Ct.stylize(RegExp.prototype.toString.call(bt),"regexp");if(Ke(bt))return Ct.stylize(Date.prototype.toString.call(bt),"date");if(Ve(bt))return se(bt)}var mt="",vt=!1,tt=["{","}"];if(pe(bt)&&(vt=!0,tt=["[","]"]),ot(bt)){var He=bt.name?": "+bt.name:"";mt=" [Function"+He+"]"}if(Ge(bt)&&(mt=" "+RegExp.prototype.toString.call(bt)),Ke(bt)&&(mt=" "+Date.prototype.toUTCString.call(bt)),Ve(bt)&&(mt=" "+se(bt)),Mt.length===0&&(!vt||bt.length==0))return tt[0]+mt+tt[1];if(ct<0)return Ge(bt)?Ct.stylize(RegExp.prototype.toString.call(bt),"regexp"):Ct.stylize("[Object]","special");Ct.seen.push(bt);var we;return vt?we=ie(Ct,bt,ct,yt,Mt):we=Mt.map(function(Ne){return le(Ct,bt,ct,yt,Ne,vt)}),Ct.seen.pop(),ce(we,mt,tt)}function te(Ct,bt){if(Be(bt))return Ct.stylize("undefined","undefined");if(Te(bt)){var ct="'"+JSON.stringify(bt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Ct.stylize(ct,"string")}if(Fe(bt))return Ct.stylize(""+bt,"number");if(xe(bt))return Ct.stylize(""+bt,"boolean");if(je(bt))return Ct.stylize("null","null")}function se(Ct){return"["+Error.prototype.toString.call(Ct)+"]"}function ie(Ct,bt,ct,xt,dt){for(var Mt=[],yt=0,Ft=bt.length;yt<Ft;++yt)wt(bt,String(yt))?Mt.push(le(Ct,bt,ct,xt,String(yt),!0)):Mt.push("");return dt.forEach(function(mt){mt.match(/^\d+$/)||Mt.push(le(Ct,bt,ct,xt,mt,!0))}),Mt}function le(Ct,bt,ct,xt,dt,Mt){var yt,Ft,mt;if(mt=Object.getOwnPropertyDescriptor(bt,dt)||{value:bt[dt]},mt.get?mt.set?Ft=Ct.stylize("[Getter/Setter]","special"):Ft=Ct.stylize("[Getter]","special"):mt.set&&(Ft=Ct.stylize("[Setter]","special")),wt(xt,dt)||(yt="["+dt+"]"),Ft||(Ct.seen.indexOf(mt.value)<0?(je(ct)?Ft=z(Ct,mt.value,null):Ft=z(Ct,mt.value,ct-1),Ft.indexOf(`
|
|
`)>-1&&(Mt?Ft=Ft.split(`
|
|
`).map(function(vt){return" "+vt}).join(`
|
|
`).substr(2):Ft=`
|
|
`+Ft.split(`
|
|
`).map(function(vt){return" "+vt}).join(`
|
|
`))):Ft=Ct.stylize("[Circular]","special")),Be(yt)){if(Mt&&dt.match(/^\d+$/))return Ft;yt=JSON.stringify(""+dt),yt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(yt=yt.substr(1,yt.length-2),yt=Ct.stylize(yt,"name")):(yt=yt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),yt=Ct.stylize(yt,"string"))}return yt+": "+Ft}function ce(Ct,bt,ct){var xt=0,dt=Ct.reduce(function(Mt,yt){return xt++,yt.indexOf(`
|
|
`)>=0&&xt++,Mt+yt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return dt>60?ct[0]+(bt===""?"":bt+`
|
|
`)+" "+Ct.join(`,
|
|
`)+" "+ct[1]:ct[0]+bt+" "+Ct.join(", ")+" "+ct[1]}function pe(Ct){return Array.isArray(Ct)}_e.isArray=pe;function xe(Ct){return typeof Ct=="boolean"}_e.isBoolean=xe;function je(Ct){return Ct===null}_e.isNull=je;function De(Ct){return Ct==null}_e.isNullOrUndefined=De;function Fe(Ct){return typeof Ct=="number"}_e.isNumber=Fe;function Te(Ct){return typeof Ct=="string"}_e.isString=Te;function Me(Ct){return typeof Ct=="symbol"}_e.isSymbol=Me;function Be(Ct){return Ct===void 0}_e.isUndefined=Be;function Ge(Ct){return Ye(Ct)&&ft(Ct)==="[object RegExp]"}_e.isRegExp=Ge;function Ye(Ct){return typeof Ct=="object"&&Ct!==null}_e.isObject=Ye;function Ke(Ct){return Ye(Ct)&&ft(Ct)==="[object Date]"}_e.isDate=Ke;function Ve(Ct){return Ye(Ct)&&(ft(Ct)==="[object Error]"||Ct instanceof Error)}_e.isError=Ve;function ot(Ct){return typeof Ct=="function"}_e.isFunction=ot;function ut(Ct){return Ct===null||typeof Ct=="boolean"||typeof Ct=="number"||typeof Ct=="string"||typeof Ct=="symbol"||typeof Ct=="undefined"}_e.isPrimitive=ut,_e.isBuffer=oe("./support/isBuffer");function ft(Ct){return Object.prototype.toString.call(Ct)}function St(Ct){return Ct<10?"0"+Ct.toString(10):Ct.toString(10)}var Qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rt(){var Ct=new Date,bt=[St(Ct.getHours()),St(Ct.getMinutes()),St(Ct.getSeconds())].join(":");return[Ct.getDate(),Qe[Ct.getMonth()],bt].join(" ")}_e.log=function(){console.log("%s - %s",rt(),_e.format.apply(_e,arguments))},_e.inherits=oe("inherits"),_e._extend=function(Ct,bt){if(!bt||!Ye(bt))return Ct;for(var ct=Object.keys(bt),xt=ct.length;xt--;)Ct[ct[xt]]=bt[ct[xt]];return Ct};function wt(Ct,bt){return Object.prototype.hasOwnProperty.call(Ct,bt)}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Ee=typeof globalThis=="undefined"?de:globalThis;Ue.exports=function(){for(var Se=[],Ae=0;Ae<ve.length;Ae++)typeof Ee[ve[Ae]]=="function"&&(Se[Se.length]=ve[Ae]);return Se}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,Ue,_e){"use strict";_e.byteLength=Pe,_e.toByteArray=z,_e.fromByteArray=ie;for(var de=[],ve=[],Ee=typeof Uint8Array!="undefined"?Uint8Array:Array,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Ae=ke.length;Se<Ae;++Se)de[Se]=ke[Se],ve[ke.charCodeAt(Se)]=Se;ve[45]=62,ve[95]=63;function me(le){var ce=le.length;if(ce%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var pe=le.indexOf("=");pe===-1&&(pe=ce);var xe=pe===ce?0:4-pe%4;return[pe,xe]}function Pe(le){var ce=me(le),pe=ce[0],xe=ce[1];return(pe+xe)*3/4-xe}function fe(le,ce,pe){return(ce+pe)*3/4-pe}function z(le){var ce,pe=me(le),xe=pe[0],je=pe[1],De=new Ee(fe(le,xe,je)),Fe=0,Te=je>0?xe-4:xe,Me;for(Me=0;Me<Te;Me+=4)ce=ve[le.charCodeAt(Me)]<<18|ve[le.charCodeAt(Me+1)]<<12|ve[le.charCodeAt(Me+2)]<<6|ve[le.charCodeAt(Me+3)],De[Fe++]=ce>>16&255,De[Fe++]=ce>>8&255,De[Fe++]=ce&255;return je===2&&(ce=ve[le.charCodeAt(Me)]<<2|ve[le.charCodeAt(Me+1)]>>4,De[Fe++]=ce&255),je===1&&(ce=ve[le.charCodeAt(Me)]<<10|ve[le.charCodeAt(Me+1)]<<4|ve[le.charCodeAt(Me+2)]>>2,De[Fe++]=ce>>8&255,De[Fe++]=ce&255),De}function te(le){return de[le>>18&63]+de[le>>12&63]+de[le>>6&63]+de[le&63]}function se(le,ce,pe){for(var xe,je=[],De=ce;De<pe;De+=3)xe=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),je.push(te(xe));return je.join("")}function ie(le){for(var ce,pe=le.length,xe=pe%3,je=[],De=16383,Fe=0,Te=pe-xe;Fe<Te;Fe+=De)je.push(se(le,Fe,Fe+De>Te?Te:Fe+De));return xe===1?(ce=le[pe-1],je.push(de[ce>>2]+de[ce<<4&63]+"==")):xe===2&&(ce=(le[pe-2]<<8)+le[pe-1],je.push(de[ce>>10]+de[ce>>4&63]+de[ce<<2&63]+"=")),je.join("")}},{}],88:[function(oe,Ue,_e){(function(de,ve,Ee){typeof Ue!="undefined"&&Ue.exports?Ue.exports=Ee():typeof pt=="function"&&pt.amd?pt(ve,Ee):de[ve]=Ee()})(this,"bowser",function(){var de=!0;function ve(fe){function z(bt){var ct=fe.match(bt);return ct&&ct.length>1&&ct[1]||""}function te(bt){var ct=fe.match(bt);return ct&&ct.length>1&&ct[2]||""}var se=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(fe),le=!ie&&/android/i.test(fe),ce=/nexus\s*[0-6]\s*/i.test(fe),pe=!ce&&/nexus\s*[0-9]+/i.test(fe),xe=/CrOS/.test(fe),je=/silk/i.test(fe),De=/sailfish/i.test(fe),Fe=/tizen/i.test(fe),Te=/(web|hpw)(o|0)s/i.test(fe),Me=/windows phone/i.test(fe),Be=/SamsungBrowser/i.test(fe),Ge=!Me&&/windows/i.test(fe),Ye=!se&&!je&&/macintosh/i.test(fe),Ke=!le&&!De&&!Fe&&!Te&&/linux/i.test(fe),Ve=te(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),ut=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),ft=!ut&&/[^-]mobi/i.test(fe),St=/xbox/i.test(fe),Qe;/opera/i.test(fe)?Qe={name:"Opera",opera:de,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?Qe={name:"Opera",opera:de,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(fe)?Qe={name:"Samsung Internet for Android",samsungBrowser:de,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(fe)?Qe={name:"NAVER Whale browser",whale:de,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(fe)?Qe={name:"MZ Browser",mzbrowser:de,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(fe)?Qe={name:"Opera Coast",coast:de,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(fe)?Qe={name:"Focus",focus:de,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(fe)?Qe={name:"Yandex Browser",yandexbrowser:de,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?Qe={name:"UC Browser",ucbrowser:de,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?Qe={name:"Maxthon",maxthon:de,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?Qe={name:"Epiphany",epiphany:de,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?Qe={name:"Puffin",puffin:de,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?Qe={name:"Sleipnir",sleipnir:de,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?Qe={name:"K-Meleon",kMeleon:de,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Me?(Qe={name:"Windows Phone",osname:"Windows Phone",windowsphone:de},Ve?(Qe.msedge=de,Qe.version=Ve):(Qe.msie=de,Qe.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?Qe={name:"Internet Explorer",msie:de,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:xe?Qe={name:"Chrome",osname:"Chrome OS",chromeos:de,chromeBook:de,chrome:de,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?Qe={name:"Microsoft Edge",msedge:de,version:Ve}:/vivaldi/i.test(fe)?Qe={name:"Vivaldi",vivaldi:de,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:De?Qe={name:"Sailfish",osname:"Sailfish OS",sailfish:de,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?Qe={name:"SeaMonkey",seamonkey:de,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(Qe={name:"Firefox",firefox:de,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(Qe.firefoxos=de,Qe.osname="Firefox OS")):je?Qe={name:"Amazon Silk",silk:de,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?Qe={name:"PhantomJS",phantom:de,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?Qe={name:"SlimerJS",slimer:de,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?Qe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:de,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Te?(Qe={name:"WebOS",osname:"WebOS",webos:de,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(Qe.touchpad=de)):/bada/i.test(fe)?Qe={name:"Bada",osname:"Bada",bada:de,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?Qe={name:"Tizen",osname:"Tizen",tizen:de,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(fe)?Qe={name:"QupZilla",qupzilla:de,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(fe)?Qe={name:"Chromium",chromium:de,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(fe)?Qe={name:"Chrome",chrome:de,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?Qe={name:"Android",version:ot}:/safari|applewebkit/i.test(fe)?(Qe={name:"Safari",safari:de},ot&&(Qe.version=ot)):se?(Qe={name:se=="iphone"?"iPhone":se=="ipad"?"iPad":"iPod"},ot&&(Qe.version=ot)):/googlebot/i.test(fe)?Qe={name:"Googlebot",googlebot:de,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:Qe={name:z(/^(.*)\/(.*) /),version:te(/^(.*)\/(.*) /)},!Qe.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(Qe.name=Qe.name||"Blink",Qe.blink=de):(Qe.name=Qe.name||"Webkit",Qe.webkit=de),!Qe.version&&ot&&(Qe.version=ot)):!Qe.opera&&/gecko\//i.test(fe)&&(Qe.name=Qe.name||"Gecko",Qe.gecko=de,Qe.version=Qe.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Qe.windowsphone&&(le||Qe.silk)?(Qe.android=de,Qe.osname="Android"):!Qe.windowsphone&&se?(Qe[se]=de,Qe.ios=de,Qe.osname="iOS"):Ye?(Qe.mac=de,Qe.osname="macOS"):St?(Qe.xbox=de,Qe.osname="Xbox"):Ge?(Qe.windows=de,Qe.osname="Windows"):Ke&&(Qe.linux=de,Qe.osname="Linux");function rt(bt){switch(bt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var wt="";Qe.windows?wt=rt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Qe.windowsphone?wt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Qe.mac?(wt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),wt=wt.replace(/[_\s]/g,".")):se?(wt=z(/os (\d+([_\s]\d+)*) like mac os x/i),wt=wt.replace(/[_\s]/g,".")):le?wt=z(/android[ \/-](\d+(\.\d+)*)/i):Qe.webos?wt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Qe.blackberry?wt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Qe.bada?wt=z(/bada\/(\d+(\.\d+)*)/i):Qe.tizen&&(wt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),wt&&(Qe.osversion=wt);var Ct=!Qe.windows&&wt.split(".")[0];return ut||pe||se=="ipad"||le&&(Ct==3||Ct>=4&&!ft)||Qe.silk?Qe.tablet=de:(ft||se=="iphone"||se=="ipod"||le||ce||Qe.blackberry||Qe.webos||Qe.bada)&&(Qe.mobile=de),Qe.msedge||Qe.msie&&Qe.version>=10||Qe.yandexbrowser&&Qe.version>=15||Qe.vivaldi&&Qe.version>=1||Qe.chrome&&Qe.version>=20||Qe.samsungBrowser&&Qe.version>=4||Qe.whale&&Ae([Qe.version,"1.0"])===1||Qe.mzbrowser&&Ae([Qe.version,"6.0"])===1||Qe.focus&&Ae([Qe.version,"1.0"])===1||Qe.firefox&&Qe.version>=20||Qe.safari&&Qe.version>=6||Qe.opera&&Qe.version>=10||Qe.ios&&Qe.osversion&&Qe.osversion.split(".")[0]>=6||Qe.blackberry&&Qe.version>=10.1||Qe.chromium&&Qe.version>=20?Qe.a=de:Qe.msie&&Qe.version<10||Qe.chrome&&Qe.version<20||Qe.firefox&&Qe.version<20||Qe.safari&&Qe.version<6||Qe.opera&&Qe.version<10||Qe.ios&&Qe.osversion&&Qe.osversion.split(".")[0]<6||Qe.chromium&&Qe.version<20?Qe.c=de:Qe.x=de,Qe}var Ee=ve(typeof navigator!="undefined"&&navigator.userAgent||"");Ee.test=function(fe){for(var z=0;z<fe.length;++z){var te=fe[z];if(typeof te=="string"&&te in Ee)return!0}return!1};function ke(fe){return fe.split(".").length}function Se(fe,z){var te=[],se;if(Array.prototype.map)return Array.prototype.map.call(fe,z);for(se=0;se<fe.length;se++)te.push(z(fe[se]));return te}function Ae(fe){for(var z=Math.max(ke(fe[0]),ke(fe[1])),te=Se(fe,function(se){var ie=z-ke(se);return se=se+new Array(ie+1).join(".0"),Se(se.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(te[0][z]>te[1][z])return 1;if(te[0][z]===te[1][z]){if(z===0)return 0}else return-1}}function me(fe,z,te){var se=Ee;typeof z=="string"&&(te=z,z=void 0),z===void 0&&(z=!1),te&&(se=ve(te));var ie=""+se.version;for(var le in fe)if(fe.hasOwnProperty(le)&&se[le]){if(typeof fe[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(fe));return Ae([ie,fe[le]])<0}return z}function Pe(fe,z,te){return!me(fe,z,te)}return Ee.isUnsupportedBrowser=me,Ee.compareVersions=Ae,Ee.check=Pe,Ee._detect=ve,Ee.detect=ve,Ee})},{}],89:[function(oe,Ue,_e){},{}],90:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("base64-js"),Ee=oe("ieee754");_e.Buffer=me,_e.SlowBuffer=xe,_e.INSPECT_MAX_BYTES=50;var ke=2147483647;_e.kMaxLength=ke,me.TYPED_ARRAY_SUPPORT=Se(),!me.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Se(){try{var Re=new Uint8Array(1);return Re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Re.foo()===42}catch(Ze){return!1}}Object.defineProperty(me.prototype,"parent",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.buffer}}),Object.defineProperty(me.prototype,"offset",{enumerable:!0,get:function(){if(me.isBuffer(this))return this.byteOffset}});function Ae(Re){if(Re>ke)throw new RangeError('The value "'+Re+'" is invalid for option "size"');var Ze=new Uint8Array(Re);return Ze.__proto__=me.prototype,Ze}function me(Re,Ze,et){if(typeof Re=="number"){if(typeof Ze=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return te(Re)}return Pe(Re,Ze,et)}typeof Symbol!="undefined"&&Symbol.species!=null&&me[Symbol.species]===me&&Object.defineProperty(me,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),me.poolSize=8192;function Pe(Re,Ze,et){if(typeof Re=="string")return se(Re,Ze);if(ArrayBuffer.isView(Re))return ie(Re);if(Re==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re);if(nt(Re,ArrayBuffer)||Re&&nt(Re.buffer,ArrayBuffer))return le(Re,Ze,et);if(typeof Re=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ht=Re.valueOf&&Re.valueOf();if(ht!=null&&ht!==Re)return me.from(ht,Ze,et);var at=ce(Re);if(at)return at;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Re[Symbol.toPrimitive]=="function")return me.from(Re[Symbol.toPrimitive]("string"),Ze,et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re)}me.from=function(Re,Ze,et){return Pe(Re,Ze,et)},me.prototype.__proto__=Uint8Array.prototype,me.__proto__=Uint8Array;function fe(Re){if(typeof Re!="number")throw new TypeError('"size" argument must be of type number');if(Re<0)throw new RangeError('The value "'+Re+'" is invalid for option "size"')}function z(Re,Ze,et){return fe(Re),Re<=0?Ae(Re):Ze!==void 0?typeof et=="string"?Ae(Re).fill(Ze,et):Ae(Re).fill(Ze):Ae(Re)}me.alloc=function(Re,Ze,et){return z(Re,Ze,et)};function te(Re){return fe(Re),Ae(Re<0?0:pe(Re)|0)}me.allocUnsafe=function(Re){return te(Re)},me.allocUnsafeSlow=function(Re){return te(Re)};function se(Re,Ze){if((typeof Ze!="string"||Ze==="")&&(Ze="utf8"),!me.isEncoding(Ze))throw new TypeError("Unknown encoding: "+Ze);var et=je(Re,Ze)|0,ht=Ae(et),at=ht.write(Re,Ze);return at!==et&&(ht=ht.slice(0,at)),ht}function ie(Re){for(var Ze=Re.length<0?0:pe(Re.length)|0,et=Ae(Ze),ht=0;ht<Ze;ht+=1)et[ht]=Re[ht]&255;return et}function le(Re,Ze,et){if(Ze<0||Re.byteLength<Ze)throw new RangeError('"offset" is outside of buffer bounds');if(Re.byteLength<Ze+(et||0))throw new RangeError('"length" is outside of buffer bounds');var ht;return Ze===void 0&&et===void 0?ht=new Uint8Array(Re):et===void 0?ht=new Uint8Array(Re,Ze):ht=new Uint8Array(Re,Ze,et),ht.__proto__=me.prototype,ht}function ce(Re){if(me.isBuffer(Re)){var Ze=pe(Re.length)|0,et=Ae(Ze);return et.length===0||Re.copy(et,0,0,Ze),et}if(Re.length!==void 0)return typeof Re.length!="number"||Ie(Re.length)?Ae(0):ie(Re);if(Re.type==="Buffer"&&Array.isArray(Re.data))return ie(Re.data)}function pe(Re){if(Re>=ke)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ke.toString(16)+" bytes");return Re|0}function xe(Re){return+Re!=Re&&(Re=0),me.alloc(+Re)}me.isBuffer=function(Ze){return Ze!=null&&Ze._isBuffer===!0&&Ze!==me.prototype},me.compare=function(Ze,et){if(nt(Ze,Uint8Array)&&(Ze=me.from(Ze,Ze.offset,Ze.byteLength)),nt(et,Uint8Array)&&(et=me.from(et,et.offset,et.byteLength)),!me.isBuffer(Ze)||!me.isBuffer(et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ze===et)return 0;for(var ht=Ze.length,at=et.length,Dt=0,Et=Math.min(ht,at);Dt<Et;++Dt)if(Ze[Dt]!==et[Dt]){ht=Ze[Dt],at=et[Dt];break}return ht<at?-1:at<ht?1:0},me.isEncoding=function(Ze){switch(String(Ze).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},me.concat=function(Ze,et){if(!Array.isArray(Ze))throw new TypeError('"list" argument must be an Array of Buffers');if(Ze.length===0)return me.alloc(0);var ht;if(et===void 0)for(et=0,ht=0;ht<Ze.length;++ht)et+=Ze[ht].length;var at=me.allocUnsafe(et),Dt=0;for(ht=0;ht<Ze.length;++ht){var Et=Ze[ht];if(nt(Et,Uint8Array)&&(Et=me.from(Et)),!me.isBuffer(Et))throw new TypeError('"list" argument must be an Array of Buffers');Et.copy(at,Dt),Dt+=Et.length}return at};function je(Re,Ze){if(me.isBuffer(Re))return Re.length;if(ArrayBuffer.isView(Re)||nt(Re,ArrayBuffer))return Re.byteLength;if(typeof Re!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Re);var et=Re.length,ht=arguments.length>2&&arguments[2]===!0;if(!ht&&et===0)return 0;for(var at=!1;;)switch(Ze){case"ascii":case"latin1":case"binary":return et;case"utf8":case"utf-8":return tt(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et*2;case"hex":return et>>>1;case"base64":return Ne(Re).length;default:if(at)return ht?-1:tt(Re).length;Ze=(""+Ze).toLowerCase(),at=!0}}me.byteLength=je;function De(Re,Ze,et){var ht=!1;if((Ze===void 0||Ze<0)&&(Ze=0),Ze>this.length||((et===void 0||et>this.length)&&(et=this.length),et<=0)||(et>>>=0,Ze>>>=0,et<=Ze))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return Ct(this,Ze,et);case"utf8":case"utf-8":return ft(this,Ze,et);case"ascii":return rt(this,Ze,et);case"latin1":case"binary":return wt(this,Ze,et);case"base64":return ut(this,Ze,et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bt(this,Ze,et);default:if(ht)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),ht=!0}}me.prototype._isBuffer=!0;function Fe(Re,Ze,et){var ht=Re[Ze];Re[Ze]=Re[et],Re[et]=ht}me.prototype.swap16=function(){var Ze=this.length;if(Ze%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var et=0;et<Ze;et+=2)Fe(this,et,et+1);return this},me.prototype.swap32=function(){var Ze=this.length;if(Ze%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var et=0;et<Ze;et+=4)Fe(this,et,et+3),Fe(this,et+1,et+2);return this},me.prototype.swap64=function(){var Ze=this.length;if(Ze%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var et=0;et<Ze;et+=8)Fe(this,et,et+7),Fe(this,et+1,et+6),Fe(this,et+2,et+5),Fe(this,et+3,et+4);return this},me.prototype.toString=function(){var Ze=this.length;return Ze===0?"":arguments.length===0?ft(this,0,Ze):De.apply(this,arguments)},me.prototype.toLocaleString=me.prototype.toString,me.prototype.equals=function(Ze){if(!me.isBuffer(Ze))throw new TypeError("Argument must be a Buffer");return this===Ze?!0:me.compare(this,Ze)===0},me.prototype.inspect=function(){var Ze="",et=_e.INSPECT_MAX_BYTES;return Ze=this.toString("hex",0,et).replace(/(.{2})/g,"$1 ").trim(),this.length>et&&(Ze+=" ... "),"<Buffer "+Ze+">"},me.prototype.compare=function(Ze,et,ht,at,Dt){if(nt(Ze,Uint8Array)&&(Ze=me.from(Ze,Ze.offset,Ze.byteLength)),!me.isBuffer(Ze))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ze);if(et===void 0&&(et=0),ht===void 0&&(ht=Ze?Ze.length:0),at===void 0&&(at=0),Dt===void 0&&(Dt=this.length),et<0||ht>Ze.length||at<0||Dt>this.length)throw new RangeError("out of range index");if(at>=Dt&&et>=ht)return 0;if(at>=Dt)return-1;if(et>=ht)return 1;if(et>>>=0,ht>>>=0,at>>>=0,Dt>>>=0,this===Ze)return 0;for(var Et=Dt-at,Ot=ht-et,qt=Math.min(Et,Ot),Qt=this.slice(at,Dt),Xt=Ze.slice(et,ht),Wt=0;Wt<qt;++Wt)if(Qt[Wt]!==Xt[Wt]){Et=Qt[Wt],Ot=Xt[Wt];break}return Et<Ot?-1:Ot<Et?1:0};function Te(Re,Ze,et,ht,at){if(Re.length===0)return-1;if(typeof et=="string"?(ht=et,et=0):et>2147483647?et=2147483647:et<-2147483648&&(et=-2147483648),et=+et,Ie(et)&&(et=at?0:Re.length-1),et<0&&(et=Re.length+et),et>=Re.length){if(at)return-1;et=Re.length-1}else if(et<0)if(at)et=0;else return-1;if(typeof Ze=="string"&&(Ze=me.from(Ze,ht)),me.isBuffer(Ze))return Ze.length===0?-1:Me(Re,Ze,et,ht,at);if(typeof Ze=="number")return Ze=Ze&255,typeof Uint8Array.prototype.indexOf=="function"?at?Uint8Array.prototype.indexOf.call(Re,Ze,et):Uint8Array.prototype.lastIndexOf.call(Re,Ze,et):Me(Re,[Ze],et,ht,at);throw new TypeError("val must be string, number or Buffer")}function Me(Re,Ze,et,ht,at){var Dt=1,Et=Re.length,Ot=Ze.length;if(ht!==void 0&&(ht=String(ht).toLowerCase(),ht==="ucs2"||ht==="ucs-2"||ht==="utf16le"||ht==="utf-16le")){if(Re.length<2||Ze.length<2)return-1;Dt=2,Et/=2,Ot/=2,et/=2}function qt(on,cn){return Dt===1?on[cn]:on.readUInt16BE(cn*Dt)}var Qt;if(at){var Xt=-1;for(Qt=et;Qt<Et;Qt++)if(qt(Re,Qt)===qt(Ze,Xt===-1?0:Qt-Xt)){if(Xt===-1&&(Xt=Qt),Qt-Xt+1===Ot)return Xt*Dt}else Xt!==-1&&(Qt-=Qt-Xt),Xt=-1}else for(et+Ot>Et&&(et=Et-Ot),Qt=et;Qt>=0;Qt--){for(var Wt=!0,un=0;un<Ot;un++)if(qt(Re,Qt+un)!==qt(Ze,un)){Wt=!1;break}if(Wt)return Qt}return-1}me.prototype.includes=function(Ze,et,ht){return this.indexOf(Ze,et,ht)!==-1},me.prototype.indexOf=function(Ze,et,ht){return Te(this,Ze,et,ht,!0)},me.prototype.lastIndexOf=function(Ze,et,ht){return Te(this,Ze,et,ht,!1)};function Be(Re,Ze,et,ht){et=Number(et)||0;var at=Re.length-et;ht?(ht=Number(ht),ht>at&&(ht=at)):ht=at;var Dt=Ze.length;ht>Dt/2&&(ht=Dt/2);for(var Et=0;Et<ht;++Et){var Ot=parseInt(Ze.substr(Et*2,2),16);if(Ie(Ot))return Et;Re[et+Et]=Ot}return Et}function Ge(Re,Ze,et,ht){return Xe(tt(Ze,Re.length-et),Re,et,ht)}function Ye(Re,Ze,et,ht){return Xe(He(Ze),Re,et,ht)}function Ke(Re,Ze,et,ht){return Ye(Re,Ze,et,ht)}function Ve(Re,Ze,et,ht){return Xe(Ne(Ze),Re,et,ht)}function ot(Re,Ze,et,ht){return Xe(we(Ze,Re.length-et),Re,et,ht)}me.prototype.write=function(Ze,et,ht,at){if(et===void 0)at="utf8",ht=this.length,et=0;else if(ht===void 0&&typeof et=="string")at=et,ht=this.length,et=0;else if(isFinite(et))et=et>>>0,isFinite(ht)?(ht=ht>>>0,at===void 0&&(at="utf8")):(at=ht,ht=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Dt=this.length-et;if((ht===void 0||ht>Dt)&&(ht=Dt),Ze.length>0&&(ht<0||et<0)||et>this.length)throw new RangeError("Attempt to write outside buffer bounds");at||(at="utf8");for(var Et=!1;;)switch(at){case"hex":return Be(this,Ze,et,ht);case"utf8":case"utf-8":return Ge(this,Ze,et,ht);case"ascii":return Ye(this,Ze,et,ht);case"latin1":case"binary":return Ke(this,Ze,et,ht);case"base64":return Ve(this,Ze,et,ht);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,Ze,et,ht);default:if(Et)throw new TypeError("Unknown encoding: "+at);at=(""+at).toLowerCase(),Et=!0}},me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ut(Re,Ze,et){return Ze===0&&et===Re.length?ve.fromByteArray(Re):ve.fromByteArray(Re.slice(Ze,et))}function ft(Re,Ze,et){et=Math.min(Re.length,et);for(var ht=[],at=Ze;at<et;){var Dt=Re[at],Et=null,Ot=Dt>239?4:Dt>223?3:Dt>191?2:1;if(at+Ot<=et){var qt,Qt,Xt,Wt;switch(Ot){case 1:Dt<128&&(Et=Dt);break;case 2:qt=Re[at+1],(qt&192)===128&&(Wt=(Dt&31)<<6|qt&63,Wt>127&&(Et=Wt));break;case 3:qt=Re[at+1],Qt=Re[at+2],(qt&192)===128&&(Qt&192)===128&&(Wt=(Dt&15)<<12|(qt&63)<<6|Qt&63,Wt>2047&&(Wt<55296||Wt>57343)&&(Et=Wt));break;case 4:qt=Re[at+1],Qt=Re[at+2],Xt=Re[at+3],(qt&192)===128&&(Qt&192)===128&&(Xt&192)===128&&(Wt=(Dt&15)<<18|(qt&63)<<12|(Qt&63)<<6|Xt&63,Wt>65535&&Wt<1114112&&(Et=Wt))}}Et===null?(Et=65533,Ot=1):Et>65535&&(Et-=65536,ht.push(Et>>>10&1023|55296),Et=56320|Et&1023),ht.push(Et),at+=Ot}return Qe(ht)}var St=4096;function Qe(Re){var Ze=Re.length;if(Ze<=St)return String.fromCharCode.apply(String,Re);for(var et="",ht=0;ht<Ze;)et+=String.fromCharCode.apply(String,Re.slice(ht,ht+=St));return et}function rt(Re,Ze,et){var ht="";et=Math.min(Re.length,et);for(var at=Ze;at<et;++at)ht+=String.fromCharCode(Re[at]&127);return ht}function wt(Re,Ze,et){var ht="";et=Math.min(Re.length,et);for(var at=Ze;at<et;++at)ht+=String.fromCharCode(Re[at]);return ht}function Ct(Re,Ze,et){var ht=Re.length;(!Ze||Ze<0)&&(Ze=0),(!et||et<0||et>ht)&&(et=ht);for(var at="",Dt=Ze;Dt<et;++Dt)at+=vt(Re[Dt]);return at}function bt(Re,Ze,et){for(var ht=Re.slice(Ze,et),at="",Dt=0;Dt<ht.length;Dt+=2)at+=String.fromCharCode(ht[Dt]+ht[Dt+1]*256);return at}me.prototype.slice=function(Ze,et){var ht=this.length;Ze=~~Ze,et=et===void 0?ht:~~et,Ze<0?(Ze+=ht,Ze<0&&(Ze=0)):Ze>ht&&(Ze=ht),et<0?(et+=ht,et<0&&(et=0)):et>ht&&(et=ht),et<Ze&&(et=Ze);var at=this.subarray(Ze,et);return at.__proto__=me.prototype,at};function ct(Re,Ze,et){if(Re%1!==0||Re<0)throw new RangeError("offset is not uint");if(Re+Ze>et)throw new RangeError("Trying to access beyond buffer length")}me.prototype.readUIntLE=function(Ze,et,ht){Ze=Ze>>>0,et=et>>>0,ht||ct(Ze,et,this.length);for(var at=this[Ze],Dt=1,Et=0;++Et<et&&(Dt*=256);)at+=this[Ze+Et]*Dt;return at},me.prototype.readUIntBE=function(Ze,et,ht){Ze=Ze>>>0,et=et>>>0,ht||ct(Ze,et,this.length);for(var at=this[Ze+--et],Dt=1;et>0&&(Dt*=256);)at+=this[Ze+--et]*Dt;return at},me.prototype.readUInt8=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,1,this.length),this[Ze]},me.prototype.readUInt16LE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,2,this.length),this[Ze]|this[Ze+1]<<8},me.prototype.readUInt16BE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,2,this.length),this[Ze]<<8|this[Ze+1]},me.prototype.readUInt32LE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),(this[Ze]|this[Ze+1]<<8|this[Ze+2]<<16)+this[Ze+3]*16777216},me.prototype.readUInt32BE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),this[Ze]*16777216+(this[Ze+1]<<16|this[Ze+2]<<8|this[Ze+3])},me.prototype.readIntLE=function(Ze,et,ht){Ze=Ze>>>0,et=et>>>0,ht||ct(Ze,et,this.length);for(var at=this[Ze],Dt=1,Et=0;++Et<et&&(Dt*=256);)at+=this[Ze+Et]*Dt;return Dt*=128,at>=Dt&&(at-=Math.pow(2,8*et)),at},me.prototype.readIntBE=function(Ze,et,ht){Ze=Ze>>>0,et=et>>>0,ht||ct(Ze,et,this.length);for(var at=et,Dt=1,Et=this[Ze+--at];at>0&&(Dt*=256);)Et+=this[Ze+--at]*Dt;return Dt*=128,Et>=Dt&&(Et-=Math.pow(2,8*et)),Et},me.prototype.readInt8=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,1,this.length),this[Ze]&128?(255-this[Ze]+1)*-1:this[Ze]},me.prototype.readInt16LE=function(Ze,et){Ze=Ze>>>0,et||ct(Ze,2,this.length);var ht=this[Ze]|this[Ze+1]<<8;return ht&32768?ht|4294901760:ht},me.prototype.readInt16BE=function(Ze,et){Ze=Ze>>>0,et||ct(Ze,2,this.length);var ht=this[Ze+1]|this[Ze]<<8;return ht&32768?ht|4294901760:ht},me.prototype.readInt32LE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),this[Ze]|this[Ze+1]<<8|this[Ze+2]<<16|this[Ze+3]<<24},me.prototype.readInt32BE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),this[Ze]<<24|this[Ze+1]<<16|this[Ze+2]<<8|this[Ze+3]},me.prototype.readFloatLE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),Ee.read(this,Ze,!0,23,4)},me.prototype.readFloatBE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,4,this.length),Ee.read(this,Ze,!1,23,4)},me.prototype.readDoubleLE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,8,this.length),Ee.read(this,Ze,!0,52,8)},me.prototype.readDoubleBE=function(Ze,et){return Ze=Ze>>>0,et||ct(Ze,8,this.length),Ee.read(this,Ze,!1,52,8)};function xt(Re,Ze,et,ht,at,Dt){if(!me.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ze>at||Ze<Dt)throw new RangeError('"value" argument is out of bounds');if(et+ht>Re.length)throw new RangeError("Index out of range")}me.prototype.writeUIntLE=function(Ze,et,ht,at){if(Ze=+Ze,et=et>>>0,ht=ht>>>0,!at){var Dt=Math.pow(2,8*ht)-1;xt(this,Ze,et,ht,Dt,0)}var Et=1,Ot=0;for(this[et]=Ze&255;++Ot<ht&&(Et*=256);)this[et+Ot]=Ze/Et&255;return et+ht},me.prototype.writeUIntBE=function(Ze,et,ht,at){if(Ze=+Ze,et=et>>>0,ht=ht>>>0,!at){var Dt=Math.pow(2,8*ht)-1;xt(this,Ze,et,ht,Dt,0)}var Et=ht-1,Ot=1;for(this[et+Et]=Ze&255;--Et>=0&&(Ot*=256);)this[et+Et]=Ze/Ot&255;return et+ht},me.prototype.writeUInt8=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,1,255,0),this[et]=Ze&255,et+1},me.prototype.writeUInt16LE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,2,65535,0),this[et]=Ze&255,this[et+1]=Ze>>>8,et+2},me.prototype.writeUInt16BE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,2,65535,0),this[et]=Ze>>>8,this[et+1]=Ze&255,et+2},me.prototype.writeUInt32LE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,4,4294967295,0),this[et+3]=Ze>>>24,this[et+2]=Ze>>>16,this[et+1]=Ze>>>8,this[et]=Ze&255,et+4},me.prototype.writeUInt32BE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,4,4294967295,0),this[et]=Ze>>>24,this[et+1]=Ze>>>16,this[et+2]=Ze>>>8,this[et+3]=Ze&255,et+4},me.prototype.writeIntLE=function(Ze,et,ht,at){if(Ze=+Ze,et=et>>>0,!at){var Dt=Math.pow(2,8*ht-1);xt(this,Ze,et,ht,Dt-1,-Dt)}var Et=0,Ot=1,qt=0;for(this[et]=Ze&255;++Et<ht&&(Ot*=256);)Ze<0&&qt===0&&this[et+Et-1]!==0&&(qt=1),this[et+Et]=(Ze/Ot>>0)-qt&255;return et+ht},me.prototype.writeIntBE=function(Ze,et,ht,at){if(Ze=+Ze,et=et>>>0,!at){var Dt=Math.pow(2,8*ht-1);xt(this,Ze,et,ht,Dt-1,-Dt)}var Et=ht-1,Ot=1,qt=0;for(this[et+Et]=Ze&255;--Et>=0&&(Ot*=256);)Ze<0&&qt===0&&this[et+Et+1]!==0&&(qt=1),this[et+Et]=(Ze/Ot>>0)-qt&255;return et+ht},me.prototype.writeInt8=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,1,127,-128),Ze<0&&(Ze=255+Ze+1),this[et]=Ze&255,et+1},me.prototype.writeInt16LE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,2,32767,-32768),this[et]=Ze&255,this[et+1]=Ze>>>8,et+2},me.prototype.writeInt16BE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,2,32767,-32768),this[et]=Ze>>>8,this[et+1]=Ze&255,et+2},me.prototype.writeInt32LE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,4,2147483647,-2147483648),this[et]=Ze&255,this[et+1]=Ze>>>8,this[et+2]=Ze>>>16,this[et+3]=Ze>>>24,et+4},me.prototype.writeInt32BE=function(Ze,et,ht){return Ze=+Ze,et=et>>>0,ht||xt(this,Ze,et,4,2147483647,-2147483648),Ze<0&&(Ze=4294967295+Ze+1),this[et]=Ze>>>24,this[et+1]=Ze>>>16,this[et+2]=Ze>>>8,this[et+3]=Ze&255,et+4};function dt(Re,Ze,et,ht,at,Dt){if(et+ht>Re.length)throw new RangeError("Index out of range");if(et<0)throw new RangeError("Index out of range")}function Mt(Re,Ze,et,ht,at){return Ze=+Ze,et=et>>>0,at||dt(Re,Ze,et,4,34028234663852886e22,-34028234663852886e22),Ee.write(Re,Ze,et,ht,23,4),et+4}me.prototype.writeFloatLE=function(Ze,et,ht){return Mt(this,Ze,et,!0,ht)},me.prototype.writeFloatBE=function(Ze,et,ht){return Mt(this,Ze,et,!1,ht)};function yt(Re,Ze,et,ht,at){return Ze=+Ze,et=et>>>0,at||dt(Re,Ze,et,8,17976931348623157e292,-17976931348623157e292),Ee.write(Re,Ze,et,ht,52,8),et+8}me.prototype.writeDoubleLE=function(Ze,et,ht){return yt(this,Ze,et,!0,ht)},me.prototype.writeDoubleBE=function(Ze,et,ht){return yt(this,Ze,et,!1,ht)},me.prototype.copy=function(Ze,et,ht,at){if(!me.isBuffer(Ze))throw new TypeError("argument should be a Buffer");if(ht||(ht=0),!at&&at!==0&&(at=this.length),et>=Ze.length&&(et=Ze.length),et||(et=0),at>0&&at<ht&&(at=ht),at===ht||Ze.length===0||this.length===0)return 0;if(et<0)throw new RangeError("targetStart out of bounds");if(ht<0||ht>=this.length)throw new RangeError("Index out of range");if(at<0)throw new RangeError("sourceEnd out of bounds");at>this.length&&(at=this.length),Ze.length-et<at-ht&&(at=Ze.length-et+ht);var Dt=at-ht;if(this===Ze&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(et,ht,at);else if(this===Ze&&ht<et&&et<at)for(var Et=Dt-1;Et>=0;--Et)Ze[Et+et]=this[Et+ht];else Uint8Array.prototype.set.call(Ze,this.subarray(ht,at),et);return Dt},me.prototype.fill=function(Ze,et,ht,at){if(typeof Ze=="string"){if(typeof et=="string"?(at=et,et=0,ht=this.length):typeof ht=="string"&&(at=ht,ht=this.length),at!==void 0&&typeof at!="string")throw new TypeError("encoding must be a string");if(typeof at=="string"&&!me.isEncoding(at))throw new TypeError("Unknown encoding: "+at);if(Ze.length===1){var Dt=Ze.charCodeAt(0);(at==="utf8"&&Dt<128||at==="latin1")&&(Ze=Dt)}}else typeof Ze=="number"&&(Ze=Ze&255);if(et<0||this.length<et||this.length<ht)throw new RangeError("Out of range index");if(ht<=et)return this;et=et>>>0,ht=ht===void 0?this.length:ht>>>0,Ze||(Ze=0);var Et;if(typeof Ze=="number")for(Et=et;Et<ht;++Et)this[Et]=Ze;else{var Ot=me.isBuffer(Ze)?Ze:me.from(Ze,at),qt=Ot.length;if(qt===0)throw new TypeError('The value "'+Ze+'" is invalid for argument "value"');for(Et=0;Et<ht-et;++Et)this[Et+et]=Ot[Et%qt]}return this};var Ft=/[^+/0-9A-Za-z-_]/g;function mt(Re){if(Re=Re.split("=")[0],Re=Re.trim().replace(Ft,""),Re.length<2)return"";for(;Re.length%4!==0;)Re=Re+"=";return Re}function vt(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function tt(Re,Ze){Ze=Ze||1/0;for(var et,ht=Re.length,at=null,Dt=[],Et=0;Et<ht;++Et){if(et=Re.charCodeAt(Et),et>55295&&et<57344){if(!at){if(et>56319){(Ze-=3)>-1&&Dt.push(239,191,189);continue}else if(Et+1===ht){(Ze-=3)>-1&&Dt.push(239,191,189);continue}at=et;continue}if(et<56320){(Ze-=3)>-1&&Dt.push(239,191,189),at=et;continue}et=(at-55296<<10|et-56320)+65536}else at&&(Ze-=3)>-1&&Dt.push(239,191,189);if(at=null,et<128){if((Ze-=1)<0)break;Dt.push(et)}else if(et<2048){if((Ze-=2)<0)break;Dt.push(et>>6|192,et&63|128)}else if(et<65536){if((Ze-=3)<0)break;Dt.push(et>>12|224,et>>6&63|128,et&63|128)}else if(et<1114112){if((Ze-=4)<0)break;Dt.push(et>>18|240,et>>12&63|128,et>>6&63|128,et&63|128)}else throw new Error("Invalid code point")}return Dt}function He(Re){for(var Ze=[],et=0;et<Re.length;++et)Ze.push(Re.charCodeAt(et)&255);return Ze}function we(Re,Ze){for(var et,ht,at,Dt=[],Et=0;Et<Re.length&&!((Ze-=2)<0);++Et)et=Re.charCodeAt(Et),ht=et>>8,at=et%256,Dt.push(at),Dt.push(ht);return Dt}function Ne(Re){return ve.toByteArray(mt(Re))}function Xe(Re,Ze,et,ht){for(var at=0;at<ht&&!(at+et>=Ze.length||at>=Re.length);++at)Ze[at+et]=Re[at];return at}function nt(Re,Ze){return Re instanceof Ze||Re!=null&&Re.constructor!=null&&Re.constructor.name!=null&&Re.constructor.name===Ze.name}function Ie(Re){return Re!==Re}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,Ue,_e){Ue.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(oe,Ue,_e){"use strict";var de=oe("get-intrinsic"),ve=oe("./"),Ee=ve(de("String.prototype.indexOf"));Ue.exports=function(Se,Ae){var me=de(Se,!!Ae);return typeof me=="function"&&Ee(Se,".prototype.")>-1?ve(me):me}},{"./":93,"get-intrinsic":348}],93:[function(oe,Ue,_e){"use strict";var de=oe("function-bind"),ve=oe("get-intrinsic"),Ee=ve("%Function.prototype.apply%"),ke=ve("%Function.prototype.call%"),Se=ve("%Reflect.apply%",!0)||de.call(ke,Ee),Ae=ve("%Object.getOwnPropertyDescriptor%",!0),me=ve("%Object.defineProperty%",!0),Pe=ve("%Math.max%");if(me)try{me({},"a",{value:1})}catch(z){me=null}Ue.exports=function(te){var se=Se(de,ke,arguments);if(Ae&&me){var ie=Ae(se,"length");ie.configurable&&me(se,"length",{value:1+Pe(0,te.length-(arguments.length-1))})}return se};var fe=function(){return Se(de,Ee,arguments)};me?me(Ue.exports,"apply",{value:fe}):Ue.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,Ue,_e){"use strict";var de=Array.prototype.slice;Ue.exports=ve;function ve(ke,Se){if(!(this instanceof ve))return new ve(ke,Se);this.src=ke,this._withAccess=Se}ve.prototype.withAccess=function(ke){return this._withAccess=ke!==!1,this},ve.prototype.pick=function(ke){return Array.isArray(ke)||(ke=de.call(arguments)),ke.length&&(this.keys=ke),this},ve.prototype.to=function(ke){if(ke=ke||{},!this.src)return ke;var Se=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Ae=0;Ae<Se.length;Ae++)me=Se[Ae],ke[me]===void 0&&(ke[me]=this.src[me]);return ke}for(var Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(Ee(ke,me)){var Pe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);Pe&&ke.__defineGetter__(me,Pe),fe&&ke.__defineSetter__(me,fe),!Pe&&!fe&&(ke[me]=this.src[me])}}return ke},ve.prototype.toCover=function(ke){for(var Se=this.keys||Object.keys(this.src),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];delete ke[me];var Pe=this.src.__lookupGetter__(me),fe=this.src.__lookupSetter__(me);Pe&&ke.__defineGetter__(me,Pe),fe&&ke.__defineSetter__(me,fe),!Pe&&!fe&&(ke[me]=this.src[me])}},ve.prototype.override=ve.prototype.toCover,ve.prototype.and=function(ke){var Se={};return this.to(Se),this.src=ke,this.to(Se),this.src=Se,this};function Ee(ke,Se){return ke[Se]===void 0&&ke.__lookupGetter__(Se)===void 0&&ke.__lookupSetter__(Se)===void 0}},{}],95:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;Ue.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-constructor"),Ee=oe("../internals/try-to-string"),ke=de.TypeError;Ue.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=de.String,ke=de.TypeError;Ue.exports=function(Se){if(typeof Se=="object"||ve(Se))return Se;throw ke("Can't set "+Ee(Se)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol"),ve=oe("../internals/object-create"),Ee=oe("../internals/object-define-property"),ke=de("unscopables"),Se=Array.prototype;Se[ke]==null&&Ee.f(Se,ke,{configurable:!0,value:ve(null)}),Ue.exports=function(Ae){Se[ke][Ae]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,Ue,_e){"use strict";var de=oe("../internals/string-multibyte").charAt;Ue.exports=function(ve,Ee,ke){return Ee+(ke?de(ve,Ee).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/object-is-prototype-of"),Ee=de.TypeError;Ue.exports=function(ke,Se){if(ve(Se,ke))return ke;throw Ee("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.String,ke=de.TypeError;Ue.exports=function(Se){if(ve(Se))return Se;throw ke(Ee(Se)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(oe,Ue,_e){Ue.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-native"),ve=oe("../internals/descriptors"),Ee=oe("../internals/global"),ke=oe("../internals/is-callable"),Se=oe("../internals/is-object"),Ae=oe("../internals/has-own-property"),me=oe("../internals/classof"),Pe=oe("../internals/try-to-string"),fe=oe("../internals/create-non-enumerable-property"),z=oe("../internals/redefine"),te=oe("../internals/object-define-property").f,se=oe("../internals/object-is-prototype-of"),ie=oe("../internals/object-get-prototype-of"),le=oe("../internals/object-set-prototype-of"),ce=oe("../internals/well-known-symbol"),pe=oe("../internals/uid"),xe=Ee.Int8Array,je=xe&&xe.prototype,De=Ee.Uint8ClampedArray,Fe=De&&De.prototype,Te=xe&&ie(xe),Me=je&&ie(je),Be=Object.prototype,Ge=Ee.TypeError,Ye=ce("toStringTag"),Ke=pe("TYPED_ARRAY_TAG"),Ve=pe("TYPED_ARRAY_CONSTRUCTOR"),ot=de&&!!le&&me(Ee.opera)!=="Opera",ut=!1,ft,St,Qe,rt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},wt={BigInt64Array:8,BigUint64Array:8},Ct=function(Ft){if(!Se(Ft))return!1;var mt=me(Ft);return mt==="DataView"||Ae(rt,mt)||Ae(wt,mt)},bt=function(yt){if(!Se(yt))return!1;var Ft=me(yt);return Ae(rt,Ft)||Ae(wt,Ft)},ct=function(yt){if(bt(yt))return yt;throw Ge("Target is not a typed array")},xt=function(yt){if(ke(yt)&&(!le||se(Te,yt)))return yt;throw Ge(Pe(yt)+" is not a typed array constructor")},dt=function(yt,Ft,mt,vt){if(ve){if(mt)for(var tt in rt){var He=Ee[tt];if(He&&Ae(He.prototype,yt))try{delete He.prototype[yt]}catch(we){try{He.prototype[yt]=Ft}catch(Ne){}}}(!Me[yt]||mt)&&z(Me,yt,mt?Ft:ot&&je[yt]||Ft,vt)}},Mt=function(yt,Ft,mt){var vt,tt;if(ve){if(le){if(mt){for(vt in rt)if(tt=Ee[vt],tt&&Ae(tt,yt))try{delete tt[yt]}catch(He){}}if(!Te[yt]||mt)try{return z(Te,yt,mt?Ft:ot&&Te[yt]||Ft)}catch(He){}else return}for(vt in rt)tt=Ee[vt],tt&&(!tt[yt]||mt)&&z(tt,yt,Ft)}};for(ft in rt)St=Ee[ft],Qe=St&&St.prototype,Qe?fe(Qe,Ve,St):ot=!1;for(ft in wt)St=Ee[ft],Qe=St&&St.prototype,Qe&&fe(Qe,Ve,St);if((!ot||!ke(Te)||Te===Function.prototype)&&(Te=function(){throw Ge("Incorrect invocation")},ot))for(ft in rt)Ee[ft]&&le(Ee[ft],Te);if((!ot||!Me||Me===Be)&&(Me=Te.prototype,ot))for(ft in rt)Ee[ft]&&le(Ee[ft].prototype,Me);if(ot&&ie(Fe)!==Me&&le(Fe,Me),ve&&!Ae(Me,Ye)){ut=!0,te(Me,Ye,{get:function(){return Se(this)?this[Ke]:void 0}});for(ft in rt)Ee[ft]&&fe(Ee[ft],Ke,ft)}Ue.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ve,TYPED_ARRAY_TAG:ut&&Ke,aTypedArray:ct,aTypedArrayConstructor:xt,exportTypedArrayMethod:dt,exportTypedArrayStaticMethod:Mt,isView:Ct,isTypedArray:bt,TypedArray:Te,TypedArrayPrototype:Me}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/descriptors"),ke=oe("../internals/array-buffer-native"),Se=oe("../internals/function-name"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/redefine-all"),Pe=oe("../internals/fails"),fe=oe("../internals/an-instance"),z=oe("../internals/to-integer-or-infinity"),te=oe("../internals/to-length"),se=oe("../internals/to-index"),ie=oe("../internals/ieee754"),le=oe("../internals/object-get-prototype-of"),ce=oe("../internals/object-set-prototype-of"),pe=oe("../internals/object-get-own-property-names").f,xe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),De=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Te=oe("../internals/internal-state"),Me=Se.PROPER,Be=Se.CONFIGURABLE,Ge=Te.get,Ye=Te.set,Ke="ArrayBuffer",Ve="DataView",ot="prototype",ut="Wrong length",ft="Wrong index",St=de[Ke],Qe=St,rt=Qe&&Qe[ot],wt=de[Ve],Ct=wt&&wt[ot],bt=Object.prototype,ct=de.Array,xt=de.RangeError,dt=ve(je),Mt=ve([].reverse),yt=ie.pack,Ft=ie.unpack,mt=function(Et){return[Et&255]},vt=function(Et){return[Et&255,Et>>8&255]},tt=function(Et){return[Et&255,Et>>8&255,Et>>16&255,Et>>24&255]},He=function(Et){return Et[3]<<24|Et[2]<<16|Et[1]<<8|Et[0]},we=function(Et){return yt(Et,23,4)},Ne=function(Et){return yt(Et,52,8)},Xe=function(Et,Ot){xe(Et[ot],Ot,{get:function(){return Ge(this)[Ot]}})},nt=function(Et,Ot,qt,Qt){var Xt=se(qt),Wt=Ge(Et);if(Xt+Ot>Wt.byteLength)throw xt(ft);var un=Ge(Wt.buffer).bytes,on=Xt+Wt.byteOffset,cn=De(un,on,on+Ot);return Qt?cn:Mt(cn)},Ie=function(Et,Ot,qt,Qt,Xt,Wt){var un=se(qt),on=Ge(Et);if(un+Ot>on.byteLength)throw xt(ft);for(var cn=Ge(on.buffer).bytes,bn=un+on.byteOffset,xn=Qt(+Xt),kn=0;kn<Ot;kn++)cn[bn+kn]=xn[Wt?kn:Ot-kn-1]};if(!ke)Qe=function(Ot){fe(this,rt);var qt=se(Ot);Ye(this,{bytes:dt(ct(qt),0),byteLength:qt}),Ee||(this.byteLength=qt)},rt=Qe[ot],wt=function(Ot,qt,Qt){fe(this,Ct),fe(Ot,rt);var Xt=Ge(Ot).byteLength,Wt=z(qt);if(Wt<0||Wt>Xt)throw xt("Wrong offset");if(Qt=Qt===void 0?Xt-Wt:te(Qt),Wt+Qt>Xt)throw xt(ut);Ye(this,{buffer:Ot,byteLength:Qt,byteOffset:Wt}),Ee||(this.buffer=Ot,this.byteLength=Qt,this.byteOffset=Wt)},Ct=wt[ot],Ee&&(Xe(Qe,"byteLength"),Xe(wt,"buffer"),Xe(wt,"byteLength"),Xe(wt,"byteOffset")),me(Ct,{getInt8:function(Ot){return nt(this,1,Ot)[0]<<24>>24},getUint8:function(Ot){return nt(this,1,Ot)[0]},getInt16:function(Ot){var qt=nt(this,2,Ot,arguments.length>1?arguments[1]:void 0);return(qt[1]<<8|qt[0])<<16>>16},getUint16:function(Ot){var qt=nt(this,2,Ot,arguments.length>1?arguments[1]:void 0);return qt[1]<<8|qt[0]},getInt32:function(Ot){return He(nt(this,4,Ot,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ot){return He(nt(this,4,Ot,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ot){return Ft(nt(this,4,Ot,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ot){return Ft(nt(this,8,Ot,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ot,qt){Ie(this,1,Ot,mt,qt)},setUint8:function(Ot,qt){Ie(this,1,Ot,mt,qt)},setInt16:function(Ot,qt){Ie(this,2,Ot,vt,qt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ot,qt){Ie(this,2,Ot,vt,qt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ot,qt){Ie(this,4,Ot,tt,qt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ot,qt){Ie(this,4,Ot,tt,qt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ot,qt){Ie(this,4,Ot,we,qt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ot,qt){Ie(this,8,Ot,Ne,qt,arguments.length>2?arguments[2]:void 0)}});else{var Re=Me&&St.name!==Ke;if(!Pe(function(){St(1)})||!Pe(function(){new St(-1)})||Pe(function(){return new St,new St(1.5),new St(NaN),Re&&!Be})){Qe=function(Ot){return fe(this,rt),new St(se(Ot))},Qe[ot]=rt;for(var Ze=pe(St),et=0,ht;Ze.length>et;)(ht=Ze[et++])in Qe||Ae(Qe,ht,St[ht]);rt.constructor=Qe}else Re&&Be&&Ae(St,"name",Ke);ce&&le(Ct)!==bt&&ce(Ct,bt);var at=new wt(new Qe(2)),Dt=ve(Ct.setInt8);at.setInt8(0,2147483648),at.setInt8(1,2147483649),(at.getInt8(0)||!at.getInt8(1))&&me(Ct,{setInt8:function(Ot,qt){Dt(this,Ot,qt<<24>>24)},setUint8:function(Ot,qt){Dt(this,Ot,qt<<24>>24)}},{unsafe:!0})}Fe(Qe,Ke),Fe(wt,Ve),Ue.exports={ArrayBuffer:Qe,DataView:wt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(oe,Ue,_e){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=Math.min;Ue.exports=[].copyWithin||function(Ae,me){var Pe=de(this),fe=Ee(Pe),z=ve(Ae,fe),te=ve(me,fe),se=arguments.length>2?arguments[2]:void 0,ie=ke((se===void 0?fe:ve(se,fe))-te,fe-z),le=1;for(te<z&&z<te+ie&&(le=-1,te+=ie-1,z+=ie-1);ie-- >0;)te in Pe?Pe[z]=Pe[te]:delete Pe[z],z+=le,te+=le;return Pe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(oe,Ue,_e){"use strict";var de=oe("../internals/to-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like");Ue.exports=function(Se){for(var Ae=de(this),me=Ee(Ae),Pe=arguments.length,fe=ve(Pe>1?arguments[1]:void 0,me),z=Pe>2?arguments[2]:void 0,te=z===void 0?me:ve(z,me);te>fe;)Ae[fe++]=Se;return Ae}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-iteration").forEach,ve=oe("../internals/array-method-is-strict"),Ee=ve("forEach");Ue.exports=Ee?[].forEach:function(Se){return de(this,Se,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(oe,Ue,_e){var de=oe("../internals/length-of-array-like");Ue.exports=function(ve,Ee){for(var ke=0,Se=de(Ee),Ae=new ve(Se);Se>ke;)Ae[ke]=Ee[ke++];return Ae}},{"../internals/length-of-array-like":188}],109:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/function-call"),ke=oe("../internals/to-object"),Se=oe("../internals/call-with-safe-iteration-closing"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/is-constructor"),Pe=oe("../internals/length-of-array-like"),fe=oe("../internals/create-property"),z=oe("../internals/get-iterator"),te=oe("../internals/get-iterator-method"),se=de.Array;Ue.exports=function(le){var ce=ke(le),pe=me(this),xe=arguments.length,je=xe>1?arguments[1]:void 0,De=je!==void 0;De&&(je=ve(je,xe>2?arguments[2]:void 0));var Fe=te(ce),Te=0,Me,Be,Ge,Ye,Ke,Ve;if(Fe&&!(this==se&&Ae(Fe)))for(Ye=z(ce,Fe),Ke=Ye.next,Be=pe?new this:[];!(Ge=Ee(Ke,Ye)).done;Te++)Ve=De?Se(Ye,je,[Ge.value,Te],!0):Ge.value,fe(Be,Te,Ve);else for(Me=Pe(ce),Be=pe?new this(Me):se(Me);Me>Te;Te++)Ve=De?je(ce[Te],Te):ce[Te],fe(Be,Te,Ve);return Be.length=Te,Be}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(oe,Ue,_e){var de=oe("../internals/to-indexed-object"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=function(Se){return function(Ae,me,Pe){var fe=de(Ae),z=Ee(fe),te=ve(Pe,z),se;if(Se&&me!=me){for(;z>te;)if(se=fe[te++],se!=se)return!0}else for(;z>te;te++)if((Se||te in fe)&&fe[te]===me)return Se||te||0;return!Se&&-1}};Ue.exports={includes:ke(!0),indexOf:ke(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(oe,Ue,_e){var de=oe("../internals/function-bind-context"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/indexed-object"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/array-species-create"),me=ve([].push),Pe=function(fe){var z=fe==1,te=fe==2,se=fe==3,ie=fe==4,le=fe==6,ce=fe==7,pe=fe==5||le;return function(xe,je,De,Fe){for(var Te=ke(xe),Me=Ee(Te),Be=de(je,De),Ge=Se(Me),Ye=0,Ke=Fe||Ae,Ve=z?Ke(xe,Ge):te||ce?Ke(xe,0):void 0,ot,ut;Ge>Ye;Ye++)if((pe||Ye in Me)&&(ot=Me[Ye],ut=Be(ot,Ye,Te),fe))if(z)Ve[Ye]=ut;else if(ut)switch(fe){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:me(Ve,ot)}else switch(fe){case 4:return!1;case 7:me(Ve,ot)}return le?-1:se||ie?ie:Ve}};Ue.exports={forEach:Pe(0),map:Pe(1),filter:Pe(2),some:Pe(3),every:Pe(4),find:Pe(5),findIndex:Pe(6),filterReject:Pe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/to-indexed-object"),Ee=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/length-of-array-like"),Se=oe("../internals/array-method-is-strict"),Ae=Math.min,me=[].lastIndexOf,Pe=!!me&&1/[1].lastIndexOf(1,-0)<0,fe=Se("lastIndexOf"),z=Pe||!fe;Ue.exports=z?function(se){if(Pe)return de(me,this,arguments)||0;var ie=ve(this),le=ke(ie),ce=le-1;for(arguments.length>1&&(ce=Ae(ce,Ee(arguments[1]))),ce<0&&(ce=le+ce);ce>=0;ce--)if(ce in ie&&ie[ce]===se)return ce||0;return-1}:me},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(oe,Ue,_e){var de=oe("../internals/fails"),ve=oe("../internals/well-known-symbol"),Ee=oe("../internals/engine-v8-version"),ke=ve("species");Ue.exports=function(Se){return Ee>=51||!de(function(){var Ae=[],me=Ae.constructor={};return me[ke]=function(){return{foo:1}},Ae[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,Ue,_e){"use strict";var de=oe("../internals/fails");Ue.exports=function(ve,Ee){var ke=[][ve];return!!ke&&de(function(){ke.call(null,Ee||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/a-callable"),Ee=oe("../internals/to-object"),ke=oe("../internals/indexed-object"),Se=oe("../internals/length-of-array-like"),Ae=de.TypeError,me=function(Pe){return function(fe,z,te,se){ve(z);var ie=Ee(fe),le=ke(ie),ce=Se(ie),pe=Pe?ce-1:0,xe=Pe?-1:1;if(te<2)for(;;){if(pe in le){se=le[pe],pe+=xe;break}if(pe+=xe,Pe?pe<0:ce<=pe)throw Ae("Reduce of empty array with no initial value")}for(;Pe?pe>=0:ce>pe;pe+=xe)pe in le&&(se=z(se,le[pe],pe,ie));return se}};Ue.exports={left:me(!1),right:me(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/to-absolute-index"),Ee=oe("../internals/length-of-array-like"),ke=oe("../internals/create-property"),Se=de.Array,Ae=Math.max;Ue.exports=function(me,Pe,fe){for(var z=Ee(me),te=ve(Pe,z),se=ve(fe===void 0?z:fe,z),ie=Se(Ae(se-te,0)),le=0;te<se;te++,le++)ke(ie,le,me[te]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this");Ue.exports=de([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,Ue,_e){var de=oe("../internals/array-slice-simple"),ve=Math.floor,Ee=function(Ae,me){var Pe=Ae.length,fe=ve(Pe/2);return Pe<8?ke(Ae,me):Se(Ae,Ee(de(Ae,0,fe),me),Ee(de(Ae,fe),me),me)},ke=function(Ae,me){for(var Pe=Ae.length,fe=1,z,te;fe<Pe;){for(te=fe,z=Ae[fe];te&&me(Ae[te-1],z)>0;)Ae[te]=Ae[--te];te!==fe++&&(Ae[te]=z)}return Ae},Se=function(Ae,me,Pe,fe){for(var z=me.length,te=Pe.length,se=0,ie=0;se<z||ie<te;)Ae[se+ie]=se<z&&ie<te?fe(me[se],Pe[ie])<=0?me[se++]:Pe[ie++]:se<z?me[se++]:Pe[ie++];return Ae};Ue.exports=Ee},{"../internals/array-slice-simple":116}],119:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-array"),Ee=oe("../internals/is-constructor"),ke=oe("../internals/is-object"),Se=oe("../internals/well-known-symbol"),Ae=Se("species"),me=de.Array;Ue.exports=function(Pe){var fe;return ve(Pe)&&(fe=Pe.constructor,Ee(fe)&&(fe===me||ve(fe.prototype))?fe=void 0:ke(fe)&&(fe=fe[Ae],fe===null&&(fe=void 0))),fe===void 0?me:fe}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,Ue,_e){var de=oe("../internals/array-species-constructor");Ue.exports=function(ve,Ee){return new(de(ve))(Ee===0?0:Ee)}},{"../internals/array-species-constructor":119}],121:[function(oe,Ue,_e){var de=oe("../internals/an-object"),ve=oe("../internals/iterator-close");Ue.exports=function(Ee,ke,Se,Ae){try{return Ae?ke(de(Se)[0],Se[1]):ke(Se)}catch(me){ve(Ee,"throw",me)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol"),ve=de("iterator"),Ee=!1;try{var ke=0,Se={next:function(){return{done:!!ke++}},return:function(){Ee=!0}};Se[ve]=function(){return this},Array.from(Se,function(){throw 2})}catch(Ae){}Ue.exports=function(Ae,me){if(!me&&!Ee)return!1;var Pe=!1;try{var fe={};fe[ve]=function(){return{next:function(){return{done:Pe=!0}}}},Ae(fe)}catch(z){}return Pe}},{"../internals/well-known-symbol":268}],123:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=de({}.toString),Ee=de("".slice);Ue.exports=function(ke){return Ee(ve(ke),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/to-string-tag-support"),Ee=oe("../internals/is-callable"),ke=oe("../internals/classof-raw"),Se=oe("../internals/well-known-symbol"),Ae=Se("toStringTag"),me=de.Object,Pe=ke(function(){return arguments}())=="Arguments",fe=function(z,te){try{return z[te]}catch(se){}};Ue.exports=ve?ke:function(z){var te,se,ie;return z===void 0?"Undefined":z===null?"Null":typeof(se=fe(te=me(z),Ae))=="string"?se:Pe?ke(te):(ie=ke(te))=="Object"&&Ee(te.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(oe,Ue,_e){var de=oe("../internals/has-own-property"),ve=oe("../internals/own-keys"),Ee=oe("../internals/object-get-own-property-descriptor"),ke=oe("../internals/object-define-property");Ue.exports=function(Se,Ae,me){for(var Pe=ve(Ae),fe=ke.f,z=Ee.f,te=0;te<Pe.length;te++){var se=Pe[te];!de(Se,se)&&!(me&&de(me,se))&&fe(Se,se,z(Ae,se))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol"),ve=de("match");Ue.exports=function(Ee){var ke=/./;try{"/./"[Ee](ke)}catch(Se){try{return ke[ve]=!1,"/./"[Ee](ke)}catch(Ae){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,Ue,_e){var de=oe("../internals/fails");Ue.exports=!de(function(){function ve(){}return ve.prototype.constructor=null,Object.getPrototypeOf(new ve)!==ve.prototype})},{"../internals/fails":150}],128:[function(oe,Ue,_e){"use strict";var de=oe("../internals/iterators-core").IteratorPrototype,ve=oe("../internals/object-create"),Ee=oe("../internals/create-property-descriptor"),ke=oe("../internals/set-to-string-tag"),Se=oe("../internals/iterators"),Ae=function(){return this};Ue.exports=function(me,Pe,fe,z){var te=Pe+" Iterator";return me.prototype=ve(de,{next:Ee(+!z,fe)}),ke(me,te,!1,!0),Se[te]=Ae,me}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");Ue.exports=de?function(ke,Se,Ae){return ve.f(ke,Se,Ee(1,Ae))}:function(ke,Se,Ae){return ke[Se]=Ae,ke}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,Ue,_e){Ue.exports=function(de,ve){return{enumerable:!(de&1),configurable:!(de&2),writable:!(de&4),value:ve}}},{}],131:[function(oe,Ue,_e){"use strict";var de=oe("../internals/to-property-key"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/create-property-descriptor");Ue.exports=function(ke,Se,Ae){var me=de(Se);me in ke?ve.f(ke,me,Ee(0,Ae)):ke[me]=Ae}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-pure"),ke=oe("../internals/function-name"),Se=oe("../internals/is-callable"),Ae=oe("../internals/create-iterator-constructor"),me=oe("../internals/object-get-prototype-of"),Pe=oe("../internals/object-set-prototype-of"),fe=oe("../internals/set-to-string-tag"),z=oe("../internals/create-non-enumerable-property"),te=oe("../internals/redefine"),se=oe("../internals/well-known-symbol"),ie=oe("../internals/iterators"),le=oe("../internals/iterators-core"),ce=ke.PROPER,pe=ke.CONFIGURABLE,xe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,De=se("iterator"),Fe="keys",Te="values",Me="entries",Be=function(){return this};Ue.exports=function(Ge,Ye,Ke,Ve,ot,ut,ft){Ae(Ke,Ye,Ve);var St=function(yt){if(yt===ot&&bt)return bt;if(!je&&yt in wt)return wt[yt];switch(yt){case Fe:return function(){return new Ke(this,yt)};case Te:return function(){return new Ke(this,yt)};case Me:return function(){return new Ke(this,yt)}}return function(){return new Ke(this)}},Qe=Ye+" Iterator",rt=!1,wt=Ge.prototype,Ct=wt[De]||wt["@@iterator"]||ot&&wt[ot],bt=!je&&Ct||St(ot),ct=Ye=="Array"&&wt.entries||Ct,xt,dt,Mt;if(ct&&(xt=me(ct.call(new Ge)),xt!==Object.prototype&&xt.next&&(!Ee&&me(xt)!==xe&&(Pe?Pe(xt,xe):Se(xt[De])||te(xt,De,Be)),fe(xt,Qe,!0,!0),Ee&&(ie[Qe]=Be))),ce&&ot==Te&&Ct&&Ct.name!==Te&&(!Ee&&pe?z(wt,"name",Te):(rt=!0,bt=function(){return ve(Ct,this)})),ot)if(dt={values:St(Te),keys:ut?bt:St(Fe),entries:St(Me)},ft)for(Mt in dt)(je||rt||!(Mt in wt))&&te(wt,Mt,dt[Mt]);else de({target:Ye,proto:!0,forced:je||rt},dt);return(!Ee||ft)&&wt[De]!==bt&&te(wt,De,bt,{name:ot}),ie[Ye]=bt,dt}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(oe,Ue,_e){var de=oe("../internals/path"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/well-known-symbol-wrapped"),ke=oe("../internals/object-define-property").f;Ue.exports=function(Se){var Ae=de.Symbol||(de.Symbol={});ve(Ae,Se)||ke(Ae,Se,{value:Ee.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,Ue,_e){var de=oe("../internals/fails");Ue.exports=!de(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-object"),Ee=de.document,ke=ve(Ee)&&ve(Ee.createElement);Ue.exports=function(Se){return ke?Ee.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,Ue,_e){Ue.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(oe,Ue,_e){var de=oe("../internals/document-create-element"),ve=de("span").classList,Ee=ve&&ve.constructor&&ve.constructor.prototype;Ue.exports=Ee===Object.prototype?void 0:Ee},{"../internals/document-create-element":135}],138:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent"),ve=de.match(/firefox\/(\d+)/i);Ue.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],139:[function(oe,Ue,_e){Ue.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent");Ue.exports=/MSIE|Trident/.test(de)},{"../internals/engine-user-agent":145}],141:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent"),ve=oe("../internals/global");Ue.exports=/ipad|iphone|ipod/i.test(de)&&ve.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent");Ue.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(de)},{"../internals/engine-user-agent":145}],143:[function(oe,Ue,_e){var de=oe("../internals/classof-raw"),ve=oe("../internals/global");Ue.exports=de(ve.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent");Ue.exports=/web0s(?!.*chrome)/i.test(de)},{"../internals/engine-user-agent":145}],145:[function(oe,Ue,_e){var de=oe("../internals/get-built-in");Ue.exports=de("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/engine-user-agent"),Ee=de.process,ke=de.Deno,Se=Ee&&Ee.versions||ke&&ke.version,Ae=Se&&Se.v8,me,Pe;Ae&&(me=Ae.split("."),Pe=me[0]>0&&me[0]<4?1:+(me[0]+me[1])),!Pe&&ve&&(me=ve.match(/Edge\/(\d+)/),(!me||me[1]>=74)&&(me=ve.match(/Chrome\/(\d+)/),me&&(Pe=+me[1]))),Ue.exports=Pe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,Ue,_e){var de=oe("../internals/engine-user-agent"),ve=de.match(/AppleWebKit\/(\d+)\./);Ue.exports=!!ve&&+ve[1]},{"../internals/engine-user-agent":145}],148:[function(oe,Ue,_e){Ue.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/object-get-own-property-descriptor").f,Ee=oe("../internals/create-non-enumerable-property"),ke=oe("../internals/redefine"),Se=oe("../internals/set-global"),Ae=oe("../internals/copy-constructor-properties"),me=oe("../internals/is-forced");Ue.exports=function(Pe,fe){var z=Pe.target,te=Pe.global,se=Pe.stat,ie,le,ce,pe,xe,je;if(te?le=de:se?le=de[z]||Se(z,{}):le=(de[z]||{}).prototype,le)for(ce in fe){if(xe=fe[ce],Pe.noTargetGet?(je=ve(le,ce),pe=je&&je.value):pe=le[ce],ie=me(te?ce:z+(se?".":"#")+ce,Pe.forced),!ie&&pe!==void 0){if(typeof xe==typeof pe)continue;Ae(xe,pe)}(Pe.sham||pe&&pe.sham)&&Ee(xe,"sham",!0),ke(le,ce,xe,Pe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(oe,Ue,_e){Ue.exports=function(de){try{return!!de()}catch(ve){return!0}}},{}],151:[function(oe,Ue,_e){"use strict";oe("../modules/es.regexp.exec");var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/redefine"),Ee=oe("../internals/regexp-exec"),ke=oe("../internals/fails"),Se=oe("../internals/well-known-symbol"),Ae=oe("../internals/create-non-enumerable-property"),me=Se("species"),Pe=RegExp.prototype;Ue.exports=function(fe,z,te,se){var ie=Se(fe),le=!ke(function(){var je={};return je[ie]=function(){return 7},""[fe](je)!=7}),ce=le&&!ke(function(){var je=!1,De=/a/;return fe==="split"&&(De={},De.constructor={},De.constructor[me]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return je=!0,null},De[ie](""),!je});if(!le||!ce||te){var pe=de(/./[ie]),xe=z(ie,""[fe],function(je,De,Fe,Te,Me){var Be=de(je),Ge=De.exec;return Ge===Ee||Ge===Pe.exec?le&&!Me?{done:!0,value:pe(De,Fe,Te)}:{done:!0,value:Be(Fe,De,Te)}:{done:!1}});ve(String.prototype,fe,xe[0]),ve(Pe,ie,xe[1])}se&&Ae(Pe[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(oe,Ue,_e){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.apply,ke=ve.call;Ue.exports=typeof Reflect=="object"&&Reflect.apply||(de?ke.bind(Ee):function(){return ke.apply(Ee,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/a-callable"),Ee=oe("../internals/function-bind-native"),ke=de(de.bind);Ue.exports=function(Se,Ae){return ve(Se),Ae===void 0?Se:Ee?ke(Se,Ae):function(){return Se.apply(Ae,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,Ue,_e){var de=oe("../internals/fails");Ue.exports=!de(function(){var ve=function(){}.bind();return typeof ve!="function"||ve.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,Ue,_e){var de=oe("../internals/function-bind-native"),ve=Function.prototype.call;Ue.exports=de?ve.bind(ve):function(){return ve.apply(ve,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/has-own-property"),Ee=Function.prototype,ke=de&&Object.getOwnPropertyDescriptor,Se=ve(Ee,"name"),Ae=Se&&function(){}.name==="something",me=Se&&(!de||de&&ke(Ee,"name").configurable);Ue.exports={EXISTS:Se,PROPER:Ae,CONFIGURABLE:me}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,Ue,_e){var de=oe("../internals/function-bind-native"),ve=Function.prototype,Ee=ve.bind,ke=ve.call,Se=de&&Ee.bind(ke,ke);Ue.exports=de?function(Ae){return Ae&&Se(Ae)}:function(Ae){return Ae&&function(){return ke.apply(Ae,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=function(ke){return ve(ke)?ke:void 0};Ue.exports=function(ke,Se){return arguments.length<2?Ee(de[ke]):de[ke]&&de[ke][Se]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(oe,Ue,_e){var de=oe("../internals/classof"),ve=oe("../internals/get-method"),Ee=oe("../internals/iterators"),ke=oe("../internals/well-known-symbol"),Se=ke("iterator");Ue.exports=function(Ae){if(Ae!=null)return ve(Ae,Se)||ve(Ae,"@@iterator")||Ee[de(Ae)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Ae=oe("../internals/get-iterator-method"),me=de.TypeError;Ue.exports=function(Pe,fe){var z=arguments.length<2?Ae(Pe):fe;if(Ee(z))return ke(ve(z,Pe));throw me(Se(Pe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(oe,Ue,_e){var de=oe("../internals/a-callable");Ue.exports=function(ve,Ee){var ke=ve[Ee];return ke==null?void 0:de(ke)}},{"../internals/a-callable":95}],162:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=Math.floor,ke=de("".charAt),Se=de("".replace),Ae=de("".slice),me=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Pe=/\$([$&'`]|\d{1,2})/g;Ue.exports=function(fe,z,te,se,ie,le){var ce=te+fe.length,pe=se.length,xe=Pe;return ie!==void 0&&(ie=ve(ie),xe=me),Se(le,xe,function(je,De){var Fe;switch(ke(De,0)){case"$":return"$";case"&":return fe;case"`":return Ae(z,0,te);case"'":return Ae(z,ce);case"<":Fe=ie[Ae(De,1,-1)];break;default:var Te=+De;if(Te===0)return je;if(Te>pe){var Me=Ee(Te/10);return Me===0?je:Me<=pe?se[Me-1]===void 0?ke(De,1):se[Me-1]+ke(De,1):je}Fe=se[Te-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,Ue,_e){(function(de){(function(){var ve=function(Ee){return Ee&&Ee.Math==Math&&Ee};Ue.exports=ve(typeof globalThis=="object"&&globalThis)||ve(typeof window=="object"&&window)||ve(typeof self=="object"&&self)||ve(typeof de=="object"&&de)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-object"),Ee=de({}.hasOwnProperty);Ue.exports=Object.hasOwn||function(Se,Ae){return Ee(ve(Se),Ae)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,Ue,_e){Ue.exports={}},{}],166:[function(oe,Ue,_e){var de=oe("../internals/global");Ue.exports=function(ve,Ee){var ke=de.console;ke&&ke.error&&(arguments.length==1?ke.error(ve):ke.error(ve,Ee))}},{"../internals/global":163}],167:[function(oe,Ue,_e){var de=oe("../internals/get-built-in");Ue.exports=de("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/fails"),Ee=oe("../internals/document-create-element");Ue.exports=!de&&!ve(function(){return Object.defineProperty(Ee("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=de.Array,Ee=Math.abs,ke=Math.pow,Se=Math.floor,Ae=Math.log,me=Math.LN2,Pe=function(z,te,se){var ie=ve(se),le=se*8-te-1,ce=(1<<le)-1,pe=ce>>1,xe=te===23?ke(2,-24)-ke(2,-77):0,je=z<0||z===0&&1/z<0?1:0,De=0,Fe,Te,Me;for(z=Ee(z),z!=z||z===1/0?(Te=z!=z?1:0,Fe=ce):(Fe=Se(Ae(z)/me),Me=ke(2,-Fe),z*Me<1&&(Fe--,Me*=2),Fe+pe>=1?z+=xe/Me:z+=xe*ke(2,1-pe),z*Me>=2&&(Fe++,Me/=2),Fe+pe>=ce?(Te=0,Fe=ce):Fe+pe>=1?(Te=(z*Me-1)*ke(2,te),Fe=Fe+pe):(Te=z*ke(2,pe-1)*ke(2,te),Fe=0));te>=8;)ie[De++]=Te&255,Te/=256,te-=8;for(Fe=Fe<<te|Te,le+=te;le>0;)ie[De++]=Fe&255,Fe/=256,le-=8;return ie[--De]|=je*128,ie},fe=function(z,te){var se=z.length,ie=se*8-te-1,le=(1<<ie)-1,ce=le>>1,pe=ie-7,xe=se-1,je=z[xe--],De=je&127,Fe;for(je>>=7;pe>0;)De=De*256+z[xe--],pe-=8;for(Fe=De&(1<<-pe)-1,De>>=-pe,pe+=te;pe>0;)Fe=Fe*256+z[xe--],pe-=8;if(De===0)De=1-ce;else{if(De===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+ke(2,te),De=De-ce}return(je?-1:1)*Fe*ke(2,De-te)};Ue.exports={pack:Pe,unpack:fe}},{"../internals/global":163}],170:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/classof-raw"),Se=de.Object,Ae=ve("".split);Ue.exports=Ee(function(){return!Se("z").propertyIsEnumerable(0)})?function(me){return ke(me)=="String"?Ae(me,""):Se(me)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,Ue,_e){var de=oe("../internals/is-callable"),ve=oe("../internals/is-object"),Ee=oe("../internals/object-set-prototype-of");Ue.exports=function(ke,Se,Ae){var me,Pe;return Ee&&de(me=Se.constructor)&&me!==Ae&&ve(Pe=me.prototype)&&Pe!==Ae.prototype&&Ee(ke,Pe),ke}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/is-callable"),Ee=oe("../internals/shared-store"),ke=de(Function.toString);ve(Ee.inspectSource)||(Ee.inspectSource=function(Se){return ke(Se)}),Ue.exports=Ee.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,Ue,_e){var de=oe("../internals/native-weak-map"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-object"),Se=oe("../internals/create-non-enumerable-property"),Ae=oe("../internals/has-own-property"),me=oe("../internals/shared-store"),Pe=oe("../internals/shared-key"),fe=oe("../internals/hidden-keys"),z="Object already initialized",te=ve.TypeError,se=ve.WeakMap,ie,le,ce,pe=function(Be){return ce(Be)?le(Be):ie(Be,{})},xe=function(Be){return function(Ge){var Ye;if(!ke(Ge)||(Ye=le(Ge)).type!==Be)throw te("Incompatible receiver, "+Be+" required");return Ye}};if(de||me.state){var je=me.state||(me.state=new se),De=Ee(je.get),Fe=Ee(je.has),Te=Ee(je.set);ie=function(Be,Ge){if(Fe(je,Be))throw new te(z);return Ge.facade=Be,Te(je,Be,Ge),Ge},le=function(Be){return De(je,Be)||{}},ce=function(Be){return Fe(je,Be)}}else{var Me=Pe("state");fe[Me]=!0,ie=function(Be,Ge){if(Ae(Be,Me))throw new te(z);return Ge.facade=Be,Se(Be,Me,Ge),Ge},le=function(Be){return Ae(Be,Me)?Be[Me]:{}},ce=function(Be){return Ae(Be,Me)}}Ue.exports={set:ie,get:le,has:ce,enforce:pe,getterFor:xe}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol"),ve=oe("../internals/iterators"),Ee=de("iterator"),ke=Array.prototype;Ue.exports=function(Se){return Se!==void 0&&(ve.Array===Se||ke[Ee]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,Ue,_e){var de=oe("../internals/classof-raw");Ue.exports=Array.isArray||function(Ee){return de(Ee)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,Ue,_e){Ue.exports=function(de){return typeof de=="function"}},{}],177:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/fails"),Ee=oe("../internals/is-callable"),ke=oe("../internals/classof"),Se=oe("../internals/get-built-in"),Ae=oe("../internals/inspect-source"),me=function(){},Pe=[],fe=Se("Reflect","construct"),z=/^\s*(?:class|function)\b/,te=de(z.exec),se=!z.exec(me),ie=function(pe){if(!Ee(pe))return!1;try{return fe(me,Pe,pe),!0}catch(xe){return!1}},le=function(pe){if(!Ee(pe))return!1;switch(ke(pe)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return se||!!te(z,Ae(pe))}catch(xe){return!0}};le.sham=!0,Ue.exports=!fe||ve(function(){var ce;return ie(ie.call)||!ie(Object)||!ie(function(){ce=!0})||ce})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(oe,Ue,_e){var de=oe("../internals/fails"),ve=oe("../internals/is-callable"),Ee=/#|\.prototype\./,ke=function(fe,z){var te=Ae[Se(fe)];return te==Pe?!0:te==me?!1:ve(z)?de(z):!!z},Se=ke.normalize=function(fe){return String(fe).replace(Ee,".").toLowerCase()},Ae=ke.data={},me=ke.NATIVE="N",Pe=ke.POLYFILL="P";Ue.exports=ke},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,Ue,_e){var de=oe("../internals/is-object"),ve=Math.floor;Ue.exports=Number.isInteger||function(ke){return!de(ke)&&isFinite(ke)&&ve(ke)===ke}},{"../internals/is-object":180}],180:[function(oe,Ue,_e){var de=oe("../internals/is-callable");Ue.exports=function(ve){return typeof ve=="object"?ve!==null:de(ve)}},{"../internals/is-callable":176}],181:[function(oe,Ue,_e){Ue.exports=!1},{}],182:[function(oe,Ue,_e){var de=oe("../internals/is-object"),ve=oe("../internals/classof-raw"),Ee=oe("../internals/well-known-symbol"),ke=Ee("match");Ue.exports=function(Se){var Ae;return de(Se)&&((Ae=Se[ke])!==void 0?!!Ae:ve(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/is-callable"),ke=oe("../internals/object-is-prototype-of"),Se=oe("../internals/use-symbol-as-uid"),Ae=de.Object;Ue.exports=Se?function(me){return typeof me=="symbol"}:function(me){var Pe=ve("Symbol");return Ee(Pe)&&ke(Pe.prototype,Ae(me))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/function-call"),ke=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Ae=oe("../internals/is-array-iterator-method"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/get-iterator"),z=oe("../internals/get-iterator-method"),te=oe("../internals/iterator-close"),se=de.TypeError,ie=function(ce,pe){this.stopped=ce,this.result=pe},le=ie.prototype;Ue.exports=function(ce,pe,xe){var je=xe&&xe.that,De=!!(xe&&xe.AS_ENTRIES),Fe=!!(xe&&xe.IS_ITERATOR),Te=!!(xe&&xe.INTERRUPTED),Me=ve(pe,je),Be,Ge,Ye,Ke,Ve,ot,ut,ft=function(Qe){return Be&&te(Be,"normal",Qe),new ie(!0,Qe)},St=function(Qe){return De?(ke(Qe),Te?Me(Qe[0],Qe[1],ft):Me(Qe[0],Qe[1])):Te?Me(Qe,ft):Me(Qe)};if(Fe)Be=ce;else{if(Ge=z(ce),!Ge)throw se(Se(ce)+" is not iterable");if(Ae(Ge)){for(Ye=0,Ke=me(ce);Ke>Ye;Ye++)if(Ve=St(ce[Ye]),Ve&&Pe(le,Ve))return Ve;return new ie(!1)}Be=fe(ce,Ge)}for(ot=Be.next;!(ut=Ee(ot,Be)).done;){try{Ve=St(ut.value)}catch(Qe){te(Be,"throw",Qe)}if(typeof Ve=="object"&&Ve&&Pe(le,Ve))return Ve}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(oe,Ue,_e){var de=oe("../internals/function-call"),ve=oe("../internals/an-object"),Ee=oe("../internals/get-method");Ue.exports=function(ke,Se,Ae){var me,Pe;ve(ke);try{if(me=Ee(ke,"return"),!me){if(Se==="throw")throw Ae;return Ae}me=de(me,ke)}catch(fe){Pe=!0,me=fe}if(Se==="throw")throw Ae;if(Pe)throw me;return ve(me),Ae}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,Ue,_e){"use strict";var de=oe("../internals/fails"),ve=oe("../internals/is-callable"),Ee=oe("../internals/object-create"),ke=oe("../internals/object-get-prototype-of"),Se=oe("../internals/redefine"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/is-pure"),Pe=Ae("iterator"),fe=!1,z,te,se;[].keys&&(se=[].keys(),"next"in se?(te=ke(ke(se)),te!==Object.prototype&&(z=te)):fe=!0);var ie=z==null||de(function(){var le={};return z[Pe].call(le)!==le});ie?z={}:me&&(z=Ee(z)),ve(z[Pe])||Se(z,Pe,function(){return this}),Ue.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:fe}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(oe,Ue,_e){arguments[4][165][0].apply(_e,arguments)},{dup:165}],188:[function(oe,Ue,_e){var de=oe("../internals/to-length");Ue.exports=function(ve){return de(ve.length)}},{"../internals/to-length":249}],189:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-bind-context"),Ee=oe("../internals/object-get-own-property-descriptor").f,ke=oe("../internals/task").set,Se=oe("../internals/engine-is-ios"),Ae=oe("../internals/engine-is-ios-pebble"),me=oe("../internals/engine-is-webos-webkit"),Pe=oe("../internals/engine-is-node"),fe=de.MutationObserver||de.WebKitMutationObserver,z=de.document,te=de.process,se=de.Promise,ie=Ee(de,"queueMicrotask"),le=ie&&ie.value,ce,pe,xe,je,De,Fe,Te,Me;le||(ce=function(){var Be,Ge;for(Pe&&(Be=te.domain)&&Be.exit();pe;){Ge=pe.fn,pe=pe.next;try{Ge()}catch(Ye){throw pe?je():xe=void 0,Ye}}xe=void 0,Be&&Be.enter()},!Se&&!Pe&&!me&&fe&&z?(De=!0,Fe=z.createTextNode(""),new fe(ce).observe(Fe,{characterData:!0}),je=function(){Fe.data=De=!De}):!Ae&&se&&se.resolve?(Te=se.resolve(void 0),Te.constructor=se,Me=ve(Te.then,Te),je=function(){Me(ce)}):Pe?je=function(){te.nextTick(ce)}:(ke=ve(ke,de),je=function(){ke(ce)})),Ue.exports=le||function(Be){var Ge={fn:Be,next:void 0};xe&&(xe.next=Ge),pe||(pe=Ge,je()),xe=Ge}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(oe,Ue,_e){var de=oe("../internals/native-symbol");Ue.exports=de&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,Ue,_e){var de=oe("../internals/engine-v8-version"),ve=oe("../internals/fails");Ue.exports=!!Object.getOwnPropertySymbols&&!ve(function(){var Ee=Symbol();return!String(Ee)||!(Object(Ee)instanceof Symbol)||!Symbol.sham&&de&&de<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/inspect-source"),ke=de.WeakMap;Ue.exports=ve(ke)&&/native code/.test(Ee(ke))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,Ue,_e){"use strict";var de=oe("../internals/a-callable"),ve=function(Ee){var ke,Se;this.promise=new Ee(function(Ae,me){if(ke!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");ke=Ae,Se=me}),this.resolve=de(ke),this.reject=de(Se)};Ue.exports.f=function(Ee){return new ve(Ee)}},{"../internals/a-callable":95}],194:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-regexp"),Ee=de.TypeError;Ue.exports=function(ke){if(ve(ke))throw Ee("The method doesn't accept regular expressions");return ke}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(oe,Ue,_e){"use strict";var de=oe("../internals/descriptors"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/function-call"),ke=oe("../internals/fails"),Se=oe("../internals/object-keys"),Ae=oe("../internals/object-get-own-property-symbols"),me=oe("../internals/object-property-is-enumerable"),Pe=oe("../internals/to-object"),fe=oe("../internals/indexed-object"),z=Object.assign,te=Object.defineProperty,se=ve([].concat);Ue.exports=!z||ke(function(){if(de&&z({b:1},z(te({},"a",{enumerable:!0,get:function(){te(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ce=Symbol(),pe="abcdefghijklmnopqrst";return ie[ce]=7,pe.split("").forEach(function(xe){le[xe]=xe}),z({},ie)[ce]!=7||Se(z({},le)).join("")!=pe})?function(le,ce){for(var pe=Pe(le),xe=arguments.length,je=1,De=Ae.f,Fe=me.f;xe>je;)for(var Te=fe(arguments[je++]),Me=De?se(Se(Te),De(Te)):Se(Te),Be=Me.length,Ge=0,Ye;Be>Ge;)Ye=Me[Ge++],(!de||Ee(Fe,Te,Ye))&&(pe[Ye]=Te[Ye]);return pe}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(oe,Ue,_e){var de=oe("../internals/an-object"),ve=oe("../internals/object-define-properties"),Ee=oe("../internals/enum-bug-keys"),ke=oe("../internals/hidden-keys"),Se=oe("../internals/html"),Ae=oe("../internals/document-create-element"),me=oe("../internals/shared-key"),Pe=">",fe="<",z="prototype",te="script",se=me("IE_PROTO"),ie=function(){},le=function(De){return fe+te+Pe+De+fe+"/"+te+Pe},ce=function(De){De.write(le("")),De.close();var Fe=De.parentWindow.Object;return De=null,Fe},pe=function(){var De=Ae("iframe"),Fe="java"+te+":",Te;return De.style.display="none",Se.appendChild(De),De.src=String(Fe),Te=De.contentWindow.document,Te.open(),Te.write(le("document.F=Object")),Te.close(),Te.F},xe,je=function(){try{xe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&xe?ce(xe):pe():ce(xe);for(var De=Ee.length;De--;)delete je[z][Ee[De]];return je()};ke[se]=!0,Ue.exports=Object.create||function(Fe,Te){var Me;return Fe!==null?(ie[z]=de(Fe),Me=new ie,ie[z]=null,Me[se]=Fe):Me=je(),Te===void 0?Me:ve.f(Me,Te)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/v8-prototype-define-bug"),Ee=oe("../internals/object-define-property"),ke=oe("../internals/an-object"),Se=oe("../internals/to-indexed-object"),Ae=oe("../internals/object-keys");_e.f=de&&!ve?Object.defineProperties:function(Pe,fe){ke(Pe);for(var z=Se(fe),te=Ae(fe),se=te.length,ie=0,le;se>ie;)Ee.f(Pe,le=te[ie++],z[le]);return Pe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/descriptors"),Ee=oe("../internals/ie8-dom-define"),ke=oe("../internals/v8-prototype-define-bug"),Se=oe("../internals/an-object"),Ae=oe("../internals/to-property-key"),me=de.TypeError,Pe=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",te="configurable",se="writable";_e.f=ve?ke?function(le,ce,pe){if(Se(le),ce=Ae(ce),Se(pe),typeof le=="function"&&ce==="prototype"&&"value"in pe&&se in pe&&!pe[se]){var xe=fe(le,ce);xe&&xe[se]&&(le[ce]=pe.value,pe={configurable:te in pe?pe[te]:xe[te],enumerable:z in pe?pe[z]:xe[z],writable:!1})}return Pe(le,ce,pe)}:Pe:function(le,ce,pe){if(Se(le),ce=Ae(ce),Se(pe),Ee)try{return Pe(le,ce,pe)}catch(xe){}if("get"in pe||"set"in pe)throw me("Accessors not supported");return"value"in pe&&(le[ce]=pe.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/function-call"),Ee=oe("../internals/object-property-is-enumerable"),ke=oe("../internals/create-property-descriptor"),Se=oe("../internals/to-indexed-object"),Ae=oe("../internals/to-property-key"),me=oe("../internals/has-own-property"),Pe=oe("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;_e.f=de?fe:function(te,se){if(te=Se(te),se=Ae(se),Pe)try{return fe(te,se)}catch(ie){}if(me(te,se))return ke(!ve(Ee.f,te,se),te[se])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(oe,Ue,_e){var de=oe("../internals/classof-raw"),ve=oe("../internals/to-indexed-object"),Ee=oe("../internals/object-get-own-property-names").f,ke=oe("../internals/array-slice-simple"),Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ae=function(me){try{return Ee(me)}catch(Pe){return ke(Se)}};Ue.exports.f=function(Pe){return Se&&de(Pe)=="Window"?Ae(Pe):Ee(ve(Pe))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(oe,Ue,_e){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys"),Ee=ve.concat("length","prototype");_e.f=Object.getOwnPropertyNames||function(Se){return de(Se,Ee)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,Ue,_e){_e.f=Object.getOwnPropertySymbols},{}],203:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/is-callable"),ke=oe("../internals/to-object"),Se=oe("../internals/shared-key"),Ae=oe("../internals/correct-prototype-getter"),me=Se("IE_PROTO"),Pe=de.Object,fe=Pe.prototype;Ue.exports=Ae?Pe.getPrototypeOf:function(z){var te=ke(z);if(ve(te,me))return te[me];var se=te.constructor;return Ee(se)&&te instanceof se?se.prototype:te instanceof Pe?fe:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this");Ue.exports=de({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/to-indexed-object"),ke=oe("../internals/array-includes").indexOf,Se=oe("../internals/hidden-keys"),Ae=de([].push);Ue.exports=function(me,Pe){var fe=Ee(me),z=0,te=[],se;for(se in fe)!ve(Se,se)&&ve(fe,se)&&Ae(te,se);for(;Pe.length>z;)ve(fe,se=Pe[z++])&&(~ke(te,se)||Ae(te,se));return te}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(oe,Ue,_e){var de=oe("../internals/object-keys-internal"),ve=oe("../internals/enum-bug-keys");Ue.exports=Object.keys||function(ke){return de(ke,ve)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,Ue,_e){"use strict";var de={}.propertyIsEnumerable,ve=Object.getOwnPropertyDescriptor,Ee=ve&&!de.call({1:2},1);_e.f=Ee?function(Se){var Ae=ve(this,Se);return!!Ae&&Ae.enumerable}:de},{}],208:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/an-object"),Ee=oe("../internals/a-possible-prototype");Ue.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var ke=!1,Se={},Ae;try{Ae=de(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Ae(Se,[]),ke=Se instanceof Array}catch(me){}return function(Pe,fe){return ve(Pe),Ee(fe),ke?Ae(Pe,fe):Pe.__proto__=fe,Pe}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/object-keys"),ke=oe("../internals/to-indexed-object"),Se=oe("../internals/object-property-is-enumerable").f,Ae=ve(Se),me=ve([].push),Pe=function(fe){return function(z){for(var te=ke(z),se=Ee(te),ie=se.length,le=0,ce=[],pe;ie>le;)pe=se[le++],(!de||Ae(te,pe))&&me(ce,fe?[pe,te[pe]]:te[pe]);return ce}};Ue.exports={entries:Pe(!0),values:Pe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(oe,Ue,_e){"use strict";var de=oe("../internals/to-string-tag-support"),ve=oe("../internals/classof");Ue.exports=de?{}.toString:function(){return"[object "+ve(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-callable"),ke=oe("../internals/is-object"),Se=de.TypeError;Ue.exports=function(Ae,me){var Pe,fe;if(me==="string"&&Ee(Pe=Ae.toString)&&!ke(fe=ve(Pe,Ae))||Ee(Pe=Ae.valueOf)&&!ke(fe=ve(Pe,Ae))||me!=="string"&&Ee(Pe=Ae.toString)&&!ke(fe=ve(Pe,Ae)))return fe;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,Ue,_e){var de=oe("../internals/get-built-in"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/object-get-own-property-names"),ke=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/an-object"),Ae=ve([].concat);Ue.exports=de("Reflect","ownKeys")||function(Pe){var fe=Ee.f(Se(Pe)),z=ke.f;return z?Ae(fe,z(Pe)):fe}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(oe,Ue,_e){var de=oe("../internals/global");Ue.exports=de},{"../internals/global":163}],214:[function(oe,Ue,_e){Ue.exports=function(de){try{return{error:!1,value:de()}}catch(ve){return{error:!0,value:ve}}}},{}],215:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/promise-native-constructor"),Ee=oe("../internals/is-callable"),ke=oe("../internals/is-forced"),Se=oe("../internals/inspect-source"),Ae=oe("../internals/well-known-symbol"),me=oe("../internals/engine-is-browser"),Pe=oe("../internals/is-pure"),fe=oe("../internals/engine-v8-version"),z=ve&&ve.prototype,te=Ae("species"),se=!1,ie=Ee(de.PromiseRejectionEvent),le=ke("Promise",function(){var ce=Se(ve),pe=ce!==String(ve);if(!pe&&fe===66||Pe&&!(z.catch&&z.finally))return!0;if(fe>=51&&/native code/.test(ce))return!1;var xe=new ve(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},De=xe.constructor={};return De[te]=je,se=xe.then(function(){})instanceof je,se?!pe&&me&&!ie:!0});Ue.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:se}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(oe,Ue,_e){var de=oe("../internals/global");Ue.exports=de.Promise},{"../internals/global":163}],217:[function(oe,Ue,_e){var de=oe("../internals/an-object"),ve=oe("../internals/is-object"),Ee=oe("../internals/new-promise-capability");Ue.exports=function(ke,Se){if(de(ke),ve(Se)&&Se.constructor===ke)return Se;var Ae=Ee.f(ke),me=Ae.resolve;return me(Se),Ae.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,Ue,_e){var de=oe("../internals/promise-native-constructor"),ve=oe("../internals/check-correctness-of-iteration"),Ee=oe("../internals/promise-constructor-detection").CONSTRUCTOR;Ue.exports=Ee||!ve(function(ke){de.all(ke).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(oe,Ue,_e){var de=oe("../internals/object-define-property").f;Ue.exports=function(ve,Ee,ke){ke in ve||de(ve,ke,{configurable:!0,get:function(){return Ee[ke]},set:function(Se){Ee[ke]=Se}})}},{"../internals/object-define-property":198}],220:[function(oe,Ue,_e){var de=function(){this.head=null,this.tail=null};de.prototype={add:function(ve){var Ee={item:ve,next:null};this.head?this.tail.next=Ee:this.head=Ee,this.tail=Ee},get:function(){var ve=this.head;if(ve)return this.head=ve.next,this.tail===ve&&(this.tail=null),ve.item}},Ue.exports=de},{}],221:[function(oe,Ue,_e){var de=oe("../internals/redefine");Ue.exports=function(ve,Ee,ke){for(var Se in Ee)de(ve,Se,Ee[Se],ke);return ve}},{"../internals/redefine":222}],222:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/is-callable"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/create-non-enumerable-property"),Se=oe("../internals/set-global"),Ae=oe("../internals/inspect-source"),me=oe("../internals/internal-state"),Pe=oe("../internals/function-name").CONFIGURABLE,fe=me.get,z=me.enforce,te=String(String).split("String");(Ue.exports=function(se,ie,le,ce){var pe=ce?!!ce.unsafe:!1,xe=ce?!!ce.enumerable:!1,je=ce?!!ce.noTargetGet:!1,De=ce&&ce.name!==void 0?ce.name:ie,Fe;if(ve(le)&&(String(De).slice(0,7)==="Symbol("&&(De="["+String(De).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ee(le,"name")||Pe&&le.name!==De)&&ke(le,"name",De),Fe=z(le),Fe.source||(Fe.source=te.join(typeof De=="string"?De:""))),se===de){xe?se[ie]=le:Se(ie,le);return}else pe?!je&&se[ie]&&(xe=!0):delete se[ie];xe?se[ie]=le:ke(se,ie,le)})(Function.prototype,"toString",function(){return ve(this)&&fe(this).source||Ae(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/an-object"),ke=oe("../internals/is-callable"),Se=oe("../internals/classof-raw"),Ae=oe("../internals/regexp-exec"),me=de.TypeError;Ue.exports=function(Pe,fe){var z=Pe.exec;if(ke(z)){var te=ve(z,Pe,fe);return te!==null&&Ee(te),te}if(Se(Pe)==="RegExp")return ve(Ae,Pe,fe);throw me("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/to-string"),ke=oe("../internals/regexp-flags"),Se=oe("../internals/regexp-sticky-helpers"),Ae=oe("../internals/shared"),me=oe("../internals/object-create"),Pe=oe("../internals/internal-state").get,fe=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),te=Ae("native-string-replace",String.prototype.replace),se=RegExp.prototype.exec,ie=se,le=ve("".charAt),ce=ve("".indexOf),pe=ve("".replace),xe=ve("".slice),je=function(){var Me=/a/,Be=/b*/g;return de(se,Me,"a"),de(se,Be,"a"),Me.lastIndex!==0||Be.lastIndex!==0}(),De=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Te=je||Fe||De||fe||z;Te&&(ie=function(Be){var Ge=this,Ye=Pe(Ge),Ke=Ee(Be),Ve=Ye.raw,ot,ut,ft,St,Qe,rt,wt;if(Ve)return Ve.lastIndex=Ge.lastIndex,ot=de(ie,Ve,Ke),Ge.lastIndex=Ve.lastIndex,ot;var Ct=Ye.groups,bt=De&&Ge.sticky,ct=de(ke,Ge),xt=Ge.source,dt=0,Mt=Ke;if(bt&&(ct=pe(ct,"y",""),ce(ct,"g")===-1&&(ct+="g"),Mt=xe(Ke,Ge.lastIndex),Ge.lastIndex>0&&(!Ge.multiline||Ge.multiline&&le(Ke,Ge.lastIndex-1)!==`
|
|
`)&&(xt="(?: "+xt+")",Mt=" "+Mt,dt++),ut=new RegExp("^(?:"+xt+")",ct)),Fe&&(ut=new RegExp("^"+xt+"$(?!\\s)",ct)),je&&(ft=Ge.lastIndex),St=de(se,bt?ut:Ge,Mt),bt?St?(St.input=xe(St.input,dt),St[0]=xe(St[0],dt),St.index=Ge.lastIndex,Ge.lastIndex+=St[0].length):Ge.lastIndex=0:je&&St&&(Ge.lastIndex=Ge.global?St.index+St[0].length:ft),Fe&&St&&St.length>1&&de(te,St[0],ut,function(){for(Qe=1;Qe<arguments.length-2;Qe++)arguments[Qe]===void 0&&(St[Qe]=void 0)}),St&&Ct)for(St.groups=rt=me(null),Qe=0;Qe<Ct.length;Qe++)wt=Ct[Qe],rt[wt[0]]=St[wt[1]];return St}),Ue.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(oe,Ue,_e){"use strict";var de=oe("../internals/an-object");Ue.exports=function(){var ve=de(this),Ee="";return ve.hasIndices&&(Ee+="d"),ve.global&&(Ee+="g"),ve.ignoreCase&&(Ee+="i"),ve.multiline&&(Ee+="m"),ve.dotAll&&(Ee+="s"),ve.unicode&&(Ee+="u"),ve.sticky&&(Ee+="y"),Ee}},{"../internals/an-object":101}],226:[function(oe,Ue,_e){var de=oe("../internals/function-call"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/object-is-prototype-of"),ke=oe("../internals/regexp-flags"),Se=RegExp.prototype;Ue.exports=function(Ae){var me=Ae.flags;return me===void 0&&!("flags"in Se)&&!ve(Ae,"flags")&&Ee(Se,Ae)?de(ke,Ae):me}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,Ue,_e){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp,ke=de(function(){var me=Ee("a","y");return me.lastIndex=2,me.exec("abcd")!=null}),Se=ke||de(function(){return!Ee("a","y").sticky}),Ae=ke||de(function(){var me=Ee("^r","gy");return me.lastIndex=2,me.exec("str")!=null});Ue.exports={BROKEN_CARET:Ae,MISSED_STICKY:Se,UNSUPPORTED_Y:ke}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,Ue,_e){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;Ue.exports=de(function(){var ke=Ee(".","s");return!(ke.dotAll&&ke.exec(`
|
|
`)&&ke.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,Ue,_e){var de=oe("../internals/fails"),ve=oe("../internals/global"),Ee=ve.RegExp;Ue.exports=de(function(){var ke=Ee("(?<a>b)","g");return ke.exec("b").groups.a!=="b"||"b".replace(ke,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=de.TypeError;Ue.exports=function(Ee){if(Ee==null)throw ve("Can't call method on "+Ee);return Ee}},{"../internals/global":163}],231:[function(oe,Ue,_e){Ue.exports=Object.is||function(ve,Ee){return ve===Ee?ve!==0||1/ve===1/Ee:ve!=ve&&Ee!=Ee}},{}],232:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=Object.defineProperty;Ue.exports=function(Ee,ke){try{ve(de,Ee,{value:ke,configurable:!0,writable:!0})}catch(Se){de[Ee]=ke}return ke}},{"../internals/global":163}],233:[function(oe,Ue,_e){"use strict";var de=oe("../internals/get-built-in"),ve=oe("../internals/object-define-property"),Ee=oe("../internals/well-known-symbol"),ke=oe("../internals/descriptors"),Se=Ee("species");Ue.exports=function(Ae){var me=de(Ae),Pe=ve.f;ke&&me&&!me[Se]&&Pe(me,Se,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(oe,Ue,_e){var de=oe("../internals/object-define-property").f,ve=oe("../internals/has-own-property"),Ee=oe("../internals/well-known-symbol"),ke=Ee("toStringTag");Ue.exports=function(Se,Ae,me){Se&&!me&&(Se=Se.prototype),Se&&!ve(Se,ke)&&de(Se,ke,{configurable:!0,value:Ae})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,Ue,_e){var de=oe("../internals/shared"),ve=oe("../internals/uid"),Ee=de("keys");Ue.exports=function(ke){return Ee[ke]||(Ee[ke]=ve(ke))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/set-global"),Ee="__core-js_shared__",ke=de[Ee]||ve(Ee,{});Ue.exports=ke},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,Ue,_e){var de=oe("../internals/is-pure"),ve=oe("../internals/shared-store");(Ue.exports=function(Ee,ke){return ve[Ee]||(ve[Ee]=ke!==void 0?ke:{})})("versions",[]).push({version:"3.22.1",mode:de?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(oe,Ue,_e){var de=oe("../internals/an-object"),ve=oe("../internals/a-constructor"),Ee=oe("../internals/well-known-symbol"),ke=Ee("species");Ue.exports=function(Se,Ae){var me=de(Se).constructor,Pe;return me===void 0||(Pe=de(me)[ke])==null?Ae:ve(Pe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/to-integer-or-infinity"),Ee=oe("../internals/to-string"),ke=oe("../internals/require-object-coercible"),Se=de("".charAt),Ae=de("".charCodeAt),me=de("".slice),Pe=function(fe){return function(z,te){var se=Ee(ke(z)),ie=ve(te),le=se.length,ce,pe;return ie<0||ie>=le?fe?"":void 0:(ce=Ae(se,ie),ce<55296||ce>56319||ie+1===le||(pe=Ae(se,ie+1))<56320||pe>57343?fe?Se(se,ie):ce:fe?me(se,ie,ie+2):(ce-55296<<10)+(pe-56320)+65536)}};Ue.exports={codeAt:Pe(!1),charAt:Pe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(oe,Ue,_e){var de=oe("../internals/function-name").PROPER,ve=oe("../internals/fails"),Ee=oe("../internals/whitespaces"),ke="\u200B\x85\u180E";Ue.exports=function(Se){return ve(function(){return!!Ee[Se]()||ke[Se]()!==ke||de&&Ee[Se].name!==Se})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/require-object-coercible"),Ee=oe("../internals/to-string"),ke=oe("../internals/whitespaces"),Se=de("".replace),Ae="["+ke+"]",me=RegExp("^"+Ae+Ae+"*"),Pe=RegExp(Ae+Ae+"*$"),fe=function(z){return function(te){var se=Ee(ve(te));return z&1&&(se=Se(se,me,"")),z&2&&(se=Se(se,Pe,"")),se}};Ue.exports={start:fe(1),end:fe(2),trim:fe(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(oe,Ue,_e){var de=oe("../internals/function-call"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/well-known-symbol"),ke=oe("../internals/redefine");Ue.exports=function(){var Se=ve("Symbol"),Ae=Se&&Se.prototype,me=Ae&&Ae.valueOf,Pe=Ee("toPrimitive");Ae&&!Ae[Pe]&&ke(Ae,Pe,function(fe){return de(me,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-apply"),Ee=oe("../internals/function-bind-context"),ke=oe("../internals/is-callable"),Se=oe("../internals/has-own-property"),Ae=oe("../internals/fails"),me=oe("../internals/html"),Pe=oe("../internals/array-slice"),fe=oe("../internals/document-create-element"),z=oe("../internals/validate-arguments-length"),te=oe("../internals/engine-is-ios"),se=oe("../internals/engine-is-node"),ie=de.setImmediate,le=de.clearImmediate,ce=de.process,pe=de.Dispatch,xe=de.Function,je=de.MessageChannel,De=de.String,Fe=0,Te={},Me="onreadystatechange",Be,Ge,Ye,Ke;try{Be=de.location}catch(St){}var Ve=function(St){if(Se(Te,St)){var Qe=Te[St];delete Te[St],Qe()}},ot=function(St){return function(){Ve(St)}},ut=function(St){Ve(St.data)},ft=function(St){de.postMessage(De(St),Be.protocol+"//"+Be.host)};(!ie||!le)&&(ie=function(Qe){z(arguments.length,1);var rt=ke(Qe)?Qe:xe(Qe),wt=Pe(arguments,1);return Te[++Fe]=function(){ve(rt,void 0,wt)},Ge(Fe),Fe},le=function(Qe){delete Te[Qe]},se?Ge=function(St){ce.nextTick(ot(St))}:pe&&pe.now?Ge=function(St){pe.now(ot(St))}:je&&!te?(Ye=new je,Ke=Ye.port2,Ye.port1.onmessage=ut,Ge=Ee(Ke.postMessage,Ke)):de.addEventListener&&ke(de.postMessage)&&!de.importScripts&&Be&&Be.protocol!=="file:"&&!Ae(ft)?(Ge=ft,de.addEventListener("message",ut,!1)):Me in fe("script")?Ge=function(St){me.appendChild(fe("script"))[Me]=function(){me.removeChild(this),Ve(St)}}:Ge=function(St){setTimeout(ot(St),0)}),Ue.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this");Ue.exports=de(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,Ue,_e){var de=oe("../internals/to-integer-or-infinity"),ve=Math.max,Ee=Math.min;Ue.exports=function(ke,Se){var Ae=de(ke);return Ae<0?ve(Ae+Se,0):Ee(Ae,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=oe("../internals/to-length"),ke=de.RangeError;Ue.exports=function(Se){if(Se===void 0)return 0;var Ae=ve(Se),me=Ee(Ae);if(Ae!==me)throw ke("Wrong length or index");return me}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,Ue,_e){var de=oe("../internals/indexed-object"),ve=oe("../internals/require-object-coercible");Ue.exports=function(Ee){return de(ve(Ee))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,Ue,_e){var de=Math.ceil,ve=Math.floor;Ue.exports=function(Ee){var ke=+Ee;return ke!==ke||ke===0?0:(ke>0?ve:de)(ke)}},{}],249:[function(oe,Ue,_e){var de=oe("../internals/to-integer-or-infinity"),ve=Math.min;Ue.exports=function(Ee){return Ee>0?ve(de(Ee),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/require-object-coercible"),Ee=de.Object;Ue.exports=function(ke){return Ee(ve(ke))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/to-positive-integer"),Ee=de.RangeError;Ue.exports=function(ke,Se){var Ae=ve(ke);if(Ae%Se)throw Ee("Wrong offset");return Ae}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/to-integer-or-infinity"),Ee=de.RangeError;Ue.exports=function(ke){var Se=ve(ke);if(Se<0)throw Ee("The argument can't be less than 0");return Se}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/is-object"),ke=oe("../internals/is-symbol"),Se=oe("../internals/get-method"),Ae=oe("../internals/ordinary-to-primitive"),me=oe("../internals/well-known-symbol"),Pe=de.TypeError,fe=me("toPrimitive");Ue.exports=function(z,te){if(!Ee(z)||ke(z))return z;var se=Se(z,fe),ie;if(se){if(te===void 0&&(te="default"),ie=ve(se,z,te),!Ee(ie)||ke(ie))return ie;throw Pe("Can't convert object to primitive value")}return te===void 0&&(te="number"),Ae(z,te)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(oe,Ue,_e){var de=oe("../internals/to-primitive"),ve=oe("../internals/is-symbol");Ue.exports=function(Ee){var ke=de(Ee,"string");return ve(ke)?ke:ke+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol"),ve=de("toStringTag"),Ee={};Ee[ve]="z",Ue.exports=String(Ee)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/classof"),Ee=de.String;Ue.exports=function(ke){if(ve(ke)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Ee(ke)}},{"../internals/classof":124,"../internals/global":163}],257:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=de.String;Ue.exports=function(Ee){try{return ve(Ee)}catch(ke){return"Object"}}},{"../internals/global":163}],258:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/function-call"),ke=oe("../internals/descriptors"),Se=oe("../internals/typed-array-constructors-require-wrappers"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-buffer"),Pe=oe("../internals/an-instance"),fe=oe("../internals/create-property-descriptor"),z=oe("../internals/create-non-enumerable-property"),te=oe("../internals/is-integral-number"),se=oe("../internals/to-length"),ie=oe("../internals/to-index"),le=oe("../internals/to-offset"),ce=oe("../internals/to-property-key"),pe=oe("../internals/has-own-property"),xe=oe("../internals/classof"),je=oe("../internals/is-object"),De=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Te=oe("../internals/object-is-prototype-of"),Me=oe("../internals/object-set-prototype-of"),Be=oe("../internals/object-get-own-property-names").f,Ge=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ke=oe("../internals/set-species"),Ve=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),ut=oe("../internals/internal-state"),ft=oe("../internals/inherit-if-required"),St=ut.get,Qe=ut.set,rt=Ve.f,wt=ot.f,Ct=Math.round,bt=ve.RangeError,ct=me.ArrayBuffer,xt=ct.prototype,dt=me.DataView,Mt=Ae.NATIVE_ARRAY_BUFFER_VIEWS,yt=Ae.TYPED_ARRAY_CONSTRUCTOR,Ft=Ae.TYPED_ARRAY_TAG,mt=Ae.TypedArray,vt=Ae.TypedArrayPrototype,tt=Ae.aTypedArrayConstructor,He=Ae.isTypedArray,we="BYTES_PER_ELEMENT",Ne="Wrong length",Xe=function(ht,at){tt(ht);for(var Dt=0,Et=at.length,Ot=new ht(Et);Et>Dt;)Ot[Dt]=at[Dt++];return Ot},nt=function(ht,at){rt(ht,at,{get:function(){return St(this)[at]}})},Ie=function(ht){var at;return Te(xt,ht)||(at=xe(ht))=="ArrayBuffer"||at=="SharedArrayBuffer"},Re=function(ht,at){return He(ht)&&!De(at)&&at in ht&&te(+at)&&at>=0},Ze=function(at,Dt){return Dt=ce(Dt),Re(at,Dt)?fe(2,at[Dt]):wt(at,Dt)},et=function(at,Dt,Et){return Dt=ce(Dt),Re(at,Dt)&&je(Et)&&pe(Et,"value")&&!pe(Et,"get")&&!pe(Et,"set")&&!Et.configurable&&(!pe(Et,"writable")||Et.writable)&&(!pe(Et,"enumerable")||Et.enumerable)?(at[Dt]=Et.value,at):rt(at,Dt,Et)};ke?(Mt||(ot.f=Ze,Ve.f=et,nt(vt,"buffer"),nt(vt,"byteOffset"),nt(vt,"byteLength"),nt(vt,"length")),de({target:"Object",stat:!0,forced:!Mt},{getOwnPropertyDescriptor:Ze,defineProperty:et}),Ue.exports=function(ht,at,Dt){var Et=ht.match(/\d+$/)[0]/8,Ot=ht+(Dt?"Clamped":"")+"Array",qt="get"+ht,Qt="set"+ht,Xt=ve[Ot],Wt=Xt,un=Wt&&Wt.prototype,on={},cn=function(kn,On){var _r=St(kn);return _r.view[qt](On*Et+_r.byteOffset,!0)},bn=function(kn,On,_r){var xr=St(kn);Dt&&(_r=(_r=Ct(_r))<0?0:_r>255?255:_r&255),xr.view[Qt](On*Et+xr.byteOffset,_r,!0)},xn=function(kn,On){rt(kn,On,{get:function(){return cn(this,On)},set:function(_r){return bn(this,On,_r)},enumerable:!0})};Mt?Se&&(Wt=at(function(kn,On,_r,xr){return Pe(kn,un),ft(function(){return je(On)?Ie(On)?xr!==void 0?new Xt(On,le(_r,Et),xr):_r!==void 0?new Xt(On,le(_r,Et)):new Xt(On):He(On)?Xe(Wt,On):Ee(Ge,Wt,On):new Xt(ie(On))}(),kn,Wt)}),Me&&Me(Wt,mt),Ye(Be(Xt),function(kn){kn in Wt||z(Wt,kn,Xt[kn])}),Wt.prototype=un):(Wt=at(function(kn,On,_r,xr){Pe(kn,un);var $r=0,tr=0,ii,di,li;if(!je(On))li=ie(On),di=li*Et,ii=new ct(di);else if(Ie(On)){ii=On,tr=le(_r,Et);var Mi=On.byteLength;if(xr===void 0){if(Mi%Et||(di=Mi-tr,di<0))throw bt(Ne)}else if(di=se(xr)*Et,di+tr>Mi)throw bt(Ne);li=di/Et}else return He(On)?Xe(Wt,On):Ee(Ge,Wt,On);for(Qe(kn,{buffer:ii,byteOffset:tr,byteLength:di,length:li,view:new dt(ii)});$r<li;)xn(kn,$r++)}),Me&&Me(Wt,mt),un=Wt.prototype=Fe(vt)),un.constructor!==Wt&&z(un,"constructor",Wt),z(un,yt,Wt),Ft&&z(un,Ft,Ot),on[Ot]=Wt,de({global:!0,forced:Wt!=Xt,sham:!Mt},on),we in Wt||z(Wt,we,Et),we in un||z(un,we,Et),Ke(Ot)}):Ue.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/fails"),Ee=oe("../internals/check-correctness-of-iteration"),ke=oe("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,Se=de.ArrayBuffer,Ae=de.Int8Array;Ue.exports=!ke||!ve(function(){Ae(1)})||!ve(function(){new Ae(-1)})||!Ee(function(me){new Ae,new Ae(null),new Ae(1.5),new Ae(me)},!0)||ve(function(){return new Ae(new Se(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(oe,Ue,_e){var de=oe("../internals/array-from-constructor-and-list"),ve=oe("../internals/typed-array-species-constructor");Ue.exports=function(Ee,ke){return de(ve(Ee),ke)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(oe,Ue,_e){var de=oe("../internals/function-bind-context"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-constructor"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/get-iterator"),me=oe("../internals/get-iterator-method"),Pe=oe("../internals/is-array-iterator-method"),fe=oe("../internals/array-buffer-view-core").aTypedArrayConstructor;Ue.exports=function(te){var se=Ee(this),ie=ke(te),le=arguments.length,ce=le>1?arguments[1]:void 0,pe=ce!==void 0,xe=me(ie),je,De,Fe,Te,Me,Be;if(xe&&!Pe(xe))for(Me=Ae(ie,xe),Be=Me.next,ie=[];!(Te=ve(Be,Me)).done;)ie.push(Te.value);for(pe&&le>2&&(ce=de(ce,arguments[2])),De=Se(ie),Fe=new(fe(se))(De),je=0;De>je;je++)Fe[je]=pe?ce(ie[je],je):ie[je];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(oe,Ue,_e){var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/species-constructor"),Ee=de.TYPED_ARRAY_CONSTRUCTOR,ke=de.aTypedArrayConstructor;Ue.exports=function(Se){return ke(ve(Se,Se[Ee]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,Ue,_e){var de=oe("../internals/function-uncurry-this"),ve=0,Ee=Math.random(),ke=de(1 .toString);Ue.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+ke(++ve+Ee,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,Ue,_e){var de=oe("../internals/native-symbol");Ue.exports=de&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/fails");Ue.exports=de&&ve(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=de.TypeError;Ue.exports=function(Ee,ke){if(Ee<ke)throw ve("Not enough arguments");return Ee}},{"../internals/global":163}],267:[function(oe,Ue,_e){var de=oe("../internals/well-known-symbol");_e.f=de},{"../internals/well-known-symbol":268}],268:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/shared"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/uid"),Se=oe("../internals/native-symbol"),Ae=oe("../internals/use-symbol-as-uid"),me=ve("wks"),Pe=de.Symbol,fe=Pe&&Pe.for,z=Ae?Pe:Pe&&Pe.withoutSetter||ke;Ue.exports=function(te){if(!Ee(me,te)||!(Se||typeof me[te]=="string")){var se="Symbol."+te;Se&&Ee(Pe,te)?me[te]=Pe[te]:Ae&&fe?me[te]=fe(se):me[te]=z(se)}return me[te]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(oe,Ue,_e){Ue.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/array-buffer"),ke=oe("../internals/set-species"),Se="ArrayBuffer",Ae=Ee[Se],me=ve[Se];de({global:!0,forced:me!==Ae},{ArrayBuffer:Ae}),ke(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/array-buffer"),Se=oe("../internals/an-object"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/to-length"),Pe=oe("../internals/species-constructor"),fe=ke.ArrayBuffer,z=ke.DataView,te=z.prototype,se=ve(fe.prototype.slice),ie=ve(te.getUint8),le=ve(te.setUint8),ce=Ee(function(){return!new fe(2).slice(1,void 0).byteLength});de({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ce},{slice:function(xe,je){if(se&&je===void 0)return se(Se(this),xe);for(var De=Se(this).byteLength,Fe=Ae(xe,De),Te=Ae(je===void 0?De:je,De),Me=new(Pe(this,fe))(me(Te-Fe)),Be=new z(this),Ge=new z(Me),Ye=0;Fe<Te;)le(Ge,Ye++,ie(Be,Fe++));return Me}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/fails"),ke=oe("../internals/is-array"),Se=oe("../internals/is-object"),Ae=oe("../internals/to-object"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/create-property"),fe=oe("../internals/array-species-create"),z=oe("../internals/array-method-has-species-support"),te=oe("../internals/well-known-symbol"),se=oe("../internals/engine-v8-version"),ie=te("isConcatSpreadable"),le=9007199254740991,ce="Maximum allowed index exceeded",pe=ve.TypeError,xe=se>=51||!Ee(function(){var Te=[];return Te[ie]=!1,Te.concat()[0]!==Te}),je=z("concat"),De=function(Te){if(!Se(Te))return!1;var Me=Te[ie];return Me!==void 0?!!Me:ke(Te)},Fe=!xe||!je;de({target:"Array",proto:!0,forced:Fe},{concat:function(Me){var Be=Ae(this),Ge=fe(Be,0),Ye=0,Ke,Ve,ot,ut,ft;for(Ke=-1,ot=arguments.length;Ke<ot;Ke++)if(ft=Ke===-1?Be:arguments[Ke],De(ft)){if(ut=me(ft),Ye+ut>le)throw pe(ce);for(Ve=0;Ve<ut;Ve++,Ye++)Ve in ft&&Pe(Ge,Ye,ft[Ve])}else{if(Ye>=le)throw pe(ce);Pe(Ge,Ye++,ft)}return Ge.length=Ye,Ge}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/array-fill"),Ee=oe("../internals/add-to-unscopables");de({target:"Array",proto:!0},{fill:ve}),Ee("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").filter,Ee=oe("../internals/array-method-has-species-support"),ke=Ee("filter");de({target:"Array",proto:!0,forced:!ke},{filter:function(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").find,Ee=oe("../internals/add-to-unscopables"),ke="find",Se=!0;ke in[]&&Array(1)[ke](function(){Se=!1}),de({target:"Array",proto:!0,forced:Se},{find:function(me){return ve(this,me,arguments.length>1?arguments[1]:void 0)}}),Ee(ke)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/array-from"),Ee=oe("../internals/check-correctness-of-iteration"),ke=!Ee(function(Se){Array.from(Se)});de({target:"Array",stat:!0,forced:ke},{from:ve})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-includes").includes,Ee=oe("../internals/add-to-unscopables");de({target:"Array",proto:!0},{includes:function(Se){return ve(this,Se,arguments.length>1?arguments[1]:void 0)}}),Ee("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(oe,Ue,_e){"use strict";var de=oe("../internals/to-indexed-object"),ve=oe("../internals/add-to-unscopables"),Ee=oe("../internals/iterators"),ke=oe("../internals/internal-state"),Se=oe("../internals/object-define-property").f,Ae=oe("../internals/define-iterator"),me=oe("../internals/is-pure"),Pe=oe("../internals/descriptors"),fe="Array Iterator",z=ke.set,te=ke.getterFor(fe);Ue.exports=Ae(Array,"Array",function(ie,le){z(this,{type:fe,target:de(ie),index:0,kind:le})},function(){var ie=te(this),le=ie.target,ce=ie.kind,pe=ie.index++;return!le||pe>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ce=="keys"?{value:pe,done:!1}:ce=="values"?{value:le[pe],done:!1}:{value:[pe,le[pe]],done:!1}},"values");var se=Ee.Arguments=Ee.Array;if(ve("keys"),ve("values"),ve("entries"),!me&&Pe&&se.name!=="values")try{Se(se,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/indexed-object"),ke=oe("../internals/to-indexed-object"),Se=oe("../internals/array-method-is-strict"),Ae=ve([].join),me=Ee!=Object,Pe=Se("join",",");de({target:"Array",proto:!0,forced:me||!Pe},{join:function(z){return Ae(ke(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/array-iteration").map,Ee=oe("../internals/array-method-has-species-support"),ke=Ee("map");de({target:"Array",proto:!0,forced:!ke},{map:function(Ae){return ve(this,Ae,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/is-array"),ke=oe("../internals/is-constructor"),Se=oe("../internals/is-object"),Ae=oe("../internals/to-absolute-index"),me=oe("../internals/length-of-array-like"),Pe=oe("../internals/to-indexed-object"),fe=oe("../internals/create-property"),z=oe("../internals/well-known-symbol"),te=oe("../internals/array-method-has-species-support"),se=oe("../internals/array-slice"),ie=te("slice"),le=z("species"),ce=ve.Array,pe=Math.max;de({target:"Array",proto:!0,forced:!ie},{slice:function(je,De){var Fe=Pe(this),Te=me(Fe),Me=Ae(je,Te),Be=Ae(De===void 0?Te:De,Te),Ge,Ye,Ke;if(Ee(Fe)&&(Ge=Fe.constructor,ke(Ge)&&(Ge===ce||Ee(Ge.prototype))?Ge=void 0:Se(Ge)&&(Ge=Ge[le],Ge===null&&(Ge=void 0)),Ge===ce||Ge===void 0))return se(Fe,Me,Be);for(Ye=new(Ge===void 0?ce:Ge)(pe(Be-Me,0)),Ke=0;Me<Be;Me++,Ke++)Me in Fe&&fe(Ye,Ke,Fe[Me]);return Ye.length=Ke,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/a-callable"),ke=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/to-string"),me=oe("../internals/fails"),Pe=oe("../internals/array-sort"),fe=oe("../internals/array-method-is-strict"),z=oe("../internals/engine-ff-version"),te=oe("../internals/engine-is-ie-or-edge"),se=oe("../internals/engine-v8-version"),ie=oe("../internals/engine-webkit-version"),le=[],ce=ve(le.sort),pe=ve(le.push),xe=me(function(){le.sort(void 0)}),je=me(function(){le.sort(null)}),De=fe("sort"),Fe=!me(function(){if(se)return se<70;if(!(z&&z>3)){if(te)return!0;if(ie)return ie<603;var Be="",Ge,Ye,Ke,Ve;for(Ge=65;Ge<76;Ge++){switch(Ye=String.fromCharCode(Ge),Ge){case 66:case 69:case 70:case 72:Ke=3;break;case 68:case 71:Ke=4;break;default:Ke=2}for(Ve=0;Ve<47;Ve++)le.push({k:Ye+Ve,v:Ke})}for(le.sort(function(ot,ut){return ut.v-ot.v}),Ve=0;Ve<le.length;Ve++)Ye=le[Ve].k.charAt(0),Be.charAt(Be.length-1)!==Ye&&(Be+=Ye);return Be!=="DGBEFHACIJK"}}),Te=xe||!je||!De||!Fe,Me=function(Be){return function(Ge,Ye){return Ye===void 0?-1:Ge===void 0?1:Be!==void 0?+Be(Ge,Ye)||0:Ae(Ge)>Ae(Ye)?1:-1}};de({target:"Array",proto:!0,forced:Te},{sort:function(Ge){Ge!==void 0&&Ee(Ge);var Ye=ke(this);if(Fe)return Ge===void 0?ce(Ye):ce(Ye,Ge);var Ke=[],Ve=Se(Ye),ot,ut;for(ut=0;ut<Ve;ut++)ut in Ye&&pe(Ke,Ye[ut]);for(Pe(Ke,Me(Ge)),ot=Ke.length,ut=0;ut<ot;)Ye[ut]=Ke[ut++];for(;ut<Ve;)delete Ye[ut++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/to-absolute-index"),ke=oe("../internals/to-integer-or-infinity"),Se=oe("../internals/length-of-array-like"),Ae=oe("../internals/to-object"),me=oe("../internals/array-species-create"),Pe=oe("../internals/create-property"),fe=oe("../internals/array-method-has-species-support"),z=fe("splice"),te=ve.TypeError,se=Math.max,ie=Math.min,le=9007199254740991,ce="Maximum allowed length exceeded";de({target:"Array",proto:!0,forced:!z},{splice:function(xe,je){var De=Ae(this),Fe=Se(De),Te=Ee(xe,Fe),Me=arguments.length,Be,Ge,Ye,Ke,Ve,ot;if(Me===0?Be=Ge=0:Me===1?(Be=0,Ge=Fe-Te):(Be=Me-2,Ge=ie(se(ke(je),0),Fe-Te)),Fe+Be-Ge>le)throw te(ce);for(Ye=me(De,Ge),Ke=0;Ke<Ge;Ke++)Ve=Te+Ke,Ve in De&&Pe(Ye,Ke,De[Ve]);if(Ye.length=Ge,Be<Ge){for(Ke=Te;Ke<Fe-Ge;Ke++)Ve=Ke+Ge,ot=Ke+Be,Ve in De?De[ot]=De[Ve]:delete De[ot];for(Ke=Fe;Ke>Fe-Ge+Be;Ke--)delete De[Ke-1]}else if(Be>Ge)for(Ke=Fe-Ge;Ke>Te;Ke--)Ve=Ke+Ge-1,ot=Ke+Be-1,Ve in De?De[ot]=De[Ve]:delete De[ot];for(Ke=0;Ke<Be;Ke++)De[Ke+Te]=arguments[Ke+2];return De.length=Fe-Ge+Be,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/function-name").EXISTS,Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-define-property").f,Se=Function.prototype,Ae=Ee(Se.toString),me=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Pe=Ee(me.exec),fe="name";de&&!ve&&ke(Se,fe,{configurable:!0,get:function(){try{return Pe(me,Ae(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/function-apply"),ke=oe("../internals/function-call"),Se=oe("../internals/function-uncurry-this"),Ae=oe("../internals/fails"),me=oe("../internals/is-array"),Pe=oe("../internals/is-callable"),fe=oe("../internals/is-object"),z=oe("../internals/is-symbol"),te=oe("../internals/array-slice"),se=oe("../internals/native-symbol"),ie=ve("JSON","stringify"),le=Se(/./.exec),ce=Se("".charAt),pe=Se("".charCodeAt),xe=Se("".replace),je=Se(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Te=/^[\uDC00-\uDFFF]$/,Me=!se||Ae(function(){var Ke=ve("Symbol")();return ie([Ke])!="[null]"||ie({a:Ke})!="{}"||ie(Object(Ke))!="{}"}),Be=Ae(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),Ge=function(Ke,Ve){var ot=te(arguments),ut=Ve;if(!(!fe(Ve)&&Ke===void 0||z(Ke)))return me(Ve)||(Ve=function(ft,St){if(Pe(ut)&&(St=ke(ut,this,ft,St)),!z(St))return St}),ot[1]=Ve,Ee(ie,null,ot)},Ye=function(Ke,Ve,ot){var ut=ce(ot,Ve-1),ft=ce(ot,Ve+1);return le(Fe,Ke)&&!le(Te,ft)||le(Te,Ke)&&!le(Fe,ut)?"\\u"+je(pe(Ke,0),16):Ke};ie&&de({target:"JSON",stat:!0,forced:Me||Be},{stringify:function(Ve,ot,ut){var ft=te(arguments),St=Ee(Me?Ge:ie,null,ft);return Be&&typeof St=="string"?xe(St,De,Ye):St}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(oe,Ue,_e){"use strict";var de=oe("../internals/descriptors"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-forced"),Se=oe("../internals/redefine"),Ae=oe("../internals/has-own-property"),me=oe("../internals/inherit-if-required"),Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/is-symbol"),z=oe("../internals/to-primitive"),te=oe("../internals/fails"),se=oe("../internals/object-get-own-property-names").f,ie=oe("../internals/object-get-own-property-descriptor").f,le=oe("../internals/object-define-property").f,ce=oe("../internals/this-number-value"),pe=oe("../internals/string-trim").trim,xe="Number",je=ve[xe],De=je.prototype,Fe=ve.TypeError,Te=Ee("".slice),Me=Ee("".charCodeAt),Be=function(ut){var ft=z(ut,"number");return typeof ft=="bigint"?ft:Ge(ft)},Ge=function(ut){var ft=z(ut,"number"),St,Qe,rt,wt,Ct,bt,ct,xt;if(fe(ft))throw Fe("Cannot convert a Symbol value to a number");if(typeof ft=="string"&&ft.length>2){if(ft=pe(ft),St=Me(ft,0),St===43||St===45){if(Qe=Me(ft,2),Qe===88||Qe===120)return NaN}else if(St===48){switch(Me(ft,1)){case 66:case 98:rt=2,wt=49;break;case 79:case 111:rt=8,wt=55;break;default:return+ft}for(Ct=Te(ft,2),bt=Ct.length,ct=0;ct<bt;ct++)if(xt=Me(Ct,ct),xt<48||xt>wt)return NaN;return parseInt(Ct,rt)}}return+ft};if(ke(xe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ft){var St=arguments.length<1?0:je(Be(ft)),Qe=this;return Pe(De,Qe)&&te(function(){ce(Qe)})?me(Object(St),Qe,Ye):St},Ke=de?se(je):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ve=0,ot;Ke.length>Ve;Ve++)Ae(je,ot=Ke[Ve])&&!Ae(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=De,De.constructor=Ye,Se(ve,xe,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/object-assign");de({target:"Object",stat:!0,forced:Object.assign!==ve},{assign:ve})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/object-to-array").entries;de({target:"Object",stat:!0},{entries:function(ke){return ve(ke)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/native-symbol"),Ee=oe("../internals/fails"),ke=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/to-object"),Ae=!ve||Ee(function(){ke.f(1)});de({target:"Object",stat:!0,forced:Ae},{getOwnPropertySymbols:function(Pe){var fe=ke.f;return fe?fe(Se(Pe)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/to-object"),Ee=oe("../internals/object-keys"),ke=oe("../internals/fails"),Se=ke(function(){Ee(1)});de({target:"Object",stat:!0,forced:Se},{keys:function(me){return Ee(ve(me))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(oe,Ue,_e){var de=oe("../internals/to-string-tag-support"),ve=oe("../internals/redefine"),Ee=oe("../internals/object-to-string");de||ve(Object.prototype,"toString",Ee,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{all:function(fe){var z=this,te=ke.f(z),se=te.resolve,ie=te.reject,le=Se(function(){var ce=Ee(z.resolve),pe=[],xe=0,je=1;Ae(fe,function(De){var Fe=xe++,Te=!1;je++,ve(ce,z,De).then(function(Me){Te||(Te=!0,pe[Fe]=Me,--je||se(pe))},ie)}),--je||se(pe)});return le.error&&ie(le.value),te.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/is-pure"),Ee=oe("../internals/promise-constructor-detection").CONSTRUCTOR,ke=oe("../internals/promise-native-constructor"),Se=oe("../internals/get-built-in"),Ae=oe("../internals/is-callable"),me=oe("../internals/redefine"),Pe=ke&&ke.prototype;if(de({target:"Promise",proto:!0,forced:Ee,real:!0},{catch:function(z){return this.then(void 0,z)}}),!ve&&Ae(ke)){var fe=Se("Promise").prototype.catch;Pe.catch!==fe&&me(Pe,"catch",fe,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/is-pure"),Ee=oe("../internals/engine-is-node"),ke=oe("../internals/global"),Se=oe("../internals/function-call"),Ae=oe("../internals/redefine"),me=oe("../internals/redefine-all"),Pe=oe("../internals/object-set-prototype-of"),fe=oe("../internals/set-to-string-tag"),z=oe("../internals/set-species"),te=oe("../internals/a-callable"),se=oe("../internals/is-callable"),ie=oe("../internals/is-object"),le=oe("../internals/an-instance"),ce=oe("../internals/species-constructor"),pe=oe("../internals/task").set,xe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),De=oe("../internals/perform"),Fe=oe("../internals/queue"),Te=oe("../internals/internal-state"),Me=oe("../internals/promise-native-constructor"),Be=oe("../internals/promise-constructor-detection"),Ge=oe("../internals/new-promise-capability"),Ye="Promise",Ke=Be.CONSTRUCTOR,Ve=Be.REJECTION_EVENT,ot=Be.SUBCLASSING,ut=Te.getterFor(Ye),ft=Te.set,St=Me&&Me.prototype,Qe=Me,rt=St,wt=ke.TypeError,Ct=ke.document,bt=ke.process,ct=Ge.f,xt=ct,dt=!!(Ct&&Ct.createEvent&&ke.dispatchEvent),Mt="unhandledrejection",yt="rejectionhandled",Ft=0,mt=1,vt=2,tt=1,He=2,we,Ne,Xe,nt,Ie=function(Qt){var Xt;return ie(Qt)&&se(Xt=Qt.then)?Xt:!1},Re=function(Qt,Xt){var Wt=Xt.value,un=Xt.state==mt,on=un?Qt.ok:Qt.fail,cn=Qt.resolve,bn=Qt.reject,xn=Qt.domain,kn,On,_r;try{on?(un||(Xt.rejection===He&&Dt(Xt),Xt.rejection=tt),on===!0?kn=Wt:(xn&&xn.enter(),kn=on(Wt),xn&&(xn.exit(),_r=!0)),kn===Qt.promise?bn(wt("Promise-chain cycle")):(On=Ie(kn))?Se(On,kn,cn,bn):cn(kn)):bn(Wt)}catch(xr){xn&&!_r&&xn.exit(),bn(xr)}},Ze=function(Qt,Xt){Qt.notified||(Qt.notified=!0,xe(function(){for(var Wt=Qt.reactions,un;un=Wt.get();)Re(un,Qt);Qt.notified=!1,Xt&&!Qt.rejection&&ht(Qt)}))},et=function(Qt,Xt,Wt){var un,on;dt?(un=Ct.createEvent("Event"),un.promise=Xt,un.reason=Wt,un.initEvent(Qt,!1,!0),ke.dispatchEvent(un)):un={promise:Xt,reason:Wt},!Ve&&(on=ke["on"+Qt])?on(un):Qt===Mt&&je("Unhandled promise rejection",Wt)},ht=function(Qt){Se(pe,ke,function(){var Xt=Qt.facade,Wt=Qt.value,un=at(Qt),on;if(un&&(on=De(function(){Ee?bt.emit("unhandledRejection",Wt,Xt):et(Mt,Xt,Wt)}),Qt.rejection=Ee||at(Qt)?He:tt,on.error))throw on.value})},at=function(Qt){return Qt.rejection!==tt&&!Qt.parent},Dt=function(Qt){Se(pe,ke,function(){var Xt=Qt.facade;Ee?bt.emit("rejectionHandled",Xt):et(yt,Xt,Qt.value)})},Et=function(Qt,Xt,Wt){return function(un){Qt(Xt,un,Wt)}},Ot=function(Qt,Xt,Wt){Qt.done||(Qt.done=!0,Wt&&(Qt=Wt),Qt.value=Xt,Qt.state=vt,Ze(Qt,!0))},qt=function(Qt,Xt,Wt){if(!Qt.done){Qt.done=!0,Wt&&(Qt=Wt);try{if(Qt.facade===Xt)throw wt("Promise can't be resolved itself");var un=Ie(Xt);un?xe(function(){var on={done:!1};try{Se(un,Xt,Et(qt,on,Qt),Et(Ot,on,Qt))}catch(cn){Ot(on,cn,Qt)}}):(Qt.value=Xt,Qt.state=mt,Ze(Qt,!1))}catch(on){Ot({done:!1},on,Qt)}}};if(Ke&&(Qe=function(Xt){le(this,rt),te(Xt),Se(we,this);var Wt=ut(this);try{Xt(Et(qt,Wt),Et(Ot,Wt))}catch(un){Ot(Wt,un)}},rt=Qe.prototype,we=function(Xt){ft(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:Ft,value:void 0})},we.prototype=me(rt,{then:function(Xt,Wt){var un=ut(this),on=ct(ce(this,Qe));return un.parent=!0,on.ok=se(Xt)?Xt:!0,on.fail=se(Wt)&&Wt,on.domain=Ee?bt.domain:void 0,un.state==Ft?un.reactions.add(on):xe(function(){Re(on,un)}),on.promise}}),Ne=function(){var Qt=new we,Xt=ut(Qt);this.promise=Qt,this.resolve=Et(qt,Xt),this.reject=Et(Ot,Xt)},Ge.f=ct=function(Qt){return Qt===Qe||Qt===Xe?new Ne(Qt):xt(Qt)},!ve&&se(Me)&&St!==Object.prototype)){nt=St.then,ot||Ae(St,"then",function(Xt,Wt){var un=this;return new Qe(function(on,cn){Se(nt,un,on,cn)}).then(Xt,Wt)},{unsafe:!0});try{delete St.constructor}catch(Qt){}Pe&&Pe(St,rt)}de({global:!0,wrap:!0,forced:Ke},{Promise:Qe}),fe(Qe,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(oe,Ue,_e){oe("../modules/es.promise.constructor"),oe("../modules/es.promise.all"),oe("../modules/es.promise.catch"),oe("../modules/es.promise.race"),oe("../modules/es.promise.reject"),oe("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/a-callable"),ke=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Ae=oe("../internals/iterate"),me=oe("../internals/promise-statics-incorrect-iteration");de({target:"Promise",stat:!0,forced:me},{race:function(fe){var z=this,te=ke.f(z),se=te.reject,ie=Se(function(){var le=Ee(z.resolve);Ae(fe,function(ce){ve(le,z,ce).then(te.resolve,se)})});return ie.error&&se(ie.value),te.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-call"),Ee=oe("../internals/new-promise-capability"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR;de({target:"Promise",stat:!0,forced:ke},{reject:function(Ae){var me=Ee.f(this);return ve(me.reject,void 0,Ae),me.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/is-pure"),ke=oe("../internals/promise-native-constructor"),Se=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Ae=oe("../internals/promise-resolve"),me=ve("Promise"),Pe=Ee&&!Se;de({target:"Promise",stat:!0,forced:Ee||Se},{resolve:function(z){return Ae(Pe&&this===me?ke:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(oe,Ue,_e){var de=oe("../internals/descriptors"),ve=oe("../internals/global"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/is-forced"),Se=oe("../internals/inherit-if-required"),Ae=oe("../internals/create-non-enumerable-property"),me=oe("../internals/object-get-own-property-names").f,Pe=oe("../internals/object-is-prototype-of"),fe=oe("../internals/is-regexp"),z=oe("../internals/to-string"),te=oe("../internals/regexp-get-flags"),se=oe("../internals/regexp-sticky-helpers"),ie=oe("../internals/proxy-accessor"),le=oe("../internals/redefine"),ce=oe("../internals/fails"),pe=oe("../internals/has-own-property"),xe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),De=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Te=oe("../internals/regexp-unsupported-ncg"),Me=De("match"),Be=ve.RegExp,Ge=Be.prototype,Ye=ve.SyntaxError,Ke=Ee(Ge.exec),Ve=Ee("".charAt),ot=Ee("".replace),ut=Ee("".indexOf),ft=Ee("".slice),St=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Qe=/a/g,rt=/a/g,wt=new Be(Qe)!==Qe,Ct=se.MISSED_STICKY,bt=se.UNSUPPORTED_Y,ct=de&&(!wt||Ct||Fe||Te||ce(function(){return rt[Me]=!1,Be(Qe)!=Qe||Be(rt)==rt||Be(Qe,"i")!="/a/i"})),xt=function(mt){for(var vt=mt.length,tt=0,He="",we=!1,Ne;tt<=vt;tt++){if(Ne=Ve(mt,tt),Ne==="\\"){He+=Ne+Ve(mt,++tt);continue}!we&&Ne==="."?He+="[\\s\\S]":(Ne==="["?we=!0:Ne==="]"&&(we=!1),He+=Ne)}return He},dt=function(mt){for(var vt=mt.length,tt=0,He="",we=[],Ne={},Xe=!1,nt=!1,Ie=0,Re="",Ze;tt<=vt;tt++){if(Ze=Ve(mt,tt),Ze==="\\")Ze=Ze+Ve(mt,++tt);else if(Ze==="]")Xe=!1;else if(!Xe)switch(!0){case Ze==="[":Xe=!0;break;case Ze==="(":Ke(St,ft(mt,tt+1))&&(tt+=2,nt=!0),He+=Ze,Ie++;continue;case(Ze===">"&&nt):if(Re===""||pe(Ne,Re))throw new Ye("Invalid capture group name");Ne[Re]=!0,we[we.length]=[Re,Ie],nt=!1,Re="";continue}nt?Re+=Ze:He+=Ze}return[He,we]};if(ke("RegExp",ct)){for(var Mt=function(vt,tt){var He=Pe(Ge,this),we=fe(vt),Ne=tt===void 0,Xe=[],nt=vt,Ie,Re,Ze,et,ht,at;if(!He&&we&&Ne&&vt.constructor===Mt)return vt;if((we||Pe(Ge,vt))&&(vt=vt.source,Ne&&(tt=te(nt))),vt=vt===void 0?"":z(vt),tt=tt===void 0?"":z(tt),nt=vt,Fe&&"dotAll"in Qe&&(Re=!!tt&&ut(tt,"s")>-1,Re&&(tt=ot(tt,/s/g,""))),Ie=tt,Ct&&"sticky"in Qe&&(Ze=!!tt&&ut(tt,"y")>-1,Ze&&bt&&(tt=ot(tt,/y/g,""))),Te&&(et=dt(vt),vt=et[0],Xe=et[1]),ht=Se(Be(vt,tt),He?this:Ge,Mt),(Re||Ze||Xe.length)&&(at=xe(ht),Re&&(at.dotAll=!0,at.raw=Mt(xt(vt),Ie)),Ze&&(at.sticky=!0),Xe.length&&(at.groups=Xe)),vt!==nt)try{Ae(ht,"source",nt===""?"(?:)":nt)}catch(Dt){}return ht},yt=me(Be),Ft=0;yt.length>Ft;)ie(Mt,Be,yt[Ft++]);Ge.constructor=Mt,Mt.prototype=Ge,le(ve,"RegExp",Mt)}je("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/regexp-exec");de({target:"RegExp",proto:!0,forced:/./.exec!==ve},{exec:ve})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-name").PROPER,ve=oe("../internals/redefine"),Ee=oe("../internals/an-object"),ke=oe("../internals/to-string"),Se=oe("../internals/fails"),Ae=oe("../internals/regexp-get-flags"),me="toString",Pe=RegExp.prototype,fe=Pe[me],z=Se(function(){return fe.call({source:"a",flags:"b"})!="/a/b"}),te=de&&fe.name!=me;(z||te)&&ve(RegExp.prototype,me,function(){var ie=Ee(this),le=ke(ie.source),ce=ke(Ae(ie));return"/"+le+"/"+ce},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/not-a-regexp"),ke=oe("../internals/require-object-coercible"),Se=oe("../internals/to-string"),Ae=oe("../internals/correct-is-regexp-logic"),me=ve("".indexOf);de({target:"String",proto:!0,forced:!Ae("includes")},{includes:function(fe){return!!~me(Se(ke(this)),Se(Ee(fe)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(oe,Ue,_e){"use strict";var de=oe("../internals/string-multibyte").charAt,ve=oe("../internals/to-string"),Ee=oe("../internals/internal-state"),ke=oe("../internals/define-iterator"),Se="String Iterator",Ae=Ee.set,me=Ee.getterFor(Se);ke(String,"String",function(Pe){Ae(this,{type:Se,string:ve(Pe),index:0})},function(){var fe=me(this),z=fe.string,te=fe.index,se;return te>=z.length?{value:void 0,done:!0}:(se=de(z,te),fe.index+=se.length,{value:se,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/fix-regexp-well-known-symbol-logic"),Ee=oe("../internals/an-object"),ke=oe("../internals/to-length"),Se=oe("../internals/to-string"),Ae=oe("../internals/require-object-coercible"),me=oe("../internals/get-method"),Pe=oe("../internals/advance-string-index"),fe=oe("../internals/regexp-exec-abstract");ve("match",function(z,te,se){return[function(le){var ce=Ae(this),pe=le==null?void 0:me(le,z);return pe?de(pe,le,ce):new RegExp(le)[z](Se(ce))},function(ie){var le=Ee(this),ce=Se(ie),pe=se(te,le,ce);if(pe.done)return pe.value;if(!le.global)return fe(le,ce);var xe=le.unicode;le.lastIndex=0;for(var je=[],De=0,Fe;(Fe=fe(le,ce))!==null;){var Te=Se(Fe[0]);je[De]=Te,Te===""&&(le.lastIndex=Pe(ce,ke(le.lastIndex),xe)),De++}return De===0?null:je}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/function-call"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/fails"),Ae=oe("../internals/an-object"),me=oe("../internals/is-callable"),Pe=oe("../internals/to-integer-or-infinity"),fe=oe("../internals/to-length"),z=oe("../internals/to-string"),te=oe("../internals/require-object-coercible"),se=oe("../internals/advance-string-index"),ie=oe("../internals/get-method"),le=oe("../internals/get-substitution"),ce=oe("../internals/regexp-exec-abstract"),pe=oe("../internals/well-known-symbol"),xe=pe("replace"),je=Math.max,De=Math.min,Fe=Ee([].concat),Te=Ee([].push),Me=Ee("".indexOf),Be=Ee("".slice),Ge=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ke=function(){return/./[xe]?/./[xe]("a","$0")==="":!1}(),Ve=!Se(function(){var ot=/./;return ot.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(ot,"$<a>")!=="7"});ke("replace",function(ot,ut,ft){var St=Ke?"$":"$0";return[function(rt,wt){var Ct=te(this),bt=rt==null?void 0:ie(rt,xe);return bt?ve(bt,rt,Ct,wt):ve(ut,z(Ct),rt,wt)},function(Qe,rt){var wt=Ae(this),Ct=z(Qe);if(typeof rt=="string"&&Me(rt,St)===-1&&Me(rt,"$<")===-1){var bt=ft(ut,wt,Ct,rt);if(bt.done)return bt.value}var ct=me(rt);ct||(rt=z(rt));var xt=wt.global;if(xt){var dt=wt.unicode;wt.lastIndex=0}for(var Mt=[];;){var yt=ce(wt,Ct);if(yt===null||(Te(Mt,yt),!xt))break;var Ft=z(yt[0]);Ft===""&&(wt.lastIndex=se(Ct,fe(wt.lastIndex),dt))}for(var mt="",vt=0,tt=0;tt<Mt.length;tt++){yt=Mt[tt];for(var He=z(yt[0]),we=je(De(Pe(yt.index),Ct.length),0),Ne=[],Xe=1;Xe<yt.length;Xe++)Te(Ne,Ge(yt[Xe]));var nt=yt.groups;if(ct){var Ie=Fe([He],Ne,we,Ct);nt!==void 0&&Te(Ie,nt);var Re=z(de(rt,void 0,Ie))}else Re=le(He,Ct,we,Ne,nt,rt);we>=vt&&(mt+=Be(Ct,vt,we)+Re,vt=we+He.length)}return mt+Be(Ct,vt)}]},!Ve||!Ye||Ke)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-call"),ve=oe("../internals/fix-regexp-well-known-symbol-logic"),Ee=oe("../internals/an-object"),ke=oe("../internals/require-object-coercible"),Se=oe("../internals/same-value"),Ae=oe("../internals/to-string"),me=oe("../internals/get-method"),Pe=oe("../internals/regexp-exec-abstract");ve("search",function(fe,z,te){return[function(ie){var le=ke(this),ce=ie==null?void 0:me(ie,fe);return ce?de(ce,ie,le):new RegExp(ie)[fe](Ae(le))},function(se){var ie=Ee(this),le=Ae(se),ce=te(z,ie,le);if(ce.done)return ce.value;var pe=ie.lastIndex;Se(pe,0)||(ie.lastIndex=0);var xe=Pe(ie,le);return Se(ie.lastIndex,pe)||(ie.lastIndex=pe),xe===null?-1:xe.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-apply"),ve=oe("../internals/function-call"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/is-regexp"),Ae=oe("../internals/an-object"),me=oe("../internals/require-object-coercible"),Pe=oe("../internals/species-constructor"),fe=oe("../internals/advance-string-index"),z=oe("../internals/to-length"),te=oe("../internals/to-string"),se=oe("../internals/get-method"),ie=oe("../internals/array-slice-simple"),le=oe("../internals/regexp-exec-abstract"),ce=oe("../internals/regexp-exec"),pe=oe("../internals/regexp-sticky-helpers"),xe=oe("../internals/fails"),je=pe.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,Te=[].push,Me=Ee(/./.exec),Be=Ee(Te),Ge=Ee("".slice),Ye=!xe(function(){var Ke=/(?:)/,Ve=Ke.exec;Ke.exec=function(){return Ve.apply(this,arguments)};var ot="ab".split(Ke);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});ke("split",function(Ke,Ve,ot){var ut;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?ut=function(ft,St){var Qe=te(me(this)),rt=St===void 0?De:St>>>0;if(rt===0)return[];if(ft===void 0)return[Qe];if(!Se(ft))return ve(Ve,Qe,ft,rt);for(var wt=[],Ct=(ft.ignoreCase?"i":"")+(ft.multiline?"m":"")+(ft.unicode?"u":"")+(ft.sticky?"y":""),bt=0,ct=new RegExp(ft.source,Ct+"g"),xt,dt,Mt;(xt=ve(ce,ct,Qe))&&(dt=ct.lastIndex,!(dt>bt&&(Be(wt,Ge(Qe,bt,xt.index)),xt.length>1&&xt.index<Qe.length&&de(Te,wt,ie(xt,1)),Mt=xt[0].length,bt=dt,wt.length>=rt)));)ct.lastIndex===xt.index&&ct.lastIndex++;return bt===Qe.length?(Mt||!Me(ct,""))&&Be(wt,""):Be(wt,Ge(Qe,bt)),wt.length>rt?ie(wt,0,rt):wt}:"0".split(void 0,0).length?ut=function(ft,St){return ft===void 0&&St===0?[]:ve(Ve,this,ft,St)}:ut=Ve,[function(St,Qe){var rt=me(this),wt=St==null?void 0:se(St,Ke);return wt?ve(wt,St,rt,Qe):ve(ut,te(rt),St,Qe)},function(ft,St){var Qe=Ae(this),rt=te(ft),wt=ot(ut,Qe,rt,St,ut!==Ve);if(wt.done)return wt.value;var Ct=Pe(Qe,RegExp),bt=Qe.unicode,ct=(Qe.ignoreCase?"i":"")+(Qe.multiline?"m":"")+(Qe.unicode?"u":"")+(je?"g":"y"),xt=new Ct(je?"^(?:"+Qe.source+")":Qe,ct),dt=St===void 0?De:St>>>0;if(dt===0)return[];if(rt.length===0)return le(xt,rt)===null?[rt]:[];for(var Mt=0,yt=0,Ft=[];yt<rt.length;){xt.lastIndex=je?0:yt;var mt=le(xt,je?Ge(rt,yt):rt),vt;if(mt===null||(vt=Fe(z(xt.lastIndex+(je?yt:0)),rt.length))===Mt)yt=fe(rt,yt,bt);else{if(Be(Ft,Ge(rt,Mt,yt)),Ft.length===dt)return Ft;for(var tt=1;tt<=mt.length-1;tt++)if(Be(Ft,mt[tt]),Ft.length===dt)return Ft;yt=Mt=vt}}return Be(Ft,Ge(rt,Mt)),Ft}]},!Ye,je)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/string-trim").trim,Ee=oe("../internals/string-trim-forced");de({target:"String",proto:!0,forced:Ee("trim")},{trim:function(){return ve(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/global"),Ee=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Se=oe("../internals/is-pure"),Ae=oe("../internals/descriptors"),me=oe("../internals/native-symbol"),Pe=oe("../internals/fails"),fe=oe("../internals/has-own-property"),z=oe("../internals/object-is-prototype-of"),te=oe("../internals/an-object"),se=oe("../internals/to-indexed-object"),ie=oe("../internals/to-property-key"),le=oe("../internals/to-string"),ce=oe("../internals/create-property-descriptor"),pe=oe("../internals/object-create"),xe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),De=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Te=oe("../internals/object-get-own-property-descriptor"),Me=oe("../internals/object-define-property"),Be=oe("../internals/object-define-properties"),Ge=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ke=oe("../internals/shared"),Ve=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),ut=oe("../internals/uid"),ft=oe("../internals/well-known-symbol"),St=oe("../internals/well-known-symbol-wrapped"),Qe=oe("../internals/define-well-known-symbol"),rt=oe("../internals/symbol-define-to-primitive"),wt=oe("../internals/set-to-string-tag"),Ct=oe("../internals/internal-state"),bt=oe("../internals/array-iteration").forEach,ct=Ve("hidden"),xt="Symbol",dt="prototype",Mt=Ct.set,yt=Ct.getterFor(xt),Ft=Object[dt],mt=ve.Symbol,vt=mt&&mt[dt],tt=ve.TypeError,He=ve.QObject,we=Te.f,Ne=Me.f,Xe=De.f,nt=Ge.f,Ie=ke([].push),Re=Ke("symbols"),Ze=Ke("op-symbols"),et=Ke("wks"),ht=!He||!He[dt]||!He[dt].findChild,at=Ae&&Pe(function(){return pe(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(on,cn,bn){var xn=we(Ft,cn);xn&&delete Ft[cn],Ne(on,cn,bn),xn&&on!==Ft&&Ne(Ft,cn,xn)}:Ne,Dt=function(on,cn){var bn=Re[on]=pe(vt);return Mt(bn,{type:xt,tag:on,description:cn}),Ae||(bn.description=cn),bn},Et=function(cn,bn,xn){cn===Ft&&Et(Ze,bn,xn),te(cn);var kn=ie(bn);return te(xn),fe(Re,kn)?(xn.enumerable?(fe(cn,ct)&&cn[ct][kn]&&(cn[ct][kn]=!1),xn=pe(xn,{enumerable:ce(0,!1)})):(fe(cn,ct)||Ne(cn,ct,ce(1,{})),cn[ct][kn]=!0),at(cn,kn,xn)):Ne(cn,kn,xn)},Ot=function(cn,bn){te(cn);var xn=se(bn),kn=xe(xn).concat(un(xn));return bt(kn,function(On){(!Ae||Ee(Qt,xn,On))&&Et(cn,On,xn[On])}),cn},qt=function(cn,bn){return bn===void 0?pe(cn):Ot(pe(cn),bn)},Qt=function(cn){var bn=ie(cn),xn=Ee(nt,this,bn);return this===Ft&&fe(Re,bn)&&!fe(Ze,bn)?!1:xn||!fe(this,bn)||!fe(Re,bn)||fe(this,ct)&&this[ct][bn]?xn:!0},Xt=function(cn,bn){var xn=se(cn),kn=ie(bn);if(!(xn===Ft&&fe(Re,kn)&&!fe(Ze,kn))){var On=we(xn,kn);return On&&fe(Re,kn)&&!(fe(xn,ct)&&xn[ct][kn])&&(On.enumerable=!0),On}},Wt=function(cn){var bn=Xe(se(cn)),xn=[];return bt(bn,function(kn){!fe(Re,kn)&&!fe(ot,kn)&&Ie(xn,kn)}),xn},un=function(on){var cn=on===Ft,bn=Xe(cn?Ze:se(on)),xn=[];return bt(bn,function(kn){fe(Re,kn)&&(!cn||fe(Ft,kn))&&Ie(xn,Re[kn])}),xn};me||(mt=function(){if(z(vt,this))throw tt("Symbol is not a constructor");var cn=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),bn=ut(cn),xn=function(kn){this===Ft&&Ee(xn,Ze,kn),fe(this,ct)&&fe(this[ct],bn)&&(this[ct][bn]=!1),at(this,bn,ce(1,kn))};return Ae&&ht&&at(Ft,bn,{configurable:!0,set:xn}),Dt(bn,cn)},vt=mt[dt],Ye(vt,"toString",function(){return yt(this).tag}),Ye(mt,"withoutSetter",function(on){return Dt(ut(on),on)}),Ge.f=Qt,Me.f=Et,Be.f=Ot,Te.f=Xt,je.f=De.f=Wt,Fe.f=un,St.f=function(on){return Dt(ft(on),on)},Ae&&(Ne(vt,"description",{configurable:!0,get:function(){return yt(this).description}}),Se||Ye(Ft,"propertyIsEnumerable",Qt,{unsafe:!0}))),de({global:!0,wrap:!0,forced:!me,sham:!me},{Symbol:mt}),bt(xe(et),function(on){Qe(on)}),de({target:xt,stat:!0,forced:!me},{useSetter:function(){ht=!0},useSimple:function(){ht=!1}}),de({target:"Object",stat:!0,forced:!me,sham:!Ae},{create:qt,defineProperty:Et,defineProperties:Ot,getOwnPropertyDescriptor:Xt}),de({target:"Object",stat:!0,forced:!me},{getOwnPropertyNames:Wt}),rt(),wt(mt,xt),ot[ct]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(oe,Ue,_e){"use strict";var de=oe("../internals/export"),ve=oe("../internals/descriptors"),Ee=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Se=oe("../internals/has-own-property"),Ae=oe("../internals/is-callable"),me=oe("../internals/object-is-prototype-of"),Pe=oe("../internals/to-string"),fe=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),te=Ee.Symbol,se=te&&te.prototype;if(ve&&Ae(te)&&(!("description"in se)||te().description!==void 0)){var ie={},le=function(){var Me=arguments.length<1||arguments[0]===void 0?void 0:Pe(arguments[0]),Be=me(se,this)?new te(Me):Me===void 0?te():te(Me);return Me===""&&(ie[Be]=!0),Be};z(le,te),le.prototype=se,se.constructor=le;var ce=String(te("test"))=="Symbol(test)",pe=ke(se.toString),xe=ke(se.valueOf),je=/^Symbol\((.*)\)[^)]+$/,De=ke("".replace),Fe=ke("".slice);fe(se,"description",{configurable:!0,get:function(){var Me=xe(this),Be=pe(Me);if(Se(ie,Me))return"";var Ge=ce?Fe(Be,7,-1):De(Be,je,"$1");return Ge===""?void 0:Ge}}),de({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/get-built-in"),Ee=oe("../internals/has-own-property"),ke=oe("../internals/to-string"),Se=oe("../internals/shared"),Ae=oe("../internals/native-symbol-registry"),me=Se("string-to-symbol-registry"),Pe=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{for:function(fe){var z=ke(fe);if(Ee(me,z))return me[z];var te=ve("Symbol")(z);return me[z]=te,Pe[te]=z,te}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(oe,Ue,_e){var de=oe("../internals/define-well-known-symbol");de("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,Ue,_e){oe("../modules/es.symbol.constructor"),oe("../modules/es.symbol.for"),oe("../modules/es.symbol.key-for"),oe("../modules/es.json.stringify"),oe("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(oe,Ue,_e){var de=oe("../internals/export"),ve=oe("../internals/has-own-property"),Ee=oe("../internals/is-symbol"),ke=oe("../internals/try-to-string"),Se=oe("../internals/shared"),Ae=oe("../internals/native-symbol-registry"),me=Se("symbol-to-string-registry");de({target:"Symbol",stat:!0,forced:!Ae},{keyFor:function(fe){if(!Ee(fe))throw TypeError(ke(fe)+" is not a symbol");if(ve(me,fe))return me[fe]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(oe,Ue,_e){"use strict";var de=oe("../internals/function-uncurry-this"),ve=oe("../internals/array-buffer-view-core"),Ee=oe("../internals/array-copy-within"),ke=de(Ee),Se=ve.aTypedArray,Ae=ve.exportTypedArrayMethod;Ae("copyWithin",function(Pe,fe){return ke(Se(this),Pe,fe,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").every,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("every",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-call"),Ee=oe("../internals/array-fill"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("fill",function(me){var Pe=arguments.length;return ve(Ee,ke(this),me,Pe>1?arguments[1]:void 0,Pe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").filter,Ee=oe("../internals/typed-array-from-species-and-list"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("filter",function(me){var Pe=ve(ke(this),me,arguments.length>1?arguments[1]:void 0);return Ee(this,Pe)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").findIndex,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("findIndex",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").find,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("find",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").forEach,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("forEach",function(Ae){ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-includes").includes,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("includes",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-includes").indexOf,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("indexOf",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/fails"),Ee=oe("../internals/function-uncurry-this"),ke=oe("../internals/array-buffer-view-core"),Se=oe("../modules/es.array.iterator"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),Pe=de.Uint8Array,fe=Ee(Se.values),z=Ee(Se.keys),te=Ee(Se.entries),se=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=Pe&&Pe.prototype,ce=!ve(function(){le[me].call([1])}),pe=!!le&&le.values&&le[me]===le.values&&le.values.name==="values",xe=function(){return fe(se(this))};ie("entries",function(){return te(se(this))},ce),ie("keys",function(){return z(se(this))},ce),ie("values",xe,ce||!pe,{name:"values"}),ie(me,xe,ce||!pe,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-uncurry-this"),Ee=de.aTypedArray,ke=de.exportTypedArrayMethod,Se=ve([].join);ke("join",function(me){return Se(Ee(this),me)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/function-apply"),Ee=oe("../internals/array-last-index-of"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("lastIndexOf",function(me){var Pe=arguments.length;return ve(Ee,ke(this),Pe>1?[me,arguments[1]]:[me])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").map,Ee=oe("../internals/typed-array-species-constructor"),ke=de.aTypedArray,Se=de.exportTypedArrayMethod;Se("map",function(me){return ve(ke(this),me,arguments.length>1?arguments[1]:void 0,function(Pe,fe){return new(Ee(Pe))(fe)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-reduce").right,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("reduceRight",function(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-reduce").left,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("reduce",function(Ae){var me=arguments.length;return ve(Ee(this),Ae,me,me>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=de.aTypedArray,Ee=de.exportTypedArrayMethod,ke=Math.floor;Ee("reverse",function(){for(var Ae=this,me=ve(Ae).length,Pe=ke(me/2),fe=0,z;fe<Pe;)z=Ae[fe],Ae[fe++]=Ae[--me],Ae[me]=z;return Ae})},{"../internals/array-buffer-view-core":103}],331:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-call"),Ee=oe("../internals/array-buffer-view-core"),ke=oe("../internals/length-of-array-like"),Se=oe("../internals/to-offset"),Ae=oe("../internals/to-object"),me=oe("../internals/fails"),Pe=de.RangeError,fe=de.Int8Array,z=fe&&fe.prototype,te=z&&z.set,se=Ee.aTypedArray,ie=Ee.exportTypedArrayMethod,le=!me(function(){var pe=new Uint8ClampedArray(2);return ve(te,pe,{length:1,0:3},1),pe[1]!==3}),ce=le&&Ee.NATIVE_ARRAY_BUFFER_VIEWS&&me(function(){var pe=new fe(2);return pe.set(1),pe.set("2",1),pe[0]!==0||pe[1]!==2});ie("set",function(xe){se(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),De=Ae(xe);if(le)return ve(te,this,De,je);var Fe=this.length,Te=ke(De),Me=0;if(Te+je>Fe)throw Pe("Wrong length");for(;Me<Te;)this[je+Me]=De[Me++]},!le||ce)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/typed-array-species-constructor"),Ee=oe("../internals/fails"),ke=oe("../internals/array-slice"),Se=de.aTypedArray,Ae=de.exportTypedArrayMethod,me=Ee(function(){new Int8Array(1).slice()});Ae("slice",function(fe,z){for(var te=ke(Se(this),fe,z),se=ve(this),ie=0,le=te.length,ce=new se(le);le>ie;)ce[ie]=te[ie++];return ce},me)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-iteration").some,Ee=de.aTypedArray,ke=de.exportTypedArrayMethod;ke("some",function(Ae){return ve(Ee(this),Ae,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-uncurry-this"),Ee=oe("../internals/fails"),ke=oe("../internals/a-callable"),Se=oe("../internals/array-sort"),Ae=oe("../internals/array-buffer-view-core"),me=oe("../internals/engine-ff-version"),Pe=oe("../internals/engine-is-ie-or-edge"),fe=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),te=Ae.aTypedArray,se=Ae.exportTypedArrayMethod,ie=de.Uint16Array,le=ie&&ve(ie.prototype.sort),ce=!!le&&!(Ee(function(){le(new ie(2),null)})&&Ee(function(){le(new ie(2),{})})),pe=!!le&&!Ee(function(){if(fe)return fe<74;if(me)return me<67;if(Pe)return!0;if(z)return z<602;var je=new ie(516),De=Array(516),Fe,Te;for(Fe=0;Fe<516;Fe++)Te=Fe%4,je[Fe]=515-Fe,De[Fe]=Fe-2*Te+3;for(le(je,function(Me,Be){return(Me/4|0)-(Be/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==De[Fe])return!0}),xe=function(je){return function(De,Fe){return je!==void 0?+je(De,Fe)||0:Fe!==Fe?-1:De!==De?1:De===0&&Fe===0?1/De>0&&1/Fe<0?1:-1:De>Fe}};se("sort",function(De){return De!==void 0&&ke(De),pe?le(this,De):Se(te(this),xe(De))},!pe||ce)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core"),ve=oe("../internals/to-length"),Ee=oe("../internals/to-absolute-index"),ke=oe("../internals/typed-array-species-constructor"),Se=de.aTypedArray,Ae=de.exportTypedArrayMethod;Ae("subarray",function(Pe,fe){var z=Se(this),te=z.length,se=Ee(Pe,te),ie=ke(z);return new ie(z.buffer,z.byteOffset+se*z.BYTES_PER_ELEMENT,ve((fe===void 0?te:Ee(fe,te))-se))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(oe,Ue,_e){"use strict";var de=oe("../internals/global"),ve=oe("../internals/function-apply"),Ee=oe("../internals/array-buffer-view-core"),ke=oe("../internals/fails"),Se=oe("../internals/array-slice"),Ae=de.Int8Array,me=Ee.aTypedArray,Pe=Ee.exportTypedArrayMethod,fe=[].toLocaleString,z=!!Ae&&ke(function(){fe.call(new Ae(1))}),te=ke(function(){return[1,2].toLocaleString()!=new Ae([1,2]).toLocaleString()})||!ke(function(){Ae.prototype.toLocaleString.call([1,2])});Pe("toLocaleString",function(){return ve(fe,z?Se(me(this)):me(this),Se(arguments))},te)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(oe,Ue,_e){"use strict";var de=oe("../internals/array-buffer-view-core").exportTypedArrayMethod,ve=oe("../internals/fails"),Ee=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Se=Ee.Uint8Array,Ae=Se&&Se.prototype||{},me=[].toString,Pe=ke([].join);ve(function(){me.call({})})&&(me=function(){return Pe(this)});var fe=Ae.toString!=me;de("toString",me,fe)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,Ue,_e){var de=oe("../internals/typed-array-constructor");de("Uint8",function(ve){return function(ke,Se,Ae){return ve(this,ke,Se,Ae)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/dom-iterables"),Ee=oe("../internals/dom-token-list-prototype"),ke=oe("../internals/array-for-each"),Se=oe("../internals/create-non-enumerable-property"),Ae=function(Pe){if(Pe&&Pe.forEach!==ke)try{Se(Pe,"forEach",ke)}catch(fe){Pe.forEach=ke}};for(var me in ve)ve[me]&&Ae(de[me]&&de[me].prototype);Ae(Ee)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(oe,Ue,_e){var de=oe("../internals/global"),ve=oe("../internals/dom-iterables"),Ee=oe("../internals/dom-token-list-prototype"),ke=oe("../modules/es.array.iterator"),Se=oe("../internals/create-non-enumerable-property"),Ae=oe("../internals/well-known-symbol"),me=Ae("iterator"),Pe=Ae("toStringTag"),fe=ke.values,z=function(se,ie){if(se){if(se[me]!==fe)try{Se(se,me,fe)}catch(ce){se[me]=fe}if(se[Pe]||Se(se,Pe,ie),ve[ie]){for(var le in ke)if(se[le]!==ke[le])try{Se(se,le,ke[le])}catch(ce){se[le]=ke[le]}}}};for(var te in ve)z(de[te]&&de[te].prototype,te);z(Ee,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(oe,Ue,_e){function de(pe){return Array.isArray?Array.isArray(pe):ce(pe)==="[object Array]"}_e.isArray=de;function ve(pe){return typeof pe=="boolean"}_e.isBoolean=ve;function Ee(pe){return pe===null}_e.isNull=Ee;function ke(pe){return pe==null}_e.isNullOrUndefined=ke;function Se(pe){return typeof pe=="number"}_e.isNumber=Se;function Ae(pe){return typeof pe=="string"}_e.isString=Ae;function me(pe){return typeof pe=="symbol"}_e.isSymbol=me;function Pe(pe){return pe===void 0}_e.isUndefined=Pe;function fe(pe){return ce(pe)==="[object RegExp]"}_e.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}_e.isObject=z;function te(pe){return ce(pe)==="[object Date]"}_e.isDate=te;function se(pe){return ce(pe)==="[object Error]"||pe instanceof Error}_e.isError=se;function ie(pe){return typeof pe=="function"}_e.isFunction=ie;function le(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}_e.isPrimitive=le,_e.isBuffer=oe("buffer").Buffer.isBuffer;function ce(pe){return Object.prototype.toString.call(pe)}},{buffer:90}],342:[function(oe,Ue,_e){(function(de){"use strict";var ve=function(){var me=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,Pe=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,fe=/[^-+\dA-Z]/g;return function(z,te,se,ie){if(arguments.length===1&&Ae(z)==="string"&&!/\d/.test(z)&&(te=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");te=String(ve.masks[te]||te||ve.masks.default);var le=te.slice(0,4);(le==="UTC:"||le==="GMT:")&&(te=te.slice(4),se=!0,le==="GMT:"&&(ie=!0));var ce=se?"getUTC":"get",pe=z[ce+"Date"](),xe=z[ce+"Day"](),je=z[ce+"Month"](),De=z[ce+"FullYear"](),Fe=z[ce+"Hours"](),Te=z[ce+"Minutes"](),Me=z[ce+"Seconds"](),Be=z[ce+"Milliseconds"](),Ge=se?0:z.getTimezoneOffset(),Ye=ke(z),Ke=Se(z),Ve={d:pe,dd:Ee(pe),ddd:ve.i18n.dayNames[xe],dddd:ve.i18n.dayNames[xe+7],m:je+1,mm:Ee(je+1),mmm:ve.i18n.monthNames[je],mmmm:ve.i18n.monthNames[je+12],yy:String(De).slice(2),yyyy:De,h:Fe%12||12,hh:Ee(Fe%12||12),H:Fe,HH:Ee(Fe),M:Te,MM:Ee(Te),s:Me,ss:Ee(Me),l:Ee(Be,3),L:Ee(Math.round(Be/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":se?"UTC":(String(z).match(Pe)||[""]).pop().replace(fe,""),o:(Ge>0?"-":"+")+Ee(Math.floor(Math.abs(Ge)/60)*100+Math.abs(Ge)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ye,N:Ke};return te.replace(me,function(ot){return ot in Ve?Ve[ot]:ot.slice(1,ot.length-1)})}}();ve.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ve.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function Ee(me,Pe){for(me=String(me),Pe=Pe||2;me.length<Pe;)me="0"+me;return me}function ke(me){var Pe=new Date(me.getFullYear(),me.getMonth(),me.getDate());Pe.setDate(Pe.getDate()-(Pe.getDay()+6)%7+3);var fe=new Date(Pe.getFullYear(),0,4);fe.setDate(fe.getDate()-(fe.getDay()+6)%7+3);var z=Pe.getTimezoneOffset()-fe.getTimezoneOffset();Pe.setHours(Pe.getHours()-z);var te=(Pe-fe)/(864e5*7);return 1+Math.floor(te)}function Se(me){var Pe=me.getDay();return Pe===0&&(Pe=7),Pe}function Ae(me){return me===null?"null":me===void 0?"undefined":typeof me!="object"?typeof me:Array.isArray(me)?"array":{}.toString.call(me).slice(8,-1).toLowerCase()}typeof pt=="function"&&pt.amd?pt(function(){return ve}):typeof _e=="object"?Ue.exports=ve:de.dateFormat=ve})(this)},{}],343:[function(oe,Ue,_e){"use strict";var de=/["'&<>]/;Ue.exports=ve;function ve(Ee){var ke=""+Ee,Se=de.exec(ke);if(!Se)return ke;var Ae,me="",Pe=0,fe=0;for(Pe=Se.index;Pe<ke.length;Pe++){switch(ke.charCodeAt(Pe)){case 34:Ae=""";break;case 38:Ae="&";break;case 39:Ae="'";break;case 60:Ae="<";break;case 62:Ae=">";break;default:continue}fe!==Pe&&(me+=ke.substring(fe,Pe)),fe=Pe+1,me+=Ae}return fe!==Pe?me+ke.substring(fe,Pe):me}},{}],344:[function(oe,Ue,_e){"use strict";var de=typeof Reflect=="object"?Reflect:null,ve=de&&typeof de.apply=="function"?de.apply:function(Me,Be,Ge){return Function.prototype.apply.call(Me,Be,Ge)},Ee;de&&typeof de.ownKeys=="function"?Ee=de.ownKeys:Object.getOwnPropertySymbols?Ee=function(Me){return Object.getOwnPropertyNames(Me).concat(Object.getOwnPropertySymbols(Me))}:Ee=function(Me){return Object.getOwnPropertyNames(Me)};function ke(Te){console&&console.warn&&console.warn(Te)}var Se=Number.isNaN||function(Me){return Me!==Me};function Ae(){Ae.init.call(this)}Ue.exports=Ae,Ue.exports.once=je,Ae.EventEmitter=Ae,Ae.prototype._events=void 0,Ae.prototype._eventsCount=0,Ae.prototype._maxListeners=void 0;var me=10;function Pe(Te){if(typeof Te!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Te)}Object.defineProperty(Ae,"defaultMaxListeners",{enumerable:!0,get:function(){return me},set:function(Te){if(typeof Te!="number"||Te<0||Se(Te))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Te+".");me=Te}}),Ae.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ae.prototype.setMaxListeners=function(Me){if(typeof Me!="number"||Me<0||Se(Me))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Me+".");return this._maxListeners=Me,this};function fe(Te){return Te._maxListeners===void 0?Ae.defaultMaxListeners:Te._maxListeners}Ae.prototype.getMaxListeners=function(){return fe(this)},Ae.prototype.emit=function(Me){for(var Be=[],Ge=1;Ge<arguments.length;Ge++)Be.push(arguments[Ge]);var Ye=Me==="error",Ke=this._events;if(Ke!==void 0)Ye=Ye&&Ke.error===void 0;else if(!Ye)return!1;if(Ye){var Ve;if(Be.length>0&&(Ve=Be[0]),Ve instanceof Error)throw Ve;var ot=new Error("Unhandled error."+(Ve?" ("+Ve.message+")":""));throw ot.context=Ve,ot}var ut=Ke[Me];if(ut===void 0)return!1;if(typeof ut=="function")ve(ut,this,Be);else for(var ft=ut.length,St=ce(ut,ft),Ge=0;Ge<ft;++Ge)ve(St[Ge],this,Be);return!0};function z(Te,Me,Be,Ge){var Ye,Ke,Ve;if(Pe(Be),Ke=Te._events,Ke===void 0?(Ke=Te._events=Object.create(null),Te._eventsCount=0):(Ke.newListener!==void 0&&(Te.emit("newListener",Me,Be.listener?Be.listener:Be),Ke=Te._events),Ve=Ke[Me]),Ve===void 0)Ve=Ke[Me]=Be,++Te._eventsCount;else if(typeof Ve=="function"?Ve=Ke[Me]=Ge?[Be,Ve]:[Ve,Be]:Ge?Ve.unshift(Be):Ve.push(Be),Ye=fe(Te),Ye>0&&Ve.length>Ye&&!Ve.warned){Ve.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Ve.length+" "+String(Me)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Te,ot.type=Me,ot.count=Ve.length,ke(ot)}return Te}Ae.prototype.addListener=function(Me,Be){return z(this,Me,Be,!1)},Ae.prototype.on=Ae.prototype.addListener,Ae.prototype.prependListener=function(Me,Be){return z(this,Me,Be,!0)};function te(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function se(Te,Me,Be){var Ge={fired:!1,wrapFn:void 0,target:Te,type:Me,listener:Be},Ye=te.bind(Ge);return Ye.listener=Be,Ge.wrapFn=Ye,Ye}Ae.prototype.once=function(Me,Be){return Pe(Be),this.on(Me,se(this,Me,Be)),this},Ae.prototype.prependOnceListener=function(Me,Be){return Pe(Be),this.prependListener(Me,se(this,Me,Be)),this},Ae.prototype.removeListener=function(Me,Be){var Ge,Ye,Ke,Ve,ot;if(Pe(Be),Ye=this._events,Ye===void 0)return this;if(Ge=Ye[Me],Ge===void 0)return this;if(Ge===Be||Ge.listener===Be)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Me],Ye.removeListener&&this.emit("removeListener",Me,Ge.listener||Be));else if(typeof Ge!="function"){for(Ke=-1,Ve=Ge.length-1;Ve>=0;Ve--)if(Ge[Ve]===Be||Ge[Ve].listener===Be){ot=Ge[Ve].listener,Ke=Ve;break}if(Ke<0)return this;Ke===0?Ge.shift():pe(Ge,Ke),Ge.length===1&&(Ye[Me]=Ge[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Me,ot||Be)}return this},Ae.prototype.off=Ae.prototype.removeListener,Ae.prototype.removeAllListeners=function(Me){var Be,Ge,Ye;if(Ge=this._events,Ge===void 0)return this;if(Ge.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ge[Me]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ge[Me]),this;if(arguments.length===0){var Ke=Object.keys(Ge),Ve;for(Ye=0;Ye<Ke.length;++Ye)Ve=Ke[Ye],Ve!=="removeListener"&&this.removeAllListeners(Ve);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Be=Ge[Me],typeof Be=="function")this.removeListener(Me,Be);else if(Be!==void 0)for(Ye=Be.length-1;Ye>=0;Ye--)this.removeListener(Me,Be[Ye]);return this};function ie(Te,Me,Be){var Ge=Te._events;if(Ge===void 0)return[];var Ye=Ge[Me];return Ye===void 0?[]:typeof Ye=="function"?Be?[Ye.listener||Ye]:[Ye]:Be?xe(Ye):ce(Ye,Ye.length)}Ae.prototype.listeners=function(Me){return ie(this,Me,!0)},Ae.prototype.rawListeners=function(Me){return ie(this,Me,!1)},Ae.listenerCount=function(Te,Me){return typeof Te.listenerCount=="function"?Te.listenerCount(Me):le.call(Te,Me)},Ae.prototype.listenerCount=le;function le(Te){var Me=this._events;if(Me!==void 0){var Be=Me[Te];if(typeof Be=="function")return 1;if(Be!==void 0)return Be.length}return 0}Ae.prototype.eventNames=function(){return this._eventsCount>0?Ee(this._events):[]};function ce(Te,Me){for(var Be=new Array(Me),Ge=0;Ge<Me;++Ge)Be[Ge]=Te[Ge];return Be}function pe(Te,Me){for(;Me+1<Te.length;Me++)Te[Me]=Te[Me+1];Te.pop()}function xe(Te){for(var Me=new Array(Te.length),Be=0;Be<Me.length;++Be)Me[Be]=Te[Be].listener||Te[Be];return Me}function je(Te,Me){return new Promise(function(Be,Ge){function Ye(Ve){Te.removeListener(Me,Ke),Ge(Ve)}function Ke(){typeof Te.removeListener=="function"&&Te.removeListener("error",Ye),Be([].slice.call(arguments))}Fe(Te,Me,Ke,{once:!0}),Me!=="error"&&De(Te,Ye,{once:!0})})}function De(Te,Me,Be){typeof Te.on=="function"&&Fe(Te,"error",Me,Be)}function Fe(Te,Me,Be,Ge){if(typeof Te.on=="function")Ge.once?Te.once(Me,Be):Te.on(Me,Be);else if(typeof Te.addEventListener=="function")Te.addEventListener(Me,function Ye(Ke){Ge.once&&Te.removeEventListener(Me,Ye),Be(Ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Te)}},{}],345:[function(oe,Ue,_e){"use strict";var de=oe("is-callable"),ve=Object.prototype.toString,Ee=Object.prototype.hasOwnProperty,ke=function(fe,z,te){for(var se=0,ie=fe.length;se<ie;se++)Ee.call(fe,se)&&(te==null?z(fe[se],se,fe):z.call(te,fe[se],se,fe))},Se=function(fe,z,te){for(var se=0,ie=fe.length;se<ie;se++)te==null?z(fe.charAt(se),se,fe):z.call(te,fe.charAt(se),se,fe)},Ae=function(fe,z,te){for(var se in fe)Ee.call(fe,se)&&(te==null?z(fe[se],se,fe):z.call(te,fe[se],se,fe))},me=function(fe,z,te){if(!de(z))throw new TypeError("iterator must be a function");var se;arguments.length>=3&&(se=te),ve.call(fe)==="[object Array]"?ke(fe,z,se):typeof fe=="string"?Se(fe,z,se):Ae(fe,z,se)};Ue.exports=me},{"is-callable":367}],346:[function(oe,Ue,_e){"use strict";var de="Function.prototype.bind called on incompatible ",ve=Array.prototype.slice,Ee=Object.prototype.toString,ke="[object Function]";Ue.exports=function(Ae){var me=this;if(typeof me!="function"||Ee.call(me)!==ke)throw new TypeError(de+me);for(var Pe=ve.call(arguments,1),fe,z=function(){if(this instanceof fe){var ce=me.apply(this,Pe.concat(ve.call(arguments)));return Object(ce)===ce?ce:this}else return me.apply(Ae,Pe.concat(ve.call(arguments)))},te=Math.max(0,me.length-Pe.length),se=[],ie=0;ie<te;ie++)se.push("$"+ie);if(fe=Function("binder","return function ("+se.join(",")+"){ return binder.apply(this,arguments); }")(z),me.prototype){var le=function(){};le.prototype=me.prototype,fe.prototype=new le,le.prototype=null}return fe}},{}],347:[function(oe,Ue,_e){"use strict";var de=oe("./implementation");Ue.exports=Function.prototype.bind||de},{"./implementation":346}],348:[function(oe,Ue,_e){"use strict";var de,ve=SyntaxError,Ee=Function,ke=TypeError,Se=function(ut){try{return Ee('"use strict"; return ('+ut+").constructor;")()}catch(ft){}},Ae=Object.getOwnPropertyDescriptor;if(Ae)try{Ae({},"")}catch(ut){Ae=null}var me=function(){throw new ke},Pe=Ae?function(){try{return arguments.callee,me}catch(ut){try{return Ae(arguments,"callee").get}catch(ft){return me}}}():me,fe=oe("has-symbols")(),z=oe("has-proto")(),te=Object.getPrototypeOf||(z?function(ut){return ut.__proto__}:null),se={},ie=typeof Uint8Array=="undefined"||!te?de:te(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?de:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?de:ArrayBuffer,"%ArrayIteratorPrototype%":fe&&te?te([][Symbol.iterator]()):de,"%AsyncFromSyncIteratorPrototype%":de,"%AsyncFunction%":se,"%AsyncGenerator%":se,"%AsyncGeneratorFunction%":se,"%AsyncIteratorPrototype%":se,"%Atomics%":typeof Atomics=="undefined"?de:Atomics,"%BigInt%":typeof BigInt=="undefined"?de:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?de:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?de:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?de:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?de:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?de:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?de:FinalizationRegistry,"%Function%":Ee,"%GeneratorFunction%":se,"%Int8Array%":typeof Int8Array=="undefined"?de:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?de:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?de:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fe&&te?te(te([][Symbol.iterator]())):de,"%JSON%":typeof JSON=="object"?JSON:de,"%Map%":typeof Map=="undefined"?de:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!fe||!te?de:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?de:Promise,"%Proxy%":typeof Proxy=="undefined"?de:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?de:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?de:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!fe||!te?de:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?de:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fe&&te?te(""[Symbol.iterator]()):de,"%Symbol%":fe?Symbol:de,"%SyntaxError%":ve,"%ThrowTypeError%":Pe,"%TypedArray%":ie,"%TypeError%":ke,"%Uint8Array%":typeof Uint8Array=="undefined"?de:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?de:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?de:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?de:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?de:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?de:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?de:WeakSet};if(te)try{null.error}catch(ut){var ce=te(te(ut));le["%Error.prototype%"]=ce}var pe=function ut(ft){var St;if(ft==="%AsyncFunction%")St=Se("async function () {}");else if(ft==="%GeneratorFunction%")St=Se("function* () {}");else if(ft==="%AsyncGeneratorFunction%")St=Se("async function* () {}");else if(ft==="%AsyncGenerator%"){var Qe=ut("%AsyncGeneratorFunction%");Qe&&(St=Qe.prototype)}else if(ft==="%AsyncIteratorPrototype%"){var rt=ut("%AsyncGenerator%");rt&&te&&(St=te(rt.prototype))}return le[ft]=St,St},xe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},je=oe("function-bind"),De=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Te=je.call(Function.apply,Array.prototype.splice),Me=je.call(Function.call,String.prototype.replace),Be=je.call(Function.call,String.prototype.slice),Ge=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ke=/\\(\\)?/g,Ve=function(ft){var St=Be(ft,0,1),Qe=Be(ft,-1);if(St==="%"&&Qe!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(Qe==="%"&&St!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var rt=[];return Me(ft,Ye,function(wt,Ct,bt,ct){rt[rt.length]=bt?Me(ct,Ke,"$1"):Ct||wt}),rt},ot=function(ft,St){var Qe=ft,rt;if(De(xe,Qe)&&(rt=xe[Qe],Qe="%"+rt[0]+"%"),De(le,Qe)){var wt=le[Qe];if(wt===se&&(wt=pe(Qe)),typeof wt=="undefined"&&!St)throw new ke("intrinsic "+ft+" exists, but is not available. Please file an issue!");return{alias:rt,name:Qe,value:wt}}throw new ve("intrinsic "+ft+" does not exist!")};Ue.exports=function(ft,St){if(typeof ft!="string"||ft.length===0)throw new ke("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof St!="boolean")throw new ke('"allowMissing" argument must be a boolean');if(Ge(/^%?[^%]*%?$/,ft)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Qe=Ve(ft),rt=Qe.length>0?Qe[0]:"",wt=ot("%"+rt+"%",St),Ct=wt.name,bt=wt.value,ct=!1,xt=wt.alias;xt&&(rt=xt[0],Te(Qe,Fe([0,1],xt)));for(var dt=1,Mt=!0;dt<Qe.length;dt+=1){var yt=Qe[dt],Ft=Be(yt,0,1),mt=Be(yt,-1);if((Ft==='"'||Ft==="'"||Ft==="`"||mt==='"'||mt==="'"||mt==="`")&&Ft!==mt)throw new ve("property names with quotes must have matching quotes");if((yt==="constructor"||!Mt)&&(ct=!0),rt+="."+yt,Ct="%"+rt+"%",De(le,Ct))bt=le[Ct];else if(bt!=null){if(!(yt in bt)){if(!St)throw new ke("base intrinsic for "+ft+" exists, but the property is not available.");return}if(Ae&&dt+1>=Qe.length){var vt=Ae(bt,yt);Mt=!!vt,Mt&&"get"in vt&&!("originalValue"in vt.get)?bt=vt.get:bt=bt[yt]}else Mt=De(bt,yt),bt=bt[yt];Mt&&!ct&&(le[Ct]=bt)}}return bt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,Ue,_e){"use strict";var de=oe("get-intrinsic"),ve=de("%Object.getOwnPropertyDescriptor%",!0);if(ve)try{ve([],"length")}catch(Ee){ve=null}Ue.exports=ve},{"get-intrinsic":348}],350:[function(oe,Ue,_e){"use strict";var de={foo:{}},ve=Object;Ue.exports=function(){return{__proto__:de}.foo===de.foo&&!({__proto__:null}instanceof ve)}},{}],351:[function(oe,Ue,_e){"use strict";var de=typeof Symbol!="undefined"&&Symbol,ve=oe("./shams");Ue.exports=function(){return typeof de!="function"||typeof Symbol!="function"||typeof de("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ve()}},{"./shams":352}],352:[function(oe,Ue,_e){"use strict";Ue.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var ve={},Ee=Symbol("test"),ke=Object(Ee);if(typeof Ee=="string"||Object.prototype.toString.call(Ee)!=="[object Symbol]"||Object.prototype.toString.call(ke)!=="[object Symbol]")return!1;var Se=42;ve[Ee]=Se;for(Ee in ve)return!1;if(typeof Object.keys=="function"&&Object.keys(ve).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(ve).length!==0)return!1;var Ae=Object.getOwnPropertySymbols(ve);if(Ae.length!==1||Ae[0]!==Ee||!Object.prototype.propertyIsEnumerable.call(ve,Ee))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var me=Object.getOwnPropertyDescriptor(ve,Ee);if(me.value!==Se||me.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,Ue,_e){"use strict";var de=oe("has-symbols/shams");Ue.exports=function(){return de()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,Ue,_e){"use strict";var de=oe("function-bind");Ue.exports=de.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,Ue,_e){var de=oe("http"),ve=oe("url"),Ee=Ue.exports;for(var ke in de)de.hasOwnProperty(ke)&&(Ee[ke]=de[ke]);Ee.request=function(Ae,me){return Ae=Se(Ae),de.request.call(this,Ae,me)},Ee.get=function(Ae,me){return Ae=Se(Ae),de.get.call(this,Ae,me)};function Se(Ae){if(typeof Ae=="string"&&(Ae=ve.parse(Ae)),Ae.protocol||(Ae.protocol="https:"),Ae.protocol!=="https:")throw new Error('Protocol "'+Ae.protocol+'" not supported. Expected "https:"');return Ae}},{http:468,url:472}],356:[function(oe,Ue,_e){"use strict";var de=oe("util"),ve=oe("ms");Ue.exports=function(Ee){if(typeof Ee=="number")return Ee;var ke=ve(Ee);if(ke===void 0){var Se=new Error(de.format("humanize-ms(%j) result undefined",Ee));console.warn(Se.stack)}return ke}},{ms:376,util:419}],357:[function(oe,Ue,_e){_e.read=function(de,ve,Ee,ke,Se){var Ae,me,Pe=Se*8-ke-1,fe=(1<<Pe)-1,z=fe>>1,te=-7,se=Ee?Se-1:0,ie=Ee?-1:1,le=de[ve+se];for(se+=ie,Ae=le&(1<<-te)-1,le>>=-te,te+=Pe;te>0;Ae=Ae*256+de[ve+se],se+=ie,te-=8);for(me=Ae&(1<<-te)-1,Ae>>=-te,te+=ke;te>0;me=me*256+de[ve+se],se+=ie,te-=8);if(Ae===0)Ae=1-z;else{if(Ae===fe)return me?NaN:(le?-1:1)*(1/0);me=me+Math.pow(2,ke),Ae=Ae-z}return(le?-1:1)*me*Math.pow(2,Ae-ke)},_e.write=function(de,ve,Ee,ke,Se,Ae){var me,Pe,fe,z=Ae*8-Se-1,te=(1<<z)-1,se=te>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=ke?0:Ae-1,ce=ke?1:-1,pe=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===1/0?(Pe=isNaN(ve)?1:0,me=te):(me=Math.floor(Math.log(ve)/Math.LN2),ve*(fe=Math.pow(2,-me))<1&&(me--,fe*=2),me+se>=1?ve+=ie/fe:ve+=ie*Math.pow(2,1-se),ve*fe>=2&&(me++,fe/=2),me+se>=te?(Pe=0,me=te):me+se>=1?(Pe=(ve*fe-1)*Math.pow(2,Se),me=me+se):(Pe=ve*Math.pow(2,se-1)*Math.pow(2,Se),me=0));Se>=8;de[Ee+le]=Pe&255,le+=ce,Pe/=256,Se-=8);for(me=me<<Se|Pe,z+=Se;z>0;de[Ee+le]=me&255,le+=ce,me/=256,z-=8);de[Ee+le-ce]|=pe*128}},{}],358:[function(oe,Ue,_e){"use strict";var de=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],ve,Ee,ke=-1,Se=[],Ae=!1;function me(){!ve||!Ee||(ve=!1,Ee.length?Se=Ee.concat(Se):ke=-1,Se.length&&Pe())}function Pe(){if(!ve){Ae=!1,ve=!0;for(var le=Se.length,ce=setTimeout(me);le;){for(Ee=Se,Se=[];Ee&&++ke<le;)Ee[ke].run();ke=-1,le=Se.length}Ee=null,ke=-1,ve=!1,clearTimeout(ce)}}for(var fe,z=-1,te=de.length;++z<te;)if(de[z]&&de[z].test&&de[z].test()){fe=de[z].install(Pe);break}function se(le,ce){this.fun=le,this.array=ce}se.prototype.run=function(){var le=this.fun,ce=this.array;switch(ce.length){case 0:return le();case 1:return le(ce[0]);case 2:return le(ce[0],ce[1]);case 3:return le(ce[0],ce[1],ce[2]);default:return le.apply(null,ce)}},Ue.exports=ie;function ie(le){var ce=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)ce[pe-1]=arguments[pe];Se.push(new se(le,ce)),!Ae&&!ve&&(Ae=!0,fe())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,Ue,_e){(function(de){(function(){"use strict";_e.test=function(){return de.setImmediate?!1:typeof de.MessageChannel!="undefined"},_e.install=function(ve){var Ee=new de.MessageChannel;return Ee.port1.onmessage=ve,function(){Ee.port2.postMessage(0)}}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=de.MutationObserver||de.WebKitMutationObserver;_e.test=function(){return ve},_e.install=function(Ee){var ke=0,Se=new ve(Ee),Ae=de.document.createTextNode("");return Se.observe(Ae,{characterData:!0}),function(){Ae.data=ke=++ke%2}}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,Ue,_e){(function(de){(function(){"use strict";_e.test=function(){return typeof de.queueMicrotask=="function"},_e.install=function(ve){return function(){de.queueMicrotask(ve)}}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(oe,Ue,_e){(function(de){(function(){"use strict";_e.test=function(){return"document"in de&&"onreadystatechange"in de.document.createElement("script")},_e.install=function(ve){return function(){var Ee=de.document.createElement("script");return Ee.onreadystatechange=function(){ve(),Ee.onreadystatechange=null,Ee.parentNode.removeChild(Ee),Ee=null},de.document.documentElement.appendChild(Ee),ve}}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(oe,Ue,_e){"use strict";_e.test=function(){return!0},_e.install=function(de){return function(){setTimeout(de,0)}}},{}],364:[function(oe,Ue,_e){typeof Object.create=="function"?Ue.exports=function(ve,Ee){Ee&&(ve.super_=Ee,ve.prototype=Object.create(Ee.prototype,{constructor:{value:ve,enumerable:!1,writable:!0,configurable:!0}}))}:Ue.exports=function(ve,Ee){if(Ee){ve.super_=Ee;var ke=function(){};ke.prototype=Ee.prototype,ve.prototype=new ke,ve.prototype.constructor=ve}}},{}],365:[function(oe,Ue,_e){"use strict";var de=oe("has-tostringtag/shams")(),ve=oe("call-bind/callBound"),Ee=ve("Object.prototype.toString"),ke=function(Pe){return de&&Pe&&typeof Pe=="object"&&Symbol.toStringTag in Pe?!1:Ee(Pe)==="[object Arguments]"},Se=function(Pe){return ke(Pe)?!0:Pe!==null&&typeof Pe=="object"&&typeof Pe.length=="number"&&Pe.length>=0&&Ee(Pe)!=="[object Array]"&&Ee(Pe.callee)==="[object Function]"},Ae=function(){return ke(arguments)}();ke.isLegacyArguments=Se,Ue.exports=Ae?ke:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,Ue,_e){Ue.exports=function(Ee){return Ee!=null&&(de(Ee)||ve(Ee)||!!Ee._isBuffer)};function de(Ee){return!!Ee.constructor&&typeof Ee.constructor.isBuffer=="function"&&Ee.constructor.isBuffer(Ee)}function ve(Ee){return typeof Ee.readFloatLE=="function"&&typeof Ee.slice=="function"&&de(Ee.slice(0,0))}},{}],367:[function(oe,Ue,_e){"use strict";var de=Function.prototype.toString,ve=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ee,ke;if(typeof ve=="function"&&typeof Object.defineProperty=="function")try{Ee=Object.defineProperty({},"length",{get:function(){throw ke}}),ke={},ve(function(){throw 42},null,Ee)}catch(De){De!==ke&&(ve=null)}else ve=null;var Se=/^\s*class\b/,Ae=function(Fe){try{var Te=de.call(Fe);return Se.test(Te)}catch(Me){return!1}},me=function(Fe){try{return Ae(Fe)?!1:(de.call(Fe),!0)}catch(Te){return!1}},Pe=Object.prototype.toString,fe="[object Object]",z="[object Function]",te="[object GeneratorFunction]",se="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ce=typeof Symbol=="function"&&!!Symbol.toStringTag,pe=!(0 in[,]),xe=function(){return!1};if(typeof document=="object"){var je=document.all;Pe.call(je)===Pe.call(document.all)&&(xe=function(Fe){if((pe||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Te=Pe.call(Fe);return(Te===se||Te===ie||Te===le||Te===fe)&&Fe("")==null}catch(Me){}return!1})}Ue.exports=ve?function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{ve(Fe,null,Ee)}catch(Te){if(Te!==ke)return!1}return!Ae(Fe)&&me(Fe)}:function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ce)return me(Fe);if(Ae(Fe))return!1;var Te=Pe.call(Fe);return Te!==z&&Te!==te&&!/^\[object HTML/.test(Te)?!1:me(Fe)}},{}],368:[function(oe,Ue,_e){"use strict";var de=Object.prototype.toString,ve=Function.prototype.toString,Ee=/^\s*(?:function)?\*/,ke=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,Ae=function(){if(!ke)return!1;try{return Function("return function*() {}")()}catch(Pe){}},me;Ue.exports=function(fe){if(typeof fe!="function")return!1;if(Ee.test(ve.call(fe)))return!0;if(!ke){var z=de.call(fe);return z==="[object GeneratorFunction]"}if(!Se)return!1;if(typeof me=="undefined"){var te=Ae();me=te?Se(te):!1}return Se(fe)===me}},{"has-tostringtag/shams":353}],369:[function(oe,Ue,_e){"use strict";var de=oe("which-typed-array");Ue.exports=function(Ee){return!!de(Ee)}},{"which-typed-array":420}],370:[function(oe,Ue,_e){var de={}.toString;Ue.exports=Array.isArray||function(ve){return de.call(ve)=="[object Array]"}},{}],371:[function(oe,Ue,_e){(function(de){(function(){(function(ve,Ee){typeof _e=="object"&&typeof Ue!="undefined"?Ue.exports=Ee(ve):typeof pt=="function"&&pt.amd?pt(Ee):Ee(ve)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof de!="undefined"?de:this,function(ve){"use strict";ve=ve||{};var Ee=ve.Base64,ke="2.6.4",Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=function(ft){for(var St={},Qe=0,rt=ft.length;Qe<rt;Qe++)St[ft.charAt(Qe)]=Qe;return St}(Se),me=String.fromCharCode,Pe=function(ft){if(ft.length<2){var St=ft.charCodeAt(0);return St<128?ft:St<2048?me(192|St>>>6)+me(128|St&63):me(224|St>>>12&15)+me(128|St>>>6&63)+me(128|St&63)}else{var St=65536+(ft.charCodeAt(0)-55296)*1024+(ft.charCodeAt(1)-56320);return me(240|St>>>18&7)+me(128|St>>>12&63)+me(128|St>>>6&63)+me(128|St&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ft){return ft.replace(fe,Pe)},te=function(ft){var St=[0,2,1][ft.length%3],Qe=ft.charCodeAt(0)<<16|(ft.length>1?ft.charCodeAt(1):0)<<8|(ft.length>2?ft.charCodeAt(2):0),rt=[Se.charAt(Qe>>>18),Se.charAt(Qe>>>12&63),St>=2?"=":Se.charAt(Qe>>>6&63),St>=1?"=":Se.charAt(Qe&63)];return rt.join("")},se=ve.btoa&&typeof ve.btoa=="function"?function(ft){return ve.btoa(ft)}:function(ft){if(ft.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ft.replace(/[\s\S]{1,3}/g,te)},ie=function(ft){return se(z(String(ft)))},le=function(ft){return ft.replace(/[+\/]/g,function(St){return St=="+"?"-":"_"}).replace(/=/g,"")},ce=function(ft,St){return St?le(ie(ft)):ie(ft)},pe=function(ft){return ce(ft,!0)},xe;ve.Uint8Array&&(xe=function(ft,St){for(var Qe="",rt=0,wt=ft.length;rt<wt;rt+=3){var Ct=ft[rt],bt=ft[rt+1],ct=ft[rt+2],xt=Ct<<16|bt<<8|ct;Qe+=Se.charAt(xt>>>18)+Se.charAt(xt>>>12&63)+(typeof bt!="undefined"?Se.charAt(xt>>>6&63):"=")+(typeof ct!="undefined"?Se.charAt(xt&63):"=")}return St?le(Qe):Qe});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(ft){switch(ft.length){case 4:var St=(7&ft.charCodeAt(0))<<18|(63&ft.charCodeAt(1))<<12|(63&ft.charCodeAt(2))<<6|63&ft.charCodeAt(3),Qe=St-65536;return me((Qe>>>10)+55296)+me((Qe&1023)+56320);case 3:return me((15&ft.charCodeAt(0))<<12|(63&ft.charCodeAt(1))<<6|63&ft.charCodeAt(2));default:return me((31&ft.charCodeAt(0))<<6|63&ft.charCodeAt(1))}},Fe=function(ft){return ft.replace(je,De)},Te=function(ft){var St=ft.length,Qe=St%4,rt=(St>0?Ae[ft.charAt(0)]<<18:0)|(St>1?Ae[ft.charAt(1)]<<12:0)|(St>2?Ae[ft.charAt(2)]<<6:0)|(St>3?Ae[ft.charAt(3)]:0),wt=[me(rt>>>16),me(rt>>>8&255),me(rt&255)];return wt.length-=[0,0,2,1][Qe],wt.join("")},Me=ve.atob&&typeof ve.atob=="function"?function(ft){return ve.atob(ft)}:function(ft){return ft.replace(/\S{1,4}/g,Te)},Be=function(ft){return Me(String(ft).replace(/[^A-Za-z0-9\+\/]/g,""))},Ge=function(ft){return Fe(Me(ft))},Ye=function(ft){return String(ft).replace(/[-_]/g,function(St){return St=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ke=function(ft){return Ge(Ye(ft))},Ve;ve.Uint8Array&&(Ve=function(ft){return Uint8Array.from(Be(Ye(ft)),function(St){return St.charCodeAt(0)})});var ot=function(){var ft=ve.Base64;return ve.Base64=Ee,ft};if(ve.Base64={VERSION:ke,atob:Be,btoa:se,fromBase64:Ke,toBase64:ce,utob:z,encode:ce,encodeURI:pe,btou:Fe,decode:Ke,noConflict:ot,fromUint8Array:xe,toUint8Array:Ve},typeof Object.defineProperty=="function"){var ut=function(ft){return{value:ft,enumerable:!1,writable:!0,configurable:!0}};ve.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ut(function(){return Ke(this)})),Object.defineProperty(String.prototype,"toBase64",ut(function(ft){return ce(this,ft)})),Object.defineProperty(String.prototype,"toBase64URI",ut(function(){return ce(this,!0)}))}}return ve.Meteor&&(Base64=ve.Base64),typeof Ue!="undefined"&&Ue.exports?Ue.exports.Base64=ve.Base64:typeof pt=="function"&&pt.amd&&pt([],function(){return ve.Base64}),{Base64:ve.Base64}})}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(oe,Ue,_e){"use strict";Ue.exports=ve;var de=Object.prototype.hasOwnProperty;function ve(Ee,ke,Se){if(!Ee)throw new TypeError("argument dest is required");if(!ke)throw new TypeError("argument src is required");return Se===void 0&&(Se=!0),Object.getOwnPropertyNames(ke).forEach(function(me){if(!(!Se&&de.call(Ee,me))){var Pe=Object.getOwnPropertyDescriptor(ke,me);Object.defineProperty(Ee,me,Pe)}}),Ee}},{}],373:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.regexp.constructor.js"),oe("core-js/modules/es.regexp.to-string.js");function de(){this._types=Object.create(null),this._extensions=Object.create(null);for(var ve=0;ve<arguments.length;ve++)this.define(arguments[ve]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}de.prototype.define=function(ve,Ee){for(var ke in ve){var Se=ve[ke].map(function(fe){return fe.toLowerCase()});ke=ke.toLowerCase();for(var Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];if(me[0]!=="*"){if(!Ee&&me in this._types)throw new Error('Attempt to change mapping for "'+me+'" extension from "'+this._types[me]+'" to "'+ke+'". Pass `force=true` to allow this, otherwise remove "'+me+'" from the list of extensions for "'+ke+'".');this._types[me]=ke}}if(Ee||!this._extensions[ke]){var Pe=Se[0];this._extensions[ke]=Pe[0]!=="*"?Pe:Pe.substr(1)}}},de.prototype.getType=function(ve){ve=String(ve);var Ee=ve.replace(/^.*[/\\]/,"").toLowerCase(),ke=Ee.replace(/^.*\./,"").toLowerCase(),Se=Ee.length<ve.length,Ae=ke.length<Ee.length-1;return(Ae||!Se)&&this._types[ke]||null},de.prototype.getExtension=function(ve){return ve=/^\s*([^;\s]*)/.test(ve)&&RegExp.$1,ve&&this._extensions[ve.toLowerCase()]||null},Ue.exports=de},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(oe,Ue,_e){"use strict";var de=oe("./Mime");Ue.exports=new de(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,Ue,_e){"use strict";Ue.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(oe,Ue,_e){var de=1e3,ve=de*60,Ee=ve*60,ke=Ee*24,Se=ke*7,Ae=ke*365.25;Ue.exports=function(te,se){se=se||{};var ie=typeof te;if(ie==="string"&&te.length>0)return me(te);if(ie==="number"&&isFinite(te))return se.long?fe(te):Pe(te);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(te))};function me(te){if(te=String(te),!(te.length>100)){var se=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(te);if(se){var ie=parseFloat(se[1]),le=(se[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Ae;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*ke;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*Ee;case"minutes":case"minute":case"mins":case"min":case"m":return ie*ve;case"seconds":case"second":case"secs":case"sec":case"s":return ie*de;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function Pe(te){var se=Math.abs(te);return se>=ke?Math.round(te/ke)+"d":se>=Ee?Math.round(te/Ee)+"h":se>=ve?Math.round(te/ve)+"m":se>=de?Math.round(te/de)+"s":te+"ms"}function fe(te){var se=Math.abs(te);return se>=ke?z(te,se,ke,"day"):se>=Ee?z(te,se,Ee,"hour"):se>=ve?z(te,se,ve,"minute"):se>=de?z(te,se,de,"second"):te+" ms"}function z(te,se,ie,le){var ce=se>=ie*1.5;return Math.round(te/ie)+" "+le+(ce?"s":"")}},{}],377:[function(oe,Ue,_e){"use strict";var de=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function ke(Ae){if(Ae==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Ae)}function Se(){try{if(!Object.assign)return!1;var Ae=new String("abc");if(Ae[5]="de",Object.getOwnPropertyNames(Ae)[0]==="5")return!1;for(var me={},Pe=0;Pe<10;Pe++)me["_"+String.fromCharCode(Pe)]=Pe;var fe=Object.getOwnPropertyNames(me).map(function(te){return me[te]});if(fe.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(te){z[te]=te}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(te){return!1}}Ue.exports=Se()?Object.assign:function(Ae,me){for(var Pe,fe=ke(Ae),z,te=1;te<arguments.length;te++){Pe=Object(arguments[te]);for(var se in Pe)ve.call(Pe,se)&&(fe[se]=Pe[se]);if(de){z=de(Pe);for(var ie=0;ie<z.length;ie++)Ee.call(Pe,z[ie])&&(fe[z[ie]]=Pe[z[ie]])}}return fe}},{}],378:[function(oe,Ue,_e){(function(de){(function(){"use strict";function ve(Ae){if(typeof Ae!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Ae))}function Ee(Ae,me){for(var Pe="",fe=0,z=-1,te=0,se,ie=0;ie<=Ae.length;++ie){if(ie<Ae.length)se=Ae.charCodeAt(ie);else{if(se===47)break;se=47}if(se===47){if(!(z===ie-1||te===1))if(z!==ie-1&&te===2){if(Pe.length<2||fe!==2||Pe.charCodeAt(Pe.length-1)!==46||Pe.charCodeAt(Pe.length-2)!==46){if(Pe.length>2){var le=Pe.lastIndexOf("/");if(le!==Pe.length-1){le===-1?(Pe="",fe=0):(Pe=Pe.slice(0,le),fe=Pe.length-1-Pe.lastIndexOf("/")),z=ie,te=0;continue}}else if(Pe.length===2||Pe.length===1){Pe="",fe=0,z=ie,te=0;continue}}me&&(Pe.length>0?Pe+="/..":Pe="..",fe=2)}else Pe.length>0?Pe+="/"+Ae.slice(z+1,ie):Pe=Ae.slice(z+1,ie),fe=ie-z-1;z=ie,te=0}else se===46&&te!==-1?++te:te=-1}return Pe}function ke(Ae,me){var Pe=me.dir||me.root,fe=me.base||(me.name||"")+(me.ext||"");return Pe?Pe===me.root?Pe+fe:Pe+Ae+fe:fe}var Se={resolve:function(){for(var me="",Pe=!1,fe,z=arguments.length-1;z>=-1&&!Pe;z--){var te;z>=0?te=arguments[z]:(fe===void 0&&(fe=de.cwd()),te=fe),ve(te),te.length!==0&&(me=te+"/"+me,Pe=te.charCodeAt(0)===47)}return me=Ee(me,!Pe),Pe?me.length>0?"/"+me:"/":me.length>0?me:"."},normalize:function(me){if(ve(me),me.length===0)return".";var Pe=me.charCodeAt(0)===47,fe=me.charCodeAt(me.length-1)===47;return me=Ee(me,!Pe),me.length===0&&!Pe&&(me="."),me.length>0&&fe&&(me+="/"),Pe?"/"+me:me},isAbsolute:function(me){return ve(me),me.length>0&&me.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var me,Pe=0;Pe<arguments.length;++Pe){var fe=arguments[Pe];ve(fe),fe.length>0&&(me===void 0?me=fe:me+="/"+fe)}return me===void 0?".":Se.normalize(me)},relative:function(me,Pe){if(ve(me),ve(Pe),me===Pe||(me=Se.resolve(me),Pe=Se.resolve(Pe),me===Pe))return"";for(var fe=1;fe<me.length&&me.charCodeAt(fe)===47;++fe);for(var z=me.length,te=z-fe,se=1;se<Pe.length&&Pe.charCodeAt(se)===47;++se);for(var ie=Pe.length,le=ie-se,ce=te<le?te:le,pe=-1,xe=0;xe<=ce;++xe){if(xe===ce){if(le>ce){if(Pe.charCodeAt(se+xe)===47)return Pe.slice(se+xe+1);if(xe===0)return Pe.slice(se+xe)}else te>ce&&(me.charCodeAt(fe+xe)===47?pe=xe:xe===0&&(pe=0));break}var je=me.charCodeAt(fe+xe),De=Pe.charCodeAt(se+xe);if(je!==De)break;je===47&&(pe=xe)}var Fe="";for(xe=fe+pe+1;xe<=z;++xe)(xe===z||me.charCodeAt(xe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+Pe.slice(se+pe):(se+=pe,Pe.charCodeAt(se)===47&&++se,Pe.slice(se))},_makeLong:function(me){return me},dirname:function(me){if(ve(me),me.length===0)return".";for(var Pe=me.charCodeAt(0),fe=Pe===47,z=-1,te=!0,se=me.length-1;se>=1;--se)if(Pe=me.charCodeAt(se),Pe===47){if(!te){z=se;break}}else te=!1;return z===-1?fe?"/":".":fe&&z===1?"//":me.slice(0,z)},basename:function(me,Pe){if(Pe!==void 0&&typeof Pe!="string")throw new TypeError('"ext" argument must be a string');ve(me);var fe=0,z=-1,te=!0,se;if(Pe!==void 0&&Pe.length>0&&Pe.length<=me.length){if(Pe.length===me.length&&Pe===me)return"";var ie=Pe.length-1,le=-1;for(se=me.length-1;se>=0;--se){var ce=me.charCodeAt(se);if(ce===47){if(!te){fe=se+1;break}}else le===-1&&(te=!1,le=se+1),ie>=0&&(ce===Pe.charCodeAt(ie)?--ie===-1&&(z=se):(ie=-1,z=le))}return fe===z?z=le:z===-1&&(z=me.length),me.slice(fe,z)}else{for(se=me.length-1;se>=0;--se)if(me.charCodeAt(se)===47){if(!te){fe=se+1;break}}else z===-1&&(te=!1,z=se+1);return z===-1?"":me.slice(fe,z)}},extname:function(me){ve(me);for(var Pe=-1,fe=0,z=-1,te=!0,se=0,ie=me.length-1;ie>=0;--ie){var le=me.charCodeAt(ie);if(le===47){if(!te){fe=ie+1;break}continue}z===-1&&(te=!1,z=ie+1),le===46?Pe===-1?Pe=ie:se!==1&&(se=1):Pe!==-1&&(se=-1)}return Pe===-1||z===-1||se===0||se===1&&Pe===z-1&&Pe===fe+1?"":me.slice(Pe,z)},format:function(me){if(me===null||typeof me!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof me);return ke("/",me)},parse:function(me){ve(me);var Pe={root:"",dir:"",base:"",ext:"",name:""};if(me.length===0)return Pe;var fe=me.charCodeAt(0),z=fe===47,te;z?(Pe.root="/",te=1):te=0;for(var se=-1,ie=0,le=-1,ce=!0,pe=me.length-1,xe=0;pe>=te;--pe){if(fe=me.charCodeAt(pe),fe===47){if(!ce){ie=pe+1;break}continue}le===-1&&(ce=!1,le=pe+1),fe===46?se===-1?se=pe:xe!==1&&(xe=1):se!==-1&&(xe=-1)}return se===-1||le===-1||xe===0||xe===1&&se===le-1&&se===ie+1?le!==-1&&(ie===0&&z?Pe.base=Pe.name=me.slice(1,le):Pe.base=Pe.name=me.slice(ie,le)):(ie===0&&z?(Pe.name=me.slice(1,se),Pe.base=me.slice(1,le)):(Pe.name=me.slice(ie,se),Pe.base=me.slice(ie,le)),Pe.ext=me.slice(se,le)),ie>0?Pe.dir=me.slice(0,ie-1):z&&(Pe.dir="/"),Pe},sep:"/",delimiter:":",win32:null,posix:null};Se.posix=Se,Ue.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,Ue,_e){(function(de){(function(){(function(){"use strict";var ve={function:!0,object:!0},Ee=ve[typeof window]&&window||this,ke=Ee,Se=ve[typeof _e]&&_e,Ae=ve[typeof Ue]&&Ue&&!Ue.nodeType&&Ue,me=Se&&Ae&&typeof de=="object"&&de;me&&(me.global===me||me.window===me||me.self===me)&&(Ee=me);var Pe=Math.pow(2,53)-1,fe=/\bOpera/,z=this,te=Object.prototype,se=te.hasOwnProperty,ie=te.toString;function le(Ke){return Ke=String(Ke),Ke.charAt(0).toUpperCase()+Ke.slice(1)}function ce(Ke,Ve,ot){var ut={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ve&&ot&&/^Win/i.test(Ke)&&!/^Windows Phone /i.test(Ke)&&(ut=ut[/[\d.]+$/.exec(Ke)])&&(Ke="Windows "+ut),Ke=String(Ke),Ve&&ot&&(Ke=Ke.replace(RegExp(Ve,"i"),ot)),Ke=xe(Ke.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),Ke}function pe(Ke,Ve){var ot=-1,ut=Ke?Ke.length:0;if(typeof ut=="number"&&ut>-1&&ut<=Pe)for(;++ot<ut;)Ve(Ke[ot],ot,Ke);else je(Ke,Ve)}function xe(Ke){return Ke=Be(Ke),/^(?:webOS|i(?:OS|P))/.test(Ke)?Ke:le(Ke)}function je(Ke,Ve){for(var ot in Ke)se.call(Ke,ot)&&Ve(Ke[ot],ot,Ke)}function De(Ke){return Ke==null?le(Ke):ie.call(Ke).slice(8,-1)}function Fe(Ke,Ve){var ot=Ke!=null?typeof Ke[Ve]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ke[Ve]:!0)}function Te(Ke){return String(Ke).replace(/([ -])(?!$)/g,"$1?")}function Me(Ke,Ve){var ot=null;return pe(Ke,function(ut,ft){ot=Ve(ot,ut,ft,Ke)}),ot}function Be(Ke){return String(Ke).replace(/^ +| +$/g,"")}function Ge(Ke){var Ve=Ee,ot=Ke&&typeof Ke=="object"&&De(Ke)!="String";ot&&(Ve=Ke,Ke=null);var ut=Ve.navigator||{},ft=ut.userAgent||"";Ke||(Ke=ft);var St=ot||z==ke,Qe=ot?!!ut.likeChrome:/\bChrome\b/.test(Ke)&&!/internal|\n/i.test(ie.toString()),rt="Object",wt=ot?rt:"ScriptBridgingProxyObject",Ct=ot?rt:"Environment",bt=ot&&Ve.java?"JavaPackage":De(Ve.java),ct=ot?rt:"RuntimeObject",xt=/\bJava/.test(bt)&&Ve.java,dt=xt&&De(Ve.environment)==Ct,Mt=xt?"a":"\u03B1",yt=xt?"b":"\u03B2",Ft=Ve.document||{},mt=Ve.operamini||Ve.opera,vt=fe.test(vt=ot&&mt?mt["[[Class]]"]:De(mt))?vt:mt=null,tt,He=Ke,we=[],Ne=null,Xe=Ke==ft,nt=Xe&&mt&&typeof mt.version=="function"&&mt.version(),Ie,Re=Dt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ze=Ot(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),et=Qt([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ht=Et({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),at=qt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Dt(on){return Me(on,function(cn,bn){return cn||RegExp("\\b"+(bn.pattern||Te(bn))+"\\b","i").exec(Ke)&&(bn.label||bn)})}function Et(on){return Me(on,function(cn,bn,xn){return cn||(bn[et]||bn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(et)]||RegExp("\\b"+Te(xn)+"(?:\\b|\\w*\\d)","i").exec(Ke))&&xn})}function Ot(on){return Me(on,function(cn,bn){return cn||RegExp("\\b"+(bn.pattern||Te(bn))+"\\b","i").exec(Ke)&&(bn.label||bn)})}function qt(on){return Me(on,function(cn,bn){var xn=bn.pattern||Te(bn);return!cn&&(cn=RegExp("\\b"+xn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ke))&&(cn=ce(cn,xn,bn.label||bn)),cn})}function Qt(on){return Me(on,function(cn,bn){var xn=bn.pattern||Te(bn);return!cn&&(cn=RegExp("\\b"+xn+" *\\d+[.\\w_]*","i").exec(Ke)||RegExp("\\b"+xn+" *\\w+-[\\w]*","i").exec(Ke)||RegExp("\\b"+xn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ke))&&((cn=String(bn.label&&!RegExp(xn,"i").test(bn.label)?bn.label:cn).split("/"))[1]&&!/[\d.]+/.test(cn[0])&&(cn[0]+=" "+cn[1]),bn=bn.label||bn,cn=xe(cn[0].replace(RegExp(xn,"i"),bn).replace(RegExp("; *(?:"+bn+"[_-])?","i")," ").replace(RegExp("("+bn+")[-_.]?(\\w)","i"),"$1 $2"))),cn})}function Xt(on){return Me(on,function(cn,bn){return cn||(RegExp(bn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ke)||0)[1]||null})}function Wt(){return this.description||""}if(Re&&(Re=[Re]),/\bAndroid\b/.test(at)&&!et&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ke))&&(et=Be(tt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ht&&!et?et=Qt([ht]):ht&&et&&(et=et.replace(RegExp("^("+Te(ht)+")[-_.\\s]","i"),ht+" ").replace(RegExp("^("+Te(ht)+")[-_.]?(\\w)","i"),ht+" $2")),(tt=/\bGoogle TV\b/.exec(et))&&(et=tt[0]),/\bSimulator\b/i.test(Ke)&&(et=(et?et+" ":"")+"Simulator"),Ze=="Opera Mini"&&/\bOPiOS\b/.test(Ke)&&we.push("running in Turbo/Uncompressed mode"),Ze=="IE"&&/\blike iPhone OS\b/.test(Ke)?(tt=Ge(Ke.replace(/like iPhone OS/,"")),ht=tt.manufacturer,et=tt.product):/^iP/.test(et)?(Ze||(Ze="Safari"),at="iOS"+((tt=/ OS ([\d_]+)/i.exec(Ke))?" "+tt[1].replace(/_/g,"."):"")):Ze=="Konqueror"&&/^Linux\b/i.test(at)?at="Kubuntu":ht&&ht!="Google"&&(/Chrome/.test(Ze)&&!/\bMobile Safari\b/i.test(Ke)||/\bVita\b/.test(et))||/\bAndroid\b/.test(at)&&/^Chrome/.test(Ze)&&/\bVersion\//i.test(Ke)?(Ze="Android Browser",at=/\bAndroid\b/.test(at)?at:"Android"):Ze=="Silk"?(/\bMobi/i.test(Ke)||(at="Android",we.unshift("desktop mode")),/Accelerated *= *true/i.test(Ke)&&we.unshift("accelerated")):Ze=="UC Browser"&&/\bUCWEB\b/.test(Ke)?we.push("speed mode"):Ze=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(Ke))?we.push("identifying as Firefox "+tt[1]):Ze=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(Ke))?(at||(at="Firefox OS"),et||(et=tt[1])):!Ze||(tt=!/\bMinefield\b/i.test(Ke)&&/\b(?:Firefox|Safari)\b/.exec(Ze))?(Ze&&!et&&/[\/,]|^[^(]+?\)/.test(Ke.slice(Ke.indexOf(tt+"/")+8))&&(Ze=null),(tt=et||ht||at)&&(et||ht||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(at))&&(Ze=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(at)?at:tt)+" Browser")):Ze=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(Ke)||0)[1])&&we.push("Chromium "+tt),nt||(nt=Xt(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Te(Ze),"(?:Firefox|Minefield|NetFront)"])),(tt=Re=="iCab"&&parseFloat(nt)>3&&"WebKit"||/\bOpera\b/.test(Ze)&&(/\bOPR\b/.test(Ke)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ke)&&!/^(?:Trident|EdgeHTML)$/.test(Re)&&"WebKit"||!Re&&/\bMSIE\b/i.test(Ke)&&(at=="Mac OS"?"Tasman":"Trident")||Re=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ze)&&"NetFront")&&(Re=[tt]),Ze=="IE"&&(tt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ke)||0)[1])?(Ze+=" Mobile",at="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),we.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ke)?(Ze="IE Mobile",at="Windows Phone 8.x",we.unshift("desktop mode"),nt||(nt=(/\brv:([\d.]+)/.exec(Ke)||0)[1])):Ze!="IE"&&Re=="Trident"&&(tt=/\brv:([\d.]+)/.exec(Ke))&&(Ze&&we.push("identifying as "+Ze+(nt?" "+nt:"")),Ze="IE",nt=tt[1]),Xe){if(Fe(Ve,"global"))if(xt&&(tt=xt.lang.System,He=tt.getProperty("os.arch"),at=at||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),dt){try{nt=Ve.require("ringo/engine").version.join("."),Ze="RingoJS"}catch(on){(tt=Ve.system)&&tt.global.system==Ve.system&&(Ze="Narwhal",at||(at=tt[0].os||null))}Ze||(Ze="Rhino")}else typeof Ve.process=="object"&&!Ve.process.browser&&(tt=Ve.process)&&(typeof tt.versions=="object"&&(typeof tt.versions.electron=="string"?(we.push("Node "+tt.versions.node),Ze="Electron",nt=tt.versions.electron):typeof tt.versions.nw=="string"&&(we.push("Chromium "+nt,"Node "+tt.versions.node),Ze="NW.js",nt=tt.versions.nw)),Ze||(Ze="Node.js",He=tt.arch,at=tt.platform,nt=/[\d.]+/.exec(tt.version),nt=nt?nt[0]:null));else De(tt=Ve.runtime)==wt?(Ze="Adobe AIR",at=tt.flash.system.Capabilities.os):De(tt=Ve.phantom)==ct?(Ze="PhantomJS",nt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof Ft.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(Ke))?(nt=[nt,Ft.documentMode],(tt=+tt[1]+4)!=nt[1]&&(we.push("IE "+nt[1]+" mode"),Re&&(Re[1]=""),nt[1]=tt),nt=Ze=="IE"?String(nt[1].toFixed(1)):nt[0]):typeof Ft.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ze)&&(we.push("masking as "+Ze+" "+nt),Ze="IE",nt="11.0",Re=["Trident"],at="Windows");at=at&&xe(at)}if(nt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(nt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ke+";"+(Xe&&ut.appMinorVersion))||/\bMinefield\b/i.test(Ke)&&"a")&&(Ne=/b/i.test(tt)?"beta":"alpha",nt=nt.replace(RegExp(tt+"\\+?$"),"")+(Ne=="beta"?yt:Mt)+(/\d+\+?/.exec(tt)||"")),Ze=="Fennec"||Ze=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(at))Ze="Firefox Mobile";else if(Ze=="Maxthon"&&nt)nt=nt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(et))et=="Xbox 360"&&(at=null),et=="Xbox 360"&&/\bIEMobile\b/.test(Ke)&&we.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ze)||Ze&&!et&&!/Browser|Mobi/.test(Ze))&&(at=="Windows CE"||/Mobi/i.test(Ke)))Ze+=" Mobile";else if(Ze=="IE"&&Xe)try{Ve.external===null&&we.unshift("platform preview")}catch(on){we.unshift("embedded")}else(/\bBlackBerry\b/.test(et)||/\bBB10\b/.test(Ke))&&(tt=(RegExp(et.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ke)||0)[1]||nt)?(tt=[tt,/BB10/.test(Ke)],at=(tt[1]?(et=null,ht="BlackBerry"):"Device Software")+" "+tt[0],nt=null):this!=je&&et!="Wii"&&(Xe&&mt||/Opera/.test(Ze)&&/\b(?:MSIE|Firefox)\b/i.test(Ke)||Ze=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(at)||Ze=="IE"&&(at&&!/^Win/.test(at)&&nt>5.5||/\bWindows XP\b/.test(at)&&nt>8||nt==8&&!/\bTrident\b/.test(Ke)))&&!fe.test(tt=Ge.call(je,Ke.replace(fe,"")+";"))&&tt.name&&(tt="ing as "+tt.name+((tt=tt.version)?" "+tt:""),fe.test(Ze)?(/\bIE\b/.test(tt)&&at=="Mac OS"&&(at=null),tt="identify"+tt):(tt="mask"+tt,vt?Ze=xe(vt.replace(/([a-z])([A-Z])/g,"$1 $2")):Ze="Opera",/\bIE\b/.test(tt)&&(at=null),Xe||(nt=null)),Re=["Presto"],we.push(tt));(tt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ke)||0)[1])&&(tt=[parseFloat(tt.replace(/\.(\d)$/,".0$1")),tt],Ze=="Safari"&&tt[1].slice(-1)=="+"?(Ze="WebKit Nightly",Ne="alpha",nt=tt[1].slice(0,-1)):(nt==tt[1]||nt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ke)||0)[1]))&&(nt=null),tt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ke)||0)[1],tt[0]==537.36&&tt[2]==537.36&&parseFloat(tt[1])>=28&&Re=="WebKit"&&(Re=["Blink"]),!Xe||!Qe&&!tt[1]?(Re&&(Re[1]="like Safari"),tt=(tt=tt[0],tt<400?1:tt<500?2:tt<526?3:tt<533?4:tt<534?"4+":tt<535?5:tt<537?6:tt<538?7:tt<601?8:tt<602?9:tt<604?10:tt<606?11:tt<608?12:"12")):(Re&&(Re[1]="like Chrome"),tt=tt[1]||(tt=tt[0],tt<530?1:tt<532?2:tt<532.05?3:tt<533?4:tt<534.03?5:tt<534.07?6:tt<534.1?7:tt<534.13?8:tt<534.16?9:tt<534.24?10:tt<534.3?11:tt<535.01?12:tt<535.02?"13+":tt<535.07?15:tt<535.11?16:tt<535.19?17:tt<536.05?18:tt<536.1?19:tt<537.01?20:tt<537.11?"21+":tt<537.13?23:tt<537.18?24:tt<537.24?25:tt<537.36?26:Re!="Blink"?"27":"28")),Re&&(Re[1]+=" "+(tt+=typeof tt=="number"?".x":/[.+]/.test(tt)?"":"+")),Ze=="Safari"&&(!nt||parseInt(nt)>45)?nt=tt:Ze=="Chrome"&&/\bHeadlessChrome/i.test(Ke)&&we.unshift("headless")),Ze=="Opera"&&(tt=/\bzbov|zvav$/.exec(at))?(Ze+=" ",we.unshift("desktop mode"),tt=="zvav"?(Ze+="Mini",nt=null):Ze+="Mobile",at=at.replace(RegExp(" *"+tt+"$"),"")):Ze=="Safari"&&/\bChrome\b/.exec(Re&&Re[1])?(we.unshift("desktop mode"),Ze="Chrome Mobile",nt=null,/\bOS X\b/.test(at)?(ht="Apple",at="iOS 4.3+"):at=null):/\bSRWare Iron\b/.test(Ze)&&!nt&&(nt=Xt("Chrome")),nt&&nt.indexOf(tt=/[\d.]+$/.exec(at))==0&&Ke.indexOf("/"+tt+"-")>-1&&(at=Be(at.replace(tt,""))),at&&at.indexOf(Ze)!=-1&&!RegExp(Ze+" OS").test(at)&&(at=at.replace(RegExp(" *"+Te(Ze)+" *"),"")),Re&&!/\b(?:Avant|Nook)\b/.test(Ze)&&(/Browser|Lunascape|Maxthon/.test(Ze)||Ze!="Safari"&&/^iOS/.test(at)&&/\bSafari\b/.test(Re[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ze)&&Re[1])&&(tt=Re[Re.length-1])&&we.push(tt),we.length&&(we=["("+we.join("; ")+")"]),ht&&et&&et.indexOf(ht)<0&&we.push("on "+ht),et&&we.push((/^on /.test(we[we.length-1])?"":"on ")+et),at&&(tt=/ ([\d.+]+)$/.exec(at),Ie=tt&&at.charAt(at.length-tt[0].length-1)=="/",at={architecture:32,family:tt&&!Ie?at.replace(tt[0],""):at,version:tt?tt[1]:null,toString:function(){var on=this.version;return this.family+(on&&!Ie?" "+on:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(He))&&!/\bi686\b/i.test(He)?(at&&(at.architecture=64,at.family=at.family.replace(RegExp(" *"+tt),"")),Ze&&(/\bWOW64\b/i.test(Ke)||Xe&&/\w(?:86|32)$/.test(ut.cpuClass||ut.platform)&&!/\bWin64; x64\b/i.test(Ke))&&we.unshift("32-bit")):at&&/^OS X/.test(at.family)&&Ze=="Chrome"&&parseFloat(nt)>=39&&(at.architecture=64),Ke||(Ke=null);var un={};return un.description=Ke,un.layout=Re&&Re[0],un.manufacturer=ht,un.name=Ze,un.prerelease=Ne,un.product=et,un.ua=Ke,un.version=Ze&&nt,un.os=at||{architecture:null,family:null,version:null,toString:function(){return"null"}},un.parse=Ge,un.toString=Wt,un.version&&we.unshift(nt),un.name&&we.unshift(Ze),at&&Ze&&!(at==String(at).split(" ")[0]&&(at==Ze.split(" ")[0]||et))&&we.push(et?"("+at+")":"on "+at),we.length&&(un.description=we.join(" ")),un}var Ye=Ge();typeof pt=="function"&&typeof pt.amd=="object"&&pt.amd?(Ee.platform=Ye,pt(function(){return Ye})):Se&&Ae?je(Ye,function(Ke,Ve){Se[Ve]=Ke}):Ee.platform=Ye}).call(this)}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,Ue,_e){(function(de){(function(){"use strict";typeof de=="undefined"||!de.version||de.version.indexOf("v0.")===0||de.version.indexOf("v1.")===0&&de.version.indexOf("v1.8.")!==0?Ue.exports={nextTick:ve}:Ue.exports=de;function ve(Ee,ke,Se,Ae){if(typeof Ee!="function")throw new TypeError('"callback" argument must be a function');var me=arguments.length,Pe,fe;switch(me){case 0:case 1:return de.nextTick(Ee);case 2:return de.nextTick(function(){Ee.call(null,ke)});case 3:return de.nextTick(function(){Ee.call(null,ke,Se)});case 4:return de.nextTick(function(){Ee.call(null,ke,Se,Ae)});default:for(Pe=new Array(me-1),fe=0;fe<Pe.length;)Pe[fe++]=arguments[fe];return de.nextTick(function(){Ee.apply(null,Pe)})}}}).call(this)}).call(this,oe("_process"))},{_process:467}],381:[function(oe,Ue,_e){var de=Ue.exports={},ve,Ee;function ke(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ve=setTimeout:ve=ke}catch(pe){ve=ke}try{typeof clearTimeout=="function"?Ee=clearTimeout:Ee=Se}catch(pe){Ee=Se}})();function Ae(pe){if(ve===setTimeout)return setTimeout(pe,0);if((ve===ke||!ve)&&setTimeout)return ve=setTimeout,setTimeout(pe,0);try{return ve(pe,0)}catch(xe){try{return ve.call(null,pe,0)}catch(je){return ve.call(this,pe,0)}}}function me(pe){if(Ee===clearTimeout)return clearTimeout(pe);if((Ee===Se||!Ee)&&clearTimeout)return Ee=clearTimeout,clearTimeout(pe);try{return Ee(pe)}catch(xe){try{return Ee.call(null,pe)}catch(je){return Ee.call(this,pe)}}}var Pe=[],fe=!1,z,te=-1;function se(){!fe||!z||(fe=!1,z.length?Pe=z.concat(Pe):te=-1,Pe.length&&ie())}function ie(){if(!fe){var pe=Ae(se);fe=!0;for(var xe=Pe.length;xe;){for(z=Pe,Pe=[];++te<xe;)z&&z[te].run();te=-1,xe=Pe.length}z=null,fe=!1,me(pe)}}de.nextTick=function(pe){var xe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)xe[je-1]=arguments[je];Pe.push(new le(pe,xe)),Pe.length===1&&!fe&&Ae(ie)};function le(pe,xe){this.fun=pe,this.array=xe}le.prototype.run=function(){this.fun.apply(null,this.array)},de.title="browser",de.browser=!0,de.env={},de.argv=[],de.version="",de.versions={};function ce(){}de.on=ce,de.addListener=ce,de.once=ce,de.off=ce,de.removeListener=ce,de.removeAllListeners=ce,de.emit=ce,de.prependListener=ce,de.prependOnceListener=ce,de.listeners=function(pe){return[]},de.binding=function(pe){throw new Error("process.binding is not supported")},de.cwd=function(){return"/"},de.chdir=function(pe){throw new Error("process.chdir is not supported")},de.umask=function(){return 0}},{}],382:[function(oe,Ue,_e){(function(de){(function(){(function(ve){var Ee=typeof _e=="object"&&_e&&!_e.nodeType&&_e,ke=typeof Ue=="object"&&Ue&&!Ue.nodeType&&Ue,Se=typeof de=="object"&&de;(Se.global===Se||Se.window===Se||Se.self===Se)&&(ve=Se);var Ae,me=2147483647,Pe=36,fe=1,z=26,te=38,se=700,ie=72,le=128,ce="-",pe=/^xn--/,xe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=Pe-fe,Te=Math.floor,Me=String.fromCharCode,Be;function Ge(bt){throw new RangeError(De[bt])}function Ye(bt,ct){for(var xt=bt.length,dt=[];xt--;)dt[xt]=ct(bt[xt]);return dt}function Ke(bt,ct){var xt=bt.split("@"),dt="";xt.length>1&&(dt=xt[0]+"@",bt=xt[1]),bt=bt.replace(je,".");var Mt=bt.split("."),yt=Ye(Mt,ct).join(".");return dt+yt}function Ve(bt){for(var ct=[],xt=0,dt=bt.length,Mt,yt;xt<dt;)Mt=bt.charCodeAt(xt++),Mt>=55296&&Mt<=56319&&xt<dt?(yt=bt.charCodeAt(xt++),(yt&64512)==56320?ct.push(((Mt&1023)<<10)+(yt&1023)+65536):(ct.push(Mt),xt--)):ct.push(Mt);return ct}function ot(bt){return Ye(bt,function(ct){var xt="";return ct>65535&&(ct-=65536,xt+=Me(ct>>>10&1023|55296),ct=56320|ct&1023),xt+=Me(ct),xt}).join("")}function ut(bt){return bt-48<10?bt-22:bt-65<26?bt-65:bt-97<26?bt-97:Pe}function ft(bt,ct){return bt+22+75*(bt<26)-((ct!=0)<<5)}function St(bt,ct,xt){var dt=0;for(bt=xt?Te(bt/se):bt>>1,bt+=Te(bt/ct);bt>Fe*z>>1;dt+=Pe)bt=Te(bt/Fe);return Te(dt+(Fe+1)*bt/(bt+te))}function Qe(bt){var ct=[],xt=bt.length,dt,Mt=0,yt=le,Ft=ie,mt,vt,tt,He,we,Ne,Xe,nt,Ie;for(mt=bt.lastIndexOf(ce),mt<0&&(mt=0),vt=0;vt<mt;++vt)bt.charCodeAt(vt)>=128&&Ge("not-basic"),ct.push(bt.charCodeAt(vt));for(tt=mt>0?mt+1:0;tt<xt;){for(He=Mt,we=1,Ne=Pe;tt>=xt&&Ge("invalid-input"),Xe=ut(bt.charCodeAt(tt++)),(Xe>=Pe||Xe>Te((me-Mt)/we))&&Ge("overflow"),Mt+=Xe*we,nt=Ne<=Ft?fe:Ne>=Ft+z?z:Ne-Ft,!(Xe<nt);Ne+=Pe)Ie=Pe-nt,we>Te(me/Ie)&&Ge("overflow"),we*=Ie;dt=ct.length+1,Ft=St(Mt-He,dt,He==0),Te(Mt/dt)>me-yt&&Ge("overflow"),yt+=Te(Mt/dt),Mt%=dt,ct.splice(Mt++,0,yt)}return ot(ct)}function rt(bt){var ct,xt,dt,Mt,yt,Ft,mt,vt,tt,He,we,Ne=[],Xe,nt,Ie,Re;for(bt=Ve(bt),Xe=bt.length,ct=le,xt=0,yt=ie,Ft=0;Ft<Xe;++Ft)we=bt[Ft],we<128&&Ne.push(Me(we));for(dt=Mt=Ne.length,Mt&&Ne.push(ce);dt<Xe;){for(mt=me,Ft=0;Ft<Xe;++Ft)we=bt[Ft],we>=ct&&we<mt&&(mt=we);for(nt=dt+1,mt-ct>Te((me-xt)/nt)&&Ge("overflow"),xt+=(mt-ct)*nt,ct=mt,Ft=0;Ft<Xe;++Ft)if(we=bt[Ft],we<ct&&++xt>me&&Ge("overflow"),we==ct){for(vt=xt,tt=Pe;He=tt<=yt?fe:tt>=yt+z?z:tt-yt,!(vt<He);tt+=Pe)Re=vt-He,Ie=Pe-He,Ne.push(Me(ft(He+Re%Ie,0))),vt=Te(Re/Ie);Ne.push(Me(ft(vt,0))),yt=St(xt,nt,dt==Mt),xt=0,++dt}++xt,++ct}return Ne.join("")}function wt(bt){return Ke(bt,function(ct){return pe.test(ct)?Qe(ct.slice(4).toLowerCase()):ct})}function Ct(bt){return Ke(bt,function(ct){return xe.test(ct)?"xn--"+rt(ct):ct})}if(Ae={version:"1.4.1",ucs2:{decode:Ve,encode:ot},decode:Qe,encode:rt,toASCII:Ct,toUnicode:wt},typeof pt=="function"&&typeof pt.amd=="object"&&pt.amd)pt("punycode",function(){return Ae});else if(Ee&&ke)if(Ue.exports==Ee)ke.exports=Ae;else for(Be in Ae)Ae.hasOwnProperty(Be)&&(Ee[Be]=Ae[Be]);else ve.punycode=Ae})(this)}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,Ue,_e){"use strict";function de(Ee,ke){return Object.prototype.hasOwnProperty.call(Ee,ke)}Ue.exports=function(Ee,ke,Se,Ae){ke=ke||"&",Se=Se||"=";var me={};if(typeof Ee!="string"||Ee.length===0)return me;var Pe=/\+/g;Ee=Ee.split(ke);var fe=1e3;Ae&&typeof Ae.maxKeys=="number"&&(fe=Ae.maxKeys);var z=Ee.length;fe>0&&z>fe&&(z=fe);for(var te=0;te<z;++te){var se=Ee[te].replace(Pe,"%20"),ie=se.indexOf(Se),le,ce,pe,xe;ie>=0?(le=se.substr(0,ie),ce=se.substr(ie+1)):(le=se,ce=""),pe=decodeURIComponent(le),xe=decodeURIComponent(ce),de(me,pe)?ve(me[pe])?me[pe].push(xe):me[pe]=[me[pe],xe]:me[pe]=xe}return me};var ve=Array.isArray||function(Ee){return Object.prototype.toString.call(Ee)==="[object Array]"}},{}],384:[function(oe,Ue,_e){"use strict";var de=function(Se){switch(typeof Se){case"string":return Se;case"boolean":return Se?"true":"false";case"number":return isFinite(Se)?Se:"";default:return""}};Ue.exports=function(Se,Ae,me,Pe){return Ae=Ae||"&",me=me||"=",Se===null&&(Se=void 0),typeof Se=="object"?Ee(ke(Se),function(fe){var z=encodeURIComponent(de(fe))+me;return ve(Se[fe])?Ee(Se[fe],function(te){return z+encodeURIComponent(de(te))}).join(Ae):z+encodeURIComponent(de(Se[fe]))}).join(Ae):Pe?encodeURIComponent(de(Pe))+me+encodeURIComponent(de(Se)):""};var ve=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function Ee(Se,Ae){if(Se.map)return Se.map(Ae);for(var me=[],Pe=0;Pe<Se.length;Pe++)me.push(Ae(Se[Pe],Pe));return me}var ke=Object.keys||function(Se){var Ae=[];for(var me in Se)Object.prototype.hasOwnProperty.call(Se,me)&&Ae.push(me);return Ae}},{}],385:[function(oe,Ue,_e){"use strict";_e.decode=_e.parse=oe("./decode"),_e.encode=_e.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,Ue,_e){"use strict";var de=oe("process-nextick-args"),ve=Object.keys||function(se){var ie=[];for(var le in se)ie.push(le);return ie};Ue.exports=fe;var Ee=Object.create(oe("core-util-is"));Ee.inherits=oe("inherits");var ke=oe("./_stream_readable"),Se=oe("./_stream_writable");Ee.inherits(fe,ke);for(var Ae=ve(Se.prototype),me=0;me<Ae.length;me++){var Pe=Ae[me];fe.prototype[Pe]||(fe.prototype[Pe]=Se.prototype[Pe])}function fe(se){if(!(this instanceof fe))return new fe(se);ke.call(this,se),Se.call(this,se),se&&se.readable===!1&&(this.readable=!1),se&&se.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,se&&se.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||de.nextTick(te,this)}function te(se){se.end()}Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(se){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=se,this._writableState.destroyed=se)}}),fe.prototype._destroy=function(se,ie){this.push(null),this.end(),de.nextTick(ie,se)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(oe,Ue,_e){"use strict";Ue.exports=Ee;var de=oe("./_stream_transform"),ve=Object.create(oe("core-util-is"));ve.inherits=oe("inherits"),ve.inherits(Ee,de);function Ee(ke){if(!(this instanceof Ee))return new Ee(ke);de.call(this,ke)}Ee.prototype._transform=function(ke,Se,Ae){Ae(null,ke)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,Ue,_e){(function(de,ve){(function(){"use strict";var Ee=oe("process-nextick-args");Ue.exports=Me;var ke=oe("isarray"),Se;Me.ReadableState=Te;var Ae=oe("events").EventEmitter,me=function(we,Ne){return we.listeners(Ne).length},Pe=oe("./internal/streams/stream"),fe=oe("safe-buffer").Buffer,z=ve.Uint8Array||function(){};function te(we){return fe.from(we)}function se(we){return fe.isBuffer(we)||we instanceof z}var ie=Object.create(oe("core-util-is"));ie.inherits=oe("inherits");var le=oe("util"),ce=void 0;le&&le.debuglog?ce=le.debuglog("stream"):ce=function(){};var pe=oe("./internal/streams/BufferList"),xe=oe("./internal/streams/destroy"),je;ie.inherits(Me,Pe);var De=["error","close","destroy","pause","resume"];function Fe(we,Ne,Xe){if(typeof we.prependListener=="function")return we.prependListener(Ne,Xe);!we._events||!we._events[Ne]?we.on(Ne,Xe):ke(we._events[Ne])?we._events[Ne].unshift(Xe):we._events[Ne]=[Xe,we._events[Ne]]}function Te(we,Ne){Se=Se||oe("./_stream_duplex"),we=we||{};var Xe=Ne instanceof Se;this.objectMode=!!we.objectMode,Xe&&(this.objectMode=this.objectMode||!!we.readableObjectMode);var nt=we.highWaterMark,Ie=we.readableHighWaterMark,Re=this.objectMode?16:16*1024;nt||nt===0?this.highWaterMark=nt:Xe&&(Ie||Ie===0)?this.highWaterMark=Ie:this.highWaterMark=Re,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new pe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=we.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,we.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(we.encoding),this.encoding=we.encoding)}function Me(we){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Me))return new Me(we);this._readableState=new Te(we,this),this.readable=!0,we&&(typeof we.read=="function"&&(this._read=we.read),typeof we.destroy=="function"&&(this._destroy=we.destroy)),Pe.call(this)}Object.defineProperty(Me.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(we){this._readableState&&(this._readableState.destroyed=we)}}),Me.prototype.destroy=xe.destroy,Me.prototype._undestroy=xe.undestroy,Me.prototype._destroy=function(we,Ne){this.push(null),Ne(we)},Me.prototype.push=function(we,Ne){var Xe=this._readableState,nt;return Xe.objectMode?nt=!0:typeof we=="string"&&(Ne=Ne||Xe.defaultEncoding,Ne!==Xe.encoding&&(we=fe.from(we,Ne),Ne=""),nt=!0),Be(this,we,Ne,!1,nt)},Me.prototype.unshift=function(we){return Be(this,we,null,!0,!1)};function Be(we,Ne,Xe,nt,Ie){var Re=we._readableState;if(Ne===null)Re.reading=!1,ft(we,Re);else{var Ze;Ie||(Ze=Ye(Re,Ne)),Ze?we.emit("error",Ze):Re.objectMode||Ne&&Ne.length>0?(typeof Ne!="string"&&!Re.objectMode&&Object.getPrototypeOf(Ne)!==fe.prototype&&(Ne=te(Ne)),nt?Re.endEmitted?we.emit("error",new Error("stream.unshift() after end event")):Ge(we,Re,Ne,!0):Re.ended?we.emit("error",new Error("stream.push() after EOF")):(Re.reading=!1,Re.decoder&&!Xe?(Ne=Re.decoder.write(Ne),Re.objectMode||Ne.length!==0?Ge(we,Re,Ne,!1):rt(we,Re)):Ge(we,Re,Ne,!1))):nt||(Re.reading=!1)}return Ke(Re)}function Ge(we,Ne,Xe,nt){Ne.flowing&&Ne.length===0&&!Ne.sync?(we.emit("data",Xe),we.read(0)):(Ne.length+=Ne.objectMode?1:Xe.length,nt?Ne.buffer.unshift(Xe):Ne.buffer.push(Xe),Ne.needReadable&&St(we)),rt(we,Ne)}function Ye(we,Ne){var Xe;return!se(Ne)&&typeof Ne!="string"&&Ne!==void 0&&!we.objectMode&&(Xe=new TypeError("Invalid non-string/buffer chunk")),Xe}function Ke(we){return!we.ended&&(we.needReadable||we.length<we.highWaterMark||we.length===0)}Me.prototype.isPaused=function(){return this._readableState.flowing===!1},Me.prototype.setEncoding=function(we){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(we),this._readableState.encoding=we,this};var Ve=8388608;function ot(we){return we>=Ve?we=Ve:(we--,we|=we>>>1,we|=we>>>2,we|=we>>>4,we|=we>>>8,we|=we>>>16,we++),we}function ut(we,Ne){return we<=0||Ne.length===0&&Ne.ended?0:Ne.objectMode?1:we!==we?Ne.flowing&&Ne.length?Ne.buffer.head.data.length:Ne.length:(we>Ne.highWaterMark&&(Ne.highWaterMark=ot(we)),we<=Ne.length?we:Ne.ended?Ne.length:(Ne.needReadable=!0,0))}Me.prototype.read=function(we){ce("read",we),we=parseInt(we,10);var Ne=this._readableState,Xe=we;if(we!==0&&(Ne.emittedReadable=!1),we===0&&Ne.needReadable&&(Ne.length>=Ne.highWaterMark||Ne.ended))return ce("read: emitReadable",Ne.length,Ne.ended),Ne.length===0&&Ne.ended?vt(this):St(this),null;if(we=ut(we,Ne),we===0&&Ne.ended)return Ne.length===0&&vt(this),null;var nt=Ne.needReadable;ce("need readable",nt),(Ne.length===0||Ne.length-we<Ne.highWaterMark)&&(nt=!0,ce("length less than watermark",nt)),Ne.ended||Ne.reading?(nt=!1,ce("reading or ended",nt)):nt&&(ce("do read"),Ne.reading=!0,Ne.sync=!0,Ne.length===0&&(Ne.needReadable=!0),this._read(Ne.highWaterMark),Ne.sync=!1,Ne.reading||(we=ut(Xe,Ne)));var Ie;return we>0?Ie=Mt(we,Ne):Ie=null,Ie===null?(Ne.needReadable=!0,we=0):Ne.length-=we,Ne.length===0&&(Ne.ended||(Ne.needReadable=!0),Xe!==we&&Ne.ended&&vt(this)),Ie!==null&&this.emit("data",Ie),Ie};function ft(we,Ne){if(!Ne.ended){if(Ne.decoder){var Xe=Ne.decoder.end();Xe&&Xe.length&&(Ne.buffer.push(Xe),Ne.length+=Ne.objectMode?1:Xe.length)}Ne.ended=!0,St(we)}}function St(we){var Ne=we._readableState;Ne.needReadable=!1,Ne.emittedReadable||(ce("emitReadable",Ne.flowing),Ne.emittedReadable=!0,Ne.sync?Ee.nextTick(Qe,we):Qe(we))}function Qe(we){ce("emit readable"),we.emit("readable"),dt(we)}function rt(we,Ne){Ne.readingMore||(Ne.readingMore=!0,Ee.nextTick(wt,we,Ne))}function wt(we,Ne){for(var Xe=Ne.length;!Ne.reading&&!Ne.flowing&&!Ne.ended&&Ne.length<Ne.highWaterMark&&(ce("maybeReadMore read 0"),we.read(0),Xe!==Ne.length);)Xe=Ne.length;Ne.readingMore=!1}Me.prototype._read=function(we){this.emit("error",new Error("_read() is not implemented"))},Me.prototype.pipe=function(we,Ne){var Xe=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=we;break;case 1:nt.pipes=[nt.pipes,we];break;default:nt.pipes.push(we);break}nt.pipesCount+=1,ce("pipe count=%d opts=%j",nt.pipesCount,Ne);var Ie=(!Ne||Ne.end!==!1)&&we!==de.stdout&&we!==de.stderr,Re=Ie?et:Wt;nt.endEmitted?Ee.nextTick(Re):Xe.once("end",Re),we.on("unpipe",Ze);function Ze(un,on){ce("onunpipe"),un===Xe&&on&&on.hasUnpiped===!1&&(on.hasUnpiped=!0,Dt())}function et(){ce("onend"),we.end()}var ht=Ct(Xe);we.on("drain",ht);var at=!1;function Dt(){ce("cleanup"),we.removeListener("close",Qt),we.removeListener("finish",Xt),we.removeListener("drain",ht),we.removeListener("error",qt),we.removeListener("unpipe",Ze),Xe.removeListener("end",et),Xe.removeListener("end",Wt),Xe.removeListener("data",Ot),at=!0,nt.awaitDrain&&(!we._writableState||we._writableState.needDrain)&&ht()}var Et=!1;Xe.on("data",Ot);function Ot(un){ce("ondata"),Et=!1;var on=we.write(un);on===!1&&!Et&&((nt.pipesCount===1&&nt.pipes===we||nt.pipesCount>1&&He(nt.pipes,we)!==-1)&&!at&&(ce("false write response, pause",Xe._readableState.awaitDrain),Xe._readableState.awaitDrain++,Et=!0),Xe.pause())}function qt(un){ce("onerror",un),Wt(),we.removeListener("error",qt),me(we,"error")===0&&we.emit("error",un)}Fe(we,"error",qt);function Qt(){we.removeListener("finish",Xt),Wt()}we.once("close",Qt);function Xt(){ce("onfinish"),we.removeListener("close",Qt),Wt()}we.once("finish",Xt);function Wt(){ce("unpipe"),Xe.unpipe(we)}return we.emit("pipe",Xe),nt.flowing||(ce("pipe resume"),Xe.resume()),we};function Ct(we){return function(){var Ne=we._readableState;ce("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,Ne.awaitDrain===0&&me(we,"data")&&(Ne.flowing=!0,dt(we))}}Me.prototype.unpipe=function(we){var Ne=this._readableState,Xe={hasUnpiped:!1};if(Ne.pipesCount===0)return this;if(Ne.pipesCount===1)return we&&we!==Ne.pipes?this:(we||(we=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,we&&we.emit("unpipe",this,Xe),this);if(!we){var nt=Ne.pipes,Ie=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var Re=0;Re<Ie;Re++)nt[Re].emit("unpipe",this,Xe);return this}var Ze=He(Ne.pipes,we);return Ze===-1?this:(Ne.pipes.splice(Ze,1),Ne.pipesCount-=1,Ne.pipesCount===1&&(Ne.pipes=Ne.pipes[0]),we.emit("unpipe",this,Xe),this)},Me.prototype.on=function(we,Ne){var Xe=Pe.prototype.on.call(this,we,Ne);if(we==="data")this._readableState.flowing!==!1&&this.resume();else if(we==="readable"){var nt=this._readableState;!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.emittedReadable=!1,nt.reading?nt.length&&St(this):Ee.nextTick(bt,this))}return Xe},Me.prototype.addListener=Me.prototype.on;function bt(we){ce("readable nexttick read 0"),we.read(0)}Me.prototype.resume=function(){var we=this._readableState;return we.flowing||(ce("resume"),we.flowing=!0,ct(this,we)),this};function ct(we,Ne){Ne.resumeScheduled||(Ne.resumeScheduled=!0,Ee.nextTick(xt,we,Ne))}function xt(we,Ne){Ne.reading||(ce("resume read 0"),we.read(0)),Ne.resumeScheduled=!1,Ne.awaitDrain=0,we.emit("resume"),dt(we),Ne.flowing&&!Ne.reading&&we.read(0)}Me.prototype.pause=function(){return ce("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function dt(we){var Ne=we._readableState;for(ce("flow",Ne.flowing);Ne.flowing&&we.read()!==null;);}Me.prototype.wrap=function(we){var Ne=this,Xe=this._readableState,nt=!1;we.on("end",function(){if(ce("wrapped end"),Xe.decoder&&!Xe.ended){var Ze=Xe.decoder.end();Ze&&Ze.length&&Ne.push(Ze)}Ne.push(null)}),we.on("data",function(Ze){if(ce("wrapped data"),Xe.decoder&&(Ze=Xe.decoder.write(Ze)),!(Xe.objectMode&&Ze==null)&&!(!Xe.objectMode&&(!Ze||!Ze.length))){var et=Ne.push(Ze);et||(nt=!0,we.pause())}});for(var Ie in we)this[Ie]===void 0&&typeof we[Ie]=="function"&&(this[Ie]=function(Ze){return function(){return we[Ze].apply(we,arguments)}}(Ie));for(var Re=0;Re<De.length;Re++)we.on(De[Re],this.emit.bind(this,De[Re]));return this._read=function(Ze){ce("wrapped _read",Ze),nt&&(nt=!1,we.resume())},this},Object.defineProperty(Me.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Me._fromList=Mt;function Mt(we,Ne){if(Ne.length===0)return null;var Xe;return Ne.objectMode?Xe=Ne.buffer.shift():!we||we>=Ne.length?(Ne.decoder?Xe=Ne.buffer.join(""):Ne.buffer.length===1?Xe=Ne.buffer.head.data:Xe=Ne.buffer.concat(Ne.length),Ne.buffer.clear()):Xe=yt(we,Ne.buffer,Ne.decoder),Xe}function yt(we,Ne,Xe){var nt;return we<Ne.head.data.length?(nt=Ne.head.data.slice(0,we),Ne.head.data=Ne.head.data.slice(we)):we===Ne.head.data.length?nt=Ne.shift():nt=Xe?Ft(we,Ne):mt(we,Ne),nt}function Ft(we,Ne){var Xe=Ne.head,nt=1,Ie=Xe.data;for(we-=Ie.length;Xe=Xe.next;){var Re=Xe.data,Ze=we>Re.length?Re.length:we;if(Ze===Re.length?Ie+=Re:Ie+=Re.slice(0,we),we-=Ze,we===0){Ze===Re.length?(++nt,Xe.next?Ne.head=Xe.next:Ne.head=Ne.tail=null):(Ne.head=Xe,Xe.data=Re.slice(Ze));break}++nt}return Ne.length-=nt,Ie}function mt(we,Ne){var Xe=fe.allocUnsafe(we),nt=Ne.head,Ie=1;for(nt.data.copy(Xe),we-=nt.data.length;nt=nt.next;){var Re=nt.data,Ze=we>Re.length?Re.length:we;if(Re.copy(Xe,Xe.length-we,0,Ze),we-=Ze,we===0){Ze===Re.length?(++Ie,nt.next?Ne.head=nt.next:Ne.head=Ne.tail=null):(Ne.head=nt,nt.data=Re.slice(Ze));break}++Ie}return Ne.length-=Ie,Xe}function vt(we){var Ne=we._readableState;if(Ne.length>0)throw new Error('"endReadable()" called on non-empty stream');Ne.endEmitted||(Ne.ended=!0,Ee.nextTick(tt,Ne,we))}function tt(we,Ne){!we.endEmitted&&we.length===0&&(we.endEmitted=!0,Ne.readable=!1,Ne.emit("end"))}function He(we,Ne){for(var Xe=0,nt=we.length;Xe<nt;Xe++)if(we[Xe]===Ne)return Xe;return-1}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(oe,Ue,_e){"use strict";Ue.exports=ke;var de=oe("./_stream_duplex"),ve=Object.create(oe("core-util-is"));ve.inherits=oe("inherits"),ve.inherits(ke,de);function Ee(me,Pe){var fe=this._transformState;fe.transforming=!1;var z=fe.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,Pe!=null&&this.push(Pe),z(me);var te=this._readableState;te.reading=!1,(te.needReadable||te.length<te.highWaterMark)&&this._read(te.highWaterMark)}function ke(me){if(!(this instanceof ke))return new ke(me);de.call(this,me),this._transformState={afterTransform:Ee.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,me&&(typeof me.transform=="function"&&(this._transform=me.transform),typeof me.flush=="function"&&(this._flush=me.flush)),this.on("prefinish",Se)}function Se(){var me=this;typeof this._flush=="function"?this._flush(function(Pe,fe){Ae(me,Pe,fe)}):Ae(this,null,null)}ke.prototype.push=function(me,Pe){return this._transformState.needTransform=!1,de.prototype.push.call(this,me,Pe)},ke.prototype._transform=function(me,Pe,fe){throw new Error("_transform() is not implemented")},ke.prototype._write=function(me,Pe,fe){var z=this._transformState;if(z.writecb=fe,z.writechunk=me,z.writeencoding=Pe,!z.transforming){var te=this._readableState;(z.needTransform||te.needReadable||te.length<te.highWaterMark)&&this._read(te.highWaterMark)}},ke.prototype._read=function(me){var Pe=this._transformState;Pe.writechunk!==null&&Pe.writecb&&!Pe.transforming?(Pe.transforming=!0,this._transform(Pe.writechunk,Pe.writeencoding,Pe.afterTransform)):Pe.needTransform=!0},ke.prototype._destroy=function(me,Pe){var fe=this;de.prototype._destroy.call(this,me,function(z){Pe(z),fe.emit("close")})};function Ae(me,Pe,fe){if(Pe)return me.emit("error",Pe);if(fe!=null&&me.push(fe),me._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(me._transformState.transforming)throw new Error("Calling transform done when still transforming");return me.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(oe,Ue,_e){(function(de,ve,Ee){(function(){"use strict";var ke=oe("process-nextick-args");Ue.exports=Fe;function Se(xt,dt,Mt){this.chunk=xt,this.encoding=dt,this.callback=Mt,this.next=null}function Ae(xt){var dt=this;this.next=null,this.entry=null,this.finish=function(){ct(dt,xt)}}var me=!de.browser&&["v0.10","v0.9."].indexOf(de.version.slice(0,5))>-1?Ee:ke.nextTick,Pe;Fe.WritableState=je;var fe=Object.create(oe("core-util-is"));fe.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},te=oe("./internal/streams/stream"),se=oe("safe-buffer").Buffer,ie=ve.Uint8Array||function(){};function le(xt){return se.from(xt)}function ce(xt){return se.isBuffer(xt)||xt instanceof ie}var pe=oe("./internal/streams/destroy");fe.inherits(Fe,te);function xe(){}function je(xt,dt){Pe=Pe||oe("./_stream_duplex"),xt=xt||{};var Mt=dt instanceof Pe;this.objectMode=!!xt.objectMode,Mt&&(this.objectMode=this.objectMode||!!xt.writableObjectMode);var yt=xt.highWaterMark,Ft=xt.writableHighWaterMark,mt=this.objectMode?16:16*1024;yt||yt===0?this.highWaterMark=yt:Mt&&(Ft||Ft===0)?this.highWaterMark=Ft:this.highWaterMark=mt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var vt=xt.decodeStrings===!1;this.decodeStrings=!vt,this.defaultEncoding=xt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){ot(dt,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ae(this)}je.prototype.getBuffer=function(){for(var dt=this.bufferedRequest,Mt=[];dt;)Mt.push(dt),dt=dt.next;return Mt},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(xt){}}();var De;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(De=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(xt){return De.call(this,xt)?!0:this!==Fe?!1:xt&&xt._writableState instanceof je}})):De=function(xt){return xt instanceof this};function Fe(xt){if(Pe=Pe||oe("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof Pe))return new Fe(xt);this._writableState=new je(xt,this),this.writable=!0,xt&&(typeof xt.write=="function"&&(this._write=xt.write),typeof xt.writev=="function"&&(this._writev=xt.writev),typeof xt.destroy=="function"&&(this._destroy=xt.destroy),typeof xt.final=="function"&&(this._final=xt.final)),te.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Te(xt,dt){var Mt=new Error("write after end");xt.emit("error",Mt),ke.nextTick(dt,Mt)}function Me(xt,dt,Mt,yt){var Ft=!0,mt=!1;return Mt===null?mt=new TypeError("May not write null values to stream"):typeof Mt!="string"&&Mt!==void 0&&!dt.objectMode&&(mt=new TypeError("Invalid non-string/buffer chunk")),mt&&(xt.emit("error",mt),ke.nextTick(yt,mt),Ft=!1),Ft}Fe.prototype.write=function(xt,dt,Mt){var yt=this._writableState,Ft=!1,mt=!yt.objectMode&&ce(xt);return mt&&!se.isBuffer(xt)&&(xt=le(xt)),typeof dt=="function"&&(Mt=dt,dt=null),mt?dt="buffer":dt||(dt=yt.defaultEncoding),typeof Mt!="function"&&(Mt=xe),yt.ended?Te(this,Mt):(mt||Me(this,yt,xt,Mt))&&(yt.pendingcb++,Ft=Ge(this,yt,mt,xt,dt,Mt)),Ft},Fe.prototype.cork=function(){var xt=this._writableState;xt.corked++},Fe.prototype.uncork=function(){var xt=this._writableState;xt.corked&&(xt.corked--,!xt.writing&&!xt.corked&&!xt.finished&&!xt.bufferProcessing&&xt.bufferedRequest&&St(this,xt))},Fe.prototype.setDefaultEncoding=function(dt){if(typeof dt=="string"&&(dt=dt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((dt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+dt);return this._writableState.defaultEncoding=dt,this};function Be(xt,dt,Mt){return!xt.objectMode&&xt.decodeStrings!==!1&&typeof dt=="string"&&(dt=se.from(dt,Mt)),dt}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ge(xt,dt,Mt,yt,Ft,mt){if(!Mt){var vt=Be(dt,yt,Ft);yt!==vt&&(Mt=!0,Ft="buffer",yt=vt)}var tt=dt.objectMode?1:yt.length;dt.length+=tt;var He=dt.length<dt.highWaterMark;if(He||(dt.needDrain=!0),dt.writing||dt.corked){var we=dt.lastBufferedRequest;dt.lastBufferedRequest={chunk:yt,encoding:Ft,isBuf:Mt,callback:mt,next:null},we?we.next=dt.lastBufferedRequest:dt.bufferedRequest=dt.lastBufferedRequest,dt.bufferedRequestCount+=1}else Ye(xt,dt,!1,tt,yt,Ft,mt);return He}function Ye(xt,dt,Mt,yt,Ft,mt,vt){dt.writelen=yt,dt.writecb=vt,dt.writing=!0,dt.sync=!0,Mt?xt._writev(Ft,dt.onwrite):xt._write(Ft,mt,dt.onwrite),dt.sync=!1}function Ke(xt,dt,Mt,yt,Ft){--dt.pendingcb,Mt?(ke.nextTick(Ft,yt),ke.nextTick(Ct,xt,dt),xt._writableState.errorEmitted=!0,xt.emit("error",yt)):(Ft(yt),xt._writableState.errorEmitted=!0,xt.emit("error",yt),Ct(xt,dt))}function Ve(xt){xt.writing=!1,xt.writecb=null,xt.length-=xt.writelen,xt.writelen=0}function ot(xt,dt){var Mt=xt._writableState,yt=Mt.sync,Ft=Mt.writecb;if(Ve(Mt),dt)Ke(xt,Mt,yt,dt,Ft);else{var mt=Qe(Mt);!mt&&!Mt.corked&&!Mt.bufferProcessing&&Mt.bufferedRequest&&St(xt,Mt),yt?me(ut,xt,Mt,mt,Ft):ut(xt,Mt,mt,Ft)}}function ut(xt,dt,Mt,yt){Mt||ft(xt,dt),dt.pendingcb--,yt(),Ct(xt,dt)}function ft(xt,dt){dt.length===0&&dt.needDrain&&(dt.needDrain=!1,xt.emit("drain"))}function St(xt,dt){dt.bufferProcessing=!0;var Mt=dt.bufferedRequest;if(xt._writev&&Mt&&Mt.next){var yt=dt.bufferedRequestCount,Ft=new Array(yt),mt=dt.corkedRequestsFree;mt.entry=Mt;for(var vt=0,tt=!0;Mt;)Ft[vt]=Mt,Mt.isBuf||(tt=!1),Mt=Mt.next,vt+=1;Ft.allBuffers=tt,Ye(xt,dt,!0,dt.length,Ft,"",mt.finish),dt.pendingcb++,dt.lastBufferedRequest=null,mt.next?(dt.corkedRequestsFree=mt.next,mt.next=null):dt.corkedRequestsFree=new Ae(dt),dt.bufferedRequestCount=0}else{for(;Mt;){var He=Mt.chunk,we=Mt.encoding,Ne=Mt.callback,Xe=dt.objectMode?1:He.length;if(Ye(xt,dt,!1,Xe,He,we,Ne),Mt=Mt.next,dt.bufferedRequestCount--,dt.writing)break}Mt===null&&(dt.lastBufferedRequest=null)}dt.bufferedRequest=Mt,dt.bufferProcessing=!1}Fe.prototype._write=function(xt,dt,Mt){Mt(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(xt,dt,Mt){var yt=this._writableState;typeof xt=="function"?(Mt=xt,xt=null,dt=null):typeof dt=="function"&&(Mt=dt,dt=null),xt!=null&&this.write(xt,dt),yt.corked&&(yt.corked=1,this.uncork()),!yt.ending&&!yt.finished&&bt(this,yt,Mt)};function Qe(xt){return xt.ending&&xt.length===0&&xt.bufferedRequest===null&&!xt.finished&&!xt.writing}function rt(xt,dt){xt._final(function(Mt){dt.pendingcb--,Mt&&xt.emit("error",Mt),dt.prefinished=!0,xt.emit("prefinish"),Ct(xt,dt)})}function wt(xt,dt){!dt.prefinished&&!dt.finalCalled&&(typeof xt._final=="function"?(dt.pendingcb++,dt.finalCalled=!0,ke.nextTick(rt,xt,dt)):(dt.prefinished=!0,xt.emit("prefinish")))}function Ct(xt,dt){var Mt=Qe(dt);return Mt&&(wt(xt,dt),dt.pendingcb===0&&(dt.finished=!0,xt.emit("finish"))),Mt}function bt(xt,dt,Mt){dt.ending=!0,Ct(xt,dt),Mt&&(dt.finished?ke.nextTick(Mt):xt.once("finish",Mt)),dt.ended=!0,xt.writable=!1}function ct(xt,dt,Mt){var yt=xt.entry;for(xt.entry=null;yt;){var Ft=yt.callback;dt.pendingcb--,Ft(Mt),yt=yt.next}dt.corkedRequestsFree?dt.corkedRequestsFree.next=xt:dt.corkedRequestsFree=xt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(xt){this._writableState&&(this._writableState.destroyed=xt)}}),Fe.prototype.destroy=pe.destroy,Fe.prototype._undestroy=pe.undestroy,Fe.prototype._destroy=function(xt,dt){this.end(),dt(xt)}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(oe,Ue,_e){"use strict";function de(Se,Ae){if(!(Se instanceof Ae))throw new TypeError("Cannot call a class as a function")}var ve=oe("safe-buffer").Buffer,Ee=oe("util");function ke(Se,Ae,me){Se.copy(Ae,me)}Ue.exports=function(){function Se(){de(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(me){var Pe={data:me,next:null};this.length>0?this.tail.next=Pe:this.head=Pe,this.tail=Pe,++this.length},Se.prototype.unshift=function(me){var Pe={data:me,next:this.head};this.length===0&&(this.tail=Pe),this.head=Pe,++this.length},Se.prototype.shift=function(){if(this.length!==0){var me=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,me}},Se.prototype.clear=function(){this.head=this.tail=null,this.length=0},Se.prototype.join=function(me){if(this.length===0)return"";for(var Pe=this.head,fe=""+Pe.data;Pe=Pe.next;)fe+=me+Pe.data;return fe},Se.prototype.concat=function(me){if(this.length===0)return ve.alloc(0);if(this.length===1)return this.head.data;for(var Pe=ve.allocUnsafe(me>>>0),fe=this.head,z=0;fe;)ke(fe.data,Pe,z),z+=fe.data.length,fe=fe.next;return Pe},Se}(),Ee&&Ee.inspect&&Ee.inspect.custom&&(Ue.exports.prototype[Ee.inspect.custom]=function(){var Se=Ee.inspect({length:this.length});return this.constructor.name+" "+Se})},{"safe-buffer":396,util:89}],392:[function(oe,Ue,_e){"use strict";var de=oe("process-nextick-args");function ve(Se,Ae){var me=this,Pe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return Pe||fe?(Ae?Ae(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&de.nextTick(ke,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Ae&&z?(de.nextTick(ke,me,z),me._writableState&&(me._writableState.errorEmitted=!0)):Ae&&Ae(z)}),this)}function Ee(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ke(Se,Ae){Se.emit("error",Ae)}Ue.exports={destroy:ve,undestroy:Ee}},{"process-nextick-args":380}],393:[function(oe,Ue,_e){Ue.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,Ue,_e){_e=Ue.exports=oe("./lib/_stream_readable.js"),_e.Stream=_e,_e.Readable=_e,_e.Writable=oe("./lib/_stream_writable.js"),_e.Duplex=oe("./lib/_stream_duplex.js"),_e.Transform=oe("./lib/_stream_transform.js"),_e.PassThrough=oe("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(oe,Ue,_e){var de=function(ve){"use strict";var Ee=Object.prototype,ke=Ee.hasOwnProperty,Se,Ae=typeof Symbol=="function"?Symbol:{},me=Ae.iterator||"@@iterator",Pe=Ae.asyncIterator||"@@asyncIterator",fe=Ae.toStringTag||"@@toStringTag";function z(wt,Ct,bt){return Object.defineProperty(wt,Ct,{value:bt,enumerable:!0,configurable:!0,writable:!0}),wt[Ct]}try{z({},"")}catch(wt){z=function(Ct,bt,ct){return Ct[bt]=ct}}function te(wt,Ct,bt,ct){var xt=Ct&&Ct.prototype instanceof je?Ct:je,dt=Object.create(xt.prototype),Mt=new St(ct||[]);return dt._invoke=Ve(wt,bt,Mt),dt}ve.wrap=te;function se(wt,Ct,bt){try{return{type:"normal",arg:wt.call(Ct,bt)}}catch(ct){return{type:"throw",arg:ct}}}var ie="suspendedStart",le="suspendedYield",ce="executing",pe="completed",xe={};function je(){}function De(){}function Fe(){}var Te={};z(Te,me,function(){return this});var Me=Object.getPrototypeOf,Be=Me&&Me(Me(Qe([])));Be&&Be!==Ee&&ke.call(Be,me)&&(Te=Be);var Ge=Fe.prototype=je.prototype=Object.create(Te);De.prototype=Fe,z(Ge,"constructor",Fe),z(Fe,"constructor",De),De.displayName=z(Fe,fe,"GeneratorFunction");function Ye(wt){["next","throw","return"].forEach(function(Ct){z(wt,Ct,function(bt){return this._invoke(Ct,bt)})})}ve.isGeneratorFunction=function(wt){var Ct=typeof wt=="function"&&wt.constructor;return Ct?Ct===De||(Ct.displayName||Ct.name)==="GeneratorFunction":!1},ve.mark=function(wt){return Object.setPrototypeOf?Object.setPrototypeOf(wt,Fe):(wt.__proto__=Fe,z(wt,fe,"GeneratorFunction")),wt.prototype=Object.create(Ge),wt},ve.awrap=function(wt){return{__await:wt}};function Ke(wt,Ct){function bt(dt,Mt,yt,Ft){var mt=se(wt[dt],wt,Mt);if(mt.type==="throw")Ft(mt.arg);else{var vt=mt.arg,tt=vt.value;return tt&&typeof tt=="object"&&ke.call(tt,"__await")?Ct.resolve(tt.__await).then(function(He){bt("next",He,yt,Ft)},function(He){bt("throw",He,yt,Ft)}):Ct.resolve(tt).then(function(He){vt.value=He,yt(vt)},function(He){return bt("throw",He,yt,Ft)})}}var ct;function xt(dt,Mt){function yt(){return new Ct(function(Ft,mt){bt(dt,Mt,Ft,mt)})}return ct=ct?ct.then(yt,yt):yt()}this._invoke=xt}Ye(Ke.prototype),z(Ke.prototype,Pe,function(){return this}),ve.AsyncIterator=Ke,ve.async=function(wt,Ct,bt,ct,xt){xt===void 0&&(xt=Promise);var dt=new Ke(te(wt,Ct,bt,ct),xt);return ve.isGeneratorFunction(Ct)?dt:dt.next().then(function(Mt){return Mt.done?Mt.value:dt.next()})};function Ve(wt,Ct,bt){var ct=ie;return function(dt,Mt){if(ct===ce)throw new Error("Generator is already running");if(ct===pe){if(dt==="throw")throw Mt;return rt()}for(bt.method=dt,bt.arg=Mt;;){var yt=bt.delegate;if(yt){var Ft=ot(yt,bt);if(Ft){if(Ft===xe)continue;return Ft}}if(bt.method==="next")bt.sent=bt._sent=bt.arg;else if(bt.method==="throw"){if(ct===ie)throw ct=pe,bt.arg;bt.dispatchException(bt.arg)}else bt.method==="return"&&bt.abrupt("return",bt.arg);ct=ce;var mt=se(wt,Ct,bt);if(mt.type==="normal"){if(ct=bt.done?pe:le,mt.arg===xe)continue;return{value:mt.arg,done:bt.done}}else mt.type==="throw"&&(ct=pe,bt.method="throw",bt.arg=mt.arg)}}}function ot(wt,Ct){var bt=wt.iterator[Ct.method];if(bt===Se){if(Ct.delegate=null,Ct.method==="throw"){if(wt.iterator.return&&(Ct.method="return",Ct.arg=Se,ot(wt,Ct),Ct.method==="throw"))return xe;Ct.method="throw",Ct.arg=new TypeError("The iterator does not provide a 'throw' method")}return xe}var ct=se(bt,wt.iterator,Ct.arg);if(ct.type==="throw")return Ct.method="throw",Ct.arg=ct.arg,Ct.delegate=null,xe;var xt=ct.arg;if(!xt)return Ct.method="throw",Ct.arg=new TypeError("iterator result is not an object"),Ct.delegate=null,xe;if(xt.done)Ct[wt.resultName]=xt.value,Ct.next=wt.nextLoc,Ct.method!=="return"&&(Ct.method="next",Ct.arg=Se);else return xt;return Ct.delegate=null,xe}Ye(Ge),z(Ge,fe,"Generator"),z(Ge,me,function(){return this}),z(Ge,"toString",function(){return"[object Generator]"});function ut(wt){var Ct={tryLoc:wt[0]};1 in wt&&(Ct.catchLoc=wt[1]),2 in wt&&(Ct.finallyLoc=wt[2],Ct.afterLoc=wt[3]),this.tryEntries.push(Ct)}function ft(wt){var Ct=wt.completion||{};Ct.type="normal",delete Ct.arg,wt.completion=Ct}function St(wt){this.tryEntries=[{tryLoc:"root"}],wt.forEach(ut,this),this.reset(!0)}ve.keys=function(wt){var Ct=[];for(var bt in wt)Ct.push(bt);return Ct.reverse(),function ct(){for(;Ct.length;){var xt=Ct.pop();if(xt in wt)return ct.value=xt,ct.done=!1,ct}return ct.done=!0,ct}};function Qe(wt){if(wt){var Ct=wt[me];if(Ct)return Ct.call(wt);if(typeof wt.next=="function")return wt;if(!isNaN(wt.length)){var bt=-1,ct=function xt(){for(;++bt<wt.length;)if(ke.call(wt,bt))return xt.value=wt[bt],xt.done=!1,xt;return xt.value=Se,xt.done=!0,xt};return ct.next=ct}}return{next:rt}}ve.values=Qe;function rt(){return{value:Se,done:!0}}return St.prototype={constructor:St,reset:function(wt){if(this.prev=0,this.next=0,this.sent=this._sent=Se,this.done=!1,this.delegate=null,this.method="next",this.arg=Se,this.tryEntries.forEach(ft),!wt)for(var Ct in this)Ct.charAt(0)==="t"&&ke.call(this,Ct)&&!isNaN(+Ct.slice(1))&&(this[Ct]=Se)},stop:function(){this.done=!0;var wt=this.tryEntries[0],Ct=wt.completion;if(Ct.type==="throw")throw Ct.arg;return this.rval},dispatchException:function(wt){if(this.done)throw wt;var Ct=this;function bt(Ft,mt){return dt.type="throw",dt.arg=wt,Ct.next=Ft,mt&&(Ct.method="next",Ct.arg=Se),!!mt}for(var ct=this.tryEntries.length-1;ct>=0;--ct){var xt=this.tryEntries[ct],dt=xt.completion;if(xt.tryLoc==="root")return bt("end");if(xt.tryLoc<=this.prev){var Mt=ke.call(xt,"catchLoc"),yt=ke.call(xt,"finallyLoc");if(Mt&&yt){if(this.prev<xt.catchLoc)return bt(xt.catchLoc,!0);if(this.prev<xt.finallyLoc)return bt(xt.finallyLoc)}else if(Mt){if(this.prev<xt.catchLoc)return bt(xt.catchLoc,!0)}else if(yt){if(this.prev<xt.finallyLoc)return bt(xt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(wt,Ct){for(var bt=this.tryEntries.length-1;bt>=0;--bt){var ct=this.tryEntries[bt];if(ct.tryLoc<=this.prev&&ke.call(ct,"finallyLoc")&&this.prev<ct.finallyLoc){var xt=ct;break}}xt&&(wt==="break"||wt==="continue")&&xt.tryLoc<=Ct&&Ct<=xt.finallyLoc&&(xt=null);var dt=xt?xt.completion:{};return dt.type=wt,dt.arg=Ct,xt?(this.method="next",this.next=xt.finallyLoc,xe):this.complete(dt)},complete:function(wt,Ct){if(wt.type==="throw")throw wt.arg;return wt.type==="break"||wt.type==="continue"?this.next=wt.arg:wt.type==="return"?(this.rval=this.arg=wt.arg,this.method="return",this.next="end"):wt.type==="normal"&&Ct&&(this.next=Ct),xe},finish:function(wt){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var bt=this.tryEntries[Ct];if(bt.finallyLoc===wt)return this.complete(bt.completion,bt.afterLoc),ft(bt),xe}},catch:function(wt){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var bt=this.tryEntries[Ct];if(bt.tryLoc===wt){var ct=bt.completion;if(ct.type==="throw"){var xt=ct.arg;ft(bt)}return xt}}throw new Error("illegal catch attempt")},delegateYield:function(wt,Ct,bt){return this.delegate={iterator:Qe(wt),resultName:Ct,nextLoc:bt},this.method==="next"&&(this.arg=Se),xe}},ve}(typeof Ue=="object"?Ue.exports:{});try{regeneratorRuntime=de}catch(ve){typeof globalThis=="object"?globalThis.regeneratorRuntime=de:Function("r","regeneratorRuntime = r")(de)}},{}],396:[function(oe,Ue,_e){var de=oe("buffer"),ve=de.Buffer;function Ee(Se,Ae){for(var me in Se)Ae[me]=Se[me]}ve.from&&ve.alloc&&ve.allocUnsafe&&ve.allocUnsafeSlow?Ue.exports=de:(Ee(de,_e),_e.Buffer=ke);function ke(Se,Ae,me){return ve(Se,Ae,me)}Ee(ve,ke),ke.from=function(Se,Ae,me){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return ve(Se,Ae,me)},ke.alloc=function(Se,Ae,me){if(typeof Se!="number")throw new TypeError("Argument must be a number");var Pe=ve(Se);return Ae!==void 0?typeof me=="string"?Pe.fill(Ae,me):Pe.fill(Ae):Pe.fill(0),Pe},ke.allocUnsafe=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return ve(Se)},ke.allocUnsafeSlow=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return de.SlowBuffer(Se)}},{buffer:90}],397:[function(oe,Ue,_e){(function(de){(function(){(function(ve){ve.parser=function(vt,tt){return new ke(vt,tt)},ve.SAXParser=ke,ve.SAXStream=te,ve.createStream=z,ve.MAX_BUFFER_LENGTH=64*1024;var Ee=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ve.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function ke(vt,tt){if(!(this instanceof ke))return new ke(vt,tt);var He=this;Ae(He),He.q=He.c="",He.bufferCheckPosition=ve.MAX_BUFFER_LENGTH,He.opt=tt||{},He.opt.lowercase=He.opt.lowercase||He.opt.lowercasetags,He.looseCase=He.opt.lowercase?"toLowerCase":"toUpperCase",He.tags=[],He.closed=He.closedRoot=He.sawRoot=!1,He.tag=He.error=null,He.strict=!!vt,He.noscript=!!(vt||He.opt.noscript),He.state=Ke.BEGIN,He.strictEntities=He.opt.strictEntities,He.ENTITIES=He.strictEntities?Object.create(ve.XML_ENTITIES):Object.create(ve.ENTITIES),He.attribList=[],He.opt.xmlns&&(He.ns=Object.create(pe)),He.trackPosition=He.opt.position!==!1,He.trackPosition&&(He.position=He.line=He.column=0),ot(He,"onready")}Object.create||(Object.create=function(vt){function tt(){}tt.prototype=vt;var He=new tt;return He}),Object.keys||(Object.keys=function(vt){var tt=[];for(var He in vt)vt.hasOwnProperty(He)&&tt.push(He);return tt});function Se(vt){for(var tt=Math.max(ve.MAX_BUFFER_LENGTH,10),He=0,we=0,Ne=Ee.length;we<Ne;we++){var Xe=vt[Ee[we]].length;if(Xe>tt)switch(Ee[we]){case"textNode":ft(vt);break;case"cdata":ut(vt,"oncdata",vt.cdata),vt.cdata="";break;case"script":ut(vt,"onscript",vt.script),vt.script="";break;default:Qe(vt,"Max buffer length exceeded: "+Ee[we])}He=Math.max(He,Xe)}var nt=ve.MAX_BUFFER_LENGTH-He;vt.bufferCheckPosition=nt+vt.position}function Ae(vt){for(var tt=0,He=Ee.length;tt<He;tt++)vt[Ee[tt]]=""}function me(vt){ft(vt),vt.cdata!==""&&(ut(vt,"oncdata",vt.cdata),vt.cdata=""),vt.script!==""&&(ut(vt,"onscript",vt.script),vt.script="")}ke.prototype={end:function(){rt(this)},write:mt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){me(this)}};var Pe;try{Pe=oe("stream").Stream}catch(vt){Pe=function(){}}var fe=ve.EVENTS.filter(function(vt){return vt!=="error"&&vt!=="end"});function z(vt,tt){return new te(vt,tt)}function te(vt,tt){if(!(this instanceof te))return new te(vt,tt);Pe.apply(this),this._parser=new ke(vt,tt),this.writable=!0,this.readable=!0;var He=this;this._parser.onend=function(){He.emit("end")},this._parser.onerror=function(we){He.emit("error",we),He._parser.error=null},this._decoder=null,fe.forEach(function(we){Object.defineProperty(He,"on"+we,{get:function(){return He._parser["on"+we]},set:function(Ne){if(!Ne)return He.removeAllListeners(we),He._parser["on"+we]=Ne,Ne;He.on(we,Ne)},enumerable:!0,configurable:!1})})}te.prototype=Object.create(Pe.prototype,{constructor:{value:te}}),te.prototype.write=function(vt){if(typeof de=="function"&&typeof de.isBuffer=="function"&&de.isBuffer(vt)){if(!this._decoder){var tt=oe("string_decoder").StringDecoder;this._decoder=new tt("utf8")}vt=this._decoder.write(vt)}return this._parser.write(vt.toString()),this.emit("data",vt),!0},te.prototype.end=function(vt){return vt&&vt.length&&this.write(vt),this._parser.end(),!0},te.prototype.on=function(vt,tt){var He=this;return!He._parser["on"+vt]&&fe.indexOf(vt)!==-1&&(He._parser["on"+vt]=function(){var we=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);we.splice(0,0,vt),He.emit.apply(He,we)}),Pe.prototype.on.call(He,vt,tt)};var se="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ce="http://www.w3.org/2000/xmlns/",pe={xml:le,xmlns:ce},xe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Te(vt){return vt===" "||vt===`
|
|
`||vt==="\r"||vt===" "}function Me(vt){return vt==='"'||vt==="'"}function Be(vt){return vt===">"||Te(vt)}function Ge(vt,tt){return vt.test(tt)}function Ye(vt,tt){return!Ge(vt,tt)}var Ke=0;ve.STATE={BEGIN:Ke++,BEGIN_WHITESPACE:Ke++,TEXT:Ke++,TEXT_ENTITY:Ke++,OPEN_WAKA:Ke++,SGML_DECL:Ke++,SGML_DECL_QUOTED:Ke++,DOCTYPE:Ke++,DOCTYPE_QUOTED:Ke++,DOCTYPE_DTD:Ke++,DOCTYPE_DTD_QUOTED:Ke++,COMMENT_STARTING:Ke++,COMMENT:Ke++,COMMENT_ENDING:Ke++,COMMENT_ENDED:Ke++,CDATA:Ke++,CDATA_ENDING:Ke++,CDATA_ENDING_2:Ke++,PROC_INST:Ke++,PROC_INST_BODY:Ke++,PROC_INST_ENDING:Ke++,OPEN_TAG:Ke++,OPEN_TAG_SLASH:Ke++,ATTRIB:Ke++,ATTRIB_NAME:Ke++,ATTRIB_NAME_SAW_WHITE:Ke++,ATTRIB_VALUE:Ke++,ATTRIB_VALUE_QUOTED:Ke++,ATTRIB_VALUE_CLOSED:Ke++,ATTRIB_VALUE_UNQUOTED:Ke++,ATTRIB_VALUE_ENTITY_Q:Ke++,ATTRIB_VALUE_ENTITY_U:Ke++,CLOSE_TAG:Ke++,CLOSE_TAG_SAW_WHITE:Ke++,SCRIPT:Ke++,SCRIPT_ENDING:Ke++},ve.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ve.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(ve.ENTITIES).forEach(function(vt){var tt=ve.ENTITIES[vt],He=typeof tt=="number"?String.fromCharCode(tt):tt;ve.ENTITIES[vt]=He});for(var Ve in ve.STATE)ve.STATE[ve.STATE[Ve]]=Ve;Ke=ve.STATE;function ot(vt,tt,He){vt[tt]&&vt[tt](He)}function ut(vt,tt,He){vt.textNode&&ft(vt),ot(vt,tt,He)}function ft(vt){vt.textNode=St(vt.opt,vt.textNode),vt.textNode&&ot(vt,"ontext",vt.textNode),vt.textNode=""}function St(vt,tt){return vt.trim&&(tt=tt.trim()),vt.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function Qe(vt,tt){return ft(vt),vt.trackPosition&&(tt+=`
|
|
Line: `+vt.line+`
|
|
Column: `+vt.column+`
|
|
Char: `+vt.c),tt=new Error(tt),vt.error=tt,ot(vt,"onerror",tt),vt}function rt(vt){return vt.sawRoot&&!vt.closedRoot&&wt(vt,"Unclosed root tag"),vt.state!==Ke.BEGIN&&vt.state!==Ke.BEGIN_WHITESPACE&&vt.state!==Ke.TEXT&&Qe(vt,"Unexpected end"),ft(vt),vt.c="",vt.closed=!0,ot(vt,"onend"),ke.call(vt,vt.strict,vt.opt),vt}function wt(vt,tt){if(typeof vt!="object"||!(vt instanceof ke))throw new Error("bad call to strictFail");vt.strict&&Qe(vt,tt)}function Ct(vt){vt.strict||(vt.tagName=vt.tagName[vt.looseCase]());var tt=vt.tags[vt.tags.length-1]||vt,He=vt.tag={name:vt.tagName,attributes:{}};vt.opt.xmlns&&(He.ns=tt.ns),vt.attribList.length=0,ut(vt,"onopentagstart",He)}function bt(vt,tt){var He=vt.indexOf(":"),we=He<0?["",vt]:vt.split(":"),Ne=we[0],Xe=we[1];return tt&&vt==="xmlns"&&(Ne="xmlns",Xe=""),{prefix:Ne,local:Xe}}function ct(vt){if(vt.strict||(vt.attribName=vt.attribName[vt.looseCase]()),vt.attribList.indexOf(vt.attribName)!==-1||vt.tag.attributes.hasOwnProperty(vt.attribName)){vt.attribName=vt.attribValue="";return}if(vt.opt.xmlns){var tt=bt(vt.attribName,!0),He=tt.prefix,we=tt.local;if(He==="xmlns")if(we==="xml"&&vt.attribValue!==le)wt(vt,"xml: prefix must be bound to "+le+`
|
|
Actual: `+vt.attribValue);else if(we==="xmlns"&&vt.attribValue!==ce)wt(vt,"xmlns: prefix must be bound to "+ce+`
|
|
Actual: `+vt.attribValue);else{var Ne=vt.tag,Xe=vt.tags[vt.tags.length-1]||vt;Ne.ns===Xe.ns&&(Ne.ns=Object.create(Xe.ns)),Ne.ns[we]=vt.attribValue}vt.attribList.push([vt.attribName,vt.attribValue])}else vt.tag.attributes[vt.attribName]=vt.attribValue,ut(vt,"onattribute",{name:vt.attribName,value:vt.attribValue});vt.attribName=vt.attribValue=""}function xt(vt,tt){if(vt.opt.xmlns){var He=vt.tag,we=bt(vt.tagName);He.prefix=we.prefix,He.local=we.local,He.uri=He.ns[we.prefix]||"",He.prefix&&!He.uri&&(wt(vt,"Unbound namespace prefix: "+JSON.stringify(vt.tagName)),He.uri=we.prefix);var Ne=vt.tags[vt.tags.length-1]||vt;He.ns&&Ne.ns!==He.ns&&Object.keys(He.ns).forEach(function(Ot){ut(vt,"onopennamespace",{prefix:Ot,uri:He.ns[Ot]})});for(var Xe=0,nt=vt.attribList.length;Xe<nt;Xe++){var Ie=vt.attribList[Xe],Re=Ie[0],Ze=Ie[1],et=bt(Re,!0),ht=et.prefix,at=et.local,Dt=ht===""?"":He.ns[ht]||"",Et={name:Re,value:Ze,prefix:ht,local:at,uri:Dt};ht&&ht!=="xmlns"&&!Dt&&(wt(vt,"Unbound namespace prefix: "+JSON.stringify(ht)),Et.uri=ht),vt.tag.attributes[Re]=Et,ut(vt,"onattribute",Et)}vt.attribList.length=0}vt.tag.isSelfClosing=!!tt,vt.sawRoot=!0,vt.tags.push(vt.tag),ut(vt,"onopentag",vt.tag),tt||(!vt.noscript&&vt.tagName.toLowerCase()==="script"?vt.state=Ke.SCRIPT:vt.state=Ke.TEXT,vt.tag=null,vt.tagName=""),vt.attribName=vt.attribValue="",vt.attribList.length=0}function dt(vt){if(!vt.tagName){wt(vt,"Weird empty close tag."),vt.textNode+="</>",vt.state=Ke.TEXT;return}if(vt.script){if(vt.tagName!=="script"){vt.script+="</"+vt.tagName+">",vt.tagName="",vt.state=Ke.SCRIPT;return}ut(vt,"onscript",vt.script),vt.script=""}var tt=vt.tags.length,He=vt.tagName;vt.strict||(He=He[vt.looseCase]());for(var we=He;tt--;){var Ne=vt.tags[tt];if(Ne.name!==we)wt(vt,"Unexpected close tag");else break}if(tt<0){wt(vt,"Unmatched closing tag: "+vt.tagName),vt.textNode+="</"+vt.tagName+">",vt.state=Ke.TEXT;return}vt.tagName=He;for(var Xe=vt.tags.length;Xe-- >tt;){var nt=vt.tag=vt.tags.pop();vt.tagName=vt.tag.name,ut(vt,"onclosetag",vt.tagName);var Ie={};for(var Re in nt.ns)Ie[Re]=nt.ns[Re];var Ze=vt.tags[vt.tags.length-1]||vt;vt.opt.xmlns&&nt.ns!==Ze.ns&&Object.keys(nt.ns).forEach(function(et){var ht=nt.ns[et];ut(vt,"onclosenamespace",{prefix:et,uri:ht})})}tt===0&&(vt.closedRoot=!0),vt.tagName=vt.attribValue=vt.attribName="",vt.attribList.length=0,vt.state=Ke.TEXT}function Mt(vt){var tt=vt.entity,He=tt.toLowerCase(),we,Ne="";return vt.ENTITIES[tt]?vt.ENTITIES[tt]:vt.ENTITIES[He]?vt.ENTITIES[He]:(tt=He,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),we=parseInt(tt,16),Ne=we.toString(16)):(tt=tt.slice(1),we=parseInt(tt,10),Ne=we.toString(10))),tt=tt.replace(/^0+/,""),isNaN(we)||Ne.toLowerCase()!==tt?(wt(vt,"Invalid character entity"),"&"+vt.entity+";"):String.fromCodePoint(we))}function yt(vt,tt){tt==="<"?(vt.state=Ke.OPEN_WAKA,vt.startTagPosition=vt.position):Te(tt)||(wt(vt,"Non-whitespace before first tag."),vt.textNode=tt,vt.state=Ke.TEXT)}function Ft(vt,tt){var He="";return tt<vt.length&&(He=vt.charAt(tt)),He}function mt(vt){var tt=this;if(this.error)throw this.error;if(tt.closed)return Qe(tt,"Cannot write after close. Assign an onready handler.");if(vt===null)return rt(tt);typeof vt=="object"&&(vt=vt.toString());for(var He=0,we="";we=Ft(vt,He++),tt.c=we,!!we;)switch(tt.trackPosition&&(tt.position++,we===`
|
|
`?(tt.line++,tt.column=0):tt.column++),tt.state){case Ke.BEGIN:if(tt.state=Ke.BEGIN_WHITESPACE,we==="\uFEFF")continue;yt(tt,we);continue;case Ke.BEGIN_WHITESPACE:yt(tt,we);continue;case Ke.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var Ne=He-1;we&&we!=="<"&&we!=="&";)we=Ft(vt,He++),we&&tt.trackPosition&&(tt.position++,we===`
|
|
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=vt.substring(Ne,He-1)}we==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=Ke.OPEN_WAKA,tt.startTagPosition=tt.position):(!Te(we)&&(!tt.sawRoot||tt.closedRoot)&&wt(tt,"Text data outside of root node."),we==="&"?tt.state=Ke.TEXT_ENTITY:tt.textNode+=we);continue;case Ke.SCRIPT:we==="<"?tt.state=Ke.SCRIPT_ENDING:tt.script+=we;continue;case Ke.SCRIPT_ENDING:we==="/"?tt.state=Ke.CLOSE_TAG:(tt.script+="<"+we,tt.state=Ke.SCRIPT);continue;case Ke.OPEN_WAKA:if(we==="!")tt.state=Ke.SGML_DECL,tt.sgmlDecl="";else if(!Te(we))if(Ge(xe,we))tt.state=Ke.OPEN_TAG,tt.tagName=we;else if(we==="/")tt.state=Ke.CLOSE_TAG,tt.tagName="";else if(we==="?")tt.state=Ke.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(wt(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var Xe=tt.position-tt.startTagPosition;we=new Array(Xe).join(" ")+we}tt.textNode+="<"+we,tt.state=Ke.TEXT}continue;case Ke.SGML_DECL:(tt.sgmlDecl+we).toUpperCase()===se?(ut(tt,"onopencdata"),tt.state=Ke.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+we==="--"?(tt.state=Ke.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+we).toUpperCase()===ie?(tt.state=Ke.DOCTYPE,(tt.doctype||tt.sawRoot)&&wt(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):we===">"?(ut(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=Ke.TEXT):(Me(we)&&(tt.state=Ke.SGML_DECL_QUOTED),tt.sgmlDecl+=we);continue;case Ke.SGML_DECL_QUOTED:we===tt.q&&(tt.state=Ke.SGML_DECL,tt.q=""),tt.sgmlDecl+=we;continue;case Ke.DOCTYPE:we===">"?(tt.state=Ke.TEXT,ut(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=we,we==="["?tt.state=Ke.DOCTYPE_DTD:Me(we)&&(tt.state=Ke.DOCTYPE_QUOTED,tt.q=we));continue;case Ke.DOCTYPE_QUOTED:tt.doctype+=we,we===tt.q&&(tt.q="",tt.state=Ke.DOCTYPE);continue;case Ke.DOCTYPE_DTD:tt.doctype+=we,we==="]"?tt.state=Ke.DOCTYPE:Me(we)&&(tt.state=Ke.DOCTYPE_DTD_QUOTED,tt.q=we);continue;case Ke.DOCTYPE_DTD_QUOTED:tt.doctype+=we,we===tt.q&&(tt.state=Ke.DOCTYPE_DTD,tt.q="");continue;case Ke.COMMENT:we==="-"?tt.state=Ke.COMMENT_ENDING:tt.comment+=we;continue;case Ke.COMMENT_ENDING:we==="-"?(tt.state=Ke.COMMENT_ENDED,tt.comment=St(tt.opt,tt.comment),tt.comment&&ut(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+we,tt.state=Ke.COMMENT);continue;case Ke.COMMENT_ENDED:we!==">"?(wt(tt,"Malformed comment"),tt.comment+="--"+we,tt.state=Ke.COMMENT):tt.state=Ke.TEXT;continue;case Ke.CDATA:we==="]"?tt.state=Ke.CDATA_ENDING:tt.cdata+=we;continue;case Ke.CDATA_ENDING:we==="]"?tt.state=Ke.CDATA_ENDING_2:(tt.cdata+="]"+we,tt.state=Ke.CDATA);continue;case Ke.CDATA_ENDING_2:we===">"?(tt.cdata&&ut(tt,"oncdata",tt.cdata),ut(tt,"onclosecdata"),tt.cdata="",tt.state=Ke.TEXT):we==="]"?tt.cdata+="]":(tt.cdata+="]]"+we,tt.state=Ke.CDATA);continue;case Ke.PROC_INST:we==="?"?tt.state=Ke.PROC_INST_ENDING:Te(we)?tt.state=Ke.PROC_INST_BODY:tt.procInstName+=we;continue;case Ke.PROC_INST_BODY:if(!tt.procInstBody&&Te(we))continue;we==="?"?tt.state=Ke.PROC_INST_ENDING:tt.procInstBody+=we;continue;case Ke.PROC_INST_ENDING:we===">"?(ut(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=Ke.TEXT):(tt.procInstBody+="?"+we,tt.state=Ke.PROC_INST_BODY);continue;case Ke.OPEN_TAG:Ge(je,we)?tt.tagName+=we:(Ct(tt),we===">"?xt(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:(Te(we)||wt(tt,"Invalid character in tag name"),tt.state=Ke.ATTRIB));continue;case Ke.OPEN_TAG_SLASH:we===">"?(xt(tt,!0),dt(tt)):(wt(tt,"Forward-slash in opening tag not followed by >"),tt.state=Ke.ATTRIB);continue;case Ke.ATTRIB:if(Te(we))continue;we===">"?xt(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?(tt.attribName=we,tt.attribValue="",tt.state=Ke.ATTRIB_NAME):wt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_NAME:we==="="?tt.state=Ke.ATTRIB_VALUE:we===">"?(wt(tt,"Attribute without value"),tt.attribValue=tt.attribName,ct(tt),xt(tt)):Te(we)?tt.state=Ke.ATTRIB_NAME_SAW_WHITE:Ge(je,we)?tt.attribName+=we:wt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_NAME_SAW_WHITE:if(we==="=")tt.state=Ke.ATTRIB_VALUE;else{if(Te(we))continue;wt(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",ut(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",we===">"?xt(tt):Ge(xe,we)?(tt.attribName=we,tt.state=Ke.ATTRIB_NAME):(wt(tt,"Invalid attribute name"),tt.state=Ke.ATTRIB)}continue;case Ke.ATTRIB_VALUE:if(Te(we))continue;Me(we)?(tt.q=we,tt.state=Ke.ATTRIB_VALUE_QUOTED):(wt(tt,"Unquoted attribute value"),tt.state=Ke.ATTRIB_VALUE_UNQUOTED,tt.attribValue=we);continue;case Ke.ATTRIB_VALUE_QUOTED:if(we!==tt.q){we==="&"?tt.state=Ke.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=we;continue}ct(tt),tt.q="",tt.state=Ke.ATTRIB_VALUE_CLOSED;continue;case Ke.ATTRIB_VALUE_CLOSED:Te(we)?tt.state=Ke.ATTRIB:we===">"?xt(tt):we==="/"?tt.state=Ke.OPEN_TAG_SLASH:Ge(xe,we)?(wt(tt,"No whitespace between attributes"),tt.attribName=we,tt.attribValue="",tt.state=Ke.ATTRIB_NAME):wt(tt,"Invalid attribute name");continue;case Ke.ATTRIB_VALUE_UNQUOTED:if(!Be(we)){we==="&"?tt.state=Ke.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=we;continue}ct(tt),we===">"?xt(tt):tt.state=Ke.ATTRIB;continue;case Ke.CLOSE_TAG:if(tt.tagName)we===">"?dt(tt):Ge(je,we)?tt.tagName+=we:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=Ke.SCRIPT):(Te(we)||wt(tt,"Invalid tagname in closing tag"),tt.state=Ke.CLOSE_TAG_SAW_WHITE);else{if(Te(we))continue;Ye(xe,we)?tt.script?(tt.script+="</"+we,tt.state=Ke.SCRIPT):wt(tt,"Invalid tagname in closing tag."):tt.tagName=we}continue;case Ke.CLOSE_TAG_SAW_WHITE:if(Te(we))continue;we===">"?dt(tt):wt(tt,"Invalid characters in closing tag");continue;case Ke.TEXT_ENTITY:case Ke.ATTRIB_VALUE_ENTITY_Q:case Ke.ATTRIB_VALUE_ENTITY_U:var nt,Ie;switch(tt.state){case Ke.TEXT_ENTITY:nt=Ke.TEXT,Ie="textNode";break;case Ke.ATTRIB_VALUE_ENTITY_Q:nt=Ke.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case Ke.ATTRIB_VALUE_ENTITY_U:nt=Ke.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}we===";"?(tt[Ie]+=Mt(tt),tt.entity="",tt.state=nt):Ge(tt.entity.length?Fe:De,we)?tt.entity+=we:(wt(tt,"Invalid character in entity name"),tt[Ie]+="&"+tt.entity+we,tt.entity="",tt.state=nt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&Se(tt),tt}String.fromCodePoint||function(){var vt=String.fromCharCode,tt=Math.floor,He=function(){var we=16384,Ne=[],Xe,nt,Ie=-1,Re=arguments.length;if(!Re)return"";for(var Ze="";++Ie<Re;){var et=Number(arguments[Ie]);if(!isFinite(et)||et<0||et>1114111||tt(et)!==et)throw RangeError("Invalid code point: "+et);et<=65535?Ne.push(et):(et-=65536,Xe=(et>>10)+55296,nt=et%1024+56320,Ne.push(Xe,nt)),(Ie+1===Re||Ne.length>we)&&(Ze+=vt.apply(null,Ne),Ne.length=0)}return Ze};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:He,configurable:!0,writable:!0}):String.fromCodePoint=He}()})(typeof _e=="undefined"?this.sax={}:_e)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,Ue,_e){Ue.exports=Ee;var de=oe("events").EventEmitter,ve=oe("inherits");ve(Ee,de),Ee.Readable=oe("readable-stream/lib/_stream_readable.js"),Ee.Writable=oe("readable-stream/lib/_stream_writable.js"),Ee.Duplex=oe("readable-stream/lib/_stream_duplex.js"),Ee.Transform=oe("readable-stream/lib/_stream_transform.js"),Ee.PassThrough=oe("readable-stream/lib/_stream_passthrough.js"),Ee.finished=oe("readable-stream/lib/internal/streams/end-of-stream.js"),Ee.pipeline=oe("readable-stream/lib/internal/streams/pipeline.js"),Ee.Stream=Ee;function Ee(){de.call(this)}Ee.prototype.pipe=function(ke,Se){var Ae=this;function me(le){ke.writable&&ke.write(le)===!1&&Ae.pause&&Ae.pause()}Ae.on("data",me);function Pe(){Ae.readable&&Ae.resume&&Ae.resume()}ke.on("drain",Pe),!ke._isStdio&&(!Se||Se.end!==!1)&&(Ae.on("end",z),Ae.on("close",te));var fe=!1;function z(){fe||(fe=!0,ke.end())}function te(){fe||(fe=!0,typeof ke.destroy=="function"&&ke.destroy())}function se(le){if(ie(),de.listenerCount(this,"error")===0)throw le}Ae.on("error",se),ke.on("error",se);function ie(){Ae.removeListener("data",me),ke.removeListener("drain",Pe),Ae.removeListener("end",z),Ae.removeListener("close",te),Ae.removeListener("error",se),ke.removeListener("error",se),Ae.removeListener("end",ie),Ae.removeListener("close",ie),ke.removeListener("close",ie)}return Ae.on("end",ie),Ae.on("close",ie),ke.on("close",ie),ke.emit("pipe",Ae),ke}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(oe,Ue,_e){"use strict";function de(Pe,fe){Pe.prototype=Object.create(fe.prototype),Pe.prototype.constructor=Pe,Pe.__proto__=fe}var ve={};function Ee(Pe,fe,z){z||(z=Error);function te(ie,le,ce){return typeof fe=="string"?fe:fe(ie,le,ce)}var se=function(ie){de(le,ie);function le(ce,pe,xe){return ie.call(this,te(ce,pe,xe))||this}return le}(z);se.prototype.name=z.name,se.prototype.code=Pe,ve[Pe]=se}function ke(Pe,fe){if(Array.isArray(Pe)){var z=Pe.length;return Pe=Pe.map(function(te){return String(te)}),z>2?"one of ".concat(fe," ").concat(Pe.slice(0,z-1).join(", "),", or ")+Pe[z-1]:z===2?"one of ".concat(fe," ").concat(Pe[0]," or ").concat(Pe[1]):"of ".concat(fe," ").concat(Pe[0])}else return"of ".concat(fe," ").concat(String(Pe))}function Se(Pe,fe,z){return Pe.substr(!z||z<0?0:+z,fe.length)===fe}function Ae(Pe,fe,z){return(z===void 0||z>Pe.length)&&(z=Pe.length),Pe.substring(z-fe.length,z)===fe}function me(Pe,fe,z){return typeof z!="number"&&(z=0),z+fe.length>Pe.length?!1:Pe.indexOf(fe,z)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(Pe,fe){return'The value "'+fe+'" is invalid for option "'+Pe+'"'},TypeError),Ee("ERR_INVALID_ARG_TYPE",function(Pe,fe,z){var te;typeof fe=="string"&&Se(fe,"not ")?(te="must not be",fe=fe.replace(/^not /,"")):te="must be";var se;if(Ae(Pe," argument"))se="The ".concat(Pe," ").concat(te," ").concat(ke(fe,"type"));else{var ie=me(Pe,".")?"property":"argument";se='The "'.concat(Pe,'" ').concat(ie," ").concat(te," ").concat(ke(fe,"type"))}return se+=". Received type ".concat(typeof z),se},TypeError),Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Ee("ERR_METHOD_NOT_IMPLEMENTED",function(Pe){return"The "+Pe+" method is not implemented"}),Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ee("ERR_STREAM_DESTROYED",function(Pe){return"Cannot call "+Pe+" after a stream was destroyed"}),Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Ee("ERR_STREAM_WRITE_AFTER_END","write after end"),Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Ee("ERR_UNKNOWN_ENCODING",function(Pe){return"Unknown encoding: "+Pe},TypeError),Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ue.exports.codes=ve},{}],400:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=Object.keys||function(te){var se=[];for(var ie in te)se.push(ie);return se};Ue.exports=Pe;var Ee=oe("./_stream_readable"),ke=oe("./_stream_writable");oe("inherits")(Pe,Ee);for(var Se=ve(ke.prototype),Ae=0;Ae<Se.length;Ae++){var me=Se[Ae];Pe.prototype[me]||(Pe.prototype[me]=ke.prototype[me])}function Pe(te){if(!(this instanceof Pe))return new Pe(te);Ee.call(this,te),ke.call(this,te),this.allowHalfOpen=!0,te&&(te.readable===!1&&(this.readable=!1),te.writable===!1&&(this.writable=!1),te.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",fe)))}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fe(){this._writableState.ended||de.nextTick(z,this)}function z(te){te.end()}Object.defineProperty(Pe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(se){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=se,this._writableState.destroyed=se)}})}).call(this)}).call(this,oe("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(oe,Ue,_e){"use strict";Ue.exports=ve;var de=oe("./_stream_transform");oe("inherits")(ve,de);function ve(Ee){if(!(this instanceof ve))return new ve(Ee);de.call(this,Ee)}ve.prototype._transform=function(Ee,ke,Se){Se(null,Ee)}},{"./_stream_transform":403,inherits:364}],402:[function(oe,Ue,_e){(function(de,ve){(function(){"use strict";Ue.exports=ut;var Ee;ut.ReadableState=ot;var ke=oe("events").EventEmitter,Se=function(Re,Ze){return Re.listeners(Ze).length},Ae=oe("./internal/streams/stream"),me=oe("buffer").Buffer,Pe=(typeof ve!="undefined"?ve:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fe(Ie){return me.from(Ie)}function z(Ie){return me.isBuffer(Ie)||Ie instanceof Pe}var te=oe("util"),se;te&&te.debuglog?se=te.debuglog("stream"):se=function(){};var ie=oe("./internal/streams/buffer_list"),le=oe("./internal/streams/destroy"),ce=oe("./internal/streams/state"),pe=ce.getHighWaterMark,xe=oe("../errors").codes,je=xe.ERR_INVALID_ARG_TYPE,De=xe.ERR_STREAM_PUSH_AFTER_EOF,Fe=xe.ERR_METHOD_NOT_IMPLEMENTED,Te=xe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Me,Be,Ge;oe("inherits")(ut,Ae);var Ye=le.errorOrDestroy,Ke=["error","close","destroy","pause","resume"];function Ve(Ie,Re,Ze){if(typeof Ie.prependListener=="function")return Ie.prependListener(Re,Ze);!Ie._events||!Ie._events[Re]?Ie.on(Re,Ze):Array.isArray(Ie._events[Re])?Ie._events[Re].unshift(Ze):Ie._events[Re]=[Ze,Ie._events[Re]]}function ot(Ie,Re,Ze){Ee=Ee||oe("./_stream_duplex"),Ie=Ie||{},typeof Ze!="boolean"&&(Ze=Re instanceof Ee),this.objectMode=!!Ie.objectMode,Ze&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=pe(this,Ie,"readableHighWaterMark",Ze),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ie.emitClose!==!1,this.autoDestroy=!!Ie.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ie.encoding&&(Me||(Me=oe("string_decoder/").StringDecoder),this.decoder=new Me(Ie.encoding),this.encoding=Ie.encoding)}function ut(Ie){if(Ee=Ee||oe("./_stream_duplex"),!(this instanceof ut))return new ut(Ie);var Re=this instanceof Ee;this._readableState=new ot(Ie,this,Re),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.destroy)),Ae.call(this)}Object.defineProperty(ut.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Re){this._readableState&&(this._readableState.destroyed=Re)}}),ut.prototype.destroy=le.destroy,ut.prototype._undestroy=le.undestroy,ut.prototype._destroy=function(Ie,Re){Re(Ie)},ut.prototype.push=function(Ie,Re){var Ze=this._readableState,et;return Ze.objectMode?et=!0:typeof Ie=="string"&&(Re=Re||Ze.defaultEncoding,Re!==Ze.encoding&&(Ie=me.from(Ie,Re),Re=""),et=!0),ft(this,Ie,Re,!1,et)},ut.prototype.unshift=function(Ie){return ft(this,Ie,null,!0,!1)};function ft(Ie,Re,Ze,et,ht){se("readableAddChunk",Re);var at=Ie._readableState;if(Re===null)at.reading=!1,bt(Ie,at);else{var Dt;if(ht||(Dt=Qe(at,Re)),Dt)Ye(Ie,Dt);else if(at.objectMode||Re&&Re.length>0)if(typeof Re!="string"&&!at.objectMode&&Object.getPrototypeOf(Re)!==me.prototype&&(Re=fe(Re)),et)at.endEmitted?Ye(Ie,new Te):St(Ie,at,Re,!0);else if(at.ended)Ye(Ie,new De);else{if(at.destroyed)return!1;at.reading=!1,at.decoder&&!Ze?(Re=at.decoder.write(Re),at.objectMode||Re.length!==0?St(Ie,at,Re,!1):dt(Ie,at)):St(Ie,at,Re,!1)}else et||(at.reading=!1,dt(Ie,at))}return!at.ended&&(at.length<at.highWaterMark||at.length===0)}function St(Ie,Re,Ze,et){Re.flowing&&Re.length===0&&!Re.sync?(Re.awaitDrain=0,Ie.emit("data",Ze)):(Re.length+=Re.objectMode?1:Ze.length,et?Re.buffer.unshift(Ze):Re.buffer.push(Ze),Re.needReadable&&ct(Ie)),dt(Ie,Re)}function Qe(Ie,Re){var Ze;return!z(Re)&&typeof Re!="string"&&Re!==void 0&&!Ie.objectMode&&(Ze=new je("chunk",["string","Buffer","Uint8Array"],Re)),Ze}ut.prototype.isPaused=function(){return this._readableState.flowing===!1},ut.prototype.setEncoding=function(Ie){Me||(Me=oe("string_decoder/").StringDecoder);var Re=new Me(Ie);this._readableState.decoder=Re,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ze=this._readableState.buffer.head,et="";Ze!==null;)et+=Re.write(Ze.data),Ze=Ze.next;return this._readableState.buffer.clear(),et!==""&&this._readableState.buffer.push(et),this._readableState.length=et.length,this};var rt=1073741824;function wt(Ie){return Ie>=rt?Ie=rt:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function Ct(Ie,Re){return Ie<=0||Re.length===0&&Re.ended?0:Re.objectMode?1:Ie!==Ie?Re.flowing&&Re.length?Re.buffer.head.data.length:Re.length:(Ie>Re.highWaterMark&&(Re.highWaterMark=wt(Ie)),Ie<=Re.length?Ie:Re.ended?Re.length:(Re.needReadable=!0,0))}ut.prototype.read=function(Ie){se("read",Ie),Ie=parseInt(Ie,10);var Re=this._readableState,Ze=Ie;if(Ie!==0&&(Re.emittedReadable=!1),Ie===0&&Re.needReadable&&((Re.highWaterMark!==0?Re.length>=Re.highWaterMark:Re.length>0)||Re.ended))return se("read: emitReadable",Re.length,Re.ended),Re.length===0&&Re.ended?Ne(this):ct(this),null;if(Ie=Ct(Ie,Re),Ie===0&&Re.ended)return Re.length===0&&Ne(this),null;var et=Re.needReadable;se("need readable",et),(Re.length===0||Re.length-Ie<Re.highWaterMark)&&(et=!0,se("length less than watermark",et)),Re.ended||Re.reading?(et=!1,se("reading or ended",et)):et&&(se("do read"),Re.reading=!0,Re.sync=!0,Re.length===0&&(Re.needReadable=!0),this._read(Re.highWaterMark),Re.sync=!1,Re.reading||(Ie=Ct(Ze,Re)));var ht;return Ie>0?ht=we(Ie,Re):ht=null,ht===null?(Re.needReadable=Re.length<=Re.highWaterMark,Ie=0):(Re.length-=Ie,Re.awaitDrain=0),Re.length===0&&(Re.ended||(Re.needReadable=!0),Ze!==Ie&&Re.ended&&Ne(this)),ht!==null&&this.emit("data",ht),ht};function bt(Ie,Re){if(se("onEofChunk"),!Re.ended){if(Re.decoder){var Ze=Re.decoder.end();Ze&&Ze.length&&(Re.buffer.push(Ze),Re.length+=Re.objectMode?1:Ze.length)}Re.ended=!0,Re.sync?ct(Ie):(Re.needReadable=!1,Re.emittedReadable||(Re.emittedReadable=!0,xt(Ie)))}}function ct(Ie){var Re=Ie._readableState;se("emitReadable",Re.needReadable,Re.emittedReadable),Re.needReadable=!1,Re.emittedReadable||(se("emitReadable",Re.flowing),Re.emittedReadable=!0,de.nextTick(xt,Ie))}function xt(Ie){var Re=Ie._readableState;se("emitReadable_",Re.destroyed,Re.length,Re.ended),!Re.destroyed&&(Re.length||Re.ended)&&(Ie.emit("readable"),Re.emittedReadable=!1),Re.needReadable=!Re.flowing&&!Re.ended&&Re.length<=Re.highWaterMark,He(Ie)}function dt(Ie,Re){Re.readingMore||(Re.readingMore=!0,de.nextTick(Mt,Ie,Re))}function Mt(Ie,Re){for(;!Re.reading&&!Re.ended&&(Re.length<Re.highWaterMark||Re.flowing&&Re.length===0);){var Ze=Re.length;if(se("maybeReadMore read 0"),Ie.read(0),Ze===Re.length)break}Re.readingMore=!1}ut.prototype._read=function(Ie){Ye(this,new Fe("_read()"))},ut.prototype.pipe=function(Ie,Re){var Ze=this,et=this._readableState;switch(et.pipesCount){case 0:et.pipes=Ie;break;case 1:et.pipes=[et.pipes,Ie];break;default:et.pipes.push(Ie);break}et.pipesCount+=1,se("pipe count=%d opts=%j",et.pipesCount,Re);var ht=(!Re||Re.end!==!1)&&Ie!==de.stdout&&Ie!==de.stderr,at=ht?Et:cn;et.endEmitted?de.nextTick(at):Ze.once("end",at),Ie.on("unpipe",Dt);function Dt(bn,xn){se("onunpipe"),bn===Ze&&xn&&xn.hasUnpiped===!1&&(xn.hasUnpiped=!0,Qt())}function Et(){se("onend"),Ie.end()}var Ot=yt(Ze);Ie.on("drain",Ot);var qt=!1;function Qt(){se("cleanup"),Ie.removeListener("close",un),Ie.removeListener("finish",on),Ie.removeListener("drain",Ot),Ie.removeListener("error",Wt),Ie.removeListener("unpipe",Dt),Ze.removeListener("end",Et),Ze.removeListener("end",cn),Ze.removeListener("data",Xt),qt=!0,et.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&Ot()}Ze.on("data",Xt);function Xt(bn){se("ondata");var xn=Ie.write(bn);se("dest.write",xn),xn===!1&&((et.pipesCount===1&&et.pipes===Ie||et.pipesCount>1&&nt(et.pipes,Ie)!==-1)&&!qt&&(se("false write response, pause",et.awaitDrain),et.awaitDrain++),Ze.pause())}function Wt(bn){se("onerror",bn),cn(),Ie.removeListener("error",Wt),Se(Ie,"error")===0&&Ye(Ie,bn)}Ve(Ie,"error",Wt);function un(){Ie.removeListener("finish",on),cn()}Ie.once("close",un);function on(){se("onfinish"),Ie.removeListener("close",un),cn()}Ie.once("finish",on);function cn(){se("unpipe"),Ze.unpipe(Ie)}return Ie.emit("pipe",Ze),et.flowing||(se("pipe resume"),Ze.resume()),Ie};function yt(Ie){return function(){var Ze=Ie._readableState;se("pipeOnDrain",Ze.awaitDrain),Ze.awaitDrain&&Ze.awaitDrain--,Ze.awaitDrain===0&&Se(Ie,"data")&&(Ze.flowing=!0,He(Ie))}}ut.prototype.unpipe=function(Ie){var Re=this._readableState,Ze={hasUnpiped:!1};if(Re.pipesCount===0)return this;if(Re.pipesCount===1)return Ie&&Ie!==Re.pipes?this:(Ie||(Ie=Re.pipes),Re.pipes=null,Re.pipesCount=0,Re.flowing=!1,Ie&&Ie.emit("unpipe",this,Ze),this);if(!Ie){var et=Re.pipes,ht=Re.pipesCount;Re.pipes=null,Re.pipesCount=0,Re.flowing=!1;for(var at=0;at<ht;at++)et[at].emit("unpipe",this,{hasUnpiped:!1});return this}var Dt=nt(Re.pipes,Ie);return Dt===-1?this:(Re.pipes.splice(Dt,1),Re.pipesCount-=1,Re.pipesCount===1&&(Re.pipes=Re.pipes[0]),Ie.emit("unpipe",this,Ze),this)},ut.prototype.on=function(Ie,Re){var Ze=Ae.prototype.on.call(this,Ie,Re),et=this._readableState;return Ie==="data"?(et.readableListening=this.listenerCount("readable")>0,et.flowing!==!1&&this.resume()):Ie==="readable"&&!et.endEmitted&&!et.readableListening&&(et.readableListening=et.needReadable=!0,et.flowing=!1,et.emittedReadable=!1,se("on readable",et.length,et.reading),et.length?ct(this):et.reading||de.nextTick(mt,this)),Ze},ut.prototype.addListener=ut.prototype.on,ut.prototype.removeListener=function(Ie,Re){var Ze=Ae.prototype.removeListener.call(this,Ie,Re);return Ie==="readable"&&de.nextTick(Ft,this),Ze},ut.prototype.removeAllListeners=function(Ie){var Re=Ae.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&de.nextTick(Ft,this),Re};function Ft(Ie){var Re=Ie._readableState;Re.readableListening=Ie.listenerCount("readable")>0,Re.resumeScheduled&&!Re.paused?Re.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function mt(Ie){se("readable nexttick read 0"),Ie.read(0)}ut.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(se("resume"),Ie.flowing=!Ie.readableListening,vt(this,Ie)),Ie.paused=!1,this};function vt(Ie,Re){Re.resumeScheduled||(Re.resumeScheduled=!0,de.nextTick(tt,Ie,Re))}function tt(Ie,Re){se("resume",Re.reading),Re.reading||Ie.read(0),Re.resumeScheduled=!1,Ie.emit("resume"),He(Ie),Re.flowing&&!Re.reading&&Ie.read(0)}ut.prototype.pause=function(){return se("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(se("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function He(Ie){var Re=Ie._readableState;for(se("flow",Re.flowing);Re.flowing&&Ie.read()!==null;);}ut.prototype.wrap=function(Ie){var Re=this,Ze=this._readableState,et=!1;Ie.on("end",function(){if(se("wrapped end"),Ze.decoder&&!Ze.ended){var Dt=Ze.decoder.end();Dt&&Dt.length&&Re.push(Dt)}Re.push(null)}),Ie.on("data",function(Dt){if(se("wrapped data"),Ze.decoder&&(Dt=Ze.decoder.write(Dt)),!(Ze.objectMode&&Dt==null)&&!(!Ze.objectMode&&(!Dt||!Dt.length))){var Et=Re.push(Dt);Et||(et=!0,Ie.pause())}});for(var ht in Ie)this[ht]===void 0&&typeof Ie[ht]=="function"&&(this[ht]=function(Et){return function(){return Ie[Et].apply(Ie,arguments)}}(ht));for(var at=0;at<Ke.length;at++)Ie.on(Ke[at],this.emit.bind(this,Ke[at]));return this._read=function(Dt){se("wrapped _read",Dt),et&&(et=!1,Ie.resume())},this},typeof Symbol=="function"&&(ut.prototype[Symbol.asyncIterator]=function(){return Be===void 0&&(Be=oe("./internal/streams/async_iterator")),Be(this)}),Object.defineProperty(ut.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ut.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ut.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Re){this._readableState&&(this._readableState.flowing=Re)}}),ut._fromList=we,Object.defineProperty(ut.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function we(Ie,Re){if(Re.length===0)return null;var Ze;return Re.objectMode?Ze=Re.buffer.shift():!Ie||Ie>=Re.length?(Re.decoder?Ze=Re.buffer.join(""):Re.buffer.length===1?Ze=Re.buffer.first():Ze=Re.buffer.concat(Re.length),Re.buffer.clear()):Ze=Re.buffer.consume(Ie,Re.decoder),Ze}function Ne(Ie){var Re=Ie._readableState;se("endReadable",Re.endEmitted),Re.endEmitted||(Re.ended=!0,de.nextTick(Xe,Re,Ie))}function Xe(Ie,Re){if(se("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,Re.readable=!1,Re.emit("end"),Ie.autoDestroy)){var Ze=Re._writableState;(!Ze||Ze.autoDestroy&&Ze.finished)&&Re.destroy()}}typeof Symbol=="function"&&(ut.from=function(Ie,Re){return Ge===void 0&&(Ge=oe("./internal/streams/from")),Ge(ut,Ie,Re)});function nt(Ie,Re){for(var Ze=0,et=Ie.length;Ze<et;Ze++)if(Ie[Ze]===Re)return Ze;return-1}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(oe,Ue,_e){"use strict";Ue.exports=Pe;var de=oe("../errors").codes,ve=de.ERR_METHOD_NOT_IMPLEMENTED,Ee=de.ERR_MULTIPLE_CALLBACK,ke=de.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=de.ERR_TRANSFORM_WITH_LENGTH_0,Ae=oe("./_stream_duplex");oe("inherits")(Pe,Ae);function me(te,se){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new Ee);ie.writechunk=null,ie.writecb=null,se!=null&&this.push(se),le(te);var ce=this._readableState;ce.reading=!1,(ce.needReadable||ce.length<ce.highWaterMark)&&this._read(ce.highWaterMark)}function Pe(te){if(!(this instanceof Pe))return new Pe(te);Ae.call(this,te),this._transformState={afterTransform:me.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,te&&(typeof te.transform=="function"&&(this._transform=te.transform),typeof te.flush=="function"&&(this._flush=te.flush)),this.on("prefinish",fe)}function fe(){var te=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(se,ie){z(te,se,ie)}):z(this,null,null)}Pe.prototype.push=function(te,se){return this._transformState.needTransform=!1,Ae.prototype.push.call(this,te,se)},Pe.prototype._transform=function(te,se,ie){ie(new ve("_transform()"))},Pe.prototype._write=function(te,se,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=te,le.writeencoding=se,!le.transforming){var ce=this._readableState;(le.needTransform||ce.needReadable||ce.length<ce.highWaterMark)&&this._read(ce.highWaterMark)}},Pe.prototype._read=function(te){var se=this._transformState;se.writechunk!==null&&!se.transforming?(se.transforming=!0,this._transform(se.writechunk,se.writeencoding,se.afterTransform)):se.needTransform=!0},Pe.prototype._destroy=function(te,se){Ae.prototype._destroy.call(this,te,function(ie){se(ie)})};function z(te,se,ie){if(se)return te.emit("error",se);if(ie!=null&&te.push(ie),te._writableState.length)throw new Se;if(te._transformState.transforming)throw new ke;return te.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,Ue,_e){(function(de,ve){(function(){"use strict";Ue.exports=ot;function Ee(He,we,Ne){this.chunk=He,this.encoding=we,this.callback=Ne,this.next=null}function ke(He){var we=this;this.next=null,this.entry=null,this.finish=function(){tt(we,He)}}var Se;ot.WritableState=Ke;var Ae={deprecate:oe("util-deprecate")},me=oe("./internal/streams/stream"),Pe=oe("buffer").Buffer,fe=(typeof ve!="undefined"?ve:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(He){return Pe.from(He)}function te(He){return Pe.isBuffer(He)||He instanceof fe}var se=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,ce=oe("../errors").codes,pe=ce.ERR_INVALID_ARG_TYPE,xe=ce.ERR_METHOD_NOT_IMPLEMENTED,je=ce.ERR_MULTIPLE_CALLBACK,De=ce.ERR_STREAM_CANNOT_PIPE,Fe=ce.ERR_STREAM_DESTROYED,Te=ce.ERR_STREAM_NULL_VALUES,Me=ce.ERR_STREAM_WRITE_AFTER_END,Be=ce.ERR_UNKNOWN_ENCODING,Ge=se.errorOrDestroy;oe("inherits")(ot,me);function Ye(){}function Ke(He,we,Ne){Se=Se||oe("./_stream_duplex"),He=He||{},typeof Ne!="boolean"&&(Ne=we instanceof Se),this.objectMode=!!He.objectMode,Ne&&(this.objectMode=this.objectMode||!!He.writableObjectMode),this.highWaterMark=le(this,He,"writableHighWaterMark",Ne),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xe=He.decodeStrings===!1;this.decodeStrings=!Xe,this.defaultEncoding=He.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){bt(we,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=He.emitClose!==!1,this.autoDestroy=!!He.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new ke(this)}Ke.prototype.getBuffer=function(){for(var we=this.bufferedRequest,Ne=[];we;)Ne.push(we),we=we.next;return Ne},function(){try{Object.defineProperty(Ke.prototype,"buffer",{get:Ae.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(He){}}();var Ve;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ve=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(we){return Ve.call(this,we)?!0:this!==ot?!1:we&&we._writableState instanceof Ke}})):Ve=function(we){return we instanceof this};function ot(He){Se=Se||oe("./_stream_duplex");var we=this instanceof Se;if(!we&&!Ve.call(ot,this))return new ot(He);this._writableState=new Ke(He,this,we),this.writable=!0,He&&(typeof He.write=="function"&&(this._write=He.write),typeof He.writev=="function"&&(this._writev=He.writev),typeof He.destroy=="function"&&(this._destroy=He.destroy),typeof He.final=="function"&&(this._final=He.final)),me.call(this)}ot.prototype.pipe=function(){Ge(this,new De)};function ut(He,we){var Ne=new Me;Ge(He,Ne),de.nextTick(we,Ne)}function ft(He,we,Ne,Xe){var nt;return Ne===null?nt=new Te:typeof Ne!="string"&&!we.objectMode&&(nt=new pe("chunk",["string","Buffer"],Ne)),nt?(Ge(He,nt),de.nextTick(Xe,nt),!1):!0}ot.prototype.write=function(He,we,Ne){var Xe=this._writableState,nt=!1,Ie=!Xe.objectMode&&te(He);return Ie&&!Pe.isBuffer(He)&&(He=z(He)),typeof we=="function"&&(Ne=we,we=null),Ie?we="buffer":we||(we=Xe.defaultEncoding),typeof Ne!="function"&&(Ne=Ye),Xe.ending?ut(this,Ne):(Ie||ft(this,Xe,He,Ne))&&(Xe.pendingcb++,nt=Qe(this,Xe,Ie,He,we,Ne)),nt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var He=this._writableState;He.corked&&(He.corked--,!He.writing&&!He.corked&&!He.bufferProcessing&&He.bufferedRequest&&dt(this,He))},ot.prototype.setDefaultEncoding=function(we){if(typeof we=="string"&&(we=we.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((we+"").toLowerCase())>-1))throw new Be(we);return this._writableState.defaultEncoding=we,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function St(He,we,Ne){return!He.objectMode&&He.decodeStrings!==!1&&typeof we=="string"&&(we=Pe.from(we,Ne)),we}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Qe(He,we,Ne,Xe,nt,Ie){if(!Ne){var Re=St(we,Xe,nt);Xe!==Re&&(Ne=!0,nt="buffer",Xe=Re)}var Ze=we.objectMode?1:Xe.length;we.length+=Ze;var et=we.length<we.highWaterMark;if(et||(we.needDrain=!0),we.writing||we.corked){var ht=we.lastBufferedRequest;we.lastBufferedRequest={chunk:Xe,encoding:nt,isBuf:Ne,callback:Ie,next:null},ht?ht.next=we.lastBufferedRequest:we.bufferedRequest=we.lastBufferedRequest,we.bufferedRequestCount+=1}else rt(He,we,!1,Ze,Xe,nt,Ie);return et}function rt(He,we,Ne,Xe,nt,Ie,Re){we.writelen=Xe,we.writecb=Re,we.writing=!0,we.sync=!0,we.destroyed?we.onwrite(new Fe("write")):Ne?He._writev(nt,we.onwrite):He._write(nt,Ie,we.onwrite),we.sync=!1}function wt(He,we,Ne,Xe,nt){--we.pendingcb,Ne?(de.nextTick(nt,Xe),de.nextTick(mt,He,we),He._writableState.errorEmitted=!0,Ge(He,Xe)):(nt(Xe),He._writableState.errorEmitted=!0,Ge(He,Xe),mt(He,we))}function Ct(He){He.writing=!1,He.writecb=null,He.length-=He.writelen,He.writelen=0}function bt(He,we){var Ne=He._writableState,Xe=Ne.sync,nt=Ne.writecb;if(typeof nt!="function")throw new je;if(Ct(Ne),we)wt(He,Ne,Xe,we,nt);else{var Ie=Mt(Ne)||He.destroyed;!Ie&&!Ne.corked&&!Ne.bufferProcessing&&Ne.bufferedRequest&&dt(He,Ne),Xe?de.nextTick(ct,He,Ne,Ie,nt):ct(He,Ne,Ie,nt)}}function ct(He,we,Ne,Xe){Ne||xt(He,we),we.pendingcb--,Xe(),mt(He,we)}function xt(He,we){we.length===0&&we.needDrain&&(we.needDrain=!1,He.emit("drain"))}function dt(He,we){we.bufferProcessing=!0;var Ne=we.bufferedRequest;if(He._writev&&Ne&&Ne.next){var Xe=we.bufferedRequestCount,nt=new Array(Xe),Ie=we.corkedRequestsFree;Ie.entry=Ne;for(var Re=0,Ze=!0;Ne;)nt[Re]=Ne,Ne.isBuf||(Ze=!1),Ne=Ne.next,Re+=1;nt.allBuffers=Ze,rt(He,we,!0,we.length,nt,"",Ie.finish),we.pendingcb++,we.lastBufferedRequest=null,Ie.next?(we.corkedRequestsFree=Ie.next,Ie.next=null):we.corkedRequestsFree=new ke(we),we.bufferedRequestCount=0}else{for(;Ne;){var et=Ne.chunk,ht=Ne.encoding,at=Ne.callback,Dt=we.objectMode?1:et.length;if(rt(He,we,!1,Dt,et,ht,at),Ne=Ne.next,we.bufferedRequestCount--,we.writing)break}Ne===null&&(we.lastBufferedRequest=null)}we.bufferedRequest=Ne,we.bufferProcessing=!1}ot.prototype._write=function(He,we,Ne){Ne(new xe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(He,we,Ne){var Xe=this._writableState;return typeof He=="function"?(Ne=He,He=null,we=null):typeof we=="function"&&(Ne=we,we=null),He!=null&&this.write(He,we),Xe.corked&&(Xe.corked=1,this.uncork()),Xe.ending||vt(this,Xe,Ne),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Mt(He){return He.ending&&He.length===0&&He.bufferedRequest===null&&!He.finished&&!He.writing}function yt(He,we){He._final(function(Ne){we.pendingcb--,Ne&&Ge(He,Ne),we.prefinished=!0,He.emit("prefinish"),mt(He,we)})}function Ft(He,we){!we.prefinished&&!we.finalCalled&&(typeof He._final=="function"&&!we.destroyed?(we.pendingcb++,we.finalCalled=!0,de.nextTick(yt,He,we)):(we.prefinished=!0,He.emit("prefinish")))}function mt(He,we){var Ne=Mt(we);if(Ne&&(Ft(He,we),we.pendingcb===0&&(we.finished=!0,He.emit("finish"),we.autoDestroy))){var Xe=He._readableState;(!Xe||Xe.autoDestroy&&Xe.endEmitted)&&He.destroy()}return Ne}function vt(He,we,Ne){we.ending=!0,mt(He,we),Ne&&(we.finished?de.nextTick(Ne):He.once("finish",Ne)),we.ended=!0,He.writable=!1}function tt(He,we,Ne){var Xe=He.entry;for(He.entry=null;Xe;){var nt=Xe.callback;we.pendingcb--,nt(Ne),Xe=Xe.next}we.corkedRequestsFree.next=He}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(we){this._writableState&&(this._writableState.destroyed=we)}}),ot.prototype.destroy=se.destroy,ot.prototype._undestroy=se.undestroy,ot.prototype._destroy=function(He,we){we(He)}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve;function Ee(Te,Me,Be){return Me=ke(Me),Me in Te?Object.defineProperty(Te,Me,{value:Be,enumerable:!0,configurable:!0,writable:!0}):Te[Me]=Be,Te}function ke(Te){var Me=Se(Te,"string");return typeof Me=="symbol"?Me:String(Me)}function Se(Te,Me){if(typeof Te!="object"||Te===null)return Te;var Be=Te[Symbol.toPrimitive];if(Be!==void 0){var Ge=Be.call(Te,Me||"default");if(typeof Ge!="object")return Ge;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Me==="string"?String:Number)(Te)}var Ae=oe("./end-of-stream"),me=Symbol("lastResolve"),Pe=Symbol("lastReject"),fe=Symbol("error"),z=Symbol("ended"),te=Symbol("lastPromise"),se=Symbol("handlePromise"),ie=Symbol("stream");function le(Te,Me){return{value:Te,done:Me}}function ce(Te){var Me=Te[me];if(Me!==null){var Be=Te[ie].read();Be!==null&&(Te[te]=null,Te[me]=null,Te[Pe]=null,Me(le(Be,!1)))}}function pe(Te){de.nextTick(ce,Te)}function xe(Te,Me){return function(Be,Ge){Te.then(function(){if(Me[z]){Be(le(void 0,!0));return}Me[se](Be,Ge)},Ge)}}var je=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((ve={get stream(){return this[ie]},next:function(){var Me=this,Be=this[fe];if(Be!==null)return Promise.reject(Be);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ve,ot){de.nextTick(function(){Me[fe]?ot(Me[fe]):Ve(le(void 0,!0))})});var Ge=this[te],Ye;if(Ge)Ye=new Promise(xe(Ge,this));else{var Ke=this[ie].read();if(Ke!==null)return Promise.resolve(le(Ke,!1));Ye=new Promise(this[se])}return this[te]=Ye,Ye}},Ee(ve,Symbol.asyncIterator,function(){return this}),Ee(ve,"return",function(){var Me=this;return new Promise(function(Be,Ge){Me[ie].destroy(null,function(Ye){if(Ye){Ge(Ye);return}Be(le(void 0,!0))})})}),ve),je),Fe=function(Me){var Be,Ge=Object.create(De,(Be={},Ee(Be,ie,{value:Me,writable:!0}),Ee(Be,me,{value:null,writable:!0}),Ee(Be,Pe,{value:null,writable:!0}),Ee(Be,fe,{value:null,writable:!0}),Ee(Be,z,{value:Me._readableState.endEmitted,writable:!0}),Ee(Be,se,{value:function(Ke,Ve){var ot=Ge[ie].read();ot?(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Ke(le(ot,!1))):(Ge[me]=Ke,Ge[Pe]=Ve)},writable:!0}),Be));return Ge[te]=null,Ae(Me,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ke=Ge[Pe];Ke!==null&&(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Ke(Ye)),Ge[fe]=Ye;return}var Ve=Ge[me];Ve!==null&&(Ge[te]=null,Ge[me]=null,Ge[Pe]=null,Ve(le(void 0,!0))),Ge[z]=!0}),Me.on("readable",pe.bind(null,Ge)),Ge};Ue.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,Ue,_e){"use strict";function de(ce,pe){var xe=Object.keys(ce);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(ce);pe&&(je=je.filter(function(De){return Object.getOwnPropertyDescriptor(ce,De).enumerable})),xe.push.apply(xe,je)}return xe}function ve(ce){for(var pe=1;pe<arguments.length;pe++){var xe=arguments[pe]!=null?arguments[pe]:{};pe%2?de(Object(xe),!0).forEach(function(je){Ee(ce,je,xe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(xe)):de(Object(xe)).forEach(function(je){Object.defineProperty(ce,je,Object.getOwnPropertyDescriptor(xe,je))})}return ce}function Ee(ce,pe,xe){return pe=me(pe),pe in ce?Object.defineProperty(ce,pe,{value:xe,enumerable:!0,configurable:!0,writable:!0}):ce[pe]=xe,ce}function ke(ce,pe){if(!(ce instanceof pe))throw new TypeError("Cannot call a class as a function")}function Se(ce,pe){for(var xe=0;xe<pe.length;xe++){var je=pe[xe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ce,me(je.key),je)}}function Ae(ce,pe,xe){return pe&&Se(ce.prototype,pe),xe&&Se(ce,xe),Object.defineProperty(ce,"prototype",{writable:!1}),ce}function me(ce){var pe=Pe(ce,"string");return typeof pe=="symbol"?pe:String(pe)}function Pe(ce,pe){if(typeof ce!="object"||ce===null)return ce;var xe=ce[Symbol.toPrimitive];if(xe!==void 0){var je=xe.call(ce,pe||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pe==="string"?String:Number)(ce)}var fe=oe("buffer"),z=fe.Buffer,te=oe("util"),se=te.inspect,ie=se&&se.custom||"inspect";function le(ce,pe,xe){z.prototype.copy.call(ce,pe,xe)}Ue.exports=function(){function ce(){ke(this,ce),this.head=null,this.tail=null,this.length=0}return Ae(ce,[{key:"push",value:function(xe){var je={data:xe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(xe){var je={data:xe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var xe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,xe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(xe){if(this.length===0)return"";for(var je=this.head,De=""+je.data;je=je.next;)De+=xe+je.data;return De}},{key:"concat",value:function(xe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(xe>>>0),De=this.head,Fe=0;De;)le(De.data,je,Fe),Fe+=De.data.length,De=De.next;return je}},{key:"consume",value:function(xe,je){var De;return xe<this.head.data.length?(De=this.head.data.slice(0,xe),this.head.data=this.head.data.slice(xe)):xe===this.head.data.length?De=this.shift():De=je?this._getString(xe):this._getBuffer(xe),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(xe){var je=this.head,De=1,Fe=je.data;for(xe-=Fe.length;je=je.next;){var Te=je.data,Me=xe>Te.length?Te.length:xe;if(Me===Te.length?Fe+=Te:Fe+=Te.slice(0,xe),xe-=Me,xe===0){Me===Te.length?(++De,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Te.slice(Me));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(xe){var je=z.allocUnsafe(xe),De=this.head,Fe=1;for(De.data.copy(je),xe-=De.data.length;De=De.next;){var Te=De.data,Me=xe>Te.length?Te.length:xe;if(Te.copy(je,je.length-xe,0,Me),xe-=Me,xe===0){Me===Te.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=Te.slice(Me));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(xe,je){return se(this,ve(ve({},je),{},{depth:0,customInspect:!1}))}}]),ce}()},{buffer:90,util:89}],407:[function(oe,Ue,_e){(function(de){(function(){"use strict";function ve(Pe,fe){var z=this,te=this._readableState&&this._readableState.destroyed,se=this._writableState&&this._writableState.destroyed;return te||se?(fe?fe(Pe):Pe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,de.nextTick(Ae,this,Pe)):de.nextTick(Ae,this,Pe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Pe||null,function(ie){!fe&&ie?z._writableState?z._writableState.errorEmitted?de.nextTick(ke,z):(z._writableState.errorEmitted=!0,de.nextTick(Ee,z,ie)):de.nextTick(Ee,z,ie):fe?(de.nextTick(ke,z),fe(ie)):de.nextTick(ke,z)}),this)}function Ee(Pe,fe){Ae(Pe,fe),ke(Pe)}function ke(Pe){Pe._writableState&&!Pe._writableState.emitClose||Pe._readableState&&!Pe._readableState.emitClose||Pe.emit("close")}function Se(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ae(Pe,fe){Pe.emit("error",fe)}function me(Pe,fe){var z=Pe._readableState,te=Pe._writableState;z&&z.autoDestroy||te&&te.autoDestroy?Pe.destroy(fe):Pe.emit("error",fe)}Ue.exports={destroy:ve,undestroy:Se,errorOrDestroy:me}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,Ue,_e){"use strict";var de=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function ve(Ae){var me=!1;return function(){if(!me){me=!0;for(var Pe=arguments.length,fe=new Array(Pe),z=0;z<Pe;z++)fe[z]=arguments[z];Ae.apply(this,fe)}}}function Ee(){}function ke(Ae){return Ae.setHeader&&typeof Ae.abort=="function"}function Se(Ae,me,Pe){if(typeof me=="function")return Se(Ae,null,me);me||(me={}),Pe=ve(Pe||Ee);var fe=me.readable||me.readable!==!1&&Ae.readable,z=me.writable||me.writable!==!1&&Ae.writable,te=function(){Ae.writable||ie()},se=Ae._writableState&&Ae._writableState.finished,ie=function(){z=!1,se=!0,fe||Pe.call(Ae)},le=Ae._readableState&&Ae._readableState.endEmitted,ce=function(){fe=!1,le=!0,z||Pe.call(Ae)},pe=function(Fe){Pe.call(Ae,Fe)},xe=function(){var Fe;if(fe&&!le)return(!Ae._readableState||!Ae._readableState.ended)&&(Fe=new de),Pe.call(Ae,Fe);if(z&&!se)return(!Ae._writableState||!Ae._writableState.ended)&&(Fe=new de),Pe.call(Ae,Fe)},je=function(){Ae.req.on("finish",ie)};return ke(Ae)?(Ae.on("complete",ie),Ae.on("abort",xe),Ae.req?je():Ae.on("request",je)):z&&!Ae._writableState&&(Ae.on("end",te),Ae.on("close",te)),Ae.on("end",ce),Ae.on("finish",ie),me.error!==!1&&Ae.on("error",pe),Ae.on("close",xe),function(){Ae.removeListener("complete",ie),Ae.removeListener("abort",xe),Ae.removeListener("request",je),Ae.req&&Ae.req.removeListener("finish",ie),Ae.removeListener("end",te),Ae.removeListener("close",te),Ae.removeListener("finish",ie),Ae.removeListener("end",ce),Ae.removeListener("error",pe),Ae.removeListener("close",xe)}}Ue.exports=Se},{"../../../errors":399}],409:[function(oe,Ue,_e){Ue.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,Ue,_e){"use strict";var de;function ve(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var Ee=oe("../../../errors").codes,ke=Ee.ERR_MISSING_ARGS,Se=Ee.ERR_STREAM_DESTROYED;function Ae(ie){if(ie)throw ie}function me(ie){return ie.setHeader&&typeof ie.abort=="function"}function Pe(ie,le,ce,pe){pe=ve(pe);var xe=!1;ie.on("close",function(){xe=!0}),de===void 0&&(de=oe("./end-of-stream")),de(ie,{readable:le,writable:ce},function(De){if(De)return pe(De);xe=!0,pe()});var je=!1;return function(De){if(!xe&&!je){if(je=!0,me(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();pe(De||new Se("pipe"))}}}function fe(ie){ie()}function z(ie,le){return ie.pipe(le)}function te(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Ae:ie.pop()}function se(){for(var ie=arguments.length,le=new Array(ie),ce=0;ce<ie;ce++)le[ce]=arguments[ce];var pe=te(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new ke("streams");var xe,je=le.map(function(De,Fe){var Te=Fe<le.length-1,Me=Fe>0;return Pe(De,Te,Me,function(Be){xe||(xe=Be),Be&&je.forEach(fe),!Te&&(je.forEach(fe),pe(xe))})});return le.reduce(z)}Ue.exports=se},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,Ue,_e){"use strict";var de=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function ve(ke,Se,Ae){return ke.highWaterMark!=null?ke.highWaterMark:Se?ke[Ae]:null}function Ee(ke,Se,Ae,me){var Pe=ve(Se,me,Ae);if(Pe!=null){if(!(isFinite(Pe)&&Math.floor(Pe)===Pe)||Pe<0){var fe=me?Ae:"highWaterMark";throw new de(fe,Pe)}return Math.floor(Pe)}return ke.objectMode?16:16*1024}Ue.exports={getHighWaterMark:Ee}},{"../../../errors":399}],412:[function(oe,Ue,_e){arguments[4][393][0].apply(_e,arguments)},{dup:393,events:344}],413:[function(oe,Ue,_e){"use strict";var de=oe("safe-buffer").Buffer,ve=de.isEncoding||function(je){switch(je=""+je,je&&je.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ee(je){if(!je)return"utf8";for(var De;;)switch(je){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return je;default:if(De)return;je=(""+je).toLowerCase(),De=!0}}function ke(je){var De=Ee(je);if(typeof De!="string"&&(de.isEncoding===ve||!ve(je)))throw new Error("Unknown encoding: "+je);return De||je}_e.StringDecoder=Se;function Se(je){this.encoding=ke(je);var De;switch(this.encoding){case"utf16le":this.text=se,this.end=ie,De=4;break;case"utf8":this.fillLast=fe,De=4;break;case"base64":this.text=le,this.end=ce,De=3;break;default:this.write=pe,this.end=xe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=de.allocUnsafe(De)}Se.prototype.write=function(je){if(je.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(je),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?De?De+this.text(je,Fe):this.text(je,Fe):De||""},Se.prototype.end=te,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Ae(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function me(je,De,Fe){var Te=De.length-1;if(Te<Fe)return 0;var Me=Ae(De[Te]);return Me>=0?(Me>0&&(je.lastNeed=Me-1),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(je.lastNeed=Me-2),Me):--Te<Fe||Me===-2?0:(Me=Ae(De[Te]),Me>=0?(Me>0&&(Me===2?Me=0:je.lastNeed=Me-3),Me):0))}function Pe(je,De,Fe){if((De[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function fe(je){var De=this.lastTotal-this.lastNeed,Fe=Pe(this,je,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,De,0,je.length),this.lastNeed-=je.length}function z(je,De){var Fe=me(this,je,De);if(!this.lastNeed)return je.toString("utf8",De);this.lastTotal=Fe;var Te=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Te),je.toString("utf8",De,Te)}function te(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+"\uFFFD":De}function se(je,De){if((je.length-De)%2===0){var Fe=je.toString("utf16le",De);if(Fe){var Te=Fe.charCodeAt(Fe.length-1);if(Te>=55296&&Te<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",De,je.length-1)}function ie(je){var De=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(je,De){var Fe=(je.length-De)%3;return Fe===0?je.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",De,je.length-Fe))}function ce(je){var De=je&&je.length?this.write(je):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function pe(je){return je.toString(this.encoding)}function xe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,Ue,_e){(function(de,ve){(function(){var Ee=oe("process/browser.js").nextTick,ke=Function.prototype.apply,Se=Array.prototype.slice,Ae={},me=0;_e.setTimeout=function(){return new Pe(ke.call(setTimeout,window,arguments),clearTimeout)},_e.setInterval=function(){return new Pe(ke.call(setInterval,window,arguments),clearInterval)},_e.clearTimeout=_e.clearInterval=function(fe){fe.close()};function Pe(fe,z){this._id=fe,this._clearFn=z}Pe.prototype.unref=Pe.prototype.ref=function(){},Pe.prototype.close=function(){this._clearFn.call(window,this._id)},_e.enroll=function(fe,z){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=z},_e.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},_e._unrefActive=_e.active=function(fe){clearTimeout(fe._idleTimeoutId);var z=fe._idleTimeout;z>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},z))},_e.setImmediate=typeof de=="function"?de:function(fe){var z=me++,te=arguments.length<2?!1:Se.call(arguments,1);return Ae[z]=!0,Ee(function(){Ae[z]&&(te?fe.apply(null,te):fe.call(null),_e.clearImmediate(z))}),z},_e.clearImmediate=typeof ve=="function"?ve:function(fe){delete Ae[fe]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,Ue,_e){var de=oe("buffer").Buffer;Ue.exports=function(ve){if(ve instanceof Uint8Array){if(ve.byteOffset===0&&ve.byteLength===ve.buffer.byteLength)return ve.buffer;if(typeof ve.buffer.slice=="function")return ve.buffer.slice(ve.byteOffset,ve.byteOffset+ve.byteLength)}if(de.isBuffer(ve)){for(var Ee=new Uint8Array(ve.length),ke=ve.length,Se=0;Se<ke;Se++)Ee[Se]=ve[Se];return Ee.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(oe,Ue,_e){(function(de){(function(){Ue.exports=ve;function ve(ke,Se){if(Ee("noDeprecation"))return ke;var Ae=!1;function me(){if(!Ae){if(Ee("throwDeprecation"))throw new Error(Se);Ee("traceDeprecation")?console.trace(Se):console.warn(Se),Ae=!0}return ke.apply(this,arguments)}return me}function Ee(ke){try{if(!de.localStorage)return!1}catch(Ae){return!1}var Se=de.localStorage[ke];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(oe,Ue,_e){arguments[4][84][0].apply(_e,arguments)},{dup:84}],418:[function(oe,Ue,_e){"use strict";var de=oe("is-arguments"),ve=oe("is-generator-function"),Ee=oe("which-typed-array"),ke=oe("is-typed-array");function Se(ht){return ht.call.bind(ht)}var Ae=typeof BigInt!="undefined",me=typeof Symbol!="undefined",Pe=Se(Object.prototype.toString),fe=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),te=Se(Boolean.prototype.valueOf);if(Ae)var se=Se(BigInt.prototype.valueOf);if(me)var ie=Se(Symbol.prototype.valueOf);function le(ht,at){if(typeof ht!="object")return!1;try{return at(ht),!0}catch(Dt){return!1}}_e.isArgumentsObject=de,_e.isGeneratorFunction=ve,_e.isTypedArray=ke;function ce(ht){return typeof Promise!="undefined"&&ht instanceof Promise||ht!==null&&typeof ht=="object"&&typeof ht.then=="function"&&typeof ht.catch=="function"}_e.isPromise=ce;function pe(ht){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ht):ke(ht)||dt(ht)}_e.isArrayBufferView=pe;function xe(ht){return Ee(ht)==="Uint8Array"}_e.isUint8Array=xe;function je(ht){return Ee(ht)==="Uint8ClampedArray"}_e.isUint8ClampedArray=je;function De(ht){return Ee(ht)==="Uint16Array"}_e.isUint16Array=De;function Fe(ht){return Ee(ht)==="Uint32Array"}_e.isUint32Array=Fe;function Te(ht){return Ee(ht)==="Int8Array"}_e.isInt8Array=Te;function Me(ht){return Ee(ht)==="Int16Array"}_e.isInt16Array=Me;function Be(ht){return Ee(ht)==="Int32Array"}_e.isInt32Array=Be;function Ge(ht){return Ee(ht)==="Float32Array"}_e.isFloat32Array=Ge;function Ye(ht){return Ee(ht)==="Float64Array"}_e.isFloat64Array=Ye;function Ke(ht){return Ee(ht)==="BigInt64Array"}_e.isBigInt64Array=Ke;function Ve(ht){return Ee(ht)==="BigUint64Array"}_e.isBigUint64Array=Ve;function ot(ht){return Pe(ht)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function ut(ht){return typeof Map=="undefined"?!1:ot.working?ot(ht):ht instanceof Map}_e.isMap=ut;function ft(ht){return Pe(ht)==="[object Set]"}ft.working=typeof Set!="undefined"&&ft(new Set);function St(ht){return typeof Set=="undefined"?!1:ft.working?ft(ht):ht instanceof Set}_e.isSet=St;function Qe(ht){return Pe(ht)==="[object WeakMap]"}Qe.working=typeof WeakMap!="undefined"&&Qe(new WeakMap);function rt(ht){return typeof WeakMap=="undefined"?!1:Qe.working?Qe(ht):ht instanceof WeakMap}_e.isWeakMap=rt;function wt(ht){return Pe(ht)==="[object WeakSet]"}wt.working=typeof WeakSet!="undefined"&&wt(new WeakSet);function Ct(ht){return wt(ht)}_e.isWeakSet=Ct;function bt(ht){return Pe(ht)==="[object ArrayBuffer]"}bt.working=typeof ArrayBuffer!="undefined"&&bt(new ArrayBuffer);function ct(ht){return typeof ArrayBuffer=="undefined"?!1:bt.working?bt(ht):ht instanceof ArrayBuffer}_e.isArrayBuffer=ct;function xt(ht){return Pe(ht)==="[object DataView]"}xt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&xt(new DataView(new ArrayBuffer(1),0,1));function dt(ht){return typeof DataView=="undefined"?!1:xt.working?xt(ht):ht instanceof DataView}_e.isDataView=dt;var Mt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function yt(ht){return Pe(ht)==="[object SharedArrayBuffer]"}function Ft(ht){return typeof Mt=="undefined"?!1:(typeof yt.working=="undefined"&&(yt.working=yt(new Mt)),yt.working?yt(ht):ht instanceof Mt)}_e.isSharedArrayBuffer=Ft;function mt(ht){return Pe(ht)==="[object AsyncFunction]"}_e.isAsyncFunction=mt;function vt(ht){return Pe(ht)==="[object Map Iterator]"}_e.isMapIterator=vt;function tt(ht){return Pe(ht)==="[object Set Iterator]"}_e.isSetIterator=tt;function He(ht){return Pe(ht)==="[object Generator]"}_e.isGeneratorObject=He;function we(ht){return Pe(ht)==="[object WebAssembly.Module]"}_e.isWebAssemblyCompiledModule=we;function Ne(ht){return le(ht,fe)}_e.isNumberObject=Ne;function Xe(ht){return le(ht,z)}_e.isStringObject=Xe;function nt(ht){return le(ht,te)}_e.isBooleanObject=nt;function Ie(ht){return Ae&&le(ht,se)}_e.isBigIntObject=Ie;function Re(ht){return me&&le(ht,ie)}_e.isSymbolObject=Re;function Ze(ht){return Ne(ht)||Xe(ht)||nt(ht)||Ie(ht)||Re(ht)}_e.isBoxedPrimitive=Ze;function et(ht){return typeof Uint8Array!="undefined"&&(ct(ht)||Ft(ht))}_e.isAnyArrayBuffer=et,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ht){Object.defineProperty(_e,ht,{enumerable:!1,value:function(){throw new Error(ht+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,Ue,_e){(function(de){(function(){var ve=Object.getOwnPropertyDescriptors||function(Mt){for(var yt=Object.keys(Mt),Ft={},mt=0;mt<yt.length;mt++)Ft[yt[mt]]=Object.getOwnPropertyDescriptor(Mt,yt[mt]);return Ft},Ee=/%[sdj%]/g;_e.format=function(dt){if(!Me(dt)){for(var Mt=[],yt=0;yt<arguments.length;yt++)Mt.push(me(arguments[yt]));return Mt.join(" ")}for(var yt=1,Ft=arguments,mt=Ft.length,vt=String(dt).replace(Ee,function(He){if(He==="%%")return"%";if(yt>=mt)return He;switch(He){case"%s":return String(Ft[yt++]);case"%d":return Number(Ft[yt++]);case"%j":try{return JSON.stringify(Ft[yt++])}catch(we){return"[Circular]"}default:return He}}),tt=Ft[yt];yt<mt;tt=Ft[++yt])De(tt)||!Ke(tt)?vt+=" "+tt:vt+=" "+me(tt);return vt},_e.deprecate=function(dt,Mt){if(typeof de!="undefined"&&de.noDeprecation===!0)return dt;if(typeof de=="undefined")return function(){return _e.deprecate(dt,Mt).apply(this,arguments)};var yt=!1;function Ft(){if(!yt){if(de.throwDeprecation)throw new Error(Mt);de.traceDeprecation?console.trace(Mt):console.error(Mt),yt=!0}return dt.apply(this,arguments)}return Ft};var ke={},Se=/^$/;if(de.env.NODE_DEBUG){var Ae=de.env.NODE_DEBUG;Ae=Ae.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Ae+"$","i")}_e.debuglog=function(dt){if(dt=dt.toUpperCase(),!ke[dt])if(Se.test(dt)){var Mt=de.pid;ke[dt]=function(){var yt=_e.format.apply(_e,arguments);console.error("%s %d: %s",dt,Mt,yt)}}else ke[dt]=function(){};return ke[dt]};function me(dt,Mt){var yt={seen:[],stylize:fe};return arguments.length>=3&&(yt.depth=arguments[2]),arguments.length>=4&&(yt.colors=arguments[3]),je(Mt)?yt.showHidden=Mt:Mt&&_e._extend(yt,Mt),Ge(yt.showHidden)&&(yt.showHidden=!1),Ge(yt.depth)&&(yt.depth=2),Ge(yt.colors)&&(yt.colors=!1),Ge(yt.customInspect)&&(yt.customInspect=!0),yt.colors&&(yt.stylize=Pe),te(yt,dt,yt.depth)}_e.inspect=me,me.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Pe(dt,Mt){var yt=me.styles[Mt];return yt?"\x1B["+me.colors[yt][0]+"m"+dt+"\x1B["+me.colors[yt][1]+"m":dt}function fe(dt,Mt){return dt}function z(dt){var Mt={};return dt.forEach(function(yt,Ft){Mt[yt]=!0}),Mt}function te(dt,Mt,yt){if(dt.customInspect&&Mt&&ut(Mt.inspect)&&Mt.inspect!==_e.inspect&&!(Mt.constructor&&Mt.constructor.prototype===Mt)){var Ft=Mt.inspect(yt,dt);return Me(Ft)||(Ft=te(dt,Ft,yt)),Ft}var mt=se(dt,Mt);if(mt)return mt;var vt=Object.keys(Mt),tt=z(vt);if(dt.showHidden&&(vt=Object.getOwnPropertyNames(Mt)),ot(Mt)&&(vt.indexOf("message")>=0||vt.indexOf("description")>=0))return ie(Mt);if(vt.length===0){if(ut(Mt)){var He=Mt.name?": "+Mt.name:"";return dt.stylize("[Function"+He+"]","special")}if(Ye(Mt))return dt.stylize(RegExp.prototype.toString.call(Mt),"regexp");if(Ve(Mt))return dt.stylize(Date.prototype.toString.call(Mt),"date");if(ot(Mt))return ie(Mt)}var we="",Ne=!1,Xe=["{","}"];if(xe(Mt)&&(Ne=!0,Xe=["[","]"]),ut(Mt)){var nt=Mt.name?": "+Mt.name:"";we=" [Function"+nt+"]"}if(Ye(Mt)&&(we=" "+RegExp.prototype.toString.call(Mt)),Ve(Mt)&&(we=" "+Date.prototype.toUTCString.call(Mt)),ot(Mt)&&(we=" "+ie(Mt)),vt.length===0&&(!Ne||Mt.length==0))return Xe[0]+we+Xe[1];if(yt<0)return Ye(Mt)?dt.stylize(RegExp.prototype.toString.call(Mt),"regexp"):dt.stylize("[Object]","special");dt.seen.push(Mt);var Ie;return Ne?Ie=le(dt,Mt,yt,tt,vt):Ie=vt.map(function(Re){return ce(dt,Mt,yt,tt,Re,Ne)}),dt.seen.pop(),pe(Ie,we,Xe)}function se(dt,Mt){if(Ge(Mt))return dt.stylize("undefined","undefined");if(Me(Mt)){var yt="'"+JSON.stringify(Mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return dt.stylize(yt,"string")}if(Te(Mt))return dt.stylize(""+Mt,"number");if(je(Mt))return dt.stylize(""+Mt,"boolean");if(De(Mt))return dt.stylize("null","null")}function ie(dt){return"["+Error.prototype.toString.call(dt)+"]"}function le(dt,Mt,yt,Ft,mt){for(var vt=[],tt=0,He=Mt.length;tt<He;++tt)Ct(Mt,String(tt))?vt.push(ce(dt,Mt,yt,Ft,String(tt),!0)):vt.push("");return mt.forEach(function(we){we.match(/^\d+$/)||vt.push(ce(dt,Mt,yt,Ft,we,!0))}),vt}function ce(dt,Mt,yt,Ft,mt,vt){var tt,He,we;if(we=Object.getOwnPropertyDescriptor(Mt,mt)||{value:Mt[mt]},we.get?we.set?He=dt.stylize("[Getter/Setter]","special"):He=dt.stylize("[Getter]","special"):we.set&&(He=dt.stylize("[Setter]","special")),Ct(Ft,mt)||(tt="["+mt+"]"),He||(dt.seen.indexOf(we.value)<0?(De(yt)?He=te(dt,we.value,null):He=te(dt,we.value,yt-1),He.indexOf(`
|
|
`)>-1&&(vt?He=He.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`).slice(2):He=`
|
|
`+He.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`))):He=dt.stylize("[Circular]","special")),Ge(tt)){if(vt&&mt.match(/^\d+$/))return He;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=dt.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=dt.stylize(tt,"string"))}return tt+": "+He}function pe(dt,Mt,yt){var Ft=0,mt=dt.reduce(function(vt,tt){return Ft++,tt.indexOf(`
|
|
`)>=0&&Ft++,vt+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?yt[0]+(Mt===""?"":Mt+`
|
|
`)+" "+dt.join(`,
|
|
`)+" "+yt[1]:yt[0]+Mt+" "+dt.join(", ")+" "+yt[1]}_e.types=oe("./support/types");function xe(dt){return Array.isArray(dt)}_e.isArray=xe;function je(dt){return typeof dt=="boolean"}_e.isBoolean=je;function De(dt){return dt===null}_e.isNull=De;function Fe(dt){return dt==null}_e.isNullOrUndefined=Fe;function Te(dt){return typeof dt=="number"}_e.isNumber=Te;function Me(dt){return typeof dt=="string"}_e.isString=Me;function Be(dt){return typeof dt=="symbol"}_e.isSymbol=Be;function Ge(dt){return dt===void 0}_e.isUndefined=Ge;function Ye(dt){return Ke(dt)&&St(dt)==="[object RegExp]"}_e.isRegExp=Ye,_e.types.isRegExp=Ye;function Ke(dt){return typeof dt=="object"&&dt!==null}_e.isObject=Ke;function Ve(dt){return Ke(dt)&&St(dt)==="[object Date]"}_e.isDate=Ve,_e.types.isDate=Ve;function ot(dt){return Ke(dt)&&(St(dt)==="[object Error]"||dt instanceof Error)}_e.isError=ot,_e.types.isNativeError=ot;function ut(dt){return typeof dt=="function"}_e.isFunction=ut;function ft(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||typeof dt=="undefined"}_e.isPrimitive=ft,_e.isBuffer=oe("./support/isBuffer");function St(dt){return Object.prototype.toString.call(dt)}function Qe(dt){return dt<10?"0"+dt.toString(10):dt.toString(10)}var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function wt(){var dt=new Date,Mt=[Qe(dt.getHours()),Qe(dt.getMinutes()),Qe(dt.getSeconds())].join(":");return[dt.getDate(),rt[dt.getMonth()],Mt].join(" ")}_e.log=function(){console.log("%s - %s",wt(),_e.format.apply(_e,arguments))},_e.inherits=oe("inherits"),_e._extend=function(dt,Mt){if(!Mt||!Ke(Mt))return dt;for(var yt=Object.keys(Mt),Ft=yt.length;Ft--;)dt[yt[Ft]]=Mt[yt[Ft]];return dt};function Ct(dt,Mt){return Object.prototype.hasOwnProperty.call(dt,Mt)}var bt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;_e.promisify=function(Mt){if(typeof Mt!="function")throw new TypeError('The "original" argument must be of type Function');if(bt&&Mt[bt]){var yt=Mt[bt];if(typeof yt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(yt,bt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),yt}function yt(){for(var Ft,mt,vt=new Promise(function(we,Ne){Ft=we,mt=Ne}),tt=[],He=0;He<arguments.length;He++)tt.push(arguments[He]);tt.push(function(we,Ne){we?mt(we):Ft(Ne)});try{Mt.apply(this,tt)}catch(we){mt(we)}return vt}return Object.setPrototypeOf(yt,Object.getPrototypeOf(Mt)),bt&&Object.defineProperty(yt,bt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(yt,ve(Mt))},_e.promisify.custom=bt;function ct(dt,Mt){if(!dt){var yt=new Error("Promise was rejected with a falsy value");yt.reason=dt,dt=yt}return Mt(dt)}function xt(dt){if(typeof dt!="function")throw new TypeError('The "original" argument must be of type Function');function Mt(){for(var yt=[],Ft=0;Ft<arguments.length;Ft++)yt.push(arguments[Ft]);var mt=yt.pop();if(typeof mt!="function")throw new TypeError("The last argument must be of type Function");var vt=this,tt=function(){return mt.apply(vt,arguments)};dt.apply(this,yt).then(function(He){de.nextTick(tt.bind(null,null,He))},function(He){de.nextTick(ct.bind(null,He,tt))})}return Object.setPrototypeOf(Mt,Object.getPrototypeOf(dt)),Object.defineProperties(Mt,ve(dt)),Mt}_e.callbackify=xt}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("for-each"),Ee=oe("available-typed-arrays"),ke=oe("call-bind"),Se=oe("call-bind/callBound"),Ae=oe("gopd"),me=Se("Object.prototype.toString"),Pe=oe("has-tostringtag/shams")(),fe=typeof globalThis=="undefined"?de:globalThis,z=Ee(),te=Se("String.prototype.slice"),se=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,De){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===De)return Fe;return-1},le={__proto__:null};Pe&&Ae&&se?ve(z,function(xe){var je=new fe[xe];if(Symbol.toStringTag in je){var De=se(je),Fe=Ae(De,Symbol.toStringTag);if(!Fe){var Te=se(De);Fe=Ae(Te,Symbol.toStringTag)}le["$"+xe]=ke(Fe.get)}}):ve(z,function(xe){var je=new fe[xe];le["$"+xe]=ke(je.slice)});var ce=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{"$"+Fe(je)===Te&&(De=te(Te,1))}catch(Me){}}),De},pe=function(je){var De=!1;return ve(le,function(Fe,Te){if(!De)try{Fe(je),De=te(Te,1)}catch(Me){}}),De};Ue.exports=function(je){if(!je||typeof je!="object")return!1;if(!Pe){var De=te(me(je),8,-1);return ie(z,De)>-1?De:De!=="Object"?!1:pe(je)}return Ae?ce(je):null}}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(oe,Ue,_e){(function(){"use strict";_e.stripBOM=function(de){return de[0]==="\uFEFF"?de.substring(1):de}}).call(this)},{}],422:[function(oe,Ue,_e){(function(){"use strict";var de,ve,Ee,ke,Se,Ae={}.hasOwnProperty;de=oe("xmlbuilder"),ve=oe("./defaults").defaults,ke=function(me){return typeof me=="string"&&(me.indexOf("&")>=0||me.indexOf(">")>=0||me.indexOf("<")>=0)},Se=function(me){return"<![CDATA["+Ee(me)+"]]>"},Ee=function(me){return me.replace("]]>","]]]]><![CDATA[>")},_e.Builder=function(){function me(Pe){var fe,z,te;this.options={},z=ve["0.2"];for(fe in z)Ae.call(z,fe)&&(te=z[fe],this.options[fe]=te);for(fe in Pe)Ae.call(Pe,fe)&&(te=Pe[fe],this.options[fe]=te)}return me.prototype.buildObject=function(Pe){var fe,z,te,se,ie;return fe=this.options.attrkey,z=this.options.charkey,Object.keys(Pe).length===1&&this.options.rootName===ve["0.2"].rootName?(ie=Object.keys(Pe)[0],Pe=Pe[ie]):ie=this.options.rootName,te=function(le){return function(ce,pe){var xe,je,De,Fe,Te,Me;if(typeof pe!="object")le.options.cdata&&ke(pe)?ce.raw(Se(pe)):ce.txt(pe);else if(Array.isArray(pe)){for(Fe in pe)if(Ae.call(pe,Fe)){je=pe[Fe];for(Te in je)De=je[Te],ce=te(ce.ele(Te),De).up()}}else for(Te in pe)if(Ae.call(pe,Te))if(je=pe[Te],Te===fe){if(typeof je=="object")for(xe in je)Me=je[xe],ce=ce.att(xe,Me)}else if(Te===z)le.options.cdata&&ke(je)?ce=ce.raw(Se(je)):ce=ce.txt(je);else if(Array.isArray(je))for(Fe in je)Ae.call(je,Fe)&&(De=je[Fe],typeof De=="string"?le.options.cdata&&ke(De)?ce=ce.ele(Te).raw(Se(De)).up():ce=ce.ele(Te,De).up():ce=te(ce.ele(Te),De).up());else typeof je=="object"?ce=te(ce.ele(Te),je).up():typeof je=="string"&&le.options.cdata&&ke(je)?ce=ce.ele(Te).raw(Se(je)).up():(je==null&&(je=""),ce=ce.ele(Te,je.toString()).up());return ce}}(this),se=de.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),te(se,Pe).end(this.options.renderOpts)},me}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(oe,Ue,_e){(function(){_e.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(oe,Ue,_e){(function(){"use strict";var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(ie,le){return function(){return ie.apply(le,arguments)}},te=function(ie,le){for(var ce in le)se.call(le,ce)&&(ie[ce]=le[ce]);function pe(){this.constructor=ie}return pe.prototype=le.prototype,ie.prototype=new pe,ie.__super__=le.prototype,ie},se={}.hasOwnProperty;Pe=oe("sax"),ke=oe("events"),de=oe("./bom"),me=oe("./processors"),fe=oe("timers").setImmediate,ve=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Ae=function(ie,le,ce){var pe,xe,je;for(pe=0,xe=ie.length;pe<xe;pe++)je=ie[pe],le=je(le,ce);return le},Ee=function(ie,le,ce){var pe;return pe=Object.create(null),pe.value=ce,pe.writable=!0,pe.enumerable=!0,pe.configurable=!0,Object.defineProperty(ie,le,pe)},_e.Parser=function(ie){te(le,ie);function le(ce){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var pe,xe,je;if(!(this instanceof _e.Parser))return new _e.Parser(ce);this.options={},xe=ve["0.2"];for(pe in xe)se.call(xe,pe)&&(je=xe[pe],this.options[pe]=je);for(pe in ce)se.call(ce,pe)&&(je=ce[pe],this.options[pe]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(me.normalize)),this.reset()}return le.prototype.processAsync=function(){var ce,pe;try{return this.remaining.length<=this.options.chunkSize?(ce=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ce),this.saxParser.close()):(ce=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ce),fe(this.processAsync))}catch(xe){if(pe=xe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(pe)}},le.prototype.assignOrPush=function(ce,pe,xe){return pe in ce?(ce[pe]instanceof Array||Ee(ce,pe,[ce[pe]]),ce[pe].push(xe)):this.options.explicitArray?Ee(ce,pe,[xe]):Ee(ce,pe,xe)},le.prototype.reset=function(){var ce,pe,xe,je;return this.removeAllListeners(),this.saxParser=Pe.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(De){return function(Fe){if(De.saxParser.resume(),!De.saxParser.errThrown)return De.saxParser.errThrown=!0,De.emit("error",Fe)}}(this),this.saxParser.onend=function(De){return function(){if(!De.saxParser.ended)return De.saxParser.ended=!0,De.emit("end",De.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],ce=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var Te,Me,Be,Ge,Ye;if(Be={},Be[pe]="",!De.options.ignoreAttrs){Ye=Fe.attributes;for(Te in Ye)se.call(Ye,Te)&&(!(ce in Be)&&!De.options.mergeAttrs&&(Be[ce]={}),Me=De.options.attrValueProcessors?Ae(De.options.attrValueProcessors,Fe.attributes[Te],Te):Fe.attributes[Te],Ge=De.options.attrNameProcessors?Ae(De.options.attrNameProcessors,Te):Te,De.options.mergeAttrs?De.assignOrPush(Be,Ge,Me):Ee(Be[ce],Ge,Me))}return Be["#name"]=De.options.tagNameProcessors?Ae(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(Be[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Be)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,Te,Me,Be,Ge,Ye,Ke,Ve,ot,ut;if(Ye=je.pop(),Ge=Ye["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[pe].match(/^\s*$/)&&!Fe?(Te=Ye[pe],delete Ye[pe]):(De.options.trim&&(Ye[pe]=Ye[pe].trim()),De.options.normalize&&(Ye[pe]=Ye[pe].replace(/\s{2,}/g," ").trim()),Ye[pe]=De.options.valueProcessors?Ae(De.options.valueProcessors,Ye[pe],Ge):Ye[pe],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])),Se(Ye)&&(typeof De.options.emptyTag=="function"?Ye=De.options.emptyTag():Ye=De.options.emptyTag!==""?De.options.emptyTag:Te),De.options.validator!=null&&(ut="/"+function(){var ft,St,Qe;for(Qe=[],ft=0,St=je.length;ft<St;ft++)Be=je[ft],Qe.push(Be["#name"]);return Qe}().concat(Ge).join("/"),function(){var ft;try{return Ye=De.options.validator(ut,ot&&ot[Ge],Ye)}catch(St){return ft=St,De.emit("error",ft)}}()),De.options.explicitChildren&&!De.options.mergeAttrs&&typeof Ye=="object"){if(!De.options.preserveChildrenOrder)Be={},De.options.attrkey in Ye&&(Be[De.options.attrkey]=Ye[De.options.attrkey],delete Ye[De.options.attrkey]),!De.options.charsAsChildren&&De.options.charkey in Ye&&(Be[De.options.charkey]=Ye[De.options.charkey],delete Ye[De.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Be[De.options.childkey]=Ye),Ye=Be;else if(ot){ot[De.options.childkey]=ot[De.options.childkey]||[],Ke={};for(Me in Ye)se.call(Ye,Me)&&Ee(Ke,Me,Ye[Me]);ot[De.options.childkey].push(Ke),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return je.length>0?De.assignOrPush(ot,Ge,Ye):(De.options.explicitRoot&&(Ve=Ye,Ye={},Ee(Ye,Ge,Ve)),De.resultObject=Ye,De.saxParser.ended=!0,De.emit("end",De.resultObject))}}(this),xe=function(De){return function(Fe){var Te,Me;if(Me=je[je.length-1],Me)return Me[pe]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Me[De.options.childkey]=Me[De.options.childkey]||[],Te={"#name":"__text__"},Te[pe]=Fe,De.options.normalize&&(Te[pe]=Te[pe].replace(/\s{2,}/g," ").trim()),Me[De.options.childkey].push(Te)),Me}}(this),this.saxParser.ontext=xe,this.saxParser.oncdata=function(De){return function(Fe){var Te;if(Te=xe(Fe),Te)return Te.cdata=!0}}(this)},le.prototype.parseString=function(ce,pe){var xe;pe!=null&&typeof pe=="function"&&(this.on("end",function(je){return this.reset(),pe(null,je)}),this.on("error",function(je){return this.reset(),pe(je)}));try{return ce=ce.toString(),ce.trim()===""?(this.emit("end",null),!0):(ce=de.stripBOM(ce),this.options.async?(this.remaining=ce,fe(this.processAsync),this.saxParser):this.saxParser.write(ce).close())}catch(je){if(xe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw xe}else return this.emit("error",xe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ce){return new Promise(function(pe){return function(xe,je){return pe.parseString(ce,function(De,Fe){return De?je(De):xe(Fe)})}}(this))},le}(ke),_e.parseString=function(ie,le,ce){var pe,xe,je;return ce!=null?(typeof ce=="function"&&(pe=ce),typeof le=="object"&&(xe=le)):(typeof le=="function"&&(pe=le),xe={}),je=new _e.Parser(xe),je.parseString(ie,pe)},_e.parseStringPromise=function(ie,le){var ce,pe;return typeof le=="object"&&(ce=le),pe=new _e.Parser(ce),pe.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,Ue,_e){(function(){"use strict";var de;de=new RegExp(/(?!xmlns)^.*:/),_e.normalize=function(ve){return ve.toLowerCase()},_e.firstCharLowerCase=function(ve){return ve.charAt(0).toLowerCase()+ve.slice(1)},_e.stripPrefix=function(ve){return ve.replace(de,"")},_e.parseNumbers=function(ve){return isNaN(ve)||(ve=ve%1===0?parseInt(ve,10):parseFloat(ve)),ve},_e.parseBooleans=function(ve){return/^(?:true|false)$/i.test(ve)&&(ve=ve.toLowerCase()==="true"),ve}}).call(this)},{}],426:[function(oe,Ue,_e){(function(){"use strict";var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ve=oe("./defaults"),de=oe("./builder"),Ee=oe("./parser"),ke=oe("./processors"),_e.defaults=ve.defaults,_e.processors=ke,_e.ValidationError=function(me){Se(Pe,me);function Pe(fe){this.message=fe}return Pe}(Error),_e.Builder=de.Builder,_e.Parser=Ee.Parser,_e.parseString=Ee.parseString,_e.parseStringPromise=Ee.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,Ue,_e){(function(){Ue.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,Ue,_e){(function(){Ue.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe=[].slice,fe={}.hasOwnProperty;de=function(){var z,te,se,ie,le,ce;if(ce=arguments[0],le=2<=arguments.length?Pe.call(arguments,1):[],Se(Object.assign))Object.assign.apply(null,arguments);else for(z=0,se=le.length;z<se;z++)if(ie=le[z],ie!=null)for(te in ie)fe.call(ie,te)&&(ce[te]=ie[te]);return ce},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Ae=function(z){var te;return!!z&&((te=typeof z)=="function"||te==="object")},Ee=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},ke=function(z){var te;if(Ee(z))return!z.length;for(te in z)if(fe.call(z,te))return!1;return!0},me=function(z){var te,se;return Ae(z)&&(se=Object.getPrototypeOf(z))&&(te=se.constructor)&&typeof te=="function"&&te instanceof te&&Function.prototype.toString.call(te)===Function.prototype.toString.call(Object)},ve=function(z){return Se(z.valueOf)?z.valueOf():z},Ue.exports.assign=de,Ue.exports.isFunction=Se,Ue.exports.isObject=Ae,Ue.exports.isArray=Ee,Ue.exports.isEmpty=ke,Ue.exports.isPlainObject=me,Ue.exports.getValue=ve}).call(this)},{}],430:[function(oe,Ue,_e){(function(){Ue.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,Ue,_e){(function(){var de,ve,Ee;de=oe("./NodeType"),Ee=oe("./XMLNode"),Ue.exports=ve=function(){function ke(Se,Ae,me){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Ae==null)throw new Error("Missing attribute name. "+this.debugInfo(Ae));this.name=this.stringify.name(Ae),this.value=this.stringify.attValue(me),this.type=de.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(ke.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(ke.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(ke.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(ke.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ke.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ke.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ke.prototype,"specified",{get:function(){return!0}}),ke.prototype.clone=function(){return Object.create(this)},ke.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},ke.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},ke.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},ke}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),Ee=oe("./XMLCharacterData"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=de.CData,this.value=this.stringify.cdata(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.cdata(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,Ue,_e){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function Pe(){this.constructor=Se}return Pe.prototype=Ae.prototype,Se.prototype=new Pe,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLNode"),Ue.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me),this.value=""}return Object.defineProperty(Ae.prototype,"data",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Object.defineProperty(Ae.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){return this.value},set:function(me){return this.value=me||""}}),Ae.prototype.clone=function(){return Object.create(this)},Ae.prototype.substringData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.appendData=function(me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.insertData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.deleteData=function(me,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.replaceData=function(me,Pe,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isEqualNode=function(me){return!(!Ae.__super__.isEqualNode.apply(this,arguments).isEqualNode(me)||me.data!==this.data)},Ae}(ve)}).call(this)},{"./XMLNode":450}],434:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=de.Comment,this.value=this.stringify.comment(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.comment(this,this.options.writer.filterOptions(Pe))},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(oe,Ue,_e){(function(){var de,ve,Ee;ve=oe("./XMLDOMErrorHandler"),Ee=oe("./XMLDOMStringList"),Ue.exports=de=function(){function ke(){var Se;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new ve,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Se=Object.create(this.defaultParams)}return Object.defineProperty(ke.prototype,"parameterNames",{get:function(){return new Ee(Object.keys(this.defaultParams))}}),ke.prototype.getParameter=function(Se){return this.params.hasOwnProperty(Se)?this.params[Se]:null},ke.prototype.canSetParameter=function(Se,Ae){return!0},ke.prototype.setParameter=function(Se,Ae){return Ae!=null?this.params[Se]=Ae:delete this.params[Se]},ke}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,Ue,_e){(function(){var de;Ue.exports=de=function(){function ve(){}return ve.prototype.handleError=function(Ee){throw new Error(Ee)},ve}()}).call(this)},{}],437:[function(oe,Ue,_e){(function(){var de;Ue.exports=de=function(){function ve(){}return ve.prototype.hasFeature=function(Ee,ke){return!0},ve.prototype.createDocumentType=function(Ee,ke,Se){throw new Error("This DOM method is not implemented.")},ve.prototype.createDocument=function(Ee,ke,Se){throw new Error("This DOM method is not implemented.")},ve.prototype.createHTMLDocument=function(Ee){throw new Error("This DOM method is not implemented.")},ve.prototype.getFeature=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve}()}).call(this)},{}],438:[function(oe,Ue,_e){(function(){var de;Ue.exports=de=function(){function ve(Ee){this.arr=Ee||[]}return Object.defineProperty(ve.prototype,"length",{get:function(){return this.arr.length}}),ve.prototype.item=function(Ee){return this.arr[Ee]||null},ve.prototype.contains=function(Ee){return this.arr.indexOf(Ee)!==-1},ve}()}).call(this)},{}],439:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z,te,se,ie){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(fe));if(!te)throw new Error("Missing DTD attribute type. "+this.debugInfo(fe));if(!se)throw new Error("Missing DTD attribute default. "+this.debugInfo(fe));if(se.indexOf("#")!==0&&(se="#"+se),!se.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(fe));if(ie&&!se.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(fe));this.elementName=this.stringify.name(fe),this.type=de.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(te),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=se}return me.prototype.toString=function(Pe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(fe),this.type=de.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return me.prototype.toString=function(Pe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(me){Se(Pe,me);function Pe(fe,z,te,se){if(Pe.__super__.constructor.call(this,fe),te==null)throw new Error("Missing DTD entity name. "+this.debugInfo(te));if(se==null)throw new Error("Missing DTD entity value. "+this.debugInfo(te));if(this.pe=!!z,this.name=this.stringify.name(te),this.type=de.EntityDeclaration,!ke(se))this.value=this.stringify.dtdEntityValue(se),this.internal=!0;else{if(!se.pubID&&!se.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(te));if(se.pubID&&!se.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(te));if(this.internal=!1,se.pubID!=null&&(this.pubID=this.stringify.dtdPubID(se.pubID)),se.sysID!=null&&(this.sysID=this.stringify.dtdSysID(se.sysID)),se.nData!=null&&(this.nData=this.stringify.dtdNData(se.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(te))}}return Object.defineProperty(Pe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(Pe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(Pe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(Pe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlVersion",{get:function(){return null}}),Pe.prototype.toString=function(fe){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(fe))},Pe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing DTD notation name. "+this.debugInfo(fe));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(fe));this.name=this.stringify.name(fe),this.type=de.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(me.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(me.prototype,"systemId",{get:function(){return this.sysID}}),me.prototype.toString=function(Pe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(Pe))},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;ke=oe("./Utility").isObject,Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(me){Se(Pe,me);function Pe(fe,z,te,se){var ie;Pe.__super__.constructor.call(this,fe),ke(z)&&(ie=z,z=ie.version,te=ie.encoding,se=ie.standalone),z||(z="1.0"),this.type=de.Declaration,this.version=this.stringify.xmlVersion(z),te!=null&&(this.encoding=this.stringify.xmlEncoding(te)),se!=null&&(this.standalone=this.stringify.xmlStandalone(se))}return Pe.prototype.toString=function(fe){return this.options.writer.declaration(this,this.options.writer.filterOptions(fe))},Pe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function ce(){this.constructor=se}return ce.prototype=ie.prototype,se.prototype=new ce,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility").isObject,Pe=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLDTDAttList"),ke=oe("./XMLDTDEntity"),Ee=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),me=oe("./XMLNamedNodeMap"),Ue.exports=Ae=function(se){z(ie,se);function ie(le,ce,pe){var xe,je,De,Fe,Te,Me;if(ie.__super__.constructor.call(this,le),this.type=de.DocType,le.children){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.Element){this.name=xe.name;break}}this.documentObject=le,fe(ce)&&(Te=ce,ce=Te.pubID,pe=Te.sysID),pe==null&&(Me=[ce,pe],pe=Me[0],ce=Me[1]),ce!=null&&(this.pubID=this.stringify.dtdPubID(ce)),pe!=null&&(this.sysID=this.stringify.dtdSysID(pe))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ce,pe,xe,je;for(xe={},je=this.children,ce=0,pe=je.length;ce<pe;ce++)le=je[ce],le.type===de.EntityDeclaration&&!le.pe&&(xe[le.name]=le);return new me(xe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ce,pe,xe,je;for(xe={},je=this.children,ce=0,pe=je.length;ce<pe;ce++)le=je[ce],le.type===de.NotationDeclaration&&(xe[le.name]=le);return new me(xe)}}),Object.defineProperty(ie.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ie.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(ie.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),ie.prototype.element=function(le,ce){var pe;return pe=new Ee(this,le,ce),this.children.push(pe),this},ie.prototype.attList=function(le,ce,pe,xe,je){var De;return De=new ve(this,le,ce,pe,xe,je),this.children.push(De),this},ie.prototype.entity=function(le,ce){var pe;return pe=new ke(this,!1,le,ce),this.children.push(pe),this},ie.prototype.pEntity=function(le,ce){var pe;return pe=new ke(this,!0,le,ce),this.children.push(pe),this},ie.prototype.notation=function(le,ce){var pe;return pe=new Se(this,le,ce),this.children.push(pe),this},ie.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},ie.prototype.ele=function(le,ce){return this.element(le,ce)},ie.prototype.att=function(le,ce,pe,xe,je){return this.attList(le,ce,pe,xe,je)},ie.prototype.ent=function(le,ce){return this.entity(le,ce)},ie.prototype.pent=function(le,ce){return this.pEntity(le,ce)},ie.prototype.not=function(le,ce){return this.notation(le,ce)},ie.prototype.up=function(){return this.root()||this.documentObject},ie.prototype.isEqualNode=function(le){return!(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},ie}(Pe)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe=function(te,se){for(var ie in se)z.call(se,ie)&&(te[ie]=se[ie]);function le(){this.constructor=te}return le.prototype=se.prototype,te.prototype=new le,te.__super__=se.prototype,te},z={}.hasOwnProperty;Pe=oe("./Utility").isPlainObject,Ee=oe("./XMLDOMImplementation"),ve=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),de=oe("./NodeType"),me=oe("./XMLStringifier"),Ae=oe("./XMLStringWriter"),Ue.exports=ke=function(te){fe(se,te);function se(ie){se.__super__.constructor.call(this,null),this.name="#document",this.type=de.Document,this.documentURI=null,this.domConfig=new ve,ie||(ie={}),ie.writer||(ie.writer=new Ae),this.options=ie,this.stringify=new me(ie)}return Object.defineProperty(se.prototype,"implementation",{value:new Ee}),Object.defineProperty(se.prototype,"doctype",{get:function(){var ie,le,ce,pe;for(pe=this.children,le=0,ce=pe.length;le<ce;le++)if(ie=pe[le],ie.type===de.DocType)return ie;return null}}),Object.defineProperty(se.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(se.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(se.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(se.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].encoding:null}}),Object.defineProperty(se.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(se.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===de.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(se.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(se.prototype,"origin",{get:function(){return null}}),Object.defineProperty(se.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(se.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(se.prototype,"contentType",{get:function(){return null}}),se.prototype.end=function(ie){var le;return le={},ie?Pe(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},se.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},se.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.renameNode=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createNodeIterator=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se.prototype.createTreeWalker=function(ie,le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},se}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye={}.hasOwnProperty;Ge=oe("./Utility"),Me=Ge.isObject,Te=Ge.isFunction,Be=Ge.isPlainObject,Fe=Ge.getValue,de=oe("./NodeType"),se=oe("./XMLDocument"),le=oe("./XMLElement"),ke=oe("./XMLCData"),Se=oe("./XMLComment"),pe=oe("./XMLRaw"),De=oe("./XMLText"),ce=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),te=oe("./XMLDocType"),Ae=oe("./XMLDTDAttList"),Pe=oe("./XMLDTDEntity"),me=oe("./XMLDTDElement"),fe=oe("./XMLDTDNotation"),Ee=oe("./XMLAttribute"),je=oe("./XMLStringifier"),xe=oe("./XMLStringWriter"),ve=oe("./WriterState"),Ue.exports=ie=function(){function Ke(Ve,ot,ut){var ft;this.name="?xml",this.type=de.Document,Ve||(Ve={}),ft={},Ve.writer?Be(Ve.writer)&&(ft=Ve.writer,Ve.writer=new xe):Ve.writer=new xe,this.options=Ve,this.writer=Ve.writer,this.writerOptions=this.writer.filterOptions(ft),this.stringify=new je(Ve),this.onDataCallback=ot||function(){},this.onEndCallback=ut||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ke.prototype.createChildNode=function(Ve){var ot,ut,ft,St,Qe,rt,wt,Ct;switch(Ve.type){case de.CData:this.cdata(Ve.value);break;case de.Comment:this.comment(Ve.value);break;case de.Element:ft={},wt=Ve.attribs;for(ut in wt)Ye.call(wt,ut)&&(ot=wt[ut],ft[ut]=ot.value);this.node(Ve.name,ft);break;case de.Dummy:this.dummy();break;case de.Raw:this.raw(Ve.value);break;case de.Text:this.text(Ve.value);break;case de.ProcessingInstruction:this.instruction(Ve.target,Ve.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ve.constructor.name)}for(Ct=Ve.children,Qe=0,rt=Ct.length;Qe<rt;Qe++)St=Ct[Qe],this.createChildNode(St),St.type===de.Element&&this.up();return this},Ke.prototype.dummy=function(){return this},Ke.prototype.node=function(Ve,ot,ut){var ft;if(Ve==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ve));return this.openCurrent(),Ve=Fe(Ve),ot==null&&(ot={}),ot=Fe(ot),Me(ot)||(ft=[ot,ut],ut=ft[0],ot=ft[1]),this.currentNode=new le(this,Ve,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ut!=null&&this.text(ut),this},Ke.prototype.element=function(Ve,ot,ut){var ft,St,Qe,rt,wt,Ct;if(this.currentNode&&this.currentNode.type===de.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ve)||Me(Ve)||Te(Ve))for(rt=this.options.noValidation,this.options.noValidation=!0,Ct=new se(this.options).element("TEMP_ROOT"),Ct.element(Ve),this.options.noValidation=rt,wt=Ct.children,St=0,Qe=wt.length;St<Qe;St++)ft=wt[St],this.createChildNode(ft),ft.type===de.Element&&this.up();else this.node(Ve,ot,ut);return this},Ke.prototype.attribute=function(Ve,ot){var ut,ft;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ve));if(Ve!=null&&(Ve=Fe(Ve)),Me(Ve))for(ut in Ve)Ye.call(Ve,ut)&&(ft=Ve[ut],this.attribute(ut,ft));else Te(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Ve]=new Ee(this,Ve,""):ot!=null&&(this.currentNode.attribs[Ve]=new Ee(this,Ve,ot));return this},Ke.prototype.text=function(Ve){var ot;return this.openCurrent(),ot=new De(this,Ve),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.cdata=function(Ve){var ot;return this.openCurrent(),ot=new ke(this,Ve),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.comment=function(Ve){var ot;return this.openCurrent(),ot=new Se(this,Ve),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.raw=function(Ve){var ot;return this.openCurrent(),ot=new pe(this,Ve),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.instruction=function(Ve,ot){var ut,ft,St,Qe,rt;if(this.openCurrent(),Ve!=null&&(Ve=Fe(Ve)),ot!=null&&(ot=Fe(ot)),Array.isArray(Ve))for(ut=0,Qe=Ve.length;ut<Qe;ut++)ft=Ve[ut],this.instruction(ft);else if(Me(Ve))for(ft in Ve)Ye.call(Ve,ft)&&(St=Ve[ft],this.instruction(ft,St));else Te(ot)&&(ot=ot.apply()),rt=new ce(this,Ve,ot),this.onData(this.writer.processingInstruction(rt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ke.prototype.declaration=function(Ve,ot,ut){var ft;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ft=new z(this,Ve,ot,ut),this.onData(this.writer.declaration(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.doctype=function(Ve,ot,ut){if(this.openCurrent(),Ve==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new te(this,ot,ut),this.currentNode.rootNodeName=Ve,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ke.prototype.dtdElement=function(Ve,ot){var ut;return this.openCurrent(),ut=new me(this,Ve,ot),this.onData(this.writer.dtdElement(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.attList=function(Ve,ot,ut,ft,St){var Qe;return this.openCurrent(),Qe=new Ae(this,Ve,ot,ut,ft,St),this.onData(this.writer.dtdAttList(Qe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.entity=function(Ve,ot){var ut;return this.openCurrent(),ut=new Pe(this,!1,Ve,ot),this.onData(this.writer.dtdEntity(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.pEntity=function(Ve,ot){var ut;return this.openCurrent(),ut=new Pe(this,!0,Ve,ot),this.onData(this.writer.dtdEntity(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.notation=function(Ve,ot){var ut;return this.openCurrent(),ut=new fe(this,Ve,ot),this.onData(this.writer.dtdNotation(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ke.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},Ke.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ke.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ke.prototype.openNode=function(Ve){var ot,ut,ft,St;if(!Ve.isOpen){if(!this.root&&this.currentLevel===0&&Ve.type===de.Element&&(this.root=Ve),ut="",Ve.type===de.Element){this.writerOptions.state=ve.OpenTag,ut=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"<"+Ve.name,St=Ve.attribs;for(ft in St)Ye.call(St,ft)&&(ot=St[ft],ut+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));ut+=(Ve.children?">":"/>")+this.writer.endline(Ve,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.InsideTag}else this.writerOptions.state=ve.OpenTag,ut=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ve.rootNodeName,Ve.pubID&&Ve.sysID?ut+=' PUBLIC "'+Ve.pubID+'" "'+Ve.sysID+'"':Ve.sysID&&(ut+=' SYSTEM "'+Ve.sysID+'"'),Ve.children?(ut+=" [",this.writerOptions.state=ve.InsideTag):(this.writerOptions.state=ve.CloseTag,ut+=">"),ut+=this.writer.endline(Ve,this.writerOptions,this.currentLevel);return this.onData(ut,this.currentLevel),Ve.isOpen=!0}},Ke.prototype.closeNode=function(Ve){var ot;if(!Ve.isClosed)return ot="",this.writerOptions.state=ve.CloseTag,Ve.type===de.Element?ot=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"</"+Ve.name+">"+this.writer.endline(Ve,this.writerOptions,this.currentLevel):ot=this.writer.indent(Ve,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ve,this.writerOptions,this.currentLevel),this.writerOptions.state=ve.None,this.onData(ot,this.currentLevel),Ve.isClosed=!0},Ke.prototype.onData=function(Ve,ot){return this.documentStarted=!0,this.onDataCallback(Ve,ot+1)},Ke.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ke.prototype.debugInfo=function(Ve){return Ve==null?"":"node: <"+Ve+">"},Ke.prototype.ele=function(){return this.element.apply(this,arguments)},Ke.prototype.nod=function(Ve,ot,ut){return this.node(Ve,ot,ut)},Ke.prototype.txt=function(Ve){return this.text(Ve)},Ke.prototype.dat=function(Ve){return this.cdata(Ve)},Ke.prototype.com=function(Ve){return this.comment(Ve)},Ke.prototype.ins=function(Ve,ot){return this.instruction(Ve,ot)},Ke.prototype.dec=function(Ve,ot,ut){return this.declaration(Ve,ot,ut)},Ke.prototype.dtd=function(Ve,ot,ut){return this.doctype(Ve,ot,ut)},Ke.prototype.e=function(Ve,ot,ut){return this.element(Ve,ot,ut)},Ke.prototype.n=function(Ve,ot,ut){return this.node(Ve,ot,ut)},Ke.prototype.t=function(Ve){return this.text(Ve)},Ke.prototype.d=function(Ve){return this.cdata(Ve)},Ke.prototype.c=function(Ve){return this.comment(Ve)},Ke.prototype.r=function(Ve){return this.raw(Ve)},Ke.prototype.i=function(Ve,ot){return this.instruction(Ve,ot)},Ke.prototype.att=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ke.prototype.a=function(){return this.currentNode&&this.currentNode.type===de.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ke.prototype.ent=function(Ve,ot){return this.entity(Ve,ot)},Ke.prototype.pent=function(Ve,ot){return this.pEntity(Ve,ot)},Ke.prototype.not=function(Ve,ot){return this.notation(Ve,ot)},Ke}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;Ee=oe("./XMLNode"),de=oe("./NodeType"),Ue.exports=ve=function(Ae){ke(me,Ae);function me(Pe){me.__super__.constructor.call(this,Pe),this.type=de.Dummy}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return""},me}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z=function(se,ie){for(var le in ie)te.call(ie,le)&&(se[le]=ie[le]);function ce(){this.constructor=se}return ce.prototype=ie.prototype,se.prototype=new ce,se.__super__=ie.prototype,se},te={}.hasOwnProperty;fe=oe("./Utility"),Pe=fe.isObject,me=fe.isFunction,Ae=fe.getValue,Se=oe("./XMLNode"),de=oe("./NodeType"),ve=oe("./XMLAttribute"),ke=oe("./XMLNamedNodeMap"),Ue.exports=Ee=function(se){z(ie,se);function ie(le,ce,pe){var xe,je,De,Fe;if(ie.__super__.constructor.call(this,le),ce==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ce),this.type=de.Element,this.attribs={},this.schemaTypeInfo=null,pe!=null&&this.attribute(pe),le.type===de.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,De=Fe.length;je<De;je++)if(xe=Fe[je],xe.type===de.DocType){xe.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new ke(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ce,pe,xe;pe=Object.create(this),pe.isRoot&&(pe.documentObject=null),pe.attribs={},xe=this.attribs;for(ce in xe)te.call(xe,ce)&&(le=xe[ce],pe.attribs[ce]=le.clone());return pe.children=[],this.children.forEach(function(je){var De;return De=je.clone(),De.parent=pe,pe.children.push(De)}),pe},ie.prototype.attribute=function(le,ce){var pe,xe;if(le!=null&&(le=Ae(le)),Pe(le))for(pe in le)te.call(le,pe)&&(xe=le[pe],this.attribute(pe,xe));else me(ce)&&(ce=ce.apply()),this.options.keepNullAttributes&&ce==null?this.attribs[le]=new ve(this,le,""):ce!=null&&(this.attribs[le]=new ve(this,le,ce));return this},ie.prototype.removeAttribute=function(le){var ce,pe,xe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Ae(le),Array.isArray(le))for(pe=0,xe=le.length;pe<xe;pe++)ce=le[pe],delete this.attribs[ce];else delete this.attribs[le];return this},ie.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},ie.prototype.att=function(le,ce){return this.attribute(le,ce)},ie.prototype.a=function(le,ce){return this.attribute(le,ce)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},ie.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,ce,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},ie.prototype.hasAttributeNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,ce){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ce},ie.prototype.setIdAttributeNS=function(le,ce,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ce){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.isEqualNode=function(le){var ce,pe,xe;if(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ce=pe=0,xe=this.attribs.length-1;0<=xe?pe<=xe:pe>=xe;ce=0<=xe?++pe:--pe)if(!this.attribs[ce].isEqualNode(le.attribs[ce]))return!1;return!0},ie}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(oe,Ue,_e){(function(){var de;Ue.exports=de=function(){function ve(Ee){this.nodes=Ee}return Object.defineProperty(ve.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),ve.prototype.clone=function(){return this.nodes=null},ve.prototype.getNamedItem=function(Ee){return this.nodes[Ee]},ve.prototype.setNamedItem=function(Ee){var ke;return ke=this.nodes[Ee.nodeName],this.nodes[Ee.nodeName]=Ee,ke||null},ve.prototype.removeNamedItem=function(Ee){var ke;return ke=this.nodes[Ee],delete this.nodes[Ee],ke||null},ve.prototype.item=function(Ee){return this.nodes[Object.keys(this.nodes)[Ee]]||null},ve.prototype.getNamedItemNS=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve.prototype.setNamedItemNS=function(Ee){throw new Error("This DOM method is not implemented.")},ve.prototype.removeNamedItemNS=function(Ee,ke){throw new Error("This DOM method is not implemented.")},ve}()}).call(this)},{}],450:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je,De,Fe={}.hasOwnProperty;De=oe("./Utility"),je=De.isObject,xe=De.isFunction,pe=De.isEmpty,ce=De.getValue,Pe=null,Ee=null,ke=null,Se=null,Ae=null,ie=null,le=null,se=null,me=null,ve=null,te=null,fe=null,de=null,Ue.exports=z=function(){function Te(Me){this.parent=Me,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,Pe||(Pe=oe("./XMLElement"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Ae=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),se=oe("./XMLProcessingInstruction"),me=oe("./XMLDummy"),ve=oe("./NodeType"),te=oe("./XMLNodeList"),fe=oe("./XMLNamedNodeMap"),de=oe("./DocumentPosition"))}return Object.defineProperty(Te.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Te.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Te.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Te.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Te.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new te(this.children)),this.childNodeList}}),Object.defineProperty(Te.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Te.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Te.prototype,"previousSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me-1]||null}}),Object.defineProperty(Te.prototype,"nextSibling",{get:function(){var Me;return Me=this.parent.children.indexOf(this),this.parent.children[Me+1]||null}}),Object.defineProperty(Te.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){var Me,Be,Ge,Ye,Ke;if(this.nodeType===ve.Element||this.nodeType===ve.DocumentFragment){for(Ke="",Ye=this.children,Be=0,Ge=Ye.length;Be<Ge;Be++)Me=Ye[Be],Me.textContent&&(Ke+=Me.textContent);return Ke}else return null},set:function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Te.prototype.setParent=function(Me){var Be,Ge,Ye,Ke,Ve;for(this.parent=Me,Me&&(this.options=Me.options,this.stringify=Me.stringify),Ke=this.children,Ve=[],Ge=0,Ye=Ke.length;Ge<Ye;Ge++)Be=Ke[Ge],Ve.push(Be.setParent(this));return Ve},Te.prototype.element=function(Me,Be,Ge){var Ye,Ke,Ve,ot,ut,ft,St,Qe,rt,wt,Ct;if(ft=null,Be===null&&Ge==null&&(rt=[{},null],Be=rt[0],Ge=rt[1]),Be==null&&(Be={}),Be=ce(Be),je(Be)||(wt=[Be,Ge],Ge=wt[0],Be=wt[1]),Me!=null&&(Me=ce(Me)),Array.isArray(Me))for(Ve=0,St=Me.length;Ve<St;Ve++)Ke=Me[Ve],ft=this.element(Ke);else if(xe(Me))ft=this.element(Me.apply());else if(je(Me)){for(ut in Me)if(Fe.call(Me,ut))if(Ct=Me[ut],xe(Ct)&&(Ct=Ct.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ut.indexOf(this.stringify.convertAttKey)===0)ft=this.attribute(ut.substr(this.stringify.convertAttKey.length),Ct);else if(!this.options.separateArrayItems&&Array.isArray(Ct)&&pe(Ct))ft=this.dummy();else if(je(Ct)&&pe(Ct))ft=this.element(ut);else if(!this.options.keepNullNodes&&Ct==null)ft=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Ct))for(ot=0,Qe=Ct.length;ot<Qe;ot++)Ke=Ct[ot],Ye={},Ye[ut]=Ke,ft=this.element(Ye);else je(Ct)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ut.indexOf(this.stringify.convertTextKey)===0?ft=this.element(Ct):(ft=this.element(ut),ft.element(Ct)):ft=this.element(ut,Ct)}else!this.options.keepNullNodes&&Ge===null?ft=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Me.indexOf(this.stringify.convertTextKey)===0?ft=this.text(Ge):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Me.indexOf(this.stringify.convertCDataKey)===0?ft=this.cdata(Ge):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Me.indexOf(this.stringify.convertCommentKey)===0?ft=this.comment(Ge):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Me.indexOf(this.stringify.convertRawKey)===0?ft=this.raw(Ge):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Me.indexOf(this.stringify.convertPIKey)===0?ft=this.instruction(Me.substr(this.stringify.convertPIKey.length),Ge):ft=this.node(Me,Be,Ge);if(ft==null)throw new Error("Could not create any elements with: "+Me+". "+this.debugInfo());return ft},Te.prototype.insertBefore=function(Me,Be,Ge){var Ye,Ke,Ve,ot,ut;if(Me!=null&&Me.type)return Ve=Me,ot=Be,Ve.setParent(this),ot?(Ke=children.indexOf(ot),ut=children.splice(Ke),children.push(Ve),Array.prototype.push.apply(children,ut)):children.push(Ve),Ve;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Me));return Ke=this.parent.children.indexOf(this),ut=this.parent.children.splice(Ke),Ye=this.parent.element(Me,Be,Ge),Array.prototype.push.apply(this.parent.children,ut),Ye},Te.prototype.insertAfter=function(Me,Be,Ge){var Ye,Ke,Ve;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Me));return Ke=this.parent.children.indexOf(this),Ve=this.parent.children.splice(Ke+1),Ye=this.parent.element(Me,Be,Ge),Array.prototype.push.apply(this.parent.children,Ve),Ye},Te.prototype.remove=function(){var Me,Be;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Me=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Me,Me-Me+1].concat(Be=[])),this.parent},Te.prototype.node=function(Me,Be,Ge){var Ye,Ke;return Me!=null&&(Me=ce(Me)),Be||(Be={}),Be=ce(Be),je(Be)||(Ke=[Be,Ge],Ge=Ke[0],Be=Ke[1]),Ye=new Pe(this,Me,Be),Ge!=null&&Ye.text(Ge),this.children.push(Ye),Ye},Te.prototype.text=function(Me){var Be;return je(Me)&&this.element(Me),Be=new le(this,Me),this.children.push(Be),this},Te.prototype.cdata=function(Me){var Be;return Be=new Ee(this,Me),this.children.push(Be),this},Te.prototype.comment=function(Me){var Be;return Be=new ke(this,Me),this.children.push(Be),this},Te.prototype.commentBefore=function(Me){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.commentAfter=function(Me){var Be,Ge,Ye;return Ge=this.parent.children.indexOf(this),Ye=this.parent.children.splice(Ge+1),Be=this.parent.comment(Me),Array.prototype.push.apply(this.parent.children,Ye),this},Te.prototype.raw=function(Me){var Be;return Be=new ie(this,Me),this.children.push(Be),this},Te.prototype.dummy=function(){var Me;return Me=new me(this),Me},Te.prototype.instruction=function(Me,Be){var Ge,Ye,Ke,Ve,ot;if(Me!=null&&(Me=ce(Me)),Be!=null&&(Be=ce(Be)),Array.isArray(Me))for(Ve=0,ot=Me.length;Ve<ot;Ve++)Ge=Me[Ve],this.instruction(Ge);else if(je(Me))for(Ge in Me)Fe.call(Me,Ge)&&(Ye=Me[Ge],this.instruction(Ge,Ye));else xe(Be)&&(Be=Be.apply()),Ke=new se(this,Me,Be),this.children.push(Ke);return this},Te.prototype.instructionBefore=function(Me,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye),Ge=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.instructionAfter=function(Me,Be){var Ge,Ye,Ke;return Ye=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ye+1),Ge=this.parent.instruction(Me,Be),Array.prototype.push.apply(this.parent.children,Ke),this},Te.prototype.declaration=function(Me,Be,Ge){var Ye,Ke;return Ye=this.document(),Ke=new Se(Ye,Me,Be,Ge),Ye.children.length===0?Ye.children.unshift(Ke):Ye.children[0].type===ve.Declaration?Ye.children[0]=Ke:Ye.children.unshift(Ke),Ye.root()||Ye},Te.prototype.dtd=function(Me,Be){var Ge,Ye,Ke,Ve,ot,ut,ft,St,Qe,rt;for(Ye=this.document(),Ke=new Ae(Ye,Me,Be),Qe=Ye.children,Ve=ot=0,ft=Qe.length;ot<ft;Ve=++ot)if(Ge=Qe[Ve],Ge.type===ve.DocType)return Ye.children[Ve]=Ke,Ke;for(rt=Ye.children,Ve=ut=0,St=rt.length;ut<St;Ve=++ut)if(Ge=rt[Ve],Ge.isRoot)return Ye.children.splice(Ve,0,Ke),Ke;return Ye.children.push(Ke),Ke},Te.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Te.prototype.root=function(){var Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me.rootObject;if(Me.isRoot)return Me;Me=Me.parent}},Te.prototype.document=function(){var Me;for(Me=this;Me;){if(Me.type===ve.Document)return Me;Me=Me.parent}},Te.prototype.end=function(Me){return this.document().end(Me)},Te.prototype.prev=function(){var Me;if(Me=this.parent.children.indexOf(this),Me<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Me-1]},Te.prototype.next=function(){var Me;if(Me=this.parent.children.indexOf(this),Me===-1||Me===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Me+1]},Te.prototype.importDocument=function(Me){var Be;return Be=Me.root().clone(),Be.parent=this,Be.isRoot=!1,this.children.push(Be),this},Te.prototype.debugInfo=function(Me){var Be,Ge;return Me=Me||this.name,Me==null&&!((Be=this.parent)!=null&&Be.name)?"":Me==null?"parent: <"+this.parent.name+">":(Ge=this.parent)!=null&&Ge.name?"node: <"+Me+">, parent: <"+this.parent.name+">":"node: <"+Me+">"},Te.prototype.ele=function(Me,Be,Ge){return this.element(Me,Be,Ge)},Te.prototype.nod=function(Me,Be,Ge){return this.node(Me,Be,Ge)},Te.prototype.txt=function(Me){return this.text(Me)},Te.prototype.dat=function(Me){return this.cdata(Me)},Te.prototype.com=function(Me){return this.comment(Me)},Te.prototype.ins=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.doc=function(){return this.document()},Te.prototype.dec=function(Me,Be,Ge){return this.declaration(Me,Be,Ge)},Te.prototype.e=function(Me,Be,Ge){return this.element(Me,Be,Ge)},Te.prototype.n=function(Me,Be,Ge){return this.node(Me,Be,Ge)},Te.prototype.t=function(Me){return this.text(Me)},Te.prototype.d=function(Me){return this.cdata(Me)},Te.prototype.c=function(Me){return this.comment(Me)},Te.prototype.r=function(Me){return this.raw(Me)},Te.prototype.i=function(Me,Be){return this.instruction(Me,Be)},Te.prototype.u=function(){return this.up()},Te.prototype.importXMLBuilder=function(Me){return this.importDocument(Me)},Te.prototype.replaceChild=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.removeChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendChild=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.hasChildNodes=function(){return this.children.length!==0},Te.prototype.cloneNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isSupported=function(Me,Be){return!0},Te.prototype.hasAttributes=function(){return this.attribs.length!==0},Te.prototype.compareDocumentPosition=function(Me){var Be,Ge;return Be=this,Be===Me?0:this.document()!==Me.document()?(Ge=de.Disconnected|de.ImplementationSpecific,Math.random()<.5?Ge|=de.Preceding:Ge|=de.Following,Ge):Be.isAncestor(Me)?de.Contains|de.Preceding:Be.isDescendant(Me)?de.Contains|de.Following:Be.isPreceding(Me)?de.Preceding:de.Following},Te.prototype.isSameNode=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupPrefix=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isDefaultNamespace=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.lookupNamespaceURI=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(Me){var Be,Ge,Ye;if(Me.nodeType!==this.nodeType||Me.children.length!==this.children.length)return!1;for(Be=Ge=0,Ye=this.children.length-1;0<=Ye?Ge<=Ye:Ge>=Ye;Be=0<=Ye?++Ge:--Ge)if(!this.children[Be].isEqualNode(Me.children[Be]))return!1;return!0},Te.prototype.getFeature=function(Me,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.setUserData=function(Me,Be,Ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.getUserData=function(Me){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.contains=function(Me){return Me?Me===this||this.isDescendant(Me):!1},Te.prototype.isDescendant=function(Me){var Be,Ge,Ye,Ke,Ve;for(Ve=this.children,Ye=0,Ke=Ve.length;Ye<Ke;Ye++)if(Be=Ve[Ye],Me===Be||(Ge=Be.isDescendant(Me),Ge))return!0;return!1},Te.prototype.isAncestor=function(Me){return Me.isDescendant(this)},Te.prototype.isPreceding=function(Me){var Be,Ge;return Be=this.treePosition(Me),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be<Ge},Te.prototype.isFollowing=function(Me){var Be,Ge;return Be=this.treePosition(Me),Ge=this.treePosition(this),Be===-1||Ge===-1?!1:Be>Ge},Te.prototype.treePosition=function(Me){var Be,Ge;return Ge=0,Be=!1,this.foreachTreeNode(this.document(),function(Ye){if(Ge++,!Be&&Ye===Me)return Be=!0}),Be?Ge:-1},Te.prototype.foreachTreeNode=function(Me,Be){var Ge,Ye,Ke,Ve,ot;for(Me||(Me=this.document()),Ve=Me.children,Ye=0,Ke=Ve.length;Ye<Ke;Ye++){if(Ge=Ve[Ye],ot=Be(Ge))return ot;if(ot=this.foreachTreeNode(Ge,Be),ot)return ot}},Te}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(oe,Ue,_e){(function(){var de;Ue.exports=de=function(){function ve(Ee){this.nodes=Ee}return Object.defineProperty(ve.prototype,"length",{get:function(){return this.nodes.length||0}}),ve.prototype.clone=function(){return this.nodes=null},ve.prototype.item=function(Ee){return this.nodes[Ee]||null},ve}()}).call(this)},{}],452:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe,z){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=de.ProcessingInstruction,this.target=this.stringify.insTarget(fe),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(Pe))},me.prototype.isEqualNode=function(Pe){return!(!me.__super__.isEqualNode.apply(this,arguments).isEqualNode(Pe)||Pe.target!==this.target)},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLNode"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=de.Raw,this.value=this.stringify.raw(fe)}return me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.raw(this,this.options.writer.filterOptions(Pe))},me}(ve)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se=function(me,Pe){for(var fe in Pe)Ae.call(Pe,fe)&&(me[fe]=Pe[fe]);function z(){this.constructor=me}return z.prototype=Pe.prototype,me.prototype=new z,me.__super__=Pe.prototype,me},Ae={}.hasOwnProperty;de=oe("./NodeType"),ke=oe("./XMLWriterBase"),ve=oe("./WriterState"),Ue.exports=Ee=function(me){Se(Pe,me);function Pe(fe,z){this.stream=fe,Pe.__super__.constructor.call(this,z)}return Pe.prototype.endline=function(fe,z,te){return fe.isLastRootNode&&z.state===ve.CloseTag?"":Pe.__super__.endline.call(this,fe,z,te)},Pe.prototype.document=function(fe,z){var te,se,ie,le,ce,pe,xe,je,De;for(xe=fe.children,se=ie=0,ce=xe.length;ie<ce;se=++ie)te=xe[se],te.isLastRootNode=se===fe.children.length-1;for(z=this.filterOptions(z),je=fe.children,De=[],le=0,pe=je.length;le<pe;le++)te=je[le],De.push(this.writeChildNode(te,z,0));return De},Pe.prototype.attribute=function(fe,z,te){return this.stream.write(Pe.__super__.attribute.call(this,fe,z,te))},Pe.prototype.cdata=function(fe,z,te){return this.stream.write(Pe.__super__.cdata.call(this,fe,z,te))},Pe.prototype.comment=function(fe,z,te){return this.stream.write(Pe.__super__.comment.call(this,fe,z,te))},Pe.prototype.declaration=function(fe,z,te){return this.stream.write(Pe.__super__.declaration.call(this,fe,z,te))},Pe.prototype.docType=function(fe,z,te){var se,ie,le,ce;if(te||(te=0),this.openNode(fe,z,te),z.state=ve.OpenTag,this.stream.write(this.indent(fe,z,te)),this.stream.write("<!DOCTYPE "+fe.root().name),fe.pubID&&fe.sysID?this.stream.write(' PUBLIC "'+fe.pubID+'" "'+fe.sysID+'"'):fe.sysID&&this.stream.write(' SYSTEM "'+fe.sysID+'"'),fe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(fe,z,te)),z.state=ve.InsideTag,ce=fe.children,ie=0,le=ce.length;ie<le;ie++)se=ce[ie],this.writeChildNode(se,z,te+1);z.state=ve.CloseTag,this.stream.write("]")}return z.state=ve.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(fe,z,te)),z.state=ve.None,this.closeNode(fe,z,te)},Pe.prototype.element=function(fe,z,te){var se,ie,le,ce,pe,xe,je,De,Fe,Te;te||(te=0),this.openNode(fe,z,te),z.state=ve.OpenTag,this.stream.write(this.indent(fe,z,te)+"<"+fe.name),Fe=fe.attribs;for(je in Fe)Ae.call(Fe,je)&&(se=Fe[je],this.attribute(se,z,te));if(le=fe.children.length,ce=le===0?null:fe.children[0],le===0||fe.children.every(function(Me){return(Me.type===de.Text||Me.type===de.Raw)&&Me.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=ve.CloseTag,this.stream.write("</"+fe.name+">")):(z.state=ve.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ce.type===de.Text||ce.type===de.Raw)&&ce.value!=null)this.stream.write(">"),z.state=ve.InsideTag,z.suppressPrettyCount++,De=!0,this.writeChildNode(ce,z,te+1),z.suppressPrettyCount--,De=!1,z.state=ve.CloseTag,this.stream.write("</"+fe.name+">");else{for(this.stream.write(">"+this.endline(fe,z,te)),z.state=ve.InsideTag,Te=fe.children,pe=0,xe=Te.length;pe<xe;pe++)ie=Te[pe],this.writeChildNode(ie,z,te+1);z.state=ve.CloseTag,this.stream.write(this.indent(fe,z,te)+"</"+fe.name+">")}return this.stream.write(this.endline(fe,z,te)),z.state=ve.None,this.closeNode(fe,z,te)},Pe.prototype.processingInstruction=function(fe,z,te){return this.stream.write(Pe.__super__.processingInstruction.call(this,fe,z,te))},Pe.prototype.raw=function(fe,z,te){return this.stream.write(Pe.__super__.raw.call(this,fe,z,te))},Pe.prototype.text=function(fe,z,te){return this.stream.write(Pe.__super__.text.call(this,fe,z,te))},Pe.prototype.dtdAttList=function(fe,z,te){return this.stream.write(Pe.__super__.dtdAttList.call(this,fe,z,te))},Pe.prototype.dtdElement=function(fe,z,te){return this.stream.write(Pe.__super__.dtdElement.call(this,fe,z,te))},Pe.prototype.dtdEntity=function(fe,z,te){return this.stream.write(Pe.__super__.dtdEntity.call(this,fe,z,te))},Pe.prototype.dtdNotation=function(fe,z,te){return this.stream.write(Pe.__super__.dtdNotation.call(this,fe,z,te))},Pe}(ke)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,Ue,_e){(function(){var de,ve,Ee=function(Se,Ae){for(var me in Ae)ke.call(Ae,me)&&(Se[me]=Ae[me]);function Pe(){this.constructor=Se}return Pe.prototype=Ae.prototype,Se.prototype=new Pe,Se.__super__=Ae.prototype,Se},ke={}.hasOwnProperty;ve=oe("./XMLWriterBase"),Ue.exports=de=function(Se){Ee(Ae,Se);function Ae(me){Ae.__super__.constructor.call(this,me)}return Ae.prototype.document=function(me,Pe){var fe,z,te,se,ie;for(Pe=this.filterOptions(Pe),se="",ie=me.children,z=0,te=ie.length;z<te;z++)fe=ie[z],se+=this.writeChildNode(fe,Pe,0);return Pe.pretty&&se.slice(-Pe.newline.length)===Pe.newline&&(se=se.slice(0,-Pe.newline.length)),se},Ae}(ve)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,Ue,_e){(function(){var de,ve=function(ke,Se){return function(){return ke.apply(Se,arguments)}},Ee={}.hasOwnProperty;Ue.exports=de=function(){function ke(Se){this.assertLegalName=ve(this.assertLegalName,this),this.assertLegalChar=ve(this.assertLegalChar,this);var Ae,me,Pe;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),me=Se.stringify||{};for(Ae in me)Ee.call(me,Ae)&&(Pe=me[Ae],this[Ae]=Pe)}return ke.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},ke.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},ke.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},ke.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},ke.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},ke.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},ke.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},ke.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},ke.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},ke.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},ke.prototype.convertAttKey="@",ke.prototype.convertPIKey="?",ke.prototype.convertTextKey="#text",ke.prototype.convertCDataKey="#cdata",ke.prototype.convertCommentKey="#comment",ke.prototype.convertRawKey="#raw",ke.prototype.assertLegalChar=function(Se){var Ae,me;if(this.options.noValidation)return Se;if(Ae="",this.options.version==="1.0"){if(Ae=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae))throw new Error("Invalid character in string: "+Se+" at index "+me.index)}else if(this.options.version==="1.1"&&(Ae=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,me=Se.match(Ae)))throw new Error("Invalid character in string: "+Se+" at index "+me.index);return Se},ke.prototype.assertLegalName=function(Se){var Ae;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Ae=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!Se.match(Ae))throw new Error("Invalid character in name");return Se},ke.prototype.textEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},ke.prototype.attEscape=function(Se){var Ae;return this.options.noValidation?Se:(Ae=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Ae,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},ke}()}).call(this)},{}],457:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke=function(Ae,me){for(var Pe in me)Se.call(me,Pe)&&(Ae[Pe]=me[Pe]);function fe(){this.constructor=Ae}return fe.prototype=me.prototype,Ae.prototype=new fe,Ae.__super__=me.prototype,Ae},Se={}.hasOwnProperty;de=oe("./NodeType"),ve=oe("./XMLCharacterData"),Ue.exports=Ee=function(Ae){ke(me,Ae);function me(Pe,fe){if(me.__super__.constructor.call(this,Pe),fe==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=de.Text,this.value=this.stringify.text(fe)}return Object.defineProperty(me.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(me.prototype,"wholeText",{get:function(){var Pe,fe,z;for(z="",fe=this.previousSibling;fe;)z=fe.data+z,fe=fe.previousSibling;for(z+=this.data,Pe=this.nextSibling;Pe;)z=z+Pe.data,Pe=Pe.nextSibling;return z}}),me.prototype.clone=function(){return Object.create(this)},me.prototype.toString=function(Pe){return this.options.writer.text(this,this.options.writer.filterOptions(Pe))},me.prototype.splitText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me.prototype.replaceWholeText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},me}(ve)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z,te,se,ie,le,ce,pe,xe,je={}.hasOwnProperty;xe=oe("./Utility").assign,de=oe("./NodeType"),fe=oe("./XMLDeclaration"),z=oe("./XMLDocType"),Ee=oe("./XMLCData"),ke=oe("./XMLComment"),se=oe("./XMLElement"),le=oe("./XMLRaw"),ce=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),te=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Ae=oe("./XMLDTDElement"),me=oe("./XMLDTDEntity"),Pe=oe("./XMLDTDNotation"),ve=oe("./WriterState"),Ue.exports=pe=function(){function De(Fe){var Te,Me,Be;Fe||(Fe={}),this.options=Fe,Me=Fe.writer||{};for(Te in Me)je.call(Me,Te)&&(Be=Me[Te],this["_"+Te]=this[Te],this[Te]=Be)}return De.prototype.filterOptions=function(Fe){var Te,Me,Be,Ge,Ye,Ke,Ve,ot;return Fe||(Fe={}),Fe=xe({},this.options,Fe),Te={writer:this},Te.pretty=Fe.pretty||!1,Te.allowEmpty=Fe.allowEmpty||!1,Te.indent=(Me=Fe.indent)!=null?Me:" ",Te.newline=(Be=Fe.newline)!=null?Be:`
|
|
`,Te.offset=(Ge=Fe.offset)!=null?Ge:0,Te.dontPrettyTextNodes=(Ye=(Ke=Fe.dontPrettyTextNodes)!=null?Ke:Fe.dontprettytextnodes)!=null?Ye:0,Te.spaceBeforeSlash=(Ve=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Ve:"",Te.spaceBeforeSlash===!0&&(Te.spaceBeforeSlash=" "),Te.suppressPrettyCount=0,Te.user={},Te.state=ve.None,Te},De.prototype.indent=function(Fe,Te,Me){var Be;return!Te.pretty||Te.suppressPrettyCount?"":Te.pretty&&(Be=(Me||0)+Te.offset+1,Be>0)?new Array(Be).join(Te.indent):""},De.prototype.endline=function(Fe,Te,Me){return!Te.pretty||Te.suppressPrettyCount?"":Te.newline},De.prototype.attribute=function(Fe,Te,Me){var Be;return this.openAttribute(Fe,Te,Me),Be=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Te,Me),Be},De.prototype.cdata=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<![CDATA[",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+="]]>"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.comment=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!-- ",Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=" -->"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.declaration=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?xml",Te.state=ve.InsideTag,Be+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Be+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Be+=' standalone="'+Fe.standalone+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.docType=function(Fe,Te,Me){var Be,Ge,Ye,Ke,Ve;if(Me||(Me=0),this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Ke=this.indent(Fe,Te,Me),Ke+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ke+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ke+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ke+=" [",Ke+=this.endline(Fe,Te,Me),Te.state=ve.InsideTag,Ve=Fe.children,Ge=0,Ye=Ve.length;Ge<Ye;Ge++)Be=Ve[Ge],Ke+=this.writeChildNode(Be,Te,Me+1);Te.state=ve.CloseTag,Ke+="]"}return Te.state=ve.CloseTag,Ke+=Te.spaceBeforeSlash+">",Ke+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Ke},De.prototype.element=function(Fe,Te,Me){var Be,Ge,Ye,Ke,Ve,ot,ut,ft,St,Qe,rt,wt,Ct,bt;Me||(Me=0),Qe=!1,rt="",this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,rt+=this.indent(Fe,Te,Me)+"<"+Fe.name,wt=Fe.attribs;for(St in wt)je.call(wt,St)&&(Be=wt[St],rt+=this.attribute(Be,Te,Me));if(Ye=Fe.children.length,Ke=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(ct){return(ct.type===de.Text||ct.type===de.Raw)&&ct.value===""}))Te.allowEmpty?(rt+=">",Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me)):(Te.state=ve.CloseTag,rt+=Te.spaceBeforeSlash+"/>"+this.endline(Fe,Te,Me));else if(Te.pretty&&Ye===1&&(Ke.type===de.Text||Ke.type===de.Raw)&&Ke.value!=null)rt+=">",Te.state=ve.InsideTag,Te.suppressPrettyCount++,Qe=!0,rt+=this.writeChildNode(Ke,Te,Me+1),Te.suppressPrettyCount--,Qe=!1,Te.state=ve.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Te,Me);else{if(Te.dontPrettyTextNodes){for(Ct=Fe.children,Ve=0,ut=Ct.length;Ve<ut;Ve++)if(Ge=Ct[Ve],(Ge.type===de.Text||Ge.type===de.Raw)&&Ge.value!=null){Te.suppressPrettyCount++,Qe=!0;break}}for(rt+=">"+this.endline(Fe,Te,Me),Te.state=ve.InsideTag,bt=Fe.children,ot=0,ft=bt.length;ot<ft;ot++)Ge=bt[ot],rt+=this.writeChildNode(Ge,Te,Me+1);Te.state=ve.CloseTag,rt+=this.indent(Fe,Te,Me)+"</"+Fe.name+">",Qe&&Te.suppressPrettyCount--,rt+=this.endline(Fe,Te,Me),Te.state=ve.None}return this.closeNode(Fe,Te,Me),rt},De.prototype.writeChildNode=function(Fe,Te,Me){switch(Fe.type){case de.CData:return this.cdata(Fe,Te,Me);case de.Comment:return this.comment(Fe,Te,Me);case de.Element:return this.element(Fe,Te,Me);case de.Raw:return this.raw(Fe,Te,Me);case de.Text:return this.text(Fe,Te,Me);case de.ProcessingInstruction:return this.processingInstruction(Fe,Te,Me);case de.Dummy:return"";case de.Declaration:return this.declaration(Fe,Te,Me);case de.DocType:return this.docType(Fe,Te,Me);case de.AttributeDeclaration:return this.dtdAttList(Fe,Te,Me);case de.ElementDeclaration:return this.dtdElement(Fe,Te,Me);case de.EntityDeclaration:return this.dtdEntity(Fe,Te,Me);case de.NotationDeclaration:return this.dtdNotation(Fe,Te,Me);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<?",Te.state=ve.InsideTag,Be+=Fe.target,Fe.value&&(Be+=" "+Fe.value),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+"?>",Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.raw=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.text=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me),Te.state=ve.InsideTag,Be+=Fe.value,Te.state=ve.CloseTag,Be+=this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdAttList=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ATTLIST",Te.state=ve.InsideTag,Be+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Be+=" "+Fe.defaultValueType),Fe.defaultValue&&(Be+=' "'+Fe.defaultValue+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdElement=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ELEMENT",Te.state=ve.InsideTag,Be+=" "+Fe.name+" "+Fe.value,Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdEntity=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!ENTITY",Te.state=ve.InsideTag,Fe.pe&&(Be+=" %"),Be+=" "+Fe.name,Fe.value?Be+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Be+=" NDATA "+Fe.nData)),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.dtdNotation=function(Fe,Te,Me){var Be;return this.openNode(Fe,Te,Me),Te.state=ve.OpenTag,Be=this.indent(Fe,Te,Me)+"<!NOTATION",Te.state=ve.InsideTag,Be+=" "+Fe.name,Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Be+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Te.state=ve.CloseTag,Be+=Te.spaceBeforeSlash+">"+this.endline(Fe,Te,Me),Te.state=ve.None,this.closeNode(Fe,Te,Me),Be},De.prototype.openNode=function(Fe,Te,Me){},De.prototype.closeNode=function(Fe,Te,Me){},De.prototype.openAttribute=function(Fe,Te,Me){},De.prototype.closeAttribute=function(Fe,Te,Me){},De}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(oe,Ue,_e){(function(){var de,ve,Ee,ke,Se,Ae,me,Pe,fe,z;z=oe("./Utility"),Pe=z.assign,fe=z.isFunction,Ee=oe("./XMLDOMImplementation"),ke=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),me=oe("./XMLStringWriter"),Ae=oe("./XMLStreamWriter"),de=oe("./NodeType"),ve=oe("./WriterState"),Ue.exports.create=function(te,se,ie,le){var ce,pe;if(te==null)throw new Error("Root element needs a name.");return le=Pe({},se,ie,le),ce=new ke(le),pe=ce.element(te),le.headless||(ce.declaration(le),(le.pubID!=null||le.sysID!=null)&&ce.dtd(le)),pe},Ue.exports.begin=function(te,se,ie){var le;return fe(te)&&(le=[te,se],se=le[0],ie=le[1],te={}),se?new Se(te,se,ie):new ke(te)},Ue.exports.stringWriter=function(te){return new me(te)},Ue.exports.streamWriter=function(te,se){return new Ae(te,se)},Ue.exports.implementation=new Ee,Ue.exports.nodeType=de,Ue.exports.writerState=ve}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,Ue,_e){Ue.exports=ve;var de=Object.prototype.hasOwnProperty;function ve(){for(var Ee={},ke=0;ke<arguments.length;ke++){var Se=arguments[ke];for(var Ae in Se)de.call(Se,Ae)&&(Ee[Ae]=Se[Ae])}return Ee}},{}],461:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.slice.js");var de=oe("buffer").Buffer,ve=oe("./sha"),Ee=oe("./md5"),ke={sha1:ve,md5:Ee},Se=64,Ae=de.alloc(Se);Ae.fill(0);function me(z,te,se){de.isBuffer(te)||(te=de.from(te)),de.isBuffer(se)||(se=de.from(se)),te.length>Se?te=z(te):te.length<Se&&(te=de.concat([te,Ae],Se));for(var ie=de.alloc(Se),le=de.alloc(Se),ce=0;ce<Se;ce++)ie[ce]=te[ce]^54,le[ce]=te[ce]^92;var pe=z(de.concat([ie,se]));return z(de.concat([le,pe]))}function Pe(z,te){z=z||"sha1";var se=ke[z],ie=[],le=0;return se||fe("algorithm:",z,"is not yet supported"),{update:function(pe){return de.isBuffer(pe)||(pe=de.from(pe)),ie.push(pe),le+=pe.length,this},digest:function(pe){var xe=de.concat(ie),je=te?me(se,te,xe):se(xe);return ie=null,pe?je.toString(pe):je}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}_e.createHash=function(z){return Pe(z)},_e.createHmac=function(z,te){return Pe(z,te)},_e.createCredentials=function(){fe("sorry,createCredentials is not implemented yet")},_e.createCipher=function(){fe("sorry,createCipher is not implemented yet")},_e.createCipheriv=function(){fe("sorry,createCipheriv is not implemented yet")},_e.createDecipher=function(){fe("sorry,createDecipher is not implemented yet")},_e.createDecipheriv=function(){fe("sorry,createDecipheriv is not implemented yet")},_e.createSign=function(){fe("sorry,createSign is not implemented yet")},_e.createVerify=function(){fe("sorry,createVerify is not implemented yet")},_e.createDiffieHellman=function(){fe("sorry,createDiffieHellman is not implemented yet")},_e.pbkdf2=function(){fe("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js");var de=oe("buffer").Buffer,ve=4,Ee=de.alloc(ve);Ee.fill(0);var ke=8;function Se(Pe,fe){if(Pe.length%ve!==0){var z=Pe.length+(ve-Pe.length%ve);Pe=de.concat([Pe,Ee],z)}for(var te=[],se=fe?Pe.readInt32BE:Pe.readInt32LE,ie=0;ie<Pe.length;ie+=ve)te.push(se.call(Pe,ie));return te}function Ae(Pe,fe,z){for(var te=de.alloc(fe),se=z?te.writeInt32BE:te.writeInt32LE,ie=0;ie<Pe.length;ie++)se.call(te,Pe[ie],ie*4,!0);return te}function me(Pe,fe,z,te){de.isBuffer(Pe)||(Pe=de.from(Pe));var se=fe(Se(Pe,te),Pe.length*ke);return Ae(se,z,te)}Ue.exports={hash:me}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,Ue,_e){"use strict";var de=oe("./helpers");function ve(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function Ee(te,se){te[se>>5]|=128<<se%32,te[(se+64>>>9<<4)+14]=se;for(var ie=1732584193,le=-271733879,ce=-1732584194,pe=271733878,xe=0;xe<te.length;xe+=16){var je=ie,De=le,Fe=ce,Te=pe;ie=Se(ie,le,ce,pe,te[xe+0],7,-680876936),pe=Se(pe,ie,le,ce,te[xe+1],12,-389564586),ce=Se(ce,pe,ie,le,te[xe+2],17,606105819),le=Se(le,ce,pe,ie,te[xe+3],22,-1044525330),ie=Se(ie,le,ce,pe,te[xe+4],7,-176418897),pe=Se(pe,ie,le,ce,te[xe+5],12,1200080426),ce=Se(ce,pe,ie,le,te[xe+6],17,-1473231341),le=Se(le,ce,pe,ie,te[xe+7],22,-45705983),ie=Se(ie,le,ce,pe,te[xe+8],7,1770035416),pe=Se(pe,ie,le,ce,te[xe+9],12,-1958414417),ce=Se(ce,pe,ie,le,te[xe+10],17,-42063),le=Se(le,ce,pe,ie,te[xe+11],22,-1990404162),ie=Se(ie,le,ce,pe,te[xe+12],7,1804603682),pe=Se(pe,ie,le,ce,te[xe+13],12,-40341101),ce=Se(ce,pe,ie,le,te[xe+14],17,-1502002290),le=Se(le,ce,pe,ie,te[xe+15],22,1236535329),ie=Ae(ie,le,ce,pe,te[xe+1],5,-165796510),pe=Ae(pe,ie,le,ce,te[xe+6],9,-1069501632),ce=Ae(ce,pe,ie,le,te[xe+11],14,643717713),le=Ae(le,ce,pe,ie,te[xe+0],20,-373897302),ie=Ae(ie,le,ce,pe,te[xe+5],5,-701558691),pe=Ae(pe,ie,le,ce,te[xe+10],9,38016083),ce=Ae(ce,pe,ie,le,te[xe+15],14,-660478335),le=Ae(le,ce,pe,ie,te[xe+4],20,-405537848),ie=Ae(ie,le,ce,pe,te[xe+9],5,568446438),pe=Ae(pe,ie,le,ce,te[xe+14],9,-1019803690),ce=Ae(ce,pe,ie,le,te[xe+3],14,-187363961),le=Ae(le,ce,pe,ie,te[xe+8],20,1163531501),ie=Ae(ie,le,ce,pe,te[xe+13],5,-1444681467),pe=Ae(pe,ie,le,ce,te[xe+2],9,-51403784),ce=Ae(ce,pe,ie,le,te[xe+7],14,1735328473),le=Ae(le,ce,pe,ie,te[xe+12],20,-1926607734),ie=me(ie,le,ce,pe,te[xe+5],4,-378558),pe=me(pe,ie,le,ce,te[xe+8],11,-2022574463),ce=me(ce,pe,ie,le,te[xe+11],16,1839030562),le=me(le,ce,pe,ie,te[xe+14],23,-35309556),ie=me(ie,le,ce,pe,te[xe+1],4,-1530992060),pe=me(pe,ie,le,ce,te[xe+4],11,1272893353),ce=me(ce,pe,ie,le,te[xe+7],16,-155497632),le=me(le,ce,pe,ie,te[xe+10],23,-1094730640),ie=me(ie,le,ce,pe,te[xe+13],4,681279174),pe=me(pe,ie,le,ce,te[xe+0],11,-358537222),ce=me(ce,pe,ie,le,te[xe+3],16,-722521979),le=me(le,ce,pe,ie,te[xe+6],23,76029189),ie=me(ie,le,ce,pe,te[xe+9],4,-640364487),pe=me(pe,ie,le,ce,te[xe+12],11,-421815835),ce=me(ce,pe,ie,le,te[xe+15],16,530742520),le=me(le,ce,pe,ie,te[xe+2],23,-995338651),ie=Pe(ie,le,ce,pe,te[xe+0],6,-198630844),pe=Pe(pe,ie,le,ce,te[xe+7],10,1126891415),ce=Pe(ce,pe,ie,le,te[xe+14],15,-1416354905),le=Pe(le,ce,pe,ie,te[xe+5],21,-57434055),ie=Pe(ie,le,ce,pe,te[xe+12],6,1700485571),pe=Pe(pe,ie,le,ce,te[xe+3],10,-1894986606),ce=Pe(ce,pe,ie,le,te[xe+10],15,-1051523),le=Pe(le,ce,pe,ie,te[xe+1],21,-2054922799),ie=Pe(ie,le,ce,pe,te[xe+8],6,1873313359),pe=Pe(pe,ie,le,ce,te[xe+15],10,-30611744),ce=Pe(ce,pe,ie,le,te[xe+6],15,-1560198380),le=Pe(le,ce,pe,ie,te[xe+13],21,1309151649),ie=Pe(ie,le,ce,pe,te[xe+4],6,-145523070),pe=Pe(pe,ie,le,ce,te[xe+11],10,-1120210379),ce=Pe(ce,pe,ie,le,te[xe+2],15,718787259),le=Pe(le,ce,pe,ie,te[xe+9],21,-343485551),ie=fe(ie,je),le=fe(le,De),ce=fe(ce,Fe),pe=fe(pe,Te)}return Array(ie,le,ce,pe)}function ke(te,se,ie,le,ce,pe){return fe(z(fe(fe(se,te),fe(le,pe)),ce),ie)}function Se(te,se,ie,le,ce,pe,xe){return ke(se&ie|~se&le,te,se,ce,pe,xe)}function Ae(te,se,ie,le,ce,pe,xe){return ke(se&le|ie&~le,te,se,ce,pe,xe)}function me(te,se,ie,le,ce,pe,xe){return ke(se^ie^le,te,se,ce,pe,xe)}function Pe(te,se,ie,le,ce,pe,xe){return ke(ie^(se|~le),te,se,ce,pe,xe)}function fe(te,se){var ie=(te&65535)+(se&65535),le=(te>>16)+(se>>16)+(ie>>16);return le<<16|ie&65535}function z(te,se){return te<<se|te>>>32-se}Ue.exports=function(se){return de.hash(se,Ee,16)}},{"./helpers":462}],464:[function(oe,Ue,_e){"use strict";var de=oe("./helpers");function ve(me,Pe){me[Pe>>5]|=128<<24-Pe%32,me[(Pe+64>>9<<4)+15]=Pe;for(var fe=Array(80),z=1732584193,te=-271733879,se=-1732584194,ie=271733878,le=-1009589776,ce=0;ce<me.length;ce+=16){for(var pe=z,xe=te,je=se,De=ie,Fe=le,Te=0;Te<80;Te++){Te<16?fe[Te]=me[ce+Te]:fe[Te]=Ae(fe[Te-3]^fe[Te-8]^fe[Te-14]^fe[Te-16],1);var Me=Se(Se(Ae(z,5),Ee(Te,te,se,ie)),Se(Se(le,fe[Te]),ke(Te)));le=ie,ie=se,se=Ae(te,30),te=z,z=Me}z=Se(z,pe),te=Se(te,xe),se=Se(se,je),ie=Se(ie,De),le=Se(le,Fe)}return Array(z,te,se,ie,le)}function Ee(me,Pe,fe,z){return me<20?Pe&fe|~Pe&z:me<40?Pe^fe^z:me<60?Pe&fe|Pe&z|fe&z:Pe^fe^z}function ke(me){return me<20?1518500249:me<40?1859775393:me<60?-1894007588:-899497514}function Se(me,Pe){var fe=(me&65535)+(Pe&65535),z=(me>>16)+(Pe>>16)+(fe>>16);return z<<16|fe&65535}function Ae(me,Pe){return me<<Pe|me>>>32-Pe}Ue.exports=function(Pe){return de.hash(Pe,ve,20,!0)}},{"./helpers":462}],465:[function(oe,Ue,_e){"use strict";Ue.exports=function(){return function(){}}},{}],466:[function(oe,Ue,_e){(function(de){(function(){"use strict";var ve=oe("@babel/runtime/helpers/interopRequireDefault"),Ee=ve(oe("@babel/runtime/helpers/typeof")),ke=oe("stream"),Se=ke.Stream,Ae=oe("../lib/common/utils/isArray"),me=Ae.isArray;Ue.exports.string=function(z){return typeof z=="string"},Ue.exports.array=me,Ue.exports.buffer=de.isBuffer;function Pe(fe){return fe instanceof Se}Ue.exports.writableStream=function(z){return Pe(z)&&typeof z._write=="function"&&(0,Ee.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:oe("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(oe,Ue,_e){"use strict";var de=oe("immediate"),ve=Ue.exports={};ve.nextTick=de,ve.title="browser",ve.browser=!0,ve.env={},ve.argv=[],ve.version="",ve.versions={};function Ee(){}ve.on=Ee,ve.addListener=Ee,ve.once=Ee,ve.off=Ee,ve.removeListener=Ee,ve.removeAllListeners=Ee,ve.emit=Ee,ve.prependListener=Ee,ve.prependOnceListener=Ee,ve.listeners=function(ke){return[]},ve.binding=function(ke){throw new Error("process.binding is not supported")},ve.cwd=function(){return"/"},ve.chdir=function(ke){throw new Error("process.chdir is not supported")},ve.umask=function(){return 0}},{immediate:358}],468:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js");var ve=oe("./lib/request"),Ee=oe("./lib/response"),ke=oe("xtend"),Se=oe("builtin-status-codes"),Ae=oe("url"),me=_e;me.request=function(Pe,fe){typeof Pe=="string"?Pe=Ae.parse(Pe):Pe=ke(Pe);var z=de.location.protocol.search(/^https?:$/)===-1?"http:":"",te=Pe.protocol||z,se=Pe.hostname||Pe.host,ie=Pe.port,le=Pe.path||"/";se&&se.indexOf(":")!==-1&&(se="["+se+"]"),Pe.url=(se?te+"//"+se:"")+(ie?":"+ie:"")+le,Pe.method=(Pe.method||"GET").toUpperCase(),Pe.headers=Pe.headers||{};var ce=new ve(Pe);return fe&&ce.on("response",fe),ce},me.get=function(fe,z){var te=me.request(fe,z);return te.end(),te},me.ClientRequest=ve,me.IncomingMessage=Ee.IncomingMessage,me.Agent=function(){},me.Agent.defaultMaxSockets=4,me.globalAgent=new me.Agent,me.STATUS_CODES=Se,me.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(oe,Ue,_e){(function(de){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array-buffer.constructor.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.array.slice.js"),_e.fetch=me(de.fetch)&&me(de.ReadableStream),_e.writableStream=me(de.WritableStream),_e.abortController=me(de.AbortController),_e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),_e.blobConstructor=!0}catch(Pe){}var ve;function Ee(){if(ve!==void 0)return ve;if(de.XMLHttpRequest){ve=new de.XMLHttpRequest;try{ve.open("GET",de.XDomainRequest?"/":"https://example.com")}catch(Pe){ve=null}}else ve=null;return ve}function ke(Pe){var fe=Ee();if(!fe)return!1;try{return fe.responseType=Pe,fe.responseType===Pe}catch(z){}return!1}var Se=typeof de.ArrayBuffer!="undefined",Ae=Se&&me(de.ArrayBuffer.prototype.slice);_e.arraybuffer=_e.fetch||Se&&ke("arraybuffer"),_e.msstream=!_e.fetch&&Ae&&ke("ms-stream"),_e.mozchunkedarraybuffer=!_e.fetch&&Se&&ke("moz-chunked-arraybuffer"),_e.overrideMimeType=_e.fetch||(Ee()?me(Ee().overrideMimeType):!1),_e.vbArray=me(de.VBArray);function me(Pe){return typeof Pe=="function"}ve=null}).call(this)}).call(this,typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(oe,Ue,_e){(function(de,ve,Ee){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js");var ke=oe("./capability"),Se=oe("inherits"),Ae=oe("./response"),me=oe("readable-stream"),Pe=oe("to-arraybuffer"),fe=Ae.IncomingMessage,z=Ae.readyStates;function te(ce,pe){return ke.fetch&&pe?"fetch":ke.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ke.msstream?"ms-stream":ke.arraybuffer&&ce?"arraybuffer":ke.vbArray&&ce?"text:vbarray":"text"}var se=Ue.exports=function(ce){var pe=this;me.Writable.call(pe),pe._opts=ce,pe._body=[],pe._headers={},ce.auth&&pe.setHeader("Authorization","Basic "+new Ee(ce.auth).toString("base64")),Object.keys(ce.headers).forEach(function(De){pe.setHeader(De,ce.headers[De])});var xe,je=!0;if(ce.mode==="disable-fetch"||"requestTimeout"in ce&&!ke.abortController)je=!1,xe=!0;else if(ce.mode==="prefer-streaming")xe=!1;else if(ce.mode==="allow-wrong-content-type")xe=!ke.overrideMimeType;else if(!ce.mode||ce.mode==="default"||ce.mode==="prefer-fast")xe=!0;else throw new Error("Invalid value for opts.mode");pe._mode=te(xe,je),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};Se(se,me.Writable),se.prototype.setHeader=function(ce,pe){var xe=this,je=ce.toLowerCase();le.indexOf(je)===-1&&(xe._headers[je]={name:ce,value:pe})},se.prototype.getHeader=function(ce){var pe=this._headers[ce.toLowerCase()];return pe?pe.value:null},se.prototype.removeHeader=function(ce){var pe=this;delete pe._headers[ce.toLowerCase()]},se.prototype._onFinish=function(){var ce=this;if(!ce._destroyed){var pe=ce._opts,xe=ce._headers,je=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(ke.arraybuffer?je=Pe(Ee.concat(ce._body)):ke.blobConstructor?je=new ve.Blob(ce._body.map(function(Ge){return Pe(Ge)}),{type:(xe["content-type"]||{}).value||""}):je=Ee.concat(ce._body).toString());var De=[];if(Object.keys(xe).forEach(function(Ge){var Ye=xe[Ge].name,Ke=xe[Ge].value;Array.isArray(Ke)?Ke.forEach(function(Ve){De.push([Ye,Ve])}):De.push([Ye,Ke])}),ce._mode==="fetch"){var Fe=null,Te=null;if(ke.abortController){var Me=new AbortController;Fe=Me.signal,ce._fetchAbortController=Me,"requestTimeout"in pe&&pe.requestTimeout!==0&&(ce._fetchTimer=ve.setTimeout(function(){ce.emit("requestTimeout"),ce._fetchAbortController&&ce._fetchAbortController.abort()},pe.requestTimeout))}ve.fetch(ce._opts.url,{method:ce._opts.method,headers:De,body:je||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Fe}).then(function(Ge){ce._fetchResponse=Ge,ce._connect()},function(Ge){ve.clearTimeout(ce._fetchTimer),ce._destroyed||ce.emit("error",Ge)})}else{var Be=ce._xhr=new ve.XMLHttpRequest;try{Be.open(ce._opts.method,ce._opts.url,!0)}catch(Ge){de.nextTick(function(){ce.emit("error",Ge)});return}"responseType"in Be&&(Be.responseType=ce._mode.split(":")[0]),"withCredentials"in Be&&(Be.withCredentials=!!pe.withCredentials),ce._mode==="text"&&"overrideMimeType"in Be&&Be.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(Be.timeout=pe.requestTimeout,Be.ontimeout=function(){ce.emit("requestTimeout")}),De.forEach(function(Ge){Be.setRequestHeader(Ge[0],Ge[1])}),ce._response=null,Be.onreadystatechange=function(){switch(Be.readyState){case z.LOADING:case z.DONE:ce._onXHRProgress();break}},ce._mode==="moz-chunked-arraybuffer"&&(Be.onprogress=function(){ce._onXHRProgress()}),Be.onerror=function(){ce._destroyed||ce.emit("error",new Error("XHR error"))};try{Be.send(je)}catch(Ge){de.nextTick(function(){ce.emit("error",Ge)});return}}}};function ie(ce){try{var pe=ce.status;return pe!==null&&pe!==0}catch(xe){return!1}}se.prototype._onXHRProgress=function(){var ce=this;!ie(ce._xhr)||ce._destroyed||(ce._response||ce._connect(),ce._response._onXHRProgress())},se.prototype._connect=function(){var ce=this;ce._destroyed||(ce._response=new fe(ce._xhr,ce._fetchResponse,ce._mode,ce._fetchTimer),ce._response.on("error",function(pe){ce.emit("error",pe)}),ce.emit("response",ce._response))},se.prototype._write=function(ce,pe,xe){var je=this;je._body.push(ce),xe()},se.prototype.abort=se.prototype.destroy=function(){var ce=this;ce._destroyed=!0,ve.clearTimeout(ce._fetchTimer),ce._response&&(ce._response._destroyed=!0),ce._xhr?ce._xhr.abort():ce._fetchAbortController&&ce._fetchAbortController.abort()},se.prototype.end=function(ce,pe,xe){var je=this;typeof ce=="function"&&(xe=ce,ce=void 0),me.Writable.prototype.end.call(je,ce,pe,xe)},se.prototype.flushHeaders=function(){},se.prototype.setTimeout=function(){},se.prototype.setNoDelay=function(){},se.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(oe,Ue,_e){(function(de,ve,Ee){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js"),oe("core-js/modules/es.array.slice.js");var ke=oe("./capability"),Se=oe("inherits"),Ae=oe("readable-stream"),me=_e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Pe=_e.IncomingMessage=function(fe,z,te,se){var ie=this;if(Ae.Readable.call(ie),ie._mode=te,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){de.nextTick(function(){ie.emit("close")})}),te==="fetch"){var le=function Fe(){pe.read().then(function(Te){if(!ie._destroyed){if(Te.done){ve.clearTimeout(se),ie.push(null);return}ie.push(new Ee(Te.value)),Fe()}}).catch(function(Te){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Te)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Te){ie.headers[Te.toLowerCase()]=Fe,ie.rawHeaders.push(Te,Fe)}),ke.writableStream){var ce=new WritableStream({write:function(Te){return new Promise(function(Me,Be){ie._destroyed?Be():ie.push(new Ee(Te))?Me():ie._resumeFetch=Me})},close:function(){ve.clearTimeout(se),ie._destroyed||ie.push(null)},abort:function(Te){ie._destroyed||ie.emit("error",Te)}});try{z.body.pipeTo(ce).catch(function(Fe){ve.clearTimeout(se),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var pe=z.body.getReader();le()}else{ie._xhr=fe,ie._pos=0,ie.url=fe.responseURL,ie.statusCode=fe.status,ie.statusMessage=fe.statusText;var xe=fe.getAllResponseHeaders().split(/\r?\n/);if(xe.forEach(function(Fe){var Te=Fe.match(/^([^:]+):\s*(.*)/);if(Te){var Me=Te[1].toLowerCase();Me==="set-cookie"?(ie.headers[Me]===void 0&&(ie.headers[Me]=[]),ie.headers[Me].push(Te[2])):ie.headers[Me]!==void 0?ie.headers[Me]+=", "+Te[2]:ie.headers[Me]=Te[2],ie.rawHeaders.push(Te[1],Te[2])}}),ie._charset="x-user-defined",!ke.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var De=je.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(Pe,Ae.Readable),Pe.prototype._read=function(){var fe=this,z=fe._resumeFetch;z&&(fe._resumeFetch=null,z())},Pe.prototype._onXHRProgress=function(){var fe=this,z=fe._xhr,te=null;switch(fe._mode){case"text:vbarray":if(z.readyState!==me.DONE)break;try{te=new ve.VBArray(z.responseBody).toArray()}catch(pe){}if(te!==null){fe.push(new Ee(te));break}case"text":try{te=z.responseText}catch(pe){fe._mode="text:vbarray";break}if(te.length>fe._pos){var se=te.substr(fe._pos);if(fe._charset==="x-user-defined"){for(var ie=new Ee(se.length),le=0;le<se.length;le++)ie[le]=se.charCodeAt(le)&255;fe.push(ie)}else fe.push(se,fe._charset);fe._pos=te.length}break;case"arraybuffer":if(z.readyState!==me.DONE||!z.response)break;te=z.response,fe.push(new Ee(new Uint8Array(te)));break;case"moz-chunked-arraybuffer":if(te=z.response,z.readyState!==me.LOADING||!te)break;fe.push(new Ee(new Uint8Array(te)));break;case"ms-stream":if(te=z.response,z.readyState!==me.LOADING)break;var ce=new ve.MSStreamReader;ce.onprogress=function(){ce.result.byteLength>fe._pos&&(fe.push(new Ee(new Uint8Array(ce.result.slice(fe._pos)))),fe._pos=ce.result.byteLength)},ce.onload=function(){fe.push(null)},ce.readAsArrayBuffer(te);break}fe._xhr.readyState===me.DONE&&fe._mode!=="ms-stream"&&fe.push(null)}}).call(this)}).call(this,oe("_process"),typeof An!="undefined"?An:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.splice.js");var Ee=oe("punycode"),ke=oe("./util");_e.parse=Te,_e.resolve=Be,_e.resolveObject=Ge,_e.format=Me,_e.Url=Se;function Se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Ae=/^([a-z0-9.+-]+:)/i,me=/:[0-9]*$/,Pe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r",`
|
|
`," "],z=["{","}","|","\\","^","`"].concat(fe),te=["'"].concat(z),se=["%","/","?",";","#"].concat(te),ie=["/","?","#"],le=255,ce=/^[+a-z0-9A-Z_-]{0,63}$/,pe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,xe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},De={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Te(Ye,Ke,Ve){if(Ye&&ke.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ke,Ve),ot}Se.prototype.parse=function(Ye,Ke,Ve){if(!ke.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,ve.default)(Ye));var ot=Ye.indexOf("?"),ut=ot!==-1&&ot<Ye.indexOf("#")?"?":"#",ft=Ye.split(ut),St=/\\/g;ft[0]=ft[0].replace(St,"/"),Ye=ft.join(ut);var Qe=Ye;if(Qe=Qe.trim(),!Ve&&Ye.split("#").length===1){var rt=Pe.exec(Qe);if(rt)return this.path=Qe,this.href=Qe,this.pathname=rt[1],rt[2]?(this.search=rt[2],Ke?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ke&&(this.search="",this.query={}),this}var wt=Ae.exec(Qe);if(wt){wt=wt[0];var Ct=wt.toLowerCase();this.protocol=Ct,Qe=Qe.substr(wt.length)}if(Ve||wt||Qe.match(/^\/\/[^@\/]+@[^@\/]+/)){var bt=Qe.substr(0,2)==="//";bt&&!(wt&&je[wt])&&(Qe=Qe.substr(2),this.slashes=!0)}if(!je[wt]&&(bt||wt&&!De[wt])){for(var ct=-1,xt=0;xt<ie.length;xt++){var dt=Qe.indexOf(ie[xt]);dt!==-1&&(ct===-1||dt<ct)&&(ct=dt)}var Mt,yt;ct===-1?yt=Qe.lastIndexOf("@"):yt=Qe.lastIndexOf("@",ct),yt!==-1&&(Mt=Qe.slice(0,yt),Qe=Qe.slice(yt+1),this.auth=decodeURIComponent(Mt)),ct=-1;for(var xt=0;xt<se.length;xt++){var dt=Qe.indexOf(se[xt]);dt!==-1&&(ct===-1||dt<ct)&&(ct=dt)}ct===-1&&(ct=Qe.length),this.host=Qe.slice(0,ct),Qe=Qe.slice(ct),this.parseHost(),this.hostname=this.hostname||"";var Ft=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ft)for(var mt=this.hostname.split("."),xt=0,vt=mt.length;xt<vt;xt++){var tt=mt[xt];if(tt&&!tt.match(ce)){for(var He="",we=0,Ne=tt.length;we<Ne;we++)tt.charCodeAt(we)>127?He+="x":He+=tt[we];if(!He.match(ce)){var Xe=mt.slice(0,xt),nt=mt.slice(xt+1),Ie=tt.match(pe);Ie&&(Xe.push(Ie[1]),nt.unshift(Ie[2])),nt.length&&(Qe="/"+nt.join(".")+Qe),this.hostname=Xe.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ft||(this.hostname=Ee.toASCII(this.hostname));var Re=this.port?":"+this.port:"",Ze=this.hostname||"";this.host=Ze+Re,this.href+=this.host,Ft&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Qe[0]!=="/"&&(Qe="/"+Qe))}if(!xe[Ct])for(var xt=0,vt=te.length;xt<vt;xt++){var et=te[xt];if(Qe.indexOf(et)!==-1){var ht=encodeURIComponent(et);ht===et&&(ht=escape(et)),Qe=Qe.split(et).join(ht)}}var at=Qe.indexOf("#");at!==-1&&(this.hash=Qe.substr(at),Qe=Qe.slice(0,at));var Dt=Qe.indexOf("?");if(Dt!==-1?(this.search=Qe.substr(Dt),this.query=Qe.substr(Dt+1),Ke&&(this.query=Fe.parse(this.query)),Qe=Qe.slice(0,Dt)):Ke&&(this.search="",this.query={}),Qe&&(this.pathname=Qe),De[Ct]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Re=this.pathname||"",Et=this.search||"";this.path=Re+Et}return this.href=this.format(),this};function Me(Ye){return ke.isString(Ye)&&(Ye=Te(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ke=this.protocol||"",Ve=this.pathname||"",ot=this.hash||"",ut=!1,ft="";this.host?ut=Ye+this.host:this.hostname&&(ut=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ut+=":"+this.port)),this.query&&ke.isObject(this.query)&&Object.keys(this.query).length&&(ft=Fe.stringify(this.query));var St=this.search||ft&&"?"+ft||"";return Ke&&Ke.substr(-1)!==":"&&(Ke+=":"),this.slashes||(!Ke||De[Ke])&&ut!==!1?(ut="//"+(ut||""),Ve&&Ve.charAt(0)!=="/"&&(Ve="/"+Ve)):ut||(ut=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),St&&St.charAt(0)!=="?"&&(St="?"+St),Ve=Ve.replace(/[?#]/g,function(Qe){return encodeURIComponent(Qe)}),St=St.replace("#","%23"),Ke+ut+Ve+St+ot};function Be(Ye,Ke){return Te(Ye,!1,!0).resolve(Ke)}Se.prototype.resolve=function(Ye){return this.resolveObject(Te(Ye,!1,!0)).format()};function Ge(Ye,Ke){return Ye?Te(Ye,!1,!0).resolveObject(Ke):Ke}Se.prototype.resolveObject=function(Ye){if(ke.isString(Ye)){var Ke=new Se;Ke.parse(Ye,!1,!0),Ye=Ke}for(var Ve=new Se,ot=Object.keys(this),ut=0;ut<ot.length;ut++){var ft=ot[ut];Ve[ft]=this[ft]}if(Ve.hash=Ye.hash,Ye.href==="")return Ve.href=Ve.format(),Ve;if(Ye.slashes&&!Ye.protocol){for(var St=Object.keys(Ye),Qe=0;Qe<St.length;Qe++){var rt=St[Qe];rt!=="protocol"&&(Ve[rt]=Ye[rt])}return De[Ve.protocol]&&Ve.hostname&&!Ve.pathname&&(Ve.path=Ve.pathname="/"),Ve.href=Ve.format(),Ve}if(Ye.protocol&&Ye.protocol!==Ve.protocol){if(!De[Ye.protocol]){for(var wt=Object.keys(Ye),Ct=0;Ct<wt.length;Ct++){var bt=wt[Ct];Ve[bt]=Ye[bt]}return Ve.href=Ve.format(),Ve}if(Ve.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var vt=(Ye.pathname||"").split("/");vt.length&&!(Ye.host=vt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),vt[0]!==""&&vt.unshift(""),vt.length<2&&vt.unshift(""),Ve.pathname=vt.join("/")}else Ve.pathname=Ye.pathname;if(Ve.search=Ye.search,Ve.query=Ye.query,Ve.host=Ye.host||"",Ve.auth=Ye.auth,Ve.hostname=Ye.hostname||Ye.host,Ve.port=Ye.port,Ve.pathname||Ve.search){var ct=Ve.pathname||"",xt=Ve.search||"";Ve.path=ct+xt}return Ve.slashes=Ve.slashes||Ye.slashes,Ve.href=Ve.format(),Ve}var dt=Ve.pathname&&Ve.pathname.charAt(0)==="/",Mt=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",yt=Mt||dt||Ve.host&&Ye.pathname,Ft=yt,mt=Ve.pathname&&Ve.pathname.split("/")||[],vt=Ye.pathname&&Ye.pathname.split("/")||[],tt=Ve.protocol&&!De[Ve.protocol];if(tt&&(Ve.hostname="",Ve.port=null,Ve.host&&(mt[0]===""?mt[0]=Ve.host:mt.unshift(Ve.host)),Ve.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(vt[0]===""?vt[0]=Ye.host:vt.unshift(Ye.host)),Ye.host=null),yt=yt&&(vt[0]===""||mt[0]==="")),Mt)Ve.host=Ye.host||Ye.host===""?Ye.host:Ve.host,Ve.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ve.hostname,Ve.search=Ye.search,Ve.query=Ye.query,mt=vt;else if(vt.length)mt||(mt=[]),mt.pop(),mt=mt.concat(vt),Ve.search=Ye.search,Ve.query=Ye.query;else if(!ke.isNullOrUndefined(Ye.search)){if(tt){Ve.hostname=Ve.host=mt.shift();var He=Ve.host&&Ve.host.indexOf("@")>0?Ve.host.split("@"):!1;He&&(Ve.auth=He.shift(),Ve.host=Ve.hostname=He.shift())}return Ve.search=Ye.search,Ve.query=Ye.query,(!ke.isNull(Ve.pathname)||!ke.isNull(Ve.search))&&(Ve.path=(Ve.pathname?Ve.pathname:"")+(Ve.search?Ve.search:"")),Ve.href=Ve.format(),Ve}if(!mt.length)return Ve.pathname=null,Ve.search?Ve.path="/"+Ve.search:Ve.path=null,Ve.href=Ve.format(),Ve;for(var we=mt.slice(-1)[0],Ne=(Ve.host||Ye.host||mt.length>1)&&(we==="."||we==="..")||we==="",Xe=0,nt=mt.length;nt>=0;nt--)we=mt[nt],we==="."?mt.splice(nt,1):we===".."?(mt.splice(nt,1),Xe++):Xe&&(mt.splice(nt,1),Xe--);if(!yt&&!Ft)for(;Xe--;Xe)mt.unshift("..");yt&&mt[0]!==""&&(!mt[0]||mt[0].charAt(0)!=="/")&&mt.unshift(""),Ne&&mt.join("/").substr(-1)!=="/"&&mt.push("");var Ie=mt[0]===""||mt[0]&&mt[0].charAt(0)==="/";if(tt){Ve.hostname=Ve.host=Ie?"":mt.length?mt.shift():"";var He=Ve.host&&Ve.host.indexOf("@")>0?Ve.host.split("@"):!1;He&&(Ve.auth=He.shift(),Ve.host=Ve.hostname=He.shift())}return yt=yt||Ve.host&&mt.length,yt&&!Ie&&mt.unshift(""),mt.length?Ve.pathname=mt.join("/"):(Ve.pathname=null,Ve.path=null),(!ke.isNull(Ve.pathname)||!ke.isNull(Ve.search))&&(Ve.path=(Ve.pathname?Ve.pathname:"")+(Ve.search?Ve.search:"")),Ve.auth=Ye.auth||Ve.auth,Ve.slashes=Ve.slashes||Ye.slashes,Ve.href=Ve.format(),Ve},Se.prototype.parseHost=function(){var Ye=this.host,Ke=me.exec(Ye);Ke&&(Ke=Ke[0],Ke!==":"&&(this.port=Ke.substr(1)),Ye=Ye.substr(0,Ye.length-Ke.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(oe,Ue,_e){"use strict";var de=oe("@babel/runtime/helpers/interopRequireDefault"),ve=de(oe("@babel/runtime/helpers/typeof"));Ue.exports={isString:function(ke){return typeof ke=="string"},isObject:function(ke){return(0,ve.default)(ke)==="object"&&ke!==null},isNull:function(ke){return ke===null},isNullOrUndefined:function(ke){return ke==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(oe,Ue,_e){"use strict";oe("core-js/modules/es.number.constructor.js"),_e.encodeURIComponent=function(de){try{return encodeURIComponent(de)}catch(ve){return de}},_e.escape=oe("escape-html"),_e.timestamp=function(ve){if(ve){var Ee=ve;return typeof Ee=="string"&&(Ee=Number(Ee)),String(ve).length===10&&(Ee*=1e3),new Date(Ee)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(oe,Ue,_e){(function(de,ve){(function(){"use strict";var Ee=oe("@babel/runtime/helpers/interopRequireDefault"),ke=Ee(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.concat.js");var Se=oe("util"),Ae=oe("url"),me=oe("http"),Pe=oe("https"),fe=oe("debug")("urllib"),z=oe("humanize-ms"),te=0,se=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,De){return je===void 0?De:je}function ce(je){return je?je.split(";")[0].trim().toLowerCase():""}function pe(je,De){return function(Fe,Te,Me){if(Fe)return De(Fe);je({data:Te,status:Me.statusCode,headers:Me.headers,res:Me})}}_e.TIMEOUTS=[z("300s"),z("300s")];var xe=["json","text"];_e.request=function(De,Fe,Te){return arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),typeof Te=="function"?_e.requestWithCallback(De,Fe,Te):new Promise(function(Me,Be){_e.requestWithCallback(De,Fe,pe(Me,Be))})},_e.requestWithCallback=function(De,Fe,Te){if(!De||typeof De!="string"&&(0,ke.default)(De)!=="object"){var Me=Se.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Me)}arguments.length===2&&typeof Fe=="function"&&(Te=Fe,Fe=null),Fe=Fe||{},te>=se&&(te=0);var Be=++te;Fe.requestUrls=Fe.requestUrls||[];var Ge={requestId:Be,url:De,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",Ge),Fe.timeout=Fe.timeout||_e.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ke;typeof De=="string"?(ie.test(De)||(De="https://"+De),Ke=Ae.parse(De)):Ke=De;var Ve=(Fe.type||Fe.method||Ke.method||"GET").toUpperCase(),ot=Ke.port||80,ut=me,ft=le(Fe.agent,_e.agent),St=Fe.fixJSONCtlChars;Ke.protocol==="https:"&&(ut=Pe,ft=le(Fe.httpsAgent,_e.httpsAgent),Ke.port||(ot=443));var Qe={host:Ke.hostname||Ke.host||"localhost",path:Ke.path||"/",method:Ve,port:ot,agent:ft,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?Qe.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(Qe.requestTimeout=Fe.timeout);var rt=Fe.auth||Ke.auth;rt&&(Qe.auth=rt);var wt=Fe.content||Fe.data,Ct=Ve==="GET"||Ve==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&wt&&!(typeof wt=="string"||ve.isBuffer(wt)))if(Ct)wt=Fe.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt);else{var bt=Qe.headers["Content-Type"]||Qe.headers["content-type"];bt||(Fe.contentType==="json"?bt="application/json":bt="application/x-www-form-urlencoded",Qe.headers["Content-Type"]=bt),ce(bt)==="application/json"?wt=JSON.stringify(wt):wt=Fe.nestedQuerystring?qs.stringify(wt):querystring.stringify(wt)}Ct&&wt&&(Qe.path+=(Ke.query?"&":"?")+wt,wt=null);var ct=0;if(wt){var xt=wt.length;ve.isBuffer(wt)||(xt=ve.byteLength(wt)),ct=Qe.headers["Content-Length"]=xt}Fe.dataType==="json"&&(Qe.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Qe);var dt=null,Mt=null,yt=null,Ft=!1,mt=!1,vt=0,tt=-1,He=!1,we="",Ne="",Xe=null;Fe.timing&&(Xe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function nt(){dt&&(clearTimeout(dt),dt=null)}function Ie(){Mt&&(clearTimeout(Mt),Mt=null)}function Re(Wt,un,on){if(Ie(),!Te){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Be,de.pid,Qe.method,De),Wt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Be,de.pid,Wt.name,Wt.message,Wt.stack);return}var cn=Te;Te=null;var bn={};on&&(tt=on.statusCode,bn=on.headers);var xn=Date.now()-Ye;Xe&&(Xe.contentDownload=xn),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",xn,vt,tt,Qe.method,Qe.host,Qe.path,mt,Xe);var kn={status:tt,statusCode:tt,headers:bn,size:vt,aborted:He,rt:xn,keepAliveSocket:mt,data:un,requestUrls:Fe.requestUrls,timing:Xe,remoteAddress:we,remotePort:Ne};if(Wt){var On="";ft&&typeof ft.getCurrentStatus=="function"&&(On=", agent status: "+JSON.stringify(ft.getCurrentStatus())),Wt.message+=", "+Qe.method+" "+De+" "+tt+" (connected: "+Ft+", keepalive socket: "+mt+On+`)
|
|
headers: `+JSON.stringify(bn),Wt.data=un,Wt.path=Qe.path,Wt.status=tt,Wt.headers=bn,Wt.res=kn}cn(Wt,un,Fe.streaming?on:kn),Fe.emitter&&(Ge.url=De,Ge.socket=Qt&&Qt.connection,Ge.options=Qe,Ge.size=ct,Fe.emitter.emit("response",{requestId:Be,error:Wt,ctx:Fe.ctx,req:Ge,res:kn}))}function Ze(Wt){var un=null;if(Fe.followRedirect&&statuses.redirect[Wt.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var on=Wt.headers.location;if(!on)un=new Error("Got statusCode "+Wt.statusCode+" but cannot resolve next location from headers"),un.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)un=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),un.name="MaxRedirectError";else{var cn=Fe.formatRedirectUrl?Fe.formatRedirectUrl(De,on):Ae.resolve(De,on);fe("Request#%d %s: `redirected` from %s to %s",Be,Qe.path,De,cn),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(on)&&(Fe.headers.Host=null);var bn=Te;return Te=null,_e.requestWithCallback(cn,Fe,bn),{redirect:!0,error:null}}}return{redirect:!1,error:un}}Fe.gzip&&!Qe.headers["Accept-Encoding"]&&!Qe.headers["accept-encoding"]&&(Qe.headers["Accept-Encoding"]="gzip");function et(Wt,un,on){var cn=Wt.headers["content-encoding"];return on(null,un,cn)}var ht=Fe.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",Be,Ve,De,Qe.headers,Qe.path),Fe.requestUrls.push(De);function at(Wt){if(Xe&&(Xe.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",Be,De,Wt.statusCode,Wt.headers),Fe.streaming){var un=Ze(Wt);if(un.redirect){Wt.resume();return}return un.error?(Wt.resume(),Re(un.error,null,Wt)):Re(null,null,Wt)}if(Wt.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",Be,De,vt)}),Wt.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",Be,De,vt)}),Wt.on("aborted",function(){He=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",Be,De,vt)}),ht){var on=Ze(Wt);if(on.redirect){Wt.resume();return}return on.error?(Wt.resume(),ht.end(),Re(on.error,null,Wt)):(Fe.consumeWriteStream===!1?Wt.on("end",Re.bind(null,null,null,Wt)):ht.on("close",function(){fe("Request#%d %s: writeStream close event emitted",Be,De),Re(yt||null,null,Wt)}),Wt.pipe(ht))}var cn=[];Wt.on("data",function(bn){fe("Request#%d %s: `res data` event emit, size %d",Be,De,bn.length),vt+=bn.length,cn.push(bn)}),Wt.on("end",function(){var bn=ve.concat(cn,vt);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Be,De,vt,Wt._dumped),yt)return Re(yt,bn,Wt);var xn=Ze(Wt);if(xn.error)return Re(xn.error,bn,Wt);xn.redirect||et(Wt,bn,function(kn,On,_r){if(kn)return Re(kn,bn,Wt);if(!_r&&xe.indexOf(Fe.dataType)>=0){try{On=decodeBodyByCharset(On,Wt)}catch($r){return fe("decodeBodyByCharset error: %s",$r),Re(null,On,Wt)}if(Fe.dataType==="json")if(vt===0)On=null;else{var xr=parseJSON(On,St);xr.error?kn=xr.error:On=xr.data}}He&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",Be,De),Re(kn,On,Wt)})})}var Dt,Et;Array.isArray(Fe.timeout)?(Dt=z(Fe.timeout[0]),Et=z(Fe.timeout[1])):Dt=Et=z(Fe.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",Dt,Et);function Ot(){fe("Connect timer ticking, timeout: %d",Dt),dt=setTimeout(function(){dt=null,tt===-1&&(tt=-2);var Wt="Connect timeout for "+Dt+"ms",un="ConnectionTimeoutError";Qt.socket||(un="SocketAssignTimeoutError",Wt+=", working sockets is full"),yt=new Error(Wt),yt.name=un,yt.requestId=Be,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,Wt,Ft),Xt()},Dt)}function qt(){fe("Response timer ticking, timeout: %d",Et),Mt=setTimeout(function(){Mt=null;var Wt="Response timeout for "+Et+"ms",un="ResponseTimeoutError";yt=new Error(Wt),yt.name=un,yt.requestId=Be,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,Wt,Ft),Xt()},Et)}var Qt;Qe.mode=Fe.mode?Fe.mode:"";try{Qt=ut.request(Qe,at)}catch(Wt){return Re(Wt)}typeof window=="undefined"?Ot():Qt.on("requestTimeout",function(){tt===-1&&(tt=-2);var Wt="Connect timeout for "+Dt+"ms",un="ConnectionTimeoutError";yt=new Error(Wt),yt.name=un,yt.requestId=Be,Xt()});function Xt(){fe("Request#%d %s abort, connected: %s",Be,De,Ft),Qt.socket||(yt.noSocket=!0,Re(yt)),Qt.abort()}return Xe&&Qt.on("finish",function(){Xe.requestSent=Date.now()-Ye}),Qt.once("socket",function(Wt){Xe&&(Xe.queuing=Date.now()-Ye);var un=Wt.readyState;if(un==="opening"){Wt.once("lookup",function(on,cn,bn){fe("Request#%d %s lookup: %s, %s, %s",Be,De,on,cn,bn),Xe&&(Xe.dnslookup=Date.now()-Ye),cn&&(we=cn)}),Wt.once("connect",function(){Xe&&(Xe.connected=Date.now()-Ye),nt(),qt(),fe("Request#%d %s new socket connected",Be,De),Ft=!0,we||(we=Wt.remoteAddress),Ne=Wt.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",Be,De,un),Ft=!0,mt=!0,we||(we=Wt.remoteAddress),Ne=Wt.remotePort,nt(),qt()}),Qt.on("error",function(Wt){(Wt.name==="Error"||Wt.name==="TypeError")&&(Wt.name=Ft?"ResponseError":"RequestError"),Wt.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",Be,De,Wt.name,Wt.message),Re(yt||Wt)}),ht&&ht.once("error",function(Wt){Wt.message+=' (writeStream "error")',yt=Wt,fe("Request#%d %s `writeStream error` event emit, %s: %s",Be,De,Wt.name,Wt.message),Xt()}),Fe.stream?(Fe.stream.pipe(Qt),Fe.stream.once("error",function(Wt){Wt.message+=' (stream "error")',yt=Wt,fe("Request#%d %s `readStream error` event emit, %s: %s",Be,De,Wt.name,Wt.message),Xt()})):Qt.end(wt),Qt.requestId=Be,Qt}}).call(this)}).call(this,oe("_process"),oe("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},99498:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){st.defineOption("placeholder","",function(Ee,ke,Se){var Ae=Se&&Se!=st.Init;if(ke&&!Ae)Ee.on("blur",_e),Ee.on("change",de),Ee.on("swapDoc",de),st.on(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose=function(){Ue(Ee)}),de(Ee);else if(!ke&&Ae){Ee.off("blur",_e),Ee.off("change",de),Ee.off("swapDoc",de),st.off(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose),Ut(Ee);var me=Ee.getWrapperElement();me.className=me.className.replace(" CodeMirror-empty","")}ke&&!Ee.hasFocus()&&_e(Ee)});function Ut(Ee){Ee.state.placeholder&&(Ee.state.placeholder.parentNode.removeChild(Ee.state.placeholder),Ee.state.placeholder=null)}function oe(Ee){Ut(Ee);var ke=Ee.state.placeholder=document.createElement("pre");ke.style.cssText="height: 0; overflow: visible",ke.style.direction=Ee.getOption("direction"),ke.className="CodeMirror-placeholder CodeMirror-line-like";var Se=Ee.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),ke.appendChild(Se),Ee.display.lineSpace.insertBefore(ke,Ee.display.lineSpace.firstChild)}function Ue(Ee){setTimeout(function(){var ke=!1,Se=Ee.getInputField();Se.nodeName=="TEXTAREA"?ke=!Se.value:Ee.lineCount()==1&&(ke=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),ke?oe(Ee):Ut(Ee)},20)}function _e(Ee){ve(Ee)&&oe(Ee)}function de(Ee){var ke=Ee.getWrapperElement(),Se=ve(Ee);ke.className=ke.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?oe(Ee):Ut(Ee)}function ve(Ee){return Ee.lineCount()===1&&Ee.getLine(0)===""}})},25717:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){var Ut={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=st.Pos;st.defineOption("autoCloseBrackets",!1,function(z,te,se){se&&se!=st.Init&&(z.removeKeyMap(_e),z.state.closeBrackets=null),te&&(de(Ue(te,"pairs")),z.state.closeBrackets=te,z.addKeyMap(_e))});function Ue(z,te){return te=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[te]!=null?z[te]:Ut[te]}var _e={Backspace:ke,Enter:Se};function de(z){for(var te=0;te<z.length;te++){var se=z.charAt(te),ie="'"+se+"'";_e[ie]||(_e[ie]=ve(se))}}de(Ut.pairs+"`");function ve(z){return function(te){return me(te,z)}}function Ee(z){var te=z.state.closeBrackets;if(!te||te.override)return te;var se=z.getModeAt(z.getCursor());return se.closeBrackets||te}function ke(z){var te=Ee(z);if(!te||z.getOption("disableInput"))return st.Pass;for(var se=Ue(te,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return st.Pass;var ce=Pe(z,ie[le].head);if(!ce||se.indexOf(ce)%2!=0)return st.Pass}for(var le=ie.length-1;le>=0;le--){var pe=ie[le].head;z.replaceRange("",oe(pe.line,pe.ch-1),oe(pe.line,pe.ch+1),"+delete")}}function Se(z){var te=Ee(z),se=te&&Ue(te,"explode");if(!se||z.getOption("disableInput"))return st.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return st.Pass;var ce=Pe(z,ie[le].head);if(!ce||se.indexOf(ce)%2!=0)return st.Pass}z.operation(function(){var pe=z.lineSeparator()||`
|
|
`;z.replaceSelection(pe+pe,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var xe=0;xe<ie.length;xe++){var je=ie[xe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Ae(z){var te=st.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(te?-1:1)),head:new oe(z.head.line,z.head.ch+(te?1:-1))}}function me(z,te){var se=Ee(z);if(!se||z.getOption("disableInput"))return st.Pass;var ie=Ue(se,"pairs"),le=ie.indexOf(te);if(le==-1)return st.Pass;for(var ce=Ue(se,"closeBefore"),pe=Ue(se,"triples"),xe=ie.charAt(le+1)==te,je=z.listSelections(),De=le%2==0,Fe,Te=0;Te<je.length;Te++){var Me=je[Te],Be=Me.head,Ge,Ye=z.getRange(Be,oe(Be.line,Be.ch+1));if(De&&!Me.empty())Ge="surround";else if((xe||!De)&&Ye==te)xe&&fe(z,Be)?Ge="both":pe.indexOf(te)>=0&&z.getRange(Be,oe(Be.line,Be.ch+3))==te+te+te?Ge="skipThree":Ge="skip";else if(xe&&Be.ch>1&&pe.indexOf(te)>=0&&z.getRange(oe(Be.line,Be.ch-2),Be)==te+te){if(Be.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Be.line,Be.ch-2))))return st.Pass;Ge="addFour"}else if(xe){var Ke=Be.ch==0?" ":z.getRange(oe(Be.line,Be.ch-1),Be);if(!st.isWordChar(Ye)&&Ke!=te&&!st.isWordChar(Ke))Ge="both";else return st.Pass}else if(De&&(Ye.length===0||/\s/.test(Ye)||ce.indexOf(Ye)>-1))Ge="both";else return st.Pass;if(!Fe)Fe=Ge;else if(Fe!=Ge)return st.Pass}var Ve=le%2?ie.charAt(le-1):te,ot=le%2?te:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var ut=0;ut<3;ut++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var ft=z.getSelections(),ut=0;ut<ft.length;ut++)ft[ut]=Ve+ft[ut]+ot;z.replaceSelections(ft,"around"),ft=z.listSelections().slice();for(var ut=0;ut<ft.length;ut++)ft[ut]=Ae(ft[ut]);z.setSelections(ft)}else Fe=="both"?(z.replaceSelection(Ve+ot,null),z.triggerElectric(Ve+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ve+Ve+Ve+Ve,"before"),z.execCommand("goCharRight"))})}function Pe(z,te){var se=z.getRange(oe(te.line,te.ch-1),oe(te.line,te.ch+1));return se.length==2?se:null}function fe(z,te){var se=z.getTokenAt(oe(te.line,te.ch+1));return/\bstring/.test(se.type)&&se.start==te.ch&&(te.ch==0||!/\bstring/.test(z.getTokenTypeAt(te)))}})},6313:function(Rn,An,pt){(function(st){st(pt(89780),pt(32855))})(function(st){st.defineOption("autoCloseTags",!1,function(ke,Se,Ae){if(Ae!=st.Init&&Ae&&ke.removeKeyMap("autoCloseTags"),!!Se){var me={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(me["'/'"]=function(Pe){return de(Pe)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(me["'>'"]=function(Pe){return Ue(Pe)}),ke.addKeyMap(me)}});var Ut=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["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 Ue(ke){if(ke.getOption("disableInput"))return st.Pass;for(var Se=ke.listSelections(),Ae=[],me=ke.getOption("autoCloseTags"),Pe=0;Pe<Se.length;Pe++){if(!Se[Pe].empty())return st.Pass;var fe=Se[Pe].head,z=ke.getTokenAt(fe),te=st.innerMode(ke.getMode(),z.state),se=te.state,ie=te.mode.xmlCurrentTag&&te.mode.xmlCurrentTag(se),le=ie&&ie.name;if(!le)return st.Pass;var ce=te.mode.configuration=="html",pe=typeof me=="object"&&me.dontCloseTags||ce&&Ut,xe=typeof me=="object"&&me.indentTags||ce&&oe;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=fe.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==fe.ch-z.start-1||pe&&ve(pe,je)>-1||Ee(ke,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(se)||[],le,fe,!0))return st.Pass;var De=typeof me=="object"&&me.emptyTags;if(De&&ve(De,le)>-1){Ae[Pe]={text:"/>",newPos:st.Pos(fe.line,fe.ch+2)};continue}var Fe=xe&&ve(xe,je)>-1;Ae[Pe]={indent:Fe,text:">"+(Fe?`
|
|
|
|
`:"")+"</"+le+">",newPos:Fe?st.Pos(fe.line+1,0):st.Pos(fe.line,fe.ch+1)}}for(var Te=typeof me=="object"&&me.dontIndentOnAutoClose,Pe=Se.length-1;Pe>=0;Pe--){var Me=Ae[Pe];ke.replaceRange(Me.text,Se[Pe].head,Se[Pe].anchor,"+insert");var Be=ke.listSelections().slice(0);Be[Pe]={head:Me.newPos,anchor:Me.newPos},ke.setSelections(Be),!Te&&Me.indent&&(ke.indentLine(Me.newPos.line,null,!0),ke.indentLine(Me.newPos.line+1,null,!0))}}function _e(ke,Se){for(var Ae=ke.listSelections(),me=[],Pe=Se?"/":"</",fe=ke.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,te=0;te<Ae.length;te++){if(!Ae[te].empty())return st.Pass;var se=Ae[te].head,ie=ke.getTokenAt(se),le=st.innerMode(ke.getMode(),ie.state),ce=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=se.ch-1))return st.Pass;var pe,xe=le.mode.name!="xml"&&ke.getMode().name=="htmlmixed";if(xe&&le.mode.name=="javascript")pe=Pe+"script";else if(xe&&le.mode.name=="css")pe=Pe+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ce);if(!je||je.length&&Ee(ke,je,je[je.length-1],se))return st.Pass;pe=Pe+je[je.length-1]}ke.getLine(se.line).charAt(ie.end)!=">"&&(pe+=">"),me[te]=pe}if(ke.replaceSelections(me),Ae=ke.listSelections(),!z)for(var te=0;te<Ae.length;te++)(te==Ae.length-1||Ae[te].head.line<Ae[te+1].head.line)&&ke.indentLine(Ae[te].head.line)}function de(ke){return ke.getOption("disableInput")?st.Pass:_e(ke,!0)}st.commands.closeTag=function(ke){return _e(ke)};function ve(ke,Se){if(ke.indexOf)return ke.indexOf(Se);for(var Ae=0,me=ke.length;Ae<me;++Ae)if(ke[Ae]==Se)return Ae;return-1}function Ee(ke,Se,Ae,me,Pe){if(!st.scanForClosingTag)return!1;var fe=Math.min(ke.lastLine()+1,me.line+500),z=st.scanForClosingTag(ke,me,null,fe);if(!z||z.tag!=Ae)return!1;for(var te=Pe?1:0,se=Se.length-1;se>=0&&Se[se]==Ae;se--)++te;me=z.to;for(var se=1;se<te;se++){var ie=st.scanForClosingTag(ke,me,null,fe);if(!ie||ie.tag!=Ae)return!1;me=ie.to}return!0}})},32855:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){"use strict";var Ut=st.Pos;function oe(se,ie){return se.line-ie.line||se.ch-ie.ch}var Ue="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",_e=Ue+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",de=new RegExp("<(/?)(["+Ue+"]["+_e+"]*)","g");function ve(se,ie,le,ce){this.line=ie,this.ch=le,this.cm=se,this.text=se.getLine(ie),this.min=ce?Math.max(ce.from,se.firstLine()):se.firstLine(),this.max=ce?Math.min(ce.to-1,se.lastLine()):se.lastLine()}function Ee(se,ie){var le=se.cm.getTokenTypeAt(Ut(se.line,ie));return le&&/\btag\b/.test(le)}function ke(se){if(!(se.line>=se.max))return se.ch=0,se.text=se.cm.getLine(++se.line),!0}function Se(se){if(!(se.line<=se.min))return se.text=se.cm.getLine(--se.line),se.ch=se.text.length,!0}function Ae(se){for(;;){var ie=se.text.indexOf(">",se.ch);if(ie==-1){if(ke(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie+1;continue}var le=se.text.lastIndexOf("/",ie),ce=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,ce?"selfClose":"regular"}}function me(se){for(;;){var ie=se.ch?se.text.lastIndexOf("<",se.ch-1):-1;if(ie==-1){if(Se(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie;continue}de.lastIndex=ie,se.ch=ie;var le=de.exec(se.text);if(le&&le.index==ie)return le}}function Pe(se){for(;;){de.lastIndex=se.ch;var ie=de.exec(se.text);if(!ie){if(ke(se))continue;return}if(!Ee(se,ie.index+1)){se.ch=ie.index+1;continue}return se.ch=ie.index+ie[0].length,ie}}function fe(se){for(;;){var ie=se.ch?se.text.lastIndexOf(">",se.ch-1):-1;if(ie==-1){if(Se(se))continue;return}if(!Ee(se,ie+1)){se.ch=ie;continue}var le=se.text.lastIndexOf("/",ie),ce=le>-1&&!/\S/.test(se.text.slice(le+1,ie));return se.ch=ie+1,ce?"selfClose":"regular"}}function z(se,ie){for(var le=[];;){var ce=Pe(se),pe,xe=se.line,je=se.ch-(ce?ce[0].length:0);if(!ce||!(pe=Ae(se)))return;if(pe!="selfClose")if(ce[1]){for(var De=le.length-1;De>=0;--De)if(le[De]==ce[2]){le.length=De;break}if(De<0&&(!ie||ie==ce[2]))return{tag:ce[2],from:Ut(xe,je),to:Ut(se.line,se.ch)}}else le.push(ce[2])}}function te(se,ie){for(var le=[];;){var ce=fe(se);if(!ce)return;if(ce=="selfClose"){me(se);continue}var pe=se.line,xe=se.ch,je=me(se);if(!je)return;if(je[1])le.push(je[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==je[2]){le.length=De;break}if(De<0&&(!ie||ie==je[2]))return{tag:je[2],from:Ut(se.line,se.ch),to:Ut(pe,xe)}}}}st.registerHelper("fold","xml",function(se,ie){for(var le=new ve(se,ie.line,0);;){var ce=Pe(le);if(!ce||le.line!=ie.line)return;var pe=Ae(le);if(!pe)return;if(!ce[1]&&pe!="selfClose"){var xe=Ut(le.line,le.ch),je=z(le,ce[2]);return je&&oe(je.from,xe)>0?{from:xe,to:je.from}:null}}}),st.findMatchingTag=function(se,ie,le){var ce=new ve(se,ie.line,ie.ch,le);if(!(ce.text.indexOf(">")==-1&&ce.text.indexOf("<")==-1)){var pe=Ae(ce),xe=pe&&Ut(ce.line,ce.ch),je=pe&&me(ce);if(!(!pe||!je||oe(ce,ie)>0)){var De={from:Ut(ce.line,ce.ch),to:xe,tag:je[2]};return pe=="selfClose"?{open:De,close:null,at:"open"}:je[1]?{open:te(ce,je[2]),close:De,at:"close"}:(ce=new ve(se,xe.line,xe.ch,le),{open:De,close:z(ce,je[2]),at:"open"})}}},st.findEnclosingTag=function(se,ie,le,ce){for(var pe=new ve(se,ie.line,ie.ch,le);;){var xe=te(pe,ce);if(!xe)break;var je=new ve(se,ie.line,ie.ch,le),De=z(je,xe.tag);if(De)return{open:xe,close:De}}},st.scanForClosingTag=function(se,ie,le,ce){var pe=new ve(se,ie.line,ie.ch,ce?{from:0,to:ce}:null);return z(pe,le)}})},89780:function(Rn){(function(An,pt){Rn.exports=pt()})(this,function(){"use strict";var An=navigator.userAgent,pt=navigator.platform,st=/gecko\/\d/i.test(An),Ut=/MSIE \d/.test(An),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(An),Ue=/Edge\/(\d+)/.exec(An),_e=Ut||oe||Ue,de=_e&&(Ut?document.documentMode||6:+(Ue||oe)[1]),ve=!Ue&&/WebKit\//.test(An),Ee=ve&&/Qt\/\d+\.\d+/.test(An),ke=!Ue&&/Chrome\//.test(An),Se=/Opera\//.test(An),Ae=/Apple Computer/.test(navigator.vendor),me=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(An),Pe=/PhantomJS/.test(An),fe=!Ue&&/AppleWebKit/.test(An)&&/Mobile\/\w+/.test(An),z=/Android/.test(An),te=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(An),se=fe||/Mac/.test(pt),ie=/\bCrOS\b/.test(An),le=/win/i.test(pt),ce=Se&&An.match(/Version\/(\d*\.\d*)/);ce&&(ce=Number(ce[1])),ce&&ce>=15&&(Se=!1,ve=!0);var pe=se&&(Ee||Se&&(ce==null||ce<12.11)),xe=st||_e&&de>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,he){var Ce=re.className,be=je(he).exec(Ce);if(be){var Oe=Ce.slice(be.index+be[0].length);re.className=Ce.slice(0,be.index)+(Oe?be[1]+Oe:"")}};function Fe(re){for(var he=re.childNodes.length;he>0;--he)re.removeChild(re.firstChild);return re}function Te(re,he){return Fe(re).appendChild(he)}function Me(re,he,Ce,be){var Oe=document.createElement(re);if(Ce&&(Oe.className=Ce),be&&(Oe.style.cssText=be),typeof he=="string")Oe.appendChild(document.createTextNode(he));else if(he)for(var $e=0;$e<he.length;++$e)Oe.appendChild(he[$e]);return Oe}function Be(re,he,Ce,be){var Oe=Me(re,he,Ce,be);return Oe.setAttribute("role","presentation"),Oe}var Ge;document.createRange?Ge=function(re,he,Ce,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ce),Oe.setStart(re,he),Oe}:Ge=function(re,he,Ce){var be=document.body.createTextRange();try{be.moveToElementText(re.parentNode)}catch(Oe){return be}return be.collapse(!0),be.moveEnd("character",Ce),be.moveStart("character",he),be};function Ye(re,he){if(he.nodeType==3&&(he=he.parentNode),re.contains)return re.contains(he);do if(he.nodeType==11&&(he=he.host),he==re)return!0;while(he=he.parentNode)}function Ke(){var re;try{re=document.activeElement}catch(he){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ve(re,he){var Ce=re.className;je(he).test(Ce)||(re.className+=(Ce?" ":"")+he)}function ot(re,he){for(var Ce=re.split(" "),be=0;be<Ce.length;be++)Ce[be]&&!je(Ce[be]).test(he)&&(he+=" "+Ce[be]);return he}var ut=function(re){re.select()};fe?ut=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:_e&&(ut=function(re){try{re.select()}catch(he){}});function ft(re){var he=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,he)}}function St(re,he,Ce){he||(he={});for(var be in re)re.hasOwnProperty(be)&&(Ce!==!1||!he.hasOwnProperty(be))&&(he[be]=re[be]);return he}function Qe(re,he,Ce,be,Oe){he==null&&(he=re.search(/[^\s\u00a0]/),he==-1&&(he=re.length));for(var $e=be||0,gt=Oe||0;;){var Lt=re.indexOf(" ",$e);if(Lt<0||Lt>=he)return gt+(he-$e);gt+=Lt-$e,gt+=Ce-gt%Ce,$e=Lt+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};rt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},rt.prototype.set=function(re,he){this.f=he;var Ce=+new Date+re;(!this.id||Ce<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ce)};function wt(re,he){for(var Ce=0;Ce<re.length;++Ce)if(re[Ce]==he)return Ce;return-1}var Ct=50,bt={toString:function(){return"CodeMirror.Pass"}},ct={scroll:!1},xt={origin:"*mouse"},dt={origin:"+move"};function Mt(re,he,Ce){for(var be=0,Oe=0;;){var $e=re.indexOf(" ",be);$e==-1&&($e=re.length);var gt=$e-be;if($e==re.length||Oe+gt>=he)return be+Math.min(gt,he-Oe);if(Oe+=$e-be,Oe+=Ce-Oe%Ce,be=$e+1,Oe>=he)return be}}var yt=[""];function Ft(re){for(;yt.length<=re;)yt.push(mt(yt)+" ");return yt[re]}function mt(re){return re[re.length-1]}function vt(re,he){for(var Ce=[],be=0;be<re.length;be++)Ce[be]=he(re[be],be);return Ce}function tt(re,he,Ce){for(var be=0,Oe=Ce(he);be<re.length&&Ce(re[be])<=Oe;)be++;re.splice(be,0,he)}function He(){}function we(re,he){var Ce;return Object.create?Ce=Object.create(re):(He.prototype=re,Ce=new He),he&&St(he,Ce),Ce}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xe(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Ne.test(re))}function nt(re,he){return he?he.source.indexOf("\\w")>-1&&Xe(re)?!0:he.test(re):Xe(re)}function Ie(re){for(var he in re)if(re.hasOwnProperty(he)&&re[he])return!1;return!0}var Re=/[\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 Ze(re){return re.charCodeAt(0)>=768&&Re.test(re)}function et(re,he,Ce){for(;(Ce<0?he>0:he<re.length)&&Ze(re.charAt(he));)he+=Ce;return he}function ht(re,he,Ce){for(var be=he>Ce?-1:1;;){if(he==Ce)return he;var Oe=(he+Ce)/2,$e=be<0?Math.ceil(Oe):Math.floor(Oe);if($e==he)return re($e)?he:Ce;re($e)?Ce=$e:he=$e+be}}function at(re,he,Ce,be){if(!re)return be(he,Ce,"ltr",0);for(var Oe=!1,$e=0;$e<re.length;++$e){var gt=re[$e];(gt.from<Ce&>.to>he||he==Ce&>.to==he)&&(be(Math.max(gt.from,he),Math.min(gt.to,Ce),gt.level==1?"rtl":"ltr",$e),Oe=!0)}Oe||be(he,Ce,"ltr")}var Dt=null;function Et(re,he,Ce){var be;Dt=null;for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.from<he&&$e.to>he)return Oe;$e.to==he&&($e.from!=$e.to&&Ce=="before"?be=Oe:Dt=Oe),$e.from==he&&($e.from!=$e.to&&Ce!="before"?be=Oe:Dt=Oe)}return be!=null?be:Dt}var Ot=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",he="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ce(It){return It<=247?re.charAt(It):1424<=It&&It<=1524?"R":1536<=It&&It<=1785?he.charAt(It-1536):1774<=It&&It<=2220?"r":8192<=It&&It<=8203?"w":It==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,$e=/[LRr]/,gt=/[Lb1n]/,Lt=/[1n]/;function kt(It,nn,_t){this.level=It,this.from=nn,this.to=_t}return function(It,nn){var _t=nn=="ltr"?"L":"R";if(It.length==0||nn=="ltr"&&!be.test(It))return!1;for(var yn=It.length,gn=[],hr=0;hr<yn;++hr)gn.push(Ce(It.charCodeAt(hr)));for(var mr=0,Er=_t;mr<yn;++mr){var Rr=gn[mr];Rr=="m"?gn[mr]=Er:Er=Rr}for(var ri=0,Yr=_t;ri<yn;++ri){var ci=gn[ri];ci=="1"&&Yr=="r"?gn[ri]="n":$e.test(ci)&&(Yr=ci,ci=="r"&&(gn[ri]="R"))}for(var Ii=1,Zr=gn[0];Ii<yn-1;++Ii){var $i=gn[Ii];$i=="+"&&Zr=="1"&&gn[Ii+1]=="1"?gn[Ii]="1":$i==","&&Zr==gn[Ii+1]&&(Zr=="1"||Zr=="n")&&(gn[Ii]=Zr),Zr=$i}for(var Xo=0;Xo<yn;++Xo){var Ia=gn[Xo];if(Ia==",")gn[Xo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Xo+1;ia<yn&&gn[ia]=="%";++ia);for(var Ds=Xo&&gn[Xo-1]=="!"||ia<yn&&gn[ia]=="1"?"1":"N",gs=Xo;gs<ia;++gs)gn[gs]=Ds;Xo=ia-1}}for(var La=0,Vs=_t;La<yn;++La){var ss=gn[La];Vs=="L"&&ss=="1"?gn[La]="L":$e.test(ss)&&(Vs=ss)}for(var Ma=0;Ma<yn;++Ma)if(Oe.test(gn[Ma])){var yo=void 0;for(yo=Ma+1;yo<yn&&Oe.test(gn[yo]);++yo);for(var ca=(Ma?gn[Ma-1]:_t)=="L",Za=(yo<yn?gn[yo]:_t)=="L",ls=ca==Za?ca?"L":"R":_t,Ol=Ma;Ol<yo;++Ol)gn[Ol]=ls;Ma=yo-1}for(var oa=[],Sl,pa=0;pa<yn;)if(gt.test(gn[pa])){var Af=pa;for(++pa;pa<yn&>.test(gn[pa]);++pa);oa.push(new kt(0,Af,pa))}else{var sl=pa,Zs=oa.length,Bs=nn=="rtl"?1:0;for(++pa;pa<yn&&gn[pa]!="L";++pa);for(var Bo=sl;Bo<pa;)if(Lt.test(gn[Bo])){sl<Bo&&(oa.splice(Zs,0,new kt(1,sl,Bo)),Zs+=Bs);var Xa=Bo;for(++Bo;Bo<pa&&Lt.test(gn[Bo]);++Bo);oa.splice(Zs,0,new kt(2,Xa,Bo)),Zs+=Bs,sl=Bo}else++Bo;sl<pa&&oa.splice(Zs,0,new kt(1,sl,pa))}return nn=="ltr"&&(oa[0].level==1&&(Sl=It.match(/^\s+/))&&(oa[0].from=Sl[0].length,oa.unshift(new kt(0,0,Sl[0].length))),mt(oa).level==1&&(Sl=It.match(/\s+$/))&&(mt(oa).to-=Sl[0].length,oa.push(new kt(0,yn-Sl[0].length,yn)))),nn=="rtl"?oa.reverse():oa}}();function qt(re,he){var Ce=re.order;return Ce==null&&(Ce=re.order=Ot(re.text,he)),Ce}var Qt=[],Xt=function(re,he,Ce){if(re.addEventListener)re.addEventListener(he,Ce,!1);else if(re.attachEvent)re.attachEvent("on"+he,Ce);else{var be=re._handlers||(re._handlers={});be[he]=(be[he]||Qt).concat(Ce)}};function Wt(re,he){return re._handlers&&re._handlers[he]||Qt}function un(re,he,Ce){if(re.removeEventListener)re.removeEventListener(he,Ce,!1);else if(re.detachEvent)re.detachEvent("on"+he,Ce);else{var be=re._handlers,Oe=be&&be[he];if(Oe){var $e=wt(Oe,Ce);$e>-1&&(be[he]=Oe.slice(0,$e).concat(Oe.slice($e+1)))}}}function on(re,he){var Ce=Wt(re,he);if(Ce.length)for(var be=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ce.length;++Oe)Ce[Oe].apply(null,be)}function cn(re,he,Ce){return typeof he=="string"&&(he={type:he,preventDefault:function(){this.defaultPrevented=!0}}),on(re,Ce||he.type,re,he),xr(he)||he.codemirrorIgnore}function bn(re){var he=re._handlers&&re._handlers.cursorActivity;if(he)for(var Ce=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),be=0;be<he.length;++be)wt(Ce,he[be])==-1&&Ce.push(he[be])}function xn(re,he){return Wt(re,he).length>0}function kn(re){re.prototype.on=function(he,Ce){Xt(this,he,Ce)},re.prototype.off=function(he,Ce){un(this,he,Ce)}}function On(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function _r(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function xr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function $r(re){On(re),_r(re)}function tr(re){return re.target||re.srcElement}function ii(re){var he=re.which;return he==null&&(re.button&1?he=1:re.button&2?he=3:re.button&4&&(he=2)),se&&re.ctrlKey&&he==1&&(he=3),he}var di=function(){if(_e&&de<9)return!1;var re=Me("div");return"draggable"in re||"dragDrop"in re}(),li;function Mi(re){if(li==null){var he=Me("span","\u200B");Te(re,Me("span",[he,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(li=he.offsetWidth<=1&&he.offsetHeight>2&&!(_e&&de<8))}var Ce=li?Me("span","\u200B"):Me("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ce.setAttribute("cm-text",""),Ce}var yi;function Jr(re){if(yi!=null)return yi;var he=Te(re,document.createTextNode("A\u062EA")),Ce=Ge(he,0,1).getBoundingClientRect(),be=Ge(he,1,2).getBoundingClientRect();return Fe(re),!Ce||Ce.left==Ce.right?!1:yi=be.right-Ce.right<3}var Li=`
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var he=0,Ce=[],be=re.length;he<=be;){var Oe=re.indexOf(`
|
|
`,he);Oe==-1&&(Oe=re.length);var $e=re.slice(he,re.charAt(Oe-1)=="\r"?Oe-1:Oe),gt=$e.indexOf("\r");gt!=-1?(Ce.push($e.slice(0,gt)),he+=gt+1):(Ce.push($e),he=Oe+1)}return Ce}:function(re){return re.split(/\r\n?|\n/)},qe=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(he){return!1}}:function(re){var he;try{he=re.ownerDocument.selection.createRange()}catch(Ce){}return!he||he.parentElement()!=re?!1:he.compareEndPoints("StartToEnd",he)!=0},Mr=function(){var re=Me("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Lr=null;function br(re){if(Lr!=null)return Lr;var he=Te(re,Me("span","x")),Ce=he.getBoundingClientRect(),be=Ge(he,0,1).getBoundingClientRect();return Lr=Math.abs(Ce.left-be.left)>1}var Pr={},kr={};function Hi(re,he){arguments.length>2&&(he.dependencies=Array.prototype.slice.call(arguments,2)),Pr[re]=he}function gr(re,he){kr[re]=he}function nr(re){if(typeof re=="string"&&kr.hasOwnProperty(re))re=kr[re];else if(re&&typeof re.name=="string"&&kr.hasOwnProperty(re.name)){var he=kr[re.name];typeof he=="string"&&(he={name:he}),re=we(he,re),re.name=he.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return nr("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return nr("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function Vt(re,he){he=nr(he);var Ce=Pr[he.name];if(!Ce)return Vt(re,"text/plain");var be=Ce(re,he);if(Kt.hasOwnProperty(he.name)){var Oe=Kt[he.name];for(var $e in Oe)Oe.hasOwnProperty($e)&&(be.hasOwnProperty($e)&&(be["_"+$e]=be[$e]),be[$e]=Oe[$e])}if(be.name=he.name,he.helperType&&(be.helperType=he.helperType),he.modeProps)for(var gt in he.modeProps)be[gt]=he.modeProps[gt];return be}var Kt={};function zt(re,he){var Ce=Kt.hasOwnProperty(re)?Kt[re]:Kt[re]={};St(he,Ce)}function Mn(re,he){if(he===!0)return he;if(re.copyState)return re.copyState(he);var Ce={};for(var be in he){var Oe=he[be];Oe instanceof Array&&(Oe=Oe.concat([])),Ce[be]=Oe}return Ce}function Vn(re,he){for(var Ce;re.innerMode&&(Ce=re.innerMode(he),!(!Ce||Ce.mode==re));)he=Ce.state,re=Ce.mode;return Ce||{mode:re,state:he}}function vr(re,he,Ce){return re.startState?re.startState(he,Ce):!0}var vn=function(re,he,Ce){this.pos=this.start=0,this.string=re,this.tabSize=he||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ce};vn.prototype.eol=function(){return this.pos>=this.string.length},vn.prototype.sol=function(){return this.pos==this.lineStart},vn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},vn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},vn.prototype.eat=function(re){var he=this.string.charAt(this.pos),Ce;if(typeof re=="string"?Ce=he==re:Ce=he&&(re.test?re.test(he):re(he)),Ce)return++this.pos,he},vn.prototype.eatWhile=function(re){for(var he=this.pos;this.eat(re););return this.pos>he},vn.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},vn.prototype.skipToEnd=function(){this.pos=this.string.length},vn.prototype.skipTo=function(re){var he=this.string.indexOf(re,this.pos);if(he>-1)return this.pos=he,!0},vn.prototype.backUp=function(re){this.pos-=re},vn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},vn.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},vn.prototype.match=function(re,he,Ce){if(typeof re=="string"){var be=function(gt){return Ce?gt.toLowerCase():gt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return he!==!1&&(this.pos+=re.length),!0}else{var $e=this.string.slice(this.pos).match(re);return $e&&$e.index>0?null:($e&&he!==!1&&(this.pos+=$e[0].length),$e)}},vn.prototype.current=function(){return this.string.slice(this.start,this.pos)},vn.prototype.hideFirstChars=function(re,he){this.lineStart+=re;try{return he()}finally{this.lineStart-=re}},vn.prototype.lookAhead=function(re){var he=this.lineOracle;return he&&he.lookAhead(re)},vn.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function Wn(re,he){if(he-=re.first,he<0||he>=re.size)throw new Error("There is no line "+(he+re.first)+" in the document.");for(var Ce=re;!Ce.lines;)for(var be=0;;++be){var Oe=Ce.children[be],$e=Oe.chunkSize();if(he<$e){Ce=Oe;break}he-=$e}return Ce.lines[he]}function Ht(re,he,Ce){var be=[],Oe=he.line;return re.iter(he.line,Ce.line+1,function($e){var gt=$e.text;Oe==Ce.line&&(gt=gt.slice(0,Ce.ch)),Oe==he.line&&(gt=gt.slice(he.ch)),be.push(gt),++Oe}),be}function Jt(re,he,Ce){var be=[];return re.iter(he,Ce,function(Oe){be.push(Oe.text)}),be}function Xn(re,he){var Ce=he-re.height;if(Ce)for(var be=re;be;be=be.parent)be.height+=Ce}function jt(re){if(re.parent==null)return null;for(var he=re.parent,Ce=wt(he.lines,re),be=he.parent;be;he=be,be=be.parent)for(var Oe=0;be.children[Oe]!=he;++Oe)Ce+=be.children[Oe].chunkSize();return Ce+he.first}function ln(re,he){var Ce=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],$e=Oe.height;if(he<$e){re=Oe;continue e}he-=$e,Ce+=Oe.chunkSize()}return Ce}while(!re.lines);for(var gt=0;gt<re.lines.length;++gt){var Lt=re.lines[gt],kt=Lt.height;if(he<kt)break;he-=kt}return Ce+gt}function Nn(re,he){return he>=re.first&&he<re.first+re.size}function Yn(re,he){return String(re.lineNumberFormatter(he+re.firstLineNumber))}function sn(re,he,Ce){if(Ce===void 0&&(Ce=null),!(this instanceof sn))return new sn(re,he,Ce);this.line=re,this.ch=he,this.sticky=Ce}function Dn(re,he){return re.line-he.line||re.ch-he.ch}function Jn(re,he){return re.sticky==he.sticky&&Dn(re,he)==0}function jn(re){return sn(re.line,re.ch)}function Bn(re,he){return Dn(re,he)<0?he:re}function er(re,he){return Dn(re,he)<0?re:he}function _n(re,he){return Math.max(re.first,Math.min(he,re.first+re.size-1))}function sr(re,he){if(he.line<re.first)return sn(re.first,0);var Ce=re.first+re.size-1;return he.line>Ce?sn(Ce,Wn(re,Ce).text.length):Fr(he,Wn(re,he.line).text.length)}function Fr(re,he){var Ce=re.ch;return Ce==null||Ce>he?sn(re.line,he):Ce<0?sn(re.line,0):re}function zr(re,he){for(var Ce=[],be=0;be<he.length;be++)Ce[be]=sr(re,he[be]);return Ce}var Dr=function(re,he){this.state=re,this.lookAhead=he},pn=function(re,he,Ce,be){this.state=he,this.doc=re,this.line=Ce,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};pn.prototype.lookAhead=function(re){var he=this.doc.getLine(this.line+re);return he!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),he},pn.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var he=this.baseTokens[this.baseTokenPos+1];return{type:he&&he.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},pn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pn.fromSaved=function(re,he,Ce){return he instanceof Dr?new pn(re,Mn(re.mode,he.state),Ce,he.lookAhead):new pn(re,Mn(re.mode,he),Ce)},pn.prototype.save=function(re){var he=re!==!1?Mn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Dr(he,this.maxLookAhead):he};function Ni(re,he,Ce,be){var Oe=[re.state.modeGen],$e={};Kr(re,he.text,re.doc.mode,Ce,function(It,nn){return Oe.push(It,nn)},$e,be);for(var gt=Ce.state,Lt=function(It){Ce.baseTokens=Oe;var nn=re.state.overlays[It],_t=1,yn=0;Ce.state=!0,Kr(re,he.text,nn.mode,Ce,function(gn,hr){for(var mr=_t;yn<gn;){var Er=Oe[_t];Er>gn&&Oe.splice(_t,1,gn,Oe[_t+1],Er),_t+=2,yn=Math.min(gn,Er)}if(hr)if(nn.opaque)Oe.splice(mr,_t-mr,gn,"overlay "+hr),_t=mr+2;else for(;mr<_t;mr+=2){var Rr=Oe[mr+1];Oe[mr+1]=(Rr?Rr+" ":"")+"overlay "+hr}},$e),Ce.state=gt,Ce.baseTokens=null,Ce.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Lt(kt);return{styles:Oe,classes:$e.bgClass||$e.textClass?$e:null}}function ni(re,he,Ce){if(!he.styles||he.styles[0]!=re.state.modeGen){var be=ki(re,jt(he)),Oe=he.text.length>re.options.maxHighlightLength&&Mn(re.doc.mode,be.state),$e=Ni(re,he,be);Oe&&(be.state=Oe),he.stateAfter=be.save(!Oe),he.styles=$e.styles,$e.classes?he.styleClasses=$e.classes:he.styleClasses&&(he.styleClasses=null),Ce===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return he.styles}function ki(re,he,Ce){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new pn(be,!0,he);var $e=Qr(re,he,Ce),gt=$e>be.first&&Wn(be,$e-1).stateAfter,Lt=gt?pn.fromSaved(be,gt,$e):new pn(be,vr(be.mode),$e);return be.iter($e,he,function(kt){hn(re,kt.text,Lt);var It=Lt.line;kt.stateAfter=It==he-1||It%5==0||It>=Oe.viewFrom&&It<Oe.viewTo?Lt.save():null,Lt.nextLine()}),Ce&&(be.modeFrontier=Lt.line),Lt}function hn(re,he,Ce,be){var Oe=re.doc.mode,$e=new vn(he,re.options.tabSize,Ce);for($e.start=$e.pos=be||0,he==""&&qn(Oe,Ce.state);!$e.eol();)rr(Oe,$e,Ce.state),$e.start=$e.pos}function qn(re,he){if(re.blankLine)return re.blankLine(he);if(re.innerMode){var Ce=Vn(re,he);if(Ce.mode.blankLine)return Ce.mode.blankLine(Ce.state)}}function rr(re,he,Ce,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=Vn(re,Ce).mode);var $e=re.token(he,Ce);if(he.pos>he.start)return $e}throw new Error("Mode "+re.name+" failed to advance stream.")}var pr=function(re,he,Ce){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=he||null,this.state=Ce};function wr(re,he,Ce,be){var Oe=re.doc,$e=Oe.mode,gt;he=sr(Oe,he);var Lt=Wn(Oe,he.line),kt=ki(re,he.line,Ce),It=new vn(Lt.text,re.options.tabSize,kt),nn;for(be&&(nn=[]);(be||It.pos<he.ch)&&!It.eol();)It.start=It.pos,gt=rr($e,It,kt.state),be&&nn.push(new pr(It,gt,Mn(Oe.mode,kt.state)));return be?nn:new pr(It,gt,kt.state)}function Ar(re,he){if(re)for(;;){var Ce=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Ce)break;re=re.slice(0,Ce.index)+re.slice(Ce.index+Ce[0].length);var be=Ce[1]?"bgClass":"textClass";he[be]==null?he[be]=Ce[2]:new RegExp("(?:^|\\s)"+Ce[2]+"(?:$|\\s)").test(he[be])||(he[be]+=" "+Ce[2])}return re}function Kr(re,he,Ce,be,Oe,$e,gt){var Lt=Ce.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var kt=0,It=null,nn=new vn(he,re.options.tabSize,be),_t,yn=re.options.addModeClass&&[null];for(he==""&&Ar(qn(Ce,be.state),$e);!nn.eol();){if(nn.pos>re.options.maxHighlightLength?(Lt=!1,gt&&hn(re,he,be,nn.pos),nn.pos=he.length,_t=null):_t=Ar(rr(Ce,nn,be.state,yn),$e),yn){var gn=yn[0].name;gn&&(_t="m-"+(_t?gn+" "+_t:gn))}if(!Lt||It!=_t){for(;kt<nn.start;)kt=Math.min(nn.start,kt+5e3),Oe(kt,It);It=_t}nn.start=nn.pos}for(;kt<nn.pos;){var hr=Math.min(nn.pos,kt+5e3);Oe(hr,It),kt=hr}}function Qr(re,he,Ce){for(var be,Oe,$e=re.doc,gt=Ce?-1:he-(re.doc.mode.innerMode?1e3:100),Lt=he;Lt>gt;--Lt){if(Lt<=$e.first)return $e.first;var kt=Wn($e,Lt-1),It=kt.stateAfter;if(It&&(!Ce||Lt+(It instanceof Dr?It.lookAhead:0)<=$e.modeFrontier))return Lt;var nn=Qe(kt.text,null,re.options.tabSize);(Oe==null||be>nn)&&(Oe=Lt-1,be=nn)}return Oe}function qr(re,he){if(re.modeFrontier=Math.min(re.modeFrontier,he),!(re.highlightFrontier<he-10)){for(var Ce=re.first,be=he-1;be>Ce;be--){var Oe=Wn(re,be).stateAfter;if(Oe&&(!(Oe instanceof Dr)||be+Oe.lookAhead<he)){Ce=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ce)}}var lr=!1,rn=!1;function ir(){lr=!0}function an(){rn=!0}function cr(re,he,Ce){this.marker=re,this.from=he,this.to=Ce}function Cr(re,he){if(re)for(var Ce=0;Ce<re.length;++Ce){var be=re[Ce];if(be.marker==he)return be}}function Gr(re,he){for(var Ce,be=0;be<re.length;++be)re[be]!=he&&(Ce||(Ce=[])).push(re[be]);return Ce}function Ri(re,he){re.markedSpans=re.markedSpans?re.markedSpans.concat([he]):[he],he.marker.attachLine(re)}function Fi(re,he,Ce){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=$e.marker,Lt=$e.from==null||(gt.inclusiveLeft?$e.from<=he:$e.from<he);if(Lt||$e.from==he&>.type=="bookmark"&&(!Ce||!$e.marker.insertLeft)){var kt=$e.to==null||(gt.inclusiveRight?$e.to>=he:$e.to>he);(be||(be=[])).push(new cr(gt,$e.from,kt?null:$e.to))}}return be}function Si(re,he,Ce){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=$e.marker,Lt=$e.to==null||(gt.inclusiveRight?$e.to>=he:$e.to>he);if(Lt||$e.from==he&>.type=="bookmark"&&(!Ce||$e.marker.insertLeft)){var kt=$e.from==null||(gt.inclusiveLeft?$e.from<=he:$e.from<he);(be||(be=[])).push(new cr(gt,kt?null:$e.from-he,$e.to==null?null:$e.to-he))}}return be}function Di(re,he){if(he.full)return null;var Ce=Nn(re,he.from.line)&&Wn(re,he.from.line).markedSpans,be=Nn(re,he.to.line)&&Wn(re,he.to.line).markedSpans;if(!Ce&&!be)return null;var Oe=he.from.ch,$e=he.to.ch,gt=Dn(he.from,he.to)==0,Lt=Fi(Ce,Oe,gt),kt=Si(be,$e,gt),It=he.text.length==1,nn=mt(he.text).length+(It?Oe:0);if(Lt)for(var _t=0;_t<Lt.length;++_t){var yn=Lt[_t];if(yn.to==null){var gn=Cr(kt,yn.marker);gn?It&&(yn.to=gn.to==null?null:gn.to+nn):yn.to=Oe}}if(kt)for(var hr=0;hr<kt.length;++hr){var mr=kt[hr];if(mr.to!=null&&(mr.to+=nn),mr.from==null){var Er=Cr(Lt,mr.marker);Er||(mr.from=nn,It&&(Lt||(Lt=[])).push(mr))}else mr.from+=nn,It&&(Lt||(Lt=[])).push(mr)}Lt&&(Lt=en(Lt)),kt&&kt!=Lt&&(kt=en(kt));var Rr=[Lt];if(!It){var ri=he.text.length-2,Yr;if(ri>0&&Lt)for(var ci=0;ci<Lt.length;++ci)Lt[ci].to==null&&(Yr||(Yr=[])).push(new cr(Lt[ci].marker,null,null));for(var Ii=0;Ii<ri;++Ii)Rr.push(Yr);Rr.push(kt)}return Rr}function en(re){for(var he=0;he<re.length;++he){var Ce=re[he];Ce.from!=null&&Ce.from==Ce.to&&Ce.marker.clearWhenEmpty!==!1&&re.splice(he--,1)}return re.length?re:null}function dn(re,he,Ce){var be=null;if(re.iter(he.line,Ce.line+1,function(gn){if(gn.markedSpans)for(var hr=0;hr<gn.markedSpans.length;++hr){var mr=gn.markedSpans[hr].marker;mr.readOnly&&(!be||wt(be,mr)==-1)&&(be||(be=[])).push(mr)}}),!be)return null;for(var Oe=[{from:he,to:Ce}],$e=0;$e<be.length;++$e)for(var gt=be[$e],Lt=gt.find(0),kt=0;kt<Oe.length;++kt){var It=Oe[kt];if(!(Dn(It.to,Lt.from)<0||Dn(It.from,Lt.to)>0)){var nn=[kt,1],_t=Dn(It.from,Lt.from),yn=Dn(It.to,Lt.to);(_t<0||!gt.inclusiveLeft&&!_t)&&nn.push({from:It.from,to:Lt.from}),(yn>0||!gt.inclusiveRight&&!yn)&&nn.push({from:Lt.to,to:It.to}),Oe.splice.apply(Oe,nn),kt+=nn.length-3}}return Oe}function tn(re){var he=re.markedSpans;if(he){for(var Ce=0;Ce<he.length;++Ce)he[Ce].marker.detachLine(re);re.markedSpans=null}}function lt(re,he){if(he){for(var Ce=0;Ce<he.length;++Ce)he[Ce].marker.attachLine(re);re.markedSpans=he}}function zn(re){return re.inclusiveLeft?-1:0}function Pn(re){return re.inclusiveRight?1:0}function In(re,he){var Ce=re.lines.length-he.lines.length;if(Ce!=0)return Ce;var be=re.find(),Oe=he.find(),$e=Dn(be.from,Oe.from)||zn(re)-zn(he);if($e)return-$e;var gt=Dn(be.to,Oe.to)||Pn(re)-Pn(he);return gt||he.id-re.id}function Qn(re,he){var Ce=rn&&re.markedSpans,be;if(Ce)for(var Oe=void 0,$e=0;$e<Ce.length;++$e)Oe=Ce[$e],Oe.marker.collapsed&&(he?Oe.from:Oe.to)==null&&(!be||In(be,Oe.marker)<0)&&(be=Oe.marker);return be}function ar(re){return Qn(re,!0)}function Sn(re){return Qn(re,!1)}function Gn(re,he){var Ce=rn&&re.markedSpans,be;if(Ce)for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe];$e.marker.collapsed&&($e.from==null||$e.from<he)&&($e.to==null||$e.to>he)&&(!be||In(be,$e.marker)<0)&&(be=$e.marker)}return be}function Hn(re,he,Ce,be,Oe){var $e=Wn(re,he),gt=rn&&$e.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;++Lt){var kt=gt[Lt];if(kt.marker.collapsed){var It=kt.marker.find(0),nn=Dn(It.from,Ce)||zn(kt.marker)-zn(Oe),_t=Dn(It.to,be)||Pn(kt.marker)-Pn(Oe);if(!(nn>=0&&_t<=0||nn<=0&&_t>=0)&&(nn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Dn(It.to,Ce)>=0:Dn(It.to,Ce)>0)||nn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Dn(It.from,be)<=0:Dn(It.from,be)<0)))return!0}}}function Kn(re){for(var he;he=ar(re);)re=he.find(-1,!0).line;return re}function Zn(re){for(var he;he=Sn(re);)re=he.find(1,!0).line;return re}function Tr(re){for(var he,Ce;he=Sn(re);)re=he.find(1,!0).line,(Ce||(Ce=[])).push(re);return Ce}function yr(re,he){var Ce=Wn(re,he),be=Kn(Ce);return Ce==be?he:jt(be)}function ur(re,he){if(he>re.lastLine())return he;var Ce=Wn(re,he),be;if(!mn(re,Ce))return he;for(;be=Sn(Ce);)Ce=be.find(1,!0).line;return jt(Ce)+1}function mn(re,he){var Ce=rn&&he.markedSpans;if(Ce){for(var be=void 0,Oe=0;Oe<Ce.length;++Oe)if(be=Ce[Oe],!!be.marker.collapsed){if(be.from==null)return!0;if(!be.marker.widgetNode&&be.from==0&&be.marker.inclusiveLeft&&dr(re,he,be))return!0}}}function dr(re,he,Ce){if(Ce.to==null){var be=Ce.marker.find(1,!0);return dr(re,be.line,Cr(be.line.markedSpans,Ce.marker))}if(Ce.marker.inclusiveRight&&Ce.to==he.text.length)return!0;for(var Oe=void 0,$e=0;$e<he.markedSpans.length;++$e)if(Oe=he.markedSpans[$e],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ce.to&&(Oe.to==null||Oe.to!=Ce.from)&&(Oe.marker.inclusiveLeft||Ce.marker.inclusiveRight)&&dr(re,he,Oe))return!0}function Or(re){re=Kn(re);for(var he=0,Ce=re.parent,be=0;be<Ce.lines.length;++be){var Oe=Ce.lines[be];if(Oe==re)break;he+=Oe.height}for(var $e=Ce.parent;$e;Ce=$e,$e=Ce.parent)for(var gt=0;gt<$e.children.length;++gt){var Lt=$e.children[gt];if(Lt==Ce)break;he+=Lt.height}return he}function oi(re){if(re.height==0)return 0;for(var he=re.text.length,Ce,be=re;Ce=ar(be);){var Oe=Ce.find(0,!0);be=Oe.from.line,he+=Oe.from.ch-Oe.to.ch}for(be=re;Ce=Sn(be);){var $e=Ce.find(0,!0);he-=be.text.length-$e.from.ch,be=$e.to.line,he+=be.text.length-$e.to.ch}return he}function ei(re){var he=re.display,Ce=re.doc;he.maxLine=Wn(Ce,Ce.first),he.maxLineLength=oi(he.maxLine),he.maxLineChanged=!0,Ce.iter(function(be){var Oe=oi(be);Oe>he.maxLineLength&&(he.maxLineLength=Oe,he.maxLine=be)})}var ui=function(re,he,Ce){this.text=re,lt(this,he),this.height=Ce?Ce(this):1};ui.prototype.lineNo=function(){return jt(this)},kn(ui);function pi(re,he,Ce,be){re.text=he,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),tn(re),lt(re,Ce);var Oe=be?be(re):1;Oe!=re.height&&Xn(re,Oe)}function hi(re){re.parent=null,tn(re)}var _i={},zi={};function mo(re,he){if(!re||/^\s*$/.test(re))return null;var Ce=he.addModeClass?zi:_i;return Ce[re]||(Ce[re]=re.replace(/\S+/g,"cm-$&"))}function $t(re,he){var Ce=Be("span",null,null,ve?"padding-right: .1px":null),be={pre:Be("pre",[Ce],"CodeMirror-line"),content:Ce,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};he.measure={};for(var Oe=0;Oe<=(he.rest?he.rest.length:0);Oe++){var $e=Oe?he.rest[Oe-1]:he.line,gt=void 0;be.pos=0,be.addToken=Ti,Jr(re.display.measure)&&(gt=qt($e,re.doc.direction))&&(be.addToken=Pi(be.addToken,gt)),be.map=[];var Lt=he!=re.display.externalMeasured&&jt($e);eo($e,be,ni(re,$e,Lt)),$e.styleClasses&&($e.styleClasses.bgClass&&(be.bgClass=ot($e.styleClasses.bgClass,be.bgClass||"")),$e.styleClasses.textClass&&(be.textClass=ot($e.styleClasses.textClass,be.textClass||""))),be.map.length==0&&be.map.push(0,0,be.content.appendChild(Mi(re.display.measure))),Oe==0?(he.measure.map=be.map,he.measure.cache={}):((he.measure.maps||(he.measure.maps=[])).push(be.map),(he.measure.caches||(he.measure.caches=[])).push({}))}if(ve){var kt=be.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(be.content.className="cm-tab-wrap-hack")}return on(re,"renderLine",re,he.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function vi(re){var he=Me("span","\u2022","cm-invalidchar");return he.title="\\u"+re.charCodeAt(0).toString(16),he.setAttribute("aria-label",he.title),he}function Ti(re,he,Ce,be,Oe,$e,gt){if(he){var Lt=re.splitSpaces?Xr(he,re.trailingSpace):he,kt=re.cm.state.specialChars,It=!1,nn;if(!kt.test(he))re.col+=he.length,nn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+he.length,nn),_e&&de<9&&(It=!0),re.pos+=he.length;else{nn=document.createDocumentFragment();for(var _t=0;;){kt.lastIndex=_t;var yn=kt.exec(he),gn=yn?yn.index-_t:he.length-_t;if(gn){var hr=document.createTextNode(Lt.slice(_t,_t+gn));_e&&de<9?nn.appendChild(Me("span",[hr])):nn.appendChild(hr),re.map.push(re.pos,re.pos+gn,hr),re.col+=gn,re.pos+=gn}if(!yn)break;_t+=gn+1;var mr=void 0;if(yn[0]==" "){var Er=re.cm.options.tabSize,Rr=Er-re.col%Er;mr=nn.appendChild(Me("span",Ft(Rr),"cm-tab")),mr.setAttribute("role","presentation"),mr.setAttribute("cm-text"," "),re.col+=Rr}else yn[0]=="\r"||yn[0]==`
|
|
`?(mr=nn.appendChild(Me("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),mr.setAttribute("cm-text",yn[0]),re.col+=1):(mr=re.cm.options.specialCharPlaceholder(yn[0]),mr.setAttribute("cm-text",yn[0]),_e&&de<9?nn.appendChild(Me("span",[mr])):nn.appendChild(mr),re.col+=1);re.map.push(re.pos,re.pos+1,mr),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(he.length-1)==32,Ce||be||Oe||It||$e||gt){var ri=Ce||"";be&&(ri+=be),Oe&&(ri+=Oe);var Yr=Me("span",[nn],ri,$e);if(gt)for(var ci in gt)gt.hasOwnProperty(ci)&&ci!="style"&&ci!="class"&&Yr.setAttribute(ci,gt[ci]);return re.content.appendChild(Yr)}re.content.appendChild(nn)}}function Xr(re,he){if(re.length>1&&!/ /.test(re))return re;for(var Ce=he,be="",Oe=0;Oe<re.length;Oe++){var $e=re.charAt(Oe);$e==" "&&Ce&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&($e="\xA0"),be+=$e,Ce=$e==" "}return be}function Pi(re,he){return function(Ce,be,Oe,$e,gt,Lt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var It=Ce.pos,nn=It+be.length;;){for(var _t=void 0,yn=0;yn<he.length&&(_t=he[yn],!(_t.to>It&&_t.from<=It));yn++);if(_t.to>=nn)return re(Ce,be,Oe,$e,gt,Lt,kt);re(Ce,be.slice(0,_t.to-It),Oe,$e,null,Lt,kt),$e=null,be=be.slice(_t.to-It),It=_t.to}}}function Wr(re,he,Ce,be){var Oe=!be&&Ce.widgetNode;Oe&&re.map.push(re.pos,re.pos+he,Oe),!be&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",Ce.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=he,re.trailingSpace=!1}function eo(re,he,Ce){var be=re.markedSpans,Oe=re.text,$e=0;if(!be){for(var gt=1;gt<Ce.length;gt+=2)he.addToken(he,Oe.slice($e,$e=Ce[gt]),mo(Ce[gt+1],he.cm.options));return}for(var Lt=Oe.length,kt=0,It=1,nn="",_t,yn,gn=0,hr,mr,Er,Rr,ri;;){if(gn==kt){hr=mr=Er=yn="",ri=null,Rr=null,gn=1/0;for(var Yr=[],ci=void 0,Ii=0;Ii<be.length;++Ii){var Zr=be[Ii],$i=Zr.marker;if($i.type=="bookmark"&&Zr.from==kt&&$i.widgetNode)Yr.push($i);else if(Zr.from<=kt&&(Zr.to==null||Zr.to>kt||$i.collapsed&&Zr.to==kt&&Zr.from==kt)){if(Zr.to!=null&&Zr.to!=kt&&gn>Zr.to&&(gn=Zr.to,mr=""),$i.className&&(hr+=" "+$i.className),$i.css&&(yn=(yn?yn+";":"")+$i.css),$i.startStyle&&Zr.from==kt&&(Er+=" "+$i.startStyle),$i.endStyle&&Zr.to==gn&&(ci||(ci=[])).push($i.endStyle,Zr.to),$i.title&&((ri||(ri={})).title=$i.title),$i.attributes)for(var Xo in $i.attributes)(ri||(ri={}))[Xo]=$i.attributes[Xo];$i.collapsed&&(!Rr||In(Rr.marker,$i)<0)&&(Rr=Zr)}else Zr.from>kt&&gn>Zr.from&&(gn=Zr.from)}if(ci)for(var Ia=0;Ia<ci.length;Ia+=2)ci[Ia+1]==gn&&(mr+=" "+ci[Ia]);if(!Rr||Rr.from==kt)for(var ia=0;ia<Yr.length;++ia)Wr(he,0,Yr[ia]);if(Rr&&(Rr.from||0)==kt){if(Wr(he,(Rr.to==null?Lt+1:Rr.to)-kt,Rr.marker,Rr.from==null),Rr.to==null)return;Rr.to==kt&&(Rr=!1)}}if(kt>=Lt)break;for(var Ds=Math.min(Lt,gn);;){if(nn){var gs=kt+nn.length;if(!Rr){var La=gs>Ds?nn.slice(0,Ds-kt):nn;he.addToken(he,La,_t?_t+hr:hr,Er,kt+La.length==gn?mr:"",yn,ri)}if(gs>=Ds){nn=nn.slice(Ds-kt),kt=Ds;break}kt=gs,Er=""}nn=Oe.slice($e,$e=Ce[It++]),_t=mo(Ce[It++],he.cm.options)}}}function Gi(re,he,Ce){this.line=he,this.rest=Tr(he),this.size=this.rest?jt(mt(this.rest))-Ce+1:1,this.node=this.text=null,this.hidden=mn(re,he)}function xi(re,he,Ce){for(var be=[],Oe,$e=he;$e<Ce;$e=Oe){var gt=new Gi(re.doc,Wn(re.doc,$e),$e);Oe=$e+gt.size,be.push(gt)}return be}var qi=null;function ga(re){qi?qi.ops.push(re):re.ownsGroup=qi={ops:[re],delayedCallbacks:[]}}function Ao(re){var he=re.delayedCallbacks,Ce=0;do{for(;Ce<he.length;Ce++)he[Ce].call(null);for(var be=0;be<re.ops.length;be++){var Oe=re.ops[be];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ce<he.length)}function Aa(re,he){var Ce=re.ownsGroup;if(Ce)try{Ao(Ce)}finally{qi=null,he(Ce)}}var ma=null;function Ur(re,he){var Ce=Wt(re,he);if(Ce.length){var be=Array.prototype.slice.call(arguments,2),Oe;qi?Oe=qi.delayedCallbacks:ma?Oe=ma:(Oe=ma=[],setTimeout(to,0));for(var $e=function(Lt){Oe.push(function(){return Ce[Lt].apply(null,be)})},gt=0;gt<Ce.length;++gt)$e(gt)}}function to(){var re=ma;ma=null;for(var he=0;he<re.length;++he)re[he]()}function Co(re,he,Ce,be){for(var Oe=0;Oe<he.changes.length;Oe++){var $e=he.changes[Oe];$e=="text"?Ln(re,he):$e=="gutter"?Ei(re,he,Ce,be):$e=="class"?Vr(re,he):$e=="widget"&&co(re,he,be)}he.changes=null}function Qo(re){return re.node==re.text&&(re.node=Me("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),_e&&de<8&&(re.node.style.zIndex=2)),re.node}function Ci(re,he){var Ce=he.bgClass?he.bgClass+" "+(he.line.bgClass||""):he.line.bgClass;if(Ce&&(Ce+=" CodeMirror-linebackground"),he.background)Ce?he.background.className=Ce:(he.background.parentNode.removeChild(he.background),he.background=null);else if(Ce){var be=Qo(he);he.background=be.insertBefore(Me("div",null,Ce),be.firstChild),re.display.input.setUneditable(he.background)}}function wi(re,he){var Ce=re.display.externalMeasured;return Ce&&Ce.line==he.line?(re.display.externalMeasured=null,he.measure=Ce.measure,Ce.built):$t(re,he)}function Ln(re,he){var Ce=he.text.className,be=wi(re,he);he.text==he.node&&(he.node=be.pre),he.text.parentNode.replaceChild(be.pre,he.text),he.text=be.pre,be.bgClass!=he.bgClass||be.textClass!=he.textClass?(he.bgClass=be.bgClass,he.textClass=be.textClass,Vr(re,he)):Ce&&(he.text.className=Ce)}function Vr(re,he){Ci(re,he),he.line.wrapClass?Qo(he).className=he.line.wrapClass:he.node!=he.text&&(he.node.className="");var Ce=he.textClass?he.textClass+" "+(he.line.textClass||""):he.line.textClass;he.text.className=Ce||""}function Ei(re,he,Ce,be){if(he.gutter&&(he.node.removeChild(he.gutter),he.gutter=null),he.gutterBackground&&(he.node.removeChild(he.gutterBackground),he.gutterBackground=null),he.line.gutterClass){var Oe=Qo(he);he.gutterBackground=Me("div",null,"CodeMirror-gutter-background "+he.line.gutterClass,"left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px; width: "+be.gutterTotalWidth+"px"),re.display.input.setUneditable(he.gutterBackground),Oe.insertBefore(he.gutterBackground,he.text)}var $e=he.line.gutterMarkers;if(re.options.lineNumbers||$e){var gt=Qo(he),Lt=he.gutter=Me("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Lt),gt.insertBefore(Lt,he.text),he.line.gutterClass&&(Lt.className+=" "+he.line.gutterClass),re.options.lineNumbers&&(!$e||!$e["CodeMirror-linenumbers"])&&(he.lineNumber=Lt.appendChild(Me("div",Yn(re.options,Ce),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),$e)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var It=re.display.gutterSpecs[kt].className,nn=$e.hasOwnProperty(It)&&$e[It];nn&&Lt.appendChild(Me("div",[nn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[It]+"px; width: "+be.gutterWidth[It]+"px"))}}}function co(re,he,Ce){he.alignable&&(he.alignable=null);for(var be=je("CodeMirror-linewidget"),Oe=he.node.firstChild,$e=void 0;Oe;Oe=$e)$e=Oe.nextSibling,be.test(Oe.className)&&he.node.removeChild(Oe);aa(re,he,Ce)}function ba(re,he,Ce,be){var Oe=wi(re,he);return he.text=he.node=Oe.pre,Oe.bgClass&&(he.bgClass=Oe.bgClass),Oe.textClass&&(he.textClass=Oe.textClass),Vr(re,he),Ei(re,he,Ce,be),aa(re,he,be),he.node}function aa(re,he,Ce){if(ai(re,he.line,he,Ce,!0),he.rest)for(var be=0;be<he.rest.length;be++)ai(re,he.rest[be],he,Ce,!1)}function ai(re,he,Ce,be,Oe){if(he.widgets)for(var $e=Qo(Ce),gt=0,Lt=he.widgets;gt<Lt.length;++gt){var kt=Lt[gt],It=Me("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||It.setAttribute("cm-ignore-events","true"),Wo(kt,It,Ce,be),re.display.input.setUneditable(It),Oe&&kt.above?$e.insertBefore(It,Ce.gutter||Ce.text):$e.appendChild(It),Ur(kt,"redraw")}}function Wo(re,he,Ce,be){if(re.noHScroll){(Ce.alignable||(Ce.alignable=[])).push(he);var Oe=be.wrapperWidth;he.style.left=be.fixedPos+"px",re.coverGutter||(Oe-=be.gutterTotalWidth,he.style.paddingLeft=be.gutterTotalWidth+"px"),he.style.width=Oe+"px"}re.coverGutter&&(he.style.zIndex=5,he.style.position="relative",re.noHScroll||(he.style.marginLeft=-be.gutterTotalWidth+"px"))}function Ko(re){if(re.height!=null)return re.height;var he=re.doc.cm;if(!he)return 0;if(!Ye(document.body,re.node)){var Ce="position: relative;";re.coverGutter&&(Ce+="margin-left: -"+he.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ce+="width: "+he.display.wrapper.clientWidth+"px;"),Te(he.display.measure,Me("div",[re.node],null,Ce))}return re.height=re.node.parentNode.offsetHeight}function jo(re,he){for(var Ce=tr(he);Ce!=re.wrapper;Ce=Ce.parentNode)if(!Ce||Ce.nodeType==1&&Ce.getAttribute("cm-ignore-events")=="true"||Ce.parentNode==re.sizer&&Ce!=re.mover)return!0}function io(re){return re.lineSpace.offsetTop}function Pa(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function is(re){if(re.cachedPaddingH)return re.cachedPaddingH;var he=Te(re.measure,Me("pre","x","CodeMirror-line-like")),Ce=window.getComputedStyle?window.getComputedStyle(he):he.currentStyle,be={left:parseInt(Ce.paddingLeft),right:parseInt(Ce.paddingRight)};return!isNaN(be.left)&&!isNaN(be.right)&&(re.cachedPaddingH=be),be}function fo(re){return Ct-re.display.nativeBarWidth}function os(re){return re.display.scroller.clientWidth-fo(re)-re.display.barWidth}function Gs(re){return re.display.scroller.clientHeight-fo(re)-re.display.barHeight}function Lu(re,he,Ce){var be=re.options.lineWrapping,Oe=be&&os(re);if(!he.measure.heights||be&&he.measure.width!=Oe){var $e=he.measure.heights=[];if(be){he.measure.width=Oe;for(var gt=he.text.firstChild.getClientRects(),Lt=0;Lt<gt.length-1;Lt++){var kt=gt[Lt],It=gt[Lt+1];Math.abs(kt.bottom-It.bottom)>2&&$e.push((kt.bottom+It.top)/2-Ce.top)}}$e.push(Ce.bottom-Ce.top)}}function Ho(re,he,Ce){if(re.line==he)return{map:re.measure.map,cache:re.measure.cache};for(var be=0;be<re.rest.length;be++)if(re.rest[be]==he)return{map:re.measure.maps[be],cache:re.measure.caches[be]};for(var Oe=0;Oe<re.rest.length;Oe++)if(jt(re.rest[Oe])>Ce)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function th(re,he){he=Kn(he);var Ce=jt(he),be=re.display.externalMeasured=new Gi(re.doc,he,Ce);be.lineN=Ce;var Oe=be.built=$t(re,be);return be.text=Oe.pre,Te(re.display.lineMeasure,Oe.pre),be}function Mu(re,he,Ce,be){return Ns(re,gl(re,he),Ce,be)}function Nu(re,he){if(he>=re.display.viewFrom&&he<re.display.viewTo)return re.display.view[js(re,he)];var Ce=re.display.externalMeasured;if(Ce&&he>=Ce.lineN&&he<Ce.lineN+Ce.size)return Ce}function gl(re,he){var Ce=jt(he),be=Nu(re,Ce);be&&!be.text?be=null:be&&be.changes&&(Co(re,be,Ce,Fu(re)),re.curOp.forceUpdate=!0),be||(be=th(re,he));var Oe=Ho(be,he,Ce);return{line:he,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Ns(re,he,Ce,be,Oe){he.before&&(Ce=-1);var $e=Ce+(be||""),gt;return he.cache.hasOwnProperty($e)?gt=he.cache[$e]:(he.rect||(he.rect=he.view.text.getBoundingClientRect()),he.hasHeights||(Lu(re,he.view,he.rect),he.hasHeights=!0),gt=Vo(re,he,Ce,be),gt.bogus||(he.cache[$e]=gt)),{left:gt.left,right:gt.right,top:Oe?gt.rtop:gt.top,bottom:Oe?gt.rbottom:gt.bottom}}var Ll={left:0,right:0,top:0,bottom:0};function nh(re,he,Ce){for(var be,Oe,$e,gt,Lt,kt,It=0;It<re.length;It+=3)if(Lt=re[It],kt=re[It+1],he<Lt?(Oe=0,$e=1,gt="left"):he<kt?(Oe=he-Lt,$e=Oe+1):(It==re.length-3||he==kt&&re[It+3]>he)&&($e=kt-Lt,Oe=$e-1,he>=kt&&(gt="right")),Oe!=null){if(be=re[It+2],Lt==kt&&Ce==(be.insertLeft?"left":"right")&&(gt=Ce),Ce=="left"&&Oe==0)for(;It&&re[It-2]==re[It-3]&&re[It-1].insertLeft;)be=re[(It-=3)+2],gt="left";if(Ce=="right"&&Oe==kt-Lt)for(;It<re.length-3&&re[It+3]==re[It+4]&&!re[It+5].insertLeft;)be=re[(It+=3)+2],gt="right";break}return{node:be,start:Oe,end:$e,collapse:gt,coverStart:Lt,coverEnd:kt}}function Au(re,he){var Ce=Ll;if(he=="left")for(var be=0;be<re.length&&(Ce=re[be]).left==Ce.right;be++);else for(var Oe=re.length-1;Oe>=0&&(Ce=re[Oe]).left==Ce.right;Oe--);return Ce}function Vo(re,he,Ce,be){var Oe=nh(he.map,Ce,be),$e=Oe.node,gt=Oe.start,Lt=Oe.end,kt=Oe.collapse,It;if($e.nodeType==3){for(var nn=0;nn<4;nn++){for(;gt&&Ze(he.line.text.charAt(Oe.coverStart+gt));)--gt;for(;Oe.coverStart+Lt<Oe.coverEnd&&Ze(he.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(_e&&de<9&>==0&&Lt==Oe.coverEnd-Oe.coverStart?It=$e.parentNode.getBoundingClientRect():It=Au(Ge($e,gt,Lt).getClientRects(),be),It.left||It.right||gt==0)break;Lt=gt,gt=gt-1,kt="right"}_e&&de<11&&(It=ju(re.display.measure,It))}else{gt>0&&(kt=be="right");var _t;re.options.lineWrapping&&(_t=$e.getClientRects()).length>1?It=_t[be=="right"?_t.length-1:0]:It=$e.getBoundingClientRect()}if(_e&&de<9&&!gt&&(!It||!It.left&&!It.right)){var yn=$e.parentNode.getClientRects()[0];yn?It={left:yn.left,right:yn.left+Hl(re.display),top:yn.top,bottom:yn.bottom}:It=Ll}for(var gn=It.top-he.rect.top,hr=It.bottom-he.rect.top,mr=(gn+hr)/2,Er=he.view.measure.heights,Rr=0;Rr<Er.length-1&&!(mr<Er[Rr]);Rr++);var ri=Rr?Er[Rr-1]:0,Yr=Er[Rr],ci={left:(kt=="right"?It.right:It.left)-he.rect.left,right:(kt=="left"?It.left:It.right)-he.rect.left,top:ri,bottom:Yr};return!It.left&&!It.right&&(ci.bogus=!0),re.options.singleCursorHeightPerLine||(ci.rtop=gn,ci.rbottom=hr),ci}function ju(re,he){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!br(re))return he;var Ce=screen.logicalXDPI/screen.deviceXDPI,be=screen.logicalYDPI/screen.deviceYDPI;return{left:he.left*Ce,right:he.right*Ce,top:he.top*be,bottom:he.bottom*be}}function rh(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var he=0;he<re.rest.length;he++)re.measure.caches[he]={}}function iu(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var he=0;he<re.display.view.length;he++)rh(re.display.view[he])}function ou(re){iu(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function ja(){return ke&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Oa(){return ke&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function na(re){var he=0;if(re.widgets)for(var Ce=0;Ce<re.widgets.length;++Ce)re.widgets[Ce].above&&(he+=Ko(re.widgets[Ce]));return he}function sa(re,he,Ce,be,Oe){if(!Oe){var $e=na(he);Ce.top+=$e,Ce.bottom+=$e}if(be=="line")return Ce;be||(be="local");var gt=Or(he);if(be=="local"?gt+=io(re.display):gt-=re.display.viewOffset,be=="page"||be=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();gt+=Lt.top+(be=="window"?0:Oa());var kt=Lt.left+(be=="window"?0:ja());Ce.left+=kt,Ce.right+=kt}return Ce.top+=gt,Ce.bottom+=gt,Ce}function uo(re,he,Ce){if(Ce=="div")return he;var be=he.left,Oe=he.top;if(Ce=="page")be-=ja(),Oe-=Oa();else if(Ce=="local"||!Ce){var $e=re.display.sizer.getBoundingClientRect();be+=$e.left,Oe+=$e.top}var gt=re.display.lineSpace.getBoundingClientRect();return{left:be-gt.left,top:Oe-gt.top}}function Bi(re,he,Ce,be,Oe){return be||(be=Wn(re.doc,he.line)),sa(re,be,Mu(re,be,he.ch,Oe),Ce)}function Wi(re,he,Ce,be,Oe,$e){be=be||Wn(re.doc,he.line),Oe||(Oe=gl(re,be));function gt(hr,mr){var Er=Ns(re,Oe,hr,mr?"right":"left",$e);return mr?Er.left=Er.right:Er.right=Er.left,sa(re,be,Er,Ce)}var Lt=qt(be,re.doc.direction),kt=he.ch,It=he.sticky;if(kt>=be.text.length?(kt=be.text.length,It="before"):kt<=0&&(kt=0,It="after"),!Lt)return gt(It=="before"?kt-1:kt,It=="before");function nn(hr,mr,Er){var Rr=Lt[mr],ri=Rr.level==1;return gt(Er?hr-1:hr,ri!=Er)}var _t=Et(Lt,kt,It),yn=Dt,gn=nn(kt,_t,It=="before");return yn!=null&&(gn.other=nn(kt,yn,It!="before")),gn}function la(re,he){var Ce=0;he=sr(re.doc,he),re.options.lineWrapping||(Ce=Hl(re.display)*he.ch);var be=Wn(re.doc,he.line),Oe=Or(be)+io(re.display);return{left:Ce,right:Ce,top:Oe,bottom:Oe+be.height}}function $o(re,he,Ce,be,Oe){var $e=sn(re,he,Ce);return $e.xRel=Oe,be&&($e.outside=be),$e}function qo(re,he,Ce){var be=re.doc;if(Ce+=re.display.viewOffset,Ce<0)return $o(be.first,0,null,-1,-1);var Oe=ln(be,Ce),$e=be.first+be.size-1;if(Oe>$e)return $o(be.first+be.size-1,Wn(be,$e).text.length,null,1,1);he<0&&(he=0);for(var gt=Wn(be,Oe);;){var Lt=Tn(re,gt,Oe,he,Ce),kt=Gn(gt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!kt)return Lt;var It=kt.find(1);if(It.line==Oe)return It;gt=Wn(be,Oe=It.line)}}function jr(re,he,Ce,be){be-=na(he);var Oe=he.text.length,$e=ht(function(gt){return Ns(re,Ce,gt-1).bottom<=be},Oe,0);return Oe=ht(function(gt){return Ns(re,Ce,gt).top>be},$e,Oe),{begin:$e,end:Oe}}function As(re,he,Ce,be){Ce||(Ce=gl(re,he));var Oe=sa(re,he,Ns(re,Ce,be),"line").top;return jr(re,he,Ce,Oe)}function Gt(re,he,Ce,be){return re.bottom<=Ce?!1:re.top>Ce?!0:(be?re.left:re.right)>he}function Tn(re,he,Ce,be,Oe){Oe-=Or(he);var $e=gl(re,he),gt=na(he),Lt=0,kt=he.text.length,It=!0,nn=qt(he,re.doc.direction);if(nn){var _t=(re.options.lineWrapping?Ou:Ml)(re,he,Ce,$e,nn,be,Oe);It=_t.level!=1,Lt=It?_t.from:_t.to-1,kt=It?_t.to:_t.from-1}var yn=null,gn=null,hr=ht(function(Ii){var Zr=Ns(re,$e,Ii);return Zr.top+=gt,Zr.bottom+=gt,Gt(Zr,be,Oe,!1)?(Zr.top<=Oe&&Zr.left<=be&&(yn=Ii,gn=Zr),!0):!1},Lt,kt),mr,Er,Rr=!1;if(gn){var ri=be-gn.left<gn.right-be,Yr=ri==It;hr=yn+(Yr?0:1),Er=Yr?"after":"before",mr=ri?gn.left:gn.right}else{!It&&(hr==kt||hr==Lt)&&hr++,Er=hr==0?"after":hr==he.text.length?"before":Ns(re,$e,hr-(It?1:0)).bottom+gt<=Oe==It?"after":"before";var ci=Wi(re,sn(Ce,hr,Er),"line",he,$e);mr=ci.left,Rr=Oe<ci.top?-1:Oe>=ci.bottom?1:0}return hr=et(he.text,hr,1),$o(Ce,hr,Er,Rr,be-mr)}function Ml(re,he,Ce,be,Oe,$e,gt){var Lt=ht(function(_t){var yn=Oe[_t],gn=yn.level!=1;return Gt(Wi(re,sn(Ce,gn?yn.to:yn.from,gn?"before":"after"),"line",he,be),$e,gt,!0)},0,Oe.length-1),kt=Oe[Lt];if(Lt>0){var It=kt.level!=1,nn=Wi(re,sn(Ce,It?kt.from:kt.to,It?"after":"before"),"line",he,be);Gt(nn,$e,gt,!0)&&nn.top>gt&&(kt=Oe[Lt-1])}return kt}function Ou(re,he,Ce,be,Oe,$e,gt){var Lt=jr(re,he,be,gt),kt=Lt.begin,It=Lt.end;/\s/.test(he.text.charAt(It-1))&&It--;for(var nn=null,_t=null,yn=0;yn<Oe.length;yn++){var gn=Oe[yn];if(!(gn.from>=It||gn.to<=kt)){var hr=gn.level!=1,mr=Ns(re,be,hr?Math.min(It,gn.to)-1:Math.max(kt,gn.from)).right,Er=mr<$e?$e-mr+1e9:mr-$e;(!nn||_t>Er)&&(nn=gn,_t=Er)}}return nn||(nn=Oe[Oe.length-1]),nn.from<kt&&(nn={from:kt,to:nn.to,level:nn.level}),nn.to>It&&(nn={from:nn.from,to:It,level:nn.level}),nn}var ua;function Us(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(ua==null){ua=Me("pre",null,"CodeMirror-line-like");for(var he=0;he<49;++he)ua.appendChild(document.createTextNode("x")),ua.appendChild(Me("br"));ua.appendChild(document.createTextNode("x"))}Te(re.measure,ua);var Ce=ua.offsetHeight/50;return Ce>3&&(re.cachedTextHeight=Ce),Fe(re.measure),Ce||1}function Hl(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var he=Me("span","xxxxxxxxxx"),Ce=Me("pre",[he],"CodeMirror-line-like");Te(re.measure,Ce);var be=he.getBoundingClientRect(),Oe=(be.right-be.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function Fu(re){for(var he=re.display,Ce={},be={},Oe=he.gutters.clientLeft,$e=he.gutters.firstChild,gt=0;$e;$e=$e.nextSibling,++gt){var Lt=re.display.gutterSpecs[gt].className;Ce[Lt]=$e.offsetLeft+$e.clientLeft+Oe,be[Lt]=$e.clientWidth}return{fixedPos:Du(he),gutterTotalWidth:he.gutters.offsetWidth,gutterLeft:Ce,gutterWidth:be,wrapperWidth:he.wrapper.clientWidth}}function Du(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var he=Us(re.display),Ce=re.options.lineWrapping,be=Ce&&Math.max(5,re.display.scroller.clientWidth/Hl(re.display)-3);return function(Oe){if(mn(re.doc,Oe))return 0;var $e=0;if(Oe.widgets)for(var gt=0;gt<Oe.widgets.length;gt++)Oe.widgets[gt].height&&($e+=Oe.widgets[gt].height);return Ce?$e+(Math.ceil(Oe.text.length/be)||1)*he:$e+he}}function gi(re){var he=re.doc,Ce=Oo(re);he.iter(function(be){var Oe=Ce(be);Oe!=be.height&&Xn(be,Oe)})}function Ga(re,he,Ce,be){var Oe=re.display;if(!Ce&&tr(he).getAttribute("cm-not-content")=="true")return null;var $e,gt,Lt=Oe.lineSpace.getBoundingClientRect();try{$e=he.clientX-Lt.left,gt=he.clientY-Lt.top}catch(_t){return null}var kt=qo(re,$e,gt),It;if(be&&kt.xRel>0&&(It=Wn(re.doc,kt.line).text).length==kt.ch){var nn=Qe(It,It.length,re.options.tabSize)-It.length;kt=sn(kt.line,Math.max(0,Math.round(($e-is(re.display).left)/Hl(re.display))-nn))}return kt}function js(re,he){if(he>=re.display.viewTo||(he-=re.display.viewFrom,he<0))return null;for(var Ce=re.display.view,be=0;be<Ce.length;be++)if(he-=Ce[be].size,he<0)return be}function Fo(re,he,Ce,be){he==null&&(he=re.doc.first),Ce==null&&(Ce=re.doc.first+re.doc.size),be||(be=0);var Oe=re.display;if(be&&Ce<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>he)&&(Oe.updateLineNumbers=he),re.curOp.viewChanged=!0,he>=Oe.viewTo)rn&&yr(re.doc,he)<Oe.viewTo&&_o(re);else if(Ce<=Oe.viewFrom)rn&&ur(re.doc,Ce+be)>Oe.viewFrom?_o(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(he<=Oe.viewFrom&&Ce>=Oe.viewTo)_o(re);else if(he<=Oe.viewFrom){var $e=ds(re,Ce,Ce+be,1);$e?(Oe.view=Oe.view.slice($e.index),Oe.viewFrom=$e.lineN,Oe.viewTo+=be):_o(re)}else if(Ce>=Oe.viewTo){var gt=ds(re,he,he,-1);gt?(Oe.view=Oe.view.slice(0,gt.index),Oe.viewTo=gt.lineN):_o(re)}else{var Lt=ds(re,he,he,-1),kt=ds(re,Ce,Ce+be,1);Lt&&kt?(Oe.view=Oe.view.slice(0,Lt.index).concat(xi(re,Lt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=be):_o(re)}var It=Oe.externalMeasured;It&&(Ce<It.lineN?It.lineN+=be:he<It.lineN+It.size&&(Oe.externalMeasured=null))}function Ui(re,he,Ce){re.curOp.viewChanged=!0;var be=re.display,Oe=re.display.externalMeasured;if(Oe&&he>=Oe.lineN&&he<Oe.lineN+Oe.size&&(be.externalMeasured=null),!(he<be.viewFrom||he>=be.viewTo)){var $e=be.view[js(re,he)];if($e.node!=null){var gt=$e.changes||($e.changes=[]);wt(gt,Ce)==-1&>.push(Ce)}}}function _o(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ds(re,he,Ce,be){var Oe=js(re,he),$e,gt=re.display.view;if(!rn||Ce==re.doc.first+re.doc.size)return{index:Oe,lineN:Ce};for(var Lt=re.display.viewFrom,kt=0;kt<Oe;kt++)Lt+=gt[kt].size;if(Lt!=he){if(be>0){if(Oe==gt.length-1)return null;$e=Lt+gt[Oe].size-he,Oe++}else $e=Lt-he;he+=$e,Ce+=$e}for(;yr(re.doc,Ce)!=Ce;){if(Oe==(be<0?0:gt.length-1))return null;Ce+=be*gt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ce}}function wo(re,he,Ce){var be=re.display,Oe=be.view;Oe.length==0||he>=be.viewTo||Ce<=be.viewFrom?(be.view=xi(re,he,Ce),be.viewFrom=he):(be.viewFrom>he?be.view=xi(re,he,be.viewFrom).concat(be.view):be.viewFrom<he&&(be.view=be.view.slice(js(re,he))),be.viewFrom=he,be.viewTo<Ce?be.view=be.view.concat(xi(re,be.viewTo,Ce)):be.viewTo>Ce&&(be.view=be.view.slice(0,js(re,Ce)))),be.viewTo=Ce}function ws(re){for(var he=re.display.view,Ce=0,be=0;be<he.length;be++){var Oe=he[be];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ce}return Ce}function va(re){re.display.input.showSelection(re.display.input.prepareSelection())}function au(re,he){he===void 0&&(he=!0);for(var Ce=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),$e=be.selection=document.createDocumentFragment(),gt=0;gt<Ce.sel.ranges.length;gt++)if(!(!he&>==Ce.sel.primIndex)){var Lt=Ce.sel.ranges[gt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var kt=Lt.empty();(kt||re.options.showCursorWhenSelecting)&&oo(re,Lt.head,Oe),kt||no(re,Lt,$e)}}return be}function oo(re,he,Ce){var be=Wi(re,he,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=be.left+"px",Oe.style.top=be.top+"px",Oe.style.height=Math.max(0,be.bottom-be.top)*re.options.cursorHeight+"px",be.other){var $e=Ce.appendChild(Me("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$e.style.display="",$e.style.left=be.other.left+"px",$e.style.top=be.other.top+"px",$e.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,he){return re.top-he.top||re.left-he.left}function no(re,he,Ce){var be=re.display,Oe=re.doc,$e=document.createDocumentFragment(),gt=is(re.display),Lt=gt.left,kt=Math.max(be.sizerWidth,os(re)-be.sizer.offsetLeft)-gt.right,It=Oe.direction=="ltr";function nn(Yr,ci,Ii,Zr){ci<0&&(ci=0),ci=Math.round(ci),Zr=Math.round(Zr),$e.appendChild(Me("div",null,"CodeMirror-selected","position: absolute; left: "+Yr+`px;
|
|
top: `+ci+"px; width: "+(Ii==null?kt-Yr:Ii)+`px;
|
|
height: `+(Zr-ci)+"px"))}function _t(Yr,ci,Ii){var Zr=Wn(Oe,Yr),$i=Zr.text.length,Xo,Ia;function ia(La,Vs){return Bi(re,sn(Yr,La),"div",Zr,Vs)}function Ds(La,Vs,ss){var Ma=As(re,Zr,null,La),yo=Vs=="ltr"==(ss=="after")?"left":"right",ca=ss=="after"?Ma.begin:Ma.end-(/\s/.test(Zr.text.charAt(Ma.end-1))?2:1);return ia(ca,yo)[yo]}var gs=qt(Zr,Oe.direction);return at(gs,ci||0,Ii==null?$i:Ii,function(La,Vs,ss,Ma){var yo=ss=="ltr",ca=ia(La,yo?"left":"right"),Za=ia(Vs-1,yo?"right":"left"),ls=ci==null&&La==0,Ol=Ii==null&&Vs==$i,oa=Ma==0,Sl=!gs||Ma==gs.length-1;if(Za.top-ca.top<=3){var pa=(It?ls:Ol)&&oa,Af=(It?Ol:ls)&&Sl,sl=pa?Lt:(yo?ca:Za).left,Zs=Af?kt:(yo?Za:ca).right;nn(sl,ca.top,Zs-sl,ca.bottom)}else{var Bs,Bo,Xa,pu;yo?(Bs=It&&ls&&oa?Lt:ca.left,Bo=It?kt:Ds(La,ss,"before"),Xa=It?Lt:Ds(Vs,ss,"after"),pu=It&&Ol&&Sl?kt:Za.right):(Bs=It?Ds(La,ss,"before"):Lt,Bo=!It&&ls&&oa?kt:ca.right,Xa=!It&&Ol&&Sl?Lt:Za.left,pu=It?Ds(Vs,ss,"after"):kt),nn(Bs,ca.top,Bo-Bs,ca.bottom),ca.bottom<Za.top&&nn(Lt,ca.bottom,null,Za.top),nn(Xa,Za.top,pu-Xa,Za.bottom)}(!Xo||Ea(ca,Xo)<0)&&(Xo=ca),Ea(Za,Xo)<0&&(Xo=Za),(!Ia||Ea(ca,Ia)<0)&&(Ia=ca),Ea(Za,Ia)<0&&(Ia=Za)}),{start:Xo,end:Ia}}var yn=he.from(),gn=he.to();if(yn.line==gn.line)_t(yn.line,yn.ch,gn.ch);else{var hr=Wn(Oe,yn.line),mr=Wn(Oe,gn.line),Er=Kn(hr)==Kn(mr),Rr=_t(yn.line,yn.ch,Er?hr.text.length+1:null).end,ri=_t(gn.line,Er?0:null,gn.ch).start;Er&&(Rr.top<ri.top-2?(nn(Rr.right,Rr.top,null,Rr.bottom),nn(Lt,ri.top,ri.left,ri.bottom)):nn(Rr.right,Rr.top,ri.left-Rr.right,Rr.bottom)),Rr.bottom<ri.top&&nn(Lt,Rr.bottom,null,ri.top)}Ce.appendChild($e)}function bo(re){if(re.state.focused){var he=re.display;clearInterval(he.blinker);var Ce=!0;he.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?he.blinker=setInterval(function(){re.hasFocus()||Bu(re),he.cursorDiv.style.visibility=(Ce=!Ce)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(he.cursorDiv.style.visibility="hidden")}}function Eo(re){re.state.focused||(re.display.input.focus(),ho(re))}function zo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Bu(re))},100)}function ho(re,he){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(on(re,"focus",re,he),re.state.focused=!0,Ve(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),ve&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),bo(re))}function Bu(re,he){re.state.delayingBlurEvent||(re.state.focused&&(on(re,"blur",re,he),re.state.focused=!1,De(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function fi(re){for(var he=re.display,Ce=he.lineDiv.offsetTop,be=0;be<he.view.length;be++){var Oe=he.view[be],$e=re.options.lineWrapping,gt=void 0,Lt=0;if(!Oe.hidden){if(_e&&de<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;gt=kt-Ce,Ce=kt}else{var It=Oe.node.getBoundingClientRect();gt=It.bottom-It.top,!$e&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-It.left-1)}var nn=Oe.line.height-gt;if((nn>.005||nn<-.005)&&(Xn(Oe.line,gt),uf(Oe.line),Oe.rest))for(var _t=0;_t<Oe.rest.length;_t++)uf(Oe.rest[_t]);if(Lt>re.display.sizerWidth){var yn=Math.ceil(Lt/Hl(re.display));yn>re.display.maxLineLength&&(re.display.maxLineLength=yn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var he=0;he<re.widgets.length;++he){var Ce=re.widgets[he],be=Ce.node.parentNode;be&&(Ce.height=be.offsetHeight)}}function Ji(re,he,Ce){var be=Ce&&Ce.top!=null?Math.max(0,Ce.top):re.scroller.scrollTop;be=Math.floor(be-io(re));var Oe=Ce&&Ce.bottom!=null?Ce.bottom:be+re.wrapper.clientHeight,$e=ln(he,be),gt=ln(he,Oe);if(Ce&&Ce.ensure){var Lt=Ce.ensure.from.line,kt=Ce.ensure.to.line;Lt<$e?($e=Lt,gt=ln(he,Or(Wn(he,Lt))+re.wrapper.clientHeight)):Math.min(kt,he.lastLine())>=gt&&($e=ln(he,Or(Wn(he,kt))-re.wrapper.clientHeight),gt=kt)}return{from:$e,to:Math.max(gt,$e+1)}}function Cc(re,he){if(!cn(re,"scrollCursorIntoView")){var Ce=re.display,be=Ce.sizer.getBoundingClientRect(),Oe=null;if(he.top+be.top<0?Oe=!0:he.bottom+be.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!Pe){var $e=Me("div","\u200B",null,`position: absolute;
|
|
top: `+(he.top-Ce.viewOffset-io(re.display))+`px;
|
|
height: `+(he.bottom-he.top+fo(re)+Ce.barHeight)+`px;
|
|
left: `+he.left+"px; width: "+Math.max(2,he.right-he.left)+"px;");re.display.lineSpace.appendChild($e),$e.scrollIntoView(Oe),re.display.lineSpace.removeChild($e)}}}function su(re,he,Ce,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&he==Ce&&(he=he.ch?sn(he.line,he.sticky=="before"?he.ch-1:he.ch,"after"):he,Ce=he.sticky=="before"?sn(he.line,he.ch+1,"before"):he);for(var $e=0;$e<5;$e++){var gt=!1,Lt=Wi(re,he),kt=!Ce||Ce==he?Lt:Wi(re,Ce);Oe={left:Math.min(Lt.left,kt.left),top:Math.min(Lt.top,kt.top)-be,right:Math.max(Lt.left,kt.left),bottom:Math.max(Lt.bottom,kt.bottom)+be};var It=Ec(re,Oe),nn=re.doc.scrollTop,_t=re.doc.scrollLeft;if(It.scrollTop!=null&&(Wl(re,It.scrollTop),Math.abs(re.doc.scrollTop-nn)>1&&(gt=!0)),It.scrollLeft!=null&&(Kl(re,It.scrollLeft),Math.abs(re.doc.scrollLeft-_t)>1&&(gt=!0)),!gt)break}return Oe}function ih(re,he){var Ce=Ec(re,he);Ce.scrollTop!=null&&Wl(re,Ce.scrollTop),Ce.scrollLeft!=null&&Kl(re,Ce.scrollLeft)}function Ec(re,he){var Ce=re.display,be=Us(re.display);he.top<0&&(he.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ce.scroller.scrollTop,$e=Gs(re),gt={};he.bottom-he.top>$e&&(he.bottom=he.top+$e);var Lt=re.doc.height+Pa(Ce),kt=he.top<be,It=he.bottom>Lt-be;if(he.top<Oe)gt.scrollTop=kt?0:he.top;else if(he.bottom>Oe+$e){var nn=Math.min(he.top,(It?Lt:he.bottom)-$e);nn!=Oe&&(gt.scrollTop=nn)}var _t=re.options.fixedGutter?0:Ce.gutters.offsetWidth,yn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ce.scroller.scrollLeft-_t,gn=os(re)-Ce.gutters.offsetWidth,hr=he.right-he.left>gn;return hr&&(he.right=he.left+gn),he.left<10?gt.scrollLeft=0:he.left<yn?gt.scrollLeft=Math.max(0,he.left+_t-(hr?0:10)):he.right>gn+yn-3&&(gt.scrollLeft=he.right+(hr?0:10)-gn),gt}function _h(re,he){he!=null&&(nl(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+he)}function Nl(re){nl(re);var he=re.getCursor();re.curOp.scrollToPos={from:he,to:he,margin:re.options.cursorScrollMargin}}function Iu(re,he,Ce){(he!=null||Ce!=null)&&nl(re),he!=null&&(re.curOp.scrollLeft=he),Ce!=null&&(re.curOp.scrollTop=Ce)}function lo(re,he){nl(re),re.curOp.scrollToPos=he}function nl(re){var he=re.curOp.scrollToPos;if(he){re.curOp.scrollToPos=null;var Ce=la(re,he.from),be=la(re,he.to);zh(re,Ce,be,he.margin)}}function zh(re,he,Ce,be){var Oe=Ec(re,{left:Math.min(he.left,Ce.left),top:Math.min(he.top,Ce.top)-be,right:Math.max(he.right,Ce.right),bottom:Math.max(he.bottom,Ce.bottom)+be});Iu(re,Oe.scrollLeft,Oe.scrollTop)}function Wl(re,he){Math.abs(re.doc.scrollTop-he)<2||(st||ah(re,{top:he}),kc(re,he,!0),st&&ah(re),Tc(re,100))}function kc(re,he,Ce){he=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,he)),!(re.display.scroller.scrollTop==he&&!Ce)&&(re.doc.scrollTop=he,re.display.scrollbars.setScrollTop(he),re.display.scroller.scrollTop!=he&&(re.display.scroller.scrollTop=he))}function Kl(re,he,Ce,be){he=Math.max(0,Math.min(he,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ce?he==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-he)<2)&&!be)&&(re.doc.scrollLeft=he,td(re),re.display.scroller.scrollLeft!=he&&(re.display.scroller.scrollLeft=he),re.display.scrollbars.setScrollLeft(he))}function Ki(re){var he=re.display,Ce=he.gutters.offsetWidth,be=Math.round(re.doc.height+Pa(re.display));return{clientHeight:he.scroller.clientHeight,viewHeight:he.wrapper.clientHeight,scrollWidth:he.scroller.scrollWidth,clientWidth:he.scroller.clientWidth,viewWidth:he.wrapper.clientWidth,barLeft:re.options.fixedGutter?Ce:0,docHeight:be,scrollHeight:be+fo(re)+he.barHeight,nativeBarWidth:he.nativeBarWidth,gutterWidth:Ce}}var ao=function(re,he,Ce){this.cm=Ce;var be=this.vert=Me("div",[Me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Me("div",[Me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),Xt(be,"scroll",function(){be.clientHeight&&he(be.scrollTop,"vertical")}),Xt(Oe,"scroll",function(){Oe.clientWidth&&he(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_e&&de<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ao.prototype.update=function(re){var he=re.scrollWidth>re.clientWidth+1,Ce=re.scrollHeight>re.clientHeight+1,be=re.nativeBarWidth;if(Ce){this.vert.style.display="block",this.vert.style.bottom=he?be+"px":"0";var Oe=re.viewHeight-(he?be:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Oe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(he){this.horiz.style.display="block",this.horiz.style.right=Ce?be+"px":"0",this.horiz.style.left=re.barLeft+"px";var $e=re.viewWidth-re.barLeft-(Ce?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+$e)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(be==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ce?be:0,bottom:he?be:0}},ao.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ao.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ao.prototype.zeroWidthHack=function(){var re=se&&!me?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new rt,this.disableVert=new rt},ao.prototype.enableZeroWidthBar=function(re,he,Ce){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),$e=Ce=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);$e!=re?re.style.pointerEvents="none":he.set(1e3,be)}he.set(1e3,be)},ao.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Zo=function(){};Zo.prototype.update=function(){return{bottom:0,right:0}},Zo.prototype.setScrollLeft=function(){},Zo.prototype.setScrollTop=function(){},Zo.prototype.clear=function(){};function Fa(re,he){he||(he=Ki(re));var Ce=re.display.barWidth,be=re.display.barHeight;ka(re,he);for(var Oe=0;Oe<4&&Ce!=re.display.barWidth||be!=re.display.barHeight;Oe++)Ce!=re.display.barWidth&&re.options.lineWrapping&&fi(re),ka(re,Ki(re)),Ce=re.display.barWidth,be=re.display.barHeight}function ka(re,he){var Ce=re.display,be=Ce.scrollbars.update(he);Ce.sizer.style.paddingRight=(Ce.barWidth=be.right)+"px",Ce.sizer.style.paddingBottom=(Ce.barHeight=be.bottom)+"px",Ce.heightForcer.style.borderBottom=be.bottom+"px solid transparent",be.right&&be.bottom?(Ce.scrollbarFiller.style.display="block",Ce.scrollbarFiller.style.height=be.bottom+"px",Ce.scrollbarFiller.style.width=be.right+"px"):Ce.scrollbarFiller.style.display="",be.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ce.gutterFiller.style.display="block",Ce.gutterFiller.style.height=be.bottom+"px",Ce.gutterFiller.style.width=he.gutterWidth+"px"):Ce.gutterFiller.style.display=""}var lu={native:ao,null:Zo};function Vl(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&De(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new lu[re.options.scrollbarStyle](function(he){re.display.wrapper.insertBefore(he,re.display.scrollbarFiller),Xt(he,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),he.setAttribute("cm-not-content","true")},function(he,Ce){Ce=="horizontal"?Kl(re,he):Wl(re,he)},re),re.display.scrollbars.addClass&&Ve(re.display.wrapper,re.display.scrollbars.addClass)}var uu=0;function rl(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++uu},ga(re.curOp)}function Al(re){var he=re.curOp;he&&Aa(he,function(Ce){for(var be=0;be<Ce.ops.length;be++)Ce.ops[be].cm.curOp=null;Qv(Ce)})}function Qv(re){for(var he=re.ops,Ce=0;Ce<he.length;Ce++)$v(he[Ce]);for(var be=0;be<he.length;be++)qv(he[be]);for(var Oe=0;Oe<he.length;Oe++)Rg(he[Oe]);for(var $e=0;$e<he.length;$e++)ha(he[$e]);for(var gt=0;gt<he.length;gt++)oh(he[gt])}function $v(re){var he=re.cm,Ce=he.display;_g(he),re.updateMaxLine&&ei(he),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Ce.viewFrom||re.scrollToPos.to.line>=Ce.viewTo)||Ce.maxLineChanged&&he.options.lineWrapping,re.update=re.mustUpdate&&new Gh(he,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function qv(re){re.updatedDisplay=re.mustUpdate&&ed(re.cm,re.update)}function Rg(re){var he=re.cm,Ce=he.display;re.updatedDisplay&&fi(he),re.barMeasure=Ki(he),Ce.maxLineChanged&&!he.options.lineWrapping&&(re.adjustWidthTo=Mu(he,Ce.maxLine,Ce.maxLine.text.length).left+3,he.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ce.scroller.clientWidth,Ce.sizer.offsetLeft+re.adjustWidthTo+fo(he)+he.display.barWidth),re.maxScrollLeft=Math.max(0,Ce.sizer.offsetLeft+re.adjustWidthTo-os(he))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ce.input.prepareSelection())}function ha(re){var he=re.cm;re.adjustWidthTo!=null&&(he.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<he.doc.scrollLeft&&Kl(he,Math.min(he.display.scroller.scrollLeft,re.maxScrollLeft),!0),he.display.maxLineChanged=!1);var Ce=re.focus&&re.focus==Ke();re.preparedSelection&&he.display.input.showSelection(re.preparedSelection,Ce),(re.updatedDisplay||re.startHeight!=he.doc.height)&&Fa(he,re.barMeasure),re.updatedDisplay&&lh(he,re.barMeasure),re.selectionChanged&&bo(he),he.state.focused&&re.updateInput&&he.display.input.reset(re.typing),Ce&&Eo(re.cm)}function oh(re){var he=re.cm,Ce=he.display,be=he.doc;if(re.updatedDisplay&&ko(he,re.update),Ce.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ce.wheelStartX=Ce.wheelStartY=null),re.scrollTop!=null&&kc(he,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Kl(he,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=su(he,sr(be,re.scrollToPos.from),sr(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(he,Oe)}var $e=re.maybeHiddenMarkers,gt=re.maybeUnhiddenMarkers;if($e)for(var Lt=0;Lt<$e.length;++Lt)$e[Lt].lines.length||on($e[Lt],"hide");if(gt)for(var kt=0;kt<gt.length;++kt)gt[kt].lines.length&&on(gt[kt],"unhide");Ce.wrapper.offsetHeight&&(be.scrollTop=he.display.scroller.scrollTop),re.changeObjs&&on(he,"changes",he,re.changeObjs),re.update&&re.update.finish()}function So(re,he){if(re.curOp)return he();rl(re);try{return he()}finally{Al(re)}}function Da(re,he){return function(){if(re.curOp)return he.apply(re,arguments);rl(re);try{return he.apply(re,arguments)}finally{Al(re)}}}function Ua(re){return function(){if(this.curOp)return re.apply(this,arguments);rl(this);try{return re.apply(this,arguments)}finally{Al(this)}}}function Ha(re){return function(){var he=this.cm;if(!he||he.curOp)return re.apply(this,arguments);rl(he);try{return re.apply(this,arguments)}finally{Al(he)}}}function Tc(re,he){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(he,ft(Wa,re))}function Wa(re){var he=re.doc;if(!(he.highlightFrontier>=re.display.viewTo)){var Ce=+new Date+re.options.workTime,be=ki(re,he.highlightFrontier),Oe=[];he.iter(be.line,Math.min(he.first+he.size,re.display.viewTo+500),function($e){if(be.line>=re.display.viewFrom){var gt=$e.styles,Lt=$e.text.length>re.options.maxHighlightLength?Mn(he.mode,be.state):null,kt=Ni(re,$e,be,!0);Lt&&(be.state=Lt),$e.styles=kt.styles;var It=$e.styleClasses,nn=kt.classes;nn?$e.styleClasses=nn:It&&($e.styleClasses=null);for(var _t=!gt||gt.length!=$e.styles.length||It!=nn&&(!It||!nn||It.bgClass!=nn.bgClass||It.textClass!=nn.textClass),yn=0;!_t&&yn<gt.length;++yn)_t=gt[yn]!=$e.styles[yn];_t&&Oe.push(be.line),$e.stateAfter=be.save(),be.nextLine()}else $e.text.length<=re.options.maxHighlightLength&&hn(re,$e.text,be),$e.stateAfter=be.line%5==0?be.save():null,be.nextLine();if(+new Date>Ce)return Tc(re,re.options.workDelay),!0}),he.highlightFrontier=be.line,he.modeFrontier=Math.max(he.modeFrontier,be.line),Oe.length&&So(re,function(){for(var $e=0;$e<Oe.length;$e++)Ui(re,Oe[$e],"text")})}}var Gh=function(re,he,Ce){var be=re.display;this.viewport=he,this.visible=Ji(be,re.doc,he),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=os(re),this.force=Ce,this.dims=Fu(re),this.events=[]};Gh.prototype.signal=function(re,he){xn(re,he)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)on.apply(null,this.events[re])};function _g(re){var he=re.display;!he.scrollbarsClipped&&he.scroller.offsetWidth&&(he.nativeBarWidth=he.scroller.offsetWidth-he.scroller.clientWidth,he.heightForcer.style.height=fo(re)+"px",he.sizer.style.marginBottom=-he.nativeBarWidth+"px",he.sizer.style.borderRightWidth=fo(re)+"px",he.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var he=Ke();if(!he||!Ye(re.display.lineDiv,he))return null;var Ce={activeElt:he};if(window.getSelection){var be=window.getSelection();be.anchorNode&&be.extend&&Ye(re.display.lineDiv,be.anchorNode)&&(Ce.anchorNode=be.anchorNode,Ce.anchorOffset=be.anchorOffset,Ce.focusNode=be.focusNode,Ce.focusOffset=be.focusOffset)}return Ce}function Os(re){if(!(!re||!re.activeElt||re.activeElt==Ke())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Ye(document.body,re.anchorNode)&&Ye(document.body,re.focusNode))){var he=window.getSelection(),Ce=document.createRange();Ce.setEnd(re.anchorNode,re.anchorOffset),Ce.collapse(!1),he.removeAllRanges(),he.addRange(Ce),he.extend(re.focusNode,re.focusOffset)}}function ed(re,he){var Ce=re.display,be=re.doc;if(he.editorIsHidden)return _o(re),!1;if(!he.force&&he.visible.from>=Ce.viewFrom&&he.visible.to<=Ce.viewTo&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo)&&Ce.renderedView==Ce.view&&ws(re)==0)return!1;Ca(re)&&(_o(re),he.dims=Fu(re));var Oe=be.first+be.size,$e=Math.max(he.visible.from-re.options.viewportMargin,be.first),gt=Math.min(Oe,he.visible.to+re.options.viewportMargin);Ce.viewFrom<$e&&$e-Ce.viewFrom<20&&($e=Math.max(be.first,Ce.viewFrom)),Ce.viewTo>gt&&Ce.viewTo-gt<20&&(gt=Math.min(Oe,Ce.viewTo)),rn&&($e=yr(re.doc,$e),gt=ur(re.doc,gt));var Lt=$e!=Ce.viewFrom||gt!=Ce.viewTo||Ce.lastWrapHeight!=he.wrapperHeight||Ce.lastWrapWidth!=he.wrapperWidth;wo(re,$e,gt),Ce.viewOffset=Or(Wn(re.doc,Ce.viewFrom)),re.display.mover.style.top=Ce.viewOffset+"px";var kt=ws(re);if(!Lt&&kt==0&&!he.force&&Ce.renderedView==Ce.view&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>=Ce.viewTo))return!1;var It=zg(re);return kt>4&&(Ce.lineDiv.style.display="none"),lp(re,Ce.updateLineNumbers,he.dims),kt>4&&(Ce.lineDiv.style.display=""),Ce.renderedView=Ce.view,Os(It),Fe(Ce.cursorDiv),Fe(Ce.selectionDiv),Ce.gutters.style.height=Ce.sizer.style.minHeight=0,Lt&&(Ce.lastWrapHeight=he.wrapperHeight,Ce.lastWrapWidth=he.wrapperWidth,Tc(re,400)),Ce.updateLineNumbers=null,!0}function ko(re,he){for(var Ce=he.viewport,be=!0;;be=!1){if(!be||!re.options.lineWrapping||he.oldDisplayWidth==os(re)){if(Ce&&Ce.top!=null&&(Ce={top:Math.min(re.doc.height+Pa(re.display)-Gs(re),Ce.top)}),he.visible=Ji(re.display,re.doc,Ce),he.visible.from>=re.display.viewFrom&&he.visible.to<=re.display.viewTo)break}else be&&(he.visible=Ji(re.display,re.doc,Ce));if(!ed(re,he))break;fi(re);var Oe=Ki(re);va(re),Fa(re,Oe),lh(re,Oe),he.force=!1}he.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(he.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function ah(re,he){var Ce=new Gh(re,he);if(ed(re,Ce)){fi(re),ko(re,Ce);var be=Ki(re);va(re),Fa(re,be),lh(re,be),Ce.finish()}}function lp(re,he,Ce){var be=re.display,Oe=re.options.lineNumbers,$e=be.lineDiv,gt=$e.firstChild;function Lt(hr){var mr=hr.nextSibling;return ve&&se&&re.display.currentWheelTarget==hr?hr.style.display="none":hr.parentNode.removeChild(hr),mr}for(var kt=be.view,It=be.viewFrom,nn=0;nn<kt.length;nn++){var _t=kt[nn];if(!_t.hidden)if(!_t.node||_t.node.parentNode!=$e){var yn=ba(re,_t,It,Ce);$e.insertBefore(yn,gt)}else{for(;gt!=_t.node;)gt=Lt(gt);var gn=Oe&&he!=null&&he<=It&&_t.lineNumber;_t.changes&&(wt(_t.changes,"gutter")>-1&&(gn=!1),Co(re,_t,It,Ce)),gn&&(Fe(_t.lineNumber),_t.lineNumber.appendChild(document.createTextNode(Yn(re.options,It)))),gt=_t.node.nextSibling}It+=_t.size}for(;gt;)gt=Lt(gt)}function sh(re){var he=re.gutters.offsetWidth;re.sizer.style.marginLeft=he+"px"}function lh(re,he){re.display.sizer.style.minHeight=he.docHeight+"px",re.display.heightForcer.style.top=he.docHeight+"px",re.display.gutters.style.height=he.docHeight+re.display.barHeight+fo(re)+"px"}function td(re){var he=re.display,Ce=he.view;if(!(!he.alignWidgets&&(!he.gutters.firstChild||!re.options.fixedGutter))){for(var be=Du(he)-he.scroller.scrollLeft+re.doc.scrollLeft,Oe=he.gutters.offsetWidth,$e=be+"px",gt=0;gt<Ce.length;gt++)if(!Ce[gt].hidden){re.options.fixedGutter&&(Ce[gt].gutter&&(Ce[gt].gutter.style.left=$e),Ce[gt].gutterBackground&&(Ce[gt].gutterBackground.style.left=$e));var Lt=Ce[gt].alignable;if(Lt)for(var kt=0;kt<Lt.length;kt++)Lt[kt].style.left=$e}re.options.fixedGutter&&(he.gutters.style.left=be+Oe+"px")}}function Ca(re){if(!re.options.lineNumbers)return!1;var he=re.doc,Ce=Yn(re.options,he.first+he.size-1),be=re.display;if(Ce.length!=be.lineNumChars){var Oe=be.measure.appendChild(Me("div",[Me("div",Ce)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$e=Oe.firstChild.offsetWidth,gt=Oe.offsetWidth-$e;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max($e,be.lineGutter.offsetWidth-gt)+1,be.lineNumWidth=be.lineNumInnerWidth+gt,be.lineNumChars=be.lineNumInnerWidth?Ce.length:-1,be.lineGutter.style.width=be.lineNumWidth+"px",sh(re.display),!0}return!1}function Ka(re,he){for(var Ce=[],be=!1,Oe=0;Oe<re.length;Oe++){var $e=re[Oe],gt=null;if(typeof $e!="string"&&(gt=$e.style,$e=$e.className),$e=="CodeMirror-linenumbers")if(he)be=!0;else continue;Ce.push({className:$e,style:gt})}return he&&!be&&Ce.push({className:"CodeMirror-linenumbers",style:null}),Ce}function Uh(re){var he=re.gutters,Ce=re.gutterSpecs;Fe(he),re.lineGutter=null;for(var be=0;be<Ce.length;++be){var Oe=Ce[be],$e=Oe.className,gt=Oe.style,Lt=he.appendChild(Me("div",null,"CodeMirror-gutter "+$e));gt&&(Lt.style.cssText=gt),$e=="CodeMirror-linenumbers"&&(re.lineGutter=Lt,Lt.style.width=(re.lineNumWidth||1)+"px")}he.style.display=Ce.length?"":"none",sh(re)}function il(re){Uh(re.display),Fo(re),td(re)}function uh(re,he,Ce,be){var Oe=this;this.input=Ce,Oe.scrollbarFiller=Me("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Me("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Be("div",null,"CodeMirror-code"),Oe.selectionDiv=Me("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Me("div",null,"CodeMirror-cursors"),Oe.measure=Me("div",null,"CodeMirror-measure"),Oe.lineMeasure=Me("div",null,"CodeMirror-measure"),Oe.lineSpace=Be("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var $e=Be("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Me("div",[$e],null,"position: relative"),Oe.sizer=Me("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Me("div",null,null,"position: absolute; height: "+Ct+"px; width: 1px;"),Oe.gutters=Me("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Me("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Me("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),_e&&de<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!ve&&!(st&&te)&&(Oe.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Oe.wrapper):re(Oe.wrapper)),Oe.viewFrom=Oe.viewTo=he.first,Oe.reportedViewFrom=Oe.reportedViewTo=he.first,Oe.view=[],Oe.renderedView=null,Oe.externalMeasured=null,Oe.viewOffset=0,Oe.lastWrapHeight=Oe.lastWrapWidth=0,Oe.updateLineNumbers=null,Oe.nativeBarWidth=Oe.barHeight=Oe.barWidth=0,Oe.scrollbarsClipped=!1,Oe.lineNumWidth=Oe.lineNumInnerWidth=Oe.lineNumChars=null,Oe.alignWidgets=!1,Oe.cachedCharWidth=Oe.cachedTextHeight=Oe.cachedPaddingH=null,Oe.maxLine=null,Oe.maxLineLength=0,Oe.maxLineChanged=!1,Oe.wheelDX=Oe.wheelDY=Oe.wheelStartX=Oe.wheelStartY=null,Oe.shift=!1,Oe.selForContextMenu=null,Oe.activeTouch=null,Oe.gutterSpecs=Ka(be.gutters,be.lineNumbers),Uh(Oe),Ce.init(Oe)}var Hs=0,ya=null;_e?ya=-.53:st?ya=15:ke?ya=-.7:Ae&&(ya=-1/3);function Zl(re){var he=re.wheelDeltaX,Ce=re.wheelDeltaY;return he==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(he=re.detail),Ce==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ce=re.detail:Ce==null&&(Ce=re.wheelDelta),{x:he,y:Ce}}function ol(re){var he=Zl(re);return he.x*=ya,he.y*=ya,he}function Va(re,he){var Ce=Zl(he),be=Ce.x,Oe=Ce.y,$e=re.display,gt=$e.scroller,Lt=gt.scrollWidth>gt.clientWidth,kt=gt.scrollHeight>gt.clientHeight;if(be&&Lt||Oe&&kt){if(Oe&&se&&ve){e:for(var It=he.target,nn=$e.view;It!=gt;It=It.parentNode)for(var _t=0;_t<nn.length;_t++)if(nn[_t].node==It){re.display.currentWheelTarget=It;break e}}if(be&&!st&&!Se&&ya!=null){Oe&&kt&&Wl(re,Math.max(0,gt.scrollTop+Oe*ya)),Kl(re,Math.max(0,gt.scrollLeft+be*ya)),(!Oe||Oe&&kt)&&On(he),$e.wheelStartX=null;return}if(Oe&&ya!=null){var yn=Oe*ya,gn=re.doc.scrollTop,hr=gn+$e.wrapper.clientHeight;yn<0?gn=Math.max(0,gn+yn-50):hr=Math.min(re.doc.height,hr+yn+50),ah(re,{top:gn,bottom:hr})}Hs<20&&($e.wheelStartX==null?($e.wheelStartX=gt.scrollLeft,$e.wheelStartY=gt.scrollTop,$e.wheelDX=be,$e.wheelDY=Oe,setTimeout(function(){if($e.wheelStartX!=null){var mr=gt.scrollLeft-$e.wheelStartX,Er=gt.scrollTop-$e.wheelStartY,Rr=Er&&$e.wheelDY&&Er/$e.wheelDY||mr&&$e.wheelDX&&mr/$e.wheelDX;$e.wheelStartX=$e.wheelStartY=null,Rr&&(ya=(ya*Hs+Rr)/(Hs+1),++Hs)}},200)):($e.wheelDX+=be,$e.wheelDY+=Oe))}}var ml=function(re,he){this.ranges=re,this.primIndex=he};ml.prototype.primary=function(){return this.ranges[this.primIndex]},ml.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var he=0;he<this.ranges.length;he++){var Ce=this.ranges[he],be=re.ranges[he];if(!Jn(Ce.anchor,be.anchor)||!Jn(Ce.head,be.head))return!1}return!0},ml.prototype.deepCopy=function(){for(var re=[],he=0;he<this.ranges.length;he++)re[he]=new To(jn(this.ranges[he].anchor),jn(this.ranges[he].head));return new ml(re,this.primIndex)},ml.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},ml.prototype.contains=function(re,he){he||(he=re);for(var Ce=0;Ce<this.ranges.length;Ce++){var be=this.ranges[Ce];if(Dn(he,be.from())>=0&&Dn(re,be.to())<=0)return Ce}return-1};var To=function(re,he){this.anchor=re,this.head=he};To.prototype.from=function(){return er(this.anchor,this.head)},To.prototype.to=function(){return Bn(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function jl(re,he,Ce){var be=re&&re.options.selectionsMayTouch,Oe=he[Ce];he.sort(function(yn,gn){return Dn(yn.from(),gn.from())}),Ce=wt(he,Oe);for(var $e=1;$e<he.length;$e++){var gt=he[$e],Lt=he[$e-1],kt=Dn(Lt.to(),gt.from());if(be&&!gt.empty()?kt>0:kt>=0){var It=er(Lt.from(),gt.from()),nn=Bn(Lt.to(),gt.to()),_t=Lt.empty()?gt.from()==gt.head:Lt.from()==Lt.head;$e<=Ce&&--Ce,he.splice(--$e,2,new To(_t?nn:It,_t?It:nn))}}return new ml(he,Ce)}function Ru(re,he){return new ml([new To(re,he||re)],0)}function hh(re){return re.text?sn(re.from.line+re.text.length-1,mt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Hh(re,he){if(Dn(re,he.from)<0)return re;if(Dn(re,he.to)<=0)return hh(he);var Ce=re.line+he.text.length-(he.to.line-he.from.line)-1,be=re.ch;return re.line==he.to.line&&(be+=hh(he).ch-he.to.ch),sn(Ce,be)}function hf(re,he){for(var Ce=[],be=0;be<re.sel.ranges.length;be++){var Oe=re.sel.ranges[be];Ce.push(new To(Hh(Oe.anchor,he),Hh(Oe.head,he)))}return jl(re.cm,Ce,re.sel.primIndex)}function Lc(re,he,Ce){return re.line==he.line?sn(Ce.line,re.ch-he.ch+Ce.ch):sn(Ce.line+(re.line-he.line),re.ch)}function cf(re,he,Ce){for(var be=[],Oe=sn(re.first,0),$e=Oe,gt=0;gt<he.length;gt++){var Lt=he[gt],kt=Lc(Lt.from,Oe,$e),It=Lc(hh(Lt),Oe,$e);if(Oe=Lt.to,$e=It,Ce=="around"){var nn=re.sel.ranges[gt],_t=Dn(nn.head,nn.anchor)<0;be[gt]=new To(_t?It:kt,_t?kt:It)}else be[gt]=new To(kt,kt)}return new ml(be,re.sel.primIndex)}function Qi(re){re.doc.mode=Vt(re.options,re.doc.modeOption),ff(re)}function ff(re){re.doc.iter(function(he){he.stateAfter&&(he.stateAfter=null),he.styles&&(he.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Tc(re,100),re.state.modeGen++,re.curOp&&Fo(re)}function up(re,he){return he.from.ch==0&&he.to.ch==0&&mt(he.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,he,Ce,be){function Oe(ri){return Ce?Ce[ri]:null}function $e(ri,Yr,ci){pi(ri,Yr,ci,be),Ur(ri,"change",ri,he)}function gt(ri,Yr){for(var ci=[],Ii=ri;Ii<Yr;++Ii)ci.push(new ui(It[Ii],Oe(Ii),be));return ci}var Lt=he.from,kt=he.to,It=he.text,nn=Wn(re,Lt.line),_t=Wn(re,kt.line),yn=mt(It),gn=Oe(It.length-1),hr=kt.line-Lt.line;if(he.full)re.insert(0,gt(0,It.length)),re.remove(It.length,re.size-It.length);else if(up(re,he)){var mr=gt(0,It.length-1);$e(_t,_t.text,gn),hr&&re.remove(Lt.line,hr),mr.length&&re.insert(Lt.line,mr)}else if(nn==_t)if(It.length==1)$e(nn,nn.text.slice(0,Lt.ch)+yn+nn.text.slice(kt.ch),gn);else{var Er=gt(1,It.length-1);Er.push(new ui(yn+nn.text.slice(kt.ch),gn,be)),$e(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),re.insert(Lt.line+1,Er)}else if(It.length==1)$e(nn,nn.text.slice(0,Lt.ch)+It[0]+_t.text.slice(kt.ch),Oe(0)),re.remove(Lt.line+1,hr);else{$e(nn,nn.text.slice(0,Lt.ch)+It[0],Oe(0)),$e(_t,yn+_t.text.slice(kt.ch),gn);var Rr=gt(1,It.length-1);hr>1&&re.remove(Lt.line+1,hr-1),re.insert(Lt.line+1,Rr)}Ur(re,"change",re,he)}function Xl(re,he,Ce){function be(Oe,$e,gt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var kt=Oe.linked[Lt];if(kt.doc!=$e){var It=gt&&kt.sharedHist;Ce&&!It||(he(kt.doc,It),be(kt.doc,Oe,It))}}}be(re,null,!0)}function rd(re,he){if(he.cm)throw new Error("This document is already in use.");re.doc=he,he.cm=re,gi(re),Qi(re),df(re),re.options.lineWrapping||ei(re),re.options.mode=he.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Ve:De)(re.display.lineDiv,"CodeMirror-rtl")}function e0(re){So(re,function(){df(re),Fo(re)})}function Mc(re){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=re||1}function id(re,he){var Ce={from:jn(he.from),to:hh(he),text:Ht(re,he.from,he.to)};return ch(re,Ce,he.from.line,he.to.line+1),Xl(re,function(be){return ch(be,Ce,he.from.line,he.to.line+1)},!0),Ce}function Nc(re){for(;re.length;){var he=mt(re);if(he.ranges)re.pop();else break}}function pf(re,he){if(he)return Nc(re.done),mt(re.done);if(re.done.length&&!mt(re.done).ranges)return mt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),mt(re.done)}function gf(re,he,Ce,be){var Oe=re.history;Oe.undone.length=0;var $e=+new Date,gt,Lt;if((Oe.lastOp==be||Oe.lastOrigin==he.origin&&he.origin&&(he.origin.charAt(0)=="+"&&Oe.lastModTime>$e-(re.cm?re.cm.options.historyEventDelay:500)||he.origin.charAt(0)=="*"))&&(gt=pf(Oe,Oe.lastOp==be)))Lt=mt(gt.changes),Dn(he.from,he.to)==0&&Dn(he.from,Lt.to)==0?Lt.to=hh(he):gt.changes.push(id(re,he));else{var kt=mt(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),gt={changes:[id(re,he)],generation:Oe.generation},Oe.done.push(gt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(Ce),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=$e,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=he.origin,Lt||on(re,"historyAdded")}function hp(re,he,Ce,be){var Oe=he.charAt(0);return Oe=="*"||Oe=="+"&&Ce.ranges.length==be.ranges.length&&Ce.somethingSelected()==be.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,he,Ce,be){var Oe=re.history,$e=be&&be.origin;Ce==Oe.lastSelOp||$e&&Oe.lastSelOrigin==$e&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==$e||hp(re,$e,mt(Oe.done),he))?Oe.done[Oe.done.length-1]=he:Ac(he,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=$e,Oe.lastSelOp=Ce,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,he){var Ce=mt(he);Ce&&Ce.ranges&&Ce.equals(re)||he.push(re)}function ch(re,he,Ce,be){var Oe=he["spans_"+re.id],$e=0;re.iter(Math.max(re.first,Ce),Math.min(re.first+re.size,be),function(gt){gt.markedSpans&&((Oe||(Oe=he["spans_"+re.id]={}))[$e]=gt.markedSpans),++$e})}function bs(re){if(!re)return null;for(var he,Ce=0;Ce<re.length;++Ce)re[Ce].marker.explicitlyCleared?he||(he=re.slice(0,Ce)):he&&he.push(re[Ce]);return he?he.length?he:null:re}function hu(re,he){var Ce=he["spans_"+re.id];if(!Ce)return null;for(var be=[],Oe=0;Oe<he.text.length;++Oe)be.push(bs(Ce[Oe]));return be}function od(re,he){var Ce=hu(re,he),be=Di(re,he);if(!Ce)return be;if(!be)return Ce;for(var Oe=0;Oe<Ce.length;++Oe){var $e=Ce[Oe],gt=be[Oe];if($e&>)e:for(var Lt=0;Lt<gt.length;++Lt){for(var kt=gt[Lt],It=0;It<$e.length;++It)if($e[It].marker==kt.marker)continue e;$e.push(kt)}else gt&&(Ce[Oe]=gt)}return Ce}function _u(re,he,Ce){for(var be=[],Oe=0;Oe<re.length;++Oe){var $e=re[Oe];if($e.ranges){be.push(Ce?ml.prototype.deepCopy.call($e):$e);continue}var gt=$e.changes,Lt=[];be.push({changes:Lt});for(var kt=0;kt<gt.length;++kt){var It=gt[kt],nn=void 0;if(Lt.push({from:It.from,to:It.to,text:It.text}),he)for(var _t in It)(nn=_t.match(/^spans_(\d+)$/))&&wt(he,Number(nn[1]))>-1&&(mt(Lt)[_t]=It[_t],delete It[_t])}}return be}function ad(re,he,Ce,be){if(be){var Oe=re.anchor;if(Ce){var $e=Dn(he,Oe)<0;$e!=Dn(Ce,Oe)<0?(Oe=he,he=Ce):$e!=Dn(he,Ce)<0&&(he=Ce)}return new To(Oe,he)}else return new To(Ce||he,he)}function sd(re,he,Ce,be,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),ps(re,new ml([ad(re.sel.primary(),he,Ce,Oe)],0),be)}function Gg(re,he,Ce){for(var be=[],Oe=re.cm&&(re.cm.display.shift||re.extend),$e=0;$e<re.sel.ranges.length;$e++)be[$e]=ad(re.sel.ranges[$e],he[$e],null,Oe);var gt=jl(re.cm,be,re.sel.primIndex);ps(re,gt,Ce)}function fh(re,he,Ce,be){var Oe=re.sel.ranges.slice(0);Oe[he]=Ce,ps(re,jl(re.cm,Oe,re.sel.primIndex),be)}function Wh(re,he,Ce,be){ps(re,Ru(he,Ce),be)}function Ug(re,he,Ce){var be={ranges:he.ranges,update:function(Oe){this.ranges=[];for(var $e=0;$e<Oe.length;$e++)this.ranges[$e]=new To(sr(re,Oe[$e].anchor),sr(re,Oe[$e].head))},origin:Ce&&Ce.origin};return on(re,"beforeSelectionChange",re,be),re.cm&&on(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=he.ranges?jl(re.cm,be.ranges,be.ranges.length-1):he}function ld(re,he,Ce){var be=re.history.done,Oe=mt(be);Oe&&Oe.ranges?(be[be.length-1]=he,Kh(re,he,Ce)):ps(re,he,Ce)}function ps(re,he,Ce){Kh(re,he,Ce),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ce)}function Kh(re,he,Ce){(xn(re,"beforeSelectionChange")||re.cm&&xn(re.cm,"beforeSelectionChange"))&&(he=Ug(re,he,Ce));var be=Ce&&Ce.bias||(Dn(he.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,he,be,!0)),!(Ce&&Ce.scroll===!1)&&re.cm&&Nl(re.cm)}function cp(re,he){he.equals(re.sel)||(re.sel=he,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,bn(re.cm)),Ur(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,he,Ce,be){for(var Oe,$e=0;$e<he.ranges.length;$e++){var gt=he.ranges[$e],Lt=he.ranges.length==re.sel.ranges.length&&re.sel.ranges[$e],kt=Sf(re,gt.anchor,Lt&&Lt.anchor,Ce,be),It=Sf(re,gt.head,Lt&&Lt.head,Ce,be);(Oe||kt!=gt.anchor||It!=gt.head)&&(Oe||(Oe=he.ranges.slice(0,$e)),Oe[$e]=new To(kt,It))}return Oe?jl(re.cm,Oe,he.primIndex):he}function zu(re,he,Ce,be,Oe){var $e=Wn(re,he.line);if($e.markedSpans)for(var gt=0;gt<$e.markedSpans.length;++gt){var Lt=$e.markedSpans[gt],kt=Lt.marker,It="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,nn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Lt.from==null||(It?Lt.from<=he.ch:Lt.from<he.ch))&&(Lt.to==null||(nn?Lt.to>=he.ch:Lt.to>he.ch))){if(Oe&&(on(kt,"beforeCursorEnter"),kt.explicitlyCleared))if($e.markedSpans){--gt;continue}else break;if(!kt.atomic)continue;if(Ce){var _t=kt.find(be<0?1:-1),yn=void 0;if((be<0?nn:It)&&(_t=fp(re,_t,-be,_t&&_t.line==he.line?$e:null)),_t&&_t.line==he.line&&(yn=Dn(_t,Ce))&&(be<0?yn<0:yn>0))return zu(re,_t,he,be,Oe)}var gn=kt.find(be<0?-1:1);return(be<0?It:nn)&&(gn=fp(re,gn,be,gn.line==he.line?$e:null)),gn?zu(re,gn,he,be,Oe):null}}return he}function Sf(re,he,Ce,be,Oe){var $e=be||1,gt=zu(re,he,Ce,$e,Oe)||!Oe&&zu(re,he,Ce,$e,!0)||zu(re,he,Ce,-$e,Oe)||!Oe&&zu(re,he,Ce,-$e,!0);return gt||(re.cantEdit=!0,sn(re.first,0))}function fp(re,he,Ce,be){return Ce<0&&he.ch==0?he.line>re.first?sr(re,sn(he.line-1)):null:Ce>0&&he.ch==(be||Wn(re,he.line)).text.length?he.line<re.first+re.size-1?sn(he.line+1,0):null:new sn(he.line,he.ch+Ce)}function Sa(re){re.setSelection(sn(re.firstLine(),0),sn(re.lastLine()),ct)}function xf(re,he,Ce){var be={canceled:!1,from:he.from,to:he.to,text:he.text,origin:he.origin,cancel:function(){return be.canceled=!0}};return Ce&&(be.update=function(Oe,$e,gt,Lt){Oe&&(be.from=sr(re,Oe)),$e&&(be.to=sr(re,$e)),gt&&(be.text=gt),Lt!==void 0&&(be.origin=Lt)}),on(re,"beforeChange",re,be),re.cm&&on(re.cm,"beforeChange",re.cm,be),be.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:be.from,to:be.to,text:be.text,origin:be.origin}}function dh(re,he,Ce){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,he,Ce);if(re.cm.state.suppressEdits)return}if(!((xn(re,"beforeChange")||re.cm&&xn(re.cm,"beforeChange"))&&(he=xf(re,he,!0),!he))){var be=lr&&!Ce&&dn(re,he.from,he.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Vh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:he.text,origin:he.origin});else Vh(re,he)}}function Vh(re,he){if(!(he.text.length==1&&he.text[0]==""&&Dn(he.from,he.to)==0)){var Ce=hf(re,he);gf(re,he,Ce,re.cm?re.cm.curOp.id:NaN),jc(re,he,Ce,Di(re,he));var be=[];Xl(re,function(Oe,$e){!$e&&wt(be,Oe.history)==-1&&(pp(Oe.history,he),be.push(Oe.history)),jc(Oe,he,null,Di(Oe,he))})}}function wf(re,he,Ce){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ce)){for(var Oe=re.history,$e,gt=re.sel,Lt=he=="undo"?Oe.done:Oe.undone,kt=he=="undo"?Oe.undone:Oe.done,It=0;It<Lt.length&&($e=Lt[It],!(Ce?$e.ranges&&!$e.equals(re.sel):!$e.ranges));It++);if(It!=Lt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if($e=Lt.pop(),$e.ranges){if(Ac($e,kt),Ce&&!$e.equals(re.sel)){ps(re,$e,{clearRedo:!1});return}gt=$e}else if(be){Lt.push($e);return}else break;var nn=[];Ac(gt,kt),kt.push({changes:nn,generation:Oe.generation}),Oe.generation=$e.generation||++Oe.maxGeneration;for(var _t=xn(re,"beforeChange")||re.cm&&xn(re.cm,"beforeChange"),yn=function(mr){var Er=$e.changes[mr];if(Er.origin=he,_t&&!xf(re,Er,!1))return Lt.length=0,{};nn.push(id(re,Er));var Rr=mr?hf(re,Er):mt(Lt);jc(re,Er,Rr,od(re,Er)),!mr&&re.cm&&re.cm.scrollIntoView({from:Er.from,to:hh(Er)});var ri=[];Xl(re,function(Yr,ci){!ci&&wt(ri,Yr.history)==-1&&(pp(Yr.history,Er),ri.push(Yr.history)),jc(Yr,Er,null,od(Yr,Er))})},gn=$e.changes.length-1;gn>=0;--gn){var hr=yn(gn);if(hr)return hr.v}}}}function dp(re,he){if(he!=0&&(re.first+=he,re.sel=new ml(vt(re.sel.ranges,function(Oe){return new To(sn(Oe.anchor.line+he,Oe.anchor.ch),sn(Oe.head.line+he,Oe.head.ch))}),re.sel.primIndex),re.cm)){Fo(re.cm,re.first,re.first-he,he);for(var Ce=re.cm.display,be=Ce.viewFrom;be<Ce.viewTo;be++)Ui(re.cm,be,"gutter")}}function jc(re,he,Ce,be){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,he,Ce,be);if(he.to.line<re.first){dp(re,he.text.length-1-(he.to.line-he.from.line));return}if(!(he.from.line>re.lastLine())){if(he.from.line<re.first){var Oe=he.text.length-1-(re.first-he.from.line);dp(re,Oe),he={from:sn(re.first,0),to:sn(he.to.line+Oe,he.to.ch),text:[mt(he.text)],origin:he.origin}}var $e=re.lastLine();he.to.line>$e&&(he={from:he.from,to:sn($e,Wn(re,$e).text.length),text:[he.text[0]],origin:he.origin}),he.removed=Ht(re,he.from,he.to),Ce||(Ce=hf(re,he)),re.cm?Hg(re.cm,he,be):nd(re,he,be),Kh(re,Ce,ct),re.cantEdit&&Sf(re,sn(re.firstLine(),0))&&(re.cantEdit=!1)}}function Hg(re,he,Ce){var be=re.doc,Oe=re.display,$e=he.from,gt=he.to,Lt=!1,kt=$e.line;re.options.lineWrapping||(kt=jt(Kn(Wn(be,$e.line))),be.iter(kt,gt.line+1,function(gn){if(gn==Oe.maxLine)return Lt=!0,!0})),be.sel.contains(he.from,he.to)>-1&&bn(re),nd(be,he,Ce,Oo(re)),re.options.lineWrapping||(be.iter(kt,$e.line+he.text.length,function(gn){var hr=oi(gn);hr>Oe.maxLineLength&&(Oe.maxLine=gn,Oe.maxLineLength=hr,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),qr(be,$e.line),Tc(re,400);var It=he.text.length-(gt.line-$e.line)-1;he.full?Fo(re):$e.line==gt.line&&he.text.length==1&&!up(re.doc,he)?Ui(re,$e.line,"text"):Fo(re,$e.line,gt.line+1,It);var nn=xn(re,"changes"),_t=xn(re,"change");if(_t||nn){var yn={from:$e,to:gt,text:he.text,removed:he.removed,origin:he.origin};_t&&Ur(re,"change",re,yn),nn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(yn)}re.display.selForContextMenu=null}function Zh(re,he,Ce,be,Oe){var $e;be||(be=Ce),Dn(be,Ce)<0&&($e=[be,Ce],Ce=$e[0],be=$e[1]),typeof he=="string"&&(he=re.splitLines(he)),dh(re,{from:Ce,to:be,text:he,origin:Oe})}function vl(re,he,Ce,be){Ce<re.line?re.line+=be:he<re.line&&(re.line=he,re.ch=0)}function Wg(re,he,Ce,be){for(var Oe=0;Oe<re.length;++Oe){var $e=re[Oe],gt=!0;if($e.ranges){$e.copied||($e=re[Oe]=$e.deepCopy(),$e.copied=!0);for(var Lt=0;Lt<$e.ranges.length;Lt++)vl($e.ranges[Lt].anchor,he,Ce,be),vl($e.ranges[Lt].head,he,Ce,be);continue}for(var kt=0;kt<$e.changes.length;++kt){var It=$e.changes[kt];if(Ce<It.from.line)It.from=sn(It.from.line+be,It.from.ch),It.to=sn(It.to.line+be,It.to.ch);else if(he<=It.to.line){gt=!1;break}}gt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,he){var Ce=he.from.line,be=he.to.line,Oe=he.text.length-(be-Ce)-1;Wg(re.done,Ce,be,Oe),Wg(re.undone,Ce,be,Oe)}function Xh(re,he,Ce,be){var Oe=he,$e=he;return typeof he=="number"?$e=Wn(re,_n(re,he)):Oe=jt(he),Oe==null?null:(be($e,Oe)&&re.cm&&Ui(re.cm,Oe,Ce),$e)}function Oc(re){this.lines=re,this.parent=null;for(var he=0,Ce=0;Ce<re.length;++Ce)re[Ce].parent=this,he+=re[Ce].height;this.height=he}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,he){for(var Ce=re,be=re+he;Ce<be;++Ce){var Oe=this.lines[Ce];this.height-=Oe.height,hi(Oe),Ur(Oe,"delete")}this.lines.splice(re,he)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,he,Ce){this.height+=Ce,this.lines=this.lines.slice(0,re).concat(he).concat(this.lines.slice(re));for(var be=0;be<he.length;++be)he[be].parent=this},iterN:function(re,he,Ce){for(var be=re+he;re<be;++re)if(Ce(this.lines[re]))return!0}};function ra(re){this.children=re;for(var he=0,Ce=0,be=0;be<re.length;++be){var Oe=re[be];he+=Oe.chunkSize(),Ce+=Oe.height,Oe.parent=this}this.size=he,this.height=Ce,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,he){this.size-=he;for(var Ce=0;Ce<this.children.length;++Ce){var be=this.children[Ce],Oe=be.chunkSize();if(re<Oe){var $e=Math.min(he,Oe-re),gt=be.height;if(be.removeInner(re,$e),this.height-=gt-be.height,Oe==$e&&(this.children.splice(Ce--,1),be.parent=null),(he-=$e)==0)break;re=0}else re-=Oe}if(this.size-he<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Lt=[];this.collapse(Lt),this.children=[new Oc(Lt)],this.children[0].parent=this}},collapse:function(re){for(var he=0;he<this.children.length;++he)this.children[he].collapse(re)},insertInner:function(re,he,Ce){this.size+=he.length,this.height+=Ce;for(var be=0;be<this.children.length;++be){var Oe=this.children[be],$e=Oe.chunkSize();if(re<=$e){if(Oe.insertInner(re,he,Ce),Oe.lines&&Oe.lines.length>50){for(var gt=Oe.lines.length%25+25,Lt=gt;Lt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Lt,Lt+=25));Oe.height-=kt.height,this.children.splice(++be,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,gt),this.maybeSpill()}break}re-=$e}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var he=re.children.splice(re.children.length-5,5),Ce=new ra(he);if(re.parent){re.size-=Ce.size,re.height-=Ce.height;var Oe=wt(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ce)}else{var be=new ra(re.children);be.parent=re,re.children=[be,Ce],re=be}Ce.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,he,Ce){for(var be=0;be<this.children.length;++be){var Oe=this.children[be],$e=Oe.chunkSize();if(re<$e){var gt=Math.min(he,$e-re);if(Oe.iterN(re,gt,Ce))return!0;if((he-=gt)==0)break;re=0}else re-=$e}}};var Gu=function(re,he,Ce){if(Ce)for(var be in Ce)Ce.hasOwnProperty(be)&&(this[be]=Ce[be]);this.doc=re,this.node=he};Gu.prototype.clear=function(){var re=this.doc.cm,he=this.line.widgets,Ce=this.line,be=jt(Ce);if(!(be==null||!he)){for(var Oe=0;Oe<he.length;++Oe)he[Oe]==this&&he.splice(Oe--,1);he.length||(Ce.widgets=null);var $e=Ko(this);Xn(Ce,Math.max(0,Ce.height-$e)),re&&(So(re,function(){Kg(re,Ce,-$e),Ui(re,be,"widget")}),Ur(re,"lineWidgetCleared",re,this,be))}},Gu.prototype.changed=function(){var re=this,he=this.height,Ce=this.doc.cm,be=this.line;this.height=null;var Oe=Ko(this)-he;Oe&&(mn(this.doc,be)||Xn(be,be.height+Oe),Ce&&So(Ce,function(){Ce.curOp.forceUpdate=!0,Kg(Ce,be,Oe),Ur(Ce,"lineWidgetChanged",Ce,re,jt(be))}))},kn(Gu);function Kg(re,he,Ce){Or(he)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ce)}function ud(re,he,Ce,be){var Oe=new Gu(re,Ce,be),$e=re.cm;return $e&&Oe.noHScroll&&($e.display.alignWidgets=!0),Xh(re,he,"widget",function(gt){var Lt=gt.widgets||(gt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=gt,$e&&!mn(re,gt)){var kt=Or(gt)<re.scrollTop;Xn(gt,gt.height+Ko(Oe)),kt&&_h($e,Oe.height),$e.curOp.forceUpdate=!0}return!0}),$e&&Ur($e,"lineWidgetAdded",$e,Oe,typeof he=="number"?he:jt(he)),Oe}var Vg=0,Yt=function(re,he){this.lines=[],this.type=he,this.doc=re,this.id=++Vg};Yt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,he=re&&!re.curOp;if(he&&rl(re),xn(this,"clear")){var Ce=this.find();Ce&&Ur(this,"clear",Ce.from,Ce.to)}for(var be=null,Oe=null,$e=0;$e<this.lines.length;++$e){var gt=this.lines[$e],Lt=Cr(gt.markedSpans,this);re&&!this.collapsed?Ui(re,jt(gt),"text"):re&&(Lt.to!=null&&(Oe=jt(gt)),Lt.from!=null&&(be=jt(gt))),gt.markedSpans=Gr(gt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!mn(this.doc,gt)&&re&&Xn(gt,Us(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var It=Kn(this.lines[kt]),nn=oi(It);nn>re.display.maxLineLength&&(re.display.maxLine=It,re.display.maxLineLength=nn,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Fo(re,be,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Ur(re,"markerCleared",re,this,be,Oe),he&&Al(re),this.parent&&this.parent.clear()}},Yt.prototype.find=function(re,he){re==null&&this.type=="bookmark"&&(re=1);for(var Ce,be,Oe=0;Oe<this.lines.length;++Oe){var $e=this.lines[Oe],gt=Cr($e.markedSpans,this);if(gt.from!=null&&(Ce=sn(he?$e:jt($e),gt.from),re==-1))return Ce;if(gt.to!=null&&(be=sn(he?$e:jt($e),gt.to),re==1))return be}return Ce&&{from:Ce,to:be}},Yt.prototype.changed=function(){var re=this,he=this.find(-1,!0),Ce=this,be=this.doc.cm;!he||!be||So(be,function(){var Oe=he.line,$e=jt(he.line),gt=Nu(be,$e);if(gt&&(rh(gt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!mn(Ce.doc,Oe)&&Ce.height!=null){var Lt=Ce.height;Ce.height=null;var kt=Ko(Ce)-Lt;kt&&Xn(Oe,Oe.height+kt)}Ur(be,"markerChanged",be,re)})},Yt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(!he.maybeHiddenMarkers||wt(he.maybeHiddenMarkers,this)==-1)&&(he.maybeUnhiddenMarkers||(he.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Yt.prototype.detachLine=function(re){if(this.lines.splice(wt(this.lines,re),1),!this.lines.length&&this.doc.cm){var he=this.doc.cm.curOp;(he.maybeHiddenMarkers||(he.maybeHiddenMarkers=[])).push(this)}},kn(Yt);function Yh(re,he,Ce,be,Oe){if(be&&be.shared)return Zg(re,he,Ce,be,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,he,Ce,be,Oe);var $e=new Yt(re,Oe),gt=Dn(he,Ce);if(be&&St(be,$e,!1),gt>0||gt==0&&$e.clearWhenEmpty!==!1)return $e;if($e.replacedWith&&($e.collapsed=!0,$e.widgetNode=Be("span",[$e.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||$e.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&($e.widgetNode.insertLeft=!0)),$e.collapsed){if(Hn(re,he.line,he,Ce,$e)||he.line!=Ce.line&&Hn(re,Ce.line,he,Ce,$e))throw new Error("Inserting collapsed marker partially overlapping an existing one");an()}$e.addToHistory&&gf(re,{from:he,to:Ce,origin:"markText"},re.sel,NaN);var Lt=he.line,kt=re.cm,It;if(re.iter(Lt,Ce.line+1,function(_t){kt&&$e.collapsed&&!kt.options.lineWrapping&&Kn(_t)==kt.display.maxLine&&(It=!0),$e.collapsed&&Lt!=he.line&&Xn(_t,0),Ri(_t,new cr($e,Lt==he.line?he.ch:null,Lt==Ce.line?Ce.ch:null)),++Lt}),$e.collapsed&&re.iter(he.line,Ce.line+1,function(_t){mn(re,_t)&&Xn(_t,0)}),$e.clearOnEnter&&Xt($e,"beforeCursorEnter",function(){return $e.clear()}),$e.readOnly&&(ir(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),$e.collapsed&&($e.id=++Vg,$e.atomic=!0),kt){if(It&&(kt.curOp.updateMaxLine=!0),$e.collapsed)Fo(kt,he.line,Ce.line+1);else if($e.className||$e.startStyle||$e.endStyle||$e.css||$e.attributes||$e.title)for(var nn=he.line;nn<=Ce.line;nn++)Ui(kt,nn,"text");$e.atomic&&vf(kt.doc),Ur(kt,"markerAdded",kt,$e)}return $e}var cu=function(re,he){this.markers=re,this.primary=he;for(var Ce=0;Ce<re.length;++Ce)re[Ce].parent=this};cu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Ur(this,"clear")}},cu.prototype.find=function(re,he){return this.primary.find(re,he)},kn(cu);function Zg(re,he,Ce,be,Oe){be=St(be),be.shared=!1;var $e=[Yh(re,he,Ce,be,Oe)],gt=$e[0],Lt=be.widgetNode;return Xl(re,function(kt){Lt&&(be.widgetNode=Lt.cloneNode(!0)),$e.push(Yh(kt,sr(kt,he),sr(kt,Ce),be,Oe));for(var It=0;It<kt.linked.length;++It)if(kt.linked[It].isParent)return;gt=mt($e)}),new cu($e,gt)}function gp(re){return re.findMarks(sn(re.first,0),re.clipPos(sn(re.lastLine())),function(he){return he.parent})}function Xg(re,he){for(var Ce=0;Ce<he.length;Ce++){var be=he[Ce],Oe=be.find(),$e=re.clipPos(Oe.from),gt=re.clipPos(Oe.to);if(Dn($e,gt)){var Lt=Yh(re,$e,gt,be.primary,be.primary.type);be.markers.push(Lt),Lt.parent=be}}}function mp(re){for(var he=function(be){var Oe=re[be],$e=[Oe.primary.doc];Xl(Oe.primary.doc,function(kt){return $e.push(kt)});for(var gt=0;gt<Oe.markers.length;gt++){var Lt=Oe.markers[gt];wt($e,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(gt--,1))}},Ce=0;Ce<re.length;Ce++)he(Ce)}var t0=0,as=function(re,he,Ce,be,Oe){if(!(this instanceof as))return new as(re,he,Ce,be,Oe);Ce==null&&(Ce=0),ra.call(this,[new Oc([new ui("",null)])]),this.first=Ce,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ce;var $e=sn(Ce,0);this.sel=Ru($e),this.history=new Mc(null),this.id=++t0,this.modeOption=he,this.lineSep=be,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:$e,to:$e,text:re}),ps(this,Ru($e),ct)};as.prototype=we(ra.prototype,{constructor:as,iter:function(re,he,Ce){Ce?this.iterN(re-this.first,he-re,Ce):this.iterN(this.first,this.first+this.size,re)},insert:function(re,he){for(var Ce=0,be=0;be<he.length;++be)Ce+=he[be].height;this.insertInner(re-this.first,he,Ce)},remove:function(re,he){this.removeInner(re-this.first,he)},getValue:function(re){var he=Jt(this,this.first,this.first+this.size);return re===!1?he:he.join(re||this.lineSeparator())},setValue:Ha(function(re){var he=sn(this.first,0),Ce=this.first+this.size-1;dh(this,{from:he,to:sn(Ce,Wn(this,Ce).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Iu(this.cm,0,0),ps(this,Ru(he),ct)}),replaceRange:function(re,he,Ce,be){he=sr(this,he),Ce=Ce?sr(this,Ce):he,Zh(this,re,he,Ce,be)},getRange:function(re,he,Ce){var be=Ht(this,sr(this,re),sr(this,he));return Ce===!1?be:be.join(Ce||this.lineSeparator())},getLine:function(re){var he=this.getLineHandle(re);return he&&he.text},getLineHandle:function(re){if(Nn(this,re))return Wn(this,re)},getLineNumber:function(re){return jt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=Wn(this,re)),Kn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return sr(this,re)},getCursor:function(re){var he=this.sel.primary(),Ce;return re==null||re=="head"?Ce=he.head:re=="anchor"?Ce=he.anchor:re=="end"||re=="to"||re===!1?Ce=he.to():Ce=he.from(),Ce},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ha(function(re,he,Ce){Wh(this,sr(this,typeof re=="number"?sn(re,he||0):re),null,Ce)}),setSelection:Ha(function(re,he,Ce){Wh(this,sr(this,re),sr(this,he||re),Ce)}),extendSelection:Ha(function(re,he,Ce){sd(this,sr(this,re),he&&sr(this,he),Ce)}),extendSelections:Ha(function(re,he){Gg(this,zr(this,re),he)}),extendSelectionsBy:Ha(function(re,he){var Ce=vt(this.sel.ranges,re);Gg(this,zr(this,Ce),he)}),setSelections:Ha(function(re,he,Ce){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To(sr(this,re[Oe].anchor),sr(this,re[Oe].head));he==null&&(he=Math.min(re.length-1,this.sel.primIndex)),ps(this,jl(this.cm,be,he),Ce)}}),addSelection:Ha(function(re,he,Ce){var be=this.sel.ranges.slice(0);be.push(new To(sr(this,re),sr(this,he||re))),ps(this,jl(this.cm,be,be.length-1),Ce)}),getSelection:function(re){for(var he=this.sel.ranges,Ce,be=0;be<he.length;be++){var Oe=Ht(this,he[be].from(),he[be].to());Ce=Ce?Ce.concat(Oe):Oe}return re===!1?Ce:Ce.join(re||this.lineSeparator())},getSelections:function(re){for(var he=[],Ce=this.sel.ranges,be=0;be<Ce.length;be++){var Oe=Ht(this,Ce[be].from(),Ce[be].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),he[be]=Oe}return he},replaceSelection:function(re,he,Ce){for(var be=[],Oe=0;Oe<this.sel.ranges.length;Oe++)be[Oe]=re;this.replaceSelections(be,he,Ce||"+input")},replaceSelections:Ha(function(re,he,Ce){for(var be=[],Oe=this.sel,$e=0;$e<Oe.ranges.length;$e++){var gt=Oe.ranges[$e];be[$e]={from:gt.from(),to:gt.to(),text:this.splitLines(re[$e]),origin:Ce}}for(var Lt=he&&he!="end"&&cf(this,be,he),kt=be.length-1;kt>=0;kt--)dh(this,be[kt]);Lt?ld(this,Lt):this.cm&&Nl(this.cm)}),undo:Ha(function(){wf(this,"undo")}),redo:Ha(function(){wf(this,"redo")}),undoSelection:Ha(function(){wf(this,"undo",!0)}),redoSelection:Ha(function(){wf(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,he=0,Ce=0,be=0;be<re.done.length;be++)re.done[be].ranges||++he;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ce;return{undo:he,redo:Ce}},clearHistory:function(){var re=this;this.history=new Mc(this.history.maxGeneration),Xl(this,function(he){return he.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:_u(this.history.done),undone:_u(this.history.undone)}},setHistory:function(re){var he=this.history=new Mc(this.history.maxGeneration);he.done=_u(re.done.slice(0),null,!0),he.undone=_u(re.undone.slice(0),null,!0)},setGutterMarker:Ha(function(re,he,Ce){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[he]=Ce,!Ce&&Ie(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Ha(function(re){var he=this;this.iter(function(Ce){Ce.gutterMarkers&&Ce.gutterMarkers[re]&&Xh(he,Ce,"gutter",function(){return Ce.gutterMarkers[re]=null,Ie(Ce.gutterMarkers)&&(Ce.gutterMarkers=null),!0})})}),lineInfo:function(re){var he;if(typeof re=="number"){if(!Nn(this,re)||(he=re,re=Wn(this,re),!re))return null}else if(he=jt(re),he==null)return null;return{line:he,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Ha(function(re,he,Ce){return Xh(this,re,he=="gutter"?"gutter":"class",function(be){var Oe=he=="text"?"textClass":he=="background"?"bgClass":he=="gutter"?"gutterClass":"wrapClass";if(!be[Oe])be[Oe]=Ce;else{if(je(Ce).test(be[Oe]))return!1;be[Oe]+=" "+Ce}return!0})}),removeLineClass:Ha(function(re,he,Ce){return Xh(this,re,he=="gutter"?"gutter":"class",function(be){var Oe=he=="text"?"textClass":he=="background"?"bgClass":he=="gutter"?"gutterClass":"wrapClass",$e=be[Oe];if($e)if(Ce==null)be[Oe]=null;else{var gt=$e.match(je(Ce));if(!gt)return!1;var Lt=gt.index+gt[0].length;be[Oe]=$e.slice(0,gt.index)+(!gt.index||Lt==$e.length?"":" ")+$e.slice(Lt)||null}else return!1;return!0})}),addLineWidget:Ha(function(re,he,Ce){return ud(this,re,he,Ce)}),removeLineWidget:function(re){re.clear()},markText:function(re,he,Ce){return Yh(this,sr(this,re),sr(this,he),Ce,Ce&&Ce.type||"range")},setBookmark:function(re,he){var Ce={replacedWith:he&&(he.nodeType==null?he.widget:he),insertLeft:he&&he.insertLeft,clearWhenEmpty:!1,shared:he&&he.shared,handleMouseEvents:he&&he.handleMouseEvents};return re=sr(this,re),Yh(this,re,re,Ce,"bookmark")},findMarksAt:function(re){re=sr(this,re);var he=[],Ce=Wn(this,re.line).markedSpans;if(Ce)for(var be=0;be<Ce.length;++be){var Oe=Ce[be];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&he.push(Oe.marker.parent||Oe.marker)}return he},findMarks:function(re,he,Ce){re=sr(this,re),he=sr(this,he);var be=[],Oe=re.line;return this.iter(re.line,he.line+1,function($e){var gt=$e.markedSpans;if(gt)for(var Lt=0;Lt<gt.length;Lt++){var kt=gt[Lt];!(kt.to!=null&&Oe==re.line&&re.ch>=kt.to||kt.from==null&&Oe!=re.line||kt.from!=null&&Oe==he.line&&kt.from>=he.ch)&&(!Ce||Ce(kt.marker))&&be.push(kt.marker.parent||kt.marker)}++Oe}),be},getAllMarks:function(){var re=[];return this.iter(function(he){var Ce=he.markedSpans;if(Ce)for(var be=0;be<Ce.length;++be)Ce[be].from!=null&&re.push(Ce[be].marker)}),re},posFromIndex:function(re){var he,Ce=this.first,be=this.lineSeparator().length;return this.iter(function(Oe){var $e=Oe.text.length+be;if($e>re)return he=re,!0;re-=$e,++Ce}),sr(this,sn(Ce,he))},indexFromPos:function(re){re=sr(this,re);var he=re.ch;if(re.line<this.first||re.ch<0)return 0;var Ce=this.lineSeparator().length;return this.iter(this.first,re.line,function(be){he+=be.text.length+Ce}),he},copy:function(re){var he=new as(Jt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return he.scrollTop=this.scrollTop,he.scrollLeft=this.scrollLeft,he.sel=this.sel,he.extend=!1,re&&(he.history.undoDepth=this.history.undoDepth,he.setHistory(this.getHistory())),he},linkedDoc:function(re){re||(re={});var he=this.first,Ce=this.first+this.size;re.from!=null&&re.from>he&&(he=re.from),re.to!=null&&re.to<Ce&&(Ce=re.to);var be=new as(Jt(this,he,Ce),re.mode||this.modeOption,he,this.lineSep,this.direction);return re.sharedHist&&(be.history=this.history),(this.linked||(this.linked=[])).push({doc:be,sharedHist:re.sharedHist}),be.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(be,gp(this)),be},unlinkDoc:function(re){if(re instanceof vo&&(re=re.doc),this.linked)for(var he=0;he<this.linked.length;++he){var Ce=this.linked[he];if(Ce.doc==re){this.linked.splice(he,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var be=[re.id];Xl(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Mc(null),re.history.done=_u(this.history.done,be),re.history.undone=_u(this.history.undone,be)}},iterLinkedDocs:function(re){Xl(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Li(re)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Ha(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(he){return he.order=null}),this.cm&&e0(this.cm))})}),as.prototype.eachLine=as.prototype.iter;var bf=0;function vp(re){var he=this;if(Qg(he),!(cn(he,re)||jo(he.display,re))){On(re),_e&&(bf=+new Date);var Ce=Ga(he,re,!0),be=re.dataTransfer.files;if(!(!Ce||he.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,$e=Array(Oe),gt=0,Lt=function(){++gt==Oe&&Da(he,function(){Ce=sr(he.doc,Ce);var gn={from:Ce,to:Ce,text:he.doc.splitLines($e.filter(function(hr){return hr!=null}).join(he.doc.lineSeparator())),origin:"paste"};dh(he.doc,gn),ld(he.doc,Ru(sr(he.doc,Ce),sr(he.doc,hh(gn))))})()},kt=function(gn,hr){if(he.options.allowDropFileTypes&&wt(he.options.allowDropFileTypes,gn.type)==-1){Lt();return}var mr=new FileReader;mr.onerror=function(){return Lt()},mr.onload=function(){var Er=mr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Er)){Lt();return}$e[hr]=Er,Lt()},mr.readAsText(gn)},It=0;It<be.length;It++)kt(be[It],It);else{if(he.state.draggingText&&he.doc.sel.contains(Ce)>-1){he.state.draggingText(re),setTimeout(function(){return he.display.input.focus()},20);return}try{var nn=re.dataTransfer.getData("Text");if(nn){var _t;if(he.state.draggingText&&!he.state.draggingText.copy&&(_t=he.listSelections()),Kh(he.doc,Ru(Ce,Ce)),_t)for(var yn=0;yn<_t.length;++yn)Zh(he.doc,"",_t[yn].anchor,_t[yn].head,"drag");he.replaceSelection(nn,"around","paste"),he.display.input.focus()}}catch(gn){}}}}function Yg(re,he){if(_e&&(!re.state.draggingText||+new Date-bf<100)){$r(he);return}if(!(cn(re,he)||jo(re.display,he))&&(he.dataTransfer.setData("Text",re.getSelection()),he.dataTransfer.effectAllowed="copyMove",he.dataTransfer.setDragImage&&!Ae)){var Ce=Me("img",null,null,"position: fixed; left: 0; top: 0;");Ce.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ce.width=Ce.height=1,re.display.wrapper.appendChild(Ce),Ce._top=Ce.offsetTop),he.dataTransfer.setDragImage(Ce,0,0),Se&&Ce.parentNode.removeChild(Ce)}}function Jg(re,he){var Ce=Ga(re,he);if(Ce){var be=document.createDocumentFragment();oo(re,Ce,be),re.display.dragCursor||(re.display.dragCursor=Me("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Te(re.display.dragCursor,be)}}function Qg(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function $g(re){if(document.getElementsByClassName){for(var he=document.getElementsByClassName("CodeMirror"),Ce=[],be=0;be<he.length;be++){var Oe=he[be].CodeMirror;Oe&&Ce.push(Oe)}Ce.length&&Ce[0].operation(function(){for(var $e=0;$e<Ce.length;$e++)re(Ce[$e])})}}var yp=!1;function al(){yp||(Fc(),yp=!0)}function Fc(){var re;Xt(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,$g(Sp)},100))}),Xt(window,"blur",function(){return $g(Bu)})}function Sp(re){var he=re.display;he.cachedCharWidth=he.cachedTextHeight=he.cachedPaddingH=null,he.scrollbarsClipped=!1,re.setSize()}for(var fu={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"},Pf=0;Pf<10;Pf++)fu[Pf+48]=fu[Pf+96]=String(Pf);for(var hd=65;hd<=90;hd++)fu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)fu[Cf+111]=fu[Cf+63235]="F"+Cf;var Ws={};Ws.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"},Ws.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"},Ws.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"},Ws.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"]},Ws.default=se?Ws.macDefault:Ws.pcDefault;function xp(re){var he=re.split(/-(?!$)/);re=he[he.length-1];for(var Ce,be,Oe,$e,gt=0;gt<he.length-1;gt++){var Lt=he[gt];if(/^(cmd|meta|m)$/i.test(Lt))$e=!0;else if(/^a(lt)?$/i.test(Lt))Ce=!0;else if(/^(c|ctrl|control)$/i.test(Lt))be=!0;else if(/^s(hift)?$/i.test(Lt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Ce&&(re="Alt-"+re),be&&(re="Ctrl-"+re),$e&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var he={};for(var Ce in re)if(re.hasOwnProperty(Ce)){var be=re[Ce];if(/^(name|fallthrough|(de|at)tach)$/.test(Ce))continue;if(be=="..."){delete re[Ce];continue}for(var Oe=vt(Ce.split(" "),xp),$e=0;$e<Oe.length;$e++){var gt=void 0,Lt=void 0;$e==Oe.length-1?(Lt=Oe.join(" "),gt=be):(Lt=Oe.slice(0,$e+1).join(" "),gt="...");var kt=he[Lt];if(!kt)he[Lt]=gt;else if(kt!=gt)throw new Error("Inconsistent bindings for "+Lt)}delete re[Ce]}for(var It in he)re[It]=he[It];return re}function yl(re,he,Ce,be){he=Jh(he);var Oe=he.call?he.call(re,be):he[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ce(Oe))return"handled";if(he.fallthrough){if(Object.prototype.toString.call(he.fallthrough)!="[object Array]")return yl(re,he.fallthrough,Ce,be);for(var $e=0;$e<he.fallthrough.length;$e++){var gt=yl(re,he.fallthrough[$e],Ce,be);if(gt)return gt}}}function Dc(re){var he=typeof re=="string"?re:fu[re.keyCode];return he=="Ctrl"||he=="Alt"||he=="Shift"||he=="Mod"}function bp(re,he,Ce){var be=re;return he.altKey&&be!="Alt"&&(re="Alt-"+re),(pe?he.metaKey:he.ctrlKey)&&be!="Ctrl"&&(re="Ctrl-"+re),(pe?he.ctrlKey:he.metaKey)&&be!="Mod"&&(re="Cmd-"+re),!Ce&&he.shiftKey&&be!="Shift"&&(re="Shift-"+re),re}function qg(re,he){if(Se&&re.keyCode==34&&re.char)return!1;var Ce=fu[re.keyCode];return Ce==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Ce=re.code),bp(Ce,re,he))}function Jh(re){return typeof re=="string"?Ws[re]:re}function Ks(re,he){for(var Ce=re.doc.sel.ranges,be=[],Oe=0;Oe<Ce.length;Oe++){for(var $e=he(Ce[Oe]);be.length&&Dn($e.from,mt(be).to)<=0;){var gt=be.pop();if(Dn(gt.from,$e.from)<0){$e.from=gt.from;break}}be.push($e)}So(re,function(){for(var Lt=be.length-1;Lt>=0;Lt--)Zh(re.doc,"",be[Lt].from,be[Lt].to,"+delete");Nl(re)})}function Pp(re,he,Ce){var be=et(re.text,he+Ce,Ce);return be<0||be>re.text.length?null:be}function xa(re,he,Ce){var be=Pp(re,he.ch,Ce);return be==null?null:new sn(he.line,be,Ce<0?"after":"before")}function Ef(re,he,Ce,be,Oe){if(re){he.doc.direction=="rtl"&&(Oe=-Oe);var $e=qt(Ce,he.doc.direction);if($e){var gt=Oe<0?mt($e):$e[0],Lt=Oe<0==(gt.level==1),kt=Lt?"after":"before",It;if(gt.level>0||he.doc.direction=="rtl"){var nn=gl(he,Ce);It=Oe<0?Ce.text.length-1:0;var _t=Ns(he,nn,It).top;It=ht(function(yn){return Ns(he,nn,yn).top==_t},Oe<0==(gt.level==1)?gt.from:gt.to-1,It),kt=="before"&&(It=Pp(Ce,It,1))}else It=Oe<0?gt.to:gt.from;return new sn(be,It,kt)}}return new sn(be,Oe<0?Ce.text.length:0,Oe<0?"before":"after")}function cd(re,he,Ce,be){var Oe=qt(he,re.doc.direction);if(!Oe)return xa(he,Ce,be);Ce.ch>=he.text.length?(Ce.ch=he.text.length,Ce.sticky="before"):Ce.ch<=0&&(Ce.ch=0,Ce.sticky="after");var $e=Et(Oe,Ce.ch,Ce.sticky),gt=Oe[$e];if(re.doc.direction=="ltr"&>.level%2==0&&(be>0?gt.to>Ce.ch:gt.from<Ce.ch))return xa(he,Ce,be);var Lt=function(Rr,ri){return Pp(he,Rr instanceof sn?Rr.ch:Rr,ri)},kt,It=function(Rr){return re.options.lineWrapping?(kt=kt||gl(re,he),As(re,he,kt,Rr)):{begin:0,end:he.text.length}},nn=It(Ce.sticky=="before"?Lt(Ce,-1):Ce.ch);if(re.doc.direction=="rtl"||gt.level==1){var _t=gt.level==1==be<0,yn=Lt(Ce,_t?1:-1);if(yn!=null&&(_t?yn<=gt.to&&yn<=nn.end:yn>=gt.from&&yn>=nn.begin)){var gn=_t?"before":"after";return new sn(Ce.line,yn,gn)}}var hr=function(Rr,ri,Yr){for(var ci=function(Xo,Ia){return Ia?new sn(Ce.line,Lt(Xo,1),"before"):new sn(Ce.line,Xo,"after")};Rr>=0&&Rr<Oe.length;Rr+=ri){var Ii=Oe[Rr],Zr=ri>0==(Ii.level!=1),$i=Zr?Yr.begin:Lt(Yr.end,-1);if(Ii.from<=$i&&$i<Ii.to||($i=Zr?Ii.from:Lt(Ii.to,-1),Yr.begin<=$i&&$i<Yr.end))return ci($i,Zr)}},mr=hr($e+be,be,nn);if(mr)return mr;var Er=be>0?nn.end:Lt(nn.begin,-1);return Er!=null&&!(be>0&&Er==he.text.length)&&(mr=hr(be>0?0:Oe.length-1,be,It(Er)),mr)?mr:null}var ph={selectAll:Sa,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ct)},killLine:function(re){return Ks(re,function(he){if(he.empty()){var Ce=Wn(re.doc,he.head.line).text.length;return he.head.ch==Ce&&he.head.line<re.lastLine()?{from:he.head,to:sn(he.head.line+1,0)}:{from:he.head,to:sn(he.head.line,Ce)}}else return{from:he.from(),to:he.to()}})},deleteLine:function(re){return Ks(re,function(he){return{from:sn(he.from().line,0),to:sr(re.doc,sn(he.to().line+1,0))}})},delLineLeft:function(re){return Ks(re,function(he){return{from:sn(he.from().line,0),to:he.from()}})},delWrappedLineLeft:function(re){return Ks(re,function(he){var Ce=re.charCoords(he.head,"div").top+5,be=re.coordsChar({left:0,top:Ce},"div");return{from:be,to:he.from()}})},delWrappedLineRight:function(re){return Ks(re,function(he){var Ce=re.charCoords(he.head,"div").top+5,be=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div");return{from:he.from(),to:be}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(sn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(sn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(he){return Bc(re,he.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(he){return Cp(re,he.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(he){return Ic(re,he.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ce},"div")},dt)},goLineLeft:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5;return re.coordsChar({left:0,top:Ce},"div")},dt)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(he){var Ce=re.cursorCoords(he.head,"div").top+5,be=re.coordsChar({left:0,top:Ce},"div");return be.ch<re.getLine(be.line).search(/\S/)?Cp(re,he.head):be},dt)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var he=[],Ce=re.listSelections(),be=re.options.tabSize,Oe=0;Oe<Ce.length;Oe++){var $e=Ce[Oe].from(),gt=Qe(re.getLine($e.line),$e.ch,be);he.push(Ft(be-gt%be))}re.replaceSelections(he)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return So(re,function(){for(var he=re.listSelections(),Ce=[],be=0;be<he.length;be++)if(he[be].empty()){var Oe=he[be].head,$e=Wn(re.doc,Oe.line).text;if($e){if(Oe.ch==$e.length&&(Oe=new sn(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new sn(Oe.line,Oe.ch+1),re.replaceRange($e.charAt(Oe.ch-1)+$e.charAt(Oe.ch-2),sn(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var gt=Wn(re.doc,Oe.line-1).text;gt&&(Oe=new sn(Oe.line,1),re.replaceRange($e.charAt(0)+re.doc.lineSeparator()+gt.charAt(gt.length-1),sn(Oe.line-1,gt.length-1),Oe,"+transpose"))}}Ce.push(new To(Oe,Oe))}re.setSelections(Ce)})},newlineAndIndent:function(re){return So(re,function(){for(var he=re.listSelections(),Ce=he.length-1;Ce>=0;Ce--)re.replaceRange(re.doc.lineSeparator(),he[Ce].anchor,he[Ce].head,"+input");he=re.listSelections();for(var be=0;be<he.length;be++)re.indentLine(he[be].from().line,null,!0);Nl(re)})},openLine:function(re){return re.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,he){var Ce=Wn(re.doc,he),be=Kn(Ce);return be!=Ce&&(he=jt(be)),Ef(!0,re,be,he,1)}function Ic(re,he){var Ce=Wn(re.doc,he),be=Zn(Ce);return be!=Ce&&(he=jt(be)),Ef(!0,re,Ce,he,-1)}function Cp(re,he){var Ce=Bc(re,he.line),be=Wn(re.doc,Ce.line),Oe=qt(be,re.doc.direction);if(!Oe||Oe[0].level==0){var $e=Math.max(Ce.ch,be.text.search(/\S/)),gt=he.line==Ce.line&&he.ch<=$e&&he.ch;return sn(Ce.line,gt?0:$e,Ce.sticky)}return Ce}function Rc(re,he,Ce){if(typeof he=="string"&&(he=ph[he],!he))return!1;re.display.input.ensurePolled();var be=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ce&&(re.display.shift=!1),Oe=he(re)!=bt}finally{re.display.shift=be,re.state.suppressEdits=!1}return Oe}function Ep(re,he,Ce){for(var be=0;be<re.state.keyMaps.length;be++){var Oe=yl(he,re.state.keyMaps[be],Ce,re);if(Oe)return Oe}return re.options.extraKeys&&yl(he,re.options.extraKeys,Ce,re)||yl(he,re.options.keyMap,Ce,re)}var du=new rt;function Qh(re,he,Ce,be){var Oe=re.state.keySeq;if(Oe){if(Dc(he))return"handled";if(/\'$/.test(he)?re.state.keySeq=null:du.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+he,Ce,be))return!0}return fd(re,he,Ce,be)}function fd(re,he,Ce,be){var Oe=Ep(re,he,be);return Oe=="multi"&&(re.state.keySeq=he),Oe=="handled"&&Ur(re,"keyHandled",re,he,Ce),(Oe=="handled"||Oe=="multi")&&(On(Ce),bo(re)),!!Oe}function dd(re,he){var Ce=qg(he,!0);return Ce?he.shiftKey&&!re.state.keySeq?Qh(re,"Shift-"+Ce,he,function(be){return Rc(re,be,!0)})||Qh(re,Ce,he,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Rc(re,be)}):Qh(re,Ce,he,function(be){return Rc(re,be)}):!1}function pd(re,he,Ce){return Qh(re,"'"+Ce+"'",he,function(be){return Rc(re,be,!0)})}var $h=null;function kp(re){var he=this;if(!(re.target&&re.target!=he.display.input.getField())&&(he.curOp.focus=Ke(),!cn(he,re))){_e&&de<11&&re.keyCode==27&&(re.returnValue=!1);var Ce=re.keyCode;he.display.shift=Ce==16||re.shiftKey;var be=dd(he,re);Se&&($h=be?Ce:null,!be&&Ce==88&&!Mr&&(se?re.metaKey:re.ctrlKey)&&he.replaceSelection("",null,"cut")),st&&!se&&!be&&Ce==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ce==18&&!/\bCodeMirror-crosshair\b/.test(he.display.lineDiv.className)&&Tp(he)}}function Tp(re){var he=re.display.lineDiv;Ve(he,"CodeMirror-crosshair");function Ce(be){(be.keyCode==18||!be.altKey)&&(De(he,"CodeMirror-crosshair"),un(document,"keyup",Ce),un(document,"mouseover",Ce))}Xt(document,"keyup",Ce),Xt(document,"mouseover",Ce)}function Lp(re){re.keyCode==16&&(this.doc.sel.shift=!1),cn(this,re)}function Yl(re){var he=this;if(!(re.target&&re.target!=he.display.input.getField())&&!(jo(he.display,re)||cn(he,re)||re.ctrlKey&&!re.altKey||se&&re.metaKey)){var Ce=re.keyCode,be=re.charCode;if(Se&&Ce==$h){$h=null,On(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(he,re))){var Oe=String.fromCharCode(be==null?Ce:be);Oe!="\b"&&(pd(he,re,Oe)||he.display.input.onKeyPress(re))}}}var em=400,Mp=function(re,he,Ce){this.time=re,this.pos=he,this.button=Ce};Mp.prototype.compare=function(re,he,Ce){return this.time+em>re&&Dn(he,this.pos)==0&&Ce==this.button};var _c,qh;function Np(re,he){var Ce=+new Date;return qh&&qh.compare(Ce,re,he)?(_c=qh=null,"triple"):_c&&_c.compare(Ce,re,he)?(qh=new Mp(Ce,re,he),_c=null,"double"):(_c=new Mp(Ce,re,he),qh=null,"single")}function Jl(re){var he=this,Ce=he.display;if(!(cn(he,re)||Ce.activeTouch&&Ce.input.supportsTouch())){if(Ce.input.ensurePolled(),Ce.shift=re.shiftKey,jo(Ce,re)){ve||(Ce.scroller.draggable=!1,setTimeout(function(){return Ce.scroller.draggable=!0},100));return}if(!vd(he,re)){var be=Ga(he,re),Oe=ii(re),$e=be?Np(be,Oe):"single";window.focus(),Oe==1&&he.state.selectingText&&he.state.selectingText(re),!(be&&Ap(he,Oe,be,$e,re))&&(Oe==1?be?tm(he,be,$e,re):tr(re)==Ce.scroller&&On(re):Oe==2?(be&&sd(he.doc,be),setTimeout(function(){return Ce.input.focus()},20)):Oe==3&&(xe?he.display.input.onContextMenu(re):zo(he)))}}}function Ap(re,he,Ce,be,Oe){var $e="Click";return be=="double"?$e="Double"+$e:be=="triple"&&($e="Triple"+$e),$e=(he==1?"Left":he==2?"Middle":"Right")+$e,Qh(re,bp($e,Oe),Oe,function(gt){if(typeof gt=="string"&&(gt=ph[gt]),!gt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=gt(re,Ce)!=bt}finally{re.state.suppressEdits=!1}return Lt})}function gd(re,he,Ce){var be=re.getOption("configureMouse"),Oe=be?be(re,he,Ce):{};if(Oe.unit==null){var $e=ie?Ce.shiftKey&&Ce.metaKey:Ce.altKey;Oe.unit=$e?"rectangle":he=="single"?"char":he=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||Ce.shiftKey),Oe.addNew==null&&(Oe.addNew=se?Ce.metaKey:Ce.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(se?Ce.altKey:Ce.ctrlKey)),Oe}function tm(re,he,Ce,be){_e?setTimeout(ft(Eo,re),0):re.curOp.focus=Ke();var Oe=gd(re,Ce,be),$e=re.doc.sel,gt;re.options.dragDrop&&di&&!re.isReadOnly()&&Ce=="single"&&(gt=$e.contains(he))>-1&&(Dn((gt=$e.ranges[gt]).from(),he)<0||he.xRel>0)&&(Dn(gt.to(),he)>0||he.xRel<0)?jp(re,be,he,Oe):n0(re,be,he,Oe)}function jp(re,he,Ce,be){var Oe=re.display,$e=!1,gt=Da(re,function(It){ve&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,un(Oe.wrapper.ownerDocument,"mouseup",gt),un(Oe.wrapper.ownerDocument,"mousemove",Lt),un(Oe.scroller,"dragstart",kt),un(Oe.scroller,"drop",gt),$e||(On(It),be.addNew||sd(re.doc,Ce,null,null,be.extend),ve&&!Ae||_e&&de==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Lt=function(It){$e=$e||Math.abs(he.clientX-It.clientX)+Math.abs(he.clientY-It.clientY)>=10},kt=function(){return $e=!0};ve&&(Oe.scroller.draggable=!0),re.state.draggingText=gt,gt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),Xt(Oe.wrapper.ownerDocument,"mouseup",gt),Xt(Oe.wrapper.ownerDocument,"mousemove",Lt),Xt(Oe.scroller,"dragstart",kt),Xt(Oe.scroller,"drop",gt),zo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,he,Ce){if(Ce=="char")return new To(he,he);if(Ce=="word")return re.findWordAt(he);if(Ce=="line")return new To(sn(he.line,0),sr(re.doc,sn(he.line+1,0)));var be=Ce(re,he);return new To(be.from,be.to)}function n0(re,he,Ce,be){var Oe=re.display,$e=re.doc;On(he);var gt,Lt,kt=$e.sel,It=kt.ranges;if(be.addNew&&!be.extend?(Lt=$e.sel.contains(Ce),Lt>-1?gt=It[Lt]:gt=new To(Ce,Ce)):(gt=$e.sel.primary(),Lt=$e.sel.primIndex),be.unit=="rectangle")be.addNew||(gt=new To(Ce,Ce)),Ce=Ga(re,he,!0,!0),Lt=-1;else{var nn=Op(re,Ce,be.unit);be.extend?gt=ad(gt,nn.anchor,nn.head,be.extend):gt=nn}be.addNew?Lt==-1?(Lt=It.length,ps($e,jl(re,It.concat([gt]),Lt),{scroll:!1,origin:"*mouse"})):It.length>1&&It[Lt].empty()&&be.unit=="char"&&!be.extend?(ps($e,jl(re,It.slice(0,Lt).concat(It.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),kt=$e.sel):fh($e,Lt,gt,xt):(Lt=0,ps($e,new ml([gt],0),xt),kt=$e.sel);var _t=Ce;function yn(Yr){if(Dn(_t,Yr)!=0)if(_t=Yr,be.unit=="rectangle"){for(var ci=[],Ii=re.options.tabSize,Zr=Qe(Wn($e,Ce.line).text,Ce.ch,Ii),$i=Qe(Wn($e,Yr.line).text,Yr.ch,Ii),Xo=Math.min(Zr,$i),Ia=Math.max(Zr,$i),ia=Math.min(Ce.line,Yr.line),Ds=Math.min(re.lastLine(),Math.max(Ce.line,Yr.line));ia<=Ds;ia++){var gs=Wn($e,ia).text,La=Mt(gs,Xo,Ii);Xo==Ia?ci.push(new To(sn(ia,La),sn(ia,La))):gs.length>La&&ci.push(new To(sn(ia,La),sn(ia,Mt(gs,Ia,Ii))))}ci.length||ci.push(new To(Ce,Ce)),ps($e,jl(re,kt.ranges.slice(0,Lt).concat(ci),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Yr)}else{var Vs=gt,ss=Op(re,Yr,be.unit),Ma=Vs.anchor,yo;Dn(ss.anchor,Ma)>0?(yo=ss.head,Ma=er(Vs.from(),ss.anchor)):(yo=ss.anchor,Ma=Bn(Vs.to(),ss.head));var ca=kt.ranges.slice(0);ca[Lt]=nm(re,new To(sr($e,Ma),yo)),ps($e,jl(re,ca,Lt),xt)}}var gn=Oe.wrapper.getBoundingClientRect(),hr=0;function mr(Yr){var ci=++hr,Ii=Ga(re,Yr,!0,be.unit=="rectangle");if(Ii)if(Dn(Ii,_t)!=0){re.curOp.focus=Ke(),yn(Ii);var Zr=Ji(Oe,$e);(Ii.line>=Zr.to||Ii.line<Zr.from)&&setTimeout(Da(re,function(){hr==ci&&mr(Yr)}),150)}else{var $i=Yr.clientY<gn.top?-20:Yr.clientY>gn.bottom?20:0;$i&&setTimeout(Da(re,function(){hr==ci&&(Oe.scroller.scrollTop+=$i,mr(Yr))}),50)}}function Er(Yr){re.state.selectingText=!1,hr=1/0,Yr&&(On(Yr),Oe.input.focus()),un(Oe.wrapper.ownerDocument,"mousemove",Rr),un(Oe.wrapper.ownerDocument,"mouseup",ri),$e.history.lastSelOrigin=null}var Rr=Da(re,function(Yr){Yr.buttons===0||!ii(Yr)?Er(Yr):mr(Yr)}),ri=Da(re,Er);re.state.selectingText=ri,Xt(Oe.wrapper.ownerDocument,"mousemove",Rr),Xt(Oe.wrapper.ownerDocument,"mouseup",ri)}function nm(re,he){var Ce=he.anchor,be=he.head,Oe=Wn(re.doc,Ce.line);if(Dn(Ce,be)==0&&Ce.sticky==be.sticky)return he;var $e=qt(Oe);if(!$e)return he;var gt=Et($e,Ce.ch,Ce.sticky),Lt=$e[gt];if(Lt.from!=Ce.ch&&Lt.to!=Ce.ch)return he;var kt=gt+(Lt.from==Ce.ch==(Lt.level!=1)?0:1);if(kt==0||kt==$e.length)return he;var It;if(be.line!=Ce.line)It=(be.line-Ce.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var nn=Et($e,be.ch,be.sticky),_t=nn-gt||(be.ch-Ce.ch)*(Lt.level==1?-1:1);nn==kt-1||nn==kt?It=_t<0:It=_t>0}var yn=$e[kt+(It?-1:0)],gn=It==(yn.level==1),hr=gn?yn.from:yn.to,mr=gn?"after":"before";return Ce.ch==hr&&Ce.sticky==mr?he:new To(new sn(Ce.line,hr,mr),be)}function md(re,he,Ce,be){var Oe,$e;if(he.touches)Oe=he.touches[0].clientX,$e=he.touches[0].clientY;else try{Oe=he.clientX,$e=he.clientY}catch(yn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&On(he);var gt=re.display,Lt=gt.lineDiv.getBoundingClientRect();if($e>Lt.bottom||!xn(re,Ce))return xr(he);$e-=Lt.top-gt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var It=gt.gutters.childNodes[kt];if(It&&It.getBoundingClientRect().right>=Oe){var nn=ln(re.doc,$e),_t=re.display.gutterSpecs[kt];return on(re,Ce,re,nn,_t.className,he),xr(he)}}}function vd(re,he){return md(re,he,"gutterClick",!0)}function yd(re,he){jo(re.display,he)||rm(re,he)||cn(re,he,"contextmenu")||xe||re.display.input.onContextMenu(he)}function rm(re,he){return xn(re,"gutterContextMenu")?md(re,he,"gutterContextMenu",!1):!1}function Sd(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ou(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var he=re.optionHandlers;function Ce(be,Oe,$e,gt){re.defaults[be]=Oe,$e&&(he[be]=gt?function(Lt,kt,It){It!=gh&&$e(Lt,kt,It)}:$e)}re.defineOption=Ce,re.Init=gh,Ce("value","",function(be,Oe){return be.setValue(Oe)},!0),Ce("mode",null,function(be,Oe){be.doc.modeOption=Oe,Qi(be)},!0),Ce("indentUnit",2,Qi,!0),Ce("indentWithTabs",!1),Ce("smartIndent",!0),Ce("tabSize",4,function(be){ff(be),ou(be),Fo(be)},!0),Ce("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var $e=[],gt=be.doc.first;be.doc.iter(function(kt){for(var It=0;;){var nn=kt.text.indexOf(Oe,It);if(nn==-1)break;It=nn+Oe.length,$e.push(sn(gt,nn))}gt++});for(var Lt=$e.length-1;Lt>=0;Lt--)Zh(be.doc,Oe,$e[Lt],sn($e[Lt].line,$e[Lt].ch+Oe.length))}}),Ce("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,$e){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),$e!=gh&&be.refresh()}),Ce("specialCharPlaceholder",vi,function(be){return be.refresh()},!0),Ce("electricChars",!0),Ce("inputStyle",te?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ce("spellcheck",!1,function(be,Oe){return be.getInputField().spellcheck=Oe},!0),Ce("autocorrect",!1,function(be,Oe){return be.getInputField().autocorrect=Oe},!0),Ce("autocapitalize",!1,function(be,Oe){return be.getInputField().autocapitalize=Oe},!0),Ce("rtlMoveVisually",!le),Ce("wholeLineUpdateBefore",!0),Ce("theme","default",function(be){Sd(be),il(be)},!0),Ce("keyMap","default",function(be,Oe,$e){var gt=Jh(Oe),Lt=$e!=gh&&Jh($e);Lt&&Lt.detach&&Lt.detach(be,gt),gt.attach&>.attach(be,Lt||null)}),Ce("extraKeys",null),Ce("configureMouse",null),Ce("lineWrapping",!1,om,!0),Ce("gutters",[],function(be,Oe){be.display.gutterSpecs=Ka(Oe,be.options.lineNumbers),il(be)},!0),Ce("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Du(be.display)+"px":"0",be.refresh()},!0),Ce("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ce("scrollbarStyle","native",function(be){Vl(be),Fa(be),be.display.scrollbars.setScrollTop(be.doc.scrollTop),be.display.scrollbars.setScrollLeft(be.doc.scrollLeft)},!0),Ce("lineNumbers",!1,function(be,Oe){be.display.gutterSpecs=Ka(be.options.gutters,Oe),il(be)},!0),Ce("firstLineNumber",1,il,!0),Ce("lineNumberFormatter",function(be){return be},il,!0),Ce("showCursorWhenSelecting",!1,va,!0),Ce("resetSelectionOnContextMenu",!0),Ce("lineWiseCopyCut",!0),Ce("pasteLinesPerSelection",!0),Ce("selectionsMayTouch",!1),Ce("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Bu(be),be.display.input.blur()),be.display.input.readOnlyChanged(Oe)}),Ce("screenReaderLabel",null,function(be,Oe){Oe=Oe===""?null:Oe,be.display.input.screenReaderLabelChanged(Oe)}),Ce("disableInput",!1,function(be,Oe){Oe||be.display.input.reset()},!0),Ce("dragDrop",!0,xd),Ce("allowDropFileTypes",null),Ce("cursorBlinkRate",530),Ce("cursorScrollMargin",0),Ce("cursorHeight",1,va,!0),Ce("singleCursorHeightPerLine",!0,va,!0),Ce("workTime",100),Ce("workDelay",100),Ce("flattenSpans",!0,ff,!0),Ce("addModeClass",!1,ff,!0),Ce("pollInterval",100),Ce("undoDepth",200,function(be,Oe){return be.doc.history.undoDepth=Oe}),Ce("historyEventDelay",1250),Ce("viewportMargin",10,function(be){return be.refresh()},!0),Ce("maxHighlightLength",1e4,ff,!0),Ce("moveInputWithCursor",!0,function(be,Oe){Oe||be.display.input.resetPosition()}),Ce("tabindex",null,function(be,Oe){return be.display.input.getField().tabIndex=Oe||""}),Ce("autofocus",null),Ce("direction","ltr",function(be,Oe){return be.doc.setDirection(Oe)},!0),Ce("phrases",null)}function xd(re,he,Ce){var be=Ce&&Ce!=gh;if(!he!=!be){var Oe=re.display.dragFunctions,$e=he?Xt:un;$e(re.display.scroller,"dragstart",Oe.start),$e(re.display.scroller,"dragenter",Oe.enter),$e(re.display.scroller,"dragover",Oe.over),$e(re.display.scroller,"dragleave",Oe.leave),$e(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Ve(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),ei(re)),gi(re),Fo(re),ou(re),setTimeout(function(){return Fa(re)},100)}function vo(re,he){var Ce=this;if(!(this instanceof vo))return new vo(re,he);this.options=he=he?St(he):{},St(Fp,he,!1);var be=he.value;typeof be=="string"?be=new as(be,he.mode,null,he.lineSeparator,he.direction):he.mode&&(be.modeOption=he.mode),this.doc=be;var Oe=new vo.inputStyles[he.inputStyle](this),$e=this.display=new uh(re,be,Oe,he);$e.wrapper.CodeMirror=this,Sd(this),he.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vl(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 rt,keySeq:null,specialChars:null},he.autofocus&&!te&&$e.input.focus(),_e&&de<11&&setTimeout(function(){return Ce.display.input.reset(!0)},20),zc(this),al(),rl(this),this.curOp.forceUpdate=!0,rd(this,be),he.autofocus&&!te||this.hasFocus()?setTimeout(function(){Ce.hasFocus()&&!Ce.state.focused&&ho(Ce)},20):Bu(this);for(var gt in kf)kf.hasOwnProperty(gt)&&kf[gt](this,he[gt],gh);Ca(this),he.finishInit&&he.finishInit(this);for(var Lt=0;Lt<ec.length;++Lt)ec[Lt](this);Al(this),ve&&he.lineWrapping&&getComputedStyle($e.lineDiv).textRendering=="optimizelegibility"&&($e.lineDiv.style.textRendering="auto")}vo.defaults=Fp,vo.optionHandlers=kf;function zc(re){var he=re.display;Xt(he.scroller,"mousedown",Da(re,Jl)),_e&&de<11?Xt(he.scroller,"dblclick",Da(re,function(kt){if(!cn(re,kt)){var It=Ga(re,kt);if(!(!It||vd(re,kt)||jo(re.display,kt))){On(kt);var nn=re.findWordAt(It);sd(re.doc,nn.anchor,nn.head)}}})):Xt(he.scroller,"dblclick",function(kt){return cn(re,kt)||On(kt)}),Xt(he.scroller,"contextmenu",function(kt){return yd(re,kt)}),Xt(he.input.getField(),"contextmenu",function(kt){he.scroller.contains(kt.target)||yd(re,kt)});var Ce,be={end:0};function Oe(){he.activeTouch&&(Ce=setTimeout(function(){return he.activeTouch=null},1e3),be=he.activeTouch,be.end=+new Date)}function $e(kt){if(kt.touches.length!=1)return!1;var It=kt.touches[0];return It.radiusX<=1&&It.radiusY<=1}function gt(kt,It){if(It.left==null)return!0;var nn=It.left-kt.left,_t=It.top-kt.top;return nn*nn+_t*_t>20*20}Xt(he.scroller,"touchstart",function(kt){if(!cn(re,kt)&&!$e(kt)&&!vd(re,kt)){he.input.ensurePolled(),clearTimeout(Ce);var It=+new Date;he.activeTouch={start:It,moved:!1,prev:It-be.end<=300?be:null},kt.touches.length==1&&(he.activeTouch.left=kt.touches[0].pageX,he.activeTouch.top=kt.touches[0].pageY)}}),Xt(he.scroller,"touchmove",function(){he.activeTouch&&(he.activeTouch.moved=!0)}),Xt(he.scroller,"touchend",function(kt){var It=he.activeTouch;if(It&&!jo(he,kt)&&It.left!=null&&!It.moved&&new Date-It.start<300){var nn=re.coordsChar(he.activeTouch,"page"),_t;!It.prev||gt(It,It.prev)?_t=new To(nn,nn):!It.prev.prev||gt(It,It.prev.prev)?_t=re.findWordAt(nn):_t=new To(sn(nn.line,0),sr(re.doc,sn(nn.line+1,0))),re.setSelection(_t.anchor,_t.head),re.focus(),On(kt)}Oe()}),Xt(he.scroller,"touchcancel",Oe),Xt(he.scroller,"scroll",function(){he.scroller.clientHeight&&(Wl(re,he.scroller.scrollTop),Kl(re,he.scroller.scrollLeft,!0),on(re,"scroll",re))}),Xt(he.scroller,"mousewheel",function(kt){return Va(re,kt)}),Xt(he.scroller,"DOMMouseScroll",function(kt){return Va(re,kt)}),Xt(he.wrapper,"scroll",function(){return he.wrapper.scrollTop=he.wrapper.scrollLeft=0}),he.dragFunctions={enter:function(kt){cn(re,kt)||$r(kt)},over:function(kt){cn(re,kt)||(Jg(re,kt),$r(kt))},start:function(kt){return Yg(re,kt)},drop:Da(re,vp),leave:function(kt){cn(re,kt)||Qg(re)}};var Lt=he.input.getField();Xt(Lt,"keyup",function(kt){return Lp.call(re,kt)}),Xt(Lt,"keydown",Da(re,kp)),Xt(Lt,"keypress",Da(re,Yl)),Xt(Lt,"focus",function(kt){return ho(re,kt)}),Xt(Lt,"blur",function(kt){return Bu(re,kt)})}var ec=[];vo.defineInitHook=function(re){return ec.push(re)};function Ba(re,he,Ce,be){var Oe=re.doc,$e;Ce==null&&(Ce="add"),Ce=="smart"&&(Oe.mode.indent?$e=ki(re,he).state:Ce="prev");var gt=re.options.tabSize,Lt=Wn(Oe,he),kt=Qe(Lt.text,null,gt);Lt.stateAfter&&(Lt.stateAfter=null);var It=Lt.text.match(/^\s*/)[0],nn;if(!be&&!/\S/.test(Lt.text))nn=0,Ce="not";else if(Ce=="smart"&&(nn=Oe.mode.indent($e,Lt.text.slice(It.length),Lt.text),nn==bt||nn>150)){if(!be)return;Ce="prev"}Ce=="prev"?he>Oe.first?nn=Qe(Wn(Oe,he-1).text,null,gt):nn=0:Ce=="add"?nn=kt+re.options.indentUnit:Ce=="subtract"?nn=kt-re.options.indentUnit:typeof Ce=="number"&&(nn=kt+Ce),nn=Math.max(0,nn);var _t="",yn=0;if(re.options.indentWithTabs)for(var gn=Math.floor(nn/gt);gn;--gn)yn+=gt,_t+=" ";if(yn<nn&&(_t+=Ft(nn-yn)),_t!=It)return Zh(Oe,_t,sn(he,0),sn(he,It.length),"+input"),Lt.stateAfter=null,!0;for(var hr=0;hr<Oe.sel.ranges.length;hr++){var mr=Oe.sel.ranges[hr];if(mr.head.line==he&&mr.head.ch<It.length){var Er=sn(he,It.length);fh(Oe,hr,new To(Er,Er));break}}}var Fs=null;function tc(re){Fs=re}function Tf(re,he,Ce,be,Oe){var $e=re.doc;re.display.shift=!1,be||(be=$e.sel);var gt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>gt,kt=Li(he),It=null;if(Lt&&be.ranges.length>1)if(Fs&&Fs.text.join(`
|
|
`)==he){if(be.ranges.length%Fs.text.length==0){It=[];for(var nn=0;nn<Fs.text.length;nn++)It.push($e.splitLines(Fs.text[nn]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(It=vt(kt,function(Rr){return[Rr]}));for(var _t=re.curOp.updateInput,yn=be.ranges.length-1;yn>=0;yn--){var gn=be.ranges[yn],hr=gn.from(),mr=gn.to();gn.empty()&&(Ce&&Ce>0?hr=sn(hr.line,hr.ch-Ce):re.state.overwrite&&!Lt?mr=sn(mr.line,Math.min(Wn($e,mr.line).text.length,mr.ch+mt(kt).length)):Lt&&Fs&&Fs.lineWise&&Fs.text.join(`
|
|
`)==kt.join(`
|
|
`)&&(hr=mr=sn(hr.line,0)));var Er={from:hr,to:mr,text:It?It[yn%It.length]:kt,origin:Oe||(Lt?"paste":re.state.cutIncoming>gt?"cut":"+input")};dh(re.doc,Er),Ur(re,"inputRead",re,Er)}he&&!Lt&&Bp(re,he),Nl(re),re.curOp.updateInput<2&&(re.curOp.updateInput=_t),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,he){var Ce=re.clipboardData&&re.clipboardData.getData("Text");if(Ce)return re.preventDefault(),!he.isReadOnly()&&!he.options.disableInput&&So(he,function(){return Tf(he,Ce,0,null,"paste")}),!0}function Bp(re,he){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ce=re.doc.sel,be=Ce.ranges.length-1;be>=0;be--){var Oe=Ce.ranges[be];if(!(Oe.head.ch>100||be&&Ce.ranges[be-1].head.line==Oe.head.line)){var $e=re.getModeAt(Oe.head),gt=!1;if($e.electricChars){for(var Lt=0;Lt<$e.electricChars.length;Lt++)if(he.indexOf($e.electricChars.charAt(Lt))>-1){gt=Ba(re,Oe.head.line,"smart");break}}else $e.electricInput&&$e.electricInput.test(Wn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(gt=Ba(re,Oe.head.line,"smart"));gt&&Ur(re,"electricInput",re,Oe.head.line)}}}function Ip(re){for(var he=[],Ce=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,$e={anchor:sn(Oe,0),head:sn(Oe+1,0)};Ce.push($e),he.push(re.getRange($e.anchor,$e.head))}return{text:he,ranges:Ce}}function Rp(re,he,Ce,be){re.setAttribute("autocorrect",Ce?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!he)}function _p(){var re=Me("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),he=Me("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ve?re.style.width="1000px":re.setAttribute("wrap","off"),fe&&(re.style.border="1px solid black"),Rp(re),he}function mh(re){var he=re.optionHandlers,Ce=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(be,Oe){var $e=this.options,gt=$e[be];$e[be]==Oe&&be!="mode"||($e[be]=Oe,he.hasOwnProperty(be)&&Da(this,he[be])(this,Oe,gt),on(this,"optionChange",this,be))},getOption:function(be){return this.options[be]},getDoc:function(){return this.doc},addKeyMap:function(be,Oe){this.state.keyMaps[Oe?"push":"unshift"](Jh(be))},removeKeyMap:function(be){for(var Oe=this.state.keyMaps,$e=0;$e<Oe.length;++$e)if(Oe[$e]==be||Oe[$e].name==be)return Oe.splice($e,1),!0},addOverlay:Ua(function(be,Oe){var $e=be.token?be:re.getMode(this.options,be);if($e.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:$e,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(gt){return gt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Ua(function(be){for(var Oe=this.state.overlays,$e=0;$e<Oe.length;++$e){var gt=Oe[$e].modeSpec;if(gt==be||typeof be=="string"&>.name==be){Oe.splice($e,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Ua(function(be,Oe,$e){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),Nn(this.doc,be)&&Ba(this,be,Oe,$e)}),indentSelection:Ua(function(be){for(var Oe=this.doc.sel.ranges,$e=-1,gt=0;gt<Oe.length;gt++){var Lt=Oe[gt];if(Lt.empty())Lt.head.line>$e&&(Ba(this,Lt.head.line,be,!0),$e=Lt.head.line,gt==this.doc.sel.primIndex&&Nl(this));else{var kt=Lt.from(),It=Lt.to(),nn=Math.max($e,kt.line);$e=Math.min(this.lastLine(),It.line-(It.ch?0:1))+1;for(var _t=nn;_t<$e;++_t)Ba(this,_t,be);var yn=this.doc.sel.ranges;kt.ch==0&&Oe.length==yn.length&&yn[gt].from().ch>0&&fh(this.doc,gt,new To(kt,yn[gt].to()),ct)}}}),getTokenAt:function(be,Oe){return wr(this,be,Oe)},getLineTokens:function(be,Oe){return wr(this,sn(be),Oe,!0)},getTokenTypeAt:function(be){be=sr(this.doc,be);var Oe=ni(this,Wn(this.doc,be.line)),$e=0,gt=(Oe.length-1)/2,Lt=be.ch,kt;if(Lt==0)kt=Oe[2];else for(;;){var It=$e+gt>>1;if((It?Oe[It*2-1]:0)>=Lt)gt=It;else if(Oe[It*2+1]<Lt)$e=It+1;else{kt=Oe[It*2+2];break}}var nn=kt?kt.indexOf("overlay "):-1;return nn<0?kt:nn==0?null:kt.slice(0,nn-1)},getModeAt:function(be){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(be).state).mode:Oe},getHelper:function(be,Oe){return this.getHelpers(be,Oe)[0]},getHelpers:function(be,Oe){var $e=[];if(!Ce.hasOwnProperty(Oe))return $e;var gt=Ce[Oe],Lt=this.getModeAt(be);if(typeof Lt[Oe]=="string")gt[Lt[Oe]]&&$e.push(gt[Lt[Oe]]);else if(Lt[Oe])for(var kt=0;kt<Lt[Oe].length;kt++){var It=gt[Lt[Oe][kt]];It&&$e.push(It)}else Lt.helperType&>[Lt.helperType]?$e.push(gt[Lt.helperType]):gt[Lt.name]&&$e.push(gt[Lt.name]);for(var nn=0;nn<gt._global.length;nn++){var _t=gt._global[nn];_t.pred(Lt,this)&&wt($e,_t.val)==-1&&$e.push(_t.val)}return $e},getStateAfter:function(be,Oe){var $e=this.doc;return be=_n($e,be==null?$e.first+$e.size-1:be),ki(this,be+1,Oe).state},cursorCoords:function(be,Oe){var $e,gt=this.doc.sel.primary();return be==null?$e=gt.head:typeof be=="object"?$e=sr(this.doc,be):$e=be?gt.from():gt.to(),Wi(this,$e,Oe||"page")},charCoords:function(be,Oe){return Bi(this,sr(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=uo(this,be,Oe||"page"),qo(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=uo(this,{top:be,left:0},Oe||"page").top,ln(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,$e){var gt=!1,Lt;if(typeof be=="number"){var kt=this.doc.first+this.doc.size-1;be<this.doc.first?be=this.doc.first:be>kt&&(be=kt,gt=!0),Lt=Wn(this.doc,be)}else Lt=be;return sa(this,Lt,{top:0,left:0},Oe||"page",$e||gt).top+(gt?this.doc.height-Or(Lt):0)},defaultTextHeight:function(){return Us(this.display)},defaultCharWidth:function(){return Hl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,$e,gt,Lt){var kt=this.display;be=Wi(this,sr(this.doc,be));var It=be.bottom,nn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),gt=="over")It=be.top;else if(gt=="above"||gt=="near"){var _t=Math.max(kt.wrapper.clientHeight,this.doc.height),yn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(gt=="above"||be.bottom+Oe.offsetHeight>_t)&&be.top>Oe.offsetHeight?It=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=_t&&(It=be.bottom),nn+Oe.offsetWidth>yn&&(nn=yn-Oe.offsetWidth)}Oe.style.top=It+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(nn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?nn=0:Lt=="middle"&&(nn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=nn+"px"),$e&&ih(this,{left:nn,top:It,right:nn+Oe.offsetWidth,bottom:It+Oe.offsetHeight})},triggerOnKeyDown:Ua(kp),triggerOnKeyPress:Ua(Yl),triggerOnKeyUp:Lp,triggerOnMouseDown:Ua(Jl),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Ua(function(be){Bp(this,be)}),findPosH:function(be,Oe,$e,gt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var kt=sr(this.doc,be),It=0;It<Oe&&(kt=Lf(this.doc,kt,Lt,$e,gt),!kt.hitSide);++It);return kt},moveH:Ua(function(be,Oe){var $e=this;this.extendSelectionsBy(function(gt){return $e.display.shift||$e.doc.extend||gt.empty()?Lf($e.doc,gt.head,be,Oe,$e.options.rtlMoveVisually):be<0?gt.from():gt.to()},dt)}),deleteH:Ua(function(be,Oe){var $e=this.doc.sel,gt=this.doc;$e.somethingSelected()?gt.replaceSelection("",null,"+delete"):Ks(this,function(Lt){var kt=Lf(gt,Lt.head,be,Oe,!1);return be<0?{from:kt,to:Lt.head}:{from:Lt.head,to:kt}})}),findPosV:function(be,Oe,$e,gt){var Lt=1,kt=gt;Oe<0&&(Lt=-1,Oe=-Oe);for(var It=sr(this.doc,be),nn=0;nn<Oe;++nn){var _t=Wi(this,It,"div");if(kt==null?kt=_t.left:_t.left=kt,It=vh(this,_t,Lt,$e),It.hitSide)break}return It},moveV:Ua(function(be,Oe){var $e=this,gt=this.doc,Lt=[],kt=!this.display.shift&&!gt.extend&>.sel.somethingSelected();if(gt.extendSelectionsBy(function(nn){if(kt)return be<0?nn.from():nn.to();var _t=Wi($e,nn.head,"div");nn.goalColumn!=null&&(_t.left=nn.goalColumn),Lt.push(_t.left);var yn=vh($e,_t,be,Oe);return Oe=="page"&&nn==gt.sel.primary()&&_h($e,Bi($e,yn,"div").top-_t.top),yn},dt),Lt.length)for(var It=0;It<gt.sel.ranges.length;It++)gt.sel.ranges[It].goalColumn=Lt[It]}),findWordAt:function(be){var Oe=this.doc,$e=Wn(Oe,be.line).text,gt=be.ch,Lt=be.ch;if($e){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Lt==$e.length)&>?--gt:++Lt;for(var It=$e.charAt(gt),nn=nt(It,kt)?function(_t){return nt(_t,kt)}:/\s/.test(It)?function(_t){return/\s/.test(_t)}:function(_t){return!/\s/.test(_t)&&!nt(_t)};gt>0&&nn($e.charAt(gt-1));)--gt;for(;Lt<$e.length&&nn($e.charAt(Lt));)++Lt}return new To(sn(be.line,gt),sn(be.line,Lt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ve(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),on(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ke()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ua(function(be,Oe){Iu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-fo(this)-this.display.barHeight,width:be.scrollWidth-fo(this)-this.display.barWidth,clientHeight:Gs(this),clientWidth:os(this)}},scrollIntoView:Ua(function(be,Oe){be==null?(be={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof be=="number"?be={from:sn(be,0),to:null}:be.from==null&&(be={from:be,to:null}),be.to||(be.to=be.from),be.margin=Oe||0,be.from.line!=null?lo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Ua(function(be,Oe){var $e=this,gt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=gt(be)),Oe!=null&&(this.display.wrapper.style.height=gt(Oe)),this.options.lineWrapping&&iu(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(kt){if(kt.widgets){for(var It=0;It<kt.widgets.length;It++)if(kt.widgets[It].noHScroll){Ui($e,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,on(this,"refresh",this)}),operation:function(be){return So(this,be)},startOperation:function(){return rl(this)},endOperation:function(){return Al(this)},refresh:Ua(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,ou(this),Iu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-Us(this.display))>.5||this.options.lineWrapping)&&gi(this),on(this,"refresh",this)}),swapDoc:Ua(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),ou(this),this.display.input.reset(),Iu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Ur(this,"swapDoc",this,Oe),Oe}),phrase:function(be){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,be)?Oe[be]:be},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}},kn(re),re.registerHelper=function(be,Oe,$e){Ce.hasOwnProperty(be)||(Ce[be]=re[be]={_global:[]}),Ce[be][Oe]=$e},re.registerGlobalHelper=function(be,Oe,$e,gt){re.registerHelper(be,Oe,gt),Ce[be]._global.push({pred:$e,val:gt})}}function Lf(re,he,Ce,be,Oe){var $e=he,gt=Ce,Lt=Wn(re,he.line),kt=Oe&&re.direction=="rtl"?-Ce:Ce;function It(){var ri=he.line+kt;return ri<re.first||ri>=re.first+re.size?!1:(he=new sn(ri,he.ch,he.sticky),Lt=Wn(re,ri))}function nn(ri){var Yr;if(be=="codepoint"){var ci=Lt.text.charCodeAt(he.ch+(be>0?0:-1));isNaN(ci)?Yr=null:Yr=new sn(he.line,Math.max(0,Math.min(Lt.text.length,he.ch+Ce*(ci>=55296&&ci<56320?2:1))),-Ce)}else Oe?Yr=cd(re.cm,Lt,he,Ce):Yr=xa(Lt,he,Ce);if(Yr==null)if(!ri&&It())he=Ef(Oe,re.cm,Lt,he.line,kt);else return!1;else he=Yr;return!0}if(be=="char"||be=="codepoint")nn();else if(be=="column")nn(!0);else if(be=="word"||be=="group")for(var _t=null,yn=be=="group",gn=re.cm&&re.cm.getHelper(he,"wordChars"),hr=!0;!(Ce<0&&!nn(!hr));hr=!1){var mr=Lt.text.charAt(he.ch)||`
|
|
`,Er=nt(mr,gn)?"w":yn&&mr==`
|
|
`?"n":!yn||/\s/.test(mr)?null:"p";if(yn&&!hr&&!Er&&(Er="s"),_t&&_t!=Er){Ce<0&&(Ce=1,nn(),he.sticky="after");break}if(Er&&(_t=Er),Ce>0&&!nn(!hr))break}var Rr=Sf(re,he,$e,gt,!0);return Jn($e,Rr)&&(Rr.hitSide=!0),Rr}function vh(re,he,Ce,be){var Oe=re.doc,$e=he.left,gt;if(be=="page"){var Lt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Lt-.5*Us(re.display),3);gt=(Ce>0?he.bottom:he.top)+Ce*kt}else be=="line"&&(gt=Ce>0?he.bottom+3:he.top-3);for(var It;It=qo(re,$e,gt),!!It.outside;){if(Ce<0?gt<=0:gt>=Oe.height){It.hitSide=!0;break}gt+=Ce*5}return It}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Do.prototype.init=function(re){var he=this,Ce=this,be=Ce.cm,Oe=Ce.div=re.lineDiv;Rp(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function $e(Lt){for(var kt=Lt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}Xt(Oe,"paste",function(Lt){!$e(Lt)||cn(be,Lt)||Dp(Lt,be)||de<=11&&setTimeout(Da(be,function(){return he.updateFromDOM()}),20)}),Xt(Oe,"compositionstart",function(Lt){he.composing={data:Lt.data,done:!1}}),Xt(Oe,"compositionupdate",function(Lt){he.composing||(he.composing={data:Lt.data,done:!1})}),Xt(Oe,"compositionend",function(Lt){he.composing&&(Lt.data!=he.composing.data&&he.readFromDOMSoon(),he.composing.done=!0)}),Xt(Oe,"touchstart",function(){return Ce.forceCompositionEnd()}),Xt(Oe,"input",function(){he.composing||he.readFromDOMSoon()});function gt(Lt){if(!(!$e(Lt)||cn(be,Lt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Lt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var kt=Ip(be);tc({lineWise:!0,text:kt.text}),Lt.type=="cut"&&be.operation(function(){be.setSelections(kt.ranges,0,ct),be.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var It=Fs.text.join(`
|
|
`);if(Lt.clipboardData.setData("Text",It),Lt.clipboardData.getData("Text")==It){Lt.preventDefault();return}}var nn=_p(),_t=nn.firstChild;be.display.lineSpace.insertBefore(nn,be.display.lineSpace.firstChild),_t.value=Fs.text.join(`
|
|
`);var yn=document.activeElement;ut(_t),setTimeout(function(){be.display.lineSpace.removeChild(nn),yn.focus(),yn==Oe&&Ce.showPrimarySelection()},50)}}Xt(Oe,"copy",gt),Xt(Oe,"cut",gt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=au(this.cm,!1);return re.focus=document.activeElement==this.div,re},Do.prototype.showSelection=function(re,he){!re||!this.cm.display.view.length||((re.focus||he)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Do.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Do.prototype.showPrimarySelection=function(){var re=this.getSelection(),he=this.cm,Ce=he.doc.sel.primary(),be=Ce.from(),Oe=Ce.to();if(he.display.viewTo==he.display.viewFrom||be.line>=he.display.viewTo||Oe.line<he.display.viewFrom){re.removeAllRanges();return}var $e=Mf(he,re.anchorNode,re.anchorOffset),gt=Mf(he,re.focusNode,re.focusOffset);if(!($e&&!$e.bad&>&&!gt.bad&&Dn(er($e,gt),be)==0&&Dn(Bn($e,gt),Oe)==0)){var Lt=he.display.view,kt=be.line>=he.display.viewFrom&&wd(he,be)||{node:Lt[0].measure.map[2],offset:0},It=Oe.line<he.display.viewTo&&wd(he,Oe);if(!It){var nn=Lt[Lt.length-1].measure,_t=nn.maps?nn.maps[nn.maps.length-1]:nn.map;It={node:_t[_t.length-1],offset:_t[_t.length-2]-_t[_t.length-3]}}if(!kt||!It){re.removeAllRanges();return}var yn=re.rangeCount&&re.getRangeAt(0),gn;try{gn=Ge(kt.node,kt.offset,It.offset,It.node)}catch(hr){}gn&&(!st&&he.state.focused?(re.collapse(kt.node,kt.offset),gn.collapsed||(re.removeAllRanges(),re.addRange(gn))):(re.removeAllRanges(),re.addRange(gn)),yn&&re.anchorNode==null?re.addRange(yn):st&&this.startGracePeriod()),this.rememberSelection()}},Do.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Do.prototype.showMultipleSelections=function(re){Te(this.cm.display.cursorDiv,re.cursors),Te(this.cm.display.selectionDiv,re.selection)},Do.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Do.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var he=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,he)},Do.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Do.prototype.blur=function(){this.div.blur()},Do.prototype.getField=function(){return this.div},Do.prototype.supportsTouch=function(){return!0},Do.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():So(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function he(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,he))}this.polling.set(this.cm.options.pollInterval,he)},Do.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Do.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),he=this.cm;if(z&&ke&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ce=Mf(he,re.anchorNode,re.anchorOffset),be=Mf(he,re.focusNode,re.focusOffset);Ce&&be&&So(he,function(){ps(he.doc,Ru(Ce,be),ct),(Ce.bad||be.bad)&&(he.curOp.selectionChanged=!0)})}}},Do.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,he=re.display,Ce=re.doc.sel.primary(),be=Ce.from(),Oe=Ce.to();if(be.ch==0&&be.line>re.firstLine()&&(be=sn(be.line-1,Wn(re.doc,be.line-1).length)),Oe.ch==Wn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=sn(Oe.line+1,0)),be.line<he.viewFrom||Oe.line>he.viewTo-1)return!1;var $e,gt,Lt;be.line==he.viewFrom||($e=js(re,be.line))==0?(gt=jt(he.view[0].line),Lt=he.view[0].node):(gt=jt(he.view[$e].line),Lt=he.view[$e-1].node.nextSibling);var kt=js(re,Oe.line),It,nn;if(kt==he.view.length-1?(It=he.viewTo-1,nn=he.lineDiv.lastChild):(It=jt(he.view[kt+1].line)-1,nn=he.view[kt+1].node.previousSibling),!Lt)return!1;for(var _t=re.doc.splitLines(Uc(re,Lt,nn,gt,It)),yn=Ht(re.doc,sn(gt,0),sn(It,Wn(re.doc,It).text.length));_t.length>1&&yn.length>1;)if(mt(_t)==mt(yn))_t.pop(),yn.pop(),It--;else if(_t[0]==yn[0])_t.shift(),yn.shift(),gt++;else break;for(var gn=0,hr=0,mr=_t[0],Er=yn[0],Rr=Math.min(mr.length,Er.length);gn<Rr&&mr.charCodeAt(gn)==Er.charCodeAt(gn);)++gn;for(var ri=mt(_t),Yr=mt(yn),ci=Math.min(ri.length-(_t.length==1?gn:0),Yr.length-(yn.length==1?gn:0));hr<ci&&ri.charCodeAt(ri.length-hr-1)==Yr.charCodeAt(Yr.length-hr-1);)++hr;if(_t.length==1&&yn.length==1&>==be.line)for(;gn&&gn>be.ch&&ri.charCodeAt(ri.length-hr-1)==Yr.charCodeAt(Yr.length-hr-1);)gn--,hr++;_t[_t.length-1]=ri.slice(0,ri.length-hr).replace(/^\u200b+/,""),_t[0]=_t[0].slice(gn).replace(/\u200b+$/,"");var Ii=sn(gt,gn),Zr=sn(It,yn.length?mt(yn).length-hr:0);if(_t.length>1||_t[0]||Dn(Ii,Zr))return Zh(re.doc,_t,Ii,Zr,"+input"),!0},Do.prototype.ensurePolled=function(){this.forceCompositionEnd()},Do.prototype.reset=function(){this.forceCompositionEnd()},Do.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Do.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Do.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&So(this.cm,function(){return Fo(re.cm)})},Do.prototype.setUneditable=function(re){re.contentEditable="false"},Do.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Da(this.cm,Tf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Do.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Do.prototype.onContextMenu=function(){},Do.prototype.resetPosition=function(){},Do.prototype.needsContentAttribute=!0;function wd(re,he){var Ce=Nu(re,he.line);if(!Ce||Ce.hidden)return null;var be=Wn(re.doc,he.line),Oe=Ho(Ce,be,he.line),$e=qt(be,re.doc.direction),gt="left";if($e){var Lt=Et($e,he.ch);gt=Lt%2?"right":"left"}var kt=nh(Oe.map,he.ch,gt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function zp(re){for(var he=re;he;he=he.parentNode)if(/CodeMirror-gutter-wrapper/.test(he.className))return!0;return!1}function Gc(re,he){return he&&(re.bad=!0),re}function Uc(re,he,Ce,be,Oe){var $e="",gt=!1,Lt=re.doc.lineSeparator(),kt=!1;function It(gn){return function(hr){return hr.id==gn}}function nn(){gt&&($e+=Lt,kt&&($e+=Lt),gt=kt=!1)}function _t(gn){gn&&(nn(),$e+=gn)}function yn(gn){if(gn.nodeType==1){var hr=gn.getAttribute("cm-text");if(hr){_t(hr);return}var mr=gn.getAttribute("cm-marker"),Er;if(mr){var Rr=re.findMarks(sn(be,0),sn(Oe+1,0),It(+mr));Rr.length&&(Er=Rr[0].find(0))&&_t(Ht(re.doc,Er.from,Er.to).join(Lt));return}if(gn.getAttribute("contenteditable")=="false")return;var ri=/^(pre|div|p|li|table|br)$/i.test(gn.nodeName);if(!/^br$/i.test(gn.nodeName)&&gn.textContent.length==0)return;ri&&nn();for(var Yr=0;Yr<gn.childNodes.length;Yr++)yn(gn.childNodes[Yr]);/^(pre|p)$/i.test(gn.nodeName)&&(kt=!0),ri&&(gt=!0)}else gn.nodeType==3&&_t(gn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(he),he!=Ce;)he=he.nextSibling,kt=!1;return $e}function Mf(re,he,Ce){var be;if(he==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ce],!be)return Gc(re.clipPos(sn(re.display.viewTo-1)),!0);he=null,Ce=0}else for(be=he;;be=be.parentNode){if(!be||be==re.display.lineDiv)return null;if(be.parentNode&&be.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var $e=re.display.view[Oe];if($e.node==be)return am($e,he,Ce)}}function am(re,he,Ce){var be=re.text.firstChild,Oe=!1;if(!he||!Ye(be,he))return Gc(sn(jt(re.line),0),!0);if(he==be&&(Oe=!0,he=be.childNodes[Ce],Ce=0,!he)){var $e=re.rest?mt(re.rest):re.line;return Gc(sn(jt($e),$e.text.length),Oe)}var gt=he.nodeType==3?he:null,Lt=he;for(!gt&&he.childNodes.length==1&&he.firstChild.nodeType==3&&(gt=he.firstChild,Ce&&(Ce=gt.nodeValue.length));Lt.parentNode!=be;)Lt=Lt.parentNode;var kt=re.measure,It=kt.maps;function nn(Er,Rr,ri){for(var Yr=-1;Yr<(It?It.length:0);Yr++)for(var ci=Yr<0?kt.map:It[Yr],Ii=0;Ii<ci.length;Ii+=3){var Zr=ci[Ii+2];if(Zr==Er||Zr==Rr){var $i=jt(Yr<0?re.line:re.rest[Yr]),Xo=ci[Ii]+ri;return(ri<0||Zr!=Er)&&(Xo=ci[Ii+(ri?1:0)]),sn($i,Xo)}}}var _t=nn(gt,Lt,Ce);if(_t)return Gc(_t,Oe);for(var yn=Lt.nextSibling,gn=gt?gt.nodeValue.length-Ce:0;yn;yn=yn.nextSibling){if(_t=nn(yn,yn.firstChild,0),_t)return Gc(sn(_t.line,_t.ch-gn),Oe);gn+=yn.textContent.length}for(var hr=Lt.previousSibling,mr=Ce;hr;hr=hr.previousSibling){if(_t=nn(hr,hr.firstChild,-1),_t)return Gc(sn(_t.line,_t.ch+mr),Oe);mr+=hr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var he=this,Ce=this,be=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),fe&&(Oe.style.width="0px"),Xt(Oe,"input",function(){_e&&de>=9&&he.hasSelection&&(he.hasSelection=null),Ce.poll()}),Xt(Oe,"paste",function(gt){cn(be,gt)||Dp(gt,be)||(be.state.pasteIncoming=+new Date,Ce.fastPoll())});function $e(gt){if(!cn(be,gt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Lt=Ip(be);tc({lineWise:!0,text:Lt.text}),gt.type=="cut"?be.setSelections(Lt.ranges,null,ct):(Ce.prevInput="",Oe.value=Lt.text.join(`
|
|
`),ut(Oe))}else return;gt.type=="cut"&&(be.state.cutIncoming=+new Date)}}Xt(Oe,"cut",$e),Xt(Oe,"copy",$e),Xt(re.scroller,"paste",function(gt){if(!(jo(re,gt)||cn(be,gt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ce.focus();return}var Lt=new Event("paste");Lt.clipboardData=gt.clipboardData,Oe.dispatchEvent(Lt)}}),Xt(re.lineSpace,"selectstart",function(gt){jo(re,gt)||On(gt)}),Xt(Oe,"compositionstart",function(){var gt=be.getCursor("from");Ce.composing&&Ce.composing.range.clear(),Ce.composing={start:gt,range:be.markText(gt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),Xt(Oe,"compositionend",function(){Ce.composing&&(Ce.poll(),Ce.composing.range.clear(),Ce.composing=null)})},Ta.prototype.createField=function(re){this.wrapper=_p(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var re=this.cm,he=re.display,Ce=re.doc,be=au(re);if(re.options.moveInputWithCursor){var Oe=Wi(re,Ce.sel.primary().head,"div"),$e=he.wrapper.getBoundingClientRect(),gt=he.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(he.wrapper.clientHeight-10,Oe.top+gt.top-$e.top)),be.teLeft=Math.max(0,Math.min(he.wrapper.clientWidth-10,Oe.left+gt.left-$e.left))}return be},Ta.prototype.showSelection=function(re){var he=this.cm,Ce=he.display;Te(Ce.cursorDiv,re.cursors),Te(Ce.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ta.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var he=this.cm;if(he.somethingSelected()){this.prevInput="";var Ce=he.getSelection();this.textarea.value=Ce,he.state.focused&&ut(this.textarea),_e&&de>=9&&(this.hasSelection=Ce)}else re||(this.prevInput=this.textarea.value="",_e&&de>=9&&(this.hasSelection=null))}},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||Ke()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ta.prototype.fastPoll=function(){var re=!1,he=this;he.pollingFast=!0;function Ce(){var be=he.poll();!be&&!re?(re=!0,he.polling.set(60,Ce)):(he.pollingFast=!1,he.slowPoll())}he.polling.set(20,Ce)},Ta.prototype.poll=function(){var re=this,he=this.cm,Ce=this.textarea,be=this.prevInput;if(this.contextMenuPending||!he.state.focused||qe(Ce)&&!be&&!this.composing||he.isReadOnly()||he.options.disableInput||he.state.keySeq)return!1;var Oe=Ce.value;if(Oe==be&&!he.somethingSelected())return!1;if(_e&&de>=9&&this.hasSelection===Oe||se&&/[\uf700-\uf7ff]/.test(Oe))return he.display.input.reset(),!1;if(he.doc.sel==he.display.selForContextMenu){var $e=Oe.charCodeAt(0);if($e==8203&&!be&&(be="\u200B"),$e==8666)return this.reset(),this.cm.execCommand("undo")}for(var gt=0,Lt=Math.min(be.length,Oe.length);gt<Lt&&be.charCodeAt(gt)==Oe.charCodeAt(gt);)++gt;return So(he,function(){Tf(he,Oe.slice(gt),be.length-gt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
|
|
`)>-1?Ce.value=re.prevInput="":re.prevInput=Oe,re.composing&&(re.composing.range.clear(),re.composing.range=he.markText(re.composing.start,he.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){_e&&de>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(re){var he=this,Ce=he.cm,be=Ce.display,Oe=he.textarea;he.contextMenuPending&&he.contextMenuPending();var $e=Ga(Ce,re),gt=be.scroller.scrollTop;if(!$e||Se)return;var Lt=Ce.options.resetSelectionOnContextMenu;Lt&&Ce.doc.sel.contains($e)==-1&&Da(Ce,ps)(Ce.doc,Ru($e),ct);var kt=Oe.style.cssText,It=he.wrapper.style.cssText,nn=he.wrapper.offsetParent.getBoundingClientRect();he.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(re.clientY-nn.top-5)+"px; left: "+(re.clientX-nn.left-5)+`px;
|
|
z-index: 1000; background: `+(_e?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var _t;ve&&(_t=window.scrollY),be.input.focus(),ve&&window.scrollTo(null,_t),be.input.reset(),Ce.somethingSelected()||(Oe.value=he.prevInput=" "),he.contextMenuPending=gn,be.selForContextMenu=Ce.doc.sel,clearTimeout(be.detectingSelectAll);function yn(){if(Oe.selectionStart!=null){var mr=Ce.somethingSelected(),Er="\u200B"+(mr?Oe.value:"");Oe.value="\u21DA",Oe.value=Er,he.prevInput=mr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=Er.length,be.selForContextMenu=Ce.doc.sel}}function gn(){if(he.contextMenuPending==gn&&(he.contextMenuPending=!1,he.wrapper.style.cssText=It,Oe.style.cssText=kt,_e&&de<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=gt),Oe.selectionStart!=null)){(!_e||_e&&de<9)&&yn();var mr=0,Er=function(){be.selForContextMenu==Ce.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&he.prevInput=="\u200B"?Da(Ce,Sa)(Ce):mr++<10?be.detectingSelectAll=setTimeout(Er,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(Er,200)}}if(_e&&de>=9&&yn(),xe){$r(re);var hr=function(){un(window,"mouseup",hr),setTimeout(gn,20)};Xt(window,"mouseup",hr)}else setTimeout(gn,50)},Ta.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ta.prototype.setUneditable=function(){},Ta.prototype.needsContentAttribute=!1;function sm(re,he){if(he=he?St(he):{},he.value=re.value,!he.tabindex&&re.tabIndex&&(he.tabindex=re.tabIndex),!he.placeholder&&re.placeholder&&(he.placeholder=re.placeholder),he.autofocus==null){var Ce=Ke();he.autofocus=Ce==re||re.getAttribute("autofocus")!=null&&Ce==document.body}function be(){re.value=Lt.getValue()}var Oe;if(re.form&&(Xt(re.form,"submit",be),!he.leaveSubmitMethodAlone)){var $e=re.form;Oe=$e.submit;try{var gt=$e.submit=function(){be(),$e.submit=Oe,$e.submit(),$e.submit=gt}}catch(kt){}}he.finishInit=function(kt){kt.save=be,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,be(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(un(re.form,"submit",be),!he.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Lt=vo(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},he);return Lt}function Hc(re){re.off=un,re.on=Xt,re.wheelEventPixels=ol,re.Doc=as,re.splitLines=Li,re.countColumn=Qe,re.findColumn=Mt,re.isWordChar=Xe,re.Pass=bt,re.signal=on,re.Line=ui,re.changeEnd=hh,re.scrollbarModel=lu,re.Pos=sn,re.cmpPos=Dn,re.modes=Pr,re.mimeModes=kr,re.resolveMode=nr,re.getMode=Vt,re.modeExtensions=Kt,re.extendMode=zt,re.copyState=Mn,re.startState=vr,re.innerMode=Vn,re.commands=ph,re.keyMap=Ws,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=yl,re.normalizeKeyMap=wp,re.StringStream=vn,re.SharedTextMarker=cu,re.TextMarker=Yt,re.LineWidget=Gu,re.e_preventDefault=On,re.e_stopPropagation=_r,re.e_stop=$r,re.addClass=Ve,re.contains=Ye,re.rmClass=De,re.keyNames=fu}im(vo),mh(vo);var Uu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in as.prototype)as.prototype.hasOwnProperty(Nf)&&wt(Uu,Nf)<0&&(vo.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(as.prototype[Nf]));return kn(as),vo.inputStyles={textarea:Ta,contenteditable:Do},vo.defineMode=function(re){!vo.defaults.mode&&re!="null"&&(vo.defaults.mode=re),Hi.apply(this,arguments)},vo.defineMIME=gr,vo.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),vo.defineMIME("text/plain","null"),vo.defineExtension=function(re,he){vo.prototype[re]=he},vo.defineDocExtension=function(re,he){as.prototype[re]=he},vo.fromTextArea=sm,Hc(vo),vo.version="5.58.2",vo})},25419:function(Rn,An,pt){(function(st){st(pt(89780),pt(15525),pt(98101))})(function(st){"use strict";st.defineMode("markdown",function(Ut,oe){var Ue=st.getMode(Ut,"text/html"),_e=Ue.name=="null";function de(Qe){if(st.findModeByName){var rt=st.findModeByName(Qe);rt&&(Qe=rt.mime||rt.mimes[0])}var wt=st.getMode(Ut,Qe);return wt.name=="null"?null:wt}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var ve={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ee in ve)ve.hasOwnProperty(Ee)&&oe.tokenTypeOverrides[Ee]&&(ve[Ee]=oe.tokenTypeOverrides[Ee]);var ke=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ae=/^\[(x| )\](?=\s)/i,me=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Pe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,fe=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,te=/^\s*\[[^\]]+?\]:.*$/,se=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ie=" ";function le(Qe,rt,wt){return rt.f=rt.inline=wt,wt(Qe,rt)}function ce(Qe,rt,wt){return rt.f=rt.block=wt,wt(Qe,rt)}function pe(Qe){return!Qe||!/\S/.test(Qe.string)}function xe(Qe){if(Qe.linkTitle=!1,Qe.linkHref=!1,Qe.linkText=!1,Qe.em=!1,Qe.strong=!1,Qe.strikethrough=!1,Qe.quote=0,Qe.indentedCode=!1,Qe.f==De){var rt=_e;if(!rt){var wt=st.innerMode(Ue,Qe.htmlState);rt=wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText}rt&&(Qe.f=Be,Qe.block=je,Qe.htmlState=null)}return Qe.trailingSpace=0,Qe.trailingSpaceNewLine=!1,Qe.prevLine=Qe.thisLine,Qe.thisLine={stream:null},null}function je(Qe,rt){var wt=Qe.column()===rt.indentation,Ct=pe(rt.prevLine.stream),bt=rt.indentedCode,ct=rt.prevLine.hr,xt=rt.list!==!1,dt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var Mt=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,xt)){for(rt.list=null;Mt<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=Mt-rt.listStack[rt.listStack.length-1])}var yt=!Ct&&!ct&&!rt.prevLine.header&&(!xt||!bt)&&!rt.prevLine.fencedCodeEnd,Ft=(rt.list===!1||ct||Ct)&&rt.indentation<=dt&&Qe.match(ke),mt=null;if(rt.indentationDiff>=4&&(bt||rt.prevLine.fencedCodeEnd||rt.prevLine.header||Ct))return Qe.skipToEnd(),rt.indentedCode=!0,ve.code;if(Qe.eatSpace())return null;if(wt&&rt.indentation<=dt&&(mt=Qe.match(me))&&mt[1].length<=6)return rt.quote=0,rt.header=mt[1].length,rt.thisLine.header=!0,oe.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,Te(rt);if(rt.indentation<=dt&&Qe.eat(">"))return rt.quote=wt?1:rt.quote+1,oe.highlightFormatting&&(rt.formatting="quote"),Qe.eatSpace(),Te(rt);if(!Ft&&!rt.setext&&wt&&rt.indentation<=dt&&(mt=Qe.match(Se))){var vt=mt[1]?"ol":"ul";return rt.indentation=Mt+Qe.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,oe.taskLists&&Qe.match(Ae,!1)&&(rt.taskList=!0),rt.f=rt.inline,oe.highlightFormatting&&(rt.formatting=["list","list-"+vt]),Te(rt)}else{if(wt&&rt.indentation<=dt&&(mt=Qe.match(z,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(mt[1]+"+ *$"),rt.localMode=oe.fencedCodeBlockHighlighting&&de(mt[2]||oe.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=st.startState(rt.localMode)),rt.f=rt.block=Fe,oe.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,Te(rt);if(rt.setext||(!yt||!xt)&&!rt.quote&&rt.list===!1&&!rt.code&&!Ft&&!te.test(Qe.string)&&(mt=Qe.lookAhead(1))&&(mt=mt.match(Pe)))return rt.setext?(rt.header=rt.setext,rt.setext=0,Qe.skipToEnd(),oe.highlightFormatting&&(rt.formatting="header")):(rt.header=mt[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,Te(rt);if(Ft)return Qe.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,ve.hr;if(Qe.peek()==="[")return le(Qe,rt,ot)}return le(Qe,rt,rt.inline)}function De(Qe,rt){var wt=Ue.token(Qe,rt.htmlState);if(!_e){var Ct=st.innerMode(Ue,rt.htmlState);(Ct.mode.name=="xml"&&Ct.state.tagStart===null&&!Ct.state.context&&Ct.state.tokenize.isInText||rt.md_inside&&Qe.current().indexOf(">")>-1)&&(rt.f=Be,rt.block=je,rt.htmlState=null)}return wt}function Fe(Qe,rt){var wt=rt.listStack[rt.listStack.length-1]||0,Ct=rt.indentation<wt,bt=wt+3;if(rt.fencedEndRE&&rt.indentation<=bt&&(Ct||Qe.match(rt.fencedEndRE))){oe.highlightFormatting&&(rt.formatting="code-block");var ct;return Ct||(ct=Te(rt)),rt.localMode=rt.localState=null,rt.block=je,rt.f=Be,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,Ct?ce(Qe,rt,rt.block):ct}else return rt.localMode?rt.localMode.token(Qe,rt.localState):(Qe.skipToEnd(),ve.code)}function Te(Qe){var rt=[];if(Qe.formatting){rt.push(ve.formatting),typeof Qe.formatting=="string"&&(Qe.formatting=[Qe.formatting]);for(var wt=0;wt<Qe.formatting.length;wt++)rt.push(ve.formatting+"-"+Qe.formatting[wt]),Qe.formatting[wt]==="header"&&rt.push(ve.formatting+"-"+Qe.formatting[wt]+"-"+Qe.header),Qe.formatting[wt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Qe.quote?rt.push(ve.formatting+"-"+Qe.formatting[wt]+"-"+Qe.quote):rt.push("error"))}if(Qe.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if(Qe.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if(Qe.linkHref?rt.push(ve.linkHref,"url"):(Qe.strong&&rt.push(ve.strong),Qe.em&&rt.push(ve.em),Qe.strikethrough&&rt.push(ve.strikethrough),Qe.emoji&&rt.push(ve.emoji),Qe.linkText&&rt.push(ve.linkText),Qe.code&&rt.push(ve.code),Qe.image&&rt.push(ve.image),Qe.imageAltText&&rt.push(ve.imageAltText,"link"),Qe.imageMarker&&rt.push(ve.imageMarker)),Qe.header&&rt.push(ve.header,ve.header+"-"+Qe.header),Qe.quote&&(rt.push(ve.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Qe.quote?rt.push(ve.quote+"-"+Qe.quote):rt.push(ve.quote+"-"+oe.maxBlockquoteDepth)),Qe.list!==!1){var Ct=(Qe.listStack.length-1)%3;Ct?Ct===1?rt.push(ve.list2):rt.push(ve.list3):rt.push(ve.list1)}return Qe.trailingSpaceNewLine?rt.push("trailing-space-new-line"):Qe.trailingSpace&&rt.push("trailing-space-"+(Qe.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Me(Qe,rt){if(Qe.match(fe,!0))return Te(rt)}function Be(Qe,rt){var wt=rt.text(Qe,rt);if(typeof wt!="undefined")return wt;if(rt.list)return rt.list=null,Te(rt);if(rt.taskList){var Ct=Qe.match(Ae,!0)[1]===" ";return Ct?rt.taskOpen=!0:rt.taskClosed=!0,oe.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,Te(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&Qe.match(/^#+$/,!0))return oe.highlightFormatting&&(rt.formatting="header"),Te(rt);var bt=Qe.next();if(rt.linkTitle){rt.linkTitle=!1;var ct=bt;bt==="("&&(ct=")"),ct=(ct+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var xt="^\\s*(?:[^"+ct+"\\\\]+|\\\\\\\\|\\\\.)"+ct;if(Qe.match(new RegExp(xt),!0))return ve.linkHref}if(bt==="`"){var dt=rt.formatting;oe.highlightFormatting&&(rt.formatting="code"),Qe.eatWhile("`");var Mt=Qe.current().length;if(rt.code==0&&(!rt.quote||Mt==1))return rt.code=Mt,Te(rt);if(Mt==rt.code){var yt=Te(rt);return rt.code=0,yt}else return rt.formatting=dt,Te(rt)}else if(rt.code)return Te(rt);if(bt==="\\"&&(Qe.next(),oe.highlightFormatting)){var Ft=Te(rt),mt=ve.formatting+"-escape";return Ft?Ft+" "+mt:mt}if(bt==="!"&&Qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(bt==="["&&rt.imageMarker&&Qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,oe.highlightFormatting&&(rt.formatting="image"),Te(rt);if(bt==="]"&&rt.imageAltText){oe.highlightFormatting&&(rt.formatting="image");var Ft=Te(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=Ye,Ft}if(bt==="["&&!rt.image)return rt.linkText&&Qe.match(/^.*?\]/)||(rt.linkText=!0,oe.highlightFormatting&&(rt.formatting="link")),Te(rt);if(bt==="]"&&rt.linkText){oe.highlightFormatting&&(rt.formatting="link");var Ft=Te(rt);return rt.linkText=!1,rt.inline=rt.f=Qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Be,Ft}if(bt==="<"&&Qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,oe.highlightFormatting&&(rt.formatting="link");var Ft=Te(rt);return Ft?Ft+=" ":Ft="",Ft+ve.linkInline}if(bt==="<"&&Qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=Ge,oe.highlightFormatting&&(rt.formatting="link");var Ft=Te(rt);return Ft?Ft+=" ":Ft="",Ft+ve.linkEmail}if(oe.xml&&bt==="<"&&Qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var vt=Qe.string.indexOf(">",Qe.pos);if(vt!=-1){var tt=Qe.string.substring(Qe.start,vt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(rt.md_inside=!0)}return Qe.backUp(1),rt.htmlState=st.startState(Ue),ce(Qe,rt,De)}if(oe.xml&&bt==="<"&&Qe.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(bt==="*"||bt==="_"){for(var He=1,we=Qe.pos==1?" ":Qe.string.charAt(Qe.pos-2);He<3&&Qe.eat(bt);)He++;var Ne=Qe.peek()||" ",Xe=!/\s/.test(Ne)&&(!se.test(Ne)||/\s/.test(we)||se.test(we)),nt=!/\s/.test(we)&&(!se.test(we)||/\s/.test(Ne)||se.test(Ne)),Ie=null,Re=null;if(He%2&&(!rt.em&&Xe&&(bt==="*"||!nt||se.test(we))?Ie=!0:rt.em==bt&&nt&&(bt==="*"||!Xe||se.test(Ne))&&(Ie=!1)),He>1&&(!rt.strong&&Xe&&(bt==="*"||!nt||se.test(we))?Re=!0:rt.strong==bt&&nt&&(bt==="*"||!Xe||se.test(Ne))&&(Re=!1)),Re!=null||Ie!=null){oe.highlightFormatting&&(rt.formatting=Ie==null?"strong":Re==null?"em":"strong em"),Ie===!0&&(rt.em=bt),Re===!0&&(rt.strong=bt);var yt=Te(rt);return Ie===!1&&(rt.em=!1),Re===!1&&(rt.strong=!1),yt}}else if(bt===" "&&(Qe.eat("*")||Qe.eat("_"))){if(Qe.peek()===" ")return Te(rt);Qe.backUp(1)}if(oe.strikethrough){if(bt==="~"&&Qe.eatWhile(bt)){if(rt.strikethrough){oe.highlightFormatting&&(rt.formatting="strikethrough");var yt=Te(rt);return rt.strikethrough=!1,yt}else if(Qe.match(/^[^\s]/,!1))return rt.strikethrough=!0,oe.highlightFormatting&&(rt.formatting="strikethrough"),Te(rt)}else if(bt===" "&&Qe.match(/^~~/,!0)){if(Qe.peek()===" ")return Te(rt);Qe.backUp(2)}}if(oe.emoji&&bt===":"&&Qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,oe.highlightFormatting&&(rt.formatting="emoji");var Ze=Te(rt);return rt.emoji=!1,Ze}return bt===" "&&(Qe.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),Te(rt)}function Ge(Qe,rt){var wt=Qe.next();if(wt===">"){rt.f=rt.inline=Be,oe.highlightFormatting&&(rt.formatting="link");var Ct=Te(rt);return Ct?Ct+=" ":Ct="",Ct+ve.linkInline}return Qe.match(/^[^>]+/,!0),ve.linkInline}function Ye(Qe,rt){if(Qe.eatSpace())return null;var wt=Qe.next();return wt==="("||wt==="["?(rt.f=rt.inline=Ve(wt==="("?")":"]"),oe.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,Te(rt)):"error"}var Ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ve(Qe){return function(rt,wt){var Ct=rt.next();if(Ct===Qe){wt.f=wt.inline=Be,oe.highlightFormatting&&(wt.formatting="link-string");var bt=Te(wt);return wt.linkHref=!1,bt}return rt.match(Ke[Qe]),wt.linkHref=!0,Te(wt)}}function ot(Qe,rt){return Qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=ut,Qe.next(),oe.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,Te(rt)):le(Qe,rt,Be)}function ut(Qe,rt){if(Qe.match(/^\]:/,!0)){rt.f=rt.inline=ft,oe.highlightFormatting&&(rt.formatting="link");var wt=Te(rt);return rt.linkText=!1,wt}return Qe.match(/^([^\]\\]|\\.)+/,!0),ve.linkText}function ft(Qe,rt){return Qe.eatSpace()?null:(Qe.match(/^[^\s]+/,!0),Qe.peek()===void 0?rt.linkTitle=!0:Qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=Be,ve.linkHref+" url")}var St={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Be,text:Me,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(Qe){return{f:Qe.f,prevLine:Qe.prevLine,thisLine:Qe.thisLine,block:Qe.block,htmlState:Qe.htmlState&&st.copyState(Ue,Qe.htmlState),indentation:Qe.indentation,localMode:Qe.localMode,localState:Qe.localMode?st.copyState(Qe.localMode,Qe.localState):null,inline:Qe.inline,text:Qe.text,formatting:!1,linkText:Qe.linkText,linkTitle:Qe.linkTitle,linkHref:Qe.linkHref,code:Qe.code,em:Qe.em,strong:Qe.strong,strikethrough:Qe.strikethrough,emoji:Qe.emoji,header:Qe.header,setext:Qe.setext,hr:Qe.hr,taskList:Qe.taskList,list:Qe.list,listStack:Qe.listStack.slice(0),quote:Qe.quote,indentedCode:Qe.indentedCode,trailingSpace:Qe.trailingSpace,trailingSpaceNewLine:Qe.trailingSpaceNewLine,md_inside:Qe.md_inside,fencedEndRE:Qe.fencedEndRE}},token:function(Qe,rt){if(rt.formatting=!1,Qe!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,Qe.match(/^\s*$/,!0))return xe(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:Qe},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=De)){var wt=Qe.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(rt.indentation=wt,rt.indentationDiff=null,wt>0)return null}}return rt.f(Qe,rt)},innerMode:function(Qe){return Qe.block==De?{state:Qe.htmlState,mode:Ue}:Qe.localState?{state:Qe.localState,mode:Qe.localMode}:{state:Qe,mode:St}},indent:function(Qe,rt,wt){return Qe.block==De&&Ue.indent?Ue.indent(Qe.htmlState,rt,wt):Qe.localState&&Qe.localMode.indent?Qe.localMode.indent(Qe.localState,rt,wt):st.Pass},blankLine:xe,getType:Te,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return St},"xml"),st.defineMIME("text/markdown","markdown"),st.defineMIME("text/x-markdown","markdown")})},98101:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){"use strict";st.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 Ut=0;Ut<st.modeInfo.length;Ut++){var oe=st.modeInfo[Ut];oe.mimes&&(oe.mime=oe.mimes[0])}st.findModeByMIME=function(Ue){Ue=Ue.toLowerCase();for(var _e=0;_e<st.modeInfo.length;_e++){var de=st.modeInfo[_e];if(de.mime==Ue)return de;if(de.mimes){for(var ve=0;ve<de.mimes.length;ve++)if(de.mimes[ve]==Ue)return de}}if(/\+xml$/.test(Ue))return st.findModeByMIME("application/xml");if(/\+json$/.test(Ue))return st.findModeByMIME("application/json")},st.findModeByExtension=function(Ue){Ue=Ue.toLowerCase();for(var _e=0;_e<st.modeInfo.length;_e++){var de=st.modeInfo[_e];if(de.ext){for(var ve=0;ve<de.ext.length;ve++)if(de.ext[ve]==Ue)return de}}},st.findModeByFileName=function(Ue){for(var _e=0;_e<st.modeInfo.length;_e++){var de=st.modeInfo[_e];if(de.file&&de.file.test(Ue))return de}var ve=Ue.lastIndexOf("."),Ee=ve>-1&&Ue.substring(ve+1,Ue.length);if(Ee)return st.findModeByExtension(Ee)},st.findModeByName=function(Ue){Ue=Ue.toLowerCase();for(var _e=0;_e<st.modeInfo.length;_e++){var de=st.modeInfo[_e];if(de.name.toLowerCase()==Ue)return de;if(de.alias){for(var ve=0;ve<de.alias.length;ve++)if(de.alias[ve].toLowerCase()==Ue)return de}}}})},67549:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){"use strict";st.defineMode("stex",function(Ut,oe){"use strict";function Ue(fe,z){fe.cmdState.push(z)}function _e(fe){return fe.cmdState.length>0?fe.cmdState[fe.cmdState.length-1]:null}function de(fe){var z=fe.cmdState.pop();z&&z.closeBracket()}function ve(fe){for(var z=fe.cmdState,te=z.length-1;te>=0;te--){var se=z[te];if(se.name!="DEFAULT")return se}return{styleIdentifier:function(){return null}}}function Ee(fe,z,te){return function(){this.name=fe,this.bracketNo=0,this.style=z,this.styles=te,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ke={};ke.importmodule=Ee("importmodule","tag",["string","builtin"]),ke.documentclass=Ee("documentclass","tag",["","atom"]),ke.usepackage=Ee("usepackage","tag",["atom"]),ke.begin=Ee("begin","tag",["atom"]),ke.end=Ee("end","tag",["atom"]),ke.label=Ee("label","tag",["atom"]),ke.ref=Ee("ref","tag",["atom"]),ke.eqref=Ee("eqref","tag",["atom"]),ke.cite=Ee("cite","tag",["atom"]),ke.bibitem=Ee("bibitem","tag",["atom"]),ke.Bibitem=Ee("Bibitem","tag",["atom"]),ke.RBibitem=Ee("RBibitem","tag",["atom"]),ke.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(fe,z){fe.f=z}function Ae(fe,z){var te;if(fe.match(/^\\[a-zA-Z@]+/)){var se=fe.current().slice(1);return te=ke.hasOwnProperty(se)?ke[se]:ke.DEFAULT,te=new te,Ue(z,te),Se(z,Pe),te.style}if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/\\]/))return"tag";if(fe.match("\\["))return Se(z,function(le,ce){return me(le,ce,"\\]")}),"keyword";if(fe.match("\\("))return Se(z,function(le,ce){return me(le,ce,"\\)")}),"keyword";if(fe.match("$$"))return Se(z,function(le,ce){return me(le,ce,"$$")}),"keyword";if(fe.match("$"))return Se(z,function(le,ce){return me(le,ce,"$")}),"keyword";var ie=fe.next();if(ie=="%")return fe.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(te=_e(z),te)te.closeBracket(ie),Se(z,Pe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(te=ke.DEFAULT,te=new te,Ue(z,te),"bracket"):/\d/.test(ie)?(fe.eatWhile(/[\w.%]/),"atom"):(fe.eatWhile(/[\w\-_]/),te=ve(z),te.name=="begin"&&(te.argument=fe.current()),te.styleIdentifier())}function me(fe,z,te){if(fe.eatSpace())return null;if(te&&fe.match(te))return Se(z,Ae),"keyword";if(fe.match(/^\\[a-zA-Z@]+/))return"tag";if(fe.match(/^[a-zA-Z]+/))return"variable-2";if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/]/)||fe.match(/^[\^_&]/))return"tag";if(fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var se=fe.next();return se=="{"||se=="}"||se=="["||se=="]"||se=="("||se==")"?"bracket":se=="%"?(fe.skipToEnd(),"comment"):"error"}function Pe(fe,z){var te=fe.peek(),se;return te=="{"||te=="["?(se=_e(z),se.openBracket(te),fe.eat(te),Se(z,Ae),"bracket"):/[ \t\r]/.test(te)?(fe.eat(te),null):(Se(z,Ae),de(z),Ae(fe,z))}return{startState:function(){var fe=oe.inMathMode?function(z,te){return me(z,te)}:Ae;return{cmdState:[],f:fe}},copyState:function(fe){return{cmdState:fe.cmdState.slice(),f:fe.f}},token:function(fe,z){return z.f(fe,z)},blankLine:function(fe){fe.f=Ae,fe.cmdState.length=0},lineComment:"%"}}),st.defineMIME("text/x-stex","stex"),st.defineMIME("text/x-latex","stex")})},15525:function(Rn,An,pt){(function(st){st(pt(89780))})(function(st){"use strict";var Ut={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},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};st.defineMode("xml",function(Ue,_e){var de=Ue.indentUnit,ve={},Ee=_e.htmlMode?Ut:oe;for(var ke in Ee)ve[ke]=Ee[ke];for(var ke in _e)ve[ke]=_e[ke];var Se,Ae;function me(Ge,Ye){function Ke(ut){return Ye.tokenize=ut,ut(Ge,Ye)}var Ve=Ge.next();if(Ve=="<")return Ge.eat("!")?Ge.eat("[")?Ge.match("CDATA[")?Ke(z("atom","]]>")):null:Ge.match("--")?Ke(z("comment","-->")):Ge.match("DOCTYPE",!0,!0)?(Ge.eatWhile(/[\w\._\-]/),Ke(te(1))):null:Ge.eat("?")?(Ge.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=Ge.eat("/")?"closeTag":"openTag",Ye.tokenize=Pe,"tag bracket");if(Ve=="&"){var ot;return Ge.eat("#")?Ge.eat("x")?ot=Ge.eatWhile(/[a-fA-F\d]/)&&Ge.eat(";"):ot=Ge.eatWhile(/[\d]/)&&Ge.eat(";"):ot=Ge.eatWhile(/[\w\.\-:]/)&&Ge.eat(";"),ot?"atom":"error"}else return Ge.eatWhile(/[^&<]/),null}me.isInText=!0;function Pe(Ge,Ye){var Ke=Ge.next();if(Ke==">"||Ke=="/"&&Ge.eat(">"))return Ye.tokenize=me,Se=Ke==">"?"endTag":"selfcloseTag","tag bracket";if(Ke=="=")return Se="equals",null;if(Ke=="<"){Ye.tokenize=me,Ye.state=ce,Ye.tagName=Ye.tagStart=null;var Ve=Ye.tokenize(Ge,Ye);return Ve?Ve+" tag error":"tag error"}else return/[\'\"]/.test(Ke)?(Ye.tokenize=fe(Ke),Ye.stringStartCol=Ge.column(),Ye.tokenize(Ge,Ye)):(Ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(Ge){var Ye=function(Ke,Ve){for(;!Ke.eol();)if(Ke.next()==Ge){Ve.tokenize=Pe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(Ge,Ye){return function(Ke,Ve){for(;!Ke.eol();){if(Ke.match(Ye)){Ve.tokenize=me;break}Ke.next()}return Ge}}function te(Ge){return function(Ye,Ke){for(var Ve;(Ve=Ye.next())!=null;){if(Ve=="<")return Ke.tokenize=te(Ge+1),Ke.tokenize(Ye,Ke);if(Ve==">")if(Ge==1){Ke.tokenize=me;break}else return Ke.tokenize=te(Ge-1),Ke.tokenize(Ye,Ke)}return"meta"}}function se(Ge,Ye,Ke){this.prev=Ge.context,this.tagName=Ye,this.indent=Ge.indented,this.startOfLine=Ke,(ve.doNotIndent.hasOwnProperty(Ye)||Ge.context&&Ge.context.noIndent)&&(this.noIndent=!0)}function ie(Ge){Ge.context&&(Ge.context=Ge.context.prev)}function le(Ge,Ye){for(var Ke;;){if(!Ge.context||(Ke=Ge.context.tagName,!ve.contextGrabbers.hasOwnProperty(Ke)||!ve.contextGrabbers[Ke].hasOwnProperty(Ye)))return;ie(Ge)}}function ce(Ge,Ye,Ke){return Ge=="openTag"?(Ke.tagStart=Ye.column(),pe):Ge=="closeTag"?xe:ce}function pe(Ge,Ye,Ke){return Ge=="word"?(Ke.tagName=Ye.current(),Ae="tag",Fe):ve.allowMissingTagName&&Ge=="endTag"?(Ae="tag bracket",Fe(Ge,Ye,Ke)):(Ae="error",pe)}function xe(Ge,Ye,Ke){if(Ge=="word"){var Ve=Ye.current();return Ke.context&&Ke.context.tagName!=Ve&&ve.implicitlyClosed.hasOwnProperty(Ke.context.tagName)&&ie(Ke),Ke.context&&Ke.context.tagName==Ve||ve.matchClosing===!1?(Ae="tag",je):(Ae="tag error",De)}else return ve.allowMissingTagName&&Ge=="endTag"?(Ae="tag bracket",je(Ge,Ye,Ke)):(Ae="error",De)}function je(Ge,Ye,Ke){return Ge!="endTag"?(Ae="error",je):(ie(Ke),ce)}function De(Ge,Ye,Ke){return Ae="error",je(Ge,Ye,Ke)}function Fe(Ge,Ye,Ke){if(Ge=="word")return Ae="attribute",Te;if(Ge=="endTag"||Ge=="selfcloseTag"){var Ve=Ke.tagName,ot=Ke.tagStart;return Ke.tagName=Ke.tagStart=null,Ge=="selfcloseTag"||ve.autoSelfClosers.hasOwnProperty(Ve)?le(Ke,Ve):(le(Ke,Ve),Ke.context=new se(Ke,Ve,ot==Ke.indented)),ce}return Ae="error",Fe}function Te(Ge,Ye,Ke){return Ge=="equals"?Me:(ve.allowMissing||(Ae="error"),Fe(Ge,Ye,Ke))}function Me(Ge,Ye,Ke){return Ge=="string"?Be:Ge=="word"&&ve.allowUnquoted?(Ae="string",Fe):(Ae="error",Fe(Ge,Ye,Ke))}function Be(Ge,Ye,Ke){return Ge=="string"?Be:Fe(Ge,Ye,Ke)}return{startState:function(Ge){var Ye={tokenize:me,state:ce,indented:Ge||0,tagName:null,tagStart:null,context:null};return Ge!=null&&(Ye.baseIndent=Ge),Ye},token:function(Ge,Ye){if(!Ye.tagName&&Ge.sol()&&(Ye.indented=Ge.indentation()),Ge.eatSpace())return null;Se=null;var Ke=Ye.tokenize(Ge,Ye);return(Ke||Se)&&Ke!="comment"&&(Ae=null,Ye.state=Ye.state(Se||Ke,Ge,Ye),Ae&&(Ke=Ae=="error"?Ke+" error":Ae)),Ke},indent:function(Ge,Ye,Ke){var Ve=Ge.context;if(Ge.tokenize.isInAttribute)return Ge.tagStart==Ge.indented?Ge.stringStartCol+1:Ge.indented+de;if(Ve&&Ve.noIndent)return st.Pass;if(Ge.tokenize!=Pe&&Ge.tokenize!=me)return Ke?Ke.match(/^(\s*)/)[0].length:0;if(Ge.tagName)return ve.multilineTagIndentPastTag!==!1?Ge.tagStart+Ge.tagName.length+2:Ge.tagStart+de*(ve.multilineTagIndentFactor||1);if(ve.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Ve;)if(Ve.tagName==ot[2]){Ve=Ve.prev;break}else if(ve.implicitlyClosed.hasOwnProperty(Ve.tagName))Ve=Ve.prev;else break;else if(ot)for(;Ve;){var ut=ve.contextGrabbers[Ve.tagName];if(ut&&ut.hasOwnProperty(ot[2]))Ve=Ve.prev;else break}for(;Ve&&Ve.prev&&!Ve.startOfLine;)Ve=Ve.prev;return Ve?Ve.indent+de:Ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ve.htmlMode?"html":"xml",helperType:ve.htmlMode?"html":"xml",skipAttribute:function(Ge){Ge.state==Me&&(Ge.state=Fe)},xmlCurrentTag:function(Ge){return Ge.tagName?{name:Ge.tagName,close:Ge.type=="closeTag"}:null},xmlCurrentContext:function(Ge){for(var Ye=[],Ke=Ge.context;Ke;Ke=Ke.prev)Ke.tagName&&Ye.push(Ke.tagName);return Ye.reverse()}}}),st.defineMIME("text/xml","xml"),st.defineMIME("application/xml","xml"),st.mimeModes.hasOwnProperty("text/html")||st.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Rn,An,pt){"use strict";pt.d(An,{$u:function(){return ke},BD:function(){return He},E9:function(){return Ee},FF:function(){return li},FJ:function(){return ce},Hn:function(){return le},KX:function(){return xe},NB:function(){return at},S0:function(){return mt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Et},YI:function(){return vt},ZA:function(){return oe},Zt:function(){return Ae},al:function(){return Ie},bn:function(){return nt},bx:function(){return we},g2:function(){return tt},h1:function(){return Me},hD:function(){return kn},l4:function(){return de},rU:function(){return Dt},s_:function(){return Ne},uz:function(){return ht},z6:function(){return me}}),Rn=pt.hmd(Rn),function(){var qe;function Mr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Lr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Mr(a)}}function br(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Pr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},kr;if(typeof Object.setPrototypeOf=="function")kr=Object.setPrototypeOf;else{var Hi;e:{var gr={a:!0},nr={};try{nr.__proto__=gr,Hi=nr.a;break e}catch(a){}Hi=!1}kr=Hi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Vt=kr;function Kt(a,y){if(a.prototype=Pr(y.prototype),a.prototype.constructor=a,Vt)Vt(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var zt=typeof pt.g!="undefined"&&pt.g!=null?pt.g:self,Mn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},Vn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function vr(a,y){if(y){var x=zt;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&Vn(x,a,{writable:!0,value:y})}}vr("Object.assign",function(a){return a||Mn}),vr("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var vn=typeof globalThis=="object"&&globalThis||typeof pt.g=="object"&&pt.g.global===pt.g&&pt.g||typeof self=="object"&&self.self===self&&self||{};vn.requestAnimationFrame===void 0&&(vn.setImmediate===void 0?vn.requestAnimationFrame=function(a){vn.setTimeout(a,0)}:vn.requestAnimationFrame=vn.setImmediate);function Wn(){}function Ht(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&vn.clearTimeout(x),x=Jt(function(){x=-1,a.apply(b,E)},y)}}function Jt(a,y){return vn.setTimeout(a,y)}function Xn(a){return vn.document.createElement(a)}function jt(a){throw Error(a)}function ln(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),jt(a)}function Nn(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),jt(x+" is not in the range "+y+": "+a)}function Yn(a){vn.console&&vn.console.log(a)}function sn(a){return typeof a=="object"&&a!==null}function Dn(a){return Array.isArray(a)||vn.NodeList&&a instanceof vn.NodeList||vn.HTMLCollection&&a instanceof vn.HTMLCollection}function Jn(a){return Array.prototype.slice.call(a)}function jn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):jt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Bn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):jt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function er(){var a=ki.pop();return a===void 0?[]:a}function _n(a){a.length=0,ki.push(a)}function sr(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(sn(a)&&a.constructor)return sr(a.constructor);return typeof a}function Fr(a){var y=a;return sn(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 zr(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 Dr(a,y,x){Object.defineProperty(Ji.prototype,a,{get:y,set:x})}function pn(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 b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var ee="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,ee+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return ee.indexOf("GoJS 2.1 evaluation")>-1||ee.indexOf("\xA9 1998-2021 Northwoods Software")>-1||ee.indexOf("Not for distribution or production use")>-1||ee.indexOf("gojs.net")>-1?"":ee}var Ni=vn.navigator!==void 0&&0<vn.navigator.userAgent.indexOf("Trident/7"),ni=vn.navigator!==void 0&&vn.navigator.platform!==void 0&&vn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ki=[];Object.freeze([]),Wn.className="Util",Wn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Wn.adym="gojs.net",Wn.vfo="28e645fdb266",Wn.className="Util";function hn(a,y,x){cr(this),this.j=a,this.xa=y,this.o=x}hn.prototype.toString=function(){return"EnumValue."+this.xa};function qn(a,y){return y==null||y===""?null:a[y]}zt.Object.defineProperties(hn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),hn.className="EnumValue";function rr(){this.ew=[]}rr.prototype.toString=function(){return this.ew.join("")},rr.prototype.add=function(a){a!==""&&this.ew.push(a)},rr.className="StringBuilder";function pr(){}pr.className="PropertyCollection";var wr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){vn.console&&vn.console.log(a)},HA:function(a,y,x,b){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(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var ee=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);ee.get!==void 0&&ee.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ar(){}Ar.prototype.reset=function(){},Ar.prototype.next=function(){return!1},Ar.prototype.Ad=function(){return!1},Ar.prototype.first=function(){return null},Ar.prototype.any=function(){return!1},Ar.prototype.all=function(){return!0},Ar.prototype.each=function(){return this},Ar.prototype.map=function(){return this},Ar.prototype.filter=function(){return this},Ar.prototype.de=function(){},Ar.prototype.toString=function(){return"EmptyIterator"},zt.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset;var Kr=null;Ar.className="EmptyIterator",Kr=new Ar;function Qr(a){this.key=-1,this.value=a}Qr.prototype.reset=function(){this.key=-1},Qr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Qr.prototype.Ad=function(){return this.next()},Qr.prototype.first=function(){return this.key=0,this.value},Qr.prototype.any=function(a){return this.key=-1,a(this.value)},Qr.prototype.all=function(a){return this.key=-1,a(this.value)},Qr.prototype.each=function(a){return this.key=-1,a(this.value),this},Qr.prototype.map=function(a){return new Qr(a(this.value))},Qr.prototype.filter=function(a){return a(this.value)?new Qr(this.value):Kr},Qr.prototype.de=function(){this.value=null},Qr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},zt.Object.defineProperties(Qr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Qr.prototype.first=Qr.prototype.first,Qr.prototype.hasNext=Qr.prototype.Ad,Qr.prototype.next=Qr.prototype.next,Qr.prototype.reset=Qr.prototype.reset,Qr.className="SingletonIterator";function qr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}qr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},qr.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,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},qr.prototype.Ad=function(){return this.next()},qr.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 b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},qr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];if((b===null||b(ee))&&a(ee))return!0}return!1},qr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];if((b===null||b(ee))&&!a(ee))return!1}return!0},qr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var ee=y[E];(b===null||b(ee))&&a(ee)}return this},qr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,ee=0;ee<b;ee++){var ne=y[ee];(E===null||E(ne))&&x.push(a(ne))}return a=new rn,a.s=x,a.xb(),a.iterator},qr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,ee=0;ee<b;ee++){var ne=y[ee];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new rn,a.s=x,a.xb(),a.iterator},qr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},qr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},zt.Object.defineProperties(qr.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,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),qr.prototype.first=qr.prototype.first,qr.prototype.hasNext=qr.prototype.Ad,qr.prototype.next=qr.prototype.next,qr.prototype.reset=qr.prototype.reset,qr.className="ListIterator";function lr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}lr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},lr.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)},lr.prototype.Ad=function(){return this.next()},lr.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},lr.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},lr.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},lr.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},lr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new rn,a.s=x,a.xb(),a.iterator},lr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new rn,a.s=x,a.xb(),a.iterator},lr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},lr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},zt.Object.defineProperties(lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),lr.prototype.first=lr.prototype.first,lr.prototype.hasNext=lr.prototype.Ad,lr.prototype.next=lr.prototype.next,lr.prototype.reset=lr.prototype.reset,lr.className="ListIteratorBackwards";function rn(a){cr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=rn.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"List()#"+Gr(this)},qe.add=function(a){return a===null?this:(this._isFrozen&&ln(this,a),this.s.push(a),this.xb(),this)},qe.push=function(a){this.add(a)},qe.addAll=function(a){if(a===null)return this;this._isFrozen&&ln(this);var y=this.s;if(Dn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},qe.clear=function(){this._isFrozen&&ln(this),this.s.length=0,this.xb()},qe.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},qe.has=function(a){return this.contains(a)},qe.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},qe.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Nn(a,"0 <= i < length",rn,"elt:i"),y[a]},qe.get=function(a){return this.M(a)},qe.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Nn(a,"0 <= i < length",rn,"setElt:i"),this._isFrozen&&ln(this,a),x[a]=y},qe.set=function(a,y){this.cd(a,y)},qe.first=function(){var a=this.s;return a.length===0?null:a[0]},qe.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},qe.pop=function(){this._isFrozen&&ln(this);var a=this.s;return 0<a.length?a.pop():null},rn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},rn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},rn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},rn.prototype.map=function(a){for(var y=new rn,x=[],b=this.s,E=b.length,ee=0;ee<E;ee++)x.push(a(b[ee]));return y.s=x,y.xb(),y},rn.prototype.filter=function(a){for(var y=new rn,x=[],b=this.s,E=b.length,ee=0;ee<E;ee++){var ne=b[ee];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},qe=rn.prototype,qe.Gb=function(a,y){0>a&&Nn(a,">= 0",rn,"insertAt:i"),this._isFrozen&&ln(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},qe.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(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)},qe.delete=function(a){return this.remove(a)},qe.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Nn(a,"0 <= i < length",rn,"removeAt:i"),this._isFrozen&&ln(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},qe.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&ln(this);for(var E=a,ee=y+1;ee<b;)x[E++]=x[ee++];return x.length=b-(y-a+1),this.xb(),this},rn.prototype.copy=function(){var a=new rn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},qe=rn.prototype,qe.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},qe.Iv=function(){for(var a=new an,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},qe.sort=function(a){return this._isFrozen&&ln(this),this.s.sort(a),this.xb(),this},qe.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&ln(this);var ee=x-y;if(1>=ee)return this;if((0>y||y>=E-1)&&Nn(y,"0 <= from < length",rn,"sortRange:from"),ee===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},qe.reverse=function(){return this._isFrozen&&ln(this),this.s.reverse(),this.xb(),this},zt.Object.defineProperties(rn.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 Kr;var a=this.Sa;return a!==null?(a.reset(),a):new qr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Kr;var a=this.Hg;return a!==null?(a.reset(),a):new lr(this)}}}),rn.prototype.reverse=rn.prototype.reverse,rn.prototype.sortRange=rn.prototype.zi,rn.prototype.sort=rn.prototype.sort,rn.prototype.toSet=rn.prototype.Iv,rn.prototype.toArray=rn.prototype.Fa,rn.prototype.removeRange=rn.prototype.removeRange,rn.prototype.removeAt=rn.prototype.mb,rn.prototype.delete=rn.prototype.delete,rn.prototype.remove=rn.prototype.remove,rn.prototype.insertAt=rn.prototype.Gb,rn.prototype.pop=rn.prototype.pop,rn.prototype.last=rn.prototype.jc,rn.prototype.first=rn.prototype.first,rn.prototype.set=rn.prototype.set,rn.prototype.setElt=rn.prototype.cd,rn.prototype.get=rn.prototype.get,rn.prototype.elt=rn.prototype.M,rn.prototype.indexOf=rn.prototype.indexOf,rn.prototype.has=rn.prototype.has,rn.prototype.contains=rn.prototype.contains,rn.prototype.clear=rn.prototype.clear,rn.prototype.addAll=rn.prototype.addAll,rn.prototype.push=rn.prototype.push,rn.prototype.add=rn.prototype.add,rn.prototype.thaw=rn.prototype.ka,rn.prototype.freeze=rn.prototype.freeze,rn.className="List";function ir(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ir.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},ir.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)},ir.prototype.Ad=function(){return this.next()},ir.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},ir.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},ir.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},ir.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},ir.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ir.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ir.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},ir.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},zt.Object.defineProperties(ir.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),ir.prototype.first=ir.prototype.first,ir.prototype.hasNext=ir.prototype.Ad,ir.prototype.next=ir.prototype.next,ir.prototype.reset=ir.prototype.reset,ir.className="SetIterator";function an(a){cr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=an.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"Set()#"+Gr(this)},qe.add=function(a){if(a===null)return this;this._isFrozen&&ln(this,a);var y=a;return sn(a)&&(y=Cr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new en(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},qe.addAll=function(a){if(a===null)return this;if(this._isFrozen&&ln(this),Dn(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},qe.contains=function(a){if(a===null)return!1;var y=a;return sn(a)&&(y=Gr(a),y===void 0)?!1:this.Tb[y]!==void 0},qe.has=function(a){return this.contains(a)},qe.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},qe.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},qe.first=function(){var a=this.ea;return a===null?null:a.value},an.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},an.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},an.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},an.prototype.map=function(a){for(var y=new an,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},an.prototype.filter=function(a){for(var y=new an,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},qe=an.prototype,qe.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=a;if(sn(a)&&(y=Gr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},qe.delete=function(a){return this.remove(a)},qe.hp=function(a){if(a===null)return this;if(this._isFrozen&&ln(this),Dn(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},qe.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&ln(this);var y=new an;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},qe.clear=function(){this._isFrozen&&ln(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},an.prototype.copy=function(){var a=new an,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},an.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},an.prototype.Hv=function(){var a=new rn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function cr(a){a.__gohashid=Ri++}function Cr(a){var y=a.__gohashid;return y===void 0&&(y=Ri++,a.__gohashid=y),y}function Gr(a){return a.__gohashid}zt.Object.defineProperties(an.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Kr;var a=this.Sa;return a!==null?(a.reset(),a):new ir(this)}}}),an.prototype.toList=an.prototype.Hv,an.prototype.toArray=an.prototype.Fa,an.prototype.clear=an.prototype.clear,an.prototype.retainAll=an.prototype.pA,an.prototype.removeAll=an.prototype.hp,an.prototype.delete=an.prototype.delete,an.prototype.remove=an.prototype.remove,an.prototype.first=an.prototype.first,an.prototype.containsAny=an.prototype.Ty,an.prototype.containsAll=an.prototype.Sy,an.prototype.has=an.prototype.has,an.prototype.contains=an.prototype.contains,an.prototype.addAll=an.prototype.addAll,an.prototype.add=an.prototype.add,an.prototype.thaw=an.prototype.ka,an.prototype.freeze=an.prototype.freeze;var Ri=1;an.className="Set",an.uniqueHash=cr,an.hashIdUnique=Cr,an.hashId=Gr;function Fi(a){this.ma=a,this.qa=a.Ja,this.sa=null}Fi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Fi.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)},Fi.prototype.Ad=function(){return this.next()},Fi.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},Fi.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},Fi.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},Fi.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},Fi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Fi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Fi.prototype.de=function(){this.value=this.key=null,this.qa=-1},Fi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},zt.Object.defineProperties(Fi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Fi.prototype.first=Fi.prototype.first,Fi.prototype.hasNext=Fi.prototype.Ad,Fi.prototype.next=Fi.prototype.next,Fi.prototype.reset=Fi.prototype.reset,Fi.className="MapKeySetIterator";function Si(a){an.call(this),cr(this),this._isFrozen=!0,this.ma=a}Kt(Si,an),qe=Si.prototype,qe.freeze=function(){return this},qe.ka=function(){return this},qe.toString=function(){return"MapKeySet("+this.ma.toString()+")"},qe.add=function(){jt("This Set is read-only: "+this.toString())},qe.contains=function(a){return this.ma.contains(a)},qe.has=function(a){return this.contains(a)},qe.remove=function(){jt("This Set is read-only: "+this.toString())},qe.delete=function(a){return this.remove(a)},qe.clear=function(){jt("This Set is read-only: "+this.toString())},qe.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Si.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Si.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Si.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Si.prototype.map=function(a){for(var y=new an,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Si.prototype.filter=function(a){for(var y=new an,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Si.prototype.copy=function(){return new Si(this.ma)},Si.prototype.Iv=function(){var a=new an,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Si.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Si.prototype.Hv=function(){var a=new rn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},zt.Object.defineProperties(Si.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Kr:new Fi(this.ma)}}}),Si.prototype.toList=Si.prototype.Hv,Si.prototype.toArray=Si.prototype.Fa,Si.prototype.toSet=Si.prototype.Iv,Si.prototype.first=Si.prototype.first,Si.prototype.clear=Si.prototype.clear,Si.prototype.delete=Si.prototype.delete,Si.prototype.remove=Si.prototype.remove,Si.prototype.has=Si.prototype.has,Si.prototype.contains=Si.prototype.contains,Si.prototype.add=Si.prototype.add,Si.prototype.thaw=Si.prototype.ka,Si.prototype.freeze=Si.prototype.freeze,Si.className="MapKeySet";function Di(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Di.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Di.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)},Di.prototype.Ad=function(){return this.next()},Di.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},Di.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},Di.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},Di.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},Di.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Di.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new rn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Di.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Di.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},zt.Object.defineProperties(Di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Di.prototype.first=Di.prototype.first,Di.prototype.hasNext=Di.prototype.Ad,Di.prototype.next=Di.prototype.next,Di.prototype.reset=Di.prototype.reset,Di.className="MapValueSetIterator";function en(a,y){this.key=a,this.value=y,this.ll=this.va=null}en.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},en.className="KeyValuePair";function dn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}dn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},dn.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)},dn.prototype.Ad=function(){return this.next()},dn.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},dn.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},dn.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},dn.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},dn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},dn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new rn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},dn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},dn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},zt.Object.defineProperties(dn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),dn.prototype.first=dn.prototype.first,dn.prototype.hasNext=dn.prototype.Ad,dn.prototype.next=dn.prototype.next,dn.prototype.reset=dn.prototype.reset,dn.className="MapIterator";function tn(a){cr(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"&&jt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qe=tn.prototype,qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.toString=function(){return"Map()#"+Gr(this)},qe.add=function(a,y){this._isFrozen&&ln(this,a);var x=a;sn(a)&&(x=Cr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new en(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()):b.value=y,this},qe.set=function(a,y){return this.add(a,y)},qe.addAll=function(a){if(a===null)return this;if(Dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.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},qe.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},qe=tn.prototype,qe.contains=function(a){var y=a;return sn(a)&&(y=Gr(a),y===void 0)?!1:this.Tb[y]!==void 0},qe.has=function(a){return this.contains(a)},qe.I=function(a){var y=a;return sn(a)&&(y=Gr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},qe.get=function(a){return this.I(a)},qe.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=a;if(sn(a)&&(y=Gr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},qe.delete=function(a){return this.remove(a)},qe.clear=function(){this._isFrozen&&ln(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 b=y[x];a.add(b.key,b.value)}return a},tn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new en(E.key,E.value),x++}return y},tn.prototype.Lf=function(){return new Si(this)},zt.Object.defineProperties(tn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Kr;var a=this.Sa;return a!==null?(a.reset(),a):new dn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Kr:new Fi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Kr;var a=this.jf;return a!==null?(a.reset(),a):new Di(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 lt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):jt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var zn,Pn,In,Qn,ar;lt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.h=function(a,y){return this.x=a,this.y=y,this},lt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},lt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.copy=function(){var a=new lt;return a.x=this.x,a.y=this.y,a},qe=lt.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Sn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new lt(x,E)}return new lt}function Gn(a){return a.x.toString()+" "+a.y.toString()}qe.toString=function(){return"Point("+this.x+","+this.y+")"},qe.D=function(a){return a instanceof lt?this.x===a.x&&this.y===a.y:!1},qe.hi=function(a,y){return this.x===a&&this.y===y},qe.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)},qe.add=function(a){return this.x+=a.x,this.y+=a.y,this},qe.re=function(a){return this.x-=a.x,this.y-=a.y,this},qe.offset=function(a,y){return this.x+=a,this.y+=y,this},lt.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},qe=lt.prototype,qe.scale=function(a,y){return this.x*=a,this.y*=y,this},qe.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},qe.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},qe.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},qe.ab=function(a){return Hn(a.x-this.x,a.y-this.y)},qe.direction=function(a,y){return Hn(a-this.x,y-this.y)};function Hn(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}qe.Ry=function(a,y){return Gt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},qe.fA=function(a,y,x,b){return Gt.qh(a,y,x,b,this.x,this.y,this),this},qe.gA=function(a,y){return Gt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},qe.uA=function(a,y,x,b){return Gt.No(this.x,this.y,a,y,x,b,this),this},qe.vA=function(a,y){return Gt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},qe.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},qe.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},qe.transform=function(a){return a.Ga(this),this};function Kn(a,y){return y.Cd(a),a}function Zn(a,y,x,b,E,ee){var ne=E-x,ae=ee-b,ue=ne*ne+ae*ae;x-=a,b-=y;var ge=-x*ne-b*ae;return 0>=ge||ge>=ue?(ne=E-a,ae=ee-y,Math.min(x*x+b*b,ne*ne+ae*ae)):(a=ne*b-ae*x,a*a/ue)}function Tr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function yr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}qe.w=function(){return isFinite(this.x)&&isFinite(this.y)},lt.alloc=function(){var a=ur.pop();return a===void 0?new lt:a},lt.allocAt=function(a,y){var x=ur.pop();return x===void 0?new lt(a,y):(x.x=a,x.y=y,x)},lt.free=function(a){ur.push(a)},lt.prototype.isReal=lt.prototype.w,lt.prototype.setSpot=lt.prototype.yi,lt.prototype.setRectSpot=lt.prototype.xi,lt.prototype.snapToGridPoint=lt.prototype.vA,lt.prototype.snapToGrid=lt.prototype.uA,lt.prototype.projectOntoLineSegmentPoint=lt.prototype.gA,lt.prototype.projectOntoLineSegment=lt.prototype.fA,lt.intersectingLineSegments=function(a,y,x,b,E,ee,ne,ae){return Gt.Rl(a,y,x,b,E,ee,ne,ae)},lt.prototype.compareWithLineSegmentPoint=lt.prototype.Ry,lt.compareWithLineSegment=function(a,y,x,b,E,ee){return Gt.Fl(a,y,x,b,E,ee)},lt.prototype.direction=lt.prototype.direction,lt.prototype.directionPoint=lt.prototype.ab,lt.prototype.normalize=lt.prototype.normalize,lt.prototype.distanceSquared=lt.prototype.zd,lt.prototype.distanceSquaredPoint=lt.prototype.Bf,lt.prototype.scale=lt.prototype.scale,lt.prototype.rotate=lt.prototype.rotate,lt.prototype.offset=lt.prototype.offset,lt.prototype.subtract=lt.prototype.re,lt.prototype.add=lt.prototype.add,lt.prototype.equalsApprox=lt.prototype.Xa,lt.prototype.equalTo=lt.prototype.hi,lt.prototype.equals=lt.prototype.D,lt.prototype.set=lt.prototype.set,lt.prototype.setTo=lt.prototype.sg;var ur=[];lt.className="Point",lt.parse=Sn,lt.stringify=Gn,lt.distanceLineSegmentSquared=Zn,lt.distanceSquared=Tr,lt.direction=yr,lt.Origin=zn=new lt(0,0).ja(),lt.InfiniteTopLeft=Pn=new lt(-1/0,-1/0).ja(),lt.InfiniteBottomRight=In=new lt(1/0,1/0).ja(),lt.SixPoint=Qn=new lt(6,6).ja(),lt.NoPoint=ar=new lt(NaN,NaN).ja(),lt.parse=Sn,lt.stringify=Gn,lt.distanceLineSegmentSquared=Zn,lt.distanceSquared=Tr,lt.direction=yr;function mn(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):jt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var dr,Or,oi,ei,ui,pi,hi;mn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},mn.prototype.h=function(a,y){return this.width=a,this.height=y,this},mn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},mn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},mn.prototype.copy=function(){var a=new mn;return a.width=this.width,a.height=this.height,a},qe=mn.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _i(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new mn(x,E)}return new mn}function zi(a){return a.width.toString()+" "+a.height.toString()}qe.toString=function(){return"Size("+this.width+","+this.height+")"},qe.D=function(a){return a instanceof mn?this.width===a.width&&this.height===a.height:!1},qe.hi=function(a,y){return this.width===a&&this.height===y},qe.Xa=function(a){return Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)},qe.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},qe.w=function(){return isFinite(this.width)&&isFinite(this.height)},mn.alloc=function(){var a=mo.pop();return a===void 0?new mn:a},mn.free=function(a){mo.push(a)},mn.prototype.isReal=mn.prototype.w,mn.prototype.inflate=mn.prototype.Bc,mn.prototype.equalsApprox=mn.prototype.Xa,mn.prototype.equalTo=mn.prototype.hi,mn.prototype.equals=mn.prototype.D,mn.prototype.set=mn.prototype.set,mn.prototype.setTo=mn.prototype.sg;var mo=[];mn.className="Size",mn.parse=_i,mn.stringify=zi,mn.ZeroSize=dr=new mn(0,0).ja(),mn.OneSize=Or=new mn(1,1).ja(),mn.SixSize=oi=new mn(6,6).ja(),mn.EightSize=ei=new mn(8,8).ja(),mn.TenSize=ui=new mn(10,10).ja(),mn.InfiniteSize=pi=new mn(1/0,1/0).ja(),mn.NoSize=hi=new mn(NaN,NaN).ja(),mn.parse=_i,mn.stringify=zi;function $t(a,y,x,b){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 b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof lt?(x=a.x,a=a.y,y instanceof lt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof mn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):jt("Incorrect second argument supplied to Rect constructor "+y)):jt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}qe=$t.prototype,qe.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qe.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function vi(a,y,x){a.width=y,a.height=x}qe.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},qe.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qe.dd=function(a){return this.x=a.x,this.y=a.y,this},qe.tA=function(a){return this.width=a.width,this.height=a.height,this},$t.prototype.copy=function(){var a=new $t;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},qe=$t.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ti(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var ee=0;a[y]==="";)y++;(b=a[y++])&&(ee=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new $t(x,E,ee,ne)}return new $t}function Xr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}qe.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},qe.D=function(a){return a instanceof $t?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},qe.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},qe.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)&&Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)};function Pi(a,y){return Gt.$(a.x,y.x)&&Gt.$(a.y,y.y)&&Gt.$(a.width,y.width)&&Gt.$(a.height,y.height)}qe.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},qe.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},qe.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},qe.offset=function(a,y){return this.x+=a,this.y+=y,this},qe.Bc=function(a,y){return Wr(this,y,a,y,a)},qe.Co=function(a){return Wr(this,a.top,a.right,a.bottom,a.left)},qe.Fv=function(a){return Wr(this,-a.top,-a.right,-a.bottom,-a.left)},qe.Hz=function(a,y,x,b){return Wr(this,a,y,x,b)};function Wr(a,y,x,b,E){var ee=a.width;return x+E<=-ee?(a.x+=ee/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}qe.Ex=function(a){return eo(this,a.x,a.y,a.width,a.height)},qe.Uu=function(a,y,x,b){return eo(this,a,y,x,b)};function eo(a,y,x,b,E){var ee=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=ee,a.y=ne,a.width=Math.max(0,y-ee),a.height=Math.max(0,x-ne),a}qe.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},qe.Vu=function(a,y,x,b){var E=this.width,ee=this.x;return E!==1/0&&x!==1/0&&(E+=ee,x+=a,isNaN(x)||isNaN(E)||ee>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Gi(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}qe.Ye=function(a){return xi(this,a.x,a.y,0,0)},qe.ed=function(a){return xi(this,a.x,a.y,a.width,a.height)},qe.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),xi(this,a,y,x,b)};function xi(a,y,x,b,E){var ee=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=ee,a.y=ne,a.width=y-ee,a.height=x-ne,a}qe.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 qi(a,y,x,b,E,ee,ne,ae){return ne===void 0&&(ne=0),ae===void 0&&(ae=0),a<=E&&E+ne<=a+x&&y<=ee&&ee+ae<=y+b}function ga(a,y,x,b,E,ee,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+ee||ee>b+y)}qe.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},qe.Mz=function(){return this.width===0&&this.height===0},$t.alloc=function(){var a=ma.pop();return a===void 0?new $t:a},$t.allocAt=function(a,y,x,b){var E=ma.pop();return E===void 0?new $t(a,y,x,b):E.h(a,y,x,b)},$t.free=function(a){ma.push(a)},zt.Object.defineProperties($t.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 lt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new mn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new lt(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}}}),$t.prototype.isEmpty=$t.prototype.Mz,$t.prototype.isReal=$t.prototype.w,$t.intersectsLineSegment=function(a,y,x,b,E,ee,ne,ae){return Gt.Fx(a,y,x,b,E,ee,ne,ae)},$t.prototype.setSpot=$t.prototype.yi,$t.prototype.union=$t.prototype.Kv,$t.prototype.unionRect=$t.prototype.ed,$t.prototype.unionPoint=$t.prototype.Ye,$t.prototype.intersects=$t.prototype.Vu,$t.prototype.intersectsRect=$t.prototype.Yc,$t.prototype.intersect=$t.prototype.Uu,$t.prototype.intersectRect=$t.prototype.Ex,$t.prototype.grow=$t.prototype.Hz,$t.prototype.subtractMargin=$t.prototype.Fv,$t.prototype.addMargin=$t.prototype.Co,$t.prototype.inflate=$t.prototype.Bc,$t.prototype.offset=$t.prototype.offset,$t.prototype.contains=$t.prototype.contains,$t.prototype.containsRect=$t.prototype.Re,$t.prototype.containsPoint=$t.prototype.ca,$t.prototype.equalsApprox=$t.prototype.Xa,$t.prototype.equalTo=$t.prototype.hi,$t.prototype.equals=$t.prototype.D,$t.prototype.setSize=$t.prototype.tA,$t.prototype.setPoint=$t.prototype.dd,$t.prototype.set=$t.prototype.set,$t.prototype.setTo=$t.prototype.sg;var Ao=null,Aa=null,ma=[];$t.className="Rect",$t.parse=Ti,$t.stringify=Xr,$t.contains=qi,$t.intersects=ga,$t.ZeroRect=Ao=new $t(0,0,0,0).ja(),$t.NoRect=Aa=new $t(NaN,NaN,NaN,NaN).ja(),$t.parse=Ti,$t.stringify=Xr,$t.contains=qi,$t.intersects=ga;function Ur(a,y,x,b){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):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):jt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ur.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ur.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ur.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ur.prototype.copy=function(){var a=new Ur;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},qe=Ur.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function to(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Ur;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ur(x);for(var ee=NaN;a[y]==="";)y++;if((b=a[y++])&&(ee=parseFloat(b)),isNaN(ee))return new Ur(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ur(x,E):new Ur(x,E,ee,ne)}return new Ur}function Co(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}qe.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},qe.D=function(a){return a instanceof Ur?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},qe.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},qe.Xa=function(a){return Gt.B(this.top,a.top)&&Gt.B(this.right,a.right)&&Gt.B(this.bottom,a.bottom)&&Gt.B(this.left,a.left)},qe.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ur.alloc=function(){var a=wi.pop();return a===void 0?new Ur:a},Ur.free=function(a){wi.push(a)},Ur.prototype.isReal=Ur.prototype.w,Ur.prototype.equalsApprox=Ur.prototype.Xa,Ur.prototype.equalTo=Ur.prototype.hi,Ur.prototype.equals=Ur.prototype.D,Ur.prototype.set=Ur.prototype.set,Ur.prototype.setTo=Ur.prototype.sg;var Qo=null,Ci=null,wi=[];Ur.className="Margin",Ur.parse=to,Ur.stringify=Co,Ur.ZeroMargin=Qo=new Ur(0,0,0,0).ja(),Ur.TwoMargin=Ci=new Ur(2,2,2,2).ja(),Ur.parse=to,Ur.stringify=Co;function Ln(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var Vr,Ei,co,ba,aa,ai,Wo,Ko,jo,io,Pa,is,fo,os,Gs,Lu,Ho,th,Mu,Nu,gl,Ns,Ll,nh,Au,Vo,ju,rh,iu,ou,ja,Oa,na,sa,uo,Bi;Ln.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ln.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Ln.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ln.prototype.copy=function(){var a=new Ln;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},qe=Ln.prototype,qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wi(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function la(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Vr;if(a==="TopLeft")return Ei;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return co;if(a==="TopRight")return ba;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return aa;if(a==="Center")return ai;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Wo;if(a==="BottomLeft")return Ko;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return io;if(a==="TopSide")return Pa;if(a==="LeftSide")return is;if(a==="RightSide")return fo;if(a==="BottomSide")return os;if(a==="TopBottomSides")return Gs;if(a==="LeftRightSides")return Lu;if(a==="TopLeftSides")return Ho;if(a==="TopRightSides")return th;if(a==="BottomLeftSides")return Mu;if(a==="BottomRightSides")return Nu;if(a==="NotTopSide")return gl;if(a==="NotLeftSide")return Ns;if(a==="NotRightSide")return Ll;if(a==="NotBottomSide")return nh;if(a==="AllSides")return Au;if(a==="Default")return Vo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var ee=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(ee=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new Ln(x,E,ee,ne)}return new Ln}function $o(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}qe.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(Vr)?"None":this.D(Ei)?"TopLeft":this.D(co)?"Top":this.D(ba)?"TopRight":this.D(aa)?"Left":this.D(ai)?"Center":this.D(Wo)?"Right":this.D(Ko)?"BottomLeft":this.D(jo)?"Bottom":this.D(io)?"BottomRight":this.D(Pa)?"TopSide":this.D(is)?"LeftSide":this.D(fo)?"RightSide":this.D(os)?"BottomSide":this.D(Gs)?"TopBottomSides":this.D(Lu)?"LeftRightSides":this.D(Ho)?"TopLeftSides":this.D(th)?"TopRightSides":this.D(Mu)?"BottomLeftSides":this.D(Nu)?"BottomRightSides":this.D(gl)?"NotTopSide":this.D(Ns)?"NotLeftSide":this.D(Ll)?"NotRightSide":this.D(nh)?"NotBottomSide":this.D(Au)?"AllSides":this.D(Vo)?"Default":"None"},qe.D=function(a){return a instanceof Ln?(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},qe.gv=function(){return new Ln(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},qe.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ju))a=is;else if(a.D(rh))a=fo;else if(a.D(iu))a=Pa;else if(a.D(ou))a=os;else return!1;return a=a.offsetY,(this.offsetY&a)===a},qe.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},qe.Mc=function(){return isNaN(this.x)||isNaN(this.y)},qe.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},qe.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},qe.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ln.alloc=function(){var a=qo.pop();return a===void 0?new Ln:a},Ln.free=function(a){qo.push(a)},Ln.prototype.isDefault=Ln.prototype.Xb,Ln.prototype.isNone=Ln.prototype.ys,Ln.prototype.isSide=Ln.prototype.$c,Ln.prototype.isNoSpot=Ln.prototype.Mc,Ln.prototype.isSpot=Ln.prototype.sb,Ln.prototype.includesSide=Ln.prototype.Hf,Ln.prototype.opposite=Ln.prototype.gv,Ln.prototype.equals=Ln.prototype.D,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setTo=Ln.prototype.sg;var qo=[];Ln.className="Spot",Ln.parse=la,Ln.stringify=$o,Ln.None=Vr=Wi(new Ln(0,0,0,0),0).ja(),Ln.Default=Vo=Wi(new Ln(0,0,-1,0),-1).ja(),Ln.TopLeft=Ei=new Ln(0,0,0,0).ja(),Ln.TopCenter=co=new Ln(.5,0,0,0).ja(),Ln.TopRight=ba=new Ln(1,0,0,0).ja(),Ln.LeftCenter=aa=new Ln(0,.5,0,0).ja(),Ln.Center=ai=new Ln(.5,.5,0,0).ja(),Ln.RightCenter=Wo=new Ln(1,.5,0,0).ja(),Ln.BottomLeft=Ko=new Ln(0,1,0,0).ja(),Ln.BottomCenter=jo=new Ln(.5,1,0,0).ja(),Ln.BottomRight=io=new Ln(1,1,0,0).ja(),Ln.MiddleTop=ja=co,Ln.MiddleLeft=Oa=aa,Ln.MiddleRight=na=Wo,Ln.MiddleBottom=sa=jo,Ln.Top=iu=co,Ln.Left=ju=aa,Ln.Right=rh=Wo,Ln.Bottom=ou=jo,Ln.TopSide=Pa=Wi(new Ln(0,0,1,1),1).ja(),Ln.LeftSide=is=Wi(new Ln(0,0,1,2),1).ja(),Ln.RightSide=fo=Wi(new Ln(0,0,1,4),1).ja(),Ln.BottomSide=os=Wi(new Ln(0,0,1,8),1).ja(),Ln.TopBottomSides=Gs=Wi(new Ln(0,0,1,9),1).ja(),Ln.LeftRightSides=Lu=Wi(new Ln(0,0,1,6),1).ja(),Ln.TopLeftSides=Ho=Wi(new Ln(0,0,1,3),1).ja(),Ln.TopRightSides=th=Wi(new Ln(0,0,1,5),1).ja(),Ln.BottomLeftSides=Mu=Wi(new Ln(0,0,1,10),1).ja(),Ln.BottomRightSides=Nu=Wi(new Ln(0,0,1,12),1).ja(),Ln.NotTopSide=gl=Wi(new Ln(0,0,1,14),1).ja(),Ln.NotLeftSide=Ns=Wi(new Ln(0,0,1,13),1).ja(),Ln.NotRightSide=Ll=Wi(new Ln(0,0,1,11),1).ja(),Ln.NotBottomSide=nh=Wi(new Ln(0,0,1,7),1).ja(),Ln.AllSides=Au=Wi(new Ln(0,0,1,15),1).ja(),uo=new Ln(.156,.156).ja(),Bi=new Ln(.844,.844).ja(),Ln.parse=la,Ln.stringify=$o;function jr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}jr.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},jr.prototype.setTransform=function(a,y,x,b,E,ee){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=ee,this},jr.prototype.copy=function(){var a=new jr;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},jr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},jr.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},jr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},jr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},jr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=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=b,this.m22=E,this},jr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,ee=a.m11*y,ne=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*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*ee,E=this.m12*E+this.m22*ee,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},jr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),ee=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=ee,this},jr.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,ee=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=ee,this.m22=ne,this.translate(-y,-x),this},qe=jr.prototype,qe.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},qe.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},qe.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)},qe.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},qe.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},qe.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,ee=this.m11,ne=this.m12,ae=this.m21,ue=this.m22,ge=this.dx,ye=this.dy,Le=y*ee+x*ae+ge,ze=y*ne+x*ue+ye,We=b*ee+x*ae+ge,Je=b*ne+x*ue+ye;return x=y*ee+E*ae+ge,y=y*ne+E*ue+ye,ee=b*ee+E*ae+ge,b=b*ne+E*ue+ye,E=Math.min(Le,We),Le=Math.max(Le,We),We=Math.min(ze,Je),ze=Math.max(ze,Je),E=Math.min(E,x),Le=Math.max(Le,x),We=Math.min(We,y),ze=Math.max(ze,y),E=Math.min(E,ee),Le=Math.max(Le,ee),We=Math.min(We,b),ze=Math.max(ze,b),a.h(E,We,Le-E,ze-We),a},jr.alloc=function(){var a=As.pop();return a===void 0?new jr:a},jr.free=function(a){As.push(a)},jr.prototype.transformRect=jr.prototype.pp,jr.prototype.transformPoint=jr.prototype.Ga,jr.prototype.scale=jr.prototype.scale,jr.prototype.translate=jr.prototype.translate,jr.prototype.rotate=jr.prototype.rotate,jr.prototype.invert=jr.prototype.Vj,jr.prototype.multiplyInverted=jr.prototype.bv,jr.prototype.multiply=jr.prototype.multiply,jr.prototype.reset=jr.prototype.reset,jr.prototype.isIdentity=jr.prototype.ws,jr.prototype.equals=jr.prototype.D,jr.prototype.setTransform=jr.prototype.setTransform,jr.prototype.set=jr.prototype.set;var As=[];jr.className="Transform",jr.xF="54a702f3e53909c447824c6706603faf4c";var Gt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Gt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Gt.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,b,E,ee,ne){if(0>=E&&(E=1e-6),a<x)var ae=a,ue=x;else ae=x,ue=a;if(y<b)var ge=y,ye=b;else ge=b,ye=y;if(a===x)return ge<=ne&&ne<=ye&&a-E<=ee&&ee<=a+E;if(y===b)return ae<=ee&&ee<=ue&&y-E<=ne&&ne<=y+E;if(ue+=E,ae-=E,ae<=ee&&ee<=ue&&(ye+=E,ge-=E,ge<=ne&&ne<=ye))if(ue-ae>ye-ge)if(a-x>E||x-a>E){if(ee=(b-y)/(x-a)*(ee-a)+y,ee-E<=ne&&ne<=ee+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=ee&&ee<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le){if(Gt.Yb(a,y,ne,ae,Le,x,b)&&Gt.Yb(a,y,ne,ae,Le,E,ee))return Gt.Yb(a,y,ne,ae,Le,ge,ye);var ze=(a+x)/2,We=(y+b)/2,Je=(x+E)/2,it=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ze+Je)/2,x=(We+it)/2,Je=(Je+E)/2,it=(it+ee)/2;var Tt=(b+Je)/2,Pt=(x+it)/2;return Gt.cs(a,y,ze,We,b,x,Tt,Pt,ue,ge,ye,Le)||Gt.cs(Tt,Pt,Je,it,E,ee,ne,ae,ue,ge,ye,Le)},ax:function(a,y,x,b,E,ee,ne,ae,ue){var ge=(x+E)/2,ye=(b+ee)/2;return ue.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(ee+ae)/2)/2)/2),ue},My:function(a,y,x,b,E,ee,ne,ae){var ue=(x+E)/2,ge=(b+ee)/2;return yr(((a+x)/2+ue)/2,((y+b)/2+ge)/2,(ue+(E+ne)/2)/2,(ge+(ee+ae)/2)/2)},Dl:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,ne,ae,ue,x,b)&&Gt.Yb(a,y,ne,ae,ue,E,ee))xi(ge,a,y,0,0),xi(ge,ne,ae,0,0);else{var ye=(a+x)/2,Le=(y+b)/2,ze=(x+E)/2,We=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+We)/2,ze=(ze+E)/2,We=(We+ee)/2;var Je=(b+ze)/2,it=(x+We)/2;Gt.Dl(a,y,ye,Le,b,x,Je,it,ue,ge),Gt.Dl(Je,it,ze,We,E,ee,ne,ae,ue,ge)}return ge},Qe:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,ne,ae,ue,x,b)&&Gt.Yb(a,y,ne,ae,ue,E,ee))ge.length===0&&(ge.push(a),ge.push(y)),ge.push(ne),ge.push(ae);else{var ye=(a+x)/2,Le=(y+b)/2,ze=(x+E)/2,We=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(ye+ze)/2,x=(Le+We)/2,ze=(ze+E)/2,We=(We+ee)/2;var Je=(b+ze)/2,it=(x+We)/2;Gt.Qe(a,y,ye,Le,b,x,Je,it,ue,ge),Gt.Qe(Je,it,ze,We,E,ee,ne,ae,ue,ge)}return ge},jv:function(a,y,x,b,E,ee,ne,ae,ue,ge){if(Gt.Yb(a,y,E,ee,ge,x,b))return Gt.Yb(a,y,E,ee,ge,ae,ue);var ye=(a+x)/2,Le=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ze=(ye+x)/2,We=(Le+b)/2;return Gt.jv(a,y,ye,Le,ze,We,ne,ae,ue,ge)||Gt.jv(ze,We,x,b,E,ee,ne,ae,ue,ge)},OA:function(a,y,x,b,E,ee,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+ee)/2)/2),ne},iv:function(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(a,y,E,ee,ne,x,b))xi(ae,a,y,0,0),xi(ae,E,ee,0,0);else{var ue=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ye=(ue+x)/2,Le=(ge+b)/2;Gt.iv(a,y,ue,ge,ye,Le,ne,ae),Gt.iv(ye,Le,x,b,E,ee,ne,ae)}return ae},ep:function(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(a,y,E,ee,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(ee);else{var ue=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+ee)/2;var ye=(ue+x)/2,Le=(ge+b)/2;Gt.ep(a,y,ue,ge,ye,Le,ne,ae),Gt.ep(ye,Le,x,b,E,ee,ne,ae)}return ae},Eo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze,We){if(Gt.Yb(a,y,ne,ae,ze,x,b)&&Gt.Yb(a,y,ne,ae,ze,E,ee))return!Gt.Rl(a,y,ne,ae,ue,ge,ye,Le)||(ze=(a-ne)*(ge-Le)-(y-ae)*(ue-ye),ze===0)?!1:(We.h(((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze),!0);var Je=(a+x)/2,it=(y+b)/2,Tt=(x+E)/2,Pt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Je+Tt)/2,x=(it+Pt)/2,Tt=(Tt+E)/2,Pt=(Pt+ee)/2;var Nt=(b+Tt)/2,At=(x+Pt)/2,Bt=1/0,Rt=!1,Zt=0,Fn=0;return Gt.Eo(a,y,Je,it,b,x,Nt,At,ue,ge,ye,Le,ze,We)&&(a=(We.x-ue)*(We.x-ue)+(We.y-ge)*(We.y-ge),a<Bt&&(Bt=a,Rt=!0,Zt=We.x,Fn=We.y)),Gt.Eo(Nt,At,Tt,Pt,E,ee,ne,ae,ue,ge,ye,Le,ze,We)&&(We.x-ue)*(We.x-ue)+(We.y-ge)*(We.y-ge)<Bt&&(Rt=!0,Zt=We.x,Fn=We.y),Rt&&(We.x=Zt,We.y=Fn),Rt},Fo:function(a,y,x,b,E,ee,ne,ae,ue,ge,ye,Le,ze){var We=0;if(Gt.Yb(a,y,ne,ae,ze,x,b)&&Gt.Yb(a,y,ne,ae,ze,E,ee)){if(ze=(a-ne)*(ge-Le)-(y-ae)*(ue-ye),ze===0)return We;var Je=((a*ae-y*ne)*(ue-ye)-(a-ne)*(ue*Le-ge*ye))/ze,it=((a*ae-y*ne)*(ge-Le)-(y-ae)*(ue*Le-ge*ye))/ze;if(Je>=ye)return We;if((ue>ye?ue-ye:ye-ue)<(ge>Le?ge-Le:Le-ge)){if(y<ae?(ue=y,a=ae):(ue=ae,a=y),it<ue||it>a)return We}else if(a<ne?(ue=a,a=ne):ue=ne,Je<ue||Je>a)return We;0<ze?We++:0>ze&&We--}else{Je=(a+x)/2,it=(y+b)/2;var Tt=(x+E)/2,Pt=(b+ee)/2;E=(E+ne)/2,ee=(ee+ae)/2,b=(Je+Tt)/2,x=(it+Pt)/2,Tt=(Tt+E)/2,Pt=(Pt+ee)/2;var Nt=(b+Tt)/2,At=(x+Pt)/2;We+=Gt.Fo(a,y,Je,it,b,x,Nt,At,ue,ge,ye,Le,ze),We+=Gt.Fo(Nt,At,Tt,Pt,E,ee,ne,ae,ue,ge,ye,Le,ze)}return We},qh:function(a,y,x,b,E,ee,ne){return Gt.$(a,x)?(y<b?(x=y,y=b):x=b,ee<x?(ne.h(a,x),!1):ee>y?(ne.h(a,y),!1):(ne.h(a,ee),!0)):Gt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-ee)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,ee,ne,ae,ue){return Gt.B(a,x)&&Gt.B(y,b)?(ue.h(a,y),!1):Gt.$(E,ne)?Gt.$(a,x)?(Gt.qh(a,y,x,b,E,ee,ue),!1):Gt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ue):(ae=(ae-ee)/(ne-E),Gt.$(a,x)?(x=ae*(a-E)+ee,y<b?(E=y,y=b):E=b,x<E?(ue.h(a,E),!1):x>y?(ue.h(a,y),!1):(ue.h(a,x),!0)):(ne=(b-y)/(x-a),Gt.$(ae,ne)?(Gt.qh(a,y,x,b,E,ee,ue),!1):(E=(ne*a-ae*E+ee-y)/(ne-ae),Gt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(ue.h(b,y),!1):E>a?(ue.h(a,y),!1):(ue.h(E,y),!0)):Gt.qh(a,y,x,b,E,ne*(E-a)+y,ue))))},MA:function(a,y,x,b,E){return Gt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,ee,ne,ae,ue,ge){function ye(Tt,Pt){var Nt=(Tt-a)*(Tt-a)+(Pt-y)*(Pt-y);Nt<Le&&(Le=Nt,ue.h(Tt,Pt))}var Le=1/0;ye(ue.x,ue.y);var ze=0,We=0,Je=0,it=0;if(E<ne?(ze=E,We=ne):(ze=ne,We=E),ee<ae?(Je=E,it=ne):(Je=ne,it=E),ze=(We-ze)/2+ge,ge=(it-Je)/2+ge,E=(E+ne)/2,ee=(ee+ae)/2,ze===0||ge===0)return ue;if(.5>(x>a?x-a:a-x)){if(ze=1-(x-E)*(x-E)/(ze*ze),0>ze)return ue;ze=Math.sqrt(ze),b=-ge*ze+ee,ye(x,ge*ze+ee),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(ze*ze)+x*x/(ge*ge),ae=2*x*(y-x*a)/(ge*ge)-2*x*ee/(ge*ge)-2*E/(ze*ze),ze=ae*ae-4*b*(2*x*a*ee/(ge*ge)-2*y*ee/(ge*ge)+ee*ee/(ge*ge)+E*E/(ze*ze)-1+(y-x*a)*(y-x*a)/(ge*ge)),0>ze)return ue;ze=Math.sqrt(ze),ge=(-ae+ze)/(2*b),ye(ge,x*ge-x*a+y),ze=(-ae-ze)/(2*b),ye(ze,x*ze-x*a+y)}return ue},Ff:function(a,y,x,b,E,ee,ne,ae,ue){var ge=1e21,ye=a,Le=y;if(Gt.Ve(a,y,a,b,E,ee,ne,ae,ue)){var ze=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee);ze<ge&&(ge=ze,ye=ue.x,Le=ue.y)}return Gt.Ve(x,y,x,b,E,ee,ne,ae,ue)&&(ze=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),ze<ge&&(ge=ze,ye=ue.x,Le=ue.y)),Gt.Ve(a,y,x,y,E,ee,ne,ae,ue)&&(y=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),y<ge&&(ge=y,ye=ue.x,Le=ue.y)),Gt.Ve(a,b,x,b,E,ee,ne,ae,ue)&&(a=(ue.x-E)*(ue.x-E)+(ue.y-ee)*(ue.y-ee),a<ge&&(ge=a,ye=ue.x,Le=ue.y)),ue.h(ye,Le),1e21>ge},us:function(a,y,x){return Gt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,ee,ne,ae){var ue=a+x,ge=y+b;return E===ne?(ee<ae?(ne=ee,ee=ae):ne=ae,a<=E&&E<=ue&&ne<=ge&&ee>=y):ee===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=ee&&ee<=ge&&ae<=ue&&E>=a):!!(qi(a,y,x,b,E,ee)||qi(a,y,x,b,ne,ae)||Gt.Rl(a,y,ue,y,E,ee,ne,ae)||Gt.Rl(ue,y,ue,ge,E,ee,ne,ae)||Gt.Rl(ue,ge,a,ge,E,ee,ne,ae)||Gt.Rl(a,ge,a,y,E,ee,ne,ae))},Rl:function(a,y,x,b,E,ee,ne,ae){return a===x&&y===b&&E===ne&&ee===ae?a===E&&y===ee:0>=Gt.Fl(a,y,x,b,E,ee)*Gt.Fl(a,y,x,b,ne,ae)&&0>=Gt.Fl(E,ee,ne,ae,a,y)*Gt.Fl(E,ee,ne,ae,x,b)},Fl:function(a,y,x,b,E,ee){return x-=a,b-=y,a=E-a,y=ee-y,ee=a*b-y*x,ee===0&&(ee=a*x+y*b,0<ee&&(ee=(a-x)*x+(y-b)*b,0>ee&&(ee=0))),ee},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,ee){var ne=Math.PI;ee||(b*=ne/180,E*=ne/180);var ae=b>E?-1:1;ee=[];var ue=ne/2,ge=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return ue=ge+ae*Math.min(b,ue),ae=a+x*Math.cos(ge),ge=y+x*Math.sin(ge),a+=x*Math.cos(ue),y+=x*Math.sin(ue),x=(ae+a)/2,ue=(ge+y)/2,ee.push([ae,ge,x,ue,x,ue,a,y]),ee;for(;1e-5<b;)E=ge+ae*Math.min(b,ue),ee.push(Gt.Vy(x,ge,E,a,y)),b-=Math.abs(E-ge),ge=E;return ee},Vy:function(a,y,x,b,E){var ee=(x-y)/2,ne=a*Math.cos(ee),ae=a*Math.sin(ee),ue=-ae,ge=ne*ne+ue*ue,ye=ge+ne*ne+ue*ae;return ge=4/3*(Math.sqrt(2*ge*ye)-ye)/(ne*ae-ue*ne),ae=ne-ge*ue,ne=ue+ge*ne,ue=-ne,ge=ee+y,ee=Math.cos(ge),ge=Math.sin(ge),[b+a*Math.cos(y),E+a*Math.sin(y),b+ae*ee-ne*ge,E+ae*ge+ne*ee,b+ae*ee-ue*ge,E+ae*ge+ue*ee,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,ee,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/ee)*ee+b;var ae=x;return x+E-a<E/2&&(ae=x+E),a=b,b+ee-y<ee/2&&(a=b+ee),ne.h(ae,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,ee=0>b;if(a<y)var ne=1,ae=0;else ne=0,ae=1;var ue=ne===0?a:y,ge=ne===0?x:b;return(ne===0?E:ee)&&(ge=-ge),ne=ae,x=ne===0?x:b,(ne===0?E:ee)&&(x=-x),Gt.az(ue,ne===0?a:y,ge,x,0,0)},az:function(a,y,x,b,E,ee){if(0<b)if(0<x){E=a*a,ee=y*y,a*=x;var ne=y*b,ae=-ee+ne,ue=-ee+Math.sqrt(a*a+ne*ne);y=ae;for(var ge=0;9999999999>ge&&(y=.5*(ae+ue),!(y===ae||y===ue));++ge){var ye=a/(y+E),Le=ne/(y+ee);if(ye=ye*ye+Le*Le-1,0<ye)ae=y;else if(0>ye)ue=y;else break}x=E*x/(y+E)-x,b=ee*b/(y+ee)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,ee=a*x,ee<b?(b=ee/b,ee=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+ee*ee)):x=Math.abs(x-a);return x},Ze:new pr,um:new pr,Mf:new pr,Nf:0,vm:100};Gt.za=Gt.AA;function Tn(a){cr(this),this.l=2,a===void 0&&(a=Tn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Tn.o?this.ee=new rn:(Tn.V===null&&(Tn.V=new rn().freeze()),this.ee=Tn.V),this.aq=this.ee.Ja,this.Ip=new $t().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ei,this.gg=io,this.Rk=this.Sk=NaN,this.Uf=yn}Tn.prototype.copy=function(){var a=new Tn;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===Tn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].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},Tn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Tn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Tn.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},Tn.prototype.ka=function(){if(Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Tn.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},Tn.prototype.Xa=function(a){if(!(a instanceof Tn))return!1;if(this.type!==a.type)return this.type===Tn.j&&a.type===Tn.o?Ml(this,a):a.type===Tn.j&&this.type===Tn.o?Ml(a,this):!1;if(this.type===Tn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)};function Ml(a,y){return a.type!==Tn.j||y.type!==Tn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Gt.B(a.startX,y.startX)&&Gt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ui&&Gt.B(a.endX,y.endX)&&Gt.B(a.endY,y.endY))))}Tn.ia=function(a){return a.toString()},Tn.prototype.qb=function(a){a.classType===Tn&&(this.type=a)},Tn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Tn.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 Tn.u:var y=new $t(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 Tn.F:if(y=new $t(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 Tn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var ee=x[E];0<E&&(y+=" x "),ee.isFilled&&(y+="F "),y+=ee.toString(a)}return y;default:return this.type.toString()}},Tn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Tn.parse=function(a,y){function x(){return it>=Bt-1?!0:ge[it+1].match(Rt)!==null}function b(){return it++,ge[it]}function E(Br){var Nr=parseFloat(b()),bi=parseFloat(b());Tt===Tt.toLowerCase()&&(Nr=At.x+Nr,bi=At.y+bi),Br.h(Nr,bi)}function ee(){return E(At),At}function ne(){return E(Nt),Nt}function ae(){var Br=Pt.toLowerCase();return Br!=="c"&&Br!=="s"&&Br!=="q"&&Br!=="t"?At:new lt(2*At.x-Nt.x,2*At.y-Nt.y)}y===void 0&&(y=!1);var ue=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ue,"$1 $2"),a=a.replace(ue,"$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 ge=a.split(" ");for(a=0;a<ge.length;a++){var ye=ge[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){ue=er();for(var Le="",ze=!1,We=0;We<ye.length;We++){var Je=ye[We];Je!=="."||ze?Je==="."?(ue.push(Le),Le="."):Le+=Je:(ze=!0,Le+=Je)}for(ue.push(Le),ge.splice(a,1),ye=0;ye<ue.length;ye++)ge.splice(a+ye,0,ue[ye]);a+=ue.length-1,_n(ue)}}var it=-1,Tt="",Pt="";ue=new lt(0,0);var Nt=new lt(0,0),At=new lt(0,0),Bt=ge.length;a=A1(null),ze=Le=ye=!1,We=!0,Je=null;for(var Rt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=Bt-1);)if(Pt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":We=!0,Le=ye=!1;break;case"M":for(Je=ee(),a.mc===null||We===!0?(Dd(a,Je.x,Je.y,ye,!Le,ze),We=!1):a.moveTo(Je.x,Je.y),ue.assign(At);!x();)Je=ee(),a.lineTo(Je.x,Je.y);break;case"L":for(;!x();)Je=ee(),a.lineTo(Je.x,Je.y);break;case"H":for(;!x();)At=new lt((Tt===Tt.toLowerCase()?At.x:0)+parseFloat(b()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new lt(At.x,(Tt===Tt.toLowerCase()?At.y:0)+parseFloat(b())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){Je=new lt,E(Je);var Zt=ne(),Fn=ee();wh(a,Je.x,Je.y,Zt.x,Zt.y,Fn.x,Fn.y)}break;case"S":for(;!x();)Je=ae(),Zt=ne(),Fn=ee(),wh(a,Je.x,Je.y,Zt.x,Zt.y,Fn.x,Fn.y);break;case"Q":for(;!x();)Je=ne(),Zt=ee(),Im(a,Je.x,Je.y,Zt.x,Zt.y);break;case"T":for(;!x();)Nt=Je=ae(),Zt=ee(),Im(a,Je.x,Je.y,Zt.x,Zt.y);break;case"B":for(;!x();){Je=parseFloat(b()),Zt=parseFloat(b()),Fn=parseFloat(b());var or=parseFloat(b()),$n=parseFloat(b()),Cn=$n,fn=!1;x()||(Cn=parseFloat(b()),x()||(fn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(Fn+=At.x,or+=At.y),a.arcTo(Je,Zt,Fn,or,$n,Cn,fn)}break;case"A":for(;!x();)Je=Math.abs(parseFloat(b())),Zt=Math.abs(parseFloat(b())),Fn=parseFloat(b()),$n=or=!1,fn=Cn=0,Cn=b(),Cn.length===1?(or=!!parseFloat(Cn),$n=!!parseFloat(b()),Cn=parseFloat(b())):Cn.length===2?(or=!!parseFloat(Cn[0]),$n=!!parseFloat(Cn[1]),Cn=parseFloat(b())):(or=!!parseFloat(Cn[0]),$n=!!parseFloat(Cn[1]),Cn=parseFloat(Cn.slice(2))),fn=parseFloat(b()),Tt===Tt.toLowerCase()&&(Cn=At.x+Cn,fn=At.y+fn),At.h(Cn,fn),Px(a,Je,Zt,Fn,or,$n,Cn,fn);break;case"Z":bx(a),At.assign(ue);break;case"F":for(Je="",Zt=1;ge[it+Zt];)if(ge[it+Zt]==="0")ze=!0,Zt++;else if(ge[it+Zt].match(/[Uu]/)!==null)Zt++;else if(ge[it+Zt].match(Rt)===null)Zt++;else{Je=ge[it+Zt];break}Je.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Je="",Zt=1;ge[it+Zt];)if(ge[it+Zt].match(/[Ff]/)!==null)Zt++;else if(ge[it+Zt].match(Rt)===null)Zt++;else{Je=ge[it+Zt];break}Je.match(/[Mm]/)?Le=!0:a.mc.isShadowed=!1}if(ue=a.os,Rm=a,y)for(y=ue.figures.iterator;y.next();)y.value.isFilled=!0;return ue},Tn.Ha=function(a,y){for(var x=a.length,b=lt.alloc(),E=0;E<x;E++){var ee=a[E];b.x=ee[0],b.y=ee[1],y.Ga(b),ee[0]=b.x,ee[1]=b.y,b.x=ee[2],b.y=ee[3],y.Ga(b),ee[2]=b.x,ee[3]=b.y,b.x=ee[4],b.y=ee[5],y.Ga(b),ee[4]=b.x,ee[5]=b.y,b.x=ee[6],b.y=ee[7],y.Ga(b),ee[6]=b.x,ee[7]=b.y}lt.free(b)},Tn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Tn.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},Tn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Tn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var ee=0;ee<E;ee++){var ne=b[ee];ne._isInvalidBounds=!1,ne.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),Ou(this,a,!1),xi(a,0,0,0,0),a.freeze()},Tn.prototype.ix=function(){var a=new $t;return Ou(this,a,!0),a};function Ou(a,y,x){switch(a.type){case Tn.j:case Tn.u:case Tn.F:x?y.h(a.od,a.pd,0,0):xi(y,a.od,a.pd,0,0),xi(y,a.Dc,a.Ec,0,0);break;case Tn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var ee=a[E];x&&E===0?y.h(ee.startX,ee.startY,0,0):xi(y,ee.startX,ee.startY,0,0);for(var ne=ee.segments.s,ae=ne.length,ue=ee.startX,ge=ee.startY,ye=0;ye<ae;ye++){var Le=ne[ye];switch(Le.type){case Ui:case Fo:ue=Le.endX,ge=Le.endY,xi(y,ue,ge,0,0);break;case _o:Gt.Dl(ue,ge,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case ds:Gt.iv(ue,ge,Le.point1X,Le.point1Y,Le.endX,Le.endY,.5,y),ue=Le.endX,ge=Le.endY;break;case wo:case ws:var ze=Le.type===wo?Ga(Le,ee):js(Le,ee,ue,ge),We=ze.length;if(We===0){ue=Le.type===wo?Le.centerX:Le.endX,ge=Le.type===wo?Le.centerY:Le.endY,xi(y,ue,ge,0,0);break}Le=null;for(var Je=0;Je<We;Je++)Le=ze[Je],Gt.Dl(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.5,y);Le!==null&&(ue=Le[6],ge=Le[7]);break;default:jt("Unknown Segment type: "+Le.type)}}}break;default:jt("Unknown Geometry type: "+a.type)}}Tn.prototype.normalize=function(){this._isFrozen&&ln(this);var a=this.ix();return this.offset(-a.x,-a.y),new lt(-a.x,-a.y)},Tn.prototype.offset=function(a,y){return this._isFrozen&&ln(this),this.transform(1,0,0,1,a,y),this},Tn.prototype.scale=function(a,y){return this._isFrozen&&ln(this),this.transform(a,0,0,y,0,0),this},Tn.prototype.rotate=function(a,y,x){this._isFrozen&&ln(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=jr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),jr.free(b),this},qe=Tn.prototype,qe.transform=function(a,y,x,b,E,ee){switch(this.type){case Tn.j:case Tn.u:case Tn.F:var ne=this.od,ae=this.pd;this.od=ne*a+ae*x+E,this.pd=ne*y+ae*b+ee,ne=this.Dc,ae=this.Ec,this.Dc=ne*a+ae*x+E,this.Ec=ne*y+ae*b+ee;break;case Tn.o:for(var ue=this.figures.s,ge=ue.length,ye=0;ye<ge;ye++){var Le=ue[ye];ne=Le.startX,ae=Le.startY,Le.startX=ne*a+ae*x+E,Le.startY=ne*y+ae*b+ee,Le=Le.segments.s;for(var ze=Le.length,We=0;We<ze;We++){var Je=Le[We];switch(Je.type){case Ui:case Fo:ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case _o:ne=Je.point1X,ae=Je.point1Y,Je.point1X=ne*a+ae*x+E,Je.point1Y=ne*y+ae*b+ee,ne=Je.point2X,ae=Je.point2Y,Je.point2X=ne*a+ae*x+E,Je.point2Y=ne*y+ae*b+ee,ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case ds:ne=Je.point1X,ae=Je.point1Y,Je.point1X=ne*a+ae*x+E,Je.point1Y=ne*y+ae*b+ee,ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee;break;case wo:ne=Je.centerX,ae=Je.centerY,Je.centerX=ne*a+ae*x+E,Je.centerY=ne*y+ae*b+ee,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.startAngle+=ne),0>a&&(Je.startAngle=180-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),0>b&&(Je.startAngle=-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY!==void 0&&(Je.radiusY*=Math.sqrt(y*y+b*b));break;case ws:if(ne=Je.endX,ae=Je.endY,Je.endX=ne*a+ae*x+E,Je.endY=ne*y+ae*b+ee,Je.radiusX===0||Je.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.xAxisRotation+=ne),0>a&&(Je.xAxisRotation=180-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),0>b&&(Je.xAxisRotation=-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY*=Math.sqrt(y*y+b*b);break;default:jt("Unknown Segment type: "+Je.type)}}}}return this._isInvalidBounds=!0,this},qe.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,ee=this.Ec;switch(this.type){case Tn.j:return Gt.Yb(x,b,E,ee,y,a.x,a.y);case Tn.u:var ne=$t.allocAt(Math.min(x,E)-y,Math.min(b,ee)-y,Math.abs(E-x)+2*y,Math.abs(ee-b)+2*y);return a=ne.ca(a),$t.free(ne),a;case Tn.F:ne=Math.min(x,E)-y;var ae=Math.min(b,ee)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(ee-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),ae=a.y-(ae+y),1>=ne*ne/(x*x)+ae*ae/(y*y));case Tn.o:return ua(this,a,y,!0,!1);default:return!1}};function ua(a,y,x,b,E){var ee=y.x;y=y.y;for(var ne=a.bounds.x-20,ae=0,ue,ge,ye,Le,ze=a.figures.s,We=ze.length,Je=0;Je<We;Je++){var it=ze[Je],Tt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(ee,y,x))return!0;var Pt=it.segments;ue=it.startX,ge=it.startY;for(var Nt=ue,At=ge,Bt=Pt.s,Rt=0;Rt<=Pt.length;Rt++){var Zt=void 0;if(Rt!==Pt.length){Zt=Bt[Rt];var Fn=Zt.type;a=Zt.endX,Le=Zt.endY}else Fn=Ui,a=Nt,Le=At;switch(Fn){case Fo:if(Nt=Us(ee,y,ne,y,ue,ge,Nt,At),isNaN(Nt))return!0;ae+=Nt,Nt=a,At=Le;break;case Ui:if(ue=Us(ee,y,ne,y,ue,ge,a,Le),isNaN(ue))return!0;ae+=ue;break;case _o:ye=Gt.Fo(ue,ge,Zt.point1X,Zt.point1Y,Zt.point2X,Zt.point2Y,a,Le,ne,y,ee,y,.5),ae+=ye;break;case ds:ye=Gt.Fo(ue,ge,(ue+2*Zt.point1X)/3,(ge+2*Zt.point1Y)/3,(2*Zt.point1X+a)/3,(2*Zt.point1Y+Le)/3,a,Le,ne,y,ee,y,.5),ae+=ye;break;case wo:case ws:Fn=Zt.type===wo?Ga(Zt,it):js(Zt,it,ue,ge);var or=Fn.length;if(or===0){if(ue=Us(ee,y,ne,y,ue,ge,Zt.type===wo?Zt.centerX:Zt.endX,Zt.type===wo?Zt.centerY:Zt.endY),isNaN(ue))return!0;ae+=ue;break}Zt=null;for(var $n=0;$n<or;$n++){if(Zt=Fn[$n],$n===0){if(ye=Us(ee,y,ne,y,ue,ge,Zt[0],Zt[1]),isNaN(ye))return!0;ae+=ye}ye=Gt.Fo(Zt[0],Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],ne,y,ee,y,.5),ae+=ye}Zt!==null&&(a=Zt[6],Le=Zt[7]);break;default:jt("Unknown Segment type: "+Zt.type)}ue=a,ge=Le}if(Tt){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(it.ca(ee,y,E?x:x+2))return!0}return!1}function Us(a,y,x,b,E,ee,ne,ae){if(Gt.Yb(E,ee,ne,ae,.05,a,y))return NaN;var ue=(a-x)*(ee-ae);if(ue===0)return 0;var ge=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-ee*ne))/ue;if(y=(a*b-y*x)*(ee-ae)/ue,ge>=a)return 0;if((E>ne?E-ne:ne-E)<(ee>ae?ee-ae:ae-ee)){if(ee<ae){if(y<ee||y>ae)return 0}else if(y<ae||y>ee)return 0}else if(E<ne){if(ge<E||ge>ne)return 0}else if(ge<ne||ge>E)return 0;return 0<ue?1:-1}function Hl(a,y,x,b){a=a.figures.s;for(var E=a.length,ee=0;ee<E;ee++)if(a[ee].ca(y,x,b))return!0;return!1}qe.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new lt),this.type===Tn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,ee=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var ue=b[ae],ge=ue.length;for(a=0;a<ge;a++){var ye=ue[a];if(ne+ye>=ee)return b=ee-ne,b=ye===0?0:b/ye,x=x[ae],ae=x[2*a],E=x[2*a+1],y.h(ae+(x[2*a+2]-ae)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},qe.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Tn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,ee=0,ne=0;ne<b;ne++){var ae=x[ne],ue=ae.length;for(a=0;a<ue;a++){var ge=ae[a];if(ee+ge>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;ee+=ge}}return NaN},qe.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Tn.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,b=this.flattenedLengths,E=x.length,ee=this.flattenedTotalLength*a,ne=0,ae=0;ae<E;ae++){var ue=b[ae],ge=ue.length;for(a=0;a<ge;a++){var ye=ue[a];if(ne+ye>=ee)return b=ee-ne,b=ye===0?0:b/ye,ye=x[ae],x=ye[2*a],ae=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=ae+(a-ae)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ae)?0:1>Math.abs(E-x)?0<=a-ae?90:270:1>Math.abs(a-ae)?0<=E-x?0:180:180*Math.atan2(a-ae,E-x)/Math.PI,y;ne+=ye}}return y},qe.xx=function(a){if(this.type===Tn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var ee=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),ee<=ne?ne===y?0:1:ee>=b?b===y?0:1:Math.abs(ee-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var ae=lt.alloc();return Gt.qh(y,x,b,E,ee,a,ae),a=ae.x,ee=ae.y,lt.free(ae),Math.sqrt(((a-y)*(a-y)+(ee-x)*(ee-x))/ne)}}else if(this.type===Tn.u){ne=this.startX,ae=this.startY;var ue=this.endX;if(E=this.endY,ne!==ue||ae!==E){y=ue-ne,x=E-ae,ee=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),ue),a=Math.min(Math.max(a,ae),E),ne=Math.abs(b-ne),ue=Math.abs(b-ue),ae=Math.abs(a-ae),E=Math.abs(a-E);var ge=Math.min(ne,ue,ae,E);if(ge===ae)return b/ee;if(ge===ue)return(y+a)/ee;if(ge===E)return(2*y+x-b)/ee;if(ge===ne)return(2*y+2*x-a)/ee}}else{y=this.flattenedSegments,x=this.flattenedLengths,ee=this.flattenedTotalLength,b=lt.alloc(),E=1/0,ae=ne=0,ue=y.length;for(var ye=ge=0,Le=0;Le<ue;Le++)for(var ze=y[Le],We=x[Le],Je=ze.length,it=0;it<Je;it+=2){var Tt=ze[it],Pt=ze[it+1];if(it!==0){Gt.qh(ge,ye,Tt,Pt,a.x,a.y,b);var Nt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Nt<E&&(E=Nt,ne=ae,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),ae+=We[(it-2)/2]}ge=Tt,ye=Pt}return lt.free(b),a=ne/ee,0>a?0:1<a?1:a}return 0};function Fu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Tn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Tn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Tn.F){var ee=new Oo;ee.startX=a.endX,ee.startY=(a.startY+a.endY)/2;var ne=new gi(wo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,ee.add(ne),a=Ga(ne,ee),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=ee.startX,ee=ee.startY;for(var ae=0;ae<E;ae++){var ue=a[ae];Gt.Qe(ne,ee,ue[2],ue[3],ue[4],ue[5],ue[6],ue[7],.5,b),ne=ue[6],ee=ue[7]}}y.push(b),x.push(Du(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,ee=E.startY,ae=ne,ue=ee;for(var ge=E.segments.s,ye=ge.length,Le=0;Le<ye;Le++){var ze=ge[Le];switch(ze.type){case Fo:4<=b.length&&(y.push(b),x.push(Du(b))),b=[],b.push(ze.endX),b.push(ze.endY),ne=ze.endX,ee=ze.endY,ae=ne,ue=ee;break;case Ui:b.push(ze.endX),b.push(ze.endY),ne=ze.endX,ee=ze.endY;break;case _o:Gt.Qe(ne,ee,ze.point1X,ze.point1Y,ze.point2X,ze.point2Y,ze.endX,ze.endY,.5,b),ne=ze.endX,ee=ze.endY;break;case ds:Gt.ep(ne,ee,ze.point1X,ze.point1Y,ze.endX,ze.endY,.5,b),ne=ze.endX,ee=ze.endY;break;case wo:var We=Ga(ze,E),Je=We.length;if(Je===0){b.push(ze.centerX),b.push(ze.centerY),ne=ze.centerX,ee=ze.centerY;break}for(var it=0;it<Je;it++){var Tt=We[it];Gt.Qe(ne,ee,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],ee=Tt[7]}break;case ws:if(We=js(ze,E,ne,ee),Je=We.length,it=ze.endX,Tt=ze.endY,Je===0){b.push(it),b.push(Tt),ne=it,ee=Tt;break}for(it=0;it<Je;it++)Tt=We[it],Gt.Qe(ne,ee,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],ee=Tt[7];break;default:jt("Segment not of valid type: "+ze.type)}ze.isClosed&&(b.push(ae),b.push(ue))}4<=b.length&&(y.push(b),x.push(Du(b)))}}}function Du(a){for(var y=[],x=0,b=0,E=a.length,ee=0;ee<E;ee+=2){var ne=a[ee],ae=a[ee+1];ee!==0&&y.push(Math.sqrt(Tr(x,b,ne,ae))),x=ne,b=ae}return y}qe.add=function(a){return this.ee.add(a),this},qe.pm=function(a,y,x,b,E,ee,ne,ae){return this._isFrozen&&ln(this),this.fg=new Ln(a,y,E,ee).freeze(),this.gg=new Ln(x,b,ne,ae).freeze(),this},zt.Object.defineProperties(Tn.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 Fu(this),this.tk}},flattenedLengths:{get:function(){return Fu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Tn.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===Tn.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,b=a=0;b<x;b++)for(var E=y[b],ee=E.length,ne=0;ne<ee;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&ln(this,a),this.na=a,a===Tn.o?this.ee=new rn:(Tn.V===null&&(Tn.V=new rn().freeze()),this.ee=Tn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&ln(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&ln(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&ln(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&ln(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Tn.prototype.setSpots=Tn.prototype.pm,Tn.prototype.add=Tn.prototype.add,Tn.prototype.getFractionForPoint=Tn.prototype.xx,Tn.prototype.getPointAndAngleAlongPath=Tn.prototype.Qu,Tn.prototype.getAngleAlongPath=Tn.prototype.wx,Tn.prototype.getPointAlongPath=Tn.prototype.Pu,Tn.prototype.containsPoint=Tn.prototype.ca,Tn.prototype.transform=Tn.prototype.transform,Tn.prototype.rotate=Tn.prototype.rotate,Tn.prototype.scale=Tn.prototype.scale,Tn.prototype.offset=Tn.prototype.offset,Tn.prototype.normalize=Tn.prototype.normalize,Tn.prototype.computeBoundsWithoutOrigin=Tn.prototype.ix,Tn.prototype.equalsApprox=Tn.prototype.Xa,Tn.className="Geometry",Tn.j=new hn(Tn,"Line",0),Tn.u=new hn(Tn,"Rectangle",1),Tn.F=new hn(Tn,"Ellipse",2),Tn.o=new hn(Tn,"Path",3),Tn.V=null,Tn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Tn.className="Geometry",Tn.stringify=Tn.ia,Tn.fillPath=Tn.nb,Tn.parse=Tn.parse,Tn.Line=Tn.j,Tn.Rectangle=Tn.u,Tn.Ellipse=Tn.F,Tn.Path=Tn.o;function Oo(a,y,x,b,E){cr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new rn,this.sr=this.pl.Ja,this.fw=null}Oo.prototype.copy=function(){var a=new Oo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var ee=y[E].copy();b.add(ee)}return a.sr=this.sr,a.fw=this.fw,a},qe=Oo.prototype,qe.Xa=function(a){if(!(a instanceof Oo&&Gt.B(this.startX,a.startX)&&Gt.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 b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},qe.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,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},qe.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},qe.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},qe.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},qe.add=function(a){return this.pl.add(a),this},qe.ca=function(a,y,x){for(var b=this.startX,E=this.startY,ee=b,ne=E,ae=this.segments.s,ue=ae.length,ge=0;ge<ue;ge++){var ye=ae[ge];switch(ye.type){case Fo:ee=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Ui:if(Gt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case _o:if(Gt.cs(b,E,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case ds:if(Gt.jv(b,E,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case wo:case ws:var Le=ye.type===wo?Ga(ye,this):js(ye,this,b,E),ze=Le.length,We=ye.type===wo?ye.centerX:ye.endX,Je=ye.type===wo?ye.centerY:ye.endY;if(ze===0){if(Gt.Yb(b,E,We,Je,x,a,y))return!0;b=We,E=Je;break}for(We=null,Je=0;Je<ze;Je++)if(We=Le[Je],Je===0&&Gt.Yb(b,E,We[0],We[1],x,a,y)||Gt.cs(We[0],We[1],We[2],We[3],We[4],We[5],We[6],We[7],.5,a,y,x))return!0;We!==null&&(b=We[6],E=We[7]);break;default:jt("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==ee||E!==ne)&&Gt.Yb(b,E,ee,ne,x,a,y))return!0}return!1},zt.Object.defineProperties(Oo.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&&ln(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&ln(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function gi(a,y,x,b,E,ee,ne,ae){cr(this),a===void 0&&(a=Ui),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),ee===void 0&&(ee=0),ne===void 0&&(ne=0),a===ws?(a=ee%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),ae&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===wo&&(ee=Math.max(ee,0)),this.Wh=ee,typeof ne=="number"?(a===wo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}gi.prototype.copy=function(){var a=new gi;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},qe=gi.prototype,qe.Xa=function(a){if(!(a instanceof gi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case Ui:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY);case _o:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y)&&Gt.B(this.point2X,a.point2X)&&Gt.B(this.point2Y,a.point2Y);case ds:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y);case wo:return Gt.B(this.startAngle,a.startAngle)&&Gt.B(this.sweepAngle,a.sweepAngle)&&Gt.B(this.centerX,a.centerX)&&Gt.B(this.centerY,a.centerY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);case ws:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Gt.B(this.xAxisRotation,a.xAxisRotation)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);default:return!1}},qe.qb=function(a){a.classType===gi&&(this.type=a)},qe.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ui:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case _o: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 ds: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 wo: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 ws: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":"")},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.close=function(){return this.isClosed=!0,this};function Ga(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,ee=Gt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=jr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Tn.Ha(ee,ne),jr.free(ne)}for(x=ee.length,b=0;b<x;b++)ne=ee[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=ee,a.ae}function js(a,y,x,b){function E(it,Tt,Pt,Nt){return(it*Nt<Tt*Pt?-1:1)*Math.acos((it*Pt+Tt*Nt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(Pt*Pt+Nt*Nt)))}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 ee=a.Pg;y===0&&(y=1e-4),ee===0&&(ee=1e-4);var ne=Math.PI/180*a.Ne,ae=a.isLargeArc,ue=a.isClockwiseArc,ge=a.Dc,ye=a.Ec,Le=Math.cos(ne),ze=Math.sin(ne),We=Le*(x-ge)/2+ze*(b-ye)/2;ne=-ze*(x-ge)/2+Le*(b-ye)/2;var Je=We*We/(y*y)+ne*ne/(ee*ee);return 1<Je&&(y*=Math.sqrt(Je),ee*=Math.sqrt(Je)),Je=(ae===ue?-1:1)*Math.sqrt((y*y*ee*ee-y*y*ne*ne-ee*ee*We*We)/(y*y*ne*ne+ee*ee*We*We)),isNaN(Je)&&(Je=0),ae=Je*y*ne/ee,Je=Je*-ee*We/y,isNaN(ae)&&(ae=0),isNaN(Je)&&(Je=0),x=(x+ge)/2+Le*ae-ze*Je,b=(b+ye)/2+ze*ae+Le*Je,ye=E(1,0,(We-ae)/y,(ne-Je)/ee),Le=(We-ae)/y,ge=(ne-Je)/ee,We=(-We-ae)/y,ae=(-ne-Je)/ee,ne=E(Le,ge,We,ae),We=(Le*We+ge*ae)/(Math.sqrt(Le*Le+ge*ge)*Math.sqrt(We*We+ae*ae)),-1>=We?ne=Math.PI:1<=We&&(ne=0),!ue&&0<ne&&(ne-=2*Math.PI),ue&&0>ne&&(ne+=2*Math.PI),ue=y>ee?1:y/ee,We=y>ee?ee/y:1,y=Gt.jx(0,0,y>ee?y:ee,ye,ye+ne,!0),ee=jr.alloc(),ee.reset(),ee.translate(x,b),ee.rotate(a.Ne,0,0),ee.scale(ue,We),Tn.Ha(y,ee),jr.free(ee),a.ae=y,a.ae}zt.Object.defineProperties(gi.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&&ln(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Nn(a,">= zero",gi,"radiusX"),this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Nn(a,">= zero",gi,"radiusY"),this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(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&&ln(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&&ln(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&&ln(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&&ln(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),gi.prototype.equalsApprox=gi.prototype.Xa;var Fo=new hn(gi,"Move",0),Ui=new hn(gi,"Line",1),_o=new hn(gi,"Bezier",2),ds=new hn(gi,"QuadraticBezier",3),wo=new hn(gi,"Arc",4),ws=new hn(gi,"SvgArc",4);gi.className="PathSegment",gi.Move=Fo,gi.Line=Ui,gi.Bezier=_o,gi.QuadraticBezier=ds,gi.Arc=wo,gi.SvgArc=ws;function va(){this.H=null,this.xu=new lt(0,0).freeze(),this.mt=new lt(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}va.prototype.copy=function(){var a=new va;return this.clone(a)},va.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},va.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},va.prototype.So=function(a,y){var x=this.diagram;return x===null||bp(x,a,y),y},va.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bp(x,a,y),y.assign(x.Ps(y))),y},zt.Object.defineProperties(va.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}}}),va.prototype.getMultiTouchDocumentPoint=va.prototype.Bz,va.prototype.getMultiTouchViewPoint=va.prototype.So,va.className="InputEvent";function au(){this.H=null,this.xa="",this.ar=this.Lr=null}au.prototype.copy=function(){var a=new au;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},au.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},zt.Object.defineProperties(au.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}}}),au.className="DiagramEvent";function oo(){this.Fm=no,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;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=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=sn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=sn(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===no?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Fr(this.object)),this.oldValue!==null&&(a+=" old: "+Fr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Fr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},zt.Object.defineProperties(oo.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===Ea&&(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}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var Ea=new hn(oo,"Transaction",-1),no=new hn(oo,"Property",0),bo=new hn(oo,"Insert",1),Eo=new hn(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=Ea,oo.Property=no,oo.Insert=bo,oo.Remove=Eo;function zo(){this.o=new rn().freeze(),this.xa="",this.j=!1}zo.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 b=this.changes.M(x);b!==null&&(y+=`
|
|
`+b.toString())}}return y},zo.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()},zo.prototype.canUndo=function(){return this.isComplete},zo.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()}},zo.prototype.canRedo=function(){return this.isComplete},zo.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()}},zo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new tn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===no&&b.object){var E=y.get(b.object);E||(E=new tn,y.set(b.object,E));var ee=E.get(b.propertyName);ee===null?E.set(b.propertyName,-1):(0<ee&&a.cd(ee,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},zt.Object.defineProperties(zo.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}}}),zo.prototype.optimize=zo.prototype.ak,zo.prototype.redo=zo.prototype.redo,zo.prototype.canRedo=zo.prototype.canRedo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.clear=zo.prototype.clear,zo.className="Transaction";function ho(){this.Pt=new an,this.Jd=!1,this.u=new rn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new rn().freeze(),this.hl=new rn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ho.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
`+this.history.M(b).toString(a-1);return y},ho.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},ho.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},qe=ho.prototype,qe.Xw=function(a){this.Pt.add(a)},qe.Rx=function(a){this.Pt.remove(a)},qe.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},qe.eb=function(a){return a===void 0&&(a=""),Bu(this,!0,a)},qe.Kf=function(){return Bu(this,!1,"")};function Bu(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Yn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var ee=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(ee=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(ee=y.M(0),ee!==null&&ee.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=ee,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}qe.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()}},ho.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ho.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){Yn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ho.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ho.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){Yn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ho.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new oo;for(b.change=Ea,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ho.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new zo);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||Yn("Change not within a transaction: "+x.toString()))}},ho.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},zt.Object.defineProperties(ho.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}}}),ho.prototype.handleChanged=ho.prototype.Tu,ho.prototype.redo=ho.prototype.redo,ho.prototype.undo=ho.prototype.undo,ho.prototype.canUndo=ho.prototype.canUndo,ho.prototype.discardHistoryAfterIndex=ho.prototype.lx,ho.prototype.rollbackTransaction=ho.prototype.Kf,ho.prototype.commitTransaction=ho.prototype.eb,ho.prototype.startTransaction=ho.prototype.Ea,ho.prototype.removeModel=ho.prototype.Rx,ho.prototype.addModel=ho.prototype.Xw,ho.prototype.clear=ho.prototype.clear,ho.className="UndoManager";function fi(){cr(this),this.H=cu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new va,this.Zr=-1}fi.prototype.toString=function(){return this.name!==""?this.name+" Tool":sr(this.constructor)},fi.prototype.updateAdornments=function(){},fi.prototype.canStart=function(){return this.isEnabled},fi.prototype.doStart=function(){},fi.prototype.doActivate=function(){this.isActive=!0},fi.prototype.doDeactivate=function(){this.isActive=!1},fi.prototype.doStop=function(){},fi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},fi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},fi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},fi.prototype.doMouseMove=function(){},fi.prototype.doMouseUp=function(){this.stopTool()},fi.prototype.doMouseWheel=function(){},fi.prototype.canStartMultiTouch=function(){return!0},fi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,ee=b.y-x.y;a.Jw=Math.sqrt(E*E+ee*ee),y.bubbles=!1}lt.free(x),lt.free(b)},fi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,ee=b.y-x.y;ee=Math.sqrt(E*E+ee*ee)/a.Jw,E=new lt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),ee*=a.Bw;var ne=a.commandHandler;if(ee!==a.scale&&ne.canResetZoom(ee)){var ae=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(ee),a.zoomPoint=ae}y.bubbles=!1}lt.free(x),lt.free(b)},fi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},fi.prototype.doKeyUp=function(){},fi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},fi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},fi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ni?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||(ni?y.meta:y.control)||y.shift||a.clearSelection()}},fi.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,uf(a,b,x),b.handled};function uf(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){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,b){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)}}}fi.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var ee=a.Ck,ne=ee;for(a.Ck=b,this.doCurrentObjectChanged(ee,b),y.handled=!1;ee!==null;){var ae=ee.mouseLeave;if(ae!==null&&(b===ee||b!==null&&b.rg(ee)||(ae(y,ee,b),E=!0,y.handled)))break;ee=ee.panel}for(ee=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(ee===b||ee!==null&&ee.rg(b)||(ne(y,b,ee),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(ee=b,ne="";ee!==null&&(ne=ee.cursor,ne==="");)ee=ee.panel;for(a.currentCursor=ne,y.handled=!1,ee=b;ee!==null&&(b=ee.mouseOver,!(b!==null&&(b(y,ee),E=!0,y.handled)));)ee=ee.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},fi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},fi.prototype.doCurrentObjectChanged=function(){},fi.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===su&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===su&&!y.control){b=a.position.copy();var ee=y.event;E=ee.deltaMode;var ne=ee.deltaX;ee=ee.deltaY;var ae="pixel";if(ne===0&&ee===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ae,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ae,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ae="pixel";break;case 1:ae="line";break;case 2:ae="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(ae,0<ne?"right":"left",Math.abs(ne))),ee!==0&&a.allowVerticalScroll&&(ee*=a.scrollVerticalLineChange/16,a.scroll(ae,0<ee?"down":"up",Math.abs(ee)))}this.doWheelChange(a,b,y)}}},fi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},fi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Jt(function(){x.doWaitAfter(b)},a)},fi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&vn.clearTimeout(this.Zr),this.Zr=-1},fi.prototype.doWaitAfter=function(){},fi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof mi);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},fi.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},zt.Object.defineProperties(fi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Yt&&(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}}}),fi.prototype.startTransaction=fi.prototype.Ea,fi.className="Tool";function Ji(){fi.call(this),this.name="ToolManager",this.hb=new rn,this.ob=new rn,this.Hb=new rn,this.F=this.V=850,this.o=new mn(2,2).ja(),this.Ha=5e3,this.ia=su,this.u=_h,this.Mp=this.j=null,this.zj=-1}Kt(Ji,fi),Ji.prototype.initializeStandardTools=function(){},Ji.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof mi&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ji.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Nl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===su?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=su)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ji.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Cc(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Cc(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ji.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof mi&&(y===a||y.rg(a))||this.hideToolTip()},Ji.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()))},Ji.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)},Ji.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 mi)||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()},Ji.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof mi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Zl&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(vn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Jt(function(){E.hideToolTip()},a)}},Ji.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Ji.prototype.hideToolTip=function(){this.zj!==-1&&(vn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof mi?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ji.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Ji.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ji.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ji.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ji.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Ji.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Ji.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)},zt.Object.defineProperties(Ji.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 mi?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}}}),Ji.prototype.replaceStandardTool=Ji.prototype.gb;var su=new hn(Ji,"WheelScroll",0),ih=new hn(Ji,"WheelZoom",1),Ec=new hn(Ji,"WheelNone",2),_h=new hn(Ji,"GestureZoom",3),Nl=new hn(Ji,"GestureCancel",4),Iu=new hn(Ji,"GestureNone",5);Ji.className="ToolManager",Ji.WheelScroll=su,Ji.WheelZoom=ih,Ji.WheelNone=Ec,Ji.GestureZoom=_h,Ji.GestureCancel=Nl,Ji.GestureNone=Iu;function lo(){fi.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 lt(NaN,NaN),this.Fr=new lt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new an().freeze(),this.ia=new he,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var nl;Kt(lo,fi),lo.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},lo.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},lo.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,(ni?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},lo.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),ha=null,this.isActive=!0,this.tl.set(a.position),zh(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&&as(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ha=this,oh=this.diagram,this.doSimulatedDragOut()))};function zh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof En?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Os,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}lo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},lo.prototype.Pd=function(a){return a===void 0?new Uu(zn):this.isGridSnapEnabled?new Uu(new lt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Uu(a.copy())},lo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Wl(this),$h(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<nl.count){for(var y=nl,x=y.length,b=0;b<x;b++){var E=y.M(b);ao(E),Ki(E),Wl(E),E.diagram.ug()}y.clear()}ao(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),ha=oh=null,Ki(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),bf(a,!0)},lo.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Wl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,lu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=ha;Ki(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}lo.prototype.doCancel=function(){Ki(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},lo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},lo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Kl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Fa(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,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var ee=y.I(E);ee!==null&&(ee.location=E.location,ee.Va(),x.add(ee,a.Pd(ee.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof En&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ki(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof En&&(x.value.point=new lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ao(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 Zo(a,y,x){var b=a.diagram,E=a.startPoint,ee=lt.alloc();ee.assign(b.lastInput.documentPoint),a.moveParts(y,ee.re(E),x),lt.free(ee),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(as(b),b.hk())}lo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Qh(b,a,y,this.dragOptions,x)};function Fa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof En&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Ch(b,-E.x,-E.y)}y.bd()}}function ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),rl(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var ee=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=lu(a,E,b),!a.isActive&&ha===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof Ir)){var ue=x.mouseDragOver;ue!==null&&(ue(E),ne=!0)}if(!a.isActive&&ha===null||(a.doDragOver(y,b),!a.isActive&&ha===null))return}finally{x.skipsUndoManager=ee,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}lo.prototype.findDragOverObject=function(a){var y=this;return fu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof mi||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},lo.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 lu(a,y,x){var b=!1,E=a.Cg.length,ee=0<E?a.Cg[0]:null;if(x===ee)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var ae=a.Cg[ne],ue=ae.mouseDragLeave;if(ue!==null&&(ue(y,ae,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ha===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Vl(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,ee),b=!0,!y.handled));x++);return b}function Vl(a){var y=a.panel;return y!==null?y:a instanceof Sr&&!(a instanceof Ir)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function uu(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ge){return b.findValidLinkablePort(ge,x)});a=lt.alloc();var ee=1/0,ne=null;for(E=E.iterator;E.next();){var ae=E.value;if(ae.part!==null){var ue=ae.ga(ai,a);ue=y.Bf(ue),ue<ee&&(ne=ae,ee=ue)}}return lt.free(a),ne}function rl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var ee=null,ne=null;x.fromNode===null&&(ee=uu(a,x.i(0),!1),ee!==null&&(ne=ee.part));var ae=null,ue=null;x.toNode===null&&(ae=uu(a,x.i(x.pointsCount-1),!0),ae!==null&&(ue=ae.part)),E.isValidLink(ne,ee,ue,ae)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,ee!==null&&(x.fromPortId=ee.portId),x.toNode=ue,ae!==null&&(x.toPortId=ae.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):ed(E,ne,ee,ue,ae):ed(E,null,null,null,null)}}}}lo.prototype.doDragOver=function(){};function Al(a,y){var x=a.diagram;a.dragsLink&&rl(a,!0),Wl(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var ee=b;ee!==null;){var ne=ee.mouseDrop;if(ne!==null&&(ne(E,ee),E.handled))break;Qv(a,E,ee),ee=Vl(ee)}}else ee=x.mouseDrop,ee!==null&&ee(E);if(a.isActive||ha!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)ee=E.key,ee instanceof Un&&ee.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ha!==null){for(a=$t.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Un&&$v(x,b,a);$t.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ir||(x=a.mouseDrop,x!==null&&x(y))}function $v(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof En},!0,function(E){return E instanceof En},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}lo.prototype.doDropOnto=function(){},lo.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()?(Kl(this,!1),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),$h(a,this.copiedParts)):this.mayMove()?(Ki(this),Zo(this,this.draggedParts,!0)):this.mayDragOut()?(Kl(this,!1),Zo(this,this.copiedParts,!1)):Ki(this),ka(this,a.lastInput.documentPoint))}},lo.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?(Ki(this),Kl(this,!0),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),$h(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Ki(this),this.mayMove()&&(Zo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Al(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qv(this),a.Ya(),$h(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},lo.prototype.simulatedMouseMove=function(a,y,x){if(ha===null)return!1;var b=ha.diagram;x instanceof Yt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),ha.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),oh=x,x!==null&&x!==b&&(kc(),E=x.toolManager.findTool("Dragging"),E!==null&&(nl.contains(E)||nl.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==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,b.doSimulatedDragOver()),!0)},lo.prototype.simulatedMouseUp=function(a,y,x){if(ha===null)return!1;var b=oh,E=ha.diagram;if(x===null)return ha.doCancel(),!0;if(x!==b){var ee=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&ee!==null)return b.ug(),ha.isDragOutStarted=!1,ee.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),nl.contains(b)||nl.add(b),b.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 lt),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=ha,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function qv(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Un&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}lo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ni?!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())},lo.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())},lo.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())},lo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},lo.prototype.Az=function(){return ha},lo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ha;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},lo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ks(a),a.animationManager.Cc(),a=ha,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},lo.prototype.doSimulatedDragLeave=function(){var a=ha;a!==null&&a.doSimulatedDragOut(),this.doCancel()},lo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ha;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Zo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},lo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ha;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ki(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Zo(this,this.copiedParts,!1);var b=new an;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Al(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rg(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var ee=$t.alloc();E=b=1/0;for(var ne=-1/0,ae=-1/0,ue=y.iterator;ue.next();){var ge=ue.value;if(ge.isVisible()){var ye=ge.location;ge=ye.x,ye=ye.y,isNaN(ge)||isNaN(ye)||(ge<b&&(b=ge),ye<E&&(E=ye),ge>ne&&(ne=ge),ye>ae&&(ae=ye))}}for(b===1/0?ee.h(0,0,0,0):ee.h(b,E,ne-b,ae-E),b=ee.x+ee.width/2,E=ee.y+ee.height/2,$t.free(ee),ee=a.Fr,ne=new tn,ae=lt.alloc(),ue=y.iterator;ue.next();)ge=ue.value,ge instanceof En&&ge.canCopy()&&(ye=x.I(ge),ye!==null&&(ye.points=ge.points,Ch(ye,ee.x-b,ee.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)ge=y.value,ge.Zc()&&ge.canCopy()&&(ue=x.I(ge),ue!==null&&(ge=ge.location,ae.h(ee.x-(b-ge.x),ee.y-(E-ge.y)),ue.location=ae,ue.Va(),ne.add(ue,a.Pd(ae))));lt.free(ae),a.copiedParts=ne,zh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}lo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},lo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new lt},zt.Object.defineProperties(lo.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}}}),lo.prototype.getDraggingSource=lo.prototype.Az;var ha=null,oh=null;lo.className="DraggingTool",nl=new rn,Dr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ji.prototype.doCancel=function(){ha!==null&&ha.doCancel(),fi.prototype.doCancel.call(this)};function So(){fi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new En,y=new Hr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Hr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Un,y=new Hr,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 Un,y=new Hr,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}Kt(So,fi),So.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},So.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var ee=y.Df(),ne=mn.alloc();ne.width=y.naturalBounds.width*ee,ne.height=y.naturalBounds.height*ee,b.desiredSize=ne,mn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=ai,ee=lt.alloc(),x.location=y.ga(ai,ee),lt.free(ee),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},So.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Or,y.fromSpot=Vr,y.toSpot=Vr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},So.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},So.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Un){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},So.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Un))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Un)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},So.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,ee=y.og(x,b,function(Le){return E.findValidLinkablePort(Le,a)},null,!0);for(b=1/0,y=null,ee=ee.iterator;ee.next();){var ne=ee.value,ae=ne.part;if(ae instanceof Un){var ue=ne.ga(ai,lt.alloc()),ge=x.x-ue.x,ye=x.y-ue.y;lt.free(ue),ue=ge*ge+ye*ye,ue<b&&(ge=this.validPortsCache.I(ne),ge!==null?ge&&(y=ne,b=ue):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ae,ne)||!a&&this.isValidLink(ae,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=ue):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Un&&(x.layer===null||x.layer.allowLink))?y:null},So.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},So.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},So.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},So.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Un))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Un))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},So.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||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 E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},So.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 b=new an;return b.add(a),Da(this,x,y,b)};function Da(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Da(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Da(a,y.labeledLink,x,b))))}So.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Tf){if(b===Rp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Ua(this,a,y,x,!0)}if(b===_p){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Ua(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new an,b.add(y),a=Ha(this,b,a,y,x)),!a;if(b===Bp)return!Ua(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new an,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Ua(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var ee=y.linksConnected;ee.next();){var ne=ee.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&Ua(a,ne,x,b,E)))return!0}return!1}function Ha(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var ee=x.linksConnected;ee.next();){var ne=ee.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Ha(a,y,ne,b,E)))return!0}return!1}function Tc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var ee=x.linksConnected;ee.next();){var ne=ee.value;if(ne!==E){var ae=ne.fromNode;if(ne=ne.toNode,ae=ae===x?ne:ae,ae!==x&&Tc(a,y,ae,b,E))return!0}}return!1}zt.Object.defineProperties(So.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}}}),So.className="LinkingBaseTool";function Wa(){So.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}Kt(Wa,So),Wa.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},Wa.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Un)))return null;var x=this.direction;if(x===Gh||x===_g){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Gh||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Wa.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Un&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Un&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},Wa.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()},Wa.prototype.doStop=function(){So.prototype.doStop.call(this),this.startObject=null},Wa.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,ee=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var ae=ne.part;ae instanceof Un&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(ee=this.insertLink(y,x,b,E),ee!==null?(ne===null&&(this.isForwards?ee.defaultToPoint=a.lastInput.documentPoint:ee.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),ee.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",ee)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),ee&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Wa.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof En)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},Wa.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Wa.prototype.doNoLink=function(){},zt.Object.defineProperties(Wa.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 Gh=new hn(Wa,"Either",0),_g=new hn(Wa,"ForwardsOnly",0),zg=new hn(Wa,"BackwardsOnly",0);Wa.className="LinkingTool",Wa.Either=Gh,Wa.ForwardsOnly=_g,Wa.BackwardsOnly=zg;function Os(){So.call(this),this.name="Relinking";var a=new Hr;a.figure="Diamond",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Hr,a.figure="Diamond",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new $t}Kt(Os,So),Os.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Os.prototype.makeAdornment=function(a,y){var x=new mi;return x.type=wn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Os.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},Os.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 mi&&x.adornedPart instanceof En))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=dr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=dr),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},Os.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rd||x===Eh)&&(x=Qa),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}},Os.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()},Os.prototype.doStop=function(){So.prototype.doStop.call(this),this.handle=null},Os.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,ee=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Un&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:ee=null;ee!==null?(this.reconnectLink(ee,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?ee.defaultToPoint=a.lastInput.documentPoint:ee.defaultFromPoint=a.lastInput.documentPoint,ee.bb()),this.transactionResult=this.name,a.R("LinkRelinked",ee,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Os.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Os.prototype.doNoRelink=function(){};function ed(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}zt.Object.defineProperties(Os.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 mi))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Os.className="RelinkingTool",Dr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Dr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){fi.call(this),this.name="LinkReshaping";var a=new Hr;a.figure="Rectangle",a.desiredSize=oi,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Hr,a.figure="Diamond",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new lt,this.Yq=new rn}Kt(ko,fi),ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lp},ko.prototype.om=function(a,y){a.reshapingBehavior=y},ko.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new mi,E.type=wn.Link,x=y.firstPickIndex;var ee=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Rs)for(var ae=x+ne;ae<ee-ne;ae++){var ue=this.makeResegmentHandle(a,ae);ue!==null&&(ue.segmentIndex=ae,ue.segmentFraction=.5,ue.fromMaxLinks=999,E.add(ue))}for(ne=x+1;ne<ee;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){ue=y.i(x);var ge=y.i(x+1);Gt.B(ue.x,ge.x)&&Gt.B(ue.y,ge.y)&&(ge=y.i(x-1)),Gt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):Gt.B(ue.y,ge.y)&&(this.om(ae,sh),ae.cursor="w-resize")}else ne===ee-1&&b?(ue=y.i(ee-1),ge=y.i(ee),Gt.B(ue.x,ge.x)&&Gt.B(ue.y,ge.y)&&(ue=y.i(ee+1)),Gt.B(ue.x,ge.x)?(this.om(ae,lh),ae.cursor="n-resize"):Gt.B(ue.y,ge.y)&&(this.om(ae,sh),ae.cursor="w-resize")):ne!==ee&&(this.om(ae,td),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ko.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},ko.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof En){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ko.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ko.prototype.getResegmentingPoint=function(){return this.handle.ga(ai)},ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ko.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),ee=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(ah(this,ne,b,E,ee,!0)||ah(this,ne,b,E,ee,!1))){var ae=y.points.copy();ah(this,ne,b,E,ee,!0)?(ae.cd(x-2,new lt(ne.x,(ee.y+ne.y)/2)),ae.cd(x+1,new lt(ee.x,(ee.y+ne.y)/2))):(ae.cd(x-2,new lt((ee.x+ne.x)/2,ne.y)),ae.cd(x+1,new lt((ee.x+ne.x)/2,ee.y))),ae.mb(x),ae.mb(x-1),y.points=ae,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-ee.x)<this.resegmentingDistance&&Math.abs(E.y-ee.y)<this.resegmentingDistance&&(ah(this,b,E,ee,ne,!0)||ah(this,b,E,ee,ne,!1))&&(ae=y.points.copy(),ah(this,b,E,ee,ne,!0)?(ae.cd(x-1,new lt(b.x,(b.y+ne.y)/2)),ae.cd(x+2,new lt(ne.x,(b.y+ne.y)/2))):(ae.cd(x-1,new lt((b.x+ne.x)/2,b.y)),ae.cd(x+2,new lt((b.x+ne.x)/2,ne.y))),ae.mb(x+1),ae.mb(x),y.points=ae,y.Wb())}}else ne=lt.alloc(),Gt.qh(b.x,b.y,ee.x,ee.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),lt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ah(a,y,x,b,E,ee){return ee?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}ko.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===lh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===sh&&(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,b===lh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===sh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),ee=y.i(b-1),ne=y.i(b+1);Gt.B(ee.x,E.x)&&Gt.B(E.y,ne.y)?(Gt.B(ee.x,y.i(b-2).x)&&!Gt.B(ee.y,y.i(b-2).y)?(y.m(b,a.x,ee.y),x++,b++):y.L(b-1,a.x,ee.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Gt.B(ee.y,E.y)&&Gt.B(E.x,ne.x)?(Gt.B(ee.y,y.i(b-2).y)&&!Gt.B(ee.x,y.i(b-2).x)?(y.m(b,ee.x,a.y),x++,b++):y.L(b-1,ee.x,a.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(ee.x,E.x)&&Gt.B(E.x,ne.x)?(Gt.B(ee.x,y.i(b-2).x)&&!Gt.B(ee.y,y.i(b-2).y)?(y.m(b,a.x,ee.y),x++,b++):y.L(b-1,a.x,ee.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(ee.y,E.y)&&Gt.B(E.y,ne.y)&&(Gt.B(ee.y,y.i(b-2).y)&&!Gt.B(ee.x,y.i(b-2).x)?(y.m(b,ee.x,a.y),x++,b++):y.L(b-1,ee.x,a.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(ee=b.findVisibleNode(),ee!==null&&ee!==b&&(b=ee,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(ee=E.ga(ai,lt.alloc()),b=y.getLinkPointFromPoint(b,E,ee,a,!0,lt.alloc()),y.L(0,b.x,b.y),lt.free(ee),lt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(ee=b.findVisibleNode(),ee!==null&&ee!==b&&(b=ee,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(ai,lt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,lt.alloc()),y.L(y.pointsCount-1,a.x,a.y),lt.free(x),lt.free(a));y.zf()},ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case td:return a;case lh:return new lt(y.i(x).x,a.y);case sh:return new lt(a.x,y.i(x).y);default:case lp:return y.i(x)}},zt.Object.defineProperties(ko.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof mi))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),ko.prototype.setReshapingBehavior=ko.prototype.om,ko.prototype.getReshapingBehavior=ko.prototype.Ru;var lp=new hn(ko,"None",0),sh=new hn(ko,"Horizontal",1),lh=new hn(ko,"Vertical",2),td=new hn(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,Dr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ca(){fi.call(this),this.name="Resizing",this.o=new mn(1,1).freeze(),this.j=new mn(9999,9999).freeze(),this.yg=new mn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Hr;a.alignmentFocus=ai,a.figure="Rectangle",a.desiredSize=oi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new lt,this.Dw=new mn,this.Tn=new lt,this.rt=new mn(0,0),this.qt=new mn(1/0,1/0),this.pt=new mn(1,1)}Kt(Ca,fi),Ca.prototype.updateAdornments=function(a){if(!(a===null||a instanceof En)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),ic(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ca.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new mi,y.type=wn.Spot,y.locationSpot=ai;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ei)),y.add(this.makeHandle(a,ba)),y.add(this.makeHandle(a,io)),y.add(this.makeHandle(a,Ko)),y.add(this.makeHandle(a,ja)),y.add(this.makeHandle(a,na)),y.add(this.makeHandle(a,sa)),y.add(this.makeHandle(a,Oa))}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ca.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ca.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=ai),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 e;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 wn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ca.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},Ca.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))},Ca.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ca.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ca.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ca.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),ee=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,ee),this.resize(y),a.bd(),lt.free(E)}},Ca.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),ee=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,ee),this.resize(y),lt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ca.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 Ir){var b=new rn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new he;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ca.prototype.computeResize=function(a,y,x,b,E,ee){y.Mc()&&(y=ai);var ne=this.adornedObject.naturalBounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Le=1;if(!ee){Le=ne.width;var ze=ne.height;0>=Le&&(Le=1),0>=ze&&(ze=1),Le=ze/Le}return ze=lt.alloc(),Gt.No(a.x,a.y,ae,ue,E.width,E.height,ze),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.x=ge-a.width)):(a.x=Math.max(ze.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(1<=a.height/a.width?(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le):(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width))):(a.width=Math.max(Math.min(ze.x-ae,b.width),x.width),ee||(a.height=Math.max(Math.min(Le*a.width,b.height),x.height),a.width=a.height/Le,a.y=ue+.5*(ye-ue-a.height))):0>=y.y?(a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ze.y-ue,b.height),x.height),ee||(a.width=Math.max(Math.min(a.height/Le,b.width),x.width),a.height=Le*a.width,a.x=ae+.5*(ge-ae-a.width))),lt.free(ze),a},Ca.prototype.computeReshape=function(){var a=gn;return this.adornedObject instanceof Hr&&(a=E0(this.adornedObject)),!(a===hr||this.diagram.lastInput.shift)},Ca.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},Ca.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},Ca.prototype.computeCellSize=function(){var a=new mn(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},zt.Object.defineProperties(Ca.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 mi))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 mi)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}}}),Ca.className="ResizingTool",Dr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ka(){fi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new lt,this.ue=null;var a=new Hr;a.figure="Ellipse",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new lt(NaN,NaN),this.u=0,this.F=50}Kt(Ka,fi),Ka.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)}},Ka.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new mi,y.type=wn.Position,y.locationSpot=ai;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ka.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},Ka.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)},Ka.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(ai)},Ka.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 b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ka.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new lt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ka.prototype.stopTransaction=function(){var a=this.diagram,y=fi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ka.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ka.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ka.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()},Ka.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ka.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},zt.Object.defineProperties(Ka.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 mi))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 mi)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}}}),Ka.className="RotatingTool",Dr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){fi.call(this),this.name="ClickSelecting"}Kt(Uh,fi),Uh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Uh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Uh.className="ClickSelectingTool";function il(){fi.call(this),this.name="Action",this.pk=null}Kt(il,fi),il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},il.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()},il.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))}},il.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()},il.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())},il.prototype.doStop=function(){this.pk=null},il.className="ActionTool";function uh(){fi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new lt(0,0)}Kt(uh,fi),uh.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)},uh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},uh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Sr)x.Zc()&&(ul(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);sn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var ee=lt.allocAt(a.x,a.y);this.isGridSnapEnabled&&dd(this.diagram,b,a,ee),b.location=ee,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),lt.free(ee)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},zt.Object.defineProperties(uh.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}}}),uh.className="ClickCreatingTool";function Hs(){fi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Sr;a.layerName="Tool",a.selectable=!1;var y=new Hr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Kt(Hs,fi),Hs.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))},Hs.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Hs.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Hs.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 b=mn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),mn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Hs.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()},Hs.prototype.computeBoxBounds=function(){var a=this.diagram;return new $t(a.firstInput.documentPoint,a.lastInput.documentPoint)},Hs.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ni?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 rn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},zt.Object.defineProperties(Hs.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}}}),Hs.className="DragSelectingTool";function ya(){fi.call(this),this.name="Panning",this.Xt=new lt,this.xy=new lt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(vn.document,"scroll",a.Kw,!1),a.stopTool()}}Kt(ya,fi),ya.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())},ya.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(vn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ya.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ya.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ya.prototype.doMouseMove=function(){this.move()},ya.prototype.doMouseUp=function(){this.move(),this.stopTool()},ya.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,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},zt.Object.defineProperties(ya.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ya.className="PanningTool",Dr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Dr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Dr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Dr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Dr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Zl(){this.F=this.u=this.j=this.o=null}zt.Object.defineProperties(Zl.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}}}),Zl.className="HTMLInfo";function ol(a,y,x){this.text=a,this.hx=y,this.visible=x}ol.className="ContextMenuButtonInfo";function Va(){fi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new lt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Kt(Va,fi);function ml(a){var y=new Zl;y.show=function(E,ee,ne){ne.showDefaultContextMenu()},y.hide=function(E,ee){ee.hideDefaultContextMenu()},Hh=y,a.tu=function(){a.stopTool()},y=Xn("div");var x=Xn("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 b=Xn("style");vn.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",To,!1),b.addEventListener(y,"selectstart",To,!1),b.addEventListener(x,"contextmenu",To,!1)),y.className="goCXforeground",x.className="goCXbackground",vn.document.body&&(vn.document.body.appendChild(y),vn.document.body.appendChild(x)),cf=y,Lc=x,hf=!0}function To(a){return a.preventDefault(),!1}Va.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)},Va.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Va.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Va.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Yt||(a instanceof _t?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},Va.prototype.doActivate=function(){},Va.prototype.doMouseDown=function(){if(fi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof mi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&jl(this)},Va.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof mi){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}jl(this)};function jl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Zl||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Ru(a,!0),a.isActive||a.stopTool())}Va.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ru(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=Hh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof _t?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof mi&&!a.currentContextMenu.visible&&a.stopTool()}}Va.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Va.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof mi){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Zl&&a.show(y,x,this);this.currentContextMenu=a},Va.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},Va.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof mi?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function hh(a){var y=new rn;return y.add(new ol("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ol("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ol("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ol("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ol("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ol("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ol("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ol("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ol("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ol("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ol("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ol("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ol("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Va.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Lc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Xn("ul");x.className="goCXul",cf.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,ee=E.visible;if(typeof E.hx=="function"&&(typeof ee!="function"||ee(a))){ee=Xn("li"),ee.className="goCXli";var ne=Xn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(ae){return this.ky(a),y.stopTool(),ae.preventDefault(),!1},!1),ne.textContent=E.text,ee.appendChild(ne),x.appendChild(ee)}}cf.style.display="block",Lc.style.display="block"},Va.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Hh){cf.style.display="none",Lc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Lc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},zt.Object.defineProperties(Va.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof mi?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Hh===null&&vo&&ml(this),Hh},set:function(a){a===null&&(hf=!0),Hh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Hh=null,hf=!1,Lc=null,cf=null;Va.className="ContextMenuTool",Dr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Qi(){fi.call(this),this.name="TextEditing",this.Zh=new Zi,this.ia=null,this.V=Mc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new Zl,this.kt=null,ff(this,this.j)}Kt(Qi,fi);function ff(a,y){if(vo){var x=Xn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,ee){if(b instanceof Zi&&ee instanceof Qi)if(ee.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(ai),ae=E.position,ue=E.scale,ge=b.Df()*ue;ge<ee.minimumEditorScale&&(ge=ee.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Le=b.naturalBounds.height*ge+2,ze=(ne.x-ae.x)*ue;ne=(ne.y-ae.y)*ue,ae=b.verticalAlignment,ue=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Le=ae.y*Le-ae.y*ue+ae.offsetY-(.5*Le-.5*ue)-ue/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ge+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(ze-ye/2|0)-1+"px",x.style.top=(ne+Le|0)-1+"px",x.style.textAlign=b.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=b.lineCount,x.wA=ge,x.className="goTXarea",E.div.appendChild(x),x.focus(),ee.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Qi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(Xl),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Zi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Mc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},Qi.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},Qi.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 Zi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new $t(this.textBlock.ga(Ei),this.textBlock.ga(io));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Qi.prototype.doCancel=function(){this.stopTool()},Qi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Qi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xl)},Qi.prototype.acceptText=function(a){switch(a){case Xl:this.qa===Ac?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this));break;case nd:case df:case rd:(df!==a||this.textBlock.isMultiline!==!0)&&(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this))}};function up(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,ee="";b.valueFunction!==null&&(ee=b.valueFunction()),a.isValidText(y,E,ee)?(a.Ea(a.name),a.qa=Ac,a.transactionResult=a.name,y.text=ee,a.doSuccess(E,ee),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=mf,a.doError(E,ee))}}Qi.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)},Qi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Qi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Qi.prototype.doStop=function(){ch=null},Qi.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},Qi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},zt.Object.defineProperties(Qi.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)}}}),Qi.prototype.measureTemporaryTextBlock=Qi.prototype.Lx;var nd=new hn(Qi,"LostFocus",0),Xl=new hn(Qi,"MouseDown",1),rd=new hn(Qi,"Tab",2),df=new hn(Qi,"Enter",3),e0=new hn(Qi,"SingleClick",0),Mc=new hn(Qi,"SingleClickSelected",1),id=new hn(Qi,"DoubleClick",2),Nc=new hn(Qi,"StateNone",0),pf=new hn(Qi,"StateActive",1),gf=new hn(Qi,"StateEditing",2),hp=new hn(Qi,"StateValidating",3),mf=new hn(Qi,"StateInvalid",4),Ac=new hn(Qi,"StateValidated",5),ch=null;Qi.className="TextEditingTool",Qi.LostFocus=nd,Qi.MouseDown=Xl,Qi.Tab=rd,Qi.Enter=df,Qi.SingleClick=e0,Qi.SingleClickSelected=Mc,Qi.DoubleClick=id,Qi.StateNone=Nc,Qi.StateActive=pf,Qi.StateEditing=gf,Qi.StateValidating=hp,Qi.StateInvalid=mf,Qi.StateValidated=Ac,Dr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function bs(a){yf||(cp(),yf=!0),this.H=cu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=zu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new an,this.ce=new Sa,this.ce.Yd=this,this.Ei=new an,this.pu=new an,this.Sr=new an,this.pr=new an,a&&Object.assign(this,a)}bs.prototype.Xe=function(a){this.H=a},bs.prototype.canStart=function(){return!0};function hu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),xa(a.H),a.zb=!0)}function od(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===zu?(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===fp&&y.vc.clear(),a.Qw=!!(a.Pk===Sf&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),xf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ba&&b!==null&&(delete b.start.scale,delete b.end.scale),vn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&as(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Ks(x,!0),Wh(a),x.R("AnimationStarting",a)))}))}}function _u(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||_u(a)||y instanceof En&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}qe=bs.prototype,qe.fv=function(a){return this.ce.fv(a)},qe.Xu=function(a){return this.ce.Xu(a)};function sd(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var ee=E.pu.iterator;ee.next();){var ne=ee.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var ae=!0;else{for(ae=ne.vc.iterator;ae.next();){var ue=ae.key;if(ue instanceof _t&&ue.diagram!==null||ue instanceof Yt){ae=!0;break e}}ae=!1}ae?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Ks(E.H),Wh(E)),vn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),vn.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Wh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}qe.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(),xf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xf(y,this.H)},qe.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))},qe.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ps(this,a))},qe.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),dh(this.ce,y,"position",y.position,y.position),ps(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||_u(a)||(a.H.pi||(y=x.copy()),dh(a.ce,a.H,"position",y,x))}function ld(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ps(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var ee=a[0],ne=a[1],ae=a[2];a=a[3];var ue=y[0],ge=y[1],ye=y[2];return y=y[3],ae===0||ae===100?(ee=ue,ne=ge):(ye===0||ye===100)&&(ue=ee,ge=ne),180<Math.abs(ue-ee)&&(ue>ee?ee+=360:ue+=360),ee=E(x,ee,ue-ee,b)%360,ne=E(x,ne,ge-ne,b),ae=E(x,ae,ye-ae,b),x=E(x,a,y-a,b),"hsla("+ee+", "+ne+"%, "+ae+"%, "+x+")"}function cp(){function a(x,b,E,ee,ne,ae){x.position=new lt(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}var y=new tn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!1):x.position=new lt(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("location",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!0):x.location=new lt(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("position:placeholder",function(x,b,E,ee,ne,ae){ne<ae?x.mm(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae),!1):x.position=new lt(ee(ne,b.x,E.x-b.x,ae),ee(ne,b.y,E.y-b.y,ae))}),y.add("position:nodeCollapse",function(x,b,E,ee,ne,ae){var ue=x.actualBounds,ge=E.actualBounds;E=ge.x+ge.width/2-ue.width/2,ue=ge.y+ge.height/2-ue.height/2,ne<ae?x.mm(ee(ne,b.x,E-b.x,ae),ee(ne,b.y,ue-b.y,ae),!1):x.position=new lt(ee(ne,b.x,E-b.x,ae),ee(ne,b.y,ue-b.y,ae))}),y.add("desiredSize",function(x,b,E,ee,ne,ae){x.desiredSize=new $t(ee(ne,b.width,E.width-b.width,ae),ee(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,ee,ne,ae){x.width=ee(ne,b,E-b,ae)}),y.add("height",function(x,b,E,ee,ne,ae){x.height=ee(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,ee,ne,ae){x.fill=Kh(b,E,ne,ae,ee)}),y.add("stroke",function(x,b,E,ee,ne,ae){x.stroke=Kh(b,E,ne,ae,ee)}),y.add("strokeWidth",function(x,b,E,ee,ne,ae){x.strokeWidth=ee(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,ee,ne,ae){x.strokeDashOffset=ee(ne,b,E-b,ae)}),y.add("background",function(x,b,E,ee,ne,ae){x.background=Kh(b,E,ne,ae,ee)}),y.add("areaBackground",function(x,b,E,ee,ne,ae){x.areaBackground=Kh(b,E,ne,ae,ee)}),y.add("opacity",function(x,b,E,ee,ne,ae){x.opacity=ee(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,ee,ne,ae){x.scale=ee(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,ee,ne,ae){x.angle=ee(ne,b,E-b,ae)}),vf=y}zt.Object.defineProperties(bs.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Nn(a,">= 1",bs,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),bs.prototype.stopAnimation=bs.prototype.Cc;var vf=null,yf=!1,zu=new hn(bs,"Default",1),Sf=new hn(bs,"AnimateLocations",2),fp=new hn(bs,"None",3);bs.className="AnimationManager",bs.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},bs.Default=zu,bs.AnimateLocations=Sf,bs.None=fp;function Sa(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=jc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=zn,this.vc=new tn,this.Tt=new tn,this.yl=new an,this.Ut=new an,this.dw=mh,a&&Object.assign(this,a)}Sa.prototype.suspend=function(){this.Xk=!0},Sa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,wf(this,!0),fh(this.Yd),Ks(this.H),Wh(this.Yd),this.H.redraw()};function xf(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}qe=Sa.prototype,qe.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 Yt?a=x:x instanceof _t&&(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===zu&&this===y.defaultAnimation&&(this.Lp=Hg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Lf),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Wh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},qe.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},qe.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Yt?this.H=a:a instanceof _t&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Sr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,ee){var ne=a.vc;if(y instanceof Yt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Wu(b),s0(),b=[Is.j,Is.u,Is.o,Is.F],Wu(E),s0(),E=[Is.j,Is.u,Is.o,Is.F]),ne.contains(y)){var ae=ne.I(y),ue=ae.start,ge=ae.end;ue[x]===void 0&&(ue[x]=Vh(b)),ge[x]=Vh(E)}else ue={},ge={},ue[x]=Vh(b),ge[x]=Vh(E),ae=ue.position,y instanceof _t&&ae instanceof lt&&!ae.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ae.assign(ge.position),ae=new Zh(ue,ge,ee),ne.add(y,ae);ne=ue[x],ne instanceof lt&&!ne.w()&&ne.assign(a.o),ee&&x.indexOf("position:")===0&&y instanceof Sr?ae.Ku.location=Vh(y.location):ee&&(ae.Ku[x]=Vh(b))}function Vh(a){return a instanceof lt||a instanceof mn?a.copy():a}qe.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},qe.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function wf(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),fh(x),dp(a,E),Ks(a.H,!0),Wh(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function dp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var ee=b.key;if(!(ee instanceof _t&&ee.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var ue=vf,ge;for(ge in ne)ge==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||ue.get(ge)===null||ue.get(ge)(ee,ae[ge],ne[ge],a.Lp,y,x,a)}}}qe.stop=function(){return this.bc?(this.Ml(!0),this):this},qe.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,fh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var ee=vf;b.next();){var ne=b.key,ae=b.value,ue=E?ae.end:ae.start,ge=E?ae.start:ae.end,ye=ae.Ku,Le;for(Le in ge)if(ee.get(Le)!==null){var ze=Le;!ae.Hu||ze!=="position:nodeCollapse"&&ze!=="position:placeholder"||(ze="position"),ee.get(ze)(ne,ue[Le],ye[Le]!==void 0?ye[Le]:ae.Hu?ue[Le]:ge[Le],this.Lp,this.Gd,this.Gd,this)}ae.Hu&&ye.location!==void 0&&ne instanceof Sr&&(ne.location=ye.location),ae.nv&&ne instanceof Sr&&ne.Zb(!1)}if(y.As.clear(),bf(y,!1),y.Ya(),y.N(),Ks(y,!0),x.defaultAnimation===this){for(Le=x.pr.iterator;Le.next();)E=Le.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ks(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Wh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xf(this,null),x.Ml(this),y.$b())}},qe.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Ir&&(b=y.placeholder),b!==null?(x=b.ga(Ei),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new lt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ir)for(a=a.memberParts;a.next();)b=a.value,b instanceof Un&&this.Cj(b,y)},qe.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ir&&(x=y.placeholder),x!==null){var b=x.ga(Ei);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof Ir)for(a=a.memberParts;a.next();)b=a.value,b instanceof Un&&this.Aj(b,y)}},qe.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},zt.Object.defineProperties(Sa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Nn(a,">= 1",Sa,"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:jt("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}}}),Sa.prototype.getTemporaryState=Sa.prototype.Ez,Sa.prototype.stop=Sa.prototype.stop,Sa.prototype.add=Sa.prototype.add,Sa.prototype.addTemporaryPart=Sa.prototype.Iy;function jc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Hg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Sa.className="Animation",Sa.EaseLinear=function(a,y,x,b){return x*a/b+y},Sa.EaseInOutQuad=jc,Sa.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Sa.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Sa.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Sa.EaseOutExpo=Hg;function Zh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zh.className="AnimationState";function vl(a,y,x){this.xd=null,this.rf=a,this.so=x||pp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xh))}vl.prototype.copy=function(){var a=new vl(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 Wg(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))}zt.Object.defineProperties(vl.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 pp=new hn(vl,"Default",1),Xh=new hn(vl,"Immediate",2),Oc=new hn(vl,"Bundled",3);vl.className="AnimationTrigger",vl.Default=pp,vl.Immediate=Xh,vl.Bundled=Oc;function ra(a){cr(this),this.H=null,this.Pa=new rn,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)}qe=ra.prototype,qe.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ma(x)}a.clear(),this.Zq.length=0},qe.Xe=function(a){this.H=a},qe.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,ee=0,ne=0,ae=this.Pa.iterator;ae.next();){var ue=ae.value;ue instanceof Ir?E++:ue instanceof Un?b++:ue instanceof En?ee++:ue instanceof mi?ne++:x++}if(ae="",0<x&&(ae+=x+" Parts "),0<b&&(ae+=b+" Nodes "),0<E&&(ae+=E+" Groups "),0<ee&&(ae+=ee+" Links "),0<ne&&(ae+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ae+=`
|
|
`+x.toString(),b=x.data,b!==null&&Gr(b)&&(ae+=" #"+Gr(b)),x instanceof Un?ae+=" "+Fr(b):x instanceof En&&(ae+=" "+Fr(x.fromNode)+" "+Fr(x.toNode));return y+" "+this.Pa.count+": "+ae},qe.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=lt.alloc(),ee=this.Pa.s,ne=ee.length;ne--;){var ae=ee[ne];if((b!==!0||ic(ae)!==!1)&&ae.isVisible()&&(E.assign(a),Kn(E,ae.oe),ae=ae.ic(E,y,x),ae!==null&&(y!==null&&(ae=y(ae)),ae!==null&&(x===null||x(ae)))))return lt.free(E),ae}return lt.free(E),null},qe.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof rn||b instanceof an||(b=new an),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var ee=lt.alloc(),ne=this.Pa.s,ae=ne.length;ae--;){var ue=ne[ae];if((E!==!0||ic(ue)!==!1)&&ue.isVisible()){ee.assign(a),Kn(ee,ue.oe);var ge=ue;ue.ji(ee,y,x,b)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge))}}return lt.free(ee),b},qe.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof an||(E=new an),this.Uh===!1)return E;var ee=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(ee=!0);for(var ne=this.Pa.s,ae=ne.length;ae--;){var ue=ne[ae];if((ee!==!0||ic(ue)!==!1)&&ue.isVisible()){var ge=ue;ue.Cf(a,y,x,b,E)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||E.add(ge))}}return E},qe.Nu=function(a,y,x,b,E,ee,ne){if(this.Uh===!1)return E;for(var ae=this.Pa.s,ue=ae.length;ue--;){var ge=ae[ue];if((ne!==!0||ic(ge)!==!1)&&ee(ge)&&ge.isVisible()){var ye=ge;ge.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},qe.og=function(a,y,x,b,E,ee){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof an)&&(ee=E),E=!0),ee instanceof rn||ee instanceof an||(ee=new an),this.Uh===!1)return ee;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var ae=lt.alloc(),ue=lt.alloc(),ge=this.Pa.s,ye=ge.length;ye--;){var Le=ge[ye];if((ne!==!0||ic(Le)!==!1)&&Le.isVisible()){ae.assign(a),Kn(ae,Le.oe),ue.h(a.x+y,a.y),Kn(ue,Le.oe);var ze=Le;Le.og(ae,ue,x,b,E,ee)&&(x!==null&&(ze=x(ze)),ze===null||b!==null&&!b(ze)||ee.add(ze))}}return lt.free(ae),lt.free(ue),ee},qe.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=er();for(var E=er(),ee=0;ee<b;ee++){var ne=x[ee];if(ne.vw=ee,ne instanceof En){if(ne.fd===!1)continue}else if(ne instanceof mi&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&Gi(ae,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],B0(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)B0(E[y]);_n(a),_n(E)}}};function Gu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}qe.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Gu(this,a);var ee=this.Zq;ee.length=0;for(var ne=y.scale,ae=$t.alloc(),ue=0;ue<b;ue++)this.Oj(a,x[ue],y,ee,ne,ae,!0);if($t.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var ee=E.length;if(ee!==0){var ne=Gu(a,y),ae=a.Zq;ae.length=0;for(var ue=x.scale,ge=$t.alloc(),ye=0;ye<ee;ye++){var Le=E[ye];b.contains(Le)&&a.Oj(y,Le,x,ae,ue,ge,!1)}$t.free(ge),y.globalAlpha=ne}}}qe.Oj=function(a,y,x,b,E,ee,ne){if(ne&&!ic(y))a.Hs(y);else{if(b!==null&&y instanceof En&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&ee.Ex(b.tb):b.tb!==null&&(ne=!0,ee.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!ee.Yc(ae)){a.Hs(y);return}b=!ee.Re(ae)}b&&(a.save(),a instanceof Ps?a.bk=ee.copy():(a.beginPath(),a.rect(ee.x,ee.y,ee.width,ee.height),a.clip())),ae.width*E>x.Oq||ae.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,ee=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(yo(y,a,y.areaBackground,!0,!0,ee,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(yo(y,a,"rgba(0,0,0,0.3)",!0,!1,ee,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),yo(y,a,y.background,!0,!1,ee,E),a.fillRect(0,0,ee.width/2,ee.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)))))),b&&(a.restore(),a.Vc(!0))}},qe.g=function(a,y,x,b,E){var ee=this.diagram;ee!==null&&ee.cb(no,a,this,y,x,b,E)},qe.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Ma(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),ud(this,a,y),a},qe.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Ma(y),a};function ud(a,y,x){if(y=Vg(a,y,x),x instanceof Ir&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&ud(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var ee=y-1,ne=NaN;0<=ee&&(ne=a.M(ee).zOrder,!!isNaN(ne));)ee--;for(var ae=y+1,ue=NaN;ae<E&&(ue=a.M(ae).zOrder,!!isNaN(ue));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(ee===-1||ne<=b){if(ee++,ee===y)break;return a.mb(y),a.Gb(ee,x),ee}for(ne=NaN;0<=--ee&&(ne=a.M(ee).zOrder,isNaN(ne)););}else if(!isNaN(ue)&&ue<b)for(;;){if(ae===E||ue>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(ue=NaN;++ae<E&&(ue=a.M(ae).zOrder,isNaN(ue)););}return y}zt.Object.defineProperties(ra.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===""&&jt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&jt("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)&&Nn(a,"0 <= value <= 1",ra,"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))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Yt(a,y){if(am||(Ta(),am=!0),cr(this),cu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,vo){var x=this,b=function(){x.removeEventListener(vn.document,"DOMContentLoaded",b,!1),x.setRTL()};vn.document.body!==null?this.setRTL():x.addEventListener(vn.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",ji);var E=this;return this.Hb=function(ee){var ne=E.partManager;if(ee.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var ae=ee.change;ee.modelChange===""&&ae===no&&ne.updateDataBindings(ee.object,ee.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(ee){E.partManager.doModelChanged(ee)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new so,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 sm,a!==void 0&&(typeof a=="string"||vn.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,cu;function Zg(a){a.Yd=new bs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new rn,a.pj=new tn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new lt(NaN,NaN).freeze(),a.du=new lt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new lt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new jr,a.zu=new lt(NaN,NaN).freeze(),a.ut=new $t(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ur(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Vo,a.Fg=Ba,a.pq=Vo,a.yt=Ei,a.Bt=Ei,a.Fc=!0,a.pn=!1,a.De=new an,a.Eh=new tn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ur(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new va,a.bq.diagram=a,a.Qg=new va,a.Qg.diagram=a,a.cj=new va,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new an,a.Ht=!0,a.uu=vh,a.pw=!1,a.wu=Tf,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 rn,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 Ur(5).freeze(),a.Hw=new an().freeze(),a.Nt=999999999,a.nw=new an().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 an,a.ow=new an,a.Xh=null,a.aw=new mn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new lt,bounds:new $t,Py:new mn,bA:new mn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new $t(NaN,NaN,NaN,NaN).freeze(),a.wo=new mn(NaN,NaN).freeze(),a.Sp=new $t(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new tn;var y=new Un,x=new Zi;x.bind(new Lo("text","",Fr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Un,x=new Zi,x.stroke="brown",x.bind(new Lo("text","",Fr)),y.add(x),a.Lg.add("Comment",y),y=new Un,y.selectable=!1,y.avoidable=!1,x=new Hr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new mn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new tn,y=new Ir,y.selectionObjectName="GROUPPANEL",y.type=wn.Vertical,x=new Zi,x.font="bold 12pt sans-serif",x.bind(new Lo("text","",Fr)),y.add(x),x=new wn(wn.Auto),x.name="GROUPPANEL";var b=new Hr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ja,b.padding=new Ur(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new tn,y=new En,x=new Hr,x.isPanelMain=!0,y.add(x),x=new Hr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new En,x=new Hr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new mi,y.type=wn.Auto,x=new Hr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new Ur(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new mi,y.type=wn.Link,x=new Hr,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 ji,a.toolManager=new Ji,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new he,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=ar,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 lt,a.zy=500,a.wp=new lt,a.wq=!1}Yt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new an().freeze(),a.nw=new an().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var ee=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var ae=a.Wa.s[y].parts;ae.next();){var ue=ae.value;ue!==E&&ue.data===null&&ee.push(ue)}for(y=0;y<ee.length;y++)a.remove(ee[y])}for(y=0;y<ne;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(),Od(),a.Og.clear(),ki=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),ee}function Xg(){return null}Yt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),Jl(this),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Yt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=vn.document.body);var y=Xn("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},Yt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=vn.document.body);var y=0;if(vo){var x=om;y=Yh,x===null&&(x=om=Xn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=Xn("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 b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||ni||(y=11)}this.Db=y,this.Gw=!0},Yt.prototype.qb=function(a){a.classType===Yt&&(this.autoScale=a)},Yt.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 mp(a,y){if(vo){if(y!=null||jt("Diagram setup requires an argument DIV."),a.Ka!==null&&jt("Diagram has already completed setup."),typeof y=="string"?a.Ka=vn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:jt("No DIV or DIV id supplied: "+y),a.Ka===null&&jt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&jt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&vn.ResizeObserver){var x=Ht(function(){a.$b()},250);a.ol=new vn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}vn.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=vn.go;var E=new ll(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",vn.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new ll(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,vo){E=Xn("div");var ee=Xn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",ee.style.position="absolute",ee.style.width="1px",ee.style.height="1px",a.Ka.appendChild(E),E.appendChild(ee),E.onscroll=Qg,E.addEventListener("pointerdown",$g),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=ee}a.hk=Ht(function(){a.Yh=null,a.N()},300),a.Ov=Ht(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=Ws(a,ne,!0);ae.bubbles=!0;var ue=0,ge=0;ae.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(ue=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ge=0<ne.deltaY?1:-1),ae.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-ue:-ge):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(ue=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ge=0<ne.wheelDeltaY?-1:1),ae.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-ue:-ge):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(ae.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),yl(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Ws(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.Yt;ae[ne.pointerId]===void 0&&(ae[ne.pointerId]=ne),ae=a.oj;var ue=!1;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType)if(ae[1]!==null&&ae[1].pointerId===ne.pointerId)ae[1]=ne,ue=!0;else if(ae[0]===null)ae[0]=ne;else if(ae[1]===null)ae[1]=ne,ue=!0;else{ne.preventDefault();return}else ae[0]=ne;(ae=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ge=ue;ue=wp(a,ne,!0,!1,!0,ge),Dc(a,ne,ue),ue.targetDiagram=xp(ne,ne.target),ue.targetObject=null,ge||ue.clone(a.bq),ge=a.uw,ae=ae?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ge.x-ne.screenX)>ae||Math.abs(ge.y-ne.screenY)>ae)?a.yq++:a.yq=1,ue.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():yl(ue,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=wp(a,ne,!1,!1,!1,ae[1]!==null);var ue=vn.document.elementFromPoint(ne.clientX,ne.clientY)||null;ue!==null&&ue.shadowRoot!==void 0&&ue.shadowRoot!==null&&(ue=ue.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ge=a,ye=ne;ue&&ue.H&&(ye=ne,ge=ue.H),ae.targetDiagram=ge,Dc(a,ye,ae),ae.targetObject=null,a.doMouseMove(),yl(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",ue=a.Yt;if(ae&&a.qu)delete ue[ne.pointerId],ne.preventDefault();else if(ue=a.oj,ue[0]===null||ue[0].pointerId!==ne.pointerId&&ue[0].pointerType===ne.pointerType)ue[1]!==null&&ue[1].pointerId===ne.pointerId&&(ue[1]=null);else{ue[0]=null,ue=wp(a,ne,!1,!0,!0,!1);var ge=vn.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof Yt&&ge.H!==a&&Dc(ge.H,ne,ue),ge===null&&(ge=ne.target),Dc(a,ne,ue),ue.clickCount=a.yq,ue.targetDiagram=xp(ne,ge),ue.targetObject=null,a.doMouseUp(),yl(ue,ne),ae&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var ae=a.Yt;ae[ne.pointerId]&&delete ae[ne.pointerId],ae=a.oj,ae[0]!==null&&ae[0].pointerId===ne.pointerId&&(ae[0]=null),ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var ae=a.oj;ae[0]!==null&&ae[0].pointerId===ne.pointerId?(ae[0]=null,a.wq=!1):ae[1]!==null&&ae[1].pointerId===ne.pointerId&&(ae[1]=null)},a.Vp=b.Z["d"+Nf[1]+Nf[2]+"wI"+Uc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Mf,y,y),b.Vc(!0),t0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Yt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Yt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function t0(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(vn,"resize",a.Ov,!1)}function as(a){30<a.Sq&&(a.Yh=1)}function bf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),wr&&wr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Yt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:vn.devicePixelRatio||1},Yt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Yt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Yt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Yt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Yt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Yt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Yt.prototype.doFocus=function(){this.focus()},Yt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=vn.scrollX||vn.pageXOffset,y=vn.scrollY||vn.pageYOffset;this.ta.focus(),vn.scrollTo(a,y)}},Yt.prototype.Oy=function(){this.H.R("GainedFocus")},Yt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(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,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Jg(a){var y=new wn(wn.Grid);y.name="GRID";var x=new Hr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Hr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Hr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Hr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Hr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Hr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Sr,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 Qg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rc(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rc(this.H)}Yt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,ee=this.rj,ne=b.x-ee.left,ae=b.y-ee.top,ue=b.width+ee.left+ee.right,ge=b.height+ee.top+ee.bottom,ye=b.right+ee.right;ee=b.bottom+ee.bottom;var Le=E.x;b=E.y;var ze=E.width,We=E.height,Je=E.right,it=E.bottom;E=this.scale;var Tt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Tt=Tt+a.scrollWidth-a.clientWidth;break;case"reverse":Tt=a.scrollWidth-Tt-a.clientWidth}var Pt=Tt;ze<ue||We<ge?(Tt=lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Pt&&(Tt.x=Pt/E+ne,this.ju=Pt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Tt.y=a.scrollTop/E+ae,this.lu=a.scrollTop),this.position=Tt,lt.free(Tt),this.Ee=this.qr=!1):(Tt=lt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Le&&(this.position=Tt.h(Pt+ne,this.position.y)),ye>Je&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+Pt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(ae<b&&(this.position=Tt.h(this.position.x,a.scrollTop+ae)),ee>it&&(this.position=Tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+ee))),lt.free(Tt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,Je=E.right,ee=b.bottom,it=E.bottom,ne=b.x,Le=E.x,ae=b.y,b=E.y,ze>=ue&&ne>=Le&&ye<=Je&&(x.style.width="1px"),We>=ge&&ae>=b&&ee<=it&&(x.style.height="1px"))}},Yt.prototype.computeBounds=function(a){return a===void 0&&(a=new $t),xa(this),yp(this,a)};function yp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,ee=0;ee<E;ee++){var ne=b[ee];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue];ge.isInDocumentBounds&&ge.isVisible()&&(ge=ge.actualBounds,ge.w()&&(x?(x=!1,y.assign(ge)):y.ed(ge)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Yt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Dn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof En||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof En||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new $t(NaN,NaN,0,0):x};function al(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=lt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=$t.allocAt(0,0,b.width,b.height);var E=lt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,$t.free(b),lt.free(E),lt.free(x)}x=a.yh,y&&a.Fg!==Ba&&(x=a.Fg);var ee=x!==Ba?Fc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/ee;var ne=a.ya/ee,ae=a.zk,ue=a.pq;y&&!ae.sb()&&(ue.sb()||ue.Xb())&&(ae=ue.Xb()?ai:ue),Sp(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=ee,a.vb=!1,ee=a.viewportBounds,Gt.B(ee.x,x)&&Gt.B(ee.y,b)&&Gt.B(ee.width,E)&&Gt.B(ee.height,ne)||a.onViewportBoundsChanged(new $t(x,b,E,ne),ee,y,!1)}}function Fc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var ee=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),ae=ee/E,ue=ne/b;return y===Fs?(y=Math.min(ue,ae),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===tc?(y=ue>ae?(ne-a.Db)/b:(ee-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Yt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Fs),a!==mh&&(al(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},qe=Yt.prototype,qe.BA=function(a,y){y===void 0&&(y=Fs);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Fs||y===tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var ee=this.ya;E=y===tc?ee/b>E/x?(ee-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(ee/b,E/x)}this.scale=E,this.position=new lt(a.x,a.y)}},qe.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new lt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},qe.zz=function(a){if(a instanceof _t){this.eq=a;var y=lt.alloc();this.fq=this.op(a.ga(Ei,y)),lt.free(y)}else this.eq=null,this.fq=ar};function Sp(a,y,x,b,E,ee){var ne=lt.allocAt(a.pa.x,a.pa.y),ae=ne.x,ue=ne.y;if(a.eq!==null){var ge=lt.alloc();ge=a.eq.ga(Ei,ge),ae=ge.x-a.fq.x/a.scale,ue=ge.y-a.fq.y/a.scale,E=Vr,lt.free(ge)}(ee||a.scrollMode===mh)&&(E.sb()&&(x>y.width&&(ae=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(ue=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,ee=x-y.width,x<y.width+E.left+E.right?(ae=Math.min(ae+x/2,y.right+Math.max(ee,E.right)-x/2),ae=Math.max(ae,y.left-Math.max(ee,E.left)+x/2),ae-=x/2):ae>y.left?ae=y.left:ae<y.right-x&&(ae=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(ue=Math.min(ue+b/2,y.bottom+Math.max(x,E.bottom)-b/2),ue=Math.max(ue,y.top-Math.max(x,E.top)+b/2),ue-=b/2):ue>y.top?ue=y.top:ue<y.bottom-b&&(ue=y.bottom-b)),ne.x=isFinite(ae)?ae:-a.yb.left,ne.y=isFinite(ue)?ue:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),Ug(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jl(a),lt.free(ne)}qe.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=fu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Sr)return a}else if(a=fu(this,a,function(x){return x.part}),a instanceof Sr)return a;return null},qe.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),xa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function fu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),xa(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}qe.lz=function(a,y,x){return y===void 0&&(y=!0),Pf(this,a,function(b){return b.part},y?function(b){return b instanceof Sr&&b.canSelect()}:null,x)};function Pf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof rn||E instanceof an||(E=new an),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ee=a.value;ee.visible&&!ee.isTemporary&&ee.ji(y,x,b,E)}return E}qe.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof rn||b instanceof an||(b=new an),xa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var ee=E.value;ee.visible&&ee.ji(a,y,x,b)}return b},qe.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),hd(this,a,function(E){return E instanceof Sr&&(!x||E.canSelect())},y,b)},qe.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof an||(E=new an),xa(this);for(var ee=this.Wa.iteratorBackwards;ee.next();){var ne=ee.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},qe.Nu=function(a,y,x,b,E,ee){var ne=new an;xa(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var ue=ae.value;ue.visible&&ue.Nu(a,y,x,b,ne,E,ee)}return ne};function hd(a,y,x,b,E){var ee=null;for(ee===void 0&&(ee=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof rn||E instanceof an||(E=new an),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,ee,x,b,E)}return E}qe.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Cf(this,a,y,function(ee){return ee instanceof Sr&&(!b||ee.canSelect())},x,E)},qe.og=function(a,y,x,b,E,ee){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof an)&&(ee=E),E=!0),ee instanceof rn||ee instanceof an||(ee=new an),xa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,ee)}return ee};function Cf(a,y,x,b,E,ee){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof rn||E instanceof an)&&(ee=E),E=!0),ee instanceof rn||ee instanceof an||(ee=new an),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,ee)}return ee}Yt.prototype.acceptEvent=function(a){return Ws(this,a,a instanceof MouseEvent)};function Ws(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Dc(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),ni&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=xp(y,y.target),b.targetObject=null,b}function xp(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 wp(a,y,x,b,E,ee){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,ni&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=ee,ne}function yl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Yt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ws(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(),yl(x,a)},Yt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(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(),yl(x,a)},Yt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),yl(x,a)},Yt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ws(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),yl(x,a)},Yt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new lt(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?Kn(new lt(y,a),this.Ab):new lt(y,a)};function Dc(a,y,x){var b=a.ta,E=a.Aa,ee=a.ya,ne=0,ae=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,ae=y.clientY-ee/b.height*b.top),x.viewPoint.h(ne,ae),a.Ab!==null?(y=lt.allocAt(ne,ae),a.Ab.Cd(y),x.documentPoint.assign(y),lt.free(y)):x.documentPoint.h(ne,ae)}function bp(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Yt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||xa(a),a.Va()}Yt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},qe=Yt.prototype,qe.Pz=function(){return this.kg},qe.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ks(this),this.hf=!1,this.du=new lt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Jt(function(){b.ld=!1,hu(y,"Model"),a(b)},1)},qe.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;vn.requestAnimationFrame(function(){y.kg&&y.bd()})}},qe.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ks(this))};function Jh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rc(a)||(y&&xa(a),x&&al(a,!1))}function Ks(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];Bo(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(ue){ue.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||vp(a),Jh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Yl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),xa(a),ee=!1,(!a.hf||a.xh)&&(a.hf?jp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),jp(a,!1)),ee=!0),a.Jk=!1,xa(a),a.ou||qg(a),Jh(a,!0,!1),ne=!1,ee?(x=$t.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Pp(a)),a.R("LayoutCompleted"),Jh(a,!0,!1),$t.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ba?a.scale=Fc(a,a.Fg):a.yh!==Ba?a.scale=Fc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),al(a,!0)),ee&&ne&&a.eb("Initial Layout"),xa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Pp(a){if(a.Fg!==Ba)a.scale=Fc(a,a.Fg);else if(a.yh!==Ba)a.scale=Fc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}al(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Yl(a)}function xa(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 an,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Ir&&b.U&65536&&(b.U=b.U^65536)})}}qe.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Ir||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ir&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof En&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof mi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=er(),b=er(),E=y.memberParts;E.next();){var ee=E.value;ee.isVisible()&&(ee instanceof Ir?(Bs(ee)||Xa(ee)||rc(ee))&&Ef(a,ee):ee instanceof En?ee.fromNode===y||ee.toNode===y?b.push(ee):x.push(ee):(ee.measure(1/0,1/0),ee.arrange()))}for(a=x.length,E=0;E<a;E++)ee=x[E],ee.measure(1/0,1/0),ee.arrange();for(_n(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();_n(b)}qe.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},qe.gc=function(a){if(this.Ka!==null){if(this.ta===null&&jt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ic(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,ee=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,ae=this.Ab;for(ae.reset(),E!==1&&ae.scale(E),y.x===0&&y.y===0||ae.translate(-ee,-ne),a.ti=null,Yy(a,ae.m11,ae.m12,ae.m21,ae.m22,ae.dx,ae.dy),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Hc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(jr.prototype.Cd=jr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(ee=this.animationManager,!ee.zb&&(!ee.isAnimating||ee.isTicking)&&(x=new Date,Ic(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!ee.isAnimating)break e;ee=this.Ab,ee.reset(),ne=this.Mb,ae=this.pa;var ue=this.Ca,ge=Math.round(ae.x*ue)/ue,ye=Math.round(ae.y*ue)/ue;for(ue!==1&&ee.scale(ue),ae.x===0&&ae.y===0||ee.translate(-ge,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Hc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(jr.prototype.Cd=jr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=wr&&wr.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function cd(a,y,x,b,E,ee,ne,ae,ue,ge){if(a.Ka!==null){a.ta===null&&jt("No canvas specified"),ne===void 0&&(ne=null),ae===void 0&&(ae=null),ue===void 0&&(ue=!1),ge===void 0&&(ge=!1),Ic(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Le=a.Wa.s,ze=Le.length;try{var We=new $t(ee.x,ee.y,b.width/E,b.height/E),Je=We.copy();Je.Co(x),Yl(a,Je),xa(a),a.Fd(Le,ze,a,We),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ae!==null&&ae!==""&&(y.fillStyle=ae,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var Tt=jr.alloc();Tt.reset(),Tt.translate(x.left,x.top),Tt.scale(E),ee.x===0&&ee.y===0||Tt.translate(-ee.x,-ee.y),y.setTransform(Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),y.yc(),y instanceof Ps&&Yy(y,Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),jr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var Pt=a.Qj("Grid");if(ne){var Nt=new an,At=ne.iterator;for(At.reset();At.next();){var Bt=At.value;Bt instanceof Sr&&(ge||Bt.layer!==Pt)&&(Bt.Gj(),Nt.add(Bt))}for(ge=0;ge<ze;ge++)Kg(Le[ge],y,a,Nt,ue);Nt.each(function(Zt){return Zt.Gj()})}else for(Nt=0;Nt<ze;Nt++){var Rt=Le[Nt];Rt===Pt?ge&&Rt.gc(y,a,!0):Rt.gc(y,a,ue)}a.$i=!1,a.Yf&&Hc(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Le,ze,a,a.viewportBounds),Yl(a),a.ib instanceof Ps&&(a.ib.Nj.PA(),a.redraw())}}}qe.Gf=function(a){return this.Rg[a]},qe.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},qe.Tx=function(){this.Rg=new pr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ni||Ni),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}qe.Ql=function(a){return this.on[a]},qe.sA=function(a,y){this.on[a]=y},qe.Sx=function(){this.on=new pr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},qe.set=function(a){return Object.assign(this,a),this},qe.Du=function(a){return this.nm(a)},qe.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof wn,b=a instanceof Yt,E;for(E in y){E===""&&jt("Setting properties requires non-empty property names");var ee=a,ne=E;if(x||b){var ae=E.indexOf(".");if(0<ae){var ue=E.substring(0,ae);x?ee=a.fb(ue):(ee=a[ue],ee==null&&(ee=a.toolManager[ue])),sn(ee)?ne=E.substr(ae+1):jt("Unable to find object named: "+ue+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!zr(ee,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&zr(a.toolManager,ne))ee=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof fr&&ne==="Changed"){a.Pe(y[ne]);continue}else jt('Trying to set undefined property "'+ne+'" on object: '+ee.toString());ee[ne]=y[E],ne[0]==="_"&&ee instanceof _t&&ee.Vw(ne)}}qe.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()}},qe.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")},Yt.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!==Lf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),ee=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))*b&&0<Math.max(0,ee-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=$t.alloc(),Ap(this,this.computeBounds(b)),$t.free(b)),b=this.ta,b===null||b instanceof Ql)))){var ne=this.Mb;E=this.Aa*ne;var ae=this.ya*ne,ue=this.scale*ne;ee=Math.round(Math.round(y.x*ue)-Math.round(a.x*ue)),y=Math.round(Math.round(y.y*ue)-Math.round(a.y*ue)),ue=this.jw,a=this.oy,ue.width!==E&&(ue.width=E),ue.height!==ae&&(ue.height=ae),a.clearRect(0,0,E,ae),ue=190*ne;var ge=70*ne,ye=Math.max(ee,0),Le=Math.max(y,0),ze=Math.floor(E-ye),We=Math.floor(ae-Le);a.drawImage(b.Oa,ye,Le,ze,We,0,0,ze,We),Hc(this.Yf,this)&&a.clearRect(0,0,ue,ge),b=er(),a=er(),We=Math.abs(ee),ze=Math.abs(y);var Je=ye===0?0:E-We;ye=lt.allocAt(Je,0),We=lt.allocAt(We+Je,ae),a.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),Kn(ye,it),Kn(We,it),b.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Je=Le===0?0:ae-ze,ye.h(0,Je),We.h(E,ze+Je),a.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Kn(ye,it),Kn(We,it),b.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Hc(this.Yf,this)&&(E=0<ee?0:-ee,ae=0<y?0:-y,ye.h(E,ae),We.h(ue+E,ge+ae),a.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y))),Kn(ye,it),Kn(We,it),b.push(new $t(Math.min(ye.x,We.x),Math.min(ye.y,We.y),Math.abs(ye.x-We.x),Math.abs(ye.y-We.y)))),lt.free(ye),lt.free(We),Jh(this,!1,!0),this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ic(this),ae=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ae,this.ya*ae),E.drawImage(this.jw.Oa,0<ee?0:Math.round(-ee),0<y?0:Math.round(-y)),ee=this.pa,ne=this.Ca,ue=Math.round(ee.x*ne)/ne,ge=Math.round(ee.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),ee.x===0&&ee.y===0||y.translate(-ue,-ge),E.save(),E.beginPath(),ee=a.length,ne=0;ne<ee;ne++)ue=a[ne],ue.width!==0&&ue.height!==0&&E.rect(Math.floor(ue.x),Math.floor(ue.y),Math.ceil(ue.width),Math.ceil(ue.height));for(E.clip(),E.setTransform(ae,0,0,ae,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,ee=y.length,this.Fd(y,ee,this,this.viewportBounds),ph(this,E),E.globalAlpha=this.pb,ae=0;ae<ee;ae++)if(ne=y[ae],ue=b,ne.visible&&ne.pb!==0){ge=Gu(ne,E),Le=ne.Zq,Le.length=0,ye=this.scale,ze=$t.alloc(),We=ne.Pa.s,it=We.length,Je=ue.length;for(var Tt=0;Tt<it;Tt++){var Pt=We[Tt],Nt=Jc(Pt,Pt.actualBounds);e:{for(var At=2/ye,Bt=4/ye,Rt=0;Rt<Je;Rt++){var Zt=ue[Rt];if(Zt.width!==0&&Zt.height!==0&&Nt.Vu(Zt.x-At,Zt.y-At,Zt.width+Bt,Zt.height+Bt)){Nt=!0;break e}}Nt=!1}Nt&&ne.Oj(E,Pt,this,Le,ye,ze,!0)}$t.free(ze),E.globalAlpha=ge}E.restore(),E.Vc(!0),this.Yf&&Hc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}_n(b),_n(a),this.ld=!1}}else this.bd();x&&(as(this),this.bd(),bf(this,!0))}else x?(as(this),this.bd(),bf(this,!0)):this.bd()}};function Ic(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){Jl(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,ee=!1,ne=a.gf?a.Db:0,ae=a.Be?a.Db:0,ue=E.clientWidth||x+ne,ge=E.clientHeight||b+ae,ye=a.viewportBounds;E=ye.x;var Le=ye.y,ze=ye.width,We=ye.height;if((ue!==x+ne||ge!==b+ae)&&(a.gf=!1,a.Be=!1,ae=ne=0,a.Aa=ue,a.ya=ge,ee=a.pn=!0,Jl(a)),!a.hf||!a.viewportBounds.w())return!0;var Je=a.ku,it=a.hu;if(a.Ee=!1,!(ee||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,Pt=0,Nt=0,At=0,Bt=0,Rt=ye.width,Zt=ye.height,Fn=a.rj;a.contentAlignment.sb()?(Tt.width>Rt&&(Pt=Fn.left,Nt=Fn.right),Tt.height>Zt&&(At=Fn.top,Bt=Fn.bottom)):(Pt=Fn.left,Nt=Fn.right,At=Fn.top,Bt=Fn.bottom);var or=Tt.width+Pt+Nt,$n=Tt.height+At+Bt;Fn=a.scale;var Cn=or>ue/Fn,fn=$n>ge/Fn;if(!(ee||a.gf||a.Be||Cn||fn))return!0;Pt=Tt.x-Pt,ue=ye.x,Nt=Tt.right+Nt,ge=ye.right+ne,At=Tt.y-At;var Br=ye.y;Tt=Tt.bottom+Bt,ye=ye.bottom+ae;var Nr="1px";if(Bt="1px",a.scrollMode===mh&&(Cn||fn)&&(Cn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Cn=1,Pt+1<ue&&(Cn=Math.max((ue-Pt)*Fn+a.Aa,Cn)),Nt>ge+1&&(Cn=Math.max((Nt-ge)*Fn+a.Aa,Cn)),Rt+ne+1<or&&(Cn=Math.max((or-Rt)*Fn+a.Aa,Cn)),Nr=Cn.toString()+"px"),fn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Cn=1,At+1<Br&&(Cn=Math.max((Br-At)*Fn+a.ya,Cn)),Tt>ye+1&&(Cn=Math.max((Tt-ye)*Fn+a.ya,Cn)),Zt+ae+1<$n&&(Cn=Math.max(($n-Zt)*Fn+a.ya,Cn)),Bt=Cn.toString()+"px")),Cn=Nr!=="1px",fn=Bt!=="1px",Cn&&fn||!Cn&&!fn||(fn&&(ge-=a.Db),Cn&&(ye-=a.Db),or<Rt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Pt+1<ue&&(ne=Math.max((ue-Pt)*Fn+a.Aa,ne)),Nt>ge+1&&(ne=Math.max((Nt-ge)*Fn+a.Aa,ne)),Rt+1<or&&(ne=Math.max((or-Rt)*Fn+a.Aa,ne)),Nr=ne.toString()+"px"),Cn=Nr!=="1px",ne=a.ya,Cn!==a.Be&&(ne=Cn?a.ya-a.Db:a.ya+a.Db),$n<Zt+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,At+1<Br&&(ae=Math.max((Br-At)*Fn+ne,ae)),Tt>ye+1&&(ae=Math.max((Tt-ye)*Fn+ne,ae)),Zt+1<$n&&(ae=Math.max(($n-Zt)*Fn+ne,ae)),Bt=ae.toString()+"px"),fn=Bt!=="1px"),a.qr&&Cn===a.Be&&fn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Cn!==a.Be&&(Nr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),ee=!0),a.Be=Cn,it.style.width=Nr,fn!==a.gf&&(Bt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),ee=!0,a.tn&&(ae=lt.alloc(),fn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),lt.free(ae))),ee&&Jl(a),a.gf=fn,it.style.height=Bt,a.gu=!0,ee&&(a.pn=!0),y=Je.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Rt+1<or?y=(a.position.x-Pt)*Fn:Pt+1<ue?y=Je.scrollWidth-Je.clientWidth:Nt>ge+1&&(y=a.position.x*Fn)),a.tn)switch(a.bu){case"negative":y=-(Je.scrollWidth-y-Je.clientWidth);break;case"reverse":y=Je.scrollWidth-y-Je.clientWidth}return Je.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Zt+1<$n?Je.scrollTop=(a.position.y-At)*Fn:At+1<Br?Je.scrollTop=Je.scrollHeight-Je.clientHeight:Tt>ye+1&&(Je.scrollTop=a.position.y*Fn)),ue=a.Aa,ge=a.ya,Je.style.width=ue+(a.gf?a.Db:0)+"px",Je.style.height=ge+(a.Be?a.Db:0)+"px",x!==ue||b!==ge||a.animationManager.zb?(x=$t.allocAt(E,Le,ze,We),a.onViewportBoundsChanged(x,a.viewportBounds,Fn,ee),$t.free(x),!1):!0}qe=Yt.prototype,qe.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&jt("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&&jt('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(bo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},qe.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof mi||a instanceof Ir&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Xa(a)!==!0&&rc(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.$b()},qe.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Jc(a,a.actualBounds)),this.$b()},qe.remove=function(a){Ep(this,a,!0)};function Ep(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Eo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}qe.Is=function(a,y){if(y===void 0&&(y=!1),Dn(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new an,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},qe.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Yt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new tn;if(a!==null)if(Dn(a))for(var ee=0;ee<a.length;ee++)du(this,E,a[ee],x,b);else for(a=a.iterator;a.next();)du(this,E,a.value,x,b);else{for(a=this.parts;a.next();)du(this,E,a.value,x,b);for(a=this.nodes;a.next();)du(this,E,a.value,x,b);for(a=this.links;a.next();)du(this,E,a.value,x,b)}Qh(this,E,y,b,x)}};function du(a,y,x,b,E,ee){if(!y.contains(x)&&(ee===void 0&&(ee=!1),!b||ee||x.canMove()||x.canCopy()))if(E===void 0&&(E=fd(a)),x instanceof Un){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Ir&&(x.placeholder!==null||E.dragsMembers))for(ee=x.memberParts;ee.next();)du(a,y,ee.value,b,E,E.groupsAlwaysMove);for(ee=x.linksConnected;ee.next();){var ne=ee.value;if(!y.contains(ne)){var ae=ne.fromNode,ue=ne.toNode;ae!==null&&y.contains(ae)&&ue!==null&&y.contains(ue)&&du(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)du(a,y,x.value,b,E)}else if(x instanceof En)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)du(a,y,x.value,b,E);else x instanceof mi||y.add(x,a.Pd(E,x,x.location))}function Qh(a,y,x,b,E){if(y!==null&&y.count!==0){var ee=lt.alloc(),ne=lt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||pd(a,y);for(var ae=er(),ue=er(),ge=y.iterator,ye=lt.alloc();ge.next();){var Le=ge.key,ze=ge.value;if(Le.Zc()){var We=kp(a,Le,y);We!==null?ae.push(new re(Le,ze,We)):(!E||Le.canMove())&&(We=ze.point,ee.assign(We),a.computeMove(Le,ee.add(ne),b,ye),Le.location=ye,ze.shifted===void 0&&(ze.shifted=new lt),ze.shifted.assign(ye.re(We)))}else ge.key instanceof En&&ue.push(ge.sa)}for(lt.free(ye),E=ae.length,ge=0;ge<E;ge++)Le=ae[ge],ee.assign(Le.info.point),Le.Su.shifted===void 0&&(Le.Su.shifted=new lt),Le.node.location=ee.add(Le.Su.shifted);for(E=lt.alloc(),ge=lt.alloc(),Le=ue.length,ze=0;ze<Le;ze++){var Je=ue[ze];if(We=Je.key,We instanceof En)if(We.suspendsRouting){We.Tg=null,ye=We.fromNode;var it=We.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=Je.value.point,We.dragComputation===null)y.add(We,a.Pd(b,We,ne)),Ch(We,ne.x-it.x,ne.y-it.y);else{Je=lt.allocAt(0,0),(ye=We.i(0))&&ye.w()&&Je.assign(ye);var Tt=ye=lt.alloc().assign(Je).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Tt=lt.alloc(),dd(a,We,ye,Tt,b)),ye.assign(We.dragComputation(We,ye,Tt)).re(Je),y.add(We,a.Pd(b,We,ye)),Ch(We,ye.x-it.x,ye.y-it.y),lt.free(Je),lt.free(ye),Tt!==ye&<.free(Tt)}else ye!==null&&(E.assign(ye.location),Tt=y.I(ye),Tt!==null&&E.re(Tt.point)),it!==null&&(ge.assign(it.location),Tt=y.I(it),Tt!==null&&ge.re(Tt.point)),ye!==null&&it!==null?E.Xa(ge)?(ye=Je.value.point,it=ee,it.assign(E),it.re(ye),y.add(We,a.Pd(b,We,E)),Ch(We,it.x,it.y)):(We.suspendsRouting=!1,We.bb()):(Je=Je.value.point,ye=ye!==null?E:it!==null?ge:ne,y.add(We,a.Pd(b,We,ye)),Ch(We,ye.x-Je.x,ye.y-Je.y))}else(We.fromNode===null||We.toNode===null)&&(ye=Je.value.point,y.add(We,a.Pd(b,We,ne)),Ch(We,ne.x-ye.x,ne.y-ye.y))}lt.free(ee),lt.free(ne),lt.free(E),lt.free(ge),_n(ae),_n(ue),x||(xa(a),$h(a,y))}}Yt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new lt),b.assign(y),a===null)return b;var E=y,ee=x.isGridSnapEnabled;ee&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=lt.alloc(),dd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,ae=ne.x;isNaN(ae)&&(ae=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=ee?Math.round(1e3*a.location.y)/1e3:a.location.y);var ue=a.maxLocation,ge=ue.x;return isNaN(ge)&&(ge=ee?Math.round(1e3*a.location.x)/1e3:a.location.x),ue=ue.y,isNaN(ue)&&(ue=ee?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ae,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,ue))),E!==y&<.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(a)),b.assign(x),y!==null){var ee=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,ae=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,ee!==null){var ue=ee.gridCellSize;isNaN(a)&&(a=ue.width),isNaN(y)&&(y=ue.height),ee=ee.gridOrigin,isNaN(ae)&&(ae=ee.x),isNaN(ne)&&(ne=ee.y)}ee=lt.allocAt(0,0),ee.yi(0,0,a,y,E),Gt.No(x.x,x.y,ae+ee.x,ne+ee.y,a,y,b),lt.free(ee)}}function pd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof En&&(y.suspendsRouting=!0)}function $h(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof En&&(x.suspendsRouting=!1,X0(x)&&x.bb())}a.Mr=!1}}function kp(a,y,x){return y=y.containingGroup,y!==null&&(a=kp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}qe=Yt.prototype,qe.Pd=function(a,y,x){if(x===void 0)return new Uu(zn);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Uu(new lt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Uu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&jt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&jt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&jt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&jt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&jt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}qe.Al=function(a){Tp(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(bo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},qe.Ww=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,ee;for(ee=0;ee<E;ee++)if(x.M(ee)===y){x.Gb(ee,a);break}return this.cc!==null&&this.cb(bo,"layers",this,null,a,null,ee),this.N(),0>b&&this.Ya(),this},qe.Cy=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,ee;for(ee=0;ee<E;ee++)if(x.M(ee)===y){x.Gb(ee+1,a);break}return this.cc!==null&&this.cb(bo,"layers",this,null,a,null,ee+1),this.N(),0>b&&this.Ya(),this},qe.kA=function(a){if(a.diagram!==this&&jt("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 b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},qe.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},qe.Yw=function(a){return this.pf===null&&(this.pf=new rn),this.pf.add(a),this.model.Pe(a),this},qe.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},qe.Pe=function(a){return this.zg===null&&(this.zg=new rn),this.zg.add(a),this},qe.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},qe.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},qe.cb=function(a,y,x,b,E,ee,ne){ee===void 0&&(ee=null),ne===void 0&&(ne=null);var ae=new oo;ae.diagram=this,ae.change=a,ae.propertyName=y,ae.object=x,ae.oldValue=b,ae.oldParam=ee,ae.newValue=E,ae.newParam=ne,this.ds(ae)},qe.g=function(a,y,x,b,E){this.cb(no,a,this,y,x,b,E)},Yt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===no){var E=a.object;if(ro(E,a.propertyName,a.I(y)),E instanceof _t){var ee=E.part;ee!==null&&ee.Wb()}this.isModified=!0}else if(b===bo){var ne=a.object,ae=a.newParam,ue=a.newValue;if(ne instanceof wn)if(typeof ae=="number"&&ue instanceof _t){y?ne.pc(ae):ne.Gb(ae,ue);var ge=ne.part;ge!==null&&ge.Wb()}else typeof ae=="number"&&ue instanceof Io&&(ue.isRow?c1(ne,ae,y?void 0:ue):f1(ne,ae,y?void 0:ue));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof ae=="number"&&ue instanceof Sr&&(y?(ue.isSelected=!1,ue.isHighlighted=!1,ue.Wb(),ne.pc(ye?ae:-1,ue,ye)):ne.oi(ae,ue,ye))}else ne instanceof Yt?typeof ae=="number"&&ue instanceof ra&&(y?this.Wa.mb(ae):(ue.Xe(this),this.Wa.Gb(ae,ue))):jt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Le=a.object,ze=a.oldParam,We=a.oldValue;if(Le instanceof wn)typeof ze=="number"&&We instanceof _t?y?Le.Gb(ze,We):Le.pc(ze):typeof ze=="number"&&We instanceof Io&&(We.isRow?c1(Le,ze,y?We:void 0):f1(Le,ze,y?We:void 0));else if(Le instanceof ra){var Je=a.newParam===!0;typeof ze=="number"&&We instanceof Sr&&(y?0>Le.Pa.indexOf(We)&&Le.oi(ze,We,Je):(We.isSelected=!1,We.isHighlighted=!1,We.Wb(),Le.pc(Je?ze:-1,We,Je)))}else Le instanceof Yt?typeof ze=="number"&&We instanceof ra&&(y?(We.Xe(this),this.Wa.Gb(ze,We)):this.Wa.mb(ze)):jt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&jt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Yt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Yt.prototype.eb=function(a){return this.undoManager.eb(a)},Yt.prototype.Kf=function(){return this.undoManager.Kf()},Yt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Yt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Yt.prototype.rp=function(){this.partManager.rp()};function Lp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Jl(a),a.N(),a.Ee=!0,b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Jl(a);else{a.vb=!0;var E=a.viewportBounds.copy(),ee=a.Aa,ne=a.ya,ae=a.zoomPoint.x,ue=a.zoomPoint.y,ge=a.contentAlignment;isNaN(ae)&&(ge.$c()?ge.Hf(is)?ae=0:ge.Hf(fo)&&(ae=ee-1):ae=ge.sb()?ge.x*(ee-1):ee/2),isNaN(ue)&&(ge.$c()?ge.Hf(Pa)?ue=0:ge.Hf(os)&&(ue=ne-1):ue=ge.sb()?ge.y*(ne-1):ne/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),ee=lt.allocAt(a.pa.x+ae/y-ae/x,a.pa.y+ue/y-ue/x),a.position=ee,lt.free(ee),a.Ca=x,Jl(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),al(a,!1),b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Yt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Ji&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),Yl(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=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(ee){ee.isAvoiding&&ee.actualBounds.Yc(y)&&ee.bb()})}};function Yl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=mn.alloc(),E=1,ee=1,ne=x.O.s,ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue],ye=Math.abs(ge.interval);2>ye||(m0(ge.figure)?ee=ee*ye/Gt.vx(ee,ye):E=E*ye/Gt.vx(E,ye))}if(ne=x.gridCellSize,b.h(ee*ne.width,E*ne.height),y!==void 0)E=y.width,ee=y.height,a=y.x,ne=y.y;else{if(y=$t.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){$t.free(y);return}E=y.width,ee=y.height,a=y.x,ne=y.y,$t.free(y)}x.width=E+2*b.width,x.height=ee+2*b.height,y=lt.alloc(),Gt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),mn.free(b),x.part.location=y,lt.free(y)}}Yt.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(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Yt.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))},Yt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Sr||jt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Sr||jt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Yt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},qe=Yt.prototype,qe.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},qe.Jz=function(a){a=new an().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 Sr||jt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},qe.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,ee=lt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=ee.h(x.x,E.y):y==="left"?this.position=ee.h(E.x,x.y):y==="down"?this.position=ee.h(x.x,E.bottom-x.height):y==="right"&&(this.position=ee.h(E.right-x.width,x.y)),lt.free(ee);return}jt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=ee.h(x.x,x.y-E):y==="down"?this.position=ee.h(x.x,x.y+E):y==="left"?this.position=ee.h(x.x-E,x.y):y==="right"?this.position=ee.h(x.x+E,x.y):jt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),lt.free(ee)},qe.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)},qe.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},qe.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)},qe.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,ee=b+a.height,ne=y.m11,ae=y.m12,ue=y.m21,ge=y.m22,ye=y.dx,Le=y.dy,ze=x*ne+b*ue+ye;y=x*ae+b*ge+Le;var We=E*ne+b*ue+ye;return a=E*ae+b*ge+Le,b=x*ne+ee*ue+ye,x=x*ae+ee*ge+Le,ne=E*ne+ee*ue+ye,E=E*ae+ee*ge+Le,ee=Math.min(ze,We),ze=Math.max(ze,We),We=Math.min(y,a),y=Math.max(y,a),ee=Math.min(ee,b),ze=Math.max(ze,b),We=Math.min(We,x),y=Math.max(y,x),ee=Math.min(ee,ne),ze=Math.max(ze,ne),We=Math.min(We,E),y=Math.max(y,E),new $t(ee,We,ze-ee,y-We)},qe.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),Kn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Mp(a){return a=xd.get(a),a!==null?new a:new ji}Yt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ue){return ue.diagram=E}),a.mouseMoveTools.each(function(ue){return ue.diagram=E}),a.mouseUpTools.each(function(ue){return ue.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),xa(this));var ee=this.animationManager;b==="RolledBackTransaction"&&ee.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||od(ee),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(em(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var ae=this;Jt(function(){ae.currentTool.standardMouseOver(),ae.Rt=!1},10)}}}finally{this.aa=!0}}}};function _c(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)qh(a,y[b])}function qh(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof an&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Np(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var ee=0;ee<E.length;ee++)if(E[ee]===y){E.splice(ee,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof an&&x.Bg.remove(a),Od(b));break}}}}}Yt.prototype.Wd=function(){this.partManager.Wd()},Yt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Yt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Yt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Yt.prototype.Vb=function(a){return this.partManager.Vb(a)},Yt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},qe=Yt.prototype,qe.Lc=function(a){return this.partManager.Lc(a)},qe.ii=function(a){return this.partManager.ii(a)},qe.Kc=function(a){return this.partManager.Kc(a)},qe.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:br(Lr(y)))},qe.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:br(Lr(y)))};function Jl(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 Ap(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),al(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}qe.Va=function(){if(this.Zi){var a=$t.alloc();Ap(this,this.computeBounds(a)),$t.free(a)}},qe.rz=function(){for(var a=new an,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},qe.qz=function(){return this.ai.iterator},qe.Uz=function(a){xa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Ks(this))};function gd(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function jp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,ee=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!ee.defaultAnimation.isAnimating&&!ee.zb&&(y||hu(ee,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Op(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),xa(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||od(ee),a.aa=x}}}function Op(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Op(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),Ef(a,y),E.isValidLayout=!0):a.xh=!0)}}qe.yz=function(){for(var a=new rn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function n0(a){function y(E){var ee=E.toLowerCase(),ne=new rn;x.add(E,ne),x.add(ee,ne),b.add(E,E),b.add(ee,E)}var x=new tn,b=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=b}function nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function md(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;jt("Unknown DiagramEvent name: "+y)}qe.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},qe.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},qe.R=function(a,y,x){var b=md(this,a),E=new au;if(E.diagram=this,a=nm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function vd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}qe.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Yt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=rm(a,x)),x===null){y=$t.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var ee=a.nodes;ee.next();){var ne=ee.value,ae=ne.layer;ae!==null&&ae.visible&&!ae.isTemporary&&Sd(a,ne,b,y)}$t.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=$t.alloc(),ee=x.memberParts;ee.next();)ne=ee.value,ne instanceof Un&&Sd(a,ne,b,y);$t.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Sd(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,ee=y.y;if(_d(a,E,ee))for(x=(ee-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((ee+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(ee=a.ac[E],ee.fill)ee.fill(kh,x,y+1);else for(var ne=x;ne<=y;ne++)ee[ne]=kh}else if(y instanceof Ir)for(y=y.memberParts;y.next();)E=y.value,E instanceof Un&&Sd(a,E,x,b)}}function gh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Yt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=Jt(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=$t.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),$t.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Yt.prototype.ug=function(){this.vk!==-1&&(vn.clearTimeout(this.vk),this.vk=-1)},Yt.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 b=this.viewportBounds,E=this.scale;b=$t.allocAt(0,0,b.width*E,b.height*E);var ee=lt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,ee.x-=ne,a.x<b.x+x.left/2&&(ee.x-=ne),a.x<b.x+x.left/4&&(ee.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,ee.x+=ne,a.x>b.x+b.width-x.right/2&&(ee.x+=ne),a.x>b.x+b.width-x.right/4&&(ee.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y-=ne,a.y<b.y+x.top/2&&(ee.y-=ne),a.y<b.y+x.top/4&&(ee.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,ee.y+=ne,a.y>b.y+b.height-x.bottom/2&&(ee.y+=ne),a.y>b.y+b.height-x.bottom/4&&(ee.y+=4*ne)),ee.Xa(zn)||(y=new lt(y.x+ee.x/E,y.y+ee.y/E)),$t.free(b),lt.free(ee),y},qe=Yt.prototype,qe.Cs=function(){return null},qe.av=function(){return null},qe.bs=function(a,y){this.pj.add(a,y)},qe.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Ir&&(y.$p=null)})};function kf(a,y,x){function b(){var ye=+new Date;for(ee=!0,ne.reset();ne.next();)if(!ne.value[0].al){ee=!1;break}ee||ye-ge>ue?y(x,E,ae):vn.requestAnimationFrame(b)}for(var E=x.callback,ee=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){ee=!1;break}if(typeof E!="function"||ee)return y(x,E,a);var ae=a,ue=x.callbackTimeout||300,ge=+new Date;return vn.requestAnimationFrame(function(){b()}),null}qe.Wz=function(a){return vo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},qe.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},qe.Xz=function(a,y,x){var b=im(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Uc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Uc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&jt('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:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&jt("properties argument must be an Object.");var E=y.size||null,ee=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(ee="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new mn(1/0,1/0):new mn(2e3,2e3));var ae=y.position||null,ue=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Le=y.omitTemporary;Le===void 0&&(Le=!0);var ze=y.document||document,We=y.elementFinished||null,Je=y.showTemporary;Je===void 0&&(Je=!Le),y=y.showGrid,y===void 0&&(y=Je),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new Ur(ge):ge instanceof Ur||jt("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Le=new ll(null,ze,void 0,!0);var it=Le.context;if(!(E||ee||ue||ae))return Le.width=a.Aa+Math.ceil(ge.left+ge.right),Le.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=We,cd(a,b.context,ge,new mn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,ge,new mn(Le.width,Le.height),a.Ca,a.pa,ue,ye,Je,y),a.Xm=!0,Le.context);var Tt=a.Pp,Pt=a.documentBounds.copy();if(Pt.Fv(a.yb),Je)for(var Nt=a.Wa.s,At=Nt.length,Bt=0;Bt<At;Bt++){var Rt=Nt[Bt];if(Rt.visible&&Rt.isTemporary){Rt=Rt.Pa.s;for(var Zt=Rt.length,Fn=0;Fn<Zt;Fn++){var or=Rt[Fn];or.isInDocumentBounds&&or.isVisible()&&(or=or.actualBounds,or.w()&&Pt.ed(or))}}}if(Nt=new lt(Pt.x,Pt.y),ue!==null){for(At=new $t(0,0,0,0),Bt=!0,Rt=ue.iterator,Rt.reset();Rt.next();)Zt=Rt.value,Zt instanceof Sr&&(Fn=Zt.layer,Fn!==null&&!Fn.visible||Fn!==null&&!Je&&Fn.isTemporary||!Zt.isVisible()||(Zt=Zt.actualBounds,Zt.w()&&(Bt?(Bt=!1,At.assign(Zt)):At.ed(Zt))));Pt.width=At.width,Pt.height=At.height,Nt.x=At.x,Nt.y=At.y}return ae!==null&&ae.w()&&(Nt=ae,ee||(ee=Tt)),At=ae=0,ge!==null&&(ae=ge.left+ge.right,At=ge.top+ge.bottom),Bt=Rt=0,E!==null&&(Rt=E.width,Bt=E.height,isFinite(Rt)&&(Rt=Math.max(0,Rt-ae)),isFinite(Bt)&&(Bt=Math.max(0,Bt-At))),E!==null&&ee!==null?(ee==="NaN"&&(ee=Tt),E.w()?(E=Rt,Pt=Bt):isNaN(Bt)?(E=Rt,Pt=Pt.height*ee):(E=Pt.width*ee,Pt=Bt)):E!==null?E.w()?(ee=Math.min(Rt/Pt.width,Bt/Pt.height),E=Rt,Pt=Bt):isNaN(Bt)?(ee=Rt/Pt.width,E=Rt,Pt=Pt.height*ee):(ee=Bt/Pt.height,E=Pt.width*ee,Pt=Bt):ee!==null?ee==="NaN"&&ne.w()?(ee=Math.min((ne.width-ae)/Pt.width,(ne.height-At)/Pt.height),ee>Tt?(ee=Tt,E=Pt.width,Pt=Pt.height):(E=ne.width,Pt=ne.height)):(E=Pt.width*ee,Pt=Pt.height*ee):(ee=Tt,E=Pt.width,Pt=Pt.height),ge!==null?(E+=ae,Pt+=At):ge=new Ur(0),ne!==null&&(Tt=ne.width,ne=ne.height,isNaN(Tt)&&(Tt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Tt)&&(E=Math.min(E,Tt)),isFinite(ne)&&(Pt=Math.min(Pt,ne))),Le.width=Math.ceil(E),Le.height=Math.ceil(Pt),x==="SVG"?b===null?null:(b.resize(Le.width,Le.height,Le.width,Le.height),b.ownerDocument=ze,b.hs=We,cd(a,b.context,ge,new mn(Math.ceil(E),Math.ceil(Pt)),ee,Nt,ue,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,ge,new mn(Math.ceil(E),Math.ceil(Pt)),ee,Nt,ue,ye,Je,y),a.Xm=!0,Le.context)}zt.Object.defineProperties(Yt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(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 Ql(this,vn.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 Ql(this,vn.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(vn,"resize",this.Ov,!1),this.removeEventListener(vn,"wheel",this.$j,!0),cu===this&&(cu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),mp(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)&&Nn(a,"0 <= value <= 1",Yt,"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),al(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),al(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),al(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),al(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Nn(a,">= 0",Yt,"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&&Nn(a,">= 0",Yt,"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 b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(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 Nn(a,">= 0",Yt,"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||em(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&&jt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,hu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(ee){return y.ik(ee)}),y.ik(this.Oc)),this.cc=a,this.partManager=Mp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(ee){return a.Pe(ee)}),this.vb=b,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(vn,"pointermove",this.dk,!0),this.addEventListener(vn,"pointerdown",this.ui,!0),this.addEventListener(vn,"pointerup",this.fk,!0),this.addEventListener(vn,"pointerout",this.ek,!0),this.addEventListener(vn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(vn,"wheel",this.$j,!0),this.addEventListener(vn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(vn,"pointermove",this.dk,!0),this.removeEventListener(vn,"pointerdown",this.ui,!0),this.removeEventListener(vn,"pointerup",this.fk,!0),this.removeEventListener(vn,"pointerout",this.ek,!0),this.removeEventListener(vn,"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(vn,"wheel",this.$j,!0),this.removeEventListener(vn,"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=lt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Jl(this):(this.vb=!0,a=this.scale,Sp(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)}lt.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=Jg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Jg(this)),a.type!==wn.Grid&&jt("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),Yl(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),Jl(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||jt("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 Ur(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===mh&&al(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,al(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,Lp(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&&Lp(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!==Ba&&al(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()||jt("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()||jt("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)):Nn(a,"> 0",Yt,"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)):Nn(a,"> 0",Yt,"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),al(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 Ur(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&&jt("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();)$p(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==vh&&a!==Do&&a!==wd&&jt("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 mn(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 Ur(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),zt.Object.defineProperties(Yt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Yt.prototype.makeImageData=Yt.prototype.Jx,Yt.prototype.makeImage=Yt.prototype.Wz,Yt.prototype.cacheGroupExternalLinks=Yt.prototype.Fu,Yt.prototype.addRenderer=Yt.prototype.bs,Yt.prototype.makeSVG=Yt.prototype.av,Yt.prototype.makeSvg=Yt.prototype.Cs,Yt.prototype.stopAutoScroll=Yt.prototype.ug,Yt.prototype.doAutoScroll=Yt.prototype.gs,Yt.prototype.isUnoccupied=Yt.prototype.Yj,Yt.prototype.raiseDiagramEvent=Yt.prototype.R,Yt.prototype.removeDiagramListener=Yt.prototype.am,Yt.prototype.addDiagramListener=Yt.prototype.Bj,Yt.prototype.findTreeRoots=Yt.prototype.yz,Yt.prototype.layoutDiagram=Yt.prototype.Uz,Yt.prototype.findTopLevelGroups=Yt.prototype.qz,Yt.prototype.findTopLevelNodesAndLinks=Yt.prototype.rz,Yt.prototype.ensureBounds=Yt.prototype.Va,Yt.prototype.findLinksByExample=Yt.prototype.ls,Yt.prototype.findNodesByExample=Yt.prototype.ms,Yt.prototype.findLinkForData=Yt.prototype.Kc,Yt.prototype.findNodeForData=Yt.prototype.ii,Yt.prototype.findPartForData=Yt.prototype.Lc,Yt.prototype.findLinkForKey=Yt.prototype.findLinkForKey,Yt.prototype.findNodeForKey=Yt.prototype.Vb,Yt.prototype.findPartForKey=Yt.prototype.findPartForKey,Yt.prototype.rebuildParts=Yt.prototype.Wd,Yt.prototype.transformViewToDoc=Yt.prototype.Ps,Yt.prototype.transformRectDocToView=Yt.prototype.zA,Yt.prototype.transformDocToView=Yt.prototype.op,Yt.prototype.centerRect=Yt.prototype.es,Yt.prototype.scrollToRect=Yt.prototype.tv,Yt.prototype.scroll=Yt.prototype.scroll,Yt.prototype.highlightCollection=Yt.prototype.Jz,Yt.prototype.highlight=Yt.prototype.Iz,Yt.prototype.selectCollection=Yt.prototype.rA,Yt.prototype.select=Yt.prototype.select,Yt.prototype.updateAllRelationshipsFromData=Yt.prototype.rp,Yt.prototype.updateAllTargetBindings=Yt.prototype.updateAllTargetBindings,Yt.prototype.commit=Yt.prototype.commit,Yt.prototype.rollbackTransaction=Yt.prototype.Kf,Yt.prototype.commitTransaction=Yt.prototype.eb,Yt.prototype.startTransaction=Yt.prototype.Ea,Yt.prototype.raiseChanged=Yt.prototype.g,Yt.prototype.raiseChangedEvent=Yt.prototype.cb,Yt.prototype.removeChangedListener=Yt.prototype.ik,Yt.prototype.addChangedListener=Yt.prototype.Pe,Yt.prototype.removeModelChangedListener=Yt.prototype.mA,Yt.prototype.addModelChangedListener=Yt.prototype.Yw,Yt.prototype.findLayer=Yt.prototype.Qj,Yt.prototype.removeLayer=Yt.prototype.kA,Yt.prototype.addLayerAfter=Yt.prototype.Cy,Yt.prototype.addLayerBefore=Yt.prototype.Ww,Yt.prototype.addLayer=Yt.prototype.Al,Yt.prototype.moveParts=Yt.prototype.moveParts,Yt.prototype.copyParts=Yt.prototype.Kj,Yt.prototype.removeParts=Yt.prototype.Is,Yt.prototype.remove=Yt.prototype.remove,Yt.prototype.add=Yt.prototype.add,Yt.prototype.clearDelayedGeometries=Yt.prototype.bx,Yt.prototype.setProperties=Yt.prototype.nm,Yt.prototype.attach=Yt.prototype.Du,Yt.prototype.set=Yt.prototype.set,Yt.prototype.resetInputOptions=Yt.prototype.Sx,Yt.prototype.setInputOption=Yt.prototype.sA,Yt.prototype.getInputOption=Yt.prototype.Ql,Yt.prototype.resetRenderingHints=Yt.prototype.Tx,Yt.prototype.setRenderingHint=Yt.prototype.Xx,Yt.prototype.getRenderingHint=Yt.prototype.Gf,Yt.prototype.maybeUpdate=Yt.prototype.bd,Yt.prototype.requestUpdate=Yt.prototype.$b,Yt.prototype.delayInitialization=Yt.prototype.Xy,Yt.prototype.isUpdateRequested=Yt.prototype.Pz,Yt.prototype.invalidateDocumentBounds=Yt.prototype.Ya,Yt.prototype.findObjectsNear=Yt.prototype.og,Yt.prototype.findPartsNear=Yt.prototype.mz,Yt.prototype.findObjectsIn=Yt.prototype.Cf,Yt.prototype.findPartsIn=Yt.prototype.ux,Yt.prototype.findObjectsAt=Yt.prototype.ji,Yt.prototype.findPartsAt=Yt.prototype.lz,Yt.prototype.findObjectAt=Yt.prototype.ic,Yt.prototype.findPartAt=Yt.prototype.Ol,Yt.prototype.focusObject=Yt.prototype.zz,Yt.prototype.alignDocument=Yt.prototype.Jy,Yt.prototype.zoomToRect=Yt.prototype.BA,Yt.prototype.zoomToFit=Yt.prototype.zoomToFit,Yt.prototype.diagramScroll=Yt.prototype.kx,Yt.prototype.focus=Yt.prototype.focus;var xd=new tn,om=null,vo=vn.document!==void 0,zc=null,ec="",Ba=new hn(Yt,"None",0),Fs=new hn(Yt,"Uniform",1),tc=new hn(Yt,"UniformToFill",2),Tf=new hn(Yt,"CycleAll",10),Dp=new hn(Yt,"CycleNotDirected",11),Bp=new hn(Yt,"CycleNotDirectedFast",12),Ip=new hn(Yt,"CycleNotUndirected",13),Rp=new hn(Yt,"CycleDestinationTree",14),_p=new hn(Yt,"CycleSourceTree",15),mh=new hn(Yt,"DocumentScroll",1),Lf=new hn(Yt,"InfiniteScroll",2),vh=new hn(Yt,"TreeParentCollapsed",21),Do=new hn(Yt,"AllParentsCollapsed",22),wd=new hn(Yt,"AnyParentsCollapsed",23),zp=new rn,Gc="2.3.10",Uc="image",Mf=null,am=!1;function Ta(){if(vo){var a=vn.document.createElement("canvas"),y=a.getContext("2d"),x=pn("7ca11abfd022028846");y[x]=pn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Wn.Dx+"4ae6247590da4bb21c324ba3a84e385776",jr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[pn("7ca11abfd7330390")](pn(b[E-1]),10,15*E);for(y[x]=pn("39f046ebb36e4b"),x=1;5>x;x++)y[pn("7ca11abfd7330390")](pn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(jr.prototype.Cd=jr.prototype.Eu),Mf=a}}Yt.className="Diagram",Yt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=vn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Yt?y.H:null},Yt.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},Yt.useDOM=function(a){vo=a?vn.document!==void 0:!1},Yt.isUsingDOM=function(){return vo},Yt.None=Ba,Yt.Uniform=Fs,Yt.UniformToFill=tc,Yt.CycleAll=Tf,Yt.CycleNotDirected=Dp,Yt.CycleNotDirectedFast=Bp,Yt.CycleNotUndirected=Ip,Yt.CycleDestinationTree=Rp,Yt.CycleSourceTree=_p,Yt.DocumentScroll=mh,Yt.InfiniteScroll=Lf,Yt.TreeParentCollapsed=vh,Yt.AllParentsCollapsed=Do,Yt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Hc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=vn[pn("76a715b2f73f148a")][pn("72ba13b5")]||"";if(a.Rc=!0,vo){var b=Yt[pn("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=pn(b).split(pn("39e9")),!(6>b.length));){var ee=pn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=pn(Wn[pn("6cae19")]).split(".");if(ee[0]>ne[0]||ee[0]===ne[0]&&ee[1]>=ne[1]){var ae=vn[pn("74a900bae4370f8b51")][pn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[pn("73a612b6fb191d")](pn("3aad1ab6e022098b4dc4")),ee=pn(b[2]),-1<ne&&(ae=ae[pn("73a612b6fb191d")](ee.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[pn("76ad18b4f73e")],ae=x[pn("73a612b6fb191d")](pn("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[pn("73a612b6fb191d")](ee),0>ne&&ee!==pn("7da71ca0ad381e90")&&(ne=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>ne&&(ne=y[pn("73a612b6fb191d")](pn("76a715b2ef3e149757"))),0>ne&&(ne=y[pn("73a612b6fb191d")](pn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[pn("73a612b6fb191d")](pn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[pn("73a612b6fb191d")](pn("35"))||y[pn("73a612b6fb191d")](pn("35"))===-1),!a.Rc||x[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[pn("73a612b6fb191d")](ee)),!a.Rc)||(ne=vn[pn("76a715b2f73f148a")][pn("69ad17a1e03e")],ae=ne[pn("73a612b6fb191d")](pn("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[pn("73a612b6fb191d")](ee)>ae),!a.Rc)))break;if(ee[0]==="#"){ne=vn.document.createElement("div");for(var ue=b[0].replace(/[A-Za-z]/g,"");4>ue.length;)ue+="9";if(ae=ue,ue=ue.substr(ue.length-4),b="",b+=["gsh","gsf"][parseInt(ue.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(ue.substr(0,1),10)%4],ne[pn("79a417a0f0181a8946")]=b,vn.document[pn("78a712aa")]){vn.document[pn("78a712aa")][pn("7bb806b6ed32388c4a875b")](ne),ue=vn.getComputedStyle(ne).getPropertyValue(pn("78a704b7e62456904c9b12701b6532a8"));var ge=vn.getComputedStyle(ne).getPropertyValue(pn("75b817b0ea2202"));if(vn.document[pn("78a712aa")][pn("68ad1bbcf533388c4a875b")](ne),ue){if(ne=vn[pn("77a902b0eb1b1e804a8a")],ge==="0."+parseInt(ae,10)%100||ue.indexOf(parseInt(ee[1]+ee[2],16))!==-1&&ue.indexOf(parseInt(ee[3]+ee[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(pn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,ee=0;ee<document.styleSheets.length;ee++){ne=document.styleSheets[ee].rules||document.styleSheets[ee].cssRules;for(var ye in ne)if(b===ne[ye].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ye=x[pn("76ad18b4f73e")],E=x[pn("73a612b6fb191d")](pn("35e7"))+2;E<ye;E++)y+=x[E];x=y[pn("73a612b6fb191d")](pn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[pn("73a612b6fb191d")](pn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Uu(a){this.j=a===void 0?new lt:a,this.o=new lt}zt.Object.defineProperties(Uu.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Nf="DraggingInfo";Uu.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function he(){this.reset()}he.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new mn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ei,this.gridSnapOrigin=new lt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},he.className="DraggingOptions";function Ce(a,y){if(typeof a=="string"||vn.Element&&a instanceof Element)var x=Yt.call(this,a)||this;else x=Yt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}Kt(Ce,Yt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=co,a.layout=new fa}Ce.prototype.reset=function(){Yt.prototype.reset.call(this),be(this)},Ce.className="Palette";function Oe(a,y){if(typeof a=="string"||vn.Element&&a instanceof Element)var x=Yt.call(this,a)||this;else x=Yt.call(this)||this,y=a;var b=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 Sr;var E=new Hr;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Ur(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var ee=b.observed;if(ee!==null){var ne=ee.viewportBounds,ae=b.lastInput.documentPoint;ee.position=new lt(ae.x-ne.width/2,ae.y-ne.height/2)}},x.Pf=function(){b.Ya(),gt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&>(b)},x.autoScale=Fs,x.vb=!1,y&&Object.assign(x,y),x}Kt(Oe,Yt),Oe.prototype.computePixelRatio=function(){return 1},Oe.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(Ic(this),this.ql===null){var x=new ll(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),$e(this)}finally{this.ta=a,this.ib=y}}}Yt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&jt("No div specified"),this.ta===null&&jt("No canvas specified"),!(this.ta instanceof Ql)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ic(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?$e(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,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function $e(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=$t.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Yl(y,E),$t.free(E),xa(y));var ee=a.Ab;ee.reset(),a.scale!==1&&ee.scale(a.scale),a.position.x===0&&a.position.y===0||ee.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),E.yc(),y=y.Wa.s,ee=y.length;for(var ne=0;ne<ee;ne++){var ae=y[ne],ue=a;if(ae.visible&&ae.opacity!==0){var ge=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&ge.layer===ae&&(ae=Gu(ae,E),ge.gc(E,ue),E.globalAlpha=ae);else{for(var ye=Gu(ae,E),Le=ue.scale,ze=$t.alloc(),We=ae.Pa.s,Je=We.length,it=0;it<Je;it++){var Tt=We[it];(b||Tt!==ge)&&ae.Oj(E,Tt,ue,null,Le,ze,!1)}$t.free(ze),E.globalAlpha=ye}}}}}function gt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=mn.alloc();E.h(x.width,x.height),b.desiredSize=E,mn.free(E),a=2/a.scale,b instanceof Hr&&(b.strokeWidth=a),y.location=new lt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ao;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),gt(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=b,this.R("ViewportBoundsChanged",this.fc,a))},zt.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&jt("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,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),gt(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),gt(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)}}}),Oe.className="Overview";function Lt(){lo.call(this),this.j=null}Kt(Lt,lo),Lt.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 lt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)),!0)},Lt.prototype.doActivate=function(){this.j=null,lo.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.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 b=a.firstInput.documentPoint;x=x.location,this.j=new lt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)}}},Lt.className="OverviewDraggingTool";function kt(){cr(this),this.H=cu,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=Ao,this.hb=!0,this.cg=null,this.ob=200}kt.prototype.toString=function(){return"CommandHandler"},kt.prototype.Xe=function(a){this.H=a},kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ni?y.meta:y.control,b=y.shift,E=y.alt,ee=y.key;!x||ee!=="C"&&ee!=="Insert"?x&&ee==="X"||b&&ee==="Del"?this.canCutSelection()&&this.cutSelection():x&&ee==="V"||b&&ee==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&ee==="Y"||E&&b&&ee==="Backspace"?this.canRedo()&&this.redo():x&&ee==="Z"||E&&ee==="Backspace"?this.canUndo()&&this.undo():ee==="Del"||ee==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&ee==="A"?this.canSelectAll()&&this.selectAll():ee==="Esc"?this.canStopCommand()&&this.stopCommand():ee==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):ee==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):ee==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):ee==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):ee==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):ee==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):ee==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):ee==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):ee===" "?this.canScrollToPart()&&this.scrollToPart():ee==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():ee==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&ee==="0"?this.canResetZoom()&&this.resetZoom():b&&ee==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&ee==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&ee==="G"?this.canUngroupSelection()&&this.ungroupSelection():ee==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():ee==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},kt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},kt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ji&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},kt.prototype.canStopCommand=function(){return!0},kt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canSelectAll=function(){return this.diagram.allowSelect},kt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new an,x=a.selection.iterator;x.next();)oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},kt.prototype.copySelection=function(){var a=this.diagram,y=new an;for(a=a.selection.iterator;a.next();)oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},kt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},kt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)zc=null,ec="";else{x=y.model;var b=!1,E=!1,ee=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),ee=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new rn,x.addAll(ee),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new an,y=zc;if(y===null)return a;var x=this.diagram;if(ec!==x.model.dataFormat)return a;var b=x.model,E=!1,ee=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(ee=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=ee),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},kt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var ee=this.computeEffectiveCollection(y.selection,y.Wm);Qh(y,ee,new lt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||zc===null||zc.count===0||ec!==a.model.dataFormat)},kt.prototype.undo=function(){this.diagram.undoManager.undo()},kt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},kt.prototype.redo=function(){this.diagram.undoManager.redo()},kt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},kt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},kt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},kt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;hu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Ao):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},kt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ue){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;hu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=It(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var ee=function(){y.Ea();for(var ue=E.pop();0<E.length&&ue instanceof Un&&ue.isTreeExpanded&&(!(ue instanceof Ir)||ue.isSubGraphExpanded);)ue=E.pop();0<E.length?(ue instanceof Sr&&y.tv(ue.actualBounds),ue instanceof Un&&!ue.isTreeExpanded&&(ue.isTreeExpanded=!0),ue instanceof Ir&&!ue.isSubGraphExpanded&&(ue.isSubGraphExpanded=!0)):(ue instanceof Sr&&y.es(ue.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Jt(ee,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),ee()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function It(a,y,x){if(y.isVisible())return x;if(y instanceof mi)It(a,y.adornedPart,x);else if(y instanceof En){var b=y.fromNode;b!==null&&It(a,b,x),y=y.toNode,y!==null&&It(a,y,x)}else y instanceof Un&&(b=y.labeledLink,b!==null&&It(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),It(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),It(a,y,x));return x}kt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Sr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},kt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),hu(y.animationManager,"Collapse Tree");var x=new rn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Un&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},kt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Un&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Un&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),hu(y.animationManager,"Expand Tree");var x=new rn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Un&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},kt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Un)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Un&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new rn,ee=a.selection.iterator;ee.next();){var ne=ee.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new rn,ue=E.iterator;ue.next();){var ge=ue.value;ee=!1;for(var ye=E.iterator;ye.next();)if(ge.Td(ye.value)){ee=!0;break}ee||ae.add(ge)}if(0<ae.count){var Le=ae.first().containingGroup;if(Le!==null)for(;Le!==null;){E=!1;for(var ze=ae.iterator;ze.next();)if(!ze.value.Td(Le)){E=!0;break}if(E)Le=Le.containingGroup;else break}if(x instanceof Ir)ul(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var We=y.copyNodeData(x);sn(We)&&(y.xf(We),b=a.ii(We))}if(b!==null){Le!==null&&this.isValidMember(Le,b)&&(b.containingGroup=Le);for(var Je=ae.iterator;Je.next();){var it=Je.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},kt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function nn(a){var y=er();for(a=a.iterator;a.next();){var x=a.value;x instanceof En||y.push(x)}a=new an,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],ee=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){ee=!1;break}ee&&a.add(E)}return _n(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof En)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},kt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new rn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var ee=E.value;ee instanceof Ir&&ee.canUngroup()&&b.add(ee)}var ne=new rn;if(0<b.count){y.clearSelection(!0);for(var ae=b.iterator;ae.next();){var ue=ae.value;ue.expandSubGraph();var ge=ue.containingGroup,ye=ge!==null&&ge.data!==null?x.wa(ge.data):void 0;ne.addAll(ue.memberParts);for(var Le=ne.iterator;Le.next();){var ze=Le.value;if(ze.isSelected=!0,!(ze instanceof En)){var We=ze.data;We!==null?x.mp(We,ye):ze.containingGroup=ge}}y.remove(ue)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof Ir))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ir&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=nn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),hu(y.animationManager,"Collapse SubGraph");var x=new rn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ir&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},kt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ir&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ir&&y.isSubGraphExpanded)return!0;return!1},kt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),hu(y.animationManager,"Expand SubGraph");var x=new rn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ir&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},kt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ir&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ir&&!y.isSubGraphExpanded)return!0;return!1},kt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(ee){return ee instanceof Zi&&ee.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},kt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Zi))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 Zi&&x.editable}),a!==null))return!0;return!1},kt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof _t?E=a.ga(ai):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new lt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Ru(x,!1,a)}},kt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},kt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new tn,a===null)return b;for(var ee=a.iterator;ee.next();)du(x,b,ee.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(ee=a.iterator;ee.next();)a=ee.value,a instanceof En&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},zt.Object.defineProperties(kt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||jt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),kt.className="CommandHandler",Xg=function(){return new kt};function _t(){cr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new lt(NaN,NaN).freeze(),this.jd=hi,this.Ab=new jr,this.wh=new jr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Qo,this.uc=new $t(NaN,NaN,NaN,NaN).freeze(),this.Ib=new $t(NaN,NaN,NaN,NaN).freeze(),this.dc=new $t(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Vo,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 yn,gn,hr,mr,Er,Rr,ri,Yr,ci,Ii;_t.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=Jn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},_t.prototype.Vw=function(a){var y=this.Dh;if(Dn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},_t.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},_t.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},_t.prototype.copy=function(){return this.clone()},qe=_t.prototype,qe.qb=function(a){a.classType===En?a.name.indexOf("Orient")===0?this.segmentOrientation=a:jt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===_t&&(this.stretch=a)},qe.toString=function(){return sr(this.constructor)+"#"+Gr(this)},qe.th=function(){this.A!==null&&(this.A.nc=!0)};function Zr(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}qe.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=Vr,a.yj=Vr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},qe.cb=function(a,y,x,b,E,ee,ne){var ae=this.part;if(ae!==null&&(ae.gk(a,y,x,b,E,ee,ne),x===this&&a===no&&pa(this)&&$i(this,ae,y),ee=this.diagram,this.animationTriggers===null||ee===null||!ee.pi||ee.undoManager.isUndoingRedoing||ee.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&ee.animationManager.isEnabled&&!ee.animationManager.isTicking&&(this.jo===null&&(this.jo=new tn),ne=ee.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(ee=new Sa,Wg(a,ee),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,ee),ee.vu=this,ee.Nw=a,ee.add(this,y,b,E),ee.start()):(hu(ee.animationManager,"Trigger"),ee.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof wn&&x===ae&&(ae.l&16777216)!==0&&ae.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ae=x[E],ae instanceof wn&&Zc(ae,function(ue){ue.data!==null&&ue.l&16777216&&ue.La(y)})};function $i(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var ee=E.value,ne=null;if(ee.sourceName!==null){if(ne=TS(ee,b,a),ne===null)continue;ee.sp(a,ne,x,null)}else if(ee.isToModel){var ae=y.diagram;ae===null||ae.skipsModelSourceBindings||ee.sp(a,ae.model.modelData,x,b)}else{if(ae=b.data,ae===null)continue;var ue=y.diagram;ue===null||ue.skipsModelSourceBindings||ee.sp(a,ae,x,b)}ne===a&&(ae=b.ks(ee.Ai),ae!==null&&ee.Mv(ae,ne,x))}}qe.ks=function(a){return this.bindingId===a?this:null},qe.g=function(a,y,x){this.cb(no,a,this,y,x)},qe.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new jr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),ee.pp(E)}};function Xo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}qe.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Zn(a.x,a.y,0,0,0,b.height)<=y||Zn(a.x,a.y,0,b.height,b.width,b.height)<=y||Zn(a.x,a.y,b.width,b.height,b.width,0)<=y||Zn(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},qe.se=function(){return!0},qe.ca=function(a){var y=lt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return lt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),ee=b.Ql("extraTouchArea"),ne=ee/2,ae=this.naturalBounds;b=this.Df()*b.scale;var ue=1/b;if(ae.width*b<E&&ae.height*b<E)return a=qi(x.x-ne*ue,x.y-ne*ue,x.width+ee*ue,x.height+ee*ue,y.x,y.y),lt.free(y),a}return E=!1,(this instanceof mi||this instanceof Hr?qi(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)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),lt.free(y),E},qe.gh=function(a){var y=this.naturalBounds;return qi(0,0,y.width,y.height,a.x,a.y)},qe.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=$t.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=lt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),lt.free(E),$t.free(y),b},qe.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=lt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),lt.free(E),b},qe.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=lt.allocAt(0,0),E=lt.allocAt(0,x.height),ee=lt.allocAt(x.width,x.height),ne=lt.allocAt(x.width,0),ae=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(ee))||a.ca(y.Ga(ne)))ae=!0;else{x=$t.allocAt(0,0,x.width,x.height);var ue=lt.allocAt(a.x,a.y);x.ca(y.Cd(ue))?ae=!0:(ue.h(a.x,a.bottom),x.ca(y.Cd(ue))?ae=!0:(ue.h(a.right,a.bottom),x.ca(y.Cd(ue))?ae=!0:(ue.h(a.right,a.y),x.ca(y.Cd(ue))&&(ae=!0)))),lt.free(ue),$t.free(x),!ae&&(Gt.us(a,b,E)||Gt.us(a,E,ee)||Gt.us(a,ee,ne)||Gt.us(a,ne,b))&&(ae=!0)}return lt.free(b),lt.free(E),lt.free(ee),lt.free(ne),ae},qe.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof Ln){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},qe.mi=function(a){a===void 0&&(a=new $t);var y=this.naturalBounds,x=this.oe,b=lt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),xi(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),xi(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),xi(a,b.x,b.y,0,0),lt.free(b),a},qe.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},qe.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},qe.qs=function(a,y){return y===void 0&&(y=new lt),y.assign(a),this.oe.Cd(y),y},qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qe.Sj=function(a,y,x,b,E){var ee=this.transform,ne=1/(ee.m11*ee.m22-ee.m12*ee.m21),ae=ee.m22*ne,ue=-ee.m12*ne,ge=-ee.m21*ne,ye=ee.m11*ne,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);return this.areaBackground!==null?(ee=this.actualBounds,Gt.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,b,E)):(ne=a*ae+y*ge+Le,a=a*ue+y*ye+ze,y=x*ae+b*ge+Le,x=x*ue+b*ye+ze,E.h(0,0),b=this.naturalBounds,x=Gt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(ee),x)},_t.prototype.measure=function(a,y,x,b){if(Bs(this)!==!1){var E=this.Kg,ee=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-ee,0),y=Math.max(y-E,0),x=Math.max((x||0)-ee,0),b=Math.max((b||0)-E,0),ee=this.angle,E=this.desiredSize;var ne=this.kq();ee===90||ee===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var ae=this instanceof wn;switch(ls(this,!0)){case gn:ne=E=0,ae&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case mr:isFinite(a)&&a>x&&(E=a),ne=0,ae&&(y=1/0);break;case Er:isFinite(y)&&y>b&&(ne=y),E=0,ae&&(a=1/0)}ae=this.maxSize;var ue=this.minSize;E>ae.width&&ue.width<ae.width&&(E=ae.width),ne>ae.height&&ue.height<ae.height&&(ne=ae.height),x=Math.max(E,ue.width),b=Math.max(ne,ue.height),ae.width<x&&(x=Math.min(ue.width,x)),ae.height<b&&(b=Math.min(ue.height,b)),a=Math.min(ae.width,a),y=Math.min(ae.height,y),a=Math.max(x,a),y=Math.max(b,y),(ee===90||ee===270)&&(ee=a,a=y,y=ee,ee=x,x=b,b=ee),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||jt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},_t.prototype.Wl=function(){},_t.prototype.Dd=function(){return!1},_t.prototype.arrange=function(a,y,x,b,E){this.Uk();var ee=$t.alloc();ee.assign(this.Ib),this.Ib.ka(),Xa(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&xh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Zi&&(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()||jt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(ee,this.Ib),pu(this,!1),$t.free(ee)},qe=_t.prototype,qe.eh=function(){};function Ia(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var ee=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=ee.width+y,ee=ee.height+ne,b+=y,E+=ne,y=ls(a,!0),x===b&&ee===E&&(y=gn),y){case gn:(x>b||ee>E)&&(Bo(a,!0),a.measure(x>b?b:x,ee>E?E:ee,0,0));break;case yn:Bo(a,!0),a.measure(b,E,0,0);break;case mr:Bo(a,!0),a.measure(b,ee,0,0);break;case Er:Bo(a,!0),a.measure(x,E,0,0)}}}qe.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_0(x,!0),this.N(),Pi(a,y)||(x.oh(),this.Pn(x)))},qe.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Un&&W1(a,this))},qe.gc=function(a,y){if(!Vs(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var ee=this instanceof wn&&xh(this),ne=this.Ib;if(ee){var ae=this.Ib,ue=this.dc,ge=this.areaBackground,ye=this.Ma;ge===null&&ye===null||a.yc(),ge!==null&&(yo(this,a,ge,!0,!0,ue,ae),ge instanceof Ai&&ge.type===Ys?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(ge)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),ye!==null&&(yo(this,a,ye,!0,!1,ue,ae),ye instanceof Ai&&ye.type===Ys?(a.beginPath(),a.rect(ae.x,ae.y,ae.width,ae.height),a.ng(ye)):a.fillRect(ae.x,ae.y,ae.width,ae.height)),this.hh(a,y)}if(!ee&&(ee||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){ee=this.transform,ae=this.panel,this.l&4096&&ca(this),ge=this.part,ue=!1;var Le=0;ge&&y.Gf("drawShadows")&&(ue=ge.isShadowed)&&(ye=ge.shadowOffset,Le=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var ze;if(!(ze=y.$i||!ye)){var We=this.naturalBounds;ze=this.wh;var Je=ze.m11,it=ze.m21,Tt=ze.dx,Pt=ze.m12,Nt=ze.m22,At=ze.dy,Bt,Rt=Bt=0;ze=Bt*Je+Rt*it+Tt;var Zt=Bt*Pt+Rt*Nt+At;Bt=We.width+Le,Rt=0;var Fn=Bt*Je+Rt*it+Tt;Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,Fn);var or=Math.min(Zt,Bt),$n=Math.max(ze+0,Fn)-Rt,Cn=Math.max(Zt+0,Bt)-or;ze=Rt,Zt=or,Bt=We.width+Le,Rt=We.height+Le,Fn=Bt*Je+Rt*it+Tt,Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,Fn),or=Math.min(Zt,Bt),$n=Math.max(ze+$n,Fn)-Rt,Cn=Math.max(Zt+Cn,Bt)-or,ze=Rt,Zt=or,Bt=0,Rt=We.height+Le,Fn=Bt*Je+Rt*it+Tt,Bt=Bt*Pt+Rt*Nt+At,Rt=Math.min(ze,Fn),or=Math.min(Zt,Bt),$n=Math.max(ze+$n,Fn)-Rt,Cn=Math.max(Zt+Cn,Bt)-or,ze=Rt,Zt=or,Le=y.viewportBounds,We=Le.x,Je=Le.y,ze=!(ze>Le.width+We||We>$n+ze||Zt>Le.height+Je||Je>Cn+Zt)}if(ze){if(ze=(this.l&256)!==0,a.clipInsteadOfFill&&(ze=!1),this instanceof Zi&&(a.font=this.font),ze){if(Zt=ae.se()?ae.naturalBounds:ae.actualBounds,$n=Math.max(ne.x,Zt.x),Cn=Math.max(ne.y,Zt.y),Le=Math.min(ne.right,Zt.right)-$n,We=Math.min(ne.bottom,Zt.bottom)-Cn,Je=this.tb,Je!==null&&($n=Je.x,Cn=Je.y,Le=Je.width,We=Je.height),$n>ne.width+ne.x||ne.x>Zt.width+Zt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect($n,Cn,Le,We),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ue&&(Zt=ge.shadowOffset,a.Ev(Zt.x*y.scale*this.scale*y.Mb,Zt.y*y.scale*this.scale*y.Mb,ge.shadowBlur),Hu(a),a.shadowColor=ge.shadowColor)}ue&&this.shadowVisible===!0?Hu(a):ue&&this.shadowVisible===!1&&gu(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ds(this,a,ge,ne)),a.transform(ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),ue&&ia(this,ae)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),gs(this,a,ge,ne)),ue&&(this.Ma!==null||this.areaBackground!==null||ia(this,ae))?(Sl(this,!0),this.shadowVisible===null&&gu(a)):Sl(this,!1),this.hh(a,y),ue&&this.l&512&&Hu(a),ye&&ue&&gu(a),ze&&(a.restore(),a.Vc(this instanceof wn)),ee.ws()||(y=1/(ee.m11*ee.m22-ee.m12*ee.m21),a.transform(ee.m22*y,-ee.m12*y,-ee.m21*y,ee.m11*y,y*(ee.m21*ee.dy-ee.m22*ee.dx),y*(ee.m12*ee.dx-ee.m11*ee.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ia(a,y){return y===null?!1:(xh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===wn.Auto||y.type===wn.Spot)&&y.Pb()!==a)}qe.Dv=function(){};function Ds(a,y,x,b){yo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ai&&a.areaBackground.type===Ys?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function gs(a,y,x,b){var E=a.kq(),ee=x.x,ne=x.y,ae=x.width+E,ue=x.height+E;yo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ai&&a.Ma.type===Ys?(y.beginPath(),y.rect(ee-E/2,ne-E/2,ae,ue),y.ng(a.Ma)):y.fillRect(ee-E/2,ne-E/2,ae,ue)}function La(a,y,x){for(var b=y.O.s,E=b.length,ee=-1,ne=0;ne<E;ne++)if(b[ne]===a){ee=ne;break}if(a=ee,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===wn.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 Vs(a,y,x){if(!(y instanceof Ps))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 b=a.panel,E=a.nk(y);if(a.kk(y,x,E))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):b&&La(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var ee=a.shadowOffset;y.Ev(ee.x*x.scale*a.scale*x.Mb,ee.y*x.scale*a.scale*x.Mb,a.shadowBlur),Hu(y),y.shadowColor=a.shadowColor}a instanceof Zi&&(y.font=a.font),y.yd=null;var ne=a.transform;ee=a instanceof wn;var ae=a instanceof wn?xh(a):!1;a.l&4096&&ca(a);var ue=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,ee&&ae?(Up(y,1,0,0,1,0,0),a.svg=y.ad):ee?(Up(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Up(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var ge=ne.copy().Vj();y.rb.ha=[ge.m11,ge.m12,ge.m21,ge.m22,ge.dx,ge.dy],Ds(a,y,E,ue),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return ee||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(ee?(ae&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),gs(a,y,E,ue),ae&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],gs(a,y,E,ue)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,ae=!1,E&&x.Gf("drawShadows")&&(ae=E.isShadowed),y.clipInsteadOfFill&&(ae=!1),a.Dd()&&ae&&Hu(y),ae&&a.shadowVisible===!0?Hu(y):ae&&a.shadowVisible===!1&&gu(y),E=a.panel,ae&&ia(a,E)&&a.shadowVisible===null&&gu(y),y.Il&&(ge=x.computePixelRatio(),ge="drop-shadow("+y.shadowOffsetX/ge+"px "+y.shadowOffsetY/ge+"px "+y.shadowBlur/ge/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ge),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ge)),ae&&(a.Ma!==null||a.areaBackground!==null||ia(a,E))?(Sl(a,!0),a.shadowVisible===null&&gu(y)):Sl(a,!1),E=ae,a.hh(y,x),ee&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,ae=ee?a.svg:y.yd,ge=a.svg,!ee&&ge!==null&&ae!==ge&&ge.parentNode===a.panel.svg?(a.svg.replaceWith(ae),a.svg=ae,ae!==null&&a.$o(y,b,ue,ae),ss(y,ge),!0):(a.svg=ae,ne!==null&&ae===null&&(um(y),y.nh.pop()),ae===null||(a.$o(y,b,ue,ae),y.Il&&(x=x.computePixelRatio(),a.Dv(ae,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Hu(y),a.Dd()&&gu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ae.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ae.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ae):y.Nj.prepend(ae),y.ti=ae):b!==null&&La(a,b,ae),ne!==null&&ne(a,ae)),!0)}qe.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var ee=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,ee.x),E=Math.max(x.y,ee.y);var ne=Math.min(x.right,ee.right)-y;x=Math.min(x.bottom,ee.bottom)-E,ee=this.tb,ee!==null&&(y=ee.x,E=ee.y,ne=ee.width,x=ee.height),ee=b.getAttribute("clip-path");var ae=null;ee!==null&&(ae=a.svg.getElementById(ee.split("#")[1].slice(0,-1))),ae===null?(ee="CLIP"+Ri++,ae=a.Ud("clipPath",{id:ee}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof wn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ae.appendChild(y),a.svg.appendChild(ae),b.setAttributeNS(null,"clip-path","url(#"+ee+")")):(a=ae.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),ss(a,b)};function ss(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ma(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Lr(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}qe.hh=function(){},qe.lv=function(){this.Uc=!0},qe.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 b=this.transform,E=this instanceof wn?xh(this):!1;if(!(this instanceof wn&&E))if(this instanceof hs){var ee=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],ee!==null&&Jy(a,ee[0],ee[1],ee[2],ee[3],ee[4],ee[5],ee[6],ee[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof wn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Hr){ee=y.getElementsByTagName("path");for(var ne=0;ne<ee.length;ne++)ee[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return ee=this.Dd()?this.opacity*a.globalAlpha:this.opacity,ee===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",ee.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(ee=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ds(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),ee&&hm(a,ee)),(this.background!==null||y.Ma!==void 0)&&(ee=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof wn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),gs(this,a,this.naturalBounds,this.actualBounds),y.Ma?(hm(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),ee&&hm(a,ee)),this.$o(a,this.panel,this.actualBounds,y),!0},qe.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function yo(a,y,x,b,E,ee,ne){if(x!==null){var ae=1,ue=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ge=a.kq();if(ae=ee.width,ue=ee.height,E?(ae=ne.width,ue=ne.height):b||(ae+=ge,ue+=ge),(ee=y instanceof Vc)&&x.xe&&(x.type===Ld||x.yk===ae&&x.ft===ue))var ye=x.xe;else{var Le=0,ze=0,We=0,Je=0,it=0,Tt=0;if(Tt=it=0,E?(it=ne.x,Tt=ne.y):b||(it-=ge/2,Tt-=ge/2),Le=x.start.x*ae+x.start.offsetX,ze=x.start.y*ue+x.start.offsetY,We=x.end.x*ae+x.end.offsetX,Je=x.end.y*ue+x.end.offsetY,Le+=it,We+=it,ze+=Tt,Je+=Tt,x.type===Ku)ye=y.createLinearGradient(Le,ze,We,Je);else if(x.type===Ys)Tt=isNaN(x.endRadius)?Math.max(ae,ue)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Tt=Math.max(ae,ue)/2):it=x.startRadius,ye=y.createRadialGradient(Le,ze,it,We,Je,Tt);else if(x.type===Ld)try{ye=y.createPattern(x.pattern,"repeat")}catch(Nt){ye=null}if(x.type!==Ld&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(ee&&(x.xe=ye,ye!==null&&(x.yk=ae,x.ft=ue),ye===null&&x.type===Ld&&x.yk!==-1)){x.yk=-1;var Pt=a.diagram;Pt!==null&&x.yk===-1&&Jt(function(){Pt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}qe.rg=function(a){if(a instanceof wn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},qe.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},qe.If=function(){for(var a=this instanceof wn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){sl(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)}sl(a,!1),Zs(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Zs(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,Zs(a,!1)))}qe.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var ee=lt.alloc();ee.yi(y,x,b,E,ai),a.rotate(this.Kb,ee.x,ee.y),lt.free(ee)}},qe.v=function(a){if(!Bs(this)){a===void 0&&(a=!1),Bo(this,!0),pu(this,!0);var y=this.panel;y===null||a||y.v()}},qe.Uj=function(){Bs(this)||(Bo(this,!0),pu(this,!0))};function Za(a){if(!Xa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Un&&a.Bd(),y.$b())),pu(a,!0)}}qe.Uk=function(){!(this.l&2048)&&(sl(this,!0),Zs(this,!0))},qe.Wu=function(){Zs(this,!0)},qe.N=function(){var a=this.part;a!==null&&a.N()};function ls(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===wn.Table?Ol(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===wn.Auto&&b.Pb()===a?oa(a,yn,y):x===Rr?b!==null?b.type===wn.Spot&&b.Pb()===a?oa(a,yn,y):(x=b.defaultStretch,x===Rr?oa(a,gn,y):oa(a,x,y)):oa(a,gn,y):oa(a,x,y)}function Ol(a,y,x,b){var E=a.stretch;if(E!==Rr)return oa(a,E,b);var ee=E=null;switch(y.stretch){case Er:ee=!0;break;case yn:ee=!0}switch(x.stretch){case mr:E=!0;break;case yn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===mr||y===yn),ee===null&&(ee=y===Er||y===yn),E===!0&&ee===!0?oa(a,yn,b):E===!0?oa(a,mr,b):ee===!0?oa(a,Er,b):oa(a,gn,b)}function oa(a,y,x){if(x)return y;if(y===gn||(x=a.desiredSize,x.w()))return gn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===mr)return gn;if(y===yn)return Er}else{if(y===Er)return gn;if(y===yn)return mr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Er)return gn;if(y===yn)return mr}else{if(y===mr)return gn;if(y===yn)return Er}return y}function Sl(a,y){a.l=y?a.l|512:a.l&-513}function pa(a){return(a.l&1024)!==0}function Af(a,y){a.l=y?a.l|1024:a.l&-1025}function sl(a,y){a.l=y?a.l|2048:a.l&-2049}function Zs(a,y){a.l=y?a.l|4096:a.l&-4097}function Bs(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Xa(a){return(a.l&16384)!==0}function pu(a,y){a.l=y?a.l|16384:a.l&-16385}qe.Gj=function(){this.svg=null},qe.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},qe.Av=function(){},qe.zv=function(a){return this.pa=a,Za(this),!0},qe.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},qe.kq=function(){return 0};function Wc(a){var y=a.part;if(y instanceof Un&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof wn?a instanceof Un?a.Bd():a.qm(a,function(x){Wc(x)}):Wc(a))}qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Lo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&jt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new rn),this.localBindings.add(E),this},qe.set=function(a){return Object.assign(this,a),this},qe.Du=function(a){return r0(this,a),this},qe.apply=function(a){return a(this),this},qe.nm=function(a){return Bc(this,a),this},qe.pz=function(){return this.ih()},qe.ih=function(){for(var a=this instanceof wn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},qe.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new tn),this.animationTriggers.add(a.propertyName,a),this};function Xs(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var ee=bd.I(a);typeof ee=="function"?(x=Jn(arguments),b=ee(x),sn(b)||jt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=vn.go[a]}if(b===null&&(E!=null&&E.constructor||jt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Yt&&1<x.length){ee=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(ee,ne),E++)}for(;E<x.length;E++)ee=x[E],ee===void 0?jt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,ee);return b}function r0(a,y){if(typeof y=="string")if(a instanceof Zi)a.text=y;else if(a instanceof Hr)a.figure=y;else if(a instanceof hs)a.source=y;else if(a instanceof wn)y=xl.I(y),y!==null&&(a.type=y);else if(a instanceof Ai){var x=qn(Ai,y);x!==null?a.type=x:jt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Tn?(y=qn(Tn,y),y!==null&&(a.type=y)):a instanceof gi&&(y=qn(gi,y),y!==null&&(a.type=y));else if(y instanceof _t)a instanceof wn||jt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Io?km(b,y):jt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof hn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Go)a.type=y;else if(y instanceof Lo)a instanceof _t||a instanceof Io?a.bind(y):jt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof vl)a instanceof _t?a.Jv(y):jt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof Tn&&a.type===Tn.o?a.figures.add(y):jt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof gi)a instanceof Oo?a.segments.add(y):jt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof so)a instanceof Yt||a instanceof Ir?a.layout=y:jt("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++)r0(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ai){x=new pr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&jt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new pr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else jt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function yh(a,y){bd.add(a,y)}function lm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}zt.Object.defineProperties(_t.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new jf),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 jf),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 jf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Zr(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&&(Zr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Qa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Qa&&(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 nc),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 nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:zn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Rr},set:function(a){var y=this.stretch;y!==a&&(Zr(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&&(Zr(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)&&Nn(a,"0 <= value <= 1",_t,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Jc(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(Jc(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(),Xy(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&&Ff(a,"GraphObject.areaBackground"),a instanceof Ai&&a.freeze(),Zr(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&&Ff(a,"GraphObject.background"),a instanceof Ai&&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 Sr)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,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new lt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&jt("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,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,ee=b.height;(E===y||isNaN(E)&&isNaN(y))&&(ee===x||isNaN(ee)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Hr&&this.qc(),this.g("desiredSize",b,a),pa(this)&&(a=this.part,a!==null&&($i(this,a,"width"),$i(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 mn(a,this.jd.height).freeze(),this.v(),this instanceof Hr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 mn(this.jd.width,a).freeze(),this.v(),this instanceof Hr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&$i(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:dr},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(),Zr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:pi},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(),Zr(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 Ur(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&&ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Zr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:gn},set:function(a){this.reshapingBehavior!==a&&(Zr(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()&&jt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Za(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&&Nn(a,">= 0",_t,"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&&Nn(a,">= 1",_t,"columnSpan"),Zr(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&&Nn(a,">= 0",_t,"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&&Nn(a,">= 1",_t,"rowSpan"),Zr(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&&(Zr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Un||jt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&H0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Z1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Vr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Wc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Nn(a,">= 0",_t,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Wc(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),Wc(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&&Nn(a,">= 0",_t,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Vr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Wc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Nn(a,">= 0",_t,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Wc(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),Wc(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&&Nn(a,">= 0",_t,"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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(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&&(Zr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),_t.prototype.trigger=_t.prototype.Jv,_t.prototype.findBindingPanel=_t.prototype.ih,_t.prototype.findTemplateBinder=_t.prototype.pz,_t.prototype.setProperties=_t.prototype.nm,_t.prototype.apply=_t.prototype.apply,_t.prototype.attach=_t.prototype.Du,_t.prototype.set=_t.prototype.set,_t.prototype.isEnabledObject=_t.prototype.If,_t.prototype.isVisibleObject=_t.prototype.Ed,_t.prototype.isContainedBy=_t.prototype.rg,_t.prototype.getNearestIntersectionPoint=_t.prototype.rs,_t.prototype.getLocalPoint=_t.prototype.qs,_t.prototype.getDocumentScale=_t.prototype.Df,_t.prototype.getDocumentAngle=_t.prototype.li,_t.prototype.getDocumentBounds=_t.prototype.mi,_t.prototype.getDocumentPoint=_t.prototype.ga,_t.prototype.intersectsRect=_t.prototype.Yc,_t.prototype.containedInRect=_t.prototype.fh,_t.prototype.containsRect=_t.prototype.Re,_t.prototype.containsPoint=_t.prototype.ca,_t.prototype.raiseChanged=_t.prototype.g,_t.prototype.raiseChangedEvent=_t.prototype.cb,_t.prototype.addCopyProperty=_t.prototype.Vw;var bd=null;_t.className="GraphObject",bd=new tn,yh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=Xs(wn,wn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof wn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xs(Hr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ln(0,0,2.76142374915397,2.761423749153969),spot2:new Ln(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof wn&&(x=b.fb("ButtonBorder"),x instanceof Hr)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof wn&&(x=b.fb("ButtonBorder"),x instanceof Hr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Hr){x=x.diagram;var ee=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=ee}}},y.actionUp=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Hr){var ee=x.diagram,ne=ee.skipsUndoManager;ee.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),ee.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Hr){var ee=x.diagram,ne=ee.skipsUndoManager;ee.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),ee.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Hr))){var ee=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=ee}}},y}),yh("TreeExpanderButton",function(){var a=Xs("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xs(Hr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ei},new Lo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Lo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof mi&&(x=x.adornedPart),x instanceof Un){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),yh("SubGraphExpanderButton",function(){var a=Xs("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Xs(Hr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ei},new Lo("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 mi&&(x=x.adornedPart),x instanceof Ir){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),yh("ToolTip",function(){return Xs(mi,wn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},Xs(Hr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ln(0,0,4,6),spot2:new Ln(1,1,-4,-4)}))}),yh("ContextMenu",function(){return Xs(mi,wn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},new Lo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=Xs("Button");a.stretch=mr;var y=a.fb("ButtonBorder");return y instanceof Hr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ln(0,0,2,3),y.spot2=new Ln(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Xs("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},Xs(Hr,{name:"ButtonIcon",strokeWidth:2},new Lo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Hr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var ee=E.diagram;if(ee!==null&&!ee.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,ee.Ea("Collapse/Expand Panel"),E.visible=!E.visible,ee.eb("Collapse/Expand Panel")))}},x}),yh("CheckBoxButton",function(a){var y=lm(a);return a=Xs("Button",{desiredSize:new mn(14,14)},Xs(Hr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:hr,visible:!1},y!==""?new Lo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof wn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var ee=b.fb("ButtonIcon");E.Ea("checkbox"),ee.visible=!ee.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),yh("CheckBox",function(a){a=lm(a),a=Xs("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Ur(0,1,0,0)});var y=Xs(wn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ur(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}),_t.None=gn=new hn(_t,"None",0),_t.Default=Rr=new hn(_t,"Default",0),_t.Vertical=Er=new hn(_t,"Vertical",4),_t.Horizontal=mr=new hn(_t,"Horizontal",5),_t.Fill=yn=new hn(_t,"Fill",3),_t.Uniform=hr=new hn(_t,"Uniform",1),_t.UniformToFill=ri=new hn(_t,"UniformToFill",2),_t.FlipVertical=Yr=new hn(_t,"FlipVertical",1),_t.FlipHorizontal=ci=new hn(_t,"FlipHorizontal",2),_t.FlipBoth=Ii=new hn(_t,"FlipBoth",3),_t.make=Xs,_t.getBuilders=function(){var a=new tn,y;for(y in bd)if(y!==y.toLowerCase()){var x=bd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},_t.defineBuilder=yh,_t.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=bd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof _t))return y&&b.set(y),b;jt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},_t.takeBuilderArgument=lm;function jf(){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=dr,this.o=pi,this.hg=Rr,this.ob=this.Bi=1,this.Pf=gn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;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 nc(){this.u=-1/0,this.o=0,this.F=zn,this.rr=Qa,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;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},nc.className="LinkElementSettings";function Gp(){this.yj=this.Xi=Vo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gp.prototype.copy=function(){var a=new Gp;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},Gp.className="LinkSettings";function Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;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},Kc.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},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,ee=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=ee,this.ha[3]=ne,this.translate(-y,-x)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function Ql(a,y,x){this.ownerDocument=a=y===void 0?vn.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 Ps(this,x)}Ql.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Ql.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),sn(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Ql.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ql.prototype.focus=function(){this.Oa.focus()},Ql.prototype.mx=function(){this.ownerDocument=null},zt.Object.defineProperties(Ql.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}}}),Ql.className="SVGSurface";function Ps(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 Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ri++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,ee,ne){a.Nj===void 0?Up(a,y,x,b,E,ee,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+ee+", "+ne+")")}qe=Ps.prototype,qe.arc=function(a,y,x,b,E,ee,ne,ae){var ue=2*Math.PI,ge=ue-1e-6,ye=x*Math.cos(b),Le=x*Math.sin(b),ze=a+ye,We=y+Le,Je=ee?0:1;b=ee?b-E:E-b,(1e-6<Math.abs(ne-ze)||1e-6<Math.abs(ae-We))&&this.path.push(["L",ze,+We]),0>b&&(b=b%ue+ue),b>ge?(this.path.push(["A",x,x,0,1,Je,a-ye,y-Le]),this.path.push(["A",x,x,0,1,Je,ze,We])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Je,a+x*Math.cos(E),y+x*Math.sin(E)])},qe.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},qe.Se=function(a){this.addPath(this.path,this.rb,a||0)},qe.bezierCurveTo=function(a,y,x,b,E,ee){this.path.push(["C",a,y,x,b,E,ee])},qe.clearRect=function(){},qe.clip=function(){this.Yl.clipPath=!0},qe.closePath=function(){this.path.push(["z"])},qe.createLinearGradient=function(a,y,x,b){var E=new Of("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},qe.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 b="PATTERN"+Ri++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Uc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},qe.createRadialGradient=function(a,y,x,b,E,ee){var ne=new Of("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=ee,ne};function Jy(a,y,x,b,E,ee,ne,ae,ue){b=ae/b,E=ue/E,ee===0&&ne===0||a.rb.translate(ee,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}qe.drawImage=function(a,y,x,b,E,ee,ne,ae,ue){var ge="";a instanceof HTMLCanvasElement&&(ge=a.toDataURL()),a instanceof HTMLImageElement&&(ge=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(ee=y,ne=x,ae=b=ye,ue=E=a),b=b||0,E=E||0,ae=ae||0,ue=ue||0,Jy(this,y,x,b,E,ee||0,ne||0,ae,ue),ee={x:0,y:0,width:ye||b,height:a||E,href:ge},Gt.$(b,ae)&&Gt.$(E,ue)?ge.toLowerCase().indexOf(".svg")===-1&&ge.toLowerCase().indexOf("data:image/svg")===-1&&(ee.preserveAspectRatio="xMidYMid slice"):ee.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,ee["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Pd(this,Uc,ee,this.rb),this.addElement(Uc,ee)},qe.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},qe.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},qe.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Pd(this,"fill",a,this.rb),this.addElement("rect",a)},qe.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Pd(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},qe.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},Pd(this,"fill",y,this.rb),this.addElement("text",y,a[0])},qe.lineTo=function(a,y){this.path.push(["L",a,y])},qe.moveTo=function(a,y){this.path.push(["M",a,y])},qe.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},qe.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},qe.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},qe.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())},qe.setTransform=function(a,y,x,b,E,ee){a===1&&y===0&&x===0&&b===1&&E===0&&ee===0||Up(this,a,y,x,b,E,ee)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}qe.scale=function(a,y){this.rb.scale(a,y)},qe.translate=function(a,y){this.rb.translate(a,y)},qe.transform=function(){},qe.yc=function(){},qe.stroke=function(){qy(this,this.Yl)},qe.jk=function(){this.clipInsteadOfFill||this.stroke()},qe.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},qe.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 Pd(a,y,x,b){y==="fill"?i0(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function i0(a,y){a.fillStyle instanceof Of?y.fill=o0(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 $y(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Of?y.setAttributeNS(null,"fill",o0(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Of)y.stroke=o0(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 o0(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Ri++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,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:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var ee=[],ne=0;ne<y;ne++){var ae=E[ne],ue=ae.color;ae={offset:ae.offset,"stop-color":ue},/^rgba\(/.test(ue)&&(ue=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ue),ae["stop-color"]="rgb("+ue[1]+","+ue[2]+","+ue[3]+")",ae["stop-opacity"]=ue[4]),ee.push(ae)}for(ee.sort(function(ge,ye){return ge.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",ee[E]));return a.svg.appendChild(x),"url(#"+b+")"}qe.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var ee=Jn(a[E]),ne=[ee.shift()];if(ne[0]==="A")ne.push(ee.shift()+","+ee.shift(),ee.shift(),ee.shift()+","+ee.shift(),ee.shift()+","+ee.shift());else for(;ee.length;)ne.push(ee.shift()+","+ee.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,Pd(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ae in a)ae!=="transform"&&y.setAttributeNS(null,ae,a[ae]);else{ae=y.getElementsByTagName("path");for(var ue in a)ue!=="transform"&&ae[x].setAttributeNS(null,ue,a[ue])}else this.addElement("path",a)};function Up(a,y,x,b,E,ee,ne){var ae=new Kc;ae.ha=[y,x,b,E,ee,ne],y={},Pd(a,"g",y,ae),ae=a.addElement("g",y),a.nh.push(ae)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function gu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Hu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}qe.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},qe.fs=function(){this.Ct=!1},qe.Vc=function(){},qe.Wx=function(){},Ps.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ps.prototype.getImageData=function(){return null},Ps.prototype.measureText=function(){return null};function hm(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()))}Ps.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ps.className="SVGContext",Yt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ql(this,vn.document));var y=new Ql(this,vn.document,!0);a===void 0&&(a=new pr);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Yt.prototype.makeSvg=Yt.prototype.Cs,Yt.prototype.av=function(a){return this.Cs(a)},Yt.prototype.makeSVG=Yt.prototype.av;function ll(a,y,x,b){this.ownerDocument=y=y===void 0?vn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}ll.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},ll.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},ll.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ll.prototype.focus=function(){this.Oa.focus()},ll.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},zt.Object.defineProperties(ll.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}}}),ll.className="CanvasSurface";function Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&jt("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 jr,this.isTemporary=!!x}qe=Vc.prototype,qe.Wx=function(a){this.Z.imageSmoothingEnabled=a},qe.arc=function(a,y,x,b,E,ee){this.Z.arc(a,y,x,b,E,ee)},qe.beginPath=function(){this.Z.beginPath()},qe.Se=function(){},qe.bezierCurveTo=function(a,y,x,b,E,ee){this.Z.bezierCurveTo(a,y,x,b,E,ee)},qe.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},qe.clip=function(){this.Z.clip()},qe.closePath=function(){this.Z.closePath()},qe.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},qe.createPattern=function(a,y){return this.Z.createPattern(a,y)},qe.createRadialGradient=function(a,y,x,b,E,ee){return this.Z.createRadialGradient(a,y,x,b,E,ee)},qe.drawImage=function(a,y,x,b,E,ee,ne,ae,ue){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,ee,ne,ae,ue)},qe.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},qe.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qe.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qe.fillText=function(a,y,x){this.Z.fillText(a,y,x)},qe.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},qe.lineTo=function(a,y){this.Z.lineTo(a,y)},qe.measureText=function(a){return this.Z.measureText(a)},qe.moveTo=function(a,y){this.Z.moveTo(a,y)},qe.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},qe.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},qe.restore=function(){this.Z.restore()},qe.save=function(){this.yc(),this.Z.save()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},qe=Vc.prototype,qe.setTransform=function(a,y,x,b,E,ee){this.El.setTransform(a,y,x,b,E,ee)},qe.scale=function(a,y){this.El.scale(a,y)},qe.translate=function(a,y){this.El.translate(a,y)},qe.stroke=function(){this.Z.stroke()},qe.transform=function(a,y,x,b,E,ee){if(a!==1||y!==0||x!==0||b!==1||E!==0||ee!==0){var ne=this.El,ae=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*ee+ne.dx,ne.dy=ne.m12*E+ne.m22*ee+ne.dy,ne.m11=ae,ne.m12=a,ne.m21=y,ne.m22=x}},qe.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},qe.ng=function(a,y){if(a instanceof Ai&&a.type===Ys){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)},qe.jk=function(){this.Hm||this.stroke()},qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},qe.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},qe.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},qe.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},qe.Hs=function(){},zt.Object.defineProperties(Vc.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 vx=Object.freeze([]);Vc.className="CanvasSurfaceContext";function Hp(){this.F=this.o=this.u=this.j=0}Hp.className="ColorNumbers";function Ai(a,y){Td||(c0(),Td=!0),cr(this),this._isFrozen=!1,a===void 0?(this.na=Sh,this.xk="black"):typeof a=="string"?(this.na=Sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ku?(this.Qd=co,this.Lk=jo):this.Lk=a===Ys?this.Qd=ai:this.Qd=Vr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ai.prototype.copy=function(){var a=new Ai;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},qe=Ai.prototype,qe.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},qe.ka=function(){return Object.isFrozen(this)&&jt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},qe.qb=function(a){a.classType===Ai&&(this.type=a)},qe.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Ku?a+"Linear ":this.type===Ys?a+"Radial ":this.type===Ld?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+")"},qe.addColorStop=function(a,y){return this._isFrozen&&ln(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Nn(a,"0 <= loc <= 1",Ai,"addColorStop:loc"),this.we===null&&(this.we=new tn),this.we.add(a,y),this.na===Sh&&(this.type=Ku),this.xe=null,this},qe.Vz=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md:y,this.type===Sh)Wu(this.color),this.color=Ed(a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Md:x,Wu(a),Ed(y,x)}qe.Wy=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Md:y,this.type===Sh)Wu(this.color),this.color=Ed(-a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Md:x,Wu(a),Ed(-y,x)}function a0(a,y,x){Wu(a),a=Yi.j;var b=Yi.u,E=Yi.o,ee=Yi.F;return Wu(y),x===void 0&&(x=.5),"rgba("+Math.round((Yi.j-a)*x+a)+", "+Math.round((Yi.u-b)*x+b)+", "+Math.round((Yi.o-E)*x+E)+", "+Math.round((Yi.F-ee)*x+ee)+")"}qe.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Ku||this.type===Ys)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ys)return Cd(a.first().value);if(a.get(.5)!==null)return Cd(a.get(.5));if(a.count===2)return a=a.Fa(),Cd(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,ee=1;y.next();){var ne=y.key,ae=Math.abs(.5-y.key);E>ee&&ae<E?(x=ne,E=ae):ee>=E&&ae<ee&&(b=ne,ee=ae)}return x>b&&(ee=x,x=b,b=ee,ee=E),E=b-x,Cd(a0(a.get(x),a.get(b),1-ee/E))}return!1};function Cd(a){return a?a instanceof Ai?a.Gx():(Wu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Md:y=100*l0(Yi.j);var x=100*l0(Yi.u),b=100*l0(Yi.o);return Ya.j=.4124564*y+.3575761*x+.1804375*b,Ya.u=.2126729*y+.7151522*x+.072175*b,Ya.o=.0193339*y+.119192*x+.9503041*b,Ya.F=Yi.F,y=h0(Ya.j/kd[0]),x=h0(Ya.u/kd[1]),b=h0(Ya.o/kd[2]),mu.j=116*x-16,mu.u=500*(y-x),mu.o=200*(x-b),mu.F=Ya.F,mu.j=Math.min(100,Math.max(0,mu.j+100*a)),a=(mu.j+16)/116,y=a-mu.o/200,Ya.j=kd[0]*n1(mu.u/500+a),Ya.u=kd[1]*(mu.j>cm*f0?Math.pow(a,3):mu.j/cm),Ya.o=kd[2]*n1(y),Ya.F=mu.F,a=-.969266*Ya.j+1.8760108*Ya.u+.041556*Ya.o,y=.0556434*Ya.j+-.2040259*Ya.u+1.0572252*Ya.o,Yi.j=255*u0((3.2404542*Ya.j+-1.5371385*Ya.u+-.4985314*Ya.o)/100),Yi.u=255*u0(a/100),Yi.o=255*u0(y/100),Yi.F=Ya.F,Yi.j=Math.round(Yi.j),255<Yi.j?Yi.j=255:0>Yi.j&&(Yi.j=0),Yi.u=Math.round(Yi.u),255<Yi.u?Yi.u=255:0>Yi.u&&(Yi.u=0),Yi.o=Math.round(Yi.o),255<Yi.o?Yi.o=255:0>Yi.o&&(Yi.o=0),"rgba("+Yi.j+", "+Yi.u+", "+Yi.o+", "+Yi.F+")";case r1:return s0(),Is.o=Math.min(100,Math.max(0,Is.o+100*a)),"hsla("+Is.j+", "+Is.u+"%, "+Is.o+"%, "+Is.F+")";default:jt("Unknown color space: "+y)}}function Wu(a){Td||(c0(),Td=!0);var y=d0;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,Yi.j=a[0],Yi.u=a[1],Yi.o=a[2],Yi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Yi.j=0,Yi.u=0,Yi.o=0,Yi.F=1)}}function s0(){var a=Yi.j/255,y=Yi.u/255,x=Yi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),ee=b-E;if(E=(b+E)/2,ee===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/ee%6;break;case y:ne=(x-a)/ee+2;break;case x:ne=(a-y)/ee+4}ne*=60,0>ne&&(ne+=360),a=ee/(1-Math.abs(2*E-1))}Is.j=Math.round(ne),Is.u=Math.round(100*a),Is.o=Math.round(100*E),Is.F=Yi.F}function l0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>f0?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>f0?y:(116*a-16)/cm}function Ff(a,y){typeof a!="string"&&(a instanceof Ai||jt("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=vo?new ll(null,void 0,{willReadFrequently:!0}).context:null}zt.Object.defineProperties(Ai.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ln(this,a),this.na=a,this.start.Mc()&&(a===Ku?this.start=co:a===Ys&&(this.start=ai)),this.end.Mc()&&(a===Ku?this.end=jo:a===Ys&&(this.end=ai)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ln(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ln(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ln(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ln(this,a),0>a&&Nn(a,">= zero",Ai,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ln(this,a),0>a&&Nn(a,">= zero",Ai,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ln(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ln(this,a),this.cr=a,this.xe=null}}}),Ai.prototype.isDark=Ai.prototype.Gx,Ai.prototype.darkenBy=Ai.prototype.Wy,Ai.prototype.lightenBy=Ai.prototype.Vz,Ai.prototype.addColorStop=Ai.prototype.addColorStop;var f0=216/24389,cm=24389/27,kd=[95.047,100,108.883],d0=null,Yi=new Hp,Is=new Hp,Ya=new Hp,mu=new Hp,Td=!1;Ai.className="Brush";var Sh;Ai.Solid=Sh=new hn(Ai,"Solid",0);var Ku;Ai.Linear=Ku=new hn(Ai,"Linear",1);var Ys;Ai.Radial=Ys=new hn(Ai,"Radial",2);var Ld;Ai.Pattern=Ld=new hn(Ai,"Pattern",4);var Md;Ai.Lab=Md=new hn(Ai,"Lab",5);var r1;Ai.HSL=r1=new hn(Ai,"HSL",6),Ai.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 b=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>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Ai.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Td||(c0(),Td=!0);var y=d0;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)},Ai.lighten=function(a){return e1(a)},Ai.lightenBy=e1,Ai.darken=function(a){return t1(a)},Ai.darkenBy=t1,Ai.mix=a0,Ai.isDark=Cd;function Go(){this.xa="Base"}Go.prototype.measure=function(){},Go.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Go.prototype.arrange=function(){},Go.prototype.Ly=function(a,y,x,b,E,ee){a.arrange(y,x,b,E,ee)},Go.prototype.iA=function(a){a.Uj()},Go.prototype.gc=function(){},zt.Object.defineProperties(Go.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return wn}}}),Go.prototype.remeasureObject=Go.prototype.iA,Go.prototype.arrangeElement=Go.prototype.Ly,Go.prototype.measureElement=Go.prototype.Yz,Go.className="PanelLayout";function fm(){this.xa="Base"}Kt(fm,Go),fm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;a=Vu(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===a){var ye=ge.margin,Le=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,ee,ne);var ze=ge.measuredBounds;Le=Math.max(ze.width+Le,0),ye=Math.max(ze.height+ye,0),ze=ge.position.x;var We=ge.position.y;isFinite(ze)||(ze=0),isFinite(We)||(We=0),ge instanceof Hr&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,ze-=ge,We-=ge),xi(E,ze,We,Le,ye)}}},fm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var ee=y[E],ne=ee.measuredBounds,ae=ee.margin,ue=ee.position.x,ge=ee.position.y;if(ue=isNaN(ue)?-a:ue-a,ge=isNaN(ge)?-x:ge-x,ee instanceof Hr&&ee.isGeometryPositioned){var ye=ee.strokeWidth/2;ue-=ye,ge-=ye}ee.visible&&ee.arrange(ue+ae.left,ge+ae.top,ne.width,ne.height)}};function dm(){this.xa="Base"}Kt(dm,Go),dm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length;y=er(),ee=Vu(a);for(var ue=0;ue<ae;ue++){var ge=b[ue];if(ge.visible||ge===ee){var ye=ls(ge,!1);if(ye!==gn&&ye!==mr)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Le=Math.max(ge.height+ye.top+ye.bottom,0);E.width+=Math.max(ge.width+ye.right+ye.left,0),E.height=Math.max(E.height,Le)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)ue=y[a],(ue.visible||ue===ee)&&(ye=ue.margin,ae=ye.right+ye.left,ye=ye.top+ye.bottom,ue.measure(1/0,x,0,ne),ue=ue.measuredBounds,ye=Math.max(ue.height+ye,0),E.width+=Math.max(ue.width+ae,0),E.height=Math.max(E.height,ye));_n(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.top,ne=a.isOpposite,ae=ne?x.width:E.left,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,We=ze.top+ze.bottom,Je=ee+E.bottom,it=Le.height,Tt=ls(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===yn||Tt===Er)&&(it=Math.max(x.height-We-Je,0)),We=it+We+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=ai),ne&&(ae-=Le.width+ze.left+ze.right),ye.arrange(ae+Je.offsetX+ze.left,ge+Je.offsetY+ze.top+(x.height*Je.y-We*Je.y),Le.width,it),ne||(ae+=Le.width+ze.left+ze.right)}}};function pm(){this.xa="Base"}Kt(pm,Go),pm.prototype.measure=function(a,y,x,b,E,ee){var ne=b.length;x=er();for(var ae=Vu(a),ue=0;ue<ne;ue++){var ge=b[ue];if(ge.visible||ge===ae){var ye=ls(ge,!1);if(ye!==gn&&ye!==Er)x.push(ge);else{var Le=ge.margin;ye=Le.right+Le.left,Le=Le.top+Le.bottom,ge.measure(y,1/0,ee,0),ge=ge.measuredBounds,vi(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Le,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)ue=x[a],(ue.visible||ue===ae)&&(ge=ue.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,ue.measure(y,1/0,ee,0),ue=ue.measuredBounds,ge=Math.max(ue.height+ge,0),E.width=Math.max(E.width,Math.max(ue.width+ne,0)),E.height+=ge);_n(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,ee=E.left,ne=a.isOpposite,ae=ne?x.height:E.top,ue=0;ue<b;ue++){var ge=ee,ye=y[ue];if(ye.visible){var Le=ye.measuredBounds,ze=ye.margin,We=ze.left+ze.right,Je=ee+E.right,it=Le.width,Tt=ls(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===yn||Tt===mr)&&(it=Math.max(x.width-We-Je,0)),We=it+We+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=ai),ne&&(ae-=Le.height+ze.bottom+ze.top),ye.arrange(ge+Je.offsetX+ze.left+(x.width*Je.x-We*Je.x),ae+Je.offsetY+ze.top,it,Le.height),ne||(ae+=Le.height+ze.bottom+ze.top)}}};function gm(){this.xa="Base"}Kt(gm,Go),gm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length,ue=a.Pb(),ge=ue.margin,ye=ge.right+ge.left,Le=ge.top+ge.bottom;ue.measure(y,x,ee,ne);var ze=ue.measuredBounds;ee=ze.width,ne=ze.height;var We=Math.max(ee+ye,0),Je=Math.max(ne+Le,0),it=a.isClipping,Tt=$t.allocAt(-ge.left,-ge.top,We,Je),Pt=$t.allocAt(0,0,ee,ne);p0(ue,Pt,!0),ee=Pt.width,ne=Pt.height;for(var Nt=!0,At=Vu(a),Bt=0;Bt<ae;Bt++){var Rt=b[Bt];ze=y;var Zt=x;if(Rt!==ue&&(Rt.visible||Rt===At)){ge=Rt.margin;var Fn=ge.left,or=ge.top;switch(We=ge.right+ge.left,Je=ge.top+ge.bottom,ge=ls(Rt,!1),ge){case yn:ze=ee,Zt=ne,or=Fn=Je=We=0;break;case mr:ze=ee,Fn=We=0;break;case Er:Zt=ne,or=Je=0}Rt.measure(ze,Zt,0,0),ze=Rt.measuredBounds,We=Math.max(ze.width+We,0),Je=Math.max(ze.height+Je,0),ge=Rt.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=ai);var $n=Rt.alignmentFocus;if($n.Xb()&&($n=ai),Zt=null,Rt instanceof wn&&Rt.$e!==""&&(Zt=Rt.fb(Rt.$e),Zt===Rt&&(Zt=null)),Fn=Pt.x-Fn,or=Pt.y-or,Zt!==null){for(Rt.arrange(0,0,ze.width,ze.height),ze=Zt.actualBounds,ze=lt.allocAt(ze.x+($n.x*ze.width-$n.offsetX),ze.y+($n.y*ze.height-$n.offsetY)),Zt=Zt.panel;Zt!==Rt;)Zt.transform.Ga(ze),Zt=Zt.panel;Fn+=ge.x*ee+ge.offsetX-ze.x,or+=ge.y*ne+ge.offsetY-ze.y,lt.free(ze)}else Fn+=ge.x*ee+ge.offsetX-($n.x*ze.width+$n.offsetX),or+=ge.y*ne+ge.offsetY-($n.y*ze.height+$n.offsetY);Nt?(Nt=!1,E.h(Fn,or,We,Je)):xi(E,Fn,or,We,Je)}}switch(Nt?E.assign(Tt):it?E.Uu(Pt.x,Pt.y,Pt.width,Pt.height):xi(E,Tt.x,Tt.y,Tt.width,Tt.height),$t.free(Tt),$t.free(Pt),ge=ue.stretch,ge===Rr&&(ge=ls(ue,!1)),ge){case gn:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case mr:if(!isFinite(y))return;break;case Er:if(!isFinite(x))return}for(ze=ue.measuredBounds,ee=ze.width,ne=ze.height,We=Math.max(ee+ye,0),Je=Math.max(ne+Le,0),ge=ue.margin,Pt=$t.allocAt(-ge.left,-ge.top,We,Je),p0(ue,Pt,!0),ee=Pt.width,ne=Pt.height,y=0;y<ae;y++)x=b[y],x===ue||!x.visible&&x!==At||(ge=x.margin,We=ge.right+ge.left,Je=ge.top+ge.bottom,ze=x.measuredBounds,We=Math.max(ze.width+We,0),Je=Math.max(ze.height+Je,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ai),x=x.alignmentFocus,x.Xb()&&(x=ai),Nt?(Nt=!1,E.h(ye.x*ee+ye.offsetX-(x.x*ze.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-ge.top,We,Je)):xi(E,ye.x*ee+ye.offsetX-(x.x*ze.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-ge.top,We,Je));Nt?E.assign(Tt):it?E.Uu(Pt.x,Pt.y,Pt.width,Pt.height):xi(E,Tt.x,Tt.y,Tt.width,Tt.height),$t.free(Pt)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),ee=E.measuredBounds,ne=ee.width,ae=ee.height,ue=a.padding;ee=ue.left,ue=ue.top;var ge=ee-x.x,ye=ue-x.y;for(E.arrange(ge,ye,ne,ae),ne=$t.allocAt(0,0,ne,ae),p0(E,ne,!1),ae=0;ae<b;ae++){var Le=y[ae];if(Le!==E){ge=Le.measuredBounds;var ze=ge.width,We=ge.height;ye=Le.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ai);var Je=Le.alignmentFocus;if(Je.Xb()&&(Je=ai),ge=null,Le instanceof wn&&Le.$e!==""&&(ge=Le.fb(Le.$e),ge===Le&&(ge=null)),ge!==null){var it=ge.actualBounds;for(Je=lt.allocAt(it.x+(Je.x*it.width-Je.offsetX),it.y+(Je.y*it.height-Je.offsetY)),ge=ge.panel;ge!==Le;)ge.transform.Ga(Je),ge=ge.panel;ge=ye.x*ne.width+ye.offsetX-Je.x,ye=ye.y*ne.height+ye.offsetY-Je.y,lt.free(Je)}else ge=ye.x*ne.width+ye.offsetX-(Je.x*ze+Je.offsetX),ye=ye.y*ne.height+ye.offsetY-(Je.y*We+Je.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Le.visible&&Le.arrange(ee+ge,ue+ye,ze,We)}}$t.free(ne)};function p0(a,y,x){var b=null;if(a instanceof wn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function mm(){this.xa="Base"}Kt(mm,Go),mm.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=b.length,ue=a.Pb(),ge=ue.margin,ye=y,Le=x,ze=ge.right+ge.left,We=ge.top+ge.bottom;ue.measure(y,x,ee,ne),ge=ue.measuredBounds;var Je=0,it=null;ue instanceof Hr&&(it=ue,Je=it.strokeWidth*it.scale);var Tt=Math.max(ge.width+ze,0);ge=Math.max(ge.height+We,0);var Pt=y0(ue),Nt=Pt.x*Tt+Pt.offsetX;Pt=Pt.y*ge+Pt.offsetY;var At=S0(ue),Bt=At.x*Tt+At.offsetX;for(At=At.y*ge+At.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(Nt-Bt)-Je,0)),isFinite(x)&&(Le=Math.max(Math.abs(Pt-At)-Je,0)),Je=mn.alloc(),Je.h(0,0),a=Vu(a),At=0;At<ae;At++)Pt=b[At],Pt===ue||!Pt.visible&&Pt!==a||(ge=Pt.margin,Tt=ge.right+ge.left,Nt=ge.top+ge.bottom,Pt.measure(ye,Le,0,0),ge=Pt.measuredBounds,Tt=Math.max(ge.width+Tt,0),ge=Math.max(ge.height+Nt,0),Je.h(Math.max(Tt,Je.width),Math.max(ge,Je.height)));if(ae===1)E.width=Tt,E.height=ge,mn.free(Je);else{switch(Pt=y0(ue),At=S0(ue),ae=b=0,At.x!==Pt.x&&At.y!==Pt.y&&(b=Je.width/Math.abs(At.x-Pt.x),ae=Je.height/Math.abs(At.y-Pt.y)),mn.free(Je),Je=0,it!==null&&(Je=it.strokeWidth*it.scale,E0(it)===hr&&(b=ae=Math.max(b,ae))),b+=Math.abs(Pt.offsetX)+Math.abs(At.offsetX)+Je,ae+=Math.abs(Pt.offsetY)+Math.abs(At.offsetY)+Je,it=ue.stretch,it===Rr&&(it=ls(ue,!1)),it){case gn:ne=ee=0;break;case yn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case mr:isFinite(y)&&(b=y),ne=0;break;case Er:ee=0,isFinite(x)&&(ae=x)}ue.Uj(),ue.measure(b,ae,ee,ne),E.width=ue.measuredBounds.width+ze,E.height=ue.measuredBounds.height+We}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,ee=$t.alloc();ee.h(0,0,1,1);var ne=b.margin,ae=ne.left;ne=ne.top;var ue=a.padding,ge=ue.left;ue=ue.top,b.arrange(ge+ae,ue+ne,E.width,E.height);var ye=y0(b),Le=S0(b),ze=ye.y*E.height+ye.offsetY,We=Le.x*E.width+Le.offsetX;for(Le=Le.y*E.height+Le.offsetY,ee.x=ye.x*E.width+ye.offsetX,ee.y=ze,xi(ee,We,Le,0,0),ee.x+=ae+ge,ee.y+=ne+ue,E=0;E<x;E++)ae=y[E],ae!==b&&(ge=ae.measuredBounds,ne=ae.margin,ue=Math.max(ge.width+ne.right+ne.left,0),ye=Math.max(ge.height+ne.top+ne.bottom,0),ze=ae.alignment,ze.Xb()&&(ze=a.defaultAlignment),ze.sb()||(ze=ai),ue=ee.width*ze.x+ze.offsetX-ue*ze.x+ne.left+ee.x,ne=ee.height*ze.y+ze.offsetY-ye*ze.y+ne.top+ee.y,ae.visible&&(qi(ee.x,ee.y,ee.width,ee.height,ue,ne,ge.width,ge.height)?ae.arrange(ue,ne,ge.width,ge.height):ae.arrange(ue,ne,ge.width,ge.height,new $t(ee.x,ee.y,ee.width,ee.height))));$t.free(ee)};function vm(){this.xa="Base",this.name="Table"}Kt(vm,Go),vm.prototype.measure=function(a,y,x,b,E){for(var ee=b.length,ne=er(),ae=er(),ue=0;ue<ee;ue++){var ge=b[ue],ye=ge instanceof wn?ge:null;if(ye!==null&&xh(ye)&&ge.visible){ae.push(ye);for(var Le=ye.O.s,ze=Le.length,We=0;We<ze;We++){var Je=Le[We];ye.type===wn.TableRow?Je.row=ge.row:ye.type===wn.TableColumn&&(Je.column=ge.column),ne.push(Je)}}else ne.push(ge)}ee=ne.length,ee===0&&(a.Fb(0),a.Eb(0));for(var it=[],Tt=0;Tt<ee;Tt++){var Pt=ne[Tt];Pt.visible&&(Bo(Pt,!0),pu(Pt,!0),it[Pt.row]||(it[Pt.row]=[]),it[Pt.row][Pt.column]||(it[Pt.row][Pt.column]=[]),it[Pt.row][Pt.column].push(Pt))}_n(ne);var Nt=er(),At=er(),Bt=er(),Rt={count:0},Zt={count:0},Fn=y,or=x,$n=a.rowDefs,Cn=a.colDefs,fn=null;ee=$n.length;for(var Br=0;Br<ee;Br++)fn=$n[Br],fn!==void 0&&(fn.actual=0);ee=Cn.length;for(var Nr=0;Nr<ee;Nr++)fn=Cn[Nr],fn!==void 0&&(fn.actual=0);for(var bi=it.length,Vi=0,Yo=0;Yo<bi;Yo++)it[Yo]&&(Vi=Math.max(Vi,it[Yo].length));var ta=Math.min(a.topIndex,bi-1),Ra=Math.min(a.leftIndex,Vi-1),Jo=0;bi=it.length;for(var Nh=Vu(a),Mo=0;Mo<bi;Mo++)if(it[Mo]){Vi=it[Mo].length;var Rl=a.Fb(Mo);Rl.actual=0;for(var _a=Rl.oc=0;_a<Vi;_a++)if(it[Mo][_a]){var Ah=a.Eb(_a);Nt[_a]===void 0&&(Ah.actual=0,Ah.oc=0,Nt[_a]=!0);for(var zs=it[Mo][_a],fl=zs.length,ks=0;ks<fl;ks++){var vs=zs[ks];if(vs.visible||vs===Nh){var mc=1<vs.rowSpan||1<vs.columnSpan;mc&&(Mo<ta||_a<Ra||At.push(vs));var _l=vs.margin,$d=_l.right+_l.left,Ts=_l.top+_l.bottom,za=Ol(vs,Rl,Ah,!1),Ng=vs.desiredSize,Vf=!isNaN(Ng.height),eu=!isNaN(Ng.width)&&Vf;if(mc||za===gn||eu||Mo<ta||_a<Ra||(Rt[_a]!==void 0||za!==yn&&za!==mr||(Rt[_a]=-1,Rt.count++),Zt[Mo]!==void 0||za!==yn&&za!==Er||(Zt[Mo]=-1,Zt.count++),Bt.push(vs)),vs.measure(1/0,1/0,0,0),!(Mo<ta||_a<Ra)){var ys=vs.measuredBounds,tf=Math.max(ys.width+$d,0),Ls=Math.max(ys.height+Ts,0);if(vs.rowSpan===1&&(za===gn||za===mr)){fn=a.Fb(Mo);var vc=fn.Wc();Jo=Math.max(Ls-fn.actual,0),Jo+vc>or&&(Jo=Math.max(or-vc,0));var zv=fn.oa===0;fn.oc=fn.oc+Jo,fn.actual=fn.oa+Jo,or=Math.max(or-(Jo+(zv?vc:0)),0)}if(vs.columnSpan===1&&(za===gn||za===Er)){fn=a.Eb(_a);var Ag=fn.Wc();Jo=Math.max(tf-fn.actual,0),Jo+Ag>Fn&&(Jo=Math.max(Fn-Ag,0));var Gy=fn.oa===0;fn.oc=fn.oc+Jo,fn.actual=fn.oa+Jo,Fn=Math.max(Fn-(Jo+(Gy?Ag:0)),0)}mc&&vs.Uj()}}}}}_n(Nt);var Eu=0,Yu=0;ee=a.columnCount;for(var Zf=0;Zf<ee;Zf++){var yc=Cn[Zf];yc!==void 0&&(Eu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Eu+=yc.Wc()))}ee=a.rowCount;for(var qd=0;qd<ee;qd++){var Sc=$n[qd];Sc!==void 0&&(Yu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Yu+=Sc.Wc()))}Fn=Math.max(y-Eu,0);var ku=or=Math.max(x-Yu,0),jh=Fn;ee=Bt.length;for(var Ss=0;Ss<ee;Ss++){var tu=Bt[Ss],Gv=a.Fb(tu.row),Ju=a.Eb(tu.column),ep=tu.measuredBounds,zl=tu.margin,nf=zl.right+zl.left,nu=zl.top+zl.bottom;Rt[tu.column]=Ju.oc===0&&Rt[tu.column]!==void 0?Math.max(ep.width+nf,Rt[tu.column]):null,Zt[tu.row]=Gv.oc===0&&Zt[tu.row]!==void 0?Math.max(ep.height+nu,Zt[tu.row]):null}var Xf=0,tp=0,kl;for(kl in Zt)kl!=="count"&&(Xf+=Zt[kl]);for(kl in Rt)kl!=="count"&&(tp+=Rt[kl]);for(var da=mn.alloc(),jg=0;jg<ee;jg++){var ns=Bt[jg];if(ns.visible||ns===Nh){var No=a.Fb(ns.row),rs=a.Eb(ns.column),Qu=0;isFinite(rs.width)?Qu=rs.width:(isFinite(Fn)&&Rt[ns.column]!==null?tp===0?Qu=rs.actual+Fn:Qu=Rt[ns.column]/tp*jh:Rt[ns.column]!==null?Qu=Fn:Qu=rs.actual||Fn,Qu=Math.max(0,Qu-rs.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(or)&&Zt[ns.row]!==null?Xf===0?Oh=No.actual+or:Oh=Zt[ns.row]/Xf*ku:Zt[ns.row]!==null?Oh=or:Oh=No.actual||or,Oh=Math.max(0,Oh-No.Wc())),da.h(Math.max(rs.minimum,Math.min(Qu,rs.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Ol(ns,No,rs,!1),za){case mr:da.height=Math.max(da.height,No.actual+or);break;case Er:da.width=Math.max(da.width,rs.actual+Fn)}var rf=ns.margin,Uy=rf.right+rf.left,Uv=rf.top+rf.bottom;ns.Uj(),ns.measure(da.width,da.height,rs.minimum,No.minimum);var np=ns.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+Uv,0);isFinite(Fn)&&(of=Math.min(of,da.width)),isFinite(or)&&(Yf=Math.min(Yf,da.height));var xs=0;xs=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),Jo=No.actual-xs,or=Math.max(or-Jo,0),Zt[ns.row]===null&&(ku=Math.max(ku-Jo,0)),xs=rs.actual,rs.actual=Math.max(rs.actual,of),rs.oc=Math.max(rs.oc,of),Jo=rs.actual-xs,Fn=Math.max(Fn-Jo,0),Rt[ns.column]===null&&(jh=Math.max(jh-Jo,0))}}_n(Bt);var $u=mn.alloc(),Gl=er(),tl=er();if(ee=At.length,ee!==0){for(var xc=0;xc<bi;xc++)if(it[xc]){Vi=it[xc].length;var rp=a.Fb(xc);Gl[xc]=rp.actual;for(var wc=0;wc<Vi;wc++)if(it[xc][wc]){var Hv=a.Eb(wc);tl[wc]=Hv.actual}}}for(var ip=0;ip<ee;ip++){var xo=At[ip];if(xo.visible||xo===Nh){var Tl=a.Fb(xo.row),dl=a.Eb(xo.column);switch(da.h(Math.max(dl.minimum,Math.min(y,dl.maximum)),Math.max(Tl.minimum,Math.min(x,Tl.maximum))),za=Ol(xo,Tl,dl,!1),za){case yn:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index])),Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]));break;case mr:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index]));break;case Er:Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]))}isFinite(dl.width)&&(da.width=dl.width),isFinite(Tl.height)&&(da.height=Tl.height),$u.h(0,0);for(var Wv=dl.minimum,Ms=Tl.minimum,Fh=1;Fh<xo.rowSpan&&!(xo.row+Fh>=a.rowCount);Fh++)fn=a.Fb(xo.row+Fh),Jo=0,Jo=za===yn||za===Er?Math.max(fn.minimum,Gl[xo.row+Fh]===0?fn.maximum:Math.min(Gl[xo.row+Fh],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),$u.height+=Jo,Ms+=fn.minimum;for(var pl=1;pl<xo.columnSpan&&!(xo.column+pl>=a.columnCount);pl++)fn=a.Eb(xo.column+pl),Jo=0,Jo=za===yn||za===mr?Math.max(fn.minimum,tl[xo.column+pl]===0?fn.maximum:Math.min(tl[xo.column+pl],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),$u.width+=Jo,Wv+=fn.minimum;da.width+=$u.width,da.height+=$u.height;var op=xo.margin,bc=op.right+op.left,Og=op.top+op.bottom;xo.measure(da.width,da.height,Wv,Ms);for(var ap=xo.measuredBounds,ru=Math.max(ap.width+bc,0),af=Math.max(ap.height+Og,0),Pc=0,sp=0;sp<xo.rowSpan&&!(xo.row+sp>=a.rowCount);sp++)fn=a.Fb(xo.row+sp),Pc+=fn.total||0;if(Pc<af){var Dh=af-Pc,Tu=af-Pc;if(xo.spanAllocation!==null)for(var Bh=xo.spanAllocation,qu=0;qu<xo.rowSpan&&!(0>=Dh)&&!(xo.row+qu>=a.rowCount);qu++){fn=a.Fb(xo.row+qu);var Ih=fn.oa||0,sf=Bh(xo,fn,Tu);fn.actual=Math.min(fn.maximum,Ih+sf),fn.oa!==Ih&&(Dh-=fn.oa-Ih)}for(;0<Dh;){var Ul=fn.oa||0;if(isNaN(fn.height)&&fn.maximum>Ul&&(fn.actual=Math.min(fn.maximum,Ul+Dh),fn.oa!==Ul&&(Dh-=fn.oa-Ul)),fn.index===0)break;fn=a.Fb(fn.index-1)}}for(var Jf=0,Rh=0;Rh<xo.columnSpan&&!(xo.column+Rh>=a.columnCount);Rh++)fn=a.Eb(xo.column+Rh),Jf+=fn.total||0;if(Jf<ru){var Qf=ru-Jf,Hy=ru-Jf;if(xo.spanAllocation!==null)for(var eh=xo.spanAllocation,lf=0;lf<xo.columnSpan&&!(0>=Qf)&&!(xo.column+lf>=a.columnCount);lf++){fn=a.Eb(xo.column+lf);var Fg=fn.oa||0,Wy=eh(xo,fn,Hy);fn.actual=Math.min(fn.maximum,Fg+Wy),fn.oa!==Fg&&(Qf-=fn.oa-Fg)}for(;0<Qf;){var Kv=fn.oa||0;if(isNaN(fn.width)&&fn.maximum>Kv&&(fn.actual=Math.min(fn.maximum,Kv+Qf),fn.oa!==Kv&&(Qf-=fn.oa-Kv)),fn.index===0)break;fn=a.Eb(fn.index-1)}}}}_n(At),mn.free($u),mn.free(da),Gl!==void 0&&_n(Gl),tl!==void 0&&_n(tl);var $f=0,qf=0,Vv=a.desiredSize,gx=a.maxSize;za=ls(a,!0);var Dg=Yu=Eu=0,Bg=0;ee=a.columnCount;for(var Zv=0;Zv<ee;Zv++)Cn[Zv]!==void 0&&(fn=a.Eb(Zv),isFinite(fn.width)?(Dg+=fn.width,Dg+=fn.Wc()):Tm(fn)===Zp?(Dg+=fn.oa,Dg+=fn.Wc()):fn.oa!==0&&(Eu+=fn.oa,Eu+=fn.Wc()));isFinite(Vv.width)?$f=Math.min(Vv.width,gx.width):$f=za!==gn&&isFinite(y)?y:Eu,$f=Math.max($f,a.minSize.width),$f=Math.max($f-Dg,0);for(var $x=Eu===0?1:Math.max($f/Eu,1),Xv=0;Xv<ee;Xv++)Cn[Xv]!==void 0&&(fn=a.Eb(Xv),isFinite(fn.width)||Tm(fn)===Zp||(fn.actual=fn.oa*$x),fn.position=E.width,fn.oa!==0&&(E.width+=fn.oa,E.width+=fn.Wc()));ee=a.rowCount;for(var Yv=0;Yv<ee;Yv++)$n[Yv]!==void 0&&(fn=a.Fb(Yv),isFinite(fn.height)?(Bg+=fn.height,Bg+=fn.Wc()):Tm(fn)===Zp?(Bg+=fn.oa,Bg+=fn.Wc()):fn.oa!==0&&(Yu+=fn.oa,Yu+=fn.Wc()));isFinite(Vv.height)?qf=Math.min(Vv.height,gx.height):qf=za!==gn&&isFinite(x)?x:Yu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Yu===0?1:Math.max(qf/Yu,1),Jv=0;Jv<ee;Jv++)$n[Jv]!==void 0&&(fn=a.Fb(Jv),isFinite(fn.height)||Tm(fn)===Zp||(fn.actual=fn.oa*qx),fn.position=E.height,fn.oa!==0&&(E.height+=fn.oa,E.height+=fn.Wc()));ee=ae.length;for(var Ky=0;Ky<ee;Ky++){var Ig=ae[Ky],Vy=0,Zy=0;Ig.type===wn.TableRow?(Vy=E.width,fn=a.Fb(Ig.row),Zy=fn.actual):(fn=a.Eb(Ig.column),Vy=fn.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Bo(Ig,!1)}_n(ae),a.inRowsCols=it},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,ee=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var ae,ue,ge=ne.length,ye=0,Le=0;Le<ge;Le++)ne[Le]&&(ye=Math.max(ye,ne[Le].length));ue=a.rowDefs,ae=a.colDefs;var ze=Le=0,We=Math.min(a.topIndex,ge-1);if(0<ue.length){for(;We!==ge&&(ue[We]===void 0||ue[We].oa===0);)We++;We=Math.max(Math.min(We,ge-1),0),Le=-ue[We].position}var Je=Math.min(a.leftIndex,ye-1);if(0<ae.length){for(;Je!==ye&&(ae[Je]===void 0||ae[Je].oa===0);)Je++;Je=Math.max(Math.min(Je,ye-1),0),ze=-ae[Je].position}for(var it=0,Tt=0;it!==ge&&ue[it]===void 0;)it++;for(;Tt!==ge&&ae[Tt]===void 0;)Tt++;ye=a.part,a.Fb(it),a.Eb(Tt);for(var Pt=0;Pt<y.length;Pt++){var Nt=y[Pt];if(Nt instanceof wn&&Nt.visible&&xh(Nt)){if(Nt.type===wn.TableRow){ae=a.Fb(Nt.row);var At=a.Eb(Tt)}else ae=a.Fb(it),At=a.Eb(Nt.column);ue=ae.position+Le+E,ae.oa!==0&&(ue+=ae.Io(Math.max(it,We))),ae=At.position+ze+ee,At.oa!==0&&(ae+=At.Io(Math.max(Tt,Je))),At=Nt.measuredBounds,Nt.Uk(),Nt.actualBounds.ka();var Bt=Nt.actualBounds,Rt=$t.allocAt(Bt.x,Bt.y,Bt.width,Bt.height);Bt.x=Nt.type===wn.TableRow?ee:ae,Bt.y=Nt.type===wn.TableColumn?E:ue,Bt.width=At.width,Bt.height=At.height,Nt.actualBounds.freeze(),pu(Nt,!1),Pi(Rt,Bt)||ye===null||(ye.oh(),Nt.Pn(ye)),$t.free(Rt)}}for(Pt=mn.alloc(),Nt=0;Nt<ge;Nt++)if(ne[Nt]){for(ye=ne[Nt].length,At=a.Fb(Nt),ue=At.position+Le+E,At.oa!==0&&(ue+=At.Io(Math.max(it,We))),Bt=0;Bt<ye;Bt++)if(ne[Nt][Bt]){Rt=a.Eb(Bt),ae=Rt.position+ze+ee,Rt.oa!==0&&(ae+=Rt.Io(Math.max(Tt,Je)));for(var Zt=ne[Nt][Bt],Fn=Zt.length,or=0;or<Fn;or++){var $n=Zt[or],Cn=$n.measuredBounds;Pt.h(0,0);for(var fn=1;fn<$n.rowSpan&&!(Nt+fn>=a.rowCount);fn++){var Br=a.Fb(Nt+fn);Br.oa!==0&&(Pt.height+=Br.total)}for(fn=1;fn<$n.columnSpan&&!(Bt+fn>=a.columnCount);fn++)Br=a.Eb(Bt+fn),Br.oa!==0&&(Pt.width+=Br.total);var Nr=Rt.oa+Pt.width,bi=At.oa+Pt.height;fn=ae,Br=ue;var Vi=Nr,Yo=bi,ta=ae,Ra=ue,Jo=Nr,Nh=bi;ae+Nr>x.width&&(Jo=Math.max(x.width-ae,0)),ue+bi>x.height&&(Nh=Math.max(x.height-ue,0));var Mo=$n.alignment;if(Mo.Xb()){Mo=a.defaultAlignment,Mo.sb()||(Mo=ai);var Rl=Mo.x,_a=Mo.y,Ah=Mo.offsetX;Mo=Mo.offsetY;var zs=Rt.alignment,fl=At.alignment;zs.sb()&&(Rl=zs.x,Ah=zs.offsetX),fl.sb()&&(_a=fl.y,Mo=fl.offsetY)}else Rl=Mo.x,_a=Mo.y,Ah=Mo.offsetX,Mo=Mo.offsetY;(isNaN(Rl)||isNaN(_a))&&(_a=Rl=.5,Mo=Ah=0),zs=Cn.width,fl=Cn.height;var ks=$n.margin,vs=ks.left+ks.right,mc=ks.top+ks.bottom,_l=Ol($n,At,Rt,!1);!isNaN($n.desiredSize.width)||_l!==yn&&_l!==mr||(zs=Math.max(Nr-vs,0)),!isNaN($n.desiredSize.height)||_l!==yn&&_l!==Er||(fl=Math.max(bi-mc,0)),Nr=$n.maxSize,bi=$n.minSize,zs=Math.min(Nr.width,zs),fl=Math.min(Nr.height,fl),zs=Math.max(bi.width,zs),fl=Math.max(bi.height,fl),Nr=fl+mc,fn+=Vi*Rl-(zs+vs)*Rl+Ah+ks.left,Br+=Yo*_a-Nr*_a+Mo+ks.top,$n.visible&&(qi(ta,Ra,Jo,Nh,fn,Br,Cn.width,Cn.height)?$n.arrange(fn,Br,zs,fl):$n.arrange(fn,Br,zs,fl,new $t(ta,Ra,Jo,Nh)))}}}for(mn.free(Pt),a=0;a<b;a++)x=y[a],ee=x instanceof wn?x:null,ee!==null&&xh(ee)&&(ee=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,ee.width,ee.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}Kt(ym,Go),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Kt(Sm,Go),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Kt(xm,Go),xm.prototype.measure=function(a,y,x,b,E,ee,ne){1<b.length&&jt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,ee,ne);var ae=b.measuredBounds,ue=b.margin,ge=ue.right+ue.left;if(ue=ue.top+ue.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Le=ae.width;ae=ae.height;var ze=Math.max(y-ge,0),We=Math.max(x-ue,0),Je=1;a.viewboxStretch===hr?Le!==0&&ae!==0&&(Je=Math.min(ze/Le,We/ae)):Le!==0&&ae!==0&&(Je=Math.max(ze/Le,We/ae)),Je===0&&(Je=1e-4),b.Ca*=Je,ye!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,ee,ne))}ae=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ae.width+ge,0),E.height=isFinite(x)?x:Math.max(ae.height+ue,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,ee=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=ai),y.arrange(x.width*ne.x-ee*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function Wp(){this.xa="Base"}Kt(Wp,Go),Wp.prototype.measure=function(){},Wp.prototype.arrange=function(){},Wp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var ee=a.naturalBounds,ne=a.actualBounds,ae=ee.width,ue=ee.height,ge=Math.ceil(ae/E),ye=Math.ceil(ue/b),Le=a.gridOrigin,ze=Le.x;Le=Le.y,y.save(),y.beginPath(),y.rect(0,0,ae,ue),y.clip(),y.Se();for(var We=[],Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var Pt=Je[Tt],Nt=[];if(We.push(Nt),Pt.visible){var At=Pt.interval;if(!(0>At)){Pt=m0(Pt.figure);for(var Bt=0;Bt<it;Bt++)if(Bt!==Tt){var Rt=Je[Bt];Rt.visible&&m0(Rt.figure)===Pt&&(Rt=Rt.interval,Rt>At&&Nt.push(Rt))}}}}for(Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var Zt=Je[Tt];if(Zt.visible&&(Nt=Zt.interval||1,Pt=Math.abs(Nt),!(2>E*Pt*x))){if(At=Zt.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=Pt-Math.min(-At,Pt)),At=Math.round(At%Pt),Pt=Zt.opacity,Bt=1,Pt!==1){if(Pt===0)continue;Bt=y.globalAlpha,y.globalAlpha=Bt*Pt}Rt=We[Tt];var Fn=!1,or=Zt.strokeDashArray;if(or!==null&&(Fn=!0,y.js(or,Zt.strokeDashOffset)),Zt.figure==="LineV"&&Zt.stroke!==null&&0<Zt.strokeWidth){for(y.lineWidth=Zt.strokeWidth,yo(a,y,Zt.stroke,!1,!1,ee,ne),y.beginPath(),or=Zt=Math.floor((ze-E)/E);or<=Zt+ge;or++){var $n=or*E+ze;0<=$n&&$n<=ae&&wm(or,Nt,At,Rt)&&(y.moveTo($n,0),y.lineTo($n,ue))}y.stroke(),y.Se()}else if(Zt.figure==="LineH"&&Zt.stroke!==null&&0<Zt.strokeWidth){for(y.lineWidth=Zt.strokeWidth,yo(a,y,Zt.stroke,!1,!1,ee,ne),y.beginPath(),or=Zt=Math.floor((Le-b)/b);or<=Zt+ye;or++)$n=or*b+Le,0<=$n&&$n<=ue&&wm(or,Nt,At,Rt)&&(y.moveTo(0,$n),y.lineTo(ae,$n));y.stroke(),y.Se()}else if(Zt.figure==="BarV"&&Zt.fill!==null)for(yo(a,y,Zt.fill,!0,!1,ee,ne),Zt=Zt.width,isNaN(Zt)&&(Zt=E),$n=or=Math.floor((ze-E)/E);$n<=or+ge;$n++){var Cn=$n*E+ze;0<=Cn+Zt&&Cn<=ae&&wm($n,Nt,At,Rt)&&y.fillRect(Cn,0,Zt,ue)}else if(Zt.figure==="BarH"&&Zt.fill!==null)for(yo(a,y,Zt.fill,!0,!1,ee,ne),Zt=Zt.height,isNaN(Zt)&&(Zt=b),$n=or=Math.floor((Le-b)/b);$n<=or+ye;$n++)Cn=$n*b+Le,0<=Cn+Zt&&Cn<=ue&&wm($n,Nt,At,Rt)&&y.fillRect(0,Cn,ae,Zt);Fn&&y.fs(),Pt!==1&&(y.globalAlpha=Bt)}}y.restore(),y.Vc(!1)};function wm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function bm(){this.xa="Base"}Kt(bm,Go),bm.prototype.measure=function(a,y,x,b,E){var ee=b.length;if(a instanceof mi||a instanceof En){var ne=null,ae=null;if(a instanceof En&&(ne=a),a instanceof mi&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof En){var ue=ne;if(ee===0)vi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof mi?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=ue.points,Le=ne.pointsCount;ae!==null?ae.Ul(!1):ne!==null&&ne.Ul(!1),ae=y.width;var ze=y.height,We=a.j;if(We.length=0,ge!==null){i1(a,ae,ze,ge);var Je=ge.measuredBounds;x.ed(Je),We.push(Je)}Je=jr.alloc();for(var it=lt.alloc(),Tt=lt.alloc(),Pt=0;Pt<ee;Pt++){var Nt=b[Pt];if(Nt!==ge)if(Nt.isPanelMain&&Nt instanceof Hr){i1(a,ae,ze,Nt);var At=Nt.measuredBounds;x.ed(At),We.push(At)}else if(2>Le)Nt.measure(1/0,1/0,0,0),At=Nt.measuredBounds,x.ed(At),We.push(At);else{var Bt=Nt.segmentIndex,Rt=Nt.segmentFraction,Zt=Nt.alignmentFocus;Zt.Mc()&&(Zt=ai);var Fn=Nt.segmentOrientation,or=Nt.segmentOffset;if(isNaN(Bt)){var $n=ue.ua;At=er(),$n.Qu(Rt,At);var Cn=lt.allocAt(At[0],At[1]);if(Cn.add(ue.i(0)),$n.type===Tn.j?Cn.offset(-$n.startX,-$n.startY):($n=$n.figures.first(),$n!==null&&Cn.offset(-$n.startX,-$n.startY)),$n=At[2],Fn!==Qa){var fn=ue.computeAngle(Nt,Fn,$n);Nt.Kb=fn}fn=Cn.x-y.x;var Br=Cn.y-y.y;lt.free(Cn),_n(At)}else if(Bt<-Le||Bt>=Le)At=lt.alloc(),ue.vg(),ue.computeMidPoint(At),$n=ue.midAngle,Fn!==Qa&&(fn=ue.computeAngle(Nt,Fn,$n),Nt.Kb=fn),fn=At.x-y.x,Br=At.y-y.y,lt.free(At);else{if(fn=0,0<=Bt?(Br=ye.M(Bt),At=Bt<Le-1?ye.M(Bt+1):Br):(fn=Le+Bt,Br=ye.M(fn),At=0<fn?ye.M(fn-1):Br),Br.Xa(At)){0<=Bt?($n=0<Bt?ye.M(Bt-1):Br,fn=Bt<Le-2?ye.M(Bt+2):At):($n=fn<Le-1?ye.M(fn+1):Br,fn=1<fn?ye.M(fn-2):At),Cn=$n.Bf(Br);var Nr=At.Bf(fn);$n=Cn>Nr+10?0<=Bt?$n.ab(Br):Br.ab($n):Nr>Cn+10?0<=Bt?At.ab(fn):fn.ab(At):0<=Bt?$n.ab(fn):fn.ab($n)}else $n=0<=Bt?Br.ab(At):At.ab(Br);Fn!==Qa&&(fn=ue.computeAngle(Nt,Fn,$n),Nt.Kb=fn),fn=Br.x+(At.x-Br.x)*Rt-y.x,Br=Br.y+(At.y-Br.y)*Rt-y.y}Nt.measure(1/0,1/0,0,0),At=Nt.measuredBounds,Cn=Nt.naturalBounds;var bi=0;Nt instanceof Hr&&(bi=Nt.strokeWidth),Nr=Cn.width+bi;var Vi=Cn.height+bi;Je.reset(),Je.translate(-At.x,-At.y),Je.scale(Nt.scale,Nt.scale),Je.rotate(Fn===Qa?Nt.angle:$n,Nr/2,Vi/2),Fn!==rg&&Fn!==og||Je.rotate(90,Nr/2,Vi/2),Fn!==ig&&Fn!==ag||Je.rotate(-90,Nr/2,Vi/2),Fn===$m&&(45<$n&&135>$n||225<$n&&315>$n)&&Je.rotate(-$n,Nr/2,Vi/2),Cn=new $t(0,0,Nr,Vi),it.xi(Cn,Zt),Je.Ga(it),Zt=-it.x+bi/2*Nt.scale,Nt=-it.y+bi/2*Nt.scale,Tt.assign(or),bi=isNaN(or.x);var Yo=isNaN(or.y);if(bi||Yo){Nr=Nr/2+3,Vi=Vi/2+3;var ta=45<=$n&&135>=$n,Ra=225<=$n&&315>=$n;Fn===Qa&&(ta||Ra)?(Tt.x=Yo?Nr:or.y,Tt.y=bi?Vi:or.x,ta?0<=Bt||isNaN(Bt)&&.5>Rt||!bi||(Tt.y=-Vi):Ra&&((0<=Bt||isNaN(Bt)&&.5>Rt)&&bi&&(Tt.y=-Vi),Yo&&(Tt.x=-Nr))):(bi&&(Tt.x=0<=Bt||isNaN(Bt)&&.5>Rt?Nr:-Nr),Yo&&(Tt.y=-Vi),Tt.rotate($n))}else Tt.rotate($n);fn+=Tt.x,Br+=Tt.y,Cn.set(At),Cn.h(fn+Zt,Br+Nt,At.width,At.height),We.push(Cn),x.ed(Cn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),vi(E,x.width||0,x.height||0),jr.free(Je),lt.free(it),lt.free(Tt)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof mi||a instanceof En){var b=a,E=null;a instanceof mi&&(E=a,b=E.adornedPart);var ee=a instanceof mi?null:b.path,ne=a.j;if(ne.length!==0){var ae=0;if(ee!==null&&ae<ne.length){var ue=ne[ae];ae++,ee.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}for(ue=0;ue<x;ue++){var ge=y[ue];if(ge!==ee&&ae<ne.length){var ye=ne[ae];ae++,ge.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof En)for(ee=a.labelNodes;ee.next();){var Le=a;ne=ee.value,ae=ne.segmentIndex,ue=ne.segmentFraction;var ze=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(ae)){var We=Le.ua,Je=er();We.Qu(ue,Je);var it=lt.allocAt(Je[0],Je[1]);it.add(Le.i(0)),We.type===Tn.j||(We=We.figures.first()),it.offset(-We.startX,-We.startY),We=Je[2],ge!==Qa&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=it.x;var Tt=it.y;lt.free(it),_n(Je)}else if(ae<-x||ae>=x)Je=lt.alloc(),We=Le,Tt=Je,We.vg(),We.computeMidPoint(Tt),We=Le.midAngle,ge!==Qa&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=Je.x,Tt=Je.y,lt.free(Je);else{if(it=0,0<=ae?(Je=y.s[ae],Tt=ae<x-1?y.s[ae+1]:Je):(it=x+ae,Je=y.s[it],Tt=0<it?y.s[it-1]:Je),Je.Xa(Tt)){0<=ae?(We=0<ae?y.s[ae-1]:Je,it=ae<x-2?y.s[ae+2]:Tt):(We=it<x-1?y.s[it+1]:Je,it=1<it?y.s[it-2]:Tt);var Pt=We.Bf(Je),Nt=Tt.Bf(it);We=Pt>Nt+10?0<=ae?We.ab(Je):Je.ab(We):Nt>Pt+10?0<=ae?Tt.ab(it):it.ab(Tt):0<=ae?We.ab(it):it.ab(We)}else We=0<=ae?Je.ab(Tt):Tt.ab(Je);ge!==Qa&&(Le=Le.computeAngle(ne,ge,We),ne.angle=Le),Le=Je.x+(Tt.x-Je.x)*ue,Tt=Je.y+(Tt.y-Je.y)*ue}if(ze.ys())ne.location=new lt(Le,Tt);else{ze.Mc()&&(ze=ai),Je=jr.alloc(),Je.reset(),Je.scale(ne.scale,ne.scale),Je.rotate(ne.angle,0,0);var At=ne.naturalBounds;it=$t.allocAt(0,0,At.width,At.height),Pt=lt.alloc(),Pt.xi(it,ze),Je.Ga(Pt),ze=-Pt.x,Nt=-Pt.y;var Bt=At.width,Rt=At.height;At=lt.alloc(),At.assign(ye);var Zt=isNaN(ye.x),Fn=isNaN(ye.y);if(Zt||Fn){Bt=Bt/2+3,Rt=Rt/2+3;var or=45<=We&&135>=We,$n=225<=We&&315>=We;ge===Qa&&(or||$n)?(At.x=Fn?Bt:ye.y,At.y=Zt?Rt:ye.x,or?0<=ae||isNaN(ae)&&.5>ue||!Zt||(At.y=-Rt):$n&&((0<=ae||isNaN(ae)&&.5>ue)&&Zt&&(At.y=-Rt),Fn&&(At.x=-Bt))):(Zt&&(At.x=0<=ae||isNaN(ae)&&.5>ue?Bt:-Bt),Fn&&(At.y=-Rt),At.rotate(We))}else At.rotate(We);Le+=At.x,Tt+=At.y,Je.pp(it),ze+=it.x,Nt+=it.y,ae=lt.allocAt(Le+ze,Tt+Nt),ne.move(ae),lt.free(ae),lt.free(At),lt.free(Pt),$t.free(it),jr.free(Je)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),lt.free(b)}};function i1(a,y,x,b){if(Bs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof mi&&a.type===wn.Link&&a.adornedObject instanceof Hr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof En&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof mi&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Bo(b,!1)}}function Kp(){this.xa="Base"}Kt(Kp,Go),Kp.prototype.measure=function(a,y,x,b,E,ee,ne){var ae=a.Pb();a.graduatedBounds=[];var ue=ae.margin,ge=ue.right+ue.left,ye=ue.top+ue.bottom;ae.measure(y,x,ee,ne);var Le=ae.measuredBounds,ze=new $t(-ue.left,-ue.top,Math.max(Le.width+ge,0),Math.max(Le.height+ye,0));a.graduatedBounds.push(ze),E.assign(ze);for(var We=ae.geometry,Je=ae.strokeWidth,it=We.flattenedSegments,Tt=We.flattenedLengths,Pt=We.flattenedTotalLength,Nt=it.length,At=0,Bt=0,Rt=er(),Zt=0;Zt<Nt;Zt++){var Fn=it[Zt],or=[];Bt=At=0;for(var $n=Fn.length,Cn=0;Cn<$n;Cn+=2){var fn=Fn[Cn],Br=Fn[Cn+1];if(Cn!==0){var Nr=180*Math.atan2(Br-Bt,fn-At)/Math.PI;0>Nr&&(Nr+=360),or.push(Nr)}At=fn,Bt=Br}Rt.push(or)}if(a.graduatedIntervals===null){for(var bi=[],Vi=a.O.s,Yo=Vi.length,ta=0;ta<Yo;ta++){var Ra=Vi[ta],Jo=[];if(bi.push(Jo),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Mo=0;Mo<Yo;Mo++)if(Mo!==ta){var Rl=Vi[Mo];if(Rl.visible&&Ra.constructor===Rl.constructor){var _a=Rl.interval;_a>Nh&&Jo.push(_a)}}}}}a.graduatedIntervals=bi}var Ah=a.graduatedIntervals,zs=a.O.s,fl=zs.length,ks=0,vs=0,mc=Pt;a.graduatedMarks=[];for(var _l,$d=0;$d<fl;$d++){var Ts=zs[$d];if(_l=[],Ts.visible&&Ts!==ae){var za=Math.abs(Ts.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*Pt/a.graduatedRange&&Ts.graduatedSkip===null)){var Vf=Tt[0][0],eu=0,ys=0;vs=Pt*Ts.graduatedStart-1e-4,mc=Pt*Ts.graduatedEnd+1e-4;var tf=Ng*za,Ls=a.graduatedTickBase;if(Ls<a.graduatedMin){var vc=(a.graduatedMin-Ls)/tf;vc=vc%1===0?vc:Math.floor(vc+1),Ls+=vc*tf}else Ls>a.graduatedMin+tf&&(Ls-=Math.floor((Ls-a.graduatedMin)/tf)*tf);for(var zv=Ah[$d],Ag=Ls,Gy=1e-6*a.graduatedMax,Eu=1;Ls<=a.graduatedMax+Gy;Eu++){e:{for(var Yu=zv.length,Zf=0;Zf<Yu;Zf++){var yc=(Ls-a.graduatedTickBase)%(zv[Zf]*a.graduatedTickUnit),qd=1e-6*a.graduatedTickUnit;if(yc<qd&&yc>-qd){var Sc=!1;break e}}Sc=!0}if(Sc&&(Ls>a.graduatedMax&&(Ls=a.graduatedMax),Ts.graduatedSkip===null||Ts instanceof Zi&&!Ts.graduatedSkip(Ls,Ts)||Ts instanceof Hr&&!Ts.graduatedSkip(Ls,Ts))&&(ks=(Ls-a.graduatedMin)*Pt/a.graduatedRange,ks>Pt&&(ks=Pt),vs<=ks&&ks<=mc)){for(var ku=Rt[eu][ys],jh=Tt[eu][ys];eu<Tt.length;){for(;ks>Vf&&ys<Tt[eu].length-1;)ys++,ku=Rt[eu][ys],jh=Tt[eu][ys],Vf+=jh;if(ks<=Vf)break;eu++,ys=0,ku=Rt[eu][ys],jh=Tt[eu][ys],Vf+=jh}var Ss=it[eu],tu=Ss[2*ys],Gv=Ss[2*ys+1],Ju=(ks-(Vf-jh))/jh,ep=new lt(tu+(Ss[2*ys+2]-tu)*Ju+Je/2-We.bounds.x,Gv+(Ss[2*ys+3]-Gv)*Ju+Je/2-We.bounds.y);ep.scale(ae.scale,ae.scale);e:{var zl=ku,nf=Rt[eu];if(!(.5005>Ju&&.4995<Ju)){var nu=zl;if(.5>Ju?0<ys?nu=nf[ys-1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[nf.length-1]):.5<Ju&&(ys+1<nf.length?nu=nf[ys+1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[0])),zl!==nu){var Xf=Math.abs(zl-nu);if(180<Xf&&(zl<nu?zl+=360:nu+=360,Xf=Math.abs(zl-nu)),5e-4>Ju||.9995<Ju){ku=(zl+nu)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-Ju);ku=(zl*tp+nu*(1-tp))%360;break e}}}ku=zl}if(Ts instanceof Zi){var kl="";Ts.graduatedFunction!==null?(kl=Ts.graduatedFunction(Ls,Ts),kl=kl!=null?kl.toString():""):kl=(+Ls.toFixed(2)).toString(),kl!==""&&_l.push({$l:ep,angle:ku,text:kl})}else _l.push({$l:ep,angle:ku})}Ls=Ag+Eu*tf}}}a.graduatedMarks.push(_l)}_n(Rt);var da=a.graduatedMarks;if(da!==null)for(var jg=b.length,ns=0;ns<jg;ns++){var No=b[ns],rs=da[ns];if(No.visible&&No!==ae&&rs.length!==0){if(No instanceof Hr){var Qu=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=co);var Uy=No.angle;No.Kb=0,No.measure(1/0,1/0,0,0),No.Kb=Uy;var Uv=No.measuredBounds,np=Uv.width,of=Uv.height,Yf=$t.allocAt(0,0,np,of),xs=lt.alloc();xs.xi(Yf,rf),$t.free(Yf);for(var $u=-xs.x,Gl=-xs.y,tl=new $t,xc=rs.length,rp=0;rp<xc;rp++)for(var wc=rs[rp],Hv=wc.$l.x,ip=wc.$l.y,xo=wc.angle,Tl=0;4>Tl;Tl++){switch(Tl){case 0:xs.h($u,Gl);break;case 1:xs.h($u+np,Gl);break;case 2:xs.h($u,Gl+of);break;case 3:xs.h($u+np,Gl+of)}xs.rotate(xo+No.angle),xs.offset(Hv,ip),rp===0&&Tl===0?tl.h(xs.x,xs.y,0,0):tl.Ye(xs),xs.offset(-Hv,-ip),xs.rotate(-xo-No.angle)}lt.free(xs),Qu.graduatedBounds!==null&&Qu.graduatedBounds.push(tl),xi(Oh,tl.x,tl.y,tl.width,tl.height)}else if(No instanceof Zi){var dl=a,Wv=E;dl.temporaryTextBlock===null&&(dl.temporaryTextBlock=new Zi);var Ms=dl.temporaryTextBlock;S1(Ms,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=co);for(var pl=No.segmentOrientation,op=No.segmentOffset,bc=new $t,Og=0,ap=0,ru=0,af=0,Pc=0,sp=rs.length,Dh=0;Dh<sp;Dh++){var Tu=rs[Dh];Og=Tu.$l.x,ap=Tu.$l.y,ru=Tu.angle,Pc=af=No.angle,pl!==Qa&&(Pc=pl===ng||pl===Qm?ru+No.angle:ru,af=En.computeAngle(pl,Pc)),Ms.Kb=af,Ms.text=Tu.text||"",Ms.measure(1/0,1/0,0,0);var Bh=Ms.measuredBounds,qu=Ms.naturalBounds,Ih=qu.width,sf=qu.height,Ul=jr.alloc();Ul.reset(),Ul.translate(-Bh.x,-Bh.y),Ul.scale(Ms.scale,Ms.scale),Ul.rotate(Pc,Ih/2,sf/2),pl!==rg&&pl!==og||Ul.rotate(90,Ih/2,sf/2),pl!==ig&&pl!==ag||Ul.rotate(-90,Ih/2,sf/2),pl===$m&&(45<ru&&135>ru||225<ru&&315>ru)&&Ul.rotate(-ru,Ih/2,sf/2);var Jf=$t.allocAt(0,0,Ih,sf),Rh=lt.alloc();Rh.xi(Jf,Fh),Ul.Ga(Rh);var Qf=-Rh.x,Hy=-Rh.y,eh=lt.alloc();eh.assign(op),isNaN(eh.x)&&(eh.x=Ih/2+3),isNaN(eh.y)&&(eh.y=-(sf/2+3)),eh.rotate(ru),Og+=eh.x+Qf,ap+=eh.y+Hy;var lf=new $t(Og,ap,Bh.width,Bh.height),Fg=new $t(Bh.x,Bh.y,Bh.width,Bh.height),Wy=new $t(qu.x,qu.y,qu.width,qu.height);Tu.Sz=af,Tu.lineCount=Ms.lineCount,Tu.lines=[Ms.Cb,Ms.Ih,Ms.df,Ms.Le,Ms.Qc,Ms.Qb,Ms.ze],Tu.actualBounds=lf,Tu.measuredBounds=Fg,Tu.naturalBounds=Wy,Dh===0?bc.assign(lf):bc.ed(lf),lt.free(eh),lt.free(Rh),$t.free(Jf),jr.free(Ul)}dl.graduatedBounds!==null&&dl.graduatedBounds.push(bc),xi(Wv,bc.x,bc.y,bc.width,bc.height)}Bo(No,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var ee=a.graduatedBounds,ne=0,ae=ee[ne];ne++,b!==null&&b.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height);for(var ue=y.length,ge=0;ge<ue;ge++){var ye=y[ge];ae=E[ge],ye.visible&&ye!==b&&ae.length!==0&&(ae=ee[ne],ne++,ye.arrange(ae.x-x.x,ae.y-x.y,ae.width,ae.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,ee=E.width,ne=E.height;E=y instanceof Ps,y.save(),y.beginPath(),y.rect(-1,-1,ee+1,ne+1),y.clip(),y.Se(),ee=a.Pb(),ee.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var ae=ee.actualBounds,ue=a.O.s,ge=a.graduatedMarks,ye=ue.length,Le=0;Le<ye;Le++){var ze=ue[Le],We=ge[Le],Je=We.length;if(ze.visible&&ze!==ee&&We.length!==0){if(ze instanceof Hr){if(!(2>a.graduatedTickUnit*ze.interval*ee.geometry.flattenedTotalLength/a.graduatedRange*ne&&ze.graduatedSkip===null)){var it=ze.measuredBounds,Tt=ze.strokeWidth*ze.scale,Pt=ze.alignmentFocus;Pt.Mc()&&(Pt=co);for(var Nt=0;Nt<Je;Nt++){var At=We[Nt].$l,Bt=We[Nt].angle,Rt=Pt,Zt=ze.Ab;Zt.reset(),Zt.translate(At.x+ae.x,At.y+ae.y),Zt.rotate(Bt+ze.angle,0,0),Zt.translate(-it.width*Rt.x+Rt.offsetX+Tt/2,-it.height*Rt.y+Rt.offsetY+Tt/2),Zt.scale(ze.scale,ze.scale),sl(ze,!1),ze.wh.set(ze.Ab),ze.Kk=ze.scale,Zs(ze,!1),ze.gc(y,x),E&&(a.svg.appendChild(ze.svg),ze.svg=null),ze.Ab.reset()}}}else if(ze instanceof Zi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Zi),it=a.temporaryTextBlock,S1(it,ze),Tt=0;Tt<Je;Tt++)Pt=We[Tt],Pt.actualBounds&&Pt.measuredBounds&&Pt.naturalBounds&&(it.ec=Pt.text||"",it.Kb=Pt.Sz||0,it.Gc=Pt.lineCount||0,Nt=Pt.lines,Nt!==void 0&&(it.Cb=Nt[0],it.Ih=Nt[1],it.df=Nt[2],it.Le=Nt[3],it.Qc=Nt[4],it.Qb=Nt[5],it.ze=Nt[6]),Pt.naturalBounds&&(it.dc=Pt.naturalBounds),Pt.actualBounds&&(Nt=Pt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height)),Nt=Pt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height),At=Pt.measuredBounds,Pt=Pt.naturalBounds,Bt=it.Ab,Bt.reset(),Bt.translate(Nt.x+ae.x,Nt.y+ae.y),Bt.translate(-At.x,-At.y),it.no(Bt,Pt.x,Pt.y,Pt.width,Pt.height),sl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Zs(it,!1),it.Ng=ze.part,it.Me=ze.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function wn(a,y){if(_t.call(this),this.na=null,a===void 0)this.na=wn.Position;else if(typeof a=="string"){var x=xl.I(a);x!==null&&(this.na=x)}else a instanceof Go?this.na=a:a&&(this.na=wn.Position,y=a);this.na===null&&jt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===wn.Grid?1048576:0),this.O=new rn,this.yb=Qo,this.Tm=Vo,this.Uf=Rr,this.$g=null,this.$e="",this.jg=new $t(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=hr,this.jn=ui,this.kn=zn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Kt(wn,_t),wn.prototype.cloneProtected=function(a){_t.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},wn.prototype.Af=function(a){_t.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},wn.prototype.copy=function(){var a=_t.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var ee=a.O,ne=ee.count;if(ee.Gb(ne,E),ee=a.part,ee!==null){ee.Rh=null,E.portId!==null&&ee instanceof Un&&(ee.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||ee.cb(bo,"elements",a,null,E,null,ne)}}return a}return null},qe=wn.prototype,qe.toString=function(){return"Panel("+this.type.name+")#"+Gr(this)},qe.Pn=function(a){_t.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},qe.hh=function(a,y){if(this.na===wn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===wn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===wn.Table)if(a.yc(),a instanceof Ps){var x=a.yd;a.yd=um(a,"gojs-ts"),g0(this,a),a.nh.pop(),a.yd=x}else g0(this,a);(x=this.isClipping&&this.na===wn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];x&&ae===b&&(a.clipInsteadOfFill=!0),ae.gc(a,y),x&&ae===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function g0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Pm(a,y,!0,x,!0),b!==null&&Pm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Pm(a,y,!0,x,!1),b!==null&&Pm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,ee=a.actualBounds,ne=a.naturalBounds,ae=!0,ue=0;ue<E;ue++){var ge=b[ue];if(ge!==void 0&&ge.actual!==0)if(ae)ae=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var ye=ge.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Le=ge.separatorStroke;if(Le===null&&(Le=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Le!==null){yo(a,y,Le,!1,!1,ne,ee),Le=!1;var ze=ge.separatorDashArray;ze===null&&(ze=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ze!==null&&(Le=!0,y.js(ze,0)),y.beginPath(),ze=ge.position+ye,x?ze>ne.height&&(ye-=ze-ne.height):ze>ne.width&&(ye-=ze-ne.width),ge=ge.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(ge+=ye.top,ze=ne.width-ye.right,y.moveTo(ye.left,ge),y.lineTo(ze,ge)):(ge+=ye.left,ze=ne.height-ye.bottom,y.moveTo(ge,ye.top),y.lineTo(ge,ze)),y.stroke(),y.Se(),Le&&y.fs()}}}}function Pm(a,y,x,b,E){for(var ee=b.length,ne=a.actualBounds,ae=a.naturalBounds,ue=a1(a,!0),ge=a1(a,!1),ye=0;ye<ee;ye++){var Le=b[ye];if(Le!==void 0&&Le.background!==null&&Le.coversSeparators!==E&&Le.actual!==0){var ze=x?ne.height:ne.width;if(!(Le.position>ze)){var We=Le.Wc(),Je=Le.separatorStrokeWidth;isNaN(Je)&&(Je=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Le.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Le.index===(x?ue:ge))&&(Je=0),We-=Je,Je=Le.position+Je,We+=Le.actual,Je+We>ze&&(We=ze-Je),0>=We||(ze=a.yb,yo(a,y,Le.background,!0,!1,ae,ne),x?y.fillRect(ze.left,Je+ze.top,ne.width-(ze.left+ze.right),We):y.fillRect(Je+ze.left,ze.top,We,ne.height-(ze.top+ze.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function m0(a){return a==="LineV"||a==="BarV"}qe.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},qe.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(this.type===wn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,g0(this,a),a.yd=null;else if(this.na===wn.Grid||this.na===wn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},qe.nk=function(){return!0},qe.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,ee=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var ae=y[ne].actualBounds;E=ne===0?ae.x:Math.min(ae.x,E),ee=ne===0?ae.y:Math.min(ae.y,ee)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-ee)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else _t.prototype.$o.call(this,a,y,x,b)},qe.Sj=function(a,y,x,b,E){var ee=this.se(),ne=this.transform,ae=1/(ne.m11*ne.m22-ne.m12*ne.m21),ue=ne.m22*ae,ge=-ne.m12*ae,ye=-ne.m21*ae,Le=ne.m11*ae,ze=ae*(ne.m21*ne.dy-ne.m22*ne.dx),We=ae*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Gt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return ee=a*ue+y*ye+ze,ae=a*ge+y*Le+We,a=x*ue+b*ye+ze,ue=x*ge+b*Le+We,E.h(0,0),x=this.naturalBounds,ee=Gt.Ff(0,0,x.width,x.height,ee,ae,a,ue,E),E.transform(ne),ee;ee||(ue=1,ye=ge=0,Le=1,We=ze=0),ae=a*ue+y*ye+ze,a=a*ge+y*Le+We,ue=x*ue+b*ye+ze,x=x*ge+b*Le+We,E.h(ue,x),b=(ue-ae)*(ue-ae)+(x-a)*(x-a),ge=!1,Le=this.O.s,We=Le.length,ye=lt.alloc(),ze=null,y=1/0;var Je=null,it=this.isClipping&&this.na===wn.Spot;it&&(Je=lt.alloc(),ze=this.Pb(),(ge=ze.Sj(ae,a,ue,x,Je))&&(y=(ae-Je.x)*(ae-Je.x)+(a-Je.y)*(a-Je.y)));for(var Tt=0;Tt<We;Tt++){var Pt=Le[Tt];Pt.visible&&Pt!==ze&&Pt.Sj(ae,a,ue,x,ye)&&(ge=!0,Pt=(ae-ye.x)*(ae-ye.x)+(a-ye.y)*(a-ye.y),Pt<b&&(b=Pt,E.set(ye)))}return it&&(y>b&&E.set(Je),lt.free(Je)),lt.free(ye),ee&&E.transform(ne),ge},qe.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();_t.prototype.Gj.call(this)},qe.v=function(a){if(!Bs(this)){_t.prototype.v.call(this,a),a=null,(this.na===wn.Auto||this.na===wn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var ee=ls(E,!1);(E instanceof Ja||E instanceof wn||E instanceof Zi||ee!==gn)&&E.v(!0)}}}},qe.Uj=function(){if(!Bs(this)){Bo(this,!0),pu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},qe.Uk=function(){if(!(this.l&2048)){sl(this,!0),Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},qe.Wu=function(){Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},qe.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var ee=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var ae=this.maxSize;isNaN(ee.width)||(a=Math.min(ee.width,ae.width)),isNaN(ee.height)||(y=Math.min(ee.height,ae.height)),a=Math.max(x,a),y=Math.max(b,y);var ue=this.yb;a=Math.max(a-ue.left-ue.right,0),y=Math.max(y-ue.top-ue.bottom,0);var ge=this.O.s;ge.length!==0&&this.na.measure(this,a,y,ge,E,x,b),a=E.width+ue.left+ue.right,ue=E.height+ue.top+ue.bottom,isFinite(ee.width)&&(a=ee.width),isFinite(ee.height)&&(ue=ee.height),a=Math.min(ae.width,a),ue=Math.min(ae.height,ue),a=Math.max(ne.width,a),ue=Math.max(ne.height,ue),a=Math.max(x,a),ue=Math.max(b,ue),vi(E,a,ue),vi(this.naturalBounds,a,ue),this.Ge(0,0,a,ue)},qe.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 b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Vu(a){return a.part!==null?a.part.locationObject:null}qe.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=ls(this,!0);var ee=this.measuredBounds;y=ee.width,ee=ee.height;var ne=this.Kg,ae=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&ee===b&&(a=gn),a){case gn:(y>x||ee>b)&&(this.v(),this.measure(y>x?x:y,ee>b?b:ee,0,0));break;case yn:this.v(!0),this.measure(x+ae,b+ne,0,0);break;case mr:this.v(!0),this.measure(x+ae,ee+ne,0,0);break;case Er:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},qe.gh=function(a){var y=this.naturalBounds,x=Vu(this);if(qi(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=lt.allocAt(0,0);b--;){var ee=y[b];if((ee.visible||ee===x)&&(Kn(E.set(a),ee.transform),ee.ca(E)))return lt.free(E),!0}return lt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},qe.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},qe.qm=function(a,y){if(y(this,a),a instanceof wn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var ee=y[E];ee instanceof wn&&s1(a,ee,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}qe.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var ee=u1(a,y[E],x);if(ee!==null)return ee}}return null}qe.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof wn){var ee=E.fb(a);if(ee!==null)return ee}if(E.name===a)return E}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof wn?x=Math.max(x,h1(E)):E instanceof Hr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}qe.se=function(){return!(this.type===wn.TableRow||this.type===wn.TableColumn)};function xh(a){return a.type===wn.TableRow||a.type===wn.TableColumn}qe.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Xa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),ee=this.se(),ne=ee?a:Kn(lt.allocAt(a.x,a.y),this.transform),ae=this.diagram,ue=10,ge=5;if(ae!==null&&(ue=ae.Ql("extraTouchArea"),ge=ue/2),qi(-(ge*E),-(ge*E),b.width+ue*E,b.height+ue*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(ae=lt.alloc(),ge=(ue=this.isClipping&&this.na===wn.Spot)?this.Pb():null,ue&&(ge.se()?Kn(ae.set(a),ge.transform):ae.set(a),!ge.ca(ae)))return lt.free(ae),ee||lt.free(ne),null;for(var Le=Vu(this);ye--;){var ze=E[ye];if((ze.visible||ze===Le)&&(ze.se()?Kn(ae.set(a),ze.transform):ae.set(a),!ue||ze!==ge)){var We=null;if(ze instanceof wn?We=ze.ic(ae,y,x):ze.pickable===!0&&ze.ca(ae)&&(We=ze),We!==null&&(y!==null&&(We=y(We)),We!==null&&(x===null||x(We))))return lt.free(ae),ee||lt.free(ne),We}}lt.free(ae)}return this.background===null&&this.areaBackground===null?(ee||lt.free(ne),null):(a=qi(0,0,b.width,b.height,ne.x,ne.y)?this:null,ee||lt.free(ne),a)}return ee||lt.free(ne),null},qe.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,ee=this.se(),ne=ee?a:Kn(lt.allocAt(a.x,a.y),this.transform);if(E=qi(0,0,E.width,E.height,ne.x,ne.y),xh(this)||E){if(!this.isAtomic){for(var ae=this.O.s,ue=ae.length,ge=lt.alloc(),ye=Vu(this);ue--;){var Le=ae[ue];if(Le.visible||Le===ye){Le.se()?Kn(ge.set(a),Le.transform):ge.set(a);var ze=Le;Le=Le instanceof wn?Le:null,(Le!==null?Le.ji(ge,y,x,b):ze.ca(ge))&&ze.pickable!==!1&&(y!==null&&(ze=y(ze)),ze===null||x!==null&&!x(ze)||b.add(ze))}}lt.free(ge)}return ee||lt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return ee||lt.free(ne),!1},qe.Cf=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=ee;if(ee===void 0&&(ne=jr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&jr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=Vu(this),ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===ae){var Le=ye.actualBounds,ze=this.naturalBounds;Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height||(Le=ye,ye=ye instanceof wn?ye:null,ze=jr.alloc(),ze.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,ze):Xo(Le,a,b,ze))&&(y!==null&&(Le=y(Le)),Le===null||x!==null&&!x(Le)||E.add(Le)),jr.free(ze))}}return ee===void 0&&jr.free(ne),b}return ee===void 0&&jr.free(ne),!1};function v0(a,y,x,b){for(var E=a.O.s,ee=E.length;ee--;){var ne=E[ee];if(ne.visible){var ae=ne.actualBounds,ue=a.naturalBounds;ae.x>ue.width||ae.y>ue.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof wn&&v0(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}qe.og=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,ae=this.se(),ue=ae?a:Kn(lt.allocAt(a.x,a.y),this.transform),ge=ae?y:Kn(lt.allocAt(y.x,y.y),this.transform),ye=ue.Bf(ge),Le=0<ue.x&&ue.x<ne.width&&0<ue.y&&ue.y<ne.height||Zn(ue.x,ue.y,0,0,0,ne.height)<=ye||Zn(ue.x,ue.y,0,ne.height,ne.width,ne.height)<=ye||Zn(ue.x,ue.y,ne.width,ne.height,ne.width,0)<=ye||Zn(ue.x,ue.y,ne.width,0,0,0)<=ye;if(ne=ue.zd(0,0)<=ye&&ue.zd(0,ne.height)<=ye&&ue.zd(ne.width,0)<=ye&&ue.zd(ne.width,ne.height)<=ye,ae||(lt.free(ue),lt.free(ge)),Le){if(!this.isAtomic){ue=lt.alloc(),ge=lt.alloc(),ye=Vu(this);for(var ze=this.O.s,We=ze.length;We--;){var Je=ze[We];if(Je.visible||Je===ye){var it=Je.actualBounds,Tt=this.naturalBounds;(!ae||!(it.x>Tt.width||it.y>Tt.height||0>it.x+it.width||0>it.y+it.height))&&(Je.se()?(it=Je.transform,Kn(ue.set(a),it),Kn(ge.set(y),it)):(ue.set(a),ge.set(y)),it=Je,Je=Je instanceof wn?Je:null,(Je!==null?Je.og(ue,ge,x,b,E,ee):it.tx(ue,ge,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||ee.add(it)))}}lt.free(ue),lt.free(ge)}return E?Le:ne}return!1};function y0(a){var y=null;return a instanceof Hr&&(y=a.spot1,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ei),y}function S0(a){var y=null;return a instanceof Hr&&(y=a.spot2,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=io),y}qe.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},qe.M=function(a){return this.O.M(a)},qe.Gb=function(a,y){y instanceof Sr&&jt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&jt("Cannot make a Panel contain itself: "+this.toString()),jt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&jt("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!==wn.Grid||y instanceof Hr||jt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==wn.Graduated||y instanceof Hr||y instanceof Zi||jt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new tn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var ee=-1,ne=this.O.s,ae=ne.length,ue=0;ue<ae;ue++)if(ne[ue]===y){ee=ue;break}if(ee!==-1){if(ee===a||ee+1>=E.count&&a>=E.count)return;E.mb(ee),b=ee}else jt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Bs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof wn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Un&&(x.Te=!0),x.Te&&x instanceof Un&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Eo,"elements",this,y,null,b,null),x.cb(bo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}qe.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},qe.mb=function(a){0<=a&&this.pc(a,!0)},qe.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Bo(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var ee=this.part;ee!==null&&(ee.Rh=null,ee.ag=NaN,ee.Wb(),ee instanceof Un&&(b instanceof wn?b.qm(b,function(ne,ae){H0(ee,ae,y)}):H0(ee,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||ee.cb(Eo,"elements",this,b,null,a,null))},qe.Fb=function(a){0>a&&Nn(a,">= 0",wn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(bo,"rowdefs",this,null,x,null,a)}return y[a]},qe.oA=function(a){if(0>a&&Nn(a,">= 0",wn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qe.Eb=function(a){0>a&&Nn(a,">= 0",wn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(bo,"coldefs",this,null,x,null,a)}return y[a]},qe.jA=function(a){if(0>a&&Nn(a,">= 0",wn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qe.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},qe.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Io(y)),this},qe.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},qe.nz=function(a){if(0>a||this.type!==wn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var ee=x[E];if(ee!==void 0&&(y+=ee.total,a<y))break}return E},qe.fz=function(a){if(0>a||this.type!==wn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var ee=x[E];if(ee!==void 0&&(y+=ee.total,a<y))break}return E},qe.Fz=function(a,y){if(y===void 0&&(y=new lt(NaN,NaN)),this.type!==wn.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)},qe.Gz=function(a){if(this.type!==wn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function ul(a){var y=a.allBindings;if(y===null)a.data!==null&&jt("Template cannot have .data be non-null: "+a),a.allBindings=y=new rn;else if(y._isFrozen)return;var x=new rn;x0(a,!1),a.qm(a,function(ge,ye){ye.th();var Le=ye.localBindings;if(Le!==null)for(Af(ye,!1),Le=Le.iterator;Le.next();){var ze=Le.value;ze.mode===pg&&Af(ye,!0);var We=ze.sourceName;We!==null&&(We==="/"&&x0(ge,!0),We=TS(ze,ge,ye),We!==null&&(x.add(We),We.srcBindings===null&&(We.srcBindings=new rn),We.srcBindings.add(ze))),y.add(ze)}if(ye instanceof wn&&ye.type===wn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Le=ge.length,ze=0;ze<Le;ze++)if(We=ge[ze],We!==void 0&&We.be!==null)for(var Je=We.be.iterator;Je.next();){var it=Je.value;it.xd=We,it.to=2,it.wl=We.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Le=0;Le<ge;Le++)if(ze=ye[Le],ze!==void 0&&ze.be!==null)for(We=ze.be.iterator;We.next();)Je=We.value,Je.xd=ze,Je.to=1,Je.wl=ze.index,y.add(Je)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Af(E,!0);for(var ee=E.srcBindings.iterator;ee.next();){var ne=ee.value;E.localBindings===null&&(E.localBindings=new rn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,ee=E.xd,ee!==null){E.xd=null;var ae=E.targetProperty,ue=ae.indexOf(".");0<ue&&ee instanceof wn&&(ne=ae.substring(0,ue),ae=ae.substr(ue+1),ue=ee.fb(ne),ue!==null?(ee=ue,E.targetProperty=ae):Yn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),ee instanceof Io?(ne=Gr(ee.panel),E.Ai=ne===void 0?-1:ne,ee.panel.bindingId=E.Ai):ee instanceof _t?(ne=Gr(ee),E.Ai=ne===void 0?-1:ne,ee.bindingId=E.Ai):jt("Unknown type of binding target: "+ee)}y.freeze(),a instanceof Sr&&a.Zc()&&a.Va()}qe.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof wn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&ul(y),y},qe.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var ee=this,ne=x.Ai;if(ne!==-1){if(ee=this.ks(ne),ee===null)continue}else x.xd!==null&&(ee=x.xd);if(E==="/"?b=ee.part:E==="."?b=ee:E===".."&&(b=ee.panel),E=x.to,E!==0){if(!(ee instanceof wn))continue;E===1?ee=ee.Eb(x.wl):E===2&&(ee=ee.Fb(x.wl))}ee!==void 0&&x.Mv(ee,b)}}},qe.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,ee=null;E<x&&(ee=a[E],!(ee instanceof wn&&ee.data!==null));)E++,ee=a[E];if(x-E!==b)return!0;if(ee===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(ee=a[E],!(ee instanceof wn)||ee.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===wn.Spot||a.type===wn.Auto)return Math.min(a.O.length,1);if(a.type===wn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Hr&&b.isPanelMain))break}return x}return a.type===wn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof wn&&xh(a))?1:0}qe.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(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 b=0;b<x;b++)Cm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var ee=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof wn){if(ne.data!==ee){var ae=b0(a,ne.data),ue=b0(a,ee),ge=ue!==ae;ge||(ae=P0(a,ae),ge=P0(a,ue)!==ae),ge?(a.pc(b,!1),Cm(a,ee,E,!1)):ne.data=ee}}else Cm(a,ee,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),Bs(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Un&&(y.Te=!0),y.Te&&y instanceof Un&&(y.wc=null))}}function Cm(a,y,x,b){if(!(y==null||0>x)){var E=b0(a,y);if(E=P0(a,E),E!==null){if(ul(E),E=E.copy(),E.l&16777216){var ee=a.ih();ee!==null&&x0(ee,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new tn),a.ge.add(y,E)),ee=x+Vp(a),a.Gb(ee,E),b&&(E.ub=y,w0(a,ee,x),E.ub=null),E.data=y}}}function w0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof wn){var E=y,ee=x;b.type===wn.TableRow?b.row=E:b.type===wn.TableColumn&&(b.column=E),b.itemIndex=ee}y++,x++}}function b0(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=Po(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;jt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function P0(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,Yn('No item template Panel found for category "'+y+'" on '+a),Yn(" Using default item template."),a=new wn,y=new Zi,y.bind(new Lo("text","",Fr)),a.add(y),m1=a),b=m1)),b}function Em(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof wn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var ee=y[E];x&&ee instanceof wn&&!ee.isEnabled||Em(a,ee,x)}}}function $l(a,y){y.name=a,xl.add(a,y)}zt.Object.defineProperties(wn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===wn.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&&Nn(a,">= 0",wn,"padding"),a=new Ur(a)):(0>a.left&&Nn(a.left,">= 0",wn,"padding:value.left"),0>a.right&&Nn(a.right,">= 0",wn,"padding:value.right"),0>a.top&&Nn(a.top,">= 0",wn,"padding:value.top"),0>a.bottom&&Nn(a.bottom,">= 0",wn,"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:Qo},set:function(a){typeof a=="number"&&(a=new Ur(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Js),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 Ai)&&(a instanceof Ai&&a.freeze(),this.T===null&&(this.T=new Js),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 Js),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,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("defaultRowSeparatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Js),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 Ai)&&(a instanceof Ai&&a.freeze(),this.T===null&&(this.T=new Js),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 Js),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,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("defaultColumnSeparatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Js),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 Js),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||jt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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()||jt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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 Zu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 Zu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&$i(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 Zu),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 Zu),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 Zu,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 Zu,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 Zu,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 Zu,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 Js),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Js),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Lm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Js),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Lm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Js),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)&&jt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Js),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)&&jt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Js),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 Sr&&!(this instanceof mi);ul(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof En?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Sr&&(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),b!==null&&b.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 jf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(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 Sr||a.isPanelMain)&&jt("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(););Zr(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&&(Zr(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 Ir&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Em(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),zt.Object.defineProperties(wn,{Position:{get:function(){return xl.I("Position")}},Horizontal:{get:function(){return xl.I("Horizontal")}},Vertical:{get:function(){return xl.I("Vertical")}},Spot:{get:function(){return xl.I("Spot")}},Auto:{get:function(){return xl.I("Auto")}},Table:{get:function(){return xl.I("Table")}},Viewbox:{get:function(){return xl.I("Viewbox")}},TableRow:{get:function(){return xl.I("TableRow")}},TableColumn:{get:function(){return xl.I("TableColumn")}},Link:{get:function(){return xl.I("Link")}},Grid:{get:function(){return xl.I("Grid")}},Graduated:{get:function(){return xl.I("Graduated")}}}),wn.prototype.rebuildItemElements=wn.prototype.mv,wn.prototype.findItemPanelForData=wn.prototype.sx,wn.prototype.updateTargetBindings=wn.prototype.La,wn.prototype.copyTemplate=wn.prototype.Uy,wn.prototype.graduatedValueForPoint=wn.prototype.Gz,wn.prototype.graduatedPointForValue=wn.prototype.Fz,wn.prototype.findColumnForLocalX=wn.prototype.fz,wn.prototype.findRowForLocalY=wn.prototype.nz,wn.prototype.addColumnDefinition=wn.prototype.By,wn.prototype.addRowDefinition=wn.prototype.Hy,wn.prototype.addRowColumnDefinition=wn.prototype.Gy,wn.prototype.removeColumnDefinition=wn.prototype.jA,wn.prototype.getColumnDefinition=wn.prototype.Eb,wn.prototype.removeRowDefinition=wn.prototype.oA,wn.prototype.getRowDefinition=wn.prototype.Fb,wn.prototype.removeAt=wn.prototype.mb,wn.prototype.remove=wn.prototype.remove,wn.prototype.insertAt=wn.prototype.Gb,wn.prototype.elt=wn.prototype.M,wn.prototype.add=wn.prototype.add,wn.prototype.findObject=wn.prototype.fb,wn.prototype.findInVisualTree=wn.prototype.Nl,wn.prototype.walkVisualTreeFrom=wn.prototype.qm,wn.prototype.findMainElement=wn.prototype.Pb;var g1=!1,m1=null,xl=new tn;wn.className="Panel",wn.definePanelLayout=$l,$l("Position",new fm),$l("Vertical",new pm),$l("Auto",new mm),$l("Link",new bm);function Zu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Zu.prototype.copy=function(){var a=new Zu;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},Zu.className="GradPanelSettings";function Js(){this.Pc=[],this.Oc=[],this.j=this.ob=Lm,this.hb=this.Hb=0,this.Qp=Qo,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Js.prototype.copy=function(a){for(var y=new Js,x=this.Pc,b=x.length,E=y.Pc,ee=0;ee<b;ee++)if(x[ee]!==void 0){var ne=x[ee].copy();ne.wi(a),E[ee]=ne}for(x=this.Oc,b=x.length,E=y.Oc,ee=0;ee<b;ee++)x[ee]!==void 0&&(ne=x[ee].copy(),ne.wi(a),E[ee]=ne);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},Js.className="TablePanelSettings";function Io(a){cr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Vo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Rr,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))}Io.prototype.copy=function(){var a=new Io;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=Jn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Jn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}qe=Io.prototype,qe.qb=function(a){a.classType===Io&&(this.sizing=a)},qe.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Gr(this)},qe.wi=function(a){this.Me=a},qe.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)},qe.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===wn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,ee=0;ee<E;ee++){var ne=b?y.rowDefs[ee]:y.colDefs[ee];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},qe.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(no,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Tm(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Lo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&jt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new rn),this.be.add(E),this},zt.Object.defineProperties(Io.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&&Nn(a,">= 0",Io,"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&&Nn(a,">= 0",Io,"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))&&Nn(a,">= 0",Io,"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&&Nn(a,">= 0",Io,"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 Ur(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&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ai&&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,b=0,E=0;E<x;E++){var ee=a[E];typeof ee=="number"&&0<=ee&&isFinite(ee)||jt("separatorDashArray value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===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&&Ff(a,"RowColumnDefinition.background"),a instanceof Ai&&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}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var C0=new hn(Io,"Default",0),Zp=new hn(Io,"None",1),Lm=new hn(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=C0,Io.None=Zp,Io.ProportionalExtra=Lm;function Hr(a,y){_t.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)}Kt(Hr,_t),Hr.prototype.cloneProtected=function(a){_t.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=Jn(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 Xc(a){a.Na===null?a.Na=new T0:a.Na.nc&&(a.Na=a.Na.copy())}qe=Hr.prototype,qe.th=function(){_t.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},qe.qb=function(a){a===gn||a===hr||a===ri||a===Rr?this.geometryStretch=a:_t.prototype.qb.call(this,a)},qe.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Gr(this)};function Nd(a,y,x,b){var E=x.length;if(!(4>E)){var ee=b.measuredBounds,ne=Math.max(1,ee.width);ee=ee.height;for(var ae=x[0],ue=x[1],ge,ye,Le,ze,We,Je,it=0,Tt=er(),Pt=2;Pt<E;Pt+=2)ge=x[Pt],ye=x[Pt+1],Le=ge-ae,ae=ye-ue,Le===0&&(Le=.001),ze=ae/Le,We=Math.atan2(ae,Le),Je=Math.sqrt(Le*Le+ae*ae),Tt.push([Le,We,ze,Je]),it+=Je,ae=ge,ue=ye;ae=x[0],ue=x[1],Le=b.measuredBounds.width,b instanceof Hr&&(Le-=b.strokeWidth),1>Le&&(Le=1),E=x=Le,ge=ne/2,ye=ge!==0,Pt=0,Je=Tt[Pt],Le=Je[0],We=Je[1],ze=Je[2],Je=Je[3];for(var Nt=0;.1<=it;){if(Nt===0&&(ye?(E=x,E-=ge,it-=ge,ye=!1):E=x,E===0&&(E=1)),E>it){_n(Tt);return}E>Je?(Nt=E-Je,E=Je):Nt=0;var At=Math.sqrt(E*E/(1+ze*ze));if(0>Le&&(At=-At),ae+=At,ue+=ze*At,a.translate(ae,ue),a.rotate(We),a.translate(-(ne/2),-(ee/2)),Nt===0&&b.hh(a,y),a.translate(ne/2,ee/2),a.rotate(-We),a.translate(-ae,-ue),it-=E,Je-=E,Nt!==0){if(Pt++,Pt===Tt.length){_n(Tt);return}Je=Tt[Pt],Le=Je[0],We=Je[1],ze=Je[2],Je=Je[3],E=Nt}}_n(Tt)}}qe.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var ee=this.actualBounds,ne=this.naturalBounds;b!==null&&yo(this,a,b,!0,!1,ne,ee);var ae=this.part,ue=this.ig;if(x===null||ue!==0||ae===null||!this.isPanelMain&&ae.Pb()!==this||(ue=ae.type===wn.Link&&ae instanceof mi&&ae.category==="Selection"&&ae.adornedObject instanceof Hr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),ue===0&&(x=null),x!==null&&ue!==0&&(yo(this,a,x,!1,!1,ne,ee),a.lineWidth=ue,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),ee=!1,ae&&y.Gf("drawShadows")&&(ee=ae.isShadowed),a.Il===!1&&(ee=!1),ae=!0,x===null||b!==null&&b!=="transparent"||(ae=!1),ne=!1,ue=this.strokeDashArray,ue!==null&&(ne=!0,a.js(ue,this.strokeDashOffset)),E.type===Tn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Tn.u){var ge=E.startX;ue=E.startY;var ye=E.endX,Le=E.endY;E=Math.min(ge,ye);var ze=Math.min(ue,Le);ge=Math.abs(ye-ge),ue=Math.abs(Le-ue),a.beginPath(),a.rect(E,ze,ge,ue),b!==null&&a.ng(b),x!==null&&(ae&&ee&&gu(a),a.jk(),ae&&ee&&Hu(a)),a.Se()}else if(E.type===Tn.F)ge=E.startX,ue=E.startY,ye=E.endX,Le=E.endY,E=Math.abs(ye-ge)/2,ze=Math.abs(Le-ue)/2,ge=Math.min(ge,ye)+E,ue=Math.min(ue,Le)+ze,a.beginPath(),a.moveTo(ge,ue-ze),a.bezierCurveTo(ge+Gt.wg*E,ue-ze,ge+E,ue-Gt.wg*ze,ge+E,ue),a.bezierCurveTo(ge+E,ue+Gt.wg*ze,ge+Gt.wg*E,ue+ze,ge,ue+ze),a.bezierCurveTo(ge-Gt.wg*E,ue+ze,ge-E,ue+Gt.wg*ze,ge-E,ue),a.bezierCurveTo(ge-E,ue-Gt.wg*ze,ge-Gt.wg*E,ue-ze,ge,ue-ze),a.closePath(),b!==null&&a.ng(b),x!==null&&(ae&&ee&&gu(a),a.jk(),ae&&ee&&Hu(a)),a.Se();else if(E.type===Tn.o)for(E=E.figures,ue=E.length,ze=0;ze<ue;ze++){ge=E.s[ze],a.beginPath(),a.moveTo(ge.startX,ge.startY),ye=ge.segments.s,Le=ye.length;for(var We=null,Je=0;Je<Le;Je++){var it=ye[Je];switch(it.type){case Fo:a.moveTo(it.endX,it.endY);break;case Ui:a.lineTo(it.endX,it.endY);break;case _o:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ds:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case wo:if(it.radiusX===it.radiusY){var Tt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Tt,(it.startAngle+it.sweepAngle)*Tt,0>it.sweepAngle,We!==null?We.endX:ge.startX,We!==null?We.endY:ge.startY)}else if(We=Ga(it,ge),Tt=We.length,Tt===0)a.lineTo(it.centerX,it.centerY);else for(var Pt=0;Pt<Tt;Pt++){var Nt=We[Pt];Pt===0&&a.lineTo(Nt[0],Nt[1]),a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7])}break;case ws:if(Pt=Tt=0,We!==null&&We.type===wo){if(We=Ga(We,ge),Nt=We.length,Nt===0){a.lineTo(it.endX,it.endY);break}We=We[Nt-1]||null,We!==null&&(Tt=We[6],Pt=We[7])}else Tt=We!==null?We.endX:ge.startX,Pt=We!==null?We.endY:ge.startY;if(We=js(it,ge,Tt,Pt),Tt=We.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(Pt=0;Pt<Tt;Pt++)Nt=We[Pt],a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7]);break;default:jt("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),We=it}ye=ge.isFilled,ee?ge.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(ye&&ae&&gu(a),a.jk(),ye&&ae&&Hu(a))):(gu(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),Hu(a)):(ye&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk()),a.Se(ze)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),ee=this.geometry,a.save(),a.beginPath(),b=er(),ee.type===Tn.j)b.push(ee.startX),b.push(ee.startY),b.push(ee.endX),b.push(ee.endY),Nd(a,y,b,x);else if(ee.type===Tn.o)for(ee=ee.figures.iterator;ee.next();){for(ae=ee.value,b.length=0,b.push(ae.startX),b.push(ae.startY),ne=ae.startX,E=ae.startY,ue=ne,ze=E,ge=ae.segments.s,ye=ge.length,Le=0;Le<ye;Le++){switch(Je=ge[Le],Je.type){case Fo:Nd(a,y,b,x),b.length=0,b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY,ue=ne,ze=E;break;case Ui:b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break;case _o:Gt.Qe(ne,E,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case ds:Gt.ep(ne,E,Je.point1X,Je.point1Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case wo:if(it=Ga(Je,ae),We=it.length,We===0){b.push(Je.centerX),b.push(Je.centerY),ne=Je.centerX,E=Je.centerY;break}for(Tt=0;Tt<We;Tt++)Pt=it[Tt],Gt.Qe(ne,E,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],E=Pt[7];break;case ws:if(it=js(Je,ae,ne,E),We=it.length,We===0){b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break}for(Tt=0;Tt<We;Tt++)Pt=it[Tt],Gt.Qe(ne,E,Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7],.5,b),ne=Pt[6],E=Pt[7];break;default:jt("Segment not of valid type: "+Je.type)}Je.isClosed&&(b.push(ue),b.push(ze),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(ee.type===Tn.u)b.push(ee.startX),b.push(ee.startY),b.push(ee.endX),b.push(ee.startY),b.push(ee.endX),b.push(ee.endY),b.push(ee.startX),b.push(ee.endY),b.push(ee.startX),b.push(ee.startY),Nd(a,y,b,x);else if(ee.type===Tn.F){if(E=new Oo,E.startX=ee.endX,E.startY=(ee.startY+ee.endY)/2,ne=new gi(wo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(ee.startX+ee.endX)/2,ne.centerY=(ee.startY+ee.endY)/2,ne.radiusX=Math.abs(ee.startX-ee.endX)/2,ne.radiusY=Math.abs(ee.startY-ee.endY)/2,E.add(ne),ee=Ga(ne,E),ae=ee.length,ae===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,ue=0;ue<ae;ue++)ze=ee[ue],Gt.Qe(ne,E,ze[2],ze[3],ze[4],ze[5],ze[6],ze[7],.5,b),ne=ze[6],E=ze[7];Nd(a,y,b,x)}_n(b),a.restore(),a.Vc(!1)}}}},qe.kk=function(a,y,x){return!_t.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)},qe.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:_t.prototype.nk.call(this,a)},qe.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)}},qe.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof Ln){a.Mc()&&jt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},qe.mi=function(a){a===void 0&&(a=new $t);var y=this.naturalBounds,x=this.oe;y=$t.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=lt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),xi(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),xi(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),xi(a,b.x,b.y,0,0),$t.free(y),lt.free(b),a},qe.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Tn.j||y||(E+=2);var ee=$t.alloc();if(ee.assign(b),ee.Bc(E+2,E+2),!ee.ca(a))return $t.free(ee),!1;if(b=E+1e-4,x.type===Tn.j)return this.stroke===null||(b=(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>b)?!1:($t.free(ee),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Tn.u){y=x.startX;var ne=x.startY,ae=x.endX;if(x=x.endY,ee.x=Math.min(y,ae),ee.y=Math.min(ne,x),ee.width=Math.abs(ae-y),ee.height=Math.abs(x-ne),this.fill===null){if(ee.Bc(-b,-b),ee.ca(a))return $t.free(ee),!1;ee.Bc(b,b)}return this.stroke!==null&&ee.Bc(E,E),a=ee.ca(a),$t.free(ee),a}if(x.type===Tn.F){ne=x.startX,E=x.startY,ae=x.endX;var ue=x.endY;if(x=Math.min(ne,ae),y=Math.min(E,ue),ne=Math.abs(ae-ne)/2,E=Math.abs(ue-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return $t.free(ee),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),$t.free(ee),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Tn.o)return $t.free(ee),this.fill===null?Hl(x,a.x,a.y,E):ua(x,a,E,1<this.strokeWidth,y);jt("Unknown Geometry type: "+x.type)},qe.Wl=function(a,y,x,b){var E=this.desiredSize,ee=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var ae=this.figure,ue=k0[ae];if(ue===void 0){var ge=Gt.Ze[ae];typeof ge=="string"&&(ge=Gt.Ze[ge]),typeof ge=="function"?(ue=ge(null,100,100),k0[ae]=ue):jt("Unsupported Figure: "+ae)}ne=ue.bounds}ae=ne.width,ue=ne.height,ge=ne.width;var ye=ne.height;switch(ls(this,!0)){case gn:b=x=0;break;case yn:ge=Math.max(a-ee,0),ye=Math.max(y-ee,0);break;case mr:ge=Math.max(a-ee,0),b=0;break;case Er:x=0,ye=Math.max(y-ee,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Le=this.maxSize,ze=this.minSize;switch(x=Math.max(x-ee,ze.width),b=Math.max(b-ee,ze.height),ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=isFinite(ge)?Math.max(x,ge):Math.max(ae,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(ue,b),x=E0(this),x){case gn:break;case yn:ae=ge,ue=ye;break;case hr:x=Math.min(ge/ae,ye/ue),isFinite(x)||(x=1),ae*=x,ue*=x;break;default:jt(x+" is not a valid geometryStretch.")}this.Rd!==null?(ae===0&&(ae=.001),ue===0&&(ue=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=ae/ne.width,ne=ue/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Gt.$(this.ua.Sk,a-ee)&&Gt.$(this.ua.Rk,y-ee)||(this.ua=Hr.makeGeometry(this,ae,ue)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-ee/2,ne.y-ee/2,a===0&&ae===0?0:ne.width+ee,y===0&&ue===0?0:ne.height+ee):this.Ge(-(ee/2),-(ee/2),ge+ee,ye+ee),E.w()?(ge=E.width,ye=E.height,ge=Math.min(Le.width,ge),ye=Math.min(Le.height,ye),ge=Math.max(ze.width,ge),ye=Math.max(ze.height,ye),this.dc.h(0,0,ge,ye)):this.dc.assign(ne)};function E0(a){var y=a.geometryStretch;return a.Rd!==null?y===Rr?yn:y:y===Rr?k0[a.figure].defaultStretch:y}qe.eh=function(a,y,x,b){Ia(this,a,y,x,b)},qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qe.Sj=function(a,y,x,b,E){var ee=this.transform,ne=1/(ee.m11*ee.m22-ee.m12*ee.m21),ae=ee.m22*ne,ue=-ee.m12*ne,ge=-ee.m21*ne,ye=ee.m11*ne,Le=ne*(ee.m21*ee.dy-ee.m22*ee.dx),ze=ne*(ee.m12*ee.dx-ee.m11*ee.dy);ee=a*ae+y*ge+Le,ne=a*ue+y*ye+ze,ae=x*ae+b*ge+Le,ue=x*ue+b*ye+ze,Le=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var We=ge.bounds;if(ye=!1,ge.type===Tn.j)if(1.5>=this.strokeWidth)ye=Gt.Ve(ge.startX,ge.startY,ge.endX,ge.endY,ee,ne,ae,ue,E);else{if(ge.startX===ge.endX?(b=Le,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Le/Math.sqrt(1+y*y),b=ye*y),y=er(),a=new lt,Gt.Ve(ge.startX+b,ge.startY+ye,ge.endX+b,ge.endY+ye,ee,ne,ae,ue,a)&&y.push(a),a=new lt,Gt.Ve(ge.startX-b,ge.startY-ye,ge.endX-b,ge.endY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new lt,Gt.Ve(ge.startX+b,ge.startY+ye,ge.startX-b,ge.startY-ye,ee,ne,ae,ue,a)&&y.push(a),a=new lt,Gt.Ve(ge.endX+b,ge.endY+ye,ge.endX-b,ge.endY-ye,ee,ne,ae,ue,a)&&y.push(a),ae=y.length,ae===0)return _n(y),!1;for(ye=!0,ue=1/0,b=0;b<ae;b++)a=y[b],x=(a.x-ee)*(a.x-ee)+(a.y-ne)*(a.y-ne),x<ue&&(ue=x,E.x=a.x,E.y=a.y);_n(y)}else if(ge.type===Tn.u)ye=Gt.Ff(We.x-Le,We.y-Le,We.x+We.width+Le,We.y+We.height+Le,ee,ne,ae,ue,E);else if(ge.type===Tn.F){y=$t.allocAt(We.x,We.y,We.width,We.height).Bc(Le,Le);e:if(y.width===0)ye=Gt.Ve(y.x,y.y,y.x,y.y+y.height,ee,ne,ae,ue,E);else if(y.height===0)ye=Gt.Ve(y.x,y.y,y.x+y.width,y.y,ee,ne,ae,ue,E);else{if(a=y.width/2,ge=y.height/2,b=y.x+a,ye=y.y+ge,x=9999,ee!==ae&&(x=(ne-ue)/(ee-ae)),9999>Math.abs(x)){if(ue=ne-ye-x*(ee-b),0>a*a*x*x+ge*ge-ue*ue){E.x=NaN,E.y=NaN,ye=!1;break e}Le=Math.sqrt(a*a*x*x+ge*ge-ue*ue),ae=(-(a*a*x*ue)+a*ge*Le)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*ue)-a*ge*Le)/(ge*ge+a*a*x*x)+b,ge=x*(ae-b)+ue+ye,ue=x*(a-b)+ue+ye,Math.abs((ee-ae)*(ee-ae))+Math.abs((ne-ge)*(ne-ge))<Math.abs((ee-a)*(ee-a))+Math.abs((ne-ue)*(ne-ue))?(E.x=ae,E.y=ge):(E.x=a,E.y=ue)}else{if(ae=ge*ge,ue=ee-b,ae-=ae/(a*a)*ue*ue,0>ae){E.x=NaN,E.y=NaN,ye=!1;break e}ue=Math.sqrt(ae),ae=ye+ue,ue=ye-ue,Math.abs(ae-ne)<Math.abs(ue-ne)?(E.x=ee,E.y=ae):(E.x=ee,E.y=ue)}ye=!0}$t.free(y)}else if(ge.type===Tn.o){ze=lt.alloc();var Je=ae-ee,it=ue-ne,Tt=Je*Je+it*it,Pt=ee,Nt=ne;if(0<Tt&&We.contains(Pt,Nt)&&(ze.x=Pt,ze.y=Nt,this.ca(ze)))for(Je!==0&&.5>Math.abs(Je)?(it*=.5/Je,Je=.5):it!==0&&.5>Math.abs(it)&&(Je*=.5/it,it=.5),Pt-=Je,Nt-=it;We.contains(Pt,Nt);)Pt-=Je,Nt-=it;for(E.x=ae,E.y=ue,it=0;it<ge.figures.count;it++){var At=ge.figures.s[it],Bt=At.isFilled?Pt:ee,Rt=At.isFilled?Nt:ne,Zt=At.segments;We=At.startX,Je=At.startY;for(var Fn=We,or=Je,$n=0;$n<Zt.count;$n++){var Cn=Zt.s[$n],fn=Cn.type,Br=Cn.endX,Nr=Cn.endY,bi=!1;switch(fn){case Fo:Fn=Br,or=Nr;break;case Ui:bi=Nm(We,Je,Br,Nr,Bt,Rt,ae,ue,ze);break;case _o:bi=Gt.Eo(We,Je,Cn.point1X,Cn.point1Y,Cn.point2X,Cn.point2Y,Br,Nr,Bt,Rt,ae,ue,.6,ze);break;case ds:bi=Gt.Eo(We,Je,We+2/3*(Cn.point1X-We),Je+2/3*(Cn.point1Y-Je),Br+2/3*(Cn.point1X-Br),Nr+2/3*(Cn.point1Y-Nr),Br,Nr,Bt,Rt,ae,ue,.6,ze);break;case wo:case ws:fn=Cn.type===wo?Ga(Cn,At):js(Cn,At,We,Je);var Vi=fn.length;if(Vi===0){bi=Nm(We,Je,Cn.type===wo?Cn.centerX:Cn.endX,Cn.type===wo?Cn.centerY:Cn.endY,Bt,Rt,ae,ue,ze);break}for(Nr=null,Br=0;Br<Vi;Br++){if(Nr=fn[Br],Br===0&&Nm(We,Je,Nr[0],Nr[1],Bt,Rt,ae,ue,ze)){var Yo=Mm(Bt,Rt,ze,Tt,E);Yo<Tt&&(Tt=Yo,ye=!0)}Gt.Eo(Nr[0],Nr[1],Nr[2],Nr[3],Nr[4],Nr[5],Nr[6],Nr[7],Bt,Rt,ae,ue,.6,ze)&&(Yo=Mm(Bt,Rt,ze,Tt,E),Yo<Tt&&(Tt=Yo,ye=!0))}Br=Nr[6],Nr=Nr[7];break;default:jt("Unknown Segment type: "+fn)}We=Br,Je=Nr,bi&&(bi=Mm(Bt,Rt,ze,Tt,E),bi<Tt&&(Tt=bi,ye=!0)),Cn.isClosed&&(Br=Fn,Nr=or,Nm(We,Je,Br,Nr,Bt,Rt,ae,ue,ze)&&(Cn=Mm(Bt,Rt,ze,Tt,E),Cn<Tt&&(Tt=Cn,ye=!0)))}}ee=x-a,ne=b-y,ae=Math.sqrt(ee*ee+ne*ne),ae!==0&&(ee/=ae,ne/=ae),E.x-=ee*Le,E.y-=ne*Le,lt.free(ze)}else jt("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Mm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Nm(a,y,x,b,E,ee,ne,ae,ue){if(Gt.$(a,x)&&Gt.$(y,b)||Gt.$(E,ne)&&Gt.$(ee,ae))return!1;var ge=!1,ye=(E-ne)*(y-b)-(ee-ae)*(a-x);return ye===0?!1:(ue.x=((E*ae-ee*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,ue.y=((E*ae-ee*ne)*(y-b)-(ee-ae)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(ue.y>a||Gt.$(ue.y,a))&&(ue.y<y||Gt.$(ue.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(ue.x>y||Gt.$(ue.x,y))&&(ue.x<a||Gt.$(ue.x,a))&&(ge=!0)),ge)}qe.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 b=this.strokeWidth/2,E=!1,ee=lt.alloc();return ee.h(x.x-b,x.y-b),a.ca(y.Ga(ee))&&(ee.h(x.x-b,x.bottom+b),a.ca(y.Ga(ee))&&(ee.h(x.right+b,x.bottom+b),a.ca(y.Ga(ee))&&(ee.h(x.right+b,x.y-b),a.ca(y.Ga(ee))&&(E=!0)))),lt.free(ee),E},qe.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=jr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,ee=a.top;a=a.bottom;var ne=lt.alloc();if(ne.h(b,ee),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,ee),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return lt.free(ne),!0;var ae=lt.alloc(),ue=lt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ae.x=E,ae.y=ee,ae.transform(x),ne.x=b,ne.y=ee,ne.transform(x),y=!1,Yc(this,ne,ae,ue)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Yc(this,ne,ae,ue)?y=!0:(ae.x=b,ae.y=a,ae.transform(x),Yc(this,ne,ae,ue)?y=!0:(ne.x=b,ne.y=ee,ne.transform(x),Yc(this,ne,ae,ue)&&(y=!0)))),lt.free(ne),jr.free(x),lt.free(ae),lt.free(ue),y};function Yc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,ee=x.y;return x=b.x,b=b.y,a===E?(y<ee?(a=y,y=ee):a=ee,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}qe.tx=function(a,y,x){function b(Tt,Pt){for(var Nt=Tt.length,At=0;At<Nt;At+=2)if(Pt.zd(Tt[At],Tt[At+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),ee=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,ae=ne.x,ue=ne.y,ge=ne.x+ne.width;if(ne=ne.y+ne.height,Tr(a.x,a.y,ae,ue)<=E&&Tr(a.x,a.y,ge,ue)<=E&&Tr(a.x,a.y,ae,ne)<=E&&Tr(a.x,a.y,ge,ne)<=E)return!0}if(ae=y.startX,ue=y.startY,ge=y.endX,ne=y.endY,y.type===Tn.j){if(x=(ae-ge)*(a.x-ge)+(ue-ne)*(a.y-ne),Zn(a.x,a.y,ae,ue,ge,ne)<=(0<=(ge-ae)*(a.x-ae)+(ne-ue)*(a.y-ue)&&0<=x?E:ee))return!0}else{if(y.type===Tn.u)return y=!1,x&&(y=Zn(a.x,a.y,ae,ue,ae,ne)<=E||Zn(a.x,a.y,ae,ue,ge,ue)<=E||Zn(a.x,a.y,ge,ue,ge,ne)<=E||Zn(a.x,a.y,ae,ne,ge,ne)<=E),y;if(y.type===Tn.F){y=a.x-(ae+ge)/2,ee=a.y-(ue+ne)/2;var ye=Math.abs(ge-ae)/2,Le=Math.abs(ne-ue)/2;if(ye===0||Le===0)return Zn(a.x,a.y,ae,ue,ge,ne)<=E;if(x){if(a=Gt.$y(ye,Le,y,ee),a*a<=E)return!0}else return!(Tr(y,ee,-ye,0)>=E||Tr(y,ee,0,-Le)>=E||Tr(y,ee,0,Le)>=E||Tr(y,ee,ye,0)>=E)}else if(y.type===Tn.o){if(ge=y.bounds,ee=ge.x,ae=ge.y,ue=ge.x+ge.width,ge=ge.y+ge.height,a.x>ue&&a.x<ee&&a.y>ge&&a.y<ae&&Zn(a.x,a.y,ee,ae,ee,ge)>E&&Zn(a.x,a.y,ee,ae,ue,ae)>E&&Zn(a.x,a.y,ue,ge,ee,ge)>E&&Zn(a.x,a.y,ue,ge,ue,ae)>E)return!1;if(ee=Math.sqrt(E),x){if(this.fill===null?Hl(y,a.x,a.y,ee):ua(y,a,ee,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(ee=x.s[y],ne=ee.startX,ye=ee.startY,a.zd(ne,ye)>E)return!1;for(ae=ee.segments.s,ue=ae.length,ge=0;ge<ue;ge++)switch(Le=ae[ge],Le.type){case Fo:case Ui:if(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E)return!1;break;case _o:var ze=er();if(Gt.Qe(ne,ye,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),_n(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case ds:if(ze=er(),Gt.ep(ne,ye,Le.point1X,Le.point1Y,Le.endX,Le.endY,.8,ze),ne=b(ze,a),_n(ze),ne||(ne=Le.endX,ye=Le.endY,a.zd(ne,ye)>E))return!1;break;case wo:case ws:ze=Le.type===wo?Ga(Le,ee):js(Le,ee,ne,ye);var We=ze.length;if(We===0){if(ne=Le.type===wo?Le.centerX:Le.endX,ye=Le.type===wo?Le.centerY:Le.endY,a.zd(ne,ye)>E)return!1;break}Le=null;for(var Je=er(),it=0;it<We;it++)if(Le=ze[it],Je.length=0,Gt.Qe(Le[0],Le[1],Le[2],Le[3],Le[4],Le[5],Le[6],Le[7],.8,Je),b(Je,a))return _n(Je),!1;_n(Je),Le!==null&&(ne=Le[6],ye=Le[7]);break;default:jt("Unknown Segment type: "+Le.type)}}return!0}}}return!1},qe.qc=function(){this.ua=null},qe.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ng,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=na):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ln(1-na.x,na.y)))}Hr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=vu[a.toArrow];else a.fromArrow!=="None"?b=vu[a.fromArrow]:(b=Gt.Ze[a.figure],typeof b=="string"&&(b=Gt.Ze[b]),b===void 0&&jt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Gt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=vu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=vu[x],y===void 0){var b=null,E;for(E in Gt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Tn.parse(Gt.um[b],!1),vu[b]=a,x!==b&&(vu[x]=b),b}}return typeof y=="string"?y:y instanceof Tn?a:null}zt.Object.defineProperties(Hr.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 b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),pa(this)&&(a=this.part,a!==null&&$i(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Tn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=lt.allocAt(-y.x,-y.y),lt.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&&Ff(a,"Shape.fill"),a instanceof Ai&&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&&Ff(a,"Shape.stroke"),a instanceof Ai&&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 Nn(a,"value >= 0",Hr,"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"?Nn(a,'"butt", "round", or "square"',Hr,"strokeCap"):(Xc(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"?Nn(a,'"miter", "bevel", or "round"',Hr,"strokeJoin"):(Xc(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){Xc(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,b=0,E=0;E<x;E++){var ee=a[E];0<=ee&&isFinite(ee)||jt("strokeDashArray:value "+ee+" at index "+E+" must be a positive number or zero."),b+=ee}if(b===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&&(Xc(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=Gt.Ze[a];typeof x=="function"?x=a:(x=Gt.Ze[a.toLowerCase()])||jt("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=y1(a);x===null?jt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(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=y1(a);x===null?jt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Vo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Vo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xc(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&&(Xc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Rr},set:function(a){var y=this.geometryStretch;y!==a&&(Xc(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 yu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Yl(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 yu),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 yu),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 yu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Hr.prototype.intersectsRect=Hr.prototype.Yc,Hr.prototype.containedInRect=Hr.prototype.fh,Hr.prototype.getNearestIntersectionPoint=Hr.prototype.rs,Hr.prototype.getDocumentBounds=Hr.prototype.mi,Hr.prototype.getDocumentPoint=Hr.prototype.ga;var vu=new pr,k0=new pr;Hr.className="Shape",Hr.getFigureGenerators=function(){var a=new tn,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Hr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Hr.getArrowheadGeometries=function(){var a=new tn;for(b in Gt.um)if(vu[b]===void 0){var y=Tn.parse(Gt.um[b],!1);vu[b]=y,y=b.toLowerCase(),y!==b&&(vu[y]=b)}for(var x in vu)if(x!==x.toLowerCase()){var b=vu[x];b instanceof Tn&&a.add(x,b)}return a.freeze(),a},Hr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Tn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||jt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=vu;b[a]=x,b[y]=a};function T0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Rr,this.gg=this.fg=Vo}T0.prototype.copy=function(){var a=new T0;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 Zi(a,y){return _t.call(this),Dm||(us=vo?new ll(null).context:null,Dm=!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}Kt(Zi,_t),Zi.prototype.cloneProtected=function(a){_t.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 ql(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}qe=Zi.prototype,qe.th=function(){_t.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(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}qe.qb=function(a){a.classType===Zi?this.wrap=a:_t.prototype.qb.call(this,a)},qe.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},qe.v=function(){_t.prototype.v.call(this)},qe.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,ee=x.height,ne=Yp(this),ae=a.textAlign=this.textAlign,ue=y.tn;ae==="start"?ae=ue?"right":"left":ae==="end"&&(ae=ue?"left":"right"),ue=this.isUnderline;var ge=this.isStrikethrough;yo(this,a,this.xc,!0,!1,x,b),(ue||ge)&&yo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Le=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var ze=y.scale;switch(8>(Le*Le+ye*ye)*ze*ze&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ps&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Le=this.spacingBelow,this.flip){case ci:a.translate(E,0),a.scale(-1,1);break;case Yr:a.translate(0,ee),a.scale(1,-1);break;case Ii:a.translate(E,ee),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,ze=(y+ne+Le)*ye,ee>ze&&(b=this.verticalAlignment,b=b.y*ee-b.y*ze+b.offsetY),ye===1&&this.ze!==null)Le=this.Cb,Le>E&&(Le=E),this.Oj(this.ze,a,0,b+y,E,ne,Le,x,ae,ue,ge);else if(this.Qc!==null&&this.Qb!==null)for(ze=0;ze<ye;ze++){var We=this.Qc[ze];We>E&&(We=E),b+=y,this.Oj(this.Qb[ze],a,0,b,E,ne,We,x,ae,ue,ge),b+=ne+Le}switch(this.flip){case ci:a.scale(-1,1),a.translate(-E,0);break;case Yr:a.scale(1,-1),a.translate(0,-ee);break;case Ii:a.scale(-1,-1),a.translate(-E,-ee)}}},qe.Oj=function(a,y,x,b,E,ee,ne,ae,ue,ge,ye){var Le=0;if(ae)ue==="left"?Le=0:ue==="right"?Le=E-ne:ue==="center"&&(Le=(E-ne)/2),y.fillRect(x+Le,b+.25*ee,ne,1);else{if(ue==="left"?Le=0:ue==="right"?Le=E:ue==="center"&&(Le=E/2),E=Am!==null?Am(this,ee):.75*ee,y.fillText(a,x+Le,b+E),a=ee/20|0,a===0&&(a=1),ue==="right"?Le-=ne:ue==="center"&&(Le-=ne/2),ge){ae=jm!==null?jm(this,ee):.8*ee,ue=x+Le,ge=b+ae,E=x+Le+ne,ae=b+ae;var ze=a;y.beginPath(),y.lineWidth=ze,y.moveTo(ue,ge),y.lineTo(E,ae),y.stroke(),y.Se(),y instanceof Ps&&y.ad.classList.add("gojs-td")}ye&&(ye=b+ee-ee/2.2|0,a%2!==0&&(ye+=.5),b=x+Le,ee=ye,x=x+Le+ne,ne=ye,Le=a,y.beginPath(),y.lineWidth=Le,y.moveTo(b,ee),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ps&&y.ad.classList.add("gojs-td"))}},qe.kk=function(a,y,x){if(!_t.prototype.kk.call(this,a,y,x))return!1;if(yo(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)$y(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,$y(a,y,!0);return!0},qe.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:_t.prototype.nk.call(this,a)},qe.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)}},qe.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var ee=this.Ae;us!==null&&k1!==ee&&(k1=us.font=ee),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(ee=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),ee.length===0)ee=8;else if(this.isMultiline){for(var ae=ne=0,ue=!1;!ue;){var ge=ee.indexOf(`
|
|
`,ae);ge===-1&&(ge=ee.length,ue=!0),ae=ee.substr(ae,ge-ae),this.formatting===Jp&&(ae=ae.trim()),ne=Math.max(ne,wl(ae)),ae=ge+1}ee=ne}else ne=ee.indexOf(`
|
|
`,0),0<=ne&&(ee=ee.substr(0,ne)),ee=wl(ee);ee=Math.min(ee,a/this.scale)}else ee=this.desiredSize.width;if(this.panel!==null&&(ee=Math.min(ee,this.panel.maxSize.width)),ne=w1(this,ee),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,ue=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,ge=this.spacingAbove+this.spacingBelow,ge=Math.max(0,Yp(this)+ge),ue=Math.min(this.maxLines-1,Math.max(Math.floor(ue/ge+.01)-1,0)),!(ue+1>=this.Qb.length))){for(this.l|=16777216,ge=this.Qb[ue],y=Math.max(1,a-y);wl(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=Qp,y=wl(ge),this.Qb[ue]=ge,this.Qb=this.Qb.slice(0,ue+1),this.Qc[ue]=y,this.Qc=this.Qc.slice(0,ue+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===b1||isNaN(this.desiredSize.width))&&(ee=isNaN(a)?this.Cb:Math.min(a,this.Cb)),ee=Math.max(x,ee),ne=Math.max(b,ne),vi(this.dc,ee,ne),this.Ge(0,0,ee,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},qe.eh=function(a,y,x,b){Ia(this,a,y,x,b)};function Xp(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 L0(a,y,x,b){var E=a.formatting===Jp;E&&(y=y.trim());var ee=0,ne=a.Ae,ae=a.spacingAbove+a.spacingBelow;ae=Math.max(0,Yp(a)+ae);var ue=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ae);else if(ne=y,a.wrap===M0){a.Le=1;var ge=wl(y);if(ue===0||ge<=x)a.Cb=Math.max(a.Cb,ge),Xp(a,y,a.Cb),b!==null&&b.h(ge,ae);else{for(ee=Ad(a,ne),ne=ne.substr(ee.length),y=Ad(a,ne),ge=wl(ee+y);0<y.length&&ge<=x;)ee+=y,ne=ne.substr(y.length),y=Ad(a,ne),ge=ee+y,E&&(ge=ge.trim()),ge=wl(ge);for(E&&(y=y.trim()),ee+=y,x=Math.max(1,x-ue);wl(ee)>x&&1<ee.length;)ee=ee.substr(0,ee.length-1);a.l|=16777216,ee+=Qp;var ye=wl(ee);a.Cb=ye,Xp(a,ee,ye),b!==null&&b.h(ye,ae)}}else{for(ue=0,ne.length===0&&(ue=1,Xp(a,ne,0));0<ne.length;){for(y=Ad(a,ne),ne=ne.substr(y.length);wl(y)>x;){var Le=1;for(ge=wl(y.substr(0,Le)),ye=0;ge<=x;)Le++,ye=ge,ge=wl(y.substr(0,Le));if(Le===1){var ze=ge;ee=Math.max(ee,ge)}else ze=ye,ee=Math.max(ee,ye);if(Le--,1>Le&&(Le=1),Xp(a,y.substr(0,Le),ze),ue++,y=y.substr(Le),a.Gc+ue>a.maxLines)break}for(ye=Ad(a,ne),ge=wl(y+ye);0<ye.length&&ge<=x;)y+=ye,ne=ne.substr(ye.length),ye=Ad(a,ne),ge=y+ye,E&&(ge=ge.trim()),ge=wl(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Le=ge,ee=Math.max(ee,ge)):(Le=ye=wl(y),ee=Math.max(ee,ye)),Xp(a,y,Le),ue++,a.Gc+ue>a.maxLines))break}a.Le=Math.min(a.maxLines,ue),a.Cb=Math.max(a.Cb,ee),b!==null&&b.h(a.Cb,ae*a.Le)}}function Ad(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function wl(a){return us===null?8*a.length:us.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(us===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>E1?x=j0[y]:(x=1.3*us.measureText("M").width,j0[y]=x,E1++),a.df=x}function x1(a){if(us===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=us.measureText(Qp).width,Fm[a]=y,O0++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Yp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var ee=a.Gc=0,ne,ae=!1;!ae;){if(ne=x.indexOf(`
|
|
`,ee),ne===-1&&(ne=x.length,ae=!0),ee<=ne){if(ee=x.substr(ee,ne-ee),a.wrap!==M0){a.Le=0;var ue=mn.alloc();L0(a,ee,y,ue),E+=ue.height,mn.free(ue),a.Gc+=a.Le}else L0(a,ee,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ae=!0)}ee=ne+1}return a.Lq=E}zt.Object.defineProperties(Zi.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"||(ql(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:gn},set:function(a){var y=this.flip;y!==a&&(ql(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:iu},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),ql(this),this.da.Yr=a,Za(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=mn.alloc();L0(this,this.ec,999999,a);var y=a.width;mn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),vi(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:N0},set:function(a){var y=this.wrap;y!==a&&(ql(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:A0},set:function(a){var y=this.overflow;y!==a&&(ql(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&&Ff(a,"TextBlock.stroke"),a instanceof Ai&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(ql(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&&(ql(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 yu),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 yu),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 yu),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 yu),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 yu),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&&(ql(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&&(ql(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&&(ql(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&&(ql(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Jp},set:function(a){var y=this.formatting;y!==a&&(ql(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&&Nn(a,"> 0",Zi,"maxLines"),ql(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Am=null,jm=null,M0=new hn(Zi,"None",0),b1=new hn(Zi,"WrapFit",1),N0=new hn(Zi,"WrapDesiredSize",2),P1=new hn(Zi,"WrapBreakAll",3),A0=new hn(Zi,"OverflowClip",0),Om=new hn(Zi,"OverflowEllipsis",1),Jp=new hn(Zi,"FormatTrim",0),C1=new hn(Zi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new pr,E1=0,Fm=new pr,O0=0,Qp="...",k1="",us=null,Dm=!1;Zi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=gn,this.gq=Jp,this.Jq=1/0,this.$q=A0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=iu,this.$r=N0}F0.prototype.copy=function(){var a=new F0;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},Zi.getEllipsis=function(){return Qp},Zi.setEllipsis=function(a){Qp=a,Fm=new pr,O0=0},Zi.getBaseline=function(){return Am},Zi.setBaseline=function(a){Am=a},Zi.getUnderline=function(){return jm},Zi.setUnderline=function(a){jm=a},Zi.isValidFont=function(a){if(Dm||(us=vo?new ll(null).context:null,Dm=!0),us===null)return!0;var y=us.font;if(a===y||a==="10px sans-serif")return!0;us.font="10px sans-serif",us.font=a;var x=us.font;if(x!=="10px sans-serif")return us.font=y,!0;us.font="19px serif";var b=us.font;return us.font=a,x=us.font,us.font=y,x!==b},Zi.FormatNone=C1,Zi.FormatTrim=Jp,Zi.None=M0,Zi.OverflowClip=A0,Zi.OverflowEllipsis=Om,Zi.WrapBreakAll=P1,Zi.WrapDesiredSize=N0,Zi.WrapFit=b1;function yu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}yu.prototype.copy=function(){var a=new yu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},yu.className="GradElementSettings";function hs(a,y){_t.call(this),this.Eg=null,this.qo="",this.Xg=Aa,this.Nk=yn,this.Zg=this.Hd=null,this.Mk=ai,this.Xf=gn,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 jd;Kt(hs,_t),hs.prototype.cloneProtected=function(a){_t.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},hs.prototype.qb=function(a){a===gn||a===hr||a===ri?this.imageStretch=a:_t.prototype.qb.call(this,a)},hs.prototype.toString=function(){return"Picture("+this.source+")#"+Gr(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new pr,Bm=0)}function T1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var ee=y.getAttribute("src")||"",ne=E.Og.I(ee);if(ne!==null)for(var ae=ne.length,ue=0;ue<ae;ue++)ee=ne[ue],E.Xn.add(ee),ee.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),ee.Zg!==null&&ee.Zg(ee,x))}y.Bg.clear()}a.desiredSize.w()||(Bo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,ee=y.getAttribute("src")||"",ne=E.Og.I(ee);if(ne!==null){E=ne.length,ee=er();for(var ae=0;ae<E;ae++)ee.push(ne[ae]);if(y.hn)for(ae=0;ae<E;ae++)ne=ee[ae],ne.Hd!==null&&ne.Hd(ne,x);_n(ee)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}hs.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},hs.prototype.redraw=function(){this.N(),this.Uc=!0},hs.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Vc)){var E=a instanceof Ps;b=this.naturalBounds;var ee=0,ne=0,ae=this.qn,ue=ae?+x.width:x.naturalWidth;if(ae=ae?+x.height:x.naturalHeight,ue===void 0&&x.videoWidth&&(ue=x.videoWidth),ae===void 0&&x.videoHeight&&(ae=x.videoHeight),ue=ue||b.width,ae=ae||b.height,ue!==0&&ae!==0){var ge=ue,ye=ae;this.sourceRect.w()&&(ee=this.Xg.x,ne=this.Xg.y,ue=this.Xg.width,ae=this.Xg.height);var Le=ue,ze=ae,We=this.Nk,Je=this.Mk;switch(We){case gn:if(this.sourceRect.w())break;Le>=b.width&&(ee=ee+Je.offsetX+(Le*Je.x-b.width*Je.x)),ze>=b.height&&(ne=ne+Je.offsetY+(ze*Je.y-b.height*Je.y)),ue=Math.min(b.width,Le),ae=Math.min(b.height,ze);break;case yn:Le=b.width,ze=b.height;break;case hr:case ri:We===hr?(We=Math.min(b.height/ze,b.width/Le),Le*=We,ze*=We):We===ri&&(We=Math.max(b.height/ze,b.width/Le),Le*=We,ze*=We,Le>=b.width&&(ee=(ee+Je.offsetX+(Le*Je.x-b.width*Je.x)/Le)*ue),ze>=b.height&&(ne=(ne+Je.offsetY+(ze*Je.y-b.height*Je.y)/ze)*ae),ue*=1/(Le/b.width),ae*=1/(ze/b.height),Le=b.width,ze=b.height)}We=this.Df()*y.scale;var it=Le*We*ze*We,Tt=ue*ae/it,Pt=x.__goCache;We=null;var Nt=wx;if(!E){if(x.sq&&Pt!==void 0&&4<it&&Tt>Nt*Nt)for(Pt.gi===null&&(M1(Pt,4,ge,ye,x),M1(Pt,16,ge,ye,x)),E=Pt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<Tt;ye++)We=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new ll(null).context;try{E.drawImage(this.Eg,0,0)}catch(At){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(At){this.vl=!0}}if(this.vl)return}}switch(E=Le<b.width?Je.offsetX+(b.width*Je.x-Le*Je.x):0,Je=ze<b.height?Je.offsetY+(b.height*Je.y-ze*Je.y):0,this.flip){case ci:a.translate(Math.min(b.width,Le),0),a.scale(-1,1);break;case Yr:a.translate(0,Math.min(b.height,ze)),a.scale(1,-1);break;case Ii:a.translate(Math.min(b.width,Le),Math.min(b.height,ze)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Pt!==void 0&&We!==null&&We.ratio!==1){a.save(),y=We.ratio;try{a.drawImage(We.source,ee/y,ne/y,Math.min(We.source.width,ue/y),Math.min(We.source.height,ae/y),E,Je,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof Ps&&(this.bt=[ee/y,ne/y,Math.min(We.source.width,ue/y),Math.min(We.source.height,ae/y),E,Je,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(At){this.en=!1}a.restore()}else try{a.drawImage(x,ee,ne,ue,ae,E,Je,Math.min(b.width,Le),Math.min(b.height,ze)),a instanceof Ps&&(this.bt=[ee,ne,ue,ae,E,Je,Math.min(b.width,Le),Math.min(b.height,ze)])}catch(At){this.en=!1}switch(this.flip){case ci:a.scale(-1,1),a.translate(-Math.min(b.width,Le),0);break;case Yr:a.scale(1,-1),a.translate(0,-Math.min(b.height,ze));break;case Ii:a.scale(-1,-1),a.translate(-Math.min(b.width,Le),-Math.min(b.height,ze))}}}}},hs.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,ee=ls(this,!0),ne=this.Eg,ae=this.qn,ue=0,ge=0;(ae||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(ue=ae?+ne.width:ne.naturalWidth,ge=ae?+ne.height:ne.naturalHeight),isFinite(E.width)||ee===yn||ee===mr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=ue)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ue),isFinite(E.height)||ee===yn||ee===Er?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ge)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ge),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,ee=this.minSize,x=Math.max(x||0,ee.width),b=Math.max(b||0,ee.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),vi(this.dc,a,y),this.Ge(0,0,a,y)},hs.prototype.eh=function(a,y,x,b){Ia(this,a,y,x,b)},zt.Object.defineProperties(hs.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||jt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Np(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new an),b!==null&&x&&qh(b,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()||(Bo(this,!1),this.v())):x&&T1(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=jd;if(vo){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=Xn("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new L1),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}}}),hs.prototype.redraw=hs.prototype.redraw,hs.prototype.reloadSource=hs.prototype.hA;var Bm=0,wx=4;hs.className="Picture",jd=new pr,hs.clearCache=Od;function L1(){this.gi=null}function M1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var ee=new ll(null),ne=ee.context,ae=1/y;ee.width=x/y,ee.height=b/y,ee.width!==0&&ee.height!==0&&(y=new N1(ee.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(ae*x,0,0,ae*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new Tn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Tn,this.mc=null};function Dd(a,y,x,b,E,ee){a.mc=new Oo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=ee||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Fd.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new gi(Fo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Fd.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new gi(Ui);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function wh(a,y,x,b,E,ee,ne){var ae;ae===void 0&&(ae=!1);var ue=new gi(_o);ue.point1X=y,ue.point1Y=x,ue.point2X=b,ue.point2Y=E,ue.endX=ee,ue.endY=ne,ae&&ue.close(),a.mc.segments.add(ue)}function Im(a,y,x,b,E){var ee;ee===void 0&&(ee=!1);var ne=new gi(ds);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,ee&&ne.close(),a.mc.segments.add(ne)}Fd.prototype.arcTo=function(a,y,x,b,E,ee,ne){ee===void 0&&(ee=0),ne===void 0&&(ne=!1);var ae=new gi(wo);ae.startAngle=a,ae.sweepAngle=y,ae.centerX=x,ae.centerY=b,ae.radiusX=E,ae.radiusY=ee!==0?ee:E,ne&&ae.close(),this.mc.segments.add(ae)};function Px(a,y,x,b,E,ee,ne,ae){var ue;ue===void 0&&(ue=!1),y=new gi(ws,ne,ae,y,x,b,E,ee),ue&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Rm=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Tn(Tn.u),b.endX=y,b.endY=x,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Tn(Tn.u),b.endX=y,b.endY=x,b.defaultStretch=hr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("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 b="rr"+y+","+x+","+a,E=Gt.Mf[b];if(E!==void 0)return E;var ee=a*Gt.wg;return E=new Tn().add(new Oo(a,0,!0).add(new gi(Ui,y-a,0)).add(new gi(_o,y,a,y-ee,0,y,ee)).add(new gi(Ui,y,x-a)).add(new gi(_o,y-a,x,y,x-ee,y-ee,x)).add(new gi(Ui,a,x)).add(new gi(_o,0,x-a,ee,x,0,x-ee)).add(new gi(Ui,0,a)).add(new gi(_o,a,0,0,ee,ee,0).close())),1<ee&&(E.spot1=new Ln(0,0,ee,ee),E.spot2=new Ln(1,1,-ee,-ee)),Gt.Nf<Gt.vm&&(Gt.Mf[b]=E,Gt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Tn(Tn.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Bi,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Tn(Tn.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Bi,b.defaultStretch=hr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new Tn().add(new Oo(0,0).add(new gi(Ui,y,.5*x)).add(new gi(Ui,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new Tn().add(new Oo(0,0).add(new gi(Ui,y,0)).add(new gi(Ui,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new Tn().add(new Oo(y,x).add(new gi(Ui,0,.5*x)).add(new gi(Ui,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new Tn().add(new Oo(y,x).add(new gi(Ui,0,x)).add(new gi(Ui,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new Tn().add(new Oo(.5*y,0).add(new gi(Ui,0,.5*x)).add(new gi(Ui,.5*y,x)).add(new gi(Ui,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new Tn(Tn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Na("LineV",function(a,y,x){return a=new Tn(Tn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new Tn().add(new Oo(0,x/2,!1).add(new gi(Ui,y,x/2)).add(new gi(Fo,y/2,0)).add(new gi(Ui,y/2,x)))}),Na("XLine",function(a,y,x){return new Tn().add(new Oo(0,x,!1).add(new gi(Ui,y,0)).add(new gi(Fo,0,0)).add(new gi(Ui,y,x)))}),Na("LineRight",function(a,y,x){return new Tn().add(new Oo(.25*y,0,!1).add(new gi(Ui,.75*y,.5*x)).add(new gi(Ui,.25*y,x)))}),Na("LineDown",function(a,y,x){return new Tn().add(new Oo(0,.25*x,!1).add(new gi(Ui,.5*y,.75*x)).add(new gi(Ui,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new Tn().add(new Oo(.75*y,0,!1).add(new gi(Ui,.25*y,.5*x)).add(new gi(Ui,.75*y,x)))}),Na("LineUp",function(a,y,x){return new Tn().add(new Oo(0,.75*x,!1).add(new gi(Ui,.5*y,.25*x)).add(new gi(Ui,y,.75*x)))}),Gt.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 D0(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=hi,this.ir=null,this.jr="",this.lr=Vo,this.Gq="",this.Hq=Ei,this.Pq=Pn,this.Kq=In,this.Up=null,this.Cq=127,this.zr=Qn,this.yr="gray",this.Vg=4}D0.prototype.copy=function(){var a=new D0;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 Sr(a,y){a===void 0||a instanceof Go||typeof a=="string"?wn.call(this,a):(wn.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 lt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new $t,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Kt(Sr,wn),Sr.prototype.cloneProtected=function(a){wn.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},qe=Sr.prototype,qe.Af=function(a){wn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},qe.toString=function(){var a=sr(this.constructor)+"#"+Gr(this);return this.data!==null&&(a+="("+Fr(this.data)+")"),a};function cs(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}qe.th=function(){wn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},qe.gk=function(a,y,x,b,E,ee,ne){var ae=this.diagram;ae!==null&&(a===bo&&y==="elements"?E instanceof wn?Zc(E,function(ue){ly(ae.partManager,ue),_c(ae,ue)}):qh(ae,E):a===Eo&&y==="elements"&&(E instanceof wn?Zc(E,function(ue){uy(ae.partManager,ue,ae)}):Np(ae,E)),ae.cb(a,y,x,b,E,ee,ne))},qe.La=function(a){if(wn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof wn&&Zc(E,function(ee){ee.data!==null&&ee.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Sr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Sr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Sr.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new tn),y.Tf!==a&&(y.category=a),b.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)))}}},Sr.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Sr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=er();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);_n(y)}},Sr.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()}e:{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 Ir?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof mi))break e;ul(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=wn.Link),x.adornedObject=y)}if(x!==null){x.type===wn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Sr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function B0(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function _m(a){if(rc(a)===!1){R0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,rc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=$t.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),$t.free(b),R0(a,!1)}}Sr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new jr);var ee=this.Lb;ee.reset(),this.no(ee,a,y,x,b),this.Lb=ee,ee.ws()||ee.pp(E)},Sr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var ee=ai;this.locationSpot.sb()&&(ee=this.locationSpot);var ne=lt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,ee),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),ee=y.panel;ee!==null&&ee!==this;)ee.Lb!==null&&ee.Lb.Ga(ne),ne.offset(-ee.measuredBounds.x,-ee.measuredBounds.y),ee=ee.panel;else ne.yi(y,x,b,E,ee);a.rotate(this.Kb,ne.x,ne.y),lt.free(ne)}},Sr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Sr.prototype.moveTo=function(a,y,x){a=lt.allocAt(a,y),this.move(a,x),lt.free(a)},Sr.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())},Sr.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())},Sr.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=wn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function bh(a,y,x,b){b===void 0&&(b=new lt),x=x.Mc()?ai:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}Sr.prototype.mi=function(a){return a===void 0&&(a=new $t),a.assign(this.actualBounds)},Sr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=lt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Hr?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/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 Jc(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var ee=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,ee+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?ee+=a.x:(b+=a.x,ee-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,ee+2,y+2),x}Sr.prototype.arrange=function(){if(Xa(this)===!1)j1(this);else{pu(this,!1);var a=this.Ib,y=$t.alloc();y.assign(a);var x=ic(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Gt.B(y.width,a.width)&&Gt.B(y.height,a.height)||0<=this.vw&&this.C(16),$t.free(y),R0(this,!1)}},qe=Sr.prototype,qe.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=$t.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),$t.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Pi(a,y)||(this instanceof Un&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},qe.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&F1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new lt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),rc(this)===!1&&Xa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof mi||(y=y.animationManager,y.zb&&ad(y,a,new lt(b,E),x))}qe.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Xa(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}_m(this)},qe.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,ee=x.w(),ne=y.w();ee&&ne?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):ee?B1(a,y,x,E,b):ne&&I1(a,y,x,E,b),a.G|=2097152,lt.free(b),a.Uk()}function B1(a,y,x,b,E){var ee=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof mi||ad(x,a,new lt(ee,ne),y),b||y.x===ee&&y.y===ne||a.g("position",new lt(ee,ne),y.copy()))}function I1(a,y,x,b,E){var ee=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(ee)||b===null||a.g("location",ee,x.copy())}function R1(a,y,x){_0(a,!1),a instanceof Un&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(Gi(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}qe.si=function(){return!0},qe.Zc=function(){return!0},qe.ph=function(){return!1},qe.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Yn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Yn(" Old class: "+sr(a.constructor)+", new class: "+sr(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var ee=a.isSelected,ne=a.isHighlighted,ae=!0,ue=!0,ge=!1;a instanceof Un&&(ae=a.isTreeLeaf,ue=a.isTreeExpanded,ge=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=ee?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Un&&(a.U=ae?a.U|4:a.U&-5,a.U=ue?a.U|1:a.U&-2,a.U=ge?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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 rc(a){return(a.G&32768)!==0}function R0(a,y){a.G=y?a.G|32768:a.G&-32769}function _0(a,y){a.G=y?a.G|65536:a.G&-65537}function ic(a){return(a.G&131072)!==0}qe=Sr.prototype,qe.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}qe.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},qe.N=function(){var a=this.diagram;a!==null&&!Xa(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N(Jc(this,this.Ib))},qe.v=function(){wn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Un&&this.labeledLink!==null&&Za(this.labeledLink),a.$b(!0))},qe.Vo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},qe.Wo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},qe.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},qe.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Un&&(y=y.labeledLink,y!==null)?z0(a,y):0}qe.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Un&&(x=y.labeledLink,x!==null)?_1(a,x):y}qe.Td=function(a){return a instanceof Ir?G0(this,this,a):!1};function G0(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!G0(a,b,x)?y instanceof Un&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}qe.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Ir&&zm(y,!0),y instanceof Un){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ir&&zm(y,!1),y instanceof Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Sr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Un&&this.isLinkLabel)},Sr.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof Un&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function oc(a,y,x,b,E,ee){if(ee===void 0&&(ee=null),!(a.contains(y)||ee!==null&&!ee(y)||y instanceof mi)){if(a.add(y),y instanceof Un){if(x&&y instanceof Ir)for(var ne=y.memberParts;ne.next();)oc(a,ne.value,x,b,E,ee);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var ue=ae.fromNode,ge=ae.toNode;ue=ue===null||a.contains(ue),ge=ge===null||a.contains(ge),(E?ue&&ge:ue||ge)&&oc(a,ae,x,b,E,ee)}}if(1<b)for(y=y.Ou();y.next();)oc(a,y.value,x,b-1,E,ee)}else if(y instanceof En)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,ee)}}zt.Object.defineProperties(Sr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Kr: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 b=y.pc(-1,this,!0);if(0<=b&&x.cb(Eo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(bo,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(cs(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&&ud(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 mi?this.type!==wn.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:Pn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),cs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:In},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),cs(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&&(cs(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:Ei},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),cs(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,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Xa(this)===!1&&(_m(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var ee=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,ee.x,ee.y),this.g("position",ee,x.copy())}}y=!0}y&&this.g("location",b,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,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof mi)){var ee=x.model.undoManager;ee.isEnabled&&!ee.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof mi?this instanceof mi&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(ee=x.model,ee.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(ul(x),x=x.copy(),x!==null&&I0(this,x,y,a))):(ee!==null&&ee.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(ul(x),x=x.copy(),x===null||x instanceof En||(b=this.location.copy(),I0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){I0(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 b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},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&&(cs(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&&(cs(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&&(cs(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof En?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(cs(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&&(cs(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&&(cs(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:hi},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(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:Vo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),cs(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&&jt("Cannot make a Group a member of itself: "+this.toString()),jt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?V0(y,this):this instanceof Ir&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(a,this):this instanceof Ir&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var ee=E.wa(a!==null?a.data:null);E.mp(b,ee)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof Ir){for(x=new an,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Un)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof Un){for(x=this.linksConnected;x.next();)Bd(x.value);x=this.labeledLink,x!==null&&Bd(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&ud(y,-1,a))}}else jt("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&&(cs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Un&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(cs(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&&(cs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Qn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Sr.prototype.invalidateLayout=Sr.prototype.C,Sr.prototype.findCommonContainingGroup=Sr.prototype.px,Sr.prototype.isMemberOf=Sr.prototype.Td,Sr.prototype.findTopLevelPart=Sr.prototype.sz,Sr.prototype.findSubGraphLevel=Sr.prototype.oz,Sr.prototype.ensureBounds=Sr.prototype.Va,Sr.prototype.getDocumentBounds=Sr.prototype.mi,Sr.prototype.findObject=Sr.prototype.fb,Sr.prototype.moveTo=Sr.prototype.moveTo,Sr.prototype.invalidateAdornments=Sr.prototype.Wb,Sr.prototype.clearAdornments=Sr.prototype.Ej,Sr.prototype.removeAdornment=Sr.prototype.Jf,Sr.prototype.addAdornment=Sr.prototype.bh,Sr.prototype.findAdornment=Sr.prototype.Pj,Sr.prototype.updateTargetBindings=Sr.prototype.La;var G1=!1;Sr.className="Part",Sr.LayoutNone=0,Sr.LayoutAdded=1,Sr.LayoutRemoved=2,Sr.LayoutShown=4,Sr.LayoutHidden=8,Sr.LayoutNodeSized=16,Sr.LayoutGroupLayout=32,Sr.LayoutNodeReplaced=64,Sr.LayoutStandard=127,Sr.LayoutAll=16777215;function mi(a,y){a===void 0||a instanceof Go||typeof a=="string"?Sr.call(this,a):(Sr.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)}Kt(mi,Sr),mi.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},mi.prototype.updateRelationshipsFromData=function(){},mi.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof En&&y instanceof Hr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof Hr&&(E.ua=a)}}},mi.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Xa(a))},mi.prototype.Zc=function(){return!1},mi.prototype.gk=function(a,y,x,b,E,ee,ne){if(a===bo&&y==="elements"){if(E instanceof Ja)this.$a===null&&(this.$a=E);else if(E instanceof wn){var ae=E.Nl(function(ue){return ue instanceof Ja});ae instanceof Ja&&this.$a===null&&(this.$a=ae)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof wn&&this.$a.rg(b)&&(this.$a=null));Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},mi.prototype.updateAdornments=function(){},mi.prototype.Lj=function(){},zt.Object.defineProperties(mi.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}}}),mi.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ci,this.er=Hm,this.Kr=this.ij=this.Nq=this.Mq=null}U0.prototype.copy=function(){var a=new U0;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Un(a,y){a===void 0||a instanceof Go||typeof a=="string"?Sr.call(this,a):(Sr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new rn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Kt(Un,Sr),Un.prototype.cloneProtected=function(a){Sr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},qe=Un.prototype,qe.Af=function(a){Sr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Ph(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}qe.th=function(){Sr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new an),a.af.add(y))}function H1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var ee=E.value;if(ee.Ds===a&&ee.cv===y&&ee.Ox===x&&ee.Px===b||ee.Ds===y&&ee.cv===a&&ee.Ox===b&&ee.Px===x)return ee}return null}qe.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},qe.gk=function(a,y,x,b,E,ee,ne){a===bo&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),Sr.prototype.gk.call(this,a,y,x,b,E,ee,ne)},qe.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Cs(x.fromPort),Cs(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Cs(x.fromPort),Cs(x.toPort),x.bb())}}function Cs(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Cs(y.port)}}qe.si=function(){return!0},Un.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Un.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Un.prototype.isVisible=function(){if(!Sr.prototype.isVisible.call(this))return!1;var a=!0,y=vh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===vh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Do){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wd&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Un.prototype.Zb=function(a){Sr.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Un.prototype.qx=function(){var a=new an,y=new an;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,ee=a.diagram;ee!==null&&(E=ee.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Un.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new qr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},qe=Un.prototype,qe.Mo=function(a){a===void 0&&(a=null);var y=new qr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},qe.Sd=function(a){a===void 0&&(a=null);var y=new qr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},qe.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new an,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Kr},qe.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Kr},qe.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new an,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Kr},qe.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new qr(this.jb),E=this;return b.predicate=function(ee){return!((ee.fromNode!==E||ee.toNode!==a||y!==null&&ee.fromPortId!==y||x!==null&&ee.toPortId!==x)&&(ee.fromNode!==a||ee.toNode!==E||x!==null&&ee.fromPortId!==x||y!==null&&ee.toPortId!==y))},b},qe.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new qr(this.jb),E=this;return b.predicate=function(ee){return!(ee.fromNode!==E||ee.toNode!==a||y!==null&&ee.fromPortId!==y||x!==null&&ee.toPortId!==x)},b};function Gm(a,y,x){Cs(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var ee=!0,ne=a.diagram;ne!==null&&(ee=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=ee)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,ee=b?x:y,E.ci||(E.ci=ee),!ee.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===ee&&(ee.isTreeLeaf=!1):y===ee&&(ee.isTreeLeaf=!1))))}function Um(a,y,x){Cs(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var ee=a.linkDisconnected;if(E=a.diagram,ee!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),ee(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.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,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):$p(y)))}function $p(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 b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Un.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},qe=Un.prototype,qe.Vo=function(a){Sr.prototype.Vo.call(this,a),a||($p(this),a=this.Yk,a!==null&&eS(a,this))},qe.Wo=function(a){Sr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},qe.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 b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Sr.prototype.Lj.call(this)},qe.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new tn:a.wc.clear(),a.qm(a,function(y,x){Z1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Z1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function H0(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=er()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);_n(x)}}}qe.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 b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},qe.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 b=x.value;if(b.isTreeLink&&(a=b.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()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},qe.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)zm(y,!1),y=y.pg();return x},qe.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},qe.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Un)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},qe.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new an;return a(this,y),y},qe.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}qe.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new qr(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},qe.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new rn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new rn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Qr(x):Kr},qe.wz=function(a){a===void 0&&(a=1/0);var y=new an;return oc(y,this,!1,a,!0),y},Un.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new an;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(a,y,x,b,E,ee,ne){if(1<b)for(var ae=x?a.Mo():a.Sd();ae.next();){var ue=ae.value;ue.isTreeLink&&(ue=ue.To(a),ue===null||ue===a||y.contains(ue)||(y.add(ue),Y1(ue,y,x,b-1,E,ee,ne)))}else J1(a,y,x,E,ee,ne)}function J1(a,y,x,b,E,ee){for(var ne=E===a?!0:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),ue={};ae.next();){var ge=ae.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var ye=y.contains(ge);if(ye||y.add(ge),ne){var Le=x?ge.Oo():ge.Po();ue.uv=a,Le.all(function(ze){return function(We){return We===ze.uv||!We.isTreeExpanded}}(ue))&&b.Aj(ge,E),ge.oh(),ge.Zb(!1)}ge.isTreeExpanded&&(ge.wasTreeExpanded=ge.isTreeExpanded,ye||J1(ge,y,x,b,E,ee))}ue={uv:ue.uv}}a.isTreeExpanded=!1}Un.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new an;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Q1(a,y,x,b,E,ee,ne){for(var ae=ee===a?!1:a.isTreeExpanded,ue=x?a.Mo():a.Sd(),ge={};ue.next();){var ye=ue.value;if(ye.isTreeLink&&(ae||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!ae){ye.Zb(!0),ye.oh();var Le=x?ye.Oo():ye.Po();ge.vv=a,Le.all(function(ze){return function(We){return We===ze.vv||!We.isTreeExpanded}}(ge))&&E.Cj(ye,ee)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,Q1(ye,y,x,b-1,E,ee,ne))}ge={vv:ge.vv}}a.isTreeExpanded=!0}zt.Object.defineProperties(Un.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Hm},set:function(a){var y=this.portSpreading;y!==a&&(Ph(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&&gh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ci},set:function(a){typeof a=="number"&&(a=new Ur(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Ph(this),this.Ba.yp=a;var x=this.diagram;x!==null&&gh(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&&(Ph(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&&(Ph(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&&(Ph(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,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,ee=x.model;if(E!==null&&ee.ri()){var ne=ee.wa(b);ne!==void 0&&ee.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Za(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}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&&(Ph(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Un.prototype.expandTree=Un.prototype.expandTree,Un.prototype.collapseTree=Un.prototype.collapseTree,Un.prototype.findTreeParts=Un.prototype.wz,Un.prototype.findTreeChildrenNodes=Un.prototype.Ou,Un.prototype.findTreeChildrenLinks=Un.prototype.Qo,Un.prototype.findTreeLevel=Un.prototype.uz,Un.prototype.findTreeParentChain=Un.prototype.vz,Un.prototype.findTreeParentNode=Un.prototype.pg,Un.prototype.findTreeParentLink=Un.prototype.kh,Un.prototype.findCommonTreeParent=Un.prototype.gz,Un.prototype.findTreeRoot=Un.prototype.xz,Un.prototype.isInTreeOf=Un.prototype.Nz,Un.prototype.findPort=Un.prototype.ns,Un.prototype.findLinksTo=Un.prototype.kz,Un.prototype.findLinksBetween=Un.prototype.jz,Un.prototype.findNodesInto=Un.prototype.Oo,Un.prototype.findNodesOutOf=Un.prototype.Po,Un.prototype.findNodesConnected=Un.prototype.Mu,Un.prototype.findLinksInto=Un.prototype.Sd,Un.prototype.findLinksOutOf=Un.prototype.Mo,Un.prototype.findExternalTreeLinksConnected=Un.prototype.qx,Un.prototype.invalidateConnectedLinks=Un.prototype.Bd,Un.prototype.invalidateLinkBundle=Un.prototype.Lz;var Ex=new hn(Un,"SpreadingNone",10),Hm=new hn(Un,"SpreadingEvenly",11),W0=new hn(Un,"SpreadingPacked",12);Un.className="Node",Un.SpreadingNone=Ex,Un.SpreadingEvenly=Hm,Un.SpreadingPacked=W0;function Ir(a,y){a===void 0||a instanceof Go||typeof a=="string"?Un.call(this,a):(Un.call(this),a&&(y=a)),this.U|=4608,this.Gn=new an,this.$a=null,this.Sc=new so,this.Sc.group=this,this.gl=new an,this.tb=this.$p=null,y&&Object.assign(this,y)}Kt(Ir,Un),Ir.prototype.cloneProtected=function(a){Un.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ja});y instanceof Ja?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())},qe=Ir.prototype,qe.Af=function(a){Un.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof Un)x.Bd(y);else if(x instanceof En)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},qe.gk=function(a,y,x,b,E,ee,ne){if(a===bo&&y==="elements"){if(E instanceof Ja)this.$a===null?this.$a=E:this.$a!==E&&jt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof wn){var ae=E.Nl(function(ue){return ue instanceof Ja});ae instanceof Ja&&(this.$a===null?this.$a=ae:this.$a!==ae&&jt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof wn&&this.$a.rg(b)&&(this.$a=null));Un.prototype.gk.call(this,a,y,x,b,E,ee,ne)},qe.Xl=function(a,y){Un.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==wn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof wn&&(a=a.Pb()),this.tb===null&&(this.tb=new $t),a.mi(this.tb),a instanceof Hr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},qe.eh=function(a,y,x,b){this.nf=this.$a,Un.prototype.eh.call(this,a,y,x,b)},qe.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof En||y.Va()}),Un.prototype.Va.call(this)},qe.si=function(){if(!Un.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Un){if(y.isVisible()&&Xa(y))return!1}else if(y instanceof En&&y.isVisible()&&Xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(a,y){if(a.Gn.add(y)){y instanceof Ir&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function V0(a,y){if(a.Gn.remove(y)){y instanceof Ir&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}qe.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Un.prototype.Lj.call(this)},Ir.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=nn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ir.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=nn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Ir.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))},qe=Ir.prototype,qe.Bd=function(a){var y=(this.U&65536)!==0;if(Un.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Cs(x.fromPort),Cs(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Cs(x.fromPort),Cs(x.toPort),x.bb()))}}},qe.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 an,b=y.iterator;b.next();){var E=b.value;if(E instanceof Un)for(E=E.linksConnected;E.next();){var ee=E.value;y.contains(ee)||x.add(ee)}}return a&&(this.$p=x),x.iterator},qe.iz=function(){var a=this.Rj();a.add(this);for(var y=new an,x=a.iterator;x.next();){var b=x.value;if(b instanceof Un)for(b=b.linksConnected;b.next();){var E=b.value,ee=E.fromNode;ee===null||a.contains(ee)&&ee!==this||y.add(ee),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},qe.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new an;return a(this,y),y},qe.Rj=function(){var a=new an;return oc(a,this,!0,0,!0),a.remove(this),a},qe.Zb=function(a){Un.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ir.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,b){for(var E=a.memberParts;E.next();){var ee=E.value;if(ee.Zb(!1),ee instanceof Ir&&ee.isSubGraphExpanded&&(ee.wasSubGraphExpanded=ee.isSubGraphExpanded,$1(ee,y,x,b)),ee instanceof Un)ee.Bd(y),x.Aj(ee,b);else if(ee instanceof En)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!1}Ir.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var ee=E.value;if(ee.Zb(!0),ee instanceof Ir&&ee.wasSubGraphExpanded&&(ee.wasSubGraphExpanded=!1,q1(ee,y,x,b)),ee instanceof Un)ee.Bd(y),x.Cj(ee,b);else if(ee instanceof En)for(ee=ee.labelNodes;ee.next();)ee.value.Bd(y)}a.isSubGraphExpanded=!0}Ir.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,ee=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===ee||isNaN(x)&&isNaN(ee))){for(b=E-(isNaN(b)?0:b),x=ee-(isNaN(x)?0:x),ee=lt.alloc(),Un.prototype.move.call(this,a,y),a=new an,y=this.Rj().iterator;y.next();)E=y.value,E instanceof En&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof Un&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(ee.x=ne.x+b,ee.y=ne.y+x,E.position=ee):ae.w()&&(ee.x=ae.x+b,ee.y=ae.y+x,E.location=ee)}for(y.reset();y.next();)E=y.value,E instanceof En&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,ee.x=ne.x+b,ee.y=ne.y+x,ee.w()?E.move(ee):E.bb(),X0(E)&&E.bb());lt.free(ee)}},zt.Object.defineProperties(Ir.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&&jt("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&&(Ph(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&&(Ph(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&&(Ph(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.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&&(Ph(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)}}}),Ir.prototype.expandSubGraph=Ir.prototype.expandSubGraph,Ir.prototype.collapseSubGraph=Ir.prototype.collapseSubGraph,Ir.prototype.findSubGraphParts=Ir.prototype.Rj,Ir.prototype.findContainingGroupChain=Ir.prototype.hz,Ir.prototype.findExternalNodesConnected=Ir.prototype.iz,Ir.prototype.findExternalLinksConnected=Ir.prototype.Lu,Ir.prototype.ensureBounds=Ir.prototype.Va,Ir.className="Group";function Ja(a){_t.call(this),this.yb=Qo,this.ko=new $t(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Kt(Ja,_t),Ja.prototype.cloneProtected=function(a){_t.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return qi(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ir||a instanceof mi)||jt("Placeholder is not inside a Group or Adornment."),a instanceof Ir){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(vi(b,(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,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=lt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),lt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,ee=a.adornedObject;a.angle=ee.li();var ne=0;ee instanceof Hr&&(ne=ee.strokeWidth);var ae=ee.Df(),ue=ee.naturalBounds,ge=(ue.width+ne)*ae;ne=(ue.height+ne)*ae,a.type!==wn.Link&&(ae=ee.ga(a.category==="Selection"?Ei:a.locationSpot,lt.alloc()),a.location=ae,lt.free(ae)),isNaN(ge)||isNaN(ne)?(a=ee.ga(Ei,lt.alloc()),ge=$t.allocAt(a.x,a.y,0,0),ge.Ye(ee.ga(io,a)),ge.Ye(ee.ga(ba,a)),ge.Ye(ee.ga(Ko,a)),vi(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),lt.free(a),$t.free(ge)):(vi(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ir&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=$t.alloc(),E=this.computeMemberBounds(x);var ee=this.yb;return y instanceof Ir&&!y.isSubGraphExpanded?a.h(E.x-ee.left,E.y-ee.top,0,0):a.h(E.x-ee.left,E.y-ee.top,Math.max(E.width+ee.left+ee.right,0),Math.max(E.height+ee.top+ee.bottom,0)),$t.free(x),b&&y instanceof Ir&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ir))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,ee=-1/0,ne=y.memberParts;ne.next();){var ae=ne.value;if(ae.isVisible()){if(ae instanceof En&&(!y.computesBoundsIncludingLinks||Bs(ae)||ae.fromNode===y||ae.toNode===y))continue;ae=ae.actualBounds,ae.left<x&&(x=ae.left),ae.top<b&&(b=ae.top),ae.right>E&&(E=ae.right),ae.bottom>ee&&(ee=ae.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,ee-b):(y=y.location,a.h(y.x,y.y,0,0)),a},zt.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ur(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function En(a){Sr.call(this,wn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Qa,this.Om=0,this.Qm=Qa,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new rn().freeze(),this.Tg=this.Mg=null,this.ml=new $t,this.ua=new Tn,this.u=this.o=this.Sf=this.Wf=null,this.su=new lt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Kt(En,Sr),En.prototype.cloneProtected=function(a){Sr.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())},qe=En.prototype,qe.Af=function(a){Sr.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&&Cs(y),a=a.toPort,a!==null&&Cs(a)},qe.qb=function(a){a.classType===En?(a.value&2)===2?this.routing=a:a===Rs||a===Eh||a===Rd?this.curve=a:a===tg||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==Qa&&jt("Unknown Link enum value for a Link property: "+a):Sr.prototype.qb.call(this,a)},qe.Xc=function(){this.ba===null&&(this.ba=new Gp)},qe.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Xa(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Xa(a)||rc(a)))},qe.zv=function(){return!1},qe.Av=function(){},qe.Zc=function(){return!1},En.prototype.computeAngle=function(a,y,x){return En.computeAngle(y,x)},En.computeAngle=function(a,y){switch(a){default:case Qa:a=0;break;case ng:a=y;break;case rg:a=y+90;break;case ig:a=y-90;break;case $0:a=y+180;break;case Qm:a=Gt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=Gt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=Gt.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=Gt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Gt.bp(a)};function Bd(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&V0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var ee=!0,ne=a.diagram;ne!==null&&(ee=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=ee)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}qe=En.prototype,qe.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Sr.prototype.oh.call(this)},qe.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},qe.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new an),a.wd.add(y),a.v()}qe.Vo=function(a){if(Sr.prototype.Vo.call(this,a),Qc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}qp(this)}},qe.Wo=function(a){if(Sr.prototype.Wo.call(this,a),Qc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}eg(this)}},qe.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},En.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},En.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?Sr.prototype.move.call(this,a,!1):(a=lt.allocAt(x.x+b,x.y+E),Sr.prototype.move.call(this,a,!1),lt.free(a)),Ch(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},En.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},En.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(ar),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Rs))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()===Rs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Gt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var ee=this.i(x+2);x=this.i(x+3),Gt.ax(b.x,b.y,E.x,E.y,ee.x,ee.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=ee=b=0;b<x/2&&ee<y&&(E=ne[ee],!(b+E>x/2));)b+=E,ee++;return y=this.i(ee),ee=this.i(ee+1),1>Math.abs(y.x-ee.x)?y.y>ee.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-ee.y)?y.x>ee.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(ee.x-y.x),y.y+x*(ee.y-y.y))),a},En.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Rs))return this.ua.wx(.5);if(this.computeCurve()===Rs&&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 b=this.i(x+2);return x=this.i(x+3),Gt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var ee;E<b/2&&x<a&&(ee=y[x],!(E+ee>b/2));)E+=ee,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},qe=En.prototype,qe.i=function(a){return this.Nb.s[a]},qe.dd=function(a,y){this.Nb.cd(a,y)},qe.L=function(a,y,x){this.Nb.cd(a,new lt(y,x))},qe.Kz=function(a,y){this.Nb.Gb(a,y)},qe.m=function(a,y,x){this.Nb.Gb(a,new lt(y,x))},qe.ne=function(a){this.Nb.add(a)},qe.yf=function(a,y){this.Nb.add(new lt(a,y))},qe.pv=function(a){this.Nb.mb(a)},qe.Fj=function(){this.Nb.clear()};function Ch(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 b=a.fd,E=new rn,ee=a.Nb.iterator;ee.next();){var ne=ee.value;E.add(new lt(ne.x+y,ne.y+x).freeze())}E.freeze(),ee=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.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),Za(a)),b?Wm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ld(ne.animationManager,a,E),a.g("points",ee,E)}}qe.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},qe.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,ee=E.length,ne=0;ne<ee;ne++){var ae=E[ne];x=Math.min(ae.x,x),b=Math.min(ae.y,b)}ae=ne=1/0;for(var ue=y.s,ge=ue.length,ye=0;ye<ge;ye++){var Le=ue[ye];ne=Math.min(Le.x,ne),ae=Math.min(Le.y,ae),Le.freeze()}if(y.freeze(),ge===ee){for(ee=0;ee<ge;ee++)if(ye=E[ee],Le=ue[ee],ye.x-x!==Le.x-ne||ye.y-b!==Le.y-ae){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Wm(this),this.g("points",a,y)}},qe.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Wm(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),Xm(a,!1))}qe.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())}},qe.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},En.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(If||(If=new Un,If.desiredSize=dr,If.Va()),this.defaultFromPoint&&(If.location=this.defaultFromPoint,If.Va(),y=a=If)):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 b=this.toNode,E=null;if(b===null?(Rf||(Rf=new Un,Rf.desiredSize=dr,Rf.Va()),this.defaultToPoint&&(Rf.location=this.defaultToPoint,Rf.Va(),E=b=Rf)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var ee=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ae=Id(ne),ue=Id(x),ge=y===E&&y!==null,ye=this.isOrthogonal,Le=this.curve===Rs;this.Wf=ge&&!ye?Le=!0:!1;var ze=this.computeAdjusting()===Qa||ge;if(!ye&&!ge&&ae&&ue){if(ae=!1,!ze&&3<=ee&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),ue=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=this.adjustPoints(0,ze,ee-1,ue))&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),ue=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,ze,ee-1,ue)),!ae)if(this.Fj(),Le){ee=this.getLinkPoint(a,y,ne,!0,!1,b,E),ze=this.getLinkPoint(b,E,x,!1,!1,a,y),ae=ze.x-ee.x,ue=ze.y-ee.y,ge=this.computeCurviness(),Le=ye=0;var We=ee.x+ae/3,Je=ee.y+ue/3,it=We,Tt=Je;Gt.B(ue,0)?Tt=0<ae?Tt-ge:Tt+ge:(ye=-ae/ue,Le=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Le=-Le),it=(0>ue?-1:1)*Le+We,Tt=ye*(it-We)+Je),We=ee.x+2*ae/3,Je=ee.y+2*ue/3;var Pt=We,Nt=Je;Gt.B(ue,0)?Nt=0<ae?Nt-ge:Nt+ge:(Pt=(0>ue?-1:1)*Le+We,Nt=ye*(Pt-We)+Je),this.Fj(),this.ne(ee),this.yf(it,Tt),this.yf(Pt,Nt),this.ne(ze),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else ee=b,ze=E,b=this.getLinkPoint(a,y,ne,!0,!1,ee,ze),E=this.getLinkPoint(ee,ze,x,!1,!1,a,y),this.hasCurviness()?(ze=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+ze/2,y=b.y+x/2,ee=a,ae=y,Gt.B(x,0)?ae=0<ze?ae-ne:ae+ne:(ze=-ze/x,ee=Math.sqrt(ne*ne/(ze*ze+1)),0>ne&&(ee=-ee),ee=(0>x?-1:1)*ee+a,ae=ze*(ee-a)+y),this.ne(b),this.yf(ee,ae),this.ne(E)):(this.ne(b),this.ne(E),ae=$t.alloc(),y.mi(ae),ue=ae.ca(E),ze.mi(ae),ge=ae.ca(b),(ue||ge)&&(ne=y.ga(Vm(ne),new lt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=ze.ga(Vm(x),new lt),this.dd(1,this.getLinkPointFromPoint(ee,ze,x,b,!1,x))),$t.free(ae))}else{Le=this.isAvoiding,ze&&(ye&&Le||ge)&&this.Fj();var At=ge?this.computeCurviness():0;Le=this.getLinkPoint(a,y,ne,!0,ye,b,E),We=it=Je=0,(ye||!ae||ge)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),We=this.getLinkDirection(a,y,Le,ne,!0,ye,b,E),ge&&(ae||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(We-=ye?90:30,0>At&&(We-=180)),0>We?We+=360:360<=We&&(We-=360),ge&&(Tt+=Math.abs(At)*(ye?1:2)),We===0?Je=Tt:We===90?it=Tt:We===180?Je=-Tt:We===270?it=-Tt:(Je=Tt*Math.cos(We*Math.PI/180),it=Tt*Math.sin(We*Math.PI/180)),ne.Mc()&&ge&&(Tt=y.ga(ai,lt.alloc()),Pt=lt.allocAt(Tt.x+1e3*Je,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,Pt,!0,Le),lt.free(Tt),lt.free(Pt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Bt=Nt=Pt=0;if(ye||!ue||ge){var Rt=this.computeEndSegmentLength(b,E,x,!1);Bt=this.getLinkDirection(b,E,Tt,x,!1,ye,a,y),ge&&(ue||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Bt+=ye?0:30,0>At&&(Bt+=180)),0>Bt?Bt+=360:360<=Bt&&(Bt-=360),ge&&(Rt+=Math.abs(At)*(ye?1:2)),Bt===0?Pt=Rt:Bt===90?Nt=Rt:Bt===180?Pt=-Rt:Bt===270?Nt=-Rt:(Pt=Rt*Math.cos(Bt*Math.PI/180),Nt=Rt*Math.sin(Bt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(ai,lt.alloc()),ne=lt.allocAt(x.x+1e3*Pt,x.y+1e3*Nt),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),lt.free(x),lt.free(ne))}x=Le,(ye||!ae||ge)&&(x=new lt(Le.x+Je,Le.y+it)),ne=Tt,(ye||!ue||ge)&&(ne=new lt(Tt.x+Pt,Tt.y+Nt)),!ze&&!ye&&ae&&3<ee&&this.adjustPoints(0,Le,ee-2,ne)?this.dd(ee-1,Tt):!ze&&!ye&&ue&&3<ee&&this.adjustPoints(1,x,ee-1,Tt)?this.dd(0,Le):!ze&&(ye?6<=ee:4<ee)&&this.adjustPoints(1,x,ee-2,ne)?(this.dd(0,Le),this.dd(ee-1,Tt)):(this.Fj(),this.ne(Le),(ye||!ae||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,We,ne,Bt,a,b),(ye||!ue||ge)&&this.ne(ne),this.ne(Tt))}return!0};function Z0(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}En.prototype.getLinkPointFromPoint=function(a,y,x,b,E,ee){if(ee===void 0&&(ee=new lt),a===null||y===null)return ee.assign(x),ee;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var ae=-a.m12*E,ue=-a.m21*E,ge=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Le=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*ue+ye,b=b.x*ae+b.y*ge+Le,ne=x.x*ne+x.y*ue+ye,x=x.x*ae+x.y*ge+Le}return y.Sj(E,b,ne,x,ee),a!==null&&ee.transform(a),ee};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}En.prototype.getLinkPoint=function(a,y,x,b,E,ee,ne,ae){if(ae===void 0&&(ae=new lt),x.sb()&&!Id(x))return y.ga(x,ae),ae;if(x.$c()){var ue=Km(this,y);if(ue!==null){if(ae.assign(ue.Zo),E&&this.routing===nS){var ge=Km(this,ne);if(ge!==null&&ue.Gl<ge.Gl){ue=lt.alloc(),ge=lt.alloc();var ye=new $t(y.ga(Ei,ue),y.ga(io,ge)),Le=this.computeSpot(!b,ne);a=this.getLinkPoint(ee,ne,Le,!b,E,a,y,ge),(x.Hf(is)||x.Hf(fo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?ae.y=a.y:(x.Hf(Pa)||x.Hf(os))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(ae.x=a.x),lt.free(ue),lt.free(ge)}}return ae}}return x=y.ga(Vm(x),lt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Z0(x,ne.copy()))):(ue=this.computeSpot(!b,ne),ee=lt.alloc(),ne=ne.ga(Vm(ue),ee),E&&(ne=Z0(x,ne)),lt.free(ee)),this.getLinkPointFromPoint(a,y,x,ne,b,ae),lt.free(x),ae},En.prototype.getLinkDirection=function(a,y,x,b,E,ee,ne,ae){e:if(b.sb())var ue=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(ue=Km(this,y),ue!==null))switch(ue.Nc){case 1:ue=270;break e;case 2:ue=180;break e;default:case 4:ue=0;break e;case 8:ue=90;break e}ue=y.ga(ai,lt.alloc()),this.pointsCount>(ee?6:2)?(ae=E?this.i(1):this.i(this.pointsCount-2),ae=ee?Z0(ue,ae.copy()):x):(x=lt.alloc(),ae=ae.ga(ai,x),lt.free(x)),x=Math.abs(ae.x-ue.x)>Math.abs(ae.y-ue.y)?ae.x>=ue.x?0:180:ae.y>=ue.y?90:270,lt.free(ue),ue=x}return b.Mc()&&ne.Td(a)&&(ue+=180,360<=ue&&(ue-=360)),Id(b)||(a=y.li(),a===0)||(45<=a&&135>a?ue+=90:135<=a&&225>a?ue+=180:225<=a&&315>a&&(ue+=270),360<=ue&&(ue-=360)),ue},En.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Km(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},En.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=ai:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Vo?Vr:y)):(a=y||this.toPort,a===null?a=ai:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Vo?Vr:y)),a};function Id(a){return a===Vr||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:ai}En.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Qa&&4<this.pointsCount?this.computeMidPoint(new lt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(ai))},En.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},En.prototype.Cf=function(a,y,x,b,E,ee){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=ee;if(ee===void 0&&(ne=jr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),ee===void 0&&jr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var ue=this.O.s,ge=ue.length;ge--;){var ye=ue[ge];if(ye.visible||ye===this.locationObject){var Le=ye.actualBounds,ze=this.naturalBounds;if(!(Le.x>ze.width||Le.y>ze.height||0>Le.x+Le.width||0>Le.y+Le.height)){if(Le=jr.alloc(),Le.set(ne),ye instanceof wn)ae=ye.Cf(a,y,x,b,E,Le);else if(this.path===ye){if(ye instanceof Hr)if(ae=a,ze=b,ye.pickable===!1)ae=!1;else if(Le.multiply(ye.transform),ze)e:{var We=ae,Je=Le;if(ye.fh(We,Je))ae=!0;else{if(Je===void 0&&(Je=ye.transform,We.Re(ye.actualBounds))){ae=!0;break e}ae=We.left,ze=We.right;var it=We.top;We=We.bottom;var Tt=lt.alloc(),Pt=lt.alloc(),Nt=lt.alloc(),At=jr.alloc();At.set(Je),At.bv(ye.transform),At.Vj(),Pt.x=ze,Pt.y=it,Pt.transform(At),Tt.x=ae,Tt.y=it,Tt.transform(At),Je=!1,Yc(ye,Tt,Pt,Nt)?Je=!0:(Tt.x=ze,Tt.y=We,Tt.transform(At),Yc(ye,Tt,Pt,Nt)?Je=!0:(Pt.x=ae,Pt.y=We,Pt.transform(At),Yc(ye,Tt,Pt,Nt)?Je=!0:(Tt.x=ae,Tt.y=it,Tt.transform(At),Yc(ye,Tt,Pt,Nt)&&(Je=!0)))),jr.free(At),lt.free(Tt),lt.free(Pt),lt.free(Nt),ae=Je}}else ae=ye.fh(ae,Le)}else ae=Xo(ye,a,b,Le);ae&&(ze=ye,y!==null&&(ze=y(ye)),ze&&(x===null||x(ze))&&E.add(ze)),jr.free(Le)}}}return ee===void 0&&jr.free(ne),ae||this.background!==null||this.areaBackground!==null}return ee===void 0&&jr.free(ne),!1},En.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Rs:this.curve},En.prototype.computeCorner=function(){if(this.curve===Rs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},En.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},En.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,ee=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+ee.left+ee.right;E=isNaN(E.height)?14:E.height*b.scale+ee.top+ee.bottom,b=b.segmentOrientation,b===ng||b===Qm||b===$0?a=Math.max(a,E):b===ig||b===ag||b===rg||b===og?a=Math.max(a,ne):(y=y.ga(ai).ab(x.ga(ai))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Rs&&(a*=1.333)}}return a},En.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Qa&&x.bb()}},En.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=er(),b=0,E=y.links,ee=0;ee<E.length;ee++){var ne=E[ee].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,ee=0;ee<E.length;ee++){if(E[ee]===this){a=b+x[ee]/2;break}b+=x[ee]}y.Ds===this.fromNode&&(a=-a),_n(x)}}return a},En.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},En.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},En.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===Jm&&(E=tg)}switch(E){case Ym:var ee=this.i(a),ne=this.i(x);if(!ee.Xa(y)||!ne.Xa(b)){E=ee.x,ee=ee.y;var ae=ne.x-E,ue=ne.y-ee,ge=Math.sqrt(ae*ae+ue*ue);if(!Gt.$(ge,0)){if(Gt.$(ae,0))var ye=0>ue?-Math.PI/2:Math.PI/2;else ye=Math.atan(ue/Math.abs(ae)),0>ae&&(ye=Math.PI-ye);ne=y.x;var Le=y.y;ae=b.x-ne;var ze=b.y-Le;for(ue=Math.sqrt(ae*ae+ze*ze),Gt.$(ae,0)?ze=0>ze?-Math.PI/2:Math.PI/2:(ze=Math.atan(ze/Math.abs(ae)),0>ae&&(ze=Math.PI-ze)),ge=ue/ge,ye=ze-ye,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ae=y.x-E,ue=y.y-ee,y=Math.sqrt(ae*ae+ue*ue),Gt.$(y,0)||(Gt.$(ae,0)?ue=0>ue?-Math.PI/2:Math.PI/2:(ue=Math.atan(ue/Math.abs(ae)),0>ae&&(ue=Math.PI-ue)),ae=ue+ye,y*=ge,this.L(a,ne+y*Math.cos(ae),Le+y*Math.sin(ae)));this.dd(x,b)}}return!0;case Jm:if(ee=this.i(a),Le=this.i(x),!ee.Xa(y)||!Le.Xa(b)){E=ee.x,ee=ee.y,ne=Le.x,Le=Le.y,ge=(ne-E)*(ne-E)+(Le-ee)*(Le-ee),ae=y.x,ye=y.y,ue=b.x,ze=b.y;var We=1;if(ue-ae!==0){var Je=(ze-ye)/(ue-ae);We=Math.sqrt(1+1/(Je*Je))}else Je=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Tt=y.y,Pt=.5;ge!==0&&(Pt=((E-it)*(E-ne)+(ee-Tt)*(ee-Le))/ge);var Nt=E+Pt*(ne-E),At=ee+Pt*(Le-ee);y=Math.sqrt((it-Nt)*(it-Nt)+(Tt-At)*(Tt-At)),Tt<Je*(it-Nt)+At&&(y=-y),0<Je&&(y=-y),it=ae+Pt*(ue-ae),Pt=ye+Pt*(ze-ye),Je!==0?(y=it+y/We,this.L(a,y,Pt-(y-it)/Je)):this.L(a,it,Pt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),ee=this.i(a+1),ne=this.i(a+2),ae=ee.x,ye=ee.y,Le=ae,ge=ye,Gt.B(E.y,ee.y)?Gt.B(ee.x,ne.x)?ye=y.y:Gt.B(ee.y,ne.y)&&(ae=y.x):Gt.B(E.x,ee.x)&&(Gt.B(ee.y,ne.y)?ae=y.x:Gt.B(ee.x,ne.x)&&(ye=y.y)),this.L(a+1,ae,ye),E=this.i(x),ee=this.i(x-1),ne=this.i(x-2),ae=ee.x,ye=ee.y,ue=ae,ze=ye,Gt.B(E.y,ee.y)?Gt.B(ee.x,ne.x)?ye=b.y:Gt.B(ee.y,ne.y)&&(ae=b.x):Gt.B(E.x,ee.x)&&(Gt.B(ee.y,ne.y)?ae=b.x:Gt.B(ee.x,ne.x)&&(ye=b.y)),this.L(x-1,ae,ye),X0(this))){this.L(a+1,Le,ge),this.L(x-1,ue,ze),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},En.prototype.addOrthoPoints=function(a,y,x,b,E,ee){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),ue=ee.actualBounds.copy();if(ae.w()&&ue.w()){ae.Bc(sg,sg),ue.Bc(sg,sg),ae.Ye(a),ue.Ye(x);var ge=lt.alloc(),ye=lt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ue.right>a.x||b===90&&x.y>a.y&&ue.right>a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<ue.left?this.computeMidOrthoPosition(a.x,a.y,ue.left,x.y,!1):a.x<ue.right&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.right,ye.x=ge.x,ye.y=x.y):b===0&&a.x<ue.left&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===180&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x>=ae.left&&x.x<=a.x||a.x<=ue.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===0?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ue.left<a.x||b===90&&x.y>a.y&&ue.left<a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>ue.right?this.computeMidOrthoPosition(a.x,a.y,ue.right,x.y,!1):a.x>ue.left&&(b===270&&a.y<ue.top||b===90&&a.y>ue.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ue.left,ye.x=ge.x,ye.y=x.y):b===180&&a.x>ue.right&&a.y>ue.top&&a.y<ue.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,ue.top):Math.max(x.y,ue.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ae.top||b===270&&x.y>ae.bottom)&&(b===0&&(ue.ca(a)||ae.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,ae.top,x.x,Math.max(x.y,ue.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,ae.bottom,x.x,Math.min(x.y,ue.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>ae.top&&ge.y<ae.bottom&&(x.x<=ae.right&&x.x>=a.x||a.x>=ue.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ae.top:Math.min(ae.top,ue.top)):Math.max(x.y,b===180?ae.bottom:Math.max(ae.bottom,ue.bottom)),ye.x=x.x,ye.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ue.bottom>a.y||b===0&&x.x>a.x&&ue.bottom>a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<ue.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.top,!0):a.y<ue.bottom&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.bottom,ye.x=x.x,ye.y=ge.y):b===90&&a.y<ue.top&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===270&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y>=ae.top&&x.y<=a.y||a.y<=ue.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===90?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ue.top<a.y||b===0&&x.x>a.x&&ue.top<a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>ue.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ue.bottom,!0):a.y>ue.top&&(b===180&&a.x<ue.left||b===0&&a.x>ue.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ue.top,ye.x=x.x,ye.y=ge.y):b===270&&a.y>ue.bottom&&a.x>ue.left&&a.x<ue.right&&(ge.x=a.x<x.x?Math.min(x.x,ue.left):Math.max(x.x,ue.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ae.left||b===180&&x.x>ae.right)&&(b===90&&(ue.ca(a)||ae.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(ae.left,a.y,Math.max(x.x,ue.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(ae.right,a.y,Math.min(x.x,ue.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>ae.left&&ge.x<ae.right&&(x.y<=ae.bottom&&x.y>=a.y||a.y>=ue.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ae.left:Math.min(ae.left,ue.left)):Math.max(x.x,b===270?ae.right:Math.max(ae.right,ue.right)),ye.x=ge.x,ye.y=x.y)));var Le=x;if(this.isAvoiding){var ze=this.diagram;if(ze===null||E===ee||this.layer.isTemporary||!vd(ze)||ae.ca(Le)&&!ee.Td(E)||ue.ca(a)&&!E.Td(ee))y=!1;else{var We=yd(ze,!0,this.containingGroup,null);if(this.segmentIndex!==17&&We.Yj(Math.min(a.x,ge.x),Math.min(a.y,ge.y),Math.abs(a.x-ge.x),Math.abs(a.y-ge.y))&&We.Yj(Math.min(ge.x,ye.x),Math.min(ge.y,ye.y),Math.abs(ge.x-ye.x),Math.abs(ge.y-ye.y))&&We.Yj(Math.min(ye.x,Le.x),Math.min(ye.y,Le.y),Math.abs(ye.x-Le.x),Math.abs(ye.y-Le.y)))y=!1;else{E=a,ee=Le;var Je=x=null;if(ze.isVirtualized){ze=We.bounds.copy(),ze.Bc(-We.Ho,-We.Go);var it=lt.alloc();_d(We,a.x,a.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,a.x,a.y,ge.x,ge.y,it)?(x=a=it.copy(),y=it.ab(ge)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,Le.x,Le.y,it)&&(x=a=it.copy(),y=it.ab(Le))),_d(We,Le.x,Le.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,Le.x,Le.y,ye.x,ye.y,it)?(Je=Le=it.copy(),b=ye.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,ge.x,ge.y,it)?(Je=Le=it.copy(),b=ge.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ge.x,ge.y,a.x,a.y,it)&&(Je=Le=it.copy(),b=a.ab(it))),lt.free(it)}ae=ae.copy().ed(ue),ae.Bc(We.Ho*We.Os,We.Go*We.Os),aS(We,a,y,Le,b,ae,!0),ue=Su(We,Le.x,Le.y),!We.abort&&ue>=zd&&(oS(We),ae.Bc(We.Ho*We.Hx,We.Go*We.Ix),aS(We,a,y,Le,b,ae,!1),ue=Su(We,Le.x,Le.y)),!We.abort&&ue<zd&&Su(We,Le.x,Le.y)!==kh?(Y0(this,We,Le.x,Le.y,b,!0,ne),ae=this.i(2),4>this.pointsCount?(y===0||y===180?(ae.x=a.x,ae.y=Le.y):(ae.x=Le.x,ae.y=a.y),this.L(2,ae.x,ae.y),this.m(3,ae.x,ae.y)):(ne=this.i(3),y===0||y===180?Gt.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):Gt.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=We.Go/2&&(this.L(2,ae.x,a.y),this.L(3,ne.x,a.y)),this.m(2,ae.x,a.y)):this.L(2,a.x,ae.y):(y===90||y===270)&&(Gt.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):Gt.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=We.Ho/2&&(this.L(2,a.x,ae.y),this.L(3,a.x,ne.y)),this.m(2,a.x,ae.y)):this.L(2,ae.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Je!==null&&(b===0||b===180?this.yf(ee.x,Je.y):this.yf(Je.x,ee.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(ye.copy())),lt.free(ge),lt.free(ye)}},En.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var ee=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(ee=this.computeCurviness()),E?(y+b)/2+ee:(a+x)/2+ee};function X0(a){if(a.diagram===null||!a.isAvoiding||!vd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=yd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],ee=y[b+1];if(!a.Yj(Math.min(E.x,ee.x),Math.min(E.y,ee.y),Math.abs(E.x-ee.x),Math.abs(E.y-ee.y)))return!0}return!1}function Y0(a,y,x,b,E,ee,ne){var ae=y.Ho,ue=y.Go,ge=Su(y,x,b),ye=x,Le=b;for(E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,E!==ne&&ge>$c&&Su(y,ye,Le)!==ge-1&&(Su(y,x-ae,b)===ge-1?(E=180,ye=x-ae,Le=b):Su(y,x+ae,b)===ge-1?(E=0,ye=x+ae,Le=b):Su(y,x,b-ue)===ge-1?(E=270,ye=x,Le=b-ue):Su(y,x,b+ue)===ge-1&&(E=90,ye=x,Le=b+ue));ge>$c&&Su(y,ye,Le)===ge-1;)x=ye,b=Le,E===0?ye+=ae:E===90?Le+=ue:E===180?ye-=ae:Le-=ue,--ge;ee?ge>$c&&(E===180||E===0?x=Math.floor(x/ae)*ae+ae/2:(E===90||E===270)&&(b=Math.floor(b/ue)*ue+ue/2)):(x=Math.floor(x/ae)*ae+ae/2,b=Math.floor(b/ue)*ue+ue/2),ge>$c&&(ee=E,ne=x,ye=b,E===0?(ee=90,ye+=ue):E===90?(ee=180,ne-=ae):E===180?(ee=270,ye-=ue):E===270&&(ee=0,ne+=ae),Su(y,ne,ye)===ge-1?Y0(a,y,ne,ye,ee,!1,ee):(ne=x,ye=b,E===0?(ee=270,ye-=ue):E===90?(ee=0,ne+=ae):E===180?(ee=90,ye+=ue):E===270&&(ee=180,ne-=ae),Su(y,ne,ye)===ge-1&&Y0(a,y,ne,ye,ee,!1,ee))),a.yf(x,b)}En.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Zn(y,a,x.x,x.y,b.x,b.y),ee=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var ae=Zn(y,a,b.x,b.y,x.x,x.y);b=x,ae<E&&(ee=ne,E=ae)}return ee},En.prototype.qc=function(){this.lk=!1,this.v()},En.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof Hr&&(E.ua=this.ua)}}},En.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Qc(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),ee=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var ue=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),ue=Math.min(ue,ae.y)}else{if(this.isOrthogonal)for(ue=0;ue<y;ue++)ae=b[ue],ee.x=Math.min(ae.x,ee.x),ee.y=Math.min(ae.y,ee.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),ue=this.i(b),ee.x=Math.min(ue.x,ee.x),ee.y=Math.min(ue.y,ee.y);b=ee.x,ue=ee.y}else{for(ue=0;ue<y;ue++)ae=b[ue],ee.x=Math.min(ae.x,ee.x),ee.y=Math.min(ae.y,ee.y);b=ee.x,ue=ee.y}if(b-=this.su.x,ue-=this.su.y,E.x-=b,E.y-=ue,y!==2||Qc(this)){if(a.type=Tn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,ee)),Dd(ae,E.x,E.y,!1),ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-ue,E=this.i(2).copy(),E.x-=b,E.y-=ue,this.computeShortLength(!1)!==0&&(E=Df(this,E,!1,ee)),wh(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=lt.allocAt(b,ue),x=lt.alloc(),x.assign(this.i(1)),ee=lt.allocAt(b,ue),E=lt.allocAt(b,ue),ne=this.i(0);for(var ge,ye=this.smoothness/3,Le=1;Le<this.pointsCount-1;Le++){ge=this.i(Le);var ze=ne,We=ge,Je=this.i(J0(this,ge,Le,!1));if((!Gt.$(ze.x,We.x)||!Gt.$(We.x,Je.x))&&(!Gt.$(ze.y,We.y)||!Gt.$(We.y,Je.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Tt=ze.x;ze=ze.y;var Pt=We.x;We=We.y;var Nt=Je.x;Je=Je.y;var At=it*Zm(Tt,ze,Pt,We);it*=Zm(Pt,We,Nt,Je),Gt.$(ze,We)&&Gt.$(Pt,Nt)&&(Pt>Tt?Je>We?(ee.x=Pt-At,ee.y=We-At,E.x=Pt+it,E.y=We+it):(ee.x=Pt-At,ee.y=We+At,E.x=Pt+it,E.y=We-it):Je>We?(ee.x=Pt+At,ee.y=We-At,E.x=Pt-it,E.y=We+it):(ee.x=Pt+At,ee.y=We+At,E.x=Pt-it,E.y=We-it)),Gt.$(Tt,Pt)&&Gt.$(We,Je)&&(We>ze?(Nt>Pt?(ee.x=Pt-At,ee.y=We-At,E.x=Pt+it):(ee.x=Pt+At,ee.y=We-At,E.x=Pt-it),E.y=We+it):(Nt>Pt?(ee.x=Pt-At,ee.y=We+At,E.x=Pt+it):(ee.x=Pt+At,ee.y=We+At,E.x=Pt-it),E.y=We-it)),(Gt.$(Tt,Pt)&&Gt.$(Pt,Nt)||Gt.$(ze,We)&&Gt.$(We,Je))&&(Tt=.5*(Tt+Nt),ze=.5*(ze+Je),ee.x=Tt,ee.y=ze,E.x=Tt,E.y=ze),(Le===1||Le===2&&Gt.$(ne.x,this.i(0).x)&&Gt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ge.x),x.y=.5*(ne.y+ge.y)),wh(ae,x.x-b,x.y-ue,ee.x-b,ee.y-ue,ge.x-b,ge.y-ue),y.set(ee),x.set(E),ne=ge}}ge=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,zn)),ge=.5*(ge+ye.x),ne=.5*(ne+ye.y),wh(ae,E.x-b,E.y-ue,ge-b,ne-ue,ye.x-b,ye.y-ue),lt.free(y),lt.free(x),lt.free(ee),lt.free(E)}else for(x=3;x<y;x+=3)ee=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Df(this,ne.copy(),!1,zn)),wh(ae,ee.x-b,ee.y-ue,E.x-b,E.y-ue,ne.x-b,ne.y-ue);else{for(ee=lt.alloc(),ee.assign(this.i(0)),E=lt.alloc(),E.assign(ee),ne=this.computeCorner(),Le=1,ge=0;Le<y;){if(Le=J0(this,ee,Le,1<Le),ye=this.i(Le),Le>=y-1){if(!ee.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,zn)),Bf(this,ae,-b,-ue,ee,ye,x);else if(ge===0)for(Le=1;Le<y;)E.assign(ee),ye=this.i(Le++),Bf(this,ae,-b,-ue,ee,ye,x),ee.assign(ye);break}if(ge=J0(this,ye,Le+1,Le<y-3),Le=-b,Tt=-ue,ze=ye,Pt=this.i(ge),it=x,Gt.B(ee.y,ze.y)&&Gt.B(ze.x,Pt.x))if(Je=Math.min(ne,Math.abs(ze.x-E.x)/2),Je=At=Math.min(Je,Math.abs(Pt.y-ze.y)/2),Gt.B(Je,0))Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze);else{var Bt=ze.x,Rt=ze.y;We=Bt,Nt=Rt,ze.x>ee.x?Bt=ze.x-Je:Bt=ze.x+Je,Pt.y>ze.y?Nt=ze.y+At:Nt=ze.y-At,Pt=lt.allocAt(Bt,Rt),Bf(this,ae,Le,Tt,ee,Pt,it),lt.free(Pt),Im(ae,ze.x+Le,ze.y+Tt,We+Le,Nt+Tt),ee.h(We,Nt)}else Gt.B(ee.x,ze.x)&&Gt.B(ze.y,Pt.y)?(Je=Math.min(ne,Math.abs(ze.y-E.y)/2),Je=At=Math.min(Je,Math.abs(Pt.x-ze.x)/2),Gt.B(At,0)?(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze)):(Bt=ze.x,Rt=ze.y,We=Bt,Nt=Rt,ze.y>ee.y?Rt=ze.y-Je:Rt=ze.y+Je,Pt.x>ze.x?We=ze.x+At:We=ze.x-At,Pt=lt.allocAt(Bt,Rt),Bf(this,ae,Le,Tt,ee,Pt,it),lt.free(Pt),Im(ae,ze.x+Le,ze.y+Tt,We+Le,Nt+Tt),ee.h(We,Nt))):(Bf(this,ae,Le,Tt,ee,ze,it),ee.assign(ze));E.assign(ye),Le=ge}lt.free(ee)}Rm=ae}else ae=this.i(1).copy(),ae.x-=b,ae.y-=ue,this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,ee)),this.computeShortLength(!1)!==0&&(ae=Df(this,ae,!1,ee)),a.type=Tn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Zm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Gt.$(a,0)?y:Gt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Df(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var ee=a.i(1);if(x=ee.x-b.x,ee=ee.y-b.y,b=Zm(y.x,y.y,x,ee),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(ee-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(ee=a.i(E-2),x=ee.x-b.x,ee=ee.y-b.y,b=Zm(y.x,y.y,x,ee),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-ee)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,ee=y;Gt.$(y.x,ee.x)&&Gt.$(y.y,ee.y);){if(x>=E)return E-1;ee=a.i(x++)}if(!Gt.$(y.x,ee.x)&&!Gt.$(y.y,ee.y))return x-1;for(var ne=ee;Gt.$(y.x,ee.x)&&Gt.$(ee.x,ne.x)&&(!b||(y.y>=ee.y?ee.y>=ne.y:ee.y<=ne.y))||Gt.$(y.y,ee.y)&&Gt.$(ee.y,ne.y)&&(!b||(y.x>=ee.x?ee.x>=ne.x:ee.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}En.prototype.computeJumpLength=function(){return 10};function Bf(a,y,x,b,E,ee,ne){if(!ne&&Qc(a)){ne=a.computeJumpLength();var ae=ne/2,ue=[],ge=0;if(a.isVisible()&&(ge=kx(a,E,ee,ue)),0<ge){if(Gt.B(E.y,ee.y))if(E.x<ee.x)for(var ye=0;ye<ge;){var Le=Math.max(E.x,Math.min(ue[ye++]-ae,ee.x-ne));y.lineTo(Le+x,ee.y+b);for(var ze=Le+x,We=Math.min(Le+ne,ee.x);ye<ge&&(Le=ue[ye],Le<We+ne);)ye++,We=Math.min(Le+ae,ee.x);Le=ee.y-ne+b,We+=x;var Je=ee.y+b;a.curve===Eh?Dd(y,We,Je,!1):wh(y,ze,Le,We,Le,We,Je)}else for(--ge;0<=ge;){for(ye=Math.min(E.x,Math.max(ue[ge--]+ae,ee.x+ne)),y.lineTo(ye+x,ee.y+b),ze=ye+x,Le=Math.max(ye-ne,ee.x);0<=ge&&(ye=ue[ge],ye>Le-ne);)ge--,Le=Math.max(ye-ae,ee.x);ye=ee.y-ne+b,Le+=x,We=ee.y+b,a.curve===Eh?Dd(y,Le,We,!1):wh(y,ze,ye,Le,ye,Le,We)}else if(Gt.B(E.x,ee.x))if(E.y<ee.y)for(ye=0;ye<ge;){for(Le=Math.max(E.y,Math.min(ue[ye++]-ae,ee.y-ne)),y.lineTo(ee.x+x,Le+b),ze=Le+b,Le=Math.min(Le+ne,ee.y);ye<ge&&(We=ue[ye],We<Le+ne);)ye++,Le=Math.min(We+ae,ee.y);We=ee.x-ne+x,Je=ee.x+x,Le+=b,a.curve===Eh?Dd(y,Je,Le,!1):wh(y,We,ze,We,Le,Je,Le)}else for(--ge;0<=ge;){for(ye=Math.min(E.y,Math.max(ue[ge--]+ae,ee.y+ne)),y.lineTo(ee.x+x,ye+b),ze=ye+b,ye=Math.max(ye-ne,ee.y);0<=ge&&(Le=ue[ge],Le>ye-ne);)ge--,ye=Math.max(Le-ae,ee.y);Le=ee.x-ne+x,We=ee.x+x,ye+=b,a.curve===Eh?Dd(y,We,ye,!1):wh(y,Le,ze,Le,ye,We,ye)}}}y.lineTo(ee.x+x,ee.y+b)}function kx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var ee=E.value;if(ee!==null&&ee.visible){ee=ee.Pa.s;for(var ne=ee.length,ae=0;ae<ne;ae++){var ue=ee[ae];if(ue instanceof En){if(ue===a)return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length;if(ue.isVisible()&&Qc(ue)){var ge=ue.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(ue)&&(ge=ue.path,ge!==null&&ge.Ed()&&Tx(y,x,b,ue))}}}}}return 0<b.length&&b.sort(function(ye,Le){return ye-Le}),b.length}function Tx(a,y,x,b){for(var E=Gt.B(a.y,y.y),ee=b.pointsCount,ne=b.i(0),ae=lt.alloc(),ue=1;ue<ee;ue++){var ge=b.i(ue);if(ue<ee-1){var ye=b.i(ue+1);if(ne.y===ge.y&&ge.y===ye.y){if(ge.x>ne.x&&ye.x>=ge.x||ge.x<ne.x&&ye.x<=ge.x)continue}else if(ne.x===ge.x&&ge.x===ye.x&&(ge.y>ne.y&&ye.y>=ge.y||ge.y<ne.y&&ye.y<=ge.y))continue}e:{ye=a.x;var Le=a.y,ze=y.x,We=y.y,Je=ne.x;ne=ne.y;var it=ge.x,Tt=ge.y;if(Gt.B(ye,ze)){if(!Gt.B(Le,We)&&Gt.B(ne,Tt)&&Math.min(Le,We)<ne&&Math.max(Le,We)>ne&&Math.min(Je,it)<ye&&Math.max(Je,it)>ye&&!Gt.B(Je,it)){ae.x=ye,ae.y=ne,ye=!0;break e}}else if(Gt.B(Le,We)&&Gt.B(Je,it)&&Math.min(ye,ze)<Je&&Math.max(ye,ze)>Je&&Math.min(ne,Tt)<Le&&Math.max(ne,Tt)>Le&&!Gt.B(ne,Tt)){ae.x=Je,ae.y=Le,ye=!0;break e}ae.x=0,ae.y=0,ye=!1}ye&&(E?x.push(ae.x):x.push(ae.y)),ne=ge}lt.free(ae)}function Qc(a){return a=a.curve,a===Rd||a===Eh}function Xm(a,y){(y||Qc(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}En.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var ee=!1;E=E.Pa.s;for(var ne=E.length,ae=0;ae<ne;ae++){var ue=E[ae];ue instanceof En&&(ue===this?ee=!0:ee&&tS(this,ue,a))}}else if(b)for(ee=E.Pa.s,E=ee.length,ne=0;ne<E;ne++)ae=ee[ne],ae instanceof En&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Qc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}En.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},En.prototype.isVisible=function(){if(!Sr.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 b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},En.prototype.Zb=function(a){if(Sr.prototype.Zb.call(this,a),a&&Xm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},En.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tg:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,ee=a=null,ne=y.jb.s,ae=ne.length,ue=0;ue<ae;ue++){var ge=ne[ue];(ge.ef===y&&ge.ff===b&&ge.uf===x&&ge.vf===E||ge.ef===x&&ge.ff===E&&ge.uf===y&&ge.vf===b)&&(ee===null?ee=ge:(a===null&&(a=[],a.push(ee)),a.push(ge)))}if(a!==null){for(ee=H1(y,x,b,E),ee===null&&(ee=new qm(y,b,x,E),U1(y,ee),U1(x,ee)),ee.links=a,y=0;y<a.length;y++)a[y].Sf=ee;ee.Sl()}}}}function eg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Bn(y.links,a),y.Sl()))}En.prototype.ph=function(){return!0},zt.Object.defineProperties(En.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Um(y,this,x),eg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,ee=this.fromPortChanged;if(ee!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),ee(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),Bd(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Cs(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var ee=this.data,ne=E.model;ee!==null&&ne.ri()&&ne.xv(ee,a)}x!==b&&(this.Wf=null,this.bb(),ee=this.fromPortChanged,ee!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),ee(this,x,b),E!==null&&(E.aa=ne))),qp(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&&Um(y,this,x),eg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,ee=this.toPortChanged;if(ee!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),ee(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),Bd(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Cs(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var ee=this.data,ne=E.model;ee!==null&&ne.ri()&&ne.Cv(ee,a)}x!==b&&(this.Wf=null,this.bb(),ee=this.toPortChanged,ee!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),ee(this,x,b),E!==null&&(E.aa=ne))),qp(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:Vo},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&&Cs(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&&Nn(a,">= 0",En,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Vo},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&&Cs(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&&Nn(a,">= 0",En,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Kr: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&&$p(this.fromNode),this.toNode!==null&&$p(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Hr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Rs&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var ee=this.i(2);y=Math.min(ee.x,y),x=Math.min(ee.y,x),Gt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,ee.x,ee.y,.5,a)}else for(ee=3;ee<b;ee+=3){var ne=this.i(ee-2);ee+3>=b&&(ee=b-1);var ae=this.i(ee-1),ue=this.i(ee);Gt.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,ue.x,ue.y,.5,a),y=Math.min(ue.x,y),x=Math.min(ue.y,x),E=ue}else for(E=this.i(0),ee=this.i(1),y=Math.min(E.x,ee.x),x=Math.min(E.y,ee.y),a.h(E.x,E.y,0,0),a.Ye(ee),E=2;E<b;E++)ee=this.i(E),y=Math.min(ee.x,y),x=Math.min(ee.y,x),a.Ye(ee);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new lt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Wm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);Gt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Gt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];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 b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new rn,b=0;b<a.length/2;b++)E=new lt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var ee=a[E];if(!sn(ee)||typeof ee.x!="number"||isNaN(ee.x)||typeof ee.y!="number"||isNaN(ee.y)){b=!1;break}}if(b)for(x=new rn,b=0;b<a.length;b++)E=a[b],x.add(new lt(E.x,E.y).freeze())}}else if(a instanceof rn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else jt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Wm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ld(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||!Id(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Id(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(),Xm(this,y===Eh||y===Rd||a===Eh||a===Rd),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(),Xm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),En.prototype.invalidateOtherJumpOvers=En.prototype.Xo,En.prototype.findClosestSegment=En.prototype.ez,En.prototype.updateRoute=En.prototype.vg,En.prototype.invalidateRoute=En.prototype.bb,En.prototype.rollbackRoute=En.prototype.rv,En.prototype.commitRoute=En.prototype.zf,En.prototype.startRoute=En.prototype.uh,En.prototype.clearPoints=En.prototype.Fj,En.prototype.removePoint=En.prototype.pv,En.prototype.addPointAt=En.prototype.yf,En.prototype.addPoint=En.prototype.ne,En.prototype.insertPointAt=En.prototype.m,En.prototype.insertPoint=En.prototype.Kz,En.prototype.setPointAt=En.prototype.L,En.prototype.setPoint=En.prototype.dd,En.prototype.getPoint=En.prototype.i,En.prototype.getOtherPort=En.prototype.Cz,En.prototype.getOtherNode=En.prototype.To;var If=null,Rf=null,Q0=new hn(En,"Normal",1),Lx=new hn(En,"Orthogonal",2),Mx=new hn(En,"AvoidsNodes",6),nS=new hn(En,"AvoidsNodesStraight",7),Qa=new hn(En,"None",0),Rs=new hn(En,"Bezier",9),Eh=new hn(En,"JumpGap",10),Rd=new hn(En,"JumpOver",11),tg=new hn(En,"End",17),Ym=new hn(En,"Scale",18),Jm=new hn(En,"Stretch",19),ng=new hn(En,"OrientAlong",21),rg=new hn(En,"OrientPlus90",22),ig=new hn(En,"OrientMinus90",23),$0=new hn(En,"OrientOpposite",24),Qm=new hn(En,"OrientUpright",25),og=new hn(En,"OrientPlus90Upright",26),ag=new hn(En,"OrientMinus90Upright",27),$m=new hn(En,"OrientUpright45",28),rS=16,iS=14,sg=8;En.className="Link",En.Normal=Q0,En.Orthogonal=Lx,En.AvoidsNodes=Mx,En.AvoidsNodesStraight=nS,En.None=Qa,En.Bezier=Rs,En.JumpGap=Eh,En.JumpOver=Rd,En.End=tg,En.Scale=Ym,En.Stretch=Jm,En.OrientAlong=ng,En.OrientPlus90=rg,En.OrientMinus90=ig,En.OrientOpposite=$0,En.OrientUpright=Qm,En.OrientPlus90Upright=og,En.OrientMinus90Upright=ag,En.OrientUpright45=$m,En.EndSegmentStep=8,En.CurvinessStart=rS,En.SpacingMin=iS,En.OrthoShortCut=sg;function qm(a,y,x,b){cr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}qm.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},qm.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},qm.className="LinkBundle";function lg(a){cr(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}lg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=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((b+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=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=q0,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function _d(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Su(a,y,x){return _d(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):q0}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=$c&&(x[b]=q0)}lg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<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 E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var ee=y;ee<=x;ee++)if(E[ee]===kh)return!1}return!0};function xu(a,y,x,b,E,ee,ne,ae,ue){if(!(y<ee||y>ne||x<ae||x>ue)){var ge=y|0,ye=x|0,Le=a.ac[ge][ye];if(Le>=$c&&Le<zd)for(E?ye+=b:ge+=b,Le+=1;ee<=ge&&ge<=ne&&ae<=ye&&ye<=ue&&!(Le>=a.ac[ge][ye]);)a.ac[ge][ye]=Le,Le+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else for(x+=b;x>ge;x+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else if(0<b)for(y+=b;y<ge;y+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue);else for(y+=b;y>ge;y+=b)xu(a,y,x,1,!E,ee,ne,ae,ue),xu(a,y,x,-1,!E,ee,ne,ae,ue)}}function ev(a,y,x,b,E,ee,ne,ae,ue){y|=0,x|=0;var ge=kh,ye=$c;for(a.ac[y][x]=ye;ge===kh&&y>ee&&y<ne&&x>ae&&x<ue;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function tv(a,y,x,b,E,ee,ne,ae,ue){y|=0,x|=0;var ge=kh,ye=zd;for(a.ac[y][x]=ye;ge===kh&&y>ee&&y<ne&&x>ae&&x<ue;)a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function aS(a,y,x,b,E,ee,ne){if(a.ac!==null){a.abort=!1;var ae=y.x,ue=y.y;if(_d(a,ae,ue)){ae-=a.Nd,ae/=a.rc,ue-=a.Od,ue/=a.sc;var ge=b.x,ye=b.y;if(_d(a,ge,ye))if(ge-=a.Nd,ge/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(ae-ge)&&1>=Math.abs(ue-ye))a.abort=!0;else{var Le=ee.x;b=ee.y,y=ee.x+ee.width;var ze=ee.y+ee.height;Le-=a.Nd,Le/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,ze-=a.Od,ze/=a.sc,ee=Math.max(0,Math.min(a.di,Le|0)),y=Math.min(a.di,Math.max(0,y|0)),Le=Math.max(0,Math.min(a.ei,b|0)),ze=Math.min(a.ei,Math.max(0,ze|0)),b=a.ac,ae|=0,ue|=0,ge|=0,ye|=0;var We=x===0||x===90?1:-1;if(x=x===90||x===270,b[ae][ue]===kh?(ev(a,ae,ue,We,x,ee,y,Le,ze),ev(a,ae,ue,1,!x,ee,y,Le,ze),ev(a,ae,ue,-1,!x,ee,y,Le,ze)):ev(a,ae,ue,We,x,ae,ue,ae,ue),b[ge][ye]===kh?(tv(a,ge,ye,E===0||E===90?1:-1,E===90||E===270,ee,y,Le,ze),tv(a,ge,ye,1,!(E===90||E===270),ee,y,Le,ze),tv(a,ge,ye,-1,!(E===90||E===270),ee,y,Le,ze)):tv(a,ge,ye,We,x,ge,ye,ge,ye),x=er(),ne&&sS(a,ge,ye,E,ae,ue,x))for((x[0]!==ge||x[1]!==ye)&&(x.unshift(ye),x.unshift(ge)),(x[x.length-2]!==ae||x[x.length-1]!==ue)&&(x.push(ae),x.push(ue)),a=$c,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,ee=x.length-4;0<=ee;ee-=2)for(E=x[ee+2],ne=x[ee+3],y=x[ee],ge=x[ee+1];y>E?E++:y<E?E--:ge>ne?ne++:ge<ne&&ne--,b[E][ne]=a++,E!==y||ne!==ge;);else xu(a,ae,ue,1,!1,ee,y,Le,ze),xu(a,ae,ue,-1,!1,ee,y,Le,ze),xu(a,ae,ue,1,!0,ee,y,Le,ze),xu(a,ae,ue,-1,!0,ee,y,Le,ze);_n(x)}}}}function sS(a,y,x,b,E,ee,ne){for(var ae=a.ac,ue=y,ge=x;;){if(ue===E&&ge===ee)return!0;var ye=ue,Le=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Le<ee)Le++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Le>ee)Le--;else break;var ze=ae[ye][Le];if(ze===0||ze===ey)break;ue=ye,ge=Le}for(;;){if(ye=b,Le=ue,ze=ge,b===0?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):b===90?Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--):b===180?ze<ee?(ye=90,ze++):ze>ee&&(ye=270,ze--):Le<E?(ye=0,Le++):Le>E&&(ye=180,Le--),Le=ae[Le][ze],ye!==b&&Le!==0&&Le!==ey){if(ne.push(ue),ne.push(ge),sS(a,ue,ge,ye,E,ee,ne))return!0;ne.pop(),ne.pop()}if(ae[ue][ge]=ey,b===0){if(ue===y)return!1;ue--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(ue===y)return!1;ue++}else{if(ge===x)return!1;ge++}}}zt.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new $t(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 kh=0,$c=1,zd=999999,q0=zd+1,ey=zd+2;lg.className="PositionArray";function _f(){cr(this),this.port=this.node=null,this.pe=[],this.ap=!1}_f.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
`+b.toString())}return y};function Nx(a,y,x,b){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 b&&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}_f.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,ee=E instanceof Ir?E:null;if(ee===null||ee.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!ee.actualBounds.w()){a.ap=x;break e}b=ee,ne=b.Lu()}ee=a.pe.length=0;var ae=a.port.ga(Ei,lt.alloc()),ue=a.port.ga(io,lt.alloc());for(E=$t.allocAt(ae.x,ae.y,0,0),E.Ye(ue),lt.free(ae),lt.free(ue),ae=lt.allocAt(E.x+E.width/2,E.y+E.height/2),ue=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var ye=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Le=ge.computeSpot(ye,a.port);if(Le.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var ze=ye.part;if(ze!==null){var We=ze.findVisibleNode();We!==null&&We!==ze&&(ze=We,ye=ze.port),ye=ge.computeOtherPoint(ze,ye),ze=ae.ab(ye),ze-=ue,0>ze?ze+=360:360<=ze&&(ze-=360),Le=Nx(E,Le,ze,ge.isOrthogonal),Le===0?(Le=4,180<ze&&(ze-=360)):Le===90?(Le=8,270<ze&&(ze-=360)):Le===180?Le=2:(Le=1,90>ze&&(ze+=360)),We=a.pe[ee],We===void 0?(We=new ty(ge,ze,Le),a.pe[ee]=We):(We.link=ge,We.angle=ze,We.Nc=Le),We.hv.set(ye),ee++}}}}for(lt.free(ae),a.pe.sort(_f.prototype.j),ue=a.pe.length,b=-1,ee=ae=0;ee<ue;ee++)ne=a.pe[ee],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,ae=0),ne.Uo=ae,ae++);for(b=-1,ae=0,ee=ue-1;0<=ee;ee--)ue=a.pe[ee],ue!==void 0&&(ue.Nc!==b&&(b=ue.Nc,ae=ue.Uo+1),ue.Gl=ae);if(ee=a.pe,Le=a.port,b=a.node.portSpreading,ae=lt.alloc(),ue=lt.alloc(),ne=lt.alloc(),ge=lt.alloc(),Le.ga(Ei,ae),Le.ga(ba,ue),Le.ga(io,ne),Le.ga(Ko,ge),We=ze=ye=Le=0,b===W0)for(var Je=0;Je<ee.length;Je++){var it=ee[Je];if(it!==null){var Tt=it.link.computeThickness();switch(it.Nc){case 8:ze+=Tt;break;case 2:We+=Tt;break;case 1:Le+=Tt;break;default:case 4:ye+=Tt}}}var Pt=Je=0,Nt=1,At=it=0;for(Tt=0;Tt<ee.length;Tt++){var Bt=ee[Tt];if(Bt!==null){if(Je!==Bt.Nc){switch(Je=Bt.Nc,Je){case 8:var Rt=ne;Pt=ge;break;case 2:Rt=ge,Pt=ae;break;case 1:Rt=ae,Pt=ue;break;default:case 4:Rt=ue,Pt=ne}switch(it=Pt.x-Rt.x,At=Pt.y-Rt.y,Je){case 8:ze>Math.abs(it)?(Nt=Math.abs(it)/ze,ze=Math.abs(it)):Nt=1;break;case 2:We>Math.abs(At)?(Nt=Math.abs(At)/We,We=Math.abs(At)):Nt=1;break;case 1:Le>Math.abs(it)?(Nt=Math.abs(it)/Le,Le=Math.abs(it)):Nt=1;break;default:case 4:ye>Math.abs(At)?(Nt=Math.abs(At)/ye,ye=Math.abs(At)):Nt=1}Pt=0}var Zt=Bt.Zo;if(b===W0){switch(Bt=Bt.link.computeThickness(),Bt*=Nt,Zt.set(Rt),Je){case 8:Zt.x=Rt.x+it/2+ze/2-Pt-Bt/2;break;case 2:Zt.y=Rt.y+At/2+We/2-Pt-Bt/2;break;case 1:Zt.x=Rt.x+it/2-Le/2+Pt+Bt/2;break;default:case 4:Zt.y=Rt.y+At/2-ye/2+Pt+Bt/2}Pt+=Bt}else{var Fn=.5;b===Hm&&(Fn=(Bt.Uo+1)/(Bt.Gl+1)),Zt.x=Rt.x+it*Fn,Zt.y=Rt.y+At*Fn}}}for(lt.free(ae),lt.free(ue),lt.free(ne),lt.free(ge),Rt=a.pe,ee=0;ee<Rt.length;ee++)b=Rt[ee],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,$t.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}_f.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},_f.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Vr,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var ee=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<ee.y:y.x<ee.x)?x+8*b:(a?y.y===ee.y:y.x===ee.x)?x:x+8*(E-1-b)},_f.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new lt,this.Gl=this.Uo=0,this.Zo=new lt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function so(a){cr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new lt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}so.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},so.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},so.prototype.qb=function(){},so.prototype.toString=function(){var a=sr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},so.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())}}},so.prototype.createNetwork=function(){return new Xi(this)},so.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Yt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ir?y.lg(a.memberParts):y.lg(a.iterator),y},so.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")}},so.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()}},so.prototype.doLayout=function(a){var y=new an;a instanceof Yt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ir?ac(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},so.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,ee=0,ne=0;for(a=a.iterator;a.next();){var ae=a.value;ug(ae);var ue=ae.measuredBounds,ge=ue.width;ue=ue.height,ae.moveTo(b,E),ae instanceof Ir&&(ae.rh=!1),b+=Math.max(ge,50)+20,ne=Math.max(ne,Math.max(ue,50)),ee>=y-1?(ee=0,b=x,E+=ne+20,ne=0):ee++}},so.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,b=this.arrangementOrigin.y,E=0,ee=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof En)&&(ug(ae),this.rh(ae))){var ue=ae.measuredBounds,ge=ue.width;ue=ue.height,ae.moveTo(x,b),ae instanceof Ir&&(ae.rh=!1),x+=Math.max(ge,50)+20,ee=Math.max(ee,Math.max(ue,50)),E>=a-1?(E=0,x=y,b+=ee+20,ee=0):E++}}},so.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ir&&a.rh)};function ac(a,y,x,b,E,ee,ne,ae){for(x=x.iterator;x.next();){var ue=x.value;b&&!ue.isTopLevel||E!==null&&!E(ue)||!ue.canLayout()||(ee&&ue instanceof Un?ue.isLinkLabel||(ue instanceof Ir&&ue.layout===null?ac(a,y,ue.memberParts,!1,E,ee,ne,ae):(ug(ue),y.add(ue))):ne&&ue instanceof En?y.add(ue):!ae||!ue.Zc()||ue instanceof Un||(ug(ue),y.add(ue)))}}function ug(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}so.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new $t),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},so.prototype.ex=function(a){var y=new an;return a instanceof Yt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ir?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},so.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(Ei),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},zt.Object.defineProperties(so.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())}}}),so.prototype.collectParts=so.prototype.ex,so.prototype.getLayoutBounds=so.prototype.ni,so.prototype.invalidateLayout=so.prototype.C,so.className="Layout";function Xi(a){cr(this),this.Sc=a,this.wf=new an,this.ye=new an,this.Es=new tn,this.zs=new tn}Xi.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 an,this.ye=new an,this.Es=new tn,this.zs=new tn},Xi.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},Xi.prototype.createVertex=function(){return new Uo(this)},Xi.prototype.createEdge=function(){return new Es(this)},Xi.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof Un)return!ne.isLinkLabel;if(ne instanceof En){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Un&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Ir&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof En&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var ee=b.fromNode;E=b.toNode,ee!==null&&E!==null&&ee!==E&&(ee=this.findGroupVertex(ee),E=this.findGroupVertex(E),ee!==null&&E!==null&&this.Zj(ee,E,b))}}},Xi.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},qe=Xi.prototype,qe.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},qe.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},qe.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(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}qe.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},qe.ki=function(a){return a===null?null:this.Es.I(a)},qe.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(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}}qe.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},qe.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ry(this,a)}};function ry(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}qe.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},qe.Lo=function(a){return a===null?null:this.zs.I(a)},qe.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},qe.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))}},qe.Ko=function(){for(var a=er(),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]);_n(a)},Xi.prototype.deleteArtificialVertexes=function(){for(var a=er(),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=er(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);_n(a),_n(y)};function Ax(a){for(var y=er(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);_n(y)}Xi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new rn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,b),y=!0;break}}}return a.sort(function(E,ee){return E===null||ee===null||E===ee?0:ee.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Xi.prototype.dz=function(){for(var a=new an,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},zt.Object.defineProperties(Xi.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}}}),Xi.prototype.findAllParts=Xi.prototype.dz,Xi.prototype.splitIntoSubNetworks=Xi.prototype.Zx,Xi.prototype.deleteSelfEdges=Xi.prototype.Ko,Xi.prototype.reverseEdge=Xi.prototype.gm,Xi.prototype.linkVertexes=Xi.prototype.Zj,Xi.prototype.findEdge=Xi.prototype.Lo,Xi.prototype.deleteLink=Xi.prototype.Yy,Xi.prototype.deleteEdge=Xi.prototype.Mj,Xi.prototype.addLink=Xi.prototype.Dy,Xi.prototype.addEdge=Xi.prototype.Bo,Xi.prototype.findVertex=Xi.prototype.ki,Xi.prototype.deleteNode=Xi.prototype.Zy,Xi.prototype.deleteVertex=Xi.prototype.Iu,Xi.prototype.addNode=Xi.prototype.Bl,Xi.prototype.addVertex=Xi.prototype.dh,Xi.prototype.addParts=Xi.prototype.lg,Xi.className="LayoutNetwork";function Uo(a){cr(this),this.ob=a,this.j=new $t(0,0,10,10).freeze(),this.o=new lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new rn,this.mg=new rn}Uo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new rn,this.mg=new rn},Uo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Gr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var ee=b.value;x?x=!1:E+=",",E+=ee.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Uo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;sn(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 Ir)){x=$t.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(ai);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),$t.free(x);return}$t.free(x)}a.moveTo(y.x,y.y)}},Uo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Uo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Uo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Uo.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(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}zt.Object.defineProperties(Uo.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,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,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=$t.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,ee=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,ee,b),$t.free(x),!(a instanceof Ir)&&(a=a.locationObject.ga(ai),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(ee/2,b/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 an,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new an,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new an,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 rn,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}}}),Uo.prototype.deleteDestinationEdge=Uo.prototype.Jl,Uo.prototype.addDestinationEdge=Uo.prototype.zl,Uo.prototype.deleteSourceEdge=Uo.prototype.Kl,Uo.prototype.addSourceEdge=Uo.prototype.Cl,Uo.className="LayoutVertex",Uo.standardComparer=oy,Uo.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 b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}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 Es(a){cr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Es.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Es.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Gr(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},Es.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Es.prototype.commit=function(){},Es.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},zt.Object.defineProperties(Es.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)}}}),Es.prototype.getOtherVertex=Es.prototype.Ax,Es.className="LayoutEdge";function fa(a){so.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new mn(NaN,NaN).freeze(),this.tf=new mn(10,10).freeze(),this.Jb=hg,this.Rb=rv,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}Kt(fa,so),fa.prototype.cloneProtected=function(a){so.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},fa.prototype.qb=function(a){a.classType===fa?a===cg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===Fl?this.arrangement=a:a===hg||a===nv?this.alignment=a:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},fa.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 b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof Ir)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case iv:E.reverse();break;case cg:E.sort(this.comparer);break;case ov:E.sort(this.comparer),E.reverse()}var ee=this.wrappingColumn;isNaN(ee)&&(ee=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=ee&&0>=ne&&(ee=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case nv:var ae=y,ue=x,ge=$t.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Le=ye=0;Le<E.length;Le++){var ze=this.ni(E[Le],ge);ye=Math.max(ye,ze.width)}if(ye=Math.max(ye+ae,1),Le=Math.max(this.cellSize.height,1),!isFinite(Le))for(ze=Le=0;ze<E.length;ze++){var We=this.ni(E[ze],ge);Le=Math.max(Le,We.height)}Le=Math.max(Le+ue,1),ze=this.arrangement;for(var Je=We=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Tt=0,Pt=0,Nt=0;Nt<E.length;Nt++){var At=E[Nt],Bt=this.ni(At,ge),Rt=Math.ceil((Bt.width+ae)/ye)*ye,Zt=Math.ceil((Bt.height+ue)/Le)*Le;switch(ze){case Fl:var Fn=Math.abs(Je-Bt.width);break;default:Fn=Je+Bt.width}switch((0<ee&&Tt>ee-1||0<ne&&0<Tt&&Fn-We>ne)&&(b.push(new $t(0,it,ne+ae,Pt)),Tt=0,Je=We,it+=Pt,Pt=0),Pt=Math.max(Pt,Zt),ze){case Fl:Bt=-Bt.width;break;default:Bt=0}switch(At.moveTo(Je+Bt,it),ze){case Fl:Je-=Rt;break;default:Je+=Rt}Tt++}b.push(new $t(0,it,ne+ae,Pt)),$t.free(ge);break;case hg:for(ue=ne,ye=ee,Le=y,ze=x,ne=$t.alloc(),We=Math.max(this.cellSize.width,1),ee=it=ge=0,ae=lt.alloc(),Je=0;Je<E.length;Je++)Pt=E[Je],Tt=this.ni(Pt,ne),Pt=bh(Pt,Pt.locationObject,Pt.locationSpot,ae),ge=Math.max(ge,Pt.x),it=Math.max(it,Tt.width-Pt.x),ee=Math.max(ee,Pt.y);switch(Je=this.arrangement,Je){case Fl:ge+=Le;break;default:it+=Le}We=isFinite(We)?Math.max(We+Le,1):Math.max(ge+it,1);var or=Pt=this.arrangementOrigin.x;for(Nt=this.arrangementOrigin.y,it=0,ue>=ge&&(ue-=ge),ge=At=0,Rt=Math.max(this.cellSize.height,1),Bt=ee=0,Zt=!0,Tt=lt.alloc(),Fn=0;Fn<E.length;Fn++){var $n=E[Fn],Cn=this.ni($n,ne),fn=bh($n,$n.locationObject,$n.locationSpot,ae);if(0<it)switch(Je){case Fl:or=(or-Pt-(Cn.width-fn.x))/We,or=Gt.$(Math.round(or),or)?Math.round(or):Math.floor(or),or=or*We+Pt;break;default:or=(or-Pt+fn.x)/We,or=Gt.$(Math.round(or),or)?Math.round(or):Math.ceil(or),or=or*We+Pt}else switch(Je){case Fl:At=or+fn.x+Cn.width;break;default:At=or-fn.x}switch(Je){case Fl:var Br=-(or+fn.x)+At;break;default:Br=or+Cn.width-fn.x-At}if(0<ye&&it>ye-1||0<ue&&0<it&&Br>ue){for(b.push(new $t(0,Zt?Nt-ee:Nt,ue+Le,Bt+ee+ze)),or=0;or<it&&Fn!==it;or++){Br=E[Fn-it+or];var Nr=bh(Br,Br.locationObject,Br.locationSpot,Tt);Br.moveTo(Br.position.x,Br.position.y+ee-Nr.y)}Bt+=ze,Nt=Zt?Nt+Bt:Nt+(Bt+ee),it=Bt=ee=0,or=Pt,Zt=!1}switch(or===Pt&&(ge=Je===Fl?Math.max(ge,Cn.width-fn.x):Math.min(ge,-fn.x)),ee=Math.max(ee,fn.y),Bt=Math.max(Bt,Cn.height-fn.y),isFinite(Rt)&&(Bt=Math.max(Bt,Math.max(Cn.height,Rt)-fn.y)),Zt?$n.moveTo(or-fn.x,Nt-fn.y):$n.moveTo(or-fn.x,Nt),Je){case Fl:or-=fn.x+Le;break;default:or+=Cn.width-fn.x+Le}it++}if(b.push(new $t(0,Nt,ue+Le,(Zt?Bt:Bt+ee)+ze)),E.length!==it)for(ue=0;ue<it;ue++)ye=E[E.length-it+ue],Le=bh(ye,ye.locationObject,ye.locationSpot,ae),ye.moveTo(ye.position.x,ye.position.y+ee-Le.y);if(lt.free(ae),lt.free(Tt),Je===Fl)for(E=0;E<b.length;E++)ee=b[E],ee.width+=ge,ee.x-=ge;else for(E=0;E<b.length;E++)ee=b[E],ee.x>ge&&(ee.width+=ee.x-ge,ee.x=ge);$t.free(ne)}for(ae=ee=ne=E=0;ae<b.length;ae++)ue=b[ae],E=Math.min(E,ue.x),ne=Math.min(ne,ue.y),ee=Math.max(ee,ue.x+ue.width);this.arrangement===Fl?this.commitLayers(b,new lt(E+y/2-(ee+E),ne-x/2)):this.commitLayers(b,new lt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},fa.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}zt.Object.defineProperties(fa.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!==hg&&a!==nv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==rv&&a!==Fl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==iv&&a!==cg&&a!==ov||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var nv=new hn(fa,"Position",0),hg=new hn(fa,"Location",1),rv=new hn(fa,"LeftToRight",2),Fl=new hn(fa,"RightToLeft",3),ay=new hn(fa,"Forward",4),iv=new hn(fa,"Reverse",5),cg=new hn(fa,"Ascending",6),ov=new hn(fa,"Descending",7);fa.className="GridLayout",fa.standardComparer=hS,fa.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 b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},fa.Position=nv,fa.Location=hg,fa.LeftToRight=rv,fa.RightToLeft=Fl,fa.Forward=ay,fa.Reverse=iv,fa.Ascending=cg,fa.Descending=ov;function ji(){this.On=new an,this.Dn=new an,this.Pa=new an,this.cf=new tn,this.bf=new tn,this.aj=new tn,this.H=null,this.tp=!1}qe=ji.prototype,qe.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},qe.Xe=function(a){this.H=a},qe.oi=function(a){if(a instanceof Un){if(this.On.add(a),a instanceof Ir){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof En?this.Dn.add(a):a instanceof mi||this.Pa.add(a);y=a.data,y===null||a instanceof mi||(a instanceof En?this.bf.add(y,a):this.cf.add(y,a))},qe.pc=function(a){if(a.Ej(),a instanceof Un){if(this.On.remove(a),a instanceof Ir){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof En?this.Dn.remove(a):a instanceof mi||this.Pa.remove(a);y=a.data,y===null||a instanceof mi||(a instanceof En?this.bf.remove(y):this.cf.remove(y))},qe.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Ir)&&jt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Ir||jt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof En||jt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=er(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=er(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=er(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);_n(y),_n(x),_n(a)}},ji.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ji.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&gd(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(ul(E),E=E.copy(),E!==null)){var ee=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=ee,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}ji.prototype.insertLink=function(){return null},ji.prototype.resolveReferencesForData=function(){},ji.prototype.Ro=function(a){return this.H.model.Ro(a)};function fS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,Yn('No Group template found for category "'+x+'"'),Yn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Yn('No Node template found for category "'+x+'"'),Yn(" Using default node template")),y=a.ny))),y}ji.prototype.getLinkCategoryForData=function(){return""},ji.prototype.setLinkCategoryForData=function(){},ji.prototype.setFromNodeForLink=function(){},ji.prototype.setToNodeForLink=function(){},ji.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Yn('No Link template found for category "'+a+'"'),Yn(" Using default link template")),x=y.my)),x},ji.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ji.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ji.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ji.prototype.unresolveReferencesForPart=function(){},ji.prototype.removeDataForLink=function(){},ji.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ji.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Un?a:null)},ji.prototype.findLinkForKey=function(){return null},qe=ji.prototype,qe.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},qe.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Un?a:null)},qe.Kc=function(a){return a===null?null:this.bf.I(a)},qe.ms=function(a){for(var y=0;y<arguments.length;++y);y=new an;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(sn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},qe.ls=function(a){for(var y=0;y<arguments.length;++y);y=new an;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(sn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],ee=x[b];if(Dn(ee)){if(!Dn(E)||E.length<ee.length)return!1;for(var ne=0;ne<E.length;ne++){var ae=ee[ne];if(ae!==void 0&&!dS(a,E[ne],ae))return!1}}else if(!dS(a,E,ee))return!1}return!0}function dS(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(sn(y)&&sn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}ji.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 b=a.modelChange;if(b!=="")if(x===no){if(b==="nodeCategory"){var E=this.Lc(a.object),ee=a.newValue;E!==null&&typeof ee=="string"&&(E.category=ee)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===bo){var ne=a.newValue;b==="nodeDataArray"&&sn(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var ae=a.oldValue;b==="nodeDataArray"&&sn(ae)&&this.ip(ae),y.isModified=!0}else x===Ea&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===no){var ue=a.propertyName,ge=a.object;ge===y.model?(ue==="nodeKeyProperty"||ue==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ge,ue),y.isModified=!0}else if(x===bo||x===Eo){var ye=a.change===bo,Le=ye?a.newParam:a.oldParam,ze=ye?a.newValue:a.oldValue,We=this.aj.I(a.object);if(Array.isArray(We))for(a=0;a<We.length;a++){var Je=We[a];if(ye)Cm(Je,ze,Le,!0);else if(!(0>Le)){var it=Le+Vp(Je);Je.pc(it,!0),w0(Je,it,Le)}}y.isModified=!0}}finally{y.aa=!0}}}}},ji.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)},ji.prototype.rp=function(){for(var a=this.H.model,y=new an,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var ee=x[b];this.Lc(ee)===null&&CS(a,ee,!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()},ji.prototype.refreshDataBoundLinks=function(){},ji.prototype.updateRelationshipsFromData=function(){},ji.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 b=this.aj.iterator;b.next();){for(var E=b.value,ee=0;ee<E.length;ee++){var ne=E[ee].sx(a);ne!==null&&(x===null&&(x=er()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);_n(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Dn(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){Zc(y,function(ne){ne=ne.O.s;for(var ae=ne.length,ue=0;ue<ae;ue++)Np(x,ne[ue])});var b=y.Hh;if(Dn(b)){var E=a.aj.I(b);if(E!==null){for(var ee=0;ee<E.length;ee++)if(E[ee]===y){E.splice(ee,1),E.length===0&&a.aj.remove(b);break}}}}ji.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new tn;if(Dn(a))for(var E=0;E<a.length;E++)av(this,a[E],y,b,x);else for(a=a.iterator;a.next();)av(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new an;for(var ee=new tn,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof En)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof Un&&ae.data!==null&&x.Tl()){var ue=ae;ae=ne.key;var ge=ae.pg();ge!==null&&(ge=b.I(ge),ge!==null?(x.qe(ue.data,x.wa(ge.data)),ue=y.Kc(ue.data),ae=ae.kh(),ae!==null&&ue!==null&&ee.add(ae,ue)):x.qe(ue.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<ee.count)for(x=ee.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new tn;b.each(function(Le){Le.key.data!==null&&ye.add(Le.key.data,Le.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function av(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var ee=a.copyPartData(y,x);if(!(ee instanceof Sr))return null;if(ee.isSelected=!1,ee.isHighlighted=!1,b.add(y,ee),y instanceof Un){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var ue=b.I(ae);ue!==null&&(ue.fromNode=ee)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=ee))}if(y instanceof Ir&&ee instanceof Ir)for(y=y.memberParts;y.next();)ne=av(a,y.value,x,b,E),ne instanceof En||ne===null||(ne.containingGroup=ee)}else if(y instanceof En&&ee instanceof En)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(ee.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(ee.toNode=ne)),y=y.labelNodes;y.next();)ne=av(a,y.value,x,b,E),ne!==null&&ne instanceof Un&&(ne.labeledLink=ee);return ee}ji.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof En||(b=E.copyNodeData(b),sn(b)&&(E.xf(b),x=y.Lc(b)))}else ul(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof En||(E=y.copyNodeData(b)),sn(E)&&(x.data=E)));return x},zt.Object.defineProperties(ji.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}}}),ji.prototype.updateAllRelationshipsFromData=ji.prototype.rp,ji.prototype.findLinksByExample=ji.prototype.ls,ji.prototype.findNodesByExample=ji.prototype.ms,ji.prototype.findLinkForData=ji.prototype.Kc,ji.prototype.findNodeForData=ji.prototype.ii,ji.prototype.findPartForData=ji.prototype.Lc,ji.prototype.findNodeForKey=ji.prototype.Vb,ji.prototype.removeModeledPart=ji.prototype.ip,ji.prototype.removeModeledParts=ji.prototype.Gs,ji.prototype.rebuildParts=ji.prototype.Wd;var pS=!1,gS=!1,mS=!1;ji.className="PartManager";function ea(a){ji.apply(this,arguments)}Kt(ea,ji),ea.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ea.prototype.addModeledParts=function(a){for(ji.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Bd(a.value);gd(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),gd(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){ul(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var ee=hv(x,y,!0);ee!==""&&(E.fromPortId=ee),ee=_s(x,y,!0),ee!==void 0&&(ee=a.Vb(ee),ee instanceof Un&&(E.fromNode=ee)),ee=hv(x,y,!1),ee!==""&&(E.toPortId=ee),ee=_s(x,y,!1),ee!==void 0&&(ee=a.Vb(ee),ee instanceof Un&&(E.toNode=ee)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}ea.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}ea.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ea.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ea.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ea.prototype.findPartForKey=function(a){var y=ji.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ea.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ea.prototype.doModelChanged=function(a){var y=this;if(ji.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===no){if(E==="linkFromKey"){var ee=this.Kc(a.object);if(ee!==null){var ne=this.Vb(a.newValue);ee.fromNode=ne}}else if(E==="linkToKey"){var ae=this.Kc(a.object);if(ae!==null){var ue=this.Vb(a.newValue);ae.toNode=ue}}else if(E==="linkFromPortId"){var ge=this.Kc(a.object);if(ge!==null){var ye=a.newValue;typeof ye=="string"&&(ge.fromPortId=ye)}}else if(E==="linkToPortId"){var Le=this.Kc(a.object);if(Le!==null){var ze=a.newValue;typeof ze=="string"&&(Le.toPortId=ze)}}else if(E==="nodeGroupKey"){var We=this.Lc(a.object);if(We!==null){var Je=a.newValue;if(Je!==void 0){var it=this.Vb(Je);it instanceof Ir?We.containingGroup=it:We.containingGroup=null}else We.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var Pt=a.oldValue,Nt=a.newValue;Array.isArray(Pt)&&Pt.forEach(function(fn){0<=Nt.indexOf(fn)||(fn=y.Vb(fn),fn!==null&&(fn.labeledLink=null))}),Array.isArray(Nt)&&Nt.forEach(function(fn){fn=y.Vb(fn),fn!==null&&(fn.labeledLink=Tt)})}}else if(E==="linkCategory"){var At=this.Kc(a.object),Bt=a.newValue;At!==null&&typeof Bt=="string"&&(At.category=Bt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===bo){var Rt=a.newValue;if(E==="linkDataArray"&&typeof Rt=="object"&&Rt!==null)yS(this,Rt);else if(E==="linkLabelKeys"&&lc(Rt)){var Zt=this.Kc(a.object),Fn=this.Vb(Rt);Zt!==null&&Fn!==null&&(Fn.labeledLink=Zt)}x.isModified=!0}else if(b===Eo){var or=a.oldValue;if(E==="linkDataArray"&&typeof or=="object"&&or!==null)this.ip(or);else if(E==="linkLabelKeys"&&lc(or)){var $n=this.Vb(or);$n!==null&&($n.labeledLink=null)}x.isModified=!0}}else if(b===no){var Cn=a.propertyName;a.object!==x.model||Cn!=="linkFromKeyProperty"&&Cn!=="linkToKeyProperty"&&Cn!=="linkFromPortIdProperty"&&Cn!=="linkToPortIdProperty"&&Cn!=="linkLabelKeysProperty"&&Cn!=="nodeIsGroupProperty"&&Cn!=="nodeGroupKeyProperty"&&Cn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ea.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new an,b=y.linkDataArray;b.forEach(function(ee){x.add(ee)});var E=[];this.links.each(function(ee){ee.data===null||x.contains(ee.data)||E.push(ee.data)}),E.forEach(function(ee){AS(y,ee,!1)}),b.forEach(function(ee){a.Kc(ee)===null&&NS(y,ee,!1)})},ea.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof En){var E=_s(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=_s(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var ee=a.labelNodes.first();if(b.wa(ee.data)===E)return}E=new an().addAll(y);var ne=new an;a.labelNodes.each(function(ae){ae.data!==null&&(ae=b.wa(ae.data),ae!==void 0&&ne.add(ae))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink===a&&(ae.labeledLink=null)}),E.each(function(ae){ae=x.Vb(ae),ae!==null&&ae.labeledLink!==a&&(ae.labeledLink=a)}))}}else!(a instanceof mi)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ir)&&(a.containingGroup=y)}}},ea.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var ee={};b.next();){var ne=b.value;y.lb(ne)?E instanceof Ir&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(ee.link=this.Kc(ne),ee.link!==null&&E instanceof Un&&(_s(y,ne,!0)===x&&(ee.link.fromNode=E),_s(y,ne,!1)===x&&(ee.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(ue){return ue===x?(E.labeledLink=ae.link,!0):!1}}(ee)))),ee={link:ee.link}}Bl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ir&&(E.containingGroup=a))}},ea.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Dl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Dl(y,x,b.data)),a instanceof Ir)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Dl(y,x,b)}}},ea.prototype.copyPartData=function(a,y){var x=ji.prototype.copyPartData.call(this,a,y);if(a instanceof En)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.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},ea.prototype.insertLink=function(a,y,x,b){var E=this.diagram,ee=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof En){if(ul(b),ee=b.copy(),ee!==null)return ee.fromNode=a,ee.fromPortId=ae,ee.toNode=x,ee.toPortId=y,E.add(ee),a=ne.archetypeLabelNodeData,a instanceof Un&&(ul(a),a=a.copy(),a!==null&&(a.labeledLink=ee,E.add(a))),ee}else if(b!==null&&(b=ee.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ud(ee,b,ee.wa(a.data),!0),Hd(ee,b,ae,!0),x!==null&&Ud(ee,b,ee.wa(x.data),!1),Hd(ee,b,y,!1),ee.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Un||(a=ee.copyNodeData(a),typeof a=="object"&&a!==null&&(ee.xf(a),a=ee.wa(a),a!==void 0&&ee.Bu(b,a))),E.Kc(b);return null},ea.prototype.findLinkForKey=ea.prototype.findLinkForKey,ea.prototype.findPartForKey=ea.prototype.findPartForKey,ea.prototype.removeAllModeledParts=ea.prototype.removeAllModeledParts,ea.prototype.addModeledParts=ea.prototype.addModeledParts,ea.prototype.addAllModeledParts=ea.prototype.addAllModeledParts,ea.className="GraphLinksPartManager";function Qs(){ji.apply(this,arguments),this.Sg=null}Kt(Qs,ji);function sv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,ee=x;if(a.diagram.isTreePathToChildren||(E=x,ee=y),(b===null||!Ua(b,E,ee,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(ul(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=ee,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Qs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Qs.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Qs.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},Qs.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},Qs.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Qs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Qs.prototype.doModelChanged=function(a){if(ji.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 b=a.modelChange;if(b!==""){if(x===no){if(b==="nodeParentKey"){var E=a.object,ee=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)ee!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var ae=ne.kh();ae!==null?ee===null?y.remove(ae):y.isTreePathToChildren?ae.fromNode=ee:ae.toNode=ee:sv(this,ee,ne)}}else if(b==="parentLinkCategory"){var ue=this.ii(a.object),ge=a.newValue;if(ue!==null&&typeof ge=="string"){var ye=ue.kh();ye!==null&&(ye.category=ge)}}y.isModified=!0}}else if(x===no){var Le=a.propertyName;a.object===y.model&&Le==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Qs.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Un&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:sv(this,y,a):b!==null&&Ep(x,b,!1)))}}},Qs.prototype.updateDataBindings=function(a,y){ji.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Qs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var ee=b.value;y.lb(ee)&&E instanceof Un&&y.mh(ee)===x&&sv(this,E,this.ii(ee))}Bl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Un&&(a=this.Vb(a),sv(this,a,E))}},Qs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var ee=E.pc(-1,b,!1);0<=ee&&this.diagram.cb(Eo,"parts",E,b,null,ee,null),ee=b.layerChanged,ee!==null&&ee(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Dl(y,x,E)}},Qs.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},Qs.prototype.findLinkForKey=Qs.prototype.findLinkForKey,Qs.className="TreePartManager";function fr(a,y){this.kl=new an,this.il=new an,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,cr(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 rn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(Dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}fr.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},fr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},fr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},fr.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}}return y},fr.prototype.xA=function(a){a.change!==Ea&&jt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof zo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},fr.prototype.Qv=function(a,y){var x=this,b=!1,E=new an,ee=new an,ne=new an,ae=this.vh;a.changes.each(function(Le){Le.model===x&&(Le.modelChange==="nodeDataArray"?Le.change===bo?E.add(Le.newValue):Le.change===Eo&&ne.add(Le.oldValue):x.lb(Le.object)?ee.add(Le.object):Le.change!==no||x.modelData!==Le.object&&Le.propertyName!=="modelData"?Le.object!==null&&(ae&&ae.contains(Le.object)?ae.get(Le.object).each(function(ze){x.lb(ze)&&ee.add(ze)}):Le.object instanceof fr||x.ri()&&x.Jc(Le.object)||bS(x,Le.object).each(function(ze){ee.add(ze)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(Le){ue.add(x.wa(Le)),y||ee.add(Le)});var ge=this.kl;ge.clear(),ne.each(function(Le){ge.add(x.wa(Le)),y&&ee.add(Le)}),a=x.cloneDeep(ee.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<ue.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=ue.Fa():ye.insertedNodeKeys=ue.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<ge.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=ge.Fa():ye.removedNodeKeys=ge.Fa()),ge.clear(),ue.clear(),ye},fr.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,ee){function ne(Le,ze){ae?(Le.__gohashid===void 0&&ee.push(Le),b.set(Le,ze)):(Le=Ri++,b.set(Le,ze),E.set(Le,y))}if(!sn(y))return y;ee||(ee=[]);var ae=Object.isExtensible(y);if(b||(b=new tn),ae){var ue=b.get(y);if(ue)return ue}else for(E||(E=new tn),ue=E.iterator;ue.next();){var ge=ue.key;if(ue.value===y&&(ge=b.get(ge)))return ge}if(Array.isArray(y)){ue=[],ne(y,ue);for(var ye=0;ye<y.length;ye++)ue.push(Gd(a,y[ye],!1,b,E,ee))}else if(y instanceof lt||y instanceof mn||y instanceof $t||y instanceof Ur||y instanceof Ln)ue=y.copy(),ne(y,ue);else{if(y instanceof Ai||y instanceof Tn||y instanceof hn)return y;if(y instanceof rn)ue=new rn().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof an)ue=new an().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof tn)ue=new tn().addAll(Gd(a,y.Fa(),!1,b,E,ee)),ne(y,ue);else if(y instanceof Date)ue=new Date(y.getTime()),ne(y,ue);else if(y instanceof RegExp)ue=new RegExp(y),ne(y,ue),ue.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ue=y.copy(),ne(y,ue);else for(ye in ue={},ne(y,ue),y)ye!=="__gohashid"&&(ue[ye]=Gd(a,y[ye],!1,b,E,ee))}return x&&ee.forEach(function(Le){delete Le.__gohashid}),ue}qe=fr.prototype,qe.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},qe.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},qe.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 xS(a,y){y=y.modelData,sn(y)&&(a.dm(y),a.modelData=y)}qe.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+hy(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+sc(this,this.nodeDataArray,!0)},qe.kv=function(a){xS(this,a),a=a.nodeDataArray,Dn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,ee){if((ee=ee.part)&&(ee=ee.data,E!==ee)){var ne=b.get(E);ne===null?(ne=new an,ne.add(ee),b.add(E,ne)):ne.add(ee)}}var b=a.vh;b===null&&(b=new tn,y.changes.each(function(E){if(E.diagram!==null){var ee=E.change;ee===no?(E=E.object.panel)&&(ee=E.data)&&x(ee,E):(ee===bo||ee===Eo)&&(E=E.object,(ee=E.itemArray)&&x(ee,E))}}),a.vh=b)}function bS(a,y){for(var x=new an,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];lv(a,y,E,E,x)}return x}function lv(a,y,x,b,E){if(Array.isArray(x))for(var ee=0;ee<x.length;ee++){var ne=x[ee];if(ne===y)return E.add(b),!0;if(lv(a,y,ne,b,E))return!0}else if(sn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(ee in x){if(ne=x[ee],ne===y)return E.add(b),!0;if(lv(a,y,ne,b,E))return!0}return!1}qe.Pv=function(a,y){var x=this,b=!1,E=new an,ee=new an,ne=new an,ae=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?ee.add(ye.object):ye.change!==no||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){x.lb(Le)&&ee.add(Le)}):ye.object instanceof fr||x.ri()&&x.Jc(ye.object)||bS(x,ye.object).each(function(Le){ee.add(Le)})):b=!0)});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(x.wa(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(x.wa(ye)),y&&ee.add(ye)}),a="",b&&(a+=`,
|
|
"modelData": `+hy(this,this.modelData)),0<ue.count&&(a+=(y?this.Yv:this.Wv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.jy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},qe.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)&&jt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new tn;if(Array.isArray(x))for(var E=0;E<x.length;E++){var ee=x[E],ne=this.wa(ee);ne!=null&&b.set(ne,ee)}if(Array.isArray(y))for(E=y.length,ee=0;ee<E;ee++){ne=y[ee];var ae=this.hc(ne);ae===null&&(ae=(ae=b.get(ne))?ae:this.copyNodeData({}),this.km(ae,ne),this.xf(ae))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],ee=this.wa(E),ee=this.hc(ee),ee!==null){for(var ue in E)ue==="__gohashid"||ue===this.nodeKeyProperty||this.Wj()&&ue===this.nodeIsGroupProperty||this.setDataProperty(ee,ue,E[ue]);this.lm(E,ee)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ue=0;ue<x;ue++)y=this.hc(a[ue]),y!==null&&this.cm(y)},qe.$x=function(a,y){a.change!==Ea&&jt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof zo?(y===void 0&&(y=dg(this,this)),wS(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 }'},qe.yA=function(a,y){return this.$x(a,y)},qe.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},qe.toJSON=function(a){return this.np(a)},qe.Zw=function(a){var y=null;if(typeof a=="string")try{y=vn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:jt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&jt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},qe.Ky=function(a){return this.Zw(a)},fr.constructGraphLinksModel=function(){return new fr},qe=fr.prototype,qe.dm=function(a){if(Dn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(sn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:jt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(sn(a)){for(y in a)if(x=a[y],sn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new rn,b=0;b<x.length/2;b++)E.add(new lt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},qe.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()):Dn(a)?sc(this,a):sn(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function sc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new rr;E.add("["),x&&1<b&&E.add(`
|
|
`);for(var ee=0;ee<b;ee++){var ne=y[ee];ne!==void 0&&(0<ee&&(E.add(","),x&&E.add(`
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
`),E.add("]"),E.toString()}function PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function $a(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof lt)y={class:"go.Point",x:$a(x.x),y:$a(x.y)};else if(x instanceof mn)y={class:"go.Size",width:$a(x.width),height:$a(x.height)};else if(x instanceof $t)y={class:"go.Rect",x:$a(x.x),y:$a(x.y),width:$a(x.width),height:$a(x.height)};else if(x instanceof Ur)y={class:"go.Margin",top:$a(x.top),right:$a(x.right),bottom:$a(x.bottom),left:$a(x.left)};else if(x instanceof Ln)x.sb()?y={class:"go.Spot",x:$a(x.x),y:$a(x.y),offsetX:$a(x.offsetX),offsetY:$a(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ai){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Ku||x.type===Ys)&&(y.start=x.start,y.end=x.end,x.type===Ys&&(x.startRadius!==0&&(y.startRadius=$a(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=$a(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Tn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=$a(x.startX)),x.startY!==0&&(y.startY=$a(x.startY)),x.endX!==0&&(y.endX=$a(x.endX)),x.endY!==0&&(y.endY=$a(x.endY)),x.spot1.D(Ei)||(y.spot1=x.spot1),x.spot2.D(io)||(y.spot2=x.spot2),x.type===Tn.o&&(y.path=Tn.ia(x))):x instanceof hn&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var ee=Po(y,E);if(!PS(E,ee))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&ee instanceof rn){var ne="[";for(ee=ee.iterator;ee.next();){var ae=ee.value;1<ne.length&&(ne+=","),ne+=a.sm(ae.x),ne+=",",ne+=a.sm(ae.y)}ne+="]",b+=ne}else b+=a.sm(ee)}return b+"}"}function qa(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function jx(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 lt(qa(a.x),qa(a.y));else if(y==="Size")x=new mn(qa(a.width),qa(a.height));else if(y==="Rect")x=new $t(qa(a.x),qa(a.y),qa(a.width),qa(a.height));else if(y==="Margin")x=new Ur(qa(a.top),qa(a.right),qa(a.bottom),qa(a.left));else if(y==="Spot")typeof a.enum=="string"?x=la(a.enum):x=new Ln(qa(a.x),qa(a.y),qa(a.offsetX),qa(a.offsetY));else if(y==="Brush"){if(x=new Ai,x.type=qn(Ai,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ln&&(x.start=a.start),a.end instanceof Ln&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=qa(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=qa(a.endRadius)),a=a.colorStops,sn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Tn.parse(a.path):x=new Tn,x.type=qn(Tn,a.type),typeof a.startX=="number"&&(x.startX=qa(a.startX)),typeof a.startY=="number"&&(x.startY=qa(a.startY)),typeof a.endX=="number"&&(x.endX=qa(a.endX)),typeof a.endY=="number"&&(x.endY=qa(a.endY)),a.spot1 instanceof Ln&&(x.spot1=a.spot1),a.spot2 instanceof Ln&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=qn(b,a.name)));return x}qe.Pe=function(a){return this.Lt.add(a),this},qe.ik=function(a){this.Lt.remove(a)},qe.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},qe.cb=function(a,y,x,b,E,ee,ne){Ro(this,"",a,y,x,b,E,ee,ne)},qe.g=function(a,y,x,b,E){Ro(this,"",no,a,this,y,x,b,E)},qe.Fs=function(a,y,x,b,E,ee){Ro(this,"",no,y,a,x,b,E,ee)};function Ro(a,y,x,b,E,ee,ne,ae,ue){ae===void 0&&(ae=null),ue===void 0&&(ue=null);var ge=new oo;ge.model=a,ge.change=x,ge.modelChange=y,ge.propertyName=b,ge.object=E,ge.oldValue=ee,ge.oldParam=ae,ge.newValue=ne,ge.newParam=ue,a.ds(ge)}fr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===no){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),ro(x,b,E)}else a.change===bo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,sn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&Bn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&jn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Dn(b)&&a.propertyName&&(b=Po(a.object,a.propertyName)),Dn(b)&&typeof x=="number"&&(a=a.newValue,y?Bn(b,x):jn(b,x,a))):jt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,sn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&jn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&Bn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Dn(b)&&a.propertyName&&(b=Po(a.object,a.propertyName)),Dn(b)&&typeof x=="number"&&(a=a.oldValue,y?jn(b,x,a):Bn(b,x))):jt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&jt("unknown ChangedEvent: "+a.toString())},fr.prototype.Ea=function(a){return this.undoManager.Ea(a)},fr.prototype.eb=function(a){return this.undoManager.eb(a)},fr.prototype.Kf=function(){return this.undoManager.Kf()},fr.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},qe=fr.prototype,qe.La=function(a,y){y===void 0&&(y=""),Ro(this,"SourceChanged",Ea,y,a,null,null)},qe.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for node data "+a+" is not a number or a string: "+y)}}},qe.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Po(a,x);b!==y&&this.hc(y)===null&&(ro(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ro(this,"nodeKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ro(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}qe.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},qe.hc=function(a){return a===null&&jt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},qe.$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 b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ro(a,y,x)}}}}},qe.xf=function(a){a!==null&&(Cr(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&jt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,jn(a.Tc,b,y)),Ro(a,"nodeDataArray",bo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}qe.Fy=function(a){if(Dn(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)},qe.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;Bn(a.Tc,b)}Ro(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}qe.nA=function(a){if(Dn(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)},qe.$z=function(a){if(a!==this.nodeDataArray&&Dn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var ee=a[E],ne=this.wa(ee);if(ne!==void 0){x.add(ne);var ae=this.hc(ne);ae!==ee&&(ae!==null?(this.Do(ae,ee),this.lm(ee,ae)):(ee=this.cloneDeep(ee),this.km(ee,ne),this.xf(ee)))}else ne=this.cloneDeep(ee),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},qe.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof an&&this.Vf.add(y,a))},qe.Lv=function(){},qe.fm=function(){},qe.em=function(){},qe.qp=function(){};function Dl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new an,a.Vf.add(y,b)),b.add(x)}}function Bl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof an&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function fg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof an?a:null)}qe.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},fr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),sn(a)&&cr(a),a};function uv(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=uv(a,y[x],a.copiesArrayObjects);b.push(E)}return cr(b),b}if(x&&sn(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var ee=Po(y,b),ne=dg(a,ee);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||ee instanceof fr||ee instanceof ho||ee instanceof zo||ee instanceof oo||(ee=uv(a,ee,!1)),ro(x,b,ee)}return cr(x),x}return y instanceof lt||y instanceof mn||y instanceof $t||y instanceof Ln||y instanceof Ur?y.copy():y}fr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!kS&&a instanceof _t&&(kS=!0,Yn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Yn(" Is that really your intent?"));var b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},qe=fr.prototype,qe.set=function(a,y,x){this.setDataProperty(a,y,x)},qe.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},qe.Ay=function(a,y){this.ts(a,-1,y)},qe.ts=function(a,y,x){0>y&&(y=a.length),jn(a,y,x),Ro(this,"",bo,"",a,null,x,null,y)},qe.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&jt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Bn(a,y),Ro(this,"",Eo,"",a,x,null,y,null)},qe.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Po(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForNodeData found a non-string category for "+a+": "+y)},qe.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"nodeCategory",no,x,a,b,y))}else ro(a,x,y)}},qe.lm=function(a,y){this.jm(y,this.Ro(a))},qe.Tl=function(){return!1},qe.Wj=function(){return!1},qe.ri=function(){return!1},qe.xs=function(){return!1},qe.Xj=function(){return!1};function cy(){return new fr}function dg(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 dg(a,y.constructor);return typeof y}function fy(a){return bl[a]?bl[a]:vn.go!==void 0&&vn.go[a]?vn.go[a]:null}function Po(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(b){}return x}function ro(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(b){}}zt.Object.defineProperties(fr.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===""&&jt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&jt("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,b=0;b<x;b++){var E=a[b];sn(E)||jt("Model.nodeDataArray must only contain Objects, not: "+E),Cr(E)}for(this.Tc=a,b=new rn,E=0;E<x;E++){var ee=a[E],ne=this.wa(ee);ne===void 0||this.kb.I(ne)!==null?b.add(ee):this.kb.add(ne,ee)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),ee=this.wa(E),ee!==void 0&&this.kb.add(ee,E);for(Ro(this,"nodeDataArray",no,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);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"}}}),fr.prototype.setCategoryForNodeData=fr.prototype.jm,fr.prototype.getCategoryForNodeData=fr.prototype.Ro,fr.prototype.removeArrayItem=fr.prototype.ov,fr.prototype.insertArrayItem=fr.prototype.ts,fr.prototype.addArrayItem=fr.prototype.Ay,fr.prototype.assignAllDataProperties=fr.prototype.Do,fr.prototype.set=fr.prototype.set,fr.prototype.clearUnresolvedReferences=fr.prototype.Qy,fr.prototype.mergeNodeDataArray=fr.prototype.$z,fr.prototype.removeNodeDataCollection=fr.prototype.nA,fr.prototype.removeNodeData=fr.prototype.cm,fr.prototype.addNodeDataCollection=fr.prototype.Fy,fr.prototype.addNodeData=fr.prototype.xf,fr.prototype.makeNodeDataKeyUnique=fr.prototype.$u,fr.prototype.findNodeDataForKey=fr.prototype.hc,fr.prototype.containsNodeData=fr.prototype.lb,fr.prototype.setKeyForNodeData=fr.prototype.km,fr.prototype.getKeyForNodeData=fr.prototype.wa,fr.prototype.updateTargetBindings=fr.prototype.La,fr.prototype.commit=fr.prototype.commit,fr.prototype.rollbackTransaction=fr.prototype.Kf,fr.prototype.commitTransaction=fr.prototype.eb,fr.prototype.startTransaction=fr.prototype.Ea,fr.prototype.raiseDataChanged=fr.prototype.Fs,fr.prototype.raiseChanged=fr.prototype.g,fr.prototype.raiseChangedEvent=fr.prototype.cb,fr.prototype.removeChangedListener=fr.prototype.ik,fr.prototype.addChangedListener=fr.prototype.Pe,fr.prototype.writeJsonValue=fr.prototype.sm,fr.prototype.replaceJsonObjects=fr.prototype.dm,fr.prototype.applyIncrementalJSON=fr.prototype.Ky,fr.prototype.applyIncrementalJson=fr.prototype.Zw,fr.prototype.toJSON=fr.prototype.toJSON,fr.prototype.toJson=fr.prototype.np,fr.prototype.toIncrementalJSON=fr.prototype.yA,fr.prototype.toIncrementalJson=fr.prototype.$x,fr.prototype.toIncrementalData=fr.prototype.xA,fr.prototype.clear=fr.prototype.clear;var kS=!1,bl={};fr.className="Model",fr.fromJSON=fr.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=vn.JSON.parse(a)}catch(ee){}else typeof a=="object"?x=a:jt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=fy(b)):(E=fy(b),E===null&&(E=vn[b])),typeof E=="function"&&(a=new E)}catch(ee){}a===null||a instanceof fr?y=a:jt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=fr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},fr.safePropertyValue=Po,fr.safePropertySet=ro,bl.Brush=Ai,bl.ChangedEvent=oo,bl.Geometry=Tn,bl.Margin=Ur,bl.Panel=wn,bl.Point=lt,bl.Rect=$t,bl.Size=mn,bl.Spot=Ln,bl.Transaction=zo,bl.UndoManager=ho;function Lo(a,y,x,b){cr(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,b===void 0?(this.el=LS,this.wk=null):(this.el=pg,this.wk=b),this.st=new an}Lo.prototype.copy=function(){var a=new Lo;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},qe=Lo.prototype,qe.qb=function(a){a.classType===Lo&&(this.mode=a)},qe.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},qe.freeze=function(){return this._isFrozen=!0,this},qe.ka=function(){return this._isFrozen=!1,this},qe.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},qe.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},qe.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function TS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}qe.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Yn("Binding error: target property is the empty string: "+this.toString());else{var ee=y;if(b!==""&&(ee=Po(y,b)),ee!==void 0)if(E===null)x!==""&&ro(a,x,ee);else try{if(x!==""){var ne=E(ee,a);ro(a,x,ne)}else E(ee,a)}catch(ae){}}}},qe.sp=function(a,y,x,b){if(this.el===pg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var ee=this.wk,ne=a;if(E!==""&&(ne=Po(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var ae=b!==null?b.diagram:null,ue=ae!==null?ae.model:null;if(ee===null){if(x!=="")ue!==null?ue.setDataProperty(y,x,ne):ro(y,x,ne);else if(ue!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ge=b.itemIndex,ye=b.panel.itemArray;ue.ov(ye,ge),ue.ts(ye,ge,ne)}}else try{if(x!==""){var Le=ee(ne,y,ue);ue!==null?ue.setDataProperty(y,x,Le):ro(y,x,Le)}else{var ze=ee(ne,y,ue);if(ze!==void 0&&ue!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var We=b.itemIndex,Je=b.panel.itemArray;ue.ov(Je,We),ue.ts(Je,We,ze)}}}catch(it){}}finally{this.st.remove(a)}}}},zt.Object.defineProperties(Lo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&ln(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&ln(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&ln(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&ln(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&ln(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&ln(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&ln(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&ln(this),this.el=a}}}),Lo.prototype.updateSource=Lo.prototype.sp,Lo.prototype.updateTarget=Lo.prototype.Mv,Lo.prototype.ofModel=Lo.prototype.dA,Lo.prototype.ofObject=Lo.prototype.cp,Lo.prototype.makeTwoWay=Lo.prototype.Kx;var Ox="Binding",LS=new hn(Lo,"OneWay",1),pg=new hn(Lo,"TwoWay",2);Lo.className="Binding",Lo.parseEnum=function(a,y){return function(x){return x=qn(a,x),x===null?y:x}},Lo.toString=Fr,Lo.OneWay=LS,Lo.TwoWay=pg;function si(a,y,x){fr.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new an,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&&(Dn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Kt(si,fr),si.constructGraphLinksModel=fr.constructGraphLinksModel,si.prototype.cloneProtected=function(a){fr.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},qe=si.prototype,qe.clear=function(){fr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},qe.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,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+_s(this,E,!0)+"-->"+_s(this,E,!1)}return y},qe.Qv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=fr.prototype.Qv.call(this,a,y),b=this,E=new an,ee=new an,ne=new an,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?ee.add(ye.object):ye.object!==null&&(ye.object!==null&&ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof fr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=b.cloneDeep(ee.Fa()),0<ue.count&&(x===null&&(x={}),y?x.removedLinkKeys=ue.Fa():x.insertedLinkKeys=ue.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),ue.clear(),x},qe.rm=function(){var a=fr.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},qe.gp=function(a){fr.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)},qe.Rv=function(){var a=fr.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},qe.kv=function(a){fr.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function MS(a,y){for(var x=new an,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}qe.Pv=function(a,y){this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=fr.prototype.Pv.call(this,a,y),b=this,E=new an,ee=new an,ne=new an,ae=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===bo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?ee.add(ye.object):ye.object!==null&&(ye.object!==null&&ae&&ae.contains(ye.object)?ae.get(ye.object).each(function(Le){b.Jc(Le)&&ee.add(Le)}):ye.object instanceof fr||b.lb(ye.object)||MS(b,ye.object).each(function(Le){ee.add(Le)})))});var ue=this.il;ue.clear(),E.each(function(ye){ue.add(b.Ac(ye)),y||ee.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&ee.add(ye)}),a=x,0<ue.count&&(a+=(y?this.Xv:this.Vv)+sc(this,ue.Fa(),!0)),0<ee.count&&(a+=this.iy+sc(this,ee.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+sc(this,ge.Fa(),!0)),ge.clear(),ue.clear(),a},qe.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)&&jt("applyIncrementalJson cannot change Model properties"),fr.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],ee=this.jh(E);ee===null&&(ee=this.Jo({}),this.Ks(ee,E),this.fi(ee))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],ee=this.Ac(E),ee=this.jh(ee),ee!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(ee,ne,E[ne]);jS(this,E,ee)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},si.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===no){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),ro(x,b,E);return}}else if(a.change===bo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,sn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,sn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}fr.prototype.changeState.call(this,a,y)}},qe=si.prototype,qe.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),ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},qe.yx=function(a){return _s(this,a,!0)},qe.wv=function(a,y){Ud(this,a,y,!0)},qe.Bx=function(a){return _s(this,a,!1)},qe.Bv=function(a,y){Ud(this,a,y,!1)};function _s(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Po(y,a),a!==void 0))){if(lc(a))return a;jt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ud(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var ee=Po(y,E);ee!==x&&(Bl(a,ee,y),ro(y,E,x),a.hc(x)===null&&Dl(a,x,y),Ro(a,b?"linkFromKey":"linkToKey",no,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}qe.zx=function(a){return hv(this,a,!0)},qe.xv=function(a,y){Hd(this,a,y,!0)},qe.Cx=function(a){return hv(this,a,!1)},qe.Cv=function(a,y){Hd(this,a,y,!1)};function hv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Po(y,a),y===void 0?"":y)}function Hd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var ee=Po(y,E);ee===void 0&&(ee=""),ee!==x&&(ro(y,E,x),Ro(a,b?"linkFromPortId":"linkToPortId",no,E,y,ee,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}qe.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=Po(a,y),a===void 0?cv:a)},qe.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Po(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)Bl(this,b[ee],a);for(ro(a,x,y),E=y.length,ee=0;ee<E;ee++){var ne=y[ee];this.hc(ne)===null&&Dl(this,ne,a)}Ro(this,"linkLabelKeys",no,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ro(a,x,y)}},qe.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Po(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Dl(this,y,a),Ro(this,"linkLabelKeys",bo,x,a,null,y,null,E)))}else jt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},qe.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Po(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Bl(this,y,a),Ro(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&jt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},qe.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("Key value for link data "+a+" is not a number or a string: "+y)}}},qe.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Po(a,x);b!==y&&this.jh(y)===null&&(ro(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ro(this,"linkKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},qe.jh=function(a){return a===null&&jt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},qe.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 b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ro(a,y,x)}}}}},qe.Jc=function(a){return a===null?!1:this.$f.contains(a)},qe.fi=function(a){a!==null&&(Cr(a),this.Jc(a)||NS(this,a,!0))};function NS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&jt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ro(a,"linkDataArray",bo,"linkDataArray",a,null,y,null,b),dy(a,y)}qe.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)},qe.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ro(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=_s(a,y,!0),Bl(a,x,y),x=_s(a,y,!1),Bl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)x=b[ee],Bl(a,x,y)}qe.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)},qe.Zz=function(a){if(this.linkKeyProperty===""&&jt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Dn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var ee=a[E],ne=this.Ac(ee);if(ne!==void 0){x.add(ne);var ae=this.jh(ne);ae!==ee&&(ae!==null?(this.Do(ae,ee),jS(this,ee,ae)):(ee=this.cloneDeep(ee),this.Ks(ee,ne),this.fi(ee)))}else ne=this.cloneDeep(ee),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function dy(a,y){var x=_s(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y),x=_s(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,ee=0;ee<E;ee++)x=b[ee],a.hc(x)===null&&Dl(a,x,y)}qe.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),sn(a)&&(cr(a),this.lf!==""&&ro(a,this.lf,void 0),this.mf!==""&&ro(a,this.mf,void 0),this.je!==""&&ro(a,this.je,[])),a},qe.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Po(a,y)},qe.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},qe.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Po(a,x);b!==y&&(Bl(this,b,a),ro(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeGroupKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},si.prototype.copyNodeData=function(a){return a===null?null:(a=fr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Po(a,this.Je)===void 0||ro(a,this.Je,void 0),a)},si.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){Ud(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ud(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Hd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Hd(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 b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},qe=si.prototype,qe.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&Po(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},qe.jp=function(a,y){fr.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 b=x.value,E=a,ee=y;if(_s(this,b,!0)===E){var ne=this.lf;ro(b,ne,ee),Ro(this,"linkFromKey",no,ne,b,E,ee),typeof ne=="string"&&this.La(b,ne)}if(_s(this,b,!1)===E&&(ne=this.mf,ro(b,ne,ee),Ro(this,"linkToKey",no,ne,b,E,ee),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var ae=ne.length,ue=this.je,ge=0;ge<ae;ge++)ne[ge]===E&&(ne[ge]=ee,Ro(this,"linkLabelKeys",bo,ue,b,E,ee,ge,ge))}},qe.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ro(a,b,x),Ro(this,"nodeGroupKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qe.Lv=function(){fr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},qe.fm=function(a){fr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=er();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ro(this,"nodeGroupKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(_s(this,b,!0)===a&&(E=this.lf,Ro(this,"linkFromKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),_s(this,b,!1)===a&&(E=this.mf,Ro(this,"linkToKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var ee=E.length,ne=this.je,ae=0;ae<ee;ae++)E[ae]===a&&(Ro(this,"linkLabelKeys",bo,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)Bl(this,a,x[y]);_n(x)}},qe.em=function(a){fr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Dl(this,y,a)},qe.qp=function(a){fr.prototype.qp.call(this,a);var y=this.lh(a);Bl(this,y,a)},qe.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Po(a,y),y===void 0))return"";if(typeof y=="string")return y;jt("getCategoryForLinkData found a non-string category for "+a+": "+y)},si.prototype.getLinkCategoryForData=function(a){return this.ps(a)},si.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"linkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},si.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},qe=si.prototype,qe.lm=function(a,y){fr.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function jS(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))}qe.Wj=function(){return!0},qe.ri=function(){return!0},qe.xs=function(){return!0},qe.Xj=function(){return!0},zt.Object.defineProperties(si.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,b=0;b<x;b++){var E=a[b];sn(E)||jt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Cr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new rn,E=0;E<x;E++){var ee=a[E],ne=this.Ac(ee);ne===void 0||this.wb.I(ne)!==null?b.add(ee):this.wb.add(ne,ee)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),ee=this.Ac(E),ee!==void 0&&this.wb.add(ee,E)}for(b=new an,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ro(this,"linkDataArray",no,"linkDataArray",this,y,a),y=0;y<x;y++)dy(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,b=0;b<x;b++){var E=this.linkDataArray[b],ee=this.Ac(E);ee===void 0&&(this.Bs(E),ee=this.Ac(E)),ee!==void 0&&this.wb.add(ee,E)}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"}}}),si.prototype.setCategoryForLinkData=si.prototype.lp,si.prototype.getCategoryForLinkData=si.prototype.ps,si.prototype.assignAllDataProperties=si.prototype.Do,si.prototype.setGroupKeyForNodeData=si.prototype.mp,si.prototype.getGroupKeyForNodeData=si.prototype.lh,si.prototype.isGroupForNodeData=si.prototype.Yu,si.prototype.copyLinkData=si.prototype.Jo,si.prototype.mergeLinkDataArray=si.prototype.Zz,si.prototype.removeLinkDataCollection=si.prototype.lA,si.prototype.removeLinkData=si.prototype.bm,si.prototype.addLinkDataCollection=si.prototype.Ey,si.prototype.addLinkData=si.prototype.fi,si.prototype.containsLinkData=si.prototype.Jc,si.prototype.makeLinkDataKeyUnique=si.prototype.Bs,si.prototype.findLinkDataForKey=si.prototype.jh,si.prototype.setKeyForLinkData=si.prototype.Ks,si.prototype.getKeyForLinkData=si.prototype.Ac,si.prototype.removeLabelKeyForLinkData=si.prototype.Qx,si.prototype.addLabelKeyForLinkData=si.prototype.Bu,si.prototype.setLabelKeysForLinkData=si.prototype.Ls,si.prototype.getLabelKeysForLinkData=si.prototype.Ef,si.prototype.setToPortIdForLinkData=si.prototype.Cv,si.prototype.getToPortIdForLinkData=si.prototype.Cx,si.prototype.setFromPortIdForLinkData=si.prototype.xv,si.prototype.getFromPortIdForLinkData=si.prototype.zx,si.prototype.setToKeyForLinkData=si.prototype.Bv,si.prototype.getToKeyForLinkData=si.prototype.Bx,si.prototype.setFromKeyForLinkData=si.prototype.wv,si.prototype.getFromKeyForLinkData=si.prototype.yx,si.prototype.clear=si.prototype.clear;var cv=Object.freeze([]);si.className="GraphLinksModel",bl.GraphLinksModel=si,fr.constructGraphLinksModel=fr.constructGraphLinksModel=function(){return new si},fr.initDiagramModel=cy=function(){return new si};function es(a,y){fr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Kt(es,fr),es.constructGraphLinksModel=fr.constructGraphLinksModel,es.prototype.cloneProtected=function(a){fr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},qe=es.prototype,qe.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Fr(E)}}return y},qe.rm=function(){var a=fr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},qe.gp=function(a){fr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},qe.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&jt("applyIncrementalJson cannot change Model properties"),fr.prototype.fp.call(this,a)},qe.Vl=function(a){return a},qe.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Po(a,y),y!==void 0)){if(lc(y))return y;jt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},qe.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 b=Po(a,x);b!==y&&(Bl(this,b,a),ro(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeParentKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},qe.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Po(a,y),y===void 0)?"":typeof y=="string"?y:(jt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},es.prototype.getLinkCategoryForData=function(a){return this.ss(a)},es.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Po(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"parentLinkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},es.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},es.prototype.copyNodeData=function(a){return a===null?null:(a=fr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Po(a,this.Ke)===void 0||ro(a,this.Ke,void 0),a)},es.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 b=Po(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},qe=es.prototype,qe.jp=function(a,y){fr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},qe.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ro(a,b,x),Ro(this,"nodeParentKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qe.fm=function(a){fr.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=er();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ro(this,"nodeParentKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Bl(this,a,x[y]);_n(x)}},qe.em=function(a){fr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Dl(this,y,a)},qe.qp=function(a){fr.prototype.qp.call(this,a);var y=this.mh(a);Bl(this,y,a)},qe.lm=function(a,y){fr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},qe.Tl=function(){return!0},qe.xs=function(){return!0},zt.Object.defineProperties(es.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"}}}),es.prototype.setParentLinkCategoryForNodeData=es.prototype.Ms,es.prototype.getParentLinkCategoryForNodeData=es.prototype.ss,es.prototype.setParentKeyForNodeData=es.prototype.qe,es.prototype.getParentKeyForNodeData=es.prototype.mh,es.className="TreeModel",bl.TreeModel=es;function po(a){so.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Pl,this.Ti=0,this.Zv=new lt,this.Jp=this.me=0,this.Xr=new yg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Pl,this.K=ts,this.nd=Kd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Kt(po,so),po.prototype.cloneProtected=function(a){so.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},po.prototype.qb=function(a){a.classType===po?a===mv||a===vv||a===pv||a===gv||a===Kd?this.sorting=a:a===qc||a===Wd||a===ts||a===hc?this.direction=a:a===Th||a===uc||a===Pl||a===Cl?this.arrangement=a:(a===zf||a===yv)&&(this.nodeDiameterFormula=a):so.prototype.qb.call(this,a)},po.prototype.createNetwork=function(){return new Vd(this)},po.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 rn;y.addAll(a.iterator),a=new rn;var x=new rn,b=this.sort(y),E,ee,ne=this.Jp,ae=this.arrangement,ue=this.nodeDiameterFormula,ge=this.radius;(!isFinite(ge)||0>=ge)&&(ge=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Le=this.startAngle;isFinite(Le)||(Le=0);var ze=this.sweepAngle;if((!isFinite(ze)||360<ze||1>ze)&&(ze=360),y=this.spacing,isFinite(y)||(y=NaN),ae===Cl&&ue===zf?ae=Pl:ae===Cl&&ue!==zf&&(ae=this.arrangement),(this.direction===qc||this.direction===Wd)&&this.sorting!==Kd){for(ue=0;!(ue>=b.length)&&(a.add(b.M(ue)),!(ue+1>=b.length));ue+=2)x.add(b.M(ue+1));this.direction===qc?(this.arrangement===Cl&&a.reverse(),b=new rn,b.addAll(a),b.addAll(x)):(this.arrangement===Cl&&x.reverse(),b=new rn,b.addAll(x),b.addAll(a))}ue=b.length;for(var We=ee=E=0;We<b.length;We++){var Je=Le+ze*ee*(this.direction===ts?1:-1)/ue,it=b.M(We).diameter;isNaN(it)&&(it=cc(b.M(We),Je)),360>ze&&(We===0||We===b.length-1)&&(it/=2),E+=it,ee++}if(isNaN(ge)||ae===Cl){if(isNaN(y)&&(y=6),ae!==Pl&&ae!==Cl){for(ee=-1/0,ne=0;ne<ue;ne++)We=b.M(ne),E=b.M(ne===ue-1?0:ne+1),isNaN(We.diameter)&&cc(We,0),isNaN(E.diameter)&&cc(E,0),ee=Math.max(ee,(We.diameter+E.diameter)/2);ne=ee+y,ae===Th?ge=(ee+y)/(2*Math.PI/ue):ge=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180)}else ge=fv(this,E+(360<=ze?ue:ue-1)*(ae!==Cl?y:1.6*y),ye,Le*Math.PI/180,ze*Math.PI/180);ee=ge*ye}else if(ee=ge*ye,We=py(this,ge,ee,Le*Math.PI/180,ze*Math.PI/180),isNaN(y))(ae===Pl||ae===Cl)&&(y=(We-E)/(360<=ze?ue:ue-1));else if(ae===Pl||ae===Cl)We=(We-E)/(360<=ze?ue:ue-1),We<y?(ge=fv(this,E+y*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),ee=ge*ye):y=We;else{for(ne=-1/0,E=0;E<ue;E++)Je=b.M(E),it=b.M(E===ue-1?0:E+1),isNaN(Je.diameter)&&cc(Je,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,(Je.diameter+it.diameter)/2);ne+=y,E=fv(this,ne*(360<=ze?ue:ue-1),ye,Le*Math.PI/180,ze*Math.PI/180),E>ge?(ge=E,ee=ge*ye):ne=We/(360<=ze?ue:ue-1)}if(this.kw=ae,this.lc=ge,this.Zm=ye,this.lw=Le,this.Wp=ze,this.Ti=y,this.me=ee,this.Jp=ne,y=b,b=this.kw,ae=this.lc,ge=this.lw,ye=this.Wp,Le=this.Ti,ze=this.me,ue=this.Jp,this.direction!==qc&&this.direction!==Wd||b!==Cl)if(this.direction===qc||this.direction===Wd){switch(ne=0,b){case uc:ne=180*dv(this,ae,ze,ge,ue)/Math.PI;break;case Pl:ue=y=0,ne=a.first(),ne!==null&&(y=cc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(ue=cc(ne,Math.PI/2)),ne=180*dv(this,ae,ze,ge,Le+(y+ue)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,ge,hc);break;case Pl:mg(this,a,ge,hc);break;case Th:gg(this,a,ye/2,ge,hc)}switch(b){case uc:vg(this,x,ge+ne,ts);break;case Pl:mg(this,x,ge+ne,ts);break;case Th:gg(this,x,ye/2,ge+ne,ts)}}else{switch(b){case uc:vg(this,x,ge,hc);break;case Pl:mg(this,x,ge,hc);break;case Th:gg(this,x,ye/2,ge,hc)}switch(b){case uc:vg(this,a,ge+ne,ts);break;case Pl:mg(this,a,ge+ne,ts);break;case Th:gg(this,a,ye/2,ge+ne,ts)}}}else switch(b){case uc:vg(this,y,ge,this.direction);break;case Pl:mg(this,y,ge,this.direction);break;case Th:gg(this,y,ye,ge,this.direction);break;case Cl:OS(this,y,ye,ge,this.direction)}else OS(this,y,ye,ge-ye/2,ts)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gg(a,y,x,b,E){var ee=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=b+(E===ts?ue*x/(360<=ee?ae:ae-1):-(ue*x)/ae),ye=y.M(ue),Le=ne*Math.tan(ge)/a;Le=Math.sqrt((ne*ne+a*a*Le*Le)/(1+Le*Le)),ye.centerX=Le*Math.cos(ge),ye.centerY=Le*Math.sin(ge),ye.actualAngle=180*ge/Math.PI}}function mg(a,y,x,b){var E=a.lc,ee=a.me,ne=a.Ti;x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=y.M(ue),ye=y.M(ue===ae-1?0:ue+1),Le=ee*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Le,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&cc(ge,0),isNaN(ye.diameter)&&cc(ye,0),ge=dv(a,E,ee,b===ts?x:-x,(ge.diameter+ye.diameter)/2+ne),x+=b===ts?ge:-ge}}function vg(a,y,x,b){var E=a.lc,ee=a.me,ne=a.Jp;x=x*Math.PI/180;for(var ae=y.length,ue=0;ue<ae;ue++){var ge=y.M(ue);ge.centerX=E*Math.cos(x),ge.centerY=ee*Math.sin(x),ge.actualAngle=180*x/Math.PI,ge=dv(a,E,ee,b===ts?x:-x,ne),x+=b===ts?ge:-ge}}function OS(a,y,x,b,E){var ee=a.Wp;if(a.mj=0,a.Xr=new yg,360>x){for(ee=b+(E===ts?ee:-ee);0>ee;)ee+=360;ee%=360,180<ee&&(ee-=360),ee*=Math.PI/180,a.gt=ee,DS(a,y,x,b,E)}else FS(a,y,x,b,E);a.Xr.commit(y)}function FS(a,y,x,b,E){var ee=a.lc,ne=a.Ti,ae=a.Zm,ue=ee*Math.cos(b*Math.PI/180),ge=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=ee,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=ee,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{ee=lt.alloc();for(var Le=0;Le<ye.length&&(ye[Le].centerX=ue,ye[Le].centerY=ge,!(Le>=ye.length-1));Le++)BS(a,ue,ge,ye,Le,E,ee)||IS(a,ue,ge,ye,Le,E,ee),ue=ee.x,ge=ee.y;if(lt.free(ee),a.mj++,!(23<a.mj)){ue=ye[0].centerX,ge=ye[0].centerY,ee=ye[ye.length-1].centerX,Le=ye[ye.length-1].centerY;var ze=Math.abs(ue-ee)-((ye[0].width+ye[ye.length-1].width)/2+ne),We=Math.abs(ge-Le)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(We)?Math.abs(ue-ee)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<We?We:1>Math.abs(ze)?0:ze,ue=Math.abs(ee)>Math.abs(Le)?0<ee!=ge>Le:0<Le!=ue<ee,(ue=E===ts?ue:!ue)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*ae,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var ee=a.lc,ne=a.me,ae=a.Zm,ue=ee*Math.cos(b*Math.PI/180),ge=ne*Math.sin(b*Math.PI/180),ye=lt.alloc(),Le=y.Fa(),ze=0;ze<Le.length&&(Le[ze].centerX=ue,Le[ze].centerY=ge,!(ze>=Le.length-1));ze++)BS(a,ue,ge,Le,ze,E,ye)||IS(a,ue,ge,Le,ze,E,ye),ue=ye.x,ge=ye.y;if(lt.free(ye),a.mj++,!(23<a.mj)){if(ue=Math.atan2(ge,ue),ue=E===ts?a.gt-ue:ue-a.gt,ue=Math.abs(ue)<Math.abs(ue-2*Math.PI)?ue:ue-2*Math.PI,ee=ue*(ee+ne)/2,ne=a.Xr,Math.abs(ee)<Math.abs(ne.Pl))for(ne.Pl=ee,ne.mk=[],ne.tm=[],ue=0;ue<Le.length;ue++)ne.mk[ue]=Le[ue].bounds.x,ne.tm[ue]=Le[ue].bounds.y;1<Math.abs(ee)&&(a.lc=8>a.mj?a.lc-ee/(2*Math.PI):a.lc-(0<ee?1.7:-2.3),a.me=a.lc*ae,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,ee,ne){var ae=a.lc,ue=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(ee===ts)){if(ee=y+a,ee>ae){if(ee=y-a,ee<-ae)return ne.x=ee,ne.y=ge,!1;ye=!0}}else if(ee=y-a,ee<-ae){if(ee=y+a,ee>ae)return ne.x=ee,ne.y=ge,!1;ye=!0}return ge=Math.sqrt(1-Math.min(1,ee*ee/(ae*ae)))*ue,0>x!==ye&&(ge=-ge),Math.abs(x-ge)>(b[E].height+b[E+1].height)/2?(ne.x=ee,ne.y=ge,!1):(ne.x=ee,ne.y=ge,!0)}function IS(a,y,x,b,E,ee,ne){var ae=a.lc,ue=a.me,ge=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(ee===ts)){if(ee=x-a,ee<-ue){if(ee=x+a,ee>ue){ne.x=ge,ne.y=ee;return}b=!0}}else if(ee=x+a,ee>ue){if(ee=x-a,ee<-ue){ne.x=ge,ne.y=ee;return}b=!0}ge=Math.sqrt(1-Math.min(1,ee*ee/(ue*ue)))*ae,0>y!==b&&(ge=-ge),ne.x=ge,ne.y=ee}po.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},po.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 lt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.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))},po.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var ee=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,ae=b!==void 0&&E!==void 0?E/(ee+1):Math.PI/(2*(ee+1)),ue=0,ge=0;ge<=ee;ge++){b!==void 0&&E!==void 0?ue=b+ge*E/ee:ue=ge*Math.PI/(2*ee);var ye=Math.sin(ue);ne+=Math.sqrt(1-a*a*ye*ye)*ae}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function fv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function dv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var ee=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ae=0;;ae++){var ue=Math.sin(b+ae*a);if(ne+=(y>x?y:x)*Math.sqrt(1-ee*ee*ue*ue)*a,ne>=E)return ae*a}}po.prototype.sort=function(a){switch(this.sorting){case pv:break;case gv:a.reverse();break;case mv:a.sort(this.comparer);break;case vv:a.sort(this.comparer),a.reverse();break;case Kd:return this.ak(Fx(a));default:jt("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new rn;for(var b=0;b<a.length;b++){var E=-1,ee=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var ae=a.M(ne).edgesCount;ae>E&&(E=ae,ee=ne)}else for(ne=0;ne<a.length;ne++)ae=y[ne],ae>E&&(E=ae,ee=ne);for(x.add(a.M(ee)),y[ee]=-1,ee=a.M(ee),ne=ee.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(ee=ee.destinationEdges;ee.next();)E=a.indexOf(ee.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}po.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,ee=b.destinationEdges;ee.next();)E=a.indexOf(ee.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(ee=[],x=0;x<y.length;x++)ee[x]=0;x=[];var ne=[],ae=[];b=[],E=new rn;for(var ue=0,ge=0;ge<y.length;ge++){var ye=y[ge].length;if(ye===1)b.push(ge);else if(ye===0)E.add(a.M(ge));else{if(ue===0)x.push(ge);else{for(var Le=ye=1/0,ze=-1,We=[],Je=0;Je<x.length;Je++)0>y[x[Je]].indexOf(x[Je===x.length-1?0:Je+1])&&We.push(Je===x.length-1?0:Je+1);if(We.length===0)for(Je=0;Je<x.length;Je++)We.push(Je);for(Je=0;Je<We.length;Je++){for(var it=We[Je],Tt=y[ge],Pt=0,Nt=0;Nt<ne.length;Nt++){var At=ee[ne[Nt]],Bt=ee[ae[Nt]];if(At<Bt){var Rt=At;At=Bt}else Rt=Bt;if(Rt<it&&it<=At)for(Bt=0;Bt<Tt.length;Bt++){var Zt=Tt[Bt];0>x.indexOf(Zt)||Rt<ee[Zt]&&ee[Zt]<At||Rt===ee[Zt]||At===ee[Zt]||Pt++}else for(Bt=0;Bt<Tt.length;Bt++)Zt=Tt[Bt],0>x.indexOf(Zt)||Rt<ee[Zt]&&ee[Zt]<At&&Rt!==ee[Zt]&&At!==ee[Zt]&&Pt++}for(Tt=Pt,Nt=Pt=0;Nt<y[ge].length;Nt++)Rt=x.indexOf(y[ge][Nt]),0<=Rt&&(Rt=Math.abs(it-(Rt>=it?Rt+1:Rt)),Pt+=Rt<x.length+1-Rt?Rt:x.length+1-Rt);for(Nt=0;Nt<ne.length;Nt++)Rt=ee[ne[Nt]],At=ee[ae[Nt]],Rt>=it&&Rt++,At>=it&&At++,Rt>At&&(Bt=At,At=Rt,Rt=Bt),At-Rt<(x.length+2)/2==(Rt<it&&it<=At)&&Pt++;(Tt<ye||Tt===ye&&Pt<Le)&&(ye=Tt,Le=Pt,ze=it)}for(x.splice(ze,0,ge),ye=0;ye<x.length;ye++)ee[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Le=y[ge][ye],0<=x.indexOf(Le)&&(ne.push(ge),ae.push(Le))}ue++}}for(ne=x.length;;){for(ee=!0,ae=0;ae<b.length;ae++)if(ue=b[ae],ge=y[ue][0],ye=x.indexOf(ge),0<=ye){for(ze=Le=0;ze<y[ge].length;ze++)We=x.indexOf(y[ge][ze]),0>We||We===ye||(Je=We>ye?We-ye:ye-We,Le+=We<ye!=Je>ne-Je?1:-1);x.splice(0>Le?ye:ye+1,0,ue),b.splice(ae,1),ae--}else ee=!1;if(ee)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},zt.Object.defineProperties(po.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!==Cl&&a!==Pl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ts&&a!==hc&&a!==qc&&a!==Wd||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==pv&&a!==gv&&a!==mv&&!vv&&a!==Kd||(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!==yv&&a!==zf||(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 Pl=new hn(po,"ConstantSpacing",0),uc=new hn(po,"ConstantDistance",1),Th=new hn(po,"ConstantAngle",2),Cl=new hn(po,"Packed",3),ts=new hn(po,"Clockwise",4),hc=new hn(po,"Counterclockwise",5),qc=new hn(po,"BidirectionalLeft",6),Wd=new hn(po,"BidirectionalRight",7),pv=new hn(po,"Forwards",8),gv=new hn(po,"Reverse",9),mv=new hn(po,"Ascending",10),vv=new hn(po,"Descending",11),Kd=new hn(po,"Optimized",12),yv=new hn(po,"Pythagorean",13),zf=new hn(po,"Circular",14);po.className="CircularLayout",po.ConstantSpacing=Pl,po.ConstantDistance=uc,po.ConstantAngle=Th,po.Packed=Cl,po.Clockwise=ts,po.Counterclockwise=hc,po.BidirectionalLeft=qc,po.BidirectionalRight=Wd,po.Forwards=pv,po.Reverse=gv,po.Ascending=mv,po.Descending=vv,po.Optimized=Kd,po.Pythagorean=yv,po.Circular=zf;function yg(){this.Pl=-1/0,this.tm=this.mk=null}yg.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},yg.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]}},yg.className="VertexArrangement";function Vd(a){Xi.call(this,a)}Kt(Vd,Xi),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new Sv(this)},Vd.className="CircularNetwork";function Sg(a){Uo.call(this,a),this.u=this.Si=NaN}Kt(Sg,Uo);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Cl)if(x.nodeDiameterFormula===zf)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===zf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}zt.Object.defineProperties(Sg.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)}}}),Sg.className="CircularVertex";function Sv(a){Es.call(this,a)}Kt(Sv,Es),Sv.className="CircularEdge";function wa(a){so.call(this),this.ah=null,this.An=0,this.$d=new mn(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)}Kt(wa,so),wa.prototype.cloneProtected=function(a){so.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},wa.prototype.createNetwork=function(){return new Gf(this)},wa.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 b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var ee=E.value;ee.Vd=ee.vertexes.count,ee.sh=1,ee.Hj=null,ee.We=null}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var ae=ne.count,ue=!0;ee=E=0;for(var ge=er(),ye=0;ye<ae+y.vertexes.count+2;ye++)ge[ye]=null;ae=0,ne.reset();for(var Le=$t.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Le),ue)ue=!1,E=Le.x+Le.width/2,ee=Le.y+Le.height/2,ge[0]=new lt(Le.x+Le.width+b.width,Le.y),ge[1]=new lt(Le.x,Le.y+Le.height+b.height),ae=2;else{var ze=_S(ge,ae,E,ee,Le.width,Le.height,b),We=ge[ze],Je=new lt(We.x+Le.width+b.width,We.y),it=new lt(We.x,We.y+Le.height+b.height);for(ze+1<ae&&ge.splice(ze+1,0,null),ge[ze]=Je,ge[ze+1]=it,ae++,ze=We.x-Le.x,We=We.y-Le.y,ye=ye.vertexes.iterator;ye.next();)Je=ye.value,Je.centerX+=ze,Je.centerY+=We}for($t.free(Le),ye=y.vertexes.iterator;ye.next();)ne=ye.value,ze=ne.bounds,2>ae?(E=ze.x+ze.width/2,ee=ze.y+ze.height/2,ge[0]=new lt(ze.x+ze.width+b.width,ze.y),ge[1]=new lt(ze.x,ze.y+ze.height+b.height),ae=2):(ue=_S(ge,ae,E,ee,ze.width,ze.height,b),Le=ge[ue],We=new lt(Le.x+ze.width+b.width,Le.y),ze=new lt(Le.x,Le.y+ze.height+b.height),ue+1<ae&&ge.splice(ue+1,0,null),ge[ue]=We,ge[ue+1]=ze,ae++,ne.centerX=Le.x+ne.width/2,ne.centerY=Le.y+ne.height/2);for(_n(ge),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},wa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},wa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Bx(a,y),ee=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=ee,RS(a,y+1,x),GS(a,ee),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(ne,ae){return ne===null||ae===null||ne===ae?0:ae.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(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,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Gf(a),E=0;E<a.ah.length;E++){var ee=a.ah[E];if(1<ee.Vd){b.dh(ee);var ne=new US;ne.Rs=ee.Vd,ne.Ss=ee.width,ne.Qs=ee.height,ne.Sv=ee.focus.x,ne.Tv=ee.focus.y,ee.We===null&&(ee.We=new rn),ee.We.add(ne),ee.sv=ee.We.count-1}else break}for(ee=x.edges.iterator;ee.next();){var ae=ee.value;E=ae.fromVertex,ne=ae.toVertex,E.network===b&&ne.network===b?b.Bo(ae):E.network===b?(ae=E.Hj,ae===null&&(ae=new rn,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new rn,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)ee=E.value,ee.length*=Math.max(1,Gt.sqrt((ee.fromVertex.sh+ee.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var ue=E.Hj;if(ue!==null&&0<ue.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var ge=ae=0,ye=ue.count-ne;ye<ue.count;ye++){var Le=ue.M(ye),ze=null;for(ee=Le.edges.iterator;ee.next();){var We=ee.value;if(We.Ax(Le)===E){ze=We;break}}ze!==null&&(ge+=ze.length,ae+=Le.width*Le.height)}ee=E.centerX,ue=E.centerY,ye=E.width,Le=E.height,ze=E.focus,We=ye*Le,1>We&&(We=1),ae=Gt.sqrt((ae+We+ge*ge*4/(ne*ne))/We),ne=(ae-1)*ye/2,ae=(ae-1)*Le/2,E.bounds=new $t(ee-ze.x-ne,ue-ze.y-ae,ye+2*ne,Le+2*ae),E.focus=new lt(ze.x+ne,ze.y+ae)}}return a.network=b,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var ee=E.Sv,ne=E.Tv;b.bounds=new $t(b.centerX-ee,b.centerY-ne,E.Ss,E.Qs),b.focus=new lt(ee,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,ee=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),ee=ne.Ss,ne=ne.Qs),ee=Gt.sqrt(ee*ee+ne*ne)/2;for(var ae=!1,ue=ne=0,ge=0,ye=y.vertexes.iterator;ye.next();){var Le=ye.value;1>=Le.Vd?ue++:(ae=!0,ge++,ne+=Math.atan2(y.centerY-Le.centerY,y.centerX-Le.centerX))}if(ue!==0){for(0<ge&&(ne/=ge),ge=y=0,y=ae?2*Math.PI/(ue+1):2*Math.PI/ue,ue%2===0&&(ge=y/2),1<x.count&&x.sort(function(We,Je){return We===null||Je===null||We===Je?0:Je.width*Je.height-We.width*We.height}),ae=ue%2===0?0:1,x=x.iterator;x.next();)if(ue=x.value,!(1<ue.Vd||a.isFixed(ue))){for(ye=null,Le=ue.edges.iterator;Le.next();){ye=Le.value;break}Le=ue.width;var ze=ue.height;Le=Gt.sqrt(Le*Le+ze*ze)/2,ye=ee+ye.length+Le,Le=ne+(y*(ae/2>>1)+ge)*(ae%2===0?1:-1),ue.centerX=b+ye*Math.cos(Le),ue.centerY=E+ye*Math.sin(Le),ae++}}}}function _S(a,y,x,b,E,ee,ne){var ae=9e19,ue=-1,ge=0;e:for(;ge<y;ge++){var ye=a[ge],Le=ye.x-x,ze=ye.y-b;if(Le=Le*Le+ze*ze,Le<ae){for(ze=ge-1;0<=ze;ze--)if(a[ze].y>ye.y&&a[ze].x-ye.x<E+ne.width)continue e;for(ze=ge+1;ze<y;ze++)if(a[ze].x>ye.x&&a[ze].y-ye.y<ee+ne.height)continue e;ue=ge,ae=Le}}return ue}wa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},wa.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 b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var ee=E.value;if(ee.toVertex===a){x=ee;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(ee=E.value,ee.fromVertex===a){x=ee;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var ee=y.bounds,ne=ee.x;y=ee.y;var ae=ee.width;return ee=ee.height,b+E<ne?a>y+ee?(x=b+E-ne,a=a-y-ee,Gt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Gt.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+ee?(x=b-ne-ae,a=a-y-ee,Gt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,Gt.sqrt(b*b+a*a)):b-(ne+ae):a>y+ee?a-(y+ee):a+x<y?y-(a+x):.1}function GS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_x(a)););a.ah=null}function _x(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 b=x.centerX,E=b,ee=x=x.centerY,ne=1;ne<y.length;ne++){var ae=y[ne];ae.forceX=0,ae.forceY=0;var ue=ae.centerX;ae=ae.centerY,b=Math.min(b,ue),E=Math.max(E,ue),x=Math.min(x,ae),ee=Math.max(ee,ae)}(E=E-b>ee-x)?y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerX-Tt.centerX}):y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerY-Tt.centerY}),x=a.Zf;var ge=b=ae=0;for(ee=0;ee<y.length;ee++){ne=y[ee],b=ne.bounds,ae=ne.focus,ue=b.x+ae.x;var ye=b.y+ae.y;b=ne.charge*a.electricalFieldX(ue,ye),ge=ne.charge*a.electricalFieldY(ue,ye),b+=ne.mass*a.gravitationalFieldX(ue,ye),ge+=ne.mass*a.gravitationalFieldY(ue,ye),ne.forceX+=b,ne.forceY+=ge;for(var Le=ee+1;Le<y.length;Le++){var ze=y[Le];if(ze!==ne){b=ze.bounds,ae=ze.focus,ge=b.x+ae.x;var We=b.y+ae.y;if(ue-ge>x||ge-ue>x){if(E)break}else if(ye-We>x||We-ye>x){if(!E)break}else{var Je=zS(ne,ze);1>Je?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Je=b.random(),ae=b.random(),ue>ge?(b=Math.abs(ze.bounds.right-ne.bounds.x),b=(1+b)*Je):ue<ge?(b=Math.abs(ze.bounds.x-ne.bounds.right),b=-(1+b)*Je):(b=Math.max(ze.width,ne.width),b=(1+b)*Je-b/2),ye>We?(ge=Math.abs(ze.bounds.bottom-ne.bounds.y),ge=(1+ge)*ae):ue<ge?(ge=Math.abs(ze.bounds.y-ne.bounds.bottom),ge=-(1+ge)*ae):(ge=Math.max(ze.height,ne.height),ge=(1+ge)*ae-ge/2)):(ae=-(ne.charge*ze.charge)/(Je*Je),b=(ge-ue)/Je*ae,ge=(We-ye)/Je*ae),ne.forceX+=b,ne.forceY+=ge,ze.forceX-=b,ze.forceY-=ge}}}}for(E=a.network.edges.iterator;E.next();)ae=E.value,x=ae.fromVertex,ee=ae.toVertex,ne=x.bounds,ue=x.focus,b=ne.x+ue.x,ne=ne.y+ue.y,ye=ee.bounds,Le=ee.focus,ue=ye.x+Le.x,ye=ye.y+Le.y,Le=zS(x,ee),1>Le?(Le=a.randomNumberGenerator,Le===null&&(a.randomNumberGenerator=Le=new xv),ae=Le.random(),Le=Le.random(),b=(b>ue?1:-1)*(1+(ee.width>x.width?ee.width:x.width))*ae,ge=(ne>ye?1:-1)*(1+(ee.height>x.height?ee.height:x.height))*Le):(ae=ae.stiffness*(Le-ae.length),b=(ue-b)/Le*ae,ge=(ye-ne)/Le*ae),x.forceX+=b,x.forceY+=ge,ee.forceX-=b,ee.forceY-=ge;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}wa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},wa.prototype.moveFixedVertex=function(){},wa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},wa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Vo,y.toSpot=Vo)}},wa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=$t.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,$t.free(x)}x=$t.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}$t.free(x)},wa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},wa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},wa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},wa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},wa.prototype.electricalFieldX=function(){return 0},wa.prototype.electricalFieldY=function(){return 0},wa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},wa.prototype.gravitationalFieldX=function(){return 0},wa.prototype.gravitationalFieldY=function(){return 0},wa.prototype.isFixed=function(a){return a.isFixed},zt.Object.defineProperties(wa.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"&&jt('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())}}}),wa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Gf(a){Xi.call(this,a)}Kt(Gf,Xi),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Uo.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}Kt(xg,Uo),zt.Object.defineProperties(xg.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)}}}),xg.className="ForceDirectedVertex";function wg(a){Es.call(this,a),this.j=this.o=NaN}Kt(wg,Es),zt.Object.defineProperties(wg.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)}}}),wg.className="ForceDirectedEdge";function xv(){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()}xv.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},xv.className="RandomNumberGenerator";function Oi(a){so.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Ev,this.Zk=kv,this.Qk=Tv,this.bj=4,this.rk=Lv,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 lt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Kt(Oi,so),Oi.prototype.cloneProtected=function(a){so.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},Oi.prototype.qb=function(a){a.classType===Oi?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:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Oi.prototype.createNetwork=function(){return new Xd(this)},Oi.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!==Pg&&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===Pg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,ee=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||ee.node===null&&ee.data===null)&&E.layer===ee.layer)){var ne=0,ae=0,ue=0,ge=0;if(b.link!==null){if(ae=b.link,ae===null)continue;var ye=E.node;if(ne=ee.node,ye===null||ne===null)continue;var Le=ae.fromNode;ue=ae.toNode;for(var ze=ae.fromPort;ze!==null&&!ze.Ed();)ze=ze.panel;for(ae=ae.toPort;ae!==null&&!ae.Ed();)ae=ae.panel;if(b.rev){ge=Le;var We=ze;Le=ue,ze=ae,ue=ge,ae=We}var Je=E.focus;ge=ee.focus;var it=b.rev?ee.bounds:E.bounds;We=lt.alloc(),ye!==Le?it.w()&&Le.isVisible()?Le.actualBounds.w()?(bh(Le,ze,ai,We),We.x+=Le.actualBounds.x-it.x,We.y+=Le.actualBounds.y-it.y):(bh(Le,ze,ai,We),We.w()||We.assign(Je)):We.assign(Je):it.w()?(bh(Le,ze,ai,We),We.w()||We.assign(Je)):We.assign(Je),Le=b.rev?E.bounds:ee.bounds,ye=lt.alloc(),ne!==ue?Le.w()&&ue.isVisible()?ue.actualBounds.w()?(bh(ue,ae,ai,ye),ye.x+=ue.actualBounds.x-Le.x,ye.y+=ue.actualBounds.y-Le.y):(bh(ue,ae,ai,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Le.w()?(bh(ue,ae,ai,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((We.x-Je.x)/this.kc),ue=We.x,ae=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((We.y-Je.y)/this.kc),ue=We.y,ae=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),lt.free(We),lt.free(ye),b.portFromColOffset=ne,b.portFromPos=ue,b.portToColOffset=ae,b.portToPos=ge}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(We=E.layer,ye=ee.layer,Le=0,it=b.link,it!==null){var Tt=it.fromPort,Pt=it.toPort;if(Tt!==null&&Pt!==null){var Nt=it.fromNode;if(ze=it.toNode,Nt!==null&&ze!==null){var At=Cv(this,!0),Bt=Cv(this,!1),Rt=this.setsPortSpots?At:it.computeSpot(!0,Tt);Je=this.setsPortSpots?Bt:it.computeSpot(!1,Pt);var Zt=it.isOrthogonal;Rt.$c()&&Rt.Hf(Bt)&&Je.$c()&&Je.Hf(At)?Le=0:(At=it.getLinkPoint(Nt,Tt,Rt,!0,Zt,ze,Pt,lt.alloc()),Bt=it.getLinkDirection(Nt,Tt,At,Rt,!0,Zt,ze,Pt),lt.free(At),Rt.ys()||Bt!==QS(this,b,!0)?this.setsPortSpots&&Nt!==null&&Nt.ports.count===1&&b.rev&&(Le+=1):Le+=1,Rt=it.getLinkPoint(ze,Pt,Je,!1,Zt,Nt,Tt,lt.alloc()),it=it.getLinkDirection(ze,Pt,Rt,Je,!1,Zt,Nt,Tt),lt.free(Rt),Je.ys()||it!==QS(this,b,!1)?this.setsPortSpots&&ze!==null&&ze.ports.count===1&&b.rev&&(Le+=2):Le+=2)}}}if(ze=Le,Le=ze===1||ze===3,(ze=ze===2||ze===3)&&(Je=a.createVertex(),Je.node=null,Je.Dj=1,Je.layer=We,Je.near=E,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=ue,E.portToPos=0,E=Je),it=1,Le&&it--,We-ye>it&&0<We){for(b.valid=!1,Je=a.createVertex(),Je.node=null,Je.Dj=2,Je.layer=We-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=ze?0:ne,E.portToColOffset=0,E.portFromPos=ze?0:ue,E.portToPos=0,E=Je,We--;We-ye>it&&0<We;)Je=a.createVertex(),Je.node=null,Je.Dj=3,Je.layer=We-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Je,We--;E=a.Zj(Je,ee,b.link),E.valid=!Le,Le&&(Je.near=ee),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ae,E.portFromPos=0,E.portToPos=ge}else b.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=fc(this,a),x=0,b=this.tc[a],ee=0;ee<b;ee++)E=y[ee],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),dc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Oi.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Oi.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},Oi.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 fs(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function $s(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function HS(a,y,x){var b=fc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var ee=a.Jn,ne=0;ne<E;ne++){var ae=0,ue=b[ne],ge=ue.near;if(ge!==null&&ge.layer===ue.layer)if(ue=ge.index,ue>ne)for(var ye=ne+1;ye<ue;ye++){var Le=b[ye];Le.near===ge&&Le.Dj===ge.Dj||ae++}else for(ye=ne-1;ye>ue;ye--)Le=b[ye],Le.near===ge&&Le.Dj===ge.Dj||ae++;var ze;if(0<=x)for(ue=b[ne].sourceEdgesArrayAccess,ge=0;ge<ue.length;ge++){var We=ue[ge];if(We.valid&&We.fromVertex.layer!==y)for(Le=We.fromVertex.index,ye=We.portToPos,We=We.portFromPos,ze=ge+1;ze<ue.length;ze++){var Je=ue[ze];if(Je.valid&&Je.fromVertex.layer!==y){var it=Je.fromVertex.index,Tt=Je.portToPos;Je=Je.portFromPos,ye<Tt&&(Le>it||Le===it&&We>Je)&&ae++,Tt<ye&&(it>Le||it===Le&&Je>We)&&ae++}}}if(0>=x){for(ue=b[ne].destinationEdgesArrayAccess,ge=0;ge<ue.length;ge++)if(We=ue[ge],We.valid&&We.toVertex.layer!==y)for(Le=We.toVertex.index,ye=We.portToPos,We=We.portFromPos,ze=ge+1;ze<ue.length;ze++)Je=ue[ze],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,Je=Je.portFromPos,We<Je&&(Le>it||Le===it&&ye>Tt)&&ae++,Je<We&&(it>Le||it===Le&&Tt>ye)&&ae++)}for(ee[ne*E+ne]=ae,ue=ne+1;ue<E;ue++){var Pt=0,Nt=0;if(0<=x){ae=b[ne].sourceEdgesArrayAccess;var At=b[ue].sourceEdgesArrayAccess;for(ge=0;ge<ae.length;ge++)if(We=ae[ge],We.valid&&We.fromVertex.layer!==y)for(Le=We.fromVertex.index,We=We.portFromPos,ze=0;ze<At.length;ze++)Je=At[ze],Je.valid&&Je.fromVertex.layer!==y&&(it=Je.fromVertex.index,Je=Je.portFromPos,(Le<it||Le===it&&We<Je)&&Nt++,(it<Le||it===Le&&Je<We)&&Pt++)}if(0>=x){for(ae=b[ne].destinationEdgesArrayAccess,At=b[ue].destinationEdgesArrayAccess,ge=0;ge<ae.length;ge++)if(We=ae[ge],We.valid&&We.toVertex.layer!==y)for(Le=We.toVertex.index,ye=We.portToPos,ze=0;ze<At.length;ze++)Je=At[ze],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,(Le<it||Le===it&&ye<Tt)&&Nt++,(it<Le||it===Le&&Tt<ye)&&Pt++)}ee[ne*E+ue]=Pt,ee[ue*E+ne]=Nt}}return dc(a,y,b),ee}Oi.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var ee=E;ee<b;ee++)a+=x[E*b+ee];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,ee=fc(b,E),ne=b.tc[E],ae=0,ue=0;ue<ne;ue++){var ge=ee[ue].destinationEdgesArrayAccess;if(ge!==null)for(var ye=0;ye<ge.length;ye++){var Le=ge[ye];if(Le.valid&&Le.toVertex.layer!==E){var ze=Le.fromVertex.column+Le.portFromColOffset,We=Le.toVertex.column+Le.portToColOffset;ae+=(Math.abs(ze-We)+1)*gy(Le)}}}dc(b,E,ee),y+=ae}return y}Oi.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 my(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=0,ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(ye+=ze.column-1,Le++),ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var We=ae.fromVertex;ae.valid&&!ae.rev&&We.layer!==y&&(ye+=We.column,Le++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(ye+=ze.column,Le++);ee[ne]=Le===0?-1:ye/Le}return dc(a,y,b),ee}function WS(a,y,x){for(var b=fc(a,y),E=a.tc[y],ee=[],ne=0;ne<E;ne++){var ae=b[ne],ue=null;0>=x&&(ue=ae.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=ae.destinationEdgesArrayAccess);var ye=0,Le=[],ze=ae.near;if(ze!==null&&ze.layer===ae.layer&&(Le[ye]=ze.column-1,ye++),ae=void 0,ue!==null)for(ze=0;ze<ue.length;ze++){ae=ue[ze];var We=ae.fromVertex;ae.valid&&!ae.rev&&We.layer!==y&&(Le[ye]=We.column+ae.portFromColOffset,ye++)}if(ge!==null)for(ue=0;ue<ge.length;ue++)ae=ge[ue],ze=ae.toVertex,ae.valid&&!ae.rev&&ze.layer!==y&&(Le[ye]=ze.column+ae.portToColOffset,ye++);ye===0?ee[ne]=-1:(Le.sort(function(Je,it){return Je-it}),ge=ye>>1,ee[ne]=ye&1?Le[ge]:Le[ge-1]+Le[ge]>>1)}return dc(a,y,b),ee}function bg(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var ae=ne.value,ue=ae.toVertex,ge=y.layer-ue.layer;ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}if(ee)for(ne=y.sourceEdges;ne.next();)ae=ne.value,ue=ae.fromVertex,ge=ue.layer-y.layer,ae=a.linkMinLength(ae),ge===ae&&bg(a,ue,x,b,E,ee)}}function vy(a,y,x,b,E,ee){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,ee);if(ee)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,ee)}}Oi.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var ee=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value;if(ae.valid){for(var ue=0,ge=ae.destinationEdges;ge.next();)ge.value.toVertex.valid&&ue++;ge=0;for(var ye=ae.sourceEdges;ye.next();)ye.value.fromVertex.valid&&ge++;(E===null||ee<ue-ge)&&(E=ae,ee=ue-ge)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Ev:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,ee=E.finish,E.Ll<y.Ll&&x<ee&&(this.network.gm(b),b.rev=!0));break;case Pg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(ee=0;ee<E.length;ee++)E[ee].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Oi.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(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 kv:for(ZS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function ZS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,ee=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,ee=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,ee)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,ee=0;ee<E;ee++){var ne=b[ee],ae=ne.fromVertex,ue=ne.toVertex;ne=a.linkMinLength(ne),ae.layer-ue.layer>ne&&bg(a,ae,0,-1,!0,!1)}for(bg(a,y,1,-1,!0,!0);y.component!==0;){for(ee=0,b=1/0,ae=0,ue=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var ye=0,Le=!1,ze=ge.sourceEdgesArrayAccess;E=ze.length;for(var We=0;We<E;We++){var Je=ze[We],it=Je.fromVertex;ye+=1,it.component!==1&&(ee+=1,it=it.layer-ge.layer,Je=a.linkMinLength(Je),b=Math.min(b,it-Je))}for(ze=ge.destinationEdgesArrayAccess,E=ze.length,We=0;We<E;We++)Je=ze[We].toVertex,--ye,Je.component!==1?--ee:Le=!0;(ue===null||ye<ae)&&!Le&&(ue=ge,ae=ye)}}if(0<ee){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ue.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(bg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,ee=0,ae=null,ue=a.network.vertexes.iterator;ue.next();)if(ne=ue.value,ne.component===1){for(ge=0,ye=!1,ze=ne.sourceEdgesArrayAccess,Le=ze.length,We=0;We<Le;We++)Je=ze[We].fromVertex,ge+=1,Je.component!==1?b+=1:ye=!0;for(ze=ne.destinationEdgesArrayAccess,Le=ze.length,We=0;We<Le;We++)Je=ze[We],it=Je.toVertex,--ge,it.component!==1&&(--b,it=ne.layer-it.layer,Je=a.linkMinLength(Je),E=Math.min(E,it-Je));(ae===null||ge>ee)&&!ye&&(ae=ne,ee=ge)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ae.component=0}}}function QS(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}Oi.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case Tv: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&&$S(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function $S(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 b=0;b<y.length-1;b++){var E=y[b],ee=y[b+1];E.portFromColOffset>ee.portFromColOffset&&(x=!0,y[b]=ee,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&$S(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],ee=y[x+1];E.portToColOffset>ee.portToColOffset&&(b=!0,y[x]=ee,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}Oi.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=fs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,1),hl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),hl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}for($s(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),hl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)bv(this,b,0),hl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}$s(this,y);var ee,ne,ae;switch(this.rk){case Ey:break;case ky:for(ae=a+1;(b=this.countCrossings())<ae;)for(ae=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,-1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,0)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,0)||ee;E>=a?$s(this,y):(a=E,y=fs(this))}break;default:case Lv:for(x=this.Ia,ne=0,ae=a+1;(b=this.countCrossings())<ae;){for(ae=b,ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,-1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,1)||ee;for(E=this.countCrossings(),E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,-1)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=x;b>=ne;b--)ee=hl(this,b,0)||ee;for(E>=a?$s(this,y):(a=E,y=fs(this)),ee=!0;ee;)for(ee=!1,b=ne;b<=x;b++)ee=hl(this,b,0)||ee;E>=a?$s(this,y):(a=E,y=fs(this))}}$s(this,y)};function bv(a,y,x){var b=fc(a,y),E=a.tc[y],ee=WS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),ee[x]===-1&&(ee[x]=b[x].column);for(var ae=!0,ue;ae;)for(ae=!1,x=0;x<E-1;x++)(ee[x+1]<ee[x]||ee[x+1]===ee[x]&&ne[x+1]<ne[x])&&(ae=!0,ue=ee[x],ee[x]=ee[x+1],ee[x+1]=ue,ue=ne[x],ne[x]=ne[x+1],ne[x+1]=ue,ue=b[x],b[x]=b[x+1],b[x+1]=ue);for(x=ee=0;x<E;x++)ue=b[x],ue.index=x,ee+=a.nodeMinColumnSpace(ue,!0),ue.column=ee,ee+=1,ee+=a.nodeMinColumnSpace(ue,!1);dc(a,y,b)}function hl(a,y,x){var b=fc(a,y),E=a.tc[y];x=HS(a,y,x);var ee,ne=[];for(ee=0;ee<E;ee++)ne[ee]=-1;var ae=[];for(ee=0;ee<E;ee++)ae[ee]=-1;for(var ue=!1,ge=!0;ge;)for(ge=!1,ee=0;ee<E-1;ee++){var ye=x[b[ee].index*E+b[ee+1].index],Le=x[b[ee+1].index*E+b[ee].index],ze=0,We=0,Je=b[ee].column,it=b[ee+1].column,Tt=a.nodeMinColumnSpace(b[ee],!0),Pt=a.nodeMinColumnSpace(b[ee],!1),Nt=a.nodeMinColumnSpace(b[ee+1],!0),At=a.nodeMinColumnSpace(b[ee+1],!1);Tt=Je-Tt+Nt,Pt=it-Pt+At;var Bt=b[ee].sourceEdges.iterator;for(Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.fromVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt<ee&&(ze+=2*(ee-Nt),We+=2*(ee+1-Nt)),Nt===ee+1&&(ze+=1),Nt>ee+1&&(ze+=4*(Nt-ee),We+=4*(Nt-(ee+1)))}for(Bt=b[ee].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.toVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt===ee+1&&(We+=1)}for(Bt=b[ee+1].sourceEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.fromVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt<ee&&(ze+=2*(ee+1-Nt),We+=2*(ee-Nt)),Nt===ee&&(We+=1),Nt>ee+1&&(ze+=4*(Nt-(ee+1)),We+=4*(Nt-ee))}for(Bt=b[ee+1].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,At=Nt.toVertex,Nt.valid&&At.layer===y){for(Nt=0;b[Nt]!==At;)Nt++;Nt===ee&&(ze+=1)}Nt=At=0,Bt=ne[b[ee].index];var Rt=ae[b[ee].index],Zt=ne[b[ee+1].index],Fn=ae[b[ee+1].index];Bt!==-1&&(At+=Math.abs(Bt-Je),Nt+=Math.abs(Bt-Pt)),Rt!==-1&&(At+=Math.abs(Rt-Je),Nt+=Math.abs(Rt-Pt)),Zt!==-1&&(At+=Math.abs(Zt-it),Nt+=Math.abs(Zt-Tt)),Fn!==-1&&(At+=Math.abs(Fn-it),Nt+=Math.abs(Fn-Tt)),(We<ze-.5||We===ze&&Le<ye-.5||We===ze&&Le===ye&&Nt<At-.5)&&(ge=ue=!0,b[ee].column=Pt,b[ee+1].column=Tt,ye=b[ee],b[ee]=b[ee+1],b[ee+1]=ye)}for(ee=0;ee<E;ee++)b[ee].index=ee;return dc(a,y,b),ue}Oi.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Xx)!==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 b,E=this.network.vertexes.iterator;E.next();){var ee=E.value;y=ee.layer,b=ee.column,ee=this.nodeMinColumnSpace(ee,!1),x[y]=Math.max(x[y],b+ee)}for(E.reset();E.next();)ee=E.value,y=ee.layer,b=ee.column,ee.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else Wx(this)};function Zd(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=fc(a,y),ee=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<ee;b++)ne[b]=-1;var ae=my(a,y,1);if(0>x)for(b=0;b<ee;b++)ae[b]=-1;for(var ue=!1,ge=!0;ge;)for(ge=!1,b=0;b<ee;b++){var ye=E[b].column,Le=a.nodeMinColumnSpace(E[b],!0),ze=a.nodeMinColumnSpace(E[b],!1),We=0;0>b-1||ye-E[b-1].column-1>Le+a.nodeMinColumnSpace(E[b-1],!1)?We=ye-1:We=ye,Le=b+1>=ee||E[b+1].column-ye-1>ze+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Je=ze=0,it=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var Pt=Tt.value,Nt=Pt.fromVertex;if(Pt.valid&&Nt.layer!==y){var At=gy(Pt),Bt=Pt.portFromColOffset;Pt=Pt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+Pt-(Nt+Bt))+1)*At,Je+=(Math.abs(We+Pt-(Nt+Bt))+1)*At,it+=(Math.abs(Le+Pt-(Nt+Bt))+1)*At}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)Pt=Tt.value,Nt=Pt.toVertex,Pt.valid&&Nt.layer!==y&&(At=gy(Pt),Bt=Pt.portFromColOffset,Pt=Pt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+Bt-(Nt+Pt))+1)*At,Je+=(Math.abs(We+Bt-(Nt+Pt))+1)*At,it+=(Math.abs(Le+Bt-(Nt+Pt))+1)*At);Pt=Bt=At=0,Tt=ne[E[b].index],Nt=ae[E[b].index],Tt!==-1&&(At+=Math.abs(Tt-ye),Bt+=Math.abs(Tt-We),Pt+=Math.abs(Tt-Le)),Nt!==-1&&(At+=Math.abs(Nt-ye),Bt+=Math.abs(Nt-We),Pt+=Math.abs(Nt-Le)),Je<ze||Je===ze&&Bt<At?(ge=ue=!0,E[b].column=We):(it<ze||it===ze&&Pt<At)&&(ge=ue=!0,E[b].column=Le)}return dc(a,y,E),a.normalize(),ue}function Sy(a,y,x){var b=fc(a,y),E=a.tc[y],ee=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=ee[x];for(ee=!0;ee;)for(ee=!1,x=0;x<E;x++){var ae=b[x].column,ue=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=ae;else if(x===0){var Le=b[x+1].column;Le-ae===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=ae-1:ye=ae}else x===E-1?(Le=b[x-1].column,ye=ae-Le===ue+a.nodeMinColumnSpace(b[x-1],!1)?ae+1:ae):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(ue+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,ye=Math.max(ne[x],ue)):(Le=b[x-1].column,ue=Le+a.nodeMinColumnSpace(b[x-1],!1)+ue+1,Le=b[x+1].column,ge=Le-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ue<ne[x]&&ne[x]<ge?ye=ne[x]:ue>=ne[x]?ye=ue:ge<=ne[x]&&(ye=ge));ye!==ae&&(ee=!0,b[x].column=ye)}dc(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,ee=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-ee<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Hx(a,y){var x=y+1,b,E=[],ee=[];for(b=0;b<=a.Ia;b++)E[b]=!1,ee[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var ae=b.column-a.nodeMinColumnSpace(b,!0),ue=b.column+a.nodeMinColumnSpace(b,!1);ae<=y&&ue>=y&&(E[b.layer]=!0),ae<=x&&ue>=x&&(ee[b.layer]=!0)}for(ae=!0,x=!1,b=0;b<=a.Ia;b++)ae=ae&&!(E[b]&&ee[b]);if(ae)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=fs(a),ee=wv(a);for(b=ee+1;ee<b;){b=ee,tx(a,x,1);var ne=wv(a);ne>ee?$s(a,E):ne<ee&&(ee=ne,E=fs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=fs(a),ee=wv(a),b=ee+1;ee<b;)b=ee,tx(a,x,-1),ne=wv(a),ne>ee?$s(a,E):ne<ee&&(ee=ne,E=fs(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var ee;for(y=[],ee=0;ee<a.le*a.le;ee++)y[ee]=!1;for(E=[],ee=0;ee<(a.Ia+1)*(a.Ra+1);ee++)E[ee]=-1;for(b.reset();b.next();){ee=b.value;for(var ne=ee.layer,ae=Math.max(0,ee.column-a.nodeMinColumnSpace(ee,!0)),ue=Math.min(a.Ra,ee.column+a.nodeMinColumnSpace(ee,!1));ae<=ue;ae++)E[ne*(a.Ra+1)+ae]=ee.component}for(ee=0;ee<=a.Ia;ee++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[ee*(a.Ra+1)+ne]!==-1&&E[ee*(a.Ra+1)+ne+1]!==-1&&E[ee*(a.Ra+1)+ne]!==E[ee*(a.Ra+1)+ne+1]&&(y[E[ee*(a.Ra+1)+ne]*a.le+E[ee*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[ee*(a.Ra+1)+ne]!==-1&&E[ee*(a.Ra+1)+ne-1]!==-1&&E[ee*(a.Ra+1)+ne]!==E[ee*(a.Ra+1)+ne-1]&&(y[E[ee*(a.Ra+1)+ne]*a.le+E[ee*(a.Ra+1)+ne-1]]=!0)}for(E=[],ee=0;ee<a.le;ee++)E[ee]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(ue=ne[ne.length-1],ne.pop(),E[ue])for(E[ue]=!1,ee=0;ee<a.le;ee++)y[ue*a.le+ee]&&ne.splice(0,0,ee);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Wx(a){for(var y=er(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new an,Kx(y,x);var ee=null,ne=null,ae=null,ue=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Le=(a.ve&4)!==0,ze=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),ee=Pv(a,y,!0,!1)),y.reverse(),Le&&(a.verticalAlignment(y,x,!1),ae=Pv(a,y,!1,!1)),b=Lr(y),E=b.next();!E.done;E=b.next())E.value.reverse();ze&&(a.verticalAlignment(y,x,!1),ue=Pv(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=Pv(a,y,!0,!0)),_n(y),a.u(ee,ne,ae,ue),a.network.vertexes.each(function(We){var Je=er();ge&&Je.push(ee.get(We)),ye&&Je.push(ne.get(We)),Le&&Je.push(ae.get(We)),ze&&Je.push(ue.get(We)),Je.sort(function(Tt,Pt){return Tt-Pt});var it=Je.length;it=(Je[Math.floor((it-1)/2)]+Je[Math.ceil((it-1)/2)])/2,_n(Je),We.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,ee=0,ne=a[b],ae=a[b+1],ue=0;ee<ae.length;ue++){var ge=ae[ue];e:{if(ge.node===null){var ye=Ty(ge);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Le=ye;if(ue===ae.length-1||Le){for(ye=ne.length-1,Le&&(ye=Ty(ge)[0].index);ee<=ue;){if(ge=ae[ee],!ge.bo){Le=[];for(var ze=Lr(ge.sourceEdgesArrayAccess),We=ze.next();!We.done;We=ze.next())We=We.value,We.valid&&Le.push(We);ge.bo=Le}for(ge=Lr(ge.bo),Le=ge.next();!Le.done;Le=ge.next())Le=Le.value,ze=Le.fromVertex.index,(ze<E||ze>ye)&&y.add(Le);ee++}E=ye}}}Oi.prototype.verticalAlignment=function(a,y,x){Vx(a),a=Lr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Lr(b.value);for(var ee=b.next();!ee.done;ee=b.next()){ee=ee.value;var ne=x?Ty(ee):Yx(ee),ae=ne.length;if(0<ae){ne.sort(function(Le,ze){return Le.vi-ze.vi});var ue=(ae-1)/2;for(ae=Math.floor(ue),ue=Math.ceil(ue);ae<=ue;ae++)if(ee.align===ee){var ge=ne[ae],ye=void 0;ye=x?Mv(ge,ee):Mv(ee,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=ee,ee.root=ge.root,ee.align=ge.root,E=ge.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Pv(a,y,x,b){for(var E=a.K===90||a.K===270,ee=Lr(y),ne=ee.next();!ne.done;ne=ee.next()){var ae=Lr(ne.value);for(ne=ae.next();!ne.done;ne=ae.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,ee=Lr(y),ae=ee.next();!ae.done;ae=ee.next()){ae=Lr(ae.value);for(var ue=ae.next();!ue.done;ue=ae.next())if(ue=ue.value,ue.root===ue){for(var ge=0,ye=ue;ye.align!==ue;){var Le=ye.align,ze=ne?ye.width:ye.height,We=ne?Le.width:Le.height;if(x){var Je=Mv(ye,Le),it=Je.portFromPos,Tt=Je.portToPos;Je.link!==null&&(ye.node&&ye.node!==Je.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Je.link.toNode&&(Tt=ne?Le.focusX:Le.focusY))}else Je=Mv(Le,ye),it=Je.portToPos,Tt=Je.portFromPos,Je.link!==null&&(ye.node&&ye.node!==Je.link.toNode&&(it=ne?ye.focusX:ye.focusY),Le.node&&Le.node!==Je.link.fromNode&&(Tt=ne?Le.focusX:Le.focusY));ze=b?ye.qg+(ze-it)-(We-Tt):ye.qg+it-Tt,Le.qg=ze,ge=Math.min(ge,ze),ye=ye.align}ye=ue;do ye.qg=ye.qg-ge,ye=ye.align;while(ye!==ue)}}for(x=Lr(y),ne=x.next();!ne.done;ne=x.next())for(ee=Lr(ne.value),ne=ee.next();!ne.done;ne=ee.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,ae=0;do{for(ee=y[ne][ae];ee.align!==ee.root;)ee=ee.align,ne++,0<ee.vi&&(ae=rx(ee,y),ae.sd.shift=Math.min(ae.sd.shift,ee.sd.shift+ee.zc+ee.qg-(ae.zc+ae.qg+(E?ae.width:ae.height)+a.columnSpacing)));ae=ee.vi+1}while(ne<y.length&&ae<y[ne].length&&ee.sd===y[ne][ae].sd)}for(a=new tn,y=Lr(y),ne=y.next();!ne.done;ne=y.next())for(x=Lr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,ee=E?ne.width:ne.height,a.add(ne,b?-ne.zc-ee:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),ee=E.root;nx(a,ee,x),y.sd===y&&(y.sd=ee.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===ee.sd&&(y.zc=Math.max(y.zc,ee.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rx(a,y){var x=a.Tz;return a=a.vi,1>a&&jt("Could not determine previous vertex in layer"),y[x][a-1]}Oi.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=er(),E=er(),ee=1/0,ne=0;4>ne;ne++)if(y[ne]){var ae=Zx(this,y[ne],b,E,ne);ae<ee&&(x=ne,ee=ae)}for(ee={},ne=0;4>ne;ee={delta:ee.delta},ne++)y[ne]&&(ee.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],ee.delta!==0&&y[ne].each(function(ue){return function(ge){ge.value+=ue.delta}}(ee)));_n(b),_n(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var ee=1/0,ne=-1/0;return y.each(function(ae){var ue=ae.key;ae=ae.value,ue=a.K===90||a.K===270?ue.width:ue.height,ae<ee&&(ee=ae),ae+ue>ne&&(ne=ae+ue)}),x[E]=ee,b[E]=ne,ne-ee}Oi.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Cv(this,!0),y=Cv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function Cv(a,y){return a.K===270?y?ja:sa:a.K===90?y?sa:ja:a.K===180?y?Oa:na:y?na:Oa}Oi.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 b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var ee=1/0,ne=E=1/0,ae=-1/0;a.next();){var ue=a.value,ge=ue.layer,ye=ue.column|0;b?(ne=y.x+this.kc*ye,ge=this.Kd[ge]):(ne=this.Kd[ge],ge=y.y+this.kc*ye),ue.centerX=ne,ue.centerY=ge,x&&isFinite(ue.zc)&&(b?ue.node?ue.x=y.x+ue.zc:ue.centerX=y.x+ue.zc:ue.node?ue.y=y.y+ue.zc:ue.centerY=y.y+ue.zc),ee=Math.min(ue.x,ee),E=Math.min(ue.y,E),b?(ne=ee,ae=Math.max(ae,ue.bounds.right)):(ne=E,ae=Math.max(ae,ue.bounds.bottom))}for(this.xw=ae-ne,ee=y.x-ee,y=y.y-E,this.Rf=new lt(x&&b?0:ee,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=ee,x.y+=y,x.commit()},Oi.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 b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new $t(0,0,x,Math.abs(this.Ta[0]))):y.push(new $t(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new $t(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new $t(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new $t(0,0,Math.abs(this.Ta[0]),x)):y.push(new $t(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new $t(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new $t(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Oi.prototype.commitLayers=function(){},Oi.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 b=y,E=b.fromNode,ee=b.toNode,ne=b.fromPort,ae=b.toPort;if(E!==null){var ue=E.findVisibleNode();ue!==null&&ue!==E&&(E=ue,ne=ue.port)}ee!==null&&(ue=ee.findVisibleNode(),ue!==null&&ue!==ee&&(ee=ue,ae=ue.port));var ge=y.computeSpot(!0,ne);ue=y.computeSpot(!1,ae);var ye=x.fromVertex,Le=x.toVertex;if(x.valid)y.curve===Rs&&y.pointsCount===4&&(ye.column===Le.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,ee,ae),ae=y.getLinkPoint(ee,ae,ue,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),ae.w()||ae.set(ee.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ae.x)/3,(2*x.y+ae.y)/3),y.yf((x.x+2*ae.x)/3,(x.y+2*ae.y)/3),y.yf(ae.x,ae.y)):(x=b=!1,ne!==null&&ge===Vr&&(b=!0),ae!==null&&ue===Vr&&(x=!0),(b||x)&&(ue=null,b&&(ue=y.getLinkPointFromPoint(E,ne,ne.ga(ai),y.i(3),!0),ue.w()||ue.set(E.actualBounds.center),y.L(0,ue.x,ue.y)),E=null,x&&(E=y.getLinkPointFromPoint(ee,ae,ae.ga(ai),y.i(0),!1),E.w()||E.set(ee.actualBounds.center),y.L(3,E.x,E.y)),ue&&(ee=y.i(2),y.L(1,(2*ue.x+ee.x)/3,(2*ue.y+ee.y)/3)),E&&(ee=y.i(1),y.L(2,(2*E.x+ee.x)/3,(2*E.y+ee.y)/3))))),y.zf();else if(ye.layer===Le.layer)y.zf();else{var ze=!1,We=!1,Je=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){We=!0;var Tt=y.pointsCount;4<Tt&&y.points.removeRange(2,Tt-3)}else if(y.curve===Rs)ze=!0,Tt=y.pointsCount,4<Tt&&y.points.removeRange(2,Tt-3),Tt===4&&(it=2);else{Tt=y.pointsCount;var Pt=ge===Vr,Nt=ue===Vr;2<Tt&&Pt&&Nt?y.points.removeRange(1,Tt-2):3<Tt&&Pt&&!Nt?y.points.removeRange(1,Tt-3):3<Tt&&!Pt&&Nt?y.points.removeRange(2,Tt-2):4<Tt&&!Pt&&!Nt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Le!==null&&ye!==Le;){var At=Tt=null;for(Pt=Le.sourceEdges.iterator;Pt.next()&&(Nt=Pt.value,Nt.link!==x.link||(Tt=Nt.fromVertex,At=Nt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){Pt=y.i(it-1).x,Nt=y.i(it-1).y;var Bt=Tt.centerX,Rt=Tt.centerY;if(We)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,Pt,Nt),y.m(it++,Pt,Rt)):(At!==null?At.centerY:Nt)!==Rt&&(At=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,At,Nt),y.m(it++,At,Rt)):it===y.firstPickIndex+1?(y.m(it++,Pt,Nt),y.m(it++,Bt,Nt)):(At!==null?At.centerX:Pt)!==Bt&&(At=this.Ta[Tt.layer-1]+this.Rf.y,y.m(it++,Pt,At),y.m(it++,Bt,At));else if(it===y.firstPickIndex+1){At=Math.max(10,this.he[Le.layer]);var Zt=Math.max(10,this.Ld[Le.layer]);if(ze)this.K===180?Bt<=Le.bounds.x?(Le=Le.bounds.x,y.m(it++,Le-At,Rt),y.m(it++,Le,Rt),y.m(it++,Le+Zt,Rt)):(y.m(it++,Bt-At,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt+Zt,Rt)):this.K===90?Rt>=Le.bounds.bottom?(Le=Le.bounds.y+Le.bounds.height,y.m(it++,Bt,Le+Zt),y.m(it++,Bt,Le),y.m(it++,Bt,Le-At)):(y.m(it++,Bt,Rt+Zt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt-At)):this.K===270?Rt<=Le.bounds.y?(Le=Le.bounds.y,y.m(it++,Bt,Le-At),y.m(it++,Bt,Le),y.m(it++,Bt,Le+Zt)):(y.m(it++,Bt,Rt-At),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt+Zt)):this.K===0&&(Bt>=Le.bounds.right?(Le=Le.bounds.x+Le.bounds.width,y.m(it++,Le+Zt,Rt),y.m(it++,Le,Rt),y.m(it++,Le-At,Rt)):(y.m(it++,Bt+Zt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt-At,Rt)));else{y.m(it++,Pt,Nt);var Fn=0;this.K===180||this.K===0?((this.K===180?Bt>=Le.bounds.right:Bt<=Le.bounds.x)&&(Fn=(this.K===0?-At:Zt)/2),y.m(it++,Pt+Fn,Rt)):((this.K===270?Rt>=Le.bounds.bottom:Rt<=Le.bounds.y)&&(Fn=(this.K===90?-At:Zt)/2),y.m(it++,Bt,Nt+Fn)),y.m(it++,Bt,Rt)}}else At=Math.max(10,this.he[Tt.layer]),Zt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt-At-Je,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt+Zt+Je,Rt)):this.K===90?(y.m(it++,Bt,Rt+Zt+Je),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt-At-Je)):this.K===270?(y.m(it++,Bt,Rt-At-Je),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt+Zt+Je)):(y.m(it++,Bt+Zt+Je,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt-At-Je,Rt)):y.m(it++,Bt,Rt)}Le=Tt}(ae===null||ge!==Vr||We)&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,Rt=y.i(it).y,We?(Je=this.Ld[ye.layer],this.K===180||this.K===0?(We=Nt,We>=ye.bounds.y&&We<=ye.bounds.bottom&&(this.K===180?Bt>=ye.bounds.x:Bt<=ye.bounds.right)&&(Le=ye.centerX+(this.K===180?-Je:Je),We<ye.bounds.y+ye.bounds.height/2?We=ye.bounds.y-this.kc/2:We=ye.bounds.bottom+this.kc/2,y.m(it++,Le,Nt),y.m(it++,Le,We)),y.m(it++,Bt,We)):(We=Pt,We>=ye.bounds.x&&We<=ye.bounds.right&&(this.K===270?Rt>=ye.bounds.y:Rt<=ye.bounds.bottom)&&(Le=ye.centerY+(this.K===270?-Je:Je),We<ye.bounds.x+ye.bounds.width/2?We=ye.bounds.x-this.kc/2:We=ye.bounds.right+this.kc/2,y.m(it++,Pt,Le),y.m(it++,We,Le)),y.m(it++,We,Rt)),y.m(it++,Bt,Rt)):ze?(At=Math.max(10,this.he[ye.layer]),Zt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Bt>=ye.bounds.x?(Le=ye.bounds.x+ye.bounds.width,y.L(it-2,Le,Nt),y.L(it-1,Le+Zt,Nt)):this.K===90&&Rt<=ye.bounds.bottom?(Le=ye.bounds.y,y.L(it-2,Pt,Le),y.L(it-1,Pt,Le-At)):this.K===270&&Rt>=ye.bounds.y?(Le=ye.bounds.y+ye.bounds.height,y.L(it-2,Pt,Le),y.L(it-1,Pt,Le+Zt)):this.K===0&&Bt<=ye.bounds.right&&(Le=ye.bounds.x,y.L(it-2,Le,Nt),y.L(it-1,Le-At,Nt))):(At=Math.max(10,this.he[ye.layer]),Zt=Math.max(10,this.Ld[ye.layer]),We=0,this.K===180||this.K===0?((this.K===180?Bt<=ye.bounds.x:Bt>=ye.bounds.right)&&(We=(this.K===0?Zt:-At)/2),y.m(it++,Bt+We,Nt)):((this.K===270?Rt<=ye.bounds.y:Rt>=ye.bounds.bottom)&&(We=(this.K===90?Zt:-At)/2),y.m(it++,Pt,Rt+We)),y.m(it++,Bt,Rt)))}else{for(;ye!==null&&ye!==Le;){for(At=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(Pt=ye.value,Pt.link!==x.link||(Tt=Pt.toVertex,At=Pt.fromVertex,At.node!==null&&(At=null),Tt.node!==null)););if(Tt===null)break;Tt!==Le&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=Tt.centerX,Rt=Tt.centerY,We?this.K===180||this.K===0?(At!==null?At.centerY:Nt)!==Rt&&(At=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,Pt):Math.min(At,Pt)),y.m(it++,At,Nt),y.m(it++,At,Rt)):(At!==null?At.centerX:Pt)!==Bt&&(At=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Nt):Math.min(At,Nt)),y.m(it++,Pt,At),y.m(it++,Bt,At)):(At=Math.max(10,this.he[Tt.layer]),Zt=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt+Zt+Je,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt-At-Je,Rt)):this.K===90?(y.m(it++,Bt,Rt-At-Je),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt+Zt+Je)):this.K===270?(y.m(it++,Bt,Rt+Zt+Je),y.m(it++,Bt,Math.max(Rt+Zt-Je/2,Rt)),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Math.min(Rt-At+Je/2,Rt)),y.m(it++,Bt,Rt-At-Je)):(y.m(it++,Bt-At-Je,Rt),y.m(it++,Math.min(Bt-At+Je/2,Bt),Rt),y.m(it++,Bt,Rt),y.m(it++,Bt,Rt),y.m(it++,Math.max(Bt+Zt-Je/2,Bt),Rt),y.m(it++,Bt+Zt+Je,Rt)):this.K===180?(y.m(it++,Bt+Zt,Rt),y.m(it++,Bt-At,Rt)):this.K===90?(y.m(it++,Bt,Rt-At),y.m(it++,Bt,Rt+Zt)):this.K===270?(y.m(it++,Bt,Rt+Zt),y.m(it++,Bt,Rt-At)):(y.m(it++,Bt-At,Rt),y.m(it++,Bt+Zt,Rt)))),ye=Tt}We&&(Pt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,Rt=y.i(it).y,this.K===180||this.K===0?Nt!==Rt&&(At=this.K===0?Math.min(Math.max((Bt+Pt)/2,this.Ta[Le.layer]+this.Rf.x),Bt):Math.max(Math.min((Bt+Pt)/2,this.Ta[Le.layer]+this.Rf.x),Bt),y.m(it++,At,Nt),y.m(it++,At,Rt)):Pt!==Bt&&(At=this.K===90?Math.min(Math.max((Rt+Nt)/2,this.Ta[Le.layer]+this.Rf.y),Rt):Math.max(Math.min((Rt+Nt)/2,this.Ta[Le.layer]+this.Rf.y),Rt),y.m(it++,Pt,At),y.m(it++,Bt,At)))}b!==null&&ze&&4<=y.pointsCount&&(ne!==null&&(ne=ge===Vr?y.getLinkPointFromPoint(E,ne,ne.ga(ai),y.i(3),!0):y.i(0),ge===Vr&&(ge=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ge.x)/2,ge.y),y.L(2,b.x,(ge.y+b.y)/2)):(y.L(1,ge.x,(ne.y+ge.y)/2),y.L(2,(ge.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),ae!==null&&(E=ue===Vr?y.getLinkPointFromPoint(ee,ae,ae.ga(ai),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ue===Vr&&(ae=y.i(y.pointsCount-3),ue=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ae.x)/2,ae.y),y.L(y.pointsCount-2,ue.x,(ae.y+ue.y)/2)):(y.L(y.pointsCount-2,ae.x,(E.y+ae.y)/2),y.L(y.pointsCount-3,(ae.x+ue.x)/2,ue.y))),E.w()||E.set(ee.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Oi.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new rn,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 b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var ee=b.i(E),ne=b.i(E+1);if(this.B(ee.y,ne.y)&&!this.B(ee.x,ne.x)){var ae=new pc;ae.layer=Math.floor(ee.y/2);var ue=b.i(0),ge=b.i(b.pointsCount-1);if(ae.first=ue.x*ue.x+ue.y,ae.jc=ge.x*ge.x+ge.y,ae.rd=Math.min(ee.x,ne.x),ae.Ic=Math.max(ee.x,ne.x),ae.index=E,ae.link=b,E+2<b.pointsCount){ue=b.i(E-1),ge=b.i(E+2);var ye=0;ue.y<ee.y?ye=ge.y<ee.y?3:ee.x<ne.x?2:1:ue.y>ee.y&&(ye=ge.y>ee.y?0:ne.x<ee.x?2:1),ae.j=ye}x.push(ae)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(ee=x[a].layer,b=a+1;b<x.length&&x[b].layer===ee;)b++;if(1<b-a)for(ee=a;ee<b;){for(ne=x[ee].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-ee,1<ne){for(this.zi(x,this.Js,ee,ee+ne),ye=1,ae=x[ee].jc,ue=ee;ue<E;ue++)ge=x[ue],ge.jc!==ae&&(ye++,ae=ge.jc);this.zi(x,this.Ux,ee,ee+ne);var Le=1;for(ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++){var ze=x[Le];(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc);var We=ze.link;ee=We.i(ze.index),ne=We.i(ze.index+1);var Je=this.linkSpacing*(ye-(ge-1)/2);y++,We.uh(),We.L(ze.index,ee.x,ee.y+Je),We.L(ze.index+1,ne.x,ne.y+Je),We.zf()}}ee=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)ee=b.i(E),ne=b.i(E+1),this.B(ee.x,ne.x)&&!this.B(ee.y,ne.y)&&(ae=new pc,ae.layer=Math.floor(ee.x/2),ue=b.i(0),ge=b.i(b.pointsCount-1),ae.first=ue.x+ue.y*ue.y,ae.jc=ge.x+ge.y*ge.y,ae.rd=Math.min(ee.y,ne.y),ae.Ic=Math.max(ee.y,ne.y),ae.index=E,ae.link=b,E+2<b.pointsCount&&(ue=b.i(E-1),ge=b.i(E+2),ye=0,ue.x<ee.x?ye=ge.x<ee.x?3:ee.y<ne.y?2:1:ue.x>ee.x&&(ye=ge.x>ee.x?0:ne.y<ee.y?2:1),ae.j=ye),x.push(ae));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(ee=x[a].layer,b=a+1;b<x.length&&x[b].layer===ee;)b++;if(1<b-a)for(ee=a;ee<b;){for(ne=x[ee].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-ee,1<ne){for(this.zi(x,this.Js,ee,ee+ne),ye=1,ae=x[ee].jc,ue=ee;ue<E;ue++)ge=x[ue],ge.jc!==ae&&(ye++,ae=ge.jc);for(this.zi(x,this.Ux,ee,ee+ne),Le=1,ae=x[ee].first,ue=ee;ue<E;ue++)ge=x[ue],ge.first!==ae&&(Le++,ae=ge.first);for(ue=!0,ge=Le,ye<Le?(ue=!1,ge=ye,ae=x[ee].jc,this.zi(x,this.Js,ee,ee+ne)):ae=x[ee].first,ye=0,Le=ee;Le<E;Le++)ze=x[Le],(ue?ze.first:ze.jc)!==ae&&(ye++,ae=ue?ze.first:ze.jc),We=ze.link,ee=We.i(ze.index),ne=We.i(ze.index+1),Je=this.linkSpacing*(ye-(ge-1)/2),y++,We.uh(),We.L(ze.index,ee.x+Je,ee.y),We.L(ze.index+1,ne.x+Je,ne.y),We.zf()}ee=E}a=b}}}},qe=Oi.prototype,qe.Vx=function(a,y){return a instanceof pc&&y instanceof pc&&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},qe.Ux=function(a,y){return a instanceof pc&&y instanceof pc&&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},qe.Js=function(a,y){return a instanceof pc&&y instanceof pc&&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},qe.B=function(a,y){return a-=y,-1<a&&1>a},qe.zi=function(a,y,x,b){var E=a.length,ee=b-x;if(!(1>=ee))if((0>x||x>=E-1)&&jt("not in range 0 <= from < length: "+x),ee===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function fc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function dc(a,y,x){a.He[a.tc[y]]=x}zt.Object.defineProperties(Oi.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()):jt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==Ev&&a!==Pg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==kv&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Tv&&a!==Py&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==Lv&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var Ev=new hn(Oi,"CycleDepthFirst",0),xy=new hn(Oi,"CycleGreedy",1),Pg=new hn(Oi,"CycleFromLayers",2),kv=new hn(Oi,"LayerOptimalLinkLength",0),wy=new hn(Oi,"LayerLongestPathSink",1),by=new hn(Oi,"LayerLongestPathSource",2),Tv=new hn(Oi,"InitDepthFirstOut",0),Py=new hn(Oi,"InitDepthFirstIn",1),Cy=new hn(Oi,"InitNaive",2),Ey=new hn(Oi,"AggressiveNone",0),Lv=new hn(Oi,"AggressiveLess",1),ky=new hn(Oi,"AggressiveMore",2),Xx=8;Oi.className="LayeredDigraphLayout",Oi.CycleDepthFirst=Ev,Oi.CycleGreedy=xy,Oi.CycleFromLayers=Pg,Oi.LayerOptimalLinkLength=kv,Oi.LayerLongestPathSink=wy,Oi.LayerLongestPathSource=by,Oi.InitDepthFirstOut=Tv,Oi.InitDepthFirstIn=Py,Oi.InitNaive=Cy,Oi.AggressiveNone=Ey,Oi.AggressiveLess=Lv,Oi.AggressiveMore=ky,Oi.PackNone=0,Oi.PackExpand=1,Oi.PackStraighten=2,Oi.PackMedian=4,Oi.PackAll=15,Oi.AlignNone=0,Oi.AlignUpperLeft=1,Oi.AlignUpperRight=2,Oi.AlignLowerLeft=4,Oi.AlignLowerRight=8,Oi.AlignAll=15;function pc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pc.className="SegInfo";function Xd(a){Xi.call(this,a)}Kt(Xd,Xi),Xd.prototype.createVertex=function(){return new el(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function el(a){Uo.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}Kt(el,Uo);function ix(a,y){return a.index-y.index}function Mv(a,y){if(!a.$n){for(var x=[],b=Lr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Lr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;jt("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Lr(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=Lr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}el.prototype.Cl=function(a){Uo.prototype.Cl.call(this,a),this.bo=this.co=null},el.prototype.Kl=function(a){Uo.prototype.Kl.call(this,a),this.bo=this.co=null},el.prototype.zl=function(a){Uo.prototype.zl.call(this,a),this.$n=this.ao=null},el.prototype.Jl=function(a){Uo.prototype.Jl.call(this,a),this.$n=this.ao=null},zt.Object.defineProperties(el.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)}}}),el.prototype.deleteDestinationEdge=el.prototype.Jl,el.prototype.addDestinationEdge=el.prototype.zl,el.prototype.deleteSourceEdge=el.prototype.Kl,el.prototype.addSourceEdge=el.prototype.Cl,el.className="LayeredDigraphVertex";function Cg(a){Es.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Kt(Cg,Es),zt.Object.defineProperties(Cg.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)}}}),Cg.className="LayeredDigraphEdge";function ti(a){so.call(this),this.Ub=new an,this.Wn=Ov,this.ud=wu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new mn(10,10).freeze();var y=new Kf(this);this.W=new cl(y),this.Y=new cl(y),this.ru=[],a&&Object.assign(this,a)}Kt(ti,so),ti.prototype.cloneProtected=function(a){so.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)},ti.prototype.qb=function(a){a.classType===ti?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:jt("Unknown enum value: "+a):so.prototype.qb.call(this,a)},ti.prototype.createNetwork=function(){return new Kf(this)},ti.prototype.makeNetwork=function(a){function y(b){if(b instanceof Un)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof En){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Yt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ir?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},ti.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Iv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Yt&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?wu:Hf:this.ud=this.path===Ov?wu: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 an,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Un?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof cl&&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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&ux(this,y);if(this.Cu(),this.layerStyle===Rv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?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,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var ee=y.children[E];b=Math.max(b,x?ee.width:ee.height)}if(0<=b)for(E=0;E<y.children.length;E++)ee=y.children[E],x?(y.angle===180&&(ee.focusX+=b-ee.width),ee.width=b):(y.angle===270&&(ee.focusY+=b-ee.height),ee.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new an,this.isValidLayout=!0};function Jx(a){var y=new an;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}ti.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case wu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:jt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case wu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Hf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:jt("Unhandled path value "+a.ud.toString())}}return b}function Ly(a,y){if(y!==null){switch(a.ud){case wu:if(0<y.destinationEdges.count){for(var x=new rn,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Hf:if(0<y.sourceEdges.count){for(x=new rn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:jt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var ee=x[E];ee.initialized=!0,ee.level=y.level+1,ee.parent=y,a.Ub.remove(ee)}for(y=0;y<b;y++)Ly(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}ti.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var ee=E=0;ee<x.length;ee++)x[ee]!==y&&(b[E++]=x[ee]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Cu&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,ee=y.children,ne=ee.length,ae=0;ae<ne;ae++){var ue=ee[ae];sx(a,ue),x+=ue.descendantCount+1,b=Math.max(b,ue.maxChildrenCount),E=Math.max(E,ue.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Qx(a,y){switch(a.vo){default:case Dv:return y.parent!==null?y.parent:a.W;case By:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Fy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,ee=0;ee<E;ee++)if(0<b[ee].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}ti.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Cu){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==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 lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}ti.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Cu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}ti.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Lg:a.children.sort(a.comparer),a.children.reverse();break;default:jt("Unhandled sorting value "+a.sorting.toString())}},ti.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ti.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=gc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var ee=0,ne=0,ae=0,ue=a.commentSpacing;if(a.node!==null)for(var ge=a.node.Mu();ge.next();){var ye=ge.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(ee=Math.max(ee,ye.width),ne+=ye.height+Math.abs(ae)):(ee+=ye.width+Math.abs(ae),ne=Math.max(ne,ye.height)),ae=ue)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(ee+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),ee=Math.max(0,ee-a.width)),E=$t.allocAt(0,0,a.bounds.width+ee,a.bounds.height+ne),a.bounds=E,$t.free(E))};function gc(a){return a===Lh||a===Cu||a===Mh||a===Xu}function Eg(a){return a===Lh||a===Cu}function My(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Mh)return!0}}return!1}ti.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,ee=!1;x!==null&&(E=x.angle,ee=x.alignment,ee=gc(ee)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,ae=My(a),ue=0,ge=a.comments,ye=ge.length,Le=lt.alloc(),ze=0;ze<ye;ze++){var We=ge[ze],Je=We.measuredBounds;if(b&&!ne||!ee&&!x&&ne||ee&&x&&ne){if(135<E&&!ee||x&&ae)if(0<=a.commentMargin)for(Le.h(a.bounds.x-a.commentMargin-Je.width,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();){var it=We.value;it.fromSpot=Oa,it.toSpot=na}else for(Le.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=na,it.toSpot=Oa;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=na,it.toSpot=Oa;else for(Le.h(a.bounds.x+a.commentMargin-Je.width,a.bounds.y+ue),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=Oa,it.toSpot=na;ue=0<=a.commentSpacing?ue+(Je.height+a.commentSpacing):ue+(a.commentSpacing-Je.height)}else{if(135<E&&!ee||!x&&ae)if(0<=a.commentMargin)for(Le.h(a.bounds.x+ue,a.bounds.y-a.commentMargin-Je.height),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=ja,it.toSpot=sa;else for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y-a.commentMargin),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=sa,it.toSpot=ja;else if(0<=a.commentMargin)for(Le.h(a.bounds.x+ue,a.bounds.y+2*a.focus.y+a.commentMargin),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=sa,it.toSpot=ja;else for(Le.h(a.bounds.x+ue,a.bounds.y+a.commentMargin-Je.height),We.move(Le),We=We.Sd();We.next();)it=We.value,it.fromSpot=ja,it.toSpot=sa;ue=0<=a.commentSpacing?ue+(Je.width+a.commentSpacing):ue+(a.commentSpacing-Je.width)}}if(lt.free(Le),y=ue-a.commentSpacing-(b?y.height:y.width),this.ud===wu)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},ti.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case Fv:hx(this,a);break;case Mg:if(a.alignment===Cu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(x)),b=My(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?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 E=El(a);y=E===90||E===270;var ee=0,ne=a.children,ae=ne.length;for(x=0;x<ae;x++)b=ne[x],ee=Math.max(ee,y?b.Da.width:b.Da.height);var ue=a.alignment;b=ue===bu;var ge=ue===Pu,ye=gc(ue),Le=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ze=a.nodeSpacing,We=this.computeNodeIndent(a),Je=a.rowSpacing,it=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,Pt=0,Nt=0,At=0,Bt=null,Rt=null,Zt=0,Fn=0,or=0,$n=0,Cn=0,fn=0,Br=0,Nr=0;if(ye&&!Eg(ue)&&135<E&&ne.reverse(),Eg(ue))if(1<ae)for(var bi=0;bi<ae;bi++)bi%2===0&&bi!==ae-1&&(Nr=Math.max(Nr,y?ne[bi].Da.width:ne[bi].Da.height));else ae===1&&(Nr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(ue){case Lh:Nt=135>E?cx(this,a,ne,Nr,Pt,Nt):fx(this,a,ne,Nr,Pt,Nt),Nr=Nt.x,Pt=Nt.width,Nt=Nt.height;break;case Mh:for(Bt=0;Bt<ae;Bt++)Rt=ne[Bt],Le=Rt.Da,At=fn===0?0:Je,y?(Rt.S.h(ee-Le.width,$n+At),Pt=Math.max(Pt,Le.width),Nt=Math.max(Nt,$n+At+Le.height),$n+=At+Le.height):(Rt.S.h(or+At,ee-Le.height),Pt=Math.max(Pt,or+At+Le.width),Nt=Math.max(Nt,Le.height),or+=At+Le.width),fn++;break;case Xu:for(Bt=0;Bt<ae;Bt++)Rt=ne[Bt],ee=Rt.Da,Le=fn===0?0:Je,y?(Rt.S.h(ze/2+a.focus.x,$n+Le),Pt=Math.max(Pt,ee.width),Nt=Math.max(Nt,$n+Le+ee.height),$n+=Le+ee.height):(Rt.S.h(or+Le,ze/2+a.focus.y),Pt=Math.max(Pt,or+Le+ee.width),Nt=Math.max(Nt,ee.height),or+=Le+ee.width),fn++}Bt=ms(this,2),Rt=ms(this,2),y?(Bt[0].h(0,0),Bt[1].h(0,Nt),Rt[0].h(Pt,0)):(Bt[0].h(0,0),Bt[1].h(Pt,0),Rt[0].h(0,Nt)),Rt[1].h(Pt,Nt)}else for(bi=0;bi<ae;bi++){var Vi=ne[bi],Yo=Vi.Da;if(y){0<Le&&0<fn&&or+ze+Yo.width>Le&&(or<ee&&ef(a,ue,ee-or,0,Br,bi-1),Cn++,fn=0,Br=bi,At=Nt,or=0,$n=135<E?-Nt-Je:Nt+Je),Av(this,Vi,0,$n);var ta=0;if(fn===0)Bt=Vi.Yo,Rt=Vi.kp,Zt=Yo.width,Fn=Yo.height,(Bt===null||Rt===null||E!==El(Vi))&&(Bt=ms(this,2),Rt=ms(this,2),Bt[0].h(0,0),Bt[1].h(0,Fn),Rt[0].h(Zt,0),Rt[1].h(Zt,Fn));else{var Ra=er();Fn=dx(this,a,Vi,Bt,Rt,Zt,Fn,Ra),ta=Fn.x,Bt=Ra[0],Rt=Ra[1],Zt=Fn.width,Fn=Fn.height,_n(Ra),or<Yo.width&&0>ta&&(Uf(a,-ta,0,Br,bi-1),jv(Bt,-ta,0),jv(Rt,-ta,0),ta=0)}Vi.S.h(ta,$n),Pt=Math.max(Pt,Zt),Nt=Math.max(Nt,At+(Cn===0?0:Je)+Yo.height),or=Zt}else 0<Le&&0<fn&&$n+ze+Yo.height>Le&&($n<ee&&ef(a,ue,0,ee-$n,Br,bi-1),Cn++,fn=0,Br=bi,At=Pt,$n=0,or=135<E?-Pt-Je:Pt+Je),Av(this,Vi,or,0),ta=0,fn===0?(Bt=Vi.Yo,Rt=Vi.kp,Zt=Yo.width,Fn=Yo.height,(Bt===null||Rt===null||E!==El(Vi))&&(Bt=ms(this,2),Rt=ms(this,2),Bt[0].h(0,0),Bt[1].h(Zt,0),Rt[0].h(0,Fn),Rt[1].h(Zt,Fn))):(Ra=er(),Fn=dx(this,a,Vi,Bt,Rt,Zt,Fn,Ra),ta=Fn.x,Bt=Ra[0],Rt=Ra[1],Zt=Fn.width,Fn=Fn.height,_n(Ra),$n<Yo.height&&0>ta&&(Uf(a,0,-ta,Br,bi-1),jv(Bt,0,-ta),jv(Rt,0,-ta),ta=0)),Vi.S.h(or,ta),Nt=Math.max(Nt,Fn),Pt=Math.max(Pt,At+(Cn===0?0:Je)+Yo.width),$n=Fn;fn++}switch(0<Cn&&(y?(Nt+=Math.max(0,x),or<Pt&&ef(a,ue,Pt-or,0,Br,ae-1),0<it&&(ge||Uf(a,it,0,0,ae-1),Pt+=it)):(Pt+=Math.max(0,x),$n<Nt&&ef(a,ue,0,Nt-$n,Br,ae-1),0<it&&(ge||Uf(a,0,it,0,ae-1),Nt+=it))),it=ge=0,ue){case Jd:y?ge+=Pt/2-a.focus.x-We/2:it+=Nt/2-a.focus.y-We/2;break;case Wf:0<Cn?y?ge+=Pt/2-a.focus.x-We/2:it+=Nt/2-a.focus.y-We/2:y?(Nr=ne[0].S.x+ne[0].la.x,ge+=Nr+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Nr)/2-a.focus.x-We/2):(Nr=ne[0].S.y+ne[0].la.y,it+=Nr+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Nr)/2-a.focus.y-We/2);break;case bu:y?(ge-=We,Pt+=We):(it-=We,Nt+=We);break;case Pu:y?(ge+=Pt-a.width+We,Pt+=We):(it+=Nt-a.height+We,Nt+=We);break;case Lh:y?1<ae?ge+=Nr+ze/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?it+=Nr+ze/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Mh:y?ge+=Pt+ze/2-a.focus.x:it+=Nt+ze/2-a.focus.y;break;case Xu:break;default:Nt=this.customAlignment(a,ge,it,Pt,Nt),ge=Nt[0],it=Nt[1],Pt=Nt[2],Nt=Nt[3]}for(We=0;We<ae;We++)Nr=ne[We],y?Nr.S.h(Nr.S.x+Nr.la.x-ge,Nr.S.y+(135<E?(ye?-Nt:-Nr.Da.height)+Nr.la.y-x:Tt+x+Nr.la.y)):Nr.S.h(Nr.S.x+(135<E?(ye?-Pt:-Nr.Da.width)+Nr.la.x-x:b+x+Nr.la.x),Nr.S.y+Nr.la.y-it);if(ae=ne=0,ye?y?(Pt=Ny(a,Pt,ge),0>ge&&(ge=0),135<E&&(it+=Nt+x),Nt+=Tt+x,ue===Xu&&(ne+=ze/2+a.focus.x),ae+=Tt+x):(135<E&&(ge+=Pt+x),Pt+=b+x,Nt=Ay(a,Nt,it),0>it&&(it=0),ue===Xu&&(ae+=ze/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Pt&&(Pt=jy(ue,b-Pt,0),ne=Pt.x,ae=Pt.y,Pt=b,ge=0):Pt=Ny(a,Pt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(it+=Nt+x),Nt=Math.max(Math.max(Nt,Tt),Nt+Tt+x),ae+=Tt+x):(135<E&&(ge+=Pt+x),Pt=Math.max(Math.max(Pt,b),Pt+b+x),a.comments===null?Tt>Nt&&(Nt=jy(ue,0,Tt-Nt),ne=Nt.x,ae=Nt.y,Nt=Tt,it=0):Nt=Ay(a,Nt,it),0>it&&(ae-=it,it=0),ne+=b+x),0<Cn)E=ms(this,4),Cn=ms(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,Nt),Cn[2].h(Pt,E[2].y),Cn[3].h(Cn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Pt,E[2].y),Cn[2].h(E[2].x,Nt),Cn[3].h(E[3].x,Cn[2].y));else{for(E=ms(this,Bt.length+2),Cn=ms(this,Rt.length+2),ue=0;ue<Bt.length;ue++)ye=Bt[ue],E[ue+2].h(ye.x+ne,ye.y+ae);for(ue=0;ue<Rt.length;ue++)ye=Rt[ue],Cn[ue+2].h(ye.x+ne,ye.y+ae)}y?(E[0].h(ge,0),E[1].h(E[0].x,Tt),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])),Cn[0].h(ge+b,0),Cn[1].h(Cn[0].x,Tt),Cn[2].y<Cn[1].y&&(Cn[2].x<Cn[0].x?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].y<Cn[2].y&&(Cn[3].x<Cn[0].x?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].y-=x/2,Cn[2].y-=x/2):(E[0].h(0,it),E[1].h(b,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])),Cn[0].h(0,it+Tt),Cn[1].h(b,Cn[0].y),Cn[2].x<Cn[1].x&&(Cn[2].y<Cn[0].y?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].x<Cn[2].x&&(Cn[3].y<Cn[0].y?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].x-=x/2,Cn[2].x-=x/2),Il(this,Bt),Il(this,Rt),a.Yo=E,a.kp=Cn,a.la.h(ge,it),a.Da.h(Pt,Nt)}break;default:jt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=gc(x));var E=My(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=El(y),x=b===90||b===270;var ee=0;E=y.children;for(var ne=E.length,ae=0;ae<ne;ae++){var ue=E[ae];ee=Math.max(ee,x?ue.Da.width:ue.Da.height)}var ge=y.alignment,ye=ge===bu,Le=ge===Pu;ae=gc(ge);var ze=Math.max(0,y.breadthLimit);ue=a.computeLayerSpacing(y);var We=y.nodeSpacing,Je=a.computeNodeIndent(y),it=ye||Le?0:Je/2,Tt=y.rowSpacing,Pt=0;(ye||Le||y.hm||y.im&&y.maxGenerationCount===1)&&(Pt=Math.max(0,y.rowIndent)),ye=y.width;var Nt=y.height,At=0,Bt=0,Rt=0,Zt=0,Fn=0,or=0,$n=0,Cn=0,fn=0,Br=0;if(ae&&!Eg(ge)&&135<b&&E.reverse(),Eg(ge))if(1<ne)for(var Nr=0;Nr<ne;Nr++){var bi=E[Nr],Vi=bi.Da;Nr%2===0&&Nr!==ne-1?fn=Math.max(fn,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(bi)-We):Nr%2!==0&&(Br=Math.max(Br,(x?Vi.width:Vi.height)+a.computeBusNodeSpacing(bi)-We))}else ne===1&&(fn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(ge){case Lh:case Cu:Bt=135>b?cx(a,y,E,fn,At,Bt):fx(a,y,E,fn,At,Bt),fn=Bt.x,At=Bt.width,Bt=Bt.height;break;case Mh:for(ze=0;ze<ne;ze++)it=E[ze],Rt=it.Da,Br=$n===0?0:Tt,x?(it.S.h(ee-Rt.width,Fn+Br),At=Math.max(At,Rt.width),Bt=Math.max(Bt,Fn+Br+Rt.height),Fn+=Br+Rt.height):(it.S.h(Zt+Br,ee-Rt.height),At=Math.max(At,Zt+Br+Rt.width),Bt=Math.max(Bt,Rt.height),Zt+=Br+Rt.width),$n++;break;case Xu:for(ee=0;ee<ne;ee++)ze=E[ee],it=ze.Da,Rt=$n===0?0:Tt,x?(ze.S.h(We/2+y.focus.x,Fn+Rt),At=Math.max(At,it.width),Bt=Math.max(Bt,Fn+Rt+it.height),Fn+=Rt+it.height):(ze.S.h(Zt+Rt,We/2+y.focus.y),At=Math.max(At,Zt+Rt+it.width),Bt=Math.max(Bt,it.height),Zt+=Rt+it.width),$n++}else for(Br=0;Br<ne;Br++)Nr=E[Br],bi=Nr.Da,x?(0<ze&&0<$n&&Zt+We+bi.width>ze&&(Zt<ee&&ef(y,ge,ee-Zt,0,Cn,Br-1),or++,$n=0,Cn=Br,Rt=Bt,Zt=0,Fn=135<b?-Bt-Tt:Bt+Tt),Vi=$n===0?it:We,Av(a,Nr,0,Fn),Nr.S.h(Zt+Vi,Fn),At=Math.max(At,Zt+Vi+bi.width),Bt=Math.max(Bt,Rt+(or===0?0:Tt)+bi.height),Zt+=Vi+bi.width):(0<ze&&0<$n&&Fn+We+bi.height>ze&&(Fn<ee&&ef(y,ge,0,ee-Fn,Cn,Br-1),or++,$n=0,Cn=Br,Rt=At,Fn=0,Zt=135<b?-At-Tt:At+Tt),Vi=$n===0?it:We,Av(a,Nr,Zt,0),Nr.S.h(Zt,Fn+Vi),Bt=Math.max(Bt,Fn+Vi+bi.height),At=Math.max(At,Rt+(or===0?0:Tt)+bi.width),Fn+=Vi+bi.height),$n++;switch(0<or&&(x?(Bt+=Math.max(0,ue),Zt<At&&ef(y,ge,At-Zt,0,Cn,ne-1),0<Pt&&(Le||Uf(y,Pt,0,0,ne-1),At+=Pt)):(At+=Math.max(0,ue),Fn<Bt&&ef(y,ge,0,Bt-Fn,Cn,ne-1),0<Pt&&(Le||Uf(y,0,Pt,0,ne-1),Bt+=Pt))),Pt=Le=0,ge){case Jd:x?Le+=At/2-y.focus.x-Je/2:Pt+=Bt/2-y.focus.y-Je/2;break;case Wf:0<or?x?Le+=At/2-y.focus.x-Je/2:Pt+=Bt/2-y.focus.y-Je/2:x?(a=E[0].S.x+E[0].la.x,Le+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Je/2):(a=E[0].S.y+E[0].la.y,Pt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Je/2);break;case bu:x?(Le-=Je,At+=Je):(Pt-=Je,Bt+=Je);break;case Pu:x?(Le+=At-y.width+Je,At+=Je):(Pt+=Bt-y.height+Je,Bt+=Je);break;case Lh:case Cu:x?1<ne?Le+=fn+We/2-y.focus.x:Le+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Pt+=fn+We/2-y.focus.y:Pt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Mh:x?Le+=At+We/2-y.focus.x:Pt+=Bt+We/2-y.focus.y;break;case Xu:break;default:a=a.customAlignment(y,Le,Pt,At,Bt),Le=a[0],Pt=a[1],At=a[2],Bt=a[3]}for(a=0;a<ne;a++)Je=E[a],x?Je.S.h(Je.S.x+Je.la.x-Le,Je.S.y+(135<b?(ae?-Bt:-Je.Da.height)+Je.la.y-ue:Nt+ue+Je.la.y)):Je.S.h(Je.S.x+(135<b?(ae?-At:-Je.Da.width)+Je.la.x-ue:ye+ue+Je.la.x),Je.S.y+Je.la.y-Pt);x?(At=Ny(y,At,Le),0>Le&&(Le=0),135<b&&(Pt+=Bt+ue),Bt=Math.max(Math.max(Bt,Nt),Bt+Nt+ue)):(135<b&&(Le+=At+ue),At=Math.max(Math.max(At,ye),At+ye+ue),Bt=Ay(y,Bt,Pt),0>Pt&&(Pt=0)),y.la.h(Le,Pt),y.Da.h(At,Bt)}}ti.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new $t(b,0,E,ee);if(ne===1)return y=x[0],E=y.Da.width,ee=y.Da.height,new $t(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=El(y)===90,ye=0,Le=0,ze=0,We=0;We<ne;We++)if(!(We%2!==0||1<ne&&We===ne-1)){var Je=x[We],it=Je.Da,Tt=ye===0?0:ue;if(ge){var Pt=a.computeBusNodeSpacing(Je)-ae;Je.S.h(b-(it.width+Pt),ze+Tt),E=Math.max(E,it.width+Pt),ee=Math.max(ee,ze+Tt+it.height),ze+=Tt+it.height}else Pt=a.computeBusNodeSpacing(Je)-ae,Je.S.h(Le+Tt,b-(it.height+Pt)),ee=Math.max(ee,it.height+Pt),E=Math.max(E,Le+Tt+it.width),Le+=Tt+it.width;ye++}for(ye=0,Je=Le,We=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],Pt=Tt.Da;var Nt=ye===0?0:ue;if(ge){var At=a.computeBusNodeSpacing(Tt)-ae;Tt.S.h(Le+At,ze+Nt),E=Math.max(E,Le+Pt.width+At),ee=Math.max(ee,ze+Nt+Pt.height),ze+=Nt+Pt.height}else At=a.computeBusNodeSpacing(Tt)-ae,Tt.S.h(Le+Nt,ze+At),E=Math.max(E,Le+Nt+Pt.width),ee=Math.max(ee,ze+Pt.height+At),Le+=Nt+Pt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(We),Math.abs(ze)):Math.max(Math.abs(Je),Math.abs(Le))),ge?(x.S.h(b+ae/2-x.focus.x-x.la.x,ee+a),ge=b+ae/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),ee=Math.max(ee,Math.max(We,ze)+a+ne.height),0>x.S.x&&(b=Nv(y,x.S.x,!1,b,ae))):(x.S.h(E+a,b+ae/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Je,Le)+a+ne.width),ze=b+ae/2-x.focus.y-x.la.y,ee=Math.max(ee,ze+ne.height),0>ze&&(ee-=ze),0>x.S.y&&(b=Nv(y,x.S.y,!0,b,ae)))),new $t(b,0,E,ee)}function fx(a,y,x,b,E,ee){var ne=x.length;if(ne===0)return new $t(b,0,E,ee);if(ne===1)return x=x[0],E=x.Da.width,ee=x.Da.height,new $t(b,0,E,ee);for(var ae=y.nodeSpacing,ue=y.rowSpacing,ge=El(y)===270,ye=0,Le=0,ze=0,We=0;We<ne;We++)if(!(We%2!==0||1<ne&&We===ne-1)){var Je=x[We],it=Je.Da,Tt=ye===0?0:ue;if(ge){var Pt=a.computeBusNodeSpacing(Je)-ae;ze-=Tt+it.height,Je.S.h(b-(it.width+Pt),ze),E=Math.max(E,it.width+Pt),ee=Math.max(ee,Math.abs(ze))}else Pt=a.computeBusNodeSpacing(Je)-ae,Le-=Tt+it.width,Je.S.h(Le,b-(it.height+Pt)),ee=Math.max(ee,it.height+Pt),E=Math.max(E,Math.abs(Le));ye++}for(ye=0,Je=Le,We=ze,ge?(Le=b+ae,ze=0):(Le=0,ze=b+ae),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],Pt=Tt.Da;var Nt=ye===0?0:ue;if(ge){var At=a.computeBusNodeSpacing(Tt)-ae;ze-=Nt+Pt.height,Tt.S.h(Le+At,ze),E=Math.max(E,Le+Pt.width+At),ee=Math.max(ee,Math.abs(ze))}else At=a.computeBusNodeSpacing(Tt)-ae,Le-=Nt+Pt.width,Tt.S.h(Le,ze+At),ee=Math.max(ee,ze+Pt.height+At),E=Math.max(E,Math.abs(Le));ye++}for(1<ne&&ne%2===1&&(ue=x[ne-1],ye=ue.Da,a=a.computeBusLastRowSpacing(ue,ge?Math.max(Math.abs(We),Math.abs(ze)):Math.max(Math.abs(Je),Math.abs(Le))),ge?(ue.S.h(b+ae/2-ue.focus.x-ue.la.x,-ee-ye.height-a),Le=b+ae/2-ue.focus.x-ue.la.x,E=Math.max(E,Le+ye.width),0>Le&&(E-=Le),ee=Math.max(ee,Math.abs(Math.min(We,ze))+a+ye.height),0>ue.S.x&&(b=Nv(y,ue.S.x,!1,b,ae))):(ue.S.h(-E-ye.width-a,b+ae/2-ue.focus.y-ue.la.y),E=Math.max(E,Math.abs(Math.min(Je,Le))+a+ye.width),ze=b+ae/2-ue.focus.y-ue.la.y,ee=Math.max(ee,ze+ye.height),0>ze&&(ee-=ze),0>ue.S.y&&(b=Nv(y,ue.S.y,!0,b,ae)))),y=0;y<ne;y++)ae=x[y],ge?ae.S.h(ae.S.x,ae.S.y+ee):ae.S.h(ae.S.x+E,ae.S.y);return new $t(b,0,E,ee)}ti.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},ti.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Nv(a,y,x,b,E){a=a.children;for(var ee=a.length,ne=0;ne<ee;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[ee-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Wf:case Jd:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case bu:return a.width>y?a.width:y;case Pu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Lh:case Cu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Mh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Wf:case Jd:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case bu:return a.height>y?a.height:y;case Pu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Lh:case Cu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Mh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Jd:y/=2,x/=2;break;case Wf:y/=2,x/=2;break;case bu:x=y=0;break;case Pu:break;default:jt("Unhandled alignment value "+a.toString())}return new lt(y,x)}function ef(a,y,x,b,E,ee){y=jy(y,x,b),Uf(a,y.x,y.y,E,ee)}function Uf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var ee=a[b].S;ee.x+=y,ee.y+=x}}function Av(a,y,x,b){var E=y.parent;switch(a.ud){case wu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Hf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:jt("Unhandled path value "+a.ud.toString())}}function jv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function dx(a,y,x,b,E,ee,ne,ae){var ue=El(y),ge=ue===90||ue===270,ye=y.nodeSpacing;y=b;var Le=E;b=ee;var ze=ne,We=x.Yo,Je=x.kp;ne=x.Da;var it=ge?Math.max(ze,ne.height):Math.max(b,ne.width);if((We===null||ue!==El(x))&&(We=ms(a,2),Je=ms(a,2),ge?(We[0].h(0,0),We[1].h(0,ne.height),Je[0].h(ne.width,0),Je[1].h(Je[0].x,We[1].y)):(We[0].h(0,0),We[1].h(ne.width,0),Je[0].h(0,ne.height),Je[1].h(We[1].x,Je[0].y))),ge){if(ze=9999999,!(Le===null||2>Le.length||We===null||2>We.length))for(E=x=0;x<Le.length&&E<We.length;){ee=Le[x];var Tt=We[E];ue=Tt.x,ge=Tt.y,ue+=b;var Pt=ee;x+1<Le.length&&(Pt=Le[x+1]);var Nt=Tt;Tt=Nt.x,Nt=Nt.y,E+1<We.length&&(Nt=We[E+1],Tt=Nt.x,Nt=Nt.y,Tt+=b);var At=ze;ee.y===ge?At=ue-ee.x:ee.y>ge&&ee.y<Nt?At=ue+(ee.y-ge)/(Nt-ge)*(Tt-ue)-ee.x:ge>ee.y&&ge<Pt.y&&(At=ue-(ee.x+(ge-ee.y)/(Pt.y-ee.y)*(Pt.x-ee.x))),At<ze&&(ze=At),Pt.y<=ee.y?x++:Nt<=ge?E++:(Pt.y<=Nt&&x++,Nt<=Pt.y&&E++)}if(ze=b-ze,ze+=ye,x=We,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=ee=ue=0;ee<x.length&&x[ee].y<y[0].y;)ge=x[ee++],ye[b++].h(ge.x+E,ge.y);for(;ue<y.length;)ge=y[ue++],ye[b++].h(ge.x,ge.y);for(ue=y[y.length-1].y;ee<x.length&&x[ee].y<=ue;)ee++;for(;ee<x.length&&x[ee].y>ue;)ge=x[ee++],ye[b++].h(ge.x+E,ge.y);for(x=ms(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);Il(a,ye),b=x}if(ee=Je,ue=ze,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=ms(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].y<ee[0].y;)Pt=Le[x++],ye[E++].h(Pt.x,Pt.y);for(;ge<ee.length;)Pt=ee[ge++],ye[E++].h(Pt.x+ue,Pt.y);for(ee=ee[ee.length-1].y;x<Le.length&&Le[x].y<=ee;)x++;for(;x<Le.length&&Le[x].y>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=ms(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);Il(a,ye),E=ee}return ee=Math.max(0,ze)+ne.width,ne=it,Il(a,y),Il(a,We),Il(a,Le),Il(a,Je),ae[0]=b,ae[1]=E,new $t(ze,0,ee,ne)}if(b=9999999,!(Le===null||2>Le.length||We===null||2>We.length))for(E=x=0;x<Le.length&&E<We.length;)ee=Le[x],Tt=We[E],ue=Tt.x,ge=Tt.y,ge+=ze,Pt=ee,x+1<Le.length&&(Pt=Le[x+1]),Nt=Tt,Tt=Nt.x,Nt=Nt.y,E+1<We.length&&(Nt=We[E+1],Tt=Nt.x,Nt=Nt.y,Nt+=ze),At=b,ee.x===ue?At=ge-ee.y:ee.x>ue&&ee.x<Tt?At=ge+(ee.x-ue)/(Tt-ue)*(Nt-ge)-ee.y:ue>ee.x&&ue<Pt.x&&(At=ge-(ee.y+(ue-ee.x)/(Pt.x-ee.x)*(Pt.y-ee.y))),At<b&&(b=At),Pt.x<=ee.x?x++:Tt<=ue?E++:(Pt.x<=Tt&&x++,Tt<=Pt.x&&E++);if(ze-=b,ze+=ye,x=We,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=ee=ue=0;ee<x.length&&x[ee].x<y[0].x;)ge=x[ee++],ye[b++].h(ge.x,ge.y+E);for(;ue<y.length;)ge=y[ue++],ye[b++].h(ge.x,ge.y);for(ue=y[y.length-1].x;ee<x.length&&x[ee].x<=ue;)ee++;for(;ee<x.length&&x[ee].x>ue;)ge=x[ee++],ye[b++].h(ge.x,ge.y+E);for(x=ms(a,b),ue=0;ue<b;ue++)x[ue].assign(ye[ue]);Il(a,ye),b=x}if(ee=Je,ue=ze,Le===null||2>Le.length||ee===null||2>ee.length)E=null;else{for(ye=ms(a,Le.length+ee.length),E=ge=x=0;x<Le.length&&Le[x].x<ee[0].x;)Pt=Le[x++],ye[E++].h(Pt.x,Pt.y);for(;ge<ee.length;)Pt=ee[ge++],ye[E++].h(Pt.x,Pt.y+ue);for(ee=ee[ee.length-1].x;x<Le.length&&Le[x].x<=ee;)x++;for(;x<Le.length&&Le[x].x>ee;)ue=Le[x++],ye[E++].h(ue.x,ue.y);for(ee=ms(a,E),x=0;x<E;x++)ee[x].assign(ye[x]);Il(a,ye),E=ee}return ee=it,ne=Math.max(0,ze)+ne.height,Il(a,y),Il(a,We),Il(a,Le),Il(a,Je),ae[0]=b,ae[1]=E,new $t(ze,0,ee,ne)}function ms(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 lt;return a}function Il(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}ti.prototype.arrangeTrees=function(){if(this.Rb===Iv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof cl){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof cl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Lg:a.sort(this.comparer),a.reverse();break;default:jt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case Bv:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:jt("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,ee=0;ee<E;ee++){var ne=y[ee];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}ti.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},ti.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},ti.prototype.Gu=function(){if(this.layerStyle===Rv){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var ee=y[E.level];ee===void 0?ee=this.computeLayerSpacing(E):ee=Math.max(ee,this.computeLayerSpacing(E)),y[E.level]=ee}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new lt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new lt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,ee=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)ee+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var ae=a[ne]+y[ne];this.angle===270?(ee-=ae,E.push(new $t(0,ee,x,ae))):this.angle===90?(E.push(new $t(0,ee,x,ae)),ee+=ae):this.angle===180?(ee-=ae,E.push(new $t(ee,0,ae,x))):(E.push(new $t(ee,0,ae,x)),ee+=ae)}this.commitLayers(E,b)}},ti.prototype.commitLayers=function(){},ti.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ti.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof cl&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}ti.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===wu,b=El(a);switch(b){case 0:var E=na;break;case 90:E=sa;break;case 180:E=Oa;break;default:E=ja}var ee=a.children,ne=ee.length;switch(y){case Lh:case Cu:for(y=0;y<ne;y++){var ae=ee[y];if(ae=(x?ae.sourceEdges:ae.destinationEdges).first(),ae!==null&&(ae=ae.link,ae!==null)){var ue=b===90||b===270?Oa:ja;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:ue=Oa;break;case 90:ue=ja;break;case 180:ue=na;break;default:ue=sa}else y%2===0&&(ue=b===90||b===270?na:sa);x?(a.setsPortSpot&&(ae.fromSpot=E),a.setsChildPortSpot&&(ae.toSpot=ue)):(a.setsPortSpot&&(ae.fromSpot=ue),a.setsChildPortSpot&&(ae.toSpot=E))}}break;case Mh:for(b=b===90||b===270?na:sa,ee=x?a.destinationEdges:a.sourceEdges;ee.next();)ne=ee.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case Xu:for(b=b===90||b===270?Oa:ja,ee=x?a.destinationEdges:a.sourceEdges;ee.next();)ne=ee.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=El(a),this.ud===wu){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=na;break;case 90:b.fromSpot=sa;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=ja}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=ja;break;case 180:b.toSpot=na;break;default:b.toSpot=sa}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=na;break;case 90:b.toSpot=sa;break;case 180:b.toSpot=Oa;break;default:b.toSpot=ja}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=ja;break;case 180:b.fromSpot=na;break;default:b.fromSpot=sa}else b.fromSpot=a.childPortSpot}};function El(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}ti.prototype.computeLayerSpacing=function(a){var y=El(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},ti.prototype.computeNodeIndent=function(a){var y=El(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},zt.Object.defineProperties(ti.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!==Dv&&a!==Dy&&a!==Fy&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==Rv||(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!==Bv&&a!==Iy&&a!==Iv||(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!==Yd&&a!==kg&&a!==Tg&&!Lg||(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()):jt("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!==Fv&&a!==Mg||(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!==Yd&&a!==kg&&a!==Tg&&!Lg||(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!==Fv&&a!==Mg||(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 Ov=new hn(ti,"PathDefault",-1),wu=new hn(ti,"PathDestination",0),Hf=new hn(ti,"PathSource",1),Yd=new hn(ti,"SortingForwards",10),kg=new hn(ti,"SortingReverse",11),Tg=new hn(ti,"SortingAscending",12),Lg=new hn(ti,"SortingDescending",13),Jd=new hn(ti,"AlignmentCenterSubtrees",20),Wf=new hn(ti,"AlignmentCenterChildren",21),bu=new hn(ti,"AlignmentStart",22),Pu=new hn(ti,"AlignmentEnd",23),Lh=new hn(ti,"AlignmentBus",24),Cu=new hn(ti,"AlignmentBusBranching",25),Mh=new hn(ti,"AlignmentTopLeftBus",26),Xu=new hn(ti,"AlignmentBottomRightBus",27),Fv=new hn(ti,"CompactionNone",30),Mg=new hn(ti,"CompactionBlock",31),Dv=new hn(ti,"StyleLayered",40),Fy=new hn(ti,"StyleLastParents",41),Dy=new hn(ti,"StyleAlternating",42),By=new hn(ti,"StyleRootOnly",43),Bv=new hn(ti,"ArrangementVertical",50),Iy=new hn(ti,"ArrangementHorizontal",51),Iv=new hn(ti,"ArrangementFixedRoots",52),Ry=new hn(ti,"LayerIndividual",60),_y=new hn(ti,"LayerSiblings",61),Rv=new hn(ti,"LayerUniform",62);ti.className="TreeLayout",ti.PathDefault=Ov,ti.PathDestination=wu,ti.PathSource=Hf,ti.SortingForwards=Yd,ti.SortingReverse=kg,ti.SortingAscending=Tg,ti.SortingDescending=Lg,ti.AlignmentCenterSubtrees=Jd,ti.AlignmentCenterChildren=Wf,ti.AlignmentStart=bu,ti.AlignmentEnd=Pu,ti.AlignmentBus=Lh,ti.AlignmentBusBranching=Cu,ti.AlignmentTopLeftBus=Mh,ti.AlignmentBottomRightBus=Xu,ti.CompactionNone=Fv,ti.CompactionBlock=Mg,ti.StyleLayered=Dv,ti.StyleLastParents=Fy,ti.StyleAlternating=Dy,ti.StyleRootOnly=By,ti.ArrangementVertical=Bv,ti.ArrangementHorizontal=Iy,ti.ArrangementFixedRoots=Iv,ti.LayerIndividual=Ry,ti.LayerSiblings=_y,ti.LayerUniform=Rv;function Kf(a){Xi.call(this,a)}Kt(Kf,Xi),Kf.prototype.createVertex=function(){return new cl(this)},Kf.prototype.createEdge=function(){return new Qd(this)},Kf.className="TreeNetwork";function cl(a){Uo.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 lt(0,0),this.Da=new mn(0,0),this.la=new lt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Wf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Mg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Vo,this.wr=!0,this.Dp=Vo}Kt(cl,Uo),cl.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)},zt.Object.defineProperties(cl.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)}}}),cl.className="TreeVertex";function Qd(a){Es.call(this,a),this.$t=new lt(0,0)}Kt(Qd,Es),Qd.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case wu:x=this.fromVertex,b=this.toVertex;break;case Hf:x=this.toVertex,b=this.fromVertex;break;default:jt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var ee=El(x),ne=y.computeLayerSpacing(x),ae=x.rowSpacing;a.vg();var ue=a.curve===Rs,ge=a.isOrthogonal,ye;if(a.uh(),ge||ue){for(ye=2;4<a.pointsCount;)a.pv(2);var Le=a.i(1),ze=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Le=a.i(0),ze=a.i(a.pointsCount-1)}var We=a.i(a.pointsCount-1);ee===0?(x.alignment===Pu?(ee=b.bottom+E.y,E.y===0&&Le.y>We.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.top+E.y,E.y===0&&Le.y<We.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.right+ne,ee),ye++,a.m(ye,b.right+ne+(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+2*(E.x-ae)/3,ee),ye++,a.m(ye,b.right+ne+(E.x-ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.right+ne/2,Le.y),ye++),a.m(ye,b.right+ne/2,ee),ye++,a.m(ye,b.right+ne+E.x-(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===90?(x.alignment===Pu?(ee=b.right+E.x,E.x===0&&Le.x>We.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.left+E.x,E.x===0&&Le.x<We.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.bottom+ne),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+2*(E.y-ae)/3),ye++,a.m(ye,ee,b.bottom+ne+(E.y-ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.bottom+ne/2),ye++),a.m(ye,ee,b.bottom+ne/2),ye++,a.m(ye,ee,b.bottom+ne+E.y-(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):ee===180?(x.alignment===Pu?(ee=b.bottom+E.y,E.y===0&&Le.y>We.y+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.y,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.top+E.y,E.y===0&&Le.y<We.y-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.y,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ue?(a.m(ye,Le.x,ee),ye++,a.m(ye,b.left-ne,ee),ye++,a.m(ye,b.left-ne+(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+2*(E.x+ae)/3,ee),ye++,a.m(ye,b.left-ne+(E.x+ae),ee),ye++,a.m(ye,ze.x,ee)):(ge&&(a.m(ye,b.left-ne/2,Le.y),ye++),a.m(ye,b.left-ne/2,ee),ye++,a.m(ye,b.left-ne+E.x+(ge?ae/2:ae),ee),ye++,ge&&a.m(ye,a.i(ye-1).x,ze.y))):ee===270?(x.alignment===Pu?(ee=b.right+E.x,E.x===0&&Le.x>We.x+x.rowIndent&&(ee=Math.min(ee,Math.max(Le.x,ee-y.computeNodeIndent(x))))):x.alignment===bu?(ee=b.left+E.x,E.x===0&&Le.x<We.x-x.rowIndent&&(ee=Math.max(ee,Math.min(Le.x,ee+y.computeNodeIndent(x))))):ee=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ue?(a.m(ye,ee,Le.y),ye++,a.m(ye,ee,b.top-ne),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+2*(E.y+ae)/3),ye++,a.m(ye,ee,b.top-ne+(E.y+ae)),ye++,a.m(ye,ee,ze.y)):(ge&&(a.m(ye,Le.x,b.top-ne/2),ye++),a.m(ye,ee,b.top-ne/2),ye++,a.m(ye,ee,b.top-ne+E.y+(ge?ae/2:ae)),ye++,ge&&a.m(ye,ze.x,a.i(ye-1).y))):jt("Invalid angle "+ee),a.zf()}else E=b,a=this.link,b=this.network.layout,y=El(x),y!==El(E)&&(ne=b.computeLayerSpacing(x),ae=x.bounds,x=E.bounds,y===0&&x.left-ae.right<ne+1||y===90&&x.top-ae.bottom<ne+1||y===180&&ae.left-x.right<ne+1||y===270&&ae.top-x.bottom<ne+1||(a.vg(),x=a.curve===Rs,E=a.isOrthogonal,b=gc(this.fromVertex.alignment),a.uh(),y===0?(y=ae.right+ne/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)):E?b?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=ae.bottom+ne/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)):E?b?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=ae.left-ne/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)):E?b?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=ae.top-ne/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)):E?b?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()))}}},zt.Object.defineProperties(Qd.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)}}}),Qd.className="TreeEdge",Ji.prototype.initializeStandardTools=function(){this.gb("Action",new il,this.mouseDownTools),this.gb("Relinking",new Os,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Ka,this.mouseDownTools),this.gb("Resizing",new Ca,this.mouseDownTools),this.gb("Linking",new Wa,this.mouseMoveTools),this.gb("Dragging",new lo,this.mouseMoveTools),this.gb("DragSelecting",new Hs,this.mouseMoveTools),this.gb("Panning",new ya,this.mouseMoveTools),this.gb("ContextMenu",new Va,this.mouseUpTools),this.gb("TextEditing",new Qi,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},$l("Horizontal",new dm),$l("Spot",new gm),$l("Table",new vm),$l("Viewbox",new xm),$l("TableRow",new ym),$l("TableColumn",new Sm),$l("Graduated",new Kp),$l("Grid",new Wp),xd.add("GraphLinksModel",ea),xd.add("TreeModel",Qs);var _v=vn.go,zy={get licenseKey(){return Yt.licenseKey},set licenseKey(a){Yt.licenseKey=a},get version(){return Yt.version},Group:Ir,EnumValue:hn,List:rn,Set:an,Map:tn,Point:lt,Size:mn,Rect:$t,Margin:Ur,Spot:Ln,Geometry:Tn,PathFigure:Oo,PathSegment:gi,InputEvent:va,DiagramEvent:au,ChangedEvent:oo,Model:fr,GraphLinksModel:si,TreeModel:es,Binding:Lo,Transaction:zo,UndoManager:ho,CommandHandler:kt,Tool:fi,DraggingTool:lo,DraggingInfo:Uu,DraggingOptions:he,LinkingBaseTool:So,LinkingTool:Wa,RelinkingTool:Os,LinkReshapingTool:ko,ResizingTool:Ca,RotatingTool:Ka,ClickSelectingTool:Uh,ActionTool:il,ClickCreatingTool:uh,HTMLInfo:Zl,ContextMenuTool:Va,DragSelectingTool:Hs,PanningTool:ya,TextEditingTool:Qi,ToolManager:Ji,Animation:Sa,AnimationManager:bs,AnimationTrigger:vl,Layer:ra,Diagram:Yt,Palette:Ce,Overview:Oe,Brush:Ai,GraphObject:_t,Panel:wn,RowColumnDefinition:Io,Shape:Hr,TextBlock:Zi,Picture:hs,Part:Sr,Adornment:mi,Node:Un,Link:En,Placeholder:Ja,Layout:so,LayoutNetwork:Xi,LayoutVertex:Uo,LayoutEdge:Es,GridLayout:fa,PanelLayout:Go,CircularLayout:po,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:Sv,ForceDirectedLayout:wa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Oi,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:el,LayeredDigraphEdge:Cg,TreeLayout:ti,TreeNetwork:Kf,TreeVertex:cl,TreeEdge:Qd};typeof _v=="object"&&_v.version&&Yn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Yt.prototype.go=zy,vn.go=zy,typeof Rn.exports=="object"&&(Rn.exports=typeof pt.g!="undefined"?pt.g.go:self.go)}();var st=typeof pt.g!="undefined"?pt.g.go:self.go;const Ut=typeof pt.g!="undefined"?pt.g.go:self.go,oe=Ut.Group,Ue=Ut.EnumValue,_e=Ut.List,de=Ut.Set,ve=Ut.Map,Ee=Ut.Point,ke=Ut.Size,Se=Ut.Rect,Ae=Ut.Margin,me=Ut.Spot,Pe=Ut.Geometry,fe=Ut.PathFigure,z=Ut.PathSegment,te=Ut.InputEvent,se=Ut.DiagramEvent,ie=Ut.ChangedEvent,le=Ut.Model,ce=Ut.GraphLinksModel,pe=Ut.TreeModel,xe=Ut.Binding,je=Ut.Transaction,De=Ut.UndoManager,Fe=Ut.CommandHandler,Te=Ut.Tool,Me=Ut.DraggingTool,Be=Ut.DraggingInfo,Ge=Ut.LinkingBaseTool,Ye=Ut.LinkingTool,Ke=Ut.RelinkingTool,Ve=Ut.LinkReshapingTool,ot=Ut.ResizingTool,ut=Ut.RotatingTool,ft=Ut.ClickSelectingTool,St=Ut.ActionTool,Qe=Ut.ClickCreatingTool,rt=Ut.HTMLInfo,wt=Ut.ContextMenuTool,Ct=Ut.DragSelectingTool,bt=Ut.PanningTool,ct=Ut.TextEditingTool,xt=Ut.ToolManager,dt=Ut.Animation,Mt=Ut.AnimationManager,yt=Ut.AnimationTrigger,Ft=Ut.Layer,mt=Ut.Diagram,vt=Ut.Palette,tt=Ut.Overview,He=Ut.Brush,we=Ut.GraphObject,Ne=Ut.Panel,Xe=Ut.RowColumnDefinition,nt=Ut.Shape,Ie=Ut.TextBlock,Re=Ut.TextBlockMetrics,Ze=Ut.Picture,et=Ut.Part,ht=Ut.Adornment,at=Ut.Node,Dt=Ut.Link,Et=Ut.Placeholder,Ot=Ut.Layout,qt=Ut.LayoutNetwork,Qt=Ut.LayoutVertex,Xt=Ut.LayoutEdge,Wt=Ut.GridLayout,un=Ut.PanelLayout,on=Ut.CircularLayout,cn=Ut.CircularNetwork,bn=Ut.CircularVertex,xn=Ut.CircularEdge,kn=Ut.ForceDirectedLayout,On=Ut.ForceDirectedNetwork,_r=Ut.ForceDirectedVertex,xr=Ut.ForceDirectedEdge,$r=Ut.LayeredDigraphLayout,tr=Ut.LayeredDigraphNetwork,ii=Ut.LayeredDigraphVertex,di=Ut.LayeredDigraphEdge,li=Ut.TreeLayout,Mi=Ut.TreeNetwork,yi=Ut.TreeVertex,Jr=Ut.TreeEdge,Li=Ut.version},2859:function(Rn,An,pt){"use strict";pt.d(An,{hP:function(){return tt}});var st=function(He,we){return(st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,Xe){Ne.__proto__=Xe}||function(Ne,Xe){for(var nt in Xe)Object.prototype.hasOwnProperty.call(Xe,nt)&&(Ne[nt]=Xe[nt])})(He,we)};function Ut(He,we){function Ne(){this.constructor=He}st(He,we),He.prototype=we===null?Object.create(we):(Ne.prototype=we.prototype,new Ne)}function oe(He,we,Ne,Xe){return new(Ne||(Ne=Promise))(function(nt,Ie){function Re(ht){try{et(Xe.next(ht))}catch(at){Ie(at)}}function Ze(ht){try{et(Xe.throw(ht))}catch(at){Ie(at)}}function et(ht){var at;ht.done?nt(ht.value):(at=ht.value,at instanceof Ne?at:new Ne(function(Dt){Dt(at)})).then(Re,Ze)}et((Xe=Xe.apply(He,we||[])).next())})}function Ue(He,we){var Ne,Xe,nt,Ie,Re={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return Ie={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function Ze(et){return function(ht){return function(at){if(Ne)throw new TypeError("Generator is already executing.");for(;Re;)try{if(Ne=1,Xe&&(nt=2&at[0]?Xe.return:at[0]?Xe.throw||((nt=Xe.return)&&nt.call(Xe),0):Xe.next)&&!(nt=nt.call(Xe,at[1])).done)return nt;switch(Xe=0,nt&&(at=[2&at[0],nt.value]),at[0]){case 0:case 1:nt=at;break;case 4:return Re.label++,{value:at[1],done:!1};case 5:Re.label++,Xe=at[1],at=[0];continue;case 7:at=Re.ops.pop(),Re.trys.pop();continue;default:if(nt=Re.trys,!((nt=nt.length>0&&nt[nt.length-1])||at[0]!==6&&at[0]!==2)){Re=0;continue}if(at[0]===3&&(!nt||at[1]>nt[0]&&at[1]<nt[3])){Re.label=at[1];break}if(at[0]===6&&Re.label<nt[1]){Re.label=nt[1],nt=at;break}if(nt&&Re.label<nt[2]){Re.label=nt[2],Re.ops.push(at);break}nt[2]&&Re.ops.pop(),Re.trys.pop();continue}at=we.call(He,Re)}catch(Dt){at=[6,Dt],Xe=0}finally{Ne=nt=0}if(5&at[0])throw at[1];return{value:at[0]?at[1]:void 0,done:!0}}([et,ht])}}}function _e(){for(var He=0,we=0,Ne=arguments.length;we<Ne;we++)He+=arguments[we].length;var Xe=Array(He),nt=0;for(we=0;we<Ne;we++)for(var Ie=arguments[we],Re=0,Ze=Ie.length;Re<Ze;Re++,nt++)Xe[nt]=Ie[Re];return Xe}var de=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(we,Ne){for(var Xe=0,nt=Ne;Xe<nt.length;Xe++){var Ie=nt[Xe],Re=Ie[0],Ze=Ie[1];we.setAttribute(Re,Ze)}},He.createRect=function(we,Ne,Xe){var nt=document.createElementNS("http://www.w3.org/2000/svg","rect");return nt.setAttribute("width",we.toString()),nt.setAttribute("height",Ne.toString()),Xe&&He.setAttributes(nt,Xe),nt},He.createLine=function(we,Ne,Xe,nt,Ie){var Re=document.createElementNS("http://www.w3.org/2000/svg","line");return Re.setAttribute("x1",we.toString()),Re.setAttribute("y1",Ne.toString()),Re.setAttribute("x2",Xe.toString()),Re.setAttribute("y2",nt.toString()),Ie&&He.setAttributes(Re,Ie),Re},He.createPolygon=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Xe.setAttribute("points",we),Ne&&He.setAttributes(Xe,Ne),Xe},He.createCircle=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Xe.setAttribute("cx",(we/2).toString()),Xe.setAttribute("cy",(we/2).toString()),Xe.setAttribute("r",we.toString()),Ne&&He.setAttributes(Xe,Ne),Xe},He.createEllipse=function(we,Ne,Xe){var nt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return nt.setAttribute("cx",(we/2).toString()),nt.setAttribute("cy",(Ne/2).toString()),nt.setAttribute("rx",(we/2).toString()),nt.setAttribute("ry",(Ne/2).toString()),Xe&&He.setAttributes(nt,Xe),nt},He.createGroup=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return we&&He.setAttributes(Ne,we),Ne},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(we,Ne,Xe,nt,Ie,Re,Ze){var et=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(et,[["id",we],["orient",Ne],["markerWidth",Xe.toString()],["markerHeight",nt.toString()],["refX",Ie.toString()],["refY",Re.toString()]]),et.appendChild(Ze),et},He.createText=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),we&&He.setAttributes(Ne,we),Ne},He.createTSpan=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Xe.textContent=we,Ne&&He.setAttributes(Xe,Ne),Xe},He.createImage=function(we){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return we&&He.setAttributes(Ne,we),Ne},He.createPoint=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Xe.x=we,Xe.y=Ne,Xe},He.createPath=function(we,Ne){var Xe=document.createElementNS("http://www.w3.org/2000/svg","path");return Xe.setAttribute("d",we),Ne&&He.setAttributes(Xe,Ne),Xe},He}(),ve=function(){function He(){}return He.addKey=function(we){He.key=we},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),Ee=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(we,Ne,Xe){var nt=this;return new Promise(function(Ie){var Re=Xe!==void 0?Xe:document.createElement("canvas");we===null&&(nt.markersOnly=!0,nt.naturalSize=!1);var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg");Ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ze.setAttribute("width",Ne.width.baseVal.valueAsString),Ze.setAttribute("height",Ne.height.baseVal.valueAsString),Ze.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),Ze.innerHTML=Ne.innerHTML,nt.naturalSize===!0?(Ze.width.baseVal.value=we.naturalWidth,Ze.height.baseVal.value=we.naturalHeight):nt.width!==void 0&&nt.height!==void 0&&(Ze.width.baseVal.value=nt.width,Ze.height.baseVal.value=nt.height),Re.width=Ze.width.baseVal.value,Re.height=Ze.height.baseVal.value;var et=Ze.outerHTML,ht=Re.getContext("2d");nt.markersOnly!==!0&&ht.drawImage(we,0,0,Re.width,Re.height);var at=window.URL,Dt=new Image(Re.width,Re.height);Dt.setAttribute("crossOrigin","anonymous");var Et=new Blob([et],{type:"image/svg+xml"}),Ot=at.createObjectURL(Et);Dt.onload=function(){ht.drawImage(Dt,0,0),at.revokeObjectURL(Ot);var qt=Re.toDataURL(nt.imageType,nt.imageQuality);Ie(qt)},Dt.src=Ot})},He}(),ke=function(){},Se=function(){function He(we){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+we+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.prototype.addClass=function(we){return this.styleSheet===void 0&&this.addStyleSheet(),we.name=""+this.classNamePrefix+we.localName,this.classes.push(we),this.styleSheet.sheet.insertRule("."+we.name+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length),we},He.prototype.addRule=function(we){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(we),this.styleSheet.sheet.insertRule(we.selector+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length)},He.prototype.addStyleSheet=function(){var we;this.styleSheet=document.createElement("style"),((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).appendChild(this.styleSheet),this.addRule(new Ae("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new me("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new me("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},He.prototype.removeStyleSheet=function(){var we;this.styleSheet&&(((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),Ae=function(He,we){this.selector=He,this.style=we},me=function(He,we){this.localName=He,this.style=we},Pe=function(){function He(we,Ne,Xe,nt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=we,this.displayMode=Ne,this.markerItems=Xe,this.uiStyleSettings=nt,this.styles=Ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(we){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Xe=document.createElement("div");Xe.className=this.toolbarBlockStyleClass.name,Xe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Xe),this.addActionButton(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Ie){var Re=document.createElement("div");Re.className=""+Ne.toolbarButtonStyleClass.name,Re.setAttribute("data-type-name",Ie.typeName),Re.innerHTML=Ie.icon,Re.addEventListener("click",function(){Ne.markerToolbarButtonClicked(Re,Ie)}),Ne.buttons.push(Re),Ne.markerButtons.push(Re)}),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 nt=document.createElement("div");nt.className=this.toolbarBlockStyleClass.name,nt.style.whiteSpace="nowrap",nt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(nt),this.addActionButton(nt,'<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(nt,'<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()},He.prototype.addButtonClickListener=function(we){this.buttonClickListeners.push(we)},He.prototype.removeButtonClickListener=function(we){this.buttonClickListeners.indexOf(we)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(we),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var we=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<we||Ne===we&&this.markerButtons.length-1===we?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===we&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},He.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")},He.prototype.resetButtonStyles=function(){var we=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:we.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(we,Ne,Xe){var nt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Ne,Ie.setAttribute("data-action",Xe),Ie.addEventListener("click",function(){nt.actionToolbarButtonClicked(Ie,Xe)}),Xe){case"select":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ie.style.fill=this.uiStyleSettings.closeButtonColor}we.appendChild(Ie),this.buttons.push(Ie)},He.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new me("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 me("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new me("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new me("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 me("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var we=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new me("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
|
|
padding: `+we+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new me("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},He.prototype.markerToolbarButtonClicked=function(we,Ne){this.setActiveButton(we),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(we,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.prototype.setActiveButton=function(we){this.resetButtonStyles(),we.className=we.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),we.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},He.prototype.setActiveMarkerButton=function(we){var Ne=this.markerButtons.find(function(Xe){return Xe.getAttribute("data-type-name")===we});Ne&&this.setActiveButton(Ne)},He.prototype.setCurrentMarker=function(we){var Ne=this;this.currentMarker=we,this.buttons.filter(function(Xe){return/delete|notes/.test(Xe.getAttribute("data-action"))}).forEach(function(Xe){Ne.currentMarker===void 0?(Xe.style.fillOpacity="0.4",Xe.style.pointerEvents="none"):(Xe.style.fillOpacity="1",Xe.style.pointerEvents="all")})},He}(),fe=function(){function He(we,Ne,Xe,nt){this.panels=[],this.panelButtons=[],this.markerjsContainer=we,this.displayMode=Ne,this.uiStyleSettings=Xe,this.styles=nt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.prototype.addStyles=function(){var we;this.toolboxStyleClass=this.styles.addClass(new me("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 me("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new me("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new me("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new me("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 me("toolbox-panel-row_colors",`
|
|
background-color: `+((we=this.uiStyleSettings.toolboxBackgroundColor)!==null&&we!==void 0?we:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new me("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
padding: `+Ne+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new me("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new me("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},He.prototype.show=function(we){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(we){var Ne,Xe,nt=this;this.panels=we,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Xe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xe!==void 0?Xe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ie){var Re;Ie.uiStyleSettings=nt.uiStyleSettings;var Ze=document.createElement("div");Ze.className=nt.toolboxButtonStyleClass.name+" "+((Re=nt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Re!==void 0?Re:nt.toolboxButtonStyleColorsClass.name),Ze.innerHTML=Ie.icon,Ze.title=Ie.title,Ze.addEventListener("click",function(){nt.panelButtonClick(Ie)}),nt.panelButtons.push(Ze),nt.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(we){var Ne=this,Xe=-1;if(we!==this.activePanel){Xe=this.panels.indexOf(we),this.panelRow.innerHTML="";var nt=we.getUi();nt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(nt),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=we}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ie,Re){var Ze,et;Ie.className=Ne.toolboxButtonStyleClass.name+" "+(Re===Xe?""+((Ze=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:Ne.toolboxActiveButtonStyleColorsClass.name):""+((et=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&et!==void 0?et:Ne.toolboxButtonStyleColorsClass.name))})},He}(),z=function(He,we){this.title=He,this.icon=we},te=function(He){function we(Ne,Xe,nt,Ie){var Re=He.call(this,Ne,Ie||'<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 Re.colors=[],Re.addTransparent=!1,Re.colorBoxes=[],Re.colors=Xe,Re.currentColor=nt,Re.setCurrentColor=Re.setCurrentColor.bind(Re),Re.getColorBox=Re.getColorBox.bind(Re),Re}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.whiteSpace="nowrap",this.colors.forEach(function(nt){var Ie=Ne.getColorBox(nt);Xe.appendChild(Ie),Ne.colorBoxes.push(Ie)}),Xe},we.prototype.getColorBox=function(Ne){var Xe=this,nt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-nt,Re=document.createElement("div");Re.style.display="inline-block",Re.style.boxSizing="content-box",Re.style.width=Ie-2+"px",Re.style.height=Ie-2+"px",Re.style.padding="1px",Re.style.marginRight="2px",Re.style.marginBottom="2px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderRadius=(Ie+2)/2+"px",Re.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Xe.setCurrentColor(Ne,Re)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=Ie-2+"px",Ze.style.height=Ie-2+"px",Ze.style.backgroundColor=Ne,Ze.style.borderRadius=Ie/2+"px",Ne==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.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>`),Re.appendChild(Ze),Re},we.prototype.setCurrentColor=function(Ne,Xe){var nt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},we}(z),se=function(){function He(we,Ne,Xe){this._state="new",this._isSelected=!1,this._container=we,this._overlayContainer=Ne,this.globalSettings=Xe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(we){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(we,Ne){},He.prototype.dblClick=function(we,Ne){},He.prototype.manipulate=function(we){},He.prototype.pointerUp=function(we){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(we){this.container.childNodes.length>0?this.container.insertBefore(we,this.container.childNodes[0]):this.container.appendChild(we)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(we){this._state=we.state,this.notes=we.notes},He.prototype.scale=function(we,Ne){},He.prototype.colorChanged=function(we){this.onColorChanged&&this.onColorChanged(we),this.stateChanged()},He.prototype.fillColorChanged=function(we){this.onFillColorChanged&&this.onFillColorChanged(we),this.stateChanged()},He.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var we=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),we.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(we)&&this.onStateChanged(this)}},He.typeName="MarkerBase",He}(),ie=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.prototype.findGripByVisual=function(we){return this.topLeft.ownsTarget(we)?this.topLeft:this.topCenter.ownsTarget(we)?this.topCenter:this.topRight.ownsTarget(we)?this.topRight:this.centerLeft.ownsTarget(we)?this.centerLeft:this.centerRight.ownsTarget(we)?this.centerRight:this.bottomLeft.ownsTarget(we)?this.bottomLeft:this.bottomCenter.ownsTarget(we)?this.bottomCenter:this.bottomRight.ownsTarget(we)?this.bottomRight:void 0},He}(),le=function(){function He(){this.GRIP_SIZE=10,this.visual=de.createGroup(),this.visual.appendChild(de.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(de.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return He.prototype.ownsTarget=function(we){return we===this.visual||we===this.visual.childNodes[0]||we===this.visual.childNodes[1]},He}(),ce=function(){function He(){}return He.toITransformMatrix=function(we){return{a:we.a,b:we.b,c:we.c,d:we.d,e:we.e,f:we.f}},He.toSVGMatrix=function(we,Ne){return we.a=Ne.a,we.b=Ne.b,we.c=Ne.c,we.d=Ne.d,we.e=Ne.e,we.f=Ne.f,we},He}(),pe=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.left=0,Ie.top=0,Ie.width=0,Ie.height=0,Ie.defaultSize={x:50,y:20},Ie.offsetX=0,Ie.offsetY=0,Ie.rotationAngle=0,Ie.CB_DISTANCE=10,Ie._suppressMarkerCreateEvent=!1,Ie.container.transform.baseVal.appendItem(de.createTransform()),Ie.setupControlBox(),Ie}return Ut(we,He),Object.defineProperty(we.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var Xe=de.createTransform();this._visual.transform.baseVal.appendItem(Xe)},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Ne){return!!He.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var nt=this.unrotatePoint(Ne);if(this.manipulationStartX=nt.x,this.manipulationStartY=nt.y,this.offsetX=nt.x-this.left,this.offsetY=nt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xe)){this.activeGrip=this.rotatorGrip;var Ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ie.x-this.width/2,this.top=Ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Re=this.container.transform.baseVal.getItem(0);Re.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Re,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},we.prototype.pointerUp=function(Ne){var Xe=this.state;He.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},we.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},we.prototype.manipulate=function(Ne){var Xe=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+(Xe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xe):this.state==="rotate"&&this.rotate(Ne)},we.prototype.resize=function(Ne){var Xe=this.manipulationStartLeft,nt=this.manipulationStartWidth,Ie=this.manipulationStartTop,Re=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xe=this.manipulationStartLeft+Ne.x-this.manipulationStartX,nt=this.manipulationStartWidth+this.manipulationStartLeft-Xe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:nt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Ne.y-this.manipulationStartY,Re=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Re=this.manipulationStartHeight+Ne.y-this.manipulationStartY}nt>=0?(this.left=Xe,this.width=nt):(this.left=Xe+nt,this.width=-nt),Re>=0?(this.top=Ie,this.height=Re):(this.top=Ie+Re,this.height=-Re),this.setSize()},we.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},we.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var Xe=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*Xe,this.applyRotation()}},we.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},we.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Xe=this.container.getCTM(),nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Xe)).x,y:nt.y}},we.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Xe=this.container.getCTM();Xe=Xe.inverse();var nt=de.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform(Xe)).x,y:nt.y}},we.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=de.createGroup();var Ne=de.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=de.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=de.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 ie,this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,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()},we.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()},we.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,Xe=-Ne/2,nt=Xe,Ie=(this.width+this.CB_DISTANCE)/2-Ne/2,Re=(this.height+this.CB_DISTANCE)/2-Ne/2,Ze=this.height+this.CB_DISTANCE-Ne/2,et=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,Xe,nt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,nt),this.positionGrip(this.controlGrips.topRight.visual,et,nt),this.positionGrip(this.controlGrips.centerLeft.visual,Xe,Re),this.positionGrip(this.controlGrips.centerRight.visual,et,Re),this.positionGrip(this.controlGrips.bottomLeft.visual,Xe,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,Ie,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,et,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,nt-3*this.CB_DISTANCE)},we.prototype.positionGrip=function(Ne,Xe,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate(Xe,nt),Ne.transform.baseVal.replaceItem(Ie,0)},we.prototype.hideControlBox=function(){this.controlBox.style.display="none"},we.prototype.showControlBox=function(){this.controlBox.style.display=""},we.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ce.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ce.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Xe=Ne;this.left=Xe.left,this.top=Xe.top,this.width=Xe.width,this.height=Xe.height,this.rotationAngle=Xe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ce.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xe.containerTransformMatrix))},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe);var nt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:nt.x*Ne,y:nt.y*Xe});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Ne,this.height=this.height*Xe,this.adjustControlBox()},we}(se),xe=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.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)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.setSize()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.setSize()},we.title="Rectangle marker",we}(pe),je=function(He){function we(Ne,Xe,nt,Ie){var Re=He.call(this,Ne,Ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Re.widths=[],Re.widthBoxes=[],Re.widths=Xe,Re.currentWidth=nt,Re.setCurrentWidth=Re.setCurrentWidth.bind(Re),Re}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.widths.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.flexGrow="2",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=nt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentWidth(nt,Ie)}),Xe.appendChild(Ie);var Re=document.createElement("div");Re.innerText=nt.toString(),Re.style.marginRight="5px",Ie.appendChild(Re);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var et=document.createElement("hr");et.style.minWidth="20px",et.style.border="0px",et.style.borderTop=nt+"px solid "+Ne.uiStyleSettings.toolboxColor,et.style.flexGrow="2",Ze.appendChild(et),Ie.appendChild(Ze),Ne.widthBoxes.push(Ie)}),Xe},we.prototype.setCurrentWidth=function(Ne,Xe){var nt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},we}(z),De=function(He){function we(Ne,Xe,nt,Ie){var Re=He.call(this,Ne,Ie||'<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 Re.styles=[],Re.styleBoxes=[],Re.styles=Xe,Re.currentStyle=nt,Re.setCurrentStyle=Re.setCurrentStyle.bind(Re),Re}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.styles.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Ne.styles.length-5+"%",Ie.style.borderColor=nt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentStyle(nt,Ie)}),Xe.appendChild(Ie);var Re=document.createElement("div");Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.overflow="hidden";var Ze=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(nt!==""?'stroke-dasharray="'+nt+'"':"")+` />
|
|
</svg>`;Re.innerHTML=Ze,Ie.appendChild(Re),Ne.styleBoxes.push(Ie)}),Xe},we.prototype.setCurrentStyle=function(Ne,Xe){var nt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},we}(z),Fe=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="FrameMarker",we.title="Frame marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',we}(xe),Te=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"},Me=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.x1=0,Ie.y1=0,Ie.x2=0,Ie.y2=0,Ie.defaultLength=50,Ie.manipulationStartX=0,Ie.manipulationStartY=0,Ie.manipulationStartX1=0,Ie.manipulationStartY1=0,Ie.manipulationStartX2=0,Ie.manipulationStartY2=0,Ie.setupControlBox(),Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!!He.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.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(Xe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},we.prototype.pointerUp=function(Ne){var Xe=this.state;He.prototype.pointerUp.call(this,Ne),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(Ne),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},we.prototype.adjustVisual=function(){},we.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},we.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},we.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=de.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){this.positionGrips()},we.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},we.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(de.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},we.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},we.prototype.positionGrip=function(Ne,Xe,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate(Xe,nt),Ne.transform.baseVal.replaceItem(Ie,0)},we.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Xe=Ne;this.x1=Xe.x1,this.y1=Xe.y1,this.x2=Xe.x2,this.y2=Xe.y2},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.x1=this.x1*Ne,this.y1=this.y1*Xe,this.x2=this.x2*Ne,this.y2=this.y2*Xe,this.adjustVisual(),this.adjustControlBox()},we}(se),Be=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorLine=de.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=de.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)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},we.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()),de.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Xe=Ne;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.createVisual(),this.adjustVisual()},we.typeName="LineMarker",we.title="Line marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',we}(Me),Ge=function(He){function we(Ne,Xe,nt,Ie){var Re=He.call(this,Ne,Ie||'<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 Re.fonts=[],Re.fontBoxes=[],Re.fonts=Xe,Re.currentFont=nt,Re.setCurrentFont=Re.setCurrentFont.bind(Re),Re}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.fonts.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Ne.fonts.length-5+"%",Ie.style.borderColor=nt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentFont(nt,Ie)}),Xe.appendChild(Ie);var Re=document.createElement("div");Re.style.display="flex",Re.style.minHeight="20px",Re.style.flexGrow="2",Re.style.fontFamily=nt,Re.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",Re.appendChild(Ze),Ie.appendChild(Re),Ne.fontBoxes.push(Ie)}),Xe},we.prototype.setCurrentFont=function(Ne,Xe){var nt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},we}(z),Ye=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.color="transparent",Ie.padding=5,Ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ie.text=Ie.DEFAULT_TEXT,Ie.isMoved=!1,Ie.color=nt.defaultColor,Ie.fontFamily=nt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setColor=Ie.setColor.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.renderText=Ie.renderText.bind(Ie),Ie.sizeText=Ie.sizeText.bind(Ie),Ie.textEditDivClicked=Ie.textEditDivClicked.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.setSize=Ie.setSize.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.colorPanel=new te("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){if(He.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var Xe=!1;return this.textElement.childNodes.forEach(function(nt){nt===Ne&&(Xe=!0)}),Xe},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.bgRectangle=de.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=de.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.textElement.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.renderText=function(){var Ne=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(Xe){Ne.textElement.appendChild(de.createTSpan(Xe.trim()===""?" ":Xe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},we.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),Xe=1;if(Ne.width>0&&Ne.height>0){var nt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Ie=(1*this.height-this.height*this.padding*2/100)/Ne.height;Xe=Math.min(nt,Ie)}return Xe},we.prototype.getTextPosition=function(Ne){var Xe=this.textElement.getBBox(),nt=0,Ie=0;return Xe.width>0&&Xe.height>0&&(nt=(this.width-Xe.width*Ne)/2,Ie=this.height/2-Xe.height*Ne/2),{x:nt,y:Ie}},we.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),Xe=this.getTextScale(),nt=this.getTextPosition(Xe);nt.y-=Ne.y*Xe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+nt.x+"px, "+nt.y+"px) scale("+Xe+", "+Xe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(nt.x,nt.y),this.textElement.transform.baseVal.getItem(1).setScale(Xe,Xe))},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},we.prototype.setSize=function(){He.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},we.prototype.pointerUp=function(Ne){var Xe=this.state;Xe==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Ne),this.setSize(),(Xe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.showTextEditor=function(){var Ne=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(Xe){Xe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xe=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&Xe>.9;)Xe-=.1,Ne.textEditor.style.fontSize=Math.max(Xe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xe){if(Xe.clipboardData){var nt=Xe.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(nt)),Xe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},we.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),Xe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),nt=this.textElement.getBBox(),Ie={x:nt.width*Ne,y:nt.height*Ne};Xe.x-=Ie.x/2,Xe.y-=Ie.y/2,this.textEditor.style.top=Xe.y+"px",this.textEditor.style.left=Xe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xe.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},we.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},we.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},we.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},we.prototype.dblClick=function(Ne,Xe){He.prototype.dblClick.call(this,Ne,Xe),this.showTextEditor()},we.prototype.setColor=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},we.prototype.setFont=function(Ne){this.textElement&&de.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},we.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},we.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.color=Xe.color,this.fontFamily=Xe.fontFamily,this.padding=Xe.padding,this.text=Xe.text,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.setSize(),this.sizeText(),this.positionTextEditor()},we.typeName="TextMarker",we.title="Text marker",we.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>',we}(pe),Ke=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=nt.defaultColor,Ie.lineWidth=nt.defaultStrokeWidth,Ie.pixelRatio=nt.freehandPixelRatio,Ie.setColor=Ie.setColor.bind(Ie),Ie.addCanvas=Ie.addCanvas.bind(Ie),Ie.finishCreation=Ie.finishCreation.bind(Ie),Ie.setLineWidth=Ie.setLineWidth.bind(Ie),Ie.colorPanel=new te("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.drawingImage=de.createImage(),this.visual.appendChild(this.drawingImage);var Ne=de.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},we.prototype.pointerDown=function(Ne,Xe){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(Ne.x,Ne.y),this.drawing=!0):He.prototype.pointerDown.call(this,Ne,Xe)},we.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),de.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Ne)},we.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)},we.prototype.select=function(){this.state==="creating"&&this.finishCreation(),He.prototype.select.call(this)},we.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},we.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Xe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],nt=Xe[0],Ie=Xe[1],Re=Xe[2],Ze=Xe[3],et=!1,ht=0;ht<this.canvasElement.height;ht++)for(var at=0;at<this.canvasElement.width;at++)Ne.data[ht*this.canvasElement.width*4+4*at+3]>0&&(et=!0,ht<Ie&&(Ie=ht),at<nt&&(nt=at),ht>Ze&&(Ze=ht),at>Re&&(Re=at));if(et){this.left=nt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(Re-nt)/this.pixelRatio,this.height=(Ze-Ie)/this.pixelRatio;var Dt=document.createElement("canvas");Dt.width=Re-nt,Dt.height=Ze-Ie,Dt.getContext("2d").putImageData(this.canvasContext.getImageData(nt,Ie,Re-nt,Ze-Ie),0,0),this.drawingImgUrl=Dt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},we.prototype.setDrawingImage=function(){de.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),de.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},we.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},we.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){this.createVisual(),He.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.setDrawingImage()},we.typeName="FreehandMarker",we.title="Freehand marker",we.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>',we}(pe),Ve=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,nt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ie.typeBoxes=[],Ie.currentType=Xe,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2";for(var nt=function(Ze){var et="both";switch(Ze){case 0:et="both";break;case 1:et="start";break;case 2:et="end";break;case 3:et="none"}var ht=document.createElement("div");if(ht.style.display="flex",ht.style.flexGrow="2",ht.style.alignItems="center",ht.style.justifyContent="space-between",ht.style.padding="5px",ht.style.borderWidth="2px",ht.style.borderStyle="solid",ht.style.borderColor=et===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",ht.addEventListener("click",function(){Ne.setCurrentType(et,ht)}),Xe.appendChild(ht),et==="both"||et==="start"){var at=document.createElement("div");at.style.display="flex",at.style.alignItems="center",at.style.minHeight="20px",at.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,at.style.marginLeft="5px",ht.appendChild(at)}var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.style.flexGrow="2";var Et=document.createElement("hr");if(Et.style.minWidth="20px",Et.style.border="0px",Et.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),Et.style.flexGrow="2",Dt.appendChild(Et),ht.appendChild(Dt),et==="both"||et==="end"){var Ot=document.createElement("div");Ot.style.display="flex",Ot.style.alignItems="center",Ot.style.minHeight="20px",Ot.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ot.style.marginRight="5px",ht.appendChild(Ot)}Ie.typeBoxes.push(ht)},Ie=this,Re=0;Re<4;Re++)nt(Re);return Xe},we.prototype.setCurrentType=function(Ne,Xe){var nt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},we}(z),ot=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.arrowType="end",Ie.arrowBaseHeight=10,Ie.arrowBaseWidth=10,Ie.getArrowPoints=Ie.getArrowPoints.bind(Ie),Ie.setArrowType=Ie.setArrowType.bind(Ie),Ie.arrowTypePanel=new Ve("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},we.prototype.getArrowPoints=function(Ne,Xe){var nt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Ne-nt/2+","+(Xe+Ie/2)+" "+Ne+","+(Xe-Ie/2)+" "+(Ne+nt/2)+","+(Xe+Ie/2)},we.prototype.createTips=function(){this.arrow1=de.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=de.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(de.createTransform()),this.visual.appendChild(this.arrow2)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(He.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",de.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),de.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Xe=this.arrow1.transform.baseVal.getItem(0);Xe.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xe,0);var nt=this.arrow2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(nt,0)}},we.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Xe=Ne;this.arrowType=Xe.arrowType,this.createTips(),this.adjustVisual()},we.typeName="ArrowMarker",we.title="Arrow marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',we}(Be),ut=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.fillColor=nt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new te("Color",nt.defaultColorSet,nt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Ut(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="CoverMarker",we.title="Cover marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',we}(xe),ft=function(He){function we(Ne,Xe,nt,Ie){var Re=He.call(this,Ne,Ie||'<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 Re.opacities=[],Re.opacityBoxes=[],Re.opacities=Xe,Re.currentOpacity=nt,Re.setCurrentOpacity=Re.setCurrentOpacity.bind(Re),Re}return Ut(we,He),we.prototype.getUi=function(){var Ne=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",Xe.style.justifyContent="space-between",this.opacities.forEach(function(nt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="center",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=nt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentOpacity(nt,Ie)}),Xe.appendChild(Ie);var Re=document.createElement("div");Re.innerText=100*nt+"%",Ie.appendChild(Re),Ne.opacityBoxes.push(Ie)}),Xe},we.prototype.setCurrentOpacity=function(Ne,Xe){var nt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},we}(z),St=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=nt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=nt.defaultHighlightOpacity,Ie.fillPanel=new te("Color",nt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new ft("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ut(we,He),we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="HighlightMarker",we.title="Highlight marker",we.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>',we}(ut),Qe='<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>',rt='<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>',wt=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.bgColor="transparent",Ie.tipPosition={x:0,y:0},Ie.tipBase1Position={x:0,y:0},Ie.tipBase2Position={x:0,y:0},Ie.tipMoving=!1,Ie.color=nt.defaultStrokeColor,Ie.bgColor=nt.defaultFillColor,Ie.fontFamily=nt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setBgColor=Ie.setBgColor.bind(Ie),Ie.getTipPoints=Ie.getTipPoints.bind(Ie),Ie.positionTip=Ie.positionTip.bind(Ie),Ie.setTipPoints=Ie.setTipPoints.bind(Ie),Ie.colorPanel=new te("Text color",nt.defaultColorSet,Ie.color,Qe),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new te("Fill color",nt.defaultColorSet,Ie.bgColor,rt),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.tipGrip=new le,Ie.tipGrip.visual.transform.baseVal.appendItem(de.createTransform()),Ie.controlBox.appendChild(Ie.tipGrip.visual),Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return He.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},we.prototype.createTip=function(){de.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=de.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},we.prototype.pointerDown=function(Ne,Xe){this.state==="new"&&He.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Ne,Xe)},we.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Ne);else{var Xe=this.state==="creating";He.prototype.pointerUp.call(this,Ne),this.setTipPoints(Xe),this.positionTip()}},we.prototype.manipulate=function(Ne){if(this.tipMoving){var Xe=this.unrotatePoint(Ne);this.tipPosition={x:Xe.x-this.manipulationStartLeft,y:Xe.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Ne)},we.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(de.setAttributes(this.bgRectangle,[["fill",Ne]]),de.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},we.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},we.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var Xe=Math.min(this.height/2,15),nt=this.height/5;Ne&&(this.tipPosition={x:Xe+nt/2,y:this.height+20});var Ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:0},this.tipBase2Position={x:Xe+nt,y:0}):(this.tipBase1Position={x:0,y:Xe},this.tipBase2Position={x:0,y:Xe+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-nt,y:0},this.tipBase2Position={x:this.width-Xe,y:0}):(this.tipBase1Position={x:this.width,y:Xe},this.tipBase2Position={x:this.width,y:Xe+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-nt,y:this.height},this.tipBase2Position={x:this.width-Xe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xe-nt},this.tipBase2Position={x:this.width,y:this.height-Xe}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:this.height},this.tipBase2Position={x:Xe+nt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xe},this.tipBase2Position={x:0,y:this.height-Xe-nt})},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.positionTip()},we.prototype.positionTip=function(){de.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},we.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.bgColor=Xe.bgColor,this.tipPosition=Xe.tipPosition,He.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*Xe},this.positionTip()},we.typeName="CalloutMarker",we.title="Callout marker",we.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>',we}(Ye),Ct=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.defaultFillColor,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.strokePanel=new te("Line color",_e(nt.defaultColorSet,["transparent"]),nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new te("Fill color",_e(nt.defaultColorSet,["transparent"]),Ie.fillColor,rt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new ft("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},we.prototype.createVisual=function(){this.visual=de.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)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.setSize()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},we.prototype.pointerUp=function(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&de.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&de.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&de.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&de.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.setSize()},we.typeName="EllipseMarker",we.title="Ellipse marker",we.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>',we}(pe),bt=function(He){function we(Ne,Xe,nt){return He.call(this,Ne,Xe,nt)||this}return Ut(we,He),Object.defineProperty(we.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},we.prototype.createTips=function(){this.tip1=de.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(de.createTransform()),this.visual.appendChild(this.tip1),this.tip2=de.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(de.createTransform()),this.visual.appendChild(this.tip2)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.state==="creating"&&this.createTips()},we.prototype.adjustVisual=function(){if(He.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(de.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()]]),de.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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Xe=this.tip1.transform.baseVal.getItem(0);Xe.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xe,0);var nt=this.tip2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(nt,0)}},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},we.typeName="MeasurementMarker",we.title="Measurement marker",we.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>',we}(Be),ct=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.strokePanel.colors=nt.defaultColorSet,Ie.fillColor="transparent",Ie}return Ut(we,He),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=He.prototype.getState.call(this);return Ne.typeName=we.typeName,Ne},we.typeName="EllipseFrameMarker",we.title="Ellipse frame marker",we.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>',we}(Ct),xt=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.prototype.addUndoStep=function(we){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(we)||(this.undoStack.push(we),JSON.stringify(this.lastRedoStep)!==JSON.stringify(we)&&this.redoStack.splice(0,this.redoStack.length))},He.prototype.replaceLastUndoStep=function(we){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=we)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.prototype.undo=function(){if(this.undoStack.length>1){var we=this.undoStack.pop();return we!==void 0&&this.redoStack.push(we),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),dt=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.curveX=0,Ie.curveY=0,Ie.manipulationStartCurveX=0,Ie.manipulationStartCurveY=0,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.positionGrips=Ie.positionGrips.bind(Ie),Ie.addControlGrips=Ie.addControlGrips.bind(Ie),Ie.adjustVisual=Ie.adjustVisual.bind(Ie),Ie.setupControlBox=Ie.setupControlBox.bind(Ie),Ie.resize=Ie.resize.bind(Ie),Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new te("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},we.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.selectorCurve=de.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=de.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)},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Xe)&&(this.activeGrip=this.curveGrip,this._state="resize")},we.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),de.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),de.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),de.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},we.prototype.setupControlBox=function(){He.prototype.setupControlBox.call(this),this.curveControlLine1=de.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=de.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)},we.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,He.prototype.addControlGrips.call(this)},we.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/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()))},we.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),He.prototype.manipulate.call(this,Ne)},we.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),He.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},we.prototype.scale=function(Ne,Xe){this.curveX=this.curveX*Ne,this.curveY=this.curveY*Xe,He.prototype.scale.call(this,Ne,Xe)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Ne.typeName=we.typeName,Ne},we.prototype.restoreState=function(Ne){He.prototype.restoreState.call(this,Ne);var Xe=Ne;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.curveX=Xe.curveX,this.curveY=Xe.curveY,this.createVisual(),this.adjustVisual()},we.typeName="CurveMarker",we.title="Curve marker",we.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>',we}(Me),Mt=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,Xe,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.textColor="transparent",Ie.fontSize="1rem",Ie.isMoved=!1,Ie.captionText="Caption",Ie.PADDING=5,Ie.captionBoxWidth=0,Ie.captionBoxHeight=0,Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.defaultFillColor,Ie.textColor=nt.defaultStrokeColor,Ie.fontFamily=nt.defaultFontFamily,Ie.fontSize=nt.defaultCaptionFontSize,Ie.captionText=nt.defaultCaptionText,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.sizeCaption=Ie.sizeCaption.bind(Ie),Ie.setCaptionText=Ie.setCaptionText.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.finishTextEditing=Ie.finishTextEditing.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.setTextColor=Ie.setTextColor.bind(Ie),Ie.strokePanel=new te("Line color",_e(nt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new te("Fill color",_e(nt.defaultColorSet,["transparent"]),Ie.fillColor,rt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new Ge("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new te("Text color",nt.defaultColorSet,Ie.textColor,Qe),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Ut(we,He),we.prototype.ownsTarget=function(Ne){return!(!He.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},we.prototype.createVisual=function(){this.visual=de.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=de.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=de.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=de.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()},we.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},we.prototype.pointerDown=function(Ne,Xe){He.prototype.pointerDown.call(this,Ne,Xe),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},we.prototype.manipulate=function(Ne){He.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},we.prototype.resize=function(Ne){He.prototype.resize.call(this,Ne),this.setSize()},we.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),de.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')"]]),de.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')"]])},we.prototype.showTextEditor=function(){var Ne=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(Xe){Xe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xe){Xe.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},we.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"))},we.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},we.prototype.setFont=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},we.prototype.setTextColor=function(Ne){this.captionElement&&de.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},we.prototype.setSize=function(){He.prototype.setSize.call(this),de.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},we.prototype.pointerUp=function(Ne){He.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},we.prototype.dblClick=function(Ne,Xe){He.prototype.dblClick.call(this,Ne,Xe),this.showTextEditor()},we.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&de.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},we.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&de.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},we.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&de.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Ne=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},He.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},we.prototype.restoreState=function(Ne){var Xe=Ne;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.textColor=Xe.textColor,this.fontFamily=Xe.fontFamily,this.captionText=Xe.captionText,this.fontSize=Xe.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Ne),this.setSize()},we.prototype.scale=function(Ne,Xe){He.prototype.scale.call(this,Ne,Xe),this.setSize()},we.typeName="CaptionFrameMarker",we.title="Caption frame marker",we.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>',we}(pe),yt=function(){function He(we,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=we,this.cancelable=Ne}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Ft=function(He){function we(Ne,Xe,nt){var Ie=He.call(this,Ne,!1)||this;return Ie.dataUrl=Xe,Ie.state=nt,Ie}return Ut(we,He),we}(yt),mt=function(He){function we(Ne,Xe,nt){nt===void 0&&(nt=!1);var Ie=He.call(this,Ne,nt)||this;return Ie.marker=Xe,Ie}return Ut(we,He),we}(yt),vt=function(){function He(){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 He.prototype.addEventListener=function(we,Ne){this[we].push(Ne)},He.prototype.removeEventListener=function(we,Ne){var Xe=this[we].indexOf(Ne);Xe>-1&&this[we].splice(Xe,1)},He}(),tt=function(){function He(we){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Te,this._isOpen=!1,this.undoRedoManager=new xt,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 vt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=we,this.targetRoot=document.body,this.width=we.clientWidth,this.height=we.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,ct,Ct,St,wt,bt,ut,Be,dt,Mt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,Ct,St,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ke,ot,Ye,St]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(we){var Ne=this;this._availableMarkerTypes.splice(0),we.forEach(function(Xe){if(typeof Xe=="string"){var nt=Ne.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===Xe});nt!==void 0&&Ne._availableMarkerTypes.push(nt)}else Ne._availableMarkerTypes.push(Xe)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(we){this._zoomLevel=we,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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},He.prototype.show=function(){var we=this;this.styles.styleSheetRoot===void 0&&ke.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ke.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new yt(we))})},He.prototype.render=function(){return oe(this,void 0,void 0,function(){var we;return Ue(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(we=new Ee).naturalSize=this.renderAtNaturalSize,we.imageType=this.renderImageType,we.imageQuality=this.renderImageQuality,we.markersOnly=this.renderMarkersOnly,we.width=this.renderWidth,we.height=this.renderHeight,[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},He.prototype.close=function(we){var Ne=this;if(we===void 0&&(we=!1),this.isOpen){var Xe=!1;we||this.eventListeners.beforeclose.forEach(function(nt){var Ie=new yt(Ne,!0);nt(Ie),Ie.defaultPrevented&&(Xe=!0)}),Xe||(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(nt){return nt(new yt(Ne))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var we,Ne=[],Xe=0;Xe<arguments.length;Xe++)Ne[Xe]=arguments[Xe];(we=this._availableMarkerTypes).push.apply(we,Ne)},He.prototype.addRenderEventListener=function(we){this.addEventListener("render",function(Ne){we(Ne.dataUrl,Ne.state)})},He.prototype.removeRenderEventListener=function(we){},He.prototype.addCloseEventListener=function(we){this.addEventListener("close",function(){we()})},He.prototype.removeCloseEventListener=function(we){},He.prototype.setupResizeObserver=function(){var we=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){we.resize(we.target.clientWidth,we.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return we.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},He.prototype.onPopupTargetResize=function(){var we=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/we>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*we:this.editorCanvas.clientWidth,Xe=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/we;this.resize(Ne,Xe)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(we,Ne){this._isResizing=!0;var Xe=we/this.imageWidth,nt=Ne/this.imageHeight;this.imageWidth=Math.round(we),this.imageHeight=Math.round(Ne),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(Xe,nt),this._isResizing=!1},He.prototype.scaleMarkers=function(we,Ne){var Xe,nt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(we,Ne):(Xe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==nt._currentMarker&&Ie.scale(we,Ne)}),Xe!==void 0&&this.setCurrentMarker(Xe)},He.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"},He.prototype.setTopLeft=function(){var we=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=we.left-Ne.left,this.top=we.top-Ne.top},He.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)},He.prototype.addDefs=function(){for(var we,Ne=[],Xe=0;Xe<arguments.length;Xe++)Ne[Xe]=arguments[Xe];this.defs=de.createDefs(),this.addDefsToImage(),(we=this.defs).append.apply(we,Ne)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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 we=document.createElement("a");we.href="https://markerjs.com/",we.target="_blank",we.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>',we.title="Powered by marker.js",we.style.display="grid",we.style.alignItems="center",we.style.justifyItems="center",we.style.padding="3px",we.style.width="20px",we.style.height="20px",this.logoUI.appendChild(we),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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 we=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=we+"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 Pe(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 fe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(we){this.markerImage.removeChild(we.container),this.markers.indexOf(we)>-1&&this.markers.splice(this.markers.indexOf(we),1),we.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(we,Ne){if(we==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(we==="action")switch(Ne){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()}},He.prototype.deleteSelectedMarker=function(){var we=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(nt){var Ie=new mt(we,we._currentMarker,!0);nt(Ie),Ie.defaultPrevented&&(Ne=!0)}),!Ne){var Xe=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(nt){return nt(new mt(we,Xe))})}}},He.prototype.clear=function(){var we=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Re){var Ze=new mt(we,void 0,!0);Re(Ze),Ze.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var Xe=function(Re){var Ze=nt.markers[Re];nt.setCurrentMarker(nt.markers[Re]),nt._currentMarker.dispose(),nt.markerImage.removeChild(nt._currentMarker.container),nt.markers.splice(nt.markers.indexOf(nt._currentMarker),1),nt.eventListeners.markerdelete.forEach(function(et){return et(new mt(we,Ze))})},nt=this,Ie=this.markers.length-1;Ie>=0;Ie--)Xe(Ie);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.prototype.showNotesEditor=function(){var we;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=(we=this._currentMarker.notes)!==null&&we!==void 0?we:"",this.overlayContainer.appendChild(this.notesArea))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var we=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),Xe=this.undoRedoManager.getLastUndoStep();if(!Xe||Xe.width===Ne.width&&Xe.height===Ne.height){var nt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),nt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(we))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(we))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var we=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new yt(we))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var we=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new yt(we))}))},He.prototype.stepZoom=function(){var we=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=we<this.zoomSteps.length-1?this.zoomSteps[we+1]:this.zoomSteps[0]},He.prototype.panTo=function(we){this.contentDiv.scrollBy({left:this.prevPanPoint.x-we.x,top:this.prevPanPoint.y-we.y}),this.prevPanPoint=we},He.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var we,Ne,Xe=this;return Ue(this,function(nt){switch(nt.label){case 0:return[4,this.render()];case 1:return we=nt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new Ft(Xe,we,Ne))}),this.close(!0),[2]}})})},He.prototype.getState=function(we){we===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Xe){return Ne.markers.push(Xe.getState())}),Ne},He.prototype.restoreState=function(we){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);we.markers.forEach(function(Xe){var nt=Ne._availableMarkerTypes.find(function(Re){return Re.typeName===Xe.typeName});if(nt!==void 0){var Ie=Ne.addNewMarker(nt);Ie.restoreState(Xe),Ne.markers.push(Ie)}}),we.width&&we.height&&(we.width!==this.imageWidth||we.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/we.width,this.imageHeight/we.height),this.eventListeners.restorestate.forEach(function(Xe){return Xe(new yt(Ne))})},He.prototype.addNewMarker=function(we){var Ne=de.createGroup();return this.markerImage.appendChild(Ne),new we(Ne,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(we){var Ne,Xe=this;(Ne=typeof we=="string"?this._availableMarkerTypes.find(function(nt){return nt.typeName===we}):we)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),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(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(nt){return nt(new mt(Xe,Xe._currentMarker))}))},He.prototype.markerCreated=function(we){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(we),this.setCurrentMarker(we),we instanceof Ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Xe){return Xe(new mt(Ne,Ne._currentMarker))})},He.prototype.colorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=we,this.settings.defaultStrokeColor=we)},He.prototype.fillColorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=we)},He.prototype.markerStateChanged=function(we){var Ne=this;this.eventListeners.markerchange.forEach(function(Xe){return Xe(new mt(Ne,we))})},He.prototype.setCurrentMarker=function(we){var Ne=this;this._currentMarker!==we&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Xe){return Xe(new mt(Ne,Ne._currentMarker))})),this._currentMarker=we,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(Xe){return Xe(new mt(Ne,Ne._currentMarker))}))},He.prototype.onPointerDown=function(we){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||we.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function(Xe){return Xe.ownsTarget(we.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:we.clientX,y:we.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY))},He.prototype.onDblClick=function(we){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function(Xe){return Xe.ownsTarget(we.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target):this.setCurrentMarker()}},He.prototype.onPointerMove=function(we){this.touchPoints!==1&&we.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||we.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(we.clientX,we.clientY)):this.zoomLevel>1&&this.panTo({x:we.clientX,y:we.clientY}))},He.prototype.onPointerUp=function(we){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(we.clientX,we.clientY)),this.isDragging=!1,this.addUndoStep()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(we){this._currentMarker===void 0||this.notesArea!==void 0||we.key!=="Delete"&&we.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(we,Ne){var Xe=this.markerImage.getBoundingClientRect();return{x:(we-Xe.left)/this.zoomLevel,y:(Ne-Xe.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var we=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=we+"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()},He.prototype.addLicenseKey=function(we){ve.addKey(we)},He.prototype.addEventListener=function(we,Ne){this.eventListeners.addEventListener(we,Ne)},He.prototype.removeEventListener=function(we,Ne){this.eventListeners.removeEventListener(we,Ne)},He.prototype.renderState=function(we){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(we),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.prototype.focus=function(){var we=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new yt(we))}))},He.prototype.blur=function(){var we=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new yt(we))}))},He.instanceCounter=0,He}()},23425:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return De}});var st=pt(49618),Ut=pt(72308),oe=pt(62853),Ue=pt(77321),_e=pt(52487),de=pt(92310),ve=pt.n(de),Ee=pt(18929),ke=pt(10228),Se=pt(26112),Ae=pt(48736),me=pt(59301),Pe=pt(17119),fe=[10,20,50,100],z=function(Te){var Me=Te.pageSizeOptions,Be=Me===void 0?fe:Me,Ge=Te.locale,Ye=Te.changeSize,Ke=Te.pageSize,Ve=Te.goButton,ot=Te.quickGo,ut=Te.rootPrefixCls,ft=Te.disabled,St=Te.buildOptionText,Qe=Te.showSizeChanger,rt=Te.sizeChangerRender,wt=me.useState(""),Ct=(0,_e.Z)(wt,2),bt=Ct[0],ct=Ct[1],xt=function(){return!bt||Number.isNaN(bt)?void 0:Number(bt)},dt=typeof St=="function"?St:function(Ne){return"".concat(Ne," ").concat(Ge.items_per_page)},Mt=function(Xe){ct(Xe.target.value)},yt=function(Xe){Ve||bt===""||(ct(""),!(Xe.relatedTarget&&(Xe.relatedTarget.className.indexOf("".concat(ut,"-item-link"))>=0||Xe.relatedTarget.className.indexOf("".concat(ut,"-item"))>=0))&&(ot==null||ot(xt())))},Ft=function(Xe){bt!==""&&(Xe.keyCode===ke.Z.ENTER||Xe.type==="click")&&(ct(""),ot==null||ot(xt()))},mt=function(){return Be.some(function(Xe){return Xe.toString()===Ke.toString()})?Be:Be.concat([Ke]).sort(function(Xe,nt){var Ie=Number.isNaN(Number(Xe))?0:Number(Xe),Re=Number.isNaN(Number(nt))?0:Number(nt);return Ie-Re})},vt="".concat(ut,"-options");if(!Qe&&!ot)return null;var tt=null,He=null,we=null;return Qe&&rt&&(tt=rt({disabled:ft,size:Ke,onSizeChange:function(Xe){Ye==null||Ye(Number(Xe))},"aria-label":Ge.page_size,className:"".concat(vt,"-size-changer"),options:mt().map(function(Ne){return{label:dt(Ne),value:Ne}})})),ot&&(Ve&&(we=typeof Ve=="boolean"?me.createElement("button",{type:"button",onClick:Ft,onKeyUp:Ft,disabled:ft,className:"".concat(vt,"-quick-jumper-button")},Ge.jump_to_confirm):me.createElement("span",{onClick:Ft,onKeyUp:Ft},Ve)),He=me.createElement("div",{className:"".concat(vt,"-quick-jumper")},Ge.jump_to,me.createElement("input",{disabled:ft,type:"text",value:bt,onChange:Mt,onKeyUp:Ft,onBlur:yt,"aria-label":Ge.page}),Ge.page,we)),me.createElement("li",{className:vt},tt,He)},te=z,se=function(Te){var Me=Te.rootPrefixCls,Be=Te.page,Ge=Te.active,Ye=Te.className,Ke=Te.showTitle,Ve=Te.onClick,ot=Te.onKeyPress,ut=Te.itemRender,ft="".concat(Me,"-item"),St=ve()(ft,"".concat(ft,"-").concat(Be),(0,st.Z)((0,st.Z)({},"".concat(ft,"-active"),Ge),"".concat(ft,"-disabled"),!Be),Ye),Qe=function(){Ve(Be)},rt=function(bt){ot(bt,Ve,Be)},wt=ut(Be,"page",me.createElement("a",{rel:"nofollow"},Be));return wt?me.createElement("li",{title:Ke?String(Be):null,className:St,onClick:Qe,onKeyDown:rt,tabIndex:0},wt):null},ie=se,le=function(Te,Me,Be){return Be};function ce(){}function pe(Fe){var Te=Number(Fe);return typeof Te=="number"&&!Number.isNaN(Te)&&isFinite(Te)&&Math.floor(Te)===Te}function xe(Fe,Te,Me){var Be=typeof Fe=="undefined"?Te:Fe;return Math.floor((Me-1)/Be)+1}var je=function(Te){var Me=Te.prefixCls,Be=Me===void 0?"rc-pagination":Me,Ge=Te.selectPrefixCls,Ye=Ge===void 0?"rc-select":Ge,Ke=Te.className,Ve=Te.current,ot=Te.defaultCurrent,ut=ot===void 0?1:ot,ft=Te.total,St=ft===void 0?0:ft,Qe=Te.pageSize,rt=Te.defaultPageSize,wt=rt===void 0?10:rt,Ct=Te.onChange,bt=Ct===void 0?ce:Ct,ct=Te.hideOnSinglePage,xt=Te.align,dt=Te.showPrevNextJumpers,Mt=dt===void 0?!0:dt,yt=Te.showQuickJumper,Ft=Te.showLessItems,mt=Te.showTitle,vt=mt===void 0?!0:mt,tt=Te.onShowSizeChange,He=tt===void 0?ce:tt,we=Te.locale,Ne=we===void 0?Pe.Z:we,Xe=Te.style,nt=Te.totalBoundaryShowSizeChanger,Ie=nt===void 0?50:nt,Re=Te.disabled,Ze=Te.simple,et=Te.showTotal,ht=Te.showSizeChanger,at=ht===void 0?St>Ie:ht,Dt=Te.sizeChangerRender,Et=Te.pageSizeOptions,Ot=Te.itemRender,qt=Ot===void 0?le:Ot,Qt=Te.jumpPrevIcon,Xt=Te.jumpNextIcon,Wt=Te.prevIcon,un=Te.nextIcon,on=me.useRef(null),cn=(0,Ee.Z)(10,{value:Qe,defaultValue:wt}),bn=(0,_e.Z)(cn,2),xn=bn[0],kn=bn[1],On=(0,Ee.Z)(1,{value:Ve,defaultValue:ut,postState:function(Cr){return Math.max(1,Math.min(Cr,xe(void 0,xn,St)))}}),_r=(0,_e.Z)(On,2),xr=_r[0],$r=_r[1],tr=me.useState(xr),ii=(0,_e.Z)(tr,2),di=ii[0],li=ii[1];(0,me.useEffect)(function(){li(xr)},[xr]);var Mi=bt!==ce,yi="current"in Te,Jr=Math.max(1,xr-(Ft?3:5)),Li=Math.min(xe(void 0,xn,St),xr+(Ft?3:5));function qe(cr,Cr){var Gr=cr||me.createElement("button",{type:"button","aria-label":Cr,className:"".concat(Be,"-item-link")});return typeof cr=="function"&&(Gr=me.createElement(cr,(0,Ue.Z)({},Te))),Gr}function Mr(cr){var Cr=cr.target.value,Gr=xe(void 0,xn,St),Ri;return Cr===""?Ri=Cr:Number.isNaN(Number(Cr))?Ri=di:Cr>=Gr?Ri=Gr:Ri=Number(Cr),Ri}function Lr(cr){return pe(cr)&&cr!==xr&&pe(St)&&St>0}var br=St>xn?yt:!1;function Pr(cr){(cr.keyCode===ke.Z.UP||cr.keyCode===ke.Z.DOWN)&&cr.preventDefault()}function kr(cr){var Cr=Mr(cr);switch(Cr!==di&&li(Cr),cr.keyCode){case ke.Z.ENTER:nr(Cr);break;case ke.Z.UP:nr(Cr-1);break;case ke.Z.DOWN:nr(Cr+1);break;default:break}}function Hi(cr){nr(Mr(cr))}function gr(cr){var Cr=xe(cr,xn,St),Gr=xr>Cr&&Cr!==0?Cr:xr;kn(cr),li(Gr),He==null||He(xr,cr),$r(Gr),bt==null||bt(Gr,cr)}function nr(cr){if(Lr(cr)&&!Re){var Cr=xe(void 0,xn,St),Gr=cr;return cr>Cr?Gr=Cr:cr<1&&(Gr=1),Gr!==di&&li(Gr),$r(Gr),bt==null||bt(Gr,xn),Gr}return xr}var Vt=xr>1,Kt=xr<xe(void 0,xn,St);function zt(){Vt&&nr(xr-1)}function Mn(){Kt&&nr(xr+1)}function Vn(){nr(Jr)}function vr(){nr(Li)}function vn(cr,Cr){if(cr.key==="Enter"||cr.charCode===ke.Z.ENTER||cr.keyCode===ke.Z.ENTER){for(var Gr=arguments.length,Ri=new Array(Gr>2?Gr-2:0),Fi=2;Fi<Gr;Fi++)Ri[Fi-2]=arguments[Fi];Cr.apply(void 0,Ri)}}function Wn(cr){vn(cr,zt)}function Ht(cr){vn(cr,Mn)}function Jt(cr){vn(cr,Vn)}function Xn(cr){vn(cr,vr)}function jt(cr){var Cr=qt(cr,"prev",qe(Wt,"prev page"));return me.isValidElement(Cr)?me.cloneElement(Cr,{disabled:!Vt}):Cr}function ln(cr){var Cr=qt(cr,"next",qe(un,"next page"));return me.isValidElement(Cr)?me.cloneElement(Cr,{disabled:!Kt}):Cr}function Nn(cr){(cr.type==="click"||cr.keyCode===ke.Z.ENTER)&&nr(di)}var Yn=null,sn=(0,Se.Z)(Te,{aria:!0,data:!0}),Dn=et&&me.createElement("li",{className:"".concat(Be,"-total-text")},et(St,[St===0?0:(xr-1)*xn+1,xr*xn>St?St:xr*xn])),Jn=null,jn=xe(void 0,xn,St);if(ct&&St<=xn)return null;var Bn=[],er={rootPrefixCls:Be,onClick:nr,onKeyPress:vn,showTitle:vt,itemRender:qt,page:-1},_n=xr-1>0?xr-1:0,sr=xr+1<jn?xr+1:jn,Fr=yt&&yt.goButton,zr=(0,oe.Z)(Ze)==="object"?Ze.readOnly:!Ze,Dr=Fr,pn=null;Ze&&(Fr&&(typeof Fr=="boolean"?Dr=me.createElement("button",{type:"button",onClick:Nn,onKeyUp:Nn},Ne.jump_to_confirm):Dr=me.createElement("span",{onClick:Nn,onKeyUp:Nn},Fr),Dr=me.createElement("li",{title:vt?"".concat(Ne.jump_to).concat(xr,"/").concat(jn):null,className:"".concat(Be,"-simple-pager")},Dr)),pn=me.createElement("li",{title:vt?"".concat(xr,"/").concat(jn):null,className:"".concat(Be,"-simple-pager")},zr?di:me.createElement("input",{type:"text","aria-label":Ne.jump_to,value:di,disabled:Re,onKeyDown:Pr,onKeyUp:kr,onChange:kr,onBlur:Hi,size:3}),me.createElement("span",{className:"".concat(Be,"-slash")},"/"),jn));var Ni=Ft?1:2;if(jn<=3+Ni*2){jn||Bn.push(me.createElement(ie,(0,Ut.Z)({},er,{key:"noPager",page:1,className:"".concat(Be,"-item-disabled")})));for(var ni=1;ni<=jn;ni+=1)Bn.push(me.createElement(ie,(0,Ut.Z)({},er,{key:ni,page:ni,active:xr===ni})))}else{var ki=Ft?Ne.prev_3:Ne.prev_5,hn=Ft?Ne.next_3:Ne.next_5,qn=qt(Jr,"jump-prev",qe(Qt,"prev page")),rr=qt(Li,"jump-next",qe(Xt,"next page"));Mt&&(Yn=qn?me.createElement("li",{title:vt?ki:null,key:"prev",onClick:Vn,tabIndex:0,onKeyDown:Jt,className:ve()("".concat(Be,"-jump-prev"),(0,st.Z)({},"".concat(Be,"-jump-prev-custom-icon"),!!Qt))},qn):null,Jn=rr?me.createElement("li",{title:vt?hn:null,key:"next",onClick:vr,tabIndex:0,onKeyDown:Xn,className:ve()("".concat(Be,"-jump-next"),(0,st.Z)({},"".concat(Be,"-jump-next-custom-icon"),!!Xt))},rr):null);var pr=Math.max(1,xr-Ni),wr=Math.min(xr+Ni,jn);xr-1<=Ni&&(wr=1+Ni*2),jn-xr<=Ni&&(pr=jn-Ni*2);for(var Ar=pr;Ar<=wr;Ar+=1)Bn.push(me.createElement(ie,(0,Ut.Z)({},er,{key:Ar,page:Ar,active:xr===Ar})));if(xr-1>=Ni*2&&xr!==3&&(Bn[0]=me.cloneElement(Bn[0],{className:ve()("".concat(Be,"-item-after-jump-prev"),Bn[0].props.className)}),Bn.unshift(Yn)),jn-xr>=Ni*2&&xr!==jn-2){var Kr=Bn[Bn.length-1];Bn[Bn.length-1]=me.cloneElement(Kr,{className:ve()("".concat(Be,"-item-before-jump-next"),Kr.props.className)}),Bn.push(Jn)}pr!==1&&Bn.unshift(me.createElement(ie,(0,Ut.Z)({},er,{key:1,page:1}))),wr!==jn&&Bn.push(me.createElement(ie,(0,Ut.Z)({},er,{key:jn,page:jn})))}var Qr=jt(_n);if(Qr){var qr=!Vt||!jn;Qr=me.createElement("li",{title:vt?Ne.prev_page:null,onClick:zt,tabIndex:qr?null:0,onKeyDown:Wn,className:ve()("".concat(Be,"-prev"),(0,st.Z)({},"".concat(Be,"-disabled"),qr)),"aria-disabled":qr},Qr)}var lr=ln(sr);if(lr){var rn,ir;Ze?(rn=!Kt,ir=Vt?0:null):(rn=!Kt||!jn,ir=rn?null:0),lr=me.createElement("li",{title:vt?Ne.next_page:null,onClick:Mn,tabIndex:ir,onKeyDown:Ht,className:ve()("".concat(Be,"-next"),(0,st.Z)({},"".concat(Be,"-disabled"),rn)),"aria-disabled":rn},lr)}var an=ve()(Be,Ke,(0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)({},"".concat(Be,"-start"),xt==="start"),"".concat(Be,"-center"),xt==="center"),"".concat(Be,"-end"),xt==="end"),"".concat(Be,"-simple"),Ze),"".concat(Be,"-disabled"),Re));return me.createElement("ul",(0,Ut.Z)({className:an,style:Xe,ref:on},sn),Dn,Qr,Ze?pn:Bn,lr,me.createElement(te,{locale:Ne,rootPrefixCls:Be,disabled:Re,selectPrefixCls:Ye,changeSize:gr,pageSize:xn,pageSizeOptions:Et,quickGo:br?nr:null,goButton:Dr,showSizeChanger:at,sizeChangerRender:Dt}))},De=je},25930:function(Rn,An,pt){"use strict";pt.d(An,{Cd:function(){return Be}});var st=pt(72308),Ut=pt(77321),oe=pt(74416),Ue=pt(59301),_e=pt(92310),de=pt.n(_e),ve={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ee=function(){var Ke=(0,Ue.useRef)([]),Ve=(0,Ue.useRef)(null);return(0,Ue.useEffect)(function(){var ot=Date.now(),ut=!1;Ke.current.forEach(function(ft){if(ft){ut=!0;var St=ft.style;St.transitionDuration=".3s, .3s, .3s, .06s",Ve.current&&ot-Ve.current<100&&(St.transitionDuration="0s, 0s")}}),ut&&(Ve.current=Date.now())}),Ke.current},ke=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ke){var Ve=(0,Ut.Z)((0,Ut.Z)({},ve),Ke),ot=Ve.className,ut=Ve.percent,ft=Ve.prefixCls,St=Ve.strokeColor,Qe=Ve.strokeLinecap,rt=Ve.strokeWidth,wt=Ve.style,Ct=Ve.trailColor,bt=Ve.trailWidth,ct=Ve.transition,xt=(0,oe.Z)(Ve,ke);delete xt.gapPosition;var dt=Array.isArray(ut)?ut:[ut],Mt=Array.isArray(St)?St:[St],yt=Ee(),Ft=rt/2,mt=100-rt/2,vt="M ".concat(Qe==="round"?Ft:0,",").concat(Ft,`
|
|
L `).concat(Qe==="round"?mt:100,",").concat(Ft),tt="0 0 100 ".concat(rt),He=0;return Ue.createElement("svg",(0,st.Z)({className:de()("".concat(ft,"-line"),ot),viewBox:tt,preserveAspectRatio:"none",style:wt},xt),Ue.createElement("path",{className:"".concat(ft,"-line-trail"),d:vt,strokeLinecap:Qe,stroke:Ct,strokeWidth:bt||rt,fillOpacity:"0"}),dt.map(function(we,Ne){var Xe=1;switch(Qe){case"round":Xe=1-rt/100;break;case"square":Xe=1-rt/2/100;break;default:Xe=1;break}var nt={strokeDasharray:"".concat(we*Xe,"px, 100px"),strokeDashoffset:"-".concat(He,"px"),transition:ct||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Mt[Ne]||Mt[Mt.length-1];return He+=we,Ue.createElement("path",{key:Ne,className:"".concat(ft,"-line-path"),d:vt,strokeLinecap:Qe,stroke:Ie,strokeWidth:rt,fillOpacity:"0",ref:function(Ze){yt[Ne]=Ze},style:nt})}))},Ae=Se,me=pt(62853),Pe=pt(52487),fe=pt(47273),z=0,te=(0,fe.Z)();function se(){var Ye;return te?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var Ke=Ue.useState(),Ve=(0,Pe.Z)(Ke,2),ot=Ve[0],ut=Ve[1];return Ue.useEffect(function(){ut("rc_progress_".concat(se()))},[]),Ye||ot},le=function(Ke){var Ve=Ke.bg,ot=Ke.children;return Ue.createElement("div",{style:{width:"100%",height:"100%",background:Ve}},ot)};function ce(Ye,Ke){return Object.keys(Ye).map(function(Ve){var ot=parseFloat(Ve),ut="".concat(Math.floor(ot*Ke),"%");return"".concat(Ye[Ve]," ").concat(ut)})}var pe=Ue.forwardRef(function(Ye,Ke){var Ve=Ye.prefixCls,ot=Ye.color,ut=Ye.gradientId,ft=Ye.radius,St=Ye.style,Qe=Ye.ptg,rt=Ye.strokeLinecap,wt=Ye.strokeWidth,Ct=Ye.size,bt=Ye.gapDegree,ct=ot&&(0,me.Z)(ot)==="object",xt=ct?"#FFF":void 0,dt=Ct/2,Mt=Ue.createElement("circle",{className:"".concat(Ve,"-circle-path"),r:ft,cx:dt,cy:dt,stroke:xt,strokeLinecap:rt,strokeWidth:wt,opacity:Qe===0?0:1,style:St,ref:Ke});if(!ct)return Mt;var yt="".concat(ut,"-conic"),Ft=bt?"".concat(180+bt/2,"deg"):"0deg",mt=ce(ot,(360-bt)/360),vt=ce(ot,1),tt="conic-gradient(from ".concat(Ft,", ").concat(mt.join(", "),")"),He="linear-gradient(to ".concat(bt?"bottom":"top",", ").concat(vt.join(", "),")");return Ue.createElement(Ue.Fragment,null,Ue.createElement("mask",{id:yt},Mt),Ue.createElement("foreignObject",{x:0,y:0,width:Ct,height:Ct,mask:"url(#".concat(yt,")")},Ue.createElement(le,{bg:He},Ue.createElement(le,{bg:tt}))))}),xe=pe,je=100,De=function(Ke,Ve,ot,ut,ft,St,Qe,rt,wt,Ct){var bt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ct=ot/100*360*((360-St)/360),xt=St===0?0:{bottom:0,top:180,left:90,right:-90}[Qe],dt=(100-ut)/100*Ve;wt==="round"&&ut!==100&&(dt+=Ct/2,dt>=Ve&&(dt=Ve-.01));var Mt=je/2;return{stroke:typeof rt=="string"?rt:void 0,strokeDasharray:"".concat(Ve,"px ").concat(Ke),strokeDashoffset:dt+bt,transform:"rotate(".concat(ft+ct+xt,"deg)"),transformOrigin:"".concat(Mt,"px ").concat(Mt,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Fe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Te(Ye){var Ke=Ye!=null?Ye:[];return Array.isArray(Ke)?Ke:[Ke]}var Me=function(Ke){var Ve=(0,Ut.Z)((0,Ut.Z)({},ve),Ke),ot=Ve.id,ut=Ve.prefixCls,ft=Ve.steps,St=Ve.strokeWidth,Qe=Ve.trailWidth,rt=Ve.gapDegree,wt=rt===void 0?0:rt,Ct=Ve.gapPosition,bt=Ve.trailColor,ct=Ve.strokeLinecap,xt=Ve.style,dt=Ve.className,Mt=Ve.strokeColor,yt=Ve.percent,Ft=(0,oe.Z)(Ve,Fe),mt=je/2,vt=ie(ot),tt="".concat(vt,"-gradient"),He=mt-St/2,we=Math.PI*2*He,Ne=wt>0?90+wt/2:-90,Xe=we*((360-wt)/360),nt=(0,me.Z)(ft)==="object"?ft:{count:ft,gap:2},Ie=nt.count,Re=nt.gap,Ze=Te(yt),et=Te(Mt),ht=et.find(function(Xt){return Xt&&(0,me.Z)(Xt)==="object"}),at=ht&&(0,me.Z)(ht)==="object",Dt=at?"butt":ct,Et=De(we,Xe,0,100,Ne,wt,Ct,bt,Dt,St),Ot=Ee(),qt=function(){var Wt=0;return Ze.map(function(un,on){var cn=et[on]||et[et.length-1],bn=De(we,Xe,Wt,un,Ne,wt,Ct,cn,Dt,St);return Wt+=un,Ue.createElement(xe,{key:on,color:cn,ptg:un,radius:He,prefixCls:ut,gradientId:tt,style:bn,strokeLinecap:Dt,strokeWidth:St,gapDegree:wt,ref:function(kn){Ot[on]=kn},size:je})}).reverse()},Qt=function(){var Wt=Math.round(Ie*(Ze[0]/100)),un=100/Ie,on=0;return new Array(Ie).fill(null).map(function(cn,bn){var xn=bn<=Wt-1?et[0]:bt,kn=xn&&(0,me.Z)(xn)==="object"?"url(#".concat(tt,")"):void 0,On=De(we,Xe,on,un,Ne,wt,Ct,xn,"butt",St,Re);return on+=(Xe-On.strokeDashoffset+Re)*100/Xe,Ue.createElement("circle",{key:bn,className:"".concat(ut,"-circle-path"),r:He,cx:mt,cy:mt,stroke:kn,strokeWidth:St,opacity:1,style:On,ref:function(xr){Ot[bn]=xr}})})};return Ue.createElement("svg",(0,st.Z)({className:de()("".concat(ut,"-circle"),dt),viewBox:"0 0 ".concat(je," ").concat(je),style:xt,id:ot,role:"presentation"},Ft),!Ie&&Ue.createElement("circle",{className:"".concat(ut,"-circle-trail"),r:He,cx:mt,cy:mt,stroke:bt,strokeLinecap:Dt,strokeWidth:Qe||St,style:Et}),Ie?Qt():qt())},Be=Me,Ge={Line:Ae,Circle:Be}},738:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return ce}});var st=pt(72308),Ut=pt(49618),oe=pt(52487),Ue=pt(74416),_e=pt(92310),de=pt.n(_e),ve=pt(18929),Ee=pt(10228),ke=pt(26112),Se=pt(59301);function Ae(pe,xe){var je=pe.disabled,De=pe.prefixCls,Fe=pe.character,Te=pe.characterRender,Me=pe.index,Be=pe.count,Ge=pe.value,Ye=pe.allowHalf,Ke=pe.focused,Ve=pe.onHover,ot=pe.onClick,ut=function(ct){Ve(ct,Me)},ft=function(ct){ot(ct,Me)},St=function(ct){ct.keyCode===Ee.Z.ENTER&&ot(ct,Me)},Qe=Me+1,rt=new Set([De]);Ge===0&&Me===0&&Ke?rt.add("".concat(De,"-focused")):Ye&&Ge+.5>=Qe&&Ge<Qe?(rt.add("".concat(De,"-half")),rt.add("".concat(De,"-active")),Ke&&rt.add("".concat(De,"-focused"))):(Qe<=Ge?rt.add("".concat(De,"-full")):rt.add("".concat(De,"-zero")),Qe===Ge&&Ke&&rt.add("".concat(De,"-focused")));var wt=typeof Fe=="function"?Fe(pe):Fe,Ct=Se.createElement("li",{className:de()(Array.from(rt)),ref:xe},Se.createElement("div",{onClick:je?null:ft,onKeyDown:je?null:St,onMouseMove:je?null:ut,role:"radio","aria-checked":Ge>Me?"true":"false","aria-posinset":Me+1,"aria-setsize":Be,tabIndex:je?-1:0},Se.createElement("div",{className:"".concat(De,"-first")},wt),Se.createElement("div",{className:"".concat(De,"-second")},wt)));return Te&&(Ct=Te(Ct,pe)),Ct}var me=Se.forwardRef(Ae);function Pe(){var pe=Se.useRef({});function xe(De){return pe.current[De]}function je(De){return function(Fe){pe.current[De]=Fe}}return[xe,je]}function fe(pe){var xe=pe.pageXOffset,je="scrollLeft";if(typeof xe!="number"){var De=pe.document;xe=De.documentElement[je],typeof xe!="number"&&(xe=De.body[je])}return xe}function z(pe){var xe,je,De=pe.ownerDocument,Fe=De.body,Te=De&&De.documentElement,Me=pe.getBoundingClientRect();return xe=Me.left,je=Me.top,xe-=Te.clientLeft||Fe.clientLeft||0,je-=Te.clientTop||Fe.clientTop||0,{left:xe,top:je}}function te(pe){var xe=z(pe),je=pe.ownerDocument,De=je.defaultView||je.parentWindow;return xe.left+=fe(De),xe.left}var se=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ie(pe,xe){var je=pe.prefixCls,De=je===void 0?"rc-rate":je,Fe=pe.className,Te=pe.defaultValue,Me=pe.value,Be=pe.count,Ge=Be===void 0?5:Be,Ye=pe.allowHalf,Ke=Ye===void 0?!1:Ye,Ve=pe.allowClear,ot=Ve===void 0?!0:Ve,ut=pe.keyboard,ft=ut===void 0?!0:ut,St=pe.character,Qe=St===void 0?"\u2605":St,rt=pe.characterRender,wt=pe.disabled,Ct=pe.direction,bt=Ct===void 0?"ltr":Ct,ct=pe.tabIndex,xt=ct===void 0?0:ct,dt=pe.autoFocus,Mt=pe.onHoverChange,yt=pe.onChange,Ft=pe.onFocus,mt=pe.onBlur,vt=pe.onKeyDown,tt=pe.onMouseLeave,He=(0,Ue.Z)(pe,se),we=Pe(),Ne=(0,oe.Z)(we,2),Xe=Ne[0],nt=Ne[1],Ie=Se.useRef(null),Re=function(){if(!wt){var Jr;(Jr=Ie.current)===null||Jr===void 0||Jr.focus()}};Se.useImperativeHandle(xe,function(){return{focus:Re,blur:function(){if(!wt){var Jr;(Jr=Ie.current)===null||Jr===void 0||Jr.blur()}}}});var Ze=(0,ve.Z)(Te||0,{value:Me}),et=(0,oe.Z)(Ze,2),ht=et[0],at=et[1],Dt=(0,ve.Z)(null),Et=(0,oe.Z)(Dt,2),Ot=Et[0],qt=Et[1],Qt=function(Jr,Li){var qe=bt==="rtl",Mr=Jr+1;if(Ke){var Lr=Xe(Jr),br=te(Lr),Pr=Lr.clientWidth;(qe&&Li-br>Pr/2||!qe&&Li-br<Pr/2)&&(Mr-=.5)}return Mr},Xt=function(Jr){at(Jr),yt==null||yt(Jr)},Wt=Se.useState(!1),un=(0,oe.Z)(Wt,2),on=un[0],cn=un[1],bn=function(){cn(!0),Ft==null||Ft()},xn=function(){cn(!1),mt==null||mt()},kn=Se.useState(null),On=(0,oe.Z)(kn,2),_r=On[0],xr=On[1],$r=function(Jr,Li){var qe=Qt(Li,Jr.pageX);qe!==Ot&&(xr(qe),qt(null)),Mt==null||Mt(qe)},tr=function(Jr){wt||(xr(null),qt(null),Mt==null||Mt(void 0)),Jr&&(tt==null||tt(Jr))},ii=function(Jr,Li){var qe=Qt(Li,Jr.pageX),Mr=!1;ot&&(Mr=qe===ht),tr(),Xt(Mr?0:qe),qt(Mr?qe:null)},di=function(Jr){var Li=Jr.keyCode,qe=bt==="rtl",Mr=Ke?.5:1;ft&&(Li===Ee.Z.RIGHT&&ht<Ge&&!qe?(Xt(ht+Mr),Jr.preventDefault()):Li===Ee.Z.LEFT&&ht>0&&!qe||Li===Ee.Z.RIGHT&&ht>0&&qe?(Xt(ht-Mr),Jr.preventDefault()):Li===Ee.Z.LEFT&&ht<Ge&&qe&&(Xt(ht+Mr),Jr.preventDefault())),vt==null||vt(Jr)};Se.useEffect(function(){dt&&!wt&&Re()},[]);var li=new Array(Ge).fill(0).map(function(yi,Jr){return Se.createElement(me,{ref:nt(Jr),index:Jr,count:Ge,disabled:wt,prefixCls:"".concat(De,"-star"),allowHalf:Ke,value:_r===null?ht:_r,onClick:ii,onHover:$r,key:yi||Jr,character:Qe,characterRender:rt,focused:on})}),Mi=de()(De,Fe,(0,Ut.Z)((0,Ut.Z)({},"".concat(De,"-disabled"),wt),"".concat(De,"-rtl"),bt==="rtl"));return Se.createElement("ul",(0,st.Z)({className:Mi,onMouseLeave:tr,tabIndex:wt?-1:xt,onFocus:wt?null:bn,onBlur:wt?null:xn,onKeyDown:wt?null:di,ref:Ie},(0,ke.Z)(He,{aria:!0,data:!0,attr:!0})),li)}var le=Se.forwardRef(ie),ce=le},69582:function(Rn,An,pt){"use strict";pt.d(An,{ZP:function(){return ve}});var st=pt(52487),Ut=pt(59301),oe=pt(47273),Ue=0,_e=(0,oe.Z)();function de(){var Ee;return _e?(Ee=Ue,Ue+=1):Ee="TEST_OR_SSR",Ee}function ve(Ee){var ke=Ut.useState(),Se=(0,st.Z)(ke,2),Ae=Se[0],me=Se[1];return Ut.useEffect(function(){me("rc_select_".concat(de()))},[]),Ee||Ae}},45560:function(Rn,An,pt){"use strict";pt.d(An,{Ac:function(){return Wt},Xo:function(){return on},Wx:function(){return bn},ZP:function(){return Wn},lk:function(){return ce}});var st=pt(72308),Ut=pt(80702),oe=pt(49618),Ue=pt(77321),_e=pt(52487),de=pt(74416),ve=pt(62853),Ee=pt(18929),ke=pt(48736),Se=pt(59301),Ae=pt(92310),me=pt.n(Ae),Pe=pt(34280),fe=pt(49658),z=pt(8654),te=function(Jt){var Xn=Jt.className,jt=Jt.customizeIcon,ln=Jt.customizeIconProps,Nn=Jt.children,Yn=Jt.onMouseDown,sn=Jt.onClick,Dn=typeof jt=="function"?jt(ln):jt;return Se.createElement("span",{className:Xn,onMouseDown:function(jn){jn.preventDefault(),Yn==null||Yn(jn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:sn,"aria-hidden":!0},Dn!==void 0?Dn:Se.createElement("span",{className:me()(Xn.split(/\s+/).map(function(Jn){return"".concat(Jn,"-icon")}))},Nn))},se=te,ie=function(Jt,Xn,jt,ln,Nn){var Yn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,sn=arguments.length>6?arguments[6]:void 0,Dn=arguments.length>7?arguments[7]:void 0,Jn=Se.useMemo(function(){if((0,ve.Z)(ln)==="object")return ln.clearIcon;if(Nn)return Nn},[ln,Nn]),jn=Se.useMemo(function(){return!!(!Yn&&ln&&(jt.length||sn)&&!(Dn==="combobox"&&sn===""))},[ln,Yn,jt.length,sn,Dn]);return{allowClear:jn,clearIcon:Se.createElement(se,{className:"".concat(Jt,"-clear"),onMouseDown:Xn,customizeIcon:Jn},"\xD7")}},le=Se.createContext(null);function ce(){return Se.useContext(le)}function pe(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Jt=Se.useState(!1),Xn=(0,_e.Z)(Jt,2),jt=Xn[0],ln=Xn[1],Nn=Se.useRef(null),Yn=function(){window.clearTimeout(Nn.current)};Se.useEffect(function(){return Yn},[]);var sn=function(Jn,jn){Yn(),Nn.current=window.setTimeout(function(){ln(Jn),jn&&jn()},Ht)};return[jt,sn,Yn]}function xe(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Jt=Se.useRef(null),Xn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Xn.current)}},[]);function jt(ln){(ln||Jt.current===null)&&(Jt.current=ln),window.clearTimeout(Xn.current),Xn.current=window.setTimeout(function(){Jt.current=null},Ht)}return[function(){return Jt.current},jt]}function je(Ht,Jt,Xn,jt){var ln=Se.useRef(null);ln.current={open:Jt,triggerOpen:Xn,customizedTrigger:jt},Se.useEffect(function(){function Nn(Yn){var sn;if(!((sn=ln.current)!==null&&sn!==void 0&&sn.customizedTrigger)){var Dn=Yn.target;Dn.shadowRoot&&Yn.composed&&(Dn=Yn.composedPath()[0]||Dn),ln.current.open&&Ht().filter(function(Jn){return Jn}).every(function(Jn){return!Jn.contains(Dn)&&Jn!==Dn})&&ln.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Nn),function(){return window.removeEventListener("mousedown",Nn)}},[])}var De=pt(10228);function Fe(Ht){return Ht&&![De.Z.ESC,De.Z.SHIFT,De.Z.BACKSPACE,De.Z.TAB,De.Z.WIN_KEY,De.Z.ALT,De.Z.META,De.Z.WIN_KEY_RIGHT,De.Z.CTRL,De.Z.SEMICOLON,De.Z.EQUALS,De.Z.CAPS_LOCK,De.Z.CONTEXT_MENU,De.Z.F1,De.Z.F2,De.Z.F3,De.Z.F4,De.Z.F5,De.Z.F6,De.Z.F7,De.Z.F8,De.Z.F9,De.Z.F10,De.Z.F11,De.Z.F12].includes(Ht)}var Te=pt(26112),Me=pt(11780),Be=function(Jt,Xn){var jt,ln=Jt.prefixCls,Nn=Jt.id,Yn=Jt.inputElement,sn=Jt.disabled,Dn=Jt.tabIndex,Jn=Jt.autoFocus,jn=Jt.autoComplete,Bn=Jt.editable,er=Jt.activeDescendantId,_n=Jt.value,sr=Jt.maxLength,Fr=Jt.onKeyDown,zr=Jt.onMouseDown,Dr=Jt.onChange,pn=Jt.onPaste,Ni=Jt.onCompositionStart,ni=Jt.onCompositionEnd,ki=Jt.onBlur,hn=Jt.open,qn=Jt.attrs,rr=Yn||Se.createElement("input",null),pr=rr,wr=pr.ref,Ar=pr.props,Kr=Ar.onKeyDown,Qr=Ar.onChange,qr=Ar.onMouseDown,lr=Ar.onCompositionStart,rn=Ar.onCompositionEnd,ir=Ar.onBlur,an=Ar.style;return(0,ke.Kp)(!("maxLength"in rr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),rr=Se.cloneElement(rr,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({type:"search"},Ar),{},{id:Nn,ref:(0,z.sQ)(Xn,wr),disabled:sn,tabIndex:Dn,autoComplete:jn||"off",autoFocus:Jn,className:me()("".concat(ln,"-selection-search-input"),(jt=rr)===null||jt===void 0||(jt=jt.props)===null||jt===void 0?void 0:jt.className),role:"combobox","aria-expanded":hn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Nn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Nn,"_list"),"aria-activedescendant":hn?er:void 0},qn),{},{value:Bn?_n:"",maxLength:sr,readOnly:!Bn,unselectable:Bn?null:"on",style:(0,Ue.Z)((0,Ue.Z)({},an),{},{opacity:Bn?null:0}),onKeyDown:function(Cr){Fr(Cr),Kr&&Kr(Cr)},onMouseDown:function(Cr){zr(Cr),qr&&qr(Cr)},onChange:function(Cr){Dr(Cr),Qr&&Qr(Cr)},onCompositionStart:function(Cr){Ni(Cr),lr&&lr(Cr)},onCompositionEnd:function(Cr){ni(Cr),rn&&rn(Cr)},onPaste:pn,onBlur:function(Cr){ki(Cr),ir&&ir(Cr)}})),rr},Ge=Se.forwardRef(Be),Ye=Ge;function Ke(Ht){return Array.isArray(Ht)?Ht:Ht!==void 0?[Ht]:[]}var Ve=typeof window!="undefined"&&window.document&&window.document.documentElement,ot=Ve;function ut(Ht){return Ht!=null}function ft(Ht){return!Ht&&Ht!==0}function St(Ht){return["string","number"].includes((0,ve.Z)(Ht))}function Qe(Ht){var Jt=void 0;return Ht&&(St(Ht.title)?Jt=Ht.title.toString():St(Ht.label)&&(Jt=Ht.label.toString())),Jt}function rt(Ht,Jt){ot?Se.useLayoutEffect(Ht,Jt):Se.useEffect(Ht,Jt)}function wt(Ht){var Jt;return(Jt=Ht.key)!==null&&Jt!==void 0?Jt:Ht.value}var Ct=function(Jt){Jt.preventDefault(),Jt.stopPropagation()},bt=function(Jt){var Xn=Jt.id,jt=Jt.prefixCls,ln=Jt.values,Nn=Jt.open,Yn=Jt.searchValue,sn=Jt.autoClearSearchValue,Dn=Jt.inputRef,Jn=Jt.placeholder,jn=Jt.disabled,Bn=Jt.mode,er=Jt.showSearch,_n=Jt.autoFocus,sr=Jt.autoComplete,Fr=Jt.activeDescendantId,zr=Jt.tabIndex,Dr=Jt.removeIcon,pn=Jt.maxTagCount,Ni=Jt.maxTagTextLength,ni=Jt.maxTagPlaceholder,ki=ni===void 0?function(ar){return"+ ".concat(ar.length," ...")}:ni,hn=Jt.tagRender,qn=Jt.onToggleOpen,rr=Jt.onRemove,pr=Jt.onInputChange,wr=Jt.onInputPaste,Ar=Jt.onInputKeyDown,Kr=Jt.onInputMouseDown,Qr=Jt.onInputCompositionStart,qr=Jt.onInputCompositionEnd,lr=Jt.onInputBlur,rn=Se.useRef(null),ir=(0,Se.useState)(0),an=(0,_e.Z)(ir,2),cr=an[0],Cr=an[1],Gr=(0,Se.useState)(!1),Ri=(0,_e.Z)(Gr,2),Fi=Ri[0],Si=Ri[1],Di="".concat(jt,"-selection"),en=Nn||Bn==="multiple"&&sn===!1||Bn==="tags"?Yn:"",dn=Bn==="tags"||Bn==="multiple"&&sn===!1||er&&(Nn||Fi);rt(function(){Cr(rn.current.scrollWidth)},[en]);var tn=function(Sn,Gn,Hn,Kn,Zn){return Se.createElement("span",{title:Qe(Sn),className:me()("".concat(Di,"-item"),(0,oe.Z)({},"".concat(Di,"-item-disabled"),Hn))},Se.createElement("span",{className:"".concat(Di,"-item-content")},Gn),Kn&&Se.createElement(se,{className:"".concat(Di,"-item-remove"),onMouseDown:Ct,onClick:Zn,customizeIcon:Dr},"\xD7"))},lt=function(Sn,Gn,Hn,Kn,Zn,Tr){var yr=function(mn){Ct(mn),qn(!Nn)};return Se.createElement("span",{onMouseDown:yr},hn({label:Gn,value:Sn,disabled:Hn,closable:Kn,onClose:Zn,isMaxTag:!!Tr}))},zn=function(Sn){var Gn=Sn.disabled,Hn=Sn.label,Kn=Sn.value,Zn=!jn&&!Gn,Tr=Hn;if(typeof Ni=="number"&&(typeof Hn=="string"||typeof Hn=="number")){var yr=String(Tr);yr.length>Ni&&(Tr="".concat(yr.slice(0,Ni),"..."))}var ur=function(dr){dr&&dr.stopPropagation(),rr(Sn)};return typeof hn=="function"?lt(Kn,Tr,Gn,Zn,ur):tn(Sn,Tr,Gn,Zn,ur)},Pn=function(Sn){if(!ln.length)return null;var Gn=typeof ki=="function"?ki(Sn):ki;return typeof hn=="function"?lt(void 0,Gn,!1,!1,void 0,!0):tn({title:Gn},Gn,!1)},In=Se.createElement("div",{className:"".concat(Di,"-search"),style:{width:cr},onFocus:function(){Si(!0)},onBlur:function(){Si(!1)}},Se.createElement(Ye,{ref:Dn,open:Nn,prefixCls:jt,id:Xn,inputElement:null,disabled:jn,autoFocus:_n,autoComplete:sr,editable:dn,activeDescendantId:Fr,value:en,onKeyDown:Ar,onMouseDown:Kr,onChange:pr,onPaste:wr,onCompositionStart:Qr,onCompositionEnd:qr,onBlur:lr,tabIndex:zr,attrs:(0,Te.Z)(Jt,!0)}),Se.createElement("span",{ref:rn,className:"".concat(Di,"-search-mirror"),"aria-hidden":!0},en,"\xA0")),Qn=Se.createElement(Me.Z,{prefixCls:"".concat(Di,"-overflow"),data:ln,renderItem:zn,renderRest:Pn,suffix:In,itemKey:wt,maxCount:pn});return Se.createElement("span",{className:"".concat(Di,"-wrap")},Qn,!ln.length&&!en&&Se.createElement("span",{className:"".concat(Di,"-placeholder")},Jn))},ct=bt,xt=function(Jt){var Xn=Jt.inputElement,jt=Jt.prefixCls,ln=Jt.id,Nn=Jt.inputRef,Yn=Jt.disabled,sn=Jt.autoFocus,Dn=Jt.autoComplete,Jn=Jt.activeDescendantId,jn=Jt.mode,Bn=Jt.open,er=Jt.values,_n=Jt.placeholder,sr=Jt.tabIndex,Fr=Jt.showSearch,zr=Jt.searchValue,Dr=Jt.activeValue,pn=Jt.maxLength,Ni=Jt.onInputKeyDown,ni=Jt.onInputMouseDown,ki=Jt.onInputChange,hn=Jt.onInputPaste,qn=Jt.onInputCompositionStart,rr=Jt.onInputCompositionEnd,pr=Jt.onInputBlur,wr=Jt.title,Ar=Se.useState(!1),Kr=(0,_e.Z)(Ar,2),Qr=Kr[0],qr=Kr[1],lr=jn==="combobox",rn=lr||Fr,ir=er[0],an=zr||"";lr&&Dr&&!Qr&&(an=Dr),Se.useEffect(function(){lr&&qr(!1)},[lr,Dr]);var cr=jn!=="combobox"&&!Bn&&!Fr?!1:!!an,Cr=wr===void 0?Qe(ir):wr,Gr=Se.useMemo(function(){return ir?null:Se.createElement("span",{className:"".concat(jt,"-selection-placeholder"),style:cr?{visibility:"hidden"}:void 0},_n)},[ir,cr,_n,jt]);return Se.createElement("span",{className:"".concat(jt,"-selection-wrap")},Se.createElement("span",{className:"".concat(jt,"-selection-search")},Se.createElement(Ye,{ref:Nn,prefixCls:jt,id:ln,open:Bn,inputElement:Xn,disabled:Yn,autoFocus:sn,autoComplete:Dn,editable:rn,activeDescendantId:Jn,value:an,onKeyDown:Ni,onMouseDown:ni,onChange:function(Fi){qr(!0),ki(Fi)},onPaste:hn,onCompositionStart:qn,onCompositionEnd:rr,onBlur:pr,tabIndex:sr,attrs:(0,Te.Z)(Jt,!0),maxLength:lr?pn:void 0})),!lr&&ir?Se.createElement("span",{className:"".concat(jt,"-selection-item"),title:Cr,style:cr?{visibility:"hidden"}:void 0},ir.label):null,Gr)},dt=xt,Mt=function(Jt,Xn){var jt=(0,Se.useRef)(null),ln=(0,Se.useRef)(!1),Nn=Jt.prefixCls,Yn=Jt.open,sn=Jt.mode,Dn=Jt.showSearch,Jn=Jt.tokenWithEnter,jn=Jt.disabled,Bn=Jt.prefix,er=Jt.autoClearSearchValue,_n=Jt.onSearch,sr=Jt.onSearchSubmit,Fr=Jt.onToggleOpen,zr=Jt.onInputKeyDown,Dr=Jt.onInputBlur,pn=Jt.domRef;Se.useImperativeHandle(Xn,function(){return{focus:function(Cr){jt.current.focus(Cr)},blur:function(){jt.current.blur()}}});var Ni=xe(0),ni=(0,_e.Z)(Ni,2),ki=ni[0],hn=ni[1],qn=function(Cr){var Gr=Cr.which,Ri=jt.current instanceof HTMLTextAreaElement;!Ri&&Yn&&(Gr===De.Z.UP||Gr===De.Z.DOWN)&&Cr.preventDefault(),zr&&zr(Cr),Gr===De.Z.ENTER&&sn==="tags"&&!ln.current&&!Yn&&(sr==null||sr(Cr.target.value)),!(Ri&&!Yn&&~[De.Z.UP,De.Z.DOWN,De.Z.LEFT,De.Z.RIGHT].indexOf(Gr))&&Fe(Gr)&&Fr(!0)},rr=function(){hn(!0)},pr=(0,Se.useRef)(null),wr=function(Cr){_n(Cr,!0,ln.current)!==!1&&Fr(!0)},Ar=function(){ln.current=!0},Kr=function(Cr){ln.current=!1,sn!=="combobox"&&wr(Cr.target.value)},Qr=function(Cr){var Gr=Cr.target.value;if(Jn&&pr.current&&/[\r\n]/.test(pr.current)){var Ri=pr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Gr=Gr.replace(Ri,pr.current)}pr.current=null,wr(Gr)},qr=function(Cr){var Gr=Cr.clipboardData,Ri=Gr==null?void 0:Gr.getData("text");pr.current=Ri||""},lr=function(Cr){var Gr=Cr.target;if(Gr!==jt.current){var Ri=document.body.style.msTouchAction!==void 0;Ri?setTimeout(function(){jt.current.focus()}):jt.current.focus()}},rn=function(Cr){var Gr=ki();Cr.target!==jt.current&&!Gr&&!(sn==="combobox"&&jn)&&Cr.preventDefault(),(sn!=="combobox"&&(!Dn||!Gr)||!Yn)&&(Yn&&er!==!1&&_n("",!0,!1),Fr())},ir={inputRef:jt,onInputKeyDown:qn,onInputMouseDown:rr,onInputChange:Qr,onInputPaste:qr,onInputCompositionStart:Ar,onInputCompositionEnd:Kr,onInputBlur:Dr},an=sn==="multiple"||sn==="tags"?Se.createElement(ct,(0,st.Z)({},Jt,ir)):Se.createElement(dt,(0,st.Z)({},Jt,ir));return Se.createElement("div",{ref:pn,className:"".concat(Nn,"-selector"),onClick:lr,onMouseDown:rn},Bn&&Se.createElement("div",{className:"".concat(Nn,"-prefix")},Bn),an)},yt=Se.forwardRef(Mt),Ft=yt,mt=pt(65352),vt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],tt=function(Jt){var Xn=Jt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"}}},He=function(Jt,Xn){var jt=Jt.prefixCls,ln=Jt.disabled,Nn=Jt.visible,Yn=Jt.children,sn=Jt.popupElement,Dn=Jt.animation,Jn=Jt.transitionName,jn=Jt.dropdownStyle,Bn=Jt.dropdownClassName,er=Jt.direction,_n=er===void 0?"ltr":er,sr=Jt.placement,Fr=Jt.builtinPlacements,zr=Jt.dropdownMatchSelectWidth,Dr=Jt.dropdownRender,pn=Jt.dropdownAlign,Ni=Jt.getPopupContainer,ni=Jt.empty,ki=Jt.getTriggerDOMNode,hn=Jt.onPopupVisibleChange,qn=Jt.onPopupMouseEnter,rr=(0,de.Z)(Jt,vt),pr="".concat(jt,"-dropdown"),wr=sn;Dr&&(wr=Dr(sn));var Ar=Se.useMemo(function(){return Fr||tt(zr)},[Fr,zr]),Kr=Dn?"".concat(pr,"-").concat(Dn):Jn,Qr=typeof zr=="number",qr=Se.useMemo(function(){return Qr?null:zr===!1?"minWidth":"width"},[zr,Qr]),lr=jn;Qr&&(lr=(0,Ue.Z)((0,Ue.Z)({},lr),{},{width:zr}));var rn=Se.useRef(null);return Se.useImperativeHandle(Xn,function(){return{getPopupElement:function(){var an;return(an=rn.current)===null||an===void 0?void 0:an.popupElement}}}),Se.createElement(mt.Z,(0,st.Z)({},rr,{showAction:hn?["click"]:[],hideAction:hn?["click"]:[],popupPlacement:sr||(_n==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ar,prefixCls:pr,popupTransitionName:Kr,popup:Se.createElement("div",{onMouseEnter:qn},wr),ref:rn,stretch:qr,popupAlign:pn,popupVisible:Nn,getPopupContainer:Ni,popupClassName:me()(Bn,(0,oe.Z)({},"".concat(pr,"-empty"),ni)),popupStyle:lr,getTriggerDOMNode:ki,onPopupVisibleChange:hn}),Yn)},we=Se.forwardRef(He),Ne=we,Xe=pt(68413);function nt(Ht,Jt){var Xn=Ht.key,jt;return"value"in Ht&&(jt=Ht.value),Xn!=null?Xn:jt!==void 0?jt:"rc-index-key-".concat(Jt)}function Ie(Ht){return typeof Ht!="undefined"&&!Number.isNaN(Ht)}function Re(Ht,Jt){var Xn=Ht||{},jt=Xn.label,ln=Xn.value,Nn=Xn.options,Yn=Xn.groupLabel,sn=jt||(Jt?"children":"label");return{label:sn,value:ln||"value",options:Nn||"options",groupLabel:Yn||sn}}function Ze(Ht){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xn=Jt.fieldNames,jt=Jt.childrenAsData,ln=[],Nn=Re(Xn,!1),Yn=Nn.label,sn=Nn.value,Dn=Nn.options,Jn=Nn.groupLabel;function jn(Bn,er){Array.isArray(Bn)&&Bn.forEach(function(_n){if(er||!(Dn in _n)){var sr=_n[sn];ln.push({key:nt(_n,ln.length),groupOption:er,data:_n,label:_n[Yn],value:sr})}else{var Fr=_n[Jn];Fr===void 0&&jt&&(Fr=_n.label),ln.push({key:nt(_n,ln.length),group:!0,data:_n,label:Fr}),jn(_n[Dn],!0)}})}return jn(Ht,!1),ln}function et(Ht){var Jt=(0,Ue.Z)({},Ht);return"props"in Jt||Object.defineProperty(Jt,"props",{get:function(){return(0,ke.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Jt}}),Jt}var ht=function(Jt,Xn,jt){if(!Xn||!Xn.length)return null;var ln=!1,Nn=function sn(Dn,Jn){var jn=(0,Xe.Z)(Jn),Bn=jn[0],er=jn.slice(1);if(!Bn)return[Dn];var _n=Dn.split(Bn);return ln=ln||_n.length>1,_n.reduce(function(sr,Fr){return[].concat((0,Ut.Z)(sr),(0,Ut.Z)(sn(Fr,er)))},[]).filter(Boolean)},Yn=Nn(Jt,Xn);return ln?typeof jt!="undefined"?Yn.slice(0,jt):Yn:null},at=Se.createContext(null),Dt=at;function Et(Ht){var Jt=Ht.visible,Xn=Ht.values;if(!Jt)return null;var jt=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Xn.slice(0,jt).map(function(ln){var Nn=ln.label,Yn=ln.value;return["number","string"].includes((0,ve.Z)(Nn))?Nn:Yn}).join(", ")),Xn.length>jt?", ...":null)}var Ot=["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"],qt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Qt=function(Jt){return Jt==="tags"||Jt==="multiple"},Xt=Se.forwardRef(function(Ht,Jt){var Xn,jt=Ht.id,ln=Ht.prefixCls,Nn=Ht.className,Yn=Ht.showSearch,sn=Ht.tagRender,Dn=Ht.direction,Jn=Ht.omitDomProps,jn=Ht.displayValues,Bn=Ht.onDisplayValuesChange,er=Ht.emptyOptions,_n=Ht.notFoundContent,sr=_n===void 0?"Not Found":_n,Fr=Ht.onClear,zr=Ht.mode,Dr=Ht.disabled,pn=Ht.loading,Ni=Ht.getInputElement,ni=Ht.getRawInputElement,ki=Ht.open,hn=Ht.defaultOpen,qn=Ht.onDropdownVisibleChange,rr=Ht.activeValue,pr=Ht.onActiveValueChange,wr=Ht.activeDescendantId,Ar=Ht.searchValue,Kr=Ht.autoClearSearchValue,Qr=Ht.onSearch,qr=Ht.onSearchSplit,lr=Ht.tokenSeparators,rn=Ht.allowClear,ir=Ht.prefix,an=Ht.suffixIcon,cr=Ht.clearIcon,Cr=Ht.OptionList,Gr=Ht.animation,Ri=Ht.transitionName,Fi=Ht.dropdownStyle,Si=Ht.dropdownClassName,Di=Ht.dropdownMatchSelectWidth,en=Ht.dropdownRender,dn=Ht.dropdownAlign,tn=Ht.placement,lt=Ht.builtinPlacements,zn=Ht.getPopupContainer,Pn=Ht.showAction,In=Pn===void 0?[]:Pn,Qn=Ht.onFocus,ar=Ht.onBlur,Sn=Ht.onKeyUp,Gn=Ht.onKeyDown,Hn=Ht.onMouseDown,Kn=(0,de.Z)(Ht,Ot),Zn=Qt(zr),Tr=(Yn!==void 0?Yn:Zn)||zr==="combobox",yr=(0,Ue.Z)({},Kn);qt.forEach(function(uo){delete yr[uo]}),Jn==null||Jn.forEach(function(uo){delete yr[uo]});var ur=Se.useState(!1),mn=(0,_e.Z)(ur,2),dr=mn[0],Or=mn[1];Se.useEffect(function(){Or((0,fe.Z)())},[]);var oi=Se.useRef(null),ei=Se.useRef(null),ui=Se.useRef(null),pi=Se.useRef(null),hi=Se.useRef(null),_i=Se.useRef(!1),zi=pe(),mo=(0,_e.Z)(zi,3),$t=mo[0],vi=mo[1],Ti=mo[2];Se.useImperativeHandle(Jt,function(){var uo,Bi;return{focus:(uo=pi.current)===null||uo===void 0?void 0:uo.focus,blur:(Bi=pi.current)===null||Bi===void 0?void 0:Bi.blur,scrollTo:function(la){var $o;return($o=hi.current)===null||$o===void 0?void 0:$o.scrollTo(la)},nativeElement:oi.current||ei.current}});var Xr=Se.useMemo(function(){var uo;if(zr!=="combobox")return Ar;var Bi=(uo=jn[0])===null||uo===void 0?void 0:uo.value;return typeof Bi=="string"||typeof Bi=="number"?String(Bi):""},[Ar,zr,jn]),Pi=zr==="combobox"&&typeof Ni=="function"&&Ni()||null,Wr=typeof ni=="function"&&ni(),eo=(0,z.x1)(ei,Wr==null||(Xn=Wr.props)===null||Xn===void 0?void 0:Xn.ref),Gi=Se.useState(!1),xi=(0,_e.Z)(Gi,2),qi=xi[0],ga=xi[1];(0,Pe.Z)(function(){ga(!0)},[]);var Ao=(0,Ee.Z)(!1,{defaultValue:hn,value:ki}),Aa=(0,_e.Z)(Ao,2),ma=Aa[0],Ur=Aa[1],to=qi?ma:!1,Co=!sr&&er;(Dr||Co&&to&&zr==="combobox")&&(to=!1);var Qo=Co?!1:to,Ci=Se.useCallback(function(uo){var Bi=uo!==void 0?uo:!to;Dr||(Ur(Bi),to!==Bi&&(qn==null||qn(Bi)))},[Dr,to,Ur,qn]),wi=Se.useMemo(function(){return(lr||[]).some(function(uo){return[`
|
|
`,`\r
|
|
`].includes(uo)})},[lr]),Ln=Se.useContext(Dt)||{},Vr=Ln.maxCount,Ei=Ln.rawValues,co=function(Bi,Wi,la){if(!(Zn&&Ie(Vr)&&(Ei==null?void 0:Ei.size)>=Vr)){var $o=!0,qo=Bi;pr==null||pr(null);var jr=ht(Bi,lr,Ie(Vr)?Vr-Ei.size:void 0),As=la?null:jr;return zr!=="combobox"&&As&&(qo="",qr==null||qr(As),Ci(!1),$o=!1),Qr&&Xr!==qo&&Qr(qo,{source:Wi?"typing":"effect"}),$o}},ba=function(Bi){!Bi||!Bi.trim()||Qr(Bi,{source:"submit"})};Se.useEffect(function(){!to&&!Zn&&zr!=="combobox"&&co("",!1,!1)},[to]),Se.useEffect(function(){ma&&Dr&&Ur(!1),Dr&&!_i.current&&vi(!1)},[Dr]);var aa=xe(),ai=(0,_e.Z)(aa,2),Wo=ai[0],Ko=ai[1],jo=Se.useRef(!1),io=function(Bi){var Wi=Wo(),la=Bi.key,$o=la==="Enter";if($o&&(zr!=="combobox"&&Bi.preventDefault(),to||Ci(!0)),Ko(!!Xr),la==="Backspace"&&!Wi&&Zn&&!Xr&&jn.length){for(var qo=(0,Ut.Z)(jn),jr=null,As=qo.length-1;As>=0;As-=1){var Gt=qo[As];if(!Gt.disabled){qo.splice(As,1),jr=Gt;break}}jr&&Bn(qo,{type:"remove",values:[jr]})}for(var Tn=arguments.length,Ml=new Array(Tn>1?Tn-1:0),Ou=1;Ou<Tn;Ou++)Ml[Ou-1]=arguments[Ou];if(to&&(!$o||!jo.current)){var ua;$o&&(jo.current=!0),(ua=hi.current)===null||ua===void 0||ua.onKeyDown.apply(ua,[Bi].concat(Ml))}Gn==null||Gn.apply(void 0,[Bi].concat(Ml))},Pa=function(Bi){for(var Wi=arguments.length,la=new Array(Wi>1?Wi-1:0),$o=1;$o<Wi;$o++)la[$o-1]=arguments[$o];if(to){var qo;(qo=hi.current)===null||qo===void 0||qo.onKeyUp.apply(qo,[Bi].concat(la))}Bi.key==="Enter"&&(jo.current=!1),Sn==null||Sn.apply(void 0,[Bi].concat(la))},is=function(Bi){var Wi=jn.filter(function(la){return la!==Bi});Bn(Wi,{type:"remove",values:[Bi]})},fo=function(){jo.current=!1},os=Se.useRef(!1),Gs=function(){vi(!0),Dr||(Qn&&!os.current&&Qn.apply(void 0,arguments),In.includes("focus")&&Ci(!0)),os.current=!0},Lu=function(){_i.current=!0,vi(!1,function(){os.current=!1,_i.current=!1,Ci(!1)}),!Dr&&(Xr&&(zr==="tags"?Qr(Xr,{source:"submit"}):zr==="multiple"&&Qr("",{source:"blur"})),ar&&ar.apply(void 0,arguments))},Ho=[];Se.useEffect(function(){return function(){Ho.forEach(function(uo){return clearTimeout(uo)}),Ho.splice(0,Ho.length)}},[]);var th=function(Bi){var Wi,la=Bi.target,$o=(Wi=ui.current)===null||Wi===void 0?void 0:Wi.getPopupElement();if($o&&$o.contains(la)){var qo=setTimeout(function(){var Tn=Ho.indexOf(qo);if(Tn!==-1&&Ho.splice(Tn,1),Ti(),!dr&&!$o.contains(document.activeElement)){var Ml;(Ml=pi.current)===null||Ml===void 0||Ml.focus()}});Ho.push(qo)}for(var jr=arguments.length,As=new Array(jr>1?jr-1:0),Gt=1;Gt<jr;Gt++)As[Gt-1]=arguments[Gt];Hn==null||Hn.apply(void 0,[Bi].concat(As))},Mu=Se.useState({}),Nu=(0,_e.Z)(Mu,2),gl=Nu[1];function Ns(){gl({})}var Ll;Wr&&(Ll=function(Bi){Ci(Bi)}),je(function(){var uo;return[oi.current,(uo=ui.current)===null||uo===void 0?void 0:uo.getPopupElement()]},Qo,Ci,!!Wr);var nh=Se.useMemo(function(){return(0,Ue.Z)((0,Ue.Z)({},Ht),{},{notFoundContent:sr,open:to,triggerOpen:Qo,id:jt,showSearch:Tr,multiple:Zn,toggleOpen:Ci})},[Ht,sr,Qo,to,jt,Tr,Zn,Ci]),Au=!!an||pn,Vo;Au&&(Vo=Se.createElement(se,{className:me()("".concat(ln,"-arrow"),(0,oe.Z)({},"".concat(ln,"-arrow-loading"),pn)),customizeIcon:an,customizeIconProps:{loading:pn,searchValue:Xr,open:to,focused:$t,showSearch:Tr}}));var ju=function(){var Bi;Fr==null||Fr(),(Bi=pi.current)===null||Bi===void 0||Bi.focus(),Bn([],{type:"clear",values:jn}),co("",!1,!1)},rh=ie(ln,ju,jn,rn,cr,Dr,Xr,zr),iu=rh.allowClear,ou=rh.clearIcon,ja=Se.createElement(Cr,{ref:hi}),Oa=me()(ln,Nn,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(ln,"-focused"),$t),"".concat(ln,"-multiple"),Zn),"".concat(ln,"-single"),!Zn),"".concat(ln,"-allow-clear"),rn),"".concat(ln,"-show-arrow"),Au),"".concat(ln,"-disabled"),Dr),"".concat(ln,"-loading"),pn),"".concat(ln,"-open"),to),"".concat(ln,"-customize-input"),Pi),"".concat(ln,"-show-search"),Tr)),na=Se.createElement(Ne,{ref:ui,disabled:Dr,prefixCls:ln,visible:Qo,popupElement:ja,animation:Gr,transitionName:Ri,dropdownStyle:Fi,dropdownClassName:Si,direction:Dn,dropdownMatchSelectWidth:Di,dropdownRender:en,dropdownAlign:dn,placement:tn,builtinPlacements:lt,getPopupContainer:zn,empty:er,getTriggerDOMNode:function(Bi){return ei.current||Bi},onPopupVisibleChange:Ll,onPopupMouseEnter:Ns},Wr?Se.cloneElement(Wr,{ref:eo}):Se.createElement(Ft,(0,st.Z)({},Ht,{domRef:ei,prefixCls:ln,inputElement:Pi,ref:pi,id:jt,prefix:ir,showSearch:Tr,autoClearSearchValue:Kr,mode:zr,activeDescendantId:wr,tagRender:sn,values:jn,open:to,onToggleOpen:Ci,activeValue:rr,searchValue:Xr,onSearch:co,onSearchSubmit:ba,onRemove:is,tokenWithEnter:wi,onInputBlur:fo}))),sa;return Wr?sa=na:sa=Se.createElement("div",(0,st.Z)({className:Oa},yr,{ref:oi,onMouseDown:th,onKeyDown:io,onKeyUp:Pa,onFocus:Gs,onBlur:Lu}),Se.createElement(Et,{visible:$t&&!to,values:jn}),na,Vo,iu&&ou),Se.createElement(le.Provider,{value:nh},sa)}),Wt=Xt,un=function(){return null};un.isSelectOptGroup=!0;var on=un,cn=function(){return null};cn.isSelectOption=!0;var bn=cn,xn=pt(80547),kn=pt(2738),On=pt(45680);function _r(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xr=["disabled","title","children","style","className"];function $r(Ht){return typeof Ht=="string"||typeof Ht=="number"}var tr=function(Jt,Xn){var jt=ce(),ln=jt.prefixCls,Nn=jt.id,Yn=jt.open,sn=jt.multiple,Dn=jt.mode,Jn=jt.searchValue,jn=jt.toggleOpen,Bn=jt.notFoundContent,er=jt.onPopupScroll,_n=Se.useContext(Dt),sr=_n.maxCount,Fr=_n.flattenOptions,zr=_n.onActiveValue,Dr=_n.defaultActiveFirstOption,pn=_n.onSelect,Ni=_n.menuItemSelectedIcon,ni=_n.rawValues,ki=_n.fieldNames,hn=_n.virtual,qn=_n.direction,rr=_n.listHeight,pr=_n.listItemHeight,wr=_n.optionRender,Ar="".concat(ln,"-item"),Kr=(0,xn.Z)(function(){return Fr},[Yn,Fr],function(Pn,In){return In[0]&&Pn[1]!==In[1]}),Qr=Se.useRef(null),qr=Se.useMemo(function(){return sn&&Ie(sr)&&(ni==null?void 0:ni.size)>=sr},[sn,sr,ni==null?void 0:ni.size]),lr=function(In){In.preventDefault()},rn=function(In){var Qn;(Qn=Qr.current)===null||Qn===void 0||Qn.scrollTo(typeof In=="number"?{index:In}:In)},ir=Se.useCallback(function(Pn){return Dn==="combobox"?!1:ni.has(Pn)},[Dn,(0,Ut.Z)(ni).toString(),ni.size]),an=function(In){for(var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ar=Kr.length,Sn=0;Sn<ar;Sn+=1){var Gn=(In+Sn*Qn+ar)%ar,Hn=Kr[Gn]||{},Kn=Hn.group,Zn=Hn.data;if(!Kn&&!(Zn!=null&&Zn.disabled)&&(ir(Zn.value)||!qr))return Gn}return-1},cr=Se.useState(function(){return an(0)}),Cr=(0,_e.Z)(cr,2),Gr=Cr[0],Ri=Cr[1],Fi=function(In){var Qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ri(In);var ar={source:Qn?"keyboard":"mouse"},Sn=Kr[In];if(!Sn){zr(null,-1,ar);return}zr(Sn.value,In,ar)};(0,Se.useEffect)(function(){Fi(Dr!==!1?an(0):-1)},[Kr.length,Jn]);var Si=Se.useCallback(function(Pn){return Dn==="combobox"?String(Pn).toLowerCase()===Jn.toLowerCase():ni.has(Pn)},[Dn,Jn,(0,Ut.Z)(ni).toString(),ni.size]);(0,Se.useEffect)(function(){var Pn=setTimeout(function(){if(!sn&&Yn&&ni.size===1){var Qn=Array.from(ni)[0],ar=Kr.findIndex(function(Sn){var Gn=Sn.data;return Gn.value===Qn});ar!==-1&&(Fi(ar),rn(ar))}});if(Yn){var In;(In=Qr.current)===null||In===void 0||In.scrollTo(void 0)}return function(){return clearTimeout(Pn)}},[Yn,Jn]);var Di=function(In){In!==void 0&&pn(In,{selected:!ni.has(In)}),sn||jn(!1)};if(Se.useImperativeHandle(Xn,function(){return{onKeyDown:function(In){var Qn=In.which,ar=In.ctrlKey;switch(Qn){case De.Z.N:case De.Z.P:case De.Z.UP:case De.Z.DOWN:{var Sn=0;if(Qn===De.Z.UP?Sn=-1:Qn===De.Z.DOWN?Sn=1:_r()&&ar&&(Qn===De.Z.N?Sn=1:Qn===De.Z.P&&(Sn=-1)),Sn!==0){var Gn=an(Gr+Sn,Sn);rn(Gn),Fi(Gn,!0)}break}case De.Z.TAB:case De.Z.ENTER:{var Hn,Kn=Kr[Gr];Kn&&!(Kn!=null&&(Hn=Kn.data)!==null&&Hn!==void 0&&Hn.disabled)&&!qr?Di(Kn.value):Di(void 0),Yn&&In.preventDefault();break}case De.Z.ESC:jn(!1),Yn&&In.stopPropagation()}},onKeyUp:function(){},scrollTo:function(In){rn(In)}}}),Kr.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(Nn,"_list"),className:"".concat(Ar,"-empty"),onMouseDown:lr},Bn);var en=Object.keys(ki).map(function(Pn){return ki[Pn]}),dn=function(In){return In.label};function tn(Pn,In){var Qn=Pn.group;return{role:Qn?"presentation":"option",id:"".concat(Nn,"_list_").concat(In)}}var lt=function(In){var Qn=Kr[In];if(!Qn)return null;var ar=Qn.data||{},Sn=ar.value,Gn=Qn.group,Hn=(0,Te.Z)(ar,!0),Kn=dn(Qn);return Qn?Se.createElement("div",(0,st.Z)({"aria-label":typeof Kn=="string"&&!Gn?Kn:null},Hn,{key:In},tn(Qn,In),{"aria-selected":Si(Sn)}),Sn):null},zn={role:"listbox",id:"".concat(Nn,"_list")};return Se.createElement(Se.Fragment,null,hn&&Se.createElement("div",(0,st.Z)({},zn,{style:{height:0,width:0,overflow:"hidden"}}),lt(Gr-1),lt(Gr),lt(Gr+1)),Se.createElement(On.Z,{itemKey:"key",ref:Qr,data:Kr,height:rr,itemHeight:pr,fullHeight:!1,onMouseDown:lr,onScroll:er,virtual:hn,direction:qn,innerProps:hn?null:zn},function(Pn,In){var Qn=Pn.group,ar=Pn.groupOption,Sn=Pn.data,Gn=Pn.label,Hn=Pn.value,Kn=Sn.key;if(Qn){var Zn,Tr=(Zn=Sn.title)!==null&&Zn!==void 0?Zn:$r(Gn)?Gn.toString():void 0;return Se.createElement("div",{className:me()(Ar,"".concat(Ar,"-group"),Sn.className),title:Tr},Gn!==void 0?Gn:Kn)}var yr=Sn.disabled,ur=Sn.title,mn=Sn.children,dr=Sn.style,Or=Sn.className,oi=(0,de.Z)(Sn,xr),ei=(0,kn.Z)(oi,en),ui=ir(Hn),pi=yr||!ui&&qr,hi="".concat(Ar,"-option"),_i=me()(Ar,hi,Or,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(hi,"-grouped"),ar),"".concat(hi,"-active"),Gr===In&&!pi),"".concat(hi,"-disabled"),pi),"".concat(hi,"-selected"),ui)),zi=dn(Pn),mo=!Ni||typeof Ni=="function"||ui,$t=typeof zi=="number"?zi:zi||Hn,vi=$r($t)?$t.toString():void 0;return ur!==void 0&&(vi=ur),Se.createElement("div",(0,st.Z)({},(0,Te.Z)(ei),hn?{}:tn(Pn,In),{"aria-selected":Si(Hn),className:_i,title:vi,onMouseMove:function(){Gr===In||pi||Fi(In)},onClick:function(){pi||Di(Hn)},style:dr}),Se.createElement("div",{className:"".concat(hi,"-content")},typeof wr=="function"?wr(Pn,{index:In}):$t),Se.isValidElement(Ni)||ui,mo&&Se.createElement(se,{className:"".concat(Ar,"-option-state"),customizeIcon:Ni,customizeIconProps:{value:Hn,disabled:pi,isSelected:ui}},ui?"\u2713":null))}))},ii=Se.forwardRef(tr),di=ii,li=function(Ht,Jt){var Xn=Se.useRef({values:new Map,options:new Map}),jt=Se.useMemo(function(){var Nn=Xn.current,Yn=Nn.values,sn=Nn.options,Dn=Ht.map(function(Bn){if(Bn.label===void 0){var er;return(0,Ue.Z)((0,Ue.Z)({},Bn),{},{label:(er=Yn.get(Bn.value))===null||er===void 0?void 0:er.label})}return Bn}),Jn=new Map,jn=new Map;return Dn.forEach(function(Bn){Jn.set(Bn.value,Bn),jn.set(Bn.value,Jt.get(Bn.value)||sn.get(Bn.value))}),Xn.current.values=Jn,Xn.current.options=jn,Dn},[Ht,Jt]),ln=Se.useCallback(function(Nn){return Jt.get(Nn)||Xn.current.options.get(Nn)},[Jt]);return[jt,ln]};function Mi(Ht,Jt){return Ke(Ht).join("").toUpperCase().includes(Jt)}var yi=function(Ht,Jt,Xn,jt,ln){return Se.useMemo(function(){if(!Xn||jt===!1)return Ht;var Nn=Jt.options,Yn=Jt.label,sn=Jt.value,Dn=[],Jn=typeof jt=="function",jn=Xn.toUpperCase(),Bn=Jn?jt:function(_n,sr){return ln?Mi(sr[ln],jn):sr[Nn]?Mi(sr[Yn!=="children"?Yn:"label"],jn):Mi(sr[sn],jn)},er=Jn?function(_n){return et(_n)}:function(_n){return _n};return Ht.forEach(function(_n){if(_n[Nn]){var sr=Bn(Xn,er(_n));if(sr)Dn.push(_n);else{var Fr=_n[Nn].filter(function(zr){return Bn(Xn,er(zr))});Fr.length&&Dn.push((0,Ue.Z)((0,Ue.Z)({},_n),{},(0,oe.Z)({},Nn,Fr)))}return}Bn(Xn,er(_n))&&Dn.push(_n)}),Dn},[Ht,jt,ln,Xn,Jt])},Jr=pt(69582),Li=pt(11592),qe=["children","value"],Mr=["children"];function Lr(Ht){var Jt=Ht,Xn=Jt.key,jt=Jt.props,ln=jt.children,Nn=jt.value,Yn=(0,de.Z)(jt,qe);return(0,Ue.Z)({key:Xn,value:Nn!==void 0?Nn:Xn,children:ln},Yn)}function br(Ht){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Li.Z)(Ht).map(function(Xn,jt){if(!Se.isValidElement(Xn)||!Xn.type)return null;var ln=Xn,Nn=ln.type.isSelectOptGroup,Yn=ln.key,sn=ln.props,Dn=sn.children,Jn=(0,de.Z)(sn,Mr);return Jt||!Nn?Lr(Xn):(0,Ue.Z)((0,Ue.Z)({key:"__RC_SELECT_GRP__".concat(Yn===null?jt:Yn,"__"),label:Yn},Jn),{},{options:br(Dn)})}).filter(function(Xn){return Xn})}var Pr=function(Jt,Xn,jt,ln,Nn){return Se.useMemo(function(){var Yn=Jt,sn=!Jt;sn&&(Yn=br(Xn));var Dn=new Map,Jn=new Map,jn=function(_n,sr,Fr){Fr&&typeof Fr=="string"&&_n.set(sr[Fr],sr)},Bn=function er(_n){for(var sr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fr=0;Fr<_n.length;Fr+=1){var zr=_n[Fr];!zr[jt.options]||sr?(Dn.set(zr[jt.value],zr),jn(Jn,zr,jt.label),jn(Jn,zr,ln),jn(Jn,zr,Nn)):er(zr[jt.options],!0)}};return Bn(Yn),{options:Yn,valueOptions:Dn,labelOptions:Jn}},[Jt,Xn,jt,ln,Nn])},kr=Pr;function Hi(Ht){var Jt=Se.useRef();Jt.current=Ht;var Xn=Se.useCallback(function(){return Jt.current.apply(Jt,arguments)},[]);return Xn}function gr(Ht){var Jt=Ht.mode,Xn=Ht.options,jt=Ht.children,ln=Ht.backfill,Nn=Ht.allowClear,Yn=Ht.placeholder,sn=Ht.getInputElement,Dn=Ht.showSearch,Jn=Ht.onSearch,jn=Ht.defaultOpen,Bn=Ht.autoFocus,er=Ht.labelInValue,_n=Ht.value,sr=Ht.inputValue,Fr=Ht.optionLabelProp,zr=isMultiple(Jt),Dr=Dn!==void 0?Dn:zr||Jt==="combobox",pn=Xn||convertChildrenToData(jt);if(warning(Jt!=="tags"||pn.every(function(hn){return!hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Jt==="tags"||Jt==="combobox"){var Ni=pn.some(function(hn){return hn.options?hn.options.some(function(qn){return typeof("value"in qn?qn.value:qn.key)=="number"}):typeof("value"in hn?hn.value:hn.key)=="number"});warning(!Ni,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Jt!=="combobox"||!Fr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Jt==="combobox"||!ln,"`backfill` only works with `combobox` mode."),warning(Jt==="combobox"||!sn,"`getInputElement` only work with `combobox` mode."),noteOnce(Jt!=="combobox"||!sn||!Nn||!Yn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Jn&&!Dr&&Jt!=="combobox"&&Jt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!jn||Bn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),_n!=null){var ni=toArray(_n);warning(!er||ni.every(function(hn){return _typeof(hn)==="object"&&("key"in hn||"value"in hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!zr||Array.isArray(_n),"`value` should be array when `mode` is `multiple` or `tags`")}if(jt){var ki=null;toNodeArray(jt).some(function(hn){if(!React.isValidElement(hn)||!hn.type)return!1;var qn=hn,rr=qn.type;if(rr.isSelectOption)return!1;if(rr.isSelectOptGroup){var pr=toNodeArray(hn.props.children).every(function(wr){return!React.isValidElement(wr)||!hn.type||wr.type.isSelectOption?!0:(ki=wr.type,!1)});return!pr}return ki=rr,!0}),ki&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ki.displayName||ki.name||ki,"`.")),warning(sr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function nr(Ht,Jt){if(Ht){var Xn=function jt(ln){for(var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Yn=0;Yn<ln.length;Yn++){var sn=ln[Yn];if(sn[Jt==null?void 0:Jt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Nn&&Array.isArray(sn[Jt==null?void 0:Jt.options])&&jt(sn[Jt==null?void 0:Jt.options],!0))break}};Xn(Ht)}}var Vt=null,Kt=["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"],zt=["inputValue"];function Mn(Ht){return!Ht||(0,ve.Z)(Ht)!=="object"}var Vn=Se.forwardRef(function(Ht,Jt){var Xn=Ht.id,jt=Ht.mode,ln=Ht.prefixCls,Nn=ln===void 0?"rc-select":ln,Yn=Ht.backfill,sn=Ht.fieldNames,Dn=Ht.inputValue,Jn=Ht.searchValue,jn=Ht.onSearch,Bn=Ht.autoClearSearchValue,er=Bn===void 0?!0:Bn,_n=Ht.onSelect,sr=Ht.onDeselect,Fr=Ht.dropdownMatchSelectWidth,zr=Fr===void 0?!0:Fr,Dr=Ht.filterOption,pn=Ht.filterSort,Ni=Ht.optionFilterProp,ni=Ht.optionLabelProp,ki=Ht.options,hn=Ht.optionRender,qn=Ht.children,rr=Ht.defaultActiveFirstOption,pr=Ht.menuItemSelectedIcon,wr=Ht.virtual,Ar=Ht.direction,Kr=Ht.listHeight,Qr=Kr===void 0?200:Kr,qr=Ht.listItemHeight,lr=qr===void 0?20:qr,rn=Ht.labelRender,ir=Ht.value,an=Ht.defaultValue,cr=Ht.labelInValue,Cr=Ht.onChange,Gr=Ht.maxCount,Ri=(0,de.Z)(Ht,Kt),Fi=(0,Jr.ZP)(Xn),Si=Qt(jt),Di=!!(!ki&&qn),en=Se.useMemo(function(){return Dr===void 0&&jt==="combobox"?!1:Dr},[Dr,jt]),dn=Se.useMemo(function(){return Re(sn,Di)},[JSON.stringify(sn),Di]),tn=(0,Ee.Z)("",{value:Jn!==void 0?Jn:Dn,postState:function(wi){return wi||""}}),lt=(0,_e.Z)(tn,2),zn=lt[0],Pn=lt[1],In=kr(ki,qn,dn,Ni,ni),Qn=In.valueOptions,ar=In.labelOptions,Sn=In.options,Gn=Se.useCallback(function(Ci){var wi=Ke(Ci);return wi.map(function(Ln){var Vr,Ei,co,ba,aa;if(Mn(Ln))Vr=Ln;else{var ai;co=Ln.key,Ei=Ln.label,Vr=(ai=Ln.value)!==null&&ai!==void 0?ai:co}var Wo=Qn.get(Vr);if(Wo){var Ko;if(Ei===void 0&&(Ei=Wo==null?void 0:Wo[ni||dn.label]),co===void 0&&(co=(Ko=Wo==null?void 0:Wo.key)!==null&&Ko!==void 0?Ko:Vr),ba=Wo==null?void 0:Wo.disabled,aa=Wo==null?void 0:Wo.title,0)var jo}return{label:Ei,value:Vr,key:co,disabled:ba,title:aa}})},[dn,ni,Qn]),Hn=(0,Ee.Z)(an,{value:ir}),Kn=(0,_e.Z)(Hn,2),Zn=Kn[0],Tr=Kn[1],yr=Se.useMemo(function(){var Ci,wi=Si&&Zn===null?[]:Zn,Ln=Gn(wi);return jt==="combobox"&&ft((Ci=Ln[0])===null||Ci===void 0?void 0:Ci.value)?[]:Ln},[Zn,Gn,jt,Si]),ur=li(yr,Qn),mn=(0,_e.Z)(ur,2),dr=mn[0],Or=mn[1],oi=Se.useMemo(function(){if(!jt&&dr.length===1){var Ci=dr[0];if(Ci.value===null&&(Ci.label===null||Ci.label===void 0))return[]}return dr.map(function(wi){var Ln;return(0,Ue.Z)((0,Ue.Z)({},wi),{},{label:(Ln=typeof rn=="function"?rn(wi):wi.label)!==null&&Ln!==void 0?Ln:wi.value})})},[jt,dr,rn]),ei=Se.useMemo(function(){return new Set(dr.map(function(Ci){return Ci.value}))},[dr]);Se.useEffect(function(){if(jt==="combobox"){var Ci,wi=(Ci=dr[0])===null||Ci===void 0?void 0:Ci.value;Pn(ut(wi)?String(wi):"")}},[dr]);var ui=Hi(function(Ci,wi){var Ln=wi!=null?wi:Ci;return(0,oe.Z)((0,oe.Z)({},dn.value,Ci),dn.label,Ln)}),pi=Se.useMemo(function(){if(jt!=="tags")return Sn;var Ci=(0,Ut.Z)(Sn),wi=function(Vr){return Qn.has(Vr)};return(0,Ut.Z)(dr).sort(function(Ln,Vr){return Ln.value<Vr.value?-1:1}).forEach(function(Ln){var Vr=Ln.value;wi(Vr)||Ci.push(ui(Vr,Ln.label))}),Ci},[ui,Sn,Qn,dr,jt]),hi=yi(pi,dn,zn,en,Ni),_i=Se.useMemo(function(){return jt!=="tags"||!zn||hi.some(function(Ci){return Ci[Ni||"value"]===zn})||hi.some(function(Ci){return Ci[dn.value]===zn})?hi:[ui(zn)].concat((0,Ut.Z)(hi))},[ui,Ni,jt,hi,zn,dn]),zi=function Ci(wi){var Ln=(0,Ut.Z)(wi).sort(function(Vr,Ei){return pn(Vr,Ei,{searchValue:zn})});return Ln.map(function(Vr){return Array.isArray(Vr.options)?(0,Ue.Z)((0,Ue.Z)({},Vr),{},{options:Vr.options.length>0?Ci(Vr.options):Vr.options}):Vr})},mo=Se.useMemo(function(){return pn?zi(_i):_i},[_i,pn,zn]),$t=Se.useMemo(function(){return Ze(mo,{fieldNames:dn,childrenAsData:Di})},[mo,dn,Di]),vi=function(wi){var Ln=Gn(wi);if(Tr(Ln),Cr&&(Ln.length!==dr.length||Ln.some(function(co,ba){var aa;return((aa=dr[ba])===null||aa===void 0?void 0:aa.value)!==(co==null?void 0:co.value)}))){var Vr=cr?Ln:Ln.map(function(co){return co.value}),Ei=Ln.map(function(co){return et(Or(co.value))});Cr(Si?Vr:Vr[0],Si?Ei:Ei[0])}},Ti=Se.useState(null),Xr=(0,_e.Z)(Ti,2),Pi=Xr[0],Wr=Xr[1],eo=Se.useState(0),Gi=(0,_e.Z)(eo,2),xi=Gi[0],qi=Gi[1],ga=rr!==void 0?rr:jt!=="combobox",Ao=Se.useCallback(function(Ci,wi){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Vr=Ln.source,Ei=Vr===void 0?"keyboard":Vr;qi(wi),Yn&&jt==="combobox"&&Ci!==null&&Ei==="keyboard"&&Wr(String(Ci))},[Yn,jt]),Aa=function(wi,Ln,Vr){var Ei=function(){var is,fo=Or(wi);return[cr?{label:fo==null?void 0:fo[dn.label],value:wi,key:(is=fo==null?void 0:fo.key)!==null&&is!==void 0?is:wi}:wi,et(fo)]};if(Ln&&_n){var co=Ei(),ba=(0,_e.Z)(co,2),aa=ba[0],ai=ba[1];_n(aa,ai)}else if(!Ln&&sr&&Vr!=="clear"){var Wo=Ei(),Ko=(0,_e.Z)(Wo,2),jo=Ko[0],io=Ko[1];sr(jo,io)}},ma=Hi(function(Ci,wi){var Ln,Vr=Si?wi.selected:!0;Vr?Ln=Si?[].concat((0,Ut.Z)(dr),[Ci]):[Ci]:Ln=dr.filter(function(Ei){return Ei.value!==Ci}),vi(Ln),Aa(Ci,Vr),jt==="combobox"?Wr(""):(!Qt||er)&&(Pn(""),Wr(""))}),Ur=function(wi,Ln){vi(wi);var Vr=Ln.type,Ei=Ln.values;(Vr==="remove"||Vr==="clear")&&Ei.forEach(function(co){Aa(co.value,!1,Vr)})},to=function(wi,Ln){if(Pn(wi),Wr(null),Ln.source==="submit"){var Vr=(wi||"").trim();if(Vr){var Ei=Array.from(new Set([].concat((0,Ut.Z)(ei),[Vr])));vi(Ei),Aa(Vr,!0),Pn("")}return}Ln.source!=="blur"&&(jt==="combobox"&&vi(wi),jn==null||jn(wi))},Co=function(wi){var Ln=wi;jt!=="tags"&&(Ln=wi.map(function(Ei){var co=ar.get(Ei);return co==null?void 0:co.value}).filter(function(Ei){return Ei!==void 0}));var Vr=Array.from(new Set([].concat((0,Ut.Z)(ei),(0,Ut.Z)(Ln))));vi(Vr),Vr.forEach(function(Ei){Aa(Ei,!0)})},Qo=Se.useMemo(function(){var Ci=wr!==!1&&zr!==!1;return(0,Ue.Z)((0,Ue.Z)({},In),{},{flattenOptions:$t,onActiveValue:Ao,defaultActiveFirstOption:ga,onSelect:ma,menuItemSelectedIcon:pr,rawValues:ei,fieldNames:dn,virtual:Ci,direction:Ar,listHeight:Qr,listItemHeight:lr,childrenAsData:Di,maxCount:Gr,optionRender:hn})},[Gr,In,$t,Ao,ga,ma,pr,ei,dn,wr,zr,Ar,Qr,lr,Di,hn]);return Se.createElement(Dt.Provider,{value:Qo},Se.createElement(Wt,(0,st.Z)({},Ri,{id:Fi,prefixCls:Nn,ref:Jt,omitDomProps:zt,mode:jt,displayValues:oi,onDisplayValuesChange:Ur,direction:Ar,searchValue:zn,onSearch:to,autoClearSearchValue:er,onSearchSplit:Co,dropdownMatchSelectWidth:zr,OptionList:di,emptyOptions:!$t.length,activeValue:Pi,activeDescendantId:"".concat(Fi,"_list_").concat(xi)})))}),vr=Vn;vr.Option=bn,vr.OptGroup=on;var vn=vr,Wn=vn},63158:function(Rn,An,pt){"use strict";var st=pt(72308),Ut=pt(49618),oe=pt(52487),Ue=pt(74416),_e=pt(59301),de=pt(92310),ve=pt.n(de),Ee=pt(18929),ke=pt(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ae=_e.forwardRef(function(me,Pe){var fe,z=me.prefixCls,te=z===void 0?"rc-switch":z,se=me.className,ie=me.checked,le=me.defaultChecked,ce=me.disabled,pe=me.loadingIcon,xe=me.checkedChildren,je=me.unCheckedChildren,De=me.onClick,Fe=me.onChange,Te=me.onKeyDown,Me=(0,Ue.Z)(me,Se),Be=(0,Ee.Z)(!1,{value:ie,defaultValue:le}),Ge=(0,oe.Z)(Be,2),Ye=Ge[0],Ke=Ge[1];function Ve(St,Qe){var rt=Ye;return ce||(rt=St,Ke(rt),Fe==null||Fe(rt,Qe)),rt}function ot(St){St.which===ke.Z.LEFT?Ve(!1,St):St.which===ke.Z.RIGHT&&Ve(!0,St),Te==null||Te(St)}function ut(St){var Qe=Ve(!Ye,St);De==null||De(Qe,St)}var ft=ve()(te,se,(fe={},(0,Ut.Z)(fe,"".concat(te,"-checked"),Ye),(0,Ut.Z)(fe,"".concat(te,"-disabled"),ce),fe));return _e.createElement("button",(0,st.Z)({},Me,{type:"button",role:"switch","aria-checked":Ye,disabled:ce,className:ft,ref:Pe,onKeyDown:ot,onClick:ut}),pe,_e.createElement("span",{className:"".concat(te,"-inner")},_e.createElement("span",{className:"".concat(te,"-inner-checked")},xe),_e.createElement("span",{className:"".concat(te,"-inner-unchecked")},je)))});Ae.displayName="Switch",An.Z=Ae},67204:function(Rn,An,pt){"use strict";pt.d(An,{R:function(){return Ut},w:function(){return st}});var st={},Ut="rc-table-internal-hook"},78612:function(Rn,An,pt){"use strict";pt.d(An,{L:function(){return te},Z:function(){return pe}});var st=pt(52487),Ut=pt(49618),oe=pt(80702),Ue=pt(62853),_e=pt(77321),de=pt(74416),ve=pt(11592),Ee=pt(48736),ke=pt(59301),Se=pt(67204),Ae=pt(90494);function me(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?xe*parseFloat(je)/100:null}function Pe(xe,je,De){return ke.useMemo(function(){if(je&&je>0){var Fe=0,Te=0;xe.forEach(function(ut){var ft=me(je,ut.width);ft?Fe+=ft:Te+=1});var Me=Math.max(je,De),Be=Math.max(Me-Fe,Te),Ge=Te,Ye=Be/Te,Ke=0,Ve=xe.map(function(ut){var ft=(0,_e.Z)({},ut),St=me(je,ft.width);if(St)ft.width=St;else{var Qe=Math.floor(Ye);ft.width=Ge===1?Be:Qe,Be-=Qe,Ge-=1}return Ke+=ft.width,ft});if(Ke<Me){var ot=Me/Ke;Be=Me,Ve.forEach(function(ut,ft){var St=Math.floor(ut.width*ot);ut.width=ft===Ve.length-1?Be:St,Be-=St})}return[Ve,Math.max(Ke,Me)]}return[xe,je]},[xe,je,De])}var fe=["children"],z=["fixed"];function te(xe){return(0,ve.Z)(xe).filter(function(je){return ke.isValidElement(je)}).map(function(je){var De=je.key,Fe=je.props,Te=Fe.children,Me=(0,de.Z)(Fe,fe),Be=(0,_e.Z)({key:De},Me);return Te&&(Be.children=te(Te)),Be})}function se(xe){return xe.filter(function(je){return je&&(0,Ue.Z)(je)==="object"&&!je.hidden}).map(function(je){var De=je.children;return De&&De.length>0?(0,_e.Z)((0,_e.Z)({},je),{},{children:se(De)}):je})}function ie(xe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return xe.filter(function(De){return De&&(0,Ue.Z)(De)==="object"}).reduce(function(De,Fe,Te){var Me=Fe.fixed,Be=Me===!0?"left":Me,Ge="".concat(je,"-").concat(Te),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(De),(0,oe.Z)(ie(Ye,Ge).map(function(Ke){return(0,_e.Z)({fixed:Be},Ke)}))):[].concat((0,oe.Z)(De),[(0,_e.Z)((0,_e.Z)({key:Ge},Fe),{},{fixed:Be})])},[])}function le(xe){return xe.map(function(je){var De=je.fixed,Fe=(0,de.Z)(je,z),Te=De;return De==="left"?Te="right":De==="right"&&(Te="left"),(0,_e.Z)({fixed:Te},Fe)})}function ce(xe,je){var De=xe.prefixCls,Fe=xe.columns,Te=xe.children,Me=xe.expandable,Be=xe.expandedKeys,Ge=xe.columnTitle,Ye=xe.getRowKey,Ke=xe.onTriggerExpand,Ve=xe.expandIcon,ot=xe.rowExpandable,ut=xe.expandIconColumnIndex,ft=xe.direction,St=xe.expandRowByClick,Qe=xe.columnWidth,rt=xe.fixed,wt=xe.scrollWidth,Ct=xe.clientWidth,bt=ke.useMemo(function(){var tt=Fe||te(Te)||[];return se(tt.slice())},[Fe,Te]),ct=ke.useMemo(function(){if(Me){var tt=bt.slice();if(!tt.includes(Se.w)){var He=ut||0;He>=0&&(He||rt==="left"||!rt)&&tt.splice(He,0,Se.w),rt==="right"&&tt.splice(bt.length,0,Se.w)}var we=tt.indexOf(Se.w);tt=tt.filter(function(Ie,Re){return Ie!==Se.w||Re===we});var Ne=bt[we],Xe;rt?Xe=rt:Xe=Ne?Ne.fixed:null;var nt=(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)({},Ae.v,{className:"".concat(De,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Ge),"fixed",Xe),"className","".concat(De,"-row-expand-icon-cell")),"width",Qe),"render",function(Re,Ze,et){var ht=Ye(Ze,et),at=Be.has(ht),Dt=ot?ot(Ze):!0,Et=Ve({prefixCls:De,expanded:at,expandable:Dt,record:Ze,onExpand:Ke});return St?ke.createElement("span",{onClick:function(qt){return qt.stopPropagation()}},Et):Et});return tt.map(function(Ie){return Ie===Se.w?nt:Ie})}return bt.filter(function(Ie){return Ie!==Se.w})},[Me,bt,Ye,Be,Ve,ft]),xt=ke.useMemo(function(){var tt=ct;return je&&(tt=je(tt)),tt.length||(tt=[{render:function(){return null}}]),tt},[je,ct,ft]),dt=ke.useMemo(function(){return ft==="rtl"?le(ie(xt)):ie(xt)},[xt,ft,wt]),Mt=ke.useMemo(function(){for(var tt=-1,He=dt.length-1;He>=0;He-=1){var we=dt[He].fixed;if(we==="left"||we===!0){tt=He;break}}if(tt>=0)for(var Ne=0;Ne<=tt;Ne+=1){var Xe=dt[Ne].fixed;if(Xe!=="left"&&Xe!==!0)return!0}var nt=dt.findIndex(function(Ze){var et=Ze.fixed;return et==="right"});if(nt>=0)for(var Ie=nt;Ie<dt.length;Ie+=1){var Re=dt[Ie].fixed;if(Re!=="right")return!0}return!1},[dt]),yt=Pe(dt,wt,Ct),Ft=(0,st.Z)(yt,2),mt=Ft[0],vt=Ft[1];return[xt,mt,vt,Mt]}var pe=ce},16596:function(Rn,An,pt){"use strict";pt.d(An,{w2:function(){return st.w},vP:function(){return di.v},RQ:function(){return st.R},ER:function(){return ht},Q$:function(){return ni},TN:function(){return Fi}});var st=pt(67204),Ut=pt(52487),oe=pt(6089),Ue=pt(34280),_e=pt(13697),de=pt(59301),ve=pt(4676);function Ee(en){var dn=de.createContext(void 0),tn=function(zn){var Pn=zn.value,In=zn.children,Qn=de.useRef(Pn);Qn.current=Pn;var ar=de.useState(function(){return{getValue:function(){return Qn.current},listeners:new Set}}),Sn=(0,Ut.Z)(ar,1),Gn=Sn[0];return(0,Ue.Z)(function(){(0,ve.unstable_batchedUpdates)(function(){Gn.listeners.forEach(function(Hn){Hn(Pn)})})},[Pn]),de.createElement(dn.Provider,{value:Gn},In)};return{Context:dn,Provider:tn,defaultValue:en}}function ke(en,dn){var tn=(0,oe.Z)(typeof dn=="function"?dn:function(Hn){if(dn===void 0)return Hn;if(!Array.isArray(dn))return Hn[dn];var Kn={};return dn.forEach(function(Zn){Kn[Zn]=Hn[Zn]}),Kn}),lt=de.useContext(en==null?void 0:en.Context),zn=lt||{},Pn=zn.listeners,In=zn.getValue,Qn=de.useRef();Qn.current=tn(lt?In():en==null?void 0:en.defaultValue);var ar=de.useState({}),Sn=(0,Ut.Z)(ar,2),Gn=Sn[1];return(0,Ue.Z)(function(){if(!lt)return;function Hn(Kn){var Zn=tn(Kn);(0,_e.Z)(Qn.current,Zn,!0)||Gn({})}return Pn.add(Hn),function(){Pn.delete(Hn)}},[lt]),Qn.current}var Se=pt(72308),Ae=pt(8654);function me(){var en=de.createContext(null);function dn(){return de.useContext(en)}function tn(zn,Pn){var In=(0,Ae.Yr)(zn),Qn=function(Sn,Gn){var Hn=In?{ref:Gn}:{},Kn=de.useRef(0),Zn=de.useRef(Sn),Tr=dn();return Tr!==null?de.createElement(zn,(0,Se.Z)({},Sn,Hn)):((!Pn||Pn(Zn.current,Sn))&&(Kn.current+=1),Zn.current=Sn,de.createElement(en.Provider,{value:Kn.current},de.createElement(zn,(0,Se.Z)({},Sn,Hn))))};return In?de.forwardRef(Qn):Qn}function lt(zn,Pn){var In=(0,Ae.Yr)(zn),Qn=function(Sn,Gn){var Hn=In?{ref:Gn}:{};return dn(),de.createElement(zn,(0,Se.Z)({},Sn,Hn))};return In?de.memo(de.forwardRef(Qn),Pn):de.memo(Qn,Pn)}return{makeImmutable:tn,responseImmutable:lt,useImmutableMark:dn}}var Pe=me(),fe=Pe.makeImmutable,z=Pe.responseImmutable,te=Pe.useImmutableMark,se=me(),ie=se.makeImmutable,le=se.responseImmutable,ce=se.useImmutableMark,pe=Ee(),xe=pe;function je(en,dn){var tn=React.useRef(0);tn.current+=1;var lt=React.useRef(en),zn=[];Object.keys(en||{}).map(function(In){var Qn;(en==null?void 0:en[In])!==((Qn=lt.current)===null||Qn===void 0?void 0:Qn[In])&&zn.push(In)}),lt.current=en;var Pn=React.useRef([]);return zn.length&&(Pn.current=zn),React.useDebugValue(tn.current),React.useDebugValue(Pn.current.join(", ")),dn&&console.log("".concat(dn,":"),tn.current,Pn.current),tn.current}var De=null,Fe=null,Te=pt(62853),Me=pt(77321),Be=pt(49618),Ge=pt(92310),Ye=pt.n(Ge),Ke=pt(80547),Ve=pt(97938),ot=pt(48736),ut=de.createContext({renderWithProps:!1}),ft=ut,St="RC_TABLE_KEY";function Qe(en){return en==null?[]:Array.isArray(en)?en:[en]}function rt(en){var dn=[],tn={};return en.forEach(function(lt){for(var zn=lt||{},Pn=zn.key,In=zn.dataIndex,Qn=Pn||Qe(In).join("-")||St;tn[Qn];)Qn="".concat(Qn,"_next");tn[Qn]=!0,dn.push(Qn)}),dn}function wt(en){return en!=null}function Ct(en){return typeof en=="number"&&!Number.isNaN(en)}function bt(en){return en&&(0,Te.Z)(en)==="object"&&!Array.isArray(en)&&!de.isValidElement(en)}function ct(en,dn,tn,lt,zn,Pn){var In=de.useContext(ft),Qn=ce(),ar=(0,Ke.Z)(function(){if(wt(lt))return[lt];var Sn=dn==null||dn===""?[]:Array.isArray(dn)?dn:[dn],Gn=(0,Ve.Z)(en,Sn),Hn=Gn,Kn=void 0;if(zn){var Zn=zn(Gn,en,tn);bt(Zn)?(Hn=Zn.children,Kn=Zn.props,In.renderWithProps=!0):Hn=Zn}return[Hn,Kn]},[Qn,en,lt,dn,zn,tn],function(Sn,Gn){if(Pn){var Hn=(0,Ut.Z)(Sn,2),Kn=Hn[1],Zn=(0,Ut.Z)(Gn,2),Tr=Zn[1];return Pn(Tr,Kn)}return In.renderWithProps?!0:!(0,_e.Z)(Sn,Gn,!0)});return ar}function xt(en,dn,tn,lt){var zn=en+dn-1;return en<=lt&&zn>=tn}function dt(en,dn){return ke(xe,function(tn){var lt=xt(en,dn||1,tn.hoverStartRow,tn.hoverEndRow);return[lt,tn.onHover]})}var Mt=pt(70425),yt=function(dn){var tn=dn.ellipsis,lt=dn.rowType,zn=dn.children,Pn,In=tn===!0?{showTitle:!0}:tn;return In&&(In.showTitle||lt==="header")&&(typeof zn=="string"||typeof zn=="number"?Pn=zn.toString():de.isValidElement(zn)&&typeof zn.props.children=="string"&&(Pn=zn.props.children)),Pn};function Ft(en){var dn,tn,lt,zn,Pn,In,Qn,ar,Sn=en.component,Gn=en.children,Hn=en.ellipsis,Kn=en.scope,Zn=en.prefixCls,Tr=en.className,yr=en.align,ur=en.record,mn=en.render,dr=en.dataIndex,Or=en.renderIndex,oi=en.shouldCellUpdate,ei=en.index,ui=en.rowType,pi=en.colSpan,hi=en.rowSpan,_i=en.fixLeft,zi=en.fixRight,mo=en.firstFixLeft,$t=en.lastFixLeft,vi=en.firstFixRight,Ti=en.lastFixRight,Xr=en.appendNode,Pi=en.additionalProps,Wr=Pi===void 0?{}:Pi,eo=en.isSticky,Gi="".concat(Zn,"-cell"),xi=ke(xe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),qi=xi.supportSticky,ga=xi.allColumnsFixedLeft,Ao=xi.rowHoverable,Aa=ct(ur,dr,Or,Gn,mn,oi),ma=(0,Ut.Z)(Aa,2),Ur=ma[0],to=ma[1],Co={},Qo=typeof _i=="number"&&qi,Ci=typeof zi=="number"&&qi;Qo&&(Co.position="sticky",Co.left=_i),Ci&&(Co.position="sticky",Co.right=zi);var wi=(dn=(tn=(lt=to==null?void 0:to.colSpan)!==null&<!==void 0?lt:Wr.colSpan)!==null&&tn!==void 0?tn:pi)!==null&&dn!==void 0?dn:1,Ln=(zn=(Pn=(In=to==null?void 0:to.rowSpan)!==null&&In!==void 0?In:Wr.rowSpan)!==null&&Pn!==void 0?Pn:hi)!==null&&zn!==void 0?zn:1,Vr=dt(ei,Ln),Ei=(0,Ut.Z)(Vr,2),co=Ei[0],ba=Ei[1],aa=(0,Mt.zX)(function(is){var fo;ur&&ba(ei,ei+Ln-1),Wr==null||(fo=Wr.onMouseEnter)===null||fo===void 0||fo.call(Wr,is)}),ai=(0,Mt.zX)(function(is){var fo;ur&&ba(-1,-1),Wr==null||(fo=Wr.onMouseLeave)===null||fo===void 0||fo.call(Wr,is)});if(wi===0||Ln===0)return null;var Wo=(Qn=Wr.title)!==null&&Qn!==void 0?Qn:yt({rowType:ui,ellipsis:Hn,children:Ur}),Ko=Ye()(Gi,Tr,(ar={},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)(ar,"".concat(Gi,"-fix-left"),Qo&&qi),"".concat(Gi,"-fix-left-first"),mo&&qi),"".concat(Gi,"-fix-left-last"),$t&&qi),"".concat(Gi,"-fix-left-all"),$t&&ga&&qi),"".concat(Gi,"-fix-right"),Ci&&qi),"".concat(Gi,"-fix-right-first"),vi&&qi),"".concat(Gi,"-fix-right-last"),Ti&&qi),"".concat(Gi,"-ellipsis"),Hn),"".concat(Gi,"-with-append"),Xr),"".concat(Gi,"-fix-sticky"),(Qo||Ci)&&eo&&qi),(0,Be.Z)(ar,"".concat(Gi,"-row-hover"),!to&&co)),Wr.className,to==null?void 0:to.className),jo={};yr&&(jo.textAlign=yr);var io=(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},to==null?void 0:to.style),Co),jo),Wr.style),Pa=Ur;return(0,Te.Z)(Pa)==="object"&&!Array.isArray(Pa)&&!de.isValidElement(Pa)&&(Pa=null),Hn&&($t||vi)&&(Pa=de.createElement("span",{className:"".concat(Gi,"-content")},Pa)),de.createElement(Sn,(0,Se.Z)({},to,Wr,{className:Ko,style:io,title:Wo,scope:Kn,onMouseEnter:Ao?aa:void 0,onMouseLeave:Ao?ai:void 0,colSpan:wi!==1?wi:null,rowSpan:Ln!==1?Ln:null}),Xr,Pa)}var mt=de.memo(Ft);function vt(en,dn,tn,lt,zn){var Pn=tn[en]||{},In=tn[dn]||{},Qn,ar;Pn.fixed==="left"?Qn=lt.left[zn==="rtl"?dn:en]:In.fixed==="right"&&(ar=lt.right[zn==="rtl"?en:dn]);var Sn=!1,Gn=!1,Hn=!1,Kn=!1,Zn=tn[dn+1],Tr=tn[en-1],yr=Zn&&!Zn.fixed||Tr&&!Tr.fixed||tn.every(function(oi){return oi.fixed==="left"});if(zn==="rtl"){if(Qn!==void 0){var ur=Tr&&Tr.fixed==="left";Kn=!ur&&yr}else if(ar!==void 0){var mn=Zn&&Zn.fixed==="right";Hn=!mn&&yr}}else if(Qn!==void 0){var dr=Zn&&Zn.fixed==="left";Sn=!dr&&yr}else if(ar!==void 0){var Or=Tr&&Tr.fixed==="right";Gn=!Or&&yr}return{fixLeft:Qn,fixRight:ar,lastFixLeft:Sn,firstFixRight:Gn,lastFixRight:Hn,firstFixLeft:Kn,isSticky:lt.isSticky}}var tt=de.createContext({}),He=tt;function we(en){var dn=en.className,tn=en.index,lt=en.children,zn=en.colSpan,Pn=zn===void 0?1:zn,In=en.rowSpan,Qn=en.align,ar=ke(xe,["prefixCls","direction"]),Sn=ar.prefixCls,Gn=ar.direction,Hn=de.useContext(He),Kn=Hn.scrollColumnIndex,Zn=Hn.stickyOffsets,Tr=Hn.flattenColumns,yr=tn+Pn-1,ur=yr+1===Kn?Pn+1:Pn,mn=vt(tn,tn+ur-1,Tr,Zn,Gn);return de.createElement(mt,(0,Se.Z)({className:dn,index:tn,component:"td",prefixCls:Sn,record:null,dataIndex:null,align:Qn,colSpan:ur,rowSpan:In,render:function(){return lt}},mn))}var Ne=pt(74416),Xe=["children"];function nt(en){var dn=en.children,tn=(0,Ne.Z)(en,Xe);return de.createElement("tr",tn,dn)}function Ie(en){var dn=en.children;return dn}Ie.Row=nt,Ie.Cell=we;var Re=Ie;function Ze(en){var dn=en.children,tn=en.stickyOffsets,lt=en.flattenColumns,zn=ke(xe,"prefixCls"),Pn=lt.length-1,In=lt[Pn],Qn=de.useMemo(function(){return{stickyOffsets:tn,flattenColumns:lt,scrollColumnIndex:In!=null&&In.scrollbar?Pn:null}},[In,lt,Pn,tn]);return de.createElement(He.Provider,{value:Qn},de.createElement("tfoot",{className:"".concat(zn,"-summary")},dn))}var et=le(Ze),ht=Re,at=pt(29301),Dt=pt(29194),Et=pt(24514),Ot=pt(75152),qt=pt(26112);function Qt(en,dn,tn,lt,zn,Pn,In){en.push({record:dn,indent:tn,index:In});var Qn=Pn(dn),ar=zn==null?void 0:zn.has(Qn);if(dn&&Array.isArray(dn[lt])&&ar)for(var Sn=0;Sn<dn[lt].length;Sn+=1)Qt(en,dn[lt][Sn],tn+1,lt,zn,Pn,Sn)}function Xt(en,dn,tn,lt){var zn=de.useMemo(function(){if(tn!=null&&tn.size){for(var Pn=[],In=0;In<(en==null?void 0:en.length);In+=1){var Qn=en[In];Qt(Pn,Qn,0,dn,tn,lt,In)}return Pn}return en==null?void 0:en.map(function(ar,Sn){return{record:ar,indent:0,index:Sn}})},[en,dn,tn,lt]);return zn}function Wt(en,dn,tn,lt){var zn=ke(xe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Pn=zn.flattenColumns,In=zn.expandableType,Qn=zn.expandedKeys,ar=zn.childrenColumnName,Sn=zn.onTriggerExpand,Gn=zn.rowExpandable,Hn=zn.onRow,Kn=zn.expandRowByClick,Zn=zn.rowClassName,Tr=In==="nest",yr=In==="row"&&(!Gn||Gn(en)),ur=yr||Tr,mn=Qn&&Qn.has(dn),dr=ar&&en&&en[ar],Or=(0,Mt.zX)(Sn),oi=Hn==null?void 0:Hn(en,tn),ei=oi==null?void 0:oi.onClick,ui=function(zi){Kn&&ur&&Sn(en,zi);for(var mo=arguments.length,$t=new Array(mo>1?mo-1:0),vi=1;vi<mo;vi++)$t[vi-1]=arguments[vi];ei==null||ei.apply(void 0,[zi].concat($t))},pi;typeof Zn=="string"?pi=Zn:typeof Zn=="function"&&(pi=Zn(en,tn,lt));var hi=rt(Pn);return(0,Me.Z)((0,Me.Z)({},zn),{},{columnsKey:hi,nestExpandable:Tr,expanded:mn,hasNestChildren:dr,record:en,onTriggerExpand:Or,rowSupportExpand:yr,expandable:ur,rowProps:(0,Me.Z)((0,Me.Z)({},oi),{},{className:Ye()(pi,oi==null?void 0:oi.className),onClick:ui})})}function un(en){var dn=en.prefixCls,tn=en.children,lt=en.component,zn=en.cellComponent,Pn=en.className,In=en.expanded,Qn=en.colSpan,ar=en.isEmpty,Sn=ke(xe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Gn=Sn.scrollbarSize,Hn=Sn.fixHeader,Kn=Sn.fixColumn,Zn=Sn.componentWidth,Tr=Sn.horizonScroll,yr=tn;return(ar?Tr&&Zn:Kn)&&(yr=de.createElement("div",{style:{width:Zn-(Hn&&!ar?Gn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(dn,"-expanded-row-fixed")},yr)),de.createElement(lt,{className:Pn,style:{display:In?null:"none"}},de.createElement(mt,{component:zn,prefixCls:dn,colSpan:Qn},yr))}var on=un;function cn(en){var dn=en.prefixCls,tn=en.record,lt=en.onExpand,zn=en.expanded,Pn=en.expandable,In="".concat(dn,"-row-expand-icon");if(!Pn)return de.createElement("span",{className:Ye()(In,"".concat(dn,"-row-spaced"))});var Qn=function(Sn){lt(tn,Sn),Sn.stopPropagation()};return de.createElement("span",{className:Ye()(In,(0,Be.Z)((0,Be.Z)({},"".concat(dn,"-row-expanded"),zn),"".concat(dn,"-row-collapsed"),!zn)),onClick:Qn})}function bn(en,dn,tn){var lt=[];function zn(Pn){(Pn||[]).forEach(function(In,Qn){lt.push(dn(In,Qn)),zn(In[tn])})}return zn(en),lt}function xn(en,dn,tn,lt){return typeof en=="string"?en:typeof en=="function"?en(dn,tn,lt):""}function kn(en,dn,tn,lt,zn){var Pn=en.record,In=en.prefixCls,Qn=en.columnsKey,ar=en.fixedInfoList,Sn=en.expandIconColumnIndex,Gn=en.nestExpandable,Hn=en.indentSize,Kn=en.expandIcon,Zn=en.expanded,Tr=en.hasNestChildren,yr=en.onTriggerExpand,ur=Qn[tn],mn=ar[tn],dr;tn===(Sn||0)&&Gn&&(dr=de.createElement(de.Fragment,null,de.createElement("span",{style:{paddingLeft:"".concat(Hn*lt,"px")},className:"".concat(In,"-row-indent indent-level-").concat(lt)}),Kn({prefixCls:In,expanded:Zn,expandable:Tr,record:Pn,onExpand:yr})));var Or;return dn.onCell&&(Or=dn.onCell(Pn,zn)),{key:ur,fixedInfo:mn,appendCellNode:dr,additionalCellProps:Or||{}}}function On(en){var dn=en.className,tn=en.style,lt=en.record,zn=en.index,Pn=en.renderIndex,In=en.rowKey,Qn=en.indent,ar=Qn===void 0?0:Qn,Sn=en.rowComponent,Gn=en.cellComponent,Hn=en.scopeCellComponent,Kn=Wt(lt,In,zn,ar),Zn=Kn.prefixCls,Tr=Kn.flattenColumns,yr=Kn.expandedRowClassName,ur=Kn.expandedRowRender,mn=Kn.rowProps,dr=Kn.expanded,Or=Kn.rowSupportExpand,oi=de.useRef(!1);oi.current||(oi.current=dr);var ei=xn(yr,lt,zn,ar),ui=de.createElement(Sn,(0,Se.Z)({},mn,{"data-row-key":In,className:Ye()(dn,"".concat(Zn,"-row"),"".concat(Zn,"-row-level-").concat(ar),mn==null?void 0:mn.className,(0,Be.Z)({},ei,ar>=1)),style:(0,Me.Z)((0,Me.Z)({},tn),mn==null?void 0:mn.style)}),Tr.map(function(_i,zi){var mo=_i.render,$t=_i.dataIndex,vi=_i.className,Ti=kn(Kn,_i,zi,ar,zn),Xr=Ti.key,Pi=Ti.fixedInfo,Wr=Ti.appendCellNode,eo=Ti.additionalCellProps;return de.createElement(mt,(0,Se.Z)({className:vi,ellipsis:_i.ellipsis,align:_i.align,scope:_i.rowScope,component:_i.rowScope?Hn:Gn,prefixCls:Zn,key:Xr,record:lt,index:zn,renderIndex:Pn,dataIndex:$t,render:mo,shouldCellUpdate:_i.shouldCellUpdate},Pi,{appendNode:Wr,additionalProps:eo}))})),pi;if(Or&&(oi.current||dr)){var hi=ur(lt,zn,ar+1,dr);pi=de.createElement(on,{expanded:dr,className:Ye()("".concat(Zn,"-expanded-row"),"".concat(Zn,"-expanded-row-level-").concat(ar+1),ei),prefixCls:Zn,component:Sn,cellComponent:Gn,colSpan:Tr.length,isEmpty:!1},hi)}return de.createElement(de.Fragment,null,ui,pi)}var _r=le(On);function xr(en){var dn=en.columnKey,tn=en.onColumnResize,lt=de.useRef();return de.useEffect(function(){lt.current&&tn(dn,lt.current.offsetWidth)},[]),de.createElement(at.Z,{data:dn},de.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},de.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function $r(en){var dn=en.prefixCls,tn=en.columnsKey,lt=en.onColumnResize;return de.createElement("tr",{"aria-hidden":"true",className:"".concat(dn,"-measure-row"),style:{height:0,fontSize:0}},de.createElement(at.Z.Collection,{onBatchResize:function(Pn){Pn.forEach(function(In){var Qn=In.data,ar=In.size;lt(Qn,ar.offsetWidth)})}},tn.map(function(zn){return de.createElement(xr,{key:zn,columnKey:zn,onColumnResize:lt})})))}function tr(en){var dn=en.data,tn=en.measureColumnWidth,lt=ke(xe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),zn=lt.prefixCls,Pn=lt.getComponent,In=lt.onColumnResize,Qn=lt.flattenColumns,ar=lt.getRowKey,Sn=lt.expandedKeys,Gn=lt.childrenColumnName,Hn=lt.emptyNode,Kn=Xt(dn,Gn,Sn,ar),Zn=de.useRef({renderWithProps:!1}),Tr=Pn(["body","wrapper"],"tbody"),yr=Pn(["body","row"],"tr"),ur=Pn(["body","cell"],"td"),mn=Pn(["body","cell"],"th"),dr;dn.length?dr=Kn.map(function(oi,ei){var ui=oi.record,pi=oi.indent,hi=oi.index,_i=ar(ui,ei);return de.createElement(_r,{key:_i,rowKey:_i,record:ui,index:ei,renderIndex:hi,rowComponent:yr,cellComponent:ur,scopeCellComponent:mn,indent:pi})}):dr=de.createElement(on,{expanded:!0,className:"".concat(zn,"-placeholder"),prefixCls:zn,component:yr,cellComponent:ur,colSpan:Qn.length,isEmpty:!0},Hn);var Or=rt(Qn);return de.createElement(ft.Provider,{value:Zn.current},de.createElement(Tr,{className:"".concat(zn,"-tbody")},tn&&de.createElement($r,{prefixCls:zn,columnsKey:Or,onColumnResize:In}),dr))}var ii=le(tr),di=pt(90494),li=["columnType"];function Mi(en){for(var dn=en.colWidths,tn=en.columns,lt=en.columCount,zn=ke(xe,["tableLayout"]),Pn=zn.tableLayout,In=[],Qn=lt||tn.length,ar=!1,Sn=Qn-1;Sn>=0;Sn-=1){var Gn=dn[Sn],Hn=tn&&tn[Sn],Kn=void 0,Zn=void 0;if(Hn&&(Kn=Hn[di.v],Pn==="auto"&&(Zn=Hn.minWidth)),Gn||Zn||Kn||ar){var Tr=Kn||{},yr=Tr.columnType,ur=(0,Ne.Z)(Tr,li);In.unshift(de.createElement("col",(0,Se.Z)({key:Sn,style:{width:Gn,minWidth:Zn}},ur))),ar=!0}}return de.createElement("colgroup",null,In)}var yi=Mi,Jr=pt(80702),Li=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function qe(en,dn){return(0,de.useMemo)(function(){for(var tn=[],lt=0;lt<dn;lt+=1){var zn=en[lt];if(zn!==void 0)tn[lt]=zn;else return null}return tn},[en.join("_"),dn])}var Mr=de.forwardRef(function(en,dn){var tn=en.className,lt=en.noData,zn=en.columns,Pn=en.flattenColumns,In=en.colWidths,Qn=en.columCount,ar=en.stickyOffsets,Sn=en.direction,Gn=en.fixHeader,Hn=en.stickyTopOffset,Kn=en.stickyBottomOffset,Zn=en.stickyClassName,Tr=en.onScroll,yr=en.maxContentScroll,ur=en.children,mn=(0,Ne.Z)(en,Li),dr=ke(xe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Or=dr.prefixCls,oi=dr.scrollbarSize,ei=dr.isSticky,ui=dr.getComponent,pi=ui(["header","table"],"table"),hi=ei&&!Gn?0:oi,_i=de.useRef(null),zi=de.useCallback(function(eo){(0,Ae.mH)(dn,eo),(0,Ae.mH)(_i,eo)},[]);de.useEffect(function(){var eo;function Gi(xi){var qi=xi,ga=qi.currentTarget,Ao=qi.deltaX;Ao&&(Tr({currentTarget:ga,scrollLeft:ga.scrollLeft+Ao}),xi.preventDefault())}return(eo=_i.current)===null||eo===void 0||eo.addEventListener("wheel",Gi,{passive:!1}),function(){var xi;(xi=_i.current)===null||xi===void 0||xi.removeEventListener("wheel",Gi)}},[]);var mo=de.useMemo(function(){return Pn.every(function(eo){return eo.width})},[Pn]),$t=Pn[Pn.length-1],vi={fixed:$t?$t.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Or,"-cell-scrollbar")}}},Ti=(0,de.useMemo)(function(){return hi?[].concat((0,Jr.Z)(zn),[vi]):zn},[hi,zn]),Xr=(0,de.useMemo)(function(){return hi?[].concat((0,Jr.Z)(Pn),[vi]):Pn},[hi,Pn]),Pi=(0,de.useMemo)(function(){var eo=ar.right,Gi=ar.left;return(0,Me.Z)((0,Me.Z)({},ar),{},{left:Sn==="rtl"?[].concat((0,Jr.Z)(Gi.map(function(xi){return xi+hi})),[0]):Gi,right:Sn==="rtl"?eo:[].concat((0,Jr.Z)(eo.map(function(xi){return xi+hi})),[0]),isSticky:ei})},[hi,ar,ei]),Wr=qe(In,Qn);return de.createElement("div",{style:(0,Me.Z)({overflow:"hidden"},ei?{top:Hn,bottom:Kn}:{}),ref:zi,className:Ye()(tn,(0,Be.Z)({},Zn,!!Zn))},de.createElement(pi,{style:{tableLayout:"fixed",visibility:lt||Wr?null:"hidden"}},(!lt||!yr||mo)&&de.createElement(yi,{colWidths:Wr?[].concat((0,Jr.Z)(Wr),[hi]):[],columCount:Qn+1,columns:Xr}),ur((0,Me.Z)((0,Me.Z)({},mn),{},{stickyOffsets:Pi,columns:Ti,flattenColumns:Xr}))))}),Lr=de.memo(Mr),br=function(dn){var tn=dn.cells,lt=dn.stickyOffsets,zn=dn.flattenColumns,Pn=dn.rowComponent,In=dn.cellComponent,Qn=dn.onHeaderRow,ar=dn.index,Sn=ke(xe,["prefixCls","direction"]),Gn=Sn.prefixCls,Hn=Sn.direction,Kn;Qn&&(Kn=Qn(tn.map(function(Tr){return Tr.column}),ar));var Zn=rt(tn.map(function(Tr){return Tr.column}));return de.createElement(Pn,Kn,tn.map(function(Tr,yr){var ur=Tr.column,mn=vt(Tr.colStart,Tr.colEnd,zn,lt,Hn),dr;return ur&&ur.onHeaderCell&&(dr=Tr.column.onHeaderCell(ur)),de.createElement(mt,(0,Se.Z)({},Tr,{scope:ur.title?Tr.colSpan>1?"colgroup":"col":null,ellipsis:ur.ellipsis,align:ur.align,component:In,prefixCls:Gn,key:Zn[yr]},mn,{additionalProps:dr,rowType:"header"}))}))},Pr=br;function kr(en){var dn=[];function tn(In,Qn){var ar=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;dn[ar]=dn[ar]||[];var Sn=Qn,Gn=In.filter(Boolean).map(function(Hn){var Kn={key:Hn.key,className:Hn.className||"",children:Hn.title,column:Hn,colStart:Sn},Zn=1,Tr=Hn.children;return Tr&&Tr.length>0&&(Zn=tn(Tr,Sn,ar+1).reduce(function(yr,ur){return yr+ur},0),Kn.hasSubColumns=!0),"colSpan"in Hn&&(Zn=Hn.colSpan),"rowSpan"in Hn&&(Kn.rowSpan=Hn.rowSpan),Kn.colSpan=Zn,Kn.colEnd=Kn.colStart+Zn-1,dn[ar].push(Kn),Sn+=Zn,Zn});return Gn}tn(en,0);for(var lt=dn.length,zn=function(Qn){dn[Qn].forEach(function(ar){!("rowSpan"in ar)&&!ar.hasSubColumns&&(ar.rowSpan=lt-Qn)})},Pn=0;Pn<lt;Pn+=1)zn(Pn);return dn}var Hi=function(dn){var tn=dn.stickyOffsets,lt=dn.columns,zn=dn.flattenColumns,Pn=dn.onHeaderRow,In=ke(xe,["prefixCls","getComponent"]),Qn=In.prefixCls,ar=In.getComponent,Sn=de.useMemo(function(){return kr(lt)},[lt]),Gn=ar(["header","wrapper"],"thead"),Hn=ar(["header","row"],"tr"),Kn=ar(["header","cell"],"th");return de.createElement(Gn,{className:"".concat(Qn,"-thead")},Sn.map(function(Zn,Tr){var yr=de.createElement(Pr,{key:Tr,flattenColumns:zn,cells:Zn,stickyOffsets:tn,rowComponent:Hn,cellComponent:Kn,onHeaderRow:Pn,index:Tr});return yr}))},gr=le(Hi),nr=pt(78612);function Vt(en,dn,tn){var lt=(0,di.g)(en),zn=lt.expandIcon,Pn=lt.expandedRowKeys,In=lt.defaultExpandedRowKeys,Qn=lt.defaultExpandAllRows,ar=lt.expandedRowRender,Sn=lt.onExpand,Gn=lt.onExpandedRowsChange,Hn=lt.childrenColumnName,Kn=zn||cn,Zn=Hn||"children",Tr=de.useMemo(function(){return ar?"row":en.expandable&&en.internalHooks===st.R&&en.expandable.__PARENT_RENDER_ICON__||dn.some(function(ei){return ei&&(0,Te.Z)(ei)==="object"&&ei[Zn]})?"nest":!1},[!!ar,dn]),yr=de.useState(function(){return In||(Qn?bn(dn,tn,Zn):[])}),ur=(0,Ut.Z)(yr,2),mn=ur[0],dr=ur[1],Or=de.useMemo(function(){return new Set(Pn||mn||[])},[Pn,mn]),oi=de.useCallback(function(ei){var ui=tn(ei,dn.indexOf(ei)),pi,hi=Or.has(ui);hi?(Or.delete(ui),pi=(0,Jr.Z)(Or)):pi=[].concat((0,Jr.Z)(Or),[ui]),dr(pi),Sn&&Sn(!hi,ei),Gn&&Gn(pi)},[tn,Or,dn,Sn,Gn]);return[lt,Tr,Or,Kn,Zn,oi]}function Kt(en,dn,tn){var lt=en.map(function(zn,Pn){return vt(Pn,Pn,en,dn,tn)});return(0,Ke.Z)(function(){return lt},[lt],function(zn,Pn){return!(0,_e.Z)(zn,Pn)})}function zt(en){var dn=(0,de.useRef)(en),tn=(0,de.useState)({}),lt=(0,Ut.Z)(tn,2),zn=lt[1],Pn=(0,de.useRef)(null),In=(0,de.useRef)([]);function Qn(ar){In.current.push(ar);var Sn=Promise.resolve();Pn.current=Sn,Sn.then(function(){if(Pn.current===Sn){var Gn=In.current,Hn=dn.current;In.current=[],Gn.forEach(function(Kn){dn.current=Kn(dn.current)}),Pn.current=null,Hn!==dn.current&&zn({})}})}return(0,de.useEffect)(function(){return function(){Pn.current=null}},[]),[dn.current,Qn]}function Mn(en){var dn=(0,de.useRef)(en||null),tn=(0,de.useRef)();function lt(){window.clearTimeout(tn.current)}function zn(In){dn.current=In,lt(),tn.current=window.setTimeout(function(){dn.current=null,tn.current=void 0},100)}function Pn(){return dn.current}return(0,de.useEffect)(function(){return lt},[]),[zn,Pn]}function Vn(){var en=de.useState(-1),dn=(0,Ut.Z)(en,2),tn=dn[0],lt=dn[1],zn=de.useState(-1),Pn=(0,Ut.Z)(zn,2),In=Pn[0],Qn=Pn[1],ar=de.useCallback(function(Sn,Gn){lt(Sn),Qn(Gn)},[]);return[tn,In,ar]}var vr=pt(47273),vn=(0,vr.Z)()?window:null;function Wn(en,dn){var tn=(0,Te.Z)(en)==="object"?en:{},lt=tn.offsetHeader,zn=lt===void 0?0:lt,Pn=tn.offsetSummary,In=Pn===void 0?0:Pn,Qn=tn.offsetScroll,ar=Qn===void 0?0:Qn,Sn=tn.getContainer,Gn=Sn===void 0?function(){return vn}:Sn,Hn=Gn()||vn,Kn=!!en;return de.useMemo(function(){return{isSticky:Kn,stickyClassName:Kn?"".concat(dn,"-sticky-holder"):"",offsetHeader:zn,offsetSummary:In,offsetScroll:ar,container:Hn}},[Kn,ar,zn,In,dn,Hn])}function Ht(en,dn,tn){var lt=(0,de.useMemo)(function(){var zn=dn.length,Pn=function(Sn,Gn,Hn){for(var Kn=[],Zn=0,Tr=Sn;Tr!==Gn;Tr+=Hn)Kn.push(Zn),dn[Tr].fixed&&(Zn+=en[Tr]||0);return Kn},In=Pn(0,zn,1),Qn=Pn(zn-1,-1,-1).reverse();return tn==="rtl"?{left:Qn,right:In}:{left:In,right:Qn}},[en,dn,tn]);return lt}var Jt=Ht;function Xn(en){var dn=en.className,tn=en.children;return de.createElement("div",{className:dn},tn)}var jt=Xn,ln=pt(8224),Nn=pt(16089),Yn=pt(76846);function sn(en){var dn=(0,Yn.bn)(en),tn=dn.getBoundingClientRect(),lt=document.documentElement;return{left:tn.left+(window.pageXOffset||lt.scrollLeft)-(lt.clientLeft||document.body.clientLeft||0),top:tn.top+(window.pageYOffset||lt.scrollTop)-(lt.clientTop||document.body.clientTop||0)}}var Dn=function(dn,tn){var lt,zn,Pn=dn.scrollBodyRef,In=dn.onScroll,Qn=dn.offsetScroll,ar=dn.container,Sn=dn.direction,Gn=ke(xe,"prefixCls"),Hn=((lt=Pn.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,Kn=((zn=Pn.current)===null||zn===void 0?void 0:zn.clientWidth)||0,Zn=Hn&&Kn*(Kn/Hn),Tr=de.useRef(),yr=zt({scrollLeft:0,isHiddenScrollBar:!0}),ur=(0,Ut.Z)(yr,2),mn=ur[0],dr=ur[1],Or=de.useRef({delta:0,x:0}),oi=de.useState(!1),ei=(0,Ut.Z)(oi,2),ui=ei[0],pi=ei[1],hi=de.useRef(null);de.useEffect(function(){return function(){Nn.Z.cancel(hi.current)}},[]);var _i=function(){pi(!1)},zi=function(Xr){Xr.persist(),Or.current.delta=Xr.pageX-mn.scrollLeft,Or.current.x=0,pi(!0),Xr.preventDefault()},mo=function(Xr){var Pi,Wr=Xr||((Pi=window)===null||Pi===void 0?void 0:Pi.event),eo=Wr.buttons;if(!ui||eo===0){ui&&pi(!1);return}var Gi=Or.current.x+Xr.pageX-Or.current.x-Or.current.delta,xi=Sn==="rtl";Gi=Math.max(xi?Zn-Kn:0,Math.min(xi?0:Kn-Zn,Gi));var qi=!xi||Math.abs(Gi)+Math.abs(Zn)<Kn;qi&&(In({scrollLeft:Gi/Kn*(Hn+2)}),Or.current.x=Xr.pageX)},$t=function(){Nn.Z.cancel(hi.current),hi.current=(0,Nn.Z)(function(){if(Pn.current){var Xr=sn(Pn.current).top,Pi=Xr+Pn.current.offsetHeight,Wr=ar===window?document.documentElement.scrollTop+window.innerHeight:sn(ar).top+ar.clientHeight;Pi-(0,Ot.Z)()<=Wr||Xr>=Wr-Qn?dr(function(eo){return(0,Me.Z)((0,Me.Z)({},eo),{},{isHiddenScrollBar:!0})}):dr(function(eo){return(0,Me.Z)((0,Me.Z)({},eo),{},{isHiddenScrollBar:!1})})}})},vi=function(Xr){dr(function(Pi){return(0,Me.Z)((0,Me.Z)({},Pi),{},{scrollLeft:Xr/Hn*Kn||0})})};return de.useImperativeHandle(tn,function(){return{setScrollLeft:vi,checkScrollBarVisible:$t}}),de.useEffect(function(){var Ti=(0,ln.Z)(document.body,"mouseup",_i,!1),Xr=(0,ln.Z)(document.body,"mousemove",mo,!1);return $t(),function(){Ti.remove(),Xr.remove()}},[Zn,ui]),de.useEffect(function(){if(Pn.current){for(var Ti=[],Xr=(0,Yn.bn)(Pn.current);Xr;)Ti.push(Xr),Xr=Xr.parentElement;return Ti.forEach(function(Pi){return Pi.addEventListener("scroll",$t,!1)}),window.addEventListener("resize",$t,!1),window.addEventListener("scroll",$t,!1),ar.addEventListener("scroll",$t,!1),function(){Ti.forEach(function(Pi){return Pi.removeEventListener("scroll",$t)}),window.removeEventListener("resize",$t),window.removeEventListener("scroll",$t),ar.removeEventListener("scroll",$t)}}},[ar]),de.useEffect(function(){mn.isHiddenScrollBar||dr(function(Ti){var Xr=Pn.current;return Xr?(0,Me.Z)((0,Me.Z)({},Ti),{},{scrollLeft:Xr.scrollLeft/Xr.scrollWidth*Xr.clientWidth}):Ti})},[mn.isHiddenScrollBar]),Hn<=Kn||!Zn||mn.isHiddenScrollBar?null:de.createElement("div",{style:{height:(0,Ot.Z)(),width:Kn,bottom:Qn},className:"".concat(Gn,"-sticky-scroll")},de.createElement("div",{onMouseDown:zi,ref:Tr,className:Ye()("".concat(Gn,"-sticky-scroll-bar"),(0,Be.Z)({},"".concat(Gn,"-sticky-scroll-bar-active"),ui)),style:{width:"".concat(Zn,"px"),transform:"translate3d(".concat(mn.scrollLeft,"px, 0, 0)")}}))},Jn=de.forwardRef(Dn);function jn(en){return null}var Bn=jn;function er(en){return null}var _n=er,sr="rc-table",Fr=[],zr={};function Dr(){return"No Data"}function pn(en,dn){var tn=(0,Me.Z)({rowKey:"key",prefixCls:sr,emptyText:Dr},en),lt=tn.prefixCls,zn=tn.className,Pn=tn.rowClassName,In=tn.style,Qn=tn.data,ar=tn.rowKey,Sn=tn.scroll,Gn=tn.tableLayout,Hn=tn.direction,Kn=tn.title,Zn=tn.footer,Tr=tn.summary,yr=tn.caption,ur=tn.id,mn=tn.showHeader,dr=tn.components,Or=tn.emptyText,oi=tn.onRow,ei=tn.onHeaderRow,ui=tn.onScroll,pi=tn.internalHooks,hi=tn.transformColumns,_i=tn.internalRefs,zi=tn.tailor,mo=tn.getContainerWidth,$t=tn.sticky,vi=tn.rowHoverable,Ti=vi===void 0?!0:vi,Xr=Qn||Fr,Pi=!!Xr.length,Wr=pi===st.R,eo=de.useCallback(function(Ki,ao){return(0,Ve.Z)(dr,Ki)||ao},[dr]),Gi=de.useMemo(function(){return typeof ar=="function"?ar:function(Ki){var ao=Ki&&Ki[ar];return ao}},[ar]),xi=eo(["body"]),qi=Vn(),ga=(0,Ut.Z)(qi,3),Ao=ga[0],Aa=ga[1],ma=ga[2],Ur=Vt(tn,Xr,Gi),to=(0,Ut.Z)(Ur,6),Co=to[0],Qo=to[1],Ci=to[2],wi=to[3],Ln=to[4],Vr=to[5],Ei=Sn==null?void 0:Sn.x,co=de.useState(0),ba=(0,Ut.Z)(co,2),aa=ba[0],ai=ba[1],Wo=(0,nr.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},tn),Co),{},{expandable:!!Co.expandedRowRender,columnTitle:Co.columnTitle,expandedKeys:Ci,getRowKey:Gi,onTriggerExpand:Vr,expandIcon:wi,expandIconColumnIndex:Co.expandIconColumnIndex,direction:Hn,scrollWidth:Wr&&zi&&typeof Ei=="number"?Ei:null,clientWidth:aa}),Wr?hi:null),Ko=(0,Ut.Z)(Wo,4),jo=Ko[0],io=Ko[1],Pa=Ko[2],is=Ko[3],fo=Pa!=null?Pa:Ei,os=de.useMemo(function(){return{columns:jo,flattenColumns:io}},[jo,io]),Gs=de.useRef(),Lu=de.useRef(),Ho=de.useRef(),th=de.useRef();de.useImperativeHandle(dn,function(){return{nativeElement:Gs.current,scrollTo:function(ao){var Zo;if(Ho.current instanceof HTMLElement){var Fa=ao.index,ka=ao.top,lu=ao.key;if(Ct(ka)){var Vl;(Vl=Ho.current)===null||Vl===void 0||Vl.scrollTo({top:ka})}else{var uu,rl=lu!=null?lu:Gi(Xr[Fa]);(uu=Ho.current.querySelector('[data-row-key="'.concat(rl,'"]')))===null||uu===void 0||uu.scrollIntoView()}}else(Zo=Ho.current)!==null&&Zo!==void 0&&Zo.scrollTo&&Ho.current.scrollTo(ao)}}});var Mu=de.useRef(),Nu=de.useState(!1),gl=(0,Ut.Z)(Nu,2),Ns=gl[0],Ll=gl[1],nh=de.useState(!1),Au=(0,Ut.Z)(nh,2),Vo=Au[0],ju=Au[1],rh=zt(new Map),iu=(0,Ut.Z)(rh,2),ou=iu[0],ja=iu[1],Oa=rt(io),na=Oa.map(function(Ki){return ou.get(Ki)}),sa=de.useMemo(function(){return na},[na.join("_")]),uo=Jt(sa,io,Hn),Bi=Sn&&wt(Sn.y),Wi=Sn&&wt(fo)||!!Co.fixed,la=Wi&&io.some(function(Ki){var ao=Ki.fixed;return ao}),$o=de.useRef(),qo=Wn($t,lt),jr=qo.isSticky,As=qo.offsetHeader,Gt=qo.offsetSummary,Tn=qo.offsetScroll,Ml=qo.stickyClassName,Ou=qo.container,ua=de.useMemo(function(){return Tr==null?void 0:Tr(Xr)},[Tr,Xr]),Us=(Bi||jr)&&de.isValidElement(ua)&&ua.type===Re&&ua.props.fixed,Hl,Fu,Du;Bi&&(Fu={overflowY:Pi?"scroll":"auto",maxHeight:Sn.y}),Wi&&(Hl={overflowX:"auto"},Bi||(Fu={overflowY:"hidden"}),Du={width:fo===!0?"auto":fo,minWidth:"100%"});var Oo=de.useCallback(function(Ki,ao){(0,Dt.Z)(Gs.current)&&ja(function(Zo){if(Zo.get(Ki)!==ao){var Fa=new Map(Zo);return Fa.set(Ki,ao),Fa}return Zo})},[]),gi=Mn(null),Ga=(0,Ut.Z)(gi,2),js=Ga[0],Fo=Ga[1];function Ui(Ki,ao){ao&&(typeof ao=="function"?ao(Ki):ao.scrollLeft!==Ki&&(ao.scrollLeft=Ki,ao.scrollLeft!==Ki&&setTimeout(function(){ao.scrollLeft=Ki},0)))}var _o=(0,oe.Z)(function(Ki){var ao=Ki.currentTarget,Zo=Ki.scrollLeft,Fa=Hn==="rtl",ka=typeof Zo=="number"?Zo:ao.scrollLeft,lu=ao||zr;if(!Fo()||Fo()===lu){var Vl;js(lu),Ui(ka,Lu.current),Ui(ka,Ho.current),Ui(ka,Mu.current),Ui(ka,(Vl=$o.current)===null||Vl===void 0?void 0:Vl.setScrollLeft)}var uu=ao||Lu.current;if(uu){var rl=Wr&&zi&&typeof fo=="number"?fo:uu.scrollWidth,Al=uu.clientWidth;if(rl===Al){Ll(!1),ju(!1);return}Fa?(Ll(-ka<rl-Al),ju(-ka>0)):(Ll(ka>0),ju(ka<rl-Al))}}),ds=(0,oe.Z)(function(Ki){_o(Ki),ui==null||ui(Ki)}),wo=function(){if(Wi&&Ho.current){var ao;_o({currentTarget:(0,Yn.bn)(Ho.current),scrollLeft:(ao=Ho.current)===null||ao===void 0?void 0:ao.scrollLeft})}else Ll(!1),ju(!1)},ws=function(ao){var Zo,Fa=ao.width;(Zo=$o.current)===null||Zo===void 0||Zo.checkScrollBarVisible();var ka=Gs.current?Gs.current.offsetWidth:Fa;Wr&&mo&&Gs.current&&(ka=mo(Gs.current,ka)||ka),ka!==aa&&(wo(),ai(ka))},va=de.useRef(!1);de.useEffect(function(){va.current&&wo()},[Wi,Qn,jo.length]),de.useEffect(function(){va.current=!0},[]);var au=de.useState(0),oo=(0,Ut.Z)(au,2),Ea=oo[0],no=oo[1],bo=de.useState(!0),Eo=(0,Ut.Z)(bo,2),zo=Eo[0],ho=Eo[1];de.useEffect(function(){(!zi||!Wr)&&(Ho.current instanceof Element?no((0,Ot.o)(Ho.current).width):no((0,Ot.o)(th.current).width)),ho((0,Et.G)("position","sticky"))},[]),de.useEffect(function(){Wr&&_i&&(_i.body.current=Ho.current)});var Bu=de.useCallback(function(Ki){return de.createElement(de.Fragment,null,de.createElement(gr,Ki),Us==="top"&&de.createElement(et,Ki,ua))},[Us,ua]),fi=de.useCallback(function(Ki){return de.createElement(et,Ki,ua)},[ua]),uf=eo(["table"],"table"),Ji=de.useMemo(function(){return Gn||(la?fo==="max-content"?"auto":"fixed":Bi||jr||io.some(function(Ki){var ao=Ki.ellipsis;return ao})?"fixed":"auto")},[Bi,la,io,Gn,jr]),Cc,su={colWidths:sa,columCount:io.length,stickyOffsets:uo,onHeaderRow:ei,fixHeader:Bi,scroll:Sn},ih=de.useMemo(function(){return Pi?null:typeof Or=="function"?Or():Or},[Pi,Or]),Ec=de.createElement(ii,{data:Xr,measureColumnWidth:Bi||Wi||jr}),_h=de.createElement(yi,{colWidths:io.map(function(Ki){var ao=Ki.width;return ao}),columns:io}),Nl=yr!=null?de.createElement("caption",{className:"".concat(lt,"-caption")},yr):void 0,Iu=(0,qt.Z)(tn,{data:!0}),lo=(0,qt.Z)(tn,{aria:!0});if(Bi||jr){var nl;typeof xi=="function"?(nl=xi(Xr,{scrollbarSize:Ea,ref:Ho,onScroll:_o}),su.colWidths=io.map(function(Ki,ao){var Zo=Ki.width,Fa=ao===io.length-1?Zo-Ea:Zo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):nl=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Hl),Fu),onScroll:ds,ref:Ho,className:Ye()("".concat(lt,"-body"))},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Du),{},{tableLayout:Ji})},lo),Nl,_h,Ec,!Us&&ua&&de.createElement(et,{stickyOffsets:uo,flattenColumns:io},ua)));var zh=(0,Me.Z)((0,Me.Z)((0,Me.Z)({noData:!Xr.length,maxContentScroll:Wi&&fo==="max-content"},su),os),{},{direction:Hn,stickyClassName:Ml,onScroll:_o});Cc=de.createElement(de.Fragment,null,mn!==!1&&de.createElement(Lr,(0,Se.Z)({},zh,{stickyTopOffset:As,className:"".concat(lt,"-header"),ref:Lu}),Bu),nl,Us&&Us!=="top"&&de.createElement(Lr,(0,Se.Z)({},zh,{stickyBottomOffset:Gt,className:"".concat(lt,"-summary"),ref:Mu}),fi),jr&&Ho.current&&Ho.current instanceof Element&&de.createElement(Jn,{ref:$o,offsetScroll:Tn,scrollBodyRef:Ho,onScroll:_o,container:Ou,direction:Hn}))}else Cc=de.createElement("div",{style:(0,Me.Z)((0,Me.Z)({},Hl),Fu),className:Ye()("".concat(lt,"-content")),onScroll:_o,ref:Ho},de.createElement(uf,(0,Se.Z)({style:(0,Me.Z)((0,Me.Z)({},Du),{},{tableLayout:Ji})},lo),Nl,_h,mn!==!1&&de.createElement(gr,(0,Se.Z)({},su,os)),Ec,ua&&de.createElement(et,{stickyOffsets:uo,flattenColumns:io},ua)));var Wl=de.createElement("div",(0,Se.Z)({className:Ye()(lt,zn,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(lt,"-rtl"),Hn==="rtl"),"".concat(lt,"-ping-left"),Ns),"".concat(lt,"-ping-right"),Vo),"".concat(lt,"-layout-fixed"),Gn==="fixed"),"".concat(lt,"-fixed-header"),Bi),"".concat(lt,"-fixed-column"),la),"".concat(lt,"-fixed-column-gapped"),la&&is),"".concat(lt,"-scroll-horizontal"),Wi),"".concat(lt,"-has-fix-left"),io[0]&&io[0].fixed),"".concat(lt,"-has-fix-right"),io[io.length-1]&&io[io.length-1].fixed==="right")),style:In,id:ur,ref:Gs},Iu),Kn&&de.createElement(jt,{className:"".concat(lt,"-title")},Kn(Xr)),de.createElement("div",{ref:th,className:"".concat(lt,"-container")},Cc),Zn&&de.createElement(jt,{className:"".concat(lt,"-footer")},Zn(Xr)));Wi&&(Wl=de.createElement(at.Z,{onResize:ws},Wl));var kc=Kt(io,uo,Hn),Kl=de.useMemo(function(){return{scrollX:fo,prefixCls:lt,getComponent:eo,scrollbarSize:Ea,direction:Hn,fixedInfoList:kc,isSticky:jr,supportSticky:zo,componentWidth:aa,fixHeader:Bi,fixColumn:la,horizonScroll:Wi,tableLayout:Ji,rowClassName:Pn,expandedRowClassName:Co.expandedRowClassName,expandIcon:wi,expandableType:Qo,expandRowByClick:Co.expandRowByClick,expandedRowRender:Co.expandedRowRender,onTriggerExpand:Vr,expandIconColumnIndex:Co.expandIconColumnIndex,indentSize:Co.indentSize,allColumnsFixedLeft:io.every(function(Ki){return Ki.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:io,onColumnResize:Oo,hoverStartRow:Ao,hoverEndRow:Aa,onHover:ma,rowExpandable:Co.rowExpandable,onRow:oi,getRowKey:Gi,expandedKeys:Ci,childrenColumnName:Ln,rowHoverable:Ti}},[fo,lt,eo,Ea,Hn,kc,jr,zo,aa,Bi,la,Wi,Ji,Pn,Co.expandedRowClassName,wi,Qo,Co.expandRowByClick,Co.expandedRowRender,Vr,Co.expandIconColumnIndex,Co.indentSize,ih,jo,io,Oo,Ao,Aa,ma,Co.rowExpandable,oi,Gi,Ci,Ln,Ti]);return de.createElement(xe.Provider,{value:Kl},Wl)}var Ni=de.forwardRef(pn);function ni(en){return ie(Ni,en)}var ki=ni();ki.EXPAND_COLUMN=st.w,ki.INTERNAL_HOOKS=st.R,ki.Column=Bn,ki.ColumnGroup=_n,ki.Summary=ht;var hn=ki,qn=pt(45680),rr=Ee(null),pr=Ee(null);function wr(en,dn,tn){var lt=dn||1;return tn[en+lt]-(tn[en]||0)}function Ar(en){var dn=en.rowInfo,tn=en.column,lt=en.colIndex,zn=en.indent,Pn=en.index,In=en.component,Qn=en.renderIndex,ar=en.record,Sn=en.style,Gn=en.className,Hn=en.inverse,Kn=en.getHeight,Zn=tn.render,Tr=tn.dataIndex,yr=tn.className,ur=tn.width,mn=ke(pr,["columnsOffset"]),dr=mn.columnsOffset,Or=kn(dn,tn,lt,zn,Pn),oi=Or.key,ei=Or.fixedInfo,ui=Or.appendCellNode,pi=Or.additionalCellProps,hi=pi.style,_i=pi.colSpan,zi=_i===void 0?1:_i,mo=pi.rowSpan,$t=mo===void 0?1:mo,vi=lt-1,Ti=wr(vi,zi,dr),Xr=zi>1?ur-Ti:0,Pi=(0,Me.Z)((0,Me.Z)((0,Me.Z)({},hi),Sn),{},{flex:"0 0 ".concat(Ti,"px"),width:"".concat(Ti,"px"),marginRight:Xr,pointerEvents:"auto"}),Wr=de.useMemo(function(){return Hn?$t<=1:zi===0||$t===0||$t>1},[$t,zi,Hn]);Wr?Pi.visibility="hidden":Hn&&(Pi.height=Kn==null?void 0:Kn($t));var eo=Wr?function(){return null}:Zn,Gi={};return($t===0||zi===0)&&(Gi.rowSpan=1,Gi.colSpan=1),de.createElement(mt,(0,Se.Z)({className:Ye()(yr,Gn),ellipsis:tn.ellipsis,align:tn.align,scope:tn.rowScope,component:In,prefixCls:dn.prefixCls,key:oi,record:ar,index:Pn,renderIndex:Qn,dataIndex:Tr,render:eo,shouldCellUpdate:tn.shouldCellUpdate},ei,{appendNode:ui,additionalProps:(0,Me.Z)((0,Me.Z)({},pi),{},{style:Pi},Gi)}))}var Kr=Ar,Qr=["data","index","className","rowKey","style","extra","getHeight"],qr=de.forwardRef(function(en,dn){var tn=en.data,lt=en.index,zn=en.className,Pn=en.rowKey,In=en.style,Qn=en.extra,ar=en.getHeight,Sn=(0,Ne.Z)(en,Qr),Gn=tn.record,Hn=tn.indent,Kn=tn.index,Zn=ke(xe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Tr=Zn.scrollX,yr=Zn.flattenColumns,ur=Zn.prefixCls,mn=Zn.fixColumn,dr=Zn.componentWidth,Or=ke(rr,["getComponent"]),oi=Or.getComponent,ei=Wt(Gn,Pn,lt,Hn),ui=oi(["body","row"],"div"),pi=oi(["body","cell"],"div"),hi=ei.rowSupportExpand,_i=ei.expanded,zi=ei.rowProps,mo=ei.expandedRowRender,$t=ei.expandedRowClassName,vi;if(hi&&_i){var Ti=mo(Gn,lt,Hn+1,_i),Xr=xn($t,Gn,lt,Hn),Pi={};mn&&(Pi={style:(0,Be.Z)({},"--virtual-width","".concat(dr,"px"))});var Wr="".concat(ur,"-expanded-row-cell");vi=de.createElement(ui,{className:Ye()("".concat(ur,"-expanded-row"),"".concat(ur,"-expanded-row-level-").concat(Hn+1),Xr)},de.createElement(mt,{component:pi,prefixCls:ur,className:Ye()(Wr,(0,Be.Z)({},"".concat(Wr,"-fixed"),mn)),additionalProps:Pi},Ti))}var eo=(0,Me.Z)((0,Me.Z)({},In),{},{width:Tr});Qn&&(eo.position="absolute",eo.pointerEvents="none");var Gi=de.createElement(ui,(0,Se.Z)({},zi,Sn,{"data-row-key":Pn,ref:hi?null:dn,className:Ye()(zn,"".concat(ur,"-row"),zi==null?void 0:zi.className,(0,Be.Z)({},"".concat(ur,"-row-extra"),Qn)),style:(0,Me.Z)((0,Me.Z)({},eo),zi==null?void 0:zi.style)}),yr.map(function(xi,qi){return de.createElement(Kr,{key:qi,component:pi,rowInfo:ei,column:xi,colIndex:qi,indent:Hn,index:lt,renderIndex:Kn,record:Gn,inverse:Qn,getHeight:ar})}));return hi?de.createElement("div",{ref:dn},Gi,vi):Gi}),lr=le(qr),rn=lr,ir=de.forwardRef(function(en,dn){var tn=en.data,lt=en.onScroll,zn=ke(xe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Pn=zn.flattenColumns,In=zn.onColumnResize,Qn=zn.getRowKey,ar=zn.expandedKeys,Sn=zn.prefixCls,Gn=zn.childrenColumnName,Hn=zn.scrollX,Kn=zn.direction,Zn=ke(rr),Tr=Zn.sticky,yr=Zn.scrollY,ur=Zn.listItemHeight,mn=Zn.getComponent,dr=Zn.onScroll,Or=de.useRef(),oi=Xt(tn,Gn,ar,Qn),ei=de.useMemo(function(){var vi=0;return Pn.map(function(Ti){var Xr=Ti.width,Pi=Ti.key;return vi+=Xr,[Pi,Xr,vi]})},[Pn]),ui=de.useMemo(function(){return ei.map(function(vi){return vi[2]})},[ei]);de.useEffect(function(){ei.forEach(function(vi){var Ti=(0,Ut.Z)(vi,2),Xr=Ti[0],Pi=Ti[1];In(Xr,Pi)})},[ei]),de.useImperativeHandle(dn,function(){var vi,Ti={scrollTo:function(Pi){var Wr;(Wr=Or.current)===null||Wr===void 0||Wr.scrollTo(Pi)},nativeElement:(vi=Or.current)===null||vi===void 0?void 0:vi.nativeElement};return Object.defineProperty(Ti,"scrollLeft",{get:function(){var Pi;return((Pi=Or.current)===null||Pi===void 0?void 0:Pi.getScrollInfo().x)||0},set:function(Pi){var Wr;(Wr=Or.current)===null||Wr===void 0||Wr.scrollTo({left:Pi})}}),Ti});var pi=function(Ti,Xr){var Pi,Wr=(Pi=oi[Xr])===null||Pi===void 0?void 0:Pi.record,eo=Ti.onCell;if(eo){var Gi,xi=eo(Wr,Xr);return(Gi=xi==null?void 0:xi.rowSpan)!==null&&Gi!==void 0?Gi:1}return 1},hi=function(Ti){var Xr=Ti.start,Pi=Ti.end,Wr=Ti.getSize,eo=Ti.offsetY;if(Pi<0)return null;for(var Gi=Pn.filter(function(wi){return pi(wi,Xr)===0}),xi=Xr,qi=function(Ln){if(Gi=Gi.filter(function(Vr){return pi(Vr,Ln)===0}),!Gi.length)return xi=Ln,1},ga=Xr;ga>=0&&!qi(ga);ga-=1);for(var Ao=Pn.filter(function(wi){return pi(wi,Pi)!==1}),Aa=Pi,ma=function(Ln){if(Ao=Ao.filter(function(Vr){return pi(Vr,Ln)!==1}),!Ao.length)return Aa=Math.max(Ln-1,Pi),1},Ur=Pi;Ur<oi.length&&!ma(Ur);Ur+=1);for(var to=[],Co=function(Ln){var Vr=oi[Ln];if(!Vr)return 1;Pn.some(function(Ei){return pi(Ei,Ln)>1})&&to.push(Ln)},Qo=xi;Qo<=Aa;Qo+=1)Co(Qo);var Ci=to.map(function(wi){var Ln=oi[wi],Vr=Qn(Ln.record,wi),Ei=function(aa){var ai=wi+aa-1,Wo=Qn(oi[ai].record,ai),Ko=Wr(Vr,Wo);return Ko.bottom-Ko.top},co=Wr(Vr);return de.createElement(rn,{key:wi,data:Ln,rowKey:Vr,index:wi,style:{top:-eo+co.top},extra:!0,getHeight:Ei})});return Ci},_i=de.useMemo(function(){return{columnsOffset:ui}},[ui]),zi="".concat(Sn,"-tbody"),mo=mn(["body","wrapper"]),$t={};return Tr&&($t.position="sticky",$t.bottom=0,(0,Te.Z)(Tr)==="object"&&Tr.offsetScroll&&($t.bottom=Tr.offsetScroll)),de.createElement(pr.Provider,{value:_i},de.createElement(qn.Z,{fullHeight:!1,ref:Or,prefixCls:"".concat(zi,"-virtual"),styles:{horizontalScrollBar:$t},className:zi,height:yr,itemHeight:ur||24,data:oi,itemKey:function(Ti){return Qn(Ti.record)},component:mo,scrollWidth:Hn,direction:Kn,onVirtualScroll:function(Ti){var Xr,Pi=Ti.x;lt({currentTarget:(Xr=Or.current)===null||Xr===void 0?void 0:Xr.nativeElement,scrollLeft:Pi})},onScroll:dr,extraRender:hi},function(vi,Ti,Xr){var Pi=Qn(vi.record,Ti);return de.createElement(rn,{data:vi,rowKey:Pi,index:Ti,style:Xr.style})}))}),an=le(ir),cr=an,Cr=function(dn,tn){var lt=tn.ref,zn=tn.onScroll;return de.createElement(cr,{ref:lt,data:dn,onScroll:zn})};function Gr(en,dn){var tn=en.data,lt=en.columns,zn=en.scroll,Pn=en.sticky,In=en.prefixCls,Qn=In===void 0?sr:In,ar=en.className,Sn=en.listItemHeight,Gn=en.components,Hn=en.onScroll,Kn=zn||{},Zn=Kn.x,Tr=Kn.y;typeof Zn!="number"&&(Zn=1),typeof Tr!="number"&&(Tr=500);var yr=(0,Mt.zX)(function(dr,Or){return(0,Ve.Z)(Gn,dr)||Or}),ur=(0,Mt.zX)(Hn),mn=de.useMemo(function(){return{sticky:Pn,scrollY:Tr,listItemHeight:Sn,getComponent:yr,onScroll:ur}},[Pn,Tr,Sn,yr,ur]);return de.createElement(rr.Provider,{value:mn},de.createElement(hn,(0,Se.Z)({},en,{className:Ye()(ar,"".concat(Qn,"-virtual")),scroll:(0,Me.Z)((0,Me.Z)({},zn),{},{x:Zn}),components:(0,Me.Z)((0,Me.Z)({},Gn),{},{body:tn!=null&&tn.length?Cr:void 0}),columns:lt,internalHooks:st.R,tailor:!0,ref:dn})))}var Ri=de.forwardRef(Gr);function Fi(en){return ie(Ri,en)}var Si=Fi(),Di=null},90494:function(Rn,An,pt){"use strict";pt.d(An,{g:function(){return de},v:function(){return _e}});var st=pt(77321),Ut=pt(74416),oe=pt(48736),Ue=["expandable"],_e="RC_TABLE_INTERNAL_COL_DEFINE";function de(ve){var Ee=ve.expandable,ke=(0,Ut.Z)(ve,Ue),Se;return"expandable"in ve?Se=(0,st.Z)((0,st.Z)({},ke),Ee):Se=ke,Se.showExpandColumn===!1&&(Se.expandIconColumnIndex=-1),Se}},22711:function(Rn,An,pt){"use strict";pt.r(An),pt.d(An,{ResizableTextArea:function(){return Ge},default:function(){return ot}});var st=pt(72308),Ut=pt(49618),oe=pt(77321),Ue=pt(80702),_e=pt(52487),de=pt(74416),ve=pt(92310),Ee=pt.n(ve),ke=pt(36901),Se=pt(66003),Ae=pt(30292),me=pt(18929),Pe=pt(59301),fe=pt(62853),z=pt(29301),te=pt(34280),se=pt(16089),ie=`
|
|
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;
|
|
`,le=["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"],ce={},pe;function xe(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=ut.getAttribute("id")||ut.getAttribute("data-reactid")||ut.getAttribute("name");if(ft&&ce[St])return ce[St];var Qe=window.getComputedStyle(ut),rt=Qe.getPropertyValue("box-sizing")||Qe.getPropertyValue("-moz-box-sizing")||Qe.getPropertyValue("-webkit-box-sizing"),wt=parseFloat(Qe.getPropertyValue("padding-bottom"))+parseFloat(Qe.getPropertyValue("padding-top")),Ct=parseFloat(Qe.getPropertyValue("border-bottom-width"))+parseFloat(Qe.getPropertyValue("border-top-width")),bt=le.map(function(xt){return"".concat(xt,":").concat(Qe.getPropertyValue(xt))}).join(";"),ct={sizingStyle:bt,paddingSize:wt,borderSize:Ct,boxSizing:rt};return ft&&St&&(ce[St]=ct),ct}function je(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Qe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;pe||(pe=document.createElement("textarea"),pe.setAttribute("tab-index","-1"),pe.setAttribute("aria-hidden","true"),pe.setAttribute("name","hiddenTextarea"),document.body.appendChild(pe)),ut.getAttribute("wrap")?pe.setAttribute("wrap",ut.getAttribute("wrap")):pe.removeAttribute("wrap");var rt=xe(ut,ft),wt=rt.paddingSize,Ct=rt.borderSize,bt=rt.boxSizing,ct=rt.sizingStyle;pe.setAttribute("style","".concat(ct,";").concat(ie)),pe.value=ut.value||ut.placeholder||"";var xt=void 0,dt=void 0,Mt,yt=pe.scrollHeight;if(bt==="border-box"?yt+=Ct:bt==="content-box"&&(yt-=wt),St!==null||Qe!==null){pe.value=" ";var Ft=pe.scrollHeight-wt;St!==null&&(xt=Ft*St,bt==="border-box"&&(xt=xt+wt+Ct),yt=Math.max(xt,yt)),Qe!==null&&(dt=Ft*Qe,bt==="border-box"&&(dt=dt+wt+Ct),Mt=yt>dt?"":"hidden",yt=Math.min(dt,yt))}var mt={height:yt,overflowY:Mt,resize:"none"};return xt&&(mt.minHeight=xt),dt&&(mt.maxHeight=dt),mt}var De=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Te=1,Me=2,Be=Pe.forwardRef(function(ut,ft){var St=ut,Qe=St.prefixCls,rt=St.defaultValue,wt=St.value,Ct=St.autoSize,bt=St.onResize,ct=St.className,xt=St.style,dt=St.disabled,Mt=St.onChange,yt=St.onInternalAutoSize,Ft=(0,de.Z)(St,De),mt=(0,me.Z)(rt,{value:wt,postState:function(On){return On!=null?On:""}}),vt=(0,_e.Z)(mt,2),tt=vt[0],He=vt[1],we=function(On){He(On.target.value),Mt==null||Mt(On)},Ne=Pe.useRef();Pe.useImperativeHandle(ft,function(){return{textArea:Ne.current}});var Xe=Pe.useMemo(function(){return Ct&&(0,fe.Z)(Ct)==="object"?[Ct.minRows,Ct.maxRows]:[]},[Ct]),nt=(0,_e.Z)(Xe,2),Ie=nt[0],Re=nt[1],Ze=!!Ct,et=function(){try{if(document.activeElement===Ne.current){var On=Ne.current,_r=On.selectionStart,xr=On.selectionEnd,$r=On.scrollTop;Ne.current.setSelectionRange(_r,xr),Ne.current.scrollTop=$r}}catch(tr){}},ht=Pe.useState(Me),at=(0,_e.Z)(ht,2),Dt=at[0],Et=at[1],Ot=Pe.useState(),qt=(0,_e.Z)(Ot,2),Qt=qt[0],Xt=qt[1],Wt=function(){Et(Fe)};(0,te.Z)(function(){Ze&&Wt()},[wt,Ie,Re,Ze]),(0,te.Z)(function(){if(Dt===Fe)Et(Te);else if(Dt===Te){var kn=je(Ne.current,!1,Ie,Re);Et(Me),Xt(kn)}else et()},[Dt]);var un=Pe.useRef(),on=function(){se.Z.cancel(un.current)},cn=function(On){Dt===Me&&(bt==null||bt(On),Ct&&(on(),un.current=(0,se.Z)(function(){Wt()})))};Pe.useEffect(function(){return on},[]);var bn=Ze?Qt:null,xn=(0,oe.Z)((0,oe.Z)({},xt),bn);return(Dt===Fe||Dt===Te)&&(xn.overflowY="hidden",xn.overflowX="hidden"),Pe.createElement(z.Z,{onResize:cn,disabled:!(Ct||bt)},Pe.createElement("textarea",(0,st.Z)({},Ft,{ref:Ne,style:xn,className:Ee()(Qe,ct,(0,Ut.Z)({},"".concat(Qe,"-disabled"),dt)),disabled:dt,value:tt,onChange:we})))}),Ge=Be,Ye=["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"],Ke=Pe.forwardRef(function(ut,ft){var St,Qe=ut.defaultValue,rt=ut.value,wt=ut.onFocus,Ct=ut.onBlur,bt=ut.onChange,ct=ut.allowClear,xt=ut.maxLength,dt=ut.onCompositionStart,Mt=ut.onCompositionEnd,yt=ut.suffix,Ft=ut.prefixCls,mt=Ft===void 0?"rc-textarea":Ft,vt=ut.showCount,tt=ut.count,He=ut.className,we=ut.style,Ne=ut.disabled,Xe=ut.hidden,nt=ut.classNames,Ie=ut.styles,Re=ut.onResize,Ze=ut.onClear,et=ut.onPressEnter,ht=ut.readOnly,at=ut.autoSize,Dt=ut.onKeyDown,Et=(0,de.Z)(ut,Ye),Ot=(0,me.Z)(Qe,{value:rt,defaultValue:Qe}),qt=(0,_e.Z)(Ot,2),Qt=qt[0],Xt=qt[1],Wt=Qt==null?"":String(Qt),un=Pe.useState(!1),on=(0,_e.Z)(un,2),cn=on[0],bn=on[1],xn=Pe.useRef(!1),kn=Pe.useState(null),On=(0,_e.Z)(kn,2),_r=On[0],xr=On[1],$r=(0,Pe.useRef)(null),tr=(0,Pe.useRef)(null),ii=function(){var Ht;return(Ht=tr.current)===null||Ht===void 0?void 0:Ht.textArea},di=function(){ii().focus()};(0,Pe.useImperativeHandle)(ft,function(){var Wn;return{resizableTextArea:tr.current,focus:di,blur:function(){ii().blur()},nativeElement:((Wn=$r.current)===null||Wn===void 0?void 0:Wn.nativeElement)||ii()}}),(0,Pe.useEffect)(function(){bn(function(Wn){return!Ne&&Wn})},[Ne]);var li=Pe.useState(null),Mi=(0,_e.Z)(li,2),yi=Mi[0],Jr=Mi[1];Pe.useEffect(function(){if(yi){var Wn;(Wn=ii()).setSelectionRange.apply(Wn,(0,Ue.Z)(yi))}},[yi]);var Li=(0,Se.Z)(tt,vt),qe=(St=Li.max)!==null&&St!==void 0?St:xt,Mr=Number(qe)>0,Lr=Li.strategy(Wt),br=!!qe&&Lr>qe,Pr=function(Ht,Jt){var Xn=Jt;!xn.current&&Li.exceedFormatter&&Li.max&&Li.strategy(Jt)>Li.max&&(Xn=Li.exceedFormatter(Jt,{max:Li.max}),Jt!==Xn&&Jr([ii().selectionStart||0,ii().selectionEnd||0])),Xt(Xn),(0,Ae.rJ)(Ht.currentTarget,Ht,bt,Xn)},kr=function(Ht){xn.current=!0,dt==null||dt(Ht)},Hi=function(Ht){xn.current=!1,Pr(Ht,Ht.currentTarget.value),Mt==null||Mt(Ht)},gr=function(Ht){Pr(Ht,Ht.target.value)},nr=function(Ht){Ht.key==="Enter"&&et&&et(Ht),Dt==null||Dt(Ht)},Vt=function(Ht){bn(!0),wt==null||wt(Ht)},Kt=function(Ht){bn(!1),Ct==null||Ct(Ht)},zt=function(Ht){Xt(""),di(),(0,Ae.rJ)(ii(),Ht,bt)},Mn=yt,Vn;Li.show&&(Li.showFormatter?Vn=Li.showFormatter({value:Wt,count:Lr,maxLength:qe}):Vn="".concat(Lr).concat(Mr?" / ".concat(qe):""),Mn=Pe.createElement(Pe.Fragment,null,Mn,Pe.createElement("span",{className:Ee()("".concat(mt,"-data-count"),nt==null?void 0:nt.count),style:Ie==null?void 0:Ie.count},Vn)));var vr=function(Ht){var Jt;Re==null||Re(Ht),(Jt=ii())!==null&&Jt!==void 0&&Jt.style.height&&xr(!0)},vn=!at&&!vt&&!ct;return Pe.createElement(ke.BaseInput,{ref:$r,value:Wt,allowClear:ct,handleReset:zt,suffix:Mn,prefixCls:mt,classNames:(0,oe.Z)((0,oe.Z)({},nt),{},{affixWrapper:Ee()(nt==null?void 0:nt.affixWrapper,(0,Ut.Z)((0,Ut.Z)({},"".concat(mt,"-show-count"),vt),"".concat(mt,"-textarea-allow-clear"),ct))}),disabled:Ne,focused:cn,className:Ee()(He,br&&"".concat(mt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},we),_r&&!vn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Vn=="string"?Vn:void 0}},hidden:Xe,readOnly:ht,onClear:Ze},Pe.createElement(Ge,(0,st.Z)({},Et,{autoSize:at,maxLength:xt,onKeyDown:nr,onChange:gr,onFocus:Vt,onBlur:Kt,onCompositionStart:kr,onCompositionEnd:Hi,className:Ee()(nt==null?void 0:nt.textarea),style:(0,oe.Z)((0,oe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:we==null?void 0:we.resize}),disabled:Ne,prefixCls:mt,onResize:vr,ref:tr,readOnly:ht})))}),Ve=Ke,ot=Ve},639:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return ce}});var st=pt(72308),Ut=pt(49618),oe=pt(77321),Ue=pt(52487),_e=pt(74416),de=pt(59301),ve=pt(92310),Ee=pt.n(ve),ke=pt(26112),Se=pt(30699),Ae=function(xe){for(var je=xe.prefixCls,De=xe.level,Fe=xe.isStart,Te=xe.isEnd,Me="".concat(je,"-indent-unit"),Be=[],Ge=0;Ge<De;Ge+=1)Be.push(de.createElement("span",{key:Ge,className:Ee()(Me,(0,Ut.Z)((0,Ut.Z)({},"".concat(Me,"-start"),Fe[Ge]),"".concat(Me,"-end"),Te[Ge]))}));return de.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Be)},me=de.memo(Ae),Pe=pt(65065),fe=pt(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],te="open",se="close",ie="---",le=function(xe){var je,De,Fe,Te=xe.eventKey,Me=xe.className,Be=xe.style,Ge=xe.dragOver,Ye=xe.dragOverGapTop,Ke=xe.dragOverGapBottom,Ve=xe.isLeaf,ot=xe.isStart,ut=xe.isEnd,ft=xe.expanded,St=xe.selected,Qe=xe.checked,rt=xe.halfChecked,wt=xe.loading,Ct=xe.domRef,bt=xe.active,ct=xe.data,xt=xe.onMouseMove,dt=xe.selectable,Mt=(0,_e.Z)(xe,z),yt=de.useContext(Se.k),Ft=de.useContext(Se.y),mt=de.useRef(null),vt=de.useState(!1),tt=(0,Ue.Z)(vt,2),He=tt[0],we=tt[1],Ne=!!(yt.disabled||xe.disabled||(je=Ft.nodeDisabled)!==null&&je!==void 0&&je.call(Ft,ct)),Xe=de.useMemo(function(){return!yt.checkable||xe.checkable===!1?!1:yt.checkable},[yt.checkable,xe.checkable]),nt=function(Lr){Ne||yt.onNodeSelect(Lr,(0,fe.F)(xe))},Ie=function(Lr){Ne||!Xe||xe.disableCheckbox||yt.onNodeCheck(Lr,(0,fe.F)(xe),!Qe)},Re=de.useMemo(function(){return typeof dt=="boolean"?dt:yt.selectable},[dt,yt.selectable]),Ze=function(Lr){yt.onNodeClick(Lr,(0,fe.F)(xe)),Re?nt(Lr):Ie(Lr)},et=function(Lr){yt.onNodeDoubleClick(Lr,(0,fe.F)(xe))},ht=function(Lr){yt.onNodeMouseEnter(Lr,(0,fe.F)(xe))},at=function(Lr){yt.onNodeMouseLeave(Lr,(0,fe.F)(xe))},Dt=function(Lr){yt.onNodeContextMenu(Lr,(0,fe.F)(xe))},Et=de.useMemo(function(){return!!(yt.draggable&&(!yt.draggable.nodeDraggable||yt.draggable.nodeDraggable(ct)))},[yt.draggable,ct]),Ot=function(Lr){Lr.stopPropagation(),we(!0),yt.onNodeDragStart(Lr,xe);try{Lr.dataTransfer.setData("text/plain","")}catch(br){}},qt=function(Lr){Lr.preventDefault(),Lr.stopPropagation(),yt.onNodeDragEnter(Lr,xe)},Qt=function(Lr){Lr.preventDefault(),Lr.stopPropagation(),yt.onNodeDragOver(Lr,xe)},Xt=function(Lr){Lr.stopPropagation(),yt.onNodeDragLeave(Lr,xe)},Wt=function(Lr){Lr.stopPropagation(),we(!1),yt.onNodeDragEnd(Lr,xe)},un=function(Lr){Lr.preventDefault(),Lr.stopPropagation(),we(!1),yt.onNodeDrop(Lr,xe)},on=function(Lr){wt||yt.onNodeExpand(Lr,(0,fe.F)(xe))},cn=de.useMemo(function(){var Mr=(0,Pe.Z)(yt.keyEntities,Te)||{},Lr=Mr.children;return!!(Lr||[]).length},[yt.keyEntities,Te]),bn=de.useMemo(function(){return Ve===!1?!1:Ve||!yt.loadData&&!cn||yt.loadData&&xe.loaded&&!cn},[Ve,yt.loadData,cn,xe.loaded]);de.useEffect(function(){wt||typeof yt.loadData=="function"&&ft&&!bn&&!xe.loaded&&yt.onNodeLoad((0,fe.F)(xe))},[wt,yt.loadData,yt.onNodeLoad,ft,bn,xe]);var xn=de.useMemo(function(){var Mr;return(Mr=yt.draggable)!==null&&Mr!==void 0&&Mr.icon?de.createElement("span",{className:"".concat(yt.prefixCls,"-draggable-icon")},yt.draggable.icon):null},[yt.draggable]),kn=function(Lr){var br=xe.switcherIcon||yt.switcherIcon;return typeof br=="function"?br((0,oe.Z)((0,oe.Z)({},xe),{},{isLeaf:Lr})):br},On=function(){if(bn){var Lr=kn(!0);return Lr!==!1?de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher-noop"))},Lr):null}var br=kn(!1);return br!==!1?de.createElement("span",{onClick:on,className:Ee()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher_").concat(ft?te:se))},br):null},_r=de.useMemo(function(){if(!Xe)return null;var Mr=typeof Xe!="boolean"?Xe:null;return de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-checkbox"),(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)({},"".concat(yt.prefixCls,"-checkbox-checked"),Qe),"".concat(yt.prefixCls,"-checkbox-indeterminate"),!Qe&&rt),"".concat(yt.prefixCls,"-checkbox-disabled"),Ne||xe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":rt?"mixed":Qe,"aria-disabled":Ne||xe.disableCheckbox,"aria-label":"Select ".concat(typeof xe.title=="string"?xe.title:"tree node")},Mr)},[Xe,Qe,rt,Ne,xe.disableCheckbox,xe.title]),xr=de.useMemo(function(){return bn?null:ft?te:se},[bn,ft]),$r=de.useMemo(function(){return de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__").concat(xr||"docu"),(0,Ut.Z)({},"".concat(yt.prefixCls,"-icon_loading"),wt))})},[yt.prefixCls,xr,wt]),tr=de.useMemo(function(){var Mr=!!yt.draggable,Lr=!xe.disabled&&Mr&&yt.dragOverNodeKey===Te;return Lr?yt.dropIndicatorRender({dropPosition:yt.dropPosition,dropLevelOffset:yt.dropLevelOffset,indent:yt.indent,prefixCls:yt.prefixCls,direction:yt.direction}):null},[yt.dropPosition,yt.dropLevelOffset,yt.indent,yt.prefixCls,yt.direction,yt.draggable,yt.dragOverNodeKey,yt.dropIndicatorRender]),ii=de.useMemo(function(){var Mr=xe.title,Lr=Mr===void 0?ie:Mr,br="".concat(yt.prefixCls,"-node-content-wrapper"),Pr;if(yt.showIcon){var kr=xe.icon||yt.icon;Pr=kr?de.createElement("span",{className:Ee()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__customize"))},typeof kr=="function"?kr(xe):kr):$r}else yt.loadData&&wt&&(Pr=$r);var Hi;return typeof Lr=="function"?Hi=Lr(ct):yt.titleRender?Hi=yt.titleRender(ct):Hi=Lr,de.createElement("span",{ref:mt,title:typeof Lr=="string"?Lr:"",className:Ee()(br,"".concat(br,"-").concat(xr||"normal"),(0,Ut.Z)({},"".concat(yt.prefixCls,"-node-selected"),!Ne&&(St||He))),onMouseEnter:ht,onMouseLeave:at,onContextMenu:Dt,onClick:Ze,onDoubleClick:et},Pr,de.createElement("span",{className:"".concat(yt.prefixCls,"-title")},Hi),tr)},[yt.prefixCls,yt.showIcon,xe,yt.icon,$r,yt.titleRender,ct,xr,ht,at,Dt,Ze,et]),di=(0,ke.Z)(Mt,{aria:!0,data:!0}),li=(0,Pe.Z)(yt.keyEntities,Te)||{},Mi=li.level,yi=ut[ut.length-1],Jr=!Ne&&Et,Li=yt.draggingNodeKey===Te,qe=dt!==void 0?{"aria-selected":!!dt}:void 0;return de.createElement("div",(0,st.Z)({ref:Ct,role:"treeitem","aria-expanded":Ve?void 0:ft,className:Ee()(Me,"".concat(yt.prefixCls,"-treenode"),(Fe={},(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)(Fe,"".concat(yt.prefixCls,"-treenode-disabled"),Ne),"".concat(yt.prefixCls,"-treenode-switcher-").concat(ft?"open":"close"),!Ve),"".concat(yt.prefixCls,"-treenode-checkbox-checked"),Qe),"".concat(yt.prefixCls,"-treenode-checkbox-indeterminate"),rt),"".concat(yt.prefixCls,"-treenode-selected"),St),"".concat(yt.prefixCls,"-treenode-loading"),wt),"".concat(yt.prefixCls,"-treenode-active"),bt),"".concat(yt.prefixCls,"-treenode-leaf-last"),yi),"".concat(yt.prefixCls,"-treenode-draggable"),Et),"dragging",Li),(0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)((0,Ut.Z)(Fe,"drop-target",yt.dropTargetKey===Te),"drop-container",yt.dropContainerKey===Te),"drag-over",!Ne&&Ge),"drag-over-gap-top",!Ne&&Ye),"drag-over-gap-bottom",!Ne&&Ke),"filter-node",(De=yt.filterTreeNode)===null||De===void 0?void 0:De.call(yt,(0,fe.F)(xe))),"".concat(yt.prefixCls,"-treenode-leaf"),bn))),style:Be,draggable:Jr,onDragStart:Jr?Ot:void 0,onDragEnter:Et?qt:void 0,onDragOver:Et?Qt:void 0,onDragLeave:Et?Xt:void 0,onDrop:Et?un:void 0,onDragEnd:Et?Wt:void 0,onMouseMove:xt},qe,di),de.createElement(me,{prefixCls:yt.prefixCls,level:Mi,isStart:ot,isEnd:ut}),xn,On(),_r,ii)};le.isTreeNode=1;var ce=le},30699:function(Rn,An,pt){"use strict";pt.d(An,{k:function(){return Ut},y:function(){return oe}});var st=pt(59301),Ut=st.createContext(null),oe=st.createContext({})},15018:function(Rn,An,pt){"use strict";pt.d(An,{OF:function(){return Te.Z},y6:function(){return se.y},ZP:function(){return Ne}});var st=pt(72308),Ut=pt(62853),oe=pt(77321),Ue=pt(80702),_e=pt(96949),de=pt(55090),ve=pt(80237),Ee=pt(77205),ke=pt(38793),Se=pt(49618),Ae=pt(92310),me=pt.n(Ae),Pe=pt(10228),fe=pt(26112),z=pt(48736),te=pt(59301),se=pt(30699),ie=function(nt){var Ie=nt.dropPosition,Re=nt.dropLevelOffset,Ze=nt.indent,et={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){case-1:et.top=0,et.left=-Re*Ze;break;case 1:et.bottom=0,et.left=-Re*Ze;break;case 0:et.bottom=0,et.left=Ze;break}return te.createElement("div",{style:et})},le=ie;function ce(Xe){if(Xe==null)throw new TypeError("Cannot destructure "+Xe)}var pe=pt(52487),xe=pt(74416),je=pt(34280),De=pt(45680),Fe=pt(77900),Te=pt(639);function Me(Xe,nt){var Ie=te.useState(!1),Re=(0,pe.Z)(Ie,2),Ze=Re[0],et=Re[1];(0,je.Z)(function(){if(Ze)return Xe(),function(){nt()}},[Ze]),(0,je.Z)(function(){return et(!0),function(){et(!1)}},[])}var Be=Me,Ge=pt(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ke=te.forwardRef(function(Xe,nt){var Ie=Xe.className,Re=Xe.style,Ze=Xe.motion,et=Xe.motionNodes,ht=Xe.motionType,at=Xe.onMotionStart,Dt=Xe.onMotionEnd,Et=Xe.active,Ot=Xe.treeNodeRequiredProps,qt=(0,xe.Z)(Xe,Ye),Qt=te.useState(!0),Xt=(0,pe.Z)(Qt,2),Wt=Xt[0],un=Xt[1],on=te.useContext(se.k),cn=on.prefixCls,bn=et&&ht!=="hide";(0,je.Z)(function(){et&&bn!==Wt&&un(bn)},[et]);var xn=function(){et&&at()},kn=te.useRef(!1),On=function(){et&&!kn.current&&(kn.current=!0,Dt())};Be(xn,On);var _r=function($r){bn===$r&&On()};return et?te.createElement(Fe.default,(0,st.Z)({ref:nt,visible:Wt},Ze,{motionAppear:ht==="show",onVisibleChanged:_r}),function(xr,$r){var tr=xr.className,ii=xr.style;return te.createElement("div",{ref:$r,className:me()("".concat(cn,"-treenode-motion"),tr),style:ii},et.map(function(di){var li=Object.assign({},(ce(di.data),di.data)),Mi=di.title,yi=di.key,Jr=di.isStart,Li=di.isEnd;delete li.children;var qe=(0,Ge.H8)(yi,Ot);return te.createElement(Te.Z,(0,st.Z)({},li,qe,{title:Mi,active:Et,data:di.data,key:yi,isStart:Jr,isEnd:Li}))}))}):te.createElement(Te.Z,(0,st.Z)({domRef:nt,className:Ie,style:Re},qt,{active:Et}))}),Ve=Ke;function ot(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Xe.length,Re=nt.length;if(Math.abs(Ie-Re)!==1)return{add:!1,key:null};function Ze(et,ht){var at=new Map;et.forEach(function(Et){at.set(Et,!0)});var Dt=ht.filter(function(Et){return!at.has(Et)});return Dt.length===1?Dt[0]:null}return Ie<Re?{add:!0,key:Ze(Xe,nt)}:{add:!1,key:Ze(nt,Xe)}}function ut(Xe,nt,Ie){var Re=Xe.findIndex(function(at){return at.key===Ie}),Ze=Xe[Re+1],et=nt.findIndex(function(at){return at.key===Ie});if(Ze){var ht=nt.findIndex(function(at){return at.key===Ze.key});return nt.slice(et+1,ht)}return nt.slice(et+1)}var ft=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],St={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Qe=function(){},rt="RC_TREE_MOTION_".concat(Math.random()),wt={key:rt},Ct={key:rt,level:0,index:0,pos:"0",node:wt,nodes:[wt]},bt={parent:null,children:[],pos:Ct.pos,data:wt,title:null,key:rt,isStart:[],isEnd:[]};function ct(Xe,nt,Ie,Re){return nt===!1||!Ie?Xe:Xe.slice(0,Math.ceil(Ie/Re)+1)}function xt(Xe){var nt=Xe.key,Ie=Xe.pos;return(0,Ge.km)(nt,Ie)}function dt(Xe){for(var nt=String(Xe.data.key),Ie=Xe;Ie.parent;)Ie=Ie.parent,nt="".concat(Ie.data.key," > ").concat(nt);return nt}var Mt=te.forwardRef(function(Xe,nt){var Ie=Xe.prefixCls,Re=Xe.data,Ze=Xe.selectable,et=Xe.checkable,ht=Xe.expandedKeys,at=Xe.selectedKeys,Dt=Xe.checkedKeys,Et=Xe.loadedKeys,Ot=Xe.loadingKeys,qt=Xe.halfCheckedKeys,Qt=Xe.keyEntities,Xt=Xe.disabled,Wt=Xe.dragging,un=Xe.dragOverNodeKey,on=Xe.dropPosition,cn=Xe.motion,bn=Xe.height,xn=Xe.itemHeight,kn=Xe.virtual,On=Xe.scrollWidth,_r=Xe.focusable,xr=Xe.activeItem,$r=Xe.focused,tr=Xe.tabIndex,ii=Xe.onKeyDown,di=Xe.onFocus,li=Xe.onBlur,Mi=Xe.onActiveChange,yi=Xe.onListChangeStart,Jr=Xe.onListChangeEnd,Li=(0,xe.Z)(Xe,ft),qe=te.useRef(null),Mr=te.useRef(null);te.useImperativeHandle(nt,function(){return{scrollTo:function(jn){qe.current.scrollTo(jn)},getIndentWidth:function(){return Mr.current.offsetWidth}}});var Lr=te.useState(ht),br=(0,pe.Z)(Lr,2),Pr=br[0],kr=br[1],Hi=te.useState(Re),gr=(0,pe.Z)(Hi,2),nr=gr[0],Vt=gr[1],Kt=te.useState(Re),zt=(0,pe.Z)(Kt,2),Mn=zt[0],Vn=zt[1],vr=te.useState([]),vn=(0,pe.Z)(vr,2),Wn=vn[0],Ht=vn[1],Jt=te.useState(null),Xn=(0,pe.Z)(Jt,2),jt=Xn[0],ln=Xn[1],Nn=te.useRef(Re);Nn.current=Re;function Yn(){var Jn=Nn.current;Vt(Jn),Vn(Jn),Ht([]),ln(null),Jr()}(0,je.Z)(function(){kr(ht);var Jn=ot(Pr,ht);if(Jn.key!==null)if(Jn.add){var jn=nr.findIndex(function(zr){var Dr=zr.key;return Dr===Jn.key}),Bn=ct(ut(nr,Re,Jn.key),kn,bn,xn),er=nr.slice();er.splice(jn+1,0,bt),Vn(er),Ht(Bn),ln("show")}else{var _n=Re.findIndex(function(zr){var Dr=zr.key;return Dr===Jn.key}),sr=ct(ut(Re,nr,Jn.key),kn,bn,xn),Fr=Re.slice();Fr.splice(_n+1,0,bt),Vn(Fr),Ht(sr),ln("hide")}else nr!==Re&&(Vt(Re),Vn(Re))},[ht,Re]),te.useEffect(function(){Wt||Yn()},[Wt]);var sn=cn?Mn:Re,Dn={expandedKeys:ht,selectedKeys:at,loadedKeys:Et,loadingKeys:Ot,checkedKeys:Dt,halfCheckedKeys:qt,dragOverNodeKey:un,dropPosition:on,keyEntities:Qt};return te.createElement(te.Fragment,null,$r&&xr&&te.createElement("span",{style:St,"aria-live":"assertive"},dt(xr)),te.createElement("div",null,te.createElement("input",{style:St,disabled:_r===!1||Xt,tabIndex:_r!==!1?tr:null,onKeyDown:ii,onFocus:di,onBlur:li,value:"",onChange:Qe,"aria-label":"for screen reader"})),te.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},te.createElement("div",{className:"".concat(Ie,"-indent")},te.createElement("div",{ref:Mr,className:"".concat(Ie,"-indent-unit")}))),te.createElement(De.Z,(0,st.Z)({},Li,{data:sn,itemKey:xt,height:bn,fullHeight:!1,virtual:kn,itemHeight:xn,scrollWidth:On,prefixCls:"".concat(Ie,"-list"),ref:qe,role:"tree",onVisibleChange:function(jn){jn.every(function(Bn){return xt(Bn)!==rt})&&Yn()}}),function(Jn){var jn=Jn.pos,Bn=Object.assign({},(ce(Jn.data),Jn.data)),er=Jn.title,_n=Jn.key,sr=Jn.isStart,Fr=Jn.isEnd,zr=(0,Ge.km)(_n,jn);delete Bn.key,delete Bn.children;var Dr=(0,Ge.H8)(zr,Dn);return te.createElement(Ve,(0,st.Z)({},Bn,Dr,{title:er,active:!!xr&&_n===xr.key,pos:jn,data:Jn.data,isStart:sr,isEnd:Fr,motion:cn,motionNodes:_n===rt?Wn:null,motionType:jt,onMotionStart:yi,onMotionEnd:Yn,treeNodeRequiredProps:Dn,onMouseMove:function(){Mi(null)}}))}))}),yt=Mt,Ft=pt(82661),mt=pt(34643),vt=pt(65065),tt=10,He=function(Xe){(0,Ee.Z)(Ie,Xe);var nt=(0,ke.Z)(Ie);function Ie(){var Re;(0,_e.Z)(this,Ie);for(var Ze=arguments.length,et=new Array(Ze),ht=0;ht<Ze;ht++)et[ht]=arguments[ht];return Re=nt.call.apply(nt,[this].concat(et)),(0,Se.Z)((0,ve.Z)(Re),"destroyed",!1),(0,Se.Z)((0,ve.Z)(Re),"delayedDragEnterLogic",void 0),(0,Se.Z)((0,ve.Z)(Re),"loadingRetryTimes",{}),(0,Se.Z)((0,ve.Z)(Re),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Ge.w$)()}),(0,Se.Z)((0,ve.Z)(Re),"dragStartMousePosition",null),(0,Se.Z)((0,ve.Z)(Re),"dragNodeProps",null),(0,Se.Z)((0,ve.Z)(Re),"currentMouseOverDroppableNodeKey",null),(0,Se.Z)((0,ve.Z)(Re),"listRef",te.createRef()),(0,Se.Z)((0,ve.Z)(Re),"onNodeDragStart",function(at,Dt){var Et=Re.state,Ot=Et.expandedKeys,qt=Et.keyEntities,Qt=Re.props.onDragStart,Xt=Dt.eventKey;Re.dragNodeProps=Dt,Re.dragStartMousePosition={x:at.clientX,y:at.clientY};var Wt=(0,Ft._5)(Ot,Xt);Re.setState({draggingNodeKey:Xt,dragChildrenKeys:(0,Ft.wA)(Xt,qt),indent:Re.listRef.current.getIndentWidth()}),Re.setExpandedKeys(Wt),window.addEventListener("dragend",Re.onWindowDragEnd),Qt==null||Qt({event:at,node:(0,Ge.F)(Dt)})}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDragEnter",function(at,Dt){var Et=Re.state,Ot=Et.expandedKeys,qt=Et.keyEntities,Qt=Et.dragChildrenKeys,Xt=Et.flattenNodes,Wt=Et.indent,un=Re.props,on=un.onDragEnter,cn=un.onExpand,bn=un.allowDrop,xn=un.direction,kn=Dt.pos,On=Dt.eventKey;if(Re.currentMouseOverDroppableNodeKey!==On&&(Re.currentMouseOverDroppableNodeKey=On),!Re.dragNodeProps){Re.resetDragState();return}var _r=(0,Ft.OM)(at,Re.dragNodeProps,Dt,Wt,Re.dragStartMousePosition,bn,Xt,qt,Ot,xn),xr=_r.dropPosition,$r=_r.dropLevelOffset,tr=_r.dropTargetKey,ii=_r.dropContainerKey,di=_r.dropTargetPos,li=_r.dropAllowed,Mi=_r.dragOverNodeKey;if(Qt.includes(tr)||!li){Re.resetDragState();return}if(Re.delayedDragEnterLogic||(Re.delayedDragEnterLogic={}),Object.keys(Re.delayedDragEnterLogic).forEach(function(yi){clearTimeout(Re.delayedDragEnterLogic[yi])}),Re.dragNodeProps.eventKey!==Dt.eventKey&&(at.persist(),Re.delayedDragEnterLogic[kn]=window.setTimeout(function(){if(Re.state.draggingNodeKey!==null){var yi=(0,Ue.Z)(Ot),Jr=(0,vt.Z)(qt,Dt.eventKey);Jr&&(Jr.children||[]).length&&(yi=(0,Ft.L0)(Ot,Dt.eventKey)),Re.props.hasOwnProperty("expandedKeys")||Re.setExpandedKeys(yi),cn==null||cn(yi,{node:(0,Ge.F)(Dt),expanded:!0,nativeEvent:at.nativeEvent})}},800)),Re.dragNodeProps.eventKey===tr&&$r===0){Re.resetDragState();return}Re.setState({dragOverNodeKey:Mi,dropPosition:xr,dropLevelOffset:$r,dropTargetKey:tr,dropContainerKey:ii,dropTargetPos:di,dropAllowed:li}),on==null||on({event:at,node:(0,Ge.F)(Dt),expandedKeys:Ot})}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDragOver",function(at,Dt){var Et=Re.state,Ot=Et.dragChildrenKeys,qt=Et.flattenNodes,Qt=Et.keyEntities,Xt=Et.expandedKeys,Wt=Et.indent,un=Re.props,on=un.onDragOver,cn=un.allowDrop,bn=un.direction;if(Re.dragNodeProps){var xn=(0,Ft.OM)(at,Re.dragNodeProps,Dt,Wt,Re.dragStartMousePosition,cn,qt,Qt,Xt,bn),kn=xn.dropPosition,On=xn.dropLevelOffset,_r=xn.dropTargetKey,xr=xn.dropContainerKey,$r=xn.dropTargetPos,tr=xn.dropAllowed,ii=xn.dragOverNodeKey;Ot.includes(_r)||!tr||(Re.dragNodeProps.eventKey===_r&&On===0?Re.state.dropPosition===null&&Re.state.dropLevelOffset===null&&Re.state.dropTargetKey===null&&Re.state.dropContainerKey===null&&Re.state.dropTargetPos===null&&Re.state.dropAllowed===!1&&Re.state.dragOverNodeKey===null||Re.resetDragState():kn===Re.state.dropPosition&&On===Re.state.dropLevelOffset&&_r===Re.state.dropTargetKey&&xr===Re.state.dropContainerKey&&$r===Re.state.dropTargetPos&&tr===Re.state.dropAllowed&&ii===Re.state.dragOverNodeKey||Re.setState({dropPosition:kn,dropLevelOffset:On,dropTargetKey:_r,dropContainerKey:xr,dropTargetPos:$r,dropAllowed:tr,dragOverNodeKey:ii}),on==null||on({event:at,node:(0,Ge.F)(Dt)}))}}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDragLeave",function(at,Dt){Re.currentMouseOverDroppableNodeKey===Dt.eventKey&&!at.currentTarget.contains(at.relatedTarget)&&(Re.resetDragState(),Re.currentMouseOverDroppableNodeKey=null);var Et=Re.props.onDragLeave;Et==null||Et({event:at,node:(0,Ge.F)(Dt)})}),(0,Se.Z)((0,ve.Z)(Re),"onWindowDragEnd",function(at){Re.onNodeDragEnd(at,null,!0),window.removeEventListener("dragend",Re.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDragEnd",function(at,Dt){var Et=Re.props.onDragEnd;Re.setState({dragOverNodeKey:null}),Re.cleanDragState(),Et==null||Et({event:at,node:(0,Ge.F)(Dt)}),Re.dragNodeProps=null,window.removeEventListener("dragend",Re.onWindowDragEnd)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDrop",function(at,Dt){var Et,Ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,qt=Re.state,Qt=qt.dragChildrenKeys,Xt=qt.dropPosition,Wt=qt.dropTargetKey,un=qt.dropTargetPos,on=qt.dropAllowed;if(on){var cn=Re.props.onDrop;if(Re.setState({dragOverNodeKey:null}),Re.cleanDragState(),Wt!==null){var bn=(0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Wt,Re.getTreeNodeRequiredProps())),{},{active:((Et=Re.getActiveItem())===null||Et===void 0?void 0:Et.key)===Wt,data:(0,vt.Z)(Re.state.keyEntities,Wt).node}),xn=Qt.includes(Wt);(0,z.ZP)(!xn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var kn=(0,Ft.yx)(un),On={event:at,node:(0,Ge.F)(bn),dragNode:Re.dragNodeProps?(0,Ge.F)(Re.dragNodeProps):null,dragNodesKeys:[Re.dragNodeProps.eventKey].concat(Qt),dropToGap:Xt!==0,dropPosition:Xt+Number(kn[kn.length-1])};Ot||cn==null||cn(On),Re.dragNodeProps=null}}}),(0,Se.Z)((0,ve.Z)(Re),"cleanDragState",function(){var at=Re.state.draggingNodeKey;at!==null&&Re.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Re.dragStartMousePosition=null,Re.currentMouseOverDroppableNodeKey=null}),(0,Se.Z)((0,ve.Z)(Re),"triggerExpandActionExpand",function(at,Dt){var Et=Re.state,Ot=Et.expandedKeys,qt=Et.flattenNodes,Qt=Dt.expanded,Xt=Dt.key,Wt=Dt.isLeaf;if(!(Wt||at.shiftKey||at.metaKey||at.ctrlKey)){var un=qt.filter(function(cn){return cn.key===Xt})[0],on=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Xt,Re.getTreeNodeRequiredProps())),{},{data:un.data}));Re.setExpandedKeys(Qt?(0,Ft._5)(Ot,Xt):(0,Ft.L0)(Ot,Xt)),Re.onNodeExpand(at,on)}}),(0,Se.Z)((0,ve.Z)(Re),"onNodeClick",function(at,Dt){var Et=Re.props,Ot=Et.onClick,qt=Et.expandAction;qt==="click"&&Re.triggerExpandActionExpand(at,Dt),Ot==null||Ot(at,Dt)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeDoubleClick",function(at,Dt){var Et=Re.props,Ot=Et.onDoubleClick,qt=Et.expandAction;qt==="doubleClick"&&Re.triggerExpandActionExpand(at,Dt),Ot==null||Ot(at,Dt)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeSelect",function(at,Dt){var Et=Re.state.selectedKeys,Ot=Re.state,qt=Ot.keyEntities,Qt=Ot.fieldNames,Xt=Re.props,Wt=Xt.onSelect,un=Xt.multiple,on=Dt.selected,cn=Dt[Qt.key],bn=!on;bn?un?Et=(0,Ft.L0)(Et,cn):Et=[cn]:Et=(0,Ft._5)(Et,cn);var xn=Et.map(function(kn){var On=(0,vt.Z)(qt,kn);return On?On.node:null}).filter(Boolean);Re.setUncontrolledState({selectedKeys:Et}),Wt==null||Wt(Et,{event:"select",selected:bn,node:Dt,selectedNodes:xn,nativeEvent:at.nativeEvent})}),(0,Se.Z)((0,ve.Z)(Re),"onNodeCheck",function(at,Dt,Et){var Ot=Re.state,qt=Ot.keyEntities,Qt=Ot.checkedKeys,Xt=Ot.halfCheckedKeys,Wt=Re.props,un=Wt.checkStrictly,on=Wt.onCheck,cn=Dt.key,bn,xn={event:"check",node:Dt,checked:Et,nativeEvent:at.nativeEvent};if(un){var kn=Et?(0,Ft.L0)(Qt,cn):(0,Ft._5)(Qt,cn),On=(0,Ft._5)(Xt,cn);bn={checked:kn,halfChecked:On},xn.checkedNodes=kn.map(function(di){return(0,vt.Z)(qt,di)}).filter(Boolean).map(function(di){return di.node}),Re.setUncontrolledState({checkedKeys:kn})}else{var _r=(0,mt.S)([].concat((0,Ue.Z)(Qt),[cn]),!0,qt),xr=_r.checkedKeys,$r=_r.halfCheckedKeys;if(!Et){var tr=new Set(xr);tr.delete(cn);var ii=(0,mt.S)(Array.from(tr),{checked:!1,halfCheckedKeys:$r},qt);xr=ii.checkedKeys,$r=ii.halfCheckedKeys}bn=xr,xn.checkedNodes=[],xn.checkedNodesPositions=[],xn.halfCheckedKeys=$r,xr.forEach(function(di){var li=(0,vt.Z)(qt,di);if(li){var Mi=li.node,yi=li.pos;xn.checkedNodes.push(Mi),xn.checkedNodesPositions.push({node:Mi,pos:yi})}}),Re.setUncontrolledState({checkedKeys:xr},!1,{halfCheckedKeys:$r})}on==null||on(bn,xn)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeLoad",function(at){var Dt,Et=at.key,Ot=Re.state.keyEntities,qt=(0,vt.Z)(Ot,Et);if(!(qt!=null&&(Dt=qt.children)!==null&&Dt!==void 0&&Dt.length)){var Qt=new Promise(function(Xt,Wt){Re.setState(function(un){var on=un.loadedKeys,cn=on===void 0?[]:on,bn=un.loadingKeys,xn=bn===void 0?[]:bn,kn=Re.props,On=kn.loadData,_r=kn.onLoad;if(!On||cn.includes(Et)||xn.includes(Et))return null;var xr=On(at);return xr.then(function(){var $r=Re.state.loadedKeys,tr=(0,Ft.L0)($r,Et);_r==null||_r(tr,{event:"load",node:at}),Re.setUncontrolledState({loadedKeys:tr}),Re.setState(function(ii){return{loadingKeys:(0,Ft._5)(ii.loadingKeys,Et)}}),Xt()}).catch(function($r){if(Re.setState(function(ii){return{loadingKeys:(0,Ft._5)(ii.loadingKeys,Et)}}),Re.loadingRetryTimes[Et]=(Re.loadingRetryTimes[Et]||0)+1,Re.loadingRetryTimes[Et]>=tt){var tr=Re.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Re.setUncontrolledState({loadedKeys:(0,Ft.L0)(tr,Et)}),Xt()}Wt($r)}),{loadingKeys:(0,Ft.L0)(xn,Et)}})});return Qt.catch(function(){}),Qt}}),(0,Se.Z)((0,ve.Z)(Re),"onNodeMouseEnter",function(at,Dt){var Et=Re.props.onMouseEnter;Et==null||Et({event:at,node:Dt})}),(0,Se.Z)((0,ve.Z)(Re),"onNodeMouseLeave",function(at,Dt){var Et=Re.props.onMouseLeave;Et==null||Et({event:at,node:Dt})}),(0,Se.Z)((0,ve.Z)(Re),"onNodeContextMenu",function(at,Dt){var Et=Re.props.onRightClick;Et&&(at.preventDefault(),Et({event:at,node:Dt}))}),(0,Se.Z)((0,ve.Z)(Re),"onFocus",function(){var at=Re.props.onFocus;Re.setState({focused:!0});for(var Dt=arguments.length,Et=new Array(Dt),Ot=0;Ot<Dt;Ot++)Et[Ot]=arguments[Ot];at==null||at.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(Re),"onBlur",function(){var at=Re.props.onBlur;Re.setState({focused:!1}),Re.onActiveChange(null);for(var Dt=arguments.length,Et=new Array(Dt),Ot=0;Ot<Dt;Ot++)Et[Ot]=arguments[Ot];at==null||at.apply(void 0,Et)}),(0,Se.Z)((0,ve.Z)(Re),"getTreeNodeRequiredProps",function(){var at=Re.state,Dt=at.expandedKeys,Et=at.selectedKeys,Ot=at.loadedKeys,qt=at.loadingKeys,Qt=at.checkedKeys,Xt=at.halfCheckedKeys,Wt=at.dragOverNodeKey,un=at.dropPosition,on=at.keyEntities;return{expandedKeys:Dt||[],selectedKeys:Et||[],loadedKeys:Ot||[],loadingKeys:qt||[],checkedKeys:Qt||[],halfCheckedKeys:Xt||[],dragOverNodeKey:Wt,dropPosition:un,keyEntities:on}}),(0,Se.Z)((0,ve.Z)(Re),"setExpandedKeys",function(at){var Dt=Re.state,Et=Dt.treeData,Ot=Dt.fieldNames,qt=(0,Ge.oH)(Et,at,Ot);Re.setUncontrolledState({expandedKeys:at,flattenNodes:qt},!0)}),(0,Se.Z)((0,ve.Z)(Re),"onNodeExpand",function(at,Dt){var Et=Re.state.expandedKeys,Ot=Re.state,qt=Ot.listChanging,Qt=Ot.fieldNames,Xt=Re.props,Wt=Xt.onExpand,un=Xt.loadData,on=Dt.expanded,cn=Dt[Qt.key];if(!qt){var bn=Et.includes(cn),xn=!on;if((0,z.ZP)(on&&bn||!on&&!bn,"Expand state not sync with index check"),Et=xn?(0,Ft.L0)(Et,cn):(0,Ft._5)(Et,cn),Re.setExpandedKeys(Et),Wt==null||Wt(Et,{node:Dt,expanded:xn,nativeEvent:at.nativeEvent}),xn&&un){var kn=Re.onNodeLoad(Dt);kn&&kn.then(function(){var On=(0,Ge.oH)(Re.state.treeData,Et,Qt);Re.setUncontrolledState({flattenNodes:On})}).catch(function(){var On=Re.state.expandedKeys,_r=(0,Ft._5)(On,cn);Re.setExpandedKeys(_r)})}}}),(0,Se.Z)((0,ve.Z)(Re),"onListChangeStart",function(){Re.setUncontrolledState({listChanging:!0})}),(0,Se.Z)((0,ve.Z)(Re),"onListChangeEnd",function(){setTimeout(function(){Re.setUncontrolledState({listChanging:!1})})}),(0,Se.Z)((0,ve.Z)(Re),"onActiveChange",function(at){var Dt=Re.state.activeKey,Et=Re.props,Ot=Et.onActiveChange,qt=Et.itemScrollOffset,Qt=qt===void 0?0:qt;Dt!==at&&(Re.setState({activeKey:at}),at!==null&&Re.scrollTo({key:at,offset:Qt}),Ot==null||Ot(at))}),(0,Se.Z)((0,ve.Z)(Re),"getActiveItem",function(){var at=Re.state,Dt=at.activeKey,Et=at.flattenNodes;return Dt===null?null:Et.find(function(Ot){var qt=Ot.key;return qt===Dt})||null}),(0,Se.Z)((0,ve.Z)(Re),"offsetActiveKey",function(at){var Dt=Re.state,Et=Dt.flattenNodes,Ot=Dt.activeKey,qt=Et.findIndex(function(Wt){var un=Wt.key;return un===Ot});qt===-1&&at<0&&(qt=Et.length),qt=(qt+at+Et.length)%Et.length;var Qt=Et[qt];if(Qt){var Xt=Qt.key;Re.onActiveChange(Xt)}else Re.onActiveChange(null)}),(0,Se.Z)((0,ve.Z)(Re),"onKeyDown",function(at){var Dt=Re.state,Et=Dt.activeKey,Ot=Dt.expandedKeys,qt=Dt.checkedKeys,Qt=Dt.fieldNames,Xt=Re.props,Wt=Xt.onKeyDown,un=Xt.checkable,on=Xt.selectable;switch(at.which){case Pe.Z.UP:{Re.offsetActiveKey(-1),at.preventDefault();break}case Pe.Z.DOWN:{Re.offsetActiveKey(1),at.preventDefault();break}}var cn=Re.getActiveItem();if(cn&&cn.data){var bn=Re.getTreeNodeRequiredProps(),xn=cn.data.isLeaf===!1||!!(cn.data[Qt.children]||[]).length,kn=(0,Ge.F)((0,oe.Z)((0,oe.Z)({},(0,Ge.H8)(Et,bn)),{},{data:cn.data,active:!0}));switch(at.which){case Pe.Z.LEFT:{xn&&Ot.includes(Et)?Re.onNodeExpand({},kn):cn.parent&&Re.onActiveChange(cn.parent.key),at.preventDefault();break}case Pe.Z.RIGHT:{xn&&!Ot.includes(Et)?Re.onNodeExpand({},kn):cn.children&&cn.children.length&&Re.onActiveChange(cn.children[0].key),at.preventDefault();break}case Pe.Z.ENTER:case Pe.Z.SPACE:{un&&!kn.disabled&&kn.checkable!==!1&&!kn.disableCheckbox?Re.onNodeCheck({},kn,!qt.includes(Et)):!un&&on&&!kn.disabled&&kn.selectable!==!1&&Re.onNodeSelect({},kn);break}}}Wt==null||Wt(at)}),(0,Se.Z)((0,ve.Z)(Re),"setUncontrolledState",function(at){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Re.destroyed){var Ot=!1,qt=!0,Qt={};Object.keys(at).forEach(function(Xt){if(Re.props.hasOwnProperty(Xt)){qt=!1;return}Ot=!0,Qt[Xt]=at[Xt]}),Ot&&(!Dt||qt)&&Re.setState((0,oe.Z)((0,oe.Z)({},Qt),Et))}}),(0,Se.Z)((0,ve.Z)(Re),"scrollTo",function(at){Re.listRef.current.scrollTo(at)}),Re}return(0,de.Z)(Ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ze=this.props,et=Ze.activeKey,ht=Ze.itemScrollOffset,at=ht===void 0?0:ht;et!==void 0&&et!==this.state.activeKey&&(this.setState({activeKey:et}),et!==null&&this.scrollTo({key:et,offset:at}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Ze=this.state,et=Ze.focused,ht=Ze.flattenNodes,at=Ze.keyEntities,Dt=Ze.draggingNodeKey,Et=Ze.activeKey,Ot=Ze.dropLevelOffset,qt=Ze.dropContainerKey,Qt=Ze.dropTargetKey,Xt=Ze.dropPosition,Wt=Ze.dragOverNodeKey,un=Ze.indent,on=this.props,cn=on.prefixCls,bn=on.className,xn=on.style,kn=on.showLine,On=on.focusable,_r=on.tabIndex,xr=_r===void 0?0:_r,$r=on.selectable,tr=on.showIcon,ii=on.icon,di=on.switcherIcon,li=on.draggable,Mi=on.checkable,yi=on.checkStrictly,Jr=on.disabled,Li=on.motion,qe=on.loadData,Mr=on.filterTreeNode,Lr=on.height,br=on.itemHeight,Pr=on.scrollWidth,kr=on.virtual,Hi=on.titleRender,gr=on.dropIndicatorRender,nr=on.onContextMenu,Vt=on.onScroll,Kt=on.direction,zt=on.rootClassName,Mn=on.rootStyle,Vn=(0,fe.Z)(this.props,{aria:!0,data:!0}),vr;li&&((0,Ut.Z)(li)==="object"?vr=li:typeof li=="function"?vr={nodeDraggable:li}:vr={});var vn={prefixCls:cn,selectable:$r,showIcon:tr,icon:ii,switcherIcon:di,draggable:vr,draggingNodeKey:Dt,checkable:Mi,checkStrictly:yi,disabled:Jr,keyEntities:at,dropLevelOffset:Ot,dropContainerKey:qt,dropTargetKey:Qt,dropPosition:Xt,dragOverNodeKey:Wt,indent:un,direction:Kt,dropIndicatorRender:gr,loadData:qe,filterTreeNode:Mr,titleRender:Hi,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return te.createElement(se.k.Provider,{value:vn},te.createElement("div",{className:me()(cn,bn,zt,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(cn,"-show-line"),kn),"".concat(cn,"-focused"),et),"".concat(cn,"-active-focused"),Et!==null)),style:Mn},te.createElement(yt,(0,st.Z)({ref:this.listRef,prefixCls:cn,style:xn,data:ht,disabled:Jr,selectable:$r,checkable:!!Mi,motion:Li,dragging:Dt!==null,height:Lr,itemHeight:br,virtual:kr,focusable:On,focused:et,tabIndex:xr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:nr,onScroll:Vt,scrollWidth:Pr},this.getTreeNodeRequiredProps(),Vn))))}}],[{key:"getDerivedStateFromProps",value:function(Ze,et){var ht=et.prevProps,at={prevProps:Ze};function Dt(xr){return!ht&&Ze.hasOwnProperty(xr)||ht&&ht[xr]!==Ze[xr]}var Et,Ot=et.fieldNames;if(Dt("fieldNames")&&(Ot=(0,Ge.w$)(Ze.fieldNames),at.fieldNames=Ot),Dt("treeData")?Et=Ze.treeData:Dt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Et=(0,Ge.zn)(Ze.children)),Et){at.treeData=Et;var qt=(0,Ge.I8)(Et,{fieldNames:Ot});at.keyEntities=(0,oe.Z)((0,Se.Z)({},rt,Ct),qt.keyEntities)}var Qt=at.keyEntities||et.keyEntities;if(Dt("expandedKeys")||ht&&Dt("autoExpandParent"))at.expandedKeys=Ze.autoExpandParent||!ht&&Ze.defaultExpandParent?(0,Ft.r7)(Ze.expandedKeys,Qt):Ze.expandedKeys;else if(!ht&&Ze.defaultExpandAll){var Xt=(0,oe.Z)({},Qt);delete Xt[rt];var Wt=[];Object.keys(Xt).forEach(function(xr){var $r=Xt[xr];$r.children&&$r.children.length&&Wt.push($r.key)}),at.expandedKeys=Wt}else!ht&&Ze.defaultExpandedKeys&&(at.expandedKeys=Ze.autoExpandParent||Ze.defaultExpandParent?(0,Ft.r7)(Ze.defaultExpandedKeys,Qt):Ze.defaultExpandedKeys);if(at.expandedKeys||delete at.expandedKeys,Et||at.expandedKeys){var un=(0,Ge.oH)(Et||et.treeData,at.expandedKeys||et.expandedKeys,Ot);at.flattenNodes=un}if(Ze.selectable&&(Dt("selectedKeys")?at.selectedKeys=(0,Ft.BT)(Ze.selectedKeys,Ze):!ht&&Ze.defaultSelectedKeys&&(at.selectedKeys=(0,Ft.BT)(Ze.defaultSelectedKeys,Ze))),Ze.checkable){var on;if(Dt("checkedKeys")?on=(0,Ft.E6)(Ze.checkedKeys)||{}:!ht&&Ze.defaultCheckedKeys?on=(0,Ft.E6)(Ze.defaultCheckedKeys)||{}:Et&&(on=(0,Ft.E6)(Ze.checkedKeys)||{checkedKeys:et.checkedKeys,halfCheckedKeys:et.halfCheckedKeys}),on){var cn=on,bn=cn.checkedKeys,xn=bn===void 0?[]:bn,kn=cn.halfCheckedKeys,On=kn===void 0?[]:kn;if(!Ze.checkStrictly){var _r=(0,mt.S)(xn,!0,Qt);xn=_r.checkedKeys,On=_r.halfCheckedKeys}at.checkedKeys=xn,at.halfCheckedKeys=On}}return Dt("loadedKeys")&&(at.loadedKeys=Ze.loadedKeys),at}}]),Ie}(te.Component);(0,Se.Z)(He,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:le,allowDrop:function(){return!0},expandAction:!1}),(0,Se.Z)(He,"TreeNode",Te.Z);var we=He,Ne=we},82661:function(Rn,An,pt){"use strict";pt.d(An,{BT:function(){return te},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return ke},r7:function(){return ce},wA:function(){return me},yx:function(){return Ae}});var st=pt(80702),Ut=pt(62853),oe=pt(48736),Ue=pt(59301),_e=pt(639),de=pt(65065),ve=pt(34061),Ee=null;function ke(pe,xe){if(!pe)return[];var je=pe.slice(),De=je.indexOf(xe);return De>=0&&je.splice(De,1),je}function Se(pe,xe){var je=(pe||[]).slice();return je.indexOf(xe)===-1&&je.push(xe),je}function Ae(pe){return pe.split("-")}function me(pe,xe){var je=[],De=(0,de.Z)(xe,pe);function Fe(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Te.forEach(function(Me){var Be=Me.key,Ge=Me.children;je.push(Be),Fe(Ge)})}return Fe(De.children),je}function Pe(pe){if(pe.parent){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var xe=Ae(pe.pos);return Number(xe[xe.length-1])===0}function z(pe,xe,je,De,Fe,Te,Me,Be,Ge,Ye){var Ke,Ve=pe.clientX,ot=pe.clientY,ut=pe.target.getBoundingClientRect(),ft=ut.top,St=ut.height,Qe=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ve),rt=(Qe-12)/De,wt=Ge.filter(function(Ne){var Xe;return(Xe=Be[Ne])===null||Xe===void 0||(Xe=Xe.children)===null||Xe===void 0?void 0:Xe.length}),Ct=(0,de.Z)(Be,je.eventKey);if(ot<ft+St/2){var bt=Me.findIndex(function(Ne){return Ne.key===Ct.key}),ct=bt<=0?0:bt-1,xt=Me[ct].key;Ct=(0,de.Z)(Be,xt)}var dt=Ct.key,Mt=Ct,yt=Ct.key,Ft=0,mt=0;if(!wt.includes(dt))for(var vt=0;vt<rt&&Pe(Ct);vt+=1)Ct=Ct.parent,mt+=1;var tt=xe.data,He=Ct.node,we=!0;return fe(Ct)&&Ct.level===0&&ot<ft+St/2&&Te({dragNode:tt,dropNode:He,dropPosition:-1})&&Ct.key===je.eventKey?Ft=-1:(Mt.children||[]).length&&wt.includes(yt)?Te({dragNode:tt,dropNode:He,dropPosition:0})?Ft=0:we=!1:mt===0?rt>-1.5?Te({dragNode:tt,dropNode:He,dropPosition:1})?Ft=1:we=!1:Te({dragNode:tt,dropNode:He,dropPosition:0})?Ft=0:Te({dragNode:tt,dropNode:He,dropPosition:1})?Ft=1:we=!1:Te({dragNode:tt,dropNode:He,dropPosition:1})?Ft=1:we=!1,{dropPosition:Ft,dropLevelOffset:mt,dropTargetKey:Ct.key,dropTargetPos:Ct.pos,dragOverNodeKey:yt,dropContainerKey:Ft===0?null:((Ke=Ct.parent)===null||Ke===void 0?void 0:Ke.key)||null,dropAllowed:we}}function te(pe,xe){if(pe){var je=xe.multiple;return je?pe.slice():pe.length?[pe[0]]:pe}}var se=function(xe){return xe};function ie(pe,xe){if(!pe)return[];var je=xe||{},De=je.processProps,Fe=De===void 0?se:De,Te=Array.isArray(pe)?pe:[pe];return Te.map(function(Me){var Be=Me.children,Ge=_objectWithoutProperties(Me,Ee),Ye=ie(Be,xe);return React.createElement(TreeNode,_extends({key:Ge.key},Fe(Ge)),Ye)})}function le(pe){if(!pe)return null;var xe;if(Array.isArray(pe))xe={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,Ut.Z)(pe)==="object")xe={checkedKeys:pe.checked||void 0,halfCheckedKeys:pe.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function ce(pe,xe){var je=new Set;function De(Fe){if(!je.has(Fe)){var Te=(0,de.Z)(xe,Fe);if(Te){je.add(Fe);var Me=Te.parent,Be=Te.node;Be.disabled||Me&&De(Me.key)}}}return(pe||[]).forEach(function(Fe){De(Fe)}),(0,st.Z)(je)}},34643:function(Rn,An,pt){"use strict";pt.d(An,{S:function(){return ve}});var st=pt(48736),Ut=pt(65065);function oe(Ee,ke){var Se=new Set;return Ee.forEach(function(Ae){ke.has(Ae)||Se.add(Ae)}),Se}function Ue(Ee){var ke=Ee||{},Se=ke.disabled,Ae=ke.disableCheckbox,me=ke.checkable;return!!(Se||Ae)||me===!1}function _e(Ee,ke,Se,Ae){for(var me=new Set(Ee),Pe=new Set,fe=0;fe<=Se;fe+=1){var z=ke.get(fe)||new Set;z.forEach(function(le){var ce=le.key,pe=le.node,xe=le.children,je=xe===void 0?[]:xe;me.has(ce)&&!Ae(pe)&&je.filter(function(De){return!Ae(De.node)}).forEach(function(De){me.add(De.key)})})}for(var te=new Set,se=Se;se>=0;se-=1){var ie=ke.get(se)||new Set;ie.forEach(function(le){var ce=le.parent,pe=le.node;if(!(Ae(pe)||!le.parent||te.has(le.parent.key))){if(Ae(le.parent.node)){te.add(ce.key);return}var xe=!0,je=!1;(ce.children||[]).filter(function(De){return!Ae(De.node)}).forEach(function(De){var Fe=De.key,Te=me.has(Fe);xe&&!Te&&(xe=!1),!je&&(Te||Pe.has(Fe))&&(je=!0)}),xe&&me.add(ce.key),je&&Pe.add(ce.key),te.add(ce.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(oe(Pe,me))}}function de(Ee,ke,Se,Ae,me){for(var Pe=new Set(Ee),fe=new Set(ke),z=0;z<=Ae;z+=1){var te=Se.get(z)||new Set;te.forEach(function(ce){var pe=ce.key,xe=ce.node,je=ce.children,De=je===void 0?[]:je;!Pe.has(pe)&&!fe.has(pe)&&!me(xe)&&De.filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){Pe.delete(Fe.key)})})}fe=new Set;for(var se=new Set,ie=Ae;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(ce){var pe=ce.parent,xe=ce.node;if(!(me(xe)||!ce.parent||se.has(ce.parent.key))){if(me(ce.parent.node)){se.add(pe.key);return}var je=!0,De=!1;(pe.children||[]).filter(function(Fe){return!me(Fe.node)}).forEach(function(Fe){var Te=Fe.key,Me=Pe.has(Te);je&&!Me&&(je=!1),!De&&(Me||fe.has(Te))&&(De=!0)}),je||Pe.delete(pe.key),De&&fe.add(pe.key),se.add(pe.key)}})}return{checkedKeys:Array.from(Pe),halfCheckedKeys:Array.from(oe(fe,Pe))}}function ve(Ee,ke,Se,Ae){var me=[],Pe;Ae?Pe=Ae:Pe=Ue;var fe=new Set(Ee.filter(function(ie){var le=!!(0,Ut.Z)(Se,ie);return le||me.push(ie),le})),z=new Map,te=0;Object.keys(Se).forEach(function(ie){var le=Se[ie],ce=le.level,pe=z.get(ce);pe||(pe=new Set,z.set(ce,pe)),pe.add(le),te=Math.max(te,ce)}),(0,st.ZP)(!me.length,"Tree missing follow keys: ".concat(me.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var se;return ke===!0?se=_e(fe,z,te,Pe):se=de(fe,ke.halfCheckedKeys,z,te,Pe),se}},65065:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return st}});function st(Ut,oe){return Ut[oe]}},34061:function(Rn,An,pt){"use strict";pt.d(An,{F:function(){return ce},H8:function(){return le},I8:function(){return ie},km:function(){return me},oH:function(){return te},w$:function(){return Pe},zn:function(){return z}});var st=pt(62853),Ut=pt(80702),oe=pt(77321),Ue=pt(74416),_e=pt(11592),de=pt(2738),ve=pt(48736),Ee=pt(65065),ke=["children"];function Se(pe,xe){return"".concat(pe,"-").concat(xe)}function Ae(pe){return pe&&pe.type&&pe.type.isTreeNode}function me(pe,xe){return pe!=null?pe:xe}function Pe(pe){var xe=pe||{},je=xe.title,De=xe._title,Fe=xe.key,Te=xe.children,Me=je||"title";return{title:Me,_title:De||[Me],key:Fe||"key",children:Te||"children"}}function fe(pe,xe){var je=new Map;function De(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Me){var Be=Me[xe.key],Ge=Me[xe.children];warning(Be!=null,"Tree node must have a certain key: [".concat(Te).concat(Be,"]"));var Ye=String(Be);warning(!je.has(Ye)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),De(Ge,"".concat(Te).concat(Ye," > "))})}De(pe)}function z(pe){function xe(je){var De=(0,_e.Z)(je);return De.map(function(Fe){if(!Ae(Fe))return(0,ve.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Te=Fe.key,Me=Fe.props,Be=Me.children,Ge=(0,Ue.Z)(Me,ke),Ye=(0,oe.Z)({key:Te},Ge),Ke=xe(Be);return Ke.length&&(Ye.children=Ke),Ye}).filter(function(Fe){return Fe})}return xe(pe)}function te(pe,xe,je){var De=Pe(je),Fe=De._title,Te=De.key,Me=De.children,Be=new Set(xe===!0?[]:xe),Ge=[];function Ye(Ke){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ke.map(function(ot,ut){for(var ft=Se(Ve?Ve.pos:"0",ut),St=me(ot[Te],ft),Qe,rt=0;rt<Fe.length;rt+=1){var wt=Fe[rt];if(ot[wt]!==void 0){Qe=ot[wt];break}}var Ct=Object.assign((0,de.Z)(ot,[].concat((0,Ut.Z)(Fe),[Te,Me])),{title:Qe,key:St,parent:Ve,pos:ft,children:null,data:ot,isStart:[].concat((0,Ut.Z)(Ve?Ve.isStart:[]),[ut===0]),isEnd:[].concat((0,Ut.Z)(Ve?Ve.isEnd:[]),[ut===Ke.length-1])});return Ge.push(Ct),xe===!0||Be.has(St)?Ct.children=Ye(ot[Me]||[],Ct):Ct.children=[],Ct})}return Ye(pe),Ge}function se(pe,xe,je){var De={};(0,st.Z)(je)==="object"?De=je:De={externalGetKey:je},De=De||{};var Fe=De,Te=Fe.childrenPropName,Me=Fe.externalGetKey,Be=Fe.fieldNames,Ge=Pe(Be),Ye=Ge.key,Ke=Ge.children,Ve=Te||Ke,ot;Me?typeof Me=="string"?ot=function(St){return St[Me]}:typeof Me=="function"&&(ot=function(St){return Me(St)}):ot=function(St,Qe){return me(St[Ye],Qe)};function ut(ft,St,Qe,rt){var wt=ft?ft[Ve]:pe,Ct=ft?Se(Qe.pos,St):"0",bt=ft?[].concat((0,Ut.Z)(rt),[ft]):[];if(ft){var ct=ot(ft,Ct),xt={node:ft,index:St,pos:Ct,key:ct,parentPos:Qe.node?Qe.pos:null,level:Qe.level+1,nodes:bt};xe(xt)}wt&&wt.forEach(function(dt,Mt){ut(dt,Mt,{node:ft,pos:Ct,level:Qe?Qe.level+1:-1},bt)})}ut(null)}function ie(pe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=xe.initWrapper,De=xe.processEntity,Fe=xe.onProcessFinished,Te=xe.externalGetKey,Me=xe.childrenPropName,Be=xe.fieldNames,Ge=arguments.length>2?arguments[2]:void 0,Ye=Te||Ge,Ke={},Ve={},ot={posEntities:Ke,keyEntities:Ve};return je&&(ot=je(ot)||ot),se(pe,function(ut){var ft=ut.node,St=ut.index,Qe=ut.pos,rt=ut.key,wt=ut.parentPos,Ct=ut.level,bt=ut.nodes,ct={node:ft,nodes:bt,index:St,key:rt,pos:Qe,level:Ct},xt=me(rt,Qe);Ke[Qe]=ct,Ve[xt]=ct,ct.parent=Ke[wt],ct.parent&&(ct.parent.children=ct.parent.children||[],ct.parent.children.push(ct)),De&&De(ct,ot)},{externalGetKey:Ye,childrenPropName:Me,fieldNames:Be}),Fe&&Fe(ot),ot}function le(pe,xe){var je=xe.expandedKeys,De=xe.selectedKeys,Fe=xe.loadedKeys,Te=xe.loadingKeys,Me=xe.checkedKeys,Be=xe.halfCheckedKeys,Ge=xe.dragOverNodeKey,Ye=xe.dropPosition,Ke=xe.keyEntities,Ve=(0,Ee.Z)(Ke,pe),ot={eventKey:pe,expanded:je.indexOf(pe)!==-1,selected:De.indexOf(pe)!==-1,loaded:Fe.indexOf(pe)!==-1,loading:Te.indexOf(pe)!==-1,checked:Me.indexOf(pe)!==-1,halfChecked:Be.indexOf(pe)!==-1,pos:String(Ve?Ve.pos:""),dragOver:Ge===pe&&Ye===0,dragOverGapTop:Ge===pe&&Ye===-1,dragOverGapBottom:Ge===pe&&Ye===1};return ot}function ce(pe){var xe=pe.data,je=pe.expanded,De=pe.selected,Fe=pe.checked,Te=pe.loaded,Me=pe.loading,Be=pe.halfChecked,Ge=pe.dragOver,Ye=pe.dragOverGapTop,Ke=pe.dragOverGapBottom,Ve=pe.pos,ot=pe.active,ut=pe.eventKey,ft=(0,oe.Z)((0,oe.Z)({},xe),{},{expanded:je,selected:De,checked:Fe,loaded:Te,loading:Me,halfChecked:Be,dragOver:Ge,dragOverGapTop:Ye,dragOverGapBottom:Ke,pos:Ve,active:ot,key:ut});return"props"in ft||Object.defineProperty(ft,"props",{get:function(){return(0,ve.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),pe}}),ft}},90472:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return ut}});var st=pt(72308),Ut=pt(96949),oe=pt(55090),Ue=pt(80237),_e=pt(77205),de=pt(38793),ve=pt(49618),Ee=pt(59301),ke=pt(77321),Se=pt(74416),Ae=pt(62853),me=pt(65736),Pe=pt(72633),fe=pt(80702),z=pt(92310),te=pt.n(z),se=pt(26112),ie=pt(48736),le=function(ft,St){if(ft&&St){var Qe=Array.isArray(St)?St:St.split(","),rt=ft.name||"",wt=ft.type||"",Ct=wt.replace(/\/.*$/,"");return Qe.some(function(bt){var ct=bt.trim();if(/^\*(\/\*)?$/.test(bt))return!0;if(ct.charAt(0)==="."){var xt=rt.toLowerCase(),dt=ct.toLowerCase(),Mt=[dt];return(dt===".jpg"||dt===".jpeg")&&(Mt=[".jpg",".jpeg"]),Mt.some(function(yt){return xt.endsWith(yt)})}return/\/\*$/.test(ct)?Ct===ct.replace(/\/.*$/,""):wt===ct?!0:/^\w+$/.test(ct)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ct,"'.Skip for check.")),!0):!1})}return!0};function ce(ft,St){var Qe="cannot ".concat(ft.method," ").concat(ft.action," ").concat(St.status,"'"),rt=new Error(Qe);return rt.status=St.status,rt.method=ft.method,rt.url=ft.action,rt}function pe(ft){var St=ft.responseText||ft.response;if(!St)return St;try{return JSON.parse(St)}catch(Qe){return St}}function xe(ft){var St=new XMLHttpRequest;ft.onProgress&&St.upload&&(St.upload.onprogress=function(Ct){Ct.total>0&&(Ct.percent=Ct.loaded/Ct.total*100),ft.onProgress(Ct)});var Qe=new FormData;ft.data&&Object.keys(ft.data).forEach(function(wt){var Ct=ft.data[wt];if(Array.isArray(Ct)){Ct.forEach(function(bt){Qe.append("".concat(wt,"[]"),bt)});return}Qe.append(wt,Ct)}),ft.file instanceof Blob?Qe.append(ft.filename,ft.file,ft.file.name):Qe.append(ft.filename,ft.file),St.onerror=function(Ct){ft.onError(Ct)},St.onload=function(){return St.status<200||St.status>=300?ft.onError(ce(ft,St),pe(St)):ft.onSuccess(pe(St),St)},St.open(ft.method,ft.action,!0),ft.withCredentials&&"withCredentials"in St&&(St.withCredentials=!0);var rt=ft.headers||{};return rt["X-Requested-With"]!==null&&St.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(rt).forEach(function(wt){rt[wt]!==null&&St.setRequestHeader(wt,rt[wt])}),St.send(Qe),{abort:function(){St.abort()}}}var je=function(){var ft=(0,Pe.Z)((0,me.Z)().mark(function St(Qe,rt){var wt,Ct,bt,ct,xt,dt,Mt,yt;return(0,me.Z)().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:dt=function(){return dt=(0,Pe.Z)((0,me.Z)().mark(function tt(He){return(0,me.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(Xe){He.file(function(nt){rt(nt)?(He.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=He.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),Xe(nt)):Xe(null)})}));case 1:case"end":return Ne.stop()}},tt)})),dt.apply(this,arguments)},xt=function(tt){return dt.apply(this,arguments)},ct=function(){return ct=(0,Pe.Z)((0,me.Z)().mark(function tt(He){var we,Ne,Xe,nt,Ie;return(0,me.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:we=He.createReader(),Ne=[];case 2:return Ze.next=5,new Promise(function(et){we.readEntries(et,function(){return et([])})});case 5:if(Xe=Ze.sent,nt=Xe.length,nt){Ze.next=9;break}return Ze.abrupt("break",12);case 9:for(Ie=0;Ie<nt;Ie++)Ne.push(Xe[Ie]);Ze.next=2;break;case 12:return Ze.abrupt("return",Ne);case 13:case"end":return Ze.stop()}},tt)})),ct.apply(this,arguments)},bt=function(tt){return ct.apply(this,arguments)},wt=[],Ct=[],Qe.forEach(function(vt){return Ct.push(vt.webkitGetAsEntry())}),Mt=function(){var vt=(0,Pe.Z)((0,me.Z)().mark(function tt(He,we){var Ne,Xe;return(0,me.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(He){Ie.next=2;break}return Ie.abrupt("return");case 2:if(He.path=we||"",!He.isFile){Ie.next=10;break}return Ie.next=6,xt(He);case 6:Ne=Ie.sent,Ne&&wt.push(Ne),Ie.next=15;break;case 10:if(!He.isDirectory){Ie.next=15;break}return Ie.next=13,bt(He);case 13:Xe=Ie.sent,Ct.push.apply(Ct,(0,fe.Z)(Xe));case 15:case"end":return Ie.stop()}},tt)}));return function(He,we){return vt.apply(this,arguments)}}(),yt=0;case 9:if(!(yt<Ct.length)){mt.next=15;break}return mt.next=12,Mt(Ct[yt]);case 12:yt++,mt.next=9;break;case 15:return mt.abrupt("return",wt);case 16:case"end":return mt.stop()}},St)}));return function(Qe,rt){return ft.apply(this,arguments)}}(),De=je,Fe=+new Date,Te=0;function Me(){return"rc-upload-".concat(Fe,"-").concat(++Te)}var Be=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ge=function(ft){(0,_e.Z)(Qe,ft);var St=(0,de.Z)(Qe);function Qe(){var rt;(0,Ut.Z)(this,Qe);for(var wt=arguments.length,Ct=new Array(wt),bt=0;bt<wt;bt++)Ct[bt]=arguments[bt];return rt=St.call.apply(St,[this].concat(Ct)),(0,ve.Z)((0,Ue.Z)(rt),"state",{uid:Me()}),(0,ve.Z)((0,Ue.Z)(rt),"reqs",{}),(0,ve.Z)((0,Ue.Z)(rt),"fileInput",void 0),(0,ve.Z)((0,Ue.Z)(rt),"_isMounted",void 0),(0,ve.Z)((0,Ue.Z)(rt),"onChange",function(ct){var xt=rt.props,dt=xt.accept,Mt=xt.directory,yt=ct.target.files,Ft=(0,fe.Z)(yt).filter(function(mt){return!Mt||le(mt,dt)});rt.uploadFiles(Ft),rt.reset()}),(0,ve.Z)((0,Ue.Z)(rt),"onClick",function(ct){var xt=rt.fileInput;if(xt){var dt=ct.target,Mt=rt.props.onClick;if(dt&&dt.tagName==="BUTTON"){var yt=xt.parentNode;yt.focus(),dt.blur()}xt.click(),Mt&&Mt(ct)}}),(0,ve.Z)((0,Ue.Z)(rt),"onKeyDown",function(ct){ct.key==="Enter"&&rt.onClick(ct)}),(0,ve.Z)((0,Ue.Z)(rt),"onFileDrop",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function xt(dt){var Mt,yt,Ft;return(0,me.Z)().wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(Mt=rt.props.multiple,dt.preventDefault(),dt.type!=="dragover"){vt.next=4;break}return vt.abrupt("return");case 4:if(!rt.props.directory){vt.next=11;break}return vt.next=7,De(Array.prototype.slice.call(dt.dataTransfer.items),function(tt){return le(tt,rt.props.accept)});case 7:yt=vt.sent,rt.uploadFiles(yt),vt.next=14;break;case 11:Ft=(0,fe.Z)(dt.dataTransfer.files).filter(function(tt){return le(tt,rt.props.accept)}),Mt===!1&&(Ft=Ft.slice(0,1)),rt.uploadFiles(Ft);case 14:case"end":return vt.stop()}},xt)}));return function(xt){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(rt),"uploadFiles",function(ct){var xt=(0,fe.Z)(ct),dt=xt.map(function(Mt){return Mt.uid=Me(),rt.processFile(Mt,xt)});Promise.all(dt).then(function(Mt){var yt=rt.props.onBatchStart;yt==null||yt(Mt.map(function(Ft){var mt=Ft.origin,vt=Ft.parsedFile;return{file:mt,parsedFile:vt}})),Mt.filter(function(Ft){return Ft.parsedFile!==null}).forEach(function(Ft){rt.post(Ft)})})}),(0,ve.Z)((0,Ue.Z)(rt),"processFile",function(){var ct=(0,Pe.Z)((0,me.Z)().mark(function xt(dt,Mt){var yt,Ft,mt,vt,tt,He,we,Ne,Xe;return(0,me.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(yt=rt.props.beforeUpload,Ft=dt,!yt){Ie.next=14;break}return Ie.prev=3,Ie.next=6,yt(dt,Mt);case 6:Ft=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),Ft=!1;case 12:if(Ft!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:dt,parsedFile:null,action:null,data:null});case 14:if(mt=rt.props.action,typeof mt!="function"){Ie.next=21;break}return Ie.next=18,mt(dt);case 18:vt=Ie.sent,Ie.next=22;break;case 21:vt=mt;case 22:if(tt=rt.props.data,typeof tt!="function"){Ie.next=29;break}return Ie.next=26,tt(dt);case 26:He=Ie.sent,Ie.next=30;break;case 29:He=tt;case 30:return we=((0,Ae.Z)(Ft)==="object"||typeof Ft=="string")&&Ft?Ft:dt,we instanceof File?Ne=we:Ne=new File([we],dt.name,{type:dt.type}),Xe=Ne,Xe.uid=dt.uid,Ie.abrupt("return",{origin:dt,data:He,parsedFile:Xe,action:vt});case 35:case"end":return Ie.stop()}},xt,null,[[3,9]])}));return function(xt,dt){return ct.apply(this,arguments)}}()),(0,ve.Z)((0,Ue.Z)(rt),"saveFileInput",function(ct){rt.fileInput=ct}),rt}return(0,oe.Z)(Qe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(wt){var Ct=this,bt=wt.data,ct=wt.origin,xt=wt.action,dt=wt.parsedFile;if(this._isMounted){var Mt=this.props,yt=Mt.onStart,Ft=Mt.customRequest,mt=Mt.name,vt=Mt.headers,tt=Mt.withCredentials,He=Mt.method,we=ct.uid,Ne=Ft||xe,Xe={action:xt,filename:mt,data:bt,file:dt,headers:vt,withCredentials:tt,method:He||"post",onProgress:function(Ie){var Re=Ct.props.onProgress;Re==null||Re(Ie,dt)},onSuccess:function(Ie,Re){var Ze=Ct.props.onSuccess;Ze==null||Ze(Ie,dt,Re),delete Ct.reqs[we]},onError:function(Ie,Re){var Ze=Ct.props.onError;Ze==null||Ze(Ie,Re,dt),delete Ct.reqs[we]}};yt(ct),this.reqs[we]=Ne(Xe)}}},{key:"reset",value:function(){this.setState({uid:Me()})}},{key:"abort",value:function(wt){var Ct=this.reqs;if(wt){var bt=wt.uid?wt.uid:wt;Ct[bt]&&Ct[bt].abort&&Ct[bt].abort(),delete Ct[bt]}else Object.keys(Ct).forEach(function(ct){Ct[ct]&&Ct[ct].abort&&Ct[ct].abort(),delete Ct[ct]})}},{key:"render",value:function(){var wt=this.props,Ct=wt.component,bt=wt.prefixCls,ct=wt.className,xt=wt.classNames,dt=xt===void 0?{}:xt,Mt=wt.disabled,yt=wt.id,Ft=wt.name,mt=wt.style,vt=wt.styles,tt=vt===void 0?{}:vt,He=wt.multiple,we=wt.accept,Ne=wt.capture,Xe=wt.children,nt=wt.directory,Ie=wt.openFileDialogOnClick,Re=wt.onMouseEnter,Ze=wt.onMouseLeave,et=wt.hasControlInside,ht=(0,Se.Z)(wt,Be),at=te()((0,ve.Z)((0,ve.Z)((0,ve.Z)({},bt,!0),"".concat(bt,"-disabled"),Mt),ct,ct)),Dt=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Et=Mt?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:Re,onMouseLeave:Ze,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:et?void 0:"0"};return Ee.createElement(Ct,(0,st.Z)({},Et,{className:at,role:et?void 0:"button",style:mt}),Ee.createElement("input",(0,st.Z)({},(0,se.Z)(ht,{aria:!0,data:!0}),{id:yt,name:Ft,disabled:Mt,type:"file",ref:this.saveFileInput,onClick:function(qt){return qt.stopPropagation()},key:this.state.uid,style:(0,ke.Z)({display:"none"},tt.input),className:dt.input,accept:we},Dt,{multiple:He,onChange:this.onChange},Ne!=null?{capture:Ne}:{})),Xe)}}]),Qe}(Ee.Component),Ye=Ge;function Ke(){}var Ve=function(ft){(0,_e.Z)(Qe,ft);var St=(0,de.Z)(Qe);function Qe(){var rt;(0,Ut.Z)(this,Qe);for(var wt=arguments.length,Ct=new Array(wt),bt=0;bt<wt;bt++)Ct[bt]=arguments[bt];return rt=St.call.apply(St,[this].concat(Ct)),(0,ve.Z)((0,Ue.Z)(rt),"uploader",void 0),(0,ve.Z)((0,Ue.Z)(rt),"saveUploader",function(ct){rt.uploader=ct}),rt}return(0,oe.Z)(Qe,[{key:"abort",value:function(wt){this.uploader.abort(wt)}},{key:"render",value:function(){return Ee.createElement(Ye,(0,st.Z)({},this.props,{ref:this.saveUploader}))}}]),Qe}(Ee.Component);(0,ve.Z)(Ve,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ke,onError:Ke,onSuccess:Ke,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Ve,ut=ot},8224:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ut}});var st=pt(4676);function Ut(oe,Ue,_e,de){var ve=st.unstable_batchedUpdates?function(ke){st.unstable_batchedUpdates(_e,ke)}:_e;return oe!=null&&oe.addEventListener&&oe.addEventListener(Ue,ve,de),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(Ue,ve,de)}}}},24514:function(Rn,An,pt){"use strict";pt.d(An,{G:function(){return Ue}});var st=pt(47273),Ut=function(de){if((0,st.Z)()&&window.document.documentElement){var ve=Array.isArray(de)?de:[de],Ee=window.document.documentElement;return ve.some(function(ke){return ke in Ee.style})}return!1},oe=function(de,ve){if(!Ut(de))return!1;var Ee=document.createElement("div"),ke=Ee.style[de];return Ee.style[de]=ve,Ee.style[de]!==ke};function Ue(_e,de){return!Array.isArray(_e)&&de!==void 0?oe(_e,de):Ut(_e)}},45680:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return tt}});var st=pt(72308),Ut=pt(62853),oe=pt(77321),Ue=pt(49618),_e=pt(52487),de=pt(74416),ve=pt(92310),Ee=pt.n(ve),ke=pt(29301),Se=pt(70425),Ae=pt(34280),me=pt(59301),Pe=pt(4676),fe=me.forwardRef(function(He,we){var Ne=He.height,Xe=He.offsetY,nt=He.offsetX,Ie=He.children,Re=He.prefixCls,Ze=He.onInnerResize,et=He.innerProps,ht=He.rtl,at=He.extra,Dt={},Et={display:"flex",flexDirection:"column"};return Xe!==void 0&&(Dt={height:Ne,position:"relative",overflow:"hidden"},Et=(0,oe.Z)((0,oe.Z)({},Et),{},(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({transform:"translateY(".concat(Xe,"px)")},ht?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),me.createElement("div",{style:Dt},me.createElement(ke.Z,{onResize:function(qt){var Qt=qt.offsetHeight;Qt&&Ze&&Ze()}},me.createElement("div",(0,st.Z)({style:Et,className:Ee()((0,Ue.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:we},et),Ie,at)))});fe.displayName="Filler";var z=fe;function te(He){var we=He.children,Ne=He.setRef,Xe=me.useCallback(function(nt){Ne(nt)},[]);return me.cloneElement(we,{ref:Xe})}function se(He,we,Ne,Xe,nt,Ie,Re,Ze){var et=Ze.getKey;return He.slice(we,Ne+1).map(function(ht,at){var Dt=we+at,Et=Re(ht,Dt,{style:{width:Xe},offsetX:nt}),Ot=et(ht);return me.createElement(te,{key:Ot,setRef:function(Qt){return Ie(ht,Qt)}},Et)})}function ie(He,we,Ne,Xe){var nt=Ne-He,Ie=we-Ne,Re=Math.min(nt,Ie)*2;if(Xe<=Re){var Ze=Math.floor(Xe/2);return Xe%2?Ne+Ze+1:Ne-Ze}return nt>Ie?Ne-(Xe-Ie):Ne+(Xe-nt)}function le(He,we,Ne){var Xe=He.length,nt=we.length,Ie,Re;if(Xe===0&&nt===0)return null;Xe<nt?(Ie=He,Re=we):(Ie=we,Re=He);var Ze={__EMPTY_ITEM__:!0};function et(qt){return qt!==void 0?Ne(qt):Ze}for(var ht=null,at=Math.abs(Xe-nt)!==1,Dt=0;Dt<Re.length;Dt+=1){var Et=et(Ie[Dt]),Ot=et(Re[Dt]);if(Et!==Ot){ht=Dt,at=at||Et!==et(Re[Dt+1]);break}}return ht===null?null:{index:ht,multiple:at}}function ce(He,we,Ne){var Xe=me.useState(He),nt=(0,_e.Z)(Xe,2),Ie=nt[0],Re=nt[1],Ze=me.useState(null),et=(0,_e.Z)(Ze,2),ht=et[0],at=et[1];return me.useEffect(function(){var Dt=le(Ie||[],He||[],we);(Dt==null?void 0:Dt.index)!==void 0&&(Ne==null||Ne(Dt.index),at(He[Dt.index])),Re(He)},[He]),[ht]}var pe=pt(16089),xe=(typeof navigator=="undefined"?"undefined":(0,Ut.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=xe,De=function(He,we,Ne,Xe){var nt=(0,me.useRef)(!1),Ie=(0,me.useRef)(null);function Re(){clearTimeout(Ie.current),nt.current=!0,Ie.current=setTimeout(function(){nt.current=!1},50)}var Ze=(0,me.useRef)({top:He,bottom:we,left:Ne,right:Xe});return Ze.current.top=He,Ze.current.bottom=we,Ze.current.left=Ne,Ze.current.right=Xe,function(et,ht){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Dt=et?ht<0&&Ze.current.left||ht>0&&Ze.current.right:ht<0&&Ze.current.top||ht>0&&Ze.current.bottom;return at&&Dt?(clearTimeout(Ie.current),nt.current=!1):(!Dt||nt.current)&&Re(),!nt.current&&Dt}};function Fe(He,we,Ne,Xe,nt,Ie,Re){var Ze=(0,me.useRef)(0),et=(0,me.useRef)(null),ht=(0,me.useRef)(null),at=(0,me.useRef)(!1),Dt=De(we,Ne,Xe,nt);function Et(un,on){if(pe.Z.cancel(et.current),!Dt(!1,on)){var cn=un;if(!cn._virtualHandled)cn._virtualHandled=!0;else return;Ze.current+=on,ht.current=on,je||cn.preventDefault(),et.current=(0,pe.Z)(function(){var bn=at.current?10:1;Re(Ze.current*bn,!1),Ze.current=0})}}function Ot(un,on){Re(on,!0),je||un.preventDefault()}var qt=(0,me.useRef)(null),Qt=(0,me.useRef)(null);function Xt(un){if(He){pe.Z.cancel(Qt.current),Qt.current=(0,pe.Z)(function(){qt.current=null},2);var on=un.deltaX,cn=un.deltaY,bn=un.shiftKey,xn=on,kn=cn;(qt.current==="sx"||!qt.current&&bn&&cn&&!on)&&(xn=cn,kn=0,qt.current="sx");var On=Math.abs(xn),_r=Math.abs(kn);qt.current===null&&(qt.current=Ie&&On>_r?"x":"y"),qt.current==="y"?Et(un,kn):Ot(un,xn)}}function Wt(un){He&&(at.current=un.detail===ht.current)}return[Xt,Wt]}function Te(He,we,Ne,Xe){var nt=me.useMemo(function(){return[new Map,[]]},[He,Ne.id,Xe]),Ie=(0,_e.Z)(nt,2),Re=Ie[0],Ze=Ie[1],et=function(at){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:at,Et=Re.get(at),Ot=Re.get(Dt);if(Et===void 0||Ot===void 0)for(var qt=He.length,Qt=Ze.length;Qt<qt;Qt+=1){var Xt,Wt=He[Qt],un=we(Wt);Re.set(un,Qt);var on=(Xt=Ne.get(un))!==null&&Xt!==void 0?Xt:Xe;if(Ze[Qt]=(Ze[Qt-1]||0)+on,un===at&&(Et=Qt),un===Dt&&(Ot=Qt),Et!==void 0&&Ot!==void 0)break}return{top:Ze[Et-1]||0,bottom:Ze[Ot]}};return et}var Me=pt(96949),Be=pt(55090),Ge=function(){function He(){(0,Me.Z)(this,He),(0,Ue.Z)(this,"maps",void 0),(0,Ue.Z)(this,"id",0),(0,Ue.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Be.Z)(He,[{key:"set",value:function(Ne,Xe){this.maps[Ne]=Xe,this.id+=1,this.diffKeys.add(Ne)}},{key:"get",value:function(Ne){return this.maps[Ne]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),He}(),Ye=Ge;function Ke(He){var we=parseFloat(He);return isNaN(we)?0:we}function Ve(He,we,Ne){var Xe=me.useState(0),nt=(0,_e.Z)(Xe,2),Ie=nt[0],Re=nt[1],Ze=(0,me.useRef)(new Map),et=(0,me.useRef)(new Ye),ht=(0,me.useRef)(0);function at(){ht.current+=1}function Dt(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;at();var qt=function(){var Wt=!1;Ze.current.forEach(function(un,on){if(un&&un.offsetParent){var cn=un.offsetHeight,bn=getComputedStyle(un),xn=bn.marginTop,kn=bn.marginBottom,On=Ke(xn),_r=Ke(kn),xr=cn+On+_r;et.current.get(on)!==xr&&(et.current.set(on,xr),Wt=!0)}}),Wt&&Re(function(un){return un+1})};if(Ot)qt();else{ht.current+=1;var Qt=ht.current;Promise.resolve().then(function(){Qt===ht.current&&qt()})}}function Et(Ot,qt){var Qt=He(Ot),Xt=Ze.current.get(Qt);qt?(Ze.current.set(Qt,qt),Dt()):Ze.current.delete(Qt),!Xt!=!qt&&(qt?we==null||we(Ot):Ne==null||Ne(Ot))}return(0,me.useEffect)(function(){return at},[]),[Et,Dt,et.current,Ie]}var ot=14/15;function ut(He,we,Ne){var Xe=(0,me.useRef)(!1),nt=(0,me.useRef)(0),Ie=(0,me.useRef)(0),Re=(0,me.useRef)(null),Ze=(0,me.useRef)(null),et,ht=function(Ot){if(Xe.current){var qt=Math.ceil(Ot.touches[0].pageX),Qt=Math.ceil(Ot.touches[0].pageY),Xt=nt.current-qt,Wt=Ie.current-Qt,un=Math.abs(Xt)>Math.abs(Wt);un?nt.current=qt:Ie.current=Qt;var on=Ne(un,un?Xt:Wt,!1,Ot);on&&Ot.preventDefault(),clearInterval(Ze.current),on&&(Ze.current=setInterval(function(){un?Xt*=ot:Wt*=ot;var cn=Math.floor(un?Xt:Wt);(!Ne(un,cn,!0)||Math.abs(cn)<=.1)&&clearInterval(Ze.current)},16))}},at=function(){Xe.current=!1,et()},Dt=function(Ot){et(),Ot.touches.length===1&&!Xe.current&&(Xe.current=!0,nt.current=Math.ceil(Ot.touches[0].pageX),Ie.current=Math.ceil(Ot.touches[0].pageY),Re.current=Ot.target,Re.current.addEventListener("touchmove",ht,{passive:!1}),Re.current.addEventListener("touchend",at,{passive:!0}))};et=function(){Re.current&&(Re.current.removeEventListener("touchmove",ht),Re.current.removeEventListener("touchend",at))},(0,Ae.Z)(function(){return He&&we.current.addEventListener("touchstart",Dt,{passive:!0}),function(){var Et;(Et=we.current)===null||Et===void 0||Et.removeEventListener("touchstart",Dt),et(),clearInterval(Ze.current)}},[He])}function ft(He){return Math.floor(Math.pow(He,.5))}function St(He,we){var Ne="touches"in He?He.touches[0]:He;return Ne[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function Qe(He,we,Ne){me.useEffect(function(){var Xe=we.current;if(He&&Xe){var nt=!1,Ie,Re,Ze=function(){pe.Z.cancel(Ie)},et=function Et(){Ze(),Ie=(0,pe.Z)(function(){Ne(Re),Et()})},ht=function(Ot){if(!(Ot.target.draggable||Ot.button!==0)){var qt=Ot;qt._virtualHandled||(qt._virtualHandled=!0,nt=!0)}},at=function(){nt=!1,Ze()},Dt=function(Ot){if(nt){var qt=St(Ot,!1),Qt=Xe.getBoundingClientRect(),Xt=Qt.top,Wt=Qt.bottom;if(qt<=Xt){var un=Xt-qt;Re=-ft(un),et()}else if(qt>=Wt){var on=qt-Wt;Re=ft(on),et()}else Ze()}};return Xe.addEventListener("mousedown",ht),Xe.ownerDocument.addEventListener("mouseup",at),Xe.ownerDocument.addEventListener("mousemove",Dt),function(){Xe.removeEventListener("mousedown",ht),Xe.ownerDocument.removeEventListener("mouseup",at),Xe.ownerDocument.removeEventListener("mousemove",Dt),Ze()}}},[He])}var rt=10;function wt(He,we,Ne,Xe,nt,Ie,Re,Ze){var et=me.useRef(),ht=me.useState(null),at=(0,_e.Z)(ht,2),Dt=at[0],Et=at[1];return(0,Ae.Z)(function(){if(Dt&&Dt.times<rt){if(!He.current){Et(function(Li){return(0,oe.Z)({},Li)});return}Ie();var Ot=Dt.targetAlign,qt=Dt.originAlign,Qt=Dt.index,Xt=Dt.offset,Wt=He.current.clientHeight,un=!1,on=Ot,cn=null;if(Wt){for(var bn=Ot||qt,xn=0,kn=0,On=0,_r=Math.min(we.length-1,Qt),xr=0;xr<=_r;xr+=1){var $r=nt(we[xr]);kn=xn;var tr=Ne.get($r);On=kn+(tr===void 0?Xe:tr),xn=On}for(var ii=bn==="top"?Xt:Wt-Xt,di=_r;di>=0;di-=1){var li=nt(we[di]),Mi=Ne.get(li);if(Mi===void 0){un=!0;break}if(ii-=Mi,ii<=0)break}switch(bn){case"top":cn=kn-Xt;break;case"bottom":cn=On-Wt+Xt;break;default:{var yi=He.current.scrollTop,Jr=yi+Wt;kn<yi?on="top":On>Jr&&(on="bottom")}}cn!==null&&Re(cn),cn!==Dt.lastTop&&(un=!0)}un&&Et((0,oe.Z)((0,oe.Z)({},Dt),{},{times:Dt.times+1,targetAlign:on,lastTop:cn}))}},[Dt,He.current]),function(Ot){if(Ot==null){Ze();return}if(pe.Z.cancel(et.current),typeof Ot=="number")Re(Ot);else if(Ot&&(0,Ut.Z)(Ot)==="object"){var qt,Qt=Ot.align;"index"in Ot?qt=Ot.index:qt=we.findIndex(function(un){return nt(un)===Ot.key});var Xt=Ot.offset,Wt=Xt===void 0?0:Xt;Et({times:0,index:qt,offset:Wt,originAlign:Qt})}}}var Ct=me.forwardRef(function(He,we){var Ne=He.prefixCls,Xe=He.rtl,nt=He.scrollOffset,Ie=He.scrollRange,Re=He.onStartMove,Ze=He.onStopMove,et=He.onScroll,ht=He.horizontal,at=He.spinSize,Dt=He.containerSize,Et=He.style,Ot=He.thumbStyle,qt=He.showScrollBar,Qt=me.useState(!1),Xt=(0,_e.Z)(Qt,2),Wt=Xt[0],un=Xt[1],on=me.useState(null),cn=(0,_e.Z)(on,2),bn=cn[0],xn=cn[1],kn=me.useState(null),On=(0,_e.Z)(kn,2),_r=On[0],xr=On[1],$r=!Xe,tr=me.useRef(),ii=me.useRef(),di=me.useState(qt),li=(0,_e.Z)(di,2),Mi=li[0],yi=li[1],Jr=me.useRef(),Li=function(){qt===!0||qt===!1||(clearTimeout(Jr.current),yi(!0),Jr.current=setTimeout(function(){yi(!1)},3e3))},qe=Ie-Dt||0,Mr=Dt-at||0,Lr=me.useMemo(function(){if(nt===0||qe===0)return 0;var zt=nt/qe;return zt*Mr},[nt,qe,Mr]),br=function(Mn){Mn.stopPropagation(),Mn.preventDefault()},Pr=me.useRef({top:Lr,dragging:Wt,pageY:bn,startTop:_r});Pr.current={top:Lr,dragging:Wt,pageY:bn,startTop:_r};var kr=function(Mn){un(!0),xn(St(Mn,ht)),xr(Pr.current.top),Re(),Mn.stopPropagation(),Mn.preventDefault()};me.useEffect(function(){var zt=function(vn){vn.preventDefault()},Mn=tr.current,Vn=ii.current;return Mn.addEventListener("touchstart",zt,{passive:!1}),Vn.addEventListener("touchstart",kr,{passive:!1}),function(){Mn.removeEventListener("touchstart",zt),Vn.removeEventListener("touchstart",kr)}},[]);var Hi=me.useRef();Hi.current=qe;var gr=me.useRef();gr.current=Mr,me.useEffect(function(){if(Wt){var zt,Mn=function(vn){var Wn=Pr.current,Ht=Wn.dragging,Jt=Wn.pageY,Xn=Wn.startTop;pe.Z.cancel(zt);var jt=tr.current.getBoundingClientRect(),ln=Dt/(ht?jt.width:jt.height);if(Ht){var Nn=(St(vn,ht)-Jt)*ln,Yn=Xn;!$r&&ht?Yn-=Nn:Yn+=Nn;var sn=Hi.current,Dn=gr.current,Jn=Dn?Yn/Dn:0,jn=Math.ceil(Jn*sn);jn=Math.max(jn,0),jn=Math.min(jn,sn),zt=(0,pe.Z)(function(){et(jn,ht)})}},Vn=function(){un(!1),Ze()};return window.addEventListener("mousemove",Mn,{passive:!0}),window.addEventListener("touchmove",Mn,{passive:!0}),window.addEventListener("mouseup",Vn,{passive:!0}),window.addEventListener("touchend",Vn,{passive:!0}),function(){window.removeEventListener("mousemove",Mn),window.removeEventListener("touchmove",Mn),window.removeEventListener("mouseup",Vn),window.removeEventListener("touchend",Vn),pe.Z.cancel(zt)}}},[Wt]),me.useEffect(function(){return Li(),function(){clearTimeout(Jr.current)}},[nt]),me.useImperativeHandle(we,function(){return{delayHidden:Li}});var nr="".concat(Ne,"-scrollbar"),Vt={position:"absolute",visibility:Mi?null:"hidden"},Kt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ht?(Vt.height=8,Vt.left=0,Vt.right=0,Vt.bottom=0,Kt.height="100%",Kt.width=at,$r?Kt.left=Lr:Kt.right=Lr):(Vt.width=8,Vt.top=0,Vt.bottom=0,$r?Vt.right=0:Vt.left=0,Kt.width="100%",Kt.height=at,Kt.top=Lr),me.createElement("div",{ref:tr,className:Ee()(nr,(0,Ue.Z)((0,Ue.Z)((0,Ue.Z)({},"".concat(nr,"-horizontal"),ht),"".concat(nr,"-vertical"),!ht),"".concat(nr,"-visible"),Mi)),style:(0,oe.Z)((0,oe.Z)({},Vt),Et),onMouseDown:br,onMouseMove:Li},me.createElement("div",{ref:ii,className:Ee()("".concat(nr,"-thumb"),(0,Ue.Z)({},"".concat(nr,"-thumb-moving"),Wt)),style:(0,oe.Z)((0,oe.Z)({},Kt),Ot),onMouseDown:kr}))}),bt=Ct,ct=20;function xt(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=He/we*He;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,ct),Math.floor(Ne)}var dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Mt=[],yt={overflowY:"auto",overflowAnchor:"none"};function Ft(He,we){var Ne=He.prefixCls,Xe=Ne===void 0?"rc-virtual-list":Ne,nt=He.className,Ie=He.height,Re=He.itemHeight,Ze=He.fullHeight,et=Ze===void 0?!0:Ze,ht=He.style,at=He.data,Dt=He.children,Et=He.itemKey,Ot=He.virtual,qt=He.direction,Qt=He.scrollWidth,Xt=He.component,Wt=Xt===void 0?"div":Xt,un=He.onScroll,on=He.onVirtualScroll,cn=He.onVisibleChange,bn=He.innerProps,xn=He.extraRender,kn=He.styles,On=He.showScrollBar,_r=On===void 0?"optional":On,xr=(0,de.Z)(He,dt),$r=me.useCallback(function(Sn){return typeof Et=="function"?Et(Sn):Sn==null?void 0:Sn[Et]},[Et]),tr=Ve($r,null,null),ii=(0,_e.Z)(tr,4),di=ii[0],li=ii[1],Mi=ii[2],yi=ii[3],Jr=!!(Ot!==!1&&Ie&&Re),Li=me.useMemo(function(){return Object.values(Mi.maps).reduce(function(Sn,Gn){return Sn+Gn},0)},[Mi.id,Mi.maps]),qe=Jr&&at&&(Math.max(Re*at.length,Li)>Ie||!!Qt),Mr=qt==="rtl",Lr=Ee()(Xe,(0,Ue.Z)({},"".concat(Xe,"-rtl"),Mr),nt),br=at||Mt,Pr=(0,me.useRef)(),kr=(0,me.useRef)(),Hi=(0,me.useRef)(),gr=(0,me.useState)(0),nr=(0,_e.Z)(gr,2),Vt=nr[0],Kt=nr[1],zt=(0,me.useState)(0),Mn=(0,_e.Z)(zt,2),Vn=Mn[0],vr=Mn[1],vn=(0,me.useState)(!1),Wn=(0,_e.Z)(vn,2),Ht=Wn[0],Jt=Wn[1],Xn=function(){Jt(!0)},jt=function(){Jt(!1)},ln={getKey:$r};function Nn(Sn){Kt(function(Gn){var Hn;typeof Sn=="function"?Hn=Sn(Gn):Hn=Sn;var Kn=Ar(Hn);return Pr.current.scrollTop=Kn,Kn})}var Yn=(0,me.useRef)({start:0,end:br.length}),sn=(0,me.useRef)(),Dn=ce(br,$r),Jn=(0,_e.Z)(Dn,1),jn=Jn[0];sn.current=jn;var Bn=me.useMemo(function(){if(!Jr)return{scrollHeight:void 0,start:0,end:br.length-1,offset:void 0};if(!qe){var Sn;return{scrollHeight:((Sn=kr.current)===null||Sn===void 0?void 0:Sn.offsetHeight)||0,start:0,end:br.length-1,offset:void 0}}for(var Gn=0,Hn,Kn,Zn,Tr=br.length,yr=0;yr<Tr;yr+=1){var ur=br[yr],mn=$r(ur),dr=Mi.get(mn),Or=Gn+(dr===void 0?Re:dr);Or>=Vt&&Hn===void 0&&(Hn=yr,Kn=Gn),Or>Vt+Ie&&Zn===void 0&&(Zn=yr),Gn=Or}return Hn===void 0&&(Hn=0,Kn=0,Zn=Math.ceil(Ie/Re)),Zn===void 0&&(Zn=br.length-1),Zn=Math.min(Zn+1,br.length-1),{scrollHeight:Gn,start:Hn,end:Zn,offset:Kn}},[qe,Jr,Vt,br,yi,Ie]),er=Bn.scrollHeight,_n=Bn.start,sr=Bn.end,Fr=Bn.offset;Yn.current.start=_n,Yn.current.end=sr,me.useLayoutEffect(function(){var Sn=Mi.getRecord();if(Sn.size===1){var Gn=Array.from(Sn)[0],Hn=br[_n];if(Hn){var Kn=$r(Hn);if(Kn===Gn){var Zn=Mi.get(Gn),Tr=Zn-Re;Nn(function(yr){return yr+Tr})}}}Mi.resetRecord()},[er]);var zr=me.useState({width:0,height:Ie}),Dr=(0,_e.Z)(zr,2),pn=Dr[0],Ni=Dr[1],ni=function(Gn){Ni({width:Gn.offsetWidth,height:Gn.offsetHeight})},ki=(0,me.useRef)(),hn=(0,me.useRef)(),qn=me.useMemo(function(){return xt(pn.width,Qt)},[pn.width,Qt]),rr=me.useMemo(function(){return xt(pn.height,er)},[pn.height,er]),pr=er-Ie,wr=(0,me.useRef)(pr);wr.current=pr;function Ar(Sn){var Gn=Sn;return Number.isNaN(wr.current)||(Gn=Math.min(Gn,wr.current)),Gn=Math.max(Gn,0),Gn}var Kr=Vt<=0,Qr=Vt>=pr,qr=Vn<=0,lr=Vn>=Qt,rn=De(Kr,Qr,qr,lr),ir=function(){return{x:Mr?-Vn:Vn,y:Vt}},an=(0,me.useRef)(ir()),cr=(0,Se.zX)(function(Sn){if(on){var Gn=(0,oe.Z)((0,oe.Z)({},ir()),Sn);(an.current.x!==Gn.x||an.current.y!==Gn.y)&&(on(Gn),an.current=Gn)}});function Cr(Sn,Gn){var Hn=Sn;Gn?((0,Pe.flushSync)(function(){vr(Hn)}),cr()):Nn(Hn)}function Gr(Sn){var Gn=Sn.currentTarget.scrollTop;Gn!==Vt&&Nn(Gn),un==null||un(Sn),cr()}var Ri=function(Gn){var Hn=Gn,Kn=Qt?Qt-pn.width:0;return Hn=Math.max(Hn,0),Hn=Math.min(Hn,Kn),Hn},Fi=(0,Se.zX)(function(Sn,Gn){Gn?((0,Pe.flushSync)(function(){vr(function(Hn){var Kn=Hn+(Mr?-Sn:Sn);return Ri(Kn)})}),cr()):Nn(function(Hn){var Kn=Hn+Sn;return Kn})}),Si=Fe(Jr,Kr,Qr,qr,lr,!!Qt,Fi),Di=(0,_e.Z)(Si,2),en=Di[0],dn=Di[1];ut(Jr,Pr,function(Sn,Gn,Hn,Kn){var Zn=Kn;return rn(Sn,Gn,Hn)?!1:!Zn||!Zn._virtualHandled?(Zn&&(Zn._virtualHandled=!0),en({preventDefault:function(){},deltaX:Sn?Gn:0,deltaY:Sn?0:Gn}),!0):!1}),Qe(qe,Pr,function(Sn){Nn(function(Gn){return Gn+Sn})}),(0,Ae.Z)(function(){function Sn(Hn){var Kn=Kr&&Hn.detail<0,Zn=Qr&&Hn.detail>0;Jr&&!Kn&&!Zn&&Hn.preventDefault()}var Gn=Pr.current;return Gn.addEventListener("wheel",en,{passive:!1}),Gn.addEventListener("DOMMouseScroll",dn,{passive:!0}),Gn.addEventListener("MozMousePixelScroll",Sn,{passive:!1}),function(){Gn.removeEventListener("wheel",en),Gn.removeEventListener("DOMMouseScroll",dn),Gn.removeEventListener("MozMousePixelScroll",Sn)}},[Jr,Kr,Qr]),(0,Ae.Z)(function(){if(Qt){var Sn=Ri(Vn);vr(Sn),cr({x:Sn})}},[pn.width,Qt]);var tn=function(){var Gn,Hn;(Gn=ki.current)===null||Gn===void 0||Gn.delayHidden(),(Hn=hn.current)===null||Hn===void 0||Hn.delayHidden()},lt=wt(Pr,br,Mi,Re,$r,function(){return li(!0)},Nn,tn);me.useImperativeHandle(we,function(){return{nativeElement:Hi.current,getScrollInfo:ir,scrollTo:function(Gn){function Hn(Kn){return Kn&&(0,Ut.Z)(Kn)==="object"&&("left"in Kn||"top"in Kn)}Hn(Gn)?(Gn.left!==void 0&&vr(Ri(Gn.left)),lt(Gn.top)):lt(Gn)}}}),(0,Ae.Z)(function(){if(cn){var Sn=br.slice(_n,sr+1);cn(Sn,br)}},[_n,sr,br]);var zn=Te(br,$r,Mi,Re),Pn=xn==null?void 0:xn({start:_n,end:sr,virtual:qe,offsetX:Vn,offsetY:Fr,rtl:Mr,getSize:zn}),In=se(br,_n,sr,Qt,Vn,di,Dt,ln),Qn=null;Ie&&(Qn=(0,oe.Z)((0,Ue.Z)({},et?"height":"maxHeight",Ie),yt),Jr&&(Qn.overflowY="hidden",Qt&&(Qn.overflowX="hidden"),Ht&&(Qn.pointerEvents="none")));var ar={};return Mr&&(ar.dir="rtl"),me.createElement("div",(0,st.Z)({ref:Hi,style:(0,oe.Z)((0,oe.Z)({},ht),{},{position:"relative"}),className:Lr},ar,xr),me.createElement(ke.Z,{onResize:ni},me.createElement(Wt,{className:"".concat(Xe,"-holder"),style:Qn,ref:Pr,onScroll:Gr,onMouseEnter:tn},me.createElement(z,{prefixCls:Xe,height:er,offsetX:Vn,offsetY:Fr,scrollWidth:Qt,onInnerResize:li,ref:kr,innerProps:bn,rtl:Mr,extra:Pn},In))),qe&&er>Ie&&me.createElement(bt,{ref:ki,prefixCls:Xe,scrollOffset:Vt,scrollRange:er,rtl:Mr,onScroll:Cr,onStartMove:Xn,onStopMove:jt,spinSize:rr,containerSize:pn.height,style:kn==null?void 0:kn.verticalScrollBar,thumbStyle:kn==null?void 0:kn.verticalScrollBarThumb,showScrollBar:_r}),qe&&Qt>pn.width&&me.createElement(bt,{ref:hn,prefixCls:Xe,scrollOffset:Vn,scrollRange:Qt,rtl:Mr,onScroll:Cr,onStartMove:Xn,onStopMove:jt,spinSize:qn,containerSize:pn.width,horizontal:!0,style:kn==null?void 0:kn.horizontalScrollBar,thumbStyle:kn==null?void 0:kn.horizontalScrollBarThumb,showScrollBar:_r}))}var mt=me.forwardRef(Ft);mt.displayName="List";var vt=mt,tt=vt},93314:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Rn,An,pt){"use strict";pt.d(An,{Z:function(){return Ee}});const st=ke=>typeof ke=="object"&&ke!=null&&ke.nodeType===1,Ut=(ke,Se)=>(!Se||ke!=="hidden")&&ke!=="visible"&&ke!=="clip",oe=(ke,Se)=>{if(ke.clientHeight<ke.scrollHeight||ke.clientWidth<ke.scrollWidth){const Ae=getComputedStyle(ke,null);return Ut(Ae.overflowY,Se)||Ut(Ae.overflowX,Se)||(me=>{const Pe=(fe=>{if(!fe.ownerDocument||!fe.ownerDocument.defaultView)return null;try{return fe.ownerDocument.defaultView.frameElement}catch(z){return null}})(me);return!!Pe&&(Pe.clientHeight<me.scrollHeight||Pe.clientWidth<me.scrollWidth)})(ke)}return!1},Ue=(ke,Se,Ae,me,Pe,fe,z,te)=>fe<ke&&z>Se||fe>ke&&z<Se?0:fe<=ke&&te<=Ae||z>=Se&&te>=Ae?fe-ke-me:z>Se&&te<Ae||fe<ke&&te>Ae?z-Se+Pe:0,_e=ke=>{const Se=ke.parentElement;return Se==null?ke.getRootNode().host||null:Se},de=(ke,Se)=>{var Ae,me,Pe,fe;if(typeof document=="undefined")return[];const{scrollMode:z,block:te,inline:se,boundary:ie,skipOverflowHiddenElements:le}=Se,ce=typeof ie=="function"?ie:bt=>bt!==ie;if(!st(ke))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,xe=[];let je=ke;for(;st(je)&&ce(je);){if(je=_e(je),je===pe){xe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&xe.push(je)}const De=(me=(Ae=window.visualViewport)==null?void 0:Ae.width)!=null?me:innerWidth,Fe=(fe=(Pe=window.visualViewport)==null?void 0:Pe.height)!=null?fe:innerHeight,{scrollX:Te,scrollY:Me}=window,{height:Be,width:Ge,top:Ye,right:Ke,bottom:Ve,left:ot}=ke.getBoundingClientRect(),{top:ut,right:ft,bottom:St,left:Qe}=(bt=>{const ct=window.getComputedStyle(bt);return{top:parseFloat(ct.scrollMarginTop)||0,right:parseFloat(ct.scrollMarginRight)||0,bottom:parseFloat(ct.scrollMarginBottom)||0,left:parseFloat(ct.scrollMarginLeft)||0}})(ke);let rt=te==="start"||te==="nearest"?Ye-ut:te==="end"?Ve+St:Ye+Be/2-ut+St,wt=se==="center"?ot+Ge/2-Qe+ft:se==="end"?Ke+ft:ot-Qe;const Ct=[];for(let bt=0;bt<xe.length;bt++){const ct=xe[bt],{height:xt,width:dt,top:Mt,right:yt,bottom:Ft,left:mt}=ct.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ve<=Fe&&Ke<=De&&(ct===pe&&!oe(ct)||Ye>=Mt&&Ve<=Ft&&ot>=mt&&Ke<=yt))return Ct;const vt=getComputedStyle(ct),tt=parseInt(vt.borderLeftWidth,10),He=parseInt(vt.borderTopWidth,10),we=parseInt(vt.borderRightWidth,10),Ne=parseInt(vt.borderBottomWidth,10);let Xe=0,nt=0;const Ie="offsetWidth"in ct?ct.offsetWidth-ct.clientWidth-tt-we:0,Re="offsetHeight"in ct?ct.offsetHeight-ct.clientHeight-He-Ne:0,Ze="offsetWidth"in ct?ct.offsetWidth===0?0:dt/ct.offsetWidth:0,et="offsetHeight"in ct?ct.offsetHeight===0?0:xt/ct.offsetHeight:0;if(pe===ct)Xe=te==="start"?rt:te==="end"?rt-Fe:te==="nearest"?Ue(Me,Me+Fe,Fe,He,Ne,Me+rt,Me+rt+Be,Be):rt-Fe/2,nt=se==="start"?wt:se==="center"?wt-De/2:se==="end"?wt-De:Ue(Te,Te+De,De,tt,we,Te+wt,Te+wt+Ge,Ge),Xe=Math.max(0,Xe+Me),nt=Math.max(0,nt+Te);else{Xe=te==="start"?rt-Mt-He:te==="end"?rt-Ft+Ne+Re:te==="nearest"?Ue(Mt,Ft,xt,He,Ne+Re,rt,rt+Be,Be):rt-(Mt+xt/2)+Re/2,nt=se==="start"?wt-mt-tt:se==="center"?wt-(mt+dt/2)+Ie/2:se==="end"?wt-yt+we+Ie:Ue(mt,yt,dt,tt,we+Ie,wt,wt+Ge,Ge);const{scrollLeft:ht,scrollTop:at}=ct;Xe=et===0?0:Math.max(0,Math.min(at+Xe/et,ct.scrollHeight-xt/et+Re)),nt=Ze===0?0:Math.max(0,Math.min(ht+nt/Ze,ct.scrollWidth-dt/Ze+Ie)),rt+=at-Xe,wt+=ht-nt}Ct.push({el:ct,top:Xe,left:nt})}return Ct},ve=ke=>ke===!1?{block:"end",inline:"nearest"}:(Se=>Se===Object(Se)&&Object.keys(Se).length!==0)(ke)?ke:{block:"start",inline:"nearest"};function Ee(ke,Se){if(!ke.isConnected||!(Pe=>{let fe=Pe;for(;fe&&fe.parentNode;){if(fe.parentNode===document)return!0;fe=fe.parentNode instanceof ShadowRoot?fe.parentNode.host:fe.parentNode}return!1})(ke))return;const Ae=(Pe=>{const fe=window.getComputedStyle(Pe);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(ke);if((Pe=>typeof Pe=="object"&&typeof Pe.behavior=="function")(Se))return Se.behavior(de(ke,Se));const me=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:Pe,top:fe,left:z}of de(ke,ve(Se))){const te=fe-Ae.top+Ae.bottom,se=z-Ae.left+Ae.right;Pe.scroll({top:te,left:se,behavior:me})}}}}]);
|