You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/7207.984bacdf.async.js

1245 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[7207],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(pn,dn){"use strict";dn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},8423:function(pn,dn){"use strict";dn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},39744:function(){"use strict"},63720:function(){"use strict";function pn(ft,z,tt,at){tt===void 0&&(tt=0),at===void 0&&(at=1/0),this._name=ft,this._defaultValue=z,this._minimum=tt,this._maximum=at}Object.defineProperty(pn.prototype,"name",{get:function(){return this._name},set:function(ft){if(typeof ft!="string"||ft==="")throw new Error("Shape name must be a valid string.");this._name=ft}}),Object.defineProperty(pn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("The default value must be a real number, not: "+ft);this._defaultValue=ft}}),Object.defineProperty(pn.prototype,"minimum",{get:function(){return this._minimum},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("Minimum must be a real number, not: "+ft);this._minimum=ft}}),Object.defineProperty(pn.prototype,"maximum",{get:function(){return this._maximum},set:function(ft){if(typeof ft!="number"||isNaN(ft))throw new Error("Maximum must be a real number, not: "+ft);this._maximum=ft}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ft,z){var tt=go.Shape._FigureParameters[ft];return tt?tt[z]:null},go.Shape.setFigureParameter=function(ft,z,tt){if(!(tt instanceof pn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+tt);if(tt.defaultValue<tt.minimum||tt.defaultValue>tt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+tt.defaultValue);var at=go.Shape._FigureParameters[ft];at||(at=[],go.Shape._FigureParameters[ft]=at),at[z]=tt};var dn=[];function ue(ft,z){var tt=dn.pop();return tt===void 0?new go.Point(ft,z):(tt.x=ft,tt.y=z,tt)}function ae(){var ft=dn.pop();return ft===void 0?new go.Point:ft}function Re(ft){dn.push(ft)}function ot(ft,z,tt,at,it,lt,ut,dt,bt){bt||(bt=new go.Point);var At=ft-tt,Dt=it-ut,Ft=NaN,jt=NaN;if(At===0)if(Dt===0)ft===tt&&(Ft=ft,jt=z);else{var Nt=(lt-dt)/Dt,_t=lt-Nt*it;Ft=ft,jt=Nt*Ft+_t}else if(Dt===0){var Wt=(z-at)/At,Jt=z-Wt*ft;Ft=it,jt=Wt*Ft+Jt}else{var Wt=(z-at)/At,Nt=(lt-dt)/Dt,Jt=z-Wt*ft,_t=lt-Nt*it;Ft=(_t-Jt)/(Wt-Nt),jt=Wt*Ft+Jt}return bt.x=Ft,bt.y=jt,bt}function zt(ft,z,tt,at,it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt){var _t=1-bt,Wt=bt,Jt=ft*_t+tt*Wt,Ut=z*_t+at*Wt,Vt=tt*_t+it*Wt,oe=at*_t+lt*Wt,se=it*_t+ut*Wt,he=lt*_t+dt*Wt,be=Jt*_t+Vt*Wt,Yt=Ut*_t+oe*Wt,ne=Vt*_t+se*Wt,ve=oe*_t+he*Wt,Se=be*_t+ne*Wt,we=Yt*_t+ve*Wt;At.x=Jt,At.y=Ut,Dt.x=be,Dt.y=Yt,Ft.x=Se,Ft.y=we,jt.x=ne,jt.y=ve,Nt.x=se,Nt.y=he}var Bt=new go.Spot(.156,.156),vt=new go.Spot(.844,.844),gt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new pn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=5),at=Math.min(at,z/3),at=Math.min(at,tt/3);var it=at*gt,lt=new go.Geometry().add(new go.PathFigure(at,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-at,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,at,z-it,0,z,it)).add(new go.PathSegment(go.PathSegment.Line,z,tt-at)).add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,tt-it,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,at,tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,it,tt,0,tt-it)).add(new go.PathSegment(go.PathSegment.Line,0,at)).add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,it,it,0).close()));return it>1&&(lt.spot1=new go.Spot(0,0,it,it),lt.spot2=new go.Spot(1,1,-it,-it)),lt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(ft,z,tt){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,tt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,tt).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,tt).add(new go.PathSegment(go.PathSegment.Line,0,tt)).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(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=0,at.startY=tt/2,at.endX=z,at.endY=tt/2,at}),go.Shape.defineFigureGenerator("LineV",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=z/2,at.startY=0,at.endX=z/2,at.endY=tt,at}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,tt/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,tt)))}),go.Shape.defineFigureGenerator("XLine",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!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,tt)))}),go.Shape.defineFigureGenerator("LineRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)))}),go.Shape.defineFigureGenerator("LineDown",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.25*tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)))}),go.Shape.defineFigureGenerator("LineLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.75*z,tt)))}),go.Shape.defineFigureGenerator("LineUp",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.75*tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(ft,z,tt){var at=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(at*z,(1-at)*tt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,at*tt)).add(new go.PathSegment(go.PathSegment.Move,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Move,0,tt/2)).add(new go.PathSegment(go.PathSegment.Line,z,tt/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,tt)))}),go.Shape.defineFigureGenerator("CircleLine",function(ft,z,tt){var at=z/2,it=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close()));return it.spot1=Bt,it.spot2=vt,it.defaultStretch=go.GraphObject.Uniform,it}),go.Shape.defineFigureGenerator("Line1",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=0,at.startY=0,at.endX=z,at.endY=tt,at}),go.Shape.defineFigureGenerator("Line2",function(ft,z,tt){var at=new go.Geometry(go.Geometry.Line);return at.startX=z,at.startY=0,at.endX=0,at.endY=tt,at}),go.Shape.defineFigureGenerator("Curve1",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,tt,gt*z,0,z,(1-gt)*tt)))}),go.Shape.defineFigureGenerator("Curve2",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,tt,0,gt*tt,(1-gt)*z,tt)))}),go.Shape.defineFigureGenerator("Curve3",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,gt*tt,gt*z,tt)))}),go.Shape.defineFigureGenerator("Curve4",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,(1-gt)*z,0,0,(1-gt)*tt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(ft,z,tt){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,tt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(ft,z,tt){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,tt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new pn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=.1:at<-1?at=-1:at>1&&(at=1);var it=Math.abs(at)*z;if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&&lt.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=10:at<-z?at=-z:at>z&&(at=z);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&&lt.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("Trapezoid1",0,new pn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=.2:at<.5?at=-.5:at>.5&&(at=.5);var it=Math.abs(at)*z;if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&&lt.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new pn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=20:at<-z?at=-z/2:at>z&&(at=z/2);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())):lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())),it<z/2&&lt.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("ManualOperation",0,new pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)?at=10:at<-z?at=-z/2:at>z&&(at=z/2);var it=Math.abs(at);if(at===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=z,lt.endY=tt,lt}else{var lt=new go.Geometry;return at>0?lt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-it,tt)).add(new go.PathSegment(go.PathSegment.Line,it,tt).close())):lt.add(new go.PathFigure(it,0).add(new go.PathSegment(go.PathSegment.Line,z-it,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close())),it<z/2&&lt.setSpots(it/z,0,(z-it)/z,1),lt}});var kt=[];function Ct(){var ft=kt.pop();return ft===void 0?[]:ft}function yt(ft){ft.length=0,kt.push(ft)}function Tt(ft){for(var z=Ct(),tt=.5,at=.5,it=Math.PI*1.5,lt=0,ut=0;ut<ft;ut++)lt=2*Math.PI/ft*ut+it,z[ut]=new go.Point(at+tt*Math.cos(lt),at+tt*Math.sin(lt));return z.push(z[0]),z}function mt(ft){var z=xt(ft),tt=Ct();tt[0]=z[0];for(var at=1,it=1;at<z.length;at+=2,it+=3)tt[it]=z[at],tt[it+1]=z[at],tt[it+2]=z[at+1];return yt(z),tt}function xt(ft){for(var z=Tt(ft),tt=Ct(),at=Math.floor(z.length/2),it=z.length-1,lt=ft%2===0?2:1,ut=0;ut<it;ut++){var dt=z[ut],bt=z[ut+1],At=z[(at+ut-1)%it],Dt=z[(at+ut+lt)%it];tt[ut*2]=dt,tt[ut*2+1]=ot(dt.x,dt.y,At.x,At.y,bt.x,bt.y,Dt.x,Dt.y,new go.Point)}return tt[tt.length]=tt[0],yt(z),tt}go.Shape.defineFigureGenerator("Pentagon",function(ft,z,tt){var at=Tt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<5;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.2,.22),it.spot2=new go.Spot(.8,.9),it}),go.Shape.defineFigureGenerator("Hexagon",function(ft,z,tt){var at=Tt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<6;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.07,.25),it.spot2=new go.Spot(.93,.75),it}),go.Shape.defineFigureGenerator("Heptagon",function(ft,z,tt){var at=Tt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<7;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.2,.15),it.spot2=new go.Spot(.8,.85),it}),go.Shape.defineFigureGenerator("Octagon",function(ft,z,tt){var at=Tt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<8;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.15,.15),it.spot2=new go.Spot(.85,.85),it}),go.Shape.defineFigureGenerator("Nonagon",function(ft,z,tt){var at=Tt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<9;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.17,.13),it.spot2=new go.Spot(.82,.82),it}),go.Shape.defineFigureGenerator("Decagon",function(ft,z,tt){var at=Tt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<10;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.16,.16),it.spot2=new go.Spot(.84,.84),it}),go.Shape.defineFigureGenerator("Dodecagon",function(ft,z,tt){var at=Tt(12),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<12;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.16,.16),it.spot2=new go.Spot(.84,.84),it}),go.Shape.defineFigureGenerator("FivePointedStar",function(ft,z,tt){var at=xt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<10;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.266,.333),it.spot2=new go.Spot(.733,.733),it}),go.Shape.defineFigureGenerator("SixPointedStar",function(ft,z,tt){var at=xt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<12;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.17,.25),it.spot2=new go.Spot(.83,.75),it}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ft,z,tt){var at=xt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<14;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.666),it}),go.Shape.defineFigureGenerator("EightPointedStar",function(ft,z,tt){var at=xt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<16;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.25,.25),it.spot2=new go.Spot(.75,.75),it}),go.Shape.defineFigureGenerator("NinePointedStar",function(ft,z,tt){var at=xt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<18;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.666),it}),go.Shape.defineFigureGenerator("TenPointedStar",function(ft,z,tt){var at=xt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<20;ut++)lt.add(new go.PathSegment(go.PathSegment.Line,at[ut].x*z,at[ut].y*tt));return lt.add(new go.PathSegment(go.PathSegment.Line,at[0].x*z,at[0].y*tt).close()),yt(at),it.spot1=new go.Spot(.281,.261),it.spot2=new go.Spot(.723,.748),it}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ft,z,tt){var at=mt(5),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.222,.277),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ft,z,tt){var at=mt(6),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.17,.222),it.spot2=new go.Spot(.833,.777),it}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ft,z,tt){var at=mt(7),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ft,z,tt){var at=mt(8),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ft,z,tt){var at=mt(9),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ft,z,tt){var at=mt(10),it=new go.Geometry,lt=new go.PathFigure(at[0].x*z,at[0].y*tt,!0);it.add(lt);for(var ut=1;ut<at.length;ut+=3)lt.add(new go.PathSegment(go.PathSegment.Bezier,at[ut+2].x*z,at[ut+2].y*tt,at[ut].x*z,at[ut].y*tt,at[ut+1].x*z,at[ut+1].y*tt));return lt.segments.last().close(),yt(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.setFigureParameter("FramedRectangle",0,new pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new pn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ft,z,tt){var at=ft?ft.parameter1:NaN,it=ft?ft.parameter2:NaN;isNaN(at)&&(at=8),isNaN(it)&&(it=8);var lt=new go.Geometry,ut=new go.PathFigure(0,0,!0);return lt.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at<z/2&&it<tt/2&&(ut.add(new go.PathSegment(go.PathSegment.Move,at,it)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,it).close())),lt.setSpots(0,0,1,1,at,it,-at,-it),lt}),go.Shape.setFigureParameter("Ring",0,new pn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=8);var it=z/2,lt=new go.Geometry,ut=new go.PathFigure(z,z/2,!0);lt.add(ut),ut.add(new go.PathSegment(go.PathSegment.Arc,0,360,it,it,it,it).close());var dt=Math.max(it-at,0);return dt>0&&(ut.add(new go.PathSegment(go.PathSegment.Move,z/2+dt,z/2)),ut.add(new go.PathSegment(go.PathSegment.Arc,0,-360,it,it,dt,dt).close())),lt.spot1=Bt,lt.spot2=vt,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Cloud",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*tt,-.09239631*z,.07836421*tt,.1406031*z,-.0542823*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*tt,.2450511*z,-.00697547*tt,.3776197*z,-.01112067*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*tt,.4539471*z,0,.6066018*z,-.02526587*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*tt,.6914277*z,-.01904177*tt,.8921095*z,-.01220843*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*tt,1.036446*z,.04105738*tt,1.020377*z,.3022052*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*tt,1.04448*z,.360238*tt,.992256*z,.5219009*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*tt,1.032337*z,.5771781*tt,1.018411*z,.8120651*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*tt,1.028411*z,.9571472*tt,.8556702*z,1.052487*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*tt,.7431877*z,1.009325*tt,.5624123*z,1.021761*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*tt,.4820677*z,1.031761*tt,.3030112*z,1.002796*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*tt,.2329994*z,1.01518*tt,.03213784*z,1.01518*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*tt,-.02812061*z,.9032597*tt,-.01205169*z,.6835638*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*tt,-.01812061*z,.6089503*tt,-.00606892*z,.4555777*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*tt,-.01606892*z,.3892545*tt,-.01205169*z,.1944299*tt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(ft,z,tt){var at=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(at*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,z,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Line,at*z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*tt)).add(new go.PathSegment(go.PathSegment.Line,0,at*tt).close())).setSpots(at/2,at/2,1-at/2,1-at/2)}),go.Shape.setFigureParameter("Pie",0,new pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new pn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ft,z,tt){var at=ft?ft.parameter1:NaN,it=ft?ft.parameter2:NaN;isNaN(at)&&(at=0),isNaN(it)&&(it=315);var lt=at%360;lt<0&&(lt+=360);var ut=it%360,dt=Math.min(z,tt)/2;return new go.Geometry().add(new go.PathFigure(dt,dt).add(new go.PathSegment(go.PathSegment.Arc,lt,ut,dt,dt,dt,dt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ft,z,tt){var at=gt/Math.SQRT2*.5,it=Math.SQRT2/2,lt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,it*z,lt*tt,z,(1-at)*tt,(it+at)*z,(lt+at)*tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=30);var it=Math.min(at,z)/2,lt=z/2,ut=tt/2;return new go.Geometry().add(new go.PathFigure(lt-it,0,!0).add(new go.PathSegment(go.PathSegment.Line,lt+it,0)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut-it)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut-it).close()))}),go.Shape.setFigureParameter("ThinCross",0,new pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=10);var it=Math.min(at,z)/2,lt=z/2,ut=tt/2;return new go.Geometry().add(new go.PathFigure(lt-it,0,!0).add(new go.PathSegment(go.PathSegment.Line,lt+it,0)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut-it)).add(new go.PathSegment(go.PathSegment.Line,z,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,lt+it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,tt)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut+it)).add(new go.PathSegment(go.PathSegment.Line,0,ut-it)).add(new go.PathSegment(go.PathSegment.Line,lt-it,ut-it).close()))}),go.Shape.setFigureParameter("ThickX",0,new pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ft,z,tt){var at=ft?ft.parameter1:NaN;if((isNaN(at)||at<0)&&(at=30),z===0||tt===0){var it=new go.Geometry(go.Geometry.Rectangle);return it.startX=0,it.startY=0,it.endX=z,it.endY=tt,it}else{var lt=z/2,ut=tt/2,dt=Math.atan2(tt,z),bt=at-Math.min(Math.cos(dt)*at/2,lt),At=at-Math.min(Math.sin(dt)*at/2,ut),it=new go.Geometry,Dt=new go.PathFigure(bt,0,!0);return it.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,lt,.2*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,z-bt,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,z,At)),Dt.add(new go.PathSegment(go.PathSegment.Line,.8*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,z,tt-At)),Dt.add(new go.PathSegment(go.PathSegment.Line,z-bt,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,lt,.8*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,bt,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,tt-At)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,At).close()),it}}),go.Shape.setFigureParameter("ThinX",0,new pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=10);var it=new go.Geometry,lt=new go.PathFigure(.1*z,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt).close()),it}),go.Shape.setFigureParameter("SquareIBeam",0,new pn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.2);var it=new go.Geometry,lt=new go.PathFigure(0,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5+at/2)*z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5+at/2)*z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5-at/2)*z,(1-at)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(.5-at/2)*z,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,at*tt).close()),it}),go.Shape.setFigureParameter("RoundedIBeam",0,new pn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.5);var it=new go.Geometry,lt=new go.PathFigure(0,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,tt,Math.abs(1-at)*z,.25*tt,Math.abs(1-at)*z,.75*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,at*z,.75*tt,at*z,.25*tt).close()),it}),go.Shape.defineFigureGenerator("HalfEllipse",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,gt*z,0,z,(.5-gt/2)*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,(.5+gt/2)*tt,gt*z,tt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,tt,z,0,z,tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*tt,.5*z,.25*tt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,tt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*tt,.1*z,.8*tt,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*tt,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,.5*tt,.9*z,.8*tt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*tt)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.6*z,.2*tt,z,.25*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*tt,z,.8*tt,.6*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,.5*z,.75*tt,.55*z,.95*tt)).add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*tt,.45*z,.95*tt,.5*z,.75*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.4*z,.8*tt,0,.8*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*tt,0,.25*tt,.4*z,.2*tt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.4*z,.6*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,tt,.5*z,.75*tt,.45*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*tt,.55*z,.95*tt,.5*z,.75*tt));var lt=.2,ut=.3,dt=0,bt=lt*gt;return it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+bt+dt)*tt,(.5-bt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+bt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+bt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-bt+dt)*tt,(.5+bt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*tt,(.5-bt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut+.05)*z,(.5-bt+dt-.02)*tt)),lt=.2,ut=0,dt=-.3,bt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+bt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+bt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-bt+dt)*tt,(.5+bt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-bt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-bt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-bt+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+bt+dt)*tt,(.5-bt+ut)*z,(.5+lt+dt)*tt)),lt=.2,ut=-.3,dt=0,bt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut-.05)*z,(.5-bt+dt-.02)*tt,(.5+bt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-bt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-bt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+bt+dt)*tt,(.5-bt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*tt,(.5+bt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+bt+dt)*tt).close()),at.setSpots(.06,.33,.93,.68),at}),go.Shape.defineFigureGenerator("YinYang",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.5,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),it.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),it.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var lt=.1,ut=.5,dt=.25;return it.add(new go.PathSegment(go.PathSegment.Move,(ut+lt)*z,dt*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ut,tt*dt,lt*z,lt*z).close()),it=new go.PathFigure(z*.5,0,!1),at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),dt=.75,it=new go.PathFigure((ut+lt)*z,dt*tt,!0),at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ut,tt*dt,lt*z,lt*z).close()),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Peace",function(ft,z,tt){var at=.8535533905932737,it=.5*z,lt=.5*tt;return new go.Geometry().add(new go.PathFigure(it,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,it,lt,it,lt)).add(new go.PathSegment(go.PathSegment.Line,it,tt)).add(new go.PathSegment(go.PathSegment.Move,it,lt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,at*tt)).add(new go.PathSegment(go.PathSegment.Move,it,lt)).add(new go.PathSegment(go.PathSegment.Line,at*z,at*tt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=.5,dt=.5,bt=new go.PathFigure(ut*z,(dt-lt)*tt);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),lt=.4,it=gt*.4;var At=ae(),Dt=ae(),Ft=ae(),jt=ae();zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.42,At,Dt,Ft,jt,jt);var Nt=ae(),_t=ae(),Wt=ae();zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.58,jt,jt,Wt,Nt,_t);var Jt=ae(),Ut=ae(),Vt=ae();zt(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.42,Jt,Ut,Vt,jt,jt);var oe=ae(),se=ae(),he=ae();return zt(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.58,jt,jt,he,oe,se),bt.add(new go.PathSegment(go.PathSegment.Move,he.x*z,he.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,oe.x*z,oe.y*tt,se.x*z,se.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Ft.x*z,Ft.y*tt,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,he.x*z,he.y*tt).close()),bt.add(new go.PathSegment(go.PathSegment.Move,Vt.x*z,Vt.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,Wt.x*z,Wt.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Nt.x*z,Nt.y*tt,_t.x*z,_t.y*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*z,Vt.y*tt,Jt.x*z,Jt.y*tt,Ut.x*z,Ut.y*tt).close()),Re(At),Re(Dt),Re(Ft),Re(jt),Re(Nt),Re(_t),Re(Wt),Re(Jt),Re(Ut),Re(Vt),Re(oe),Re(se),Re(he),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Fragile",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*tt)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*tt)).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*tt,z,.25*tt,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*tt,0,.25*tt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new pn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=30),at>z&&(at=z);var it=(z-at)/2,lt=it+at;return new go.Geometry().add(new go.PathFigure(lt,.5*tt).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt)).add(new go.PathSegment(go.PathSegment.Line,it,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,.55*tt).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.45*tt)).add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*tt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(ft,z,tt){var at=new go.Geometry,it=gt*.4,lt=.4,ut=.5,dt=.5,bt=ae(),At=ae(),Dt=ae(),Ft=ae(),jt=new go.PathFigure((ut-lt)*z,dt*tt,!1);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.44,Dt,Ft,At,bt,bt),jt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt));var Nt=ue(At.x,At.y);zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.56,bt,bt,At,Dt,Ft);var _t=ue(At.x,At.y);jt.add(new go.PathSegment(go.PathSegment.Line,(Nt.x*.1+.95*.9)*z,Nt.y*.1*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*z,Nt.y*.1*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),jt.add(new go.PathSegment(go.PathSegment.Line,z,0)),jt.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,(_t.x*.1+.9)*z,.15*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,(_t.x*.1+.9)*z,(_t.y*.1+.05*.9)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,_t.x*z,_t.y*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),lt=.35,it=gt*.35;var Wt=new go.PathFigure(ut*z,(dt-lt)*tt,!1);at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt));var Jt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(Jt),Re(bt),Re(At),Re(Dt),Re(Ft),Re(Nt),Re(_t),at.spot1=new go.Spot(.202,.257),at.spot2=new go.Spot(.792,.739),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("GenderFemale",function(ft,z,tt){var at=new go.Geometry,it=.375,lt=0,ut=-.125,dt=it*gt,bt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+it+lt)*z,(.5+ut)*tt,(.5+dt+lt)*z,(.5+it+ut)*tt,(.5+it+lt)*z,(.5+dt+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5-it+ut)*tt,(1-.5+it+lt)*z,(.5-dt+ut)*tt,(.5+dt+lt)*z,(.5-it+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+lt)*z,(.5+it+ut)*tt,(.5-it+lt)*z,(.5+dt+ut)*tt,(.5-dt+lt)*z,(.5+it+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*tt).close()),it=.325,lt=0,ut=-.125,dt=it*gt;var bt=new go.PathFigure((1-.5+it+lt)*z,(.5+ut)*tt,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5+it+ut)*tt,(.5+it+lt)*z,(.5+dt+ut)*tt,(.5+dt+lt)*z,(.5+it+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5+it+ut)*tt,(.5-it+lt)*z,(.5+dt+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+it+lt)*z,(.5+ut)*tt,(.5+dt+lt)*z,(.5-it+ut)*tt,(1-.5+it+lt)*z,(.5-dt+ut)*tt));var bt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);return at.add(bt),at.spot1=new go.Spot(.232,.136),at.spot2=new go.Spot(.682,.611),at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("LogicImplies",function(ft,z,tt){var at=ft?ft.parameter1:NaN;return isNaN(at)&&(at=.2),new go.Geometry().add(new go.PathFigure((1-at)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(ft,z,tt){var at=ft?ft.parameter1:NaN;return isNaN(at)&&(at=.2),new go.Geometry().add(new go.PathFigure((1-at)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,(1-at)*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,at*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,at*z,tt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(ft,z,tt){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,tt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(ft,z,tt){var at=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*tt,.5*z,.5*tt)));return at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("LogicTruth",function(ft,z,tt){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,tt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(ft,z,tt){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*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)).add(new go.PathSegment(go.PathSegment.Move,0,tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(ft,z,tt){var at=.5;return new go.Geometry().add(new go.PathFigure(0,tt,!1).add(new go.PathSegment(go.PathSegment.Line,0,at*tt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,at*z,at*tt,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,z,tt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(ft,z,tt){var at=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,at*tt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,at*z,at*tt,at*z,at*tt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new pn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=.3);var lt=(1-at)*z,ut=(.5-it/2)*tt,dt=(.5+it/2)*tt,bt=new go.Geometry,At=new go.PathFigure(0,ut,!0);bt.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt,ut)),At.add(new go.PathSegment(go.PathSegment.Line,lt,0)),At.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,dt)),At.add(new go.PathSegment(go.PathSegment.Line,0,dt).close()),bt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return bt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),bt}),go.Shape.setFigureParameter("Arrow2",0,new pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new pn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=30),at>z&&(at=z);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=30),it=Math.min(it,tt/2);var lt=z-at,ut=(tt-it)/2,dt=ut+it,bt=new go.Geometry,At=new go.PathFigure(0,ut,!0);bt.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt,ut)),At.add(new go.PathSegment(go.PathSegment.Line,lt,0)),At.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,tt)),At.add(new go.PathSegment(go.PathSegment.Line,lt,dt)),At.add(new go.PathSegment(go.PathSegment.Line,0,dt).close()),bt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return bt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),bt}),go.Shape.defineFigureGenerator("Chevron",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("DoubleArrow",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,1*tt).close()),at}),go.Shape.setFigureParameter("DoubleEndArrow",0,new pn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var bt=ot(0,.5,.3,0,0,it/tt,.1,it/tt,ae());return ut.spot1=new go.Spot(bt.x,bt.y),bt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,bt),ut.spot2=new go.Spot(bt.x,bt.y),Re(bt),ut}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new pn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=40);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=100);var lt=(tt-at)/2,ut=lt+at,dt=(tt-it)/2,bt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,bt=tt):(lt=0,ut=tt,dt=0,bt=tt));var At=new go.Geometry,Dt=new go.PathFigure(z,.5*tt,!0);At.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,bt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,bt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,dt).close());var Ft=ot(0,.5,.3,dt/tt,0,lt/tt,1,lt/tt,ae());return At.spot1=new go.Spot(Ft.x,Ft.y),Ft=ot(.7,bt/tt,1,.5,0,ut/tt,1,ut/tt,Ft),At.spot2=new go.Spot(Ft.x,Ft.y),Re(Ft),At}),go.Shape.setFigureParameter("IBeamArrow",0,new pn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(0,it/tt);var bt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(bt.x,bt.y),Re(bt),ut}),go.Shape.setFigureParameter("IBeamArrow2",0,new pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new pn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=40);var it=ft?ft.parameter2:NaN;isNaN(it)&&(it=100);var lt=(tt-at)/2,ut=lt+at,dt=(tt-it)/2,bt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,bt=tt):(lt=0,ut=tt,dt=0,bt=tt));var At=new go.Geometry,Dt=new go.PathFigure(z,.5*tt,!0);At.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,bt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,ut)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,bt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,bt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,dt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,dt).close()),At.spot1=new go.Spot(0,lt/tt);var Ft=ot(.7,bt/tt,1,.5,0,ut/tt,1,ut/tt,ae());return At.spot2=new go.Spot(Ft.x,Ft.y),Re(Ft),At}),go.Shape.setFigureParameter("Pointer",0,new pn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.1);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),it.spot1=new go.Spot(at,.35);var ut=ot(.2,.65,1,.65,0,1,1,.5,ae());return it.spot2=new go.Spot(ut.x,ut.y),Re(ut),it}),go.Shape.setFigureParameter("RoundedPointer",0,new pn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.3);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,at*z,.75*tt,at*z,.25*tt).close()),it.spot1=new go.Spot(at,.35);var ut=ot(0,.65,1,.65,0,1,1,.5,ae());return it.spot2=new go.Spot(ut.x,ut.y),Re(ut),it}),go.Shape.setFigureParameter("SplitEndArrow",0,new pn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.4);var it=(.5-at/2)*tt,lt=(.5+at/2)*tt,ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(.2,.3);var bt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(bt.x,bt.y),Re(bt),ut}),go.Shape.setFigureParameter("SplitEndArrow2",0,new pn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=50);var it=(tt-at)/2,lt=it+at;at>tt&&(it=0,lt=tt);var ut=new go.Geometry,dt=new go.PathFigure(z,.5*tt,!0);ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,0,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ut.spot1=new go.Spot(.2,it/tt);var bt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(bt.x,bt.y),Re(bt),ut}),go.Shape.setFigureParameter("SquareArrow",0,new pn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.7);var it=new go.Geometry,lt=new go.PathFigure(z,.5*tt,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,0).close()),it.spot1=go.Spot.TopLeft,it.spot2=new go.Spot(at,1),it}),go.Shape.defineFigureGenerator("Cone1",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(0,.9*tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt).close()),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.97),at}),go.Shape.defineFigureGenerator("Cone2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.9*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*tt,(1-.85/.9)*z,tt,.85/.9*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.9*tt).close());var lt=new go.PathFigure(0,.9*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*tt,(1-.85/.9)*z,.8*tt,.85/.9*z,.8*tt)),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.82),at}),go.Shape.defineFigureGenerator("Cube1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt).close());var lt=new go.PathFigure(.5*z,tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(.5,.85),at}),go.Shape.defineFigureGenerator("Cube2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.3*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var lt=new go.PathFigure(0,.3*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(.7,1),at}),go.Shape.defineFigureGenerator("Cylinder1",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,tt/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(0,at,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,gt*at,(.5-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,1*z,at,(.5+lt)*z,0,1*z,gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*tt,1*z,tt-gt*at,(.5+lt)*z,1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,(.5-lt)*z,1*tt,0,tt-gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,0,at));var dt=new go.PathFigure(z,at,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*at,1*z,2*at-gt*at,(.5+lt)*z,2*at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,at,(.5-lt)*z,2*at,0,2*at-gt*at)),it.spot1=new go.Spot(0,0,0,2*at),it.spot2=new go.Spot(1,1),it}),go.Shape.defineFigureGenerator("Cylinder2",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,tt/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(0,tt-at,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,0,at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,gt*at,(.5-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,at,(.5+lt)*z,0,z,gt*at)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-at)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,tt-gt*at,(.5+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-at,(.5-lt)*z,tt,0,tt-gt*at));var dt=new go.PathFigure(0,tt-at,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt-2*at,0,tt-at-gt*at,(.5-lt)*z,tt-2*at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z,tt-at,(.5+lt)*z,tt-2*at,z,tt-at-gt*at)),it.spot1=new go.Spot(0,0),it.spot2=new go.Spot(1,1,0,-2*at),it}),go.Shape.defineFigureGenerator("Cylinder3",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,z/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(at,0,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,z-gt*at,0,z,(.5-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,(.5+lt)*tt,z-gt*at,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,gt*at,tt,0,(.5+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,(.5-lt)*tt,gt*at,0));var dt=new go.PathFigure(at,0,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,2*at,.5*tt,at+gt*at,0,2*at,(.5-lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,at,tt,2*at,(.5+lt)*tt,at+gt*at,tt)),it.spot1=new go.Spot(0,0,2*at,0),it.spot2=new go.Spot(1,1),it}),go.Shape.defineFigureGenerator("Cylinder4",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=5),at=Math.min(at,z/3);var it=new go.Geometry,lt=gt*.5,ut=new go.PathFigure(z-at,0,!0);it.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,z-gt*at,0,z,(.5-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z,(.5+lt)*tt,z-gt*at,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,at,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,gt*at,tt,0,(.5+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,(.5-lt)*tt,gt*at,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z-at,0));var dt=new go.PathFigure(z-at,0,!1);return it.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-2*at,.5*tt,z-at-gt*at,0,z-2*at,(.5-lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-at,tt,z-2*at,(.5+lt)*tt,z-at-gt*at,tt)),it.spot1=new go.Spot(0,0),it.spot2=new go.Spot(1,1,-2*at,0),it}),go.Shape.defineFigureGenerator("Prism1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,.25*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(.25*z,.25*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.408,.172),at.spot2=new go.Spot(.833,.662),at}),go.Shape.defineFigureGenerator("Prism2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.25*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(0,tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*tt)),at.spot1=new go.Spot(.25,.5),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("Pyramid1",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt).close());var lt=new go.PathFigure(.5*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.25,.367),at.spot2=new go.Spot(.75,.875),at}),go.Shape.defineFigureGenerator("Pyramid2",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt).close());var lt=new go.PathFigure(.5*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),at.spot1=new go.Spot(.25,.367),at.spot2=new go.Spot(.75,.875),at}),go.Shape.defineFigureGenerator("Actor",function(ft,z,tt){var at=new go.Geometry,it=.2,lt=.1,ut=gt*it,dt=gt*lt,bt=.5,At=.1,Dt=new go.PathFigure(bt*z,(At+lt)*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-it)*z,At*tt,(bt-ut)*z,(At+lt)*tt,(bt-it)*z,(At+dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-lt)*tt,(bt-it)*z,(At-dt)*tt,(bt-ut)*z,(At-lt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+it)*z,At*tt,(bt+ut)*z,(At-lt)*tt,(bt+it)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At+lt)*tt,(bt+it)*z,(At+dt)*tt,(bt+ut)*z,(At+lt)*tt));var Ft=.05,jt=gt*Ft;bt=.05,At=.25;var Nt=new go.PathFigure(.5*z,.2*tt,!0);return at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*tt)),bt=.95,At=.25,Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+Ft)*z,At*tt,(bt+jt)*z,(At-Ft)*tt,(bt+Ft)*z,(At-jt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*tt)),Ft=.025,jt=gt*Ft,bt=.825,At=.35,Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-Ft)*tt,(bt+Ft)*z,(At-jt)*tt,(bt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Ft)*z,At*tt,(bt-jt)*z,(At-Ft)*tt,(bt-Ft)*z,(At-jt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.55*z,tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*tt)),Ft=.05,jt=gt*Ft,bt=.5,At=.7,Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-Ft)*tt,(bt+Ft)*z,(At-jt)*tt,(bt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Ft)*z,At*tt,(bt-jt)*z,(At-Ft)*tt,(bt-Ft)*z,(At-jt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.45*z,tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*tt)),Ft=.025,jt=gt*Ft,bt=.175,At=.35,Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-Ft)*tt,(bt+Ft)*z,(At-jt)*tt,(bt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Ft)*z,At*tt,(bt-jt)*z,(At-Ft)*tt,(bt-Ft)*z,(At-jt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),Ft=.05,jt=gt*Ft,bt=.05,At=.25,Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-Ft)*tt,(bt-Ft)*z,(At-jt)*tt,(bt-jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*tt)),at.spot1=new go.Spot(.2,.2),at.spot2=new go.Spot(.8,.65),at}),go.Shape.setFigureParameter("Card",0,new pn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ft,z,tt){var at=ft?ft.parameter1:NaN;isNaN(at)&&(at=.2);var it=new go.Geometry,lt=new go.PathFigure(z,0,!0);return it.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,at*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,at*z,0).close()),it.spot1=new go.Spot(0,at),it.spot2=go.Spot.BottomRight,it}),go.Shape.defineFigureGenerator("Collate",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt));var lt=new go.PathFigure(.5*z,.5*tt,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),at.spot1=new go.Spot(.25,0),at.spot2=new go.Spot(.75,.25),at}),go.Shape.defineFigureGenerator("CreateRequest",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(0,it*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,0,(1-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,(1-it)*tt)),at}),go.Shape.defineFigureGenerator("Database",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(z,.1*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-lt)*tt,(.5-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,(.5+it)*z,0,z,(.1-lt)*tt));var dt=new go.PathFigure(z,.1*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,z,(.1+lt)*tt,(.5+it)*z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*tt,(.5-it)*z,.2*tt,0,(.1+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,z,(.2+lt)*tt,(.5+it)*z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*tt,(.5-it)*z,.3*tt,0,(.2+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*tt,z,(.3+lt)*tt,(.5+it)*z,.4*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*tt,(.5-it)*z,.4*tt,0,(.3+lt)*tt)),at.spot1=new go.Spot(0,.4),at.spot2=new go.Spot(1,.9),at}),go.Shape.defineFigureGenerator("DataStorage",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,z,0,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*tt,.25*z,.1*tt).close()),at.spot1=new go.Spot(.226,0),at.spot2=new go.Spot(.81,1),at}),go.Shape.defineFigureGenerator("DiskStorage",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.1,ut=new go.PathFigure(z,.1*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.9+lt)*tt,(.5+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,(.5-it)*z,tt,0,(.9+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-lt)*tt,(.5-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,(.5+it)*z,0,z,(.1-lt)*tt));var dt=new go.PathFigure(z,.1*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,z,(.1+lt)*tt,(.5+it)*z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*tt,(.5-it)*z,.2*tt,0,(.1+lt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,.2*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*tt,z,(.2+lt)*tt,(.5+it)*z,.3*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*tt,(.5-it)*z,.3*tt,0,(.2+lt)*tt)),at.spot1=new go.Spot(0,.3),at.spot2=new go.Spot(1,.9),at}),go.Shape.defineFigureGenerator("Display",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,tt,z,0,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close()),at.spot1=new go.Spot(.25,0),at.spot2=new go.Spot(.75,1),at}),go.Shape.defineFigureGenerator("DividedEvent",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)?it=.2:it<.15&&(it=.15);var lt=gt*.2,ut=new go.PathFigure(0,.2*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-lt)*tt,(.2-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*tt,(.8+lt)*z,0,z,(.2-lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,tt,z,(.8+lt)*tt,(.8+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*tt,(.2-lt)*z,tt,0,(.8+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt));var dt=new go.PathFigure(0,it*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),at}),go.Shape.defineFigureGenerator("DividedProcess",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;(isNaN(it)||it<.1)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(0,it*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,it*tt)),at}),go.Shape.defineFigureGenerator("Document",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(1,.6),at}),go.Shape.defineFigureGenerator("ExternalOrganization",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;(isNaN(it)||it<.2)&&(it=.2);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,0,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,z,it*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Move,0,(1-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,(1-it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,(1-it)*tt)),at}),go.Shape.defineFigureGenerator("ExternalProcess",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close());var lt=new go.PathFigure(.1*z,.4*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*tt)),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("File",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(.75*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Interrupt",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt));var lt=new go.PathFigure(z,.5*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt));var ut=new go.PathFigure(z,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("InternalStorage",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.1);var ut=new go.PathFigure(0,0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var dt=new go.PathFigure(it*z,0,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Move,0,lt*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt*tt)),at}),go.Shape.defineFigureGenerator("Junction",function(ft,z,tt){var at=new go.Geometry,it=1/Math.SQRT2,lt=(1-1/Math.SQRT2)/2,ut=gt*.5,dt=.5,bt=new go.PathFigure(z,dt*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,tt,z,(dt+ut)*tt,(dt+ut)*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*tt,(dt-ut)*z,tt,0,(dt+ut)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,0,0,(dt-ut)*tt,(dt-ut)*z,0)),bt.add(new go.PathSegment(go.PathSegment.Bezier,z,dt*tt,(dt+ut)*z,0,z,(dt-ut)*tt));var At=new go.PathFigure((lt+it)*z,(lt+it)*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,lt*z,lt*tt)),At.add(new go.PathSegment(go.PathSegment.Move,lt*z,(lt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Line,(lt+it)*z,lt*tt)),at}),go.Shape.defineFigureGenerator("LinedDocument",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close());var lt=new go.PathFigure(.1*z,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*tt)),at.spot1=new go.Spot(.1,0),at.spot2=new go.Spot(1,.6),at}),go.Shape.defineFigureGenerator("LoopLimit",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("MagneticTape",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(.5*z,tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,(lt+.1)*z,.9*tt,z,(lt+it)*tt,(lt+it)*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.8),at}),go.Shape.defineFigureGenerator("ManualInput",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("MessageFromUser",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.7);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,it*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.25);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,it*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("MicroformRecording",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(1,.75),at}),go.Shape.defineFigureGenerator("MultiDocument",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*tt,.96*z,.47*tt,.93*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*tt,.86*z,.57*tt,.83*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.4*z,.4*tt,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var lt=new go.PathFigure(.1*z,.2*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.8,.77),at}),go.Shape.defineFigureGenerator("MultiProcess",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,.1*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt).close());var lt=new go.PathFigure(.2*z,.1*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*tt)),at.spot1=new go.Spot(0,.2),at.spot2=new go.Spot(.8,1),at}),go.Shape.defineFigureGenerator("OfflineStorage",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=1-it,ut=new go.PathFigure(0,0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt).close());var dt=new go.PathFigure(.5*it*z,it*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*it)*z,it*tt)),at}),go.Shape.defineFigureGenerator("OffPageConnector",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(.75,1),at}),go.Shape.defineFigureGenerator("Or",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(z,lt*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,tt,z,(lt+it)*tt,(lt+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt));var dt=new go.PathFigure(z,.5*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),at}),go.Shape.defineFigureGenerator("PaperTape",function(ft,z,tt){var at=new go.Geometry;tt=tt/.8;var it=new go.PathFigure(0,.7*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*tt,.5*z,.6*tt,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*tt,.5*z,.4*tt,.5*z,tt).close()),at.spot1=new go.Spot(0,.49),at.spot2=new go.Spot(1,.75),at}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.3);var ut=new go.PathFigure(0,0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN,lt=ft?ft.parameter2:NaN;isNaN(it)&&(it=.1),isNaN(lt)&&(lt=.3);var ut=new go.PathFigure(0,0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("Procedure",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure((1-it)*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,it*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),at}),go.Shape.defineFigureGenerator("Process",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Sort",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt).close());var lt=new go.PathFigure(0,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.5),at}),go.Shape.defineFigureGenerator("Start",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.25);var lt=new go.PathFigure(it*z,0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*tt,.25*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*tt,.25*z,.5*tt));var ut=new go.PathFigure(it*z,0,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,it*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Move,(1-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,(1-it)*z,tt)),at.spot1=new go.Spot(it,0),at.spot2=new go.Spot(1-it,1),at}),go.Shape.defineFigureGenerator("Terminator",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.25*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*tt,.25*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*tt,.25*z,.5*tt)),at.spot1=new go.Spot(.23,0),at.spot2=new go.Spot(.77,1),at}),go.Shape.defineFigureGenerator("TransmittalTape",function(ft,z,tt){var at=new go.Geometry,it=ft?ft.parameter1:NaN;isNaN(it)&&(it=.1);var lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,(1-it)*tt).close()),at.spot1=go.Spot.TopLeft,at}),go.Shape.defineFigureGenerator("AndGate",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=new go.PathFigure(0,0,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(.5+it)*z,0,z,(.5-it)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,(.5+it)*tt,(.5+it)*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(.55,1),at}),go.Shape.defineFigureGenerator("Buffer",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("Clock",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=new go.PathFigure(z,lt*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,tt,z,(lt+it)*tt,(lt+it)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*tt,(lt-it)*z,tt,0,(lt+it)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,lt*z,0,0,(lt-it)*tt,(lt-it)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,lt*tt,(lt+it)*z,0,z,(lt-it)*tt));var dt=new go.PathFigure(z,lt*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt*tt));var bt=new go.PathFigure(.8*z,.75*tt,!1);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*tt)),at}),go.Shape.defineFigureGenerator("Ground",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt)),at}),go.Shape.defineFigureGenerator("Inverter",function(ft,z,tt){var at=new go.Geometry,it=gt*.1,lt=.1,ut=.9,dt=.5,bt=new go.PathFigure(.8*z,.5*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),bt.add(new go.PathSegment(go.PathSegment.Line,0,0)),bt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt));var At=new go.PathFigure((ut+lt)*z,dt*tt,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.4,.75),at}),go.Shape.defineFigureGenerator("NandGate",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=gt*.4,ut=gt*.1,dt=.1,bt=.9,At=.5,Dt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,tt,.8*z,(.5+lt)*tt,(.4+it)*z,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(.4+it)*z,0,.8*z,(.5-lt)*tt));var Ft=new go.PathFigure((bt+dt)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At+dt)*tt,(bt+dt)*z,(At+ut)*tt,(bt+ut)*z,(At+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt)*z,At*tt,(bt-ut)*z,(At+dt)*tt,(bt-dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-dt)*tt,(bt-dt)*z,(At-ut)*tt,(bt-ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt)*z,At*tt,(bt+ut)*z,(At-dt)*tt,(bt+dt)*z,(At-ut)*tt)),at.spot1=new go.Spot(0,.05),at.spot2=new go.Spot(.55,.95),at}),go.Shape.defineFigureGenerator("NorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=0,dt=.5,bt=new go.PathFigure(.8*z,.5*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.7*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*tt,.25*z,.25*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(ut+lt)*z,(dt-it)*tt,.7*z,(dt-lt)*tt)),it=.1,lt=gt*.1,ut=.9,dt=.5;var At=new go.PathFigure((ut-it)*z,dt*tt,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),at.spot1=new go.Spot(.2,.25),at.spot2=new go.Spot(.6,.75),at}),go.Shape.defineFigureGenerator("OrGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=0,dt=.5,bt=new go.PathFigure(0,0,!0);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(ut+lt+lt)*z,(dt-it)*tt,.8*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.8*z,(dt+lt)*tt,(ut+lt+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*tt,.25*z,.25*tt).close()),at.spot1=new go.Spot(.2,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("XnorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=.2,dt=.5,bt=new go.PathFigure(.1*z,0,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,tt,.35*z,.25*tt,.35*z,.75*tt));var At=new go.PathFigure(.8*z,.5*tt,!0);at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,tt,.7*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*tt,.45*z,.25*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*tt,(ut+lt)*z,(dt-it)*tt,.7*z,(dt-lt)*tt)),it=.1,lt=gt*.1,ut=.9,dt=.5;var Dt=new go.PathFigure((ut-it)*z,dt*tt,!0);return at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),at.spot1=new go.Spot(.4,.25),at.spot2=new go.Spot(.65,.75),at}),go.Shape.defineFigureGenerator("XorGate",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*it,ut=.2,dt=.5,bt=new go.PathFigure(.1*z,0,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,tt,.35*z,.25*tt,.35*z,.75*tt));var At=new go.PathFigure(.2*z,0,!0);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(ut+lt)*z,(dt-it)*tt,.9*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,tt,.9*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*tt,.45*z,.25*tt).close()),at.spot1=new go.Spot(.4,.25),at.spot2=new go.Spot(.8,.75),at}),go.Shape.defineFigureGenerator("Capacitor",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("Resistor",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Inductor",function(ft,z,tt){var at=new go.Geometry,it=gt*.1,lt=.1,ut=.1,dt=.5,bt=new go.PathFigure((ut-it*.5)*z,tt,!1);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.3,bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.5,bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.7,bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.9,bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it*.5)*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),at}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ft,z,tt){var at=new go.Geometry,it=gt*.5,lt=.5,ut=.5,dt=.5,bt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Move,(ut-lt+.1)*z,dt*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt-.1)*z,dt*tt,ut*z,(dt-lt)*tt,ut*z,(dt+lt)*tt)),at}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.75*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("Diode",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at.spot1=new go.Spot(0,.25),at.spot2=new go.Spot(.5,.75),at}),go.Shape.defineFigureGenerator("Wifi",function(ft,z,tt){var at=new go.Geometry,it=z,lt=tt;z=z*.38,tt=tt*.6;var ut=gt*.8,dt=.8,bt=0,At=.5,Dt=(it-z)/2,Ft=(lt-tt)/2,jt=new go.PathFigure(bt*z+Dt,(At+dt)*tt+Ft,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt)*z+Dt,At*tt+Ft,(bt-ut)*z+Dt,(At+dt)*tt+Ft,(bt-dt)*z+Dt,(At+ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At-dt)*tt+Ft,(bt-dt)*z+Dt,(At-ut)*tt+Ft,(bt-ut)*z+Dt,(At-dt)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt+ut*.5)*z+Dt,At*tt+Ft,bt*z+Dt,(At-dt)*tt+Ft,(bt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At+dt)*tt+Ft,(bt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,bt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.4,dt=.4,bt=.2,At=.5;var Nt=new go.PathFigure(bt*z+Dt,(At+dt)*tt+Ft,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt)*z+Dt,At*tt+Ft,(bt-ut)*z+Dt,(At+dt)*tt+Ft,(bt-dt)*z+Dt,(At+ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At-dt)*tt+Ft,(bt-dt)*z+Dt,(At-ut)*tt+Ft,(bt-ut)*z+Dt,(At-dt)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt+ut*.5)*z+Dt,At*tt+Ft,bt*z+Dt,(At-dt)*tt+Ft,(bt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At+dt)*tt+Ft,(bt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,bt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.2,dt=.2,bt=.5,At=.5;var _t=new go.PathFigure((bt-dt)*z+Dt,At*tt+Ft,!0);at.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At-dt)*tt+Ft,(bt-dt)*z+Dt,(At-ut)*tt+Ft,(bt-ut)*z+Dt,(At-dt)*tt+Ft)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt)*z+Dt,At*tt+Ft,(bt+ut)*z+Dt,(At-dt)*tt+Ft,(bt+dt)*z+Dt,(At-ut)*tt+Ft)),_t.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At+dt)*tt+Ft,(bt+dt)*z+Dt,(At+ut)*tt+Ft,(bt+ut)*z+Dt,(At+dt)*tt+Ft)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-dt)*z+Dt,At*tt+Ft,(bt-ut)*z+Dt,(At+dt)*tt+Ft,(bt-dt)*z+Dt,(At+ut)*tt+Ft)),ut=gt*.4,dt=.4,bt=.8,At=.5;var Wt=new go.PathFigure(bt*z+Dt,(At-dt)*tt+Ft,!0);at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt)*z+Dt,At*tt+Ft,(bt+ut)*z+Dt,(At-dt)*tt+Ft,(bt+dt)*z+Dt,(At-ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At+dt)*tt+Ft,(bt+dt)*z+Dt,(At+ut)*tt+Ft,(bt+ut)*z+Dt,(At+dt)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt-ut*.5)*z+Dt,At*tt+Ft,bt*z+Dt,(At+dt)*tt+Ft,(bt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At-dt)*tt+Ft,(bt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,bt*z+Dt,(At-dt)*tt+Ft).close()),ut=gt*.8,dt=.8,bt=1,At=.5;var Jt=new go.PathFigure(bt*z+Dt,(At-dt)*tt+Ft,!0);return at.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt)*z+Dt,At*tt+Ft,(bt+ut)*z+Dt,(At-dt)*tt+Ft,(bt+dt)*z+Dt,(At-ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At+dt)*tt+Ft,(bt+dt)*z+Dt,(At+ut)*tt+Ft,(bt+ut)*z+Dt,(At+dt)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+dt-ut*.5)*z+Dt,At*tt+Ft,bt*z+Dt,(At+dt)*tt+Ft,(bt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z+Dt,(At-dt)*tt+Ft,(bt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,bt*z+Dt,(At-dt)*tt+Ft).close()),at}),go.Shape.defineFigureGenerator("Email",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,0,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*tt)),at}),go.Shape.defineFigureGenerator("Ethernet",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.35*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var lt=new go.PathFigure(.1*z,tt,!0,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt).close());var ut=new go.PathFigure(.6*z,tt,!0,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.6*z,tt).close());var dt=new go.PathFigure(0,.5*tt,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*tt)),at}),go.Shape.defineFigureGenerator("Power",function(ft,z,tt){var at=new go.Geometry,it=gt*.4,lt=.4,ut=.5,dt=.5,bt=ae(),At=ae(),Dt=ae(),Ft=ae();zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,bt,bt,At,Dt,Ft);var jt=ue(At.x,At.y),Nt=new go.PathFigure(At.x*z,At.y*tt,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),zt(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,bt,bt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Dt.x*z,Dt.y*tt,Ft.x*z,Ft.y*tt)),it=gt*.3,lt=.3,zt(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,bt,bt),Nt.add(new go.PathSegment(go.PathSegment.Line,At.x*z,At.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,Ft.x*z,Ft.y*tt,Dt.x*z,Dt.y*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),zt(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,bt,bt,At,Dt,Ft),Nt.add(new go.PathSegment(go.PathSegment.Bezier,At.x*z,At.y*tt,Ft.x*z,Ft.y*tt,Dt.x*z,Dt.y*tt).close());var Nt=new go.PathFigure(.45*z,0,!0);return at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*tt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Re(bt),Re(At),Re(Dt),Re(Ft),Re(jt),at.spot1=new go.Spot(.25,.45),at.spot2=new go.Spot(.75,.8),at}),go.Shape.defineFigureGenerator("Fallout",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt/2,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,tt/2,z/2,tt/2));function lt(ut,dt,bt){ut.add(new go.PathSegment(go.PathSegment.Move,(.3+dt)*z,(.8+bt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.5+dt)*z,(.5+bt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.1+dt)*z,(.5+bt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.3+dt)*z,(.8+bt)*tt).close())}return lt(it,0,0),lt(it,.4,0),lt(it,.2,-.3),at}),go.Shape.defineFigureGenerator("IrritationHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.2*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt).close()),at.spot1=new go.Spot(.3,.3),at.spot2=new go.Spot(.7,.7),at}),go.Shape.defineFigureGenerator("ElectricalHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.37*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.37*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.34*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.68*tt).close()),at}),go.Shape.defineFigureGenerator("FireHazard",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*tt,.45*z,.44*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*tt,.48*z,.17*tt,.54*z,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*tt,.59*z,.29*tt,.58*z,.28*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*tt,.8*z,.34*tt,.88*z,.43*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*tt,.87*z,.48*tt,.88*z,.43*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,tt,1.17*z,.76*tt,.82*z,.8*tt).close()),at.spot1=new go.Spot(.07,.445),at.spot2=new go.Spot(.884,.958),at}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=0,ut=0,dt=it*gt,bt=.4*Math.SQRT2/2+.5,At=.5-.5*Math.SQRT2/2,Dt=1,Ft=.5,jt=.5,Nt=0,_t=new go.PathFigure(bt*z,(1-At)*tt,!1);return at.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,Ft*tt,Dt*z,.7*tt,Dt*z,Ft*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(jt+lt)*z,(Nt+lt)*tt,(.5+it+lt)*z,(.5-dt+lt)*tt,(.5+dt+lt)*z,(.5-it+lt)*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(.5-it+lt)*z,(.5+ut)*tt,(.5-dt+lt)*z,(.5-it+ut)*tt,(.5-it+lt)*z,(.5-dt+ut)*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(.35+lt)*z,.9*tt,(.5-it+lt)*z,(.5+dt+ut)*tt,(.5-dt+lt)*z,.9*tt)),_t.add(new go.PathSegment(go.PathSegment.Move,(.25+lt)*z,.8*tt)),_t.add(new go.PathSegment(go.PathSegment.Line,(.35+lt)*z,.9*tt)),_t.add(new go.PathSegment(go.PathSegment.Line,(.2+lt)*z,.95*tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(z,tt,!1);at.add(lt);var ut=new go.PathFigure(0,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*tt,.2*z,.35*tt,.3*z,.35*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.7*z,.65*tt,.8*z,.65*tt)),at}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt).close()),at}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.2*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt).close());var it=new go.PathFigure(0,.2*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),at}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.7*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*tt,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,tt,.4*z,.5*tt,z,.5*tt).close());var lt=new go.PathFigure(.45*z,.73*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*tt)),at}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(.335*z,(1-.555)*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*tt,(1-.12)*z,.46*tt,(1-.02)*z,.54*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*tt,.02*z,.54*tt,.12*z,.46*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*tt));var ut=.5-.285,dt=.5,bt=ut,At=Math.PI/4,Dt=4*(1-Math.cos(At))/(3*Math.sin(At)),Ft=Dt*.5,jt=ut,Nt=ut,_t=Dt*jt,Wt=Dt*Nt;lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt-jt)*z,bt*tt,(dt-(_t+jt)/2)*z,(bt+(Nt+Wt)/2)*tt,(dt-jt)*z,(bt+Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,(bt-Nt)*tt,(dt-jt)*z,(bt-Wt)*tt,(dt-_t)*z,(bt-Nt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt+jt)*z,bt*tt,(dt+_t)*z,(bt-Nt)*tt,(dt+jt)*z,(bt-Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*tt,(dt+jt)*z,(bt+Wt)*tt,(dt+(_t+jt)/2)*z,(bt+(Nt+Wt)/2)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*tt));var Jt=new go.PathFigure(.2*z,tt,!1);at.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*tt));var Ut=new go.PathFigure(.8*z,tt,!1);return at.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,tt).close());var lt=new go.PathFigure(.2*z,.2*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventError",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it);var lt=new go.PathFigure(z,tt,!1);at.add(lt);var ut=new go.PathFigure(.1*z,tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("Caution",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.05*z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*tt,0,tt,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*tt,.5*z,0,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,tt,z,tt,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,tt));var lt=.05;return it.add(new go.PathSegment(go.PathSegment.Move,(.5-lt)*z,.875*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*tt,lt*z,lt*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*tt,.575*z,.725*tt,.625*z,.375*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*tt,.375*z,.375*tt,.425*z,.725*tt)),at}),go.Shape.defineFigureGenerator("Recycle",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.45*z,.95*tt,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*tt,.17*z,.95*tt,.15*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*tt,0,.675*tt,0,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*tt));var lt=new go.PathFigure(.475*z,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*tt,.35*z,0,.375*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*tt,.625*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*tt));var ut=new go.PathFigure(.675*z,.575*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*tt,z,.8*tt,z,.85*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,z,.775*tt)),ut.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*tt)),at}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=new go.PathFigure(z,it*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Bezier,it*z,tt,z,(it+lt)*tt,(it+lt)*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,it*tt,(it-lt)*z,tt,0,(it+lt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,it*z,0,0,(it-lt)*tt,(it-lt)*z,0)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z,it*tt,(it+lt)*z,0,z,(it-lt)*tt));var dt=new go.PathFigure(it*z,0,!1);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,.15*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,it*z,.85*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,0,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.15*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.85*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*tt)),dt.add(new go.PathSegment(go.PathSegment.Move,it*z,it*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*tt)),at}),go.Shape.defineFigureGenerator("Package",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.15*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close());var lt=new go.PathFigure(0,.15*tt,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*tt).close()),at.spot1=new go.Spot(0,.1),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Class",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt).close());var ut=new go.PathFigure(0,.5*tt,!1);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt).close()),at}),go.Shape.defineFigureGenerator("Component",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close());var lt=new go.PathFigure(0,.2*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*tt).close());var ut=new go.PathFigure(0,.6*tt,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt).close()),at}),go.Shape.defineFigureGenerator("Boat Shipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.15*z,.6*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*tt));var lt=new go.PathFigure(.15*z,.6*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*tt)),at}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at}),go.Shape.defineFigureGenerator("Workcell",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.35*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),at}),go.Shape.defineFigureGenerator("Supermarket",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,.33*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Move,z,.66*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),at}),go.Shape.defineFigureGenerator("TruckShipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(z,.8*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt).close());var ut=.1,dt=gt*.1,bt=.2,At=.9,Dt=new go.PathFigure((bt-ut)*z,At*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-ut)*tt,(bt-ut)*z,(At-dt)*tt,(bt-dt)*z,(At-ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+ut)*z,At*tt,(bt+dt)*z,(At-ut)*tt,(bt+ut)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At+ut)*tt,(bt+ut)*z,(At+dt)*tt,(bt+dt)*z,(At+ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-ut)*z,At*tt,(bt-dt)*z,(At+ut)*tt,(bt-ut)*z,(At+dt)*tt).close()),ut=.1,dt=gt*.1,bt=.8,At=.9;var Ft=new go.PathFigure((bt-ut)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At-ut)*tt,(bt-ut)*z,(At-dt)*tt,(bt-dt)*z,(At-ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(bt+ut)*z,At*tt,(bt+dt)*z,(At-ut)*tt,(bt+ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,bt*z,(At+ut)*tt,(bt+ut)*z,(At+dt)*tt,(bt+dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(bt-ut)*z,At*tt,(bt-dt)*z,(At+ut)*tt,(bt-ut)*z,(At+dt)*tt).close()),at}),go.Shape.defineFigureGenerator("KanbanPost",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.2*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,tt)),at}),go.Shape.defineFigureGenerator("Forklift",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0));var lt=new go.PathFigure(0,.5*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var ut=new go.PathFigure(.5*z,.8*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*tt));var dt=new go.PathFigure(.5*z,.7*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z,.7*tt));var bt=.1,At=gt*.1,Dt=.1,Ft=.9,jt=new go.PathFigure((Dt-bt)*z,Ft*tt,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-bt)*tt,(Dt-bt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-bt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+bt)*z,Ft*tt,(Dt+At)*z,(Ft-bt)*tt,(Dt+bt)*z,(Ft-At)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+bt)*tt,(Dt+bt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+bt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-bt)*z,Ft*tt,(Dt-At)*z,(Ft+bt)*tt,(Dt-bt)*z,(Ft+At)*tt)),bt=.1,At=gt*.1,Dt=.4,Ft=.9;var Nt=new go.PathFigure((Dt-bt)*z,Ft*tt,!0);return at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-bt)*tt,(Dt-bt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-bt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+bt)*z,Ft*tt,(Dt+At)*z,(Ft-bt)*tt,(Dt+bt)*z,(Ft-At)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+bt)*tt,(Dt+bt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+bt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-bt)*z,Ft*tt,(Dt-At)*z,(Ft+bt)*tt,(Dt-bt)*z,(Ft+At)*tt)),at}),go.Shape.defineFigureGenerator("RailShipment",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.1*z,.4*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*tt).close());var lt=new go.PathFigure(.45*z,.7*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*tt));var ut=new go.PathFigure(.55*z,.4*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*tt).close());var Dt=.05,Ft=gt*.05,jt=.175,Nt=.95,dt=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Dt)*z,Nt*tt,(jt-Ft)*z,(Nt+Dt)*tt,(jt-Dt)*z,(Nt+Ft)*tt));var Dt=.05,Ft=gt*.05,jt=.375,Nt=.95,bt=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Dt)*z,Nt*tt,(jt-Ft)*z,(Nt+Dt)*tt,(jt-Dt)*z,(Nt+Ft)*tt));var Dt=.05,Ft=gt*.05,jt=.625,Nt=.95,At=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Dt)*z,Nt*tt,(jt-Ft)*z,(Nt+Dt)*tt,(jt-Dt)*z,(Nt+Ft)*tt));var Dt=.05,Ft=gt*.05,jt=.825,Nt=.95,_t=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(jt-Dt)*z,Nt*tt,(jt-Ft)*z,(Nt+Dt)*tt,(jt-Dt)*z,(Nt+Ft)*tt).close());var Wt=new go.PathFigure(0,tt,!1);return at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,z,tt).close()),at}),go.Shape.defineFigureGenerator("Warehouse",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var lt=new go.PathFigure(0,.2*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt).close());var ut=new go.PathFigure(.15*z,tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.4*z,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.15*z,tt).close());var dt=.05,bt=gt*.05,At=.35,Dt=.775,Ft=new go.PathFigure((At-dt)*z,Dt*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,At*z,(Dt-dt)*tt,(At-dt)*z,(Dt-bt)*tt,(At-bt)*z,(Dt-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At+dt)*z,Dt*tt,(At+bt)*z,(Dt-dt)*tt,(At+dt)*z,(Dt-bt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,At*z,(Dt+dt)*tt,(At+dt)*z,(Dt+bt)*tt,(At+bt)*z,(Dt+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At-dt)*z,Dt*tt,(At-bt)*z,(Dt+dt)*tt,(At-dt)*z,(Dt+bt)*tt).close()),at}),go.Shape.defineFigureGenerator("ControlCenter",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt).close()),at}),go.Shape.defineFigureGenerator("Bluetooth",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.75*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.25*tt)),at}),go.Shape.defineFigureGenerator("Bookmark",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),at}),go.Shape.defineFigureGenerator("Bookmark",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),it.add(new go.PathSegment(go.PathSegment.Line,0,0)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*tt)),at}),go.Shape.defineFigureGenerator("Globe",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,.75*z,0,z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,z,.75*tt,.75*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.25*z,tt,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*tt,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,tt,.15*z,.25*tt,.15*z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*tt,.85*z,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*tt,.35*z,.3*tt,.65*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*tt,.35*z,.7*tt,.65*z,.7*tt)),at}),go.Shape.defineFigureGenerator("Wave",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.25*tt,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*tt,.1*z,0,.2*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*tt,.425*z,.5*tt,.575*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*tt,.8*z,0,.9*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.25*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.75*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*tt,.1*z,.5*tt,.2*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*tt,.425*z,tt,.575*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*tt,.8*z,.5*tt,.9*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Operator",function(ft,z,tt){var at=new go.Geometry,it=.3,lt=gt*.3,ut=.5,dt=.7,bt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt));var At=new go.PathFigure(0,.7*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*tt,0,0,z,0)),at}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.5*z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.65*z,.3*tt,.65*z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*tt,.35*z,.3*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.3*z,.6*tt,.1*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.2*z,tt,.35*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,tt,.7*z,.6*tt,.9*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*tt,.8*z,tt,.65*z,.95*tt)),at}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z,0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,0,.075*tt,0,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,tt,0,tt,.4*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*tt,.8*z,tt,.85*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,0)),at}),go.Shape.defineFigureGenerator("Battery",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*tt));var lt=new go.PathFigure(0,.6*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,0,.4*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,z,.4*tt)),at}),go.Shape.defineFigureGenerator("Delete",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=.5,dt=.5,bt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt));var At=new go.PathFigure(.15*z,.5*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*tt)),at}),go.Shape.defineFigureGenerator("Flag",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.1*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Move,0,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*tt,.15*z,0,.35*z,0)),it.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*tt,.65*z,.2*tt,.85*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*tt,.85*z,.6*tt,.65*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*tt,.35*z,.4*tt,.15*z,.4*tt).close()),at}),go.Shape.defineFigureGenerator("Help",function(ft,z,tt){var at=new go.Geometry,it=.5,lt=gt*.5,ut=.5,dt=.5,bt=new go.PathFigure((ut-it)*z,dt*tt,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt).close()),it=.05,lt=gt*.05,ut=.5,dt=.8;var At=new go.PathFigure((ut-it)*z,dt*tt,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(ut-it)*z,dt*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt).close()),At.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*tt)),At.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*tt,.75*z,.475*tt,.75*z,.225*tt)),At.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*tt,.4*z,.2*tt,.3*z,.25*tt)),at}),go.Shape.defineFigureGenerator("Location",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.5*z,tt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*tt,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*tt,.5*z,0,.025*z,.025*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*tt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*tt,.1*z,.1*tt).close()))}),go.Shape.defineFigureGenerator("Lock",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var lt=new go.PathFigure(.2*z,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*tt,.25*z,0,.75*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*tt)),at}),go.Shape.defineFigureGenerator("Unlocked",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,.5*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.5*tt));var lt=new go.PathFigure(.2*z,.5*tt,!1);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*tt,.25*z,0,.75*z,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*tt)),at}),go.Shape.defineFigureGenerator("Gear",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*tt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*tt,.79840625*z,.39915625*tt,.7834375*z,.3635*tt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*tt)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*tt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*tt,.64228125*z,.2188125*tt,.603875*z,.2021875*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*tt)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*tt)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*tt,.39759375*z,.20190625*tt,.36053125*z,.2176875*tt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*tt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*tt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*tt,.21765625*z,.36059375*tt,.201875*z,.397625*tt)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*tt)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*tt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*tt,.20221875*z,.603875*tt,.21884375*z,.64228125*tt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*tt)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*tt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*tt,.36353125*z,.78340625*tt,.3991875*z,.79840625*tt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*tt)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*tt,.602375*z,.79809375*tt,.63946875*z,.78234375*tt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*tt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*tt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*tt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*tt,.78234375*z,.63940625*tt,.798125*z,.602375*tt)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*tt,.1*z,.1*tt).close()))}),go.Shape.defineFigureGenerator("Hand",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.5*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*tt,0,.375*tt,.05*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*tt,.3*z,.225*tt,.4*z,.175*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*tt,.46*z,.05*tt,.525*z,.05*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*tt,.525*z,.275*tt,.475*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*tt,z,.4*tt,z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*tt,.675*z,.55*tt,.675*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*tt,.65*z,.7*tt,.65*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,tt,.61*z,.85*tt,.61*z,tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*tt,.435*z,tt,0,tt).close()),at}),go.Shape.defineFigureGenerator("Map",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,.2*tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt).close()),it.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt)),it.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),it.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*tt)),at}),go.Shape.defineFigureGenerator("Eject",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z,tt)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.7)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.7).close());var lt=new go.PathFigure(0,tt*.6,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z,.6*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),at}),go.Shape.defineFigureGenerator("Pencil",function(ft,z,tt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*tt)).add(new go.PathSegment(go.PathSegment.Line,z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,tt)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*tt).close()))}),go.Shape.defineFigureGenerator("Building",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*1,tt*1,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,.046*z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.3)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,tt*.85)),it.add(new go.PathSegment(go.PathSegment.Line,z,tt*.85).close());var lt=new go.PathFigure(.126*z,.85*tt,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*tt)),lt.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*tt).close());var ut=new go.PathFigure(.402*z,.85*tt,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*tt).close());var dt=new go.PathFigure(.678*z,.85*tt,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*tt)),dt.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*tt).close());var bt=new go.PathFigure(.5*z,.1*tt,!1);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*tt)),bt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*tt).close()),at}),go.Shape.defineFigureGenerator("Staircase",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt*1,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*.8)),it.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.8)),it.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.6)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.6)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.4)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.4)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.2)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.2)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.15)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.15)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*.95).close()),at}),go.Shape.defineFigureGenerator("5Bars",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,tt*1,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.184,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.184,tt*(1-.184)).close());var lt=new go.PathFigure(z*.204,tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.204,tt*(1-.184))),lt.add(new go.PathSegment(go.PathSegment.Line,z*.388,tt*(1-.184*2))),lt.add(new go.PathSegment(go.PathSegment.Line,z*.388,tt*1).close());var ut=new go.PathFigure(z*.408,tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.408,tt*(1-.184*2))),ut.add(new go.PathSegment(go.PathSegment.Line,z*.592,tt*(1-.184*3))),ut.add(new go.PathSegment(go.PathSegment.Line,z*.592,tt*1).close());var dt=new go.PathFigure(z*.612,tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.612,tt*(1-.184*3))),dt.add(new go.PathSegment(go.PathSegment.Line,z*.796,tt*(1-.184*4))),dt.add(new go.PathSegment(go.PathSegment.Line,z*.796,tt*1).close());var bt=new go.PathFigure(z*.816,tt,!0);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,z*.816,tt*(1-.184*4))),bt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-.184*5))),bt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1).close()),at}),go.Shape.defineFigureGenerator("PC",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var lt=new go.PathFigure(z*.055,.07*tt,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.07)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.1).close());var ut=new go.PathFigure(z*.055,.13*tt,!0);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.13)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.16)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.16).close());var dt=new go.PathFigure(z*.055,.18*tt,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.18)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.245,tt*.21)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.055,tt*.21).close());var bt=new go.PathFigure(z*1,0,!0);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),bt.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.65)),bt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.65).close()),at}),go.Shape.defineFigureGenerator("Plane",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(.55*z,tt,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*tt,0,.4*tt,.225*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*tt,.975*z,0,z,.08*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*tt)),it.add(new go.PathSegment(go.PathSegment.Line,.55*z,tt).close()),at}),go.Shape.defineFigureGenerator("Key",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*1,tt*.5,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.35*tt)),it.add(new go.PathSegment(go.PathSegment.Line,0,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*tt)),it.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*tt).close()),it.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*tt)),it.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*tt,.075*z,.075*tt).close()),at}),go.Shape.defineFigureGenerator("FilmTape",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(0,0,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),it.add(new go.PathSegment(go.PathSegment.Line,0,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.08,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.08,tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),tt*.95)),it.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1));var lt=new go.PathFigure(0,0,!1);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1));var ut=new go.PathFigure(z*.11,tt*.1,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),tt*.1)),ut.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),tt*.8)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.11,tt*.8).close());var dt=new go.PathFigure(z*(.11+.24133333*1+.028*1),tt*.1,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),tt*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),tt*.8)),dt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),tt*.8).close());var bt=new go.PathFigure(z*(.11+.24133333*2+.028*2),tt*.1,!1);return at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.1)),bt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.8)),bt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),tt*.8).close()),at}),go.Shape.defineFigureGenerator("FloppyDisk",function(ft,z,tt){var at=new go.Geometry,it=8,lt=it*gt,ut=new go.PathFigure(it,0,!1);at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.14)),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-it,tt,z,tt-lt,z-lt,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-it,lt,tt,0,tt-lt)),ut.add(new go.PathSegment(go.PathSegment.Line,0,it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,it,0,0,lt,lt,0).close());var dt=new go.PathFigure(z*.83,0,!1);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z*.83,tt*.3)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*.3)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*0).close());var bt=new go.PathFigure(z*.83,tt*1,!1);at.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,z*.83,tt*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*1).close());var At=new go.PathFigure(z*.78,tt*.05,!1);return at.add(At),At.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.05)),At.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.25)),At.add(new go.PathSegment(go.PathSegment.Line,z*.78,tt*.25).close()),at}),go.Shape.defineFigureGenerator("SpeechBubble",function(ft,z,tt){var at=ft?ft.parameter1:NaN;(isNaN(at)||at<0)&&(at=15),at=Math.min(at,z/3),at=Math.min(at,tt/3);var it=at*gt,lt=tt*.8,ut=new go.Geometry,dt=new go.PathFigure(at,0,!0);return ut.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,z-at,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z,at,z-it,0,z,it)),dt.add(new go.PathSegment(go.PathSegment.Line,z,lt-at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,z-at,lt,z,lt-it,z-it,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.7,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt)),dt.add(new go.PathSegment(go.PathSegment.Line,z*.55,lt)),dt.add(new go.PathSegment(go.PathSegment.Line,at,lt)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt-at,it,lt,0,lt-it)),dt.add(new go.PathSegment(go.PathSegment.Line,0,at)),dt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,it,it,0).close()),it>1?(ut.spot1=new go.Spot(0,0,it,it),ut.spot2=new go.Spot(1,.8,-it,-it)):(ut.spot1=go.Spot.TopLeft,ut.spot2=new go.Spot(1,.8)),ut}),go.Shape.defineFigureGenerator("Repeat",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*.45,!0);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.2,tt*.45).close());var lt=new go.PathFigure(z*1,tt*.55,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*.55).close()),at}),go.Shape.defineFigureGenerator("Windows",function(ft,z,tt){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,tt)).add(new go.PathSegment(go.PathSegment.Line,0,tt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*tt)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*tt)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*tt)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*tt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*tt)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*tt)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*tt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*.1,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.9)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*.9).close());var lt=new go.PathFigure(z*.1,tt*.2,!0);at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.22,tt*.285)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.32)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.1,tt*.37)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.275,tt*.32)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.275,tt*.25).close());var ut=new go.PathFigure(z*.28,tt*.37,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.37)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.41)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.28,tt*.41).close()),at}),go.Shape.defineFigureGenerator("Beaker",function(ft,z,tt){var at=new go.Geometry,it=15,lt=it*gt,ut=new go.PathFigure(z*.62,tt*.475,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z,tt-it)),ut.add(new go.PathSegment(go.PathSegment.Bezier,z-it,tt,z,tt-lt,z-lt,tt)),ut.add(new go.PathSegment(go.PathSegment.Line,it,tt)),ut.add(new go.PathSegment(go.PathSegment.Bezier,0,tt-it,lt,tt,0,tt-lt)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.38,tt*.475)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.38,tt*.03)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*0)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.62,tt*.03).close()),lt>1?(at.spot1=new go.Spot(0,0,lt,lt),at.spot2=new go.Spot(1,1,-lt,-lt)):(at.spot1=go.Spot.TopLeft,at.spot2=go.Spot.BottomRight),at}),go.Shape.defineFigureGenerator("Download",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close());var ut=new go.PathFigure(z*.4,tt*0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.26,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.66)),ut.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.44)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*0).close()),at}),go.Shape.defineFigureGenerator("Bin",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;return it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close()),at}),go.Shape.defineFigureGenerator("Upload",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*0,tt*1,!0);at.add(it);var lt=.1/.3;it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.8,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.66,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.755,tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*.93,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.64,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.61,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.39,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.36,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*.07,tt*(1-lt))),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*.055)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*(1-lt)).close());var ut=new go.PathFigure(z*.5,tt*0,!0);return at.add(ut),ut.add(new go.PathSegment(go.PathSegment.Line,z*.26,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.63)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.63)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.6,tt*.25)),ut.add(new go.PathSegment(go.PathSegment.Line,z*.74,tt*.25).close()),at}),go.Shape.defineFigureGenerator("EmptyDrink",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.15,tt*0,!1);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1).close()),at}),go.Shape.defineFigureGenerator("Drink",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.15,tt*0,!1);at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.85,tt*0)),it.add(new go.PathSegment(go.PathSegment.Line,z*.7,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.3,tt*1).close());var lt=new go.PathFigure(z*.235,tt*.28,!0);return at.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,z*.765,tt*.28)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.655,tt*.97)),lt.add(new go.PathSegment(go.PathSegment.Line,z*.345,tt*.97).close()),at}),go.Shape.defineFigureGenerator("4Arrows",function(ft,z,tt){var at=new go.Geometry,it=new go.PathFigure(z*.5,tt*0,!0);return at.add(it),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*.5)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.65)),it.add(new go.PathSegment(go.PathSegment.Line,z*.75,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.55,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.65,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.5,tt*1)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.75)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.55)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.65)),it.add(new go.PathSegment(go.PathSegment.Line,z*0,tt*.5)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.35)),it.add(new go.PathSegment(go.PathSegment.Line,z*.25,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.45)),it.add(new go.PathSegment(go.PathSegment.Line,z*.45,tt*.25)),it.add(new go.PathSegment(go.PathSegment.Line,z*.35,tt*.25).close()),at}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var pn={},dn="5.0",ue={},ae=null,Re=!1,ot=!1,zt=null,Bt=!1,vt=null,gt=null,kt=0;kt<arguments.length;kt++){var Ct=arguments[kt];if(Ct!==null)switch(typeof Ct){case"number":dn=Ct.toFixed(1);break;case"string":Ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?dn=Ct:zt=Ct;break;case"object":typeof Ct.is3D!="undefined"?ae=Ct:ue=Ct;break;case"boolean":Re=Ct,ot=!0;break}}ae===null&&(ae={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ue.material_id!==void 0&&!ot&&(Re=!0)),zt!==null&&ue.id===void 0&&(ue.id=zt);var yt="",Tt="",mt=!1,xt=null,ft=null,z=null,tt=!1,at=null,it=null,lt=null,ut=null,dt=null;ue.height!==void 0&&(ue.height=Math.round(ue.height)),ue.width!==void 0&&(ue.width=Math.round(ue.width));var bt=function(ce){return parseFloat(ce)>4?parseFloat(ce):5};pn.setHTML5Codebase=function(ce,de){gt=ce,ve(ce,de)},pn.setJavaCodebase=pn.setJavaCodebaseVersion=pn.isCompiledInstalled=pn.setPreCompiledScriptPath=pn.setPreCompiledResourcePath=function(){},pn.setHTML5CodebaseVersion=function(ce,de){var le=parseFloat(ce);if(le!==NaN&&le<5){console.log("The GeoGebra HTML5 codebase version "+le+" is deprecated. Using version latest instead.");return}vt=ce,ne(ce,de)},pn.getHTML5CodebaseVersion=function(){return ft},pn.getParameters=function(){return ue},pn.setFontsCSSURL=function(ce){ut=ce},pn.setGiacJSURL=function(ce){},pn.setJNLPFile=function(ce){yt=ce},pn.setJNLPBaseDir=function(ce){},pn.inject=function(){function ce(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var de="auto",le=ue.id,Ce,fe=!1,me=0;me<arguments.length;me++){var ke=arguments[me];typeof ke=="string"?(ke=ke.toLowerCase(),ke.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?de=ke:le=arguments[me]):typeof ke=="boolean"?fe=ke:ke instanceof HTMLElement&&(Ce=ke)}pe();function pe(){if(!Bt){setTimeout(pe,200);return}de=be(de);var qt=Ce||document.getElementById(le);if(!qt){console.log("possibly bug on ajax loading? ");return}if(pn.removeExistingApplet(qt,!1),ue.width===void 0&&qt.clientWidth&&(ue.width=qt.clientWidth),ue.height===void 0&&qt.clientHeight&&(ue.height=qt.clientHeight),!(ue.width&&ue.height)&&de==="html5"&&(delete ue.width,delete ue.height),xt=de,de==="screenshot")Ut(qt,ue);else{var Kt=!1;ue.hasOwnProperty("playButton")&&ue.playButton||ue.hasOwnProperty("clickToLoad")&&ue.clickToLoad?Kt=!0:ue.hasOwnProperty("playButtonAutoDecide")&&ue.playButtonAutoDecide&&(Kt=(!At()||ce())&&Dt()),Kt?(xt="screenshot",oe(qt,ue,fe,de)):Jt(qt,ue,fe)}}};function At(){try{return window.self!==window.top}catch(ce){return!0}}function Dt(){return ue.hasOwnProperty("screenshotGenerator")&&ue.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}pn.getViews=function(){return ae},pn.isJavaInstalled=function(){return!1};var Ft=function(ce){var de=function(me){var ke=JSON.parse(me),pe=function(wt){return wt.type=="G"||wt.type=="E"},qt=ke.elements?ke.elements.filter(pe)[0]:ke;if(!qt||!qt.url){le();return}ue.fileName=qt.url,jt(qt.settings||{}),ae.is3D=!0;var Kt="https://www.geogebra.org/images/";pn.setPreviewImage(at||qt.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),ce()},le=function(){ue.onError&&ue.onError(),Se("Error: Fetching material (id "+ue.material_id+") failed.",ue)},Ce=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",fe="/materials/"+ue.material_id+"?scope=basic";Nt("https://"+Ce+"/api/proxy.php?path="+encodeURIComponent(fe),de,le)};function jt(ce){var de=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(le){ce[le]=!!ce[le]}),de.forEach(function(le){ue[le]===void 0&&ce[le]!==void 0&&(ue[le]=ce[le])}),ue.showToolBarHelp===void 0&&(ue.showToolBarHelp=ue.showToolBar)}function Nt(ce,de,le){var Ce=new XMLHttpRequest;Ce.open("GET",ce),Ce.onload=function(){de(Ce.responseText)},Ce.onerror=le,Ce.send()}pn.isHTML5Installed=function(){return!0},pn.getLoadedAppletType=function(){return xt},pn.setPreviewImage=function(ce,de,le){at=ce,it=de,lt=le},pn.removeExistingApplet=function(ce,de){var le;typeof ce=="string"&&(ce=document.getElementById(ce)),xt=null;var Ce=null;for(le=0;le<ce.childNodes.length;le++){var fe=ce.childNodes[le],me=fe.className;me==="applet_screenshot"?de?(fe.style.display="block",xt="screenshot"):fe.style.display="none":me!=="applet_scaler prerender"&&(ce.removeChild(fe),Ce=me&&me.indexOf("appletParameters")!=-1?fe.id:null,le--)}var ke=ue.id!==void 0?ue.id:Ce,pe=window[ke];pe&&typeof pe.getBase64=="function"&&(pe.remove(),window[ke]=null)},pn.refreshHitPoints=function(){if(bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ce=pn.getAppletObject();return ce&&typeof ce.recalculateEnvironments=="function"?(ce.recalculateEnvironments(),!0):!1},pn.startAnimation=function(){var ce=pn.getAppletObject();return ce&&typeof ce.startAnimation=="function"?(ce.startAnimation(),!0):!1},pn.stopAnimation=function(){var ce=pn.getAppletObject();return ce&&typeof ce.stopAnimation=="function"?(ce.stopAnimation(),!0):!1},pn.getAppletObject=function(){var ce=ue.id!==void 0?ue.id:"ggbApplet";return window[ce]},pn.resize=function(){};var _t=function(ce,de,le){var Ce=document.createElement("param");Ce.setAttribute("name",de),Ce.setAttribute("value",le),ce.appendChild(Ce)},Wt=function(ce){return ce&&ce!=="false"},Jt=function(ce,de,le){bt(ft)<=4.2&&(le=!0);var Ce=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ft||ggbHTML5LoadedCodebaseIsWebSimple&&!tt)&&(Ce=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var fe=document.createElement("div");fe.classList.add("appletParameters","notranslate");var me=de.width,ke=de.height;if(de.disableAutoScale=de.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():de.disableAutoScale,de.width!==void 0)if(bt(ft)<=4.4)Wt(de.showToolBar)&&(de.height-=7),Wt(de.showAlgebraInput)&&(de.height-=37),de.width<605&&Wt(de.showToolBar)&&(de.width=605,me=605);else{var pe=100;(Wt(de.showToolBar)||Wt(de.showMenuBar))&&(de.hasOwnProperty("customToolBar")&&(de.customToolbar=de.customToolBar),pe=Wt(de.showMenuBar)?245:155),me<pe&&(de.width=pe,me=pe)}fe.style.border="none",fe.style.display="inline-block";for(var qt in de)de.hasOwnProperty(qt)&&qt!=="appletOnLoad"&&fe.setAttribute("data-param-"+qt,de[qt]);ut&&fe.setAttribute("data-param-fontscssurl",ut),pn.resize=function(){GGBAppletUtils.responsiveResize(ce,de)},window.addEventListener("resize",function(Oe){pn.resize()});var Kt=typeof de.appletOnLoad=="function"?de.appletOnLoad:function(){};if(!le&&de.width!==void 0){de.hasOwnProperty("showSplash")||fe.setAttribute("data-param-showSplash","false");var wt=ce.querySelector(".applet_scaler.prerender"),Lt=wt!==null;if(Lt)var Zt=wt.querySelector(".ggb_preview");else{var Zt=he(me,ke,de.borderColor,!1);wt=document.createElement("div"),wt.className="applet_scaler",wt.style.position="relative",wt.style.display="block",wt.style.width=me+"px",wt.style.height=ke+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wt,"66%"),bt(ft)>=5?(de.appletOnLoad=function(Oe){var Ie=ce.querySelector(".ggb_preview");Ie&&Ie.parentNode.removeChild(Ie),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wt),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(Oe)},Lt||wt.appendChild(Zt)):fe.appendChild(Zt),wt.appendChild(fe),Lt||ce.appendChild(wt),setTimeout(function(){pn.resize()},1)}else{var ee=document.createElement("div");ee.className="applet_scaler",ee.style.position="relative",ee.style.display="block",ee.appendChild(fe),ce.appendChild(ee),de.appletOnLoad=function(Oe){pn.resize(),Kt(Oe)}}function It(Oe,Ie){Ie&&typeof Ie.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Oe,Ie.appletOnLoad):renderGGBElement(Oe),Se("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ie)}function Rt(Oe,Ie){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Oe,params:Ie}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Qe){It(Qe.article,Qe.params)}),html5AppletsToProcess=null)},bt(ft)<5&&(Oe.className+=" geogebraweb")):It(Oe,Ie)}if(Ce){scriptLoadStarted=!0;for(var Ht=0;Ht<fe.childNodes.length;Ht++){var re=fe.childNodes[Ht].tagName;re==="TABLE"&&(fe.removeChild(fe.childNodes[Ht]),Ht--)}if(ggbHTML5LoadedScript!==null){var ye=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ye!=null&&ye.parentNode.removeChild(ye)}var Pe=document.createElement("script"),Ae=function(){Rt(fe,de)};Pe.src=Tt+z,ggbHTML5LoadedCodebaseIsWebSimple=tt,ggbHTML5LoadedCodebaseVersion=ft,ggbHTML5LoadedScript=Pe.src,Se("GeoGebra HTML5 codebase loaded: '"+Tt+"'.",de),!gt&&(!vt||vt=="5.0")?(tt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ae()):Tt.requirejs?__webpack_require__.e(7963).then(function(){var Oe=[__webpack_require__(87963)];Ae.apply(null,Oe)}.bind(this)).catch(__webpack_require__.oe):(Pe.onload=Ae,ce.appendChild(Pe))}else Rt(fe,de);de.height=ke,de.width=me},Ut=function(ce,de,le){var Ce=he(de.width,de.height,de.borderColor,le),fe=document.createElement("div");fe.style.position="relative",fe.style.display="block",fe.style.width=de.width+"px",fe.style.height=de.height+"px",fe.className="applet_screenshot applet_scaler"+(le?" applet_screenshot_play":""),fe.appendChild(Ce);var me=GGBAppletUtils.getScale(de,ce,le);le?(ce.appendChild(se()),window.GGBT_wsf_view||(ce.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(fe,"66%"),ce.appendChild(fe),me!==1&&!isNaN(me)&&(GGBAppletUtils.scaleElement(fe,me),fe.style.width=de.width+"px",fe.style.height=de.height+"px",fe.parentNode.style.width=de.width*me+"px",fe.parentNode.style.height=de.height*me+"px"),pn.resize=function(){Vt(ce,Ce,fe,le)},window.addEventListener("resize",function(ke){pn.resize()}),pn.resize()};function Vt(ce,de,le,Ce){if(ce.contains(de)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ce.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ce)}var fe=GGBAppletUtils.getScale(ue,ce,Ce);le.parentNode!==null&&(!isNaN(fe)&&fe!==1?(GGBAppletUtils.scaleElement(le,fe),le.parentNode.style.width=ue.width*fe+"px",le.parentNode.style.height=ue.height*fe+"px"):(GGBAppletUtils.scaleElement(le,1),le.parentNode.style.width=ue.width+"px",le.parentNode.style.height=ue.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ce),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}pn.onExitFullscreen=function(ce,de){de.appendChild(ce)};var oe=function(ce,de,le,Ce){Ut(ce,de,!0);for(var fe=function(){var pe=[];for(ke=0;ke<ce.childNodes.length;ke++)pe.push(ce.childNodes[ke]);if(window.GGBT_wsf_view){var qt=window.GGBT_wsf_view.renderFullScreen(ce,de.id),Kt=document.getElementById("fullscreencontainer"),wt=jQuery(ce).find(".fullscreencontent");wt.length>0?(qt.remove(),wt.attr("id","fullscreencontent").show(),jQuery(Kt).append(wt),window.dispatchEvent(new Event("resize"))):Jt(qt,de,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else xt=Ce,Jt(ce,de,!1);if(!window.GGBT_wsf_view)for(ke=0;ke<pe.length;ke++)ce.removeChild(pe[ke])},me=ce.getElementsByClassName("ggb_preview_play"),ke=0;ke<me.length;ke++)me[ke].addEventListener("click",fe,!1),me[ke].addEventListener("ontouchstart",fe,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ce),Dt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},se=function(){var ce=document.createElement("div");if(ce.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var de='.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");}',le=document.createElement("style");le.styleSheet?le.styleSheet.cssText=de:le.appendChild(document.createTextNode(de)),document.getElementsByTagName("head")[0].appendChild(le)}return ce},he=function(ce,de,le,Ce){var fe=document.createElement("div");fe.className="ggb_preview",fe.style.position="absolute",fe.style.zIndex="90",fe.style.width=ce-2+"px",fe.style.height=de-2+"px",fe.style.top="0px",fe.style.left="0px",fe.style.overflow="hidden",fe.style.backgroundColor="white";var me="lightgrey";le!==void 0&&(le==="none"?me="transparent":me=le),fe.style.border="1px solid "+me;var ke=document.createElement("img");if(ke.style.position="relative",ke.style.zIndex="1000",ke.style.top="-1px",ke.style.left="-1px",at!==null&&ke.setAttribute("src",at),ke.style.opacity=.7,it!==null){var pe,qt,Kt;if(!Ce){pe=document.createElement("img"),pe.style.position="absolute",pe.style.zIndex="1001",pe.style.opacity=1,ke.style.opacity=.3,qt=360,qt>ce/4*3&&(qt=ce/4*3),Kt=qt/5.8,pe.setAttribute("src",it),pe.setAttribute("width",qt),pe.setAttribute("height",Kt);var wt=(ce-qt)/2,Lt=(de-Kt)/2;pe.style.left=wt+"px",pe.style.top=Lt+"px",fe.appendChild(pe)}}return fe.appendChild(ke),fe},be=function(ce){return ce=ce.toLowerCase(),ce==="html5"||ce==="screenshot"?ce:"html5"},Yt=["web","webSimple","web3d","tablet","tablet3d","phone"],ne=function(ce,de){if(ft=ce,de){ve(ft,!0);return}var le=!Re;if(le){var Ce=bt(ft);!isNaN(Ce)&&Ce<4.4&&(le=!1)}var fe,me;window.location.protocol.substr(0,4)==="http"?fe=window.location.protocol:fe="http:";var ke=ft.indexOf("//");ke>0?me=ft:ke===0?me=fe+ft:me="https://www.geogebra.org/apps/5.2.814.0/";for(var pe in Yt)if(ft.slice(Yt[pe].length*-1)===Yt[pe]||ft.slice((Yt[pe].length+1)*-1)===Yt[pe]+"/"){ve(me,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&le&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Wt(ue.showToolBar)&&!Wt(ue.showMenuBar)&&!Wt(ue.showAlgebraInput)&&!Wt(ue.enableRightClick)&&(!ue.appName||ue.appName=="classic")?me+="webSimple/":me+="web3d/",ve(me,!1)},ve=function(ce,de){if(ce.requirejs){Tt=ce;return}ce.slice(-1)!=="/"&&(ce+="/"),Tt=ce,de===null&&(de=ce.indexOf("http")===-1),mt=de,z="web.nocache.js",tt=!1;var le=Tt.split("/");le.length>1&&(!de&&le[le.length-2]==="webSimple"?(z="webSimple.nocache.js",tt=!0):Yt.indexOf(le[le.length-2])>=0&&(z=le[le.length-2]+".nocache.js")),le=ce.split("/"),ft=le[le.length-3],ft.substr(0,4)==="test"?ft=ft.substr(4,1)+"."+ft.substr(5,1):(ft.substr(0,3)==="war"||ft.substr(0,4)==="beta")&&(ft="5.0");var Ce=parseFloat(ft);Ce!==NaN&&Ce<5&&ce.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ce+" is deprecated. Using version latest instead."),ne("5.0",de))},Se=function(ce,de){window.console&&window.console.log&&(!de||typeof de.showLogging=="undefined"||de.showLogging&&de.showLogging!=="false")&&console.log(ce)};ue.material_id!==void 0?Ft(we):we();function we(){var ce=dn;vt!==null?ce=vt:parseFloat(ce)<5&&(ce="5.0"),ne(ce,!1),gt!==null&&ve(gt,mt),Bt=!0}return pn},GGBAppletUtils=function(){"use strict";function pn(){return window.GGBT_wsf_edit!==void 0}function dn(Bt,vt){vt!=1?(Bt.style.transformOrigin="0% 0% 0px",Bt.style.webkitTransformOrigin="0% 0% 0px",Bt.style.transform="scale("+vt+","+vt+")",Bt.style.webkitTransform="scale("+vt+","+vt+")",Bt.style.maxWidth="initial",Bt.querySelector(".ggb_preview")!==null&&(Bt.querySelector(".ggb_preview").style.maxWidth="initial"),Bt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Bt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Bt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Bt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Bt.style.transform="none",Bt.style.webkitTransform="none")}function ue(Bt,vt,gt,kt,Ct,yt){var Tt=null;if(yt!=null&&yt!="")for(var mt=Bt.parentNode;mt!=null;)if((" "+mt.className+" ").indexOf(" "+yt+" ")>-1){Tt=mt;break}else mt=mt.parentNode;var xt=0,ft=0,z=0,tt=0,at=0,it=0,lt=0;if(Tt)xt=Tt.offsetWidth,ft=Math.max(kt?Tt.offsetWidth:0,Tt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xt=Math.min(window.innerWidth,document.documentElement.clientWidth),ft=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xt):(xt=window.innerWidth,ft=window.innerHeight,z=window.innerWidth),Bt){var ut=Bt.getBoundingClientRect();ut.left>0&&ut.left<=xt&&(Ct===void 0||!Ct)&&(document.dir==="rtl"?(at=xt-ut.width-ut.left,it=z<=480?10:30):(it=ut.left,at=z<=480?10:30),tt=it+at)}if(Bt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var dt=Bt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(tt=40,lt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(tt=0,lt=40)}}return Bt&&((gt===void 0||!gt)&&vt>0&&vt+tt<xt?xt=vt:xt-=tt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(gt===void 0||!gt)&&(ft-=lt)),{width:xt,height:ft}}function ae(Bt,vt,gt,kt,Ct){if(Bt.isScreenshoGenerator)return 1;var yt=kt!==void 0&&kt,Tt=Bt.noScaleMargin!=null&&Bt.noScaleMargin,mt=function(dt){return dt&&dt!=="false"},xt=mt(Bt.autoHeight),ft=ue(vt,Bt.width,gt,xt,yt&&window.GGBT_wsf_view||Tt,Ct),z=parseInt(ft.width),tt=Bt.width,at=Bt.height;if(tt===void 0){var it=vt.querySelector(".appletParameters");it&&(tt=it.offsetWidth,at=it.offsetHeight)}var lt=z/tt,ut=yt?1:ft.height/at;return gt!==void 0&&!gt&&(lt=Math.min(1,lt),ut=Math.min(1,ut)),Math.min(lt,ut)}function Re(Bt,vt,gt){var kt=1,Ct,yt=!1;if(Bt.hasOwnProperty("allowUpscale")&&(yt=Bt.allowUpscale),Bt.hasOwnProperty("scale")&&(kt=parseFloat(Bt.scale),(isNaN(kt)||kt===null||kt===0)&&(kt=1),kt>1&&(yt=!0)),vt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(yt=!0),!(Bt.hasOwnProperty("disableAutoScale")&&Bt.disableAutoScale))Ct=ae(Bt,vt,yt,gt,Bt.scaleContainerClass);else return kt;return yt&&(!Bt.hasOwnProperty("scale")||kt===1)?Ct:Math.min(kt,Ct)}function ot(Bt){var vt=Math.min(window.innerWidth,document.documentElement.clientWidth),gt=Math.min(window.innerHeight,document.documentElement.clientHeight),kt=Bt.getBoundingClientRect(),Ct=(vt-kt.width)/2,yt=(gt-kt.height)/2;yt<0&&(yt=0),Bt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ct<40?Bt.style.left="40px":Bt.style.left=Ct+"px",Bt.style.top=yt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(yt<40?Bt.style.top="40px":Bt.style.top=yt+"px",Bt.style.left=Ct+"px")}function zt(Bt,vt){var gt=Bt.querySelector(".appletParameters");if(gt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(vt.id!==gt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Bt)}if(gt.parentElement&&/fullscreen/.test(gt.parentElement.className))return;var kt=Re(vt,Bt);pn()&&gt.setAttribute("data-param-scale",kt);for(var Ct=null,yt=0;yt<Bt.childNodes.length;yt++)if(Bt.childNodes[yt].className!==void 0&&Bt.childNodes[yt].className.match(/^applet_scaler/)){Ct=Bt.childNodes[yt];break}if(Ct!==null&&Ct.querySelector(".noscale")!==null)return;var Tt=vt.id!==void 0?vt.id:"ggbApplet",mt=window[Tt];(mt==null||!mt.recalculateEnvironments)&&Ct!==null&&!Ct.className.match(/fullscreen/)&&(Ct.parentNode.style.transform="",!isNaN(kt)&&kt!==1?(Ct.parentNode.style.width=vt.width*kt+"px",Ct.parentNode.style.height=vt.height*kt+"px",dn(Ct,kt)):(dn(Ct,1),Ct.parentNode.style.width=vt.width+"px",Ct.parentNode.style.height=vt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ot(Bt),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(gt).parents(".content-added-content"))}}return{responsiveResize:zt,isFlexibleWorksheetEditor:pn,positionCenter:ot,getScale:Re,scaleElement:dn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var pn=n.location.search;return pn.indexOf(J)!=-1||pn.indexOf(K)!=-1}function q(pn,dn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(pn){var dn=s[L].bindings;s[L].bindings=function(){for(var ue=dn?dn():{},ae=pn[webModule.__softPermutationId],Re=O;Re<ae.length;Re++){var ot=ae[Re];ue[ot[O]]=ot[P]}return ue}};var t;function u(){return v(),t}function v(){if(!t){var pn=o.createElement(Q);if(pn.id=L,pn.style.cssText=R+S,pn.tabIndex=-1,o.body.appendChild(pn),t=pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var dn=document.compatMode==U?V:W;t.write(dn+X),t.close()}}}function w(pn){function dn(ae){function Re(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ot=Re();if(ot){ae();return}function zt(){if(!ot){if(!Re())return;ot=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,zt,!1),Bt&&clearInterval(Bt)}}o.addEventListener&&o.addEventListener(Z,zt,!1);var Bt=setInterval(function(){zt()},$)}function ue(ae){var Re=u(),ot=Re.body,zt=Re.createElement(_);zt.language=ab,zt.crossOrigin=W,zt.src=ae,webModule.__errFn&&(zt.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),ot.appendChild(zt)}dn(function(){ue(pn)})}webModule.__startLoadingFragment=function(pn){return C(pn)},webModule.__installRunAsyncCode=function(pn){var dn=u(),ue=dn.body,ae=dn.createElement(_);ae.language=ab,ae.text=pn,ue.appendChild(ae),ue.removeChild(ae)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(pn){var dn=c[pn];return dn==null?null:dn},r=d,webModule.__errFn=e}function B(){function pn(Bt){var vt=Bt.lastIndexOf(rb);vt==-1&&(vt=Bt.length);var gt=Bt.indexOf(sb);gt==-1&&(gt=Bt.length);var kt=Bt.lastIndexOf(tb,Math.min(gt,vt));return kt>=O?Bt.substring(O,kt+P):W}function dn(Bt){if(!Bt.match(/^\w+:\/\//)){var vt=o.createElement(ub);vt.src=Bt+vb,Bt=pn(vt.src)}return Bt}function ue(){var Bt=__gwt_getMetaProperty(wb);return Bt!=null?Bt:W}function ae(){for(var Bt=o.getElementsByTagName(_),vt=O;vt<Bt.length;++vt)if(Bt[vt].src.indexOf(xb)!=-1)return pn(Bt[vt].src);return W}function Re(){var Bt=o.getElementsByTagName(yb);return Bt.length>O?Bt[Bt.length-P].href:W}function ot(){var Bt=o.location;return Bt.href==Bt.protocol+zb+Bt.host+Bt.pathname+Bt.search+Bt.hash}var zt=ue();return zt==W&&(zt=ae()),zt==W&&(zt=Re()),zt==W&&ot()&&(zt=pn(o.location.href)),zt=dn(zt),zt}function C(pn){return pn.match(/^\//)||pn.match(/^[a-zA-Z]+:\/\//)?pn:webModule.__moduleBase+pn}function D(){var pn=[],dn=O,ue=[],ae=[];function Re(Bt){var vt=ae[Bt](),gt=ue[Bt];if(vt in gt)return vt;var kt=[];for(var Ct in gt)kt[gt[Ct]]=Ct;throw r&&r(Bt,kt,vt),null}if(__gwt_isKnownPropertyValue=function(Bt,vt){return vt in ue[Bt]},webModule.__getPropMap=function(){var Bt={};for(var vt in ue)ue.hasOwnProperty(vt)&&(Bt[vt]=Re(vt));return Bt},webModule.__computePropValue=Re,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ot;try{ot=Cb;var zt=ot.indexOf(Db);zt!=-1&&(dn=parseInt(ot.substring(zt+P),$),ot=ot.substring(O,zt))}catch(Bt){}return webModule.__softPermutationId=dn,C(ot+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},46699:function(pn,dn,ue){"use strict";ue.d(dn,{Ax:function(){return zt},Ds:function(){return Bt},KI:function(){return gt},SI:function(){return ot},f1:function(){return Re}});var ae=ue(346);function Re(kt){let Ct=!0;if(kt.length>0){for(let yt=0;yt<kt.length;yt++)if(kt[yt].compile_success==0||!kt[yt].compile_success){Ct=!1;break}}else Ct=!1;return Ct}function ot(kt,Ct=""){let yt=[];for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt],xt=Ct?`${Ct}/${mt.name}`:`${mt.name}`;yt.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:xt})}return yt}function zt(kt,Ct,yt){for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt];if(mt.key===Ct){mt.children=yt;break}mt.children&&zt(mt.children,Ct,yt)}return kt}function Bt(kt,Ct,yt){let Tt;return function(){let mt=this,xt=arguments,ft=function(){Tt=null,yt||kt.apply(mt,xt)},z=yt&&!Tt;clearTimeout(Tt),Tt=setTimeout(ft,Ct),z&&kt.apply(mt,xt)}}const vt=!0,gt=ae.Z.API_SERVER},9507:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return Tt}});var ae=ue(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ot=ue(92310),zt=ue.n(ot),Bt=ue(29787),vt=ue(2859),gt=ue(38986),kt=ue(51257),Ct=(mt,xt,ft)=>new Promise((z,tt)=>{var at=ut=>{try{lt(ft.next(ut))}catch(dt){tt(dt)}},it=ut=>{try{lt(ft.throw(ut))}catch(dt){tt(dt)}},lt=ut=>ut.done?z(ut.value):Promise.resolve(ut.value).then(at,it);lt((ft=ft.apply(mt,xt)).next())}),Tt=({data:mt,className:xt,fullWidth:ft,style:z={},onClose:tt,onOk:at,showFullTools:it,noAssociationId:lt})=>{const ut=(0,ae.useRef)(null),dt=(0,ae.useRef)(null),bt=(0,ae.useRef)(null),At=(0,ae.useRef)(null),[Dt,Ft]=(0,ae.useState)(!1),[jt,Nt]=(0,ae.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ae.useEffect)(()=>(bt.current||(bt.current=document.createElement("style"),document.head.appendChild(bt.current)),mt!=null&&mt.visible?(document.body.setAttribute("data-custom","y-hidden"),bt.current.innerHTML=" html { overflow-y: hidden; }",mt!=null&&mt.src&&_t()):(document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)),()=>{document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)}),[mt==null?void 0:mt.visible]);const _t=()=>Ct(void 0,null,function*(){Ft(!0),Nt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Vt=yield(0,kt.ZJ)(mt==null?void 0:mt.src);ut.current.src="",ut.current.src=Vt,ut.current.onload=function(){Ut()},Ft(!1),Nt("")}),Wt=Vt=>Ct(void 0,null,function*(){Ft(!0),Nt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const oe=yield(0,gt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:mt.title,file:Vt.dataUrl}});oe!=null&&oe.id&&!lt?(yield(0,gt.ZP)(`/api/attachments/${mt.id}/add_subitem.json`,{method:"post",body:{subitem_id:oe==null?void 0:oe.id,settings:JSON.stringify(Vt.state)}})).status===0&&at():oe!=null&&oe.id&&at(oe),Ft(!1),Nt("")}),Jt=()=>{const Vt=document.querySelector('a[href="https://markerjs.com/"]');Vt&&Vt.parentNode&&(Vt.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(se=>{const he=document.querySelector(se.name);he&&he.setAttribute("title",se.title)})},Ut=()=>{dt.current=new vt.hP(ut.current),dt.current.targetRoot=At.current,dt.current.addEventListener("render",Wt),dt.current.addEventListener("beforeclose",tt),it&&(dt.current.availableMarkerTypes=dt.current.ALL_MARKER_TYPES,dt.current.uiStyleSettings.redoButtonVisible=!0,dt.current.uiStyleSettings.notesButtonVisible=!0,dt.current.uiStyleSettings.zoomButtonVisible=!0,dt.current.uiStyleSettings.zoomOutButtonVisible=!0,dt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=dt.current.uiStyleSettings,dt.current.show(),mt!=null&&mt.snapshotData&&dt.current.restoreState(mt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Jt()},300)};return ae.createElement(ae.Fragment,null,(mt==null?void 0:mt.visible)&&ae.createElement(Bt.Z,{spinning:Dt,tip:jt,style:{position:"absolute",width:"100vw"}},ae.createElement("div",{ref:At,className:zt()(Re.imageDimensions,xt,ft?Re.fullWidth:""),style:z},ae.createElement("img",{className:Re.img,ref:ut}))))}},1041:function(pn,dn,ue){"use strict";ue.d(dn,{N:function(){return tt}});var ae=ue(59301),Re=ue(82326),ot=ue(62957),zt=ue(37568),Bt=ue(6767),vt=ue(77019),gt=ue(5269),kt=ue(38986),Ct={wrap:"wrap___F7E3F",selectWrapper:"selectWrapper____kESB",tips:"tips___aHjQY",linkBtn:"linkBtn___uggVr",mainText:"mainText____S1I0",public_tips:"public_tips___sZVWd",inputCss:"inputCss___t66EO",bt:"bt___lXptu",add_style:"add_style___knrMF"},yt=ue(92310),Tt=ue.n(yt),mt=ue(87169),xt=ue(59301),ft=(at,it,lt)=>new Promise((ut,dt)=>{var bt=Ft=>{try{Dt(lt.next(Ft))}catch(jt){dt(jt)}},At=Ft=>{try{Dt(lt.throw(Ft))}catch(jt){dt(jt)}},Dt=Ft=>Ft.done?ut(Ft.value):Promise.resolve(Ft.value).then(bt,At);Dt((lt=lt.apply(at,it)).next())});const{Option:z}=Re.default,tt=({subId:at,value:it,selectvalues:lt,disabled:ut,knowledgeOptions:dt=[],className:bt,height:At,onChange:Dt=()=>{},onAddKnowledgeFinish:Ft=()=>{},zIndex:jt=1e3})=>{const Nt=(0,ae.useRef)(),[_t,Wt]=(0,ae.useState)([]);it=it||[];const Jt=(Vt,oe)=>{Vt?(Wt([...oe]),Dt([...oe])):(Wt([]),Dt([]))};(0,ae.useEffect)(()=>{(lt==null?void 0:lt.length)>0?(Wt([...lt]),Dt([...lt])):(Wt([]),Dt([]))},[dt]),(0,ae.useEffect)(()=>{(it==null?void 0:it.length)>0&&Dt([...it])},[dt]);const Ut=Vt=>{Vt.preventDefault(),Nt.current="",ot.default.confirm({centered:!0,width:585,zIndex:jt,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:xt.createElement("div",{className:"font14"},xt.createElement("div",{className:Ct.public_tips},xt.createElement(mt.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("div",{style:{width:"95px"}},xt.createElement("span",{className:Ct.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),xt.createElement(zt.default,{className:Ct.inputCss,style:{width:"calc(100% - 95px)"},maxLength:20,size:"middle",showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:Nt.current,onChange:oe=>{Nt.current=oe.target.value}}))),onOk:()=>new Promise((oe,se)=>ft(void 0,null,function*(){if(!Nt.current)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),se();if(Nt.current.length>20)return Bt.ZP.warning("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),se();const he=yield(0,kt.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Nt.current,sub_discipline_id:at}});if((he==null?void 0:he.status)===0){Ft({id:he.tag_discipline_id,name:Nt.current,type:"personal"});let be=lt||[];be.push(he.tag_discipline_id),Dt([...be]),Wt([...be]),Dt([...be])}return oe()}))})};return xt.createElement(vt.Z,{wrap:!1,align:"middle",className:Tt()(Ct.wrap,bt)},xt.createElement(gt.Z,null,xt.createElement(Re.default,{mode:"multiple",disabled:!at||ut,className:Ct.selectWrapper,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9\uFF0C\u652F\u6301\u9009\u62E9\u591A\u4E2A",onChange:Jt,style:{width:At||490},showSearch:!0,allowClear:!0,value:_t,filterOption:(Vt,oe)=>oe.label.indexOf(Vt.toLowerCase())>=0},dt==null?void 0:dt.map(Vt=>xt.createElement(z,{key:Vt.id,value:Vt.id,label:Vt.name},xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Vt.name),(Vt==null?void 0:Vt.type)==="personal"&&xt.createElement("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"}},"\u81EA\u7528")))))),at&&xt.createElement(gt.Z,{className:`ml20 ${At&&Ct.add_style}`},xt.createElement("span",{className:Ct.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),xt.createElement("span",{className:Ct.linkBtn,onClick:Ut},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},76562:function(pn,dn,ue){"use strict";var ae=ue(59301),Re=ue(77019),ot=ue(5269),zt=ue(20554),Bt=ue(99571),vt=ue(76902),gt=ue(99587),kt=ue(48136),Ct=ue(59301);const yt=(0,ae.forwardRef)(({callback:Tt,showSaveButton:mt,value:xt=""},ft)=>{const z=(0,ae.useRef)(),tt=[{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 "}]}]}],at=[{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}`}]}]}],it=dt=>{z.current.setValue(z.current.getValue()+" "+dt.value+" ")},lt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ct.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},tt.map((dt,bt)=>Ct.createElement(ot.Z,{flex:"110px",className:gt.Z.item},Ct.createElement("div",null,Ct.createElement(vt.Z,{value:`$$${dt.value}$$`}),dt.name),Ct.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>Ct.createElement("div",{key:Dt},Ct.createElement("h1",null,At.name),Ct.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>Ct.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},Ct.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ct.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},at.map((dt,bt)=>Ct.createElement(ot.Z,{flex:"110px",className:gt.Z.item},Ct.createElement("div",null,Ct.createElement(vt.Z,{value:"`$$"+dt.value+"$$`"}),dt.name),Ct.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>Ct.createElement("div",{key:Dt},At.name&&Ct.createElement("h1",null,At.name),Ct.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>Ct.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},Ct.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))}],ut=()=>{var dt=document.createElement("div");dt.innerHTML=z.current.getValue();var bt=dt.innerText;return Tt&&Tt(bt),bt};return(0,ae.useImperativeHandle)(ft,()=>({getData:ut})),Ct.createElement("div",{className:gt.Z.mathWrap},Ct.createElement(zt.default,{defaultActiveKey:"1",items:lt}),Ct.createElement("math-field",{locale:"zh_cn",className:gt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},xt||""),mt&&Ct.createElement("div",{className:gt.Z.button},Ct.createElement(Bt.ZP,{size:"large",onClick:ut,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});dn.Z=yt},28426:function(pn,dn,ue){"use strict";var ae=ue(59301),Re=ue(93314),ot=ue(99571),zt=Object.defineProperty,Bt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,yt=(ft,z,tt)=>z in ft?zt(ft,z,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ft[z]=tt,Tt=(ft,z)=>{for(var tt in z||(z={}))kt.call(z,tt)&&yt(ft,tt,z[tt]);if(gt)for(var tt of gt(z))Ct.call(z,tt)&&yt(ft,tt,z[tt]);return ft},mt=(ft,z)=>Bt(ft,vt(z));const xt=({img:ft,buttonProps:z={},styles:tt={},customText:at,ButtonText:it,ButtonClick:lt,Buttonclass:ut,ButtonTwo:dt,imgStyles:bt,loading:At=!1,className:Dt=""})=>ae.createElement("section",{className:`tc animated fadeIn ${Dt}`,style:Tt({color:"#999",margin:"100px auto",visibility:At?"hidden":"visible"},tt)},ae.createElement("img",{src:ft||Re,style:mt(Tt({},bt),{pointerEvents:"none",userSelect:"none"})}),ae.createElement("p",{className:"mt20 font14"},at||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),it&&ae.createElement(ot.ZP,Tt({className:ut,onClick:lt},z),it),dt&&dt);dn.Z=xt},45677:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return ut}});var ae=ue(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ot=ue(99571),zt=ue(70557),Bt=ue(75975),vt=ue(25399),gt=ue(51257),kt=ue(81722),Ct=ue(28426),yt=ue(346),Tt=ue(44203),mt=ue(59301),xt=Object.defineProperty,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(dt,bt,At)=>bt in dt?xt(dt,bt,{enumerable:!0,configurable:!0,writable:!0,value:At}):dt[bt]=At,it=(dt,bt)=>{for(var At in bt||(bt={}))z.call(bt,At)&&at(dt,At,bt[At]);if(ft)for(var At of ft(bt))tt.call(bt,At)&&at(dt,At,bt[At]);return dt},lt=(dt,bt,At)=>new Promise((Dt,Ft)=>{var jt=Wt=>{try{_t(At.next(Wt))}catch(Jt){Ft(Jt)}},Nt=Wt=>{try{_t(At.throw(Wt))}catch(Jt){Ft(Jt)}},_t=Wt=>Wt.done?Dt(Wt.value):Promise.resolve(Wt.value).then(jt,Nt);_t((At=At.apply(dt,bt)).next())}),ut=({editOffice:dt="view",data:bt,issaver:At,onSaver:Dt,theme:Ft,type:jt,filename:Nt,monacoEditor:_t,className:Wt,style:Jt,close:Ut,onClose:Vt,hasMask:oe,disabledDownload:se,onImgDimensions:he,showNodata:be,recordInfo:Yt})=>{const[ne,ve]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Se,we]=(0,ae.useState)(""),[ce,de]=(0,ae.useState)(),le=window.ENV==="build"?"/react/build":"",Ce=location.host.startsWith("localhost")?yt.Z.PROXY_SERVER:yt.Z.API_SERVER,me=10*(1024*1024),ke=(0,ae.useRef)();bt!=null&&bt.startsWith("/api")&&jt!=="txt"&&(bt=yt.Z.API_SERVER+bt);const pe=Zt=>Zt.substring(Zt.lastIndexOf("/")+1).split(".").pop();Nt&&_t&&(_t.filename=Nt),(0,ae.useEffect)(()=>{var Zt,ee;const It=(ee=(Zt=document.cookie)==null?void 0:Zt.replace(/\s/g,""))==null?void 0:ee.split(";");It==null||It.map(Rt=>{let Ht=Rt.split("=");Ht[0]==="_educoder_session"&&we(Ht[1])})},[]),(0,ae.useEffect)(()=>{jt==="office"&&(bt.indexOf("bigfilescdn.")>-1||bt.indexOf("bigfiles1")>-1?de({url:bt,fileType:pe(bt),model:bt.indexOf("model=edit")?"edit":"view"}):Kt())},[jt,bt]);function qt(Zt){return lt(this,null,function*(){Zt.data.type==="pdfdata"&&(Dt(Zt.data.data),window.removeEventListener("message",qt,!1)),console.log("mess---:",Zt.data)})}const Kt=()=>lt(void 0,null,function*(){console.log("data:",bt);let Zt=bt;bt.startsWith("http")||(Zt=location.origin+Zt);let ee=new URL(Zt).pathname.split("/").pop();const It=yield(0,kt.gJ)({attachment_id:ee});It.url=Ce+It.url,de(It)}),wt=()=>{if(bt.startsWith("http")||bt.startsWith("blob:")){Lt();return}(0,gt.Sv)(Nt||"educoder",bt,Nt)},Lt=()=>{Yt&&(0,Tt.fc)({id:Yt==null?void 0:Yt.id,watch_type:1,course_id:Yt==null?void 0:Yt.course_id}),(0,gt.Nd)(Nt||"educoder",decodeURIComponent(bt))};return mt.createElement("div",{style:it({},Jt||{}),className:`${oe&&Re.bgBlack} ${jt?Re.wrp:"hide"}`},Ut&&mt.createElement("div",{className:Re.close,ref:ke},!!he&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ke.current},mt.createElement("span",{onClick:()=>{Vt(),he()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!se&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ke.current},mt.createElement("span",{onClick:Lt},mt.createElement("i",{className:"icon-quxiaozhiding"}))),At&&mt.createElement(vt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ke.current},mt.createElement("span",{className:"",onClick:()=>{const Zt=document.getElementById("pdfiframe");window.addEventListener("message",qt,!1),setTimeout(()=>{Zt.contentWindow.postMessage("getData","*")},300)}},mt.createElement("i",{className:"icon-baocun"}))),mt.createElement(vt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ke.current},mt.createElement("span",{className:"",onClick:()=>{Vt()}},mt.createElement("i",{className:"icon-guanbi1"})))),mt.createElement("div",{className:`${Re[Wt]} ${Wt} ${Re.monaco} ${jt==="txt"?"show":"hide"}`},jt==="txt"&&mt.createElement(mt.Fragment,null,mt.createElement(Bt.ZP,it({},_t)))),jt==="audio"&&mt.createElement("audio",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${bt}`,autoPlay:!0}),jt==="video"&&mt.createElement(mt.Fragment,null,(bt==null?void 0:bt.indexOf("http"))>-1?mt.createElement("video",{controls:!0,src:`${bt}`,autoPlay:!0}):mt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${bt}`,autoPlay:!0})),jt==="office"&&ce&&mt.createElement("iframe",{src:`${le}/office.html?key=${ce.key}&url=${btoa(ce.url)}&callbackUrl=${Ce+(ce.callbackUrl||"")}&fileType=${ce.fileType}&title=${ce.title||""}&model=${dt}&officeServer=${yt.Z.ONLYOFFICE}&disabledDownload=${!!se}`}),jt==="html"&&mt.createElement("iframe",{src:bt+"&disposition=inline"}),jt==="pdf"&&mt.createElement("iframe",{id:"pdfiframe",src:`${le}/js/pdfview/index.html?filename=${Nt||"educoder.pdf"}&url=${encodeURIComponent(bt)}&disabledDownload=${!!se}&model=${dt}`}),jt==="image"&&mt.createElement("img",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${bt}`}),(jt==="other"||jt==="download")&&mt.createElement(mt.Fragment,null,be?mt.createElement(Ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:mt.createElement(ot.ZP,{icon:mt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:wt,disabled:se},"\u4E0B\u8F7D")}):mt.createElement(ot.ZP,{type:"primary",size:"middle",onClick:wt,disabled:se},mt.createElement(zt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},31457:function(pn,dn,ue){"use strict";ue.d(dn,{h:function(){return z},x:function(){return tt}});var ae=ue(39793),Re=ue(8423),ot=ue(76902),zt=ue(59301),Bt=Object.defineProperty,vt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,Tt=(at,it,lt)=>it in at?Bt(at,it,{enumerable:!0,configurable:!0,writable:!0,value:lt}):at[it]=lt,mt=(at,it)=>{for(var lt in it||(it={}))Ct.call(it,lt)&&Tt(at,lt,it[lt]);if(kt)for(var lt of kt(it))yt.call(it,lt)&&Tt(at,lt,it[lt]);return at},xt=(at,it)=>vt(at,gt(it)),ft=(at,it)=>{var lt={};for(var ut in at)Ct.call(at,ut)&&it.indexOf(ut)<0&&(lt[ut]=at[ut]);if(at!=null&&kt)for(var ut of kt(at))it.indexOf(ut)<0&&yt.call(at,ut)&&(lt[ut]=at[ut]);return lt};const z=at=>{var it=at,{value:lt,onChange:ut,scrollId:dt}=it,bt=ft(it,["value","onChange","scrollId"]);return zt.createElement("div",{id:dt||""},zt.createElement(ae.Z,xt(mt({},bt),{defaultValue:lt,onChange:(At,Dt)=>{Dt!=null&&Dt.length?ut(At,Dt):ut(At)}})))},tt=({value:at,onChange:it,placeholder:lt,height:ut=140,isEdit:dt,miniToolbar:bt,watch:At=!0})=>dt?zt.createElement(ae.Z,{watch:At,isFocus:!0,height:ut||void 0,placeholder:lt,defaultValue:at,onChange:it,miniToolbar:bt}):zt.createElement("div",{style:{cursor:"pointer"}},at?zt.createElement(ot.Z,{className:Re.Z.inputBorder,value:at}):zt.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},lt))},76902:function(pn,dn,ue){"use strict";ue.d(dn,{z:function(){return Ft},Z:function(){return jt}});var ae=ue(59301),Re=ue(8944),ot=ue(81428),zt=ue(64018),Bt=ue(81168),vt=ue(346),gt=ue(51257),kt=ue(15342),Ct=ue(1012),yt=ue(45677),Tt=ue(59301),xt=({html:Nt})=>{const _t=(0,ae.useRef)(null),Wt=(0,ae.useRef)(null),Jt=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,ae.useEffect)(()=>{const Ut=_t.current.attachShadow({mode:"open"});Wt.current=document.createElement("div"),Wt.current.className="markdown-body",Wt.current.innerHTML=Nt,Ut.appendChild(Wt.current);const Vt=document.createElement("style");return Vt.textContent=Jt,Ut.appendChild(Vt),()=>{Ut.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Wt.current&&(Wt.current.innerHTML=Nt)},[Nt]),Tt.createElement("div",{ref:_t})};function ft(Nt){const _t=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Wt=new RegExp(`\\b(${_t.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Nt.replace(Wt,"").trim()}var z=Object.defineProperty,tt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,lt=(Nt,_t,Wt)=>_t in Nt?z(Nt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Nt[_t]=Wt,ut=(Nt,_t)=>{for(var Wt in _t||(_t={}))at.call(_t,Wt)&&lt(Nt,Wt,_t[Wt]);if(tt)for(var Wt of tt(_t))it.call(_t,Wt)&&lt(Nt,Wt,_t[Wt]);return Nt};const dt="@\u2581\u2581@",bt="@\u2581@",At=/<pre[^>]*>/g;function Dt(Nt){let _t=document.createElement("div");return _t.innerHTML=Nt,_t.childNodes.length===0?"":_t.childNodes[0].nodeValue}const Ft=(Nt,_t)=>{Nt=Nt||"";const Wt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Jt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ut=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Vt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return _t?Nt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Wt,(oe,se,he,be,Yt,ne,ve)=>{const Se=se||be||ne,we=he||Yt||ve||"?";return vt.Z.API_SERVER+"/api/attachments/"+Se+we+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Nt=Nt.replace(Vt,(oe,se,he,be,Yt,ne,ve)=>{const Se=se||be||ne,we=he||Yt||ve||"?";return vt.Z.API_SERVER+"/attachments/download/"+Se+we+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Wt,(oe,se,he,be,Yt,ne,ve)=>{const Se=se||be||ne,we=he||Yt||ve||"?";return vt.Z.API_SERVER+"/api/attachments/"+Se+we+"&t="+(0,gt.Jn)(Se,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Jt,(oe,se,he,be,Yt)=>{const ne=se||be,ve=he||Yt||"";return'"'+vt.Z.API_SERVER+"/api/attachments/"+ne+ve+ne+ve+"&t="+(0,gt.Jn)(ne,Date.now())}).replace(Ut,(oe,se,he,be,Yt)=>{const ne=se||be,ve=he||Yt||"";return"("+vt.Z.API_SERVER+"/files/uploads/"+ne+ve+ne+ve+"&t="+(0,gt.Jn)(ne,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,`
`),Nt)};var jt=({value:Nt="",className:_t,showTextOnly:Wt,showLines:Jt,style:Ut={},stylesPrev:Vt={},highlightKeywords:oe,showProgramFill:se,isProgramFill:he,disabledFill:be=!1,programFillValue:Yt,onFillChange:ne=we=>{},onFillBlur:ve=()=>{},onFillFocus:Se=()=>{}})=>{let we=ft(String(Nt||""));const[ce,de]=(0,ae.useState)(""),[le,Ce]=(0,ae.useState)("office"),[fe,me]=(0,ae.useState)([]),ke=(0,ae.useRef)("a"+(0,Ct.Z)()),pe={},qt=Ae=>/<style[\s\S]*?>/i.test(Ae||""),Kt=(Ae,Oe,Ie)=>{const Qe=document.createElement(Ae===bt?"input":"textarea");Qe.style.width="100%",Qe.style.height=Ae===bt?"40px":"151px",Qe.rows=5,Qe.spellcheck=!1,Qe.name="edu-program-fill",Qe.placeholder="\u8BF7\u8F93\u5165",Qe.dataset.id=Oe;const qe=Object.keys(pe).length;return pe[qe]=Qe,`<span class="edu-program-fill-wrap ${Ae===bt?"":"show"}" style="width:${Ae===bt?"600px":"100%"}" title=${Ie||""}><span>${Qe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function wt(Ae){return Ae=Ae.replace(/!\[.*?\]\(.*?\)/g,""),Ae=Ae.replace(/\[.*?\]\(.*?\)/g,""),Ae=Ae.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ae=Ae.replace(/<embed.*?>/g,""),Ae=Ae.replace(/<img.*?>/g,""),Ae=Ae.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ae=Ae.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ae=Ae.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ae=Ae.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ae}const Lt=Ae=>!Wt&&qt(we)?Ae:Ae.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Oe,Ie){let Qe=Ie.replace(/(\n|\r)/g,"").split("}"),qe=[];return Qe.map(nn=>{nn!=""&&qe.push(`.${ke.current} ${nn}`)}),`<style>${qe.join("}")}</style>`}),Zt=(0,ae.useMemo)(()=>{try{const Qe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,qe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ke=/\(\/attachments\/download\//g;we=we.replace(Ke,"("+vt.Z.API_SERVER+"/attachments/download/").replace(Qe,"("+vt.Z.API_SERVER+"/api/attachments/").replace(qe,'"'+vt.Z.API_SERVER+"/api/attachments/").replace(nn,'"'+vt.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(Qe){}if(se){let Qe=-1;return we=we.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(qe,nn,Ke){var Ue;return++Qe,Kt(qe,Qe,(Ue=Yt==null?void 0:Yt[Qe])==null?void 0:Ue.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Lt(we||"")}</pre>`}let Ae=Lt(we);Ae=(0,ot.ZP)(Ae);const Oe=(0,ot.ez)();we.match(/\[TOC\]/)&&(Ae=Ae.replace("<p>[TOC]</p>",(0,ot.Qv)()),(0,ot.Iy)()),Ae=Ae.replace(/(__special_katext_id_\d+__)/g,(Qe,qe)=>{const{type:nn,expression:Ke}=Oe[qe];return(0,kt.renderToString)(Dt(Ke)||"",{displayMode:nn==="block",throwOnError:!1,output:"html"})}),Ae=Ae.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ot.AL)();const Ie=document.createElement("div");if(Ie.innerHTML=Ae,Wt)return Ie.innerText;if(oe){const Qe=oe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ht(Ie,Qe),Ie.innerHTML}return setTimeout(()=>Pe(),500),Ie.innerHTML},[we,oe]);(0,ae.useEffect)(()=>{re.current&&re.current.querySelectorAll(["input","textarea"]).forEach(Oe=>{Oe.oninput=ee,Oe.onblur=It,Oe.onfocus=Rt})},[fe]),(0,ae.useEffect)(()=>{var Ae,Oe,Ie,Qe,qe;if(Yt!=null&&Yt.length)try{const nn=re.current.querySelectorAll(".edu-program-fill-score"),Ke=re.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ue,We]of Ke.entries())We.value=((Ae=Yt==null?void 0:Yt[Ue])==null?void 0:Ae.value)||"",((Oe=Yt==null?void 0:Yt[Ue])==null?void 0:Oe.type)==="warning"?We.className="program-fill-warning":((Ie=Yt==null?void 0:Yt[Ue])==null?void 0:Ie.type)==="success"?We.className="program-fill-success":We.className="";for(const[Ue,We]of nn.entries())We.innerHTML=(Qe=Yt==null?void 0:Yt[Ue])!=null&&Qe.score?`${(qe=Yt==null?void 0:Yt[Ue])==null?void 0:qe.score}\u5206`:"";me(Yt)}catch(nn){console.log(nn,"error")}},[Yt]);const ee=Ae=>{fe[Ae.target.dataset.id]=fe[Ae.target.dataset.id]||{},fe[Ae.target.dataset.id].value=Ae.target.value,me([...fe]),ne(fe,Ae.target.dataset.id)},It=Ae=>{fe[Ae.target.dataset.id]=fe[Ae.target.dataset.id]||{},fe[Ae.target.dataset.id].value=Ae.target.value,me([...fe]),ve(fe,Ae.target.dataset.id)},Rt=Ae=>{fe[Ae.target.dataset.id]=fe[Ae.target.dataset.id]||{},fe[Ae.target.dataset.id].value=Ae.target.value,me([...fe]),Se(fe,Ae.target.dataset.id)};function Ht(Ae,Oe){return Ae.childNodes.forEach(Ie=>{var Qe;if(Ie.childNodes.length>0)Ht(Ie,Oe);else if(Ie.nodeName!=="IMG")if(Ie.innerHTML)Ie.innerHTML=(Qe=Ie.innerHTML)==null?void 0:Qe.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const qe=document.createElement("span");qe.innerHTML=Ie.textContent.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ie.replaceWith(qe)}})}const re=(0,ae.useRef)();ot.jb.WebkitLineClamp=Jt,Jt&&(Ut=ut(ut({},Ut),ot.jb));function ye(Ae){let Oe=Ae.target;if(Oe.tagName.toUpperCase()==="A"){let Ie=Oe.getAttribute("href");if(Ie.indexOf("office")>-1)Ae.preventDefault(),de(Ie),Ce("office");else if(Ie.indexOf("application/pdf")>-1)Ae.preventDefault(),de(Ie),Ce("pdf");else if(Ie.indexOf("text/html")>-1)Ae.preventDefault(),de(Ie),Ce("html");else if(Ie.startsWith("#")){Ae.preventDefault();let Qe=document.getElementById(Ie.replace("#",""));Qe&&Qe.scrollIntoView(!0)}}}const Pe=()=>{var Ae;const Oe=(Ae=re.current)==null?void 0:Ae.querySelectorAll("video");Oe==null||Oe.forEach(Ie=>{if(Ie.oncontextmenu=()=>!1,Ie.src.indexOf(".m3u8")>-1&&!Ie.canPlayType("application/vnd.apple.mpegurl")){if(Bt.ZP.isSupported()){var Qe=new Bt.ZP;Qe.loadSource(Ie.src),Qe.attachMedia(Ie)}}})};return(0,ae.useEffect)(()=>{if(re.current&&Zt&&Zt.match(At)&&window.PR.prettyPrint(),re.current)return re.current.addEventListener("click",ye),()=>{var Ae;(Ae=re.current)==null||Ae.removeEventListener("click",ye),(0,ot.AL)(),(0,ot.Iy)()}},[Zt,re.current,ye]),(0,ae.useEffect)(()=>{var Ae;const Oe=Ie=>{Ie.preventDefault(),Ie.clipboardData.setData("text",window.getSelection().toString())};return(Ae=re.current)==null||Ae.addEventListener("copy",Oe),()=>{var Ie;(Ie=re.current)==null||Ie.removeEventListener("copy",Oe)}},[re.current]),ae.createElement(ae.Fragment,null,Wt&&ae.createElement("div",{ref:re},Zt),!Wt&&!qt(Zt)&&ae.createElement("div",{ref:re,style:ut({},Ut),className:`${_t||""} ${be?"disabled-fill":""} markdown-body ${ke.current}`,dangerouslySetInnerHTML:{__html:Zt}}),!Wt&&qt(Zt)&&ae.createElement(xt,{html:Zt}),ae.createElement(yt.Z,{close:!0,data:ce,type:ce!=null&&ce.length?le:"",style:ut({},Vt),onClose:()=>de("")}))}},16253:function(pn,dn,ue){"use strict";ue.d(dn,{cT:function(){return jt},pe:function(){return At}});var ae=ue(59301),Re=ue(14566),ot=ue(6767),zt=ue(38986),Bt=ue(28209),vt=ue.n(Bt),gt=ue(1012),kt=ue(25690),Ct=ue(47257),yt=ue.n(Ct),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(_t,Wt,Jt)=>Wt in _t?Tt(_t,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):_t[Wt]=Jt,it=(_t,Wt)=>{for(var Jt in Wt||(Wt={}))z.call(Wt,Jt)&&at(_t,Jt,Wt[Jt]);if(ft)for(var Jt of ft(Wt))tt.call(Wt,Jt)&&at(_t,Jt,Wt[Jt]);return _t},lt=(_t,Wt)=>mt(_t,xt(Wt)),ut=(_t,Wt)=>{var Jt={};for(var Ut in _t)z.call(_t,Ut)&&Wt.indexOf(Ut)<0&&(Jt[Ut]=_t[Ut]);if(_t!=null&&ft)for(var Ut of ft(_t))Wt.indexOf(Ut)<0&&tt.call(_t,Ut)&&(Jt[Ut]=_t[Ut]);return Jt},dt=(_t,Wt,Jt)=>new Promise((Ut,Vt)=>{var oe=be=>{try{he(Jt.next(be))}catch(Yt){Vt(Yt)}},se=be=>{try{he(Jt.throw(be))}catch(Yt){Vt(Yt)}},he=be=>be.done?Ut(be.value):Promise.resolve(be.value).then(oe,se);he((Jt=Jt.apply(_t,Wt)).next())});const{Dragger:bt}=Re.default,At=_t=>{const Wt="bf3c199c2470cb477d907b1e0917c17b",Jt="5183666c72eec9e4";var Ut=vt().enc.Utf8.parse(Wt);let Vt=vt().enc.Utf8.parse(Jt);var oe=vt().AES.decrypt(_t,Ut,{iv:Vt,mode:vt().mode.CBC});return oe.toString(vt().enc.Utf8)};let Dt;const Ft=_t=>dt(void 0,[_t],function*({identifier:Wt,oldFilename:Jt,newFilename:Ut}){var Vt,oe,se,he,be,Yt;const ne=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});ne.data=JSON.parse(At(ne.data));const ve=new OSS({endpoint:(Vt=ne==null?void 0:ne.data)==null?void 0:Vt.end_point,region:(oe=ne==null?void 0:ne.data)==null?void 0:oe.region,accessKeyId:(se=ne==null?void 0:ne.data)==null?void 0:se.access_key_id,accessKeySecret:(he=ne==null?void 0:ne.data)==null?void 0:he.access_key_secret,bucket:(be=ne==null?void 0:ne.data)==null?void 0:be.bucket,stsToken:(Yt=ne==null?void 0:ne.data)==null?void 0:Yt.security_token});return new Promise((Se,we)=>{console.log(11111,`${Wt}/${Jt}`,`${Wt}/${Ut}`,ne.data),ve.copy(`/${Wt}/${Jt}`,`/${Wt}/${Ut}`).then(ce=>{console.log("\u62F7\u8D1D\u6210\u529F",ce)}).catch(ce=>{console.log(ce)})})}),jt=(_t,Wt,Jt)=>dt(void 0,null,function*(){var Ut,Vt,oe,se,he,be;Wt.file_name=_t.name;const Yt=yield(0,zt.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",At(Yt.data)),Yt.data=JSON.parse(At(Yt.data));const ne=_t.name.split(".");ne.pop();const ve=Wt.realFileName?ne.join(""):(0,gt.Z)(),Se=new(yt())({endpoint:(Ut=Yt==null?void 0:Yt.data)==null?void 0:Ut.end_point,region:(Vt=Yt==null?void 0:Yt.data)==null?void 0:Vt.region,accessKeyId:(oe=Yt==null?void 0:Yt.data)==null?void 0:oe.access_key_id,accessKeySecret:(se=Yt==null?void 0:Yt.data)==null?void 0:se.access_key_secret,bucket:(he=Yt==null?void 0:Yt.data)==null?void 0:he.bucket,stsToken:(be=Yt==null?void 0:Yt.data)==null?void 0:be.security_token});return new Promise((we,ce)=>{var de;Se.multipartUpload(`${ve}`,new Blob([_t],{type:_t.type}),lt(it({timeout:200*1e3,partSize:102400},Jt),{callback:{url:(de=Yt==null?void 0:Yt.data)==null?void 0:de.callback_url,host:Yt==null?void 0:Yt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,zt.rz)(Wt)}})).then(function(le){var Ce;_t.response=(Ce=le.data)==null?void 0:Ce.data,we(le==null?void 0:le.data)}).catch(function(le){ce(le),console.log("err:",le)})})}),Nt=_t=>{var Wt=_t,{user:Jt,cancelUpload:Ut}=Wt,Vt=ut(Wt,["user","cancelUpload"]);const[oe,se]=(0,ae.useState)([]);let[he,be]=(0,ae.useState)();const Yt={onRemove:ve=>{se([...oe.filter(Se=>Se.name!==ve.name)]),Vt.onChange(oe.filter(Se=>Se.name!==ve.name))},disabled:Vt.disabled,multiple:!0,fileList:oe==null?void 0:oe.map(ve=>ve.file),customRequest:()=>{},beforeUpload:ve=>dt(void 0,null,function*(){let Se=Vt.maxSize||1073741824;if(oe.filter(we=>we.name===ve.name).length){ot.ZP.info(`${ve.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(ve==null?void 0:ve.size)>Se?(ot.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Se/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(oe.push({name:ve.name,file:ve}),se([...oe]),Vt.onChange(oe),!1)})},ne=(ve,Se)=>dt(void 0,null,function*(){var we,ce,de,le,Ce,fe;Se.file_name=ve.name;const me=ve.name,ke=yield(0,zt.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(ke.data=JSON.parse(At(ke.data)),(ke==null?void 0:ke.status)!==0){oe[oe.findIndex(Kt=>Kt.name===me)].status="error",oe[oe.findIndex(Kt=>Kt.name===me)].file.status="error",Vt.onChange(oe),ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}he=new(yt())({endpoint:(we=ke==null?void 0:ke.data)==null?void 0:we.end_point,region:(ce=ke==null?void 0:ke.data)==null?void 0:ce.region,accessKeyId:(de=ke==null?void 0:ke.data)==null?void 0:de.access_key_id,accessKeySecret:(le=ke==null?void 0:ke.data)==null?void 0:le.access_key_secret,bucket:(Ce=ke==null?void 0:ke.data)==null?void 0:Ce.bucket,stsToken:(fe=ke==null?void 0:ke.data)==null?void 0:fe.security_token}),console.log(ve,"file"),be(he);const pe=ve.name.split(".");pe.pop();const qt=me.indexOf(".")>-1?Se.realFileName?pe.join("."):(0,gt.Z)():me;return new Promise((Kt,wt)=>{var Lt;try{he.multipartUpload(`${Vt.identifier}/${qt}${me.indexOf(".")>-1?"."+me.split(".").pop():""}`,new Blob([ve.file],{type:ve.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Zt,ee,It)=>{try{console.log("\u8FDB\u5EA6",Zt,ee,It);const Rt=oe.findIndex(Ht=>Ht.name===me);oe[Rt].file.percent=Zt*100,oe[Rt].tempCheckpoint=ee,se([...oe])}catch(Rt){}},checkpoint:oe[oe.findIndex(Zt=>Zt.name===me)].tempCheckpoint,callback:{customValue:{id:me+""},url:(Lt=ke==null?void 0:ke.data)==null?void 0:Lt.callback_url,host:ke==null?void 0:ke.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,zt.rz)(Se)}}).then(function(Zt){var ee,It,Rt;const Ht=oe.findIndex(ye=>ye.name===me);let re="done";if(((ee=Zt.data)==null?void 0:ee.status)===0){ve.response=(It=Zt.data)==null?void 0:It.data;const ye=oe.findIndex(Pe=>Pe.name===me);oe[ye].status="done",oe[ye].file.status="done"}else ot.ZP.warning((Rt=Zt.data)==null?void 0:Rt.message),re="error";oe[Ht].status=re,oe[Ht].file.status=re,Vt.onChange(oe),Kt(Zt==null?void 0:Zt.data)}).catch(function(Zt){oe[oe.findIndex(ee=>ee.name===me)].status="error",oe[oe.findIndex(ee=>ee.name===me)].file.status="error",ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),se([...oe]),Vt.onChange(oe),wt(Zt),console.log("err:",Zt)})}catch(Zt){}})});return(0,ae.useEffect)(()=>{oe.every(ve=>ve==="done"||ve==="error")&&Vt.onComplete(oe)},[oe]),(0,ae.useEffect)(()=>{Ut&&(he==null||he.cancel())},[Ut]),(0,ae.useEffect)(()=>{Vt.uploading&&oe.map(ve=>dt(void 0,null,function*(){var Se;if((!ve.status||ve.status==="error")&&!Ut){ve.status="uploading",ve.file.status="uploading";const we=yield ne(ve,{login:(Se=Jt==null?void 0:Jt.userInfo)==null?void 0:Se.login,container_type:Vt.container_type,container_id:Vt.container_id,description:Vt.description,realFileName:Vt.realFileName})}}))},[Vt.uploading]),ae.createElement(bt,lt(it({},Yt),{height:Vt.height,className:Vt.className}),ae.createElement("p",{className:"ant-upload-hint"},Vt.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};dn.ZP=(0,kt.connect)(({loading:_t,globalSetting:Wt,user:Jt})=>({globalSetting:Wt,loading:_t.models.competitions,user:Jt}))(Nt)},69720:function(pn,dn,ue){"use strict";ue.d(dn,{h:function(){return dt}});var ae=ue(59301),Re=ue(82326),ot=ue(28284),zt=ue(99571),Bt=ue(89780),vt=ue.n(Bt),gt=ue(8336),kt=ue(12469),Ct=Object.defineProperty,yt=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,z=(bt,At,Dt)=>At in bt?Ct(bt,At,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):bt[At]=Dt,tt=(bt,At)=>{for(var Dt in At||(At={}))xt.call(At,Dt)&&z(bt,Dt,At[Dt]);if(mt)for(var Dt of mt(At))ft.call(At,Dt)&&z(bt,Dt,At[Dt]);return bt},at=(bt,At)=>yt(bt,Tt(At));const it=Re.default.Option,lt={labelCol:{span:4},wrapperCol:{span:20}},ut={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"]};dn.Z=({callback:bt,onCancel:At})=>{const[Dt,Ft]=(0,ae.useState)("python");function jt(_t){Ft(ut[_t][1])}function Nt(_t){bt(_t)}return ae.createElement(ot.default,at(tt({},lt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Nt,style:{width:500}}),ae.createElement(ot.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ae.createElement(Re.default,{getPopupContainer:_t=>_t.parentNode,onChange:jt},Object.keys(ut).map(_t=>ae.createElement(it,{key:_t,value:_t},ut[_t][0])))),ae.createElement(ot.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ae.createElement(dt,{mode:Dt})),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(zt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(zt.ZP,{type:"ghost",onClick:At},"\u53D6\u6D88")))};function dt({value:bt,onChange:At,mode:Dt,options:Ft={}}){const jt=(0,ae.useRef)(),[Nt,_t]=(0,ae.useState)();return(0,ae.useEffect)(()=>{if(Nt){let Wt=function(Jt){const Ut=Jt.getValue();At&&At(Ut)};return Nt.on("change",Wt),()=>{Nt.off("change",Wt)}}},[Nt,At]),(0,ae.useEffect)(()=>{Nt&&Nt.setOption("mode",Dt)},[Nt,Dt]),(0,ae.useEffect)(()=>{Nt&&(bt!==Nt.getValue()||bt==="")&&setTimeout(()=>{Nt.setValue(bt||"")},300)},[Nt,bt]),(0,ae.useEffect)(()=>{if(jt.current&&!Nt){const Wt=vt().fromTextArea(jt.current,tt({mode:Dt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Ft));_t(Wt)}},[jt.current,Nt]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:jt}))}},39793:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return Ar}});var ae=ue(59301),Re=ue(89780),ot=ue.n(Re),zt=ue(76374),Bt=ue(8336),vt=ue(6313),gt=ue(25717),kt=ue(99498),Ct=ue(25419),yt=ue(67549),Tt=ue(76902),mt=({value:sn="",className:tn,showTextOnly:Ye,showLines:hn,style:nr={}})=>{const Zn=(0,ae.useMemo)(()=>"",[sn]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:Zn}}))},xt=Object.defineProperty,ft=Object.defineProperties,z=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,lt=(sn,tn,Ye)=>tn in sn?xt(sn,tn,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):sn[tn]=Ye,ut=(sn,tn)=>{for(var Ye in tn||(tn={}))at.call(tn,Ye)&&lt(sn,Ye,tn[Ye]);if(tt)for(var Ye of tt(tn))it.call(tn,Ye)&&lt(sn,Ye,tn[Ye]);return sn},dt=(sn,tn)=>ft(sn,z(tn));let bt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function At({onActionCallback:sn,title:tn,icon:Ye,actionName:hn,className:nr="",children:Zn}){function mr(){sn(hn)}return ae.createElement("a",{title:tn,className:nr,onClick:mr},ae.createElement("i",{className:`${Ye}`}),Zn)}var Dt=({watch:sn,showNullButton:tn,showNullProgramButton:Ye,onActionCallback:hn,fullScreen:nr,insertTemp:Zn,hidetoolBar:mr,extraUse:an})=>{const mn=[...bt,{title:`${sn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${sn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ae.createElement("ul",{className:"markdown-toolbar-container"},!mr&&mn.map(($n,fr)=>ae.createElement("li",{key:fr},$n.actionName?ae.createElement(At,dt(ut({},$n),{onActionCallback:hn})):ae.createElement("span",{className:"v-line"}))),tn?ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:hn},ae.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ye?ae.createElement(ae.Fragment,null,ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:hn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:hn},ae.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Zn&&ae.createElement("li",null,ae.createElement(At,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Zn}`,onActionCallback:hn},ae.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),an&&ae.createElement("li",null,an),ae.createElement("li",{className:"btn-full-screen"},ae.createElement(At,{icon:`${nr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:nr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:hn})))},Ft=ue(91558),jt=ue(28284),Nt=ue(37568),_t=ue(99571),Wt=Object.defineProperty,Jt=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,he=(sn,tn,Ye)=>tn in sn?Wt(sn,tn,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):sn[tn]=Ye,be=(sn,tn)=>{for(var Ye in tn||(tn={}))oe.call(tn,Ye)&&he(sn,Ye,tn[Ye]);if(Vt)for(var Ye of Vt(tn))se.call(tn,Ye)&&he(sn,Ye,tn[Ye]);return sn},Yt=(sn,tn)=>Jt(sn,Ut(tn));const ne={labelCol:{span:4},wrapperCol:{span:20}};var ve=({callback:sn,onCancel:tn})=>{function Ye(hn){sn(hn)}return ae.createElement(jt.default,Yt(be({},ne),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ye,style:{width:500}}),ae.createElement(jt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(Nt.default,null)),ae.createElement(jt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(Nt.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(_t.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},Se=ue(69720),we=ue(17077),ce=ue(62957),de=ue(77019),le=ue(9507),Ce=ue(59301),fe=({callback:sn,onCancel:tn})=>{const Ye=document.createElement("canvas"),hn=Ye.getContext("2d");Ye.width=1e3,Ye.height=800,hn.fillStyle="#ffffff",hn.fillRect(0,0,Ye.width,Ye.height);const nr=Ye.toDataURL("image/png");return Ce.createElement(ce.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ce.createElement(de.Z,{style:{height:"100vh"}},Ce.createElement(le.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:nr,visible:!0,title:String(Date.now())},onOk:Zn=>{sn({src:Zn.url})},onClose:tn})))},me=ue(12378);function ke(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ke,go.CommandHandler),ke.prototype.canAlignSelection=function(){var sn=this.diagram;return!(sn===null||sn.isReadOnly||sn.isModelReadOnly||sn.selection.count<2)},ke.prototype.alignLeft=function(){var sn=this.diagram;sn.startTransaction("aligning left");var tn=1/0;sn.selection.each(function(Ye){Ye instanceof go.Link||(tn=Math.min(Ye.position.x,tn))}),sn.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(tn,Ye.position.y))}),sn.commitTransaction("aligning left")},ke.prototype.alignRight=function(){var sn=this.diagram;sn.startTransaction("aligning right");var tn=-1/0;sn.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var hn=Ye.actualBounds.x+Ye.actualBounds.width;tn=Math.max(hn,tn)}}),sn.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(tn-Ye.actualBounds.width,Ye.position.y))}),sn.commitTransaction("aligning right")},ke.prototype.alignTop=function(){var sn=this.diagram;sn.startTransaction("alignTop");var tn=1/0;sn.selection.each(function(Ye){Ye instanceof go.Link||(tn=Math.min(Ye.position.y,tn))}),sn.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.position.x,tn))}),sn.commitTransaction("alignTop")},ke.prototype.alignBottom=function(){var sn=this.diagram;sn.startTransaction("aligning bottom");var tn=-1/0;sn.selection.each(function(Ye){if(!(Ye instanceof go.Link)){var hn=Ye.actualBounds.y+Ye.actualBounds.height;tn=Math.max(hn,tn)}}),sn.selection.each(function(Ye){Ye instanceof go.Link||Ye.move(new go.Point(Ye.actualBounds.x,tn-Ye.actualBounds.height))}),sn.commitTransaction("aligning bottom")},ke.prototype.alignCenterX=function(){var sn=this.diagram,tn=sn.selection.first();if(tn){sn.startTransaction("aligning Center X");var Ye=tn.actualBounds.x+tn.actualBounds.width/2;sn.selection.each(function(hn){hn instanceof go.Link||hn.move(new go.Point(Ye-hn.actualBounds.width/2,hn.actualBounds.y))}),sn.commitTransaction("aligning Center X")}},ke.prototype.alignCenterY=function(){var sn=this.diagram,tn=sn.selection.first();if(tn){sn.startTransaction("aligning Center Y");var Ye=tn.actualBounds.y+tn.actualBounds.height/2;sn.selection.each(function(hn){hn instanceof go.Link||hn.move(new go.Point(hn.actualBounds.x,Ye-hn.actualBounds.height/2))}),sn.commitTransaction("aligning Center Y")}},ke.prototype.alignColumn=function(sn){var tn=this.diagram;tn.startTransaction("align Column"),sn===void 0&&(sn=0),sn=parseFloat(sn);var Ye=new Array;tn.selection.each(function(an){an instanceof go.Link||Ye.push(an)});for(var hn=0;hn<Ye.length-1;hn++){var nr=Ye[hn],Zn=nr.actualBounds.y+nr.actualBounds.height+sn,mr=Ye[hn+1];mr.move(new go.Point(nr.actualBounds.x,Zn))}tn.commitTransaction("align Column")},ke.prototype.alignRow=function(sn){sn===void 0&&(sn=0),sn=parseFloat(sn);var tn=this.diagram;tn.startTransaction("align Row");var Ye=new Array;tn.selection.each(function(an){an instanceof go.Link||Ye.push(an)});for(var hn=0;hn<Ye.length-1;hn++){var nr=Ye[hn],Zn=nr.actualBounds.x+nr.actualBounds.width+sn,mr=Ye[hn+1];mr.move(new go.Point(Zn,nr.actualBounds.y))}tn.commitTransaction("align Row")},ke.prototype.canRotate=function(sn){var tn=this.diagram;return!(tn===null||tn.isReadOnly||tn.isModelReadOnly||tn.selection.count<1)},ke.prototype.rotate=function(sn){sn===void 0&&(sn=90);var tn=this.diagram;tn.startTransaction("rotate "+sn.toString());var tn=this.diagram;tn.selection.each(function(Ye){Ye instanceof go.Link||Ye instanceof go.Group||(Ye.angle+=sn)}),tn.commitTransaction("rotate "+sn.toString())},ke.prototype.pullToFront=function(){var sn=this.diagram;sn.startTransaction("pullToFront");var tn=new go.Map;sn.selection.each(function(Ye){tn.set(Ye.layer,0)}),tn.iteratorKeys.each(function(Ye){var hn=0;Ye.parts.each(function(nr){if(!nr.isSelected){var Zn=nr.zOrder;isNaN(Zn)?nr.zOrder=0:hn=Math.max(hn,Zn)}}),tn.set(Ye,hn)}),sn.selection.each(function(Ye){ke._assignZOrder(Ye,tn.get(Ye.layer)+1)}),sn.commitTransaction("pullToFront")},ke.prototype.pushToBack=function(){var sn=this.diagram;sn.startTransaction("pushToBack");var tn=new go.Map;sn.selection.each(function(Ye){tn.set(Ye.layer,0)}),tn.iteratorKeys.each(function(Ye){var hn=0;Ye.parts.each(function(nr){if(!nr.isSelected){var Zn=nr.zOrder;isNaN(Zn)?nr.zOrder=0:hn=Math.min(hn,Zn)}}),tn.set(Ye,hn)}),sn.selection.each(function(Ye){ke._assignZOrder(Ye,tn.get(Ye.layer)-1-ke._findGroupDepth(Ye))}),sn.commitTransaction("pushToBack")},ke._assignZOrder=function(sn,tn,Ye){Ye===void 0&&(Ye=sn),sn.layer===Ye.layer&&(sn.zOrder=tn),sn instanceof go.Group&&sn.memberParts.each(function(hn){ke._assignZOrder(hn,tn+1,Ye)})},ke._findGroupDepth=function(sn){if(sn instanceof go.Group){var tn=0;return sn.memberParts.each(function(Ye){tn=Math.max(tn,ke._findGroupDepth(Ye))}),tn+1}else return 0},ke.prototype.doKeyDown=function(){var sn=this.diagram;if(sn!==null){var tn=sn.lastInput;if(tn.key==="Up"||tn.key==="Down"||tn.key==="Left"||tn.key==="Right"){var Ye=this.arrowKeyBehavior;if(Ye==="none")return;if(Ye==="select"){this._arrowKeySelect();return}else if(Ye==="move"){this._arrowKeyMove();return}else if(Ye==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},ke.prototype._getAllParts=function(){var sn=new Array;return this.diagram.nodes.each(function(tn){sn.push(tn)}),this.diagram.parts.each(function(tn){sn.push(tn)}),sn},ke.prototype._arrowKeyMove=function(){var sn=this.diagram,tn=sn.lastInput,Ye=0,hn=0;if(tn.control||tn.meta)Ye=1,hn=1;else if(sn.grid!==null){var nr=sn.grid.gridCellSize;hn=nr.width,Ye=nr.height}sn.startTransaction("arrowKeyMove"),sn.selection.each(function(Zn){tn.key==="Up"?Zn.move(new go.Point(Zn.actualBounds.x,Zn.actualBounds.y-Ye)):tn.key==="Down"?Zn.move(new go.Point(Zn.actualBounds.x,Zn.actualBounds.y+Ye)):tn.key==="Left"?Zn.move(new go.Point(Zn.actualBounds.x-hn,Zn.actualBounds.y)):tn.key==="Right"&&Zn.move(new go.Point(Zn.actualBounds.x+hn,Zn.actualBounds.y))}),sn.commitTransaction("arrowKeyMove")},ke.prototype._arrowKeySelect=function(){var sn=this.diagram,tn=sn.lastInput,Ye=null;tn.key==="Up"?Ye=this._findNearestPartTowards(270):tn.key==="Down"?Ye=this._findNearestPartTowards(90):tn.key==="Left"?Ye=this._findNearestPartTowards(180):tn.key==="Right"&&(Ye=this._findNearestPartTowards(0)),Ye!==null&&(tn.shift?Ye.isSelected=!0:tn.control||tn.meta?Ye.isSelected=!Ye.isSelected:sn.select(Ye))},ke.prototype._findNearestPartTowards=function(sn){var tn=this.diagram.selection.first();if(tn===null)return null;for(var Ye=tn.actualBounds.center,hn=this._getAllParts(),nr=1/0,Zn=tn,mr=0;mr<hn.length;mr++){var an=hn[mr];if(an!==tn&&an.canSelect()){var mn=an.actualBounds.center,$n=Ye.directionPoint(mn),fr=this._angleCloseness($n,sn);if(fr<=45){var Mn=Ye.distanceSquaredPoint(mn);Mn*=1+Math.sin(fr*Math.PI/180),Mn<nr&&(nr=Mn,Zn=an)}}}return Zn},ke.prototype._angleCloseness=function(sn,tn){return Math.min(Math.abs(tn-sn),Math.min(Math.abs(tn+360-sn),Math.abs(tn-360-sn)))},ke.prototype._arrowKeyTree=function(){var sn=this.diagram,tn=sn.selection.first();if(tn instanceof go.Node){var Ye=sn.lastInput;if(Ye.key==="Right"){if(!tn.isTreeLeaf)if(!tn.isTreeExpanded)sn.commandHandler.canExpandTree(tn)&&sn.commandHandler.expandTree(tn);else{var hn=this._sortTreeChildrenByY(tn).first();hn!==null&&sn.select(hn)}}else if(Ye.key==="Left")if(!tn.isTreeLeaf&&tn.isTreeExpanded)sn.commandHandler.canCollapseTree(tn)&&sn.commandHandler.collapseTree(tn);else{var nr=tn.findTreeParentNode();nr!==null&&sn.select(nr)}else if(Ye.key==="Up"){var nr=tn.findTreeParentNode();if(nr!==null){var Zn=this._sortTreeChildrenByY(nr),mr=Zn.indexOf(tn);if(mr>0){for(var an=Zn.elt(mr-1);an!==null&&an.isTreeExpanded&&!an.isTreeLeaf;){var mn=this._sortTreeChildrenByY(an);an=mn.last()}an!==null&&sn.select(an)}else sn.select(nr)}}else if(Ye.key==="Down")if(tn.isTreeExpanded&&!tn.isTreeLeaf){var hn=this._sortTreeChildrenByY(tn).first();hn!==null&&sn.select(hn)}else for(;tn!==null;){var nr=tn.findTreeParentNode();if(nr===null)break;var Zn=this._sortTreeChildrenByY(nr),mr=Zn.indexOf(tn);if(mr<Zn.length-1){sn.select(Zn.elt(mr+1));break}else tn=nr}var $n=sn.selection.first();$n!==null&&sn.scrollToRect($n.actualBounds)}},ke.prototype._sortTreeChildrenByY=function(sn){var tn=new go.List().addAll(sn.findTreeChildrenNodes());return tn.sort(function(Ye,hn){var nr=Ye.location,Zn=hn.location;return nr.y<Zn.y?-1:nr.y>Zn.y?1:nr.x<Zn.x?-1:nr.x>Zn.x?1:0}),tn},ke.prototype.copyToClipboard=function(sn){go.CommandHandler.prototype.copyToClipboard.call(this,sn),this._lastPasteOffset.set(this.pasteOffset)},ke.prototype.pasteFromClipboard=function(){var sn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(sn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),sn},Object.defineProperty(ke.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(sn){if(sn!=="move"&&sn!=="select"&&sn!=="scroll"&&sn!=="tree"&&sn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+sn);this._arrowKeyBehavior=sn}}),Object.defineProperty(ke.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(sn){if(!(sn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+sn);this._pasteOffset.set(sn)}});var pe=ke,qt=ue(63720),Kt=ue(5269),wt=ue(38986),Lt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Zt=ue(48790),ee=ue(59301),It=(sn,tn,Ye)=>new Promise((hn,nr)=>{var Zn=mn=>{try{an(Ye.next(mn))}catch($n){nr($n)}},mr=mn=>{try{an(Ye.throw(mn))}catch($n){nr($n)}},an=mn=>mn.done?hn(mn.value):Promise.resolve(mn.value).then(Zn,mr);an((Ye=Ye.apply(sn,tn)).next())});function Rt({onCancel:sn,callback:tn}){let Ye=(0,ae.useRef)(),hn=(0,ae.useRef)(),nr=(0,ae.useRef)(),Zn=(0,ae.useRef)(!1);const mr=(0,ae.useRef)(!1),[an,mn]=(0,ae.useState)(0);function $n(){const Mn=me.bx.make,je={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"};Ye.current=new me.S0(hn.current,{padding:20,grid:Mn(me.s_,"Grid",Mn(me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Mn(me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Je=>{var cr=Je.diagram.commandHandler.addTopLevelParts(Je.diagram.selection,!0);cr||Je.diagram.currentTool.doCancel()},commandHandler:Mn(pe),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Je=>{var cr=Je.subject;cr.location=cr.location.copy().snapToGridPoint(Je.diagram.grid.gridOrigin,Je.diagram.grid.gridCellSize),setTimeout(()=>{Je.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Je=>{var cr=Je.subject;setTimeout(()=>{Je.diagram.commandHandler.editTextBlock()})},LinkRelinked:Je=>{var cr=Je.parameter.part;cr.invalidateConnectedLinks();var _r=Je.subject;Je.diagram.toolManager.linkingTool.isForwards?_r.toNode.invalidateConnectedLinks():_r.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ye.current.nodeTemplate=Mn(me.NB,"Auto",{locationSpot:me.z6.Center,locationObjectName:"SHAPE",desiredSize:new me.$u(120,60),minSize:new me.$u(40,40),resizable:!0,resizeCellSize:new me.$u(10,10),rotatable:!0},new me.KX("location","loc",me.E9.parse).makeTwoWay(me.E9.stringify),new me.KX("desiredSize","size",me.$u.parse).makeTwoWay(me.$u.stringify),Mn(me.bn,{name:"SHAPE",fill:je.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:me.z6.AllSides,toSpot:me.z6.AllSides},new me.KX("figure"),new me.KX("fill"),new me.KX("stroke","borderColor"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),Mn(me.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Mn(me.al,{margin:1,textAlign:"center",overflow:me.al.OverflowEllipsis,editable:!0},new me.KX("text").makeTwoWay(),new me.KX("stroke","color"))),Ye.current.nodeTemplate.toolTip=Mn("ToolTip",Mn(me.s_,"Vertical",{maxSize:new me.$u(200,NaN)},Mn(me.al,{font:"bold 10pt sans-serif",textAlign:"center"},new me.KX("text")),Mn(me.al,{font:"10pt sans-serif",textAlign:"center"},new me.KX("text","details"))));function Ve(Je,cr){var _r=(ir,oi)=>{ir.handled=!0,ir.diagram.model.commit(Jr=>{var ni=oi.part.adornedPart,Kr=new me.E9().setRectSpot(ni.actualBounds,Je);Kr.subtract(ni.location),Kr.scale(2,2),Kr.x+=Math.sign(Kr.x)*130,Kr.y+=Math.sign(Kr.y)*130,Kr.add(ni.location),Kr.snapToGridPoint(ir.diagram.grid.gridOrigin,ir.diagram.grid.gridCellSize);var $r=Jr.copyNodeData(ni.data);Jr.setGroupKeyForNodeData($r,Jr.getGroupKeyForNodeData(ni.data)),Jr.addNodeData($r);var hi={from:ni.key,to:Jr.getKeyForNodeData($r)};Jr.addLinkData(hi);var yn=ir.diagram.findNodeForData($r);yn.location=Kr,ir.diagram.select(yn),setTimeout(()=>{ir.diagram.commandHandler.editTextBlock()},20)})};return Mn(me.bn,{figure:cr,alignment:Je,alignmentFocus:Je.opposite(),width:Je.equals(me.z6.Top)||Je.equals(me.z6.Bottom)?25:18,height:Je.equals(me.z6.Top)||Je.equals(me.z6.Bottom)?18:25,fill:"orange",stroke:je.white,strokeWidth:4,mouseEnter:(ir,oi)=>oi.fill="dodgerblue",mouseLeave:(ir,oi)=>oi.fill="orange",isActionable:!0,click:_r,contextClick:_r})}function An(Je){return Mn(me.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:(cr,_r)=>_r.fill="dodgerblue",mouseLeave:(cr,_r)=>_r.fill="orange",click:(cr,_r)=>{cr.diagram.commandHandler.showContextMenu(_r.part.adornedPart)}},Je||{})}Ye.current.nodeTemplate.selectionAdornmentTemplate=Mn(me.uz,"Spot",Mn(me.Vm,{padding:10}),Ve(me.z6.Top,"TriangleUp"),Ve(me.z6.Left,"TriangleLeft"),Ve(me.z6.Right,"TriangleRight"),Ve(me.z6.Bottom,"TriangleDown"),An({alignment:new me.z6(.75,0)}));function En(Je,cr){return(_r,ir)=>{_r.handled=!0,_r.diagram.model.commit(oi=>{oi.set(ir.part.adornedPart.data,Je,cr)})}}function $e(Je,cr){return cr||(cr="color"),Mn(me.bn,{width:16,height:16,stroke:"lightgray",fill:Je,margin:1,background:"transparent",mouseEnter:(_r,ir)=>ir.stroke="dodgerblue",mouseLeave:(_r,ir)=>ir.stroke="lightgray",click:En(cr,Je),contextClick:En(cr,Je)})}function Tn(){return[Mn("ContextMenuButton",Mn(me.s_,"Horizontal",$e(je.white,"fill"),$e(je.beige,"fill"),$e(je.extralightblue,"fill"),$e(je.extralightred,"fill"))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",$e(je.lightgray,"fill"),$e(je.lightgreen,"fill"),$e(je.lightblue,"fill"),$e(je.lightred,"fill")))]}function Xn(){return[Mn("ContextMenuButton",Mn(me.s_,"Horizontal",$e(je.black),$e(je.green),$e(je.blue),$e(je.red))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",$e(je.white),$e(je.magenta),$e(je.purple),$e(je.orange)))]}function hr(Je,cr){return cr||(cr="thickness"),Mn(me.bn,"LineH",{width:16,height:16,strokeWidth:Je,margin:1,background:"transparent",mouseEnter:(_r,ir)=>ir.background="dodgerblue",mouseLeave:(_r,ir)=>ir.background="transparent",click:En(cr,Je),contextClick:En(cr,Je)})}function xr(Je,cr){return cr||(cr="dash"),Mn(me.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Je,margin:1,background:"transparent",mouseEnter:(_r,ir)=>ir.background="dodgerblue",mouseLeave:(_r,ir)=>ir.background="transparent",click:En(cr,Je),contextClick:En(cr,Je)})}function On(){return[Mn("ContextMenuButton",Mn(me.s_,"Horizontal",hr(1),hr(2),hr(3),hr(4))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",xr(null),xr([2,4]),xr([4,4])))]}function Fn(Je,cr){return cr||(cr="figure"),Mn(me.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Je,margin:1,background:"transparent",mouseEnter:(_r,ir)=>ir.fill="dodgerblue",mouseLeave:(_r,ir)=>ir.fill="lightgray",click:En(cr,Je),contextClick:En(cr,Je)})}Ye.current.nodeTemplate.contextMenu=Mn("ContextMenu",Mn("ContextMenuButton",Mn(me.s_,"Horizontal",Fn("Rectangle"),Fn("RoundedRectangle"),Fn("Ellipse"),Fn("Diamond"))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",Fn("Parallelogram2"),Fn("ManualOperation"),Fn("Procedure"),Fn("Cylinder1"))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",Fn("Terminator"),Fn("CreateRequest"),Fn("Document"),Fn("TriangleDown"))),Tn(),Xn(),On()),Ye.current.groupTemplate=Mn(me.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:me.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Je,cr)=>{var _r=cr.addMembers(cr.diagram.selection,!0);_r||cr.diagram.currentTool.doCancel()},avoidable:!1},new me.KX("location","loc",me.E9.parse).makeTwoWay(me.E9.stringify),Mn(me.s_,"Auto",{name:"BODY"},Mn(me.bn,{parameter1:10,fill:je.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:me.z6.AllSides,toSpot:me.z6.AllSides},new me.KX("fill"),new me.KX("stroke","color"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),Mn(me.Vm,{background:"transparent",margin:20})),Mn(me.al,{alignment:me.z6.Top,alignmentFocus:me.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new me.KX("text"),new me.KX("stroke","color"))),Ye.current.groupTemplate.selectionAdornmentTemplate=Mn(me.uz,"Spot",Mn(me.s_,"Auto",Mn(me.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Mn(me.Vm,{margin:1.5})),An({alignment:me.z6.TopRight,alignmentFocus:me.z6.BottomRight})),Ye.current.groupTemplate.contextMenu=Mn("ContextMenu",Tn(),Xn(),On()),Ye.current.linkTemplate=Mn(me.rU,{layerName:"Foreground",routing:me.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new me.KX("fromSpot","fromSpot",me.z6.parse),new me.KX("toSpot","toSpot",me.z6.parse),new me.KX("fromShortLength","dir",Je=>Je>=1?10:0),new me.KX("toShortLength","dir",Je=>Je>=1?10:0),new me.KX("points").makeTwoWay(),Mn(me.bn,{strokeWidth:2},new me.KX("stroke","color"),new me.KX("strokeWidth","thickness"),new me.KX("strokeDashArray","dash")),Mn(me.bn,{segmentIndex:0,segmentOffset:new me.E9(15,0),segmentOrientation:me.rU.OrientAlong,alignmentFocus:me.z6.Right,figure:"circle",width:10,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Je=>Je===1)),Mn(me.bn,{segmentIndex:-1,segmentOffset:new me.E9(-10,6),segmentOrientation:me.rU.OrientPlus90,alignmentFocus:me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Je=>Je>=1),new me.KX("width","thickness",Je=>7+3*Je),new me.KX("height","thickness",Je=>7+3*Je),new me.KX("segmentOffset","thickness",Je=>new me.E9(-15,4+1.5*Je))),Mn(me.bn,{segmentIndex:0,segmentOffset:new me.E9(15,-6),segmentOrientation:me.rU.OrientMinus90,alignmentFocus:me.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new me.KX("fill","color"),new me.KX("visible","dir",Je=>Je===2),new me.KX("width","thickness",Je=>7+3*Je),new me.KX("height","thickness",Je=>7+3*Je),new me.KX("segmentOffset","thickness",Je=>new me.E9(-15,4+1.5*Je))),Mn(me.al,{alignmentFocus:new me.z6(0,1,-4,0),editable:!0},new me.KX("text").makeTwoWay(),new me.KX("stroke","color"))),Ye.current.linkTemplate.selectionAdornmentTemplate=Mn(me.uz,Mn(me.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Dn(2)},new me.KX("pathPattern","thickness",Dn)),An({alignmentFocus:new me.z6(0,0,-6,-4)}));function Dn(Je){return Mn(me.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Je+4).toString()+" H3"})}function sr(Je){var cr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Je===0?cr="M0 0 M16 16 M0 8 L16 8":Je===2&&(cr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Mn(me.bn,{geometryString:cr,margin:2,background:"transparent",mouseEnter:(_r,ir)=>ir.background="dodgerblue",mouseLeave:(_r,ir)=>ir.background="transparent",click:En("dir",Je),contextClick:En("dir",Je)})}function or(Je){var cr=(_r,ir)=>{_r.handled=!0,_r.diagram.model.commit(oi=>{var Jr=ir.part.adornedPart;oi.set(Jr.data,Je?"toSpot":"fromSpot",me.z6.stringify(me.z6.AllSides)),(Je?Jr.toNode:Jr.fromNode).invalidateConnectedLinks()})};return Mn(me.bn,{width:12,height:12,fill:"transparent",mouseEnter:(_r,ir)=>ir.background="dodgerblue",mouseLeave:(_r,ir)=>ir.background="transparent",click:cr,contextClick:cr})}function xn(Je,cr){var _r=0,ir=me.z6.RightSide;Je.equals(me.z6.Top)?(_r=270,ir=me.z6.TopSide):Je.equals(me.z6.Left)?(_r=180,ir=me.z6.LeftSide):Je.equals(me.z6.Bottom)&&(_r=90,ir=me.z6.BottomSide),cr||(_r-=180);var oi=(Jr,ni)=>{Jr.handled=!0,Jr.diagram.model.commit(Kr=>{var $r=ni.part.adornedPart;Kr.set($r.data,cr?"toSpot":"fromSpot",me.z6.stringify(ir)),(cr?$r.toNode:$r.fromNode).invalidateConnectedLinks()})};return Mn(me.bn,{alignment:Je,alignmentFocus:Je.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:_r,background:"transparent",mouseEnter:(Jr,ni)=>ni.background="dodgerblue",mouseLeave:(Jr,ni)=>ni.background="transparent",click:oi,contextClick:oi})}Ye.current.linkTemplate.contextMenu=Mn("ContextMenu",Xn(),On(),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",sr(0),sr(1),sr(2))),Mn("ContextMenuButton",Mn(me.s_,"Horizontal",Mn(me.s_,"Spot",or(!1),xn(me.z6.Top,!1),xn(me.z6.Left,!1),xn(me.z6.Right,!1),xn(me.z6.Bottom,!1)),Mn(me.s_,"Spot",{margin:new me.Zt(0,0,0,2)},or(!0),xn(me.z6.Top,!0),xn(me.z6.Left,!0),xn(me.z6.Right,!0),xn(me.z6.Bottom,!0)))));const Gn=`{ "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 Yr=["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 ei(Je){return console.log("shapeName:",Je),Yr.indexOf(Je)>=0}var xi=new me.YI(nr.current,{maxSelectionCount:1,linkTemplate:Mn(me.rU,{locationSpot:me.z6.Center,selectionAdornmentTemplate:Mn(me.uz,"Link",{locationSpot:me.z6.Center},Mn(me.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Mn(me.bn,{toArrow:"Standard",stroke:null}))},{routing:me.rU.AvoidsNodes,curve:me.rU.JumpOver,corner:5,toShortLength:4},new me.KX("points"),Mn(me.bn,{isPanelMain:!0,strokeWidth:2}),Mn(me.bn,{toArrow:"Standard",stroke:null})),model:new me.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...me.bn.getFigureGenerators().toArray().map(Je=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Je.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ye.current.addDiagramListener("TextEdited",function(Je){var cr;const _r=Je.subject.part;var ir=(cr=document.activeElement)==null?void 0:cr.value;typeof ir=="string"&&ir.trim()===""&&Ye.current.model.commit(function(oi){oi.set(_r.data,"text","\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}),xi.nodeTemplate=Mn(me.NB,"Auto",{locationSpot:me.z6.Center},new me.KX("location","location",me.E9.parse).makeTwoWay(me.E9.stringify),Mn(me.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 me.KX("stroke").makeTwoWay(),new me.KX("fill").makeTwoWay(),new me.KX("figure")),Mn(me.al,{margin:new me.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new me.$u(16,16),maxSize:new me.$u(10,NaN),textAlign:"center",editable:!0},new me.KX("key").makeTwoWay())),setTimeout(()=>{Ye.current.grid=Mn(me.s_,"Grid",Mn(me.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Mn(me.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ye.current.grid.visible=!0,Ye.current.grid.gridCellStroke="darkgray",Ye.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ye.current,Ye.current}const fr=()=>It(this,null,function*(){var Mn,je=Ye.current.makeImage();const Ve=yield(0,wt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:je.src,file_data:JSON.stringify({login:(Mn=(0,Zt.eY)())==null?void 0:Mn.login,data:JSON.parse(Ye.current.model.toJson())})}});tn({src:Ve.url})});return(0,ae.useEffect)(()=>(setTimeout(()=>{$n()},500),mn(an+1),()=>{Ye.current=null}),[]),ee.createElement("div",{ref:mr,className:"body-overflow-initial"},ee.createElement(ce.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!an,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:ee.createElement(de.Z,null,ee.createElement(Kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ee.createElement(Kt.Z,{onClick:()=>{var Mn,je,Ve=Ye.current.selection.first();if(Zn.current=!Zn.current,document.activeElement&&Ve){let An=(je=(Mn=document.activeElement)==null?void 0:Mn.value)==null?void 0:je.trim();typeof An=="string"&&Ye.current.model.commit(function(En){En.set(Ve.data,"text",An||"\u672A\u547D\u540D"),Ye.current.commandHandler.stopCommand()},"increment")}mn(an+1)}},ee.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:sn},ee.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Zn.current?"none":"block"},className:Lt.flowChartWrp},ee.createElement("div",{style:{display:"flex",height:"100%"}},ee.createElement("div",{style:{width:"300px",height:"100%"}},ee.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),ee.createElement("div",{style:{height:"calc(100% - 50px)"},className:Lt.myPaletteDiv,ref:nr})),ee.createElement("div",{style:{flex:1,position:"relative"}},ee.createElement("div",{ref:hn,style:{height:"80vh"}}))),ee.createElement("div",{className:"tr"},ee.createElement(_t.ZP,{size:"large",onClick:fr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ht=Rt,re=ue(47889),ye=ue(71051);const Pe=re.ZP.Group,Ae={margin:"0 8px"};var Oe=({callback:sn,onCancel:tn})=>{function Ye(hn){sn(hn)}return ae.createElement(jt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ye},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Ae},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Ae},"\u884C\u6570"),ae.createElement(jt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(ye.Z,null)),ae.createElement("span",{style:Ae},"\u5217\u6570"),ae.createElement(jt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(ye.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Ae},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(jt.default.Item,{name:"align"},ae.createElement(Pe,null,ae.createElement(re.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(re.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(re.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(re.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(_t.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},Ie=ue(71411),Qe=ue(43001),qe=ue.n(Qe),Ke=(0,ae.forwardRef)(({use3d:sn,width:tn,height:Ye,callback:hn,showSaveButton:nr},Zn)=>{const mr=(0,ae.useRef)(),an=(0,ae.useRef)(),[mn,$n]=(0,ae.useState)(!1),fr=(0,ae.useRef)({id:mr,appName:"graphing",width:tn||1e3,height:Ye||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ae.useEffect)(()=>{an.current=new(qe())(fr.current,!0),window.onload=function(){an.current.inject("applet_container")}},[]);const Mn=()=>{var je=window.ggbApplet.getPNGBase64(1,!0,72);return hn&&hn(je),je};return(0,ae.useEffect)(()=>{fr.current.appName=mn?"3D":"graphing",an.current.inject("applet_container")},[mn]),(0,ae.useEffect)(()=>{$n(sn)},[sn]),(0,ae.useImperativeHandle)(Zn,()=>({getImgData:Mn})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:mr}),ae.createElement(de.Z,{align:"middle"},ae.createElement(Kt.Z,{flex:1},ae.createElement(Ie.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:mn,onChange:je=>$n(je)})),ae.createElement(Kt.Z,null,ae.createElement(_t.ZP,{size:"large",onClick:Mn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ue=ue(76562),We=ue(6767);const He="link",rn="upload-image",ln="add-flowchart",un="draw-image",bn="add-flowchart",In="code-block",jn="add-table",Kn="------------",kr={default:Kn,left:`:${Kn}`,center:`:${Kn}:`,right:`${Kn}:`};var pr=ue(37808);function Er(){}let Or=0;const jr=1e4,yr="\u2581",rr="@\u2581\u2581@",Rr="@\u2581@",te=`
**\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`,Qn=["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 Vn(sn){return/^\d+$/.test(sn)?`${sn}px`:sn}const zn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Wn={[zn+"-B"]:"bold",[zn+"-I"]:"italic"},tr={[He]:"\u6DFB\u52A0\u94FE\u63A5",[In]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[rn]:"\u6DFB\u52A0\u56FE\u7247",[un]:"\u6DFB\u52A0\u753B\u56FE",[ln]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[jn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ar=({defaultValue:sn="",onChange:tn,width:Ye="100%",height:hn=400,miniToolbar:nr=!1,isFocus:Zn=!1,watch:mr,insertTemp:an,mode:mn="markdown",id:$n="markdown-editor-id",showResizeBar:fr=!1,noStorage:Mn=!1,showNullButton:je=!1,showNullProgramButton:Ve=!1,hidetoolBar:An=!1,fullScreen:En=!1,onBlur:$e,onCMBeforeChange:Tn,onFullScreen:Xn,className:hr="",disablePaste:xr=!1,disabled:On=!1,disabledFill:Fn=!1,placeholder:Dn="",values:sr="",extraUse:or})=>{const[xn,Gn]=(0,ae.useState)(null),[Yr,ei]=(0,ae.useState)(sn),[xi,Je]=(0,ae.useState)(mr),[cr,_r]=(0,ae.useState)(En),[ir,oi]=(0,ae.useState)(""),[Jr,ni]=(0,ae.useState)(0),[Kr,$r]=(0,ae.useState)(hn),[hi,yn]=(0,ae.useState)(!1),[mi,vn]=(0,ae.useState)(0),[ii,Gi]=(0,ae.useState)(0),gi=(0,ae.useRef)(),Bi=(0,ae.useRef)(),ri=(0,ae.useRef)(),Br=(0,ae.useRef)();(0,ae.useEffect)(()=>{const vr=window.scrollY||window.pageYOffset;ei(sr),xn==null||xn.setValue(sr),window.scrollTo(0,vr)},[sr]),(0,ae.useEffect)(()=>{Xn==null||Xn(cr)},[cr]),(0,ae.useEffect)(()=>{if(gi.current){let vr=function(Mr,kn){var fi;if(xr){kn.preventDefault();return}const Ci=kn.clipboardData;if(Ci){const io=Ci.types.toString(),bi=Ci.items;if(io==="Files"||Ci.types.indexOf("Files")>-1){if(kn.preventDefault(),mn=="stex")return;try{let lo=bi[1];((fi=bi[0])==null?void 0:fi.kind)==="file"&&(lo=bi[0]);const xo=lo.getAsFile(),Bo=xo.name.split(".").pop();(0,we.I)(xo,po=>{var na,Ao,on;po.id?((na=xo==null?void 0:xo.type)==null?void 0:na.indexOf("image"))>-1?ur.replaceSelection(`<img width="100%" src="/api/attachments/${po.id}?type=${po.content_type})" alt="" />`):((Ao=xo==null?void 0:xo.type)==null?void 0:Ao.indexOf("video"))>-1?ur.replaceSelection(`<video width="100%" controls src="/api/attachments/${po.id}"></video>`):((on=xo==null?void 0:xo.type)==null?void 0:on.indexOf("pdf"))>-1?ur.replaceSelection(`<a href="/api/attachments/${po.id}?type=${xo.type}&disposition=inline" target="_blank">${xo.name}</a>`):Qn.includes(Bo)?ur.replaceSelection(`<a href="/api/attachments/${po.id}?type=office&disposition=inline" target="_blank">${xo.name}</a>`):ur.replaceSelection(`[${xo.name}](/api/attachments/${po.id}?type=${po.content_type})`):(po==null?void 0:po.status)===401&&(document.location.href="/user/login")})}catch(lo){We.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ur=ot().fromTextArea(gi.current,{mode:mn,lineNumbers:!nr,lineWrapping:!0,value:sn,autoCloseTags:!0,autoCloseBrackets:!0});return ur.on("keyup",function(Mr,kn){kn.keyCode===8&&(Mr.getValue()==""?ur.setOption("placeholder",Dn):ur.setOption("placeholder",null))}),ur.on("keydown",function(Mr,kn){if(kn.keyCode===8){var fi=Eo(Mr);fi&&kn.preventDefault()}}),Zn&&ur.focus(),ur.on("paste",vr),On&&ur.on("beforeChange",function(Mr,kn){(kn.origin==="paste"||kn.origin==="+input")&&kn.cancel()}),Gn(ur),()=>{ur.off("paste",vr)}}},[]);const wi=(0,ae.useCallback)(()=>{if(Bi.current)try{}catch(vr){console.log(vr,"---- to set md editor body height")}},[Kr,Bi,cr]);(0,ae.useEffect)(()=>{function vr(){let ur=new zt.Z(Mr=>{for(let kn of Mr)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&(wi(),xn.setSize("100%","100%"),xn.refresh())});return ur.observe(gi.current.parentElement),ur}if(xn){const ur=vr();return()=>{var Mr,kn;(Mr=gi.current)!=null&&Mr.parentElement&&ur.unobserve((kn=gi.current)==null?void 0:kn.parentElement)}}},[xn,wi]),(0,ae.useEffect)(()=>{if(xn){let vr=[];for(const[ur,Mr]of Object.entries(Wn)){let kn={[ur]:()=>{Oi(Mr)}};vr.push(kn),xn.addKeyMap(kn)}return()=>{for(let ur of vr)xn.removeKeyMap(ur)}}},[xn]),(0,ae.useEffect)(()=>{En!==cr&&_r(En)},[En]),(0,pr.Z)(()=>{if(!Mn&&Jr>0){let vr=new Date().getTime(),ur=window.sessionStorage.getItem($n);vr>=Jr+jr&&(!ur||ur!==Yr)&&(window.sessionStorage.setItem($n,Yr),yn(!0))}},jr),(0,ae.useEffect)(()=>{Je(mr)},[xn,mr]),(0,ae.useEffect)(()=>{xn&&Zn&&xn.focus()},[xn,Zn]),(0,ae.useEffect)(()=>{if(xi&&xn){let vr=function(Mr){let kn=Mr.target;if(Br.current){let fi=kn.scrollTop/kn.scrollHeight;Br.current.scrollTop=Br.current.scrollHeight*fi}};const ur=xn.getScrollerElement();return ur.addEventListener("scroll",vr),()=>{ur.removeEventListener("scroll",vr)}}},[xn,xi]),(0,ae.useEffect)(()=>{if(xn&&Tn){let vr=function(ur,Mr){Tn(ur,Mr)};return xn.on("beforeChange",vr),()=>{xn.off("beforeChange",vr)}}},[xn,Tn]),(0,ae.useEffect)(()=>{if(xn&&$e){let vr=function(){$e(xn.getValue())};return xn.on("blur",vr),()=>{xn.off("blur",vr)}}},[xn,$e]);function Eo(vr,ur){var Mr=vr.getDoc(),kn=Mr.getCursor(),fi=Mr.getLine(kn.line),Ci=fi.charAt(kn.ch-1),io=fi.lastIndexOf("@\u2581@",kn.ch),bi=fi.lastIndexOf("@\u2581\u2581@",kn.ch),lo=io>bi?io:bi,xo=io>bi?3:4;if(rr.indexOf(Ci)===-1)return null;if(console.log("change1:",ur,vr,fi,kn,lo,io,bi,Ci),lo>=0&&kn.ch-lo<5){var Bo=lo+xo;return Mr.replaceRange("",{line:kn.line,ch:lo},{line:kn.line,ch:Bo}),{line:kn.line,ch:Bo}}return null}(0,ae.useEffect)(()=>{if(xn){let vr=function(ur,Mr){const kn=ur.getValue();ei(kn),ni(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),tn&&(Ve?tn(kn,lr(kn)):tn(kn))};return xn.on("change",vr),()=>{xn.off("change",vr)}}},[xn,tn]),(0,ae.useEffect)(()=>{if(xn)if(sn==null)xn.setValue(""),ei("");else{const vr=window.scrollY||window.pageYOffset;sn!==xn.getValue()&&(xn.setValue(sn),ei(sn),xn.setCursor(On?1:xn.lineCount(),0),window.scrollTo(0,vr))}},[xn,sn]);const Oi=(0,ae.useCallback)(vr=>{const ur=xn.getCursor(),Mr=xn.getSelection();let kn=Mr.split(`
`);switch(vr){case"bold":return xn.replaceSelection("**"+Mr+"**"),Mr===""&&xn.setCursor(ur.line,ur.ch+2),xn.focus();case"italic":return xn.replaceSelection("*"+Mr+"*"),Mr===""&&xn.setCursor(ur.line,ur.ch+1),xn.focus();case"code":return xn.replaceSelection("`"+Mr+"`"),Mr===""&&xn.setCursor(ur.line,ur.ch+1),xn.focus();case"inline-latex":return oi("inline-latex"),xn.focus();case"latex":return xn.replaceSelection("```latex\n"+Mr+"\n```"),xn.setCursor(ur.line+1,Mr.length+1),xn.focus();case"line-break":return xn.replaceSelection(`<br/>
`),xn.focus();case"list-ul":return Mr===""?xn.replaceSelection("- "+Mr):xn.replaceSelection(kn.map(fi=>fi===""?"":`- ${fi}`).join(`
`)),xn.focus();case"list-ol":return Mr===""?xn.replaceSelection("1. "+Mr):xn.replaceSelection(kn.map((fi,Ci)=>fi===""?"":`${Ci+1}. ${fi}`).join(`
`)),xn.focus();case"add-null-ch":return Mr===""&&xn.setCursor(ur.line,ur.ch),xn.replaceSelection(yr),xn.focus();case"add-signal":return Mr===""&&xn.setCursor(ur.line,ur.ch),xn.replaceSelection(Rr),xn.focus();case"add-multiple":return Mr===""&&xn.setCursor(ur.line,ur.ch),xn.replaceSelection(rr),xn.focus();case"inster-template-1":return Mr===""&&xn.setCursor(ur.line,ur.ch),xn.replaceSelection(te),xn.focus();case"eraser":return xn.setValue(""),xn.focus();case"trigger-watch":return Je(!xi),xn.focus();case"trigger-full-screen":return _r(!cr),xn.focus();case He:oi(He);return;case In:oi(In);return;case rn:oi(rn);return;case un:oi(un);return;case"maths-latex":oi("maths-latex");return;case ln:oi(ln);return;case jn:oi(jn);return;default:throw new Error}},[xn,xi,cr]),Yn=(0,ae.useCallback)((vr,ur)=>{var Mr,kn,fi,Ci,io,bi;switch(oi(""),ir){case He:const{title:na,link:Ao}=vr;return xn.replaceSelection(`[${na}](${Ao})`),xn.focus();case In:const{language:on,content:ra}=vr;return xn.replaceSelection(["```"+on,ra,"```"].join(`
`)),xn.focus();case"maths-latex":for(var lo=atob(vr),xo=new Uint8Array(lo.length),Bo=0;Bo<lo.length;Bo++)xo[Bo]=lo.charCodeAt(Bo);var po=new Blob([xo],{type:"image/png"});(0,we.I)(po,Ga=>{Ga.id?xn.replaceSelection(`![,](/api/attachments/${Ga.id}?type=${Ga.content_type})`):(Ga==null?void 0:Ga.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":xn.replaceSelection("`$$"+vr+"$$`");break;case rn:case un:case bn:const{src:za,alt:Ya}=vr,Hi=ur,Js=(fi=(kn=(Mr=Hi==null?void 0:Hi.name)==null?void 0:Mr.split("."))==null?void 0:kn.pop)==null?void 0:fi.call(kn);return((Ci=Hi==null?void 0:Hi.type)==null?void 0:Ci.indexOf("image"))>-1||!(Hi!=null&&Hi.type)?Hi!=null&&Hi.align||Hi!=null&&Hi.width?xn.replaceSelection(`<p style="text-align:${Hi.align||"initial"}"><img width="${Hi.width?Hi.width+"%":"initial"}" src="${za}" alt="${Ya||""}" /></p>`):xn.replaceSelection(`<img width="100%" src="${za}" alt="${Ya||""}" />`):((io=Hi==null?void 0:Hi.type)==null?void 0:io.indexOf("video"))>-1?xn.replaceSelection(`<video width="100%" controls src="${za}"></video>`):((bi=Hi==null?void 0:Hi.type)==null?void 0:bi.indexOf("pdf"))>-1?xn.replaceSelection(`<a href="${za}?type=${Hi.type}&disposition=inline" target="_blank">${Hi.name}</a>`):Qn.includes(Js)?xn.replaceSelection(`<a href="${za}?type=office&disposition=inline" target="_blank">${Hi.name}</a>`):xn.replaceSelection(`[${Hi.name}](${za})`),xn.focus();case jn:const{row:ls,col:Ml,align:Ai}=vr;let No=`
`;for(let Ga=0;Ga<ls;Ga++){let dl=[],uu=[];for(let xs=0;xs<Ml;xs++)Ga===1&&uu.push(kr[Ai]),dl.push(" ");Ga===1&&(No+=`| ${uu.join(" | ")} |
`),No+=`| ${dl.join(Ml===1?"":" | ")} |
`}return xn.replaceSelection(No+`
`),xn.focus();default:throw new Error}},[xn,ir]),Le=(0,ae.useMemo)(()=>{switch(ir){case He:return ae.createElement(ve,{callback:Yn,onCancel:Ti});case In:return ae.createElement(Se.Z,{callback:Yn,onCancel:Ti});case rn:return ae.createElement(we.Z,{callback:Yn,onCancel:Ti});case ln:return ae.createElement(Ht,{callback:Yn,onCancel:Ti});case jn:return ae.createElement(Oe,{callback:Yn,onCancel:Ti});case"maths-latex":return ae.createElement(Ke,{showSaveButton:!0,callback:Yn});case"inline-latex":return ae.createElement(Ue.Z,{showSaveButton:!0,callback:Yn});default:return null}},[ir]);function Ti(){oi("")}(0,ae.useEffect)(()=>{if(ri.current){let vr=function(io){fi=!0,Ci=io.pageY},ur=function(){fi=!1},Mr=function(io){if(fi){let bi=io.pageY-Ci;bi<0&&(bi=0),bi>300&&(bi=300);let lo=hn+bi+"px";$r(lo)}},kn=ri.current,fi=!1,Ci=0;return kn.addEventListener("mousedown",vr),document.addEventListener("mousemove",Mr),document.addEventListener("mouseup",ur),()=>{kn.removeEventListener("mousedown",vr),document.removeEventListener("mousemove",Mr),document.removeEventListener("mouseup",ur)}}},[xn,ri]),(0,ae.useEffect)(()=>{$r(hn)},[hn]);const so=Vn(Ye),Ji=Vn(Kr),Zi={width:so,height:Ji},di=(0,ae.useMemo)(()=>{if(Jr){let vr=new Date(Jr),ur=vr.getHours(),Mr=vr.getMinutes(),kn=vr.getSeconds();return ur=ur<10?"0"+ur:ur,Mr=Mr<10?"0"+Mr:Mr,kn=kn<10?"0"+kn:kn,`${ur}:${Mr}:${kn}`}return 0},[Jr]),lr=vr=>{const ur=[];if(Ve){let Mr=-1;vr=vr.replace(/(@▁▁@|@▁@)/g,function(kn,fi,Ci){ur.push({multiLine:kn!==Rr})})}return ur};function wr(){window.sessionStorage.removeItem($n),yn(!1),ni(0)}function Vr(){yn(!1),ni(0),xn.setValue(window.sessionStorage.getItem($n))}(0,ae.useEffect)(()=>{tr[ir]&&ir!==un&&ir!==ln&&setTimeout(()=>{const vr=document.getElementsByClassName("markdown-popup-form")[0],ur=window.innerWidth/2-vr.offsetWidth/2,Mr=window.innerHeight/2-vr.offsetHeight/2;vn(ur),Gi(Mr)},0)},[ir]);const gr=vr=>{vr.preventDefault();const ur=vr.clientX-mi,Mr=vr.clientY-ii;document.body.onmousemove=kn=>{let fi=kn.clientX-ur,Ci=kn.clientY-Mr;const io=document.getElementsByClassName("markdown-popup-form")[0],bi=window.innerWidth-io.offsetWidth,lo=window.innerHeight-io.offsetHeight;fi=Math.max(0,Math.min(fi,bi)),Ci=Math.max(0,Math.min(Ci,lo)),Ur(kn.clientX,kn.clientY,ur,Mr)&&(vn(fi),Gi(Ci))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ur=(vr,ur,Mr,kn)=>{const fi=document.body.clientHeight,Ci=document.body.clientWidth;return vr<20&&Mr>vr||vr>Ci-20&&Mr<vr||ur<20&&kn>ur||ur>fi-20&&kn<ur?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ae.createElement(ae.Fragment,null,ae.createElement("div",{className:"markdown-editor-wrapper",ref:Bi},ae.createElement("div",{className:`markdown-editor-container ${hr} ${xi?"on-preview":""} ${nr?"mini":""} ${cr?"full-screen":""}`,style:Zi},ae.createElement(Dt,{insertTemp:an,watch:xi,fullScreen:cr,showNullButton:je,showNullProgramButton:Ve,onActionCallback:Oi,hidetoolBar:An,extraUse:or}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:gi,placeholder:Dn})),xi?ae.createElement("div",{ref:Br,className:"preview-container"},mn==="stex"&&ae.createElement(mt,{value:Yr}),mn!=="stex"&&ae.createElement(Tt.Z,{disabledFill:Fn,showProgramFill:Ve,value:Yr})):null))),fr?ae.createElement("a",{ref:ri,className:"editor-resize"}):null,ir===un&&ae.createElement(fe,{callback:Yn,onCancel:Ti}),ir===ln&&ae.createElement(Ht,{callback:Yn,onCancel:Ti}),ae.createElement(Ft.Z,null,tr[ir]&&ir!==un&&ir!==ln?ae.createElement(ce.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:mi,top:ii},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:gr},tr[ir]),open:!0,onCancel:Ti,footer:null,destroyOnClose:!0,width:ir===ln?"1200px":null,height:ir===ln?"80vh":null,className:"markdown-popup-form"},Le):null))}},17077:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return At},I:function(){return Ft}});var ae=ue(28284),Re=ue(6767),ot=ue(37568),zt=ue(77736),Bt=ue(71051),vt=ue(47889),gt=ue(99571),kt=ue(46699),Ct=ue(59301),yt=ue(59301),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(jt,Nt,_t)=>Nt in jt?Tt(jt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):jt[Nt]=_t,it=(jt,Nt)=>{for(var _t in Nt||(Nt={}))z.call(Nt,_t)&&at(jt,_t,Nt[_t]);if(ft)for(var _t of ft(Nt))tt.call(Nt,_t)&&at(jt,_t,Nt[_t]);return jt},lt=(jt,Nt)=>mt(jt,xt(Nt));const{useForm:ut}=ae.default,dt={width:280,marginRight:10},bt={labelCol:{span:5},wrapperCol:{span:19}};var At=({callback:jt,onCancel:Nt})=>{const[_t]=ut();let Wt=(0,Ct.useRef)();function Jt(oe){Wt.current.width=_t.getFieldValue("width"),Wt.current.align=_t.getFieldValue("align"),jt(oe,Wt.current)}function Ut(oe,se){if(oe.status===-1){Re.ZP.error(oe.message);return}_t.setFieldsValue({src:`/api/attachments/${oe.id}`,type:se.type})}function Vt(oe){let se=oe.target.files[0];Wt.current=se,Ft(se,Ut)}return yt.createElement(ae.default,lt(it({form:_t},bt),{className:"upload-image-panel",onFinish:Jt,style:{width:470,overflow:"hidden"}}),yt.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},yt.createElement("div",{className:"flex-container"},yt.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},yt.createElement(ot.default,{style:dt})),yt.createElement(Dt,{onFileChange:Vt}))),yt.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},yt.createElement(ot.default,{style:{width:264}})),yt.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},yt.createElement(zt.Z,null,yt.createElement(ae.default.Item,{name:"width",style:{margin:0}},yt.createElement(Bt.Z,{style:{width:264}})),yt.createElement("span",{className:"ml8"},"%"))),yt.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},yt.createElement(vt.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"}]})),yt.createElement("aside",null,yt.createElement(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},yt.createElement(gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),yt.createElement(gt.ZP,{type:"default",onClick:Nt},"\u53D6\u6D88"))))};function Dt({onFileChange:jt}){return yt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",yt.createElement("input",{type:"file",onChange:jt}))}function Ft(jt,Nt){if(!jt)throw new String("\u6CA1\u6709\u6587\u4EF6");let _t=new FormData;_t.append("editormd-image-file",jt),_t.append("file_param_name","editormd-image-file"),_t.append("byxhr","true");var Wt=new window.XMLHttpRequest;Wt.withCredentials=!0,Wt.addEventListener("load",function(Jt){Nt(JSON.parse(Jt.target.responseText),jt)},!1),Wt.addEventListener("error",function(Jt){console.error(Jt)},!1),Wt.open("POST",`${kt.KI}/api/attachments.json`),Wt.send(_t)}},91558:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return ot}});var ae=ue(59301),Re=ue(4676);class ot extends ae.Component{constructor(Bt){super(Bt);const vt=window.document;this.node=vt.createElement("div"),vt.body.appendChild(this.node)}render(){const{children:Bt}=this.props;return(0,Re.createPortal)(Bt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(pn,dn,ue){"use strict";ue.d(dn,{SV:function(){return me},ZP:function(){return fe}});var ae=ue(59301),Re=ue(76374);const ot={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"]},zt={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"]},Bt={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(`
`)}]},vt={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(`
`)}]},gt={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 kt=ue(53184),Ct=ue.n(kt),yt=(ke,pe,qt)=>new Promise((Kt,wt)=>{var Lt=It=>{try{ee(qt.next(It))}catch(Rt){wt(Rt)}},Zt=It=>{try{ee(qt.throw(It))}catch(Rt){wt(Rt)}},ee=It=>It.done?Kt(It.value):Promise.resolve(It.value).then(Lt,Zt);ee((qt=qt.apply(ke,pe)).next())});const Tt={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"]}},mt=(ke,pe,qt,Kt)=>{const wt=pe.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:qt.lineNumber,endColumn:qt.column});return Array.from(new Set(wt.match(/\b\w{2,}\b/g)||[])).map(Zt=>({label:Zt,kind:ke.languages.CompletionItemKind.Text,insertText:Zt,range:Kt}))},xt=(ke,pe,qt,Kt)=>{ke.languages.registerCompletionItemProvider(pe,{provideCompletionItems(wt,Lt){const Zt=wt.getWordUntilPosition(Lt),ee={startLineNumber:Lt.lineNumber,endLineNumber:Lt.lineNumber,startColumn:Zt.startColumn,endColumn:Zt.endColumn},It=wt.getLineContent(Lt.lineNumber).substring(Zt.startColumn-2,Zt.endColumn);return{suggestions:[...mt(ke,wt,Lt,ee),...qt.map(Ht=>({label:Ht,kind:ke.languages.CompletionItemKind.Keyword,documentation:Ht,insertText:Ht,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ee})),...Kt.map(Ht=>({label:Ht.label,kind:ke.languages.CompletionItemKind.Snippet,documentation:Ht.content,insertText:It.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ee}))]}}})};var ft=ke=>{Tt.languages.forEach(pe=>{ke.languages.registerDocumentFormattingEditProvider(pe,{provideDocumentFormattingEdits(qt){return yt(this,null,function*(){const Kt=Ct()(qt.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:qt.getFullModelRange(),text:Kt}]})}})}),xt(ke,"java",zt.keywords,zt.quickKey),xt(ke,"cpp",Bt.keywords,Bt.quickKey),xt(ke,"c",ot.keywords,[]),xt(ke,"python",vt.keywords,vt.quickKey),xt(ke,"scala",gt.keywords,gt.quickKey)};const z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var tt=Object.defineProperty,at=(ke,pe,qt)=>pe in ke?tt(ke,pe,{enumerable:!0,configurable:!0,writable:!0,value:qt}):ke[pe]=qt,it=(ke,pe,qt)=>at(ke,typeof pe!="symbol"?pe+"":pe,qt);const lt=class mx{constructor(pe,qt,Kt){this.placeholder=pe,this.editor=qt,this.monaco=Kt,qt.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)}};it(lt,"ID","editor.widget.placeholderHint");var dt=lt,bt=ue(96236),At=ue(6767),Dt=ue(25399),Ft=ue(89392),jt=ue(49535),Nt=ue(56102),_t=Object.defineProperty,Wt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,se=(ke,pe,qt)=>pe in ke?_t(ke,pe,{enumerable:!0,configurable:!0,writable:!0,value:qt}):ke[pe]=qt,he=(ke,pe)=>{for(var qt in pe||(pe={}))Vt.call(pe,qt)&&se(ke,qt,pe[qt]);if(Ut)for(var qt of Ut(pe))oe.call(pe,qt)&&se(ke,qt,pe[qt]);return ke},be=(ke,pe)=>Wt(ke,Jt(pe)),Yt=(ke,pe)=>{var qt={};for(var Kt in ke)Vt.call(ke,Kt)&&pe.indexOf(Kt)<0&&(qt[Kt]=ke[Kt]);if(ke!=null&&Ut)for(var Kt of Ut(ke))pe.indexOf(Kt)<0&&oe.call(ke,Kt)&&(qt[Kt]=ke[Kt]);return qt},ne=(ke,pe,qt)=>new Promise((Kt,wt)=>{var Lt=It=>{try{ee(qt.next(It))}catch(Rt){wt(Rt)}},Zt=It=>{try{ee(qt.throw(It))}catch(Rt){wt(Rt)}},ee=It=>It.done?Kt(It.value):Promise.resolve(It.value).then(Lt,Zt);ee((qt=qt.apply(ke,pe)).next())});function ve(ke){return/^\d+$/.test(ke)?`${ke}px`:ke}function Se(){}let we=!1;const ce={"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 de(ke=[]){let pe=ke;if(Array.isArray(ke)){for(let qt=0;qt<ke.length;qt++){let Kt=ce[ke[qt]];if(Kt)return Kt}return pe[0]}return ce[pe]||pe}let le=null;const Ce=()=>ne(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ke)}});var fe=ke=>{var pe=ke,{width:qt="100%",height:Kt="100%",value:wt,language:Lt="javascript",style:Zt={},options:ee={},overrideServices:It={},theme:Rt="vs-dark",onEditBlur:Ht,isCopy:re=!1,onSave:ye,autoHeight:Pe=!1,forbidCopy:Ae=!1,onChange:Oe=Se,editorDidMount:Ie=Se,onFocus:Qe=Se,onBreakPoint:qe=Se,breakPointValue:nn=[],filename:Ke="educoder.txt",errorLine:Ue,errorContent:We="",highlightLine:He,openBreakPoint:rn=!1,placeholder:ln="",showMiniMap:un=!0}=pe,bn=Yt(pe,["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 In=(0,ae.useRef)(),jn=(0,ae.useRef)({}),Kn=(0,ae.useRef)(),kr=(0,ae.useRef)(),pr=(0,ae.useRef)([]),Er=(0,ae.useRef)(!1),Or=(0,ae.useRef)(),jr=(0,ae.useRef)(),yr=(0,ae.useRef)(!1),[rr,Rr]=(0,ae.useState)(!1);function te(){let an;return In.current&&(an=new Re.Z(mn=>{for(let $n of mn)($n.target.offsetHeight>0||$n.target.offsetWidth>0)&&jn.current.instance.layout()}),an.observe(In.current)),an}function Qn(){At.ZP.warning({content:decodeURIComponent(z),key:"monaco-editor-tip"})}const Vn=()=>{let an=jn.current.instance;if(wt!=null&&an&&rr){const mn=an.getModel();mn&&wt!==mn.getValue()&&(we=!0,mn.setValue(wt),an.layout(),we=!1)}};(0,ae.useEffect)(()=>{const an=jt.Z.subscribe("formatDocument",mn=>{var $n;let fr=jn.current.instance;($n=fr==null?void 0:fr.getAction)==null||$n.call(fr,"editor.action.formatDocument").run()});return window.updateMonacoValue=mn=>{Oe(mn)},an},[]),(0,ae.useEffect)(()=>{var an;let mn=jn.current.instance;kr.current&&clearTimeout(kr.current),kr.current=setTimeout(()=>{Vn()},500),wt&&(wt!=null&&wt.length)&&((an=mn==null?void 0:mn.updateOptions)==null||an.call(mn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(wt.split(/\r\n|\r|\n/g).length))+3,5)}))},[wt,rr,jn.current]),(0,ae.useEffect)(()=>{if(Ue&&jn.current&&jn.current.instance){let mn=jn.current.instance;mn.changeViewZones(function($n){var fr=document.createElement("div");fr.style.padding="10px 20px",fr.style.width="calc(100% - 20px)",fr.className="my-error-line-wrp",fr.innerHTML=We,$n.addZone({afterLineNumber:Ue||11,heightInLines:3,domNode:fr})});var an={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}};mn.addOverlayWidget(an),mn.revealPositionInCenter({lineNumber:20,column:1})}},[Ue,jn.current,rr]);const Rn=(an="",mn)=>{if(!an||an.trim()==="")return!0;const fr=jn.current.instance.getModel().getLineTokens(mn);let Mn=!1;for(let je=0;je<2;je++)fr.getStandardTokenType(je)===1&&(Mn=!0);return Mn};(0,ae.useEffect)(()=>{var an;const mn=(an=jn.current)==null?void 0:an.instance;if(mn&&rr&&Ae){const $n=mn.onDidBlurEditorWidget(()=>{yr.current=!1}),fr=mn.onDidFocusEditorText(()=>{yr.current=!0});return()=>{$n.dispose(),fr.dispose()}}},[jn.current,rr,Ae]),(0,ae.useEffect)(()=>{var an;if((an=jn.current)!=null&&an.instance&&rr&&rn){let mn=jn.current.instance,$n=mn.getModel();if(!$n)return;(()=>{var On;let Fn=[],Dn=[];const sr=$n.getAllDecorations();for(let xn of sr)xn.options.className==="highlighted-line"&&(Fn.push((On=xn==null?void 0:xn.range)==null?void 0:On.startLineNumber),Dn.push(xn==null?void 0:xn.id));if(He===Fn[0])return;$n.deltaDecorations(Dn,[]);const or=$n.getLineCount();He&&He<=or&&(mn.deltaDecorations([],[{range:new le.Range(He,1,He,$n.getLineMaxColumn(He)),options:{isWholeLine:!0,className:"highlighted-line"}}]),mn.revealLineInCenter(He))})();const Mn=(On=!1)=>{var Fn;let Dn=[],sr=[];const or=$n.getAllDecorations();for(let xn of or)xn.options.linesDecorationsClassName==="breakpoints-select"&&(Dn.push((Fn=xn==null?void 0:xn.range)==null?void 0:Fn.startLineNumber),sr.push(xn==null?void 0:xn.id));if(On)return{lines:Dn,ids:sr};qe(Dn)},je=On=>ne(void 0,null,function*(){let Fn={range:new le.Range(On,1,On,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield $n.deltaDecorations([],[Fn]),Mn()}),Ve=On=>ne(void 0,null,function*(){let Fn=[];const Dn=mn.getLineDecorations(On);for(let sr of Dn)sr.options.linesDecorationsClassName==="breakpoints-select"&&Fn.push(sr.id);yield $n.deltaDecorations(Fn,[]),Mn()}),An=On=>{let Fn=mn.getLineDecorations(On);for(let Dn of Fn)if(Dn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ft.isEqual)(nn,Mn(!0).lines)){$n.deltaDecorations(Mn(!0).ids,[]);const On=nn.map(Fn=>({range:new le.Range(Fn,1,Fn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));$n.deltaDecorations([],On)}const En=mn.onDidChangeModelContent(On=>{let Fn=mn.getPosition();if(Fn){let Dn=Fn.lineNumber;clearTimeout(jr.current),jr.current=setTimeout(()=>{Rn($n.getLineContent(Dn),Dn)?Ve(Dn):An(Dn)?(Ve(Dn),je(Dn)):Mn()},100)}}),$e=mn.onMouseDown(On=>{var Fn,Dn,sr;if(On.target.detail&&((sr=(Dn=(Fn=On.target)==null?void 0:Fn.element)==null?void 0:Dn.className)!=null&&sr.includes("line-numbers"))){let or=On.target.position.lineNumber;if(Rn($n.getLineContent(or),or))return;An(or)?Ve(or):je(or)}}),Tn=On=>{let Fn={range:new le.Range(On,1,On,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};pr.current=mn.deltaDecorations(pr.current,[Fn])},Xn=()=>{pr.current=mn.deltaDecorations(pr.current,[])},hr=mn.onMouseMove(On=>{var Fn,Dn,sr;if(Xn(),On.target.detail&&((sr=(Dn=(Fn=On.target)==null?void 0:Fn.element)==null?void 0:Dn.className)!=null&&sr.includes("line-numbers"))){let or=On.target.position.lineNumber;if(Rn($n.getLineContent(or),or))return;Tn(or)}}),xr=mn.onMouseLeave(()=>{Xn()});return()=>{En.dispose(),$e.dispose(),hr.dispose(),xr.dispose()}}},[jn.current,rr,nn,He,rn,Lt]),(0,ae.useEffect)(()=>{var an;(an=jn.current)!=null&&an.instance&&rn&&jn.current.instance.setPosition({lineNumber:0,column:0})},[He]);function zn(){let an=jn.current.instance;if(an){const mn=an.getSelection(),$n=jn.current.pastePos||{},fr=new le.Range($n.startLineNumber||mn.endLineNumber,$n.startColumn||mn.endColumn,$n.endLineNumber||mn.endLineNumber,$n.endColumn||mn.endColumn);setTimeout(()=>{an.executeEdits("",[{range:fr,text:""}])},300)}}function Wn(an){(window.navigator.platform.match("Mac")?an.metaKey:an.ctrlKey)&&an.keyCode==83&&(an.preventDefault(),ye())}const tr=()=>{if(Pe&&jn.current.instance){const an=jn.current.instance.getContentHeight();Zn(an<Kt?Kt:an)}else Zn(Kt)};function Ar(an){var mn=document.createEvent("MouseEvents");mn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),an.dispatchEvent(mn)}const sn=an=>{if(!yr.current)return;const{keyCode:mn,ctrlKey:$n,metaKey:fr,target:Mn,type:je}=an;return(je==="paste"||(mn===67||mn===86)&&(fr||$n))&&Mn.nodeName==="TEXTAREA"&&(Qn(),an.preventDefault()),!1};function tn(an,mn){var $n=window.URL||window.webkitURL||window,fr=new Blob([mn]),Mn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Mn.href=$n.createObjectURL(fr),Mn.download=an,Ar(Mn)}(0,ae.useEffect)(()=>{tr()},[tr]),(0,ae.useEffect)(()=>{In.current&&!rr&&Promise.all([ue.e(8909),ue.e(6656)]).then(ue.bind(ue,71448)).then(an=>{try{le=an,jn.current.instance=le.editor.create(In.current,{value:wt,language:de(Lt),theme:Rt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:un||!1}},It);const mn=jn.current.instance;let Mn=[...bt.BH._menuItems].find(En=>En[0]._debugName=="EditorContext")[1],je=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ve=(En,$e)=>{var Tn,Xn;let hr=En._first;do $e.includes((Xn=(Tn=hr.element)==null?void 0:Tn.command)==null?void 0:Xn.id)&&En._remove(hr);while(hr=hr.next)};if(Ie(mn,le),setTimeout(()=>{tr(),jn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{tn(Ke||"educoder.txt",mn.getValue())}})},500),jn.current.subscription=mn.onDidChangeModelContent(En=>{Er.current?clearTimeout(Or.current):(tr(),Oe(mn.getValue(),En)),Or.current=setTimeout(()=>{Er.current=!1},500)}),window.Monaco||ft(le,de(Lt)),Ae&&(Ve(Mn,je),In.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",sn),window.removeEventListener("paste",sn),window.addEventListener("keydown",sn),window.addEventListener("paste",sn)),window.Monaco=le,Ht&&mn.onDidBlurEditorWidget(()=>{Ht(mn.getValue())}),Qe&&mn.onDidFocusEditorText(()=>{Ae&&Ce(),Qe(mn.getValue())}),Ae){Ce();try{mn.onDidPaste(En=>{const $e=mn.getSelection(),Tn=jn.current.pastePos||{},Xn=new le.Range(Tn.startLineNumber||$e.endLineNumber,Tn.startColumn||$e.endColumn,Tn.endLineNumber||$e.endLineNumber,Tn.endColumn||$e.endColumn);mn.executeEdits("",[{range:En.range,text:""}])})}catch(En){}}let An=te();return ln&&typeof ln=="string"&&new dt(ln,mn,le),Rr(!0),()=>{const En=jn.current.instance;En.dispose();const $e=En.getModel();$e&&$e.dispose(),jn.current.subscription&&jn.current.subscription.dispose(),An.unobserve(In.current)}}catch(mn){}})},[]),(0,ae.useEffect)(()=>{if(jn.current.instance&&rr)return document.addEventListener("keydown",Wn,!1),()=>{document.removeEventListener("keydown",Wn)}},[ye,rr]),(0,ae.useEffect)(()=>{let an=jn.current.instance;if(an&&rr){let mn=de(Lt);le.editor.setModelLanguage(an.getModel(),mn)}},[Lt,rr]),(0,ae.useEffect)(()=>{jn.current.instance&&rr&&le.editor.setTheme(Rt)},[Rt,rr]),(0,ae.useEffect)(()=>{let an=jn.current.instance;Kn.current=ee,an&&rr&&(an.updateOptions(he({},ee)),setTimeout(()=>{an.getModel().updateOptions(he({},ee))},200))},[JSON.stringify(ee),rr]),(0,ae.useEffect)(()=>{let an=jn.current.instance;an&&rr&&an.layout()},[qt,Kt,rr]);const[Ye,hn]=(0,ae.useState)(ve(qt)),[nr,Zn]=(0,ae.useState)(ve(Kt)),mr=be(he({},Zt),{width:Ye,height:nr,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:In,style:mr},re&&ae.createElement(Nt.CopyToClipboard,{text:wt,onCopy:()=>At.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(Dt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ae.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ae.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function me({width:ke="100%",height:pe="100%",original:qt,modified:Kt,language:wt,options:Lt={}}){const Zt=(0,ae.useRef)(),[ee,It]=(0,ae.useState)(null);function Rt(Pe){let Ae;return Zt.current&&(Ae=new Re.Z(Oe=>{for(let Ie of Oe)(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0)&&Pe.layout()}),Ae.observe(Zt.current)),Ae}(0,ae.useEffect)(()=>(Zt.current&&Promise.all([ue.e(8909),ue.e(9404)]).then(ue.bind(ue,2550)).then(Pe=>{le=Pe;const Ae=le.editor.createDiffEditor(Zt.current,be(he({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},Lt),{wordWrap:!0}));It(Ae);let Oe=Rt(Ae);return()=>{Ae.dispose();const Ie=Ae.getModel();Ie&&Ie.dispose(),Oe.unobserve(Zt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{ee&&ee.setModel({original:le.editor.createModel(qt,wt),modified:le.editor.createModel(Kt,wt)})},[qt,Kt,wt,ee]);const Ht=ve(ke),re=ve(pe),ye={width:Ht,height:re};return ae.createElement("div",{className:"my-diff-editor",ref:Zt,style:ye})}},58397:function(pn,dn,ue){"use strict";var ae=ue(39744),Re=ue(82326),ot=ue(71411),zt=ue(59301);const Bt=Re.default.Option;dn.Z=({isTheoretical:vt,onFontSizeChange:gt,cmFontSize:kt,cmCodeMode:Ct,autoFormat:yt,onCodeModeChange:Tt,onTabToSpace:mt,onAutoFormat:xt,formatDocument:ft,className:z="",tabToSpace:tt,children:at,code_editor:it,challenge:lt,shixun_environment_id:ut,shixun_environments:dt})=>{var bt;const At={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Dt=(bt=dt==null?void 0:dt.find(Ft=>Ft.shixun_environment_id===ut))==null?void 0:bt.program_language;return console.log("----",Dt,dt,ut,it),zt.createElement("div",{className:`tpi-code-setting ${z}`},zt.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),zt.createElement("section",null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),zt.createElement(Re.default,{bordered:!1,size:"small",value:Ct,onChange:Tt},zt.createElement(Bt,{value:"vs"},"\u767D\u8272\u80CC\u666F"),zt.createElement(Bt,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),zt.createElement(Re.default,{bordered:!1,size:"small",value:kt,onChange:gt},zt.createElement(Bt,{value:12},"12px"),zt.createElement(Bt,{value:14},"14px"),zt.createElement(Bt,{value:16},"16px"),zt.createElement(Bt,{value:18},"18px"),zt.createElement(Bt,{value:20},"20px"),zt.createElement(Bt,{value:22},"22px"))),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"Tab\u8F6C\u6362"),zt.createElement(ot.Z,{checked:tt,onChange:mt})),zt.createElement("div",{className:"file-item",onClick:ft},zt.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("h3",null,"\u5FEB\u6377\u952E"),zt.createElement("section",null,zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),zt.createElement("span",null,"Ctrl + S")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),zt.createElement("span",null,"F1 / Alt + F1")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),zt.createElement("span",null,"Ctrl + ]/[")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),zt.createElement("span",null,"Ctrl + Shift + \\")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),zt.createElement("span",null,"Home")),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),zt.createElement("span",null,"End"))),at),!vt&&zt.createElement(zt.Fragment,null,zt.createElement("h3",null,"\u5FEB\u6377\u952E"),zt.createElement("section",null,Dt&&zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),zt.createElement("span",null,Dt)),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),zt.createElement("span",null,At[lt==null?void 0:lt.difficulty])),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),zt.createElement("span",null,it==null?void 0:it.name)),zt.createElement("div",{className:"file-item"},zt.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),zt.createElement("span",null,it!=null&&it.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},10661:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return mt}});var ae={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",wrapisCurrent:"wrapisCurrent___qIfQT"},Re=ue(29787),ot=ue(25399),zt=ue(60242),Bt=ue(92310),vt=ue.n(Bt),gt=ue(51257),kt=ue(28426),Ct=ue(48790),yt=ue(59301),mt=({className:xt,dataSource:ft=[],col:z=4,right:tt,bottom:at=23,precision:it=0,wrapWidth:lt=1200,trackEventItems:ut,loading:dt,onRemove:bt=()=>{},isCurrent:At=!0,showProgress:Dt=!1,showAlias:Ft=!1})=>{const jt=Math.floor((lt-(z-1)*tt)/z),Nt=[{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 yt.createElement(Re.Z,{spinning:dt},yt.createElement("div",{className:vt()(ae.list,xt)},!!(ft!=null&&ft.length)&&(ft==null?void 0:ft.map((_t,Wt)=>{var Jt,Ut,Vt,oe,se,he;const{name:be,id:Yt,identifier:ne,featured:ve,school_name:Se,image_url:we,excellent:ce,is_plan:de}=_t;return yt.createElement("div",{key:Yt,className:At&&Dt?ae.wrapisCurrent:ae.wrap,style:{width:jt,marginRight:(1+Wt)%z===0?0:tt+it,marginBottom:at}},yt.createElement("a",{className:ae.li,onClick:le=>{le.preventDefault(),le.stopPropagation(),ut&&(0,gt.L9)([ut]),(0,gt.xg)(`/paths/${ne}`)}},yt.createElement("div",{className:ae.img},yt.createElement("img",{className:ae.cover,src:`${we}`}),At&&(0,Ct.bg)()&&(_t==null?void 0:_t.studying)&&yt.createElement("div",{className:`${ae.movebq} user-path-items`,onClick:le=>{le.stopPropagation(),bt(_t)}},yt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),yt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Jt=_t==null?void 0:_t.subject_tags)==null?void 0:Jt.map((le,Ce)=>{var fe,me;if(Ce===0){const pe=(fe=Nt.find(qt=>qt.name==le))==null?void 0:fe.swimg;return yt.createElement("img",{className:ae.sign,src:pe,style:{left:"-4px"}})}const ke=(me=Nt.find(pe=>pe.name==le))==null?void 0:me.ptimg;return yt.createElement("img",{className:ae.sign,src:ke,style:{left:`${48+52*(Ce-1)+2*Ce}px`}})}),yt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(_t==null?void 0:_t.excellent)&&yt.createElement("div",{className:ae.bq},"\u5F00\u653E\u8BFE\u7A0B"))),yt.createElement("div",{className:ae.name},yt.createElement(ot.Z,{title:Ft&&(_t!=null&&_t.excellent_alias_name)?yt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${be}`,yt.createElement("br",null),yt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${_t==null?void 0:_t.excellent_alias_name}`)):be},yt.createElement("span",{className:ae.e},Ft&&(_t==null?void 0:_t.excellent_alias_name)||be))),At&&Dt&&((Ut=_t==null?void 0:_t.progress)==null?void 0:Ut.all_score)!=0&&yt.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},yt.createElement(zt.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((Vt=_t==null?void 0:_t.progress)==null?void 0:Vt.my_score)/((oe=_t==null?void 0:_t.progress)==null?void 0:oe.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(se=_t==null?void 0:_t.progress)==null?void 0:se.my_score,"/",(he=_t==null?void 0:_t.progress)==null?void 0:he.all_score),(!At||!Dt)&&yt.createElement(ot.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Se}`},yt.createElement("div",{className:ae.unit},yt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Se)),(!At||!Dt)&&yt.createElement("div",{className:ae.tags},yt.createElement("div",null,yt.createElement(ot.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},yt.createElement("span",null,yt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),yt.createElement("span",null,_t.stages_count))),yt.createElement(ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},yt.createElement("span",null,yt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),yt.createElement("span",null,_t.members_count)))))))})),!ft.length&&yt.createElement(kt.Z,null)))}},9148:function(pn,dn,ue){"use strict";ue.d(dn,{jL:function(){return Bt},w9:function(){return ve},QD:function(){return Ue},cQ:function(){return se.Z},op:function(){return Oe},O5:function(){return Vn},_b:function(){return bn},t7:function(){return it},Gi:function(){return Ce},YG:function(){return de},qp:function(){return Tt},vr:function(){return rn},qE:function(){return qe},Je:function(){return dt},wb:function(){return oe},cq:function(){return Kt},tp:function(){return ft}});var ae=ue(59301),Re={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"},ot="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==",Bt=({dataSource:Rn=[],img:zn,imgWidth:Wn=346,title:tr,sunTitle:Ar,bannerExtraContent:sn})=>ae.createElement("div",{className:Re.banner},ae.createElement("div",{className:Re.content},ae.createElement("aside",null,ae.createElement("p",null,ae.createElement("b",null,tr),ae.createElement("span",null,Ar)),Rn.length>0&&ae.createElement("div",{className:Re.btns},Rn.map((tn,Ye)=>ae.createElement("div",{key:Ye,onClick:tn.click},tn.name,tn.sign?ae.createElement("img",{src:ot,width:39}):null))),sn),zn&&ae.createElement("img",{style:{marginTop:33,marginRight:38},src:zn,width:Wn}))),vt={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"},gt=ue(92310),kt=ue.n(gt),Ct=ue(89392),Tt=({dataSource:Rn=[],value:zn,onChange:Wn,onTitleChange:tr,className:Ar,title:sn,titleWidth:tn=41,style:Ye={},fontColor:hn="#6A7283",showCount:nr})=>{const[Zn,mr]=(0,ae.useState)(0),[an,mn]=(0,ae.useState)(!1),$n=(0,ae.useRef)(null),fr=(0,ae.useRef)(null);return(0,ae.useEffect)(()=>{var Mn;Rn.length!==0&&(((Mn=$n==null?void 0:$n.current)==null?void 0:Mn.clientHeight)>97?mr(1):mr(0)),Rn.length===0&&mr(0),mn(!1)},[Rn]),ae.createElement("div",{className:kt()(vt.row,Ar),style:Ye},ae.createElement("div",{onClick:(0,Ct.throttle)(()=>tr==null?void 0:tr(),2e3),style:{width:tn,marginTop:an?12:4},className:`${vt.title} ${tr?"current":""}`},sn),ae.createElement("div",{className:an?`${vt.tagsWrap} ${vt.tagsBorderWrap}`:vt.tagsWrap},ae.createElement("div",{className:vt.bar,ref:fr,style:Zn>0?{height:Zn===1?97:"auto",overflow:Zn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ae.createElement("div",{className:vt.tag,ref:$n},Rn==null?void 0:Rn.map(Mn=>ae.createElement("span",{onClick:()=>Wn(Mn.id),key:Mn.id,style:{color:hn},className:zn===Mn.id?vt.active:""},ae.createElement("span",{title:Mn.name,className:vt.name},Mn.name),!!nr&&ae.createElement("span",{className:vt.num},Mn.count))))),!!Zn&&ae.createElement(ae.Fragment,null,Zn===1?ae.createElement("div",{onClick:()=>{var Mn;mr(2),((Mn=$n==null?void 0:$n.current)==null?void 0:Mn.clientHeight)>245?mn(!0):mn(!1)},className:vt.action},"\u5C55\u5F00",ae.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ae.createElement("div",{onClick:()=>{fr.current.scrollTop=0,mr(1),mn(!1)},className:vt.action},"\u6536\u8D77",ae.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},mt={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"},ft=({dataSource:Rn=[],value:zn,onChange:Wn,className:tr,style:Ar={}})=>ae.createElement("div",{style:Ar,className:kt()(mt.tabs,tr)},Rn.map(sn=>ae.createElement("span",{onClick:()=>Wn(sn.id),className:zn===sn.id?mt.active:"",key:sn.id},sn.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"},tt=ue(37568),it=({dataSource:Rn=[],value:zn="",onChange:Wn,onInputChange:tr=()=>{},className:Ar,style:sn={},placeholder:tn,allowClear:Ye=!1})=>{var hn;const[nr,Zn]=(0,ae.useState)(""),[mr,an]=(0,ae.useState)("");(0,ae.useEffect)(()=>{var fr;let Mn=zn;(fr=JSON.stringify(zn))!=null&&fr.includes("{")&&(Zn(zn.id),Mn=zn.value||"");try{an(decodeURIComponent(Mn||""))}catch(je){an(decodeURIComponent(Mn||""))}},[zn]);const mn=()=>{Wn(encodeURIComponent(mr),nr||null)},$n=fr=>{fr!==nr&&(Zn(fr),Wn(encodeURIComponent(mr),fr))};return ae.createElement("div",{className:kt()(z.input,Ar),style:sn},!!Rn.length&&ae.createElement("div",{className:z.dropdown},ae.createElement("div",{className:z.text},(hn=Rn.find(fr=>fr.id===nr))==null?void 0:hn.name,ae.createElement("i",{className:"iconfont icon-zhankai4"}),ae.createElement("b",{className:z.b1}),ae.createElement("b",{className:z.b2})),ae.createElement("div",{className:z.menu},Rn.map((fr,Mn)=>ae.createElement("div",{key:Mn,onClick:()=>$n(fr.id)},fr.name)))),ae.createElement(tt.default,{onPressEnter:mn,value:mr,onChange:fr=>{an(fr.target.value),tr(encodeURIComponent(fr.target.value),nr||null)},bordered:!1,placeholder:tn}),ae.createElement("i",{onClick:mn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},lt={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"},dt=({value:Rn,onChange:zn,className:Wn,total:tr,pageSize:Ar,style:sn={}})=>{const tn=Rn<2,Ye=Rn>=Math.ceil(tr/Ar);return tr<=Ar?ae.createElement(ae.Fragment,null):ae.createElement("div",{className:kt()(lt.quickPager,Wn),style:sn},ae.createElement("div",{onClick:()=>{tn||zn(Rn-1,"prev")},className:tn?lt.disabled:""},"\u4E0A\u4E00\u9875"),ae.createElement("div",{onClick:()=>{Ye||zn(Rn+1,"next")},className:Ye?lt.disabled:""},"\u4E0B\u4E00\u9875"))},bt={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"},At=ue(29787),Dt=ue(25399),Ft=ue(58018),jt=ue(346),Nt=ue(51257),_t=ue(96908),Wt=ue(57177),Jt=ue(81378),Ut=ue(28426),oe=({className:Rn,dataSource:zn=[],col:Wn=4,right:tr,bottom:Ar=23,precision:sn=0,wrapWidth:tn=1200,trackEventItems:Ye,loading:hn})=>{const nr=Math.floor((tn-(Wn-1)*tr)/Wn);return ae.createElement(At.Z,{spinning:hn},ae.createElement("div",{className:kt()(bt.list,Rn)},!!zn.length&&zn.map((Zn,mr)=>{const{name:an,id:mn,identifier:$n,power:fr,cover_image_id:Mn,pic:je}=Zn;return ae.createElement("div",{className:bt.wrap,key:mn,style:{width:nr,marginRight:(1+mr)%Wn===0?0:tr+sn,marginBottom:Ar}},ae.createElement("a",{target:"_blank",href:`/shixuns/${$n}/challenges`,className:bt.li,onClick:Ve=>{Ve.preventDefault(),Ye&&(0,Nt.L9)([Ye]),fr&&(0,Nt.xg)(`/shixuns/${$n}/challenges`)}},ae.createElement("div",{className:bt.img},ae.createElement("img",{className:bt.cover,src:`${je}`}),Zn.is_jupyter&&ae.createElement("img",{className:bt.sign,src:_t}),Zn.is_jupyter_lab&&ae.createElement("img",{className:bt.sign,src:Wt}),Zn.is_unity_3d&&ae.createElement("img",{className:bt.sign,src:Jt})),ae.createElement("div",{className:bt.name},ae.createElement(Dt.Z,{title:an||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ae.createElement("span",{className:bt.e},an||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ae.createElement("div",{className:bt.tags},ae.createElement(Dt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ae.createElement("span",null,Zn.challenges_count))),!!Zn.myshixuns_count&&ae.createElement(Dt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ae.createElement("span",null,Zn.myshixuns_count))),ae.createElement(Dt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ae.createElement("span",null,ae.createElement("span",null,Zn.level))),ae.createElement("div",{className:bt.rate},ae.createElement(Ft.Z,{allowHalf:!0,disabled:!0,defaultValue:Zn.score_info}),ae.createElement("span",null,"\xA0",Zn.score_info?`${Zn.score_info}\u5206`:"5\u5206")))),!fr&&ae.createElement("div",{className:bt.lockWrap},ae.createElement("img",{src:`${jt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ae.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!zn.length&&ae.createElement(Ut.Z,null)))},se=ue(10661),he={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"},be="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",Yt=ue(59301),ve=({className:Rn,dataSource:zn=[],col:Wn=4,right:tr,bottom:Ar=23,precision:sn=0,wrapWidth:tn=1200,trackEventItems:Ye,loading:hn,handleVery:nr=()=>!0})=>{const Zn=Math.floor((tn-(Wn-1)*tr)/Wn);return Yt.createElement(At.Z,{spinning:hn},Yt.createElement("div",{className:kt()(he.list,Rn)},!!zn.length&&zn.map((mr,an)=>{const{subject_identifier:mn,id:$n,identifier:fr,power:Mn}=mr,je=mr.is_public!=0&&mr.is_public;return Yt.createElement("div",{className:he.wrap,key:$n,style:{width:Zn,marginRight:(1+an)%Wn===0?0:tr+sn,marginBottom:Ar}},Yt.createElement("a",{className:he.li,onClick:Ve=>{Ve.preventDefault(),nr(mr==null?void 0:mr.first_category_url)&&(Ye&&(0,Nt.L9)([Ye]),(0,Nt.xg)(mr.first_category_url))}},Yt.createElement("div",{className:he.top},Yt.createElement(Dt.Z,{title:mr.name},Yt.createElement("div",{className:he.name},mr.name)),Yt.createElement("img",{className:he.img,src:jt.Z.IMG_SERVER+"/images/"+mr.avatar_url}),Yt.createElement("div",{className:he.text,title:mr.creator},mr.creator),mn&&Yt.createElement("div",{className:he.btns},Yt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Yt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),je&&Yt.createElement("div",{className:he.sign},"\u516C\u5F00")),Yt.createElement("div",{className:he.bottom},mr.visits>0&&Yt.createElement(Dt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-liulanyan"}),Yt.createElement("span",null,mr.visits))),mr.course_members_count>0&&Yt.createElement(Dt.Z,{title:"\u6210\u5458",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-chengyuan"}),mr.course_members_count)),mr.tasks_count>0&&Yt.createElement(Dt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-zuoye"}),mr.tasks_count)),mr.is_end?Yt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Yt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!mr.is_accessible&&Yt.createElement("div",{className:he.lockWrap},Yt.createElement("img",{src:`${jt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Yt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!zn.length&&Yt.createElement(Ut.Z,null)))},Se={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"},we=ue(25690),de=({dataSource:Rn=[],value:zn,onChange:Wn,className:tr,style:Ar={},tabBarExtraContent:sn})=>ae.createElement("div",{className:kt()(Se.tabs,tr),style:Ar},ae.createElement("div",{className:Se.tabsWrap},Rn.map((tn,Ye)=>!(tn!=null&&tn.hide)&&ae.createElement("aside",{className:Se.tab,onClick:()=>{Wn(tn.id),tn.link&&we.history.push(tn.link)},key:Ye},ae.createElement("div",{className:zn===tn.id?Se.active:""},tn.name),(tn==null?void 0:tn.resetCount)==null&&(tn==null?void 0:tn.total)!==void 0&&ae.createElement("span",null,"\uFF08",tn==null?void 0:tn.total,"\uFF09"),(tn==null?void 0:tn.resetCount)!==void 0&&(tn==null?void 0:tn.total)!==void 0&&ae.createElement(Dt.Z,{title:(tn==null?void 0:tn.tip)!=null?tn==null?void 0:tn.tip:""},ae.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ae.createElement("span",{style:{color:"#000"}},tn==null?void 0:tn.resetCount),"/",ae.createElement("span",null,tn==null?void 0:tn.total),"\uFF09"))))),ae.createElement("div",{className:Se.tabBar},sn)),Ce=({className:Rn,style:zn={},children:Wn})=>ae.createElement("div",{className:kt()(Rn),style:zn},Wn),fe={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"},me=ue(75727),ke=ue(93041);const pe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Kt=({sortValue:Rn,dropValue:zn,className:Wn,onSort:tr,onDrop:Ar,dataSource:sn=pe})=>{var tn;return ae.createElement("div",{className:kt()(fe.orderWrap,Wn)},ae.createElement(me.Z,{dropdownRender:()=>ae.createElement(ke.default,null,sn.map((Ye,hn)=>ae.createElement(ke.default.Item,{key:hn,onClick:()=>Ar(Ye.id)},Ye.name)))},ae.createElement("span",{className:fe.orderTextWrap},(tn=sn.find(Ye=>zn===Ye.id))==null?void 0:tn.name)),ae.createElement("span",{className:fe.orderIconWrap},ae.createElement("span",{className:fe.orderAsc},ae.createElement("i",{className:Rn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${fe.cursorPointer} ${fe.active}`:`iconfont icon-sanjiaoxing-up font12 ${fe.cursorPointer}`,onClick:()=>tr(Rn==="asc"?"desc":"asc")})),ae.createElement("span",{className:fe.orderDesc},ae.createElement("i",{className:Rn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${fe.cursorPointer} ${fe.active}`:`iconfont icon-sanjiaoxing-down font12 ${fe.cursorPointer}`,onClick:()=>tr(Rn==="asc"?"desc":"asc")}))))},wt={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"},Lt=ue(99571),Zt=Object.defineProperty,ee=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Ht=(Rn,zn,Wn)=>zn in Rn?Zt(Rn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Wn}):Rn[zn]=Wn,re=(Rn,zn)=>{for(var Wn in zn||(zn={}))It.call(zn,Wn)&&Ht(Rn,Wn,zn[Wn]);if(ee)for(var Wn of ee(zn))Rt.call(zn,Wn)&&Ht(Rn,Wn,zn[Wn]);return Rn},ye=(Rn,zn)=>{var Wn={};for(var tr in Rn)It.call(Rn,tr)&&zn.indexOf(tr)<0&&(Wn[tr]=Rn[tr]);if(Rn!=null&&ee)for(var tr of ee(Rn))zn.indexOf(tr)<0&&Rt.call(Rn,tr)&&(Wn[tr]=Rn[tr]);return Wn},Pe=(Rn,zn,Wn)=>new Promise((tr,Ar)=>{var sn=hn=>{try{Ye(Wn.next(hn))}catch(nr){Ar(nr)}},tn=hn=>{try{Ye(Wn.throw(hn))}catch(nr){Ar(nr)}},Ye=hn=>hn.done?tr(hn.value):Promise.resolve(hn.value).then(sn,tn);Ye((Wn=Wn.apply(Rn,zn)).next())}),Oe=Rn=>{var zn=Rn,{className:Wn,style:tr,children:Ar,loading:sn=!1,openLoading:tn,onClick:Ye=()=>{},size:hn="middle",shape:nr="round"}=zn,Zn=ye(zn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[mr,an]=(0,ae.useState)(!1);return ae.createElement(Lt.ZP,re({onClick:(0,Ct.throttle)(mn=>Pe(void 0,null,function*(){tn&&an(!0);try{yield Ye(mn)}catch($n){console.log("error",$n)}tn&&an(!1)}),2e3,{leading:!0,trailing:!1}),className:kt()(wt.btn,wt[`${hn}-${nr}`],Wn),style:tr,size:hn,shape:nr,loading:mr||sn},Zn),Ar)},Ie={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"},qe=({className:Rn,style:zn,children:Wn=null,onClick:tr,title:Ar})=>ae.createElement("div",{className:kt()(Ie.head,Rn),style:zn},ae.createElement("span",{className:"primary-hover",onClick:tr},ae.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ae.createElement("b",{title:Ar},Ar),ae.createElement("div",{className:Ie.node},Wn)),nn={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"},Ue=({confirmShow:Rn=!0,confirmTitle:zn,confirmClick:Wn,cancelShow:tr=!0,cancelTitle:Ar,cancelClick:sn,className:tn,style:Ye,confirmLoading:hn=!1})=>ae.createElement("div",{className:kt()(nn.btns,tn),style:Ye},Rn&&ae.createElement(Lt.ZP,{loading:hn,onClick:Wn,type:"primary",className:nn.confirm},zn),tr&&ae.createElement(Lt.ZP,{onClick:sn,className:nn.cancel},Ar)),We={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"},rn=({className:Rn,style:zn={},LeftContent:Wn,children:tr,RightContent:Ar})=>ae.createElement("div",{className:kt()(We.fixedBottom,Rn),style:zn},ae.createElement("div",{className:We.wrap},ae.createElement("div",{className:We.left},Wn),ae.createElement("div",{className:We.center},tr),ae.createElement("div",{className:We.right},Ar))),ln={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"},bn=({className:Rn,style:zn={},dataSource:Wn=[]})=>ae.createElement("div",{className:kt()(ln.crumbs,Rn),style:zn},Wn.map((tr,Ar)=>Ar<Wn.length-1?ae.createElement(ae.Fragment,{key:Ar},tr.path||tr.onClick?ae.createElement("span",{className:ln.hover,onClick:tr!=null&&tr.onClick?tr.onClick:()=>we.history.push(tr.path)},tr.name):ae.createElement("span",null,tr.name),ae.createElement("span",null,"\xA0",">","\xA0")):ae.createElement("span",{key:Ar,style:{color:"#5F6368"}},tr.name))),In=ue(11938),jn=Object.defineProperty,Kn=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,jr=(Rn,zn,Wn)=>zn in Rn?jn(Rn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Wn}):Rn[zn]=Wn,yr=(Rn,zn)=>{for(var Wn in zn||(zn={}))Er.call(zn,Wn)&&jr(Rn,Wn,zn[Wn]);if(pr)for(var Wn of pr(zn))Or.call(zn,Wn)&&jr(Rn,Wn,zn[Wn]);return Rn},rr=(Rn,zn)=>Kn(Rn,kr(zn)),Rr=(Rn,zn)=>{var Wn={};for(var tr in Rn)Er.call(Rn,tr)&&zn.indexOf(tr)<0&&(Wn[tr]=Rn[tr]);if(Rn!=null&&pr)for(var tr of pr(Rn))zn.indexOf(tr)<0&&Or.call(Rn,tr)&&(Wn[tr]=Rn[tr]);return Wn};const{Countdown:te}=In.default;var Vn=Rn=>{var zn=Rn,{onChange:Wn}=zn,tr=Rr(zn,["onChange"]);const[Ar,sn]=(0,ae.useState)(null);(0,ae.useEffect)(()=>{typeof Ar=="number"&&Ar>=0&&Wn(Ar)},[Ar]);const tn=Ye=>{const hn=Math.floor(Ye/1e3);sn(hn)};return ae.createElement(te,rr(yr({},tr),{onChange:tn}))}},37808:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return Re}});var ae=ue(59301);function Re(ot,zt){const Bt=(0,ae.useRef)();(0,ae.useEffect)(()=>{Bt.current=ot}),(0,ae.useEffect)(()=>{function vt(){Bt.current()}if(zt!==null){let gt=setInterval(vt,zt);return()=>clearInterval(gt)}},[zt])}},96662:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return _t}});var ae=ue(59301),Re=ue(28284),ot=ue(30641),zt=ue(62957),Bt=ue(6767),vt=ue(62673),gt=ue(75975),kt=ue(58397),Ct=ue(91558),yt=ue(23992),Tt={"code-panel-container":"code-panel-container___RFtv_","action-oj-bar":"action-oj-bar___ByFmZ",active:"active___s9gT5",tip:"tip___XZhl7"},mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAcCAYAAAAJKR1YAAAAAXNSR0IArs4c6QAAA8pJREFUWEfdl1toHUUYx//f7p7LbnIuSU4bk2JqS3qxbTA9FsQXBamJNMVS8CEPAfGhakQFUaHQh2Kp4IPgBfTBBx9UUHyQGgslscGCIr2QHlpfWg1pktPW0rTunvttdqadTY85yUmTTXJSwe9pZ3dm/r/5f8PMtzQYs96FwEEI0Yj/KojGVUV5Y3dn8DgNnrduV8IQAWtCXty0iggYGmybI1vgiIS8MFNF2Hx1qInoRFc0vIcGR0xRKaEqQGuTH/GpPBqDHjDGkczaWBfxOZAlNqt77eiIznZHw09UAWkqIaCrEKDaiVXNJJDMMPDKtc0HJBE624PwaMoqwkxPnciUcDmemdGZD8irETrbQ6sOIwVKjCM2mvyfAp25VsTjLV7Ml9kEB0gAQXVho2vm0MCfOXwxksbeTTpe3VU/S5UBOJ6afvWMsTBUTYDKMA/Vq/hgdxgRvXrzT5SA03nAtwjUioHcwJTtcgO1IqClwLiFWjYQ48BbQyaumAz7thg4EK1zdSwUBPBzFkhz4DEv8KjMYUUsG0jOkSoIHPrFwpjJ0LujDn0dxoJQEuZUFjA5sN0HdHiru68IaClQbmBqdjBWOtXXUYfeHbOdkvfu8Bxn4qyAj1Pj2KgZ6NEjeETTHbtW7FDZdAl19NcEXuysx7aIVpWLWB7OgVlOk31X/JD1F+IsBxWE/kAbnvSFage02I5mEBhjOWzWZtyT7cPWKDgEfKTgw4atCHDlwdxl54pJfJqcwJFwOzbcS49cxDeZv3EiN+Wsp9dowXPepgcD9GP2Jr7P3kCbpuNoeBPKV9rZYgKfJCccoKf9jXjJ37o4kELT9ZAmy8ZlxnD+H3yZvuqM3m804wWjGb8VLHyVuY4Ml7cdsFdfix6K4NJkekblfhWjz6MgWFe9Wd3ymcTwkTqOcultQEUWcmvPxAF7HYJJDcyuKBkrgBIAgm4F3fQ7bSRwxpDTzh99ZguabM/sj0Qnu6PhZ2loxHpfEN6GEHMOdzfS9+8T01OQYEWq/k1pK/mxP7H238FEZAlQf3c09J1Tyf8eF3ohm1r0kmJ58R5n/DW3qNwvXvmh3hzLodBqonREAOvLY0PQ3nw5//C3sh3YHEjsIirJZ9e/FsPnc+sZCpeX5CTRaNPO0DYptmfy4lMATkEIR5MASzV8bQNrtt4r6aZRXQMNxcyvBUefW3fK/UhRXu/aGfpMtnsmL3wuBPodYcJ1TyC4/VjDBqtyTldAJ/9IN/MiOyYISz4PCOJGV7RhnxR9fupSwM4VBwBMKJrvnZ9at9yau8A7ulgdO7eZq+0AAAAASUVORK5CYII=",xt=ue(89392),ft=ue(9148),z=ue(59301),tt=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,bt=(Jt,Ut,Vt)=>Ut in Jt?tt(Jt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Jt[Ut]=Vt,At=(Jt,Ut)=>{for(var Vt in Ut||(Ut={}))ut.call(Ut,Vt)&&bt(Jt,Vt,Ut[Vt]);if(lt)for(var Vt of lt(Ut))dt.call(Ut,Vt)&&bt(Jt,Vt,Ut[Vt]);return Jt},Dt=(Jt,Ut)=>at(Jt,it(Ut));const Ft={theme:(0,yt.G)("cmCodeMode","vs-dark"),fontSize:(0,yt.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,yt.G)("cmTabToSpace",!0)};var jt=(Jt=>(Jt[Jt.set_font_size=0]="set_font_size",Jt[Jt.set_theme=1]="set_theme",Jt[Jt.on_tab_to_space=2]="on_tab_to_space",Jt[Jt.set_show_editor_setting=3]="set_show_editor_setting",Jt))(jt||{});function Nt(Jt,Ut){switch(Ut.type){case 3:return Dt(At({},Jt),{showEditorSetting:Ut.payload});case 1:return Dt(At({},Jt),{theme:Ut.payload});case 0:return Dt(At({},Jt),{fontSize:Ut.payload});case 2:return Dt(At({},Jt),{tabToSpace:Ut.payload});default:throw new Error}}var _t=({isLoading:Jt,value:Ut=[],onChange:Vt,form:oe})=>{var se;const[he,be]=(0,ae.useReducer)(Nt,Ft),{theme:Yt,fontSize:ne,showEditorSetting:ve,tabToSpace:Se}=he,[we,ce]=(0,ae.useState)("C"),[de,le]=(0,ae.useState)(!1),[Ce,fe]=(0,ae.useState)([]),me=(0,ae.useRef)([]),ke=Re.default.useWatch(["hack","languages"],oe);(0,ae.useEffect)(()=>{Ut!=null&&Ut.length&&(me.current=(0,xt.cloneDeep)(Ut))},[Ut]),(0,ae.useEffect)(()=>{de&&fe(ke)},[de]),(0,ae.useEffect)(()=>{ce(ke==null?void 0:ke[0])},[ke]);const pe={onFontSizeChange:ee=>{be({type:0,payload:ee}),(0,yt.t)("cmFontSize",ee)},tabToSpace:Se,cmFontSize:ne,className:"oj",cmCodeMode:Yt,onTabToSpace:ee=>{be({type:2,payload:ee}),(0,yt.t)("cmTabToSpace",ee)},onCodeModeChange:ee=>{be({type:1,payload:ee}),(0,yt.t)("cmCodeMode",ee)}};function qt(){be({type:3,payload:!1})}function Kt(){be({type:3,payload:!0})}function wt(ee){var It;const Rt=(It=me.current)==null?void 0:It.map(Ht=>(Ht.language===we&&(Ht.code=ee),Ht));me.current=(0,xt.cloneDeep)(Rt),Vt(Rt)}const Lt={key:we,value:(se=Ut==null?void 0:Ut.find(ee=>ee.language===we))==null?void 0:se.code,language:we,onChange:wt,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:ne,insertSpaces:Se}};console.log(888,Ut,ke);const Zt=Ut.filter(ee=>ke==null?void 0:ke.includes(ee.language));return z.createElement(ae.Fragment,null,z.createElement("div",{className:Tt["code-panel-container"]},z.createElement(Wt,{setVisible:le,languageItems:Zt,onLanguage:ee=>ce(ee),language:we,onShowCodeSetting:Kt}),!Jt&&z.createElement(gt.ZP,At({},Lt))),z.createElement(Ct.Z,null,z.createElement(ot.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ve,onClose:qt},z.createElement(kt.Z,At({},pe)))),z.createElement(zt.default,{centered:!0,open:de,title:"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E",width:564,onOk:()=>{if(!Ce.length){Bt.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}oe.setFieldValue(["hack","languages"],Ce),le(!1)},onCancel:()=>le(!1)},z.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},z.createElement(vt.default.Group,{value:Ce,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:ee=>{fe(ee)}}))))};function Wt({languageItems:Jt,language:Ut,onShowCodeSetting:Vt,onLanguage:oe,setVisible:se}){return z.createElement("div",{className:Tt["action-oj-bar"]},Jt==null?void 0:Jt.map(he=>z.createElement("aside",{className:Ut===(he==null?void 0:he.language)?Tt.active:"",onClick:()=>oe(he==null?void 0:he.language),key:he==null?void 0:he.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,he==null?void 0:he.language))),z.createElement("div",{className:Tt.tip},z.createElement("i",{className:"iconfont icon-tishi12 font14",style:{color:"#FEB636",marginRight:3}}),z.createElement("span",null,"\u8BBE\u7F6E\u521D\u59CB\u4EE3\u7801\uFF0C\u4E3A\u5B66\u751F\u63D0\u4F9B\u660E\u786E\u7F16\u8BD1\u8D77\u70B9")),z.createElement(ft.op,{onClick:()=>se(!0),shape:"default"},z.createElement("img",{src:mt,width:18,style:{marginRight:8}}),"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E"))}},93946:function(pn,dn,ue){"use strict";ue.d(dn,{GM:function(){return kt},MK:function(){return gt},PR:function(){return Re},ZS:function(){return yt},d1:function(){return ot},fu:function(){return zt},j2:function(){return Ct},l_:function(){return Bt},uE:function(){return Tt},zQ:function(){return vt}});var ae=ue(38986);function Re(){return(0,ae.U2)("problems/new.json")}function ot(xt="question"){return(0,ae.U2)("disciplines.json",{source:xt})}function zt(xt){return(0,ae.U2)(`problems/${xt}/edit.json`)}function Bt(xt,ft){return(0,ae.gz)(`problems/${xt}.json`,ft)}function vt(xt){return(0,ae.v_)("problems.json",xt)}function gt(xt,ft){return(0,ae.v_)(`exercises/${xt}/exercise_questions.json`,ft)}function kt(xt,ft){return(0,ae.gz)(`exercise_questions/${xt}.json`,ft)}function Ct(xt){return(0,ae.v_)(`problems/${xt}/publish.json`)}function yt(xt){return(0,ae.v_)(`problems/${xt}/cancel_publish.json`)}function Tt(xt){return(0,ae.U2)(`problems/${xt}/start.json`)}function mt(xt,ft){return post("tag_disciplines.json",{name:ft,sub_discipline_id:xt})}},72937:function(pn,dn,ue){"use strict";ue.d(dn,{D0:function(){return gt},R8:function(){return zt},jw:function(){return vt},y3:function(){return kt}});var ae=ue(82326),Re=ue(59301);const{Option:ot}=ae.default;var zt=(Ct=>(Ct[Ct.language=0]="language",Ct[Ct.difficult=1]="difficult",Ct[Ct.category=2]="category",Ct[Ct.openOrNot=3]="openOrNot",Ct))(zt||{});const Bt={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function vt(Ct){return Bt[Ct].map(yt=>Re.createElement(ot,{key:yt.title,value:yt.key}," ",yt.title," "))}function gt(Ct,yt){Ct.map(Tt=>{const{id:mt,name:xt,sub_disciplines:ft}=Tt;let z={value:mt,label:xt};yt.push(z),ft&&ft.length>0&&(z.children=[],gt(ft,z.children))})}function kt(Ct,yt){var Tt;let mt=[];for(let xt=0;xt<Ct.length;xt++){const ft=Ct[xt];if(((Tt=ft.sub_disciplines)==null?void 0:Tt.length)>0){mt[0]=ft.id;for(let z=0;z<ft.sub_disciplines.length;z++){const tt=ft.sub_disciplines[z];if(tt.id===yt)return mt[1]=tt.id,[mt,tt.tag_disciplines||tt.sub_disciplines||[]]}}}return[mt,[]]}},3532:function(pn,dn,ue){"use strict";ue.d(dn,{Y2:function(){return se},ZP:function(){return he}});var ae=ue(59301),Re=ue(14566),ot=ue(6767),zt=ue(62957),Bt=ue(77019),vt=ue(47889),gt=ue(99571),kt=ue(62673),Ct=ue(25399),yt=ue(37568),Tt={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",xt=ue(47257),ft=ue.n(xt),z=ue(16253),tt=ue(38986),at=ue(1012),it=ue(51257),lt=ue(45677),ut=ue(59301),dt=Object.defineProperty,bt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Nt=(be,Yt,ne)=>Yt in be?dt(be,Yt,{enumerable:!0,configurable:!0,writable:!0,value:ne}):be[Yt]=ne,_t=(be,Yt)=>{for(var ne in Yt||(Yt={}))Ft.call(Yt,ne)&&Nt(be,ne,Yt[ne]);if(Dt)for(var ne of Dt(Yt))jt.call(Yt,ne)&&Nt(be,ne,Yt[ne]);return be},Wt=(be,Yt)=>bt(be,At(Yt)),Jt=(be,Yt,ne)=>new Promise((ve,Se)=>{var we=le=>{try{de(ne.next(le))}catch(Ce){Se(Ce)}},ce=le=>{try{de(ne.throw(le))}catch(Ce){Se(Ce)}},de=le=>le.done?ve(le.value):Promise.resolve(le.value).then(we,ce);de((ne=ne.apply(be,Yt)).next())});const{Dragger:Ut}=Re.default,Vt=be=>{const Yt=Ce=>Ce&&Ce.substring(0,Ce.lastIndexOf("."));for(var ne=[...be],ve=0,Se=[],we=0;we<ne.length;we++){for(var ce="",de=0;de<Se.length;de++)if(Yt(Se[de][0].name)==Yt(ne[we].name)){ve=1,ce=de;break}if(ve==1)Se[ce].push(ne[we]),ve=0;else if(ve==0){let Ce=new Array;Ce.push(ne[we]),Se.push(Ce)}}return Se.map(Ce=>{if(Ce.forEach(fe=>{let me=fe.name.split(/\.(?=[^\.]+$)/);fe.name=`${me[0]}.${me[1].toLowerCase()}`}),Ce[0].name.includes(".in"))return Ce.length===2?Ce:[Ce[0],{}];if(Ce[0].name.includes(".out"))return Ce.length===2?Ce.reverse():[{},Ce[0]]})},oe=({onClose:be,onOK:Yt,visible:ne,wrapClassName:ve,rootIdentifier:Se,multiple:we=!1,defaultMultipleValue:ce=!0})=>{const[de,le]=(0,ae.useState)([]),[Ce,fe]=(0,ae.useState)({}),[me,ke]=(0,ae.useState)(!1),[pe,qt]=(0,ae.useState)(!0),Kt=(0,ae.useRef)([]),wt=(0,ae.useRef)(0),Lt=()=>{be()};(0,ae.useEffect)(()=>{Zt()},[]),(0,ae.useEffect)(()=>{ne&&(Kt.current=[],wt.current=0,le([]),qt(ce))},[ne]);const Zt=()=>Jt(void 0,null,function*(){try{const Ae=yield(0,tt.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Oe=JSON.parse((0,z.pe)(Ae.data));fe(Oe)}catch(Ae){}}),ee=Ae=>Ae&&Ae.substring(0,Ae.lastIndexOf(".")),It=Ae=>{var Oe,Ie;const Qe=ee((Oe=Ae[0])==null?void 0:Oe.name)||ee((Ie=Ae[1])==null?void 0:Ie.name),qe=de.filter(nn=>ee(nn.name)!==Qe);Kt.current=[...qe],le([...qe])},Rt=Ae=>{if(!pe){const Ke=new FormData;Ke.append("file",Ae.file),(0,tt.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ke},!0).then(We=>{if(We.status===0){wt.current=wt.current+1;const He=Kt.current.map(rn=>{var ln;if(rn.name===Ae.name){const un=_t({},rn);return(ln=Ae==null?void 0:Ae.name)!=null&&ln.includes(".in")?un.input=We==null?void 0:We.content:un.output=We==null?void 0:We.content,un}return rn});if(Kt.current=[...He],le([...He]),wt.current>0&&wt.current===de.length){ke(!1);let rn=Vt(He);rn=rn.filter(ln=>{var un,bn;return!!((un=ln[0])!=null&&un.name&&((bn=ln[1])!=null&&bn.name))}),rn=rn.map(ln=>Wt(_t(_t({},ln[0]),ln[1]),{is_file:!1})),Yt(rn),be()}}else ke(!1),be()});return}const Oe=new(ft())({endpoint:Ce.end_point,region:Ce.region,accessKeyId:Ce.access_key_id,accessKeySecret:Ce.access_key_secret,bucket:Ce.bucket,stsToken:Ce.security_token}),Ie=Ae.name,Qe={container_type:"TestSet",file_name:Ie},qe=(0,at.Z)();let nn=`testsets/${Se}/${qe}${Ie.indexOf(".")>-1?"."+Ie.split(".").pop():""}`;Se===null&&(nn=`testsets/${qe}${Ie.indexOf(".")>-1?"."+Ie.split(".").pop():""}`),Oe.multipartUpload(nn,new Blob([Ae.file],{type:Ae.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Ie+""},url:Ce==null?void 0:Ce.callback_url,host:Ce==null?void 0:Ce.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,tt.rz)(Qe)}}).then(function(Ke){if(Ke.data.status===0){wt.current=wt.current+1;const Ue=Kt.current.map(We=>{var He,rn,ln,un,bn,In,jn,Kn,kr,pr,Er,Or,jr,yr,rr,Rr,te;if(We.name===((rn=(He=Ke.data)==null?void 0:He.data)==null?void 0:rn.file_name)){const Qn=_t({},We);return(bn=(un=(ln=Ke.data)==null?void 0:ln.data)==null?void 0:un.file_name)!=null&&bn.includes(".in")?(Qn.in_object_key=(jn=(In=Ke.data)==null?void 0:In.data)==null?void 0:jn.object,Qn.in_object_size=(kr=(Kn=Ke.data)==null?void 0:Kn.data)==null?void 0:kr.size,Qn.input=(Er=(pr=Ke.data)==null?void 0:pr.data)==null?void 0:Er.file_name,Qn.in_file=Ae):(Qn.out_object_key=(jr=(Or=Ke.data)==null?void 0:Or.data)==null?void 0:jr.object,Qn.out_object_size=(rr=(yr=Ke.data)==null?void 0:yr.data)==null?void 0:rr.size,Qn.output=(te=(Rr=Ke.data)==null?void 0:Rr.data)==null?void 0:te.file_name,Qn.out_file=Ae),Qn}return We});if(Kt.current=[...Ue],le([...Ue]),wt.current>0&&wt.current===de.length){ke(!1);let We=Vt(Ue);We=We.filter(He=>{var rn,ln;return!!((rn=He[0])!=null&&rn.name&&((ln=He[1])!=null&&ln.name))}),We=We.map(He=>Wt(_t(_t({},He[0]),He[1]),{is_file:!0})),Yt(We),be()}}})},Ht=Ae=>new Promise((Oe,Ie)=>{let Qe=0,qe=[];for(let nn=0;nn<Ae.length;nn++)Ae[nn].file.slice(0,1).arrayBuffer().then(()=>{Qe++,Qe===Ae.length&&(qe.length?(ot.ZP.warning(`${qe.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ie()):Oe(Ae))}).catch(Ke=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ke),Qe++,qe.push(Ae[nn].name),Qe===Ae.length&&(qe.length?(ot.ZP.warning(`${qe.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ie()):Oe(Ae))})}),re=()=>Jt(void 0,null,function*(){if(de.length===0){ot.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Ht(de),ke(!0),Vt(de).some(Oe=>{var Ie,Qe;return!((Ie=Oe[0])!=null&&Ie.name&&((Qe=Oe[1])!=null&&Qe.name))})){zt.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Jt(void 0,null,function*(){de.map(Oe=>Jt(void 0,null,function*(){Rt(Oe)}))}),onCancel:()=>{ke(!1)}});return}de.map(Oe=>Jt(void 0,null,function*(){Rt(Oe)}))}),ye={name:"file",fileList:de,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Ae=>{if(de!=null&&de.some(Ie=>Ie.name===Ae.name))return ot.ZP.info(`${Ae.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Ae.size/1024/1024>100)return ot.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ae.name))return ot.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Oe={name:Ae.name,uid:Ae.uid,file:Ae,percent:0};return de.push(Oe),Kt.current=[...de],le([...de]),!1}},Pe=Vt(de);return console.log(de,Pe,"fileList"),ut.createElement(zt.default,{open:ne,wrapClassName:ve,onOk:re,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:me},onCancel:Lt,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ut.createElement("div",{className:Tt.wrap},de.length?ut.createElement("div",null,ut.createElement(Bt.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ut.createElement("div",{style:{visibility:we?"visible":"hidden"}},ut.createElement("span",{className:Tt.greyText},"\u7528\u4F8B\u7C7B\u578B"),ut.createElement(vt.ZP.Group,{className:`ml20 ${Tt.testCaseRadio}`,optionType:"button",value:pe,onChange:Ae=>qt(Ae.target.value)},ut.createElement(vt.ZP,{value:!1},"\u6587\u672C"),ut.createElement(vt.ZP,{value:!0},"\u6587\u4EF6"))),ut.createElement(Re.default,_t({},ye),ut.createElement(gt.ZP,{type:"primary",className:Tt.btnS},ut.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ut.createElement(se,{data:Pe,onRemove:It})):ut.createElement("div",{className:`${Tt.noData} mb30`},ut.createElement(Re.default.Dragger,Wt(_t({},ye),{className:Tt.dragger}),ut.createElement("img",{src:mt,alt:"",className:"mb20"}),ut.createElement("div",null,ut.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ut.createElement("span",{className:Tt.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ut.createElement("div",{className:Tt.text},ut.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ut.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ut.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ut.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ut.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ut.createElement("br",null))))},se=({data:be=[],onRemove:Yt,width:ne="auto",showScore:ve=!1,disabled:Se=!1,inputChange:we,onEvaluatingChange:ce,onSelectAll:de,checkAll1:le,checkAll2:Ce,checkAll3:fe,checkAll4:me,checkAll5:ke,showEvaluatingSetting:pe=!1,className:qt="",isProgramHomework:Kt=!1})=>{const wt={value:"",filename:"",dataUrl:""},[Lt,Zt]=(0,ae.useState)(_t({},wt)),ee=Ht=>{let re=document.createElement("a");document.body.appendChild(re);let ye=URL.createObjectURL(Ht.file);re.href=ye,re.download=Ht.name,re.click(),URL.revokeObjectURL(ye),document.body.removeChild(re)},It=(Ht,re)=>{(0,it.LR)(Ht,re)},Rt=(Ht,re)=>{zt.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ut.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Yt(Ht,re)},onCancel:()=>{}})};return be.length?ut.createElement("div",{className:qt,style:{width:ne}},ut.createElement("div",{className:`${Kt?Tt.headProgram:Tt.head}`},pe&&ut.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:le,onChange:Ht=>{de(Ht.target.checked,"hidden")}}),ut.createElement(Ct.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{style:{width:Kt?"25%":"15%"}},"\u7528\u4F8B"),ut.createElement("div",{style:{width:ve?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ut.createElement("div",{style:{width:ve?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),ve&&ut.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),pe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:me,onChange:Ht=>{de(Ht.target.checked,"input_visible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:Ce,onChange:Ht=>{de(Ht.target.checked,"is_invisible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:ke,onChange:Ht=>{de(Ht.target.checked,"actual_output_visible")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pe&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:fe,onChange:Ht=>{de(Ht.target.checked,"last_match_rule")}}),ut.createElement(Ct.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ut.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ut.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ut.createElement("div",{className:Tt.operation,style:Kt?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ut.createElement("div",{className:Tt.listWrapper,style:{boxShadow:Kt?"0px 2px 4px 0px #EAEEF4":"unset"}},be.map((Ht,re)=>{var ye,Pe,Ae,Oe;return ut.createElement("div",{key:re,className:Tt.list,style:Kt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},pe&&ut.createElement("div",{style:{width:"15%"}},ut.createElement(kt.default,{checked:!!Ht.hidden,onChange:Ie=>{ce(Ie.target.checked,re,"hidden")}})),ut.createElement("div",{style:{width:Kt?"25%":"15%",paddingLeft:Kt?"5px":"0px",paddingRight:Kt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",re+1),ut.createElement("div",{className:Tt.info,style:{width:ve?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Ht.input||((ye=Ht[0])==null?void 0:ye.name),onClick:()=>Jt(void 0,null,function*(){let Ie;Ht.input?Ht.input_file_url?Ie=Ht.input_file_url:Ie=Ht.in_file:Ie=Ht[0];let Qe;typeof Ie=="string"?(Qe=yield fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Zt({value:yield Qe.text(),filename:"",dataUrl:Ie})):(Qe=yield(0,it.db)(Ie.file),Zt({value:Qe.text,filename:Ie.name,dataUrl:Qe.link}))})},Ht.input||((Pe=Ht[0])==null?void 0:Pe.name))),ut.createElement("div",{className:Tt.info,style:{width:ve?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Ht.output||((Ae=Ht[1])==null?void 0:Ae.name),onClick:()=>Jt(void 0,null,function*(){let Ie;Ht.input?Ht.output_file_url?Ie=Ht.output_file_url:Ie=Ht.out_file:Ie=Ht[1];let Qe;typeof Ie=="string"?(Qe=yield fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Zt({value:yield Qe.text(),filename:"",dataUrl:Ie})):(Qe=yield(0,it.db)(Ie.file),Zt({value:Qe.text,filename:Ie.name,dataUrl:Qe.link}))})},Ht.output||((Oe=Ht[1])==null?void 0:Oe.name))),ve&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(yt.default,{size:"large",addonAfter:Kt?"%":null,disabled:Se,style:{width:"80%"},onChange:Ie=>we(Ie,re),value:Ht.score}),!Kt&&ut.createElement("span",null,"\xA0%")),pe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Ht.input_visible||!1,onChange:Ie=>{ce(Ie.target.checked,re,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Ht.is_invisible||!1,onChange:Ie=>{ce(Ie.target.checked,re,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Ht.actual_output_visible||!1,onChange:Ie=>{ce(Ie.target.checked,re,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),pe&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Ht.last_match_rule||!1,onChange:Ie=>{ce(Ie.target.checked,re,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ut.createElement("div",{onClick:()=>Rt(Ht,re),style:Kt?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ut.createElement("span",{className:Tt.del},"\u5220\u9664")))})),ut.createElement(lt.Z,{close:!0,data:Lt.dataUrl,filename:Lt.filename,type:Lt.dataUrl.length?"txt":"",onClose:()=>Zt(_t({},wt)),monacoEditor:{value:Lt.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ut.createElement(ut.Fragment,null)};var he=oe},34269:function(pn,dn,ue){"use strict";ue.d(dn,{c:function(){return Re}});var ae=(ot=>(ot.FirstPage="firstPage",ot.PrevPage="prevPage",ot.NextPage="nextPage",ot))(ae||{}),Re=(ot=>(ot[ot.Single=0]="Single",ot[ot.Multiple=1]="Multiple",ot[ot.Judge=2]="Judge",ot[ot.Fill=3]="Fill",ot[ot.Subjective=4]="Subjective",ot[ot.Shixun=5]="Shixun",ot[ot.Program=6]="Program",ot[ot.Combine=7]="Combine",ot))(Re||{})},81428:function(pn,dn,ue){"use strict";ue.d(dn,{AL:function(){return dt},Iy:function(){return Tt},Qv:function(){return ft},ez:function(){return ut},jb:function(){return mt}});var ae=ue(32834),Re=ue.n(ae),ot=ue(11690),zt=ue.n(ot);let Bt=1;function vt(jt,Nt){const _t=jt.match(/^(\s+)(?:```)/);if(_t===null)return Nt;const Wt=_t[1];return Nt.split(`
`).map(Jt=>{const Ut=Jt.match(/^\s+/);if(Ut===null)return Jt;const[Vt]=Ut;return Vt.length>=Wt.length?Jt.slice(Wt.length):Jt}).join(`
`)}let gt=[],kt=["<ul>"];const Ct=new(Re()).Renderer,yt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Tt(){gt.length=0,kt=["<ul>"]}const mt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xt(jt,Nt,_t,Wt){if(Nt>=jt.length||jt[Nt].level<=_t)return Nt;var Jt=jt[Nt];Wt.push("<li><a href='#"+Bt+Jt.anchor+"'>"+Jt.text+"</a>"),Nt++;var Ut=[];return Nt=xt(jt,Nt,Jt.level,Ut),Ut.length>0&&(Wt.push("<ul>"),Ut.forEach(function(Vt){Wt.push(Vt)}),Wt.push("</ul>")),Wt.push("</li>"),Nt=xt(jt,Nt,_t,Wt),Nt}function ft(){return xt(gt,0,0,kt),kt.push("</ul>"),kt.join("")}const z={heading(jt){const Nt=yt.exec(jt);if(Bt+=1,Nt)return{type:"heading",raw:Nt[0],depth:Nt[1].length,text:Nt[2]}},fences(jt){const Nt=this.rules.block.fences.exec(jt);if(Nt){const _t=Nt[0];let Wt=vt(_t,Nt[3]||"");const Jt=Nt[2]?Nt[2].trim():Nt[2];if(["latex","katex","math"].indexOf(Jt)>=0){const Ut=it(),Vt=Wt;Wt=Ut,lt[Ut]={type:"block",expression:Vt}}return{type:"code",raw:_t,lang:Jt,text:Wt}}}},tt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let at=0;const it=()=>`__special_katext_id_${at++}__`;let lt={};function ut(){return lt}function dt(){at=0,lt={}}function bt(jt){return jt=jt.replace(tt,(Nt,_t)=>{const Wt=it();return lt[Wt]={type:"inline",expression:_t},Wt}),jt}const At=Ct.listitem;Ct.listitem=function(jt){return At(bt(jt))};const Dt=Ct.paragraph;Ct.paragraph=function(jt){return Dt(bt(jt))};const Ft=Ct.tablecell;Ct.tablecell=function(jt,Nt){return Ft(bt(jt),Nt)},Ct.code=function(jt,Nt,_t){const Wt=(Nt||"").match(/\S*/)[0];return Wt?["latex","katex","math"].indexOf(Wt)>=0?`<p class='editormd-tex'>${jt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Nt}">${_t?jt:(0,ot.escape)(jt,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(_t?jt:(0,ot.escape)(jt,!0))+"</code></pre>"},Ct.heading=function(jt,Nt,_t){let Wt=this.options.headerPrefix+_t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return gt.push({anchor:Wt,level:Nt,text:jt}),"<h"+Nt+' id="'+Bt+Wt+'">'+jt+"</h"+Nt+">"},Re().setOptions({silent:!0,gfm:!0,pedantic:!1}),Re().use({tokenizer:z,renderer:Ct}),dn.ZP=Re()},23992:function(pn,dn,ue){"use strict";ue.d(dn,{G:function(){return Bt},t:function(){return zt}});var ae=ue(7062),Re=ue.n(ae);const ot=null;function zt(vt,gt){let kt=Re().get("__ec");kt||(kt={}),kt[vt]=gt,Re().set("__ec",kt)}function Bt(vt,gt){let kt=Re().get("__ec");return kt?kt[vt]===void 0?gt:kt[vt]:gt}},47257:function(pn){(function(dn){(function(ue){if(1)pn.exports=ue();else var ae})(function(){var ue,ae,Re;return function(){function ot(zt,Bt,vt){function gt(yt,Tt){if(!Bt[yt]){if(!zt[yt]){var mt=void 0;if(!Tt&&mt)return require(yt,!0);if(kt)return kt(yt,!0);var xt=new Error("Cannot find module '"+yt+"'");throw xt.code="MODULE_NOT_FOUND",xt}var ft=Bt[yt]={exports:{}};zt[yt][0].call(ft.exports,function(z){var tt=zt[yt][1][z];return gt(tt||z)},ft,ft.exports,ot,zt,Bt,vt)}return Bt[yt].exports}for(var kt=void 0,Ct=0;Ct<vt.length;Ct++)gt(vt[Ct]);return gt}return ot}()({1:[function(ot,zt,Bt){"use strict";var vt=ot("./browser/client");vt.Buffer=ot("buffer").Buffer,vt.urllib=ot("../shims/xhr"),vt.version=ot("./browser/version").version,zt.exports=vt},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.slice.js");var Ct=ot("assert"),yt=ot("../common/utils/checkBucketName"),Tt=yt.checkBucketName,mt=Bt;function xt(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function ft(z){return z?xt(z)?z:[z]:[]}mt.useBucket=function(tt){return Tt(tt),this.options.bucket=tt,this},mt.setBucket=function(tt){return Tt(tt),this.options.bucket=tt,this},mt.getBucket=function(){return this.options.bucket},mt.deleteBucket=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"",lt),At.next=3,this.request(ut);case 3:if(dt=At.sent,!(dt.status===200||dt.status===204)){At.next=6;break}return At.abrupt("return",{res:dt.res});case 6:return At.next=8,this.requestError(dt);case 8:throw At.sent;case 9:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketACL=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,bt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return dt=this._bucketRequestParams("PUT",it,"acl",ut),dt.headers={"x-oss-acl":lt},dt.successStatuses=[200],Dt.next=5,this.request(dt);case 5:return bt=Dt.sent,Dt.abrupt("return",{bucket:bt.headers.location&&bt.headers.location.substring(1)||null,res:bt.res});case 7:case"end":return Dt.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketACL=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("GET",it,"acl",lt),ut.successStatuses=[200],ut.xmlResponse=!0,At.next=5,this.request(ut);case 5:return dt=At.sent,At.abrupt("return",{acl:dt.data.AccessControlList.Grant,owner:{id:dt.data.Owner.ID,displayName:dt.data.Owner.DisplayName},res:dt.res});case 7:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,bt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return dt=this._bucketRequestParams("PUT",it,"logging",ut),bt=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(it,`</TargetBucket>
`),lt&&(bt+="<TargetPrefix>".concat(lt,`</TargetPrefix>
`)),bt+=`</LoggingEnabled>
</BucketLoggingStatus>`,dt.content=bt,dt.mime="xml",dt.successStatuses=[200],Ft.next=9,this.request(dt);case 9:return At=Ft.sent,Ft.abrupt("return",{res:At.res});case 11:case"end":return Ft.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,bt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return ut=this._bucketRequestParams("GET",it,"logging",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Dt.next=5,this.request(ut);case 5:return dt=Dt.sent,bt=dt.data.LoggingEnabled,Dt.abrupt("return",{enable:!!bt,prefix:bt&&bt.TargetPrefix||null,res:dt.res});case 8:case"end":return Dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketLogging=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"logging",lt),ut.successStatuses=[204,200],At.next=4,this.request(ut);case 4:return dt=At.sent,At.abrupt("return",{res:dt.res});case 6:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut){var dt,bt,At,Dt,Ft,jt,Nt,_t,Wt,Jt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:for(lt=lt||[],Ct(lt.length,"rules is required"),lt.forEach(function(oe){Ct(oe.allowedOrigin,"allowedOrigin is required"),Ct(oe.allowedMethod,"allowedMethod is required")}),dt=this._bucketRequestParams("PUT",it,"cors",ut),bt=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,At=function(se){bt+="<AllowedOrigin>".concat(se,"</AllowedOrigin>")},Dt=function(se){bt+="<AllowedMethod>".concat(se,"</AllowedMethod>")},Ft=function(se){bt+="<AllowedHeader>".concat(se,"</AllowedHeader>")},jt=function(se){bt+="<ExposeHeader>".concat(se,"</ExposeHeader>")},Nt=0,_t=lt.length;Nt<_t;Nt++)Wt=lt[Nt],bt+="<CORSRule>",ft(Wt.allowedOrigin).forEach(At),ft(Wt.allowedMethod).forEach(Dt),ft(Wt.allowedHeader).forEach(Ft),ft(Wt.exposeHeader).forEach(jt),Wt.maxAgeSeconds&&(bt+="<MaxAgeSeconds>".concat(Wt.maxAgeSeconds,"</MaxAgeSeconds>")),bt+="</CORSRule>";return bt+="</CORSConfiguration>",dt.content=bt,dt.mime="xml",dt.successStatuses=[200],Vt.next=16,this.request(dt);case 16:return Jt=Vt.sent,Vt.abrupt("return",{res:Jt.res});case 18:case"end":return Vt.stop()}},at,this)}));function tt(at,it,lt){return z.apply(this,arguments)}return tt}(),mt.getBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,bt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return ut=this._bucketRequestParams("GET",it,"cors",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Ft.next=5,this.request(ut);case 5:return dt=Ft.sent,bt=[],dt.data&&dt.data.CORSRule&&(At=dt.data.CORSRule,xt(At)||(At=[At]),At.forEach(function(jt){var Nt={};Object.keys(jt).forEach(function(_t){Nt[_t.slice(0,1).toLowerCase()+_t.slice(1,_t.length)]=jt[_t]}),bt.push(Nt)})),Ft.abrupt("return",{rules:bt,res:dt.res});case 9:case"end":return Ft.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketCORS=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return ut=this._bucketRequestParams("DELETE",it,"cors",lt),ut.successStatuses=[204],At.next=4,this.request(ut);case 4:return dt=At.sent,At.abrupt("return",{res:dt.res});case 6:case"end":return At.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.putBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt,ut,dt){var bt,At,Dt,Ft;return gt.default.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:if(bt=this._bucketRequestParams("PUT",it,"referer",dt),At=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,At+=" <AllowEmptyReferer>".concat(lt?"true":"false",`</AllowEmptyReferer>
`),ut&&ut.length>0){for(At+=` <RefererList>
`,Dt=0;Dt<ut.length;Dt++)At+=" <Referer>".concat(ut[Dt],`</Referer>
`);At+=` </RefererList>
`}else At+=` <RefererList />
`;return At+="</RefererConfiguration>",bt.content=At,bt.mime="xml",bt.successStatuses=[200],Nt.next=10,this.request(bt);case 10:return Ft=Nt.sent,Nt.abrupt("return",{res:Ft.res});case 12:case"end":return Nt.stop()}},at,this)}));function tt(at,it,lt,ut){return z.apply(this,arguments)}return tt}(),mt.getBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){var ut,dt,bt;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return ut=this._bucketRequestParams("GET",it,"referer",lt),ut.successStatuses=[200],ut.xmlResponse=!0,Dt.next=5,this.request(ut);case 5:return dt=Dt.sent,bt=dt.data.RefererList.Referer||null,bt&&(xt(bt)||(bt=[bt])),Dt.abrupt("return",{allowEmpty:dt.data.AllowEmptyReferer==="true",referers:bt,res:dt.res});case 9:case"end":return Dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt.deleteBucketReferer=function(){var z=(0,kt.default)(gt.default.mark(function at(it,lt){return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,this.putBucketReferer(it,!0,null,lt);case 2:return dt.abrupt("return",dt.sent);case 3:case"end":return dt.stop()}},at,this)}));function tt(at,it){return z.apply(this,arguments)}return tt}(),mt._bucketRequestParams=function(tt,at,it,lt){return{method:tt,bucket:at,subres:it,timeout:lt&&lt.timeout,ctx:lt&&lt.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(ot,zt,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),Ct=kt(ot("@babel/runtime/regenerator")),yt=kt(ot("@babel/runtime/helpers/asyncToGenerator"));ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.symbol.js"),ot("core-js/modules/es.symbol.description.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.to-string.js");var Tt=ot("debug")("ali-oss"),mt=ot("xml2js"),xt=ot("agentkeepalive"),ft=ot("merge-descriptors"),z=ot("platform"),tt=ot("utility"),at=ot("urllib"),it=ot("./version"),lt=ot("bowser"),ut=ot("../common/signUtils"),dt=ot("../common/client/initOptions"),bt=ot("../common/utils/createRequest"),At=bt.createRequest,Dt=ot("../common/utils/encoder"),Ft=Dt.encoder,jt=ot("../common/client/getReqUrl"),Nt=jt.getReqUrl,_t=ot("../common/utils/setSTSToken"),Wt=_t.setSTSToken,Jt=ot("../common/utils/retry"),Ut=Jt.retry,Vt=ot("../common/utils/isFunction"),oe=Vt.isFunction,se=new xt;function he(){var we=z.name,ce=z.version;we&&we.toLowerCase&&we.toLowerCase()==="ie"&&ce.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function be(){return location&&location.protocol==="https:"}function Yt(we,ce){if(he(),!(this instanceof Yt))return new Yt(we,ce);we&&we.inited?this.options=we:this.options=Yt.initOptions(we),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=at,this.agent=this.options.agent||se),this.ctx=ce,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}zt.exports=Yt,Yt.initOptions=function(ce){ce.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var de=Object.assign({secure:be(),useFetch:!1},ce);return dt(de)};var ne=Yt.prototype;ne.debug=Tt,ft(ne,ot("./object")),ft(ne,ot("./bucket")),ft(ne,ot("../common/bucket/getBucketWebsite")),ft(ne,ot("../common/bucket/putBucketWebsite")),ft(ne,ot("../common/bucket/deleteBucketWebsite")),ft(ne,ot("../common/bucket/getBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketLifecycle")),ft(ne,ot("../common/bucket/deleteBucketLifecycle")),ft(ne,ot("../common/bucket/putBucketVersioning")),ft(ne,ot("../common/bucket/getBucketVersioning")),ft(ne,ot("../common/bucket/getBucketInventory")),ft(ne,ot("../common/bucket/deleteBucketInventory")),ft(ne,ot("../common/bucket/listBucketInventory")),ft(ne,ot("../common/bucket/putBucketInventory")),ft(ne,ot("../common/bucket/abortBucketWorm")),ft(ne,ot("../common/bucket/completeBucketWorm")),ft(ne,ot("../common/bucket/extendBucketWorm")),ft(ne,ot("../common/bucket/getBucketWorm")),ft(ne,ot("../common/bucket/initiateBucketWorm")),ft(ne,ot("./managed-upload")),ft(ne,ot("../common/multipart-copy")),ft(ne,ot("../common/multipart")),ft(ne,ot("../common/parallel")),ne.signature=function(ce){return this.debug("authorization stringToSign: %s",ce,"info"),ut.computeSignature(this.options.accessKeySecret,ce,this.options.headerEncoding)},ne._getReqUrl=Nt,ne.authorization=function(ce,de,le,Ce){var fe=ut.buildCanonicalString(ce.toUpperCase(),de,{headers:Ce,parameters:le});return ut.authorization(this.options.accessKeyId,this.options.accessKeySecret,fe,this.options.headerEncoding)},ne.request=function(){var we=(0,yt.default)(Ct.default.mark(function ce(de){var le=this;return Ct.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(!this.options.retryMax){fe.next=6;break}return fe.next=3,Ut(ve.bind(this),this.options.retryMax,{errorHandler:function(ke){var pe=function(Kt){if(de.stream)return!1;var wt=[-1,-2].includes(Kt.status),Lt=le.options.requestErrorRetryHandle||function(){return!0};return wt&&Lt(Kt)};return!!pe(ke)}})(de);case 3:return fe.abrupt("return",fe.sent);case 6:return fe.abrupt("return",ve.call(this,de));case 7:case"end":return fe.stop()}},ce,this)}));return function(ce){return we.apply(this,arguments)}}();function ve(we){return Se.apply(this,arguments)}function Se(){return Se=(0,yt.default)(Ct.default.mark(function we(ce){var de,le,Ce,fe,me,ke;return Ct.default.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(!(this.options.stsToken&&oe(this.options.refreshSTSToken))){qt.next=3;break}return qt.next=3,Wt.call(this);case 3:return de=At.call(this,ce),this.options.useFetch||(de.params.mode="disable-fetch"),fe=!!ce.stream,qt.prev=6,qt.next=9,this.urllib.request(de.url,de.params);case 9:le=qt.sent,this.debug("response %s %s, got %s, headers: %j",ce.method,de.url,le.status,le.headers,"info"),qt.next=16;break;case 13:qt.prev=13,qt.t0=qt.catch(6),Ce=qt.t0;case 16:if(!(le&&ce.successStatuses&&ce.successStatuses.indexOf(le.status)===-1)){qt.next=28;break}return qt.next=19,this.requestError(le);case 19:if(me=qt.sent,!(me.code==="RequestTimeTooSkewed"&&!fe)){qt.next=25;break}return this.options.amendTimeSkewed=+new Date(me.serverTime)-new Date,qt.next=24,this.request(ce);case 24:return qt.abrupt("return",qt.sent);case 25:me.params=ce,qt.next=32;break;case 28:if(!Ce){qt.next=32;break}return qt.next=31,this.requestError(Ce);case 31:me=qt.sent;case 32:if(!me){qt.next=34;break}throw me;case 34:if(!ce.xmlResponse){qt.next=39;break}return qt.next=37,this.parseXML(le.data);case 37:ke=qt.sent,le.data=ke;case 39:return qt.abrupt("return",le);case 40:case"end":return qt.stop()}},we,this,[[6,13]])})),Se.apply(this,arguments)}ne._getResource=function(ce){var de="/";return ce.bucket&&(de+="".concat(ce.bucket,"/")),ce.object&&(de+=Ft(ce.object,this.options.headerEncoding)),de},ne._escape=function(ce){return tt.encodeURIComponent(ce).replace(/%2F/g,"/")},ne._getUserAgent=function(){var ce=gt&&gt.browser?"js":"nodejs",de="aliyun-sdk-".concat(ce,"/").concat(it.version),le=z.description;return!le&&gt&&(le="Node.js ".concat(gt.version.slice(1)," on ").concat(gt.platform," ").concat(gt.arch)),this._checkUserAgent("".concat(de," ").concat(le))},ne._checkUserAgent=function(ce){var de=ce.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return de},ne.checkBrowserAndVersion=function(ce,de){return lt.name===ce&&lt.version.split(".")[0]===de},ne.parseXML=function(ce){return new Promise(function(de,le){vt.isBuffer(ce)&&(ce=ce.toString()),mt.parseString(ce,{explicitRoot:!1,explicitArray:!1},function(Ce,fe){Ce?le(Ce):de(fe)})})},ne.requestError=function(){var we=(0,yt.default)(Ct.default.mark(function de(le){var Ce,fe,me,ke;return Ct.default.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(Ce=null,!(!le.data||!le.data.length)){qt.next=5;break}le.status===-1||le.status===-2?(Ce=new Error(le.message),Ce.name=le.name,Ce.status=le.status,Ce.code=le.name):(le.status===404?(Ce=new Error("Object not exists"),Ce.name="NoSuchKeyError",Ce.status=404,Ce.code="NoSuchKey"):le.status===412?(Ce=new Error("Pre condition failed"),Ce.name="PreconditionFailedError",Ce.status=412,Ce.code="PreconditionFailed"):(Ce=new Error("Unknow error, status: ".concat(le.status)),Ce.name="UnknownError",Ce.status=le.status),Ce.requestId=le.headers["x-oss-request-id"],Ce.host=""),qt.next=32;break;case 5:return fe=String(le.data),this.debug("request response error data: %s",fe,"error"),qt.prev=7,qt.next=10,this.parseXML(fe);case 10:if(qt.t0=qt.sent,qt.t0){qt.next=13;break}qt.t0={};case 13:me=qt.t0,qt.next=23;break;case 16:return qt.prev=16,qt.t1=qt.catch(7),this.debug(fe,"error"),qt.t1.message+=`
raw xml: `.concat(fe),qt.t1.status=le.status,qt.t1.requestId=le.headers["x-oss-request-id"],qt.abrupt("return",qt.t1);case 23:ke=me.Message||"unknow request error, status: ".concat(le.status),me.Condition&&(ke+=" (condition: ".concat(me.Condition,")")),Ce=new Error(ke),Ce.name=me.Code?"".concat(me.Code,"Error"):"UnknownError",Ce.status=le.status,Ce.code=me.Code,Ce.requestId=me.RequestId,Ce.hostId=me.HostId,Ce.serverTime=me.ServerTime;case 32:return this.debug("generate error %j",Ce,"error"),qt.abrupt("return",Ce);case 34:case"end":return qt.stop()}},de,this,[[7,16]])}));function ce(de){return we.apply(this,arguments)}return ce}()}).call(this)}).call(this,{isBuffer:ot("../../node_modules/is-buffer/index.js")},ot("_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(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),yt=ot("util"),Tt=ot("path"),mt=ot("mime"),xt=ot("copy-to"),ft=ot("../common/utils/isBlob"),z=ft.isBlob,tt=ot("../common/utils/isFile"),at=tt.isFile,it=ot("../common/utils/isBuffer"),lt=it.isBuffer,ut=Bt;ut.multipartUpload=function(){var Ft=(0,Ct.default)(kt.default.mark(function Nt(_t,Wt){var Jt,Ut,Vt,oe,se,he,be,Yt,ne,ve=arguments;return kt.default.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Jt=ve.length>2&&ve[2]!==void 0?ve[2]:{},this.resetCancelFlag(),Jt.disabledMD5=Jt.disabledMD5===void 0?!0:!!Jt.disabledMD5,!(Jt.checkpoint&&Jt.checkpoint.uploadId)){we.next=8;break}return Wt&&at(Wt)&&(Jt.checkpoint.file=Wt),we.next=7,this._resumeMultipart(Jt.checkpoint,Jt);case 7:return we.abrupt("return",we.sent);case 8:return Ut=102400,Jt.mime||(at(Wt)?Jt.mime=mt.getType(Tt.extname(Wt.name)):z(Wt)?Jt.mime=Wt.type:lt(Wt)?Jt.mime="":Jt.mime=mt.getType(Tt.extname(Wt))),Jt.headers=Jt.headers||{},this._convertMetaToHeaders(Jt.meta,Jt.headers),we.next=14,this._getFileSize(Wt);case 14:if(Vt=we.sent,!(Vt<Ut)){we.next=26;break}return Jt.contentLength=Vt,we.next=19,this.put(_t,Wt,Jt);case 19:if(oe=we.sent,!(Jt&&Jt.progress)){we.next=23;break}return we.next=23,Jt.progress(1);case 23:return se={res:oe.res,bucket:this.options.bucket,name:_t,etag:oe.res.headers.etag},(Jt.headers&&Jt.headers["x-oss-callback"]||Jt.callback)&&(se.data=oe.data),we.abrupt("return",se);case 26:if(!(Jt.partSize&&parseInt(Jt.partSize,10)!==Jt.partSize)){we.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Jt.partSize&&Jt.partSize<Ut)){we.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ut));case 30:return we.next=32,this.initMultipartUpload(_t,Jt);case 32:if(he=we.sent,be=he.uploadId,Yt=this._getPartSize(Vt,Jt.partSize),ne={file:Wt,name:_t,fileSize:Vt,partSize:Yt,uploadId:be,doneParts:[]},!(Jt&&Jt.progress)){we.next=39;break}return we.next=39,Jt.progress(0,ne,he.res);case 39:return we.next=41,this._resumeMultipart(ne,Jt);case 41:return we.abrupt("return",we.sent);case 42:case"end":return we.stop()}},Nt,this)}));function jt(Nt,_t){return Ft.apply(this,arguments)}return jt}(),ut._resumeMultipart=function(){var Ft=(0,Ct.default)(kt.default.mark(function Nt(_t,Wt){var Jt,Ut,Vt,oe,se,he,be,Yt,ne,ve,Se,we,ce,de,le,Ce,fe,me,ke;return kt.default.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(Jt=this,!this.isCancel()){qt.next=3;break}throw this._makeCancelEvent();case 3:return Ut=_t.file,Vt=_t.fileSize,oe=_t.partSize,se=_t.uploadId,he=_t.doneParts,be=_t.name,Yt=[],he.length>0&&xt(he).to(Yt),ne=this._divideParts(Vt,oe),ve=ne.length,Se=!1,we=function(wt,Lt){return new Promise(function(){var Zt=(0,Ct.default)(kt.default.mark(function ee(It,Rt){var Ht,re,ye,Pe,Ae;return kt.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ie.prev=0,wt.isCancel()){Ie.next=29;break}return Ht=ne[Lt-1],Ie.next=5,wt._createBuffer(Ut,Ht.start,Ht.end);case 5:return re=Ie.sent,ye={content:re,size:Ht.end-Ht.start},Ie.prev=7,Ie.next=10,wt._uploadPart(be,se,Lt,ye,Wt);case 10:Pe=Ie.sent,Ie.next=18;break;case 13:if(Ie.prev=13,Ie.t0=Ie.catch(7),Ie.t0.status!==404){Ie.next=17;break}throw wt._makeAbortEvent();case 17:throw Ie.t0;case 18:if(!(!wt.isCancel()&&!Se)){Ie.next=26;break}if(_t.doneParts.push({number:Lt,etag:Pe.res.headers.etag}),!Wt.progress){Ie.next=23;break}return Ie.next=23,Wt.progress(he.length/(ve+1),_t,Pe.res);case 23:It({number:Lt,etag:Pe.res.headers.etag}),Ie.next=27;break;case 26:It();case 27:Ie.next=30;break;case 29:It();case 30:Ie.next=41;break;case 32:Ie.prev=32,Ie.t1=Ie.catch(0),Ae=new Error,Ae.name=Ie.t1.name,Ae.message=Ie.t1.message,Ae.stack=Ie.t1.stack,Ae.partNum=Lt,xt(Ie.t1).to(Ae),Rt(Ae);case 41:case"end":return Ie.stop()}},ee,null,[[0,32],[7,13]])}));return function(ee,It){return Zt.apply(this,arguments)}}())},ce=Array.from(new Array(ve),function(Kt,wt){return wt+1}),de=Yt.map(function(Kt){return Kt.number}),le=ce.filter(function(Kt){return de.indexOf(Kt)<0}),Ce=5,fe=Wt.parallel||Ce,qt.next=17,this._parallel(le,fe,function(Kt){return new Promise(function(wt,Lt){we(Jt,Kt).then(function(Zt){Zt&&Yt.push(Zt),wt()}).catch(function(Zt){Lt(Zt)})})});case 17:if(me=qt.sent,Se=!0,ke=me.find(function(Kt){return Kt.name==="abort"}),!ke){qt.next=22;break}throw ke;case 22:if(!this.isCancel()){qt.next=25;break}throw we=null,this._makeCancelEvent();case 25:if(!(me&&me.length>0)){qt.next=28;break}throw me[0].message="Failed to upload some parts with error: ".concat(me[0].toString()," part_num: ").concat(me[0].partNum),me[0];case 28:return qt.next=30,this.completeMultipartUpload(be,se,Yt,Wt);case 30:return qt.abrupt("return",qt.sent);case 31:case"end":return qt.stop()}},Nt,this)}));function jt(Nt,_t){return Ft.apply(this,arguments)}return jt}(),ut._getFileSize=function(){var Ft=(0,Ct.default)(kt.default.mark(function Nt(_t){return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!lt(_t)){Jt.next=4;break}return Jt.abrupt("return",_t.length);case 4:if(!(z(_t)||at(_t))){Jt.next=6;break}return Jt.abrupt("return",_t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Jt.stop()}},Nt)}));function jt(Nt){return Ft.apply(this,arguments)}return jt}();var dt=ot("stream"),bt=dt.Readable;function At(Ft,jt){if(!(this instanceof At))return new At(Ft,jt);bt.call(this,jt),this.file=Ft,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}yt.inherits(At,bt),At.prototype.readFileAndPush=function(jt){if(this.fileBuffer)for(var Nt=!0;Nt&&this.fileBuffer&&this.start<this.fileBuffer.length;){var _t=this.start,Wt=_t+jt;Wt=Wt>this.fileBuffer.length?this.fileBuffer.length:Wt,this.start=Wt,Nt=this.push(this.fileBuffer.slice(_t,Wt))}},At.prototype._read=function(jt){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 Nt=16*1024;jt=jt||Nt;var _t=this;this.reader.onload=function(Jt){_t.fileBuffer=vt.from(new Uint8Array(Jt.target.result)),_t.file=null,_t.readFileAndPush(jt)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(jt)};function Dt(Ft){return Ft.arrayBuffer?Ft.arrayBuffer():new Promise(function(jt,Nt){var _t=new FileReader;_t.onload=function(Wt){jt(Wt.target.result)},_t.onerror=function(Wt){Nt(Wt)},_t.readAsArrayBuffer(Ft)})}ut._createBuffer=function(){var Ft=(0,Ct.default)(kt.default.mark(function Nt(_t,Wt,Jt){var Ut,Vt;return kt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!(z(_t)||at(_t))){se.next=8;break}return Ut=_t.slice(Wt,Jt),se.next=4,Dt(Ut);case 4:return Vt=se.sent,se.abrupt("return",vt.from(Vt));case 8:if(!lt(_t)){se.next=12;break}return se.abrupt("return",_t.subarray(Wt,Jt));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return se.stop()}},Nt)}));function jt(Nt,_t,Wt){return Ft.apply(this,arguments)}return jt}(),ut._getPartSize=function(jt,Nt){var _t=1e4,Wt=1*1024*1024;Nt||(Nt=Wt);var Jt=Math.ceil(jt/_t);return Nt<Jt&&(Nt=Jt,console.warn("partSize has been set to ".concat(Nt,", because the partSize you provided causes partNumber to be greater than 10,000"))),Nt},ut._divideParts=function(jt,Nt){for(var _t=Math.ceil(jt/Nt),Wt=[],Jt=0;Jt<_t;Jt++){var Ut=Nt*Jt,Vt=Math.min(Ut+Nt,jt);Wt.push({start:Ut,end:Vt})}return Wt}}).call(this)}).call(this,ot("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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.promise.js");var gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("fs"),yt=ot("copy-to"),Tt=ot("path"),mt=ot("mime"),xt=ot("../common/callback"),ft=ot("merge-descriptors"),z=ot("../common/utils/isBlob"),tt=z.isBlob,at=ot("../common/utils/isFile"),it=at.isFile,lt=ot("../common/utils/isBuffer"),ut=lt.isBuffer,dt=ot("../common/utils/obj2xml"),bt=dt.obj2xml,At=Bt;At.append=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,_t,Wt){var Jt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Wt=Wt||{},Wt.position===void 0&&(Wt.position="0"),Wt.subres={append:"",position:Wt.position},Wt.method="POST",Vt.next=6,this.put(Nt,_t,Wt);case 6:return Jt=Vt.sent,Jt.nextAppendPosition=Jt.res.headers["x-oss-next-append-position"],Vt.abrupt("return",Jt);case 9:case"end":return Vt.stop()}},jt,this)}));function Ft(jt,Nt,_t){return Dt.apply(this,arguments)}return Ft}(),At.put=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,_t,Wt){var Jt,Ut,Vt,oe,se;return gt.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Wt=Wt||{},Wt.disabledMD5=Wt.disabledMD5===void 0?!0:!!Wt.disabledMD5,Wt.headers=Wt.headers||{},Nt=this._objectName(Nt),!ut(_t)){be.next=8;break}Jt=_t,be.next=19;break;case 8:if(!(tt(_t)||it(_t))){be.next=18;break}return Wt.mime||(it(_t)?Wt.mime=mt.getType(Tt.extname(_t.name)):Wt.mime=_t.type),be.next=12,this._createBuffer(_t,0,_t.size);case 12:return Jt=be.sent,be.next=15,this._getFileSize(_t);case 15:Wt.contentLength=be.sent,be.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Wt.meta,Wt.headers),Ut=Wt.method||"PUT",Vt=this._objectRequestParams(Ut,Nt,Wt),xt.encodeCallback(Vt,Wt),Vt.mime=Wt.mime,Vt.disabledMD5=Wt.disabledMD5,Vt.content=Jt,Vt.successStatuses=[200],be.next=29,this.request(Vt);case 29:return oe=be.sent,se={name:Nt,url:this._objectUrl(Nt),res:oe.res},Vt.headers&&Vt.headers["x-oss-callback"]&&(se.data=JSON.parse(oe.data.toString())),be.abrupt("return",se);case 33:case"end":return be.stop()}},jt,this)}));function Ft(jt,Nt,_t){return Dt.apply(this,arguments)}return Ft}(),At.putStream=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,_t,Wt){var Jt,Ut,Vt,oe;return gt.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Wt=Wt||{},Wt.headers=Wt.headers||{},Nt=this._objectName(Nt),Wt.contentLength?Wt.headers["Content-Length"]=Wt.contentLength:Wt.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Wt.meta,Wt.headers),Jt=Wt.method||"PUT",Ut=this._objectRequestParams(Jt,Nt,Wt),xt.encodeCallback(Ut,Wt),Ut.mime=Wt.mime,Ut.stream=_t,Ut.successStatuses=[200],he.next=13,this.request(Ut);case 13:return Vt=he.sent,oe={name:Nt,url:this._objectUrl(Nt),res:Vt.res},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Vt.data.toString())),he.abrupt("return",oe);case 17:case"end":return he.stop()}},jt,this)}));function Ft(jt,Nt,_t){return Dt.apply(this,arguments)}return Ft}(),ft(At,ot("../common/object/copyObject")),ft(At,ot("../common/object/getObjectTagging")),ft(At,ot("../common/object/putObjectTagging")),ft(At,ot("../common/object/deleteObjectTagging")),ft(At,ot("../common/image")),ft(At,ot("../common/object/getBucketVersions")),ft(At,ot("../common/object/getACL")),ft(At,ot("../common/object/putACL")),ft(At,ot("../common/object/head")),ft(At,ot("../common/object/delete")),ft(At,ot("../common/object/get")),ft(At,ot("../common/object/putSymlink")),ft(At,ot("../common/object/getSymlink")),ft(At,ot("../common/object/deleteMulti")),ft(At,ot("../common/object/getObjectMeta")),ft(At,ot("../common/object/getObjectUrl")),ft(At,ot("../common/object/generateObjectUrl")),ft(At,ot("../common/object/signatureUrl")),ft(At,ot("../common/object/asyncSignatureUrl")),At.putMeta=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,_t,Wt){var Jt;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,this.copy(Nt,Nt,{meta:_t||{},timeout:Wt&&Wt.timeout,ctx:Wt&&Wt.ctx});case 2:return Jt=Vt.sent,Vt.abrupt("return",Jt);case 4:case"end":return Vt.stop()}},jt,this)}));function Ft(jt,Nt,_t){return Dt.apply(this,arguments)}return Ft}(),At.list=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,_t){var Wt,Jt,Ut,Vt,oe;return gt.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return Wt=this._objectRequestParams("GET","",_t),Wt.query=Nt,Wt.xmlResponse=!0,Wt.successStatuses=[200],he.next=6,this.request(Wt);case 6:return Jt=he.sent,Ut=Jt.data.Contents||[],Vt=this,Ut&&(Array.isArray(Ut)||(Ut=[Ut]),Ut=Ut.map(function(be){return{name:be.Key,url:Vt._objectUrl(be.Key),lastModified:be.LastModified,etag:be.ETag,type:be.Type,size:Number(be.Size),storageClass:be.StorageClass,owner:{id:be.Owner.ID,displayName:be.Owner.DisplayName}}})),oe=Jt.data.CommonPrefixes||null,oe&&(Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(be){return be.Prefix})),he.abrupt("return",{res:Jt.res,objects:Ut,prefixes:oe,nextMarker:Jt.data.NextMarker||null,isTruncated:Jt.data.IsTruncated==="true"});case 13:case"end":return he.stop()}},jt,this)}));function Ft(jt,Nt){return Dt.apply(this,arguments)}return Ft}(),At.listV2=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt){var _t,Wt,Jt,Ut,Vt,oe,se,he=arguments;return gt.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return _t=he.length>1&&he[1]!==void 0?he[1]:{},Wt=Nt["continuation-token"]||Nt.continuationToken,Wt&&(_t.subres=Object.assign({"continuation-token":Wt},_t.subres)),Jt=this._objectRequestParams("GET","",_t),Jt.query=Object.assign({"list-type":2},Nt),delete Jt.query["continuation-token"],delete Jt.query.continuationToken,Jt.xmlResponse=!0,Jt.successStatuses=[200],Yt.next=11,this.request(Jt);case 11:return Ut=Yt.sent,Vt=Ut.data.Contents||[],oe=this,Vt&&(Array.isArray(Vt)||(Vt=[Vt]),Vt=Vt.map(function(ne){var ve=null;return ne.Owner&&(ve={id:ne.Owner.ID,displayName:ne.Owner.DisplayName}),{name:ne.Key,url:oe._objectUrl(ne.Key),lastModified:ne.LastModified,etag:ne.ETag,type:ne.Type,size:Number(ne.Size),storageClass:ne.StorageClass,owner:ve}})),se=Ut.data.CommonPrefixes||null,se&&(Array.isArray(se)||(se=[se]),se=se.map(function(ne){return ne.Prefix})),Yt.abrupt("return",{res:Ut.res,objects:Vt,prefixes:se,isTruncated:Ut.data.IsTruncated==="true",keyCount:+Ut.data.KeyCount,continuationToken:Ut.data.ContinuationToken||null,nextContinuationToken:Ut.data.NextContinuationToken||null});case 18:case"end":return Yt.stop()}},jt,this)}));function Ft(jt){return Dt.apply(this,arguments)}return Ft}(),At.restore=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt){var _t,Wt,Jt,Ut,Vt=arguments;return gt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return _t=Vt.length>1&&Vt[1]!==void 0?Vt[1]:{type:"Archive"},_t=_t||{},_t.subres=Object.assign({restore:""},_t.subres),_t.versionId&&(_t.subres.versionId=_t.versionId),Wt=this._objectRequestParams("POST",Nt,_t),_t.type==="ColdArchive"&&(Jt={RestoreRequest:{Days:_t.Days?_t.Days:2,JobParameters:{Tier:_t.JobParameters?_t.JobParameters:"Standard"}}},Wt.content=bt(Jt,{headers:!0}),Wt.mime="xml"),Wt.successStatuses=[202],se.next=9,this.request(Wt);case 9:return Ut=se.sent,se.abrupt("return",{res:Ut.res});case 11:case"end":return se.stop()}},jt,this)}));function Ft(jt){return Dt.apply(this,arguments)}return Ft}(),At._objectUrl=function(Ft){return this._getReqUrl({bucket:this.options.bucket,object:Ft})},At._objectRequestParams=function(Ft,jt,Nt){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Nt=Nt||{},jt=this._objectName(jt);var _t={object:jt,bucket:this.options.bucket,method:Ft,subres:Nt&&Nt.subres,timeout:Nt&&Nt.timeout,ctx:Nt&&Nt.ctx};return Nt.headers&&(_t.headers={},yt(Nt.headers).to(_t.headers)),_t},At._objectName=function(Ft){return Ft.replace(/^\/+/,"")},At._convertMetaToHeaders=function(Ft,jt){Ft&&Object.keys(Ft).forEach(function(Nt){jt["x-oss-meta-".concat(Nt)]=Ft[Nt]})},At._deleteFileSafe=function(Ft){var jt=this;return new Promise(function(Nt){Ct.exists(Ft,function(_t){_t?Ct.unlink(Ft,function(Wt){Wt&&jt.debug("unlink %j error: %s",Ft,Wt,"error"),Nt()}):Nt()})})}},{"../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(ot,zt,Bt){"use strict";Bt.version="6.18.1"},{}],7:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.abortBucketWorm=void 0;var Ct=ot("../utils/checkBucketName");function yt(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt;return gt.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Ct.checkBucketName(xt),z=this._bucketRequestParams("DELETE",xt,"worm",ft),it.next=4,this.request(z);case 4:return tt=it.sent,it.abrupt("return",{res:tt.res,status:tt.status});case 6:case"end":return it.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.abortBucketWorm=yt},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.completeBucketWorm=void 0;var Ct=ot("../utils/checkBucketName");function yt(mt,xt,ft){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Ct.checkBucketName(xt),tt=this._bucketRequestParams("POST",xt,{wormId:ft},z),lt.next=4,this.request(tt);case 4:return at=lt.sent,lt.abrupt("return",{res:at.res,status:at.status});case 6:case"end":return lt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.completeBucketWorm=yt},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deleteBucketInventory=void 0;var Ct=ot("../utils/checkBucketName");function yt(mt,xt){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt,at,it,lt=arguments;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return z=lt.length>2&&lt[2]!==void 0?lt[2]:{},tt=Object.assign({inventory:"",inventoryId:ft},z.subres),Ct.checkBucketName(xt),at=this._bucketRequestParams("DELETE",xt,tt,z),at.successStatuses=[204],dt.next=7,this.request(at);case 7:return it=dt.sent,dt.abrupt("return",{status:it.status,res:it.res});case 9:case"end":return dt.stop()}},mt,this)})),Tt.apply(this,arguments)}Bt.deleteBucketInventory=yt},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=Bt;Tt.deleteBucketLifecycle=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return yt(z),at=this._bucketRequestParams("DELETE",z,"lifecycle",tt),at.successStatuses=[204],ut.next=5,this.request(at);case 5:return it=ut.sent,ut.abrupt("return",{res:it.res});case 7:case"end":return ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=Bt;Tt.deleteBucketWebsite=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return yt(z),at=this._bucketRequestParams("DELETE",z,"website",tt),at.successStatuses=[204],ut.next=5,this.request(at);case 5:return it=ut.sent,ut.abrupt("return",{res:it.res});case 7:case"end":return ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.extendBucketWorm=void 0;var Ct=ot("../utils/checkBucketName"),yt=ot("../utils/obj2xml");function Tt(xt,ft,z,tt){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z,tt,at){var it,lt,ut;return gt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return Ct.checkBucketName(ft),it=this._bucketRequestParams("POST",ft,{wormExtend:"",wormId:z},at),lt={ExtendWormConfiguration:{RetentionPeriodInDays:tt}},it.mime="xml",it.content=yt.obj2xml(lt,{headers:!0}),it.successStatuses=[200],bt.next=8,this.request(it);case 8:return ut=bt.sent,bt.abrupt("return",{res:ut.res,status:ut.status});case 10:case"end":return bt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.extendBucketWorm=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),yt=ot("../utils/formatInventoryConfig");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at,it,lt,ut=arguments;return gt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return tt=ut.length>2&&ut[2]!==void 0?ut[2]:{},at=Object.assign({inventory:"",inventoryId:z},tt.subres),Ct.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,tt),it.successStatuses=[200],it.xmlResponse=!0,bt.next=8,this.request(it);case 8:return lt=bt.sent,bt.abrupt("return",{status:lt.status,res:lt.res,inventory:yt.formatInventoryConfig(lt.data)});case 10:case"end":return bt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.getBucketInventory=Tt},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/formatObjKey"),ft=xt.formatObjKey,z=Bt;z.getBucketLifecycle=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt,ut){var dt,bt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return yt(lt),dt=this._bucketRequestParams("GET",lt,"lifecycle",ut),dt.successStatuses=[200],dt.xmlResponse=!0,Ft.next=6,this.request(dt);case 6:return bt=Ft.sent,At=bt.data.Rule||null,At&&(mt(At)||(At=[At]),At=At.map(function(jt){return jt.ID&&(jt.id=jt.ID,delete jt.ID),jt.Tag&&!mt(jt.Tag)&&(jt.Tag=[jt.Tag]),ft(jt,"firstLowerCase")})),Ft.abrupt("return",{rules:At,res:bt.res});case 10:case"end":return Ft.stop()}},it,this)}));function at(it,lt){return tt.apply(this,arguments)}return at}()},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=Bt;Tt.getBucketVersioning=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return yt(z),at=this._bucketRequestParams("GET",z,"versioning",tt),at.xmlResponse=!0,at.successStatuses=[200],dt.next=6,this.request(at);case 6:return it=dt.sent,lt=it.data.Status,dt.abrupt("return",{status:it.status,versionStatus:lt,res:it.res});case 9:case"end":return dt.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("../utils/isObject"),mt=Tt.isObject,xt=Bt;xt.getBucketWebsite=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt;return gt.default.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:return yt(at),lt=this._bucketRequestParams("GET",at,"website",it),lt.successStatuses=[200],lt.xmlResponse=!0,At.next=6,this.request(lt);case 6:return ut=At.sent,dt=[],ut.data.RoutingRules&&ut.data.RoutingRules.RoutingRule&&(mt(ut.data.RoutingRules.RoutingRule)?dt=[ut.data.RoutingRules.RoutingRule]:dt=ut.data.RoutingRules.RoutingRule),At.abrupt("return",{index:ut.data.IndexDocument&&ut.data.IndexDocument.Suffix||"",supportSubDir:ut.data.IndexDocument&&ut.data.IndexDocument.SupportSubDir||"false",type:ut.data.IndexDocument&&ut.data.IndexDocument.Type,routingRules:dt,error:ut.data.ErrorDocument&&ut.data.ErrorDocument.Key||null,res:ut.res});case 10:case"end":return At.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getBucketWorm=void 0;var Ct=ot("../utils/checkBucketName"),yt=ot("../utils/dataFix");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return Ct.checkBucketName(ft),tt=this._bucketRequestParams("GET",ft,"worm",z),tt.successStatuses=[200],tt.xmlResponse=!0,lt.next=6,this.request(tt);case 6:return at=lt.sent,yt.dataFix(at.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),lt.abrupt("return",Object.assign(Object.assign({},at.data),{res:at.res,status:at.status}));case 9:case"end":return lt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.getBucketWorm=Tt},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.initiateBucketWorm=void 0;var Ct=ot("../utils/obj2xml"),yt=ot("../utils/checkBucketName");function Tt(xt,ft,z){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z,tt){var at,it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return yt.checkBucketName(ft),at=this._bucketRequestParams("POST",ft,"worm",tt),it={InitiateWormConfiguration:{RetentionPeriodInDays:z}},at.mime="xml",at.content=Ct.obj2xml(it,{headers:!0}),at.successStatuses=[200],dt.next=8,this.request(at);case 8:return lt=dt.sent,dt.abrupt("return",{res:lt.res,wormId:lt.res.headers["x-oss-worm-id"],status:lt.status});case 10:case"end":return dt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.initiateBucketWorm=Tt},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.listBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),yt=ot("../utils/formatInventoryConfig");function Tt(xt){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft){var z,tt,at,it,lt,ut,dt,bt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return z=At.length>1&&At[1]!==void 0?At[1]:{},tt=z.continuationToken,at=Object.assign({inventory:""},tt&&{"continuation-token":tt},z.subres),Ct.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,z),it.successStatuses=[200],it.xmlResponse=!0,Ft.next=9,this.request(it);case 9:return lt=Ft.sent,ut=lt.data,dt=lt.res,bt=lt.status,Ft.abrupt("return",{isTruncated:ut.IsTruncated==="true",nextContinuationToken:ut.NextContinuationToken,inventoryList:yt.formatInventoryConfig(ut.InventoryConfiguration,!0),status:bt,res:dt});case 12:case"end":return Ft.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.listBucketInventory=Tt},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.putBucketInventory=void 0;var Ct=ot("../utils/checkBucketName"),yt=ot("../utils/obj2xml");function Tt(xt,ft){return mt.apply(this,arguments)}function mt(){return mt=(0,kt.default)(gt.default.mark(function xt(ft,z){var tt,at,it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return tt=Nt.length>2&&Nt[2]!==void 0?Nt[2]:{},at=Object.assign({inventory:"",inventoryId:z.id},tt.subres),Ct.checkBucketName(ft),it=z.OSSBucketDestination,lt=z.optionalFields,ut=z.includedObjectVersions,dt="acs:oss:::",bt="acs:ram::".concat(it.accountId,":role/"),At={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:it.format,AccountId:it.accountId,RoleArn:"".concat(bt).concat(it.rolename),Bucket:"".concat(dt).concat(it.bucket),Prefix:it.prefix||"",Encryption:it.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ut,OptionalFields:{Field:(lt==null?void 0:lt.field)||[]}}},Dt=yt.obj2xml(At,{headers:!0,firstUpperCase:!0}),Ft=this._bucketRequestParams("PUT",ft,at,tt),Ft.successStatuses=[200],Ft.mime="xml",Ft.content=Dt,Wt.next=14,this.request(Ft);case 14:return jt=Wt.sent,Wt.abrupt("return",{status:jt.status,res:jt.res});case 16:case"end":return Wt.stop()}},xt,this)})),mt.apply(this,arguments)}Bt.putBucketInventory=Tt},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.array.includes.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("../utils/isArray"),mt=Tt.isArray,xt=ot("../utils/deepCopy"),ft=xt.deepCopy,z=ot("../utils/isObject"),tt=z.isObject,at=ot("../utils/obj2xml"),it=at.obj2xml,lt=ot("../utils/checkObjectTag"),ut=lt.checkObjectTag,dt=ot("../utils/getStrBytesCount"),bt=dt.getStrBytesCount,At=Bt;At.putBucketLifecycle=function(){var _t=(0,kt.default)(gt.default.mark(function Jt(Ut,Vt,oe){var se,he,be,Yt,ne;return gt.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(yt(Ut),mt(Vt)){Se.next=3;break}throw new Error("rules must be Array");case 3:return se=this._bucketRequestParams("PUT",Ut,"lifecycle",oe),he=[],be={LifecycleConfiguration:{Rule:he}},Vt.forEach(function(we){Dt(we),Nt(we),we.id&&(we.ID=we.id,delete we.id),he.push(we)}),Yt=it(be,{headers:!0,firstUpperCase:!0}),se.content=Yt,se.mime="xml",se.successStatuses=[200],Se.next=13,this.request(se);case 13:return ne=Se.sent,Se.abrupt("return",{res:ne.res});case 15:case"end":return Se.stop()}},Jt,this)}));function Wt(Jt,Ut,Vt){return _t.apply(this,arguments)}return Wt}();function Dt(_t){_t.days&&(_t.expiration={days:_t.days}),_t.date&&(_t.expiration={createdBeforeDate:_t.date})}function Ft(_t,Wt){var Jt=_t.days,Ut=_t.createdBeforeDate;if(!Jt&&!Ut)throw new Error("".concat(Wt," must includes days or createdBeforeDate"));if(Jt&&!/^[1-9][0-9]*$/.test(Jt))throw new Error("days must be a positive integer");if(Ut&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ut))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function jt(_t){if(!mt(_t)&&!tt(_t))throw new Error("tag must be Object or Array");_t=tt(_t)?[_t]:_t;var Wt={},Jt=ft(_t);Jt.forEach(function(Ut){Wt[Ut.key]=Ut.value}),ut(Wt)}function Nt(_t){if(_t.id&&bt(_t.id)>255)throw new Error("ID is composed of 255 bytes at most");if(_t.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(_t.status))throw new Error("Status must be Enabled or Disabled");if(_t.transition){if(!["IA","Archive"].includes(_t.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Ft(_t.transition,"Transition")}if(_t.expiration){if(!_t.expiration.expiredObjectDeleteMarker)Ft(_t.expiration,"Expiration");else if(_t.expiration.days||_t.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(_t.abortMultipartUpload&&Ft(_t.abortMultipartUpload,"AbortMultipartUpload"),!_t.expiration&&!_t.abortMultipartUpload&&!_t.transition&&!_t.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(_t.tag){if(_t.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");jt(_t.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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.includes.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=Bt;xt.putBucketVersioning=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt,bt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(lt=At.length>2&&At[2]!==void 0?At[2]:{},yt(at),["Enabled","Suspended"].includes(it)){Ft.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ut=this._bucketRequestParams("PUT",at,"versioning",lt),dt={VersioningConfiguration:{Status:it}},ut.mime="xml",ut.content=mt(dt,{headers:!0}),Ft.next=10,this.request(ut);case 10:return bt=Ft.sent,Ft.abrupt("return",{res:bt.res,status:bt.status});case 12:case"end":return Ft.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("../utils/obj2xml"),mt=Tt.obj2xml,xt=ot("../utils/isArray"),ft=xt.isArray,z=Bt;z.putBucketWebsite=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt){var ut,dt,bt,At,Dt,Ft,jt,Nt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(ut=Nt.length>1&&Nt[1]!==void 0?Nt[1]:{},dt=Nt.length>2?Nt[2]:void 0,yt(lt),bt=this._bucketRequestParams("PUT",lt,"website",dt),At={Suffix:ut.index||"index.html"},Dt={IndexDocument:At},Ft={WebsiteConfiguration:Dt},ut.supportSubDir&&(At.SupportSubDir=ut.supportSubDir),ut.type&&(At.Type=ut.type),ut.error&&(Dt.ErrorDocument={Key:ut.error}),ut.routingRules===void 0){Wt.next=14;break}if(ft(ut.routingRules)){Wt.next=13;break}throw new Error("RoutingRules must be Array");case 13:Dt.RoutingRules={RoutingRule:ut.routingRules};case 14:return Ft=mt(Ft),bt.content=Ft,bt.mime="xml",bt.successStatuses=[200],Wt.next=20,this.request(bt);case 20:return jt=Wt.sent,Wt.abrupt("return",{res:jt.res});case 22:case"end":return Wt.stop()}},it,this)}));function at(it){return tt.apply(this,arguments)}return at}()},{"../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(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Bt.encodeCallback=function(kt,Ct){if(kt.headers=kt.headers||{},!Object.prototype.hasOwnProperty.call(kt.headers,"x-oss-callback")&&Ct.callback){var yt={callbackUrl:encodeURI(Ct.callback.url),callbackBody:Ct.callback.body};Ct.callback.host&&(yt.callbackHost=Ct.callback.host),Ct.callback.contentType&&(yt.callbackBodyType=Ct.callback.contentType);var Tt=vt.from(JSON.stringify(yt)).toString("base64");if(kt.headers["x-oss-callback"]=Tt,Ct.callback.customValue){var mt={};Object.keys(Ct.callback.customValue).forEach(function(xt){mt["x:".concat(xt)]=Ct.callback.customValue[xt].toString()}),kt.headers["x-oss-callback-var"]=vt.from(JSON.stringify(mt)).toString("base64")}}}}).call(this)}).call(this,ot("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(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var vt=function(ft){return ft&&ft.__esModule?ft:{default:ft}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getReqUrl=void 0;var gt=vt(ot("copy-to")),kt=vt(ot("url")),Ct=vt(ot("merge-descriptors")),yt=vt(ot("is-type-of")),Tt=ot("../utils/isIP"),mt=ot("../utils/checkConfigValid");function xt(ft){var z={},tt=this.options.cname;mt.checkConfigValid(this.options.endpoint,"endpoint"),gt.default(this.options.endpoint,!1).to(z),ft.bucket&&!tt&&!Tt.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(ft.bucket,".").concat(z.host));var at="/";ft.bucket&&this.options.sldEnable&&(at+="".concat(ft.bucket,"/")),ft.object&&(at+=this._escape(ft.object).replace(/\+/g,"%2B")),z.pathname=at;var it={};if(ft.query&&Ct.default(it,ft.query),ft.subres){var lt={};yt.default.string(ft.subres)?lt[ft.subres]="":yt.default.array(ft.subres)?ft.subres.forEach(function(ut){lt[ut]=""}):lt=ft.subres,Ct.default(it,lt)}return z.query=it,kt.default.format(z)}Bt.getReqUrl=xt},{"../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(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.string.trim.js");var vt=ot("humanize-ms"),gt=ot("url"),kt=ot("../utils/checkBucketName"),Ct=kt.checkBucketName,yt=ot("../utils/setRegion"),Tt=yt.setRegion,mt=ot("../utils/checkConfigValid"),xt=mt.checkConfigValid;function ft(z,tt){xt(z,"endpoint");var at=gt.parse(z);if(at.protocol||(at=gt.parse("http".concat(tt?"s":"","://").concat(z))),at.protocol!=="http:"&&at.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return at}zt.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&&Ct(z.bucket);var tt=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(tt.accessKeyId=tt.accessKeyId.trim(),tt.accessKeySecret=tt.accessKeySecret.trim(),tt.timeout&&(tt.timeout=vt(tt.timeout)),tt.endpoint)tt.endpoint=ft(tt.endpoint,tt.secure);else if(tt.region)tt.endpoint=Tt(tt.region,tt.internal,tt.secure);else throw new Error("require options.endpoint or options.region");return tt.inited=!0,tt}},{"../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(ot,zt,Bt){"use strict";var vt=ot("merge-descriptors"),gt=Bt;vt(gt,ot("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkBucketName"),yt=Ct.checkBucketName,Tt=ot("querystring"),mt=ot("js-base64"),xt=mt.Base64.encode,ft=Bt;ft.processObjectSave=function(){var tt=(0,kt.default)(gt.default.mark(function it(lt,ut,dt,bt){var At,Dt,Ft,jt;return gt.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return z(lt,"sourceObject"),z(ut,"targetObject"),z(dt,"process"),ut=this._objectName(ut),bt&&yt(bt),At=this._objectRequestParams("POST",lt,{subres:"x-oss-process"}),Dt=bt?",b_".concat(xt(bt)):"",ut=xt(ut),Ft={"x-oss-process":"".concat(dt,"|sys/saveas,o_").concat(ut).concat(Dt)},At.content=Tt.stringify(Ft),_t.next=12,this.request(At);case 12:return jt=_t.sent,_t.abrupt("return",{res:jt.res,status:jt.res.status});case 14:case"end":return _t.stop()}},it,this)}));function at(it,lt,ut,dt){return tt.apply(this,arguments)}return at}();function z(tt,at){if(!tt)throw new Error("".concat(at," is required"));if(typeof tt!="string")throw new Error("".concat(at," 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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.regexp.to-string.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("debug")("ali-oss:multipart-copy"),yt=ot("copy-to"),Tt=Bt;Tt.uploadPartCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at,it,lt){var ut,dt,bt,At,Dt,Ft=arguments;return gt.default.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return ut=Ft.length>5&&Ft[5]!==void 0?Ft[5]:{},ut.headers=ut.headers||{},dt=ut.versionId||ut.subres&&ut.subres.versionId||null,dt?bt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey),"?versionId=").concat(dt):bt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey)),ut.headers["x-oss-copy-source"]=bt,it&&(ut.headers["x-oss-copy-source-range"]="bytes=".concat(it)),ut.subres={partNumber:at,uploadId:tt},At=this._objectRequestParams("PUT",z,ut),At.mime=ut.mime,At.successStatuses=[200],Nt.next=12,this.request(At);case 12:return Dt=Nt.sent,Nt.abrupt("return",{name:z,etag:Dt.res.headers.etag,res:Dt.res});case 14:case"end":return Nt.stop()}},ft,this)}));function xt(ft,z,tt,at,it){return mt.apply(this,arguments)}return xt}(),Tt.multipartUploadCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt){var at,it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt,_t,Wt=arguments;return gt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return at=Wt.length>2&&Wt[2]!==void 0?Wt[2]:{},this.resetCancelFlag(),it=at.versionId,lt=it===void 0?null:it,ut={versionId:lt},Ut.next=6,this._getObjectMeta(tt.sourceBucketName,tt.sourceKey,ut);case 6:if(dt=Ut.sent,bt=dt.res.headers["content-length"],tt.startOffset=tt.startOffset||0,tt.endOffset=tt.endOffset||bt,!(at.checkpoint&&at.checkpoint.uploadId)){Ut.next=14;break}return Ut.next=13,this._resumeMultipartCopy(at.checkpoint,tt,at);case 13:return Ut.abrupt("return",Ut.sent);case 14:if(At=102400,Dt=tt.endOffset-tt.startOffset,!(Dt<At)){Ut.next=18;break}throw new Error("copySize must not be smaller than ".concat(At));case 18:if(!(at.partSize&&at.partSize<At)){Ut.next=20;break}throw new Error("partSize must not be smaller than ".concat(At));case 20:return Ut.next=22,this.initMultipartUpload(z,at);case 22:if(Ft=Ut.sent,jt=Ft.uploadId,Nt=this._getPartSize(Dt,at.partSize),_t={name:z,copySize:Dt,partSize:Nt,uploadId:jt,doneParts:[]},!(at&&at.progress)){Ut.next=29;break}return Ut.next=29,at.progress(0,_t,Ft.res);case 29:return Ut.next=31,this._resumeMultipartCopy(_t,tt,at);case 31:return Ut.abrupt("return",Ut.sent);case 32:case"end":return Ut.stop()}},ft,this)}));function xt(ft,z){return mt.apply(this,arguments)}return xt}(),Tt._resumeMultipartCopy=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at){var it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt,_t,Wt,Jt,Ut,Vt,oe,se,he,be,Yt,ne;return gt.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!this.isCancel()){Se.next=2;break}throw this._makeCancelEvent();case 2:if(it=at.versionId,lt=it===void 0?null:it,ut={versionId:lt},dt=z.copySize,bt=z.partSize,At=z.uploadId,Dt=z.doneParts,Ft=z.name,jt=this._divideMultipartCopyParts(dt,bt,tt.startOffset),Nt=jt.length,_t={headers:{}},at.copyheaders&&yt(at.copyheaders).to(_t.headers),lt&&yt(ut).to(_t),Wt=function(ce,de,le){return new Promise(function(){var Ce=(0,kt.default)(gt.default.mark(function fe(me,ke){var pe,qt,Kt;return gt.default.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(Lt.prev=0,ce.isCancel()){Lt.next=22;break}return pe=jt[de-1],qt="".concat(pe.start,"-").concat(pe.end-1),Lt.prev=4,Lt.next=7,ce.uploadPartCopy(Ft,At,de,qt,le,_t);case 7:Kt=Lt.sent,Lt.next=15;break;case 10:if(Lt.prev=10,Lt.t0=Lt.catch(4),Lt.t0.status!==404){Lt.next=14;break}throw ce._makeAbortEvent();case 14:throw Lt.t0;case 15:if(ce.isCancel()){Lt.next=22;break}if(Ct("content-range ".concat(Kt.res.headers["content-range"])),Dt.push({number:de,etag:Kt.res.headers.etag}),z.doneParts=Dt,!(at&&at.progress)){Lt.next=22;break}return Lt.next=22,at.progress(Dt.length/Nt,z,Kt.res);case 22:me(),Lt.next=29;break;case 25:Lt.prev=25,Lt.t1=Lt.catch(0),Lt.t1.partNum=de,ke(Lt.t1);case 29:case"end":return Lt.stop()}},fe,null,[[0,25],[4,10]])}));return function(fe,me){return Ce.apply(this,arguments)}}())},Jt=Array.from(new Array(Nt),function(we,ce){return ce+1}),Ut=Dt.map(function(we){return we.number}),Vt=Jt.filter(function(we){return Ut.indexOf(we)<0}),oe=5,se=at.parallel||oe,!(this.checkBrowserAndVersion("Internet Explorer","10")||se===1)){Se.next=28;break}he=0;case 18:if(!(he<Vt.length)){Se.next=26;break}if(!this.isCancel()){Se.next=21;break}throw this._makeCancelEvent();case 21:return Se.next=23,Wt(this,Vt[he],tt);case 23:he++,Se.next=18;break;case 26:Se.next=40;break;case 28:return Se.next=30,this._parallelNode(Vt,se,Wt,tt);case 30:if(be=Se.sent,Yt=be.find(function(we){return we.name==="abort"}),!Yt){Se.next=34;break}throw Yt;case 34:if(!this.isCancel()){Se.next=36;break}throw this._makeCancelEvent();case 36:if(!(be&&be.length>0)){Se.next=40;break}throw ne=be[0],ne.message="Failed to copy some parts with error: ".concat(ne.toString()," part_num: ").concat(ne.partNum),ne;case 40:return Se.next=42,this.completeMultipartUpload(Ft,At,Dt,at);case 42:return Se.abrupt("return",Se.sent);case 43:case"end":return Se.stop()}},ft,this)}));function xt(ft,z,tt){return mt.apply(this,arguments)}return xt}(),Tt._divideMultipartCopyParts=function(xt,ft,z){for(var tt=Math.ceil(xt/ft),at=[],it=0;it<tt;it++){var lt=ft*it+z,ut=Math.min(lt+ft,xt+z);at.push({start:lt,end:ut})}return at},Tt._getObjectMeta=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at){var it,lt;return gt.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return it=this.getBucket(),this.setBucket(z),dt.next=4,this.head(tt,at);case 4:return lt=dt.sent,this.setBucket(it),dt.abrupt("return",lt);case 7:case"end":return dt.stop()}},ft,this)}));function xt(ft,z,tt){return mt.apply(this,arguments)}return xt}()},{"@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(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.array.filter.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),yt=ot("copy-to"),Tt=ot("./callback"),mt=ot("./utils/deepCopy"),xt=mt.deepCopyWith,ft=ot("./utils/isBuffer"),z=ft.isBuffer,tt=ot("./utils/omit"),at=tt.omit,it=Bt;it.listUploads=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At){var Dt,Ft,jt,Nt;return kt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return At=At||{},Dt={},yt(At).to(Dt),Dt.subres="uploads",Ft=this._objectRequestParams("GET","",Dt),Ft.query=bt,Ft.xmlResponse=!0,Ft.successStatuses=[200],Wt.next=10,this.request(Ft);case 10:return jt=Wt.sent,Nt=jt.data.Upload||[],Array.isArray(Nt)||(Nt=[Nt]),Nt=Nt.map(function(Jt){return{name:Jt.Key,uploadId:Jt.UploadId,initiated:Jt.Initiated}}),Wt.abrupt("return",{res:jt.res,uploads:Nt,bucket:jt.data.Bucket,nextKeyMarker:jt.data.NextKeyMarker,nextUploadIdMarker:jt.data.NextUploadIdMarker,isTruncated:jt.data.IsTruncated==="true"});case 15:case"end":return Wt.stop()}},dt,this)}));function ut(dt,bt){return lt.apply(this,arguments)}return ut}(),it.listParts=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At,Dt,Ft){var jt,Nt,_t;return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Ft=Ft||{},jt={},yt(Ft).to(jt),jt.subres={uploadId:At},Nt=this._objectRequestParams("GET",bt,jt),Nt.query=Dt,Nt.xmlResponse=!0,Nt.successStatuses=[200],Jt.next=10,this.request(Nt);case 10:return _t=Jt.sent,Jt.abrupt("return",{res:_t.res,uploadId:_t.data.UploadId,bucket:_t.data.Bucket,name:_t.data.Key,partNumberMarker:_t.data.PartNumberMarker,nextPartNumberMarker:_t.data.NextPartNumberMarker,maxParts:_t.data.MaxParts,isTruncated:_t.data.IsTruncated,parts:_t.data.Part||[]});case 12:case"end":return Jt.stop()}},dt,this)}));function ut(dt,bt,At,Dt){return lt.apply(this,arguments)}return ut}(),it.abortMultipartUpload=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At,Dt){var Ft,jt,Nt;return kt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return this._stop(),Dt=Dt||{},Ft={},yt(Dt).to(Ft),Ft.subres={uploadId:At},jt=this._objectRequestParams("DELETE",bt,Ft),jt.successStatuses=[204],Wt.next=9,this.request(jt);case 9:return Nt=Wt.sent,Wt.abrupt("return",{res:Nt.res});case 11:case"end":return Wt.stop()}},dt,this)}));function ut(dt,bt,At){return lt.apply(this,arguments)}return ut}(),it.initMultipartUpload=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At){var Dt,Ft,jt;return kt.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return At=At||{},Dt={},yt(At).to(Dt),Dt.headers=Dt.headers||{},this._convertMetaToHeaders(At.meta,Dt.headers),Dt.subres="uploads",Ft=this._objectRequestParams("POST",bt,Dt),Ft.mime=At.mime,Ft.xmlResponse=!0,Ft.successStatuses=[200],_t.next=12,this.request(Ft);case 12:return jt=_t.sent,_t.abrupt("return",{res:jt.res,bucket:jt.data.Bucket,name:jt.data.Key,uploadId:jt.data.UploadId});case 14:case"end":return _t.stop()}},dt,this)}));function ut(dt,bt){return lt.apply(this,arguments)}return ut}(),it.uploadPart=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At,Dt,Ft,jt,Nt,_t){var Wt,Jt;return kt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(Wt={size:Nt-jt},Jt=vt&&vt.browser,!Jt){Vt.next=8;break}return Vt.next=5,this._createBuffer(Ft,jt,Nt);case 5:Wt.content=Vt.sent,Vt.next=11;break;case 8:return Vt.next=10,this._createStream(Ft,jt,Nt);case 10:Wt.stream=Vt.sent;case 11:return Vt.next=13,this._uploadPart(bt,At,Dt,Wt,_t);case 13:return Vt.abrupt("return",Vt.sent);case 14:case"end":return Vt.stop()}},dt,this)}));function ut(dt,bt,At,Dt,Ft,jt,Nt){return lt.apply(this,arguments)}return ut}(),it.completeMultipartUpload=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At,Dt,Ft){var jt,Nt,_t,Wt,Jt,Ut,Vt,oe;return kt.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:for(jt=Dt.concat().sort(function(be,Yt){return be.number-Yt.number}).filter(function(be,Yt,ne){return!Yt||be.number!==ne[Yt-1].number}),Nt=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,_t=0;_t<jt.length;_t++)Wt=jt[_t],Nt+=`<Part>
`,Nt+="<PartNumber>".concat(Wt.number,`</PartNumber>
`),Nt+="<ETag>".concat(Wt.etag,`</ETag>
`),Nt+=`</Part>
`;return Nt+="</CompleteMultipartUpload>",Ft=Ft||{},Jt={},Jt=xt(Ft,function(be){if(z(be))return null}),Jt.subres={uploadId:At},Jt.headers=at(Jt.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ut=this._objectRequestParams("POST",bt,Jt),Tt.encodeCallback(Ut,Jt),Ut.mime="xml",Ut.content=Nt,Ut.headers&&Ut.headers["x-oss-callback"]||(Ut.xmlResponse=!0),Ut.successStatuses=[200],he.next=17,this.request(Ut);case 17:if(Vt=he.sent,!Ft.progress){he.next=21;break}return he.next=21,Ft.progress(1,null,Vt.res);case 21:return oe={res:Vt.res,bucket:Ut.bucket,name:bt,etag:Vt.res.headers.etag},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Vt.data.toString())),he.abrupt("return",oe);case 24:case"end":return he.stop()}},dt,this)}));function ut(dt,bt,At,Dt){return lt.apply(this,arguments)}return ut}(),it._uploadPart=function(){var lt=(0,Ct.default)(kt.default.mark(function dt(bt,At,Dt,Ft,jt){var Nt,_t,Wt,Jt;return kt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return jt=jt||{},Nt={},yt(jt).to(Nt),Nt.headers=Nt.headers||{},Nt.headers["Content-Length"]=Ft.size,Nt.headers=at(Nt.headers,["x-oss-server-side-encryption"]),Nt.subres={partNumber:Dt,uploadId:At},_t=this._objectRequestParams("PUT",bt,Nt),_t.mime=Nt.mime,Wt=vt&&vt.browser,Wt?_t.content=Ft.content:_t.stream=Ft.stream,_t.successStatuses=[200],_t.disabledMD5=jt.disabledMD5,Vt.next=15,this.request(_t);case 15:if(Jt=Vt.sent,Jt.res.headers.etag){Vt.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 Ft.stream&&(Ft.stream=null,_t.stream=null),Vt.abrupt("return",{name:bt,etag:Jt.res.headers.etag,res:Jt.res});case 20:case"end":return Vt.stop()}},dt,this)}));function ut(dt,bt,At,Dt,Ft){return lt.apply(this,arguments)}return ut}()}).call(this)}).call(this,ot("_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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("url"),yt=ot("utility"),Tt=ot("copy-to"),mt=ot("../../common/signUtils"),xt=ot("../utils/isIP"),ft=xt.isIP,z=ot("../utils/setSTSToken"),tt=z.setSTSToken,at=ot("../utils/isFunction"),it=at.isFunction,lt=Bt;lt.asyncSignatureUrl=function(){var ut=(0,kt.default)(gt.default.mark(function bt(At,Dt){var Ft,jt,Nt,_t,Wt;return gt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(!ft(this.options.endpoint.hostname)){Ut.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Dt=Dt||{},At=this._objectName(At),Dt.method=Dt.method||"GET",Ft=yt.timestamp()+(Dt.expires||1800),jt={bucket:this.options.bucket,object:At},Nt=this._getResource(jt),!(this.options.stsToken&&it(this.options.refreshSTSToken))){Ut.next=11;break}return Ut.next=11,tt.call(this);case 11:return this.options.stsToken&&(Dt["security-token"]=this.options.stsToken),_t=mt._signatureForURL(this.options.accessKeySecret,Dt,Nt,Ft),Wt=Ct.parse(this._getReqUrl(jt)),Wt.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ft,Signature:_t.Signature},Tt(_t.subResource).to(Wt.query),Ut.abrupt("return",Wt.format());case 17:case"end":return Ut.stop()}},bt,this)}));function dt(bt,At){return ut.apply(this,arguments)}return dt}()},{"../../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var kt=vt(ot("@babel/runtime/helpers/typeof")),Ct=vt(ot("@babel/runtime/helpers/asyncToGenerator")),yt=ot("../utils/checkBucketName"),Tt=yt.checkBucketName,mt=Bt,xt=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];mt.copy=function(){var ft=(0,Ct.default)(gt.default.mark(function tt(at,it,lt,ut){var dt,bt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return(0,kt.default)(lt)==="object"&&(ut=lt),ut=ut||{},ut.headers=ut.headers||{},Object.keys(ut.headers).forEach(function(jt){ut.headers["x-oss-copy-source-".concat(jt.toLowerCase())]=ut.headers[jt]}),(ut.meta||Object.keys(ut.headers).find(function(jt){return xt.includes(jt.toLowerCase())}))&&(ut.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ut.meta,ut.headers),it=this._getSourceName(it,lt),ut.versionId&&(it="".concat(it,"?versionId=").concat(ut.versionId)),ut.headers["x-oss-copy-source"]=it,dt=this._objectRequestParams("PUT",at,ut),dt.xmlResponse=!0,dt.successStatuses=[200,304],Ft.next=14,this.request(dt);case 14:return bt=Ft.sent,At=bt.data,At&&(At={etag:At.ETag,lastModified:At.LastModified}),Ft.abrupt("return",{data:At,res:bt.res});case 18:case"end":return Ft.stop()}},tt,this)}));function z(tt,at,it,lt){return ft.apply(this,arguments)}return z}(),mt._getSourceName=function(z,tt){return typeof tt=="string"?z=this._objectName(z):z[0]!=="/"?tt=this.options.bucket:(tt=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Tt(tt),z=encodeURIComponent(z),z="/".concat(tt,"/").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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.delete=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),z=this._objectRequestParams("DELETE",xt,ft),z.successStatuses=[204],lt.next=7,this.request(z);case 7:return tt=lt.sent,lt.abrupt("return",{res:tt.res});case 9:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("utility"),yt=ot("../utils/obj2xml"),Tt=yt.obj2xml,mt=Bt;mt.deleteMulti=function(){var xt=(0,kt.default)(gt.default.mark(function z(tt){var at,it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt,_t,Wt,Jt=arguments;return gt.default.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(at=Jt.length>1&&Jt[1]!==void 0?Jt[1]:{},it=[],!(!tt||!tt.length)){Vt.next=4;break}throw new Error("names is required");case 4:for(lt=0;lt<tt.length;lt++)ut={},typeof tt[lt]=="string"?ut.Key=Ct.escape(this._objectName(tt[lt])):(dt=tt[lt],bt=dt.key,At=dt.versionId,ut.Key=Ct.escape(this._objectName(bt)),ut.VersionId=At),it.push(ut);return Dt={Delete:{Quiet:!!at.quiet,Object:it}},Ft=Tt(Dt,{headers:!0}),at.subres=Object.assign({delete:""},at.subres),at.versionId&&(at.subres.versionId=at.versionId),jt=this._objectRequestParams("POST","",at),jt.mime="xml",jt.content=Ft,jt.xmlResponse=!0,jt.successStatuses=[200],Vt.next=16,this.request(jt);case 16:return Nt=Vt.sent,_t=Nt.data,Wt=_t&&_t.Deleted||null,Wt&&(Array.isArray(Wt)||(Wt=[Wt])),Vt.abrupt("return",{res:Nt.res,deleted:Wt||[]});case 21:case"end":return Vt.stop()}},z,this)}));function ft(z){return xt.apply(this,arguments)}return ft}()},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.deleteObjectTagging=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({tagging:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("DELETE",xt,ft),z.successStatuses=[204],lt.next=8,this.request(z);case 8:return tt=lt.sent,lt.abrupt("return",{status:tt.status,res:tt.res});case 10:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js");var vt=ot("url"),gt=ot("../utils/isIP"),kt=gt.isIP,Ct=Bt;Ct.generateObjectUrl=function(Tt,mt){if(kt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(mt)mt[mt.length-1]!=="/"&&(mt+="/");else{mt=this.options.endpoint.format();var xt=vt.parse(mt),ft=this.options.bucket;xt.hostname="".concat(ft,".").concat(xt.hostname),xt.host="".concat(ft,".").concat(xt.host),mt=xt.format()}return mt+this._escape(this._objectName(Tt))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var Ct=gt(ot("@babel/runtime/helpers/asyncToGenerator")),yt=ot("fs"),Tt=ot("is-type-of"),mt=Bt;mt.get=function(){var xt=(0,Ct.default)(kt.default.mark(function z(tt,at){var it,lt,ut,dt,bt,At,Dt,Ft,jt=arguments;return kt.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return it=jt.length>2&&jt[2]!==void 0?jt[2]:{},lt=null,ut=!1,Tt.writableStream(at)?lt=at:Tt.string(at)?(lt=yt.createWriteStream(at),ut=!0):it=at,it=it||{},dt=vt&&vt.browser,bt=it.responseCacheControl===null?"":"no-cache",At=dt&&bt?{"response-cache-control":bt}:{},it.subres=Object.assign(At,it.subres),it.versionId&&(it.subres.versionId=it.versionId),it.process&&(it.subres["x-oss-process"]=it.process),_t.prev=11,Ft=this._objectRequestParams("GET",tt,it),Ft.writeStream=lt,Ft.successStatuses=[200,206,304],_t.next=17,this.request(Ft);case 17:Dt=_t.sent,ut&&lt.destroy(),_t.next=28;break;case 21:if(_t.prev=21,_t.t0=_t.catch(11),!ut){_t.next=27;break}return lt.destroy(),_t.next=27,this._deleteFileSafe(at);case 27:throw _t.t0;case 28:return _t.abrupt("return",{res:Dt.res,content:Dt.data});case 29:case"end":return _t.stop()}},z,this,[[11,21]])}));function ft(z,tt){return xt.apply(this,arguments)}return ft}()}).call(this)}).call(this,ot("_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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getACL=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at=arguments;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return ft=at.length>1&&at[1]!==void 0?at[1]:{},ft.subres=Object.assign({acl:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("GET",xt,ft),z.successStatuses=[200],z.xmlResponse=!0,lt.next=9,this.request(z);case 9:return tt=lt.sent,lt.abrupt("return",{acl:tt.data.AccessControlList.Grant,owner:{id:tt.data.Owner.ID,displayName:tt.data.Owner.DisplayName},res:tt.res});case 11:case"end":return lt.stop()}},mt,this)}));function Tt(mt){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.number.constructor.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt,yt=ot("../utils/isObject"),Tt=yt.isObject,mt=ot("../utils/isArray"),xt=mt.isArray;Ct.getBucketVersions=ft,Ct.listObjectVersions=ft;function ft(){return z.apply(this,arguments)}function z(){return z=(0,kt.default)(gt.default.mark(function it(){var lt,ut,dt,bt,At,Dt,Ft,jt,Nt=arguments;return gt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(lt=Nt.length>0&&Nt[0]!==void 0?Nt[0]:{},ut=Nt.length>1&&Nt[1]!==void 0?Nt[1]:{},!(lt.versionIdMarker&&lt.keyMarker===void 0)){Wt.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ut.subres=Object.assign({versions:""},ut.subres),ut.versionId&&(ut.subres.versionId=ut.versionId),dt=this._objectRequestParams("GET","",ut),dt.xmlResponse=!0,dt.successStatuses=[200],dt.query=at(lt),Wt.next=12,this.request(dt);case 12:return bt=Wt.sent,At=bt.data.Version||[],Dt=bt.data.DeleteMarker||[],Ft=this,At&&(Array.isArray(At)||(At=[At]),At=At.map(function(Jt){return{name:Jt.Key,url:Ft._objectUrl(Jt.Key),lastModified:Jt.LastModified,isLatest:Jt.IsLatest==="true",versionId:Jt.VersionId,etag:Jt.ETag,type:Jt.Type,size:Number(Jt.Size),storageClass:Jt.StorageClass,owner:{id:Jt.Owner.ID,displayName:Jt.Owner.DisplayName}}})),Dt&&(xt(Dt)||(Dt=[Dt]),Dt=Dt.map(function(Jt){return{name:Jt.Key,lastModified:Jt.LastModified,versionId:Jt.VersionId,owner:{id:Jt.Owner.ID,displayName:Jt.Owner.DisplayName}}})),jt=bt.data.CommonPrefixes||null,jt&&(xt(jt)||(jt=[jt]),jt=jt.map(function(Jt){return Jt.Prefix})),Wt.abrupt("return",{res:bt.res,objects:At,deleteMarker:Dt,prefixes:jt,nextMarker:bt.data.NextKeyMarker||null,NextVersionIdMarker:bt.data.NextVersionIdMarker||null,nextKeyMarker:bt.data.NextKeyMarker||null,nextVersionIdMarker:bt.data.NextVersionIdMarker||null,isTruncated:bt.data.IsTruncated==="true"});case 21:case"end":return Wt.stop()}},it,this)})),z.apply(this,arguments)}function tt(it){return it.replace(/([A-Z])/g,"-$1").toLowerCase()}function at(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},lt={};return Tt(it)&&Object.keys(it).forEach(function(ut){lt[tt(ut)]=it[ut]}),lt}},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getObjectMeta=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt,ft){var z,tt;return gt.default.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return ft=ft||{},xt=this._objectName(xt),ft.subres=Object.assign({objectMeta:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),z=this._objectRequestParams("HEAD",xt,ft),z.successStatuses=[200],it.next=8,this.request(z);case 8:return tt=it.sent,it.abrupt("return",{status:tt.status,res:tt.res});case 10:case"end":return it.stop()}},mt,this)}));function Tt(mt,xt){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt,yt=ot("../utils/isObject"),Tt=yt.isObject;Ct.getObjectTagging=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z){var tt,at,it,lt,ut,dt,bt=arguments;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return tt=bt.length>1&&bt[1]!==void 0?bt[1]:{},tt.subres=Object.assign({tagging:""},tt.subres),tt.versionId&&(tt.subres.versionId=tt.versionId),z=this._objectName(z),at=this._objectRequestParams("GET",z,tt),at.successStatuses=[200],Dt.next=8,this.request(at);case 8:return it=Dt.sent,Dt.next=11,this.parseXML(it.data);case 11:return lt=Dt.sent,ut=lt.TagSet.Tag,ut=ut&&Tt(ut)?[ut]:ut||[],dt={},ut.forEach(function(Ft){dt[Ft.Key]=Ft.Value}),Dt.abrupt("return",{status:it.status,res:it.res,tag:dt});case 17:case"end":return Dt.stop()}},ft,this)}));function xt(ft){return mt.apply(this,arguments)}return xt}()},{"../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(ot,zt,Bt){"use strict";var vt=ot("../utils/isIP"),gt=vt.isIP,kt=Bt;kt.getObjectUrl=function(yt,Tt){if(gt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Tt?Tt[Tt.length-1]!=="/"&&(Tt+="/"):Tt=this.options.endpoint.format(),Tt+this._escape(this._objectName(yt))}},{"../utils/isIP":69}],43:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.getSymlink=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt){var ft,z,tt,at,it=arguments;return gt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ft=it.length>1&&it[1]!==void 0?it[1]:{},ft.subres=Object.assign({symlink:""},ft.subres),ft.versionId&&(ft.subres.versionId=ft.versionId),xt=this._objectName(xt),z=this._objectRequestParams("GET",xt,ft),z.successStatuses=[200],ut.next=8,this.request(z);case 8:return tt=ut.sent,at=tt.res.headers["x-oss-symlink-target"],ut.abrupt("return",{targetName:decodeURIComponent(at),res:tt.res});case 11:case"end":return ut.stop()}},mt,this)}));function Tt(mt){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/checkEnv"),yt=Ct.checkEnv,Tt=Bt;Tt.head=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z){var tt,at,it,lt,ut=arguments;return gt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return tt=ut.length>1&&ut[1]!==void 0?ut[1]:{},yt("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),tt.subres=Object.assign({},tt.subres),tt.versionId&&(tt.subres.versionId=tt.versionId),at=this._objectRequestParams("HEAD",z,tt),at.successStatuses=[200,304],bt.next=8,this.request(at);case 8:return it=bt.sent,lt={meta:null,res:it.res,status:it.status},it.status===200&&Object.keys(it.headers).forEach(function(At){At.indexOf("x-oss-meta-")===0&&(lt.meta||(lt.meta={}),lt.meta[At.substring(11)]=it.headers[At])}),bt.abrupt("return",lt);case 12:case"end":return bt.stop()}},ft,this)}));function xt(ft){return mt.apply(this,arguments)}return xt}()},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.putACL=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.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"]=ft,xt=this._objectName(xt),tt=this._objectRequestParams("PUT",xt,z),tt.successStatuses=[200],lt.next=10,this.request(tt);case 10:return at=lt.sent,lt.abrupt("return",{res:at.res});case 12:case"end":return lt.stop()}},mt,this)}));function Tt(mt,xt,ft){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.object.keys.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("../utils/obj2xml"),yt=Ct.obj2xml,Tt=ot("../utils/checkObjectTag"),mt=Tt.checkObjectTag,xt=Bt;xt.putObjectTagging=function(){var ft=(0,kt.default)(gt.default.mark(function tt(at,it){var lt,ut,dt,bt,At=arguments;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return lt=At.length>2&&At[2]!==void 0?At[2]:{},mt(it),lt.subres=Object.assign({tagging:""},lt.subres),lt.versionId&&(lt.subres.versionId=lt.versionId),at=this._objectName(at),ut=this._objectRequestParams("PUT",at,lt),ut.successStatuses=[200],it=Object.keys(it).map(function(jt){return{Key:jt,Value:it[jt]}}),dt={Tagging:{TagSet:{Tag:it}}},ut.mime="xml",ut.content=yt(dt),Ft.next=13,this.request(ut);case 13:return bt=Ft.sent,Ft.abrupt("return",{res:bt.res,status:bt.status});case 15:case"end":return Ft.stop()}},tt,this)}));function z(tt,at){return ft.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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=Bt;Ct.putSymlink=function(){var yt=(0,kt.default)(gt.default.mark(function mt(xt,ft,z){var tt,at;return gt.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return z=z||{},z.headers=z.headers||{},ft=this._escape(this._objectName(ft)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=ft,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),xt=this._objectName(xt),tt=this._objectRequestParams("PUT",xt,z),tt.successStatuses=[200],lt.next=13,this.request(tt);case 13:return at=lt.sent,lt.abrupt("return",{res:at.res});case 15:case"end":return lt.stop()}},mt,this)}));function Tt(mt,xt,ft){return yt.apply(this,arguments)}return Tt}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(ot,zt,Bt){"use strict";var vt=ot("url"),gt=ot("utility"),kt=ot("copy-to"),Ct=ot("../../common/signUtils"),yt=ot("../utils/isIP"),Tt=yt.isIP,mt=Bt;mt.signatureUrl=function(ft,z){if(Tt(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},ft=this._objectName(ft),z.method=z.method||"GET";var tt=gt.timestamp()+(z.expires||1800),at={bucket:this.options.bucket,object:ft},it=this._getResource(at);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var lt=Ct._signatureForURL(this.options.accessKeySecret,z,it,tt),ut=vt.parse(this._getReqUrl(at));return ut.query={OSSAccessKeyId:this.options.accessKeyId,Expires:tt,Signature:lt.Signature},kt(lt.subResource).to(ut.query),ut.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.function.name.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),Ct=ot("./utils/isArray"),yt=Ct.isArray,Tt=Bt;Tt._parallelNode=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at,it){var lt,ut,dt,bt,At,Dt,Ft,jt;return gt.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:lt=this,ut=[],dt=[],bt=z.length/tt,At=z.length%tt,Dt=At===0?bt:(z.length-At)/tt+1,Ft=1,jt=0;case 8:if(!(jt<z.length)){_t.next=26;break}if(!lt.isCancel()){_t.next=11;break}return _t.abrupt("break",26);case 11:if(it?dt.push(at(lt,z[jt],it)):dt.push(at(lt,z[jt])),!(dt.length===tt||Ft===Dt&&jt===z.length-1)){_t.next=23;break}return _t.prev=13,Ft+=1,_t.next=17,Promise.all(dt);case 17:_t.next=22;break;case 19:_t.prev=19,_t.t0=_t.catch(13),ut.push(_t.t0);case 22:dt=[];case 23:jt++,_t.next=8;break;case 26:return _t.abrupt("return",ut);case 27:case"end":return _t.stop()}},ft,this,[[13,19]])}));function xt(ft,z,tt,at){return mt.apply(this,arguments)}return xt}(),Tt._parallel=function(xt,ft,z){var tt=this;return new Promise(function(at){var it=[];if(ft<=0||!xt){at(it);return}function lt(_t){return function(){if(_t===null)throw new Error("Callback was already called.");var Wt=_t;_t=null;for(var Jt=arguments.length,Ut=new Array(Jt),Vt=0;Vt<Jt;Vt++)Ut[Vt]=arguments[Vt];Wt.apply(this,Ut)}}function ut(_t){var Wt=-1,Jt=_t.length;return function(){return++Wt<Jt&&!tt.isCancel()?{value:_t[Wt],key:Wt}:null}}var dt=ut(xt),bt=!1,At=0,Dt=!1;function Ft(_t){At-=1,_t?(bt=!0,it.push(_t),at(it)):bt&&At<=0?(bt=!0,at(it)):Dt||(tt.isCancel()?at(it):Nt())}function jt(_t,Wt){z(_t).then(function(Jt){Wt(null,Jt)}).catch(function(Jt){Wt(Jt)})}function Nt(){for(Dt=!0;At<ft&&!bt&&!tt.isCancel();){var _t=dt();if(_t===null||it.length>0){bt=!0,At<=0&&at(it);return}At+=1,jt(_t.value,lt(Ft))}Dt=!1}Nt()})},Tt.cancel=function(xt){this.options.cancelFlag=!0,yt(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(ft){if(ft.destroyed===!1){var z={name:"cancel",message:"cancel"};ft.destroy(z)}}),this.multipartUploadStreams=[],xt&&this.abortMultipartUpload(xt.name,xt.uploadId,xt.options)},Tt.isCancel=function(){return this.options.cancelFlag},Tt.resetCancelFlag=function(){this.options.cancelFlag=!1},Tt._stop=function(){this.options.cancelFlag=!0},Tt._makeCancelEvent=function(){var xt={status:0,name:"cancel"};return xt},Tt._makeAbortEvent=function(){var xt={status:0,name:"abort",message:"upload task has been abort"};return xt}},{"./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(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.array.sort.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.regexp.to-string.js");var gt=ot("./../../shims/crypto/crypto.js"),kt=ot("is-type-of"),Ct=ot("./utils/lowercaseKeyHeader"),yt=Ct.lowercaseKeyHeader;Bt.buildCanonicalizedResource=function(mt,xt){var ft="".concat(mt),z="?";if(kt.string(xt)&&xt.trim()!=="")ft+=z+xt;else if(kt.array(xt))xt.sort(),ft+=z+xt.join("&");else if(xt){var tt=function(lt,ut){return lt[0]>ut[0]?1:lt[0]<ut[0]?-1:0},at=function(lt){ft+=z+lt,(xt[lt]||xt[lt]===0)&&(ft+="=".concat(xt[lt])),z="&"};Object.keys(xt).sort(tt).forEach(at)}return ft},Bt.buildCanonicalString=function(mt,xt,ft,z){ft=ft||{};var tt=yt(ft.headers),at="x-oss-",it=[],lt={},ut=[mt.toUpperCase(),tt["content-md5"]||"",tt["content-type"],z||tt["x-oss-date"]];return Object.keys(tt).forEach(function(dt){var bt=dt.toLowerCase();bt.indexOf(at)===0&&(lt[bt]=String(tt[dt]).trim())}),Object.keys(lt).sort().forEach(function(dt){it.push("".concat(dt,":").concat(lt[dt]))}),ut=ut.concat(it),ut.push(this.buildCanonicalizedResource(xt,ft.parameters)),ut.join(`
`)},Bt.computeSignature=function(mt,xt){var ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=gt.createHmac("sha1",mt);return z.update(vt.from(xt,ft)).digest("base64")},Bt.authorization=function(mt,xt,ft,z){return"OSS ".concat(mt,":").concat(this.computeSignature(xt,ft,z))},Bt._signatureForURL=function(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ft=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,tt=arguments.length>4?arguments[4]:void 0,at={},it=xt.subResource,lt=it===void 0?{}:it;if(xt.process){var ut="x-oss-process";lt[ut]=xt.process}if(xt.trafficLimit){var dt="x-oss-traffic-limit";lt[dt]=xt.trafficLimit}if(xt.response&&Object.keys(xt.response).forEach(function(Ft){var jt="response-".concat(Ft.toLowerCase());lt[jt]=xt.response[Ft]}),Object.keys(xt).forEach(function(Ft){var jt=Ft.toLowerCase(),Nt=xt[Ft];jt.indexOf("x-oss-")===0?at[jt]=Nt:(jt.indexOf("content-md5")===0||jt.indexOf("content-type")===0)&&(at[Ft]=Nt)}),Object.prototype.hasOwnProperty.call(xt,"security-token")&&(lt["security-token"]=xt["security-token"]),Object.prototype.hasOwnProperty.call(xt,"callback")){var bt={callbackUrl:encodeURI(xt.callback.url),callbackBody:xt.callback.body};if(xt.callback.host&&(bt.callbackHost=xt.callback.host),xt.callback.contentType&&(bt.callbackBodyType=xt.callback.contentType),lt.callback=vt.from(JSON.stringify(bt)).toString("base64"),xt.callback.customValue){var At={};Object.keys(xt.callback.customValue).forEach(function(Ft){At["x:".concat(Ft)]=xt.callback.customValue[Ft]}),lt["callback-var"]=vt.from(JSON.stringify(At)).toString("base64")}}var Dt=this.buildCanonicalString(xt.method,ft,{headers:at,parameters:lt},z.toString());return{Signature:this.computeSignature(mt,Dt,tt),subResource:lt}}}).call(this)}).call(this,ot("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(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkBucketName=void 0,Bt.checkBucketName=function(vt){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,kt=gt?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!kt.test(vt))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkConfigValid=void 0;var vt={endpoint:gt,region:/^[a-zA-Z0-9\-_]+$/};function gt(kt){return typeof kt=="string"?/^[a-zA-Z0-9._:/-]+$/.test(kt):kt.host?/^[a-zA-Z0-9._:/-]+$/.test(kt.host):!1}Bt.checkConfigValid=function(kt,Ct){if(vt[Ct]){var yt=!0;if(vt[Ct]instanceof Function?yt=vt[Ct](kt):yt=vt[Ct].test(kt),!yt)throw new Error("The ".concat(Ct," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkEnv=void 0;function gt(kt){vt.browser&&console.warn(kt)}Bt.checkEnv=gt}).call(this)}).call(this,ot("_process"))},{_process:467}],54:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkObjectTag=void 0;var vt=ot("./checkValid"),gt=vt.checkValid,kt=ot("./isObject"),Ct=kt.isObject,yt=[{validator:function(ft){if(typeof ft!="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 (/)"}],Tt={key:[].concat(yt,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(yt,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function mt(xt){if(!Ct(xt))throw new Error("tag must be Object");var ft=Object.entries(xt);if(ft.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];ft.forEach(function(tt){tt.forEach(function(at,it){gt(at,Tt[z[it]])})})}Bt.checkObjectTag=mt},{"./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(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkValid=void 0;function vt(gt,kt){kt.forEach(function(Ct){if(Ct.validator)Ct.validator(gt);else if(Ct.pattern&&!Ct.pattern.test(gt))throw new Error(Ct.msg)})}Bt.checkValid=vt},{"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(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.object.assign.js"),ot("core-js/modules/es.array.concat.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.createRequest=void 0;var gt=ot("./../../../shims/crypto/crypto.js"),kt=ot("debug")("ali-oss"),Ct=ot("mime"),yt=ot("dateformat"),Tt=ot("copy-to"),mt=ot("path"),xt=ot("./encoder"),ft=xt.encoder,z=ot("./isIP"),tt=z.isIP,at=ot("./setRegion"),it=at.setRegion,lt=ot("../client/getReqUrl"),ut=lt.getReqUrl,dt=ot("./isDingTalk"),bt=dt.isDingTalk;function At(jt,Nt){return jt[Nt]||jt[Nt.toLowerCase()]}function Dt(jt,Nt){delete jt[Nt],delete jt[Nt.toLowerCase()]}function Ft(jt){var Nt=new Date;this.options.amendTimeSkewed&&(Nt=+new Date+this.options.amendTimeSkewed);var _t={"x-oss-date":yt(Nt,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(_t["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(_t["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(_t,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_t["x-oss-security-token"]=this.options.stsToken),Tt(jt.headers).to(_t),At(_t,"Content-Type")||(jt.mime&&jt.mime.indexOf("/")>0?_t["Content-Type"]=jt.mime:bt()?_t["Content-Type"]="application/octet-stream":_t["Content-Type"]=Ct.getType(jt.mime||mt.extname(jt.object||""))),At(_t,"Content-Type")||Dt(_t,"Content-Type"),jt.content&&(jt.disabledMD5||(!jt.headers||!jt.headers["Content-MD5"]?_t["Content-MD5"]=gt.createHash("md5").update(vt.from(jt.content,"utf8")).digest("base64"):_t["Content-MD5"]=jt.headers["Content-MD5"]),_t["Content-Length"]||(_t["Content-Length"]=jt.content.length));var Wt=Object.prototype.hasOwnProperty;for(var Jt in _t)_t[Jt]&&Wt.call(_t,Jt)&&(_t[Jt]=ft(String(_t[Jt]),this.options.headerEncoding));var Ut=this._getResource(jt);if(_t.authorization=this.authorization(jt.method,Ut,jt.subres,_t,this.options.headerEncoding),tt(this.options.endpoint.hostname)){var Vt=this.options,oe=Vt.region,se=Vt.internal,he=Vt.secure,be=it(oe,se,he);_t.host="".concat(jt.bucket,".").concat(be.host)}var Yt=ut.bind(this)(jt);kt("request %s %s, with headers %j, !!stream: %s",jt.method,Yt,_t,!!jt.stream);var ne=jt.timeout||this.options.timeout,ve={method:jt.method,content:jt.content,stream:jt.stream,headers:_t,timeout:ne,writeStream:jt.writeStream,customResponse:jt.customResponse,ctx:jt.ctx||this.ctx};return this.agent&&(ve.agent=this.agent),this.httpsAgent&&(ve.httpsAgent=this.httpsAgent),ve.enableProxy=!!this.options.enableProxy,ve.proxy=this.options.proxy?this.options.proxy:null,{url:Yt,params:ve}}Bt.createRequest=Ft}).call(this)}).call(this,ot("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(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.entries.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.dataFix=void 0;var vt=ot("./isObject"),gt=["true","TRUE","1",1],kt=["false","FALSE","0",0];function Ct(mt,xt,ft){if(vt.isObject(mt)){var z=xt.remove,tt=z===void 0?[]:z,at=xt.rename,it=at===void 0?{}:at,lt=xt.camel,ut=lt===void 0?[]:lt,dt=xt.bool,bt=dt===void 0?[]:dt,At=xt.lowerFirst,Dt=At===void 0?!1:At;return tt.forEach(function(Ft){return delete mt[Ft]}),Object.entries(it).forEach(function(Ft){mt[Ft[0]]&&(mt[Ft[1]]||(mt[Ft[1]]=mt[Ft[0]],delete mt[Ft[0]]))}),ut.forEach(function(Ft){if(mt[Ft]){var jt=Ft.replace(/^(.)/,function(Nt){return Nt.toLowerCase()}).replace(/-(\w)/g,function(Nt,_t){return _t.toUpperCase()});mt[jt]||(mt[jt]=mt[Ft])}}),bt.forEach(function(Ft){mt[Ft]=yt(mt[Ft])}),typeof ft=="function"&&ft(mt),Tt(mt,Dt),Ct}}Bt.dataFix=Ct;function yt(mt){return mt?gt.includes(mt)?!0:kt.includes(mt)?!1:mt:!1}function Tt(mt,xt){xt&&Object.keys(mt).forEach(function(ft){var z=ft.replace(/^\w/,function(tt){return tt.toLowerCase()});typeof mt[z]=="undefined"&&(mt[z]=mt[ft],delete mt[ft])})}},{"./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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.deepCopyWith=Bt.deepCopy=void 0;var kt=ot("./isBuffer");Bt.deepCopy=function(Ct){if(Ct===null||(0,gt.default)(Ct)!=="object")return Ct;if(kt.isBuffer(Ct))return Ct.slice();var yt=Array.isArray(Ct)?[]:{};return Object.keys(Ct).forEach(function(Tt){yt[Tt]=Bt.deepCopy(Ct[Tt])}),yt},Bt.deepCopyWith=function(Ct,yt){function Tt(mt,xt,ft){var z=yt(mt,xt,ft);if(z!==void 0)return z;if(mt===null||(0,gt.default)(mt)!=="object")return mt;if(kt.isBuffer(mt))return mt.slice();var tt=Array.isArray(mt)?[]:{};return Object.keys(mt).forEach(function(at){tt[at]=Tt(mt[at],at,mt)}),tt}return yt?Tt(Ct,"",null):Bt.deepCopy(Ct)}},{"./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(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.encoder=void 0;function gt(kt){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ct==="utf-8"?kt:vt.from(kt).toString("latin1")}Bt.encoder=gt}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatInventoryConfig=void 0;var vt=ot("../utils/dataFix"),gt=ot("../utils/isObject"),kt=ot("../utils/isArray"),Ct=ot("../utils/formatObjKey");function yt(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xt&&gt.isObject(mt)&&(mt=[mt]),kt.isArray(mt)?mt=mt.map(Tt):mt=Tt(mt),mt}Bt.formatInventoryConfig=yt;function Tt(mt){return vt.dataFix(mt,{bool:["IsEnabled"]},function(xt){var ft,z;xt.prefix=xt.Filter.Prefix,delete xt.Filter,xt.OSSBucketDestination=xt.Destination.OSSBucketDestination,xt.OSSBucketDestination.rolename=xt.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete xt.OSSBucketDestination.RoleArn,xt.OSSBucketDestination.bucket=xt.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete xt.OSSBucketDestination.Bucket,delete xt.Destination,xt.frequency=xt.Schedule.Frequency,delete xt.Schedule.Frequency,!((ft=xt==null?void 0:xt.OptionalFields)===null||ft===void 0)&&ft.Field&&!kt.isArray((z=xt.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xt.OptionalFields.Field=[xt.OptionalFields.Field])}),mt=Ct.formatObjKey(mt,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),mt}},{"../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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault");ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js");var gt=vt(ot("@babel/runtime/helpers/typeof"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.formatObjKey=void 0;function kt(yt,Tt,mt){if(yt===null||(0,gt.default)(yt)!=="object")return yt;var xt;if(Array.isArray(yt)){xt=[];for(var ft=0;ft<yt.length;ft++)xt.push(kt(yt[ft],Tt,mt))}else xt={},Object.keys(yt).forEach(function(z){xt[Ct(z,Tt,mt)]=kt(yt[z],Tt,mt)});return xt}Bt.formatObjKey=kt;function Ct(yt,Tt,mt){return mt&&mt.exclude&&mt.exclude.includes(yt)||(Tt==="firstUpperCase"?yt=yt.replace(/^./,function(xt){return xt.toUpperCase()}):Tt==="firstLowerCase"&&(yt=yt.replace(/^./,function(xt){return xt.toLowerCase()}))),yt}},{"@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(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getStrBytesCount=void 0;function vt(gt){for(var kt=0,Ct=0;Ct<gt.length;Ct++){var yt=gt.charAt(Ct);/^[\u00-\uff]$/.test(yt)?kt+=1:kt+=2}return kt}Bt.getStrBytesCount=vt},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isArray=void 0,Bt.isArray=function(vt){return Object.prototype.toString.call(vt)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBlob=void 0;function vt(gt){return typeof Blob!="undefined"&&gt instanceof Blob}Bt.isBlob=vt},{}],65:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBuffer=void 0;function gt(kt){return vt.isBuffer(kt)}Bt.isBuffer=gt}).call(this)}).call(this,{isBuffer:ot("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.array.includes.js"),ot("core-js/modules/es.string.includes.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isDingTalk=void 0;function gt(){return!!(vt.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Bt.isDingTalk=gt}).call(this)}).call(this,ot("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFile=void 0,Bt.isFile=function(vt){return typeof File!="undefined"&&vt instanceof File}},{}],68:[function(ot,zt,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFunction=void 0,Bt.isFunction=function(vt){return typeof vt=="function"}},{}],69:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isIP=void 0,Bt.isIP=function(vt){var gt=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,kt=/^\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 gt.test(vt)||kt.test(vt)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isObject=void 0,Bt.isObject=function(vt){return Object.prototype.toString.call(vt)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.lowercaseKeyHeader=void 0;var vt=ot("./isObject");function gt(kt){var Ct={};return vt.isObject(kt)&&Object.keys(kt).forEach(function(yt){Ct[yt.toLowerCase()]=kt[yt]}),Ct}Bt.lowercaseKeyHeader=gt},{"./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(ot,zt,Bt){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.obj2xml=void 0;var vt=ot("./formatObjKey");function gt(Ct){return Object.prototype.toString.call(Ct).replace(/(.*? |])/g,"").toLowerCase()}function kt(Ct,yt){var Tt="";return yt&&yt.headers&&(Tt=`<?xml version="1.0" encoding="UTF-8"?>
`),yt&&yt.firstUpperCase&&(Ct=vt.formatObjKey(Ct,"firstUpperCase")),gt(Ct)==="object"?Object.keys(Ct).forEach(function(mt){gt(Ct[mt])!=="undefined"&&gt(Ct[mt])!=="null"&&(gt(Ct[mt])==="string"||gt(Ct[mt])==="number"?Tt+="<".concat(mt,">").concat(Ct[mt],"</").concat(mt,">"):gt(Ct[mt])==="object"?Tt+="<".concat(mt,">").concat(kt(Ct[mt]),"</").concat(mt,">"):gt(Ct[mt])==="array"?Tt+=Ct[mt].map(function(xt){return"<".concat(mt,">").concat(kt(xt),"</").concat(mt,">")}).join(""):Tt+="<".concat(mt,">").concat(Ct[mt].toString(),"</").concat(mt,">"))}):Tt+=Ct.toString(),Tt}Bt.obj2xml=kt},{"./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(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.array.from.js"),ot("core-js/modules/es.string.iterator.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.symbol.js"),ot("core-js/modules/es.symbol.description.js"),ot("core-js/modules/es.symbol.iterator.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/web.dom-collections.iterator.js"),ot("core-js/modules/es.object.assign.js");function vt(yt,Tt){var mt=typeof Symbol!="undefined"&&yt[Symbol.iterator]||yt["@@iterator"];if(!mt){if(Array.isArray(yt)||(mt=gt(yt))||Tt&&yt&&typeof yt.length=="number"){mt&&(yt=mt);var xt=0,ft=function(){};return{s:ft,n:function(){return xt>=yt.length?{done:!0}:{done:!1,value:yt[xt++]}},e:function(lt){throw lt},f:ft}}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,tt=!1,at;return{s:function(){mt=mt.call(yt)},n:function(){var lt=mt.next();return z=lt.done,lt},e:function(lt){tt=!0,at=lt},f:function(){try{!z&&mt.return!=null&&mt.return()}finally{if(tt)throw at}}}}function gt(yt,Tt){if(yt){if(typeof yt=="string")return kt(yt,Tt);var mt=Object.prototype.toString.call(yt).slice(8,-1);if(mt==="Object"&&yt.constructor&&(mt=yt.constructor.name),mt==="Map"||mt==="Set")return Array.from(yt);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return kt(yt,Tt)}}function kt(yt,Tt){(Tt==null||Tt>yt.length)&&(Tt=yt.length);for(var mt=0,xt=new Array(Tt);mt<Tt;mt++)xt[mt]=yt[mt];return xt}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.omit=void 0;function Ct(yt,Tt){var mt=Object.assign({},yt),xt=vt(Tt),ft;try{for(xt.s();!(ft=xt.n()).done;){var z=ft.value;delete mt[z]}}catch(tt){xt.e(tt)}finally{xt.f()}return mt}Bt.omit=Ct},{"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(ot,zt,Bt){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.retry=void 0;function vt(gt,kt){var Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},yt=0,Tt=Ct.retryDelay,mt=Tt===void 0?500:Tt,xt=Ct.errorHandler,ft=xt===void 0?function(){return!0}:xt,z=function tt(){for(var at=arguments.length,it=new Array(at),lt=0;lt<at;lt++)it[lt]=arguments[lt];return new Promise(function(ut,dt){gt.apply(void 0,it).then(function(bt){yt=0,ut(bt)}).catch(function(bt){yt<kt&&ft(bt)?(yt++,setTimeout(function(){ut(tt.apply(void 0,it))},mt)):(yt=0,dt(bt))})})};return z}Bt.retry=vt},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ot,zt,Bt){"use strict";var vt=function(yt){return yt&&yt.__esModule?yt:{default:yt}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.setRegion=void 0;var gt=vt(ot("url")),kt=ot("./checkConfigValid");function Ct(yt){var Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;kt.checkConfigValid(yt,"region");var xt=mt?"https://":"http://",ft=Tt?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return yt.substr(0,z.length)===z&&(ft=".aliyuncs.com"),gt.default.parse(xt+yt+ft)}Bt.setRegion=Ct},{"./checkConfigValid":52,url:472}],76:[function(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator"));ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.array.find.js"),ot("core-js/modules/es.object.assign.js");var kt=vt(ot("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.checkCredentials=Bt.setSTSToken=void 0;var Ct=ot("./formatObjKey");function yt(){return Tt.apply(this,arguments)}function Tt(){return Tt=(0,kt.default)(gt.default.mark(function xt(){var ft,z;return gt.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(this.options||(this.options={}),ft=new Date,!this.stsTokenFreshTime){at.next=14;break}if(!(+ft-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){at.next=12;break}return this.stsTokenFreshTime=ft,at.next=7,this.options.refreshSTSToken();case 7:z=at.sent,z=Ct.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),mt(z),Object.assign(this.options,z);case 12:at.next=15;break;case 14:this.stsTokenFreshTime=ft;case 15:return at.abrupt("return",null);case 16:case"end":return at.stop()}},xt,this)})),Tt.apply(this,arguments)}Bt.setSTSToken=yt;function mt(xt){var ft=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(xt);ft.forEach(function(tt){if(!z.find(function(at){return at===tt}))throw Error("refreshSTSToken must return contains ".concat(tt))})}Bt.checkCredentials=mt},{"./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(ot,zt,Bt){function vt(kt,Ct,yt,Tt,mt,xt,ft){try{var z=kt[xt](ft),tt=z.value}catch(at){yt(at);return}z.done?Ct(tt):Promise.resolve(tt).then(Tt,mt)}function gt(kt){return function(){var Ct=this,yt=arguments;return new Promise(function(Tt,mt){var xt=kt.apply(Ct,yt);function ft(tt){vt(xt,Tt,mt,ft,z,"next",tt)}function z(tt){vt(xt,Tt,mt,ft,z,"throw",tt)}ft(void 0)})}}zt.exports=gt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],78:[function(ot,zt,Bt){function vt(gt){return gt&&gt.__esModule?gt:{default:gt}}zt.exports=vt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],79:[function(ot,zt,Bt){function vt(gt){"@babel/helpers - typeof";return zt.exports=vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(kt){return typeof kt}:function(kt){return kt&&typeof Symbol=="function"&&kt.constructor===Symbol&&kt!==Symbol.prototype?"symbol":typeof kt},zt.exports.__esModule=!0,zt.exports.default=zt.exports,vt(gt)}zt.exports=vt,zt.exports.__esModule=!0,zt.exports.default=zt.exports},{}],80:[function(ot,zt,Bt){zt.exports=ot("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ot,zt,Bt){zt.exports=vt,zt.exports.HttpsAgent=vt;function vt(){}},{}],82:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("object-assign");function kt(oe,se){if(oe===se)return 0;for(var he=oe.length,be=se.length,Yt=0,ne=Math.min(he,be);Yt<ne;++Yt)if(oe[Yt]!==se[Yt]){he=oe[Yt],be=se[Yt];break}return he<be?-1:be<he?1:0}function Ct(oe){return vt.Buffer&&typeof vt.Buffer.isBuffer=="function"?vt.Buffer.isBuffer(oe):!!(oe!=null&&oe._isBuffer)}var yt=ot("util/"),Tt=Object.prototype.hasOwnProperty,mt=Array.prototype.slice,xt=function(){return function(){}.name==="foo"}();function ft(oe){return Object.prototype.toString.call(oe)}function z(oe){return Ct(oe)||typeof vt.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(oe):oe?!!(oe instanceof DataView||oe.buffer&&oe.buffer instanceof ArrayBuffer):!1}var tt=zt.exports=At,at=/\s*function\s+([^\(\s]*)\s*/;function it(oe){if(yt.isFunction(oe)){if(xt)return oe.name;var se=oe.toString(),he=se.match(at);return he&&he[1]}}tt.AssertionError=function(se){this.name="AssertionError",this.actual=se.actual,this.expected=se.expected,this.operator=se.operator,se.message?(this.message=se.message,this.generatedMessage=!1):(this.message=dt(this),this.generatedMessage=!0);var he=se.stackStartFunction||bt;if(Error.captureStackTrace)Error.captureStackTrace(this,he);else{var be=new Error;if(be.stack){var Yt=be.stack,ne=it(he),ve=Yt.indexOf(`
`+ne);if(ve>=0){var Se=Yt.indexOf(`
`,ve+1);Yt=Yt.substring(Se+1)}this.stack=Yt}}},yt.inherits(tt.AssertionError,Error);function lt(oe,se){return typeof oe=="string"?oe.length<se?oe:oe.slice(0,se):oe}function ut(oe){if(xt||!yt.isFunction(oe))return yt.inspect(oe);var se=it(oe),he=se?": "+se:"";return"[Function"+he+"]"}function dt(oe){return lt(ut(oe.actual),128)+" "+oe.operator+" "+lt(ut(oe.expected),128)}function bt(oe,se,he,be,Yt){throw new tt.AssertionError({message:he,actual:oe,expected:se,operator:be,stackStartFunction:Yt})}tt.fail=bt;function At(oe,se){oe||bt(oe,!0,se,"==",tt.ok)}tt.ok=At,tt.equal=function(se,he,be){se!=he&&bt(se,he,be,"==",tt.equal)},tt.notEqual=function(se,he,be){se==he&&bt(se,he,be,"!=",tt.notEqual)},tt.deepEqual=function(se,he,be){Dt(se,he,!1)||bt(se,he,be,"deepEqual",tt.deepEqual)},tt.deepStrictEqual=function(se,he,be){Dt(se,he,!0)||bt(se,he,be,"deepStrictEqual",tt.deepStrictEqual)};function Dt(oe,se,he,be){if(oe===se)return!0;if(Ct(oe)&&Ct(se))return kt(oe,se)===0;if(yt.isDate(oe)&&yt.isDate(se))return oe.getTime()===se.getTime();if(yt.isRegExp(oe)&&yt.isRegExp(se))return oe.source===se.source&&oe.global===se.global&&oe.multiline===se.multiline&&oe.lastIndex===se.lastIndex&&oe.ignoreCase===se.ignoreCase;if((oe===null||typeof oe!="object")&&(se===null||typeof se!="object"))return he?oe===se:oe==se;if(z(oe)&&z(se)&&ft(oe)===ft(se)&&!(oe instanceof Float32Array||oe instanceof Float64Array))return kt(new Uint8Array(oe.buffer),new Uint8Array(se.buffer))===0;if(Ct(oe)!==Ct(se))return!1;be=be||{actual:[],expected:[]};var Yt=be.actual.indexOf(oe);return Yt!==-1&&Yt===be.expected.indexOf(se)?!0:(be.actual.push(oe),be.expected.push(se),jt(oe,se,he,be))}function Ft(oe){return Object.prototype.toString.call(oe)=="[object Arguments]"}function jt(oe,se,he,be){if(oe==null||se===null||se===void 0)return!1;if(yt.isPrimitive(oe)||yt.isPrimitive(se))return oe===se;if(he&&Object.getPrototypeOf(oe)!==Object.getPrototypeOf(se))return!1;var Yt=Ft(oe),ne=Ft(se);if(Yt&&!ne||!Yt&&ne)return!1;if(Yt)return oe=mt.call(oe),se=mt.call(se),Dt(oe,se,he);var ve=Vt(oe),Se=Vt(se),we,ce;if(ve.length!==Se.length)return!1;for(ve.sort(),Se.sort(),ce=ve.length-1;ce>=0;ce--)if(ve[ce]!==Se[ce])return!1;for(ce=ve.length-1;ce>=0;ce--)if(we=ve[ce],!Dt(oe[we],se[we],he,be))return!1;return!0}tt.notDeepEqual=function(se,he,be){Dt(se,he,!1)&&bt(se,he,be,"notDeepEqual",tt.notDeepEqual)},tt.notDeepStrictEqual=Nt;function Nt(oe,se,he){Dt(oe,se,!0)&&bt(oe,se,he,"notDeepStrictEqual",Nt)}tt.strictEqual=function(se,he,be){se!==he&&bt(se,he,be,"===",tt.strictEqual)},tt.notStrictEqual=function(se,he,be){se===he&&bt(se,he,be,"!==",tt.notStrictEqual)};function _t(oe,se){if(!oe||!se)return!1;if(Object.prototype.toString.call(se)=="[object RegExp]")return se.test(oe);try{if(oe instanceof se)return!0}catch(he){}return Error.isPrototypeOf(se)?!1:se.call({},oe)===!0}function Wt(oe){var se;try{oe()}catch(he){se=he}return se}function Jt(oe,se,he,be){var Yt;if(typeof se!="function")throw new TypeError('"block" argument must be a function');typeof he=="string"&&(be=he,he=null),Yt=Wt(se),be=(he&&he.name?" ("+he.name+").":".")+(be?" "+be:"."),oe&&!Yt&&bt(Yt,he,"Missing expected exception"+be);var ne=typeof be=="string",ve=!oe&&yt.isError(Yt),Se=!oe&&Yt&&!he;if((ve&&ne&&_t(Yt,he)||Se)&&bt(Yt,he,"Got unwanted exception"+be),oe&&Yt&&he&&!_t(Yt,he)||!oe&&Yt)throw Yt}tt.throws=function(oe,se,he){Jt(!0,oe,se,he)},tt.doesNotThrow=function(oe,se,he){Jt(!1,oe,se,he)},tt.ifError=function(oe){if(oe)throw oe};function Ut(oe,se){oe||bt(oe,!0,se,"==",Ut)}tt.strict=gt(Ut,tt,{equal:tt.strictEqual,deepEqual:tt.deepStrictEqual,notEqual:tt.notStrictEqual,notDeepEqual:tt.notDeepStrictEqual}),tt.strict.strict=tt.strict;var Vt=Object.keys||function(oe){var se=[];for(var he in oe)Tt.call(oe,he)&&se.push(he);return se}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ot,zt,Bt){typeof Object.create=="function"?zt.exports=function(gt,kt){gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}})}:zt.exports=function(gt,kt){gt.super_=kt;var Ct=function(){};Ct.prototype=kt.prototype,gt.prototype=new Ct,gt.prototype.constructor=gt}},{}],84:[function(ot,zt,Bt){zt.exports=function(gt){return gt&&typeof gt=="object"&&typeof gt.copy=="function"&&typeof gt.fill=="function"&&typeof gt.readUInt8=="function"}},{}],85:[function(ot,zt,Bt){(function(vt,gt){(function(){var kt=/%[sdj%]/g;Bt.format=function(Se){if(!jt(Se)){for(var we=[],ce=0;ce<arguments.length;ce++)we.push(Tt(arguments[ce]));return we.join(" ")}for(var ce=1,de=arguments,le=de.length,Ce=String(Se).replace(kt,function(me){if(me==="%%")return"%";if(ce>=le)return me;switch(me){case"%s":return String(de[ce++]);case"%d":return Number(de[ce++]);case"%j":try{return JSON.stringify(de[ce++])}catch(ke){return"[Circular]"}default:return me}}),fe=de[ce];ce<le;fe=de[++ce])At(fe)||!Jt(fe)?Ce+=" "+fe:Ce+=" "+Tt(fe);return Ce},Bt.deprecate=function(Se,we){if(_t(gt.process))return function(){return Bt.deprecate(Se,we).apply(this,arguments)};if(vt.noDeprecation===!0)return Se;var ce=!1;function de(){if(!ce){if(vt.throwDeprecation)throw new Error(we);vt.traceDeprecation?console.trace(we):console.error(we),ce=!0}return Se.apply(this,arguments)}return de};var Ct={},yt;Bt.debuglog=function(Se){if(_t(yt)&&(yt=vt.env.NODE_DEBUG||""),Se=Se.toUpperCase(),!Ct[Se])if(new RegExp("\\b"+Se+"\\b","i").test(yt)){var we=vt.pid;Ct[Se]=function(){var ce=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",Se,we,ce)}}else Ct[Se]=function(){};return Ct[Se]};function Tt(Se,we){var ce={seen:[],stylize:xt};return arguments.length>=3&&(ce.depth=arguments[2]),arguments.length>=4&&(ce.colors=arguments[3]),bt(we)?ce.showHidden=we:we&&Bt._extend(ce,we),_t(ce.showHidden)&&(ce.showHidden=!1),_t(ce.depth)&&(ce.depth=2),_t(ce.colors)&&(ce.colors=!1),_t(ce.customInspect)&&(ce.customInspect=!0),ce.colors&&(ce.stylize=mt),z(ce,Se,ce.depth)}Bt.inspect=Tt,Tt.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]},Tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function mt(Se,we){var ce=Tt.styles[we];return ce?"\x1B["+Tt.colors[ce][0]+"m"+Se+"\x1B["+Tt.colors[ce][1]+"m":Se}function xt(Se,we){return Se}function ft(Se){var we={};return Se.forEach(function(ce,de){we[ce]=!0}),we}function z(Se,we,ce){if(Se.customInspect&&we&&oe(we.inspect)&&we.inspect!==Bt.inspect&&!(we.constructor&&we.constructor.prototype===we)){var de=we.inspect(ce,Se);return jt(de)||(de=z(Se,de,ce)),de}var le=tt(Se,we);if(le)return le;var Ce=Object.keys(we),fe=ft(Ce);if(Se.showHidden&&(Ce=Object.getOwnPropertyNames(we)),Vt(we)&&(Ce.indexOf("message")>=0||Ce.indexOf("description")>=0))return at(we);if(Ce.length===0){if(oe(we)){var me=we.name?": "+we.name:"";return Se.stylize("[Function"+me+"]","special")}if(Wt(we))return Se.stylize(RegExp.prototype.toString.call(we),"regexp");if(Ut(we))return Se.stylize(Date.prototype.toString.call(we),"date");if(Vt(we))return at(we)}var ke="",pe=!1,qt=["{","}"];if(dt(we)&&(pe=!0,qt=["[","]"]),oe(we)){var Kt=we.name?": "+we.name:"";ke=" [Function"+Kt+"]"}if(Wt(we)&&(ke=" "+RegExp.prototype.toString.call(we)),Ut(we)&&(ke=" "+Date.prototype.toUTCString.call(we)),Vt(we)&&(ke=" "+at(we)),Ce.length===0&&(!pe||we.length==0))return qt[0]+ke+qt[1];if(ce<0)return Wt(we)?Se.stylize(RegExp.prototype.toString.call(we),"regexp"):Se.stylize("[Object]","special");Se.seen.push(we);var wt;return pe?wt=it(Se,we,ce,fe,Ce):wt=Ce.map(function(Lt){return lt(Se,we,ce,fe,Lt,pe)}),Se.seen.pop(),ut(wt,ke,qt)}function tt(Se,we){if(_t(we))return Se.stylize("undefined","undefined");if(jt(we)){var ce="'"+JSON.stringify(we).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Se.stylize(ce,"string")}if(Ft(we))return Se.stylize(""+we,"number");if(bt(we))return Se.stylize(""+we,"boolean");if(At(we))return Se.stylize("null","null")}function at(Se){return"["+Error.prototype.toString.call(Se)+"]"}function it(Se,we,ce,de,le){for(var Ce=[],fe=0,me=we.length;fe<me;++fe)ve(we,String(fe))?Ce.push(lt(Se,we,ce,de,String(fe),!0)):Ce.push("");return le.forEach(function(ke){ke.match(/^\d+$/)||Ce.push(lt(Se,we,ce,de,ke,!0))}),Ce}function lt(Se,we,ce,de,le,Ce){var fe,me,ke;if(ke=Object.getOwnPropertyDescriptor(we,le)||{value:we[le]},ke.get?ke.set?me=Se.stylize("[Getter/Setter]","special"):me=Se.stylize("[Getter]","special"):ke.set&&(me=Se.stylize("[Setter]","special")),ve(de,le)||(fe="["+le+"]"),me||(Se.seen.indexOf(ke.value)<0?(At(ce)?me=z(Se,ke.value,null):me=z(Se,ke.value,ce-1),me.indexOf(`
`)>-1&&(Ce?me=me.split(`
`).map(function(pe){return" "+pe}).join(`
`).substr(2):me=`
`+me.split(`
`).map(function(pe){return" "+pe}).join(`
`))):me=Se.stylize("[Circular]","special")),_t(fe)){if(Ce&&le.match(/^\d+$/))return me;fe=JSON.stringify(""+le),fe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(fe=fe.substr(1,fe.length-2),fe=Se.stylize(fe,"name")):(fe=fe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),fe=Se.stylize(fe,"string"))}return fe+": "+me}function ut(Se,we,ce){var de=0,le=Se.reduce(function(Ce,fe){return de++,fe.indexOf(`
`)>=0&&de++,Ce+fe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?ce[0]+(we===""?"":we+`
`)+" "+Se.join(`,
`)+" "+ce[1]:ce[0]+we+" "+Se.join(", ")+" "+ce[1]}function dt(Se){return Array.isArray(Se)}Bt.isArray=dt;function bt(Se){return typeof Se=="boolean"}Bt.isBoolean=bt;function At(Se){return Se===null}Bt.isNull=At;function Dt(Se){return Se==null}Bt.isNullOrUndefined=Dt;function Ft(Se){return typeof Se=="number"}Bt.isNumber=Ft;function jt(Se){return typeof Se=="string"}Bt.isString=jt;function Nt(Se){return typeof Se=="symbol"}Bt.isSymbol=Nt;function _t(Se){return Se===void 0}Bt.isUndefined=_t;function Wt(Se){return Jt(Se)&&he(Se)==="[object RegExp]"}Bt.isRegExp=Wt;function Jt(Se){return typeof Se=="object"&&Se!==null}Bt.isObject=Jt;function Ut(Se){return Jt(Se)&&he(Se)==="[object Date]"}Bt.isDate=Ut;function Vt(Se){return Jt(Se)&&(he(Se)==="[object Error]"||Se instanceof Error)}Bt.isError=Vt;function oe(Se){return typeof Se=="function"}Bt.isFunction=oe;function se(Se){return Se===null||typeof Se=="boolean"||typeof Se=="number"||typeof Se=="string"||typeof Se=="symbol"||typeof Se=="undefined"}Bt.isPrimitive=se,Bt.isBuffer=ot("./support/isBuffer");function he(Se){return Object.prototype.toString.call(Se)}function be(Se){return Se<10?"0"+Se.toString(10):Se.toString(10)}var Yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ne(){var Se=new Date,we=[be(Se.getHours()),be(Se.getMinutes()),be(Se.getSeconds())].join(":");return[Se.getDate(),Yt[Se.getMonth()],we].join(" ")}Bt.log=function(){console.log("%s - %s",ne(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(Se,we){if(!we||!Jt(we))return Se;for(var ce=Object.keys(we),de=ce.length;de--;)Se[ce[de]]=we[ce[de]];return Se};function ve(Se,we){return Object.prototype.hasOwnProperty.call(Se,we)}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],kt=typeof globalThis=="undefined"?vt:globalThis;zt.exports=function(){for(var yt=[],Tt=0;Tt<gt.length;Tt++)typeof kt[gt[Tt]]=="function"&&(yt[yt.length]=gt[Tt]);return yt}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ot,zt,Bt){"use strict";Bt.byteLength=xt,Bt.toByteArray=z,Bt.fromByteArray=it;for(var vt=[],gt=[],kt=typeof Uint8Array!="undefined"?Uint8Array:Array,Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yt=0,Tt=Ct.length;yt<Tt;++yt)vt[yt]=Ct[yt],gt[Ct.charCodeAt(yt)]=yt;gt[45]=62,gt[95]=63;function mt(lt){var ut=lt.length;if(ut%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var dt=lt.indexOf("=");dt===-1&&(dt=ut);var bt=dt===ut?0:4-dt%4;return[dt,bt]}function xt(lt){var ut=mt(lt),dt=ut[0],bt=ut[1];return(dt+bt)*3/4-bt}function ft(lt,ut,dt){return(ut+dt)*3/4-dt}function z(lt){var ut,dt=mt(lt),bt=dt[0],At=dt[1],Dt=new kt(ft(lt,bt,At)),Ft=0,jt=At>0?bt-4:bt,Nt;for(Nt=0;Nt<jt;Nt+=4)ut=gt[lt.charCodeAt(Nt)]<<18|gt[lt.charCodeAt(Nt+1)]<<12|gt[lt.charCodeAt(Nt+2)]<<6|gt[lt.charCodeAt(Nt+3)],Dt[Ft++]=ut>>16&255,Dt[Ft++]=ut>>8&255,Dt[Ft++]=ut&255;return At===2&&(ut=gt[lt.charCodeAt(Nt)]<<2|gt[lt.charCodeAt(Nt+1)]>>4,Dt[Ft++]=ut&255),At===1&&(ut=gt[lt.charCodeAt(Nt)]<<10|gt[lt.charCodeAt(Nt+1)]<<4|gt[lt.charCodeAt(Nt+2)]>>2,Dt[Ft++]=ut>>8&255,Dt[Ft++]=ut&255),Dt}function tt(lt){return vt[lt>>18&63]+vt[lt>>12&63]+vt[lt>>6&63]+vt[lt&63]}function at(lt,ut,dt){for(var bt,At=[],Dt=ut;Dt<dt;Dt+=3)bt=(lt[Dt]<<16&16711680)+(lt[Dt+1]<<8&65280)+(lt[Dt+2]&255),At.push(tt(bt));return At.join("")}function it(lt){for(var ut,dt=lt.length,bt=dt%3,At=[],Dt=16383,Ft=0,jt=dt-bt;Ft<jt;Ft+=Dt)At.push(at(lt,Ft,Ft+Dt>jt?jt:Ft+Dt));return bt===1?(ut=lt[dt-1],At.push(vt[ut>>2]+vt[ut<<4&63]+"==")):bt===2&&(ut=(lt[dt-2]<<8)+lt[dt-1],At.push(vt[ut>>10]+vt[ut>>4&63]+vt[ut<<2&63]+"=")),At.join("")}},{}],88:[function(ot,zt,Bt){(function(vt,gt,kt){typeof zt!="undefined"&&zt.exports?zt.exports=kt():typeof ue=="function"&&ue.amd?ue(gt,kt):vt[gt]=kt()})(this,"bowser",function(){var vt=!0;function gt(ft){function z(we){var ce=ft.match(we);return ce&&ce.length>1&&ce[1]||""}function tt(we){var ce=ft.match(we);return ce&&ce.length>1&&ce[2]||""}var at=z(/(ipod|iphone|ipad)/i).toLowerCase(),it=/like android/i.test(ft),lt=!it&&/android/i.test(ft),ut=/nexus\s*[0-6]\s*/i.test(ft),dt=!ut&&/nexus\s*[0-9]+/i.test(ft),bt=/CrOS/.test(ft),At=/silk/i.test(ft),Dt=/sailfish/i.test(ft),Ft=/tizen/i.test(ft),jt=/(web|hpw)(o|0)s/i.test(ft),Nt=/windows phone/i.test(ft),_t=/SamsungBrowser/i.test(ft),Wt=!Nt&&/windows/i.test(ft),Jt=!at&&!At&&/macintosh/i.test(ft),Ut=!lt&&!Dt&&!Ft&&!jt&&/linux/i.test(ft),Vt=tt(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),oe=z(/version\/(\d+(\.\d+)?)/i),se=/tablet/i.test(ft)&&!/tablet pc/i.test(ft),he=!se&&/[^-]mobi/i.test(ft),be=/xbox/i.test(ft),Yt;/opera/i.test(ft)?Yt={name:"Opera",opera:vt,version:oe||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(ft)?Yt={name:"Opera",opera:vt,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||oe}:/SamsungBrowser/i.test(ft)?Yt={name:"Samsung Internet for Android",samsungBrowser:vt,version:oe||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(ft)?Yt={name:"NAVER Whale browser",whale:vt,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(ft)?Yt={name:"MZ Browser",mzbrowser:vt,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(ft)?Yt={name:"Opera Coast",coast:vt,version:oe||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(ft)?Yt={name:"Focus",focus:vt,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(ft)?Yt={name:"Yandex Browser",yandexbrowser:vt,version:oe||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(ft)?Yt={name:"UC Browser",ucbrowser:vt,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(ft)?Yt={name:"Maxthon",maxthon:vt,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(ft)?Yt={name:"Epiphany",epiphany:vt,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(ft)?Yt={name:"Puffin",puffin:vt,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(ft)?Yt={name:"Sleipnir",sleipnir:vt,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(ft)?Yt={name:"K-Meleon",kMeleon:vt,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Nt?(Yt={name:"Windows Phone",osname:"Windows Phone",windowsphone:vt},Vt?(Yt.msedge=vt,Yt.version=Vt):(Yt.msie=vt,Yt.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(ft)?Yt={name:"Internet Explorer",msie:vt,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:bt?Yt={name:"Chrome",osname:"Chrome OS",chromeos:vt,chromeBook:vt,chrome:vt,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(ft)?Yt={name:"Microsoft Edge",msedge:vt,version:Vt}:/vivaldi/i.test(ft)?Yt={name:"Vivaldi",vivaldi:vt,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||oe}:Dt?Yt={name:"Sailfish",osname:"Sailfish OS",sailfish:vt,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(ft)?Yt={name:"SeaMonkey",seamonkey:vt,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(ft)?(Yt={name:"Firefox",firefox:vt,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ft)&&(Yt.firefoxos=vt,Yt.osname="Firefox OS")):At?Yt={name:"Amazon Silk",silk:vt,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(ft)?Yt={name:"PhantomJS",phantom:vt,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(ft)?Yt={name:"SlimerJS",slimer:vt,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(ft)||/rim\stablet/i.test(ft)?Yt={name:"BlackBerry",osname:"BlackBerry OS",blackberry:vt,version:oe||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:jt?(Yt={name:"WebOS",osname:"WebOS",webos:vt,version:oe||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(ft)&&(Yt.touchpad=vt)):/bada/i.test(ft)?Yt={name:"Bada",osname:"Bada",bada:vt,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Ft?Yt={name:"Tizen",osname:"Tizen",tizen:vt,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||oe}:/qupzilla/i.test(ft)?Yt={name:"QupZilla",qupzilla:vt,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||oe}:/chromium/i.test(ft)?Yt={name:"Chromium",chromium:vt,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||oe}:/chrome|crios|crmo/i.test(ft)?Yt={name:"Chrome",chrome:vt,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:lt?Yt={name:"Android",version:oe}:/safari|applewebkit/i.test(ft)?(Yt={name:"Safari",safari:vt},oe&&(Yt.version=oe)):at?(Yt={name:at=="iphone"?"iPhone":at=="ipad"?"iPad":"iPod"},oe&&(Yt.version=oe)):/googlebot/i.test(ft)?Yt={name:"Googlebot",googlebot:vt,version:z(/googlebot\/(\d+(\.\d+))/i)||oe}:Yt={name:z(/^(.*)\/(.*) /),version:tt(/^(.*)\/(.*) /)},!Yt.msedge&&/(apple)?webkit/i.test(ft)?(/(apple)?webkit\/537\.36/i.test(ft)?(Yt.name=Yt.name||"Blink",Yt.blink=vt):(Yt.name=Yt.name||"Webkit",Yt.webkit=vt),!Yt.version&&oe&&(Yt.version=oe)):!Yt.opera&&/gecko\//i.test(ft)&&(Yt.name=Yt.name||"Gecko",Yt.gecko=vt,Yt.version=Yt.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Yt.windowsphone&&(lt||Yt.silk)?(Yt.android=vt,Yt.osname="Android"):!Yt.windowsphone&&at?(Yt[at]=vt,Yt.ios=vt,Yt.osname="iOS"):Jt?(Yt.mac=vt,Yt.osname="macOS"):be?(Yt.xbox=vt,Yt.osname="Xbox"):Wt?(Yt.windows=vt,Yt.osname="Windows"):Ut&&(Yt.linux=vt,Yt.osname="Linux");function ne(we){switch(we){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 ve="";Yt.windows?ve=ne(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Yt.windowsphone?ve=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Yt.mac?(ve=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),ve=ve.replace(/[_\s]/g,".")):at?(ve=z(/os (\d+([_\s]\d+)*) like mac os x/i),ve=ve.replace(/[_\s]/g,".")):lt?ve=z(/android[ \/-](\d+(\.\d+)*)/i):Yt.webos?ve=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Yt.blackberry?ve=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Yt.bada?ve=z(/bada\/(\d+(\.\d+)*)/i):Yt.tizen&&(ve=z(/tizen[\/\s](\d+(\.\d+)*)/i)),ve&&(Yt.osversion=ve);var Se=!Yt.windows&&ve.split(".")[0];return se||dt||at=="ipad"||lt&&(Se==3||Se>=4&&!he)||Yt.silk?Yt.tablet=vt:(he||at=="iphone"||at=="ipod"||lt||ut||Yt.blackberry||Yt.webos||Yt.bada)&&(Yt.mobile=vt),Yt.msedge||Yt.msie&&Yt.version>=10||Yt.yandexbrowser&&Yt.version>=15||Yt.vivaldi&&Yt.version>=1||Yt.chrome&&Yt.version>=20||Yt.samsungBrowser&&Yt.version>=4||Yt.whale&&Tt([Yt.version,"1.0"])===1||Yt.mzbrowser&&Tt([Yt.version,"6.0"])===1||Yt.focus&&Tt([Yt.version,"1.0"])===1||Yt.firefox&&Yt.version>=20||Yt.safari&&Yt.version>=6||Yt.opera&&Yt.version>=10||Yt.ios&&Yt.osversion&&Yt.osversion.split(".")[0]>=6||Yt.blackberry&&Yt.version>=10.1||Yt.chromium&&Yt.version>=20?Yt.a=vt:Yt.msie&&Yt.version<10||Yt.chrome&&Yt.version<20||Yt.firefox&&Yt.version<20||Yt.safari&&Yt.version<6||Yt.opera&&Yt.version<10||Yt.ios&&Yt.osversion&&Yt.osversion.split(".")[0]<6||Yt.chromium&&Yt.version<20?Yt.c=vt:Yt.x=vt,Yt}var kt=gt(typeof navigator!="undefined"&&navigator.userAgent||"");kt.test=function(ft){for(var z=0;z<ft.length;++z){var tt=ft[z];if(typeof tt=="string"&&tt in kt)return!0}return!1};function Ct(ft){return ft.split(".").length}function yt(ft,z){var tt=[],at;if(Array.prototype.map)return Array.prototype.map.call(ft,z);for(at=0;at<ft.length;at++)tt.push(z(ft[at]));return tt}function Tt(ft){for(var z=Math.max(Ct(ft[0]),Ct(ft[1])),tt=yt(ft,function(at){var it=z-Ct(at);return at=at+new Array(it+1).join(".0"),yt(at.split("."),function(lt){return new Array(20-lt.length).join("0")+lt}).reverse()});--z>=0;){if(tt[0][z]>tt[1][z])return 1;if(tt[0][z]===tt[1][z]){if(z===0)return 0}else return-1}}function mt(ft,z,tt){var at=kt;typeof z=="string"&&(tt=z,z=void 0),z===void 0&&(z=!1),tt&&(at=gt(tt));var it=""+at.version;for(var lt in ft)if(ft.hasOwnProperty(lt)&&at[lt]){if(typeof ft[lt]!="string")throw new Error("Browser version in the minVersion map should be a string: "+lt+": "+String(ft));return Tt([it,ft[lt]])<0}return z}function xt(ft,z,tt){return!mt(ft,z,tt)}return kt.isUnsupportedBrowser=mt,kt.compareVersions=Tt,kt.check=xt,kt._detect=gt,kt.detect=gt,kt})},{}],89:[function(ot,zt,Bt){},{}],90:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("base64-js"),kt=ot("ieee754");Bt.Buffer=mt,Bt.SlowBuffer=bt,Bt.INSPECT_MAX_BYTES=50;var Ct=2147483647;Bt.kMaxLength=Ct,mt.TYPED_ARRAY_SUPPORT=yt(),!mt.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 yt(){try{var Rt=new Uint8Array(1);return Rt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Rt.foo()===42}catch(Ht){return!1}}Object.defineProperty(mt.prototype,"parent",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.buffer}}),Object.defineProperty(mt.prototype,"offset",{enumerable:!0,get:function(){if(mt.isBuffer(this))return this.byteOffset}});function Tt(Rt){if(Rt>Ct)throw new RangeError('The value "'+Rt+'" is invalid for option "size"');var Ht=new Uint8Array(Rt);return Ht.__proto__=mt.prototype,Ht}function mt(Rt,Ht,re){if(typeof Rt=="number"){if(typeof Ht=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tt(Rt)}return xt(Rt,Ht,re)}typeof Symbol!="undefined"&&Symbol.species!=null&&mt[Symbol.species]===mt&&Object.defineProperty(mt,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),mt.poolSize=8192;function xt(Rt,Ht,re){if(typeof Rt=="string")return at(Rt,Ht);if(ArrayBuffer.isView(Rt))return it(Rt);if(Rt==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rt);if(ee(Rt,ArrayBuffer)||Rt&&ee(Rt.buffer,ArrayBuffer))return lt(Rt,Ht,re);if(typeof Rt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ye=Rt.valueOf&&Rt.valueOf();if(ye!=null&&ye!==Rt)return mt.from(ye,Ht,re);var Pe=ut(Rt);if(Pe)return Pe;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Rt[Symbol.toPrimitive]=="function")return mt.from(Rt[Symbol.toPrimitive]("string"),Ht,re);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Rt)}mt.from=function(Rt,Ht,re){return xt(Rt,Ht,re)},mt.prototype.__proto__=Uint8Array.prototype,mt.__proto__=Uint8Array;function ft(Rt){if(typeof Rt!="number")throw new TypeError('"size" argument must be of type number');if(Rt<0)throw new RangeError('The value "'+Rt+'" is invalid for option "size"')}function z(Rt,Ht,re){return ft(Rt),Rt<=0?Tt(Rt):Ht!==void 0?typeof re=="string"?Tt(Rt).fill(Ht,re):Tt(Rt).fill(Ht):Tt(Rt)}mt.alloc=function(Rt,Ht,re){return z(Rt,Ht,re)};function tt(Rt){return ft(Rt),Tt(Rt<0?0:dt(Rt)|0)}mt.allocUnsafe=function(Rt){return tt(Rt)},mt.allocUnsafeSlow=function(Rt){return tt(Rt)};function at(Rt,Ht){if((typeof Ht!="string"||Ht==="")&&(Ht="utf8"),!mt.isEncoding(Ht))throw new TypeError("Unknown encoding: "+Ht);var re=At(Rt,Ht)|0,ye=Tt(re),Pe=ye.write(Rt,Ht);return Pe!==re&&(ye=ye.slice(0,Pe)),ye}function it(Rt){for(var Ht=Rt.length<0?0:dt(Rt.length)|0,re=Tt(Ht),ye=0;ye<Ht;ye+=1)re[ye]=Rt[ye]&255;return re}function lt(Rt,Ht,re){if(Ht<0||Rt.byteLength<Ht)throw new RangeError('"offset" is outside of buffer bounds');if(Rt.byteLength<Ht+(re||0))throw new RangeError('"length" is outside of buffer bounds');var ye;return Ht===void 0&&re===void 0?ye=new Uint8Array(Rt):re===void 0?ye=new Uint8Array(Rt,Ht):ye=new Uint8Array(Rt,Ht,re),ye.__proto__=mt.prototype,ye}function ut(Rt){if(mt.isBuffer(Rt)){var Ht=dt(Rt.length)|0,re=Tt(Ht);return re.length===0||Rt.copy(re,0,0,Ht),re}if(Rt.length!==void 0)return typeof Rt.length!="number"||It(Rt.length)?Tt(0):it(Rt);if(Rt.type==="Buffer"&&Array.isArray(Rt.data))return it(Rt.data)}function dt(Rt){if(Rt>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return Rt|0}function bt(Rt){return+Rt!=Rt&&(Rt=0),mt.alloc(+Rt)}mt.isBuffer=function(Ht){return Ht!=null&&Ht._isBuffer===!0&&Ht!==mt.prototype},mt.compare=function(Ht,re){if(ee(Ht,Uint8Array)&&(Ht=mt.from(Ht,Ht.offset,Ht.byteLength)),ee(re,Uint8Array)&&(re=mt.from(re,re.offset,re.byteLength)),!mt.isBuffer(Ht)||!mt.isBuffer(re))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ht===re)return 0;for(var ye=Ht.length,Pe=re.length,Ae=0,Oe=Math.min(ye,Pe);Ae<Oe;++Ae)if(Ht[Ae]!==re[Ae]){ye=Ht[Ae],Pe=re[Ae];break}return ye<Pe?-1:Pe<ye?1:0},mt.isEncoding=function(Ht){switch(String(Ht).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}},mt.concat=function(Ht,re){if(!Array.isArray(Ht))throw new TypeError('"list" argument must be an Array of Buffers');if(Ht.length===0)return mt.alloc(0);var ye;if(re===void 0)for(re=0,ye=0;ye<Ht.length;++ye)re+=Ht[ye].length;var Pe=mt.allocUnsafe(re),Ae=0;for(ye=0;ye<Ht.length;++ye){var Oe=Ht[ye];if(ee(Oe,Uint8Array)&&(Oe=mt.from(Oe)),!mt.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(Pe,Ae),Ae+=Oe.length}return Pe};function At(Rt,Ht){if(mt.isBuffer(Rt))return Rt.length;if(ArrayBuffer.isView(Rt)||ee(Rt,ArrayBuffer))return Rt.byteLength;if(typeof Rt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Rt);var re=Rt.length,ye=arguments.length>2&&arguments[2]===!0;if(!ye&&re===0)return 0;for(var Pe=!1;;)switch(Ht){case"ascii":case"latin1":case"binary":return re;case"utf8":case"utf-8":return qt(Rt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re*2;case"hex":return re>>>1;case"base64":return Lt(Rt).length;default:if(Pe)return ye?-1:qt(Rt).length;Ht=(""+Ht).toLowerCase(),Pe=!0}}mt.byteLength=At;function Dt(Rt,Ht,re){var ye=!1;if((Ht===void 0||Ht<0)&&(Ht=0),Ht>this.length||((re===void 0||re>this.length)&&(re=this.length),re<=0)||(re>>>=0,Ht>>>=0,re<=Ht))return"";for(Rt||(Rt="utf8");;)switch(Rt){case"hex":return Se(this,Ht,re);case"utf8":case"utf-8":return he(this,Ht,re);case"ascii":return ne(this,Ht,re);case"latin1":case"binary":return ve(this,Ht,re);case"base64":return se(this,Ht,re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,Ht,re);default:if(ye)throw new TypeError("Unknown encoding: "+Rt);Rt=(Rt+"").toLowerCase(),ye=!0}}mt.prototype._isBuffer=!0;function Ft(Rt,Ht,re){var ye=Rt[Ht];Rt[Ht]=Rt[re],Rt[re]=ye}mt.prototype.swap16=function(){var Ht=this.length;if(Ht%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var re=0;re<Ht;re+=2)Ft(this,re,re+1);return this},mt.prototype.swap32=function(){var Ht=this.length;if(Ht%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var re=0;re<Ht;re+=4)Ft(this,re,re+3),Ft(this,re+1,re+2);return this},mt.prototype.swap64=function(){var Ht=this.length;if(Ht%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var re=0;re<Ht;re+=8)Ft(this,re,re+7),Ft(this,re+1,re+6),Ft(this,re+2,re+5),Ft(this,re+3,re+4);return this},mt.prototype.toString=function(){var Ht=this.length;return Ht===0?"":arguments.length===0?he(this,0,Ht):Dt.apply(this,arguments)},mt.prototype.toLocaleString=mt.prototype.toString,mt.prototype.equals=function(Ht){if(!mt.isBuffer(Ht))throw new TypeError("Argument must be a Buffer");return this===Ht?!0:mt.compare(this,Ht)===0},mt.prototype.inspect=function(){var Ht="",re=Bt.INSPECT_MAX_BYTES;return Ht=this.toString("hex",0,re).replace(/(.{2})/g,"$1 ").trim(),this.length>re&&(Ht+=" ... "),"<Buffer "+Ht+">"},mt.prototype.compare=function(Ht,re,ye,Pe,Ae){if(ee(Ht,Uint8Array)&&(Ht=mt.from(Ht,Ht.offset,Ht.byteLength)),!mt.isBuffer(Ht))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ht);if(re===void 0&&(re=0),ye===void 0&&(ye=Ht?Ht.length:0),Pe===void 0&&(Pe=0),Ae===void 0&&(Ae=this.length),re<0||ye>Ht.length||Pe<0||Ae>this.length)throw new RangeError("out of range index");if(Pe>=Ae&&re>=ye)return 0;if(Pe>=Ae)return-1;if(re>=ye)return 1;if(re>>>=0,ye>>>=0,Pe>>>=0,Ae>>>=0,this===Ht)return 0;for(var Oe=Ae-Pe,Ie=ye-re,Qe=Math.min(Oe,Ie),qe=this.slice(Pe,Ae),nn=Ht.slice(re,ye),Ke=0;Ke<Qe;++Ke)if(qe[Ke]!==nn[Ke]){Oe=qe[Ke],Ie=nn[Ke];break}return Oe<Ie?-1:Ie<Oe?1:0};function jt(Rt,Ht,re,ye,Pe){if(Rt.length===0)return-1;if(typeof re=="string"?(ye=re,re=0):re>2147483647?re=2147483647:re<-2147483648&&(re=-2147483648),re=+re,It(re)&&(re=Pe?0:Rt.length-1),re<0&&(re=Rt.length+re),re>=Rt.length){if(Pe)return-1;re=Rt.length-1}else if(re<0)if(Pe)re=0;else return-1;if(typeof Ht=="string"&&(Ht=mt.from(Ht,ye)),mt.isBuffer(Ht))return Ht.length===0?-1:Nt(Rt,Ht,re,ye,Pe);if(typeof Ht=="number")return Ht=Ht&255,typeof Uint8Array.prototype.indexOf=="function"?Pe?Uint8Array.prototype.indexOf.call(Rt,Ht,re):Uint8Array.prototype.lastIndexOf.call(Rt,Ht,re):Nt(Rt,[Ht],re,ye,Pe);throw new TypeError("val must be string, number or Buffer")}function Nt(Rt,Ht,re,ye,Pe){var Ae=1,Oe=Rt.length,Ie=Ht.length;if(ye!==void 0&&(ye=String(ye).toLowerCase(),ye==="ucs2"||ye==="ucs-2"||ye==="utf16le"||ye==="utf-16le")){if(Rt.length<2||Ht.length<2)return-1;Ae=2,Oe/=2,Ie/=2,re/=2}function Qe(We,He){return Ae===1?We[He]:We.readUInt16BE(He*Ae)}var qe;if(Pe){var nn=-1;for(qe=re;qe<Oe;qe++)if(Qe(Rt,qe)===Qe(Ht,nn===-1?0:qe-nn)){if(nn===-1&&(nn=qe),qe-nn+1===Ie)return nn*Ae}else nn!==-1&&(qe-=qe-nn),nn=-1}else for(re+Ie>Oe&&(re=Oe-Ie),qe=re;qe>=0;qe--){for(var Ke=!0,Ue=0;Ue<Ie;Ue++)if(Qe(Rt,qe+Ue)!==Qe(Ht,Ue)){Ke=!1;break}if(Ke)return qe}return-1}mt.prototype.includes=function(Ht,re,ye){return this.indexOf(Ht,re,ye)!==-1},mt.prototype.indexOf=function(Ht,re,ye){return jt(this,Ht,re,ye,!0)},mt.prototype.lastIndexOf=function(Ht,re,ye){return jt(this,Ht,re,ye,!1)};function _t(Rt,Ht,re,ye){re=Number(re)||0;var Pe=Rt.length-re;ye?(ye=Number(ye),ye>Pe&&(ye=Pe)):ye=Pe;var Ae=Ht.length;ye>Ae/2&&(ye=Ae/2);for(var Oe=0;Oe<ye;++Oe){var Ie=parseInt(Ht.substr(Oe*2,2),16);if(It(Ie))return Oe;Rt[re+Oe]=Ie}return Oe}function Wt(Rt,Ht,re,ye){return Zt(qt(Ht,Rt.length-re),Rt,re,ye)}function Jt(Rt,Ht,re,ye){return Zt(Kt(Ht),Rt,re,ye)}function Ut(Rt,Ht,re,ye){return Jt(Rt,Ht,re,ye)}function Vt(Rt,Ht,re,ye){return Zt(Lt(Ht),Rt,re,ye)}function oe(Rt,Ht,re,ye){return Zt(wt(Ht,Rt.length-re),Rt,re,ye)}mt.prototype.write=function(Ht,re,ye,Pe){if(re===void 0)Pe="utf8",ye=this.length,re=0;else if(ye===void 0&&typeof re=="string")Pe=re,ye=this.length,re=0;else if(isFinite(re))re=re>>>0,isFinite(ye)?(ye=ye>>>0,Pe===void 0&&(Pe="utf8")):(Pe=ye,ye=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-re;if((ye===void 0||ye>Ae)&&(ye=Ae),Ht.length>0&&(ye<0||re<0)||re>this.length)throw new RangeError("Attempt to write outside buffer bounds");Pe||(Pe="utf8");for(var Oe=!1;;)switch(Pe){case"hex":return _t(this,Ht,re,ye);case"utf8":case"utf-8":return Wt(this,Ht,re,ye);case"ascii":return Jt(this,Ht,re,ye);case"latin1":case"binary":return Ut(this,Ht,re,ye);case"base64":return Vt(this,Ht,re,ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,Ht,re,ye);default:if(Oe)throw new TypeError("Unknown encoding: "+Pe);Pe=(""+Pe).toLowerCase(),Oe=!0}},mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(Rt,Ht,re){return Ht===0&&re===Rt.length?gt.fromByteArray(Rt):gt.fromByteArray(Rt.slice(Ht,re))}function he(Rt,Ht,re){re=Math.min(Rt.length,re);for(var ye=[],Pe=Ht;Pe<re;){var Ae=Rt[Pe],Oe=null,Ie=Ae>239?4:Ae>223?3:Ae>191?2:1;if(Pe+Ie<=re){var Qe,qe,nn,Ke;switch(Ie){case 1:Ae<128&&(Oe=Ae);break;case 2:Qe=Rt[Pe+1],(Qe&192)===128&&(Ke=(Ae&31)<<6|Qe&63,Ke>127&&(Oe=Ke));break;case 3:Qe=Rt[Pe+1],qe=Rt[Pe+2],(Qe&192)===128&&(qe&192)===128&&(Ke=(Ae&15)<<12|(Qe&63)<<6|qe&63,Ke>2047&&(Ke<55296||Ke>57343)&&(Oe=Ke));break;case 4:Qe=Rt[Pe+1],qe=Rt[Pe+2],nn=Rt[Pe+3],(Qe&192)===128&&(qe&192)===128&&(nn&192)===128&&(Ke=(Ae&15)<<18|(Qe&63)<<12|(qe&63)<<6|nn&63,Ke>65535&&Ke<1114112&&(Oe=Ke))}}Oe===null?(Oe=65533,Ie=1):Oe>65535&&(Oe-=65536,ye.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),ye.push(Oe),Pe+=Ie}return Yt(ye)}var be=4096;function Yt(Rt){var Ht=Rt.length;if(Ht<=be)return String.fromCharCode.apply(String,Rt);for(var re="",ye=0;ye<Ht;)re+=String.fromCharCode.apply(String,Rt.slice(ye,ye+=be));return re}function ne(Rt,Ht,re){var ye="";re=Math.min(Rt.length,re);for(var Pe=Ht;Pe<re;++Pe)ye+=String.fromCharCode(Rt[Pe]&127);return ye}function ve(Rt,Ht,re){var ye="";re=Math.min(Rt.length,re);for(var Pe=Ht;Pe<re;++Pe)ye+=String.fromCharCode(Rt[Pe]);return ye}function Se(Rt,Ht,re){var ye=Rt.length;(!Ht||Ht<0)&&(Ht=0),(!re||re<0||re>ye)&&(re=ye);for(var Pe="",Ae=Ht;Ae<re;++Ae)Pe+=pe(Rt[Ae]);return Pe}function we(Rt,Ht,re){for(var ye=Rt.slice(Ht,re),Pe="",Ae=0;Ae<ye.length;Ae+=2)Pe+=String.fromCharCode(ye[Ae]+ye[Ae+1]*256);return Pe}mt.prototype.slice=function(Ht,re){var ye=this.length;Ht=~~Ht,re=re===void 0?ye:~~re,Ht<0?(Ht+=ye,Ht<0&&(Ht=0)):Ht>ye&&(Ht=ye),re<0?(re+=ye,re<0&&(re=0)):re>ye&&(re=ye),re<Ht&&(re=Ht);var Pe=this.subarray(Ht,re);return Pe.__proto__=mt.prototype,Pe};function ce(Rt,Ht,re){if(Rt%1!==0||Rt<0)throw new RangeError("offset is not uint");if(Rt+Ht>re)throw new RangeError("Trying to access beyond buffer length")}mt.prototype.readUIntLE=function(Ht,re,ye){Ht=Ht>>>0,re=re>>>0,ye||ce(Ht,re,this.length);for(var Pe=this[Ht],Ae=1,Oe=0;++Oe<re&&(Ae*=256);)Pe+=this[Ht+Oe]*Ae;return Pe},mt.prototype.readUIntBE=function(Ht,re,ye){Ht=Ht>>>0,re=re>>>0,ye||ce(Ht,re,this.length);for(var Pe=this[Ht+--re],Ae=1;re>0&&(Ae*=256);)Pe+=this[Ht+--re]*Ae;return Pe},mt.prototype.readUInt8=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,1,this.length),this[Ht]},mt.prototype.readUInt16LE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,2,this.length),this[Ht]|this[Ht+1]<<8},mt.prototype.readUInt16BE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,2,this.length),this[Ht]<<8|this[Ht+1]},mt.prototype.readUInt32LE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),(this[Ht]|this[Ht+1]<<8|this[Ht+2]<<16)+this[Ht+3]*16777216},mt.prototype.readUInt32BE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),this[Ht]*16777216+(this[Ht+1]<<16|this[Ht+2]<<8|this[Ht+3])},mt.prototype.readIntLE=function(Ht,re,ye){Ht=Ht>>>0,re=re>>>0,ye||ce(Ht,re,this.length);for(var Pe=this[Ht],Ae=1,Oe=0;++Oe<re&&(Ae*=256);)Pe+=this[Ht+Oe]*Ae;return Ae*=128,Pe>=Ae&&(Pe-=Math.pow(2,8*re)),Pe},mt.prototype.readIntBE=function(Ht,re,ye){Ht=Ht>>>0,re=re>>>0,ye||ce(Ht,re,this.length);for(var Pe=re,Ae=1,Oe=this[Ht+--Pe];Pe>0&&(Ae*=256);)Oe+=this[Ht+--Pe]*Ae;return Ae*=128,Oe>=Ae&&(Oe-=Math.pow(2,8*re)),Oe},mt.prototype.readInt8=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,1,this.length),this[Ht]&128?(255-this[Ht]+1)*-1:this[Ht]},mt.prototype.readInt16LE=function(Ht,re){Ht=Ht>>>0,re||ce(Ht,2,this.length);var ye=this[Ht]|this[Ht+1]<<8;return ye&32768?ye|4294901760:ye},mt.prototype.readInt16BE=function(Ht,re){Ht=Ht>>>0,re||ce(Ht,2,this.length);var ye=this[Ht+1]|this[Ht]<<8;return ye&32768?ye|4294901760:ye},mt.prototype.readInt32LE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),this[Ht]|this[Ht+1]<<8|this[Ht+2]<<16|this[Ht+3]<<24},mt.prototype.readInt32BE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),this[Ht]<<24|this[Ht+1]<<16|this[Ht+2]<<8|this[Ht+3]},mt.prototype.readFloatLE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),kt.read(this,Ht,!0,23,4)},mt.prototype.readFloatBE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,4,this.length),kt.read(this,Ht,!1,23,4)},mt.prototype.readDoubleLE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,8,this.length),kt.read(this,Ht,!0,52,8)},mt.prototype.readDoubleBE=function(Ht,re){return Ht=Ht>>>0,re||ce(Ht,8,this.length),kt.read(this,Ht,!1,52,8)};function de(Rt,Ht,re,ye,Pe,Ae){if(!mt.isBuffer(Rt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ht>Pe||Ht<Ae)throw new RangeError('"value" argument is out of bounds');if(re+ye>Rt.length)throw new RangeError("Index out of range")}mt.prototype.writeUIntLE=function(Ht,re,ye,Pe){if(Ht=+Ht,re=re>>>0,ye=ye>>>0,!Pe){var Ae=Math.pow(2,8*ye)-1;de(this,Ht,re,ye,Ae,0)}var Oe=1,Ie=0;for(this[re]=Ht&255;++Ie<ye&&(Oe*=256);)this[re+Ie]=Ht/Oe&255;return re+ye},mt.prototype.writeUIntBE=function(Ht,re,ye,Pe){if(Ht=+Ht,re=re>>>0,ye=ye>>>0,!Pe){var Ae=Math.pow(2,8*ye)-1;de(this,Ht,re,ye,Ae,0)}var Oe=ye-1,Ie=1;for(this[re+Oe]=Ht&255;--Oe>=0&&(Ie*=256);)this[re+Oe]=Ht/Ie&255;return re+ye},mt.prototype.writeUInt8=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,1,255,0),this[re]=Ht&255,re+1},mt.prototype.writeUInt16LE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,2,65535,0),this[re]=Ht&255,this[re+1]=Ht>>>8,re+2},mt.prototype.writeUInt16BE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,2,65535,0),this[re]=Ht>>>8,this[re+1]=Ht&255,re+2},mt.prototype.writeUInt32LE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,4,4294967295,0),this[re+3]=Ht>>>24,this[re+2]=Ht>>>16,this[re+1]=Ht>>>8,this[re]=Ht&255,re+4},mt.prototype.writeUInt32BE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,4,4294967295,0),this[re]=Ht>>>24,this[re+1]=Ht>>>16,this[re+2]=Ht>>>8,this[re+3]=Ht&255,re+4},mt.prototype.writeIntLE=function(Ht,re,ye,Pe){if(Ht=+Ht,re=re>>>0,!Pe){var Ae=Math.pow(2,8*ye-1);de(this,Ht,re,ye,Ae-1,-Ae)}var Oe=0,Ie=1,Qe=0;for(this[re]=Ht&255;++Oe<ye&&(Ie*=256);)Ht<0&&Qe===0&&this[re+Oe-1]!==0&&(Qe=1),this[re+Oe]=(Ht/Ie>>0)-Qe&255;return re+ye},mt.prototype.writeIntBE=function(Ht,re,ye,Pe){if(Ht=+Ht,re=re>>>0,!Pe){var Ae=Math.pow(2,8*ye-1);de(this,Ht,re,ye,Ae-1,-Ae)}var Oe=ye-1,Ie=1,Qe=0;for(this[re+Oe]=Ht&255;--Oe>=0&&(Ie*=256);)Ht<0&&Qe===0&&this[re+Oe+1]!==0&&(Qe=1),this[re+Oe]=(Ht/Ie>>0)-Qe&255;return re+ye},mt.prototype.writeInt8=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,1,127,-128),Ht<0&&(Ht=255+Ht+1),this[re]=Ht&255,re+1},mt.prototype.writeInt16LE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,2,32767,-32768),this[re]=Ht&255,this[re+1]=Ht>>>8,re+2},mt.prototype.writeInt16BE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,2,32767,-32768),this[re]=Ht>>>8,this[re+1]=Ht&255,re+2},mt.prototype.writeInt32LE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,4,2147483647,-2147483648),this[re]=Ht&255,this[re+1]=Ht>>>8,this[re+2]=Ht>>>16,this[re+3]=Ht>>>24,re+4},mt.prototype.writeInt32BE=function(Ht,re,ye){return Ht=+Ht,re=re>>>0,ye||de(this,Ht,re,4,2147483647,-2147483648),Ht<0&&(Ht=4294967295+Ht+1),this[re]=Ht>>>24,this[re+1]=Ht>>>16,this[re+2]=Ht>>>8,this[re+3]=Ht&255,re+4};function le(Rt,Ht,re,ye,Pe,Ae){if(re+ye>Rt.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("Index out of range")}function Ce(Rt,Ht,re,ye,Pe){return Ht=+Ht,re=re>>>0,Pe||le(Rt,Ht,re,4,34028234663852886e22,-34028234663852886e22),kt.write(Rt,Ht,re,ye,23,4),re+4}mt.prototype.writeFloatLE=function(Ht,re,ye){return Ce(this,Ht,re,!0,ye)},mt.prototype.writeFloatBE=function(Ht,re,ye){return Ce(this,Ht,re,!1,ye)};function fe(Rt,Ht,re,ye,Pe){return Ht=+Ht,re=re>>>0,Pe||le(Rt,Ht,re,8,17976931348623157e292,-17976931348623157e292),kt.write(Rt,Ht,re,ye,52,8),re+8}mt.prototype.writeDoubleLE=function(Ht,re,ye){return fe(this,Ht,re,!0,ye)},mt.prototype.writeDoubleBE=function(Ht,re,ye){return fe(this,Ht,re,!1,ye)},mt.prototype.copy=function(Ht,re,ye,Pe){if(!mt.isBuffer(Ht))throw new TypeError("argument should be a Buffer");if(ye||(ye=0),!Pe&&Pe!==0&&(Pe=this.length),re>=Ht.length&&(re=Ht.length),re||(re=0),Pe>0&&Pe<ye&&(Pe=ye),Pe===ye||Ht.length===0||this.length===0)return 0;if(re<0)throw new RangeError("targetStart out of bounds");if(ye<0||ye>=this.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("sourceEnd out of bounds");Pe>this.length&&(Pe=this.length),Ht.length-re<Pe-ye&&(Pe=Ht.length-re+ye);var Ae=Pe-ye;if(this===Ht&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(re,ye,Pe);else if(this===Ht&&ye<re&&re<Pe)for(var Oe=Ae-1;Oe>=0;--Oe)Ht[Oe+re]=this[Oe+ye];else Uint8Array.prototype.set.call(Ht,this.subarray(ye,Pe),re);return Ae},mt.prototype.fill=function(Ht,re,ye,Pe){if(typeof Ht=="string"){if(typeof re=="string"?(Pe=re,re=0,ye=this.length):typeof ye=="string"&&(Pe=ye,ye=this.length),Pe!==void 0&&typeof Pe!="string")throw new TypeError("encoding must be a string");if(typeof Pe=="string"&&!mt.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);if(Ht.length===1){var Ae=Ht.charCodeAt(0);(Pe==="utf8"&&Ae<128||Pe==="latin1")&&(Ht=Ae)}}else typeof Ht=="number"&&(Ht=Ht&255);if(re<0||this.length<re||this.length<ye)throw new RangeError("Out of range index");if(ye<=re)return this;re=re>>>0,ye=ye===void 0?this.length:ye>>>0,Ht||(Ht=0);var Oe;if(typeof Ht=="number")for(Oe=re;Oe<ye;++Oe)this[Oe]=Ht;else{var Ie=mt.isBuffer(Ht)?Ht:mt.from(Ht,Pe),Qe=Ie.length;if(Qe===0)throw new TypeError('The value "'+Ht+'" is invalid for argument "value"');for(Oe=0;Oe<ye-re;++Oe)this[Oe+re]=Ie[Oe%Qe]}return this};var me=/[^+/0-9A-Za-z-_]/g;function ke(Rt){if(Rt=Rt.split("=")[0],Rt=Rt.trim().replace(me,""),Rt.length<2)return"";for(;Rt.length%4!==0;)Rt=Rt+"=";return Rt}function pe(Rt){return Rt<16?"0"+Rt.toString(16):Rt.toString(16)}function qt(Rt,Ht){Ht=Ht||1/0;for(var re,ye=Rt.length,Pe=null,Ae=[],Oe=0;Oe<ye;++Oe){if(re=Rt.charCodeAt(Oe),re>55295&&re<57344){if(!Pe){if(re>56319){(Ht-=3)>-1&&Ae.push(239,191,189);continue}else if(Oe+1===ye){(Ht-=3)>-1&&Ae.push(239,191,189);continue}Pe=re;continue}if(re<56320){(Ht-=3)>-1&&Ae.push(239,191,189),Pe=re;continue}re=(Pe-55296<<10|re-56320)+65536}else Pe&&(Ht-=3)>-1&&Ae.push(239,191,189);if(Pe=null,re<128){if((Ht-=1)<0)break;Ae.push(re)}else if(re<2048){if((Ht-=2)<0)break;Ae.push(re>>6|192,re&63|128)}else if(re<65536){if((Ht-=3)<0)break;Ae.push(re>>12|224,re>>6&63|128,re&63|128)}else if(re<1114112){if((Ht-=4)<0)break;Ae.push(re>>18|240,re>>12&63|128,re>>6&63|128,re&63|128)}else throw new Error("Invalid code point")}return Ae}function Kt(Rt){for(var Ht=[],re=0;re<Rt.length;++re)Ht.push(Rt.charCodeAt(re)&255);return Ht}function wt(Rt,Ht){for(var re,ye,Pe,Ae=[],Oe=0;Oe<Rt.length&&!((Ht-=2)<0);++Oe)re=Rt.charCodeAt(Oe),ye=re>>8,Pe=re%256,Ae.push(Pe),Ae.push(ye);return Ae}function Lt(Rt){return gt.toByteArray(ke(Rt))}function Zt(Rt,Ht,re,ye){for(var Pe=0;Pe<ye&&!(Pe+re>=Ht.length||Pe>=Rt.length);++Pe)Ht[Pe+re]=Rt[Pe];return Pe}function ee(Rt,Ht){return Rt instanceof Ht||Rt!=null&&Rt.constructor!=null&&Rt.constructor.name!=null&&Rt.constructor.name===Ht.name}function It(Rt){return Rt!==Rt}}).call(this)}).call(this,ot("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ot,zt,Bt){zt.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(ot,zt,Bt){"use strict";var vt=ot("get-intrinsic"),gt=ot("./"),kt=gt(vt("String.prototype.indexOf"));zt.exports=function(yt,Tt){var mt=vt(yt,!!Tt);return typeof mt=="function"&&kt(yt,".prototype.")>-1?gt(mt):mt}},{"./":93,"get-intrinsic":348}],93:[function(ot,zt,Bt){"use strict";var vt=ot("function-bind"),gt=ot("get-intrinsic"),kt=gt("%Function.prototype.apply%"),Ct=gt("%Function.prototype.call%"),yt=gt("%Reflect.apply%",!0)||vt.call(Ct,kt),Tt=gt("%Object.getOwnPropertyDescriptor%",!0),mt=gt("%Object.defineProperty%",!0),xt=gt("%Math.max%");if(mt)try{mt({},"a",{value:1})}catch(z){mt=null}zt.exports=function(tt){var at=yt(vt,Ct,arguments);if(Tt&&mt){var it=Tt(at,"length");it.configurable&&mt(at,"length",{value:1+xt(0,tt.length-(arguments.length-1))})}return at};var ft=function(){return yt(vt,kt,arguments)};mt?mt(zt.exports,"apply",{value:ft}):zt.exports.apply=ft},{"function-bind":347,"get-intrinsic":348}],94:[function(ot,zt,Bt){"use strict";var vt=Array.prototype.slice;zt.exports=gt;function gt(Ct,yt){if(!(this instanceof gt))return new gt(Ct,yt);this.src=Ct,this._withAccess=yt}gt.prototype.withAccess=function(Ct){return this._withAccess=Ct!==!1,this},gt.prototype.pick=function(Ct){return Array.isArray(Ct)||(Ct=vt.call(arguments)),Ct.length&&(this.keys=Ct),this},gt.prototype.to=function(Ct){if(Ct=Ct||{},!this.src)return Ct;var yt=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Tt=0;Tt<yt.length;Tt++)mt=yt[Tt],Ct[mt]===void 0&&(Ct[mt]=this.src[mt]);return Ct}for(var Tt=0;Tt<yt.length;Tt++){var mt=yt[Tt];if(kt(Ct,mt)){var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&Ct.__defineGetter__(mt,xt),ft&&Ct.__defineSetter__(mt,ft),!xt&&!ft&&(Ct[mt]=this.src[mt])}}return Ct},gt.prototype.toCover=function(Ct){for(var yt=this.keys||Object.keys(this.src),Tt=0;Tt<yt.length;Tt++){var mt=yt[Tt];delete Ct[mt];var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&Ct.__defineGetter__(mt,xt),ft&&Ct.__defineSetter__(mt,ft),!xt&&!ft&&(Ct[mt]=this.src[mt])}},gt.prototype.override=gt.prototype.toCover,gt.prototype.and=function(Ct){var yt={};return this.to(yt),this.src=Ct,this.to(yt),this.src=yt,this};function kt(Ct,yt){return Ct[yt]===void 0&&Ct.__lookupGetter__(yt)===void 0&&Ct.__lookupSetter__(yt)===void 0}},{}],95:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/try-to-string"),Ct=vt.TypeError;zt.exports=function(yt){if(gt(yt))return yt;throw Ct(kt(yt)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-constructor"),kt=ot("../internals/try-to-string"),Ct=vt.TypeError;zt.exports=function(yt){if(gt(yt))return yt;throw Ct(kt(yt)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=vt.String,Ct=vt.TypeError;zt.exports=function(yt){if(typeof yt=="object"||gt(yt))return yt;throw Ct("Can't set "+kt(yt)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/object-create"),kt=ot("../internals/object-define-property"),Ct=vt("unscopables"),yt=Array.prototype;yt[Ct]==null&&kt.f(yt,Ct,{configurable:!0,value:gt(null)}),zt.exports=function(Tt){yt[Ct][Tt]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt;zt.exports=function(gt,kt,Ct){return kt+(Ct?vt(gt,kt).length:1)}},{"../internals/string-multibyte":239}],100:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-is-prototype-of"),kt=vt.TypeError;zt.exports=function(Ct,yt){if(gt(yt,Ct))return Ct;throw kt("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.String,Ct=vt.TypeError;zt.exports=function(yt){if(gt(yt))return yt;throw Ct(kt(yt)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ot,zt,Bt){zt.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-native"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),Ct=ot("../internals/is-callable"),yt=ot("../internals/is-object"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/classof"),xt=ot("../internals/try-to-string"),ft=ot("../internals/create-non-enumerable-property"),z=ot("../internals/redefine"),tt=ot("../internals/object-define-property").f,at=ot("../internals/object-is-prototype-of"),it=ot("../internals/object-get-prototype-of"),lt=ot("../internals/object-set-prototype-of"),ut=ot("../internals/well-known-symbol"),dt=ot("../internals/uid"),bt=kt.Int8Array,At=bt&&bt.prototype,Dt=kt.Uint8ClampedArray,Ft=Dt&&Dt.prototype,jt=bt&&it(bt),Nt=At&&it(At),_t=Object.prototype,Wt=kt.TypeError,Jt=ut("toStringTag"),Ut=dt("TYPED_ARRAY_TAG"),Vt=dt("TYPED_ARRAY_CONSTRUCTOR"),oe=vt&&!!lt&&mt(kt.opera)!=="Opera",se=!1,he,be,Yt,ne={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ve={BigInt64Array:8,BigUint64Array:8},Se=function(me){if(!yt(me))return!1;var ke=mt(me);return ke==="DataView"||Tt(ne,ke)||Tt(ve,ke)},we=function(fe){if(!yt(fe))return!1;var me=mt(fe);return Tt(ne,me)||Tt(ve,me)},ce=function(fe){if(we(fe))return fe;throw Wt("Target is not a typed array")},de=function(fe){if(Ct(fe)&&(!lt||at(jt,fe)))return fe;throw Wt(xt(fe)+" is not a typed array constructor")},le=function(fe,me,ke,pe){if(gt){if(ke)for(var qt in ne){var Kt=kt[qt];if(Kt&&Tt(Kt.prototype,fe))try{delete Kt.prototype[fe]}catch(wt){try{Kt.prototype[fe]=me}catch(Lt){}}}(!Nt[fe]||ke)&&z(Nt,fe,ke?me:oe&&At[fe]||me,pe)}},Ce=function(fe,me,ke){var pe,qt;if(gt){if(lt){if(ke){for(pe in ne)if(qt=kt[pe],qt&&Tt(qt,fe))try{delete qt[fe]}catch(Kt){}}if(!jt[fe]||ke)try{return z(jt,fe,ke?me:oe&&jt[fe]||me)}catch(Kt){}else return}for(pe in ne)qt=kt[pe],qt&&(!qt[fe]||ke)&&z(qt,fe,me)}};for(he in ne)be=kt[he],Yt=be&&be.prototype,Yt?ft(Yt,Vt,be):oe=!1;for(he in ve)be=kt[he],Yt=be&&be.prototype,Yt&&ft(Yt,Vt,be);if((!oe||!Ct(jt)||jt===Function.prototype)&&(jt=function(){throw Wt("Incorrect invocation")},oe))for(he in ne)kt[he]&&lt(kt[he],jt);if((!oe||!Nt||Nt===_t)&&(Nt=jt.prototype,oe))for(he in ne)kt[he]&&lt(kt[he].prototype,Nt);if(oe&&it(Ft)!==Nt&&lt(Ft,Nt),gt&&!Tt(Nt,Jt)){se=!0,tt(Nt,Jt,{get:function(){return yt(this)?this[Ut]:void 0}});for(he in ne)kt[he]&&ft(kt[he],Ut,he)}zt.exports={NATIVE_ARRAY_BUFFER_VIEWS:oe,TYPED_ARRAY_CONSTRUCTOR:Vt,TYPED_ARRAY_TAG:se&&Ut,aTypedArray:ce,aTypedArrayConstructor:de,exportTypedArrayMethod:le,exportTypedArrayStaticMethod:Ce,isView:Se,isTypedArray:we,TypedArray:jt,TypedArrayPrototype:Nt}},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/descriptors"),Ct=ot("../internals/array-buffer-native"),yt=ot("../internals/function-name"),Tt=ot("../internals/create-non-enumerable-property"),mt=ot("../internals/redefine-all"),xt=ot("../internals/fails"),ft=ot("../internals/an-instance"),z=ot("../internals/to-integer-or-infinity"),tt=ot("../internals/to-length"),at=ot("../internals/to-index"),it=ot("../internals/ieee754"),lt=ot("../internals/object-get-prototype-of"),ut=ot("../internals/object-set-prototype-of"),dt=ot("../internals/object-get-own-property-names").f,bt=ot("../internals/object-define-property").f,At=ot("../internals/array-fill"),Dt=ot("../internals/array-slice-simple"),Ft=ot("../internals/set-to-string-tag"),jt=ot("../internals/internal-state"),Nt=yt.PROPER,_t=yt.CONFIGURABLE,Wt=jt.get,Jt=jt.set,Ut="ArrayBuffer",Vt="DataView",oe="prototype",se="Wrong length",he="Wrong index",be=vt[Ut],Yt=be,ne=Yt&&Yt[oe],ve=vt[Vt],Se=ve&&ve[oe],we=Object.prototype,ce=vt.Array,de=vt.RangeError,le=gt(At),Ce=gt([].reverse),fe=it.pack,me=it.unpack,ke=function(Oe){return[Oe&255]},pe=function(Oe){return[Oe&255,Oe>>8&255]},qt=function(Oe){return[Oe&255,Oe>>8&255,Oe>>16&255,Oe>>24&255]},Kt=function(Oe){return Oe[3]<<24|Oe[2]<<16|Oe[1]<<8|Oe[0]},wt=function(Oe){return fe(Oe,23,4)},Lt=function(Oe){return fe(Oe,52,8)},Zt=function(Oe,Ie){bt(Oe[oe],Ie,{get:function(){return Wt(this)[Ie]}})},ee=function(Oe,Ie,Qe,qe){var nn=at(Qe),Ke=Wt(Oe);if(nn+Ie>Ke.byteLength)throw de(he);var Ue=Wt(Ke.buffer).bytes,We=nn+Ke.byteOffset,He=Dt(Ue,We,We+Ie);return qe?He:Ce(He)},It=function(Oe,Ie,Qe,qe,nn,Ke){var Ue=at(Qe),We=Wt(Oe);if(Ue+Ie>We.byteLength)throw de(he);for(var He=Wt(We.buffer).bytes,rn=Ue+We.byteOffset,ln=qe(+nn),un=0;un<Ie;un++)He[rn+un]=ln[Ke?un:Ie-un-1]};if(!Ct)Yt=function(Ie){ft(this,ne);var Qe=at(Ie);Jt(this,{bytes:le(ce(Qe),0),byteLength:Qe}),kt||(this.byteLength=Qe)},ne=Yt[oe],ve=function(Ie,Qe,qe){ft(this,Se),ft(Ie,ne);var nn=Wt(Ie).byteLength,Ke=z(Qe);if(Ke<0||Ke>nn)throw de("Wrong offset");if(qe=qe===void 0?nn-Ke:tt(qe),Ke+qe>nn)throw de(se);Jt(this,{buffer:Ie,byteLength:qe,byteOffset:Ke}),kt||(this.buffer=Ie,this.byteLength=qe,this.byteOffset=Ke)},Se=ve[oe],kt&&(Zt(Yt,"byteLength"),Zt(ve,"buffer"),Zt(ve,"byteLength"),Zt(ve,"byteOffset")),mt(Se,{getInt8:function(Ie){return ee(this,1,Ie)[0]<<24>>24},getUint8:function(Ie){return ee(this,1,Ie)[0]},getInt16:function(Ie){var Qe=ee(this,2,Ie,arguments.length>1?arguments[1]:void 0);return(Qe[1]<<8|Qe[0])<<16>>16},getUint16:function(Ie){var Qe=ee(this,2,Ie,arguments.length>1?arguments[1]:void 0);return Qe[1]<<8|Qe[0]},getInt32:function(Ie){return Kt(ee(this,4,Ie,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ie){return Kt(ee(this,4,Ie,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ie){return me(ee(this,4,Ie,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ie){return me(ee(this,8,Ie,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ie,Qe){It(this,1,Ie,ke,Qe)},setUint8:function(Ie,Qe){It(this,1,Ie,ke,Qe)},setInt16:function(Ie,Qe){It(this,2,Ie,pe,Qe,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ie,Qe){It(this,2,Ie,pe,Qe,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ie,Qe){It(this,4,Ie,qt,Qe,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ie,Qe){It(this,4,Ie,qt,Qe,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ie,Qe){It(this,4,Ie,wt,Qe,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ie,Qe){It(this,8,Ie,Lt,Qe,arguments.length>2?arguments[2]:void 0)}});else{var Rt=Nt&&be.name!==Ut;if(!xt(function(){be(1)})||!xt(function(){new be(-1)})||xt(function(){return new be,new be(1.5),new be(NaN),Rt&&!_t})){Yt=function(Ie){return ft(this,ne),new be(at(Ie))},Yt[oe]=ne;for(var Ht=dt(be),re=0,ye;Ht.length>re;)(ye=Ht[re++])in Yt||Tt(Yt,ye,be[ye]);ne.constructor=Yt}else Rt&&_t&&Tt(be,"name",Ut);ut&&lt(Se)!==we&&ut(Se,we);var Pe=new ve(new Yt(2)),Ae=gt(Se.setInt8);Pe.setInt8(0,2147483648),Pe.setInt8(1,2147483649),(Pe.getInt8(0)||!Pe.getInt8(1))&&mt(Se,{setInt8:function(Ie,Qe){Ae(this,Ie,Qe<<24>>24)},setUint8:function(Ie,Qe){Ae(this,Ie,Qe<<24>>24)}},{unsafe:!0})}Ft(Yt,Ut),Ft(ve,Vt),zt.exports={ArrayBuffer:Yt,DataView:ve}},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),Ct=Math.min;zt.exports=[].copyWithin||function(Tt,mt){var xt=vt(this),ft=kt(xt),z=gt(Tt,ft),tt=gt(mt,ft),at=arguments.length>2?arguments[2]:void 0,it=Ct((at===void 0?ft:gt(at,ft))-tt,ft-z),lt=1;for(tt<z&&z<tt+it&&(lt=-1,tt+=it-1,z+=it-1);it-- >0;)tt in xt?xt[z]=xt[tt]:delete xt[z],z+=lt,tt+=lt;return xt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like");zt.exports=function(yt){for(var Tt=vt(this),mt=kt(Tt),xt=arguments.length,ft=gt(xt>1?arguments[1]:void 0,mt),z=xt>2?arguments[2]:void 0,tt=z===void 0?mt:gt(z,mt);tt>ft;)Tt[ft++]=yt;return Tt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-iteration").forEach,gt=ot("../internals/array-method-is-strict"),kt=gt("forEach");zt.exports=kt?[].forEach:function(yt){return vt(this,yt,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ot,zt,Bt){var vt=ot("../internals/length-of-array-like");zt.exports=function(gt,kt){for(var Ct=0,yt=vt(kt),Tt=new gt(yt);yt>Ct;)Tt[Ct]=kt[Ct++];return Tt}},{"../internals/length-of-array-like":188}],109:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),Ct=ot("../internals/to-object"),yt=ot("../internals/call-with-safe-iteration-closing"),Tt=ot("../internals/is-array-iterator-method"),mt=ot("../internals/is-constructor"),xt=ot("../internals/length-of-array-like"),ft=ot("../internals/create-property"),z=ot("../internals/get-iterator"),tt=ot("../internals/get-iterator-method"),at=vt.Array;zt.exports=function(lt){var ut=Ct(lt),dt=mt(this),bt=arguments.length,At=bt>1?arguments[1]:void 0,Dt=At!==void 0;Dt&&(At=gt(At,bt>2?arguments[2]:void 0));var Ft=tt(ut),jt=0,Nt,_t,Wt,Jt,Ut,Vt;if(Ft&&!(this==at&&Tt(Ft)))for(Jt=z(ut,Ft),Ut=Jt.next,_t=dt?new this:[];!(Wt=kt(Ut,Jt)).done;jt++)Vt=Dt?yt(Jt,At,[Wt.value,jt],!0):Wt.value,ft(_t,jt,Vt);else for(Nt=xt(ut),_t=dt?new this(Nt):at(Nt);Nt>jt;jt++)Vt=Dt?At(ut[jt],jt):ut[jt],ft(_t,jt,Vt);return _t.length=jt,_t}},{"../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(ot,zt,Bt){var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),Ct=function(yt){return function(Tt,mt,xt){var ft=vt(Tt),z=kt(ft),tt=gt(xt,z),at;if(yt&&mt!=mt){for(;z>tt;)if(at=ft[tt++],at!=at)return!0}else for(;z>tt;tt++)if((yt||tt in ft)&&ft[tt]===mt)return yt||tt||0;return!yt&&-1}};zt.exports={includes:Ct(!0),indexOf:Ct(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),Ct=ot("../internals/to-object"),yt=ot("../internals/length-of-array-like"),Tt=ot("../internals/array-species-create"),mt=gt([].push),xt=function(ft){var z=ft==1,tt=ft==2,at=ft==3,it=ft==4,lt=ft==6,ut=ft==7,dt=ft==5||lt;return function(bt,At,Dt,Ft){for(var jt=Ct(bt),Nt=kt(jt),_t=vt(At,Dt),Wt=yt(Nt),Jt=0,Ut=Ft||Tt,Vt=z?Ut(bt,Wt):tt||ut?Ut(bt,0):void 0,oe,se;Wt>Jt;Jt++)if((dt||Jt in Nt)&&(oe=Nt[Jt],se=_t(oe,Jt,jt),ft))if(z)Vt[Jt]=se;else if(se)switch(ft){case 3:return!0;case 5:return oe;case 6:return Jt;case 2:mt(Vt,oe)}else switch(ft){case 4:return!1;case 7:mt(Vt,oe)}return lt?-1:at||it?it:Vt}};zt.exports={forEach:xt(0),map:xt(1),filter:xt(2),some:xt(3),every:xt(4),find:xt(5),findIndex:xt(6),filterReject:xt(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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/to-integer-or-infinity"),Ct=ot("../internals/length-of-array-like"),yt=ot("../internals/array-method-is-strict"),Tt=Math.min,mt=[].lastIndexOf,xt=!!mt&&1/[1].lastIndexOf(1,-0)<0,ft=yt("lastIndexOf"),z=xt||!ft;zt.exports=z?function(at){if(xt)return vt(mt,this,arguments)||0;var it=gt(this),lt=Ct(it),ut=lt-1;for(arguments.length>1&&(ut=Tt(ut,kt(arguments[1]))),ut<0&&(ut=lt+ut);ut>=0;ut--)if(ut in it&&it[ut]===at)return ut||0;return-1}:mt},{"../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(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/well-known-symbol"),kt=ot("../internals/engine-v8-version"),Ct=gt("species");zt.exports=function(yt){return kt>=51||!vt(function(){var Tt=[],mt=Tt.constructor={};return mt[Ct]=function(){return{foo:1}},Tt[yt](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/fails");zt.exports=function(gt,kt){var Ct=[][gt];return!!Ct&&vt(function(){Ct.call(null,kt||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/a-callable"),kt=ot("../internals/to-object"),Ct=ot("../internals/indexed-object"),yt=ot("../internals/length-of-array-like"),Tt=vt.TypeError,mt=function(xt){return function(ft,z,tt,at){gt(z);var it=kt(ft),lt=Ct(it),ut=yt(it),dt=xt?ut-1:0,bt=xt?-1:1;if(tt<2)for(;;){if(dt in lt){at=lt[dt],dt+=bt;break}if(dt+=bt,xt?dt<0:ut<=dt)throw Tt("Reduce of empty array with no initial value")}for(;xt?dt>=0:ut>dt;dt+=bt)dt in lt&&(at=z(at,lt[dt],dt,it));return at}};zt.exports={left:mt(!1),right:mt(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),Ct=ot("../internals/create-property"),yt=vt.Array,Tt=Math.max;zt.exports=function(mt,xt,ft){for(var z=kt(mt),tt=gt(xt,z),at=gt(ft===void 0?z:ft,z),it=yt(Tt(at-tt,0)),lt=0;tt<at;tt++,lt++)Ct(it,lt,mt[tt]);return it.length=lt,it}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ot,zt,Bt){var vt=ot("../internals/array-slice-simple"),gt=Math.floor,kt=function(Tt,mt){var xt=Tt.length,ft=gt(xt/2);return xt<8?Ct(Tt,mt):yt(Tt,kt(vt(Tt,0,ft),mt),kt(vt(Tt,ft),mt),mt)},Ct=function(Tt,mt){for(var xt=Tt.length,ft=1,z,tt;ft<xt;){for(tt=ft,z=Tt[ft];tt&&mt(Tt[tt-1],z)>0;)Tt[tt]=Tt[--tt];tt!==ft++&&(Tt[tt]=z)}return Tt},yt=function(Tt,mt,xt,ft){for(var z=mt.length,tt=xt.length,at=0,it=0;at<z||it<tt;)Tt[at+it]=at<z&&it<tt?ft(mt[at],xt[it])<=0?mt[at++]:xt[it++]:at<z?mt[at++]:xt[it++];return Tt};zt.exports=kt},{"../internals/array-slice-simple":116}],119:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-array"),kt=ot("../internals/is-constructor"),Ct=ot("../internals/is-object"),yt=ot("../internals/well-known-symbol"),Tt=yt("species"),mt=vt.Array;zt.exports=function(xt){var ft;return gt(xt)&&(ft=xt.constructor,kt(ft)&&(ft===mt||gt(ft.prototype))?ft=void 0:Ct(ft)&&(ft=ft[Tt],ft===null&&(ft=void 0))),ft===void 0?mt:ft}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(ot,zt,Bt){var vt=ot("../internals/array-species-constructor");zt.exports=function(gt,kt){return new(vt(gt))(kt===0?0:kt)}},{"../internals/array-species-constructor":119}],121:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/iterator-close");zt.exports=function(kt,Ct,yt,Tt){try{return Tt?Ct(vt(yt)[0],yt[1]):Ct(yt)}catch(mt){gt(kt,"throw",mt)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("iterator"),kt=!1;try{var Ct=0,yt={next:function(){return{done:!!Ct++}},return:function(){kt=!0}};yt[gt]=function(){return this},Array.from(yt,function(){throw 2})}catch(Tt){}zt.exports=function(Tt,mt){if(!mt&&!kt)return!1;var xt=!1;try{var ft={};ft[gt]=function(){return{next:function(){return{done:xt=!0}}}},Tt(ft)}catch(z){}return xt}},{"../internals/well-known-symbol":268}],123:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=vt({}.toString),kt=vt("".slice);zt.exports=function(Ct){return kt(gt(Ct),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-string-tag-support"),kt=ot("../internals/is-callable"),Ct=ot("../internals/classof-raw"),yt=ot("../internals/well-known-symbol"),Tt=yt("toStringTag"),mt=vt.Object,xt=Ct(function(){return arguments}())=="Arguments",ft=function(z,tt){try{return z[tt]}catch(at){}};zt.exports=gt?Ct:function(z){var tt,at,it;return z===void 0?"Undefined":z===null?"Null":typeof(at=ft(tt=mt(z),Tt))=="string"?at:xt?Ct(tt):(it=Ct(tt))=="Object"&&kt(tt.callee)?"Arguments":it}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ot,zt,Bt){var vt=ot("../internals/has-own-property"),gt=ot("../internals/own-keys"),kt=ot("../internals/object-get-own-property-descriptor"),Ct=ot("../internals/object-define-property");zt.exports=function(yt,Tt,mt){for(var xt=gt(Tt),ft=Ct.f,z=kt.f,tt=0;tt<xt.length;tt++){var at=xt[tt];!vt(yt,at)&&!(mt&&vt(mt,at))&&ft(yt,at,z(Tt,at))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("match");zt.exports=function(kt){var Ct=/./;try{"/./"[kt](Ct)}catch(yt){try{return Ct[gt]=!1,"/./"[kt](Ct)}catch(Tt){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ot,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){function gt(){}return gt.prototype.constructor=null,Object.getPrototypeOf(new gt)!==gt.prototype})},{"../internals/fails":150}],128:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/iterators-core").IteratorPrototype,gt=ot("../internals/object-create"),kt=ot("../internals/create-property-descriptor"),Ct=ot("../internals/set-to-string-tag"),yt=ot("../internals/iterators"),Tt=function(){return this};zt.exports=function(mt,xt,ft,z){var tt=xt+" Iterator";return mt.prototype=gt(vt,{next:kt(+!z,ft)}),Ct(mt,tt,!1,!0),yt[tt]=Tt,mt}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");zt.exports=vt?function(Ct,yt,Tt){return gt.f(Ct,yt,kt(1,Tt))}:function(Ct,yt,Tt){return Ct[yt]=Tt,Ct}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ot,zt,Bt){zt.exports=function(vt,gt){return{enumerable:!(vt&1),configurable:!(vt&2),writable:!(vt&4),value:gt}}},{}],131:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-property-key"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");zt.exports=function(Ct,yt,Tt){var mt=vt(yt);mt in Ct?gt.f(Ct,mt,kt(0,Tt)):Ct[mt]=Tt}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/is-pure"),Ct=ot("../internals/function-name"),yt=ot("../internals/is-callable"),Tt=ot("../internals/create-iterator-constructor"),mt=ot("../internals/object-get-prototype-of"),xt=ot("../internals/object-set-prototype-of"),ft=ot("../internals/set-to-string-tag"),z=ot("../internals/create-non-enumerable-property"),tt=ot("../internals/redefine"),at=ot("../internals/well-known-symbol"),it=ot("../internals/iterators"),lt=ot("../internals/iterators-core"),ut=Ct.PROPER,dt=Ct.CONFIGURABLE,bt=lt.IteratorPrototype,At=lt.BUGGY_SAFARI_ITERATORS,Dt=at("iterator"),Ft="keys",jt="values",Nt="entries",_t=function(){return this};zt.exports=function(Wt,Jt,Ut,Vt,oe,se,he){Tt(Ut,Jt,Vt);var be=function(fe){if(fe===oe&&we)return we;if(!At&&fe in ve)return ve[fe];switch(fe){case Ft:return function(){return new Ut(this,fe)};case jt:return function(){return new Ut(this,fe)};case Nt:return function(){return new Ut(this,fe)}}return function(){return new Ut(this)}},Yt=Jt+" Iterator",ne=!1,ve=Wt.prototype,Se=ve[Dt]||ve["@@iterator"]||oe&&ve[oe],we=!At&&Se||be(oe),ce=Jt=="Array"&&ve.entries||Se,de,le,Ce;if(ce&&(de=mt(ce.call(new Wt)),de!==Object.prototype&&de.next&&(!kt&&mt(de)!==bt&&(xt?xt(de,bt):yt(de[Dt])||tt(de,Dt,_t)),ft(de,Yt,!0,!0),kt&&(it[Yt]=_t))),ut&&oe==jt&&Se&&Se.name!==jt&&(!kt&&dt?z(ve,"name",jt):(ne=!0,we=function(){return gt(Se,this)})),oe)if(le={values:be(jt),keys:se?we:be(Ft),entries:be(Nt)},he)for(Ce in le)(At||ne||!(Ce in ve))&&tt(ve,Ce,le[Ce]);else vt({target:Jt,proto:!0,forced:At||ne},le);return(!kt||he)&&ve[Dt]!==we&&tt(ve,Dt,we,{name:oe}),it[Jt]=we,le}},{"../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(ot,zt,Bt){var vt=ot("../internals/path"),gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol-wrapped"),Ct=ot("../internals/object-define-property").f;zt.exports=function(yt){var Tt=vt.Symbol||(vt.Symbol={});gt(Tt,yt)||Ct(Tt,yt,{value:kt.f(yt)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ot,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.document,Ct=gt(kt)&&gt(kt.createElement);zt.exports=function(yt){return Ct?kt.createElement(yt):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ot,zt,Bt){zt.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(ot,zt,Bt){var vt=ot("../internals/document-create-element"),gt=vt("span").classList,kt=gt&&gt.constructor&&gt.constructor.prototype;zt.exports=kt===Object.prototype?void 0:kt},{"../internals/document-create-element":135}],138:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/firefox\/(\d+)/i);zt.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],139:[function(ot,zt,Bt){zt.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/MSIE|Trident/.test(vt)},{"../internals/engine-user-agent":145}],141:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=ot("../internals/global");zt.exports=/ipad|iphone|ipod/i.test(vt)&&gt.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(vt)},{"../internals/engine-user-agent":145}],143:[function(ot,zt,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/global");zt.exports=vt(gt.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent");zt.exports=/web0s(?!.*chrome)/i.test(vt)},{"../internals/engine-user-agent":145}],145:[function(ot,zt,Bt){var vt=ot("../internals/get-built-in");zt.exports=vt("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/engine-user-agent"),kt=vt.process,Ct=vt.Deno,yt=kt&&kt.versions||Ct&&Ct.version,Tt=yt&&yt.v8,mt,xt;Tt&&(mt=Tt.split("."),xt=mt[0]>0&&mt[0]<4?1:+(mt[0]+mt[1])),!xt&&gt&&(mt=gt.match(/Edge\/(\d+)/),(!mt||mt[1]>=74)&&(mt=gt.match(/Chrome\/(\d+)/),mt&&(xt=+mt[1]))),zt.exports=xt},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ot,zt,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/AppleWebKit\/(\d+)\./);zt.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],148:[function(ot,zt,Bt){zt.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-get-own-property-descriptor").f,kt=ot("../internals/create-non-enumerable-property"),Ct=ot("../internals/redefine"),yt=ot("../internals/set-global"),Tt=ot("../internals/copy-constructor-properties"),mt=ot("../internals/is-forced");zt.exports=function(xt,ft){var z=xt.target,tt=xt.global,at=xt.stat,it,lt,ut,dt,bt,At;if(tt?lt=vt:at?lt=vt[z]||yt(z,{}):lt=(vt[z]||{}).prototype,lt)for(ut in ft){if(bt=ft[ut],xt.noTargetGet?(At=gt(lt,ut),dt=At&&At.value):dt=lt[ut],it=mt(tt?ut:z+(at?".":"#")+ut,xt.forced),!it&&dt!==void 0){if(typeof bt==typeof dt)continue;Tt(bt,dt)}(xt.sham||dt&&dt.sham)&&kt(bt,"sham",!0),Ct(lt,ut,bt,xt)}}},{"../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(ot,zt,Bt){zt.exports=function(vt){try{return!!vt()}catch(gt){return!0}}},{}],151:[function(ot,zt,Bt){"use strict";ot("../modules/es.regexp.exec");var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/redefine"),kt=ot("../internals/regexp-exec"),Ct=ot("../internals/fails"),yt=ot("../internals/well-known-symbol"),Tt=ot("../internals/create-non-enumerable-property"),mt=yt("species"),xt=RegExp.prototype;zt.exports=function(ft,z,tt,at){var it=yt(ft),lt=!Ct(function(){var At={};return At[it]=function(){return 7},""[ft](At)!=7}),ut=lt&&!Ct(function(){var At=!1,Dt=/a/;return ft==="split"&&(Dt={},Dt.constructor={},Dt.constructor[mt]=function(){return Dt},Dt.flags="",Dt[it]=/./[it]),Dt.exec=function(){return At=!0,null},Dt[it](""),!At});if(!lt||!ut||tt){var dt=vt(/./[it]),bt=z(it,""[ft],function(At,Dt,Ft,jt,Nt){var _t=vt(At),Wt=Dt.exec;return Wt===kt||Wt===xt.exec?lt&&!Nt?{done:!0,value:dt(Dt,Ft,jt)}:{done:!0,value:_t(Ft,Dt,jt)}:{done:!1}});gt(String.prototype,ft,bt[0]),gt(xt,it,bt[1])}at&&Tt(xt[it],"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(ot,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.apply,Ct=gt.call;zt.exports=typeof Reflect=="object"&&Reflect.apply||(vt?Ct.bind(kt):function(){return Ct.apply(kt,arguments)})},{"../internals/function-bind-native":154}],153:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/a-callable"),kt=ot("../internals/function-bind-native"),Ct=vt(vt.bind);zt.exports=function(yt,Tt){return gt(yt),Tt===void 0?yt:kt?Ct(yt,Tt):function(){return yt.apply(Tt,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ot,zt,Bt){var vt=ot("../internals/fails");zt.exports=!vt(function(){var gt=function(){}.bind();return typeof gt!="function"||gt.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype.call;zt.exports=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)}},{"../internals/function-bind-native":154}],156:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/has-own-property"),kt=Function.prototype,Ct=vt&&Object.getOwnPropertyDescriptor,yt=gt(kt,"name"),Tt=yt&&function(){}.name==="something",mt=yt&&(!vt||vt&&Ct(kt,"name").configurable);zt.exports={EXISTS:yt,PROPER:Tt,CONFIGURABLE:mt}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.bind,Ct=gt.call,yt=vt&&kt.bind(Ct,Ct);zt.exports=vt?function(Tt){return Tt&&yt(Tt)}:function(Tt){return Tt&&function(){return Ct.apply(Tt,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=function(Ct){return gt(Ct)?Ct:void 0};zt.exports=function(Ct,yt){return arguments.length<2?kt(vt[Ct]):vt[Ct]&&vt[Ct][yt]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ot,zt,Bt){var vt=ot("../internals/classof"),gt=ot("../internals/get-method"),kt=ot("../internals/iterators"),Ct=ot("../internals/well-known-symbol"),yt=Ct("iterator");zt.exports=function(Tt){if(Tt!=null)return gt(Tt,yt)||gt(Tt,"@@iterator")||kt[vt(Tt)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),Ct=ot("../internals/an-object"),yt=ot("../internals/try-to-string"),Tt=ot("../internals/get-iterator-method"),mt=vt.TypeError;zt.exports=function(xt,ft){var z=arguments.length<2?Tt(xt):ft;if(kt(z))return Ct(gt(z,xt));throw mt(yt(xt)+" 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(ot,zt,Bt){var vt=ot("../internals/a-callable");zt.exports=function(gt,kt){var Ct=gt[kt];return Ct==null?void 0:vt(Ct)}},{"../internals/a-callable":95}],162:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=Math.floor,Ct=vt("".charAt),yt=vt("".replace),Tt=vt("".slice),mt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xt=/\$([$&'`]|\d{1,2})/g;zt.exports=function(ft,z,tt,at,it,lt){var ut=tt+ft.length,dt=at.length,bt=xt;return it!==void 0&&(it=gt(it),bt=mt),yt(lt,bt,function(At,Dt){var Ft;switch(Ct(Dt,0)){case"$":return"$";case"&":return ft;case"`":return Tt(z,0,tt);case"'":return Tt(z,ut);case"<":Ft=it[Tt(Dt,1,-1)];break;default:var jt=+Dt;if(jt===0)return At;if(jt>dt){var Nt=kt(jt/10);return Nt===0?At:Nt<=dt?at[Nt-1]===void 0?Ct(Dt,1):at[Nt-1]+Ct(Dt,1):At}Ft=at[jt-1]}return Ft===void 0?"":Ft})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ot,zt,Bt){(function(vt){(function(){var gt=function(kt){return kt&&kt.Math==Math&&kt};zt.exports=gt(typeof globalThis=="object"&&globalThis)||gt(typeof window=="object"&&window)||gt(typeof self=="object"&&self)||gt(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=vt({}.hasOwnProperty);zt.exports=Object.hasOwn||function(yt,Tt){return kt(gt(yt),Tt)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ot,zt,Bt){zt.exports={}},{}],166:[function(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=function(gt,kt){var Ct=vt.console;Ct&&Ct.error&&(arguments.length==1?Ct.error(gt):Ct.error(gt,kt))}},{"../internals/global":163}],167:[function(ot,zt,Bt){var vt=ot("../internals/get-built-in");zt.exports=vt("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails"),kt=ot("../internals/document-create-element");zt.exports=!vt&&!gt(function(){return Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.Array,kt=Math.abs,Ct=Math.pow,yt=Math.floor,Tt=Math.log,mt=Math.LN2,xt=function(z,tt,at){var it=gt(at),lt=at*8-tt-1,ut=(1<<lt)-1,dt=ut>>1,bt=tt===23?Ct(2,-24)-Ct(2,-77):0,At=z<0||z===0&&1/z<0?1:0,Dt=0,Ft,jt,Nt;for(z=kt(z),z!=z||z===1/0?(jt=z!=z?1:0,Ft=ut):(Ft=yt(Tt(z)/mt),Nt=Ct(2,-Ft),z*Nt<1&&(Ft--,Nt*=2),Ft+dt>=1?z+=bt/Nt:z+=bt*Ct(2,1-dt),z*Nt>=2&&(Ft++,Nt/=2),Ft+dt>=ut?(jt=0,Ft=ut):Ft+dt>=1?(jt=(z*Nt-1)*Ct(2,tt),Ft=Ft+dt):(jt=z*Ct(2,dt-1)*Ct(2,tt),Ft=0));tt>=8;)it[Dt++]=jt&255,jt/=256,tt-=8;for(Ft=Ft<<tt|jt,lt+=tt;lt>0;)it[Dt++]=Ft&255,Ft/=256,lt-=8;return it[--Dt]|=At*128,it},ft=function(z,tt){var at=z.length,it=at*8-tt-1,lt=(1<<it)-1,ut=lt>>1,dt=it-7,bt=at-1,At=z[bt--],Dt=At&127,Ft;for(At>>=7;dt>0;)Dt=Dt*256+z[bt--],dt-=8;for(Ft=Dt&(1<<-dt)-1,Dt>>=-dt,dt+=tt;dt>0;)Ft=Ft*256+z[bt--],dt-=8;if(Dt===0)Dt=1-ut;else{if(Dt===lt)return Ft?NaN:At?-1/0:1/0;Ft=Ft+Ct(2,tt),Dt=Dt-ut}return(At?-1:1)*Ft*Ct(2,Dt-tt)};zt.exports={pack:xt,unpack:ft}},{"../internals/global":163}],170:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),Ct=ot("../internals/classof-raw"),yt=vt.Object,Tt=gt("".split);zt.exports=kt(function(){return!yt("z").propertyIsEnumerable(0)})?function(mt){return Ct(mt)=="String"?Tt(mt,""):yt(mt)}:yt},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ot,zt,Bt){var vt=ot("../internals/is-callable"),gt=ot("../internals/is-object"),kt=ot("../internals/object-set-prototype-of");zt.exports=function(Ct,yt,Tt){var mt,xt;return kt&&vt(mt=yt.constructor)&&mt!==Tt&&gt(xt=mt.prototype)&&xt!==Tt.prototype&&kt(Ct,xt),Ct}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/is-callable"),kt=ot("../internals/shared-store"),Ct=vt(Function.toString);gt(kt.inspectSource)||(kt.inspectSource=function(yt){return Ct(yt)}),zt.exports=kt.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ot,zt,Bt){var vt=ot("../internals/native-weak-map"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/is-object"),yt=ot("../internals/create-non-enumerable-property"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/shared-store"),xt=ot("../internals/shared-key"),ft=ot("../internals/hidden-keys"),z="Object already initialized",tt=gt.TypeError,at=gt.WeakMap,it,lt,ut,dt=function(_t){return ut(_t)?lt(_t):it(_t,{})},bt=function(_t){return function(Wt){var Jt;if(!Ct(Wt)||(Jt=lt(Wt)).type!==_t)throw tt("Incompatible receiver, "+_t+" required");return Jt}};if(vt||mt.state){var At=mt.state||(mt.state=new at),Dt=kt(At.get),Ft=kt(At.has),jt=kt(At.set);it=function(_t,Wt){if(Ft(At,_t))throw new tt(z);return Wt.facade=_t,jt(At,_t,Wt),Wt},lt=function(_t){return Dt(At,_t)||{}},ut=function(_t){return Ft(At,_t)}}else{var Nt=xt("state");ft[Nt]=!0,it=function(_t,Wt){if(Tt(_t,Nt))throw new tt(z);return Wt.facade=_t,yt(_t,Nt,Wt),Wt},lt=function(_t){return Tt(_t,Nt)?_t[Nt]:{}},ut=function(_t){return Tt(_t,Nt)}}zt.exports={set:it,get:lt,has:ut,enforce:dt,getterFor:bt}},{"../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(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/iterators"),kt=vt("iterator"),Ct=Array.prototype;zt.exports=function(yt){return yt!==void 0&&(gt.Array===yt||Ct[kt]===yt)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ot,zt,Bt){var vt=ot("../internals/classof-raw");zt.exports=Array.isArray||function(kt){return vt(kt)=="Array"}},{"../internals/classof-raw":123}],176:[function(ot,zt,Bt){zt.exports=function(vt){return typeof vt=="function"}},{}],177:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/fails"),kt=ot("../internals/is-callable"),Ct=ot("../internals/classof"),yt=ot("../internals/get-built-in"),Tt=ot("../internals/inspect-source"),mt=function(){},xt=[],ft=yt("Reflect","construct"),z=/^\s*(?:class|function)\b/,tt=vt(z.exec),at=!z.exec(mt),it=function(dt){if(!kt(dt))return!1;try{return ft(mt,xt,dt),!0}catch(bt){return!1}},lt=function(dt){if(!kt(dt))return!1;switch(Ct(dt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return at||!!tt(z,Tt(dt))}catch(bt){return!0}};lt.sham=!0,zt.exports=!ft||gt(function(){var ut;return it(it.call)||!it(Object)||!it(function(){ut=!0})||ut})?lt:it},{"../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(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=/#|\.prototype\./,Ct=function(ft,z){var tt=Tt[yt(ft)];return tt==xt?!0:tt==mt?!1:gt(z)?vt(z):!!z},yt=Ct.normalize=function(ft){return String(ft).replace(kt,".").toLowerCase()},Tt=Ct.data={},mt=Ct.NATIVE="N",xt=Ct.POLYFILL="P";zt.exports=Ct},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ot,zt,Bt){var vt=ot("../internals/is-object"),gt=Math.floor;zt.exports=Number.isInteger||function(Ct){return!vt(Ct)&&isFinite(Ct)&&gt(Ct)===Ct}},{"../internals/is-object":180}],180:[function(ot,zt,Bt){var vt=ot("../internals/is-callable");zt.exports=function(gt){return typeof gt=="object"?gt!==null:vt(gt)}},{"../internals/is-callable":176}],181:[function(ot,zt,Bt){zt.exports=!1},{}],182:[function(ot,zt,Bt){var vt=ot("../internals/is-object"),gt=ot("../internals/classof-raw"),kt=ot("../internals/well-known-symbol"),Ct=kt("match");zt.exports=function(yt){var Tt;return vt(yt)&&((Tt=yt[Ct])!==void 0?!!Tt:gt(yt)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-callable"),Ct=ot("../internals/object-is-prototype-of"),yt=ot("../internals/use-symbol-as-uid"),Tt=vt.Object;zt.exports=yt?function(mt){return typeof mt=="symbol"}:function(mt){var xt=gt("Symbol");return kt(xt)&&Ct(xt.prototype,Tt(mt))}},{"../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(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),Ct=ot("../internals/an-object"),yt=ot("../internals/try-to-string"),Tt=ot("../internals/is-array-iterator-method"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/get-iterator"),z=ot("../internals/get-iterator-method"),tt=ot("../internals/iterator-close"),at=vt.TypeError,it=function(ut,dt){this.stopped=ut,this.result=dt},lt=it.prototype;zt.exports=function(ut,dt,bt){var At=bt&&bt.that,Dt=!!(bt&&bt.AS_ENTRIES),Ft=!!(bt&&bt.IS_ITERATOR),jt=!!(bt&&bt.INTERRUPTED),Nt=gt(dt,At),_t,Wt,Jt,Ut,Vt,oe,se,he=function(Yt){return _t&&tt(_t,"normal",Yt),new it(!0,Yt)},be=function(Yt){return Dt?(Ct(Yt),jt?Nt(Yt[0],Yt[1],he):Nt(Yt[0],Yt[1])):jt?Nt(Yt,he):Nt(Yt)};if(Ft)_t=ut;else{if(Wt=z(ut),!Wt)throw at(yt(ut)+" is not iterable");if(Tt(Wt)){for(Jt=0,Ut=mt(ut);Ut>Jt;Jt++)if(Vt=be(ut[Jt]),Vt&&xt(lt,Vt))return Vt;return new it(!1)}_t=ft(ut,Wt)}for(oe=_t.next;!(se=kt(oe,_t)).done;){try{Vt=be(se.value)}catch(Yt){tt(_t,"throw",Yt)}if(typeof Vt=="object"&&Vt&&xt(lt,Vt))return Vt}return new it(!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(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/an-object"),kt=ot("../internals/get-method");zt.exports=function(Ct,yt,Tt){var mt,xt;gt(Ct);try{if(mt=kt(Ct,"return"),!mt){if(yt==="throw")throw Tt;return Tt}mt=vt(mt,Ct)}catch(ft){xt=!0,mt=ft}if(yt==="throw")throw Tt;if(xt)throw mt;return gt(mt),Tt}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=ot("../internals/object-create"),Ct=ot("../internals/object-get-prototype-of"),yt=ot("../internals/redefine"),Tt=ot("../internals/well-known-symbol"),mt=ot("../internals/is-pure"),xt=Tt("iterator"),ft=!1,z,tt,at;[].keys&&(at=[].keys(),"next"in at?(tt=Ct(Ct(at)),tt!==Object.prototype&&(z=tt)):ft=!0);var it=z==null||vt(function(){var lt={};return z[xt].call(lt)!==lt});it?z={}:mt&&(z=kt(z)),gt(z[xt])||yt(z,xt,function(){return this}),zt.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:ft}},{"../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(ot,zt,Bt){arguments[4][165][0].apply(Bt,arguments)},{dup:165}],188:[function(ot,zt,Bt){var vt=ot("../internals/to-length");zt.exports=function(gt){return vt(gt.length)}},{"../internals/to-length":249}],189:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/object-get-own-property-descriptor").f,Ct=ot("../internals/task").set,yt=ot("../internals/engine-is-ios"),Tt=ot("../internals/engine-is-ios-pebble"),mt=ot("../internals/engine-is-webos-webkit"),xt=ot("../internals/engine-is-node"),ft=vt.MutationObserver||vt.WebKitMutationObserver,z=vt.document,tt=vt.process,at=vt.Promise,it=kt(vt,"queueMicrotask"),lt=it&&it.value,ut,dt,bt,At,Dt,Ft,jt,Nt;lt||(ut=function(){var _t,Wt;for(xt&&(_t=tt.domain)&&_t.exit();dt;){Wt=dt.fn,dt=dt.next;try{Wt()}catch(Jt){throw dt?At():bt=void 0,Jt}}bt=void 0,_t&&_t.enter()},!yt&&!xt&&!mt&&ft&&z?(Dt=!0,Ft=z.createTextNode(""),new ft(ut).observe(Ft,{characterData:!0}),At=function(){Ft.data=Dt=!Dt}):!Tt&&at&&at.resolve?(jt=at.resolve(void 0),jt.constructor=at,Nt=gt(jt.then,jt),At=function(){Nt(ut)}):xt?At=function(){tt.nextTick(ut)}:(Ct=gt(Ct,vt),At=function(){Ct(ut)})),zt.exports=lt||function(_t){var Wt={fn:_t,next:void 0};bt&&(bt.next=Wt),dt||(dt=Wt,At()),bt=Wt}},{"../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(ot,zt,Bt){var vt=ot("../internals/native-symbol");zt.exports=vt&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ot,zt,Bt){var vt=ot("../internals/engine-v8-version"),gt=ot("../internals/fails");zt.exports=!!Object.getOwnPropertySymbols&&!gt(function(){var kt=Symbol();return!String(kt)||!(Object(kt)instanceof Symbol)||!Symbol.sham&&vt&&vt<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/inspect-source"),Ct=vt.WeakMap;zt.exports=gt(Ct)&&/native code/.test(kt(Ct))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/a-callable"),gt=function(kt){var Ct,yt;this.promise=new kt(function(Tt,mt){if(Ct!==void 0||yt!==void 0)throw TypeError("Bad Promise constructor");Ct=Tt,yt=mt}),this.resolve=vt(Ct),this.reject=vt(yt)};zt.exports.f=function(kt){return new gt(kt)}},{"../internals/a-callable":95}],194:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-regexp"),kt=vt.TypeError;zt.exports=function(Ct){if(gt(Ct))throw kt("The method doesn't accept regular expressions");return Ct}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/function-call"),Ct=ot("../internals/fails"),yt=ot("../internals/object-keys"),Tt=ot("../internals/object-get-own-property-symbols"),mt=ot("../internals/object-property-is-enumerable"),xt=ot("../internals/to-object"),ft=ot("../internals/indexed-object"),z=Object.assign,tt=Object.defineProperty,at=gt([].concat);zt.exports=!z||Ct(function(){if(vt&&z({b:1},z(tt({},"a",{enumerable:!0,get:function(){tt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var it={},lt={},ut=Symbol(),dt="abcdefghijklmnopqrst";return it[ut]=7,dt.split("").forEach(function(bt){lt[bt]=bt}),z({},it)[ut]!=7||yt(z({},lt)).join("")!=dt})?function(lt,ut){for(var dt=xt(lt),bt=arguments.length,At=1,Dt=Tt.f,Ft=mt.f;bt>At;)for(var jt=ft(arguments[At++]),Nt=Dt?at(yt(jt),Dt(jt)):yt(jt),_t=Nt.length,Wt=0,Jt;_t>Wt;)Jt=Nt[Wt++],(!vt||kt(Ft,jt,Jt))&&(dt[Jt]=jt[Jt]);return dt}: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(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/object-define-properties"),kt=ot("../internals/enum-bug-keys"),Ct=ot("../internals/hidden-keys"),yt=ot("../internals/html"),Tt=ot("../internals/document-create-element"),mt=ot("../internals/shared-key"),xt=">",ft="<",z="prototype",tt="script",at=mt("IE_PROTO"),it=function(){},lt=function(Dt){return ft+tt+xt+Dt+ft+"/"+tt+xt},ut=function(Dt){Dt.write(lt("")),Dt.close();var Ft=Dt.parentWindow.Object;return Dt=null,Ft},dt=function(){var Dt=Tt("iframe"),Ft="java"+tt+":",jt;return Dt.style.display="none",yt.appendChild(Dt),Dt.src=String(Ft),jt=Dt.contentWindow.document,jt.open(),jt.write(lt("document.F=Object")),jt.close(),jt.F},bt,At=function(){try{bt=new ActiveXObject("htmlfile")}catch(Ft){}At=typeof document!="undefined"?document.domain&&bt?ut(bt):dt():ut(bt);for(var Dt=kt.length;Dt--;)delete At[z][kt[Dt]];return At()};Ct[at]=!0,zt.exports=Object.create||function(Ft,jt){var Nt;return Ft!==null?(it[z]=vt(Ft),Nt=new it,it[z]=null,Nt[at]=Ft):Nt=At(),jt===void 0?Nt:gt.f(Nt,jt)}},{"../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(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/v8-prototype-define-bug"),kt=ot("../internals/object-define-property"),Ct=ot("../internals/an-object"),yt=ot("../internals/to-indexed-object"),Tt=ot("../internals/object-keys");Bt.f=vt&&!gt?Object.defineProperties:function(xt,ft){Ct(xt);for(var z=yt(ft),tt=Tt(ft),at=tt.length,it=0,lt;at>it;)kt.f(xt,lt=tt[it++],z[lt]);return xt}},{"../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(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/descriptors"),kt=ot("../internals/ie8-dom-define"),Ct=ot("../internals/v8-prototype-define-bug"),yt=ot("../internals/an-object"),Tt=ot("../internals/to-property-key"),mt=vt.TypeError,xt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,z="enumerable",tt="configurable",at="writable";Bt.f=gt?Ct?function(lt,ut,dt){if(yt(lt),ut=Tt(ut),yt(dt),typeof lt=="function"&&ut==="prototype"&&"value"in dt&&at in dt&&!dt[at]){var bt=ft(lt,ut);bt&&bt[at]&&(lt[ut]=dt.value,dt={configurable:tt in dt?dt[tt]:bt[tt],enumerable:z in dt?dt[z]:bt[z],writable:!1})}return xt(lt,ut,dt)}:xt:function(lt,ut,dt){if(yt(lt),ut=Tt(ut),yt(dt),kt)try{return xt(lt,ut,dt)}catch(bt){}if("get"in dt||"set"in dt)throw mt("Accessors not supported");return"value"in dt&&(lt[ut]=dt.value),lt}},{"../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(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-call"),kt=ot("../internals/object-property-is-enumerable"),Ct=ot("../internals/create-property-descriptor"),yt=ot("../internals/to-indexed-object"),Tt=ot("../internals/to-property-key"),mt=ot("../internals/has-own-property"),xt=ot("../internals/ie8-dom-define"),ft=Object.getOwnPropertyDescriptor;Bt.f=vt?ft:function(tt,at){if(tt=yt(tt),at=Tt(at),xt)try{return ft(tt,at)}catch(it){}if(mt(tt,at))return Ct(!gt(kt.f,tt,at),tt[at])}},{"../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(ot,zt,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/object-get-own-property-names").f,Ct=ot("../internals/array-slice-simple"),yt=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tt=function(mt){try{return kt(mt)}catch(xt){return Ct(yt)}};zt.exports.f=function(xt){return yt&&vt(xt)=="Window"?Tt(xt):kt(gt(xt))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ot,zt,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys"),kt=gt.concat("length","prototype");Bt.f=Object.getOwnPropertyNames||function(yt){return vt(yt,kt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ot,zt,Bt){Bt.f=Object.getOwnPropertySymbols},{}],203:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-callable"),Ct=ot("../internals/to-object"),yt=ot("../internals/shared-key"),Tt=ot("../internals/correct-prototype-getter"),mt=yt("IE_PROTO"),xt=vt.Object,ft=xt.prototype;zt.exports=Tt?xt.getPrototypeOf:function(z){var tt=Ct(z);if(gt(tt,mt))return tt[mt];var at=tt.constructor;return kt(at)&&tt instanceof at?at.prototype:tt instanceof xt?ft: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(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/has-own-property"),kt=ot("../internals/to-indexed-object"),Ct=ot("../internals/array-includes").indexOf,yt=ot("../internals/hidden-keys"),Tt=vt([].push);zt.exports=function(mt,xt){var ft=kt(mt),z=0,tt=[],at;for(at in ft)!gt(yt,at)&&gt(ft,at)&&Tt(tt,at);for(;xt.length>z;)gt(ft,at=xt[z++])&&(~Ct(tt,at)||Tt(tt,at));return tt}},{"../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(ot,zt,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys");zt.exports=Object.keys||function(Ct){return vt(Ct,gt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ot,zt,Bt){"use strict";var vt={}.propertyIsEnumerable,gt=Object.getOwnPropertyDescriptor,kt=gt&&!vt.call({1:2},1);Bt.f=kt?function(yt){var Tt=gt(this,yt);return!!Tt&&Tt.enumerable}:vt},{}],208:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/an-object"),kt=ot("../internals/a-possible-prototype");zt.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ct=!1,yt={},Tt;try{Tt=vt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Tt(yt,[]),Ct=yt instanceof Array}catch(mt){}return function(xt,ft){return gt(xt),kt(ft),Ct?Tt(xt,ft):xt.__proto__=ft,xt}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-keys"),Ct=ot("../internals/to-indexed-object"),yt=ot("../internals/object-property-is-enumerable").f,Tt=gt(yt),mt=gt([].push),xt=function(ft){return function(z){for(var tt=Ct(z),at=kt(tt),it=at.length,lt=0,ut=[],dt;it>lt;)dt=at[lt++],(!vt||Tt(tt,dt))&&mt(ut,ft?[dt,tt[dt]]:tt[dt]);return ut}};zt.exports={entries:xt(!0),values:xt(!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(ot,zt,Bt){"use strict";var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/classof");zt.exports=vt?{}.toString:function(){return"[object "+gt(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-callable"),Ct=ot("../internals/is-object"),yt=vt.TypeError;zt.exports=function(Tt,mt){var xt,ft;if(mt==="string"&&kt(xt=Tt.toString)&&!Ct(ft=gt(xt,Tt))||kt(xt=Tt.valueOf)&&!Ct(ft=gt(xt,Tt))||mt!=="string"&&kt(xt=Tt.toString)&&!Ct(ft=gt(xt,Tt)))return ft;throw yt("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(ot,zt,Bt){var vt=ot("../internals/get-built-in"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-get-own-property-names"),Ct=ot("../internals/object-get-own-property-symbols"),yt=ot("../internals/an-object"),Tt=gt([].concat);zt.exports=vt("Reflect","ownKeys")||function(xt){var ft=kt.f(yt(xt)),z=Ct.f;return z?Tt(ft,z(xt)):ft}},{"../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(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=vt},{"../internals/global":163}],214:[function(ot,zt,Bt){zt.exports=function(vt){try{return{error:!1,value:vt()}}catch(gt){return{error:!0,value:gt}}}},{}],215:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/promise-native-constructor"),kt=ot("../internals/is-callable"),Ct=ot("../internals/is-forced"),yt=ot("../internals/inspect-source"),Tt=ot("../internals/well-known-symbol"),mt=ot("../internals/engine-is-browser"),xt=ot("../internals/is-pure"),ft=ot("../internals/engine-v8-version"),z=gt&&gt.prototype,tt=Tt("species"),at=!1,it=kt(vt.PromiseRejectionEvent),lt=Ct("Promise",function(){var ut=yt(gt),dt=ut!==String(gt);if(!dt&&ft===66||xt&&!(z.catch&&z.finally))return!0;if(ft>=51&&/native code/.test(ut))return!1;var bt=new gt(function(Ft){Ft(1)}),At=function(Ft){Ft(function(){},function(){})},Dt=bt.constructor={};return Dt[tt]=At,at=bt.then(function(){})instanceof At,at?!dt&&mt&&!it:!0});zt.exports={CONSTRUCTOR:lt,REJECTION_EVENT:it,SUBCLASSING:at}},{"../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(ot,zt,Bt){var vt=ot("../internals/global");zt.exports=vt.Promise},{"../internals/global":163}],217:[function(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/is-object"),kt=ot("../internals/new-promise-capability");zt.exports=function(Ct,yt){if(vt(Ct),gt(yt)&&yt.constructor===Ct)return yt;var Tt=kt.f(Ct),mt=Tt.resolve;return mt(yt),Tt.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ot,zt,Bt){var vt=ot("../internals/promise-native-constructor"),gt=ot("../internals/check-correctness-of-iteration"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR;zt.exports=kt||!gt(function(Ct){vt.all(Ct).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ot,zt,Bt){var vt=ot("../internals/object-define-property").f;zt.exports=function(gt,kt,Ct){Ct in gt||vt(gt,Ct,{configurable:!0,get:function(){return kt[Ct]},set:function(yt){kt[Ct]=yt}})}},{"../internals/object-define-property":198}],220:[function(ot,zt,Bt){var vt=function(){this.head=null,this.tail=null};vt.prototype={add:function(gt){var kt={item:gt,next:null};this.head?this.tail.next=kt:this.head=kt,this.tail=kt},get:function(){var gt=this.head;if(gt)return this.head=gt.next,this.tail===gt&&(this.tail=null),gt.item}},zt.exports=vt},{}],221:[function(ot,zt,Bt){var vt=ot("../internals/redefine");zt.exports=function(gt,kt,Ct){for(var yt in kt)vt(gt,yt,kt[yt],Ct);return gt}},{"../internals/redefine":222}],222:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/has-own-property"),Ct=ot("../internals/create-non-enumerable-property"),yt=ot("../internals/set-global"),Tt=ot("../internals/inspect-source"),mt=ot("../internals/internal-state"),xt=ot("../internals/function-name").CONFIGURABLE,ft=mt.get,z=mt.enforce,tt=String(String).split("String");(zt.exports=function(at,it,lt,ut){var dt=ut?!!ut.unsafe:!1,bt=ut?!!ut.enumerable:!1,At=ut?!!ut.noTargetGet:!1,Dt=ut&&ut.name!==void 0?ut.name:it,Ft;if(gt(lt)&&(String(Dt).slice(0,7)==="Symbol("&&(Dt="["+String(Dt).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!kt(lt,"name")||xt&&lt.name!==Dt)&&Ct(lt,"name",Dt),Ft=z(lt),Ft.source||(Ft.source=tt.join(typeof Dt=="string"?Dt:""))),at===vt){bt?at[it]=lt:yt(it,lt);return}else dt?!At&&at[it]&&(bt=!0):delete at[it];bt?at[it]=lt:Ct(at,it,lt)})(Function.prototype,"toString",function(){return gt(this)&&ft(this).source||Tt(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(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/an-object"),Ct=ot("../internals/is-callable"),yt=ot("../internals/classof-raw"),Tt=ot("../internals/regexp-exec"),mt=vt.TypeError;zt.exports=function(xt,ft){var z=xt.exec;if(Ct(z)){var tt=gt(z,xt,ft);return tt!==null&&kt(tt),tt}if(yt(xt)==="RegExp")return gt(Tt,xt,ft);throw mt("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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/to-string"),Ct=ot("../internals/regexp-flags"),yt=ot("../internals/regexp-sticky-helpers"),Tt=ot("../internals/shared"),mt=ot("../internals/object-create"),xt=ot("../internals/internal-state").get,ft=ot("../internals/regexp-unsupported-dot-all"),z=ot("../internals/regexp-unsupported-ncg"),tt=Tt("native-string-replace",String.prototype.replace),at=RegExp.prototype.exec,it=at,lt=gt("".charAt),ut=gt("".indexOf),dt=gt("".replace),bt=gt("".slice),At=function(){var Nt=/a/,_t=/b*/g;return vt(at,Nt,"a"),vt(at,_t,"a"),Nt.lastIndex!==0||_t.lastIndex!==0}(),Dt=yt.BROKEN_CARET,Ft=/()??/.exec("")[1]!==void 0,jt=At||Ft||Dt||ft||z;jt&&(it=function(_t){var Wt=this,Jt=xt(Wt),Ut=kt(_t),Vt=Jt.raw,oe,se,he,be,Yt,ne,ve;if(Vt)return Vt.lastIndex=Wt.lastIndex,oe=vt(it,Vt,Ut),Wt.lastIndex=Vt.lastIndex,oe;var Se=Jt.groups,we=Dt&&Wt.sticky,ce=vt(Ct,Wt),de=Wt.source,le=0,Ce=Ut;if(we&&(ce=dt(ce,"y",""),ut(ce,"g")===-1&&(ce+="g"),Ce=bt(Ut,Wt.lastIndex),Wt.lastIndex>0&&(!Wt.multiline||Wt.multiline&&lt(Ut,Wt.lastIndex-1)!==`
`)&&(de="(?: "+de+")",Ce=" "+Ce,le++),se=new RegExp("^(?:"+de+")",ce)),Ft&&(se=new RegExp("^"+de+"$(?!\\s)",ce)),At&&(he=Wt.lastIndex),be=vt(at,we?se:Wt,Ce),we?be?(be.input=bt(be.input,le),be[0]=bt(be[0],le),be.index=Wt.lastIndex,Wt.lastIndex+=be[0].length):Wt.lastIndex=0:At&&be&&(Wt.lastIndex=Wt.global?be.index+be[0].length:he),Ft&&be&&be.length>1&&vt(tt,be[0],se,function(){for(Yt=1;Yt<arguments.length-2;Yt++)arguments[Yt]===void 0&&(be[Yt]=void 0)}),be&&Se)for(be.groups=ne=mt(null),Yt=0;Yt<Se.length;Yt++)ve=Se[Yt],ne[ve[0]]=be[ve[1]];return be}),zt.exports=it},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/an-object");zt.exports=function(){var gt=vt(this),kt="";return gt.hasIndices&&(kt+="d"),gt.global&&(kt+="g"),gt.ignoreCase&&(kt+="i"),gt.multiline&&(kt+="m"),gt.dotAll&&(kt+="s"),gt.unicode&&(kt+="u"),gt.sticky&&(kt+="y"),kt}},{"../internals/an-object":101}],226:[function(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/has-own-property"),kt=ot("../internals/object-is-prototype-of"),Ct=ot("../internals/regexp-flags"),yt=RegExp.prototype;zt.exports=function(Tt){var mt=Tt.flags;return mt===void 0&&!("flags"in yt)&&!gt(Tt,"flags")&&kt(yt,Tt)?vt(Ct,Tt):mt}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp,Ct=vt(function(){var mt=kt("a","y");return mt.lastIndex=2,mt.exec("abcd")!=null}),yt=Ct||vt(function(){return!kt("a","y").sticky}),Tt=Ct||vt(function(){var mt=kt("^r","gy");return mt.lastIndex=2,mt.exec("str")!=null});zt.exports={BROKEN_CARET:Tt,MISSED_STICKY:yt,UNSUPPORTED_Y:Ct}},{"../internals/fails":150,"../internals/global":163}],228:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;zt.exports=vt(function(){var Ct=kt(".","s");return!(Ct.dotAll&&Ct.exec(`
`)&&Ct.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ot,zt,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;zt.exports=vt(function(){var Ct=kt("(?<a>b)","g");return Ct.exec("b").groups.a!=="b"||"b".replace(Ct,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;zt.exports=function(kt){if(kt==null)throw gt("Can't call method on "+kt);return kt}},{"../internals/global":163}],231:[function(ot,zt,Bt){zt.exports=Object.is||function(gt,kt){return gt===kt?gt!==0||1/gt===1/kt:gt!=gt&&kt!=kt}},{}],232:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=Object.defineProperty;zt.exports=function(kt,Ct){try{gt(vt,kt,{value:Ct,configurable:!0,writable:!0})}catch(yt){vt[kt]=Ct}return Ct}},{"../internals/global":163}],233:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/get-built-in"),gt=ot("../internals/object-define-property"),kt=ot("../internals/well-known-symbol"),Ct=ot("../internals/descriptors"),yt=kt("species");zt.exports=function(Tt){var mt=vt(Tt),xt=gt.f;Ct&&mt&&!mt[yt]&&xt(mt,yt,{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(ot,zt,Bt){var vt=ot("../internals/object-define-property").f,gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol"),Ct=kt("toStringTag");zt.exports=function(yt,Tt,mt){yt&&!mt&&(yt=yt.prototype),yt&&!gt(yt,Ct)&&vt(yt,Ct,{configurable:!0,value:Tt})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ot,zt,Bt){var vt=ot("../internals/shared"),gt=ot("../internals/uid"),kt=vt("keys");zt.exports=function(Ct){return kt[Ct]||(kt[Ct]=gt(Ct))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/set-global"),kt="__core-js_shared__",Ct=vt[kt]||gt(kt,{});zt.exports=Ct},{"../internals/global":163,"../internals/set-global":232}],237:[function(ot,zt,Bt){var vt=ot("../internals/is-pure"),gt=ot("../internals/shared-store");(zt.exports=function(kt,Ct){return gt[kt]||(gt[kt]=Ct!==void 0?Ct:{})})("versions",[]).push({version:"3.22.1",mode:vt?"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(ot,zt,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/a-constructor"),kt=ot("../internals/well-known-symbol"),Ct=kt("species");zt.exports=function(yt,Tt){var mt=vt(yt).constructor,xt;return mt===void 0||(xt=vt(mt)[Ct])==null?Tt:gt(xt)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-string"),Ct=ot("../internals/require-object-coercible"),yt=vt("".charAt),Tt=vt("".charCodeAt),mt=vt("".slice),xt=function(ft){return function(z,tt){var at=kt(Ct(z)),it=gt(tt),lt=at.length,ut,dt;return it<0||it>=lt?ft?"":void 0:(ut=Tt(at,it),ut<55296||ut>56319||it+1===lt||(dt=Tt(at,it+1))<56320||dt>57343?ft?yt(at,it):ut:ft?mt(at,it,it+2):(ut-55296<<10)+(dt-56320)+65536)}};zt.exports={codeAt:xt(!1),charAt:xt(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ot,zt,Bt){var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/fails"),kt=ot("../internals/whitespaces"),Ct="\u200B\x85\u180E";zt.exports=function(yt){return gt(function(){return!!kt[yt]()||Ct[yt]()!==Ct||vt&&kt[yt].name!==yt})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/require-object-coercible"),kt=ot("../internals/to-string"),Ct=ot("../internals/whitespaces"),yt=vt("".replace),Tt="["+Ct+"]",mt=RegExp("^"+Tt+Tt+"*"),xt=RegExp(Tt+Tt+"*$"),ft=function(z){return function(tt){var at=kt(gt(tt));return z&1&&(at=yt(at,mt,"")),z&2&&(at=yt(at,xt,"")),at}};zt.exports={start:ft(1),end:ft(2),trim:ft(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(ot,zt,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/get-built-in"),kt=ot("../internals/well-known-symbol"),Ct=ot("../internals/redefine");zt.exports=function(){var yt=gt("Symbol"),Tt=yt&&yt.prototype,mt=Tt&&Tt.valueOf,xt=kt("toPrimitive");Tt&&!Tt[xt]&&Ct(Tt,xt,function(ft){return vt(mt,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/function-bind-context"),Ct=ot("../internals/is-callable"),yt=ot("../internals/has-own-property"),Tt=ot("../internals/fails"),mt=ot("../internals/html"),xt=ot("../internals/array-slice"),ft=ot("../internals/document-create-element"),z=ot("../internals/validate-arguments-length"),tt=ot("../internals/engine-is-ios"),at=ot("../internals/engine-is-node"),it=vt.setImmediate,lt=vt.clearImmediate,ut=vt.process,dt=vt.Dispatch,bt=vt.Function,At=vt.MessageChannel,Dt=vt.String,Ft=0,jt={},Nt="onreadystatechange",_t,Wt,Jt,Ut;try{_t=vt.location}catch(be){}var Vt=function(be){if(yt(jt,be)){var Yt=jt[be];delete jt[be],Yt()}},oe=function(be){return function(){Vt(be)}},se=function(be){Vt(be.data)},he=function(be){vt.postMessage(Dt(be),_t.protocol+"//"+_t.host)};(!it||!lt)&&(it=function(Yt){z(arguments.length,1);var ne=Ct(Yt)?Yt:bt(Yt),ve=xt(arguments,1);return jt[++Ft]=function(){gt(ne,void 0,ve)},Wt(Ft),Ft},lt=function(Yt){delete jt[Yt]},at?Wt=function(be){ut.nextTick(oe(be))}:dt&&dt.now?Wt=function(be){dt.now(oe(be))}:At&&!tt?(Jt=new At,Ut=Jt.port2,Jt.port1.onmessage=se,Wt=kt(Ut.postMessage,Ut)):vt.addEventListener&&Ct(vt.postMessage)&&!vt.importScripts&&_t&&_t.protocol!=="file:"&&!Tt(he)?(Wt=he,vt.addEventListener("message",se,!1)):Nt in ft("script")?Wt=function(be){mt.appendChild(ft("script"))[Nt]=function(){mt.removeChild(this),Vt(be)}}:Wt=function(be){setTimeout(oe(be),0)}),zt.exports={set:it,clear:lt}},{"../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(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this");zt.exports=vt(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ot,zt,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.max,kt=Math.min;zt.exports=function(Ct,yt){var Tt=vt(Ct);return Tt<0?gt(Tt+yt,0):kt(Tt,yt)}},{"../internals/to-integer-or-infinity":248}],246:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-length"),Ct=vt.RangeError;zt.exports=function(yt){if(yt===void 0)return 0;var Tt=gt(yt),mt=kt(Tt);if(Tt!==mt)throw Ct("Wrong length or index");return mt}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ot,zt,Bt){var vt=ot("../internals/indexed-object"),gt=ot("../internals/require-object-coercible");zt.exports=function(kt){return vt(gt(kt))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ot,zt,Bt){var vt=Math.ceil,gt=Math.floor;zt.exports=function(kt){var Ct=+kt;return Ct!==Ct||Ct===0?0:(Ct>0?gt:vt)(Ct)}},{}],249:[function(ot,zt,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.min;zt.exports=function(kt){return kt>0?gt(vt(kt),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/require-object-coercible"),kt=vt.Object;zt.exports=function(Ct){return kt(gt(Ct))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-positive-integer"),kt=vt.RangeError;zt.exports=function(Ct,yt){var Tt=gt(Ct);if(Tt%yt)throw kt("Wrong offset");return Tt}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=vt.RangeError;zt.exports=function(Ct){var yt=gt(Ct);if(yt<0)throw kt("The argument can't be less than 0");return yt}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-object"),Ct=ot("../internals/is-symbol"),yt=ot("../internals/get-method"),Tt=ot("../internals/ordinary-to-primitive"),mt=ot("../internals/well-known-symbol"),xt=vt.TypeError,ft=mt("toPrimitive");zt.exports=function(z,tt){if(!kt(z)||Ct(z))return z;var at=yt(z,ft),it;if(at){if(tt===void 0&&(tt="default"),it=gt(at,z,tt),!kt(it)||Ct(it))return it;throw xt("Can't convert object to primitive value")}return tt===void 0&&(tt="number"),Tt(z,tt)}},{"../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(ot,zt,Bt){var vt=ot("../internals/to-primitive"),gt=ot("../internals/is-symbol");zt.exports=function(kt){var Ct=vt(kt,"string");return gt(Ct)?Ct:Ct+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("toStringTag"),kt={};kt[gt]="z",zt.exports=String(kt)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/classof"),kt=vt.String;zt.exports=function(Ct){if(gt(Ct)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return kt(Ct)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.String;zt.exports=function(kt){try{return gt(kt)}catch(Ct){return"Object"}}},{"../internals/global":163}],258:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),Ct=ot("../internals/descriptors"),yt=ot("../internals/typed-array-constructors-require-wrappers"),Tt=ot("../internals/array-buffer-view-core"),mt=ot("../internals/array-buffer"),xt=ot("../internals/an-instance"),ft=ot("../internals/create-property-descriptor"),z=ot("../internals/create-non-enumerable-property"),tt=ot("../internals/is-integral-number"),at=ot("../internals/to-length"),it=ot("../internals/to-index"),lt=ot("../internals/to-offset"),ut=ot("../internals/to-property-key"),dt=ot("../internals/has-own-property"),bt=ot("../internals/classof"),At=ot("../internals/is-object"),Dt=ot("../internals/is-symbol"),Ft=ot("../internals/object-create"),jt=ot("../internals/object-is-prototype-of"),Nt=ot("../internals/object-set-prototype-of"),_t=ot("../internals/object-get-own-property-names").f,Wt=ot("../internals/typed-array-from"),Jt=ot("../internals/array-iteration").forEach,Ut=ot("../internals/set-species"),Vt=ot("../internals/object-define-property"),oe=ot("../internals/object-get-own-property-descriptor"),se=ot("../internals/internal-state"),he=ot("../internals/inherit-if-required"),be=se.get,Yt=se.set,ne=Vt.f,ve=oe.f,Se=Math.round,we=gt.RangeError,ce=mt.ArrayBuffer,de=ce.prototype,le=mt.DataView,Ce=Tt.NATIVE_ARRAY_BUFFER_VIEWS,fe=Tt.TYPED_ARRAY_CONSTRUCTOR,me=Tt.TYPED_ARRAY_TAG,ke=Tt.TypedArray,pe=Tt.TypedArrayPrototype,qt=Tt.aTypedArrayConstructor,Kt=Tt.isTypedArray,wt="BYTES_PER_ELEMENT",Lt="Wrong length",Zt=function(ye,Pe){qt(ye);for(var Ae=0,Oe=Pe.length,Ie=new ye(Oe);Oe>Ae;)Ie[Ae]=Pe[Ae++];return Ie},ee=function(ye,Pe){ne(ye,Pe,{get:function(){return be(this)[Pe]}})},It=function(ye){var Pe;return jt(de,ye)||(Pe=bt(ye))=="ArrayBuffer"||Pe=="SharedArrayBuffer"},Rt=function(ye,Pe){return Kt(ye)&&!Dt(Pe)&&Pe in ye&&tt(+Pe)&&Pe>=0},Ht=function(Pe,Ae){return Ae=ut(Ae),Rt(Pe,Ae)?ft(2,Pe[Ae]):ve(Pe,Ae)},re=function(Pe,Ae,Oe){return Ae=ut(Ae),Rt(Pe,Ae)&&At(Oe)&&dt(Oe,"value")&&!dt(Oe,"get")&&!dt(Oe,"set")&&!Oe.configurable&&(!dt(Oe,"writable")||Oe.writable)&&(!dt(Oe,"enumerable")||Oe.enumerable)?(Pe[Ae]=Oe.value,Pe):ne(Pe,Ae,Oe)};Ct?(Ce||(oe.f=Ht,Vt.f=re,ee(pe,"buffer"),ee(pe,"byteOffset"),ee(pe,"byteLength"),ee(pe,"length")),vt({target:"Object",stat:!0,forced:!Ce},{getOwnPropertyDescriptor:Ht,defineProperty:re}),zt.exports=function(ye,Pe,Ae){var Oe=ye.match(/\d+$/)[0]/8,Ie=ye+(Ae?"Clamped":"")+"Array",Qe="get"+ye,qe="set"+ye,nn=gt[Ie],Ke=nn,Ue=Ke&&Ke.prototype,We={},He=function(un,bn){var In=be(un);return In.view[Qe](bn*Oe+In.byteOffset,!0)},rn=function(un,bn,In){var jn=be(un);Ae&&(In=(In=Se(In))<0?0:In>255?255:In&255),jn.view[qe](bn*Oe+jn.byteOffset,In,!0)},ln=function(un,bn){ne(un,bn,{get:function(){return He(this,bn)},set:function(In){return rn(this,bn,In)},enumerable:!0})};Ce?yt&&(Ke=Pe(function(un,bn,In,jn){return xt(un,Ue),he(function(){return At(bn)?It(bn)?jn!==void 0?new nn(bn,lt(In,Oe),jn):In!==void 0?new nn(bn,lt(In,Oe)):new nn(bn):Kt(bn)?Zt(Ke,bn):kt(Wt,Ke,bn):new nn(it(bn))}(),un,Ke)}),Nt&&Nt(Ke,ke),Jt(_t(nn),function(un){un in Ke||z(Ke,un,nn[un])}),Ke.prototype=Ue):(Ke=Pe(function(un,bn,In,jn){xt(un,Ue);var Kn=0,kr=0,pr,Er,Or;if(!At(bn))Or=it(bn),Er=Or*Oe,pr=new ce(Er);else if(It(bn)){pr=bn,kr=lt(In,Oe);var jr=bn.byteLength;if(jn===void 0){if(jr%Oe||(Er=jr-kr,Er<0))throw we(Lt)}else if(Er=at(jn)*Oe,Er+kr>jr)throw we(Lt);Or=Er/Oe}else return Kt(bn)?Zt(Ke,bn):kt(Wt,Ke,bn);for(Yt(un,{buffer:pr,byteOffset:kr,byteLength:Er,length:Or,view:new le(pr)});Kn<Or;)ln(un,Kn++)}),Nt&&Nt(Ke,ke),Ue=Ke.prototype=Ft(pe)),Ue.constructor!==Ke&&z(Ue,"constructor",Ke),z(Ue,fe,Ke),me&&z(Ue,me,Ie),We[Ie]=Ke,vt({global:!0,forced:Ke!=nn,sham:!Ce},We),wt in Ke||z(Ke,wt,Oe),wt in Ue||z(Ue,wt,Oe),Ut(Ie)}):zt.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(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/check-correctness-of-iteration"),Ct=ot("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,yt=vt.ArrayBuffer,Tt=vt.Int8Array;zt.exports=!Ct||!gt(function(){Tt(1)})||!gt(function(){new Tt(-1)})||!kt(function(mt){new Tt,new Tt(null),new Tt(1.5),new Tt(mt)},!0)||gt(function(){return new Tt(new yt(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(ot,zt,Bt){var vt=ot("../internals/array-from-constructor-and-list"),gt=ot("../internals/typed-array-species-constructor");zt.exports=function(kt,Ct){return vt(gt(kt),Ct)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ot,zt,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-call"),kt=ot("../internals/a-constructor"),Ct=ot("../internals/to-object"),yt=ot("../internals/length-of-array-like"),Tt=ot("../internals/get-iterator"),mt=ot("../internals/get-iterator-method"),xt=ot("../internals/is-array-iterator-method"),ft=ot("../internals/array-buffer-view-core").aTypedArrayConstructor;zt.exports=function(tt){var at=kt(this),it=Ct(tt),lt=arguments.length,ut=lt>1?arguments[1]:void 0,dt=ut!==void 0,bt=mt(it),At,Dt,Ft,jt,Nt,_t;if(bt&&!xt(bt))for(Nt=Tt(it,bt),_t=Nt.next,it=[];!(jt=gt(_t,Nt)).done;)it.push(jt.value);for(dt&&lt>2&&(ut=vt(ut,arguments[2])),Dt=yt(it),Ft=new(ft(at))(Dt),At=0;Dt>At;At++)Ft[At]=dt?ut(it[At],At):it[At];return Ft}},{"../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(ot,zt,Bt){var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/species-constructor"),kt=vt.TYPED_ARRAY_CONSTRUCTOR,Ct=vt.aTypedArrayConstructor;zt.exports=function(yt){return Ct(gt(yt,yt[kt]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ot,zt,Bt){var vt=ot("../internals/function-uncurry-this"),gt=0,kt=Math.random(),Ct=vt(1 .toString);zt.exports=function(yt){return"Symbol("+(yt===void 0?"":yt)+")_"+Ct(++gt+kt,36)}},{"../internals/function-uncurry-this":157}],264:[function(ot,zt,Bt){var vt=ot("../internals/native-symbol");zt.exports=vt&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails");zt.exports=vt&&gt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;zt.exports=function(kt,Ct){if(kt<Ct)throw gt("Not enough arguments");return kt}},{"../internals/global":163}],267:[function(ot,zt,Bt){var vt=ot("../internals/well-known-symbol");Bt.f=vt},{"../internals/well-known-symbol":268}],268:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/shared"),kt=ot("../internals/has-own-property"),Ct=ot("../internals/uid"),yt=ot("../internals/native-symbol"),Tt=ot("../internals/use-symbol-as-uid"),mt=gt("wks"),xt=vt.Symbol,ft=xt&&xt.for,z=Tt?xt:xt&&xt.withoutSetter||Ct;zt.exports=function(tt){if(!kt(mt,tt)||!(yt||typeof mt[tt]=="string")){var at="Symbol."+tt;yt&&kt(xt,tt)?mt[tt]=xt[tt]:Tt&&ft?mt[tt]=ft(at):mt[tt]=z(at)}return mt[tt]}},{"../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(ot,zt,Bt){zt.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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/array-buffer"),Ct=ot("../internals/set-species"),yt="ArrayBuffer",Tt=kt[yt],mt=gt[yt];vt({global:!0,forced:mt!==Tt},{ArrayBuffer:Tt}),Ct(yt)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),Ct=ot("../internals/array-buffer"),yt=ot("../internals/an-object"),Tt=ot("../internals/to-absolute-index"),mt=ot("../internals/to-length"),xt=ot("../internals/species-constructor"),ft=Ct.ArrayBuffer,z=Ct.DataView,tt=z.prototype,at=gt(ft.prototype.slice),it=gt(tt.getUint8),lt=gt(tt.setUint8),ut=kt(function(){return!new ft(2).slice(1,void 0).byteLength});vt({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ut},{slice:function(bt,At){if(at&&At===void 0)return at(yt(this),bt);for(var Dt=yt(this).byteLength,Ft=Tt(bt,Dt),jt=Tt(At===void 0?Dt:At,Dt),Nt=new(xt(this,ft))(mt(jt-Ft)),_t=new z(this),Wt=new z(Nt),Jt=0;Ft<jt;)lt(Wt,Jt++,it(_t,Ft++));return Nt}})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/fails"),Ct=ot("../internals/is-array"),yt=ot("../internals/is-object"),Tt=ot("../internals/to-object"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/create-property"),ft=ot("../internals/array-species-create"),z=ot("../internals/array-method-has-species-support"),tt=ot("../internals/well-known-symbol"),at=ot("../internals/engine-v8-version"),it=tt("isConcatSpreadable"),lt=9007199254740991,ut="Maximum allowed index exceeded",dt=gt.TypeError,bt=at>=51||!kt(function(){var jt=[];return jt[it]=!1,jt.concat()[0]!==jt}),At=z("concat"),Dt=function(jt){if(!yt(jt))return!1;var Nt=jt[it];return Nt!==void 0?!!Nt:Ct(jt)},Ft=!bt||!At;vt({target:"Array",proto:!0,forced:Ft},{concat:function(Nt){var _t=Tt(this),Wt=ft(_t,0),Jt=0,Ut,Vt,oe,se,he;for(Ut=-1,oe=arguments.length;Ut<oe;Ut++)if(he=Ut===-1?_t:arguments[Ut],Dt(he)){if(se=mt(he),Jt+se>lt)throw dt(ut);for(Vt=0;Vt<se;Vt++,Jt++)Vt in he&&xt(Wt,Jt,he[Vt])}else{if(Jt>=lt)throw dt(ut);xt(Wt,Jt++,he)}return Wt.length=Jt,Wt}})},{"../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(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-fill"),kt=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{fill:gt}),kt("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").filter,kt=ot("../internals/array-method-has-species-support"),Ct=kt("filter");vt({target:"Array",proto:!0,forced:!Ct},{filter:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").find,kt=ot("../internals/add-to-unscopables"),Ct="find",yt=!0;Ct in[]&&Array(1)[Ct](function(){yt=!1}),vt({target:"Array",proto:!0,forced:yt},{find:function(mt){return gt(this,mt,arguments.length>1?arguments[1]:void 0)}}),kt(Ct)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-from"),kt=ot("../internals/check-correctness-of-iteration"),Ct=!kt(function(yt){Array.from(yt)});vt({target:"Array",stat:!0,forced:Ct},{from:gt})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-includes").includes,kt=ot("../internals/add-to-unscopables");vt({target:"Array",proto:!0},{includes:function(yt){return gt(this,yt,arguments.length>1?arguments[1]:void 0)}}),kt("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/add-to-unscopables"),kt=ot("../internals/iterators"),Ct=ot("../internals/internal-state"),yt=ot("../internals/object-define-property").f,Tt=ot("../internals/define-iterator"),mt=ot("../internals/is-pure"),xt=ot("../internals/descriptors"),ft="Array Iterator",z=Ct.set,tt=Ct.getterFor(ft);zt.exports=Tt(Array,"Array",function(it,lt){z(this,{type:ft,target:vt(it),index:0,kind:lt})},function(){var it=tt(this),lt=it.target,ut=it.kind,dt=it.index++;return!lt||dt>=lt.length?(it.target=void 0,{value:void 0,done:!0}):ut=="keys"?{value:dt,done:!1}:ut=="values"?{value:lt[dt],done:!1}:{value:[dt,lt[dt]],done:!1}},"values");var at=kt.Arguments=kt.Array;if(gt("keys"),gt("values"),gt("entries"),!mt&&xt&&at.name!=="values")try{yt(at,"name",{value:"values"})}catch(it){}},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),Ct=ot("../internals/to-indexed-object"),yt=ot("../internals/array-method-is-strict"),Tt=gt([].join),mt=kt!=Object,xt=yt("join",",");vt({target:"Array",proto:!0,forced:mt||!xt},{join:function(z){return Tt(Ct(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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/array-method-has-species-support"),Ct=kt("map");vt({target:"Array",proto:!0,forced:!Ct},{map:function(Tt){return gt(this,Tt,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/is-array"),Ct=ot("../internals/is-constructor"),yt=ot("../internals/is-object"),Tt=ot("../internals/to-absolute-index"),mt=ot("../internals/length-of-array-like"),xt=ot("../internals/to-indexed-object"),ft=ot("../internals/create-property"),z=ot("../internals/well-known-symbol"),tt=ot("../internals/array-method-has-species-support"),at=ot("../internals/array-slice"),it=tt("slice"),lt=z("species"),ut=gt.Array,dt=Math.max;vt({target:"Array",proto:!0,forced:!it},{slice:function(At,Dt){var Ft=xt(this),jt=mt(Ft),Nt=Tt(At,jt),_t=Tt(Dt===void 0?jt:Dt,jt),Wt,Jt,Ut;if(kt(Ft)&&(Wt=Ft.constructor,Ct(Wt)&&(Wt===ut||kt(Wt.prototype))?Wt=void 0:yt(Wt)&&(Wt=Wt[lt],Wt===null&&(Wt=void 0)),Wt===ut||Wt===void 0))return at(Ft,Nt,_t);for(Jt=new(Wt===void 0?ut:Wt)(dt(_t-Nt,0)),Ut=0;Nt<_t;Nt++,Ut++)Nt in Ft&&ft(Jt,Ut,Ft[Nt]);return Jt.length=Ut,Jt}})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/a-callable"),Ct=ot("../internals/to-object"),yt=ot("../internals/length-of-array-like"),Tt=ot("../internals/to-string"),mt=ot("../internals/fails"),xt=ot("../internals/array-sort"),ft=ot("../internals/array-method-is-strict"),z=ot("../internals/engine-ff-version"),tt=ot("../internals/engine-is-ie-or-edge"),at=ot("../internals/engine-v8-version"),it=ot("../internals/engine-webkit-version"),lt=[],ut=gt(lt.sort),dt=gt(lt.push),bt=mt(function(){lt.sort(void 0)}),At=mt(function(){lt.sort(null)}),Dt=ft("sort"),Ft=!mt(function(){if(at)return at<70;if(!(z&&z>3)){if(tt)return!0;if(it)return it<603;var _t="",Wt,Jt,Ut,Vt;for(Wt=65;Wt<76;Wt++){switch(Jt=String.fromCharCode(Wt),Wt){case 66:case 69:case 70:case 72:Ut=3;break;case 68:case 71:Ut=4;break;default:Ut=2}for(Vt=0;Vt<47;Vt++)lt.push({k:Jt+Vt,v:Ut})}for(lt.sort(function(oe,se){return se.v-oe.v}),Vt=0;Vt<lt.length;Vt++)Jt=lt[Vt].k.charAt(0),_t.charAt(_t.length-1)!==Jt&&(_t+=Jt);return _t!=="DGBEFHACIJK"}}),jt=bt||!At||!Dt||!Ft,Nt=function(_t){return function(Wt,Jt){return Jt===void 0?-1:Wt===void 0?1:_t!==void 0?+_t(Wt,Jt)||0:Tt(Wt)>Tt(Jt)?1:-1}};vt({target:"Array",proto:!0,forced:jt},{sort:function(Wt){Wt!==void 0&&kt(Wt);var Jt=Ct(this);if(Ft)return Wt===void 0?ut(Jt):ut(Jt,Wt);var Ut=[],Vt=yt(Jt),oe,se;for(se=0;se<Vt;se++)se in Jt&&dt(Ut,Jt[se]);for(xt(Ut,Nt(Wt)),oe=Ut.length,se=0;se<oe;)Jt[se]=Ut[se++];for(;se<Vt;)delete Jt[se++];return Jt}})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/to-absolute-index"),Ct=ot("../internals/to-integer-or-infinity"),yt=ot("../internals/length-of-array-like"),Tt=ot("../internals/to-object"),mt=ot("../internals/array-species-create"),xt=ot("../internals/create-property"),ft=ot("../internals/array-method-has-species-support"),z=ft("splice"),tt=gt.TypeError,at=Math.max,it=Math.min,lt=9007199254740991,ut="Maximum allowed length exceeded";vt({target:"Array",proto:!0,forced:!z},{splice:function(bt,At){var Dt=Tt(this),Ft=yt(Dt),jt=kt(bt,Ft),Nt=arguments.length,_t,Wt,Jt,Ut,Vt,oe;if(Nt===0?_t=Wt=0:Nt===1?(_t=0,Wt=Ft-jt):(_t=Nt-2,Wt=it(at(Ct(At),0),Ft-jt)),Ft+_t-Wt>lt)throw tt(ut);for(Jt=mt(Dt,Wt),Ut=0;Ut<Wt;Ut++)Vt=jt+Ut,Vt in Dt&&xt(Jt,Ut,Dt[Vt]);if(Jt.length=Wt,_t<Wt){for(Ut=jt;Ut<Ft-Wt;Ut++)Vt=Ut+Wt,oe=Ut+_t,Vt in Dt?Dt[oe]=Dt[Vt]:delete Dt[oe];for(Ut=Ft;Ut>Ft-Wt+_t;Ut--)delete Dt[Ut-1]}else if(_t>Wt)for(Ut=Ft-Wt;Ut>jt;Ut--)Vt=Ut+Wt-1,oe=Ut+_t-1,Vt in Dt?Dt[oe]=Dt[Vt]:delete Dt[oe];for(Ut=0;Ut<_t;Ut++)Dt[Ut+jt]=arguments[Ut+2];return Dt.length=Ft-Wt+_t,Jt}})},{"../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(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-name").EXISTS,kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/object-define-property").f,yt=Function.prototype,Tt=kt(yt.toString),mt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xt=kt(mt.exec),ft="name";vt&&!gt&&Ct(yt,ft,{configurable:!0,get:function(){try{return xt(mt,Tt(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/function-apply"),Ct=ot("../internals/function-call"),yt=ot("../internals/function-uncurry-this"),Tt=ot("../internals/fails"),mt=ot("../internals/is-array"),xt=ot("../internals/is-callable"),ft=ot("../internals/is-object"),z=ot("../internals/is-symbol"),tt=ot("../internals/array-slice"),at=ot("../internals/native-symbol"),it=gt("JSON","stringify"),lt=yt(/./.exec),ut=yt("".charAt),dt=yt("".charCodeAt),bt=yt("".replace),At=yt(1 .toString),Dt=/[\uD800-\uDFFF]/g,Ft=/^[\uD800-\uDBFF]$/,jt=/^[\uDC00-\uDFFF]$/,Nt=!at||Tt(function(){var Ut=gt("Symbol")();return it([Ut])!="[null]"||it({a:Ut})!="{}"||it(Object(Ut))!="{}"}),_t=Tt(function(){return it("\uDF06\uD834")!=='"\\udf06\\ud834"'||it("\uDEAD")!=='"\\udead"'}),Wt=function(Ut,Vt){var oe=tt(arguments),se=Vt;if(!(!ft(Vt)&&Ut===void 0||z(Ut)))return mt(Vt)||(Vt=function(he,be){if(xt(se)&&(be=Ct(se,this,he,be)),!z(be))return be}),oe[1]=Vt,kt(it,null,oe)},Jt=function(Ut,Vt,oe){var se=ut(oe,Vt-1),he=ut(oe,Vt+1);return lt(Ft,Ut)&&!lt(jt,he)||lt(jt,Ut)&&!lt(Ft,se)?"\\u"+At(dt(Ut,0),16):Ut};it&&vt({target:"JSON",stat:!0,forced:Nt||_t},{stringify:function(Vt,oe,se){var he=tt(arguments),be=kt(Nt?Wt:it,null,he);return _t&&typeof be=="string"?bt(be,Dt,Jt):be}})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/is-forced"),yt=ot("../internals/redefine"),Tt=ot("../internals/has-own-property"),mt=ot("../internals/inherit-if-required"),xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/is-symbol"),z=ot("../internals/to-primitive"),tt=ot("../internals/fails"),at=ot("../internals/object-get-own-property-names").f,it=ot("../internals/object-get-own-property-descriptor").f,lt=ot("../internals/object-define-property").f,ut=ot("../internals/this-number-value"),dt=ot("../internals/string-trim").trim,bt="Number",At=gt[bt],Dt=At.prototype,Ft=gt.TypeError,jt=kt("".slice),Nt=kt("".charCodeAt),_t=function(se){var he=z(se,"number");return typeof he=="bigint"?he:Wt(he)},Wt=function(se){var he=z(se,"number"),be,Yt,ne,ve,Se,we,ce,de;if(ft(he))throw Ft("Cannot convert a Symbol value to a number");if(typeof he=="string"&&he.length>2){if(he=dt(he),be=Nt(he,0),be===43||be===45){if(Yt=Nt(he,2),Yt===88||Yt===120)return NaN}else if(be===48){switch(Nt(he,1)){case 66:case 98:ne=2,ve=49;break;case 79:case 111:ne=8,ve=55;break;default:return+he}for(Se=jt(he,2),we=Se.length,ce=0;ce<we;ce++)if(de=Nt(Se,ce),de<48||de>ve)return NaN;return parseInt(Se,ne)}}return+he};if(Ct(bt,!At(" 0o1")||!At("0b1")||At("+0x1"))){for(var Jt=function(he){var be=arguments.length<1?0:At(_t(he)),Yt=this;return xt(Dt,Yt)&&tt(function(){ut(Yt)})?mt(Object(be),Yt,Jt):be},Ut=vt?at(At):"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(","),Vt=0,oe;Ut.length>Vt;Vt++)Tt(At,oe=Ut[Vt])&&!Tt(Jt,oe)&&lt(Jt,oe,it(At,oe));Jt.prototype=Dt,Dt.constructor=Jt,yt(gt,bt,Jt)}},{"../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(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-assign");vt({target:"Object",stat:!0,forced:Object.assign!==gt},{assign:gt})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-to-array").entries;vt({target:"Object",stat:!0},{entries:function(Ct){return gt(Ct)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/native-symbol"),kt=ot("../internals/fails"),Ct=ot("../internals/object-get-own-property-symbols"),yt=ot("../internals/to-object"),Tt=!gt||kt(function(){Ct.f(1)});vt({target:"Object",stat:!0,forced:Tt},{getOwnPropertySymbols:function(xt){var ft=Ct.f;return ft?ft(yt(xt)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/to-object"),kt=ot("../internals/object-keys"),Ct=ot("../internals/fails"),yt=Ct(function(){kt(1)});vt({target:"Object",stat:!0,forced:yt},{keys:function(mt){return kt(gt(mt))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ot,zt,Bt){var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/redefine"),kt=ot("../internals/object-to-string");vt||gt(Object.prototype,"toString",kt,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),Ct=ot("../internals/new-promise-capability"),yt=ot("../internals/perform"),Tt=ot("../internals/iterate"),mt=ot("../internals/promise-statics-incorrect-iteration");vt({target:"Promise",stat:!0,forced:mt},{all:function(ft){var z=this,tt=Ct.f(z),at=tt.resolve,it=tt.reject,lt=yt(function(){var ut=kt(z.resolve),dt=[],bt=0,At=1;Tt(ft,function(Dt){var Ft=bt++,jt=!1;At++,gt(ut,z,Dt).then(function(Nt){jt||(jt=!0,dt[Ft]=Nt,--At||at(dt))},it)}),--At||at(dt)});return lt.error&&it(lt.value),tt.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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Ct=ot("../internals/promise-native-constructor"),yt=ot("../internals/get-built-in"),Tt=ot("../internals/is-callable"),mt=ot("../internals/redefine"),xt=Ct&&Ct.prototype;if(vt({target:"Promise",proto:!0,forced:kt,real:!0},{catch:function(z){return this.then(void 0,z)}}),!gt&&Tt(Ct)){var ft=yt("Promise").prototype.catch;xt.catch!==ft&&mt(xt,"catch",ft,{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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/engine-is-node"),Ct=ot("../internals/global"),yt=ot("../internals/function-call"),Tt=ot("../internals/redefine"),mt=ot("../internals/redefine-all"),xt=ot("../internals/object-set-prototype-of"),ft=ot("../internals/set-to-string-tag"),z=ot("../internals/set-species"),tt=ot("../internals/a-callable"),at=ot("../internals/is-callable"),it=ot("../internals/is-object"),lt=ot("../internals/an-instance"),ut=ot("../internals/species-constructor"),dt=ot("../internals/task").set,bt=ot("../internals/microtask"),At=ot("../internals/host-report-errors"),Dt=ot("../internals/perform"),Ft=ot("../internals/queue"),jt=ot("../internals/internal-state"),Nt=ot("../internals/promise-native-constructor"),_t=ot("../internals/promise-constructor-detection"),Wt=ot("../internals/new-promise-capability"),Jt="Promise",Ut=_t.CONSTRUCTOR,Vt=_t.REJECTION_EVENT,oe=_t.SUBCLASSING,se=jt.getterFor(Jt),he=jt.set,be=Nt&&Nt.prototype,Yt=Nt,ne=be,ve=Ct.TypeError,Se=Ct.document,we=Ct.process,ce=Wt.f,de=ce,le=!!(Se&&Se.createEvent&&Ct.dispatchEvent),Ce="unhandledrejection",fe="rejectionhandled",me=0,ke=1,pe=2,qt=1,Kt=2,wt,Lt,Zt,ee,It=function(qe){var nn;return it(qe)&&at(nn=qe.then)?nn:!1},Rt=function(qe,nn){var Ke=nn.value,Ue=nn.state==ke,We=Ue?qe.ok:qe.fail,He=qe.resolve,rn=qe.reject,ln=qe.domain,un,bn,In;try{We?(Ue||(nn.rejection===Kt&&Ae(nn),nn.rejection=qt),We===!0?un=Ke:(ln&&ln.enter(),un=We(Ke),ln&&(ln.exit(),In=!0)),un===qe.promise?rn(ve("Promise-chain cycle")):(bn=It(un))?yt(bn,un,He,rn):He(un)):rn(Ke)}catch(jn){ln&&!In&&ln.exit(),rn(jn)}},Ht=function(qe,nn){qe.notified||(qe.notified=!0,bt(function(){for(var Ke=qe.reactions,Ue;Ue=Ke.get();)Rt(Ue,qe);qe.notified=!1,nn&&!qe.rejection&&ye(qe)}))},re=function(qe,nn,Ke){var Ue,We;le?(Ue=Se.createEvent("Event"),Ue.promise=nn,Ue.reason=Ke,Ue.initEvent(qe,!1,!0),Ct.dispatchEvent(Ue)):Ue={promise:nn,reason:Ke},!Vt&&(We=Ct["on"+qe])?We(Ue):qe===Ce&&At("Unhandled promise rejection",Ke)},ye=function(qe){yt(dt,Ct,function(){var nn=qe.facade,Ke=qe.value,Ue=Pe(qe),We;if(Ue&&(We=Dt(function(){kt?we.emit("unhandledRejection",Ke,nn):re(Ce,nn,Ke)}),qe.rejection=kt||Pe(qe)?Kt:qt,We.error))throw We.value})},Pe=function(qe){return qe.rejection!==qt&&!qe.parent},Ae=function(qe){yt(dt,Ct,function(){var nn=qe.facade;kt?we.emit("rejectionHandled",nn):re(fe,nn,qe.value)})},Oe=function(qe,nn,Ke){return function(Ue){qe(nn,Ue,Ke)}},Ie=function(qe,nn,Ke){qe.done||(qe.done=!0,Ke&&(qe=Ke),qe.value=nn,qe.state=pe,Ht(qe,!0))},Qe=function(qe,nn,Ke){if(!qe.done){qe.done=!0,Ke&&(qe=Ke);try{if(qe.facade===nn)throw ve("Promise can't be resolved itself");var Ue=It(nn);Ue?bt(function(){var We={done:!1};try{yt(Ue,nn,Oe(Qe,We,qe),Oe(Ie,We,qe))}catch(He){Ie(We,He,qe)}}):(qe.value=nn,qe.state=ke,Ht(qe,!1))}catch(We){Ie({done:!1},We,qe)}}};if(Ut&&(Yt=function(nn){lt(this,ne),tt(nn),yt(wt,this);var Ke=se(this);try{nn(Oe(Qe,Ke),Oe(Ie,Ke))}catch(Ue){Ie(Ke,Ue)}},ne=Yt.prototype,wt=function(nn){he(this,{type:Jt,done:!1,notified:!1,parent:!1,reactions:new Ft,rejection:!1,state:me,value:void 0})},wt.prototype=mt(ne,{then:function(nn,Ke){var Ue=se(this),We=ce(ut(this,Yt));return Ue.parent=!0,We.ok=at(nn)?nn:!0,We.fail=at(Ke)&&Ke,We.domain=kt?we.domain:void 0,Ue.state==me?Ue.reactions.add(We):bt(function(){Rt(We,Ue)}),We.promise}}),Lt=function(){var qe=new wt,nn=se(qe);this.promise=qe,this.resolve=Oe(Qe,nn),this.reject=Oe(Ie,nn)},Wt.f=ce=function(qe){return qe===Yt||qe===Zt?new Lt(qe):de(qe)},!gt&&at(Nt)&&be!==Object.prototype)){ee=be.then,oe||Tt(be,"then",function(nn,Ke){var Ue=this;return new Yt(function(We,He){yt(ee,Ue,We,He)}).then(nn,Ke)},{unsafe:!0});try{delete be.constructor}catch(qe){}xt&&xt(be,ne)}vt({global:!0,wrap:!0,forced:Ut},{Promise:Yt}),ft(Yt,Jt,!1,!0),z(Jt)},{"../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(ot,zt,Bt){ot("../modules/es.promise.constructor"),ot("../modules/es.promise.all"),ot("../modules/es.promise.catch"),ot("../modules/es.promise.race"),ot("../modules/es.promise.reject"),ot("../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),Ct=ot("../internals/new-promise-capability"),yt=ot("../internals/perform"),Tt=ot("../internals/iterate"),mt=ot("../internals/promise-statics-incorrect-iteration");vt({target:"Promise",stat:!0,forced:mt},{race:function(ft){var z=this,tt=Ct.f(z),at=tt.reject,it=yt(function(){var lt=kt(z.resolve);Tt(ft,function(ut){gt(lt,z,ut).then(tt.resolve,at)})});return it.error&&at(it.value),tt.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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/new-promise-capability"),Ct=ot("../internals/promise-constructor-detection").CONSTRUCTOR;vt({target:"Promise",stat:!0,forced:Ct},{reject:function(Tt){var mt=kt.f(this);return gt(mt.reject,void 0,Tt),mt.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-pure"),Ct=ot("../internals/promise-native-constructor"),yt=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Tt=ot("../internals/promise-resolve"),mt=gt("Promise"),xt=kt&&!yt;vt({target:"Promise",stat:!0,forced:kt||yt},{resolve:function(z){return Tt(xt&&this===mt?Ct: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(ot,zt,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/is-forced"),yt=ot("../internals/inherit-if-required"),Tt=ot("../internals/create-non-enumerable-property"),mt=ot("../internals/object-get-own-property-names").f,xt=ot("../internals/object-is-prototype-of"),ft=ot("../internals/is-regexp"),z=ot("../internals/to-string"),tt=ot("../internals/regexp-get-flags"),at=ot("../internals/regexp-sticky-helpers"),it=ot("../internals/proxy-accessor"),lt=ot("../internals/redefine"),ut=ot("../internals/fails"),dt=ot("../internals/has-own-property"),bt=ot("../internals/internal-state").enforce,At=ot("../internals/set-species"),Dt=ot("../internals/well-known-symbol"),Ft=ot("../internals/regexp-unsupported-dot-all"),jt=ot("../internals/regexp-unsupported-ncg"),Nt=Dt("match"),_t=gt.RegExp,Wt=_t.prototype,Jt=gt.SyntaxError,Ut=kt(Wt.exec),Vt=kt("".charAt),oe=kt("".replace),se=kt("".indexOf),he=kt("".slice),be=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Yt=/a/g,ne=/a/g,ve=new _t(Yt)!==Yt,Se=at.MISSED_STICKY,we=at.UNSUPPORTED_Y,ce=vt&&(!ve||Se||Ft||jt||ut(function(){return ne[Nt]=!1,_t(Yt)!=Yt||_t(ne)==ne||_t(Yt,"i")!="/a/i"})),de=function(ke){for(var pe=ke.length,qt=0,Kt="",wt=!1,Lt;qt<=pe;qt++){if(Lt=Vt(ke,qt),Lt==="\\"){Kt+=Lt+Vt(ke,++qt);continue}!wt&&Lt==="."?Kt+="[\\s\\S]":(Lt==="["?wt=!0:Lt==="]"&&(wt=!1),Kt+=Lt)}return Kt},le=function(ke){for(var pe=ke.length,qt=0,Kt="",wt=[],Lt={},Zt=!1,ee=!1,It=0,Rt="",Ht;qt<=pe;qt++){if(Ht=Vt(ke,qt),Ht==="\\")Ht=Ht+Vt(ke,++qt);else if(Ht==="]")Zt=!1;else if(!Zt)switch(!0){case Ht==="[":Zt=!0;break;case Ht==="(":Ut(be,he(ke,qt+1))&&(qt+=2,ee=!0),Kt+=Ht,It++;continue;case(Ht===">"&&ee):if(Rt===""||dt(Lt,Rt))throw new Jt("Invalid capture group name");Lt[Rt]=!0,wt[wt.length]=[Rt,It],ee=!1,Rt="";continue}ee?Rt+=Ht:Kt+=Ht}return[Kt,wt]};if(Ct("RegExp",ce)){for(var Ce=function(pe,qt){var Kt=xt(Wt,this),wt=ft(pe),Lt=qt===void 0,Zt=[],ee=pe,It,Rt,Ht,re,ye,Pe;if(!Kt&&wt&&Lt&&pe.constructor===Ce)return pe;if((wt||xt(Wt,pe))&&(pe=pe.source,Lt&&(qt=tt(ee))),pe=pe===void 0?"":z(pe),qt=qt===void 0?"":z(qt),ee=pe,Ft&&"dotAll"in Yt&&(Rt=!!qt&&se(qt,"s")>-1,Rt&&(qt=oe(qt,/s/g,""))),It=qt,Se&&"sticky"in Yt&&(Ht=!!qt&&se(qt,"y")>-1,Ht&&we&&(qt=oe(qt,/y/g,""))),jt&&(re=le(pe),pe=re[0],Zt=re[1]),ye=yt(_t(pe,qt),Kt?this:Wt,Ce),(Rt||Ht||Zt.length)&&(Pe=bt(ye),Rt&&(Pe.dotAll=!0,Pe.raw=Ce(de(pe),It)),Ht&&(Pe.sticky=!0),Zt.length&&(Pe.groups=Zt)),pe!==ee)try{Tt(ye,"source",ee===""?"(?:)":ee)}catch(Ae){}return ye},fe=mt(_t),me=0;fe.length>me;)it(Ce,_t,fe[me++]);Wt.constructor=Ce,Ce.prototype=Wt,lt(gt,"RegExp",Ce)}At("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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/regexp-exec");vt({target:"RegExp",proto:!0,forced:/./.exec!==gt},{exec:gt})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/redefine"),kt=ot("../internals/an-object"),Ct=ot("../internals/to-string"),yt=ot("../internals/fails"),Tt=ot("../internals/regexp-get-flags"),mt="toString",xt=RegExp.prototype,ft=xt[mt],z=yt(function(){return ft.call({source:"a",flags:"b"})!="/a/b"}),tt=vt&&ft.name!=mt;(z||tt)&&gt(RegExp.prototype,mt,function(){var it=kt(this),lt=Ct(it.source),ut=Ct(Tt(it));return"/"+lt+"/"+ut},{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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/not-a-regexp"),Ct=ot("../internals/require-object-coercible"),yt=ot("../internals/to-string"),Tt=ot("../internals/correct-is-regexp-logic"),mt=gt("".indexOf);vt({target:"String",proto:!0,forced:!Tt("includes")},{includes:function(ft){return!!~mt(yt(Ct(this)),yt(kt(ft)),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(ot,zt,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt,gt=ot("../internals/to-string"),kt=ot("../internals/internal-state"),Ct=ot("../internals/define-iterator"),yt="String Iterator",Tt=kt.set,mt=kt.getterFor(yt);Ct(String,"String",function(xt){Tt(this,{type:yt,string:gt(xt),index:0})},function(){var ft=mt(this),z=ft.string,tt=ft.index,at;return tt>=z.length?{value:void 0,done:!0}:(at=vt(z,tt),ft.index+=at.length,{value:at,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),Ct=ot("../internals/to-length"),yt=ot("../internals/to-string"),Tt=ot("../internals/require-object-coercible"),mt=ot("../internals/get-method"),xt=ot("../internals/advance-string-index"),ft=ot("../internals/regexp-exec-abstract");gt("match",function(z,tt,at){return[function(lt){var ut=Tt(this),dt=lt==null?void 0:mt(lt,z);return dt?vt(dt,lt,ut):new RegExp(lt)[z](yt(ut))},function(it){var lt=kt(this),ut=yt(it),dt=at(tt,lt,ut);if(dt.done)return dt.value;if(!lt.global)return ft(lt,ut);var bt=lt.unicode;lt.lastIndex=0;for(var At=[],Dt=0,Ft;(Ft=ft(lt,ut))!==null;){var jt=yt(Ft[0]);At[Dt]=jt,jt===""&&(lt.lastIndex=xt(ut,Ct(lt.lastIndex),bt)),Dt++}return Dt===0?null:At}]})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/fix-regexp-well-known-symbol-logic"),yt=ot("../internals/fails"),Tt=ot("../internals/an-object"),mt=ot("../internals/is-callable"),xt=ot("../internals/to-integer-or-infinity"),ft=ot("../internals/to-length"),z=ot("../internals/to-string"),tt=ot("../internals/require-object-coercible"),at=ot("../internals/advance-string-index"),it=ot("../internals/get-method"),lt=ot("../internals/get-substitution"),ut=ot("../internals/regexp-exec-abstract"),dt=ot("../internals/well-known-symbol"),bt=dt("replace"),At=Math.max,Dt=Math.min,Ft=kt([].concat),jt=kt([].push),Nt=kt("".indexOf),_t=kt("".slice),Wt=function(oe){return oe===void 0?oe:String(oe)},Jt=function(){return"a".replace(/./,"$0")==="$0"}(),Ut=function(){return/./[bt]?/./[bt]("a","$0")==="":!1}(),Vt=!yt(function(){var oe=/./;return oe.exec=function(){var se=[];return se.groups={a:"7"},se},"".replace(oe,"$<a>")!=="7"});Ct("replace",function(oe,se,he){var be=Ut?"$":"$0";return[function(ne,ve){var Se=tt(this),we=ne==null?void 0:it(ne,bt);return we?gt(we,ne,Se,ve):gt(se,z(Se),ne,ve)},function(Yt,ne){var ve=Tt(this),Se=z(Yt);if(typeof ne=="string"&&Nt(ne,be)===-1&&Nt(ne,"$<")===-1){var we=he(se,ve,Se,ne);if(we.done)return we.value}var ce=mt(ne);ce||(ne=z(ne));var de=ve.global;if(de){var le=ve.unicode;ve.lastIndex=0}for(var Ce=[];;){var fe=ut(ve,Se);if(fe===null||(jt(Ce,fe),!de))break;var me=z(fe[0]);me===""&&(ve.lastIndex=at(Se,ft(ve.lastIndex),le))}for(var ke="",pe=0,qt=0;qt<Ce.length;qt++){fe=Ce[qt];for(var Kt=z(fe[0]),wt=At(Dt(xt(fe.index),Se.length),0),Lt=[],Zt=1;Zt<fe.length;Zt++)jt(Lt,Wt(fe[Zt]));var ee=fe.groups;if(ce){var It=Ft([Kt],Lt,wt,Se);ee!==void 0&&jt(It,ee);var Rt=z(vt(ne,void 0,It))}else Rt=lt(Kt,Se,wt,Lt,ee,ne);wt>=pe&&(ke+=_t(Se,pe,wt)+Rt,pe=wt+Kt.length)}return ke+_t(Se,pe)}]},!Vt||!Jt||Ut)},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),Ct=ot("../internals/require-object-coercible"),yt=ot("../internals/same-value"),Tt=ot("../internals/to-string"),mt=ot("../internals/get-method"),xt=ot("../internals/regexp-exec-abstract");gt("search",function(ft,z,tt){return[function(it){var lt=Ct(this),ut=it==null?void 0:mt(it,ft);return ut?vt(ut,it,lt):new RegExp(it)[ft](Tt(lt))},function(at){var it=kt(this),lt=Tt(at),ut=tt(z,it,lt);if(ut.done)return ut.value;var dt=it.lastIndex;yt(dt,0)||(it.lastIndex=0);var bt=xt(it,lt);return yt(it.lastIndex,dt)||(it.lastIndex=dt),bt===null?-1:bt.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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/fix-regexp-well-known-symbol-logic"),yt=ot("../internals/is-regexp"),Tt=ot("../internals/an-object"),mt=ot("../internals/require-object-coercible"),xt=ot("../internals/species-constructor"),ft=ot("../internals/advance-string-index"),z=ot("../internals/to-length"),tt=ot("../internals/to-string"),at=ot("../internals/get-method"),it=ot("../internals/array-slice-simple"),lt=ot("../internals/regexp-exec-abstract"),ut=ot("../internals/regexp-exec"),dt=ot("../internals/regexp-sticky-helpers"),bt=ot("../internals/fails"),At=dt.UNSUPPORTED_Y,Dt=4294967295,Ft=Math.min,jt=[].push,Nt=kt(/./.exec),_t=kt(jt),Wt=kt("".slice),Jt=!bt(function(){var Ut=/(?:)/,Vt=Ut.exec;Ut.exec=function(){return Vt.apply(this,arguments)};var oe="ab".split(Ut);return oe.length!==2||oe[0]!=="a"||oe[1]!=="b"});Ct("split",function(Ut,Vt,oe){var se;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?se=function(he,be){var Yt=tt(mt(this)),ne=be===void 0?Dt:be>>>0;if(ne===0)return[];if(he===void 0)return[Yt];if(!yt(he))return gt(Vt,Yt,he,ne);for(var ve=[],Se=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(he.sticky?"y":""),we=0,ce=new RegExp(he.source,Se+"g"),de,le,Ce;(de=gt(ut,ce,Yt))&&(le=ce.lastIndex,!(le>we&&(_t(ve,Wt(Yt,we,de.index)),de.length>1&&de.index<Yt.length&&vt(jt,ve,it(de,1)),Ce=de[0].length,we=le,ve.length>=ne)));)ce.lastIndex===de.index&&ce.lastIndex++;return we===Yt.length?(Ce||!Nt(ce,""))&&_t(ve,""):_t(ve,Wt(Yt,we)),ve.length>ne?it(ve,0,ne):ve}:"0".split(void 0,0).length?se=function(he,be){return he===void 0&&be===0?[]:gt(Vt,this,he,be)}:se=Vt,[function(be,Yt){var ne=mt(this),ve=be==null?void 0:at(be,Ut);return ve?gt(ve,be,ne,Yt):gt(se,tt(ne),be,Yt)},function(he,be){var Yt=Tt(this),ne=tt(he),ve=oe(se,Yt,ne,be,se!==Vt);if(ve.done)return ve.value;var Se=xt(Yt,RegExp),we=Yt.unicode,ce=(Yt.ignoreCase?"i":"")+(Yt.multiline?"m":"")+(Yt.unicode?"u":"")+(At?"g":"y"),de=new Se(At?"^(?:"+Yt.source+")":Yt,ce),le=be===void 0?Dt:be>>>0;if(le===0)return[];if(ne.length===0)return lt(de,ne)===null?[ne]:[];for(var Ce=0,fe=0,me=[];fe<ne.length;){de.lastIndex=At?0:fe;var ke=lt(de,At?Wt(ne,fe):ne),pe;if(ke===null||(pe=Ft(z(de.lastIndex+(At?fe:0)),ne.length))===Ce)fe=ft(ne,fe,we);else{if(_t(me,Wt(ne,Ce,fe)),me.length===le)return me;for(var qt=1;qt<=ke.length-1;qt++)if(_t(me,ke[qt]),me.length===le)return me;fe=Ce=pe}}return _t(me,Wt(ne,Ce)),me}]},!Jt,At)},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/string-trim").trim,kt=ot("../internals/string-trim-forced");vt({target:"String",proto:!0,forced:kt("trim")},{trim:function(){return gt(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),Ct=ot("../internals/function-uncurry-this"),yt=ot("../internals/is-pure"),Tt=ot("../internals/descriptors"),mt=ot("../internals/native-symbol"),xt=ot("../internals/fails"),ft=ot("../internals/has-own-property"),z=ot("../internals/object-is-prototype-of"),tt=ot("../internals/an-object"),at=ot("../internals/to-indexed-object"),it=ot("../internals/to-property-key"),lt=ot("../internals/to-string"),ut=ot("../internals/create-property-descriptor"),dt=ot("../internals/object-create"),bt=ot("../internals/object-keys"),At=ot("../internals/object-get-own-property-names"),Dt=ot("../internals/object-get-own-property-names-external"),Ft=ot("../internals/object-get-own-property-symbols"),jt=ot("../internals/object-get-own-property-descriptor"),Nt=ot("../internals/object-define-property"),_t=ot("../internals/object-define-properties"),Wt=ot("../internals/object-property-is-enumerable"),Jt=ot("../internals/redefine"),Ut=ot("../internals/shared"),Vt=ot("../internals/shared-key"),oe=ot("../internals/hidden-keys"),se=ot("../internals/uid"),he=ot("../internals/well-known-symbol"),be=ot("../internals/well-known-symbol-wrapped"),Yt=ot("../internals/define-well-known-symbol"),ne=ot("../internals/symbol-define-to-primitive"),ve=ot("../internals/set-to-string-tag"),Se=ot("../internals/internal-state"),we=ot("../internals/array-iteration").forEach,ce=Vt("hidden"),de="Symbol",le="prototype",Ce=Se.set,fe=Se.getterFor(de),me=Object[le],ke=gt.Symbol,pe=ke&&ke[le],qt=gt.TypeError,Kt=gt.QObject,wt=jt.f,Lt=Nt.f,Zt=Dt.f,ee=Wt.f,It=Ct([].push),Rt=Ut("symbols"),Ht=Ut("op-symbols"),re=Ut("wks"),ye=!Kt||!Kt[le]||!Kt[le].findChild,Pe=Tt&&xt(function(){return dt(Lt({},"a",{get:function(){return Lt(this,"a",{value:7}).a}})).a!=7})?function(We,He,rn){var ln=wt(me,He);ln&&delete me[He],Lt(We,He,rn),ln&&We!==me&&Lt(me,He,ln)}:Lt,Ae=function(We,He){var rn=Rt[We]=dt(pe);return Ce(rn,{type:de,tag:We,description:He}),Tt||(rn.description=He),rn},Oe=function(He,rn,ln){He===me&&Oe(Ht,rn,ln),tt(He);var un=it(rn);return tt(ln),ft(Rt,un)?(ln.enumerable?(ft(He,ce)&&He[ce][un]&&(He[ce][un]=!1),ln=dt(ln,{enumerable:ut(0,!1)})):(ft(He,ce)||Lt(He,ce,ut(1,{})),He[ce][un]=!0),Pe(He,un,ln)):Lt(He,un,ln)},Ie=function(He,rn){tt(He);var ln=at(rn),un=bt(ln).concat(Ue(ln));return we(un,function(bn){(!Tt||kt(qe,ln,bn))&&Oe(He,bn,ln[bn])}),He},Qe=function(He,rn){return rn===void 0?dt(He):Ie(dt(He),rn)},qe=function(He){var rn=it(He),ln=kt(ee,this,rn);return this===me&&ft(Rt,rn)&&!ft(Ht,rn)?!1:ln||!ft(this,rn)||!ft(Rt,rn)||ft(this,ce)&&this[ce][rn]?ln:!0},nn=function(He,rn){var ln=at(He),un=it(rn);if(!(ln===me&&ft(Rt,un)&&!ft(Ht,un))){var bn=wt(ln,un);return bn&&ft(Rt,un)&&!(ft(ln,ce)&&ln[ce][un])&&(bn.enumerable=!0),bn}},Ke=function(He){var rn=Zt(at(He)),ln=[];return we(rn,function(un){!ft(Rt,un)&&!ft(oe,un)&&It(ln,un)}),ln},Ue=function(We){var He=We===me,rn=Zt(He?Ht:at(We)),ln=[];return we(rn,function(un){ft(Rt,un)&&(!He||ft(me,un))&&It(ln,Rt[un])}),ln};mt||(ke=function(){if(z(pe,this))throw qt("Symbol is not a constructor");var He=!arguments.length||arguments[0]===void 0?void 0:lt(arguments[0]),rn=se(He),ln=function(un){this===me&&kt(ln,Ht,un),ft(this,ce)&&ft(this[ce],rn)&&(this[ce][rn]=!1),Pe(this,rn,ut(1,un))};return Tt&&ye&&Pe(me,rn,{configurable:!0,set:ln}),Ae(rn,He)},pe=ke[le],Jt(pe,"toString",function(){return fe(this).tag}),Jt(ke,"withoutSetter",function(We){return Ae(se(We),We)}),Wt.f=qe,Nt.f=Oe,_t.f=Ie,jt.f=nn,At.f=Dt.f=Ke,Ft.f=Ue,be.f=function(We){return Ae(he(We),We)},Tt&&(Lt(pe,"description",{configurable:!0,get:function(){return fe(this).description}}),yt||Jt(me,"propertyIsEnumerable",qe,{unsafe:!0}))),vt({global:!0,wrap:!0,forced:!mt,sham:!mt},{Symbol:ke}),we(bt(re),function(We){Yt(We)}),vt({target:de,stat:!0,forced:!mt},{useSetter:function(){ye=!0},useSimple:function(){ye=!1}}),vt({target:"Object",stat:!0,forced:!mt,sham:!Tt},{create:Qe,defineProperty:Oe,defineProperties:Ie,getOwnPropertyDescriptor:nn}),vt({target:"Object",stat:!0,forced:!mt},{getOwnPropertyNames:Ke}),ne(),ve(ke,de),oe[ce]=!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(ot,zt,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),Ct=ot("../internals/function-uncurry-this"),yt=ot("../internals/has-own-property"),Tt=ot("../internals/is-callable"),mt=ot("../internals/object-is-prototype-of"),xt=ot("../internals/to-string"),ft=ot("../internals/object-define-property").f,z=ot("../internals/copy-constructor-properties"),tt=kt.Symbol,at=tt&&tt.prototype;if(gt&&Tt(tt)&&(!("description"in at)||tt().description!==void 0)){var it={},lt=function(){var Nt=arguments.length<1||arguments[0]===void 0?void 0:xt(arguments[0]),_t=mt(at,this)?new tt(Nt):Nt===void 0?tt():tt(Nt);return Nt===""&&(it[_t]=!0),_t};z(lt,tt),lt.prototype=at,at.constructor=lt;var ut=String(tt("test"))=="Symbol(test)",dt=Ct(at.toString),bt=Ct(at.valueOf),At=/^Symbol\((.*)\)[^)]+$/,Dt=Ct("".replace),Ft=Ct("".slice);ft(at,"description",{configurable:!0,get:function(){var Nt=bt(this),_t=dt(Nt);if(yt(it,Nt))return"";var Wt=ut?Ft(_t,7,-1):Dt(_t,At,"$1");return Wt===""?void 0:Wt}}),vt({global:!0,forced:!0},{Symbol:lt})}},{"../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(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/has-own-property"),Ct=ot("../internals/to-string"),yt=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=yt("string-to-symbol-registry"),xt=yt("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{for:function(ft){var z=Ct(ft);if(kt(mt,z))return mt[z];var tt=gt("Symbol")(z);return mt[z]=tt,xt[tt]=z,tt}})},{"../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(ot,zt,Bt){var vt=ot("../internals/define-well-known-symbol");vt("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ot,zt,Bt){ot("../modules/es.symbol.constructor"),ot("../modules/es.symbol.for"),ot("../modules/es.symbol.key-for"),ot("../modules/es.json.stringify"),ot("../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(ot,zt,Bt){var vt=ot("../internals/export"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-symbol"),Ct=ot("../internals/try-to-string"),yt=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=yt("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{keyFor:function(ft){if(!kt(ft))throw TypeError(Ct(ft)+" is not a symbol");if(gt(mt,ft))return mt[ft]}})},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/array-buffer-view-core"),kt=ot("../internals/array-copy-within"),Ct=vt(kt),yt=gt.aTypedArray,Tt=gt.exportTypedArrayMethod;Tt("copyWithin",function(xt,ft){return Ct(yt(this),xt,ft,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(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").every,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("every",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-call"),kt=ot("../internals/array-fill"),Ct=vt.aTypedArray,yt=vt.exportTypedArrayMethod;yt("fill",function(mt){var xt=arguments.length;return gt(kt,Ct(this),mt,xt>1?arguments[1]:void 0,xt>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").filter,kt=ot("../internals/typed-array-from-species-and-list"),Ct=vt.aTypedArray,yt=vt.exportTypedArrayMethod;yt("filter",function(mt){var xt=gt(Ct(this),mt,arguments.length>1?arguments[1]:void 0);return kt(this,xt)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").findIndex,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("findIndex",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").find,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("find",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").forEach,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("forEach",function(Tt){gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").includes,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("includes",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").indexOf,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("indexOf",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/function-uncurry-this"),Ct=ot("../internals/array-buffer-view-core"),yt=ot("../modules/es.array.iterator"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=vt.Uint8Array,ft=kt(yt.values),z=kt(yt.keys),tt=kt(yt.entries),at=Ct.aTypedArray,it=Ct.exportTypedArrayMethod,lt=xt&&xt.prototype,ut=!gt(function(){lt[mt].call([1])}),dt=!!lt&&lt.values&&lt[mt]===lt.values&&lt.values.name==="values",bt=function(){return ft(at(this))};it("entries",function(){return tt(at(this))},ut),it("keys",function(){return z(at(this))},ut),it("values",bt,ut||!dt,{name:"values"}),it(mt,bt,ut||!dt,{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(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-uncurry-this"),kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod,yt=gt([].join);Ct("join",function(mt){return yt(kt(this),mt)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-last-index-of"),Ct=vt.aTypedArray,yt=vt.exportTypedArrayMethod;yt("lastIndexOf",function(mt){var xt=arguments.length;return gt(kt,Ct(this),xt>1?[mt,arguments[1]]:[mt])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/typed-array-species-constructor"),Ct=vt.aTypedArray,yt=vt.exportTypedArrayMethod;yt("map",function(mt){return gt(Ct(this),mt,arguments.length>1?arguments[1]:void 0,function(xt,ft){return new(kt(xt))(ft)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").right,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("reduceRight",function(Tt){var mt=arguments.length;return gt(kt(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").left,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("reduce",function(Tt){var mt=arguments.length;return gt(kt(this),Tt,mt,mt>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=vt.aTypedArray,kt=vt.exportTypedArrayMethod,Ct=Math.floor;kt("reverse",function(){for(var Tt=this,mt=gt(Tt).length,xt=Ct(mt/2),ft=0,z;ft<xt;)z=Tt[ft],Tt[ft++]=Tt[--mt],Tt[mt]=z;return Tt})},{"../internals/array-buffer-view-core":103}],331:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/array-buffer-view-core"),Ct=ot("../internals/length-of-array-like"),yt=ot("../internals/to-offset"),Tt=ot("../internals/to-object"),mt=ot("../internals/fails"),xt=vt.RangeError,ft=vt.Int8Array,z=ft&&ft.prototype,tt=z&&z.set,at=kt.aTypedArray,it=kt.exportTypedArrayMethod,lt=!mt(function(){var dt=new Uint8ClampedArray(2);return gt(tt,dt,{length:1,0:3},1),dt[1]!==3}),ut=lt&&kt.NATIVE_ARRAY_BUFFER_VIEWS&&mt(function(){var dt=new ft(2);return dt.set(1),dt.set("2",1),dt[0]!==0||dt[1]!==2});it("set",function(bt){at(this);var At=yt(arguments.length>1?arguments[1]:void 0,1),Dt=Tt(bt);if(lt)return gt(tt,this,Dt,At);var Ft=this.length,jt=Ct(Dt),Nt=0;if(jt+At>Ft)throw xt("Wrong length");for(;Nt<jt;)this[At+Nt]=Dt[Nt++]},!lt||ut)},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/typed-array-species-constructor"),kt=ot("../internals/fails"),Ct=ot("../internals/array-slice"),yt=vt.aTypedArray,Tt=vt.exportTypedArrayMethod,mt=kt(function(){new Int8Array(1).slice()});Tt("slice",function(ft,z){for(var tt=Ct(yt(this),ft,z),at=gt(this),it=0,lt=tt.length,ut=new at(lt);lt>it;)ut[it]=tt[it++];return ut},mt)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").some,kt=vt.aTypedArray,Ct=vt.exportTypedArrayMethod;Ct("some",function(Tt){return gt(kt(this),Tt,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),Ct=ot("../internals/a-callable"),yt=ot("../internals/array-sort"),Tt=ot("../internals/array-buffer-view-core"),mt=ot("../internals/engine-ff-version"),xt=ot("../internals/engine-is-ie-or-edge"),ft=ot("../internals/engine-v8-version"),z=ot("../internals/engine-webkit-version"),tt=Tt.aTypedArray,at=Tt.exportTypedArrayMethod,it=vt.Uint16Array,lt=it&&gt(it.prototype.sort),ut=!!lt&&!(kt(function(){lt(new it(2),null)})&&kt(function(){lt(new it(2),{})})),dt=!!lt&&!kt(function(){if(ft)return ft<74;if(mt)return mt<67;if(xt)return!0;if(z)return z<602;var At=new it(516),Dt=Array(516),Ft,jt;for(Ft=0;Ft<516;Ft++)jt=Ft%4,At[Ft]=515-Ft,Dt[Ft]=Ft-2*jt+3;for(lt(At,function(Nt,_t){return(Nt/4|0)-(_t/4|0)}),Ft=0;Ft<516;Ft++)if(At[Ft]!==Dt[Ft])return!0}),bt=function(At){return function(Dt,Ft){return At!==void 0?+At(Dt,Ft)||0:Ft!==Ft?-1:Dt!==Dt?1:Dt===0&&Ft===0?1/Dt>0&&1/Ft<0?1:-1:Dt>Ft}};at("sort",function(Dt){return Dt!==void 0&&Ct(Dt),dt?lt(this,Dt):yt(tt(this),bt(Dt))},!dt||ut)},{"../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(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/to-length"),kt=ot("../internals/to-absolute-index"),Ct=ot("../internals/typed-array-species-constructor"),yt=vt.aTypedArray,Tt=vt.exportTypedArrayMethod;Tt("subarray",function(xt,ft){var z=yt(this),tt=z.length,at=kt(xt,tt),it=Ct(z);return new it(z.buffer,z.byteOffset+at*z.BYTES_PER_ELEMENT,gt((ft===void 0?tt:kt(ft,tt))-at))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-buffer-view-core"),Ct=ot("../internals/fails"),yt=ot("../internals/array-slice"),Tt=vt.Int8Array,mt=kt.aTypedArray,xt=kt.exportTypedArrayMethod,ft=[].toLocaleString,z=!!Tt&&Ct(function(){ft.call(new Tt(1))}),tt=Ct(function(){return[1,2].toLocaleString()!=new Tt([1,2]).toLocaleString()})||!Ct(function(){Tt.prototype.toLocaleString.call([1,2])});xt("toLocaleString",function(){return gt(ft,z?yt(mt(this)):mt(this),yt(arguments))},tt)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(ot,zt,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core").exportTypedArrayMethod,gt=ot("../internals/fails"),kt=ot("../internals/global"),Ct=ot("../internals/function-uncurry-this"),yt=kt.Uint8Array,Tt=yt&&yt.prototype||{},mt=[].toString,xt=Ct([].join);gt(function(){mt.call({})})&&(mt=function(){return xt(this)});var ft=Tt.toString!=mt;vt("toString",mt,ft)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(ot,zt,Bt){var vt=ot("../internals/typed-array-constructor");vt("Uint8",function(gt){return function(Ct,yt,Tt){return gt(this,Ct,yt,Tt)}})},{"../internals/typed-array-constructor":258}],339:[function(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),Ct=ot("../internals/array-for-each"),yt=ot("../internals/create-non-enumerable-property"),Tt=function(xt){if(xt&&xt.forEach!==Ct)try{yt(xt,"forEach",Ct)}catch(ft){xt.forEach=Ct}};for(var mt in gt)gt[mt]&&Tt(vt[mt]&&vt[mt].prototype);Tt(kt)},{"../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(ot,zt,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),Ct=ot("../modules/es.array.iterator"),yt=ot("../internals/create-non-enumerable-property"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=Tt("toStringTag"),ft=Ct.values,z=function(at,it){if(at){if(at[mt]!==ft)try{yt(at,mt,ft)}catch(ut){at[mt]=ft}if(at[xt]||yt(at,xt,it),gt[it]){for(var lt in Ct)if(at[lt]!==Ct[lt])try{yt(at,lt,Ct[lt])}catch(ut){at[lt]=Ct[lt]}}}};for(var tt in gt)z(vt[tt]&&vt[tt].prototype,tt);z(kt,"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(ot,zt,Bt){function vt(dt){return Array.isArray?Array.isArray(dt):ut(dt)==="[object Array]"}Bt.isArray=vt;function gt(dt){return typeof dt=="boolean"}Bt.isBoolean=gt;function kt(dt){return dt===null}Bt.isNull=kt;function Ct(dt){return dt==null}Bt.isNullOrUndefined=Ct;function yt(dt){return typeof dt=="number"}Bt.isNumber=yt;function Tt(dt){return typeof dt=="string"}Bt.isString=Tt;function mt(dt){return typeof dt=="symbol"}Bt.isSymbol=mt;function xt(dt){return dt===void 0}Bt.isUndefined=xt;function ft(dt){return ut(dt)==="[object RegExp]"}Bt.isRegExp=ft;function z(dt){return typeof dt=="object"&&dt!==null}Bt.isObject=z;function tt(dt){return ut(dt)==="[object Date]"}Bt.isDate=tt;function at(dt){return ut(dt)==="[object Error]"||dt instanceof Error}Bt.isError=at;function it(dt){return typeof dt=="function"}Bt.isFunction=it;function lt(dt){return dt===null||typeof dt=="boolean"||typeof dt=="number"||typeof dt=="string"||typeof dt=="symbol"||typeof dt=="undefined"}Bt.isPrimitive=lt,Bt.isBuffer=ot("buffer").Buffer.isBuffer;function ut(dt){return Object.prototype.toString.call(dt)}},{buffer:90}],342:[function(ot,zt,Bt){(function(vt){"use strict";var gt=function(){var mt=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,xt=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ft=/[^-+\dA-Z]/g;return function(z,tt,at,it){if(arguments.length===1&&Tt(z)==="string"&&!/\d/.test(z)&&(tt=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");tt=String(gt.masks[tt]||tt||gt.masks.default);var lt=tt.slice(0,4);(lt==="UTC:"||lt==="GMT:")&&(tt=tt.slice(4),at=!0,lt==="GMT:"&&(it=!0));var ut=at?"getUTC":"get",dt=z[ut+"Date"](),bt=z[ut+"Day"](),At=z[ut+"Month"](),Dt=z[ut+"FullYear"](),Ft=z[ut+"Hours"](),jt=z[ut+"Minutes"](),Nt=z[ut+"Seconds"](),_t=z[ut+"Milliseconds"](),Wt=at?0:z.getTimezoneOffset(),Jt=Ct(z),Ut=yt(z),Vt={d:dt,dd:kt(dt),ddd:gt.i18n.dayNames[bt],dddd:gt.i18n.dayNames[bt+7],m:At+1,mm:kt(At+1),mmm:gt.i18n.monthNames[At],mmmm:gt.i18n.monthNames[At+12],yy:String(Dt).slice(2),yyyy:Dt,h:Ft%12||12,hh:kt(Ft%12||12),H:Ft,HH:kt(Ft),M:jt,MM:kt(jt),s:Nt,ss:kt(Nt),l:kt(_t,3),L:kt(Math.round(_t/10)),t:Ft<12?"a":"p",tt:Ft<12?"am":"pm",T:Ft<12?"A":"P",TT:Ft<12?"AM":"PM",Z:it?"GMT":at?"UTC":(String(z).match(xt)||[""]).pop().replace(ft,""),o:(Wt>0?"-":"+")+kt(Math.floor(Math.abs(Wt)/60)*100+Math.abs(Wt)%60,4),S:["th","st","nd","rd"][dt%10>3?0:(dt%100-dt%10!=10)*dt%10],W:Jt,N:Ut};return tt.replace(mt,function(oe){return oe in Vt?Vt[oe]:oe.slice(1,oe.length-1)})}}();gt.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"},gt.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 kt(mt,xt){for(mt=String(mt),xt=xt||2;mt.length<xt;)mt="0"+mt;return mt}function Ct(mt){var xt=new Date(mt.getFullYear(),mt.getMonth(),mt.getDate());xt.setDate(xt.getDate()-(xt.getDay()+6)%7+3);var ft=new Date(xt.getFullYear(),0,4);ft.setDate(ft.getDate()-(ft.getDay()+6)%7+3);var z=xt.getTimezoneOffset()-ft.getTimezoneOffset();xt.setHours(xt.getHours()-z);var tt=(xt-ft)/(864e5*7);return 1+Math.floor(tt)}function yt(mt){var xt=mt.getDay();return xt===0&&(xt=7),xt}function Tt(mt){return mt===null?"null":mt===void 0?"undefined":typeof mt!="object"?typeof mt:Array.isArray(mt)?"array":{}.toString.call(mt).slice(8,-1).toLowerCase()}typeof ue=="function"&&ue.amd?ue(function(){return gt}):typeof Bt=="object"?zt.exports=gt:vt.dateFormat=gt})(this)},{}],343:[function(ot,zt,Bt){"use strict";var vt=/["'&<>]/;zt.exports=gt;function gt(kt){var Ct=""+kt,yt=vt.exec(Ct);if(!yt)return Ct;var Tt,mt="",xt=0,ft=0;for(xt=yt.index;xt<Ct.length;xt++){switch(Ct.charCodeAt(xt)){case 34:Tt="&quot;";break;case 38:Tt="&amp;";break;case 39:Tt="&#39;";break;case 60:Tt="&lt;";break;case 62:Tt="&gt;";break;default:continue}ft!==xt&&(mt+=Ct.substring(ft,xt)),ft=xt+1,mt+=Tt}return ft!==xt?mt+Ct.substring(ft,xt):mt}},{}],344:[function(ot,zt,Bt){"use strict";var vt=typeof Reflect=="object"?Reflect:null,gt=vt&&typeof vt.apply=="function"?vt.apply:function(Nt,_t,Wt){return Function.prototype.apply.call(Nt,_t,Wt)},kt;vt&&typeof vt.ownKeys=="function"?kt=vt.ownKeys:Object.getOwnPropertySymbols?kt=function(Nt){return Object.getOwnPropertyNames(Nt).concat(Object.getOwnPropertySymbols(Nt))}:kt=function(Nt){return Object.getOwnPropertyNames(Nt)};function Ct(jt){console&&console.warn&&console.warn(jt)}var yt=Number.isNaN||function(Nt){return Nt!==Nt};function Tt(){Tt.init.call(this)}zt.exports=Tt,zt.exports.once=At,Tt.EventEmitter=Tt,Tt.prototype._events=void 0,Tt.prototype._eventsCount=0,Tt.prototype._maxListeners=void 0;var mt=10;function xt(jt){if(typeof jt!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof jt)}Object.defineProperty(Tt,"defaultMaxListeners",{enumerable:!0,get:function(){return mt},set:function(jt){if(typeof jt!="number"||jt<0||yt(jt))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+jt+".");mt=jt}}),Tt.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},Tt.prototype.setMaxListeners=function(Nt){if(typeof Nt!="number"||Nt<0||yt(Nt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Nt+".");return this._maxListeners=Nt,this};function ft(jt){return jt._maxListeners===void 0?Tt.defaultMaxListeners:jt._maxListeners}Tt.prototype.getMaxListeners=function(){return ft(this)},Tt.prototype.emit=function(Nt){for(var _t=[],Wt=1;Wt<arguments.length;Wt++)_t.push(arguments[Wt]);var Jt=Nt==="error",Ut=this._events;if(Ut!==void 0)Jt=Jt&&Ut.error===void 0;else if(!Jt)return!1;if(Jt){var Vt;if(_t.length>0&&(Vt=_t[0]),Vt instanceof Error)throw Vt;var oe=new Error("Unhandled error."+(Vt?" ("+Vt.message+")":""));throw oe.context=Vt,oe}var se=Ut[Nt];if(se===void 0)return!1;if(typeof se=="function")gt(se,this,_t);else for(var he=se.length,be=ut(se,he),Wt=0;Wt<he;++Wt)gt(be[Wt],this,_t);return!0};function z(jt,Nt,_t,Wt){var Jt,Ut,Vt;if(xt(_t),Ut=jt._events,Ut===void 0?(Ut=jt._events=Object.create(null),jt._eventsCount=0):(Ut.newListener!==void 0&&(jt.emit("newListener",Nt,_t.listener?_t.listener:_t),Ut=jt._events),Vt=Ut[Nt]),Vt===void 0)Vt=Ut[Nt]=_t,++jt._eventsCount;else if(typeof Vt=="function"?Vt=Ut[Nt]=Wt?[_t,Vt]:[Vt,_t]:Wt?Vt.unshift(_t):Vt.push(_t),Jt=ft(jt),Jt>0&&Vt.length>Jt&&!Vt.warned){Vt.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Vt.length+" "+String(Nt)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=jt,oe.type=Nt,oe.count=Vt.length,Ct(oe)}return jt}Tt.prototype.addListener=function(Nt,_t){return z(this,Nt,_t,!1)},Tt.prototype.on=Tt.prototype.addListener,Tt.prototype.prependListener=function(Nt,_t){return z(this,Nt,_t,!0)};function tt(){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 at(jt,Nt,_t){var Wt={fired:!1,wrapFn:void 0,target:jt,type:Nt,listener:_t},Jt=tt.bind(Wt);return Jt.listener=_t,Wt.wrapFn=Jt,Jt}Tt.prototype.once=function(Nt,_t){return xt(_t),this.on(Nt,at(this,Nt,_t)),this},Tt.prototype.prependOnceListener=function(Nt,_t){return xt(_t),this.prependListener(Nt,at(this,Nt,_t)),this},Tt.prototype.removeListener=function(Nt,_t){var Wt,Jt,Ut,Vt,oe;if(xt(_t),Jt=this._events,Jt===void 0)return this;if(Wt=Jt[Nt],Wt===void 0)return this;if(Wt===_t||Wt.listener===_t)--this._eventsCount===0?this._events=Object.create(null):(delete Jt[Nt],Jt.removeListener&&this.emit("removeListener",Nt,Wt.listener||_t));else if(typeof Wt!="function"){for(Ut=-1,Vt=Wt.length-1;Vt>=0;Vt--)if(Wt[Vt]===_t||Wt[Vt].listener===_t){oe=Wt[Vt].listener,Ut=Vt;break}if(Ut<0)return this;Ut===0?Wt.shift():dt(Wt,Ut),Wt.length===1&&(Jt[Nt]=Wt[0]),Jt.removeListener!==void 0&&this.emit("removeListener",Nt,oe||_t)}return this},Tt.prototype.off=Tt.prototype.removeListener,Tt.prototype.removeAllListeners=function(Nt){var _t,Wt,Jt;if(Wt=this._events,Wt===void 0)return this;if(Wt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Wt[Nt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Wt[Nt]),this;if(arguments.length===0){var Ut=Object.keys(Wt),Vt;for(Jt=0;Jt<Ut.length;++Jt)Vt=Ut[Jt],Vt!=="removeListener"&&this.removeAllListeners(Vt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_t=Wt[Nt],typeof _t=="function")this.removeListener(Nt,_t);else if(_t!==void 0)for(Jt=_t.length-1;Jt>=0;Jt--)this.removeListener(Nt,_t[Jt]);return this};function it(jt,Nt,_t){var Wt=jt._events;if(Wt===void 0)return[];var Jt=Wt[Nt];return Jt===void 0?[]:typeof Jt=="function"?_t?[Jt.listener||Jt]:[Jt]:_t?bt(Jt):ut(Jt,Jt.length)}Tt.prototype.listeners=function(Nt){return it(this,Nt,!0)},Tt.prototype.rawListeners=function(Nt){return it(this,Nt,!1)},Tt.listenerCount=function(jt,Nt){return typeof jt.listenerCount=="function"?jt.listenerCount(Nt):lt.call(jt,Nt)},Tt.prototype.listenerCount=lt;function lt(jt){var Nt=this._events;if(Nt!==void 0){var _t=Nt[jt];if(typeof _t=="function")return 1;if(_t!==void 0)return _t.length}return 0}Tt.prototype.eventNames=function(){return this._eventsCount>0?kt(this._events):[]};function ut(jt,Nt){for(var _t=new Array(Nt),Wt=0;Wt<Nt;++Wt)_t[Wt]=jt[Wt];return _t}function dt(jt,Nt){for(;Nt+1<jt.length;Nt++)jt[Nt]=jt[Nt+1];jt.pop()}function bt(jt){for(var Nt=new Array(jt.length),_t=0;_t<Nt.length;++_t)Nt[_t]=jt[_t].listener||jt[_t];return Nt}function At(jt,Nt){return new Promise(function(_t,Wt){function Jt(Vt){jt.removeListener(Nt,Ut),Wt(Vt)}function Ut(){typeof jt.removeListener=="function"&&jt.removeListener("error",Jt),_t([].slice.call(arguments))}Ft(jt,Nt,Ut,{once:!0}),Nt!=="error"&&Dt(jt,Jt,{once:!0})})}function Dt(jt,Nt,_t){typeof jt.on=="function"&&Ft(jt,"error",Nt,_t)}function Ft(jt,Nt,_t,Wt){if(typeof jt.on=="function")Wt.once?jt.once(Nt,_t):jt.on(Nt,_t);else if(typeof jt.addEventListener=="function")jt.addEventListener(Nt,function Jt(Ut){Wt.once&&jt.removeEventListener(Nt,Jt),_t(Ut)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof jt)}},{}],345:[function(ot,zt,Bt){"use strict";var vt=ot("is-callable"),gt=Object.prototype.toString,kt=Object.prototype.hasOwnProperty,Ct=function(ft,z,tt){for(var at=0,it=ft.length;at<it;at++)kt.call(ft,at)&&(tt==null?z(ft[at],at,ft):z.call(tt,ft[at],at,ft))},yt=function(ft,z,tt){for(var at=0,it=ft.length;at<it;at++)tt==null?z(ft.charAt(at),at,ft):z.call(tt,ft.charAt(at),at,ft)},Tt=function(ft,z,tt){for(var at in ft)kt.call(ft,at)&&(tt==null?z(ft[at],at,ft):z.call(tt,ft[at],at,ft))},mt=function(ft,z,tt){if(!vt(z))throw new TypeError("iterator must be a function");var at;arguments.length>=3&&(at=tt),gt.call(ft)==="[object Array]"?Ct(ft,z,at):typeof ft=="string"?yt(ft,z,at):Tt(ft,z,at)};zt.exports=mt},{"is-callable":367}],346:[function(ot,zt,Bt){"use strict";var vt="Function.prototype.bind called on incompatible ",gt=Array.prototype.slice,kt=Object.prototype.toString,Ct="[object Function]";zt.exports=function(Tt){var mt=this;if(typeof mt!="function"||kt.call(mt)!==Ct)throw new TypeError(vt+mt);for(var xt=gt.call(arguments,1),ft,z=function(){if(this instanceof ft){var ut=mt.apply(this,xt.concat(gt.call(arguments)));return Object(ut)===ut?ut:this}else return mt.apply(Tt,xt.concat(gt.call(arguments)))},tt=Math.max(0,mt.length-xt.length),at=[],it=0;it<tt;it++)at.push("$"+it);if(ft=Function("binder","return function ("+at.join(",")+"){ return binder.apply(this,arguments); }")(z),mt.prototype){var lt=function(){};lt.prototype=mt.prototype,ft.prototype=new lt,lt.prototype=null}return ft}},{}],347:[function(ot,zt,Bt){"use strict";var vt=ot("./implementation");zt.exports=Function.prototype.bind||vt},{"./implementation":346}],348:[function(ot,zt,Bt){"use strict";var vt,gt=SyntaxError,kt=Function,Ct=TypeError,yt=function(se){try{return kt('"use strict"; return ('+se+").constructor;")()}catch(he){}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch(se){Tt=null}var mt=function(){throw new Ct},xt=Tt?function(){try{return arguments.callee,mt}catch(se){try{return Tt(arguments,"callee").get}catch(he){return mt}}}():mt,ft=ot("has-symbols")(),z=ot("has-proto")(),tt=Object.getPrototypeOf||(z?function(se){return se.__proto__}:null),at={},it=typeof Uint8Array=="undefined"||!tt?vt:tt(Uint8Array),lt={"%AggregateError%":typeof AggregateError=="undefined"?vt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?vt:ArrayBuffer,"%ArrayIteratorPrototype%":ft&&tt?tt([][Symbol.iterator]()):vt,"%AsyncFromSyncIteratorPrototype%":vt,"%AsyncFunction%":at,"%AsyncGenerator%":at,"%AsyncGeneratorFunction%":at,"%AsyncIteratorPrototype%":at,"%Atomics%":typeof Atomics=="undefined"?vt:Atomics,"%BigInt%":typeof BigInt=="undefined"?vt:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?vt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?vt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?vt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?vt:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?vt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?vt:FinalizationRegistry,"%Function%":kt,"%GeneratorFunction%":at,"%Int8Array%":typeof Int8Array=="undefined"?vt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?vt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?vt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ft&&tt?tt(tt([][Symbol.iterator]())):vt,"%JSON%":typeof JSON=="object"?JSON:vt,"%Map%":typeof Map=="undefined"?vt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ft||!tt?vt:tt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?vt:Promise,"%Proxy%":typeof Proxy=="undefined"?vt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?vt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?vt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ft||!tt?vt:tt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?vt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ft&&tt?tt(""[Symbol.iterator]()):vt,"%Symbol%":ft?Symbol:vt,"%SyntaxError%":gt,"%ThrowTypeError%":xt,"%TypedArray%":it,"%TypeError%":Ct,"%Uint8Array%":typeof Uint8Array=="undefined"?vt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?vt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?vt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?vt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?vt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?vt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?vt:WeakSet};if(tt)try{null.error}catch(se){var ut=tt(tt(se));lt["%Error.prototype%"]=ut}var dt=function se(he){var be;if(he==="%AsyncFunction%")be=yt("async function () {}");else if(he==="%GeneratorFunction%")be=yt("function* () {}");else if(he==="%AsyncGeneratorFunction%")be=yt("async function* () {}");else if(he==="%AsyncGenerator%"){var Yt=se("%AsyncGeneratorFunction%");Yt&&(be=Yt.prototype)}else if(he==="%AsyncIteratorPrototype%"){var ne=se("%AsyncGenerator%");ne&&tt&&(be=tt(ne.prototype))}return lt[he]=be,be},bt={"%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"]},At=ot("function-bind"),Dt=ot("has"),Ft=At.call(Function.call,Array.prototype.concat),jt=At.call(Function.apply,Array.prototype.splice),Nt=At.call(Function.call,String.prototype.replace),_t=At.call(Function.call,String.prototype.slice),Wt=At.call(Function.call,RegExp.prototype.exec),Jt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ut=/\\(\\)?/g,Vt=function(he){var be=_t(he,0,1),Yt=_t(he,-1);if(be==="%"&&Yt!=="%")throw new gt("invalid intrinsic syntax, expected closing `%`");if(Yt==="%"&&be!=="%")throw new gt("invalid intrinsic syntax, expected opening `%`");var ne=[];return Nt(he,Jt,function(ve,Se,we,ce){ne[ne.length]=we?Nt(ce,Ut,"$1"):Se||ve}),ne},oe=function(he,be){var Yt=he,ne;if(Dt(bt,Yt)&&(ne=bt[Yt],Yt="%"+ne[0]+"%"),Dt(lt,Yt)){var ve=lt[Yt];if(ve===at&&(ve=dt(Yt)),typeof ve=="undefined"&&!be)throw new Ct("intrinsic "+he+" exists, but is not available. Please file an issue!");return{alias:ne,name:Yt,value:ve}}throw new gt("intrinsic "+he+" does not exist!")};zt.exports=function(he,be){if(typeof he!="string"||he.length===0)throw new Ct("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof be!="boolean")throw new Ct('"allowMissing" argument must be a boolean');if(Wt(/^%?[^%]*%?$/,he)===null)throw new gt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Yt=Vt(he),ne=Yt.length>0?Yt[0]:"",ve=oe("%"+ne+"%",be),Se=ve.name,we=ve.value,ce=!1,de=ve.alias;de&&(ne=de[0],jt(Yt,Ft([0,1],de)));for(var le=1,Ce=!0;le<Yt.length;le+=1){var fe=Yt[le],me=_t(fe,0,1),ke=_t(fe,-1);if((me==='"'||me==="'"||me==="`"||ke==='"'||ke==="'"||ke==="`")&&me!==ke)throw new gt("property names with quotes must have matching quotes");if((fe==="constructor"||!Ce)&&(ce=!0),ne+="."+fe,Se="%"+ne+"%",Dt(lt,Se))we=lt[Se];else if(we!=null){if(!(fe in we)){if(!be)throw new Ct("base intrinsic for "+he+" exists, but the property is not available.");return}if(Tt&&le+1>=Yt.length){var pe=Tt(we,fe);Ce=!!pe,Ce&&"get"in pe&&!("originalValue"in pe.get)?we=pe.get:we=we[fe]}else Ce=Dt(we,fe),we=we[fe];Ce&&!ce&&(lt[Se]=we)}}return we}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ot,zt,Bt){"use strict";var vt=ot("get-intrinsic"),gt=vt("%Object.getOwnPropertyDescriptor%",!0);if(gt)try{gt([],"length")}catch(kt){gt=null}zt.exports=gt},{"get-intrinsic":348}],350:[function(ot,zt,Bt){"use strict";var vt={foo:{}},gt=Object;zt.exports=function(){return{__proto__:vt}.foo===vt.foo&&!({__proto__:null}instanceof gt)}},{}],351:[function(ot,zt,Bt){"use strict";var vt=typeof Symbol!="undefined"&&Symbol,gt=ot("./shams");zt.exports=function(){return typeof vt!="function"||typeof Symbol!="function"||typeof vt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gt()}},{"./shams":352}],352:[function(ot,zt,Bt){"use strict";zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var gt={},kt=Symbol("test"),Ct=Object(kt);if(typeof kt=="string"||Object.prototype.toString.call(kt)!=="[object Symbol]"||Object.prototype.toString.call(Ct)!=="[object Symbol]")return!1;var yt=42;gt[kt]=yt;for(kt in gt)return!1;if(typeof Object.keys=="function"&&Object.keys(gt).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(gt).length!==0)return!1;var Tt=Object.getOwnPropertySymbols(gt);if(Tt.length!==1||Tt[0]!==kt||!Object.prototype.propertyIsEnumerable.call(gt,kt))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var mt=Object.getOwnPropertyDescriptor(gt,kt);if(mt.value!==yt||mt.enumerable!==!0)return!1}return!0}},{}],353:[function(ot,zt,Bt){"use strict";var vt=ot("has-symbols/shams");zt.exports=function(){return vt()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ot,zt,Bt){"use strict";var vt=ot("function-bind");zt.exports=vt.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ot,zt,Bt){var vt=ot("http"),gt=ot("url"),kt=zt.exports;for(var Ct in vt)vt.hasOwnProperty(Ct)&&(kt[Ct]=vt[Ct]);kt.request=function(Tt,mt){return Tt=yt(Tt),vt.request.call(this,Tt,mt)},kt.get=function(Tt,mt){return Tt=yt(Tt),vt.get.call(this,Tt,mt)};function yt(Tt){if(typeof Tt=="string"&&(Tt=gt.parse(Tt)),Tt.protocol||(Tt.protocol="https:"),Tt.protocol!=="https:")throw new Error('Protocol "'+Tt.protocol+'" not supported. Expected "https:"');return Tt}},{http:468,url:472}],356:[function(ot,zt,Bt){"use strict";var vt=ot("util"),gt=ot("ms");zt.exports=function(kt){if(typeof kt=="number")return kt;var Ct=gt(kt);if(Ct===void 0){var yt=new Error(vt.format("humanize-ms(%j) result undefined",kt));console.warn(yt.stack)}return Ct}},{ms:376,util:419}],357:[function(ot,zt,Bt){Bt.read=function(vt,gt,kt,Ct,yt){var Tt,mt,xt=yt*8-Ct-1,ft=(1<<xt)-1,z=ft>>1,tt=-7,at=kt?yt-1:0,it=kt?-1:1,lt=vt[gt+at];for(at+=it,Tt=lt&(1<<-tt)-1,lt>>=-tt,tt+=xt;tt>0;Tt=Tt*256+vt[gt+at],at+=it,tt-=8);for(mt=Tt&(1<<-tt)-1,Tt>>=-tt,tt+=Ct;tt>0;mt=mt*256+vt[gt+at],at+=it,tt-=8);if(Tt===0)Tt=1-z;else{if(Tt===ft)return mt?NaN:(lt?-1:1)*(1/0);mt=mt+Math.pow(2,Ct),Tt=Tt-z}return(lt?-1:1)*mt*Math.pow(2,Tt-Ct)},Bt.write=function(vt,gt,kt,Ct,yt,Tt){var mt,xt,ft,z=Tt*8-yt-1,tt=(1<<z)-1,at=tt>>1,it=yt===23?Math.pow(2,-24)-Math.pow(2,-77):0,lt=Ct?0:Tt-1,ut=Ct?1:-1,dt=gt<0||gt===0&&1/gt<0?1:0;for(gt=Math.abs(gt),isNaN(gt)||gt===1/0?(xt=isNaN(gt)?1:0,mt=tt):(mt=Math.floor(Math.log(gt)/Math.LN2),gt*(ft=Math.pow(2,-mt))<1&&(mt--,ft*=2),mt+at>=1?gt+=it/ft:gt+=it*Math.pow(2,1-at),gt*ft>=2&&(mt++,ft/=2),mt+at>=tt?(xt=0,mt=tt):mt+at>=1?(xt=(gt*ft-1)*Math.pow(2,yt),mt=mt+at):(xt=gt*Math.pow(2,at-1)*Math.pow(2,yt),mt=0));yt>=8;vt[kt+lt]=xt&255,lt+=ut,xt/=256,yt-=8);for(mt=mt<<yt|xt,z+=yt;z>0;vt[kt+lt]=mt&255,lt+=ut,mt/=256,z-=8);vt[kt+lt-ut]|=dt*128}},{}],358:[function(ot,zt,Bt){"use strict";var vt=[ot("./nextTick"),ot("./queueMicrotask"),ot("./mutation.js"),ot("./messageChannel"),ot("./stateChange"),ot("./timeout")],gt,kt,Ct=-1,yt=[],Tt=!1;function mt(){!gt||!kt||(gt=!1,kt.length?yt=kt.concat(yt):Ct=-1,yt.length&&xt())}function xt(){if(!gt){Tt=!1,gt=!0;for(var lt=yt.length,ut=setTimeout(mt);lt;){for(kt=yt,yt=[];kt&&++Ct<lt;)kt[Ct].run();Ct=-1,lt=yt.length}kt=null,Ct=-1,gt=!1,clearTimeout(ut)}}for(var ft,z=-1,tt=vt.length;++z<tt;)if(vt[z]&&vt[z].test&&vt[z].test()){ft=vt[z].install(xt);break}function at(lt,ut){this.fun=lt,this.array=ut}at.prototype.run=function(){var lt=this.fun,ut=this.array;switch(ut.length){case 0:return lt();case 1:return lt(ut[0]);case 2:return lt(ut[0],ut[1]);case 3:return lt(ut[0],ut[1],ut[2]);default:return lt.apply(null,ut)}},zt.exports=it;function it(lt){var ut=new Array(arguments.length-1);if(arguments.length>1)for(var dt=1;dt<arguments.length;dt++)ut[dt-1]=arguments[dt];yt.push(new at(lt,ut)),!Tt&&!gt&&(Tt=!0,ft())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return vt.setImmediate?!1:typeof vt.MessageChannel!="undefined"},Bt.install=function(gt){var kt=new vt.MessageChannel;return kt.port1.onmessage=gt,function(){kt.port2.postMessage(0)}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=vt.MutationObserver||vt.WebKitMutationObserver;Bt.test=function(){return gt},Bt.install=function(kt){var Ct=0,yt=new gt(kt),Tt=vt.document.createTextNode("");return yt.observe(Tt,{characterData:!0}),function(){Tt.data=Ct=++Ct%2}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return typeof vt.queueMicrotask=="function"},Bt.install=function(gt){return function(){vt.queueMicrotask(gt)}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ot,zt,Bt){(function(vt){(function(){"use strict";Bt.test=function(){return"document"in vt&&"onreadystatechange"in vt.document.createElement("script")},Bt.install=function(gt){return function(){var kt=vt.document.createElement("script");return kt.onreadystatechange=function(){gt(),kt.onreadystatechange=null,kt.parentNode.removeChild(kt),kt=null},vt.document.documentElement.appendChild(kt),gt}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ot,zt,Bt){"use strict";Bt.test=function(){return!0},Bt.install=function(vt){return function(){setTimeout(vt,0)}}},{}],364:[function(ot,zt,Bt){typeof Object.create=="function"?zt.exports=function(gt,kt){kt&&(gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}))}:zt.exports=function(gt,kt){if(kt){gt.super_=kt;var Ct=function(){};Ct.prototype=kt.prototype,gt.prototype=new Ct,gt.prototype.constructor=gt}}},{}],365:[function(ot,zt,Bt){"use strict";var vt=ot("has-tostringtag/shams")(),gt=ot("call-bind/callBound"),kt=gt("Object.prototype.toString"),Ct=function(xt){return vt&&xt&&typeof xt=="object"&&Symbol.toStringTag in xt?!1:kt(xt)==="[object Arguments]"},yt=function(xt){return Ct(xt)?!0:xt!==null&&typeof xt=="object"&&typeof xt.length=="number"&&xt.length>=0&&kt(xt)!=="[object Array]"&&kt(xt.callee)==="[object Function]"},Tt=function(){return Ct(arguments)}();Ct.isLegacyArguments=yt,zt.exports=Tt?Ct:yt},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ot,zt,Bt){zt.exports=function(kt){return kt!=null&&(vt(kt)||gt(kt)||!!kt._isBuffer)};function vt(kt){return!!kt.constructor&&typeof kt.constructor.isBuffer=="function"&&kt.constructor.isBuffer(kt)}function gt(kt){return typeof kt.readFloatLE=="function"&&typeof kt.slice=="function"&&vt(kt.slice(0,0))}},{}],367:[function(ot,zt,Bt){"use strict";var vt=Function.prototype.toString,gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kt,Ct;if(typeof gt=="function"&&typeof Object.defineProperty=="function")try{kt=Object.defineProperty({},"length",{get:function(){throw Ct}}),Ct={},gt(function(){throw 42},null,kt)}catch(Dt){Dt!==Ct&&(gt=null)}else gt=null;var yt=/^\s*class\b/,Tt=function(Ft){try{var jt=vt.call(Ft);return yt.test(jt)}catch(Nt){return!1}},mt=function(Ft){try{return Tt(Ft)?!1:(vt.call(Ft),!0)}catch(jt){return!1}},xt=Object.prototype.toString,ft="[object Object]",z="[object Function]",tt="[object GeneratorFunction]",at="[object HTMLAllCollection]",it="[object HTML document.all class]",lt="[object HTMLCollection]",ut=typeof Symbol=="function"&&!!Symbol.toStringTag,dt=!(0 in[,]),bt=function(){return!1};if(typeof document=="object"){var At=document.all;xt.call(At)===xt.call(document.all)&&(bt=function(Ft){if((dt||!Ft)&&(typeof Ft=="undefined"||typeof Ft=="object"))try{var jt=xt.call(Ft);return(jt===at||jt===it||jt===lt||jt===ft)&&Ft("")==null}catch(Nt){}return!1})}zt.exports=gt?function(Ft){if(bt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;try{gt(Ft,null,kt)}catch(jt){if(jt!==Ct)return!1}return!Tt(Ft)&&mt(Ft)}:function(Ft){if(bt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;if(ut)return mt(Ft);if(Tt(Ft))return!1;var jt=xt.call(Ft);return jt!==z&&jt!==tt&&!/^\[object HTML/.test(jt)?!1:mt(Ft)}},{}],368:[function(ot,zt,Bt){"use strict";var vt=Object.prototype.toString,gt=Function.prototype.toString,kt=/^\s*(?:function)?\*/,Ct=ot("has-tostringtag/shams")(),yt=Object.getPrototypeOf,Tt=function(){if(!Ct)return!1;try{return Function("return function*() {}")()}catch(xt){}},mt;zt.exports=function(ft){if(typeof ft!="function")return!1;if(kt.test(gt.call(ft)))return!0;if(!Ct){var z=vt.call(ft);return z==="[object GeneratorFunction]"}if(!yt)return!1;if(typeof mt=="undefined"){var tt=Tt();mt=tt?yt(tt):!1}return yt(ft)===mt}},{"has-tostringtag/shams":353}],369:[function(ot,zt,Bt){"use strict";var vt=ot("which-typed-array");zt.exports=function(kt){return!!vt(kt)}},{"which-typed-array":420}],370:[function(ot,zt,Bt){var vt={}.toString;zt.exports=Array.isArray||function(gt){return vt.call(gt)=="[object Array]"}},{}],371:[function(ot,zt,Bt){(function(vt){(function(){(function(gt,kt){typeof Bt=="object"&&typeof zt!="undefined"?zt.exports=kt(gt):typeof ue=="function"&&ue.amd?ue(kt):kt(gt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof vt!="undefined"?vt:this,function(gt){"use strict";gt=gt||{};var kt=gt.Base64,Ct="2.6.4",yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt=function(he){for(var be={},Yt=0,ne=he.length;Yt<ne;Yt++)be[he.charAt(Yt)]=Yt;return be}(yt),mt=String.fromCharCode,xt=function(he){if(he.length<2){var be=he.charCodeAt(0);return be<128?he:be<2048?mt(192|be>>>6)+mt(128|be&63):mt(224|be>>>12&15)+mt(128|be>>>6&63)+mt(128|be&63)}else{var be=65536+(he.charCodeAt(0)-55296)*1024+(he.charCodeAt(1)-56320);return mt(240|be>>>18&7)+mt(128|be>>>12&63)+mt(128|be>>>6&63)+mt(128|be&63)}},ft=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(he){return he.replace(ft,xt)},tt=function(he){var be=[0,2,1][he.length%3],Yt=he.charCodeAt(0)<<16|(he.length>1?he.charCodeAt(1):0)<<8|(he.length>2?he.charCodeAt(2):0),ne=[yt.charAt(Yt>>>18),yt.charAt(Yt>>>12&63),be>=2?"=":yt.charAt(Yt>>>6&63),be>=1?"=":yt.charAt(Yt&63)];return ne.join("")},at=gt.btoa&&typeof gt.btoa=="function"?function(he){return gt.btoa(he)}:function(he){if(he.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return he.replace(/[\s\S]{1,3}/g,tt)},it=function(he){return at(z(String(he)))},lt=function(he){return he.replace(/[+\/]/g,function(be){return be=="+"?"-":"_"}).replace(/=/g,"")},ut=function(he,be){return be?lt(it(he)):it(he)},dt=function(he){return ut(he,!0)},bt;gt.Uint8Array&&(bt=function(he,be){for(var Yt="",ne=0,ve=he.length;ne<ve;ne+=3){var Se=he[ne],we=he[ne+1],ce=he[ne+2],de=Se<<16|we<<8|ce;Yt+=yt.charAt(de>>>18)+yt.charAt(de>>>12&63)+(typeof we!="undefined"?yt.charAt(de>>>6&63):"=")+(typeof ce!="undefined"?yt.charAt(de&63):"=")}return be?lt(Yt):Yt});var At=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Dt=function(he){switch(he.length){case 4:var be=(7&he.charCodeAt(0))<<18|(63&he.charCodeAt(1))<<12|(63&he.charCodeAt(2))<<6|63&he.charCodeAt(3),Yt=be-65536;return mt((Yt>>>10)+55296)+mt((Yt&1023)+56320);case 3:return mt((15&he.charCodeAt(0))<<12|(63&he.charCodeAt(1))<<6|63&he.charCodeAt(2));default:return mt((31&he.charCodeAt(0))<<6|63&he.charCodeAt(1))}},Ft=function(he){return he.replace(At,Dt)},jt=function(he){var be=he.length,Yt=be%4,ne=(be>0?Tt[he.charAt(0)]<<18:0)|(be>1?Tt[he.charAt(1)]<<12:0)|(be>2?Tt[he.charAt(2)]<<6:0)|(be>3?Tt[he.charAt(3)]:0),ve=[mt(ne>>>16),mt(ne>>>8&255),mt(ne&255)];return ve.length-=[0,0,2,1][Yt],ve.join("")},Nt=gt.atob&&typeof gt.atob=="function"?function(he){return gt.atob(he)}:function(he){return he.replace(/\S{1,4}/g,jt)},_t=function(he){return Nt(String(he).replace(/[^A-Za-z0-9\+\/]/g,""))},Wt=function(he){return Ft(Nt(he))},Jt=function(he){return String(he).replace(/[-_]/g,function(be){return be=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ut=function(he){return Wt(Jt(he))},Vt;gt.Uint8Array&&(Vt=function(he){return Uint8Array.from(_t(Jt(he)),function(be){return be.charCodeAt(0)})});var oe=function(){var he=gt.Base64;return gt.Base64=kt,he};if(gt.Base64={VERSION:Ct,atob:_t,btoa:at,fromBase64:Ut,toBase64:ut,utob:z,encode:ut,encodeURI:dt,btou:Ft,decode:Ut,noConflict:oe,fromUint8Array:bt,toUint8Array:Vt},typeof Object.defineProperty=="function"){var se=function(he){return{value:he,enumerable:!1,writable:!0,configurable:!0}};gt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",se(function(){return Ut(this)})),Object.defineProperty(String.prototype,"toBase64",se(function(he){return ut(this,he)})),Object.defineProperty(String.prototype,"toBase64URI",se(function(){return ut(this,!0)}))}}return gt.Meteor&&(Base64=gt.Base64),typeof zt!="undefined"&&zt.exports?zt.exports.Base64=gt.Base64:typeof ue=="function"&&ue.amd&&ue([],function(){return gt.Base64}),{Base64:gt.Base64}})}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ot,zt,Bt){"use strict";zt.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(kt,Ct,yt){if(!kt)throw new TypeError("argument dest is required");if(!Ct)throw new TypeError("argument src is required");return yt===void 0&&(yt=!0),Object.getOwnPropertyNames(Ct).forEach(function(mt){if(!(!yt&&vt.call(kt,mt))){var xt=Object.getOwnPropertyDescriptor(Ct,mt);Object.defineProperty(kt,mt,xt)}}),kt}},{}],373:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.regexp.constructor.js"),ot("core-js/modules/es.regexp.to-string.js");function vt(){this._types=Object.create(null),this._extensions=Object.create(null);for(var gt=0;gt<arguments.length;gt++)this.define(arguments[gt]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}vt.prototype.define=function(gt,kt){for(var Ct in gt){var yt=gt[Ct].map(function(ft){return ft.toLowerCase()});Ct=Ct.toLowerCase();for(var Tt=0;Tt<yt.length;Tt++){var mt=yt[Tt];if(mt[0]!=="*"){if(!kt&&mt in this._types)throw new Error('Attempt to change mapping for "'+mt+'" extension from "'+this._types[mt]+'" to "'+Ct+'". Pass `force=true` to allow this, otherwise remove "'+mt+'" from the list of extensions for "'+Ct+'".');this._types[mt]=Ct}}if(kt||!this._extensions[Ct]){var xt=yt[0];this._extensions[Ct]=xt[0]!=="*"?xt:xt.substr(1)}}},vt.prototype.getType=function(gt){gt=String(gt);var kt=gt.replace(/^.*[/\\]/,"").toLowerCase(),Ct=kt.replace(/^.*\./,"").toLowerCase(),yt=kt.length<gt.length,Tt=Ct.length<kt.length-1;return(Tt||!yt)&&this._types[Ct]||null},vt.prototype.getExtension=function(gt){return gt=/^\s*([^;\s]*)/.test(gt)&&RegExp.$1,gt&&this._extensions[gt.toLowerCase()]||null},zt.exports=vt},{"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(ot,zt,Bt){"use strict";var vt=ot("./Mime");zt.exports=new vt(ot("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ot,zt,Bt){"use strict";zt.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(ot,zt,Bt){var vt=1e3,gt=vt*60,kt=gt*60,Ct=kt*24,yt=Ct*7,Tt=Ct*365.25;zt.exports=function(tt,at){at=at||{};var it=typeof tt;if(it==="string"&&tt.length>0)return mt(tt);if(it==="number"&&isFinite(tt))return at.long?ft(tt):xt(tt);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(tt))};function mt(tt){if(tt=String(tt),!(tt.length>100)){var at=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(tt);if(at){var it=parseFloat(at[1]),lt=(at[2]||"ms").toLowerCase();switch(lt){case"years":case"year":case"yrs":case"yr":case"y":return it*Tt;case"weeks":case"week":case"w":return it*yt;case"days":case"day":case"d":return it*Ct;case"hours":case"hour":case"hrs":case"hr":case"h":return it*kt;case"minutes":case"minute":case"mins":case"min":case"m":return it*gt;case"seconds":case"second":case"secs":case"sec":case"s":return it*vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return it;default:return}}}}function xt(tt){var at=Math.abs(tt);return at>=Ct?Math.round(tt/Ct)+"d":at>=kt?Math.round(tt/kt)+"h":at>=gt?Math.round(tt/gt)+"m":at>=vt?Math.round(tt/vt)+"s":tt+"ms"}function ft(tt){var at=Math.abs(tt);return at>=Ct?z(tt,at,Ct,"day"):at>=kt?z(tt,at,kt,"hour"):at>=gt?z(tt,at,gt,"minute"):at>=vt?z(tt,at,vt,"second"):tt+" ms"}function z(tt,at,it,lt){var ut=at>=it*1.5;return Math.round(tt/it)+" "+lt+(ut?"s":"")}},{}],377:[function(ot,zt,Bt){"use strict";var vt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;function Ct(Tt){if(Tt==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Tt)}function yt(){try{if(!Object.assign)return!1;var Tt=new String("abc");if(Tt[5]="de",Object.getOwnPropertyNames(Tt)[0]==="5")return!1;for(var mt={},xt=0;xt<10;xt++)mt["_"+String.fromCharCode(xt)]=xt;var ft=Object.getOwnPropertyNames(mt).map(function(tt){return mt[tt]});if(ft.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(tt){z[tt]=tt}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(tt){return!1}}zt.exports=yt()?Object.assign:function(Tt,mt){for(var xt,ft=Ct(Tt),z,tt=1;tt<arguments.length;tt++){xt=Object(arguments[tt]);for(var at in xt)gt.call(xt,at)&&(ft[at]=xt[at]);if(vt){z=vt(xt);for(var it=0;it<z.length;it++)kt.call(xt,z[it])&&(ft[z[it]]=xt[z[it]])}}return ft}},{}],378:[function(ot,zt,Bt){(function(vt){(function(){"use strict";function gt(Tt){if(typeof Tt!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Tt))}function kt(Tt,mt){for(var xt="",ft=0,z=-1,tt=0,at,it=0;it<=Tt.length;++it){if(it<Tt.length)at=Tt.charCodeAt(it);else{if(at===47)break;at=47}if(at===47){if(!(z===it-1||tt===1))if(z!==it-1&&tt===2){if(xt.length<2||ft!==2||xt.charCodeAt(xt.length-1)!==46||xt.charCodeAt(xt.length-2)!==46){if(xt.length>2){var lt=xt.lastIndexOf("/");if(lt!==xt.length-1){lt===-1?(xt="",ft=0):(xt=xt.slice(0,lt),ft=xt.length-1-xt.lastIndexOf("/")),z=it,tt=0;continue}}else if(xt.length===2||xt.length===1){xt="",ft=0,z=it,tt=0;continue}}mt&&(xt.length>0?xt+="/..":xt="..",ft=2)}else xt.length>0?xt+="/"+Tt.slice(z+1,it):xt=Tt.slice(z+1,it),ft=it-z-1;z=it,tt=0}else at===46&&tt!==-1?++tt:tt=-1}return xt}function Ct(Tt,mt){var xt=mt.dir||mt.root,ft=mt.base||(mt.name||"")+(mt.ext||"");return xt?xt===mt.root?xt+ft:xt+Tt+ft:ft}var yt={resolve:function(){for(var mt="",xt=!1,ft,z=arguments.length-1;z>=-1&&!xt;z--){var tt;z>=0?tt=arguments[z]:(ft===void 0&&(ft=vt.cwd()),tt=ft),gt(tt),tt.length!==0&&(mt=tt+"/"+mt,xt=tt.charCodeAt(0)===47)}return mt=kt(mt,!xt),xt?mt.length>0?"/"+mt:"/":mt.length>0?mt:"."},normalize:function(mt){if(gt(mt),mt.length===0)return".";var xt=mt.charCodeAt(0)===47,ft=mt.charCodeAt(mt.length-1)===47;return mt=kt(mt,!xt),mt.length===0&&!xt&&(mt="."),mt.length>0&&ft&&(mt+="/"),xt?"/"+mt:mt},isAbsolute:function(mt){return gt(mt),mt.length>0&&mt.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var mt,xt=0;xt<arguments.length;++xt){var ft=arguments[xt];gt(ft),ft.length>0&&(mt===void 0?mt=ft:mt+="/"+ft)}return mt===void 0?".":yt.normalize(mt)},relative:function(mt,xt){if(gt(mt),gt(xt),mt===xt||(mt=yt.resolve(mt),xt=yt.resolve(xt),mt===xt))return"";for(var ft=1;ft<mt.length&&mt.charCodeAt(ft)===47;++ft);for(var z=mt.length,tt=z-ft,at=1;at<xt.length&&xt.charCodeAt(at)===47;++at);for(var it=xt.length,lt=it-at,ut=tt<lt?tt:lt,dt=-1,bt=0;bt<=ut;++bt){if(bt===ut){if(lt>ut){if(xt.charCodeAt(at+bt)===47)return xt.slice(at+bt+1);if(bt===0)return xt.slice(at+bt)}else tt>ut&&(mt.charCodeAt(ft+bt)===47?dt=bt:bt===0&&(dt=0));break}var At=mt.charCodeAt(ft+bt),Dt=xt.charCodeAt(at+bt);if(At!==Dt)break;At===47&&(dt=bt)}var Ft="";for(bt=ft+dt+1;bt<=z;++bt)(bt===z||mt.charCodeAt(bt)===47)&&(Ft.length===0?Ft+="..":Ft+="/..");return Ft.length>0?Ft+xt.slice(at+dt):(at+=dt,xt.charCodeAt(at)===47&&++at,xt.slice(at))},_makeLong:function(mt){return mt},dirname:function(mt){if(gt(mt),mt.length===0)return".";for(var xt=mt.charCodeAt(0),ft=xt===47,z=-1,tt=!0,at=mt.length-1;at>=1;--at)if(xt=mt.charCodeAt(at),xt===47){if(!tt){z=at;break}}else tt=!1;return z===-1?ft?"/":".":ft&&z===1?"//":mt.slice(0,z)},basename:function(mt,xt){if(xt!==void 0&&typeof xt!="string")throw new TypeError('"ext" argument must be a string');gt(mt);var ft=0,z=-1,tt=!0,at;if(xt!==void 0&&xt.length>0&&xt.length<=mt.length){if(xt.length===mt.length&&xt===mt)return"";var it=xt.length-1,lt=-1;for(at=mt.length-1;at>=0;--at){var ut=mt.charCodeAt(at);if(ut===47){if(!tt){ft=at+1;break}}else lt===-1&&(tt=!1,lt=at+1),it>=0&&(ut===xt.charCodeAt(it)?--it===-1&&(z=at):(it=-1,z=lt))}return ft===z?z=lt:z===-1&&(z=mt.length),mt.slice(ft,z)}else{for(at=mt.length-1;at>=0;--at)if(mt.charCodeAt(at)===47){if(!tt){ft=at+1;break}}else z===-1&&(tt=!1,z=at+1);return z===-1?"":mt.slice(ft,z)}},extname:function(mt){gt(mt);for(var xt=-1,ft=0,z=-1,tt=!0,at=0,it=mt.length-1;it>=0;--it){var lt=mt.charCodeAt(it);if(lt===47){if(!tt){ft=it+1;break}continue}z===-1&&(tt=!1,z=it+1),lt===46?xt===-1?xt=it:at!==1&&(at=1):xt!==-1&&(at=-1)}return xt===-1||z===-1||at===0||at===1&&xt===z-1&&xt===ft+1?"":mt.slice(xt,z)},format:function(mt){if(mt===null||typeof mt!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof mt);return Ct("/",mt)},parse:function(mt){gt(mt);var xt={root:"",dir:"",base:"",ext:"",name:""};if(mt.length===0)return xt;var ft=mt.charCodeAt(0),z=ft===47,tt;z?(xt.root="/",tt=1):tt=0;for(var at=-1,it=0,lt=-1,ut=!0,dt=mt.length-1,bt=0;dt>=tt;--dt){if(ft=mt.charCodeAt(dt),ft===47){if(!ut){it=dt+1;break}continue}lt===-1&&(ut=!1,lt=dt+1),ft===46?at===-1?at=dt:bt!==1&&(bt=1):at!==-1&&(bt=-1)}return at===-1||lt===-1||bt===0||bt===1&&at===lt-1&&at===it+1?lt!==-1&&(it===0&&z?xt.base=xt.name=mt.slice(1,lt):xt.base=xt.name=mt.slice(it,lt)):(it===0&&z?(xt.name=mt.slice(1,at),xt.base=mt.slice(1,lt)):(xt.name=mt.slice(it,at),xt.base=mt.slice(it,lt)),xt.ext=mt.slice(at,lt)),it>0?xt.dir=mt.slice(0,it-1):z&&(xt.dir="/"),xt},sep:"/",delimiter:":",win32:null,posix:null};yt.posix=yt,zt.exports=yt}).call(this)}).call(this,ot("_process"))},{_process:467}],379:[function(ot,zt,Bt){(function(vt){(function(){(function(){"use strict";var gt={function:!0,object:!0},kt=gt[typeof window]&&window||this,Ct=kt,yt=gt[typeof Bt]&&Bt,Tt=gt[typeof zt]&&zt&&!zt.nodeType&&zt,mt=yt&&Tt&&typeof vt=="object"&&vt;mt&&(mt.global===mt||mt.window===mt||mt.self===mt)&&(kt=mt);var xt=Math.pow(2,53)-1,ft=/\bOpera/,z=this,tt=Object.prototype,at=tt.hasOwnProperty,it=tt.toString;function lt(Ut){return Ut=String(Ut),Ut.charAt(0).toUpperCase()+Ut.slice(1)}function ut(Ut,Vt,oe){var se={"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 Vt&&oe&&/^Win/i.test(Ut)&&!/^Windows Phone /i.test(Ut)&&(se=se[/[\d.]+$/.exec(Ut)])&&(Ut="Windows "+se),Ut=String(Ut),Vt&&oe&&(Ut=Ut.replace(RegExp(Vt,"i"),oe)),Ut=bt(Ut.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]),Ut}function dt(Ut,Vt){var oe=-1,se=Ut?Ut.length:0;if(typeof se=="number"&&se>-1&&se<=xt)for(;++oe<se;)Vt(Ut[oe],oe,Ut);else At(Ut,Vt)}function bt(Ut){return Ut=_t(Ut),/^(?:webOS|i(?:OS|P))/.test(Ut)?Ut:lt(Ut)}function At(Ut,Vt){for(var oe in Ut)at.call(Ut,oe)&&Vt(Ut[oe],oe,Ut)}function Dt(Ut){return Ut==null?lt(Ut):it.call(Ut).slice(8,-1)}function Ft(Ut,Vt){var oe=Ut!=null?typeof Ut[Vt]:"number";return!/^(?:boolean|number|string|undefined)$/.test(oe)&&(oe=="object"?!!Ut[Vt]:!0)}function jt(Ut){return String(Ut).replace(/([ -])(?!$)/g,"$1?")}function Nt(Ut,Vt){var oe=null;return dt(Ut,function(se,he){oe=Vt(oe,se,he,Ut)}),oe}function _t(Ut){return String(Ut).replace(/^ +| +$/g,"")}function Wt(Ut){var Vt=kt,oe=Ut&&typeof Ut=="object"&&Dt(Ut)!="String";oe&&(Vt=Ut,Ut=null);var se=Vt.navigator||{},he=se.userAgent||"";Ut||(Ut=he);var be=oe||z==Ct,Yt=oe?!!se.likeChrome:/\bChrome\b/.test(Ut)&&!/internal|\n/i.test(it.toString()),ne="Object",ve=oe?ne:"ScriptBridgingProxyObject",Se=oe?ne:"Environment",we=oe&&Vt.java?"JavaPackage":Dt(Vt.java),ce=oe?ne:"RuntimeObject",de=/\bJava/.test(we)&&Vt.java,le=de&&Dt(Vt.environment)==Se,Ce=de?"a":"\u03B1",fe=de?"b":"\u03B2",me=Vt.document||{},ke=Vt.operamini||Vt.opera,pe=ft.test(pe=oe&&ke?ke["[[Class]]"]:Dt(ke))?pe:ke=null,qt,Kt=Ut,wt=[],Lt=null,Zt=Ut==he,ee=Zt&&ke&&typeof ke.version=="function"&&ke.version(),It,Rt=Ae([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ht=Ie(["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"]),re=qe([{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"]),ye=Oe({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}}),Pe=Qe(["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 Ae(We){return Nt(We,function(He,rn){return He||RegExp("\\b"+(rn.pattern||jt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Oe(We){return Nt(We,function(He,rn,ln){return He||(rn[re]||rn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(re)]||RegExp("\\b"+jt(ln)+"(?:\\b|\\w*\\d)","i").exec(Ut))&&ln})}function Ie(We){return Nt(We,function(He,rn){return He||RegExp("\\b"+(rn.pattern||jt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Qe(We){return Nt(We,function(He,rn){var ln=rn.pattern||jt(rn);return!He&&(He=RegExp("\\b"+ln+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ut))&&(He=ut(He,ln,rn.label||rn)),He})}function qe(We){return Nt(We,function(He,rn){var ln=rn.pattern||jt(rn);return!He&&(He=RegExp("\\b"+ln+" *\\d+[.\\w_]*","i").exec(Ut)||RegExp("\\b"+ln+" *\\w+-[\\w]*","i").exec(Ut)||RegExp("\\b"+ln+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ut))&&((He=String(rn.label&&!RegExp(ln,"i").test(rn.label)?rn.label:He).split("/"))[1]&&!/[\d.]+/.test(He[0])&&(He[0]+=" "+He[1]),rn=rn.label||rn,He=bt(He[0].replace(RegExp(ln,"i"),rn).replace(RegExp("; *(?:"+rn+"[_-])?","i")," ").replace(RegExp("("+rn+")[-_.]?(\\w)","i"),"$1 $2"))),He})}function nn(We){return Nt(We,function(He,rn){return He||(RegExp(rn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ut)||0)[1]||null})}function Ke(){return this.description||""}if(Rt&&(Rt=[Rt]),/\bAndroid\b/.test(Pe)&&!re&&(qt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ut))&&(re=_t(qt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ye&&!re?re=qe([ye]):ye&&re&&(re=re.replace(RegExp("^("+jt(ye)+")[-_.\\s]","i"),ye+" ").replace(RegExp("^("+jt(ye)+")[-_.]?(\\w)","i"),ye+" $2")),(qt=/\bGoogle TV\b/.exec(re))&&(re=qt[0]),/\bSimulator\b/i.test(Ut)&&(re=(re?re+" ":"")+"Simulator"),Ht=="Opera Mini"&&/\bOPiOS\b/.test(Ut)&&wt.push("running in Turbo/Uncompressed mode"),Ht=="IE"&&/\blike iPhone OS\b/.test(Ut)?(qt=Wt(Ut.replace(/like iPhone OS/,"")),ye=qt.manufacturer,re=qt.product):/^iP/.test(re)?(Ht||(Ht="Safari"),Pe="iOS"+((qt=/ OS ([\d_]+)/i.exec(Ut))?" "+qt[1].replace(/_/g,"."):"")):Ht=="Konqueror"&&/^Linux\b/i.test(Pe)?Pe="Kubuntu":ye&&ye!="Google"&&(/Chrome/.test(Ht)&&!/\bMobile Safari\b/i.test(Ut)||/\bVita\b/.test(re))||/\bAndroid\b/.test(Pe)&&/^Chrome/.test(Ht)&&/\bVersion\//i.test(Ut)?(Ht="Android Browser",Pe=/\bAndroid\b/.test(Pe)?Pe:"Android"):Ht=="Silk"?(/\bMobi/i.test(Ut)||(Pe="Android",wt.unshift("desktop mode")),/Accelerated *= *true/i.test(Ut)&&wt.unshift("accelerated")):Ht=="UC Browser"&&/\bUCWEB\b/.test(Ut)?wt.push("speed mode"):Ht=="PaleMoon"&&(qt=/\bFirefox\/([\d.]+)\b/.exec(Ut))?wt.push("identifying as Firefox "+qt[1]):Ht=="Firefox"&&(qt=/\b(Mobile|Tablet|TV)\b/i.exec(Ut))?(Pe||(Pe="Firefox OS"),re||(re=qt[1])):!Ht||(qt=!/\bMinefield\b/i.test(Ut)&&/\b(?:Firefox|Safari)\b/.exec(Ht))?(Ht&&!re&&/[\/,]|^[^(]+?\)/.test(Ut.slice(Ut.indexOf(qt+"/")+8))&&(Ht=null),(qt=re||ye||Pe)&&(re||ye||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Pe))&&(Ht=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Pe)?Pe:qt)+" Browser")):Ht=="Electron"&&(qt=(/\bChrome\/([\d.]+)\b/.exec(Ut)||0)[1])&&wt.push("Chromium "+qt),ee||(ee=nn(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",jt(Ht),"(?:Firefox|Minefield|NetFront)"])),(qt=Rt=="iCab"&&parseFloat(ee)>3&&"WebKit"||/\bOpera\b/.test(Ht)&&(/\bOPR\b/.test(Ut)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ut)&&!/^(?:Trident|EdgeHTML)$/.test(Rt)&&"WebKit"||!Rt&&/\bMSIE\b/i.test(Ut)&&(Pe=="Mac OS"?"Tasman":"Trident")||Rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ht)&&"NetFront")&&(Rt=[qt]),Ht=="IE"&&(qt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ut)||0)[1])?(Ht+=" Mobile",Pe="Windows Phone "+(/\+$/.test(qt)?qt:qt+".x"),wt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ut)?(Ht="IE Mobile",Pe="Windows Phone 8.x",wt.unshift("desktop mode"),ee||(ee=(/\brv:([\d.]+)/.exec(Ut)||0)[1])):Ht!="IE"&&Rt=="Trident"&&(qt=/\brv:([\d.]+)/.exec(Ut))&&(Ht&&wt.push("identifying as "+Ht+(ee?" "+ee:"")),Ht="IE",ee=qt[1]),Zt){if(Ft(Vt,"global"))if(de&&(qt=de.lang.System,Kt=qt.getProperty("os.arch"),Pe=Pe||qt.getProperty("os.name")+" "+qt.getProperty("os.version")),le){try{ee=Vt.require("ringo/engine").version.join("."),Ht="RingoJS"}catch(We){(qt=Vt.system)&&qt.global.system==Vt.system&&(Ht="Narwhal",Pe||(Pe=qt[0].os||null))}Ht||(Ht="Rhino")}else typeof Vt.process=="object"&&!Vt.process.browser&&(qt=Vt.process)&&(typeof qt.versions=="object"&&(typeof qt.versions.electron=="string"?(wt.push("Node "+qt.versions.node),Ht="Electron",ee=qt.versions.electron):typeof qt.versions.nw=="string"&&(wt.push("Chromium "+ee,"Node "+qt.versions.node),Ht="NW.js",ee=qt.versions.nw)),Ht||(Ht="Node.js",Kt=qt.arch,Pe=qt.platform,ee=/[\d.]+/.exec(qt.version),ee=ee?ee[0]:null));else Dt(qt=Vt.runtime)==ve?(Ht="Adobe AIR",Pe=qt.flash.system.Capabilities.os):Dt(qt=Vt.phantom)==ce?(Ht="PhantomJS",ee=(qt=qt.version||null)&&qt.major+"."+qt.minor+"."+qt.patch):typeof me.documentMode=="number"&&(qt=/\bTrident\/(\d+)/i.exec(Ut))?(ee=[ee,me.documentMode],(qt=+qt[1]+4)!=ee[1]&&(wt.push("IE "+ee[1]+" mode"),Rt&&(Rt[1]=""),ee[1]=qt),ee=Ht=="IE"?String(ee[1].toFixed(1)):ee[0]):typeof me.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ht)&&(wt.push("masking as "+Ht+" "+ee),Ht="IE",ee="11.0",Rt=["Trident"],Pe="Windows");Pe=Pe&&bt(Pe)}if(ee&&(qt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ee)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ut+";"+(Zt&&se.appMinorVersion))||/\bMinefield\b/i.test(Ut)&&"a")&&(Lt=/b/i.test(qt)?"beta":"alpha",ee=ee.replace(RegExp(qt+"\\+?$"),"")+(Lt=="beta"?fe:Ce)+(/\d+\+?/.exec(qt)||"")),Ht=="Fennec"||Ht=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Pe))Ht="Firefox Mobile";else if(Ht=="Maxthon"&&ee)ee=ee.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(re))re=="Xbox 360"&&(Pe=null),re=="Xbox 360"&&/\bIEMobile\b/.test(Ut)&&wt.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ht)||Ht&&!re&&!/Browser|Mobi/.test(Ht))&&(Pe=="Windows CE"||/Mobi/i.test(Ut)))Ht+=" Mobile";else if(Ht=="IE"&&Zt)try{Vt.external===null&&wt.unshift("platform preview")}catch(We){wt.unshift("embedded")}else(/\bBlackBerry\b/.test(re)||/\bBB10\b/.test(Ut))&&(qt=(RegExp(re.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ut)||0)[1]||ee)?(qt=[qt,/BB10/.test(Ut)],Pe=(qt[1]?(re=null,ye="BlackBerry"):"Device Software")+" "+qt[0],ee=null):this!=At&&re!="Wii"&&(Zt&&ke||/Opera/.test(Ht)&&/\b(?:MSIE|Firefox)\b/i.test(Ut)||Ht=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Pe)||Ht=="IE"&&(Pe&&!/^Win/.test(Pe)&&ee>5.5||/\bWindows XP\b/.test(Pe)&&ee>8||ee==8&&!/\bTrident\b/.test(Ut)))&&!ft.test(qt=Wt.call(At,Ut.replace(ft,"")+";"))&&qt.name&&(qt="ing as "+qt.name+((qt=qt.version)?" "+qt:""),ft.test(Ht)?(/\bIE\b/.test(qt)&&Pe=="Mac OS"&&(Pe=null),qt="identify"+qt):(qt="mask"+qt,pe?Ht=bt(pe.replace(/([a-z])([A-Z])/g,"$1 $2")):Ht="Opera",/\bIE\b/.test(qt)&&(Pe=null),Zt||(ee=null)),Rt=["Presto"],wt.push(qt));(qt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ut)||0)[1])&&(qt=[parseFloat(qt.replace(/\.(\d)$/,".0$1")),qt],Ht=="Safari"&&qt[1].slice(-1)=="+"?(Ht="WebKit Nightly",Lt="alpha",ee=qt[1].slice(0,-1)):(ee==qt[1]||ee==(qt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ut)||0)[1]))&&(ee=null),qt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ut)||0)[1],qt[0]==537.36&&qt[2]==537.36&&parseFloat(qt[1])>=28&&Rt=="WebKit"&&(Rt=["Blink"]),!Zt||!Yt&&!qt[1]?(Rt&&(Rt[1]="like Safari"),qt=(qt=qt[0],qt<400?1:qt<500?2:qt<526?3:qt<533?4:qt<534?"4+":qt<535?5:qt<537?6:qt<538?7:qt<601?8:qt<602?9:qt<604?10:qt<606?11:qt<608?12:"12")):(Rt&&(Rt[1]="like Chrome"),qt=qt[1]||(qt=qt[0],qt<530?1:qt<532?2:qt<532.05?3:qt<533?4:qt<534.03?5:qt<534.07?6:qt<534.1?7:qt<534.13?8:qt<534.16?9:qt<534.24?10:qt<534.3?11:qt<535.01?12:qt<535.02?"13+":qt<535.07?15:qt<535.11?16:qt<535.19?17:qt<536.05?18:qt<536.1?19:qt<537.01?20:qt<537.11?"21+":qt<537.13?23:qt<537.18?24:qt<537.24?25:qt<537.36?26:Rt!="Blink"?"27":"28")),Rt&&(Rt[1]+=" "+(qt+=typeof qt=="number"?".x":/[.+]/.test(qt)?"":"+")),Ht=="Safari"&&(!ee||parseInt(ee)>45)?ee=qt:Ht=="Chrome"&&/\bHeadlessChrome/i.test(Ut)&&wt.unshift("headless")),Ht=="Opera"&&(qt=/\bzbov|zvav$/.exec(Pe))?(Ht+=" ",wt.unshift("desktop mode"),qt=="zvav"?(Ht+="Mini",ee=null):Ht+="Mobile",Pe=Pe.replace(RegExp(" *"+qt+"$"),"")):Ht=="Safari"&&/\bChrome\b/.exec(Rt&&Rt[1])?(wt.unshift("desktop mode"),Ht="Chrome Mobile",ee=null,/\bOS X\b/.test(Pe)?(ye="Apple",Pe="iOS 4.3+"):Pe=null):/\bSRWare Iron\b/.test(Ht)&&!ee&&(ee=nn("Chrome")),ee&&ee.indexOf(qt=/[\d.]+$/.exec(Pe))==0&&Ut.indexOf("/"+qt+"-")>-1&&(Pe=_t(Pe.replace(qt,""))),Pe&&Pe.indexOf(Ht)!=-1&&!RegExp(Ht+" OS").test(Pe)&&(Pe=Pe.replace(RegExp(" *"+jt(Ht)+" *"),"")),Rt&&!/\b(?:Avant|Nook)\b/.test(Ht)&&(/Browser|Lunascape|Maxthon/.test(Ht)||Ht!="Safari"&&/^iOS/.test(Pe)&&/\bSafari\b/.test(Rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ht)&&Rt[1])&&(qt=Rt[Rt.length-1])&&wt.push(qt),wt.length&&(wt=["("+wt.join("; ")+")"]),ye&&re&&re.indexOf(ye)<0&&wt.push("on "+ye),re&&wt.push((/^on /.test(wt[wt.length-1])?"":"on ")+re),Pe&&(qt=/ ([\d.+]+)$/.exec(Pe),It=qt&&Pe.charAt(Pe.length-qt[0].length-1)=="/",Pe={architecture:32,family:qt&&!It?Pe.replace(qt[0],""):Pe,version:qt?qt[1]:null,toString:function(){var We=this.version;return this.family+(We&&!It?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(qt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(Pe&&(Pe.architecture=64,Pe.family=Pe.family.replace(RegExp(" *"+qt),"")),Ht&&(/\bWOW64\b/i.test(Ut)||Zt&&/\w(?:86|32)$/.test(se.cpuClass||se.platform)&&!/\bWin64; x64\b/i.test(Ut))&&wt.unshift("32-bit")):Pe&&/^OS X/.test(Pe.family)&&Ht=="Chrome"&&parseFloat(ee)>=39&&(Pe.architecture=64),Ut||(Ut=null);var Ue={};return Ue.description=Ut,Ue.layout=Rt&&Rt[0],Ue.manufacturer=ye,Ue.name=Ht,Ue.prerelease=Lt,Ue.product=re,Ue.ua=Ut,Ue.version=Ht&&ee,Ue.os=Pe||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=Wt,Ue.toString=Ke,Ue.version&&wt.unshift(ee),Ue.name&&wt.unshift(Ht),Pe&&Ht&&!(Pe==String(Pe).split(" ")[0]&&(Pe==Ht.split(" ")[0]||re))&&wt.push(re?"("+Pe+")":"on "+Pe),wt.length&&(Ue.description=wt.join(" ")),Ue}var Jt=Wt();typeof ue=="function"&&typeof ue.amd=="object"&&ue.amd?(kt.platform=Jt,ue(function(){return Jt})):yt&&Tt?At(Jt,function(Ut,Vt){yt[Vt]=Ut}):kt.platform=Jt}).call(this)}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ot,zt,Bt){(function(vt){(function(){"use strict";typeof vt=="undefined"||!vt.version||vt.version.indexOf("v0.")===0||vt.version.indexOf("v1.")===0&&vt.version.indexOf("v1.8.")!==0?zt.exports={nextTick:gt}:zt.exports=vt;function gt(kt,Ct,yt,Tt){if(typeof kt!="function")throw new TypeError('"callback" argument must be a function');var mt=arguments.length,xt,ft;switch(mt){case 0:case 1:return vt.nextTick(kt);case 2:return vt.nextTick(function(){kt.call(null,Ct)});case 3:return vt.nextTick(function(){kt.call(null,Ct,yt)});case 4:return vt.nextTick(function(){kt.call(null,Ct,yt,Tt)});default:for(xt=new Array(mt-1),ft=0;ft<xt.length;)xt[ft++]=arguments[ft];return vt.nextTick(function(){kt.apply(null,xt)})}}}).call(this)}).call(this,ot("_process"))},{_process:467}],381:[function(ot,zt,Bt){var vt=zt.exports={},gt,kt;function Ct(){throw new Error("setTimeout has not been defined")}function yt(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?gt=setTimeout:gt=Ct}catch(dt){gt=Ct}try{typeof clearTimeout=="function"?kt=clearTimeout:kt=yt}catch(dt){kt=yt}})();function Tt(dt){if(gt===setTimeout)return setTimeout(dt,0);if((gt===Ct||!gt)&&setTimeout)return gt=setTimeout,setTimeout(dt,0);try{return gt(dt,0)}catch(bt){try{return gt.call(null,dt,0)}catch(At){return gt.call(this,dt,0)}}}function mt(dt){if(kt===clearTimeout)return clearTimeout(dt);if((kt===yt||!kt)&&clearTimeout)return kt=clearTimeout,clearTimeout(dt);try{return kt(dt)}catch(bt){try{return kt.call(null,dt)}catch(At){return kt.call(this,dt)}}}var xt=[],ft=!1,z,tt=-1;function at(){!ft||!z||(ft=!1,z.length?xt=z.concat(xt):tt=-1,xt.length&&it())}function it(){if(!ft){var dt=Tt(at);ft=!0;for(var bt=xt.length;bt;){for(z=xt,xt=[];++tt<bt;)z&&z[tt].run();tt=-1,bt=xt.length}z=null,ft=!1,mt(dt)}}vt.nextTick=function(dt){var bt=new Array(arguments.length-1);if(arguments.length>1)for(var At=1;At<arguments.length;At++)bt[At-1]=arguments[At];xt.push(new lt(dt,bt)),xt.length===1&&!ft&&Tt(it)};function lt(dt,bt){this.fun=dt,this.array=bt}lt.prototype.run=function(){this.fun.apply(null,this.array)},vt.title="browser",vt.browser=!0,vt.env={},vt.argv=[],vt.version="",vt.versions={};function ut(){}vt.on=ut,vt.addListener=ut,vt.once=ut,vt.off=ut,vt.removeListener=ut,vt.removeAllListeners=ut,vt.emit=ut,vt.prependListener=ut,vt.prependOnceListener=ut,vt.listeners=function(dt){return[]},vt.binding=function(dt){throw new Error("process.binding is not supported")},vt.cwd=function(){return"/"},vt.chdir=function(dt){throw new Error("process.chdir is not supported")},vt.umask=function(){return 0}},{}],382:[function(ot,zt,Bt){(function(vt){(function(){(function(gt){var kt=typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,Ct=typeof zt=="object"&&zt&&!zt.nodeType&&zt,yt=typeof vt=="object"&&vt;(yt.global===yt||yt.window===yt||yt.self===yt)&&(gt=yt);var Tt,mt=2147483647,xt=36,ft=1,z=26,tt=38,at=700,it=72,lt=128,ut="-",dt=/^xn--/,bt=/[^\x20-\x7E]/,At=/[\x2E\u3002\uFF0E\uFF61]/g,Dt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ft=xt-ft,jt=Math.floor,Nt=String.fromCharCode,_t;function Wt(we){throw new RangeError(Dt[we])}function Jt(we,ce){for(var de=we.length,le=[];de--;)le[de]=ce(we[de]);return le}function Ut(we,ce){var de=we.split("@"),le="";de.length>1&&(le=de[0]+"@",we=de[1]),we=we.replace(At,".");var Ce=we.split("."),fe=Jt(Ce,ce).join(".");return le+fe}function Vt(we){for(var ce=[],de=0,le=we.length,Ce,fe;de<le;)Ce=we.charCodeAt(de++),Ce>=55296&&Ce<=56319&&de<le?(fe=we.charCodeAt(de++),(fe&64512)==56320?ce.push(((Ce&1023)<<10)+(fe&1023)+65536):(ce.push(Ce),de--)):ce.push(Ce);return ce}function oe(we){return Jt(we,function(ce){var de="";return ce>65535&&(ce-=65536,de+=Nt(ce>>>10&1023|55296),ce=56320|ce&1023),de+=Nt(ce),de}).join("")}function se(we){return we-48<10?we-22:we-65<26?we-65:we-97<26?we-97:xt}function he(we,ce){return we+22+75*(we<26)-((ce!=0)<<5)}function be(we,ce,de){var le=0;for(we=de?jt(we/at):we>>1,we+=jt(we/ce);we>Ft*z>>1;le+=xt)we=jt(we/Ft);return jt(le+(Ft+1)*we/(we+tt))}function Yt(we){var ce=[],de=we.length,le,Ce=0,fe=lt,me=it,ke,pe,qt,Kt,wt,Lt,Zt,ee,It;for(ke=we.lastIndexOf(ut),ke<0&&(ke=0),pe=0;pe<ke;++pe)we.charCodeAt(pe)>=128&&Wt("not-basic"),ce.push(we.charCodeAt(pe));for(qt=ke>0?ke+1:0;qt<de;){for(Kt=Ce,wt=1,Lt=xt;qt>=de&&Wt("invalid-input"),Zt=se(we.charCodeAt(qt++)),(Zt>=xt||Zt>jt((mt-Ce)/wt))&&Wt("overflow"),Ce+=Zt*wt,ee=Lt<=me?ft:Lt>=me+z?z:Lt-me,!(Zt<ee);Lt+=xt)It=xt-ee,wt>jt(mt/It)&&Wt("overflow"),wt*=It;le=ce.length+1,me=be(Ce-Kt,le,Kt==0),jt(Ce/le)>mt-fe&&Wt("overflow"),fe+=jt(Ce/le),Ce%=le,ce.splice(Ce++,0,fe)}return oe(ce)}function ne(we){var ce,de,le,Ce,fe,me,ke,pe,qt,Kt,wt,Lt=[],Zt,ee,It,Rt;for(we=Vt(we),Zt=we.length,ce=lt,de=0,fe=it,me=0;me<Zt;++me)wt=we[me],wt<128&&Lt.push(Nt(wt));for(le=Ce=Lt.length,Ce&&Lt.push(ut);le<Zt;){for(ke=mt,me=0;me<Zt;++me)wt=we[me],wt>=ce&&wt<ke&&(ke=wt);for(ee=le+1,ke-ce>jt((mt-de)/ee)&&Wt("overflow"),de+=(ke-ce)*ee,ce=ke,me=0;me<Zt;++me)if(wt=we[me],wt<ce&&++de>mt&&Wt("overflow"),wt==ce){for(pe=de,qt=xt;Kt=qt<=fe?ft:qt>=fe+z?z:qt-fe,!(pe<Kt);qt+=xt)Rt=pe-Kt,It=xt-Kt,Lt.push(Nt(he(Kt+Rt%It,0))),pe=jt(Rt/It);Lt.push(Nt(he(pe,0))),fe=be(de,ee,le==Ce),de=0,++le}++de,++ce}return Lt.join("")}function ve(we){return Ut(we,function(ce){return dt.test(ce)?Yt(ce.slice(4).toLowerCase()):ce})}function Se(we){return Ut(we,function(ce){return bt.test(ce)?"xn--"+ne(ce):ce})}if(Tt={version:"1.4.1",ucs2:{decode:Vt,encode:oe},decode:Yt,encode:ne,toASCII:Se,toUnicode:ve},typeof ue=="function"&&typeof ue.amd=="object"&&ue.amd)ue("punycode",function(){return Tt});else if(kt&&Ct)if(zt.exports==kt)Ct.exports=Tt;else for(_t in Tt)Tt.hasOwnProperty(_t)&&(kt[_t]=Tt[_t]);else gt.punycode=Tt})(this)}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ot,zt,Bt){"use strict";function vt(kt,Ct){return Object.prototype.hasOwnProperty.call(kt,Ct)}zt.exports=function(kt,Ct,yt,Tt){Ct=Ct||"&",yt=yt||"=";var mt={};if(typeof kt!="string"||kt.length===0)return mt;var xt=/\+/g;kt=kt.split(Ct);var ft=1e3;Tt&&typeof Tt.maxKeys=="number"&&(ft=Tt.maxKeys);var z=kt.length;ft>0&&z>ft&&(z=ft);for(var tt=0;tt<z;++tt){var at=kt[tt].replace(xt,"%20"),it=at.indexOf(yt),lt,ut,dt,bt;it>=0?(lt=at.substr(0,it),ut=at.substr(it+1)):(lt=at,ut=""),dt=decodeURIComponent(lt),bt=decodeURIComponent(ut),vt(mt,dt)?gt(mt[dt])?mt[dt].push(bt):mt[dt]=[mt[dt],bt]:mt[dt]=bt}return mt};var gt=Array.isArray||function(kt){return Object.prototype.toString.call(kt)==="[object Array]"}},{}],384:[function(ot,zt,Bt){"use strict";var vt=function(yt){switch(typeof yt){case"string":return yt;case"boolean":return yt?"true":"false";case"number":return isFinite(yt)?yt:"";default:return""}};zt.exports=function(yt,Tt,mt,xt){return Tt=Tt||"&",mt=mt||"=",yt===null&&(yt=void 0),typeof yt=="object"?kt(Ct(yt),function(ft){var z=encodeURIComponent(vt(ft))+mt;return gt(yt[ft])?kt(yt[ft],function(tt){return z+encodeURIComponent(vt(tt))}).join(Tt):z+encodeURIComponent(vt(yt[ft]))}).join(Tt):xt?encodeURIComponent(vt(xt))+mt+encodeURIComponent(vt(yt)):""};var gt=Array.isArray||function(yt){return Object.prototype.toString.call(yt)==="[object Array]"};function kt(yt,Tt){if(yt.map)return yt.map(Tt);for(var mt=[],xt=0;xt<yt.length;xt++)mt.push(Tt(yt[xt],xt));return mt}var Ct=Object.keys||function(yt){var Tt=[];for(var mt in yt)Object.prototype.hasOwnProperty.call(yt,mt)&&Tt.push(mt);return Tt}},{}],385:[function(ot,zt,Bt){"use strict";Bt.decode=Bt.parse=ot("./decode"),Bt.encode=Bt.stringify=ot("./encode")},{"./decode":383,"./encode":384}],386:[function(ot,zt,Bt){"use strict";var vt=ot("process-nextick-args"),gt=Object.keys||function(at){var it=[];for(var lt in at)it.push(lt);return it};zt.exports=ft;var kt=Object.create(ot("core-util-is"));kt.inherits=ot("inherits");var Ct=ot("./_stream_readable"),yt=ot("./_stream_writable");kt.inherits(ft,Ct);for(var Tt=gt(yt.prototype),mt=0;mt<Tt.length;mt++){var xt=Tt[mt];ft.prototype[xt]||(ft.prototype[xt]=yt.prototype[xt])}function ft(at){if(!(this instanceof ft))return new ft(at);Ct.call(this,at),yt.call(this,at),at&&at.readable===!1&&(this.readable=!1),at&&at.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,at&&at.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||vt.nextTick(tt,this)}function tt(at){at.end()}Object.defineProperty(ft.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(at){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=at,this._writableState.destroyed=at)}}),ft.prototype._destroy=function(at,it){this.push(null),this.end(),vt.nextTick(it,at)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(ot,zt,Bt){"use strict";zt.exports=kt;var vt=ot("./_stream_transform"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(kt,vt);function kt(Ct){if(!(this instanceof kt))return new kt(Ct);vt.call(this,Ct)}kt.prototype._transform=function(Ct,yt,Tt){Tt(null,Ct)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("process-nextick-args");zt.exports=Nt;var Ct=ot("isarray"),yt;Nt.ReadableState=jt;var Tt=ot("events").EventEmitter,mt=function(wt,Lt){return wt.listeners(Lt).length},xt=ot("./internal/streams/stream"),ft=ot("safe-buffer").Buffer,z=gt.Uint8Array||function(){};function tt(wt){return ft.from(wt)}function at(wt){return ft.isBuffer(wt)||wt instanceof z}var it=Object.create(ot("core-util-is"));it.inherits=ot("inherits");var lt=ot("util"),ut=void 0;lt&&lt.debuglog?ut=lt.debuglog("stream"):ut=function(){};var dt=ot("./internal/streams/BufferList"),bt=ot("./internal/streams/destroy"),At;it.inherits(Nt,xt);var Dt=["error","close","destroy","pause","resume"];function Ft(wt,Lt,Zt){if(typeof wt.prependListener=="function")return wt.prependListener(Lt,Zt);!wt._events||!wt._events[Lt]?wt.on(Lt,Zt):Ct(wt._events[Lt])?wt._events[Lt].unshift(Zt):wt._events[Lt]=[Zt,wt._events[Lt]]}function jt(wt,Lt){yt=yt||ot("./_stream_duplex"),wt=wt||{};var Zt=Lt instanceof yt;this.objectMode=!!wt.objectMode,Zt&&(this.objectMode=this.objectMode||!!wt.readableObjectMode);var ee=wt.highWaterMark,It=wt.readableHighWaterMark,Rt=this.objectMode?16:16*1024;ee||ee===0?this.highWaterMark=ee:Zt&&(It||It===0)?this.highWaterMark=It:this.highWaterMark=Rt,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new dt,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=wt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,wt.encoding&&(At||(At=ot("string_decoder/").StringDecoder),this.decoder=new At(wt.encoding),this.encoding=wt.encoding)}function Nt(wt){if(yt=yt||ot("./_stream_duplex"),!(this instanceof Nt))return new Nt(wt);this._readableState=new jt(wt,this),this.readable=!0,wt&&(typeof wt.read=="function"&&(this._read=wt.read),typeof wt.destroy=="function"&&(this._destroy=wt.destroy)),xt.call(this)}Object.defineProperty(Nt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(wt){this._readableState&&(this._readableState.destroyed=wt)}}),Nt.prototype.destroy=bt.destroy,Nt.prototype._undestroy=bt.undestroy,Nt.prototype._destroy=function(wt,Lt){this.push(null),Lt(wt)},Nt.prototype.push=function(wt,Lt){var Zt=this._readableState,ee;return Zt.objectMode?ee=!0:typeof wt=="string"&&(Lt=Lt||Zt.defaultEncoding,Lt!==Zt.encoding&&(wt=ft.from(wt,Lt),Lt=""),ee=!0),_t(this,wt,Lt,!1,ee)},Nt.prototype.unshift=function(wt){return _t(this,wt,null,!0,!1)};function _t(wt,Lt,Zt,ee,It){var Rt=wt._readableState;if(Lt===null)Rt.reading=!1,he(wt,Rt);else{var Ht;It||(Ht=Jt(Rt,Lt)),Ht?wt.emit("error",Ht):Rt.objectMode||Lt&&Lt.length>0?(typeof Lt!="string"&&!Rt.objectMode&&Object.getPrototypeOf(Lt)!==ft.prototype&&(Lt=tt(Lt)),ee?Rt.endEmitted?wt.emit("error",new Error("stream.unshift() after end event")):Wt(wt,Rt,Lt,!0):Rt.ended?wt.emit("error",new Error("stream.push() after EOF")):(Rt.reading=!1,Rt.decoder&&!Zt?(Lt=Rt.decoder.write(Lt),Rt.objectMode||Lt.length!==0?Wt(wt,Rt,Lt,!1):ne(wt,Rt)):Wt(wt,Rt,Lt,!1))):ee||(Rt.reading=!1)}return Ut(Rt)}function Wt(wt,Lt,Zt,ee){Lt.flowing&&Lt.length===0&&!Lt.sync?(wt.emit("data",Zt),wt.read(0)):(Lt.length+=Lt.objectMode?1:Zt.length,ee?Lt.buffer.unshift(Zt):Lt.buffer.push(Zt),Lt.needReadable&&be(wt)),ne(wt,Lt)}function Jt(wt,Lt){var Zt;return!at(Lt)&&typeof Lt!="string"&&Lt!==void 0&&!wt.objectMode&&(Zt=new TypeError("Invalid non-string/buffer chunk")),Zt}function Ut(wt){return!wt.ended&&(wt.needReadable||wt.length<wt.highWaterMark||wt.length===0)}Nt.prototype.isPaused=function(){return this._readableState.flowing===!1},Nt.prototype.setEncoding=function(wt){return At||(At=ot("string_decoder/").StringDecoder),this._readableState.decoder=new At(wt),this._readableState.encoding=wt,this};var Vt=8388608;function oe(wt){return wt>=Vt?wt=Vt:(wt--,wt|=wt>>>1,wt|=wt>>>2,wt|=wt>>>4,wt|=wt>>>8,wt|=wt>>>16,wt++),wt}function se(wt,Lt){return wt<=0||Lt.length===0&&Lt.ended?0:Lt.objectMode?1:wt!==wt?Lt.flowing&&Lt.length?Lt.buffer.head.data.length:Lt.length:(wt>Lt.highWaterMark&&(Lt.highWaterMark=oe(wt)),wt<=Lt.length?wt:Lt.ended?Lt.length:(Lt.needReadable=!0,0))}Nt.prototype.read=function(wt){ut("read",wt),wt=parseInt(wt,10);var Lt=this._readableState,Zt=wt;if(wt!==0&&(Lt.emittedReadable=!1),wt===0&&Lt.needReadable&&(Lt.length>=Lt.highWaterMark||Lt.ended))return ut("read: emitReadable",Lt.length,Lt.ended),Lt.length===0&&Lt.ended?pe(this):be(this),null;if(wt=se(wt,Lt),wt===0&&Lt.ended)return Lt.length===0&&pe(this),null;var ee=Lt.needReadable;ut("need readable",ee),(Lt.length===0||Lt.length-wt<Lt.highWaterMark)&&(ee=!0,ut("length less than watermark",ee)),Lt.ended||Lt.reading?(ee=!1,ut("reading or ended",ee)):ee&&(ut("do read"),Lt.reading=!0,Lt.sync=!0,Lt.length===0&&(Lt.needReadable=!0),this._read(Lt.highWaterMark),Lt.sync=!1,Lt.reading||(wt=se(Zt,Lt)));var It;return wt>0?It=Ce(wt,Lt):It=null,It===null?(Lt.needReadable=!0,wt=0):Lt.length-=wt,Lt.length===0&&(Lt.ended||(Lt.needReadable=!0),Zt!==wt&&Lt.ended&&pe(this)),It!==null&&this.emit("data",It),It};function he(wt,Lt){if(!Lt.ended){if(Lt.decoder){var Zt=Lt.decoder.end();Zt&&Zt.length&&(Lt.buffer.push(Zt),Lt.length+=Lt.objectMode?1:Zt.length)}Lt.ended=!0,be(wt)}}function be(wt){var Lt=wt._readableState;Lt.needReadable=!1,Lt.emittedReadable||(ut("emitReadable",Lt.flowing),Lt.emittedReadable=!0,Lt.sync?kt.nextTick(Yt,wt):Yt(wt))}function Yt(wt){ut("emit readable"),wt.emit("readable"),le(wt)}function ne(wt,Lt){Lt.readingMore||(Lt.readingMore=!0,kt.nextTick(ve,wt,Lt))}function ve(wt,Lt){for(var Zt=Lt.length;!Lt.reading&&!Lt.flowing&&!Lt.ended&&Lt.length<Lt.highWaterMark&&(ut("maybeReadMore read 0"),wt.read(0),Zt!==Lt.length);)Zt=Lt.length;Lt.readingMore=!1}Nt.prototype._read=function(wt){this.emit("error",new Error("_read() is not implemented"))},Nt.prototype.pipe=function(wt,Lt){var Zt=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=wt;break;case 1:ee.pipes=[ee.pipes,wt];break;default:ee.pipes.push(wt);break}ee.pipesCount+=1,ut("pipe count=%d opts=%j",ee.pipesCount,Lt);var It=(!Lt||Lt.end!==!1)&&wt!==vt.stdout&&wt!==vt.stderr,Rt=It?re:Ke;ee.endEmitted?kt.nextTick(Rt):Zt.once("end",Rt),wt.on("unpipe",Ht);function Ht(Ue,We){ut("onunpipe"),Ue===Zt&&We&&We.hasUnpiped===!1&&(We.hasUnpiped=!0,Ae())}function re(){ut("onend"),wt.end()}var ye=Se(Zt);wt.on("drain",ye);var Pe=!1;function Ae(){ut("cleanup"),wt.removeListener("close",qe),wt.removeListener("finish",nn),wt.removeListener("drain",ye),wt.removeListener("error",Qe),wt.removeListener("unpipe",Ht),Zt.removeListener("end",re),Zt.removeListener("end",Ke),Zt.removeListener("data",Ie),Pe=!0,ee.awaitDrain&&(!wt._writableState||wt._writableState.needDrain)&&ye()}var Oe=!1;Zt.on("data",Ie);function Ie(Ue){ut("ondata"),Oe=!1;var We=wt.write(Ue);We===!1&&!Oe&&((ee.pipesCount===1&&ee.pipes===wt||ee.pipesCount>1&&Kt(ee.pipes,wt)!==-1)&&!Pe&&(ut("false write response, pause",Zt._readableState.awaitDrain),Zt._readableState.awaitDrain++,Oe=!0),Zt.pause())}function Qe(Ue){ut("onerror",Ue),Ke(),wt.removeListener("error",Qe),mt(wt,"error")===0&&wt.emit("error",Ue)}Ft(wt,"error",Qe);function qe(){wt.removeListener("finish",nn),Ke()}wt.once("close",qe);function nn(){ut("onfinish"),wt.removeListener("close",qe),Ke()}wt.once("finish",nn);function Ke(){ut("unpipe"),Zt.unpipe(wt)}return wt.emit("pipe",Zt),ee.flowing||(ut("pipe resume"),Zt.resume()),wt};function Se(wt){return function(){var Lt=wt._readableState;ut("pipeOnDrain",Lt.awaitDrain),Lt.awaitDrain&&Lt.awaitDrain--,Lt.awaitDrain===0&&mt(wt,"data")&&(Lt.flowing=!0,le(wt))}}Nt.prototype.unpipe=function(wt){var Lt=this._readableState,Zt={hasUnpiped:!1};if(Lt.pipesCount===0)return this;if(Lt.pipesCount===1)return wt&&wt!==Lt.pipes?this:(wt||(wt=Lt.pipes),Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1,wt&&wt.emit("unpipe",this,Zt),this);if(!wt){var ee=Lt.pipes,It=Lt.pipesCount;Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1;for(var Rt=0;Rt<It;Rt++)ee[Rt].emit("unpipe",this,Zt);return this}var Ht=Kt(Lt.pipes,wt);return Ht===-1?this:(Lt.pipes.splice(Ht,1),Lt.pipesCount-=1,Lt.pipesCount===1&&(Lt.pipes=Lt.pipes[0]),wt.emit("unpipe",this,Zt),this)},Nt.prototype.on=function(wt,Lt){var Zt=xt.prototype.on.call(this,wt,Lt);if(wt==="data")this._readableState.flowing!==!1&&this.resume();else if(wt==="readable"){var ee=this._readableState;!ee.endEmitted&&!ee.readableListening&&(ee.readableListening=ee.needReadable=!0,ee.emittedReadable=!1,ee.reading?ee.length&&be(this):kt.nextTick(we,this))}return Zt},Nt.prototype.addListener=Nt.prototype.on;function we(wt){ut("readable nexttick read 0"),wt.read(0)}Nt.prototype.resume=function(){var wt=this._readableState;return wt.flowing||(ut("resume"),wt.flowing=!0,ce(this,wt)),this};function ce(wt,Lt){Lt.resumeScheduled||(Lt.resumeScheduled=!0,kt.nextTick(de,wt,Lt))}function de(wt,Lt){Lt.reading||(ut("resume read 0"),wt.read(0)),Lt.resumeScheduled=!1,Lt.awaitDrain=0,wt.emit("resume"),le(wt),Lt.flowing&&!Lt.reading&&wt.read(0)}Nt.prototype.pause=function(){return ut("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ut("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function le(wt){var Lt=wt._readableState;for(ut("flow",Lt.flowing);Lt.flowing&&wt.read()!==null;);}Nt.prototype.wrap=function(wt){var Lt=this,Zt=this._readableState,ee=!1;wt.on("end",function(){if(ut("wrapped end"),Zt.decoder&&!Zt.ended){var Ht=Zt.decoder.end();Ht&&Ht.length&&Lt.push(Ht)}Lt.push(null)}),wt.on("data",function(Ht){if(ut("wrapped data"),Zt.decoder&&(Ht=Zt.decoder.write(Ht)),!(Zt.objectMode&&Ht==null)&&!(!Zt.objectMode&&(!Ht||!Ht.length))){var re=Lt.push(Ht);re||(ee=!0,wt.pause())}});for(var It in wt)this[It]===void 0&&typeof wt[It]=="function"&&(this[It]=function(Ht){return function(){return wt[Ht].apply(wt,arguments)}}(It));for(var Rt=0;Rt<Dt.length;Rt++)wt.on(Dt[Rt],this.emit.bind(this,Dt[Rt]));return this._read=function(Ht){ut("wrapped _read",Ht),ee&&(ee=!1,wt.resume())},this},Object.defineProperty(Nt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Nt._fromList=Ce;function Ce(wt,Lt){if(Lt.length===0)return null;var Zt;return Lt.objectMode?Zt=Lt.buffer.shift():!wt||wt>=Lt.length?(Lt.decoder?Zt=Lt.buffer.join(""):Lt.buffer.length===1?Zt=Lt.buffer.head.data:Zt=Lt.buffer.concat(Lt.length),Lt.buffer.clear()):Zt=fe(wt,Lt.buffer,Lt.decoder),Zt}function fe(wt,Lt,Zt){var ee;return wt<Lt.head.data.length?(ee=Lt.head.data.slice(0,wt),Lt.head.data=Lt.head.data.slice(wt)):wt===Lt.head.data.length?ee=Lt.shift():ee=Zt?me(wt,Lt):ke(wt,Lt),ee}function me(wt,Lt){var Zt=Lt.head,ee=1,It=Zt.data;for(wt-=It.length;Zt=Zt.next;){var Rt=Zt.data,Ht=wt>Rt.length?Rt.length:wt;if(Ht===Rt.length?It+=Rt:It+=Rt.slice(0,wt),wt-=Ht,wt===0){Ht===Rt.length?(++ee,Zt.next?Lt.head=Zt.next:Lt.head=Lt.tail=null):(Lt.head=Zt,Zt.data=Rt.slice(Ht));break}++ee}return Lt.length-=ee,It}function ke(wt,Lt){var Zt=ft.allocUnsafe(wt),ee=Lt.head,It=1;for(ee.data.copy(Zt),wt-=ee.data.length;ee=ee.next;){var Rt=ee.data,Ht=wt>Rt.length?Rt.length:wt;if(Rt.copy(Zt,Zt.length-wt,0,Ht),wt-=Ht,wt===0){Ht===Rt.length?(++It,ee.next?Lt.head=ee.next:Lt.head=Lt.tail=null):(Lt.head=ee,ee.data=Rt.slice(Ht));break}++It}return Lt.length-=It,Zt}function pe(wt){var Lt=wt._readableState;if(Lt.length>0)throw new Error('"endReadable()" called on non-empty stream');Lt.endEmitted||(Lt.ended=!0,kt.nextTick(qt,Lt,wt))}function qt(wt,Lt){!wt.endEmitted&&wt.length===0&&(wt.endEmitted=!0,Lt.readable=!1,Lt.emit("end"))}function Kt(wt,Lt){for(var Zt=0,ee=wt.length;Zt<ee;Zt++)if(wt[Zt]===Lt)return Zt;return-1}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn: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(ot,zt,Bt){"use strict";zt.exports=Ct;var vt=ot("./_stream_duplex"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(Ct,vt);function kt(mt,xt){var ft=this._transformState;ft.transforming=!1;var z=ft.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));ft.writechunk=null,ft.writecb=null,xt!=null&&this.push(xt),z(mt);var tt=this._readableState;tt.reading=!1,(tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}function Ct(mt){if(!(this instanceof Ct))return new Ct(mt);vt.call(this,mt),this._transformState={afterTransform:kt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,mt&&(typeof mt.transform=="function"&&(this._transform=mt.transform),typeof mt.flush=="function"&&(this._flush=mt.flush)),this.on("prefinish",yt)}function yt(){var mt=this;typeof this._flush=="function"?this._flush(function(xt,ft){Tt(mt,xt,ft)}):Tt(this,null,null)}Ct.prototype.push=function(mt,xt){return this._transformState.needTransform=!1,vt.prototype.push.call(this,mt,xt)},Ct.prototype._transform=function(mt,xt,ft){throw new Error("_transform() is not implemented")},Ct.prototype._write=function(mt,xt,ft){var z=this._transformState;if(z.writecb=ft,z.writechunk=mt,z.writeencoding=xt,!z.transforming){var tt=this._readableState;(z.needTransform||tt.needReadable||tt.length<tt.highWaterMark)&&this._read(tt.highWaterMark)}},Ct.prototype._read=function(mt){var xt=this._transformState;xt.writechunk!==null&&xt.writecb&&!xt.transforming?(xt.transforming=!0,this._transform(xt.writechunk,xt.writeencoding,xt.afterTransform)):xt.needTransform=!0},Ct.prototype._destroy=function(mt,xt){var ft=this;vt.prototype._destroy.call(this,mt,function(z){xt(z),ft.emit("close")})};function Tt(mt,xt,ft){if(xt)return mt.emit("error",xt);if(ft!=null&&mt.push(ft),mt._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(mt._transformState.transforming)throw new Error("Calling transform done when still transforming");return mt.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(ot,zt,Bt){(function(vt,gt,kt){(function(){"use strict";var Ct=ot("process-nextick-args");zt.exports=Ft;function yt(de,le,Ce){this.chunk=de,this.encoding=le,this.callback=Ce,this.next=null}function Tt(de){var le=this;this.next=null,this.entry=null,this.finish=function(){ce(le,de)}}var mt=!vt.browser&&["v0.10","v0.9."].indexOf(vt.version.slice(0,5))>-1?kt:Ct.nextTick,xt;Ft.WritableState=At;var ft=Object.create(ot("core-util-is"));ft.inherits=ot("inherits");var z={deprecate:ot("util-deprecate")},tt=ot("./internal/streams/stream"),at=ot("safe-buffer").Buffer,it=gt.Uint8Array||function(){};function lt(de){return at.from(de)}function ut(de){return at.isBuffer(de)||de instanceof it}var dt=ot("./internal/streams/destroy");ft.inherits(Ft,tt);function bt(){}function At(de,le){xt=xt||ot("./_stream_duplex"),de=de||{};var Ce=le instanceof xt;this.objectMode=!!de.objectMode,Ce&&(this.objectMode=this.objectMode||!!de.writableObjectMode);var fe=de.highWaterMark,me=de.writableHighWaterMark,ke=this.objectMode?16:16*1024;fe||fe===0?this.highWaterMark=fe:Ce&&(me||me===0)?this.highWaterMark=me:this.highWaterMark=ke,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 pe=de.decodeStrings===!1;this.decodeStrings=!pe,this.defaultEncoding=de.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(qt){oe(le,qt)},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 Tt(this)}At.prototype.getBuffer=function(){for(var le=this.bufferedRequest,Ce=[];le;)Ce.push(le),le=le.next;return Ce},function(){try{Object.defineProperty(At.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(de){}}();var Dt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Dt=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ft,Symbol.hasInstance,{value:function(de){return Dt.call(this,de)?!0:this!==Ft?!1:de&&de._writableState instanceof At}})):Dt=function(de){return de instanceof this};function Ft(de){if(xt=xt||ot("./_stream_duplex"),!Dt.call(Ft,this)&&!(this instanceof xt))return new Ft(de);this._writableState=new At(de,this),this.writable=!0,de&&(typeof de.write=="function"&&(this._write=de.write),typeof de.writev=="function"&&(this._writev=de.writev),typeof de.destroy=="function"&&(this._destroy=de.destroy),typeof de.final=="function"&&(this._final=de.final)),tt.call(this)}Ft.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function jt(de,le){var Ce=new Error("write after end");de.emit("error",Ce),Ct.nextTick(le,Ce)}function Nt(de,le,Ce,fe){var me=!0,ke=!1;return Ce===null?ke=new TypeError("May not write null values to stream"):typeof Ce!="string"&&Ce!==void 0&&!le.objectMode&&(ke=new TypeError("Invalid non-string/buffer chunk")),ke&&(de.emit("error",ke),Ct.nextTick(fe,ke),me=!1),me}Ft.prototype.write=function(de,le,Ce){var fe=this._writableState,me=!1,ke=!fe.objectMode&&ut(de);return ke&&!at.isBuffer(de)&&(de=lt(de)),typeof le=="function"&&(Ce=le,le=null),ke?le="buffer":le||(le=fe.defaultEncoding),typeof Ce!="function"&&(Ce=bt),fe.ended?jt(this,Ce):(ke||Nt(this,fe,de,Ce))&&(fe.pendingcb++,me=Wt(this,fe,ke,de,le,Ce)),me},Ft.prototype.cork=function(){var de=this._writableState;de.corked++},Ft.prototype.uncork=function(){var de=this._writableState;de.corked&&(de.corked--,!de.writing&&!de.corked&&!de.finished&&!de.bufferProcessing&&de.bufferedRequest&&be(this,de))},Ft.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function _t(de,le,Ce){return!de.objectMode&&de.decodeStrings!==!1&&typeof le=="string"&&(le=at.from(le,Ce)),le}Object.defineProperty(Ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wt(de,le,Ce,fe,me,ke){if(!Ce){var pe=_t(le,fe,me);fe!==pe&&(Ce=!0,me="buffer",fe=pe)}var qt=le.objectMode?1:fe.length;le.length+=qt;var Kt=le.length<le.highWaterMark;if(Kt||(le.needDrain=!0),le.writing||le.corked){var wt=le.lastBufferedRequest;le.lastBufferedRequest={chunk:fe,encoding:me,isBuf:Ce,callback:ke,next:null},wt?wt.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else Jt(de,le,!1,qt,fe,me,ke);return Kt}function Jt(de,le,Ce,fe,me,ke,pe){le.writelen=fe,le.writecb=pe,le.writing=!0,le.sync=!0,Ce?de._writev(me,le.onwrite):de._write(me,ke,le.onwrite),le.sync=!1}function Ut(de,le,Ce,fe,me){--le.pendingcb,Ce?(Ct.nextTick(me,fe),Ct.nextTick(Se,de,le),de._writableState.errorEmitted=!0,de.emit("error",fe)):(me(fe),de._writableState.errorEmitted=!0,de.emit("error",fe),Se(de,le))}function Vt(de){de.writing=!1,de.writecb=null,de.length-=de.writelen,de.writelen=0}function oe(de,le){var Ce=de._writableState,fe=Ce.sync,me=Ce.writecb;if(Vt(Ce),le)Ut(de,Ce,fe,le,me);else{var ke=Yt(Ce);!ke&&!Ce.corked&&!Ce.bufferProcessing&&Ce.bufferedRequest&&be(de,Ce),fe?mt(se,de,Ce,ke,me):se(de,Ce,ke,me)}}function se(de,le,Ce,fe){Ce||he(de,le),le.pendingcb--,fe(),Se(de,le)}function he(de,le){le.length===0&&le.needDrain&&(le.needDrain=!1,de.emit("drain"))}function be(de,le){le.bufferProcessing=!0;var Ce=le.bufferedRequest;if(de._writev&&Ce&&Ce.next){var fe=le.bufferedRequestCount,me=new Array(fe),ke=le.corkedRequestsFree;ke.entry=Ce;for(var pe=0,qt=!0;Ce;)me[pe]=Ce,Ce.isBuf||(qt=!1),Ce=Ce.next,pe+=1;me.allBuffers=qt,Jt(de,le,!0,le.length,me,"",ke.finish),le.pendingcb++,le.lastBufferedRequest=null,ke.next?(le.corkedRequestsFree=ke.next,ke.next=null):le.corkedRequestsFree=new Tt(le),le.bufferedRequestCount=0}else{for(;Ce;){var Kt=Ce.chunk,wt=Ce.encoding,Lt=Ce.callback,Zt=le.objectMode?1:Kt.length;if(Jt(de,le,!1,Zt,Kt,wt,Lt),Ce=Ce.next,le.bufferedRequestCount--,le.writing)break}Ce===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=Ce,le.bufferProcessing=!1}Ft.prototype._write=function(de,le,Ce){Ce(new Error("_write() is not implemented"))},Ft.prototype._writev=null,Ft.prototype.end=function(de,le,Ce){var fe=this._writableState;typeof de=="function"?(Ce=de,de=null,le=null):typeof le=="function"&&(Ce=le,le=null),de!=null&&this.write(de,le),fe.corked&&(fe.corked=1,this.uncork()),!fe.ending&&!fe.finished&&we(this,fe,Ce)};function Yt(de){return de.ending&&de.length===0&&de.bufferedRequest===null&&!de.finished&&!de.writing}function ne(de,le){de._final(function(Ce){le.pendingcb--,Ce&&de.emit("error",Ce),le.prefinished=!0,de.emit("prefinish"),Se(de,le)})}function ve(de,le){!le.prefinished&&!le.finalCalled&&(typeof de._final=="function"?(le.pendingcb++,le.finalCalled=!0,Ct.nextTick(ne,de,le)):(le.prefinished=!0,de.emit("prefinish")))}function Se(de,le){var Ce=Yt(le);return Ce&&(ve(de,le),le.pendingcb===0&&(le.finished=!0,de.emit("finish"))),Ce}function we(de,le,Ce){le.ending=!0,Se(de,le),Ce&&(le.finished?Ct.nextTick(Ce):de.once("finish",Ce)),le.ended=!0,de.writable=!1}function ce(de,le,Ce){var fe=de.entry;for(de.entry=null;fe;){var me=fe.callback;le.pendingcb--,me(Ce),fe=fe.next}le.corkedRequestsFree?le.corkedRequestsFree.next=de:le.corkedRequestsFree=de}Object.defineProperty(Ft.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(de){this._writableState&&(this._writableState.destroyed=de)}}),Ft.prototype.destroy=dt.destroy,Ft.prototype._undestroy=dt.undestroy,Ft.prototype._destroy=function(de,le){this.end(),le(de)}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,zt,Bt){"use strict";function vt(yt,Tt){if(!(yt instanceof Tt))throw new TypeError("Cannot call a class as a function")}var gt=ot("safe-buffer").Buffer,kt=ot("util");function Ct(yt,Tt,mt){yt.copy(Tt,mt)}zt.exports=function(){function yt(){vt(this,yt),this.head=null,this.tail=null,this.length=0}return yt.prototype.push=function(mt){var xt={data:mt,next:null};this.length>0?this.tail.next=xt:this.head=xt,this.tail=xt,++this.length},yt.prototype.unshift=function(mt){var xt={data:mt,next:this.head};this.length===0&&(this.tail=xt),this.head=xt,++this.length},yt.prototype.shift=function(){if(this.length!==0){var mt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,mt}},yt.prototype.clear=function(){this.head=this.tail=null,this.length=0},yt.prototype.join=function(mt){if(this.length===0)return"";for(var xt=this.head,ft=""+xt.data;xt=xt.next;)ft+=mt+xt.data;return ft},yt.prototype.concat=function(mt){if(this.length===0)return gt.alloc(0);if(this.length===1)return this.head.data;for(var xt=gt.allocUnsafe(mt>>>0),ft=this.head,z=0;ft;)Ct(ft.data,xt,z),z+=ft.data.length,ft=ft.next;return xt},yt}(),kt&&kt.inspect&&kt.inspect.custom&&(zt.exports.prototype[kt.inspect.custom]=function(){var yt=kt.inspect({length:this.length});return this.constructor.name+" "+yt})},{"safe-buffer":396,util:89}],392:[function(ot,zt,Bt){"use strict";var vt=ot("process-nextick-args");function gt(yt,Tt){var mt=this,xt=this._readableState&&this._readableState.destroyed,ft=this._writableState&&this._writableState.destroyed;return xt||ft?(Tt?Tt(yt):yt&&(!this._writableState||!this._writableState.errorEmitted)&&vt.nextTick(Ct,this,yt),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(yt||null,function(z){!Tt&&z?(vt.nextTick(Ct,mt,z),mt._writableState&&(mt._writableState.errorEmitted=!0)):Tt&&Tt(z)}),this)}function kt(){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 Ct(yt,Tt){yt.emit("error",Tt)}zt.exports={destroy:gt,undestroy:kt}},{"process-nextick-args":380}],393:[function(ot,zt,Bt){zt.exports=ot("events").EventEmitter},{events:344}],394:[function(ot,zt,Bt){Bt=zt.exports=ot("./lib/_stream_readable.js"),Bt.Stream=Bt,Bt.Readable=Bt,Bt.Writable=ot("./lib/_stream_writable.js"),Bt.Duplex=ot("./lib/_stream_duplex.js"),Bt.Transform=ot("./lib/_stream_transform.js"),Bt.PassThrough=ot("./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(ot,zt,Bt){var vt=function(gt){"use strict";var kt=Object.prototype,Ct=kt.hasOwnProperty,yt,Tt=typeof Symbol=="function"?Symbol:{},mt=Tt.iterator||"@@iterator",xt=Tt.asyncIterator||"@@asyncIterator",ft=Tt.toStringTag||"@@toStringTag";function z(ve,Se,we){return Object.defineProperty(ve,Se,{value:we,enumerable:!0,configurable:!0,writable:!0}),ve[Se]}try{z({},"")}catch(ve){z=function(Se,we,ce){return Se[we]=ce}}function tt(ve,Se,we,ce){var de=Se&&Se.prototype instanceof At?Se:At,le=Object.create(de.prototype),Ce=new be(ce||[]);return le._invoke=Vt(ve,we,Ce),le}gt.wrap=tt;function at(ve,Se,we){try{return{type:"normal",arg:ve.call(Se,we)}}catch(ce){return{type:"throw",arg:ce}}}var it="suspendedStart",lt="suspendedYield",ut="executing",dt="completed",bt={};function At(){}function Dt(){}function Ft(){}var jt={};z(jt,mt,function(){return this});var Nt=Object.getPrototypeOf,_t=Nt&&Nt(Nt(Yt([])));_t&&_t!==kt&&Ct.call(_t,mt)&&(jt=_t);var Wt=Ft.prototype=At.prototype=Object.create(jt);Dt.prototype=Ft,z(Wt,"constructor",Ft),z(Ft,"constructor",Dt),Dt.displayName=z(Ft,ft,"GeneratorFunction");function Jt(ve){["next","throw","return"].forEach(function(Se){z(ve,Se,function(we){return this._invoke(Se,we)})})}gt.isGeneratorFunction=function(ve){var Se=typeof ve=="function"&&ve.constructor;return Se?Se===Dt||(Se.displayName||Se.name)==="GeneratorFunction":!1},gt.mark=function(ve){return Object.setPrototypeOf?Object.setPrototypeOf(ve,Ft):(ve.__proto__=Ft,z(ve,ft,"GeneratorFunction")),ve.prototype=Object.create(Wt),ve},gt.awrap=function(ve){return{__await:ve}};function Ut(ve,Se){function we(le,Ce,fe,me){var ke=at(ve[le],ve,Ce);if(ke.type==="throw")me(ke.arg);else{var pe=ke.arg,qt=pe.value;return qt&&typeof qt=="object"&&Ct.call(qt,"__await")?Se.resolve(qt.__await).then(function(Kt){we("next",Kt,fe,me)},function(Kt){we("throw",Kt,fe,me)}):Se.resolve(qt).then(function(Kt){pe.value=Kt,fe(pe)},function(Kt){return we("throw",Kt,fe,me)})}}var ce;function de(le,Ce){function fe(){return new Se(function(me,ke){we(le,Ce,me,ke)})}return ce=ce?ce.then(fe,fe):fe()}this._invoke=de}Jt(Ut.prototype),z(Ut.prototype,xt,function(){return this}),gt.AsyncIterator=Ut,gt.async=function(ve,Se,we,ce,de){de===void 0&&(de=Promise);var le=new Ut(tt(ve,Se,we,ce),de);return gt.isGeneratorFunction(Se)?le:le.next().then(function(Ce){return Ce.done?Ce.value:le.next()})};function Vt(ve,Se,we){var ce=it;return function(le,Ce){if(ce===ut)throw new Error("Generator is already running");if(ce===dt){if(le==="throw")throw Ce;return ne()}for(we.method=le,we.arg=Ce;;){var fe=we.delegate;if(fe){var me=oe(fe,we);if(me){if(me===bt)continue;return me}}if(we.method==="next")we.sent=we._sent=we.arg;else if(we.method==="throw"){if(ce===it)throw ce=dt,we.arg;we.dispatchException(we.arg)}else we.method==="return"&&we.abrupt("return",we.arg);ce=ut;var ke=at(ve,Se,we);if(ke.type==="normal"){if(ce=we.done?dt:lt,ke.arg===bt)continue;return{value:ke.arg,done:we.done}}else ke.type==="throw"&&(ce=dt,we.method="throw",we.arg=ke.arg)}}}function oe(ve,Se){var we=ve.iterator[Se.method];if(we===yt){if(Se.delegate=null,Se.method==="throw"){if(ve.iterator.return&&(Se.method="return",Se.arg=yt,oe(ve,Se),Se.method==="throw"))return bt;Se.method="throw",Se.arg=new TypeError("The iterator does not provide a 'throw' method")}return bt}var ce=at(we,ve.iterator,Se.arg);if(ce.type==="throw")return Se.method="throw",Se.arg=ce.arg,Se.delegate=null,bt;var de=ce.arg;if(!de)return Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,bt;if(de.done)Se[ve.resultName]=de.value,Se.next=ve.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=yt);else return de;return Se.delegate=null,bt}Jt(Wt),z(Wt,ft,"Generator"),z(Wt,mt,function(){return this}),z(Wt,"toString",function(){return"[object Generator]"});function se(ve){var Se={tryLoc:ve[0]};1 in ve&&(Se.catchLoc=ve[1]),2 in ve&&(Se.finallyLoc=ve[2],Se.afterLoc=ve[3]),this.tryEntries.push(Se)}function he(ve){var Se=ve.completion||{};Se.type="normal",delete Se.arg,ve.completion=Se}function be(ve){this.tryEntries=[{tryLoc:"root"}],ve.forEach(se,this),this.reset(!0)}gt.keys=function(ve){var Se=[];for(var we in ve)Se.push(we);return Se.reverse(),function ce(){for(;Se.length;){var de=Se.pop();if(de in ve)return ce.value=de,ce.done=!1,ce}return ce.done=!0,ce}};function Yt(ve){if(ve){var Se=ve[mt];if(Se)return Se.call(ve);if(typeof ve.next=="function")return ve;if(!isNaN(ve.length)){var we=-1,ce=function de(){for(;++we<ve.length;)if(Ct.call(ve,we))return de.value=ve[we],de.done=!1,de;return de.value=yt,de.done=!0,de};return ce.next=ce}}return{next:ne}}gt.values=Yt;function ne(){return{value:yt,done:!0}}return be.prototype={constructor:be,reset:function(ve){if(this.prev=0,this.next=0,this.sent=this._sent=yt,this.done=!1,this.delegate=null,this.method="next",this.arg=yt,this.tryEntries.forEach(he),!ve)for(var Se in this)Se.charAt(0)==="t"&&Ct.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=yt)},stop:function(){this.done=!0;var ve=this.tryEntries[0],Se=ve.completion;if(Se.type==="throw")throw Se.arg;return this.rval},dispatchException:function(ve){if(this.done)throw ve;var Se=this;function we(me,ke){return le.type="throw",le.arg=ve,Se.next=me,ke&&(Se.method="next",Se.arg=yt),!!ke}for(var ce=this.tryEntries.length-1;ce>=0;--ce){var de=this.tryEntries[ce],le=de.completion;if(de.tryLoc==="root")return we("end");if(de.tryLoc<=this.prev){var Ce=Ct.call(de,"catchLoc"),fe=Ct.call(de,"finallyLoc");if(Ce&&fe){if(this.prev<de.catchLoc)return we(de.catchLoc,!0);if(this.prev<de.finallyLoc)return we(de.finallyLoc)}else if(Ce){if(this.prev<de.catchLoc)return we(de.catchLoc,!0)}else if(fe){if(this.prev<de.finallyLoc)return we(de.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ve,Se){for(var we=this.tryEntries.length-1;we>=0;--we){var ce=this.tryEntries[we];if(ce.tryLoc<=this.prev&&Ct.call(ce,"finallyLoc")&&this.prev<ce.finallyLoc){var de=ce;break}}de&&(ve==="break"||ve==="continue")&&de.tryLoc<=Se&&Se<=de.finallyLoc&&(de=null);var le=de?de.completion:{};return le.type=ve,le.arg=Se,de?(this.method="next",this.next=de.finallyLoc,bt):this.complete(le)},complete:function(ve,Se){if(ve.type==="throw")throw ve.arg;return ve.type==="break"||ve.type==="continue"?this.next=ve.arg:ve.type==="return"?(this.rval=this.arg=ve.arg,this.method="return",this.next="end"):ve.type==="normal"&&Se&&(this.next=Se),bt},finish:function(ve){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var we=this.tryEntries[Se];if(we.finallyLoc===ve)return this.complete(we.completion,we.afterLoc),he(we),bt}},catch:function(ve){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var we=this.tryEntries[Se];if(we.tryLoc===ve){var ce=we.completion;if(ce.type==="throw"){var de=ce.arg;he(we)}return de}}throw new Error("illegal catch attempt")},delegateYield:function(ve,Se,we){return this.delegate={iterator:Yt(ve),resultName:Se,nextLoc:we},this.method==="next"&&(this.arg=yt),bt}},gt}(typeof zt=="object"?zt.exports:{});try{regeneratorRuntime=vt}catch(gt){typeof globalThis=="object"?globalThis.regeneratorRuntime=vt:Function("r","regeneratorRuntime = r")(vt)}},{}],396:[function(ot,zt,Bt){var vt=ot("buffer"),gt=vt.Buffer;function kt(yt,Tt){for(var mt in yt)Tt[mt]=yt[mt]}gt.from&&gt.alloc&&gt.allocUnsafe&&gt.allocUnsafeSlow?zt.exports=vt:(kt(vt,Bt),Bt.Buffer=Ct);function Ct(yt,Tt,mt){return gt(yt,Tt,mt)}kt(gt,Ct),Ct.from=function(yt,Tt,mt){if(typeof yt=="number")throw new TypeError("Argument must not be a number");return gt(yt,Tt,mt)},Ct.alloc=function(yt,Tt,mt){if(typeof yt!="number")throw new TypeError("Argument must be a number");var xt=gt(yt);return Tt!==void 0?typeof mt=="string"?xt.fill(Tt,mt):xt.fill(Tt):xt.fill(0),xt},Ct.allocUnsafe=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return gt(yt)},Ct.allocUnsafeSlow=function(yt){if(typeof yt!="number")throw new TypeError("Argument must be a number");return vt.SlowBuffer(yt)}},{buffer:90}],397:[function(ot,zt,Bt){(function(vt){(function(){(function(gt){gt.parser=function(pe,qt){return new Ct(pe,qt)},gt.SAXParser=Ct,gt.SAXStream=tt,gt.createStream=z,gt.MAX_BUFFER_LENGTH=64*1024;var kt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];gt.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ct(pe,qt){if(!(this instanceof Ct))return new Ct(pe,qt);var Kt=this;Tt(Kt),Kt.q=Kt.c="",Kt.bufferCheckPosition=gt.MAX_BUFFER_LENGTH,Kt.opt=qt||{},Kt.opt.lowercase=Kt.opt.lowercase||Kt.opt.lowercasetags,Kt.looseCase=Kt.opt.lowercase?"toLowerCase":"toUpperCase",Kt.tags=[],Kt.closed=Kt.closedRoot=Kt.sawRoot=!1,Kt.tag=Kt.error=null,Kt.strict=!!pe,Kt.noscript=!!(pe||Kt.opt.noscript),Kt.state=Ut.BEGIN,Kt.strictEntities=Kt.opt.strictEntities,Kt.ENTITIES=Kt.strictEntities?Object.create(gt.XML_ENTITIES):Object.create(gt.ENTITIES),Kt.attribList=[],Kt.opt.xmlns&&(Kt.ns=Object.create(dt)),Kt.trackPosition=Kt.opt.position!==!1,Kt.trackPosition&&(Kt.position=Kt.line=Kt.column=0),oe(Kt,"onready")}Object.create||(Object.create=function(pe){function qt(){}qt.prototype=pe;var Kt=new qt;return Kt}),Object.keys||(Object.keys=function(pe){var qt=[];for(var Kt in pe)pe.hasOwnProperty(Kt)&&qt.push(Kt);return qt});function yt(pe){for(var qt=Math.max(gt.MAX_BUFFER_LENGTH,10),Kt=0,wt=0,Lt=kt.length;wt<Lt;wt++){var Zt=pe[kt[wt]].length;if(Zt>qt)switch(kt[wt]){case"textNode":he(pe);break;case"cdata":se(pe,"oncdata",pe.cdata),pe.cdata="";break;case"script":se(pe,"onscript",pe.script),pe.script="";break;default:Yt(pe,"Max buffer length exceeded: "+kt[wt])}Kt=Math.max(Kt,Zt)}var ee=gt.MAX_BUFFER_LENGTH-Kt;pe.bufferCheckPosition=ee+pe.position}function Tt(pe){for(var qt=0,Kt=kt.length;qt<Kt;qt++)pe[kt[qt]]=""}function mt(pe){he(pe),pe.cdata!==""&&(se(pe,"oncdata",pe.cdata),pe.cdata=""),pe.script!==""&&(se(pe,"onscript",pe.script),pe.script="")}Ct.prototype={end:function(){ne(this)},write:ke,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){mt(this)}};var xt;try{xt=ot("stream").Stream}catch(pe){xt=function(){}}var ft=gt.EVENTS.filter(function(pe){return pe!=="error"&&pe!=="end"});function z(pe,qt){return new tt(pe,qt)}function tt(pe,qt){if(!(this instanceof tt))return new tt(pe,qt);xt.apply(this),this._parser=new Ct(pe,qt),this.writable=!0,this.readable=!0;var Kt=this;this._parser.onend=function(){Kt.emit("end")},this._parser.onerror=function(wt){Kt.emit("error",wt),Kt._parser.error=null},this._decoder=null,ft.forEach(function(wt){Object.defineProperty(Kt,"on"+wt,{get:function(){return Kt._parser["on"+wt]},set:function(Lt){if(!Lt)return Kt.removeAllListeners(wt),Kt._parser["on"+wt]=Lt,Lt;Kt.on(wt,Lt)},enumerable:!0,configurable:!1})})}tt.prototype=Object.create(xt.prototype,{constructor:{value:tt}}),tt.prototype.write=function(pe){if(typeof vt=="function"&&typeof vt.isBuffer=="function"&&vt.isBuffer(pe)){if(!this._decoder){var qt=ot("string_decoder").StringDecoder;this._decoder=new qt("utf8")}pe=this._decoder.write(pe)}return this._parser.write(pe.toString()),this.emit("data",pe),!0},tt.prototype.end=function(pe){return pe&&pe.length&&this.write(pe),this._parser.end(),!0},tt.prototype.on=function(pe,qt){var Kt=this;return!Kt._parser["on"+pe]&&ft.indexOf(pe)!==-1&&(Kt._parser["on"+pe]=function(){var wt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);wt.splice(0,0,pe),Kt.emit.apply(Kt,wt)}),xt.prototype.on.call(Kt,pe,qt)};var at="[CDATA[",it="DOCTYPE",lt="http://www.w3.org/XML/1998/namespace",ut="http://www.w3.org/2000/xmlns/",dt={xml:lt,xmlns:ut},bt=/[:_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]/,At=/[:_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-]/,Dt=/[#:_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]/,Ft=/[#:_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 jt(pe){return pe===" "||pe===`
`||pe==="\r"||pe===" "}function Nt(pe){return pe==='"'||pe==="'"}function _t(pe){return pe===">"||jt(pe)}function Wt(pe,qt){return pe.test(qt)}function Jt(pe,qt){return!Wt(pe,qt)}var Ut=0;gt.STATE={BEGIN:Ut++,BEGIN_WHITESPACE:Ut++,TEXT:Ut++,TEXT_ENTITY:Ut++,OPEN_WAKA:Ut++,SGML_DECL:Ut++,SGML_DECL_QUOTED:Ut++,DOCTYPE:Ut++,DOCTYPE_QUOTED:Ut++,DOCTYPE_DTD:Ut++,DOCTYPE_DTD_QUOTED:Ut++,COMMENT_STARTING:Ut++,COMMENT:Ut++,COMMENT_ENDING:Ut++,COMMENT_ENDED:Ut++,CDATA:Ut++,CDATA_ENDING:Ut++,CDATA_ENDING_2:Ut++,PROC_INST:Ut++,PROC_INST_BODY:Ut++,PROC_INST_ENDING:Ut++,OPEN_TAG:Ut++,OPEN_TAG_SLASH:Ut++,ATTRIB:Ut++,ATTRIB_NAME:Ut++,ATTRIB_NAME_SAW_WHITE:Ut++,ATTRIB_VALUE:Ut++,ATTRIB_VALUE_QUOTED:Ut++,ATTRIB_VALUE_CLOSED:Ut++,ATTRIB_VALUE_UNQUOTED:Ut++,ATTRIB_VALUE_ENTITY_Q:Ut++,ATTRIB_VALUE_ENTITY_U:Ut++,CLOSE_TAG:Ut++,CLOSE_TAG_SAW_WHITE:Ut++,SCRIPT:Ut++,SCRIPT_ENDING:Ut++},gt.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},gt.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(gt.ENTITIES).forEach(function(pe){var qt=gt.ENTITIES[pe],Kt=typeof qt=="number"?String.fromCharCode(qt):qt;gt.ENTITIES[pe]=Kt});for(var Vt in gt.STATE)gt.STATE[gt.STATE[Vt]]=Vt;Ut=gt.STATE;function oe(pe,qt,Kt){pe[qt]&&pe[qt](Kt)}function se(pe,qt,Kt){pe.textNode&&he(pe),oe(pe,qt,Kt)}function he(pe){pe.textNode=be(pe.opt,pe.textNode),pe.textNode&&oe(pe,"ontext",pe.textNode),pe.textNode=""}function be(pe,qt){return pe.trim&&(qt=qt.trim()),pe.normalize&&(qt=qt.replace(/\s+/g," ")),qt}function Yt(pe,qt){return he(pe),pe.trackPosition&&(qt+=`
Line: `+pe.line+`
Column: `+pe.column+`
Char: `+pe.c),qt=new Error(qt),pe.error=qt,oe(pe,"onerror",qt),pe}function ne(pe){return pe.sawRoot&&!pe.closedRoot&&ve(pe,"Unclosed root tag"),pe.state!==Ut.BEGIN&&pe.state!==Ut.BEGIN_WHITESPACE&&pe.state!==Ut.TEXT&&Yt(pe,"Unexpected end"),he(pe),pe.c="",pe.closed=!0,oe(pe,"onend"),Ct.call(pe,pe.strict,pe.opt),pe}function ve(pe,qt){if(typeof pe!="object"||!(pe instanceof Ct))throw new Error("bad call to strictFail");pe.strict&&Yt(pe,qt)}function Se(pe){pe.strict||(pe.tagName=pe.tagName[pe.looseCase]());var qt=pe.tags[pe.tags.length-1]||pe,Kt=pe.tag={name:pe.tagName,attributes:{}};pe.opt.xmlns&&(Kt.ns=qt.ns),pe.attribList.length=0,se(pe,"onopentagstart",Kt)}function we(pe,qt){var Kt=pe.indexOf(":"),wt=Kt<0?["",pe]:pe.split(":"),Lt=wt[0],Zt=wt[1];return qt&&pe==="xmlns"&&(Lt="xmlns",Zt=""),{prefix:Lt,local:Zt}}function ce(pe){if(pe.strict||(pe.attribName=pe.attribName[pe.looseCase]()),pe.attribList.indexOf(pe.attribName)!==-1||pe.tag.attributes.hasOwnProperty(pe.attribName)){pe.attribName=pe.attribValue="";return}if(pe.opt.xmlns){var qt=we(pe.attribName,!0),Kt=qt.prefix,wt=qt.local;if(Kt==="xmlns")if(wt==="xml"&&pe.attribValue!==lt)ve(pe,"xml: prefix must be bound to "+lt+`
Actual: `+pe.attribValue);else if(wt==="xmlns"&&pe.attribValue!==ut)ve(pe,"xmlns: prefix must be bound to "+ut+`
Actual: `+pe.attribValue);else{var Lt=pe.tag,Zt=pe.tags[pe.tags.length-1]||pe;Lt.ns===Zt.ns&&(Lt.ns=Object.create(Zt.ns)),Lt.ns[wt]=pe.attribValue}pe.attribList.push([pe.attribName,pe.attribValue])}else pe.tag.attributes[pe.attribName]=pe.attribValue,se(pe,"onattribute",{name:pe.attribName,value:pe.attribValue});pe.attribName=pe.attribValue=""}function de(pe,qt){if(pe.opt.xmlns){var Kt=pe.tag,wt=we(pe.tagName);Kt.prefix=wt.prefix,Kt.local=wt.local,Kt.uri=Kt.ns[wt.prefix]||"",Kt.prefix&&!Kt.uri&&(ve(pe,"Unbound namespace prefix: "+JSON.stringify(pe.tagName)),Kt.uri=wt.prefix);var Lt=pe.tags[pe.tags.length-1]||pe;Kt.ns&&Lt.ns!==Kt.ns&&Object.keys(Kt.ns).forEach(function(Ie){se(pe,"onopennamespace",{prefix:Ie,uri:Kt.ns[Ie]})});for(var Zt=0,ee=pe.attribList.length;Zt<ee;Zt++){var It=pe.attribList[Zt],Rt=It[0],Ht=It[1],re=we(Rt,!0),ye=re.prefix,Pe=re.local,Ae=ye===""?"":Kt.ns[ye]||"",Oe={name:Rt,value:Ht,prefix:ye,local:Pe,uri:Ae};ye&&ye!=="xmlns"&&!Ae&&(ve(pe,"Unbound namespace prefix: "+JSON.stringify(ye)),Oe.uri=ye),pe.tag.attributes[Rt]=Oe,se(pe,"onattribute",Oe)}pe.attribList.length=0}pe.tag.isSelfClosing=!!qt,pe.sawRoot=!0,pe.tags.push(pe.tag),se(pe,"onopentag",pe.tag),qt||(!pe.noscript&&pe.tagName.toLowerCase()==="script"?pe.state=Ut.SCRIPT:pe.state=Ut.TEXT,pe.tag=null,pe.tagName=""),pe.attribName=pe.attribValue="",pe.attribList.length=0}function le(pe){if(!pe.tagName){ve(pe,"Weird empty close tag."),pe.textNode+="</>",pe.state=Ut.TEXT;return}if(pe.script){if(pe.tagName!=="script"){pe.script+="</"+pe.tagName+">",pe.tagName="",pe.state=Ut.SCRIPT;return}se(pe,"onscript",pe.script),pe.script=""}var qt=pe.tags.length,Kt=pe.tagName;pe.strict||(Kt=Kt[pe.looseCase]());for(var wt=Kt;qt--;){var Lt=pe.tags[qt];if(Lt.name!==wt)ve(pe,"Unexpected close tag");else break}if(qt<0){ve(pe,"Unmatched closing tag: "+pe.tagName),pe.textNode+="</"+pe.tagName+">",pe.state=Ut.TEXT;return}pe.tagName=Kt;for(var Zt=pe.tags.length;Zt-- >qt;){var ee=pe.tag=pe.tags.pop();pe.tagName=pe.tag.name,se(pe,"onclosetag",pe.tagName);var It={};for(var Rt in ee.ns)It[Rt]=ee.ns[Rt];var Ht=pe.tags[pe.tags.length-1]||pe;pe.opt.xmlns&&ee.ns!==Ht.ns&&Object.keys(ee.ns).forEach(function(re){var ye=ee.ns[re];se(pe,"onclosenamespace",{prefix:re,uri:ye})})}qt===0&&(pe.closedRoot=!0),pe.tagName=pe.attribValue=pe.attribName="",pe.attribList.length=0,pe.state=Ut.TEXT}function Ce(pe){var qt=pe.entity,Kt=qt.toLowerCase(),wt,Lt="";return pe.ENTITIES[qt]?pe.ENTITIES[qt]:pe.ENTITIES[Kt]?pe.ENTITIES[Kt]:(qt=Kt,qt.charAt(0)==="#"&&(qt.charAt(1)==="x"?(qt=qt.slice(2),wt=parseInt(qt,16),Lt=wt.toString(16)):(qt=qt.slice(1),wt=parseInt(qt,10),Lt=wt.toString(10))),qt=qt.replace(/^0+/,""),isNaN(wt)||Lt.toLowerCase()!==qt?(ve(pe,"Invalid character entity"),"&"+pe.entity+";"):String.fromCodePoint(wt))}function fe(pe,qt){qt==="<"?(pe.state=Ut.OPEN_WAKA,pe.startTagPosition=pe.position):jt(qt)||(ve(pe,"Non-whitespace before first tag."),pe.textNode=qt,pe.state=Ut.TEXT)}function me(pe,qt){var Kt="";return qt<pe.length&&(Kt=pe.charAt(qt)),Kt}function ke(pe){var qt=this;if(this.error)throw this.error;if(qt.closed)return Yt(qt,"Cannot write after close. Assign an onready handler.");if(pe===null)return ne(qt);typeof pe=="object"&&(pe=pe.toString());for(var Kt=0,wt="";wt=me(pe,Kt++),qt.c=wt,!!wt;)switch(qt.trackPosition&&(qt.position++,wt===`
`?(qt.line++,qt.column=0):qt.column++),qt.state){case Ut.BEGIN:if(qt.state=Ut.BEGIN_WHITESPACE,wt==="\uFEFF")continue;fe(qt,wt);continue;case Ut.BEGIN_WHITESPACE:fe(qt,wt);continue;case Ut.TEXT:if(qt.sawRoot&&!qt.closedRoot){for(var Lt=Kt-1;wt&&wt!=="<"&&wt!=="&";)wt=me(pe,Kt++),wt&&qt.trackPosition&&(qt.position++,wt===`
`?(qt.line++,qt.column=0):qt.column++);qt.textNode+=pe.substring(Lt,Kt-1)}wt==="<"&&!(qt.sawRoot&&qt.closedRoot&&!qt.strict)?(qt.state=Ut.OPEN_WAKA,qt.startTagPosition=qt.position):(!jt(wt)&&(!qt.sawRoot||qt.closedRoot)&&ve(qt,"Text data outside of root node."),wt==="&"?qt.state=Ut.TEXT_ENTITY:qt.textNode+=wt);continue;case Ut.SCRIPT:wt==="<"?qt.state=Ut.SCRIPT_ENDING:qt.script+=wt;continue;case Ut.SCRIPT_ENDING:wt==="/"?qt.state=Ut.CLOSE_TAG:(qt.script+="<"+wt,qt.state=Ut.SCRIPT);continue;case Ut.OPEN_WAKA:if(wt==="!")qt.state=Ut.SGML_DECL,qt.sgmlDecl="";else if(!jt(wt))if(Wt(bt,wt))qt.state=Ut.OPEN_TAG,qt.tagName=wt;else if(wt==="/")qt.state=Ut.CLOSE_TAG,qt.tagName="";else if(wt==="?")qt.state=Ut.PROC_INST,qt.procInstName=qt.procInstBody="";else{if(ve(qt,"Unencoded <"),qt.startTagPosition+1<qt.position){var Zt=qt.position-qt.startTagPosition;wt=new Array(Zt).join(" ")+wt}qt.textNode+="<"+wt,qt.state=Ut.TEXT}continue;case Ut.SGML_DECL:(qt.sgmlDecl+wt).toUpperCase()===at?(se(qt,"onopencdata"),qt.state=Ut.CDATA,qt.sgmlDecl="",qt.cdata=""):qt.sgmlDecl+wt==="--"?(qt.state=Ut.COMMENT,qt.comment="",qt.sgmlDecl=""):(qt.sgmlDecl+wt).toUpperCase()===it?(qt.state=Ut.DOCTYPE,(qt.doctype||qt.sawRoot)&&ve(qt,"Inappropriately located doctype declaration"),qt.doctype="",qt.sgmlDecl=""):wt===">"?(se(qt,"onsgmldeclaration",qt.sgmlDecl),qt.sgmlDecl="",qt.state=Ut.TEXT):(Nt(wt)&&(qt.state=Ut.SGML_DECL_QUOTED),qt.sgmlDecl+=wt);continue;case Ut.SGML_DECL_QUOTED:wt===qt.q&&(qt.state=Ut.SGML_DECL,qt.q=""),qt.sgmlDecl+=wt;continue;case Ut.DOCTYPE:wt===">"?(qt.state=Ut.TEXT,se(qt,"ondoctype",qt.doctype),qt.doctype=!0):(qt.doctype+=wt,wt==="["?qt.state=Ut.DOCTYPE_DTD:Nt(wt)&&(qt.state=Ut.DOCTYPE_QUOTED,qt.q=wt));continue;case Ut.DOCTYPE_QUOTED:qt.doctype+=wt,wt===qt.q&&(qt.q="",qt.state=Ut.DOCTYPE);continue;case Ut.DOCTYPE_DTD:qt.doctype+=wt,wt==="]"?qt.state=Ut.DOCTYPE:Nt(wt)&&(qt.state=Ut.DOCTYPE_DTD_QUOTED,qt.q=wt);continue;case Ut.DOCTYPE_DTD_QUOTED:qt.doctype+=wt,wt===qt.q&&(qt.state=Ut.DOCTYPE_DTD,qt.q="");continue;case Ut.COMMENT:wt==="-"?qt.state=Ut.COMMENT_ENDING:qt.comment+=wt;continue;case Ut.COMMENT_ENDING:wt==="-"?(qt.state=Ut.COMMENT_ENDED,qt.comment=be(qt.opt,qt.comment),qt.comment&&se(qt,"oncomment",qt.comment),qt.comment=""):(qt.comment+="-"+wt,qt.state=Ut.COMMENT);continue;case Ut.COMMENT_ENDED:wt!==">"?(ve(qt,"Malformed comment"),qt.comment+="--"+wt,qt.state=Ut.COMMENT):qt.state=Ut.TEXT;continue;case Ut.CDATA:wt==="]"?qt.state=Ut.CDATA_ENDING:qt.cdata+=wt;continue;case Ut.CDATA_ENDING:wt==="]"?qt.state=Ut.CDATA_ENDING_2:(qt.cdata+="]"+wt,qt.state=Ut.CDATA);continue;case Ut.CDATA_ENDING_2:wt===">"?(qt.cdata&&se(qt,"oncdata",qt.cdata),se(qt,"onclosecdata"),qt.cdata="",qt.state=Ut.TEXT):wt==="]"?qt.cdata+="]":(qt.cdata+="]]"+wt,qt.state=Ut.CDATA);continue;case Ut.PROC_INST:wt==="?"?qt.state=Ut.PROC_INST_ENDING:jt(wt)?qt.state=Ut.PROC_INST_BODY:qt.procInstName+=wt;continue;case Ut.PROC_INST_BODY:if(!qt.procInstBody&&jt(wt))continue;wt==="?"?qt.state=Ut.PROC_INST_ENDING:qt.procInstBody+=wt;continue;case Ut.PROC_INST_ENDING:wt===">"?(se(qt,"onprocessinginstruction",{name:qt.procInstName,body:qt.procInstBody}),qt.procInstName=qt.procInstBody="",qt.state=Ut.TEXT):(qt.procInstBody+="?"+wt,qt.state=Ut.PROC_INST_BODY);continue;case Ut.OPEN_TAG:Wt(At,wt)?qt.tagName+=wt:(Se(qt),wt===">"?de(qt):wt==="/"?qt.state=Ut.OPEN_TAG_SLASH:(jt(wt)||ve(qt,"Invalid character in tag name"),qt.state=Ut.ATTRIB));continue;case Ut.OPEN_TAG_SLASH:wt===">"?(de(qt,!0),le(qt)):(ve(qt,"Forward-slash in opening tag not followed by >"),qt.state=Ut.ATTRIB);continue;case Ut.ATTRIB:if(jt(wt))continue;wt===">"?de(qt):wt==="/"?qt.state=Ut.OPEN_TAG_SLASH:Wt(bt,wt)?(qt.attribName=wt,qt.attribValue="",qt.state=Ut.ATTRIB_NAME):ve(qt,"Invalid attribute name");continue;case Ut.ATTRIB_NAME:wt==="="?qt.state=Ut.ATTRIB_VALUE:wt===">"?(ve(qt,"Attribute without value"),qt.attribValue=qt.attribName,ce(qt),de(qt)):jt(wt)?qt.state=Ut.ATTRIB_NAME_SAW_WHITE:Wt(At,wt)?qt.attribName+=wt:ve(qt,"Invalid attribute name");continue;case Ut.ATTRIB_NAME_SAW_WHITE:if(wt==="=")qt.state=Ut.ATTRIB_VALUE;else{if(jt(wt))continue;ve(qt,"Attribute without value"),qt.tag.attributes[qt.attribName]="",qt.attribValue="",se(qt,"onattribute",{name:qt.attribName,value:""}),qt.attribName="",wt===">"?de(qt):Wt(bt,wt)?(qt.attribName=wt,qt.state=Ut.ATTRIB_NAME):(ve(qt,"Invalid attribute name"),qt.state=Ut.ATTRIB)}continue;case Ut.ATTRIB_VALUE:if(jt(wt))continue;Nt(wt)?(qt.q=wt,qt.state=Ut.ATTRIB_VALUE_QUOTED):(ve(qt,"Unquoted attribute value"),qt.state=Ut.ATTRIB_VALUE_UNQUOTED,qt.attribValue=wt);continue;case Ut.ATTRIB_VALUE_QUOTED:if(wt!==qt.q){wt==="&"?qt.state=Ut.ATTRIB_VALUE_ENTITY_Q:qt.attribValue+=wt;continue}ce(qt),qt.q="",qt.state=Ut.ATTRIB_VALUE_CLOSED;continue;case Ut.ATTRIB_VALUE_CLOSED:jt(wt)?qt.state=Ut.ATTRIB:wt===">"?de(qt):wt==="/"?qt.state=Ut.OPEN_TAG_SLASH:Wt(bt,wt)?(ve(qt,"No whitespace between attributes"),qt.attribName=wt,qt.attribValue="",qt.state=Ut.ATTRIB_NAME):ve(qt,"Invalid attribute name");continue;case Ut.ATTRIB_VALUE_UNQUOTED:if(!_t(wt)){wt==="&"?qt.state=Ut.ATTRIB_VALUE_ENTITY_U:qt.attribValue+=wt;continue}ce(qt),wt===">"?de(qt):qt.state=Ut.ATTRIB;continue;case Ut.CLOSE_TAG:if(qt.tagName)wt===">"?le(qt):Wt(At,wt)?qt.tagName+=wt:qt.script?(qt.script+="</"+qt.tagName,qt.tagName="",qt.state=Ut.SCRIPT):(jt(wt)||ve(qt,"Invalid tagname in closing tag"),qt.state=Ut.CLOSE_TAG_SAW_WHITE);else{if(jt(wt))continue;Jt(bt,wt)?qt.script?(qt.script+="</"+wt,qt.state=Ut.SCRIPT):ve(qt,"Invalid tagname in closing tag."):qt.tagName=wt}continue;case Ut.CLOSE_TAG_SAW_WHITE:if(jt(wt))continue;wt===">"?le(qt):ve(qt,"Invalid characters in closing tag");continue;case Ut.TEXT_ENTITY:case Ut.ATTRIB_VALUE_ENTITY_Q:case Ut.ATTRIB_VALUE_ENTITY_U:var ee,It;switch(qt.state){case Ut.TEXT_ENTITY:ee=Ut.TEXT,It="textNode";break;case Ut.ATTRIB_VALUE_ENTITY_Q:ee=Ut.ATTRIB_VALUE_QUOTED,It="attribValue";break;case Ut.ATTRIB_VALUE_ENTITY_U:ee=Ut.ATTRIB_VALUE_UNQUOTED,It="attribValue";break}wt===";"?(qt[It]+=Ce(qt),qt.entity="",qt.state=ee):Wt(qt.entity.length?Ft:Dt,wt)?qt.entity+=wt:(ve(qt,"Invalid character in entity name"),qt[It]+="&"+qt.entity+wt,qt.entity="",qt.state=ee);continue;default:throw new Error(qt,"Unknown state: "+qt.state)}return qt.position>=qt.bufferCheckPosition&&yt(qt),qt}String.fromCodePoint||function(){var pe=String.fromCharCode,qt=Math.floor,Kt=function(){var wt=16384,Lt=[],Zt,ee,It=-1,Rt=arguments.length;if(!Rt)return"";for(var Ht="";++It<Rt;){var re=Number(arguments[It]);if(!isFinite(re)||re<0||re>1114111||qt(re)!==re)throw RangeError("Invalid code point: "+re);re<=65535?Lt.push(re):(re-=65536,Zt=(re>>10)+55296,ee=re%1024+56320,Lt.push(Zt,ee)),(It+1===Rt||Lt.length>wt)&&(Ht+=pe.apply(null,Lt),Lt.length=0)}return Ht};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Kt,configurable:!0,writable:!0}):String.fromCodePoint=Kt}()})(typeof Bt=="undefined"?this.sax={}:Bt)}).call(this)}).call(this,ot("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ot,zt,Bt){zt.exports=kt;var vt=ot("events").EventEmitter,gt=ot("inherits");gt(kt,vt),kt.Readable=ot("readable-stream/lib/_stream_readable.js"),kt.Writable=ot("readable-stream/lib/_stream_writable.js"),kt.Duplex=ot("readable-stream/lib/_stream_duplex.js"),kt.Transform=ot("readable-stream/lib/_stream_transform.js"),kt.PassThrough=ot("readable-stream/lib/_stream_passthrough.js"),kt.finished=ot("readable-stream/lib/internal/streams/end-of-stream.js"),kt.pipeline=ot("readable-stream/lib/internal/streams/pipeline.js"),kt.Stream=kt;function kt(){vt.call(this)}kt.prototype.pipe=function(Ct,yt){var Tt=this;function mt(lt){Ct.writable&&Ct.write(lt)===!1&&Tt.pause&&Tt.pause()}Tt.on("data",mt);function xt(){Tt.readable&&Tt.resume&&Tt.resume()}Ct.on("drain",xt),!Ct._isStdio&&(!yt||yt.end!==!1)&&(Tt.on("end",z),Tt.on("close",tt));var ft=!1;function z(){ft||(ft=!0,Ct.end())}function tt(){ft||(ft=!0,typeof Ct.destroy=="function"&&Ct.destroy())}function at(lt){if(it(),vt.listenerCount(this,"error")===0)throw lt}Tt.on("error",at),Ct.on("error",at);function it(){Tt.removeListener("data",mt),Ct.removeListener("drain",xt),Tt.removeListener("end",z),Tt.removeListener("close",tt),Tt.removeListener("error",at),Ct.removeListener("error",at),Tt.removeListener("end",it),Tt.removeListener("close",it),Ct.removeListener("close",it)}return Tt.on("end",it),Tt.on("close",it),Ct.on("close",it),Ct.emit("pipe",Tt),Ct}},{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(ot,zt,Bt){"use strict";function vt(xt,ft){xt.prototype=Object.create(ft.prototype),xt.prototype.constructor=xt,xt.__proto__=ft}var gt={};function kt(xt,ft,z){z||(z=Error);function tt(it,lt,ut){return typeof ft=="string"?ft:ft(it,lt,ut)}var at=function(it){vt(lt,it);function lt(ut,dt,bt){return it.call(this,tt(ut,dt,bt))||this}return lt}(z);at.prototype.name=z.name,at.prototype.code=xt,gt[xt]=at}function Ct(xt,ft){if(Array.isArray(xt)){var z=xt.length;return xt=xt.map(function(tt){return String(tt)}),z>2?"one of ".concat(ft," ").concat(xt.slice(0,z-1).join(", "),", or ")+xt[z-1]:z===2?"one of ".concat(ft," ").concat(xt[0]," or ").concat(xt[1]):"of ".concat(ft," ").concat(xt[0])}else return"of ".concat(ft," ").concat(String(xt))}function yt(xt,ft,z){return xt.substr(!z||z<0?0:+z,ft.length)===ft}function Tt(xt,ft,z){return(z===void 0||z>xt.length)&&(z=xt.length),xt.substring(z-ft.length,z)===ft}function mt(xt,ft,z){return typeof z!="number"&&(z=0),z+ft.length>xt.length?!1:xt.indexOf(ft,z)!==-1}kt("ERR_INVALID_OPT_VALUE",function(xt,ft){return'The value "'+ft+'" is invalid for option "'+xt+'"'},TypeError),kt("ERR_INVALID_ARG_TYPE",function(xt,ft,z){var tt;typeof ft=="string"&&yt(ft,"not ")?(tt="must not be",ft=ft.replace(/^not /,"")):tt="must be";var at;if(Tt(xt," argument"))at="The ".concat(xt," ").concat(tt," ").concat(Ct(ft,"type"));else{var it=mt(xt,".")?"property":"argument";at='The "'.concat(xt,'" ').concat(it," ").concat(tt," ").concat(Ct(ft,"type"))}return at+=". Received type ".concat(typeof z),at},TypeError),kt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),kt("ERR_METHOD_NOT_IMPLEMENTED",function(xt){return"The "+xt+" method is not implemented"}),kt("ERR_STREAM_PREMATURE_CLOSE","Premature close"),kt("ERR_STREAM_DESTROYED",function(xt){return"Cannot call "+xt+" after a stream was destroyed"}),kt("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),kt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),kt("ERR_STREAM_WRITE_AFTER_END","write after end"),kt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),kt("ERR_UNKNOWN_ENCODING",function(xt){return"Unknown encoding: "+xt},TypeError),kt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),zt.exports.codes=gt},{}],400:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=Object.keys||function(tt){var at=[];for(var it in tt)at.push(it);return at};zt.exports=xt;var kt=ot("./_stream_readable"),Ct=ot("./_stream_writable");ot("inherits")(xt,kt);for(var yt=gt(Ct.prototype),Tt=0;Tt<yt.length;Tt++){var mt=yt[Tt];xt.prototype[mt]||(xt.prototype[mt]=Ct.prototype[mt])}function xt(tt){if(!(this instanceof xt))return new xt(tt);kt.call(this,tt),Ct.call(this,tt),this.allowHalfOpen=!0,tt&&(tt.readable===!1&&(this.readable=!1),tt.writable===!1&&(this.writable=!1),tt.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",ft)))}Object.defineProperty(xt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ft(){this._writableState.ended||vt.nextTick(z,this)}function z(tt){tt.end()}Object.defineProperty(xt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(at){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=at,this._writableState.destroyed=at)}})}).call(this)}).call(this,ot("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ot,zt,Bt){"use strict";zt.exports=gt;var vt=ot("./_stream_transform");ot("inherits")(gt,vt);function gt(kt){if(!(this instanceof gt))return new gt(kt);vt.call(this,kt)}gt.prototype._transform=function(kt,Ct,yt){yt(null,kt)}},{"./_stream_transform":403,inherits:364}],402:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";zt.exports=se;var kt;se.ReadableState=oe;var Ct=ot("events").EventEmitter,yt=function(Rt,Ht){return Rt.listeners(Ht).length},Tt=ot("./internal/streams/stream"),mt=ot("buffer").Buffer,xt=(typeof gt!="undefined"?gt:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ft(It){return mt.from(It)}function z(It){return mt.isBuffer(It)||It instanceof xt}var tt=ot("util"),at;tt&&tt.debuglog?at=tt.debuglog("stream"):at=function(){};var it=ot("./internal/streams/buffer_list"),lt=ot("./internal/streams/destroy"),ut=ot("./internal/streams/state"),dt=ut.getHighWaterMark,bt=ot("../errors").codes,At=bt.ERR_INVALID_ARG_TYPE,Dt=bt.ERR_STREAM_PUSH_AFTER_EOF,Ft=bt.ERR_METHOD_NOT_IMPLEMENTED,jt=bt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Nt,_t,Wt;ot("inherits")(se,Tt);var Jt=lt.errorOrDestroy,Ut=["error","close","destroy","pause","resume"];function Vt(It,Rt,Ht){if(typeof It.prependListener=="function")return It.prependListener(Rt,Ht);!It._events||!It._events[Rt]?It.on(Rt,Ht):Array.isArray(It._events[Rt])?It._events[Rt].unshift(Ht):It._events[Rt]=[Ht,It._events[Rt]]}function oe(It,Rt,Ht){kt=kt||ot("./_stream_duplex"),It=It||{},typeof Ht!="boolean"&&(Ht=Rt instanceof kt),this.objectMode=!!It.objectMode,Ht&&(this.objectMode=this.objectMode||!!It.readableObjectMode),this.highWaterMark=dt(this,It,"readableHighWaterMark",Ht),this.buffer=new it,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=It.emitClose!==!1,this.autoDestroy=!!It.autoDestroy,this.destroyed=!1,this.defaultEncoding=It.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,It.encoding&&(Nt||(Nt=ot("string_decoder/").StringDecoder),this.decoder=new Nt(It.encoding),this.encoding=It.encoding)}function se(It){if(kt=kt||ot("./_stream_duplex"),!(this instanceof se))return new se(It);var Rt=this instanceof kt;this._readableState=new oe(It,this,Rt),this.readable=!0,It&&(typeof It.read=="function"&&(this._read=It.read),typeof It.destroy=="function"&&(this._destroy=It.destroy)),Tt.call(this)}Object.defineProperty(se.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Rt){this._readableState&&(this._readableState.destroyed=Rt)}}),se.prototype.destroy=lt.destroy,se.prototype._undestroy=lt.undestroy,se.prototype._destroy=function(It,Rt){Rt(It)},se.prototype.push=function(It,Rt){var Ht=this._readableState,re;return Ht.objectMode?re=!0:typeof It=="string"&&(Rt=Rt||Ht.defaultEncoding,Rt!==Ht.encoding&&(It=mt.from(It,Rt),Rt=""),re=!0),he(this,It,Rt,!1,re)},se.prototype.unshift=function(It){return he(this,It,null,!0,!1)};function he(It,Rt,Ht,re,ye){at("readableAddChunk",Rt);var Pe=It._readableState;if(Rt===null)Pe.reading=!1,we(It,Pe);else{var Ae;if(ye||(Ae=Yt(Pe,Rt)),Ae)Jt(It,Ae);else if(Pe.objectMode||Rt&&Rt.length>0)if(typeof Rt!="string"&&!Pe.objectMode&&Object.getPrototypeOf(Rt)!==mt.prototype&&(Rt=ft(Rt)),re)Pe.endEmitted?Jt(It,new jt):be(It,Pe,Rt,!0);else if(Pe.ended)Jt(It,new Dt);else{if(Pe.destroyed)return!1;Pe.reading=!1,Pe.decoder&&!Ht?(Rt=Pe.decoder.write(Rt),Pe.objectMode||Rt.length!==0?be(It,Pe,Rt,!1):le(It,Pe)):be(It,Pe,Rt,!1)}else re||(Pe.reading=!1,le(It,Pe))}return!Pe.ended&&(Pe.length<Pe.highWaterMark||Pe.length===0)}function be(It,Rt,Ht,re){Rt.flowing&&Rt.length===0&&!Rt.sync?(Rt.awaitDrain=0,It.emit("data",Ht)):(Rt.length+=Rt.objectMode?1:Ht.length,re?Rt.buffer.unshift(Ht):Rt.buffer.push(Ht),Rt.needReadable&&ce(It)),le(It,Rt)}function Yt(It,Rt){var Ht;return!z(Rt)&&typeof Rt!="string"&&Rt!==void 0&&!It.objectMode&&(Ht=new At("chunk",["string","Buffer","Uint8Array"],Rt)),Ht}se.prototype.isPaused=function(){return this._readableState.flowing===!1},se.prototype.setEncoding=function(It){Nt||(Nt=ot("string_decoder/").StringDecoder);var Rt=new Nt(It);this._readableState.decoder=Rt,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ht=this._readableState.buffer.head,re="";Ht!==null;)re+=Rt.write(Ht.data),Ht=Ht.next;return this._readableState.buffer.clear(),re!==""&&this._readableState.buffer.push(re),this._readableState.length=re.length,this};var ne=1073741824;function ve(It){return It>=ne?It=ne:(It--,It|=It>>>1,It|=It>>>2,It|=It>>>4,It|=It>>>8,It|=It>>>16,It++),It}function Se(It,Rt){return It<=0||Rt.length===0&&Rt.ended?0:Rt.objectMode?1:It!==It?Rt.flowing&&Rt.length?Rt.buffer.head.data.length:Rt.length:(It>Rt.highWaterMark&&(Rt.highWaterMark=ve(It)),It<=Rt.length?It:Rt.ended?Rt.length:(Rt.needReadable=!0,0))}se.prototype.read=function(It){at("read",It),It=parseInt(It,10);var Rt=this._readableState,Ht=It;if(It!==0&&(Rt.emittedReadable=!1),It===0&&Rt.needReadable&&((Rt.highWaterMark!==0?Rt.length>=Rt.highWaterMark:Rt.length>0)||Rt.ended))return at("read: emitReadable",Rt.length,Rt.ended),Rt.length===0&&Rt.ended?Lt(this):ce(this),null;if(It=Se(It,Rt),It===0&&Rt.ended)return Rt.length===0&&Lt(this),null;var re=Rt.needReadable;at("need readable",re),(Rt.length===0||Rt.length-It<Rt.highWaterMark)&&(re=!0,at("length less than watermark",re)),Rt.ended||Rt.reading?(re=!1,at("reading or ended",re)):re&&(at("do read"),Rt.reading=!0,Rt.sync=!0,Rt.length===0&&(Rt.needReadable=!0),this._read(Rt.highWaterMark),Rt.sync=!1,Rt.reading||(It=Se(Ht,Rt)));var ye;return It>0?ye=wt(It,Rt):ye=null,ye===null?(Rt.needReadable=Rt.length<=Rt.highWaterMark,It=0):(Rt.length-=It,Rt.awaitDrain=0),Rt.length===0&&(Rt.ended||(Rt.needReadable=!0),Ht!==It&&Rt.ended&&Lt(this)),ye!==null&&this.emit("data",ye),ye};function we(It,Rt){if(at("onEofChunk"),!Rt.ended){if(Rt.decoder){var Ht=Rt.decoder.end();Ht&&Ht.length&&(Rt.buffer.push(Ht),Rt.length+=Rt.objectMode?1:Ht.length)}Rt.ended=!0,Rt.sync?ce(It):(Rt.needReadable=!1,Rt.emittedReadable||(Rt.emittedReadable=!0,de(It)))}}function ce(It){var Rt=It._readableState;at("emitReadable",Rt.needReadable,Rt.emittedReadable),Rt.needReadable=!1,Rt.emittedReadable||(at("emitReadable",Rt.flowing),Rt.emittedReadable=!0,vt.nextTick(de,It))}function de(It){var Rt=It._readableState;at("emitReadable_",Rt.destroyed,Rt.length,Rt.ended),!Rt.destroyed&&(Rt.length||Rt.ended)&&(It.emit("readable"),Rt.emittedReadable=!1),Rt.needReadable=!Rt.flowing&&!Rt.ended&&Rt.length<=Rt.highWaterMark,Kt(It)}function le(It,Rt){Rt.readingMore||(Rt.readingMore=!0,vt.nextTick(Ce,It,Rt))}function Ce(It,Rt){for(;!Rt.reading&&!Rt.ended&&(Rt.length<Rt.highWaterMark||Rt.flowing&&Rt.length===0);){var Ht=Rt.length;if(at("maybeReadMore read 0"),It.read(0),Ht===Rt.length)break}Rt.readingMore=!1}se.prototype._read=function(It){Jt(this,new Ft("_read()"))},se.prototype.pipe=function(It,Rt){var Ht=this,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=It;break;case 1:re.pipes=[re.pipes,It];break;default:re.pipes.push(It);break}re.pipesCount+=1,at("pipe count=%d opts=%j",re.pipesCount,Rt);var ye=(!Rt||Rt.end!==!1)&&It!==vt.stdout&&It!==vt.stderr,Pe=ye?Oe:He;re.endEmitted?vt.nextTick(Pe):Ht.once("end",Pe),It.on("unpipe",Ae);function Ae(rn,ln){at("onunpipe"),rn===Ht&&ln&&ln.hasUnpiped===!1&&(ln.hasUnpiped=!0,qe())}function Oe(){at("onend"),It.end()}var Ie=fe(Ht);It.on("drain",Ie);var Qe=!1;function qe(){at("cleanup"),It.removeListener("close",Ue),It.removeListener("finish",We),It.removeListener("drain",Ie),It.removeListener("error",Ke),It.removeListener("unpipe",Ae),Ht.removeListener("end",Oe),Ht.removeListener("end",He),Ht.removeListener("data",nn),Qe=!0,re.awaitDrain&&(!It._writableState||It._writableState.needDrain)&&Ie()}Ht.on("data",nn);function nn(rn){at("ondata");var ln=It.write(rn);at("dest.write",ln),ln===!1&&((re.pipesCount===1&&re.pipes===It||re.pipesCount>1&&ee(re.pipes,It)!==-1)&&!Qe&&(at("false write response, pause",re.awaitDrain),re.awaitDrain++),Ht.pause())}function Ke(rn){at("onerror",rn),He(),It.removeListener("error",Ke),yt(It,"error")===0&&Jt(It,rn)}Vt(It,"error",Ke);function Ue(){It.removeListener("finish",We),He()}It.once("close",Ue);function We(){at("onfinish"),It.removeListener("close",Ue),He()}It.once("finish",We);function He(){at("unpipe"),Ht.unpipe(It)}return It.emit("pipe",Ht),re.flowing||(at("pipe resume"),Ht.resume()),It};function fe(It){return function(){var Ht=It._readableState;at("pipeOnDrain",Ht.awaitDrain),Ht.awaitDrain&&Ht.awaitDrain--,Ht.awaitDrain===0&&yt(It,"data")&&(Ht.flowing=!0,Kt(It))}}se.prototype.unpipe=function(It){var Rt=this._readableState,Ht={hasUnpiped:!1};if(Rt.pipesCount===0)return this;if(Rt.pipesCount===1)return It&&It!==Rt.pipes?this:(It||(It=Rt.pipes),Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1,It&&It.emit("unpipe",this,Ht),this);if(!It){var re=Rt.pipes,ye=Rt.pipesCount;Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1;for(var Pe=0;Pe<ye;Pe++)re[Pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Ae=ee(Rt.pipes,It);return Ae===-1?this:(Rt.pipes.splice(Ae,1),Rt.pipesCount-=1,Rt.pipesCount===1&&(Rt.pipes=Rt.pipes[0]),It.emit("unpipe",this,Ht),this)},se.prototype.on=function(It,Rt){var Ht=Tt.prototype.on.call(this,It,Rt),re=this._readableState;return It==="data"?(re.readableListening=this.listenerCount("readable")>0,re.flowing!==!1&&this.resume()):It==="readable"&&!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.flowing=!1,re.emittedReadable=!1,at("on readable",re.length,re.reading),re.length?ce(this):re.reading||vt.nextTick(ke,this)),Ht},se.prototype.addListener=se.prototype.on,se.prototype.removeListener=function(It,Rt){var Ht=Tt.prototype.removeListener.call(this,It,Rt);return It==="readable"&&vt.nextTick(me,this),Ht},se.prototype.removeAllListeners=function(It){var Rt=Tt.prototype.removeAllListeners.apply(this,arguments);return(It==="readable"||It===void 0)&&vt.nextTick(me,this),Rt};function me(It){var Rt=It._readableState;Rt.readableListening=It.listenerCount("readable")>0,Rt.resumeScheduled&&!Rt.paused?Rt.flowing=!0:It.listenerCount("data")>0&&It.resume()}function ke(It){at("readable nexttick read 0"),It.read(0)}se.prototype.resume=function(){var It=this._readableState;return It.flowing||(at("resume"),It.flowing=!It.readableListening,pe(this,It)),It.paused=!1,this};function pe(It,Rt){Rt.resumeScheduled||(Rt.resumeScheduled=!0,vt.nextTick(qt,It,Rt))}function qt(It,Rt){at("resume",Rt.reading),Rt.reading||It.read(0),Rt.resumeScheduled=!1,It.emit("resume"),Kt(It),Rt.flowing&&!Rt.reading&&It.read(0)}se.prototype.pause=function(){return at("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(at("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Kt(It){var Rt=It._readableState;for(at("flow",Rt.flowing);Rt.flowing&&It.read()!==null;);}se.prototype.wrap=function(It){var Rt=this,Ht=this._readableState,re=!1;It.on("end",function(){if(at("wrapped end"),Ht.decoder&&!Ht.ended){var Ae=Ht.decoder.end();Ae&&Ae.length&&Rt.push(Ae)}Rt.push(null)}),It.on("data",function(Ae){if(at("wrapped data"),Ht.decoder&&(Ae=Ht.decoder.write(Ae)),!(Ht.objectMode&&Ae==null)&&!(!Ht.objectMode&&(!Ae||!Ae.length))){var Oe=Rt.push(Ae);Oe||(re=!0,It.pause())}});for(var ye in It)this[ye]===void 0&&typeof It[ye]=="function"&&(this[ye]=function(Oe){return function(){return It[Oe].apply(It,arguments)}}(ye));for(var Pe=0;Pe<Ut.length;Pe++)It.on(Ut[Pe],this.emit.bind(this,Ut[Pe]));return this._read=function(Ae){at("wrapped _read",Ae),re&&(re=!1,It.resume())},this},typeof Symbol=="function"&&(se.prototype[Symbol.asyncIterator]=function(){return _t===void 0&&(_t=ot("./internal/streams/async_iterator")),_t(this)}),Object.defineProperty(se.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(se.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(se.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Rt){this._readableState&&(this._readableState.flowing=Rt)}}),se._fromList=wt,Object.defineProperty(se.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function wt(It,Rt){if(Rt.length===0)return null;var Ht;return Rt.objectMode?Ht=Rt.buffer.shift():!It||It>=Rt.length?(Rt.decoder?Ht=Rt.buffer.join(""):Rt.buffer.length===1?Ht=Rt.buffer.first():Ht=Rt.buffer.concat(Rt.length),Rt.buffer.clear()):Ht=Rt.buffer.consume(It,Rt.decoder),Ht}function Lt(It){var Rt=It._readableState;at("endReadable",Rt.endEmitted),Rt.endEmitted||(Rt.ended=!0,vt.nextTick(Zt,Rt,It))}function Zt(It,Rt){if(at("endReadableNT",It.endEmitted,It.length),!It.endEmitted&&It.length===0&&(It.endEmitted=!0,Rt.readable=!1,Rt.emit("end"),It.autoDestroy)){var Ht=Rt._writableState;(!Ht||Ht.autoDestroy&&Ht.finished)&&Rt.destroy()}}typeof Symbol=="function"&&(se.from=function(It,Rt){return Wt===void 0&&(Wt=ot("./internal/streams/from")),Wt(se,It,Rt)});function ee(It,Rt){for(var Ht=0,re=It.length;Ht<re;Ht++)if(It[Ht]===Rt)return Ht;return-1}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn: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(ot,zt,Bt){"use strict";zt.exports=xt;var vt=ot("../errors").codes,gt=vt.ERR_METHOD_NOT_IMPLEMENTED,kt=vt.ERR_MULTIPLE_CALLBACK,Ct=vt.ERR_TRANSFORM_ALREADY_TRANSFORMING,yt=vt.ERR_TRANSFORM_WITH_LENGTH_0,Tt=ot("./_stream_duplex");ot("inherits")(xt,Tt);function mt(tt,at){var it=this._transformState;it.transforming=!1;var lt=it.writecb;if(lt===null)return this.emit("error",new kt);it.writechunk=null,it.writecb=null,at!=null&&this.push(at),lt(tt);var ut=this._readableState;ut.reading=!1,(ut.needReadable||ut.length<ut.highWaterMark)&&this._read(ut.highWaterMark)}function xt(tt){if(!(this instanceof xt))return new xt(tt);Tt.call(this,tt),this._transformState={afterTransform:mt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,tt&&(typeof tt.transform=="function"&&(this._transform=tt.transform),typeof tt.flush=="function"&&(this._flush=tt.flush)),this.on("prefinish",ft)}function ft(){var tt=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(at,it){z(tt,at,it)}):z(this,null,null)}xt.prototype.push=function(tt,at){return this._transformState.needTransform=!1,Tt.prototype.push.call(this,tt,at)},xt.prototype._transform=function(tt,at,it){it(new gt("_transform()"))},xt.prototype._write=function(tt,at,it){var lt=this._transformState;if(lt.writecb=it,lt.writechunk=tt,lt.writeencoding=at,!lt.transforming){var ut=this._readableState;(lt.needTransform||ut.needReadable||ut.length<ut.highWaterMark)&&this._read(ut.highWaterMark)}},xt.prototype._read=function(tt){var at=this._transformState;at.writechunk!==null&&!at.transforming?(at.transforming=!0,this._transform(at.writechunk,at.writeencoding,at.afterTransform)):at.needTransform=!0},xt.prototype._destroy=function(tt,at){Tt.prototype._destroy.call(this,tt,function(it){at(it)})};function z(tt,at,it){if(at)return tt.emit("error",at);if(it!=null&&tt.push(it),tt._writableState.length)throw new yt;if(tt._transformState.transforming)throw new Ct;return tt.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";zt.exports=oe;function kt(Kt,wt,Lt){this.chunk=Kt,this.encoding=wt,this.callback=Lt,this.next=null}function Ct(Kt){var wt=this;this.next=null,this.entry=null,this.finish=function(){qt(wt,Kt)}}var yt;oe.WritableState=Ut;var Tt={deprecate:ot("util-deprecate")},mt=ot("./internal/streams/stream"),xt=ot("buffer").Buffer,ft=(typeof gt!="undefined"?gt:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Kt){return xt.from(Kt)}function tt(Kt){return xt.isBuffer(Kt)||Kt instanceof ft}var at=ot("./internal/streams/destroy"),it=ot("./internal/streams/state"),lt=it.getHighWaterMark,ut=ot("../errors").codes,dt=ut.ERR_INVALID_ARG_TYPE,bt=ut.ERR_METHOD_NOT_IMPLEMENTED,At=ut.ERR_MULTIPLE_CALLBACK,Dt=ut.ERR_STREAM_CANNOT_PIPE,Ft=ut.ERR_STREAM_DESTROYED,jt=ut.ERR_STREAM_NULL_VALUES,Nt=ut.ERR_STREAM_WRITE_AFTER_END,_t=ut.ERR_UNKNOWN_ENCODING,Wt=at.errorOrDestroy;ot("inherits")(oe,mt);function Jt(){}function Ut(Kt,wt,Lt){yt=yt||ot("./_stream_duplex"),Kt=Kt||{},typeof Lt!="boolean"&&(Lt=wt instanceof yt),this.objectMode=!!Kt.objectMode,Lt&&(this.objectMode=this.objectMode||!!Kt.writableObjectMode),this.highWaterMark=lt(this,Kt,"writableHighWaterMark",Lt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Zt=Kt.decodeStrings===!1;this.decodeStrings=!Zt,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){we(wt,ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Kt.emitClose!==!1,this.autoDestroy=!!Kt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ct(this)}Ut.prototype.getBuffer=function(){for(var wt=this.bufferedRequest,Lt=[];wt;)Lt.push(wt),wt=wt.next;return Lt},function(){try{Object.defineProperty(Ut.prototype,"buffer",{get:Tt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Kt){}}();var Vt;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Vt=Function.prototype[Symbol.hasInstance],Object.defineProperty(oe,Symbol.hasInstance,{value:function(wt){return Vt.call(this,wt)?!0:this!==oe?!1:wt&&wt._writableState instanceof Ut}})):Vt=function(wt){return wt instanceof this};function oe(Kt){yt=yt||ot("./_stream_duplex");var wt=this instanceof yt;if(!wt&&!Vt.call(oe,this))return new oe(Kt);this._writableState=new Ut(Kt,this,wt),this.writable=!0,Kt&&(typeof Kt.write=="function"&&(this._write=Kt.write),typeof Kt.writev=="function"&&(this._writev=Kt.writev),typeof Kt.destroy=="function"&&(this._destroy=Kt.destroy),typeof Kt.final=="function"&&(this._final=Kt.final)),mt.call(this)}oe.prototype.pipe=function(){Wt(this,new Dt)};function se(Kt,wt){var Lt=new Nt;Wt(Kt,Lt),vt.nextTick(wt,Lt)}function he(Kt,wt,Lt,Zt){var ee;return Lt===null?ee=new jt:typeof Lt!="string"&&!wt.objectMode&&(ee=new dt("chunk",["string","Buffer"],Lt)),ee?(Wt(Kt,ee),vt.nextTick(Zt,ee),!1):!0}oe.prototype.write=function(Kt,wt,Lt){var Zt=this._writableState,ee=!1,It=!Zt.objectMode&&tt(Kt);return It&&!xt.isBuffer(Kt)&&(Kt=z(Kt)),typeof wt=="function"&&(Lt=wt,wt=null),It?wt="buffer":wt||(wt=Zt.defaultEncoding),typeof Lt!="function"&&(Lt=Jt),Zt.ending?se(this,Lt):(It||he(this,Zt,Kt,Lt))&&(Zt.pendingcb++,ee=Yt(this,Zt,It,Kt,wt,Lt)),ee},oe.prototype.cork=function(){this._writableState.corked++},oe.prototype.uncork=function(){var Kt=this._writableState;Kt.corked&&(Kt.corked--,!Kt.writing&&!Kt.corked&&!Kt.bufferProcessing&&Kt.bufferedRequest&&le(this,Kt))},oe.prototype.setDefaultEncoding=function(wt){if(typeof wt=="string"&&(wt=wt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((wt+"").toLowerCase())>-1))throw new _t(wt);return this._writableState.defaultEncoding=wt,this},Object.defineProperty(oe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function be(Kt,wt,Lt){return!Kt.objectMode&&Kt.decodeStrings!==!1&&typeof wt=="string"&&(wt=xt.from(wt,Lt)),wt}Object.defineProperty(oe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Yt(Kt,wt,Lt,Zt,ee,It){if(!Lt){var Rt=be(wt,Zt,ee);Zt!==Rt&&(Lt=!0,ee="buffer",Zt=Rt)}var Ht=wt.objectMode?1:Zt.length;wt.length+=Ht;var re=wt.length<wt.highWaterMark;if(re||(wt.needDrain=!0),wt.writing||wt.corked){var ye=wt.lastBufferedRequest;wt.lastBufferedRequest={chunk:Zt,encoding:ee,isBuf:Lt,callback:It,next:null},ye?ye.next=wt.lastBufferedRequest:wt.bufferedRequest=wt.lastBufferedRequest,wt.bufferedRequestCount+=1}else ne(Kt,wt,!1,Ht,Zt,ee,It);return re}function ne(Kt,wt,Lt,Zt,ee,It,Rt){wt.writelen=Zt,wt.writecb=Rt,wt.writing=!0,wt.sync=!0,wt.destroyed?wt.onwrite(new Ft("write")):Lt?Kt._writev(ee,wt.onwrite):Kt._write(ee,It,wt.onwrite),wt.sync=!1}function ve(Kt,wt,Lt,Zt,ee){--wt.pendingcb,Lt?(vt.nextTick(ee,Zt),vt.nextTick(ke,Kt,wt),Kt._writableState.errorEmitted=!0,Wt(Kt,Zt)):(ee(Zt),Kt._writableState.errorEmitted=!0,Wt(Kt,Zt),ke(Kt,wt))}function Se(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function we(Kt,wt){var Lt=Kt._writableState,Zt=Lt.sync,ee=Lt.writecb;if(typeof ee!="function")throw new At;if(Se(Lt),wt)ve(Kt,Lt,Zt,wt,ee);else{var It=Ce(Lt)||Kt.destroyed;!It&&!Lt.corked&&!Lt.bufferProcessing&&Lt.bufferedRequest&&le(Kt,Lt),Zt?vt.nextTick(ce,Kt,Lt,It,ee):ce(Kt,Lt,It,ee)}}function ce(Kt,wt,Lt,Zt){Lt||de(Kt,wt),wt.pendingcb--,Zt(),ke(Kt,wt)}function de(Kt,wt){wt.length===0&&wt.needDrain&&(wt.needDrain=!1,Kt.emit("drain"))}function le(Kt,wt){wt.bufferProcessing=!0;var Lt=wt.bufferedRequest;if(Kt._writev&&Lt&&Lt.next){var Zt=wt.bufferedRequestCount,ee=new Array(Zt),It=wt.corkedRequestsFree;It.entry=Lt;for(var Rt=0,Ht=!0;Lt;)ee[Rt]=Lt,Lt.isBuf||(Ht=!1),Lt=Lt.next,Rt+=1;ee.allBuffers=Ht,ne(Kt,wt,!0,wt.length,ee,"",It.finish),wt.pendingcb++,wt.lastBufferedRequest=null,It.next?(wt.corkedRequestsFree=It.next,It.next=null):wt.corkedRequestsFree=new Ct(wt),wt.bufferedRequestCount=0}else{for(;Lt;){var re=Lt.chunk,ye=Lt.encoding,Pe=Lt.callback,Ae=wt.objectMode?1:re.length;if(ne(Kt,wt,!1,Ae,re,ye,Pe),Lt=Lt.next,wt.bufferedRequestCount--,wt.writing)break}Lt===null&&(wt.lastBufferedRequest=null)}wt.bufferedRequest=Lt,wt.bufferProcessing=!1}oe.prototype._write=function(Kt,wt,Lt){Lt(new bt("_write()"))},oe.prototype._writev=null,oe.prototype.end=function(Kt,wt,Lt){var Zt=this._writableState;return typeof Kt=="function"?(Lt=Kt,Kt=null,wt=null):typeof wt=="function"&&(Lt=wt,wt=null),Kt!=null&&this.write(Kt,wt),Zt.corked&&(Zt.corked=1,this.uncork()),Zt.ending||pe(this,Zt,Lt),this},Object.defineProperty(oe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(Kt){return Kt.ending&&Kt.length===0&&Kt.bufferedRequest===null&&!Kt.finished&&!Kt.writing}function fe(Kt,wt){Kt._final(function(Lt){wt.pendingcb--,Lt&&Wt(Kt,Lt),wt.prefinished=!0,Kt.emit("prefinish"),ke(Kt,wt)})}function me(Kt,wt){!wt.prefinished&&!wt.finalCalled&&(typeof Kt._final=="function"&&!wt.destroyed?(wt.pendingcb++,wt.finalCalled=!0,vt.nextTick(fe,Kt,wt)):(wt.prefinished=!0,Kt.emit("prefinish")))}function ke(Kt,wt){var Lt=Ce(wt);if(Lt&&(me(Kt,wt),wt.pendingcb===0&&(wt.finished=!0,Kt.emit("finish"),wt.autoDestroy))){var Zt=Kt._readableState;(!Zt||Zt.autoDestroy&&Zt.endEmitted)&&Kt.destroy()}return Lt}function pe(Kt,wt,Lt){wt.ending=!0,ke(Kt,wt),Lt&&(wt.finished?vt.nextTick(Lt):Kt.once("finish",Lt)),wt.ended=!0,Kt.writable=!1}function qt(Kt,wt,Lt){var Zt=Kt.entry;for(Kt.entry=null;Zt;){var ee=Zt.callback;wt.pendingcb--,ee(Lt),Zt=Zt.next}wt.corkedRequestsFree.next=Kt}Object.defineProperty(oe.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(wt){this._writableState&&(this._writableState.destroyed=wt)}}),oe.prototype.destroy=at.destroy,oe.prototype._undestroy=at.undestroy,oe.prototype._destroy=function(Kt,wt){wt(Kt)}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn: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(ot,zt,Bt){(function(vt){(function(){"use strict";var gt;function kt(jt,Nt,_t){return Nt=Ct(Nt),Nt in jt?Object.defineProperty(jt,Nt,{value:_t,enumerable:!0,configurable:!0,writable:!0}):jt[Nt]=_t,jt}function Ct(jt){var Nt=yt(jt,"string");return typeof Nt=="symbol"?Nt:String(Nt)}function yt(jt,Nt){if(typeof jt!="object"||jt===null)return jt;var _t=jt[Symbol.toPrimitive];if(_t!==void 0){var Wt=_t.call(jt,Nt||"default");if(typeof Wt!="object")return Wt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Nt==="string"?String:Number)(jt)}var Tt=ot("./end-of-stream"),mt=Symbol("lastResolve"),xt=Symbol("lastReject"),ft=Symbol("error"),z=Symbol("ended"),tt=Symbol("lastPromise"),at=Symbol("handlePromise"),it=Symbol("stream");function lt(jt,Nt){return{value:jt,done:Nt}}function ut(jt){var Nt=jt[mt];if(Nt!==null){var _t=jt[it].read();_t!==null&&(jt[tt]=null,jt[mt]=null,jt[xt]=null,Nt(lt(_t,!1)))}}function dt(jt){vt.nextTick(ut,jt)}function bt(jt,Nt){return function(_t,Wt){jt.then(function(){if(Nt[z]){_t(lt(void 0,!0));return}Nt[at](_t,Wt)},Wt)}}var At=Object.getPrototypeOf(function(){}),Dt=Object.setPrototypeOf((gt={get stream(){return this[it]},next:function(){var Nt=this,_t=this[ft];if(_t!==null)return Promise.reject(_t);if(this[z])return Promise.resolve(lt(void 0,!0));if(this[it].destroyed)return new Promise(function(Vt,oe){vt.nextTick(function(){Nt[ft]?oe(Nt[ft]):Vt(lt(void 0,!0))})});var Wt=this[tt],Jt;if(Wt)Jt=new Promise(bt(Wt,this));else{var Ut=this[it].read();if(Ut!==null)return Promise.resolve(lt(Ut,!1));Jt=new Promise(this[at])}return this[tt]=Jt,Jt}},kt(gt,Symbol.asyncIterator,function(){return this}),kt(gt,"return",function(){var Nt=this;return new Promise(function(_t,Wt){Nt[it].destroy(null,function(Jt){if(Jt){Wt(Jt);return}_t(lt(void 0,!0))})})}),gt),At),Ft=function(Nt){var _t,Wt=Object.create(Dt,(_t={},kt(_t,it,{value:Nt,writable:!0}),kt(_t,mt,{value:null,writable:!0}),kt(_t,xt,{value:null,writable:!0}),kt(_t,ft,{value:null,writable:!0}),kt(_t,z,{value:Nt._readableState.endEmitted,writable:!0}),kt(_t,at,{value:function(Ut,Vt){var oe=Wt[it].read();oe?(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ut(lt(oe,!1))):(Wt[mt]=Ut,Wt[xt]=Vt)},writable:!0}),_t));return Wt[tt]=null,Tt(Nt,function(Jt){if(Jt&&Jt.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ut=Wt[xt];Ut!==null&&(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ut(Jt)),Wt[ft]=Jt;return}var Vt=Wt[mt];Vt!==null&&(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Vt(lt(void 0,!0))),Wt[z]=!0}),Nt.on("readable",dt.bind(null,Wt)),Wt};zt.exports=Ft}).call(this)}).call(this,ot("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ot,zt,Bt){"use strict";function vt(ut,dt){var bt=Object.keys(ut);if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(ut);dt&&(At=At.filter(function(Dt){return Object.getOwnPropertyDescriptor(ut,Dt).enumerable})),bt.push.apply(bt,At)}return bt}function gt(ut){for(var dt=1;dt<arguments.length;dt++){var bt=arguments[dt]!=null?arguments[dt]:{};dt%2?vt(Object(bt),!0).forEach(function(At){kt(ut,At,bt[At])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(bt)):vt(Object(bt)).forEach(function(At){Object.defineProperty(ut,At,Object.getOwnPropertyDescriptor(bt,At))})}return ut}function kt(ut,dt,bt){return dt=mt(dt),dt in ut?Object.defineProperty(ut,dt,{value:bt,enumerable:!0,configurable:!0,writable:!0}):ut[dt]=bt,ut}function Ct(ut,dt){if(!(ut instanceof dt))throw new TypeError("Cannot call a class as a function")}function yt(ut,dt){for(var bt=0;bt<dt.length;bt++){var At=dt[bt];At.enumerable=At.enumerable||!1,At.configurable=!0,"value"in At&&(At.writable=!0),Object.defineProperty(ut,mt(At.key),At)}}function Tt(ut,dt,bt){return dt&&yt(ut.prototype,dt),bt&&yt(ut,bt),Object.defineProperty(ut,"prototype",{writable:!1}),ut}function mt(ut){var dt=xt(ut,"string");return typeof dt=="symbol"?dt:String(dt)}function xt(ut,dt){if(typeof ut!="object"||ut===null)return ut;var bt=ut[Symbol.toPrimitive];if(bt!==void 0){var At=bt.call(ut,dt||"default");if(typeof At!="object")return At;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dt==="string"?String:Number)(ut)}var ft=ot("buffer"),z=ft.Buffer,tt=ot("util"),at=tt.inspect,it=at&&at.custom||"inspect";function lt(ut,dt,bt){z.prototype.copy.call(ut,dt,bt)}zt.exports=function(){function ut(){Ct(this,ut),this.head=null,this.tail=null,this.length=0}return Tt(ut,[{key:"push",value:function(bt){var At={data:bt,next:null};this.length>0?this.tail.next=At:this.head=At,this.tail=At,++this.length}},{key:"unshift",value:function(bt){var At={data:bt,next:this.head};this.length===0&&(this.tail=At),this.head=At,++this.length}},{key:"shift",value:function(){if(this.length!==0){var bt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,bt}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(bt){if(this.length===0)return"";for(var At=this.head,Dt=""+At.data;At=At.next;)Dt+=bt+At.data;return Dt}},{key:"concat",value:function(bt){if(this.length===0)return z.alloc(0);for(var At=z.allocUnsafe(bt>>>0),Dt=this.head,Ft=0;Dt;)lt(Dt.data,At,Ft),Ft+=Dt.data.length,Dt=Dt.next;return At}},{key:"consume",value:function(bt,At){var Dt;return bt<this.head.data.length?(Dt=this.head.data.slice(0,bt),this.head.data=this.head.data.slice(bt)):bt===this.head.data.length?Dt=this.shift():Dt=At?this._getString(bt):this._getBuffer(bt),Dt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(bt){var At=this.head,Dt=1,Ft=At.data;for(bt-=Ft.length;At=At.next;){var jt=At.data,Nt=bt>jt.length?jt.length:bt;if(Nt===jt.length?Ft+=jt:Ft+=jt.slice(0,bt),bt-=Nt,bt===0){Nt===jt.length?(++Dt,At.next?this.head=At.next:this.head=this.tail=null):(this.head=At,At.data=jt.slice(Nt));break}++Dt}return this.length-=Dt,Ft}},{key:"_getBuffer",value:function(bt){var At=z.allocUnsafe(bt),Dt=this.head,Ft=1;for(Dt.data.copy(At),bt-=Dt.data.length;Dt=Dt.next;){var jt=Dt.data,Nt=bt>jt.length?jt.length:bt;if(jt.copy(At,At.length-bt,0,Nt),bt-=Nt,bt===0){Nt===jt.length?(++Ft,Dt.next?this.head=Dt.next:this.head=this.tail=null):(this.head=Dt,Dt.data=jt.slice(Nt));break}++Ft}return this.length-=Ft,At}},{key:it,value:function(bt,At){return at(this,gt(gt({},At),{},{depth:0,customInspect:!1}))}}]),ut}()},{buffer:90,util:89}],407:[function(ot,zt,Bt){(function(vt){(function(){"use strict";function gt(xt,ft){var z=this,tt=this._readableState&&this._readableState.destroyed,at=this._writableState&&this._writableState.destroyed;return tt||at?(ft?ft(xt):xt&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vt.nextTick(Tt,this,xt)):vt.nextTick(Tt,this,xt)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xt||null,function(it){!ft&&it?z._writableState?z._writableState.errorEmitted?vt.nextTick(Ct,z):(z._writableState.errorEmitted=!0,vt.nextTick(kt,z,it)):vt.nextTick(kt,z,it):ft?(vt.nextTick(Ct,z),ft(it)):vt.nextTick(Ct,z)}),this)}function kt(xt,ft){Tt(xt,ft),Ct(xt)}function Ct(xt){xt._writableState&&!xt._writableState.emitClose||xt._readableState&&!xt._readableState.emitClose||xt.emit("close")}function yt(){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 Tt(xt,ft){xt.emit("error",ft)}function mt(xt,ft){var z=xt._readableState,tt=xt._writableState;z&&z.autoDestroy||tt&&tt.autoDestroy?xt.destroy(ft):xt.emit("error",ft)}zt.exports={destroy:gt,undestroy:yt,errorOrDestroy:mt}}).call(this)}).call(this,ot("_process"))},{_process:467}],408:[function(ot,zt,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function gt(Tt){var mt=!1;return function(){if(!mt){mt=!0;for(var xt=arguments.length,ft=new Array(xt),z=0;z<xt;z++)ft[z]=arguments[z];Tt.apply(this,ft)}}}function kt(){}function Ct(Tt){return Tt.setHeader&&typeof Tt.abort=="function"}function yt(Tt,mt,xt){if(typeof mt=="function")return yt(Tt,null,mt);mt||(mt={}),xt=gt(xt||kt);var ft=mt.readable||mt.readable!==!1&&Tt.readable,z=mt.writable||mt.writable!==!1&&Tt.writable,tt=function(){Tt.writable||it()},at=Tt._writableState&&Tt._writableState.finished,it=function(){z=!1,at=!0,ft||xt.call(Tt)},lt=Tt._readableState&&Tt._readableState.endEmitted,ut=function(){ft=!1,lt=!0,z||xt.call(Tt)},dt=function(Ft){xt.call(Tt,Ft)},bt=function(){var Ft;if(ft&&!lt)return(!Tt._readableState||!Tt._readableState.ended)&&(Ft=new vt),xt.call(Tt,Ft);if(z&&!at)return(!Tt._writableState||!Tt._writableState.ended)&&(Ft=new vt),xt.call(Tt,Ft)},At=function(){Tt.req.on("finish",it)};return Ct(Tt)?(Tt.on("complete",it),Tt.on("abort",bt),Tt.req?At():Tt.on("request",At)):z&&!Tt._writableState&&(Tt.on("end",tt),Tt.on("close",tt)),Tt.on("end",ut),Tt.on("finish",it),mt.error!==!1&&Tt.on("error",dt),Tt.on("close",bt),function(){Tt.removeListener("complete",it),Tt.removeListener("abort",bt),Tt.removeListener("request",At),Tt.req&&Tt.req.removeListener("finish",it),Tt.removeListener("end",tt),Tt.removeListener("close",tt),Tt.removeListener("finish",it),Tt.removeListener("end",ut),Tt.removeListener("error",dt),Tt.removeListener("close",bt)}}zt.exports=yt},{"../../../errors":399}],409:[function(ot,zt,Bt){zt.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ot,zt,Bt){"use strict";var vt;function gt(it){var lt=!1;return function(){lt||(lt=!0,it.apply(void 0,arguments))}}var kt=ot("../../../errors").codes,Ct=kt.ERR_MISSING_ARGS,yt=kt.ERR_STREAM_DESTROYED;function Tt(it){if(it)throw it}function mt(it){return it.setHeader&&typeof it.abort=="function"}function xt(it,lt,ut,dt){dt=gt(dt);var bt=!1;it.on("close",function(){bt=!0}),vt===void 0&&(vt=ot("./end-of-stream")),vt(it,{readable:lt,writable:ut},function(Dt){if(Dt)return dt(Dt);bt=!0,dt()});var At=!1;return function(Dt){if(!bt&&!At){if(At=!0,mt(it))return it.abort();if(typeof it.destroy=="function")return it.destroy();dt(Dt||new yt("pipe"))}}}function ft(it){it()}function z(it,lt){return it.pipe(lt)}function tt(it){return!it.length||typeof it[it.length-1]!="function"?Tt:it.pop()}function at(){for(var it=arguments.length,lt=new Array(it),ut=0;ut<it;ut++)lt[ut]=arguments[ut];var dt=tt(lt);if(Array.isArray(lt[0])&&(lt=lt[0]),lt.length<2)throw new Ct("streams");var bt,At=lt.map(function(Dt,Ft){var jt=Ft<lt.length-1,Nt=Ft>0;return xt(Dt,jt,Nt,function(_t){bt||(bt=_t),_t&&At.forEach(ft),!jt&&(At.forEach(ft),dt(bt))})});return lt.reduce(z)}zt.exports=at},{"../../../errors":399,"./end-of-stream":408}],411:[function(ot,zt,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_INVALID_OPT_VALUE;function gt(Ct,yt,Tt){return Ct.highWaterMark!=null?Ct.highWaterMark:yt?Ct[Tt]:null}function kt(Ct,yt,Tt,mt){var xt=gt(yt,mt,Tt);if(xt!=null){if(!(isFinite(xt)&&Math.floor(xt)===xt)||xt<0){var ft=mt?Tt:"highWaterMark";throw new vt(ft,xt)}return Math.floor(xt)}return Ct.objectMode?16:16*1024}zt.exports={getHighWaterMark:kt}},{"../../../errors":399}],412:[function(ot,zt,Bt){arguments[4][393][0].apply(Bt,arguments)},{dup:393,events:344}],413:[function(ot,zt,Bt){"use strict";var vt=ot("safe-buffer").Buffer,gt=vt.isEncoding||function(At){switch(At=""+At,At&&At.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 kt(At){if(!At)return"utf8";for(var Dt;;)switch(At){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 At;default:if(Dt)return;At=(""+At).toLowerCase(),Dt=!0}}function Ct(At){var Dt=kt(At);if(typeof Dt!="string"&&(vt.isEncoding===gt||!gt(At)))throw new Error("Unknown encoding: "+At);return Dt||At}Bt.StringDecoder=yt;function yt(At){this.encoding=Ct(At);var Dt;switch(this.encoding){case"utf16le":this.text=at,this.end=it,Dt=4;break;case"utf8":this.fillLast=ft,Dt=4;break;case"base64":this.text=lt,this.end=ut,Dt=3;break;default:this.write=dt,this.end=bt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vt.allocUnsafe(Dt)}yt.prototype.write=function(At){if(At.length===0)return"";var Dt,Ft;if(this.lastNeed){if(Dt=this.fillLast(At),Dt===void 0)return"";Ft=this.lastNeed,this.lastNeed=0}else Ft=0;return Ft<At.length?Dt?Dt+this.text(At,Ft):this.text(At,Ft):Dt||""},yt.prototype.end=tt,yt.prototype.text=z,yt.prototype.fillLast=function(At){if(this.lastNeed<=At.length)return At.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);At.copy(this.lastChar,this.lastTotal-this.lastNeed,0,At.length),this.lastNeed-=At.length};function Tt(At){return At<=127?0:At>>5===6?2:At>>4===14?3:At>>3===30?4:At>>6===2?-1:-2}function mt(At,Dt,Ft){var jt=Dt.length-1;if(jt<Ft)return 0;var Nt=Tt(Dt[jt]);return Nt>=0?(Nt>0&&(At.lastNeed=Nt-1),Nt):--jt<Ft||Nt===-2?0:(Nt=Tt(Dt[jt]),Nt>=0?(Nt>0&&(At.lastNeed=Nt-2),Nt):--jt<Ft||Nt===-2?0:(Nt=Tt(Dt[jt]),Nt>=0?(Nt>0&&(Nt===2?Nt=0:At.lastNeed=Nt-3),Nt):0))}function xt(At,Dt,Ft){if((Dt[0]&192)!==128)return At.lastNeed=0,"\uFFFD";if(At.lastNeed>1&&Dt.length>1){if((Dt[1]&192)!==128)return At.lastNeed=1,"\uFFFD";if(At.lastNeed>2&&Dt.length>2&&(Dt[2]&192)!==128)return At.lastNeed=2,"\uFFFD"}}function ft(At){var Dt=this.lastTotal-this.lastNeed,Ft=xt(this,At,Dt);if(Ft!==void 0)return Ft;if(this.lastNeed<=At.length)return At.copy(this.lastChar,Dt,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);At.copy(this.lastChar,Dt,0,At.length),this.lastNeed-=At.length}function z(At,Dt){var Ft=mt(this,At,Dt);if(!this.lastNeed)return At.toString("utf8",Dt);this.lastTotal=Ft;var jt=At.length-(Ft-this.lastNeed);return At.copy(this.lastChar,0,jt),At.toString("utf8",Dt,jt)}function tt(At){var Dt=At&&At.length?this.write(At):"";return this.lastNeed?Dt+"\uFFFD":Dt}function at(At,Dt){if((At.length-Dt)%2===0){var Ft=At.toString("utf16le",Dt);if(Ft){var jt=Ft.charCodeAt(Ft.length-1);if(jt>=55296&&jt<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=At[At.length-2],this.lastChar[1]=At[At.length-1],Ft.slice(0,-1)}return Ft}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=At[At.length-1],At.toString("utf16le",Dt,At.length-1)}function it(At){var Dt=At&&At.length?this.write(At):"";if(this.lastNeed){var Ft=this.lastTotal-this.lastNeed;return Dt+this.lastChar.toString("utf16le",0,Ft)}return Dt}function lt(At,Dt){var Ft=(At.length-Dt)%3;return Ft===0?At.toString("base64",Dt):(this.lastNeed=3-Ft,this.lastTotal=3,Ft===1?this.lastChar[0]=At[At.length-1]:(this.lastChar[0]=At[At.length-2],this.lastChar[1]=At[At.length-1]),At.toString("base64",Dt,At.length-Ft))}function ut(At){var Dt=At&&At.length?this.write(At):"";return this.lastNeed?Dt+this.lastChar.toString("base64",0,3-this.lastNeed):Dt}function dt(At){return At.toString(this.encoding)}function bt(At){return At&&At.length?this.write(At):""}},{"safe-buffer":396}],414:[function(ot,zt,Bt){(function(vt,gt){(function(){var kt=ot("process/browser.js").nextTick,Ct=Function.prototype.apply,yt=Array.prototype.slice,Tt={},mt=0;Bt.setTimeout=function(){return new xt(Ct.call(setTimeout,window,arguments),clearTimeout)},Bt.setInterval=function(){return new xt(Ct.call(setInterval,window,arguments),clearInterval)},Bt.clearTimeout=Bt.clearInterval=function(ft){ft.close()};function xt(ft,z){this._id=ft,this._clearFn=z}xt.prototype.unref=xt.prototype.ref=function(){},xt.prototype.close=function(){this._clearFn.call(window,this._id)},Bt.enroll=function(ft,z){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=z},Bt.unenroll=function(ft){clearTimeout(ft._idleTimeoutId),ft._idleTimeout=-1},Bt._unrefActive=Bt.active=function(ft){clearTimeout(ft._idleTimeoutId);var z=ft._idleTimeout;z>=0&&(ft._idleTimeoutId=setTimeout(function(){ft._onTimeout&&ft._onTimeout()},z))},Bt.setImmediate=typeof vt=="function"?vt:function(ft){var z=mt++,tt=arguments.length<2?!1:yt.call(arguments,1);return Tt[z]=!0,kt(function(){Tt[z]&&(tt?ft.apply(null,tt):ft.call(null),Bt.clearImmediate(z))}),z},Bt.clearImmediate=typeof gt=="function"?gt:function(ft){delete Tt[ft]}}).call(this)}).call(this,ot("timers").setImmediate,ot("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ot,zt,Bt){var vt=ot("buffer").Buffer;zt.exports=function(gt){if(gt instanceof Uint8Array){if(gt.byteOffset===0&&gt.byteLength===gt.buffer.byteLength)return gt.buffer;if(typeof gt.buffer.slice=="function")return gt.buffer.slice(gt.byteOffset,gt.byteOffset+gt.byteLength)}if(vt.isBuffer(gt)){for(var kt=new Uint8Array(gt.length),Ct=gt.length,yt=0;yt<Ct;yt++)kt[yt]=gt[yt];return kt.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ot,zt,Bt){(function(vt){(function(){zt.exports=gt;function gt(Ct,yt){if(kt("noDeprecation"))return Ct;var Tt=!1;function mt(){if(!Tt){if(kt("throwDeprecation"))throw new Error(yt);kt("traceDeprecation")?console.trace(yt):console.warn(yt),Tt=!0}return Ct.apply(this,arguments)}return mt}function kt(Ct){try{if(!vt.localStorage)return!1}catch(Tt){return!1}var yt=vt.localStorage[Ct];return yt==null?!1:String(yt).toLowerCase()==="true"}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ot,zt,Bt){arguments[4][84][0].apply(Bt,arguments)},{dup:84}],418:[function(ot,zt,Bt){"use strict";var vt=ot("is-arguments"),gt=ot("is-generator-function"),kt=ot("which-typed-array"),Ct=ot("is-typed-array");function yt(ye){return ye.call.bind(ye)}var Tt=typeof BigInt!="undefined",mt=typeof Symbol!="undefined",xt=yt(Object.prototype.toString),ft=yt(Number.prototype.valueOf),z=yt(String.prototype.valueOf),tt=yt(Boolean.prototype.valueOf);if(Tt)var at=yt(BigInt.prototype.valueOf);if(mt)var it=yt(Symbol.prototype.valueOf);function lt(ye,Pe){if(typeof ye!="object")return!1;try{return Pe(ye),!0}catch(Ae){return!1}}Bt.isArgumentsObject=vt,Bt.isGeneratorFunction=gt,Bt.isTypedArray=Ct;function ut(ye){return typeof Promise!="undefined"&&ye instanceof Promise||ye!==null&&typeof ye=="object"&&typeof ye.then=="function"&&typeof ye.catch=="function"}Bt.isPromise=ut;function dt(ye){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ye):Ct(ye)||le(ye)}Bt.isArrayBufferView=dt;function bt(ye){return kt(ye)==="Uint8Array"}Bt.isUint8Array=bt;function At(ye){return kt(ye)==="Uint8ClampedArray"}Bt.isUint8ClampedArray=At;function Dt(ye){return kt(ye)==="Uint16Array"}Bt.isUint16Array=Dt;function Ft(ye){return kt(ye)==="Uint32Array"}Bt.isUint32Array=Ft;function jt(ye){return kt(ye)==="Int8Array"}Bt.isInt8Array=jt;function Nt(ye){return kt(ye)==="Int16Array"}Bt.isInt16Array=Nt;function _t(ye){return kt(ye)==="Int32Array"}Bt.isInt32Array=_t;function Wt(ye){return kt(ye)==="Float32Array"}Bt.isFloat32Array=Wt;function Jt(ye){return kt(ye)==="Float64Array"}Bt.isFloat64Array=Jt;function Ut(ye){return kt(ye)==="BigInt64Array"}Bt.isBigInt64Array=Ut;function Vt(ye){return kt(ye)==="BigUint64Array"}Bt.isBigUint64Array=Vt;function oe(ye){return xt(ye)==="[object Map]"}oe.working=typeof Map!="undefined"&&oe(new Map);function se(ye){return typeof Map=="undefined"?!1:oe.working?oe(ye):ye instanceof Map}Bt.isMap=se;function he(ye){return xt(ye)==="[object Set]"}he.working=typeof Set!="undefined"&&he(new Set);function be(ye){return typeof Set=="undefined"?!1:he.working?he(ye):ye instanceof Set}Bt.isSet=be;function Yt(ye){return xt(ye)==="[object WeakMap]"}Yt.working=typeof WeakMap!="undefined"&&Yt(new WeakMap);function ne(ye){return typeof WeakMap=="undefined"?!1:Yt.working?Yt(ye):ye instanceof WeakMap}Bt.isWeakMap=ne;function ve(ye){return xt(ye)==="[object WeakSet]"}ve.working=typeof WeakSet!="undefined"&&ve(new WeakSet);function Se(ye){return ve(ye)}Bt.isWeakSet=Se;function we(ye){return xt(ye)==="[object ArrayBuffer]"}we.working=typeof ArrayBuffer!="undefined"&&we(new ArrayBuffer);function ce(ye){return typeof ArrayBuffer=="undefined"?!1:we.working?we(ye):ye instanceof ArrayBuffer}Bt.isArrayBuffer=ce;function de(ye){return xt(ye)==="[object DataView]"}de.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&de(new DataView(new ArrayBuffer(1),0,1));function le(ye){return typeof DataView=="undefined"?!1:de.working?de(ye):ye instanceof DataView}Bt.isDataView=le;var Ce=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function fe(ye){return xt(ye)==="[object SharedArrayBuffer]"}function me(ye){return typeof Ce=="undefined"?!1:(typeof fe.working=="undefined"&&(fe.working=fe(new Ce)),fe.working?fe(ye):ye instanceof Ce)}Bt.isSharedArrayBuffer=me;function ke(ye){return xt(ye)==="[object AsyncFunction]"}Bt.isAsyncFunction=ke;function pe(ye){return xt(ye)==="[object Map Iterator]"}Bt.isMapIterator=pe;function qt(ye){return xt(ye)==="[object Set Iterator]"}Bt.isSetIterator=qt;function Kt(ye){return xt(ye)==="[object Generator]"}Bt.isGeneratorObject=Kt;function wt(ye){return xt(ye)==="[object WebAssembly.Module]"}Bt.isWebAssemblyCompiledModule=wt;function Lt(ye){return lt(ye,ft)}Bt.isNumberObject=Lt;function Zt(ye){return lt(ye,z)}Bt.isStringObject=Zt;function ee(ye){return lt(ye,tt)}Bt.isBooleanObject=ee;function It(ye){return Tt&&lt(ye,at)}Bt.isBigIntObject=It;function Rt(ye){return mt&&lt(ye,it)}Bt.isSymbolObject=Rt;function Ht(ye){return Lt(ye)||Zt(ye)||ee(ye)||It(ye)||Rt(ye)}Bt.isBoxedPrimitive=Ht;function re(ye){return typeof Uint8Array!="undefined"&&(ce(ye)||me(ye))}Bt.isAnyArrayBuffer=re,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ye){Object.defineProperty(Bt,ye,{enumerable:!1,value:function(){throw new Error(ye+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ot,zt,Bt){(function(vt){(function(){var gt=Object.getOwnPropertyDescriptors||function(Ce){for(var fe=Object.keys(Ce),me={},ke=0;ke<fe.length;ke++)me[fe[ke]]=Object.getOwnPropertyDescriptor(Ce,fe[ke]);return me},kt=/%[sdj%]/g;Bt.format=function(le){if(!Nt(le)){for(var Ce=[],fe=0;fe<arguments.length;fe++)Ce.push(mt(arguments[fe]));return Ce.join(" ")}for(var fe=1,me=arguments,ke=me.length,pe=String(le).replace(kt,function(Kt){if(Kt==="%%")return"%";if(fe>=ke)return Kt;switch(Kt){case"%s":return String(me[fe++]);case"%d":return Number(me[fe++]);case"%j":try{return JSON.stringify(me[fe++])}catch(wt){return"[Circular]"}default:return Kt}}),qt=me[fe];fe<ke;qt=me[++fe])Dt(qt)||!Ut(qt)?pe+=" "+qt:pe+=" "+mt(qt);return pe},Bt.deprecate=function(le,Ce){if(typeof vt!="undefined"&&vt.noDeprecation===!0)return le;if(typeof vt=="undefined")return function(){return Bt.deprecate(le,Ce).apply(this,arguments)};var fe=!1;function me(){if(!fe){if(vt.throwDeprecation)throw new Error(Ce);vt.traceDeprecation?console.trace(Ce):console.error(Ce),fe=!0}return le.apply(this,arguments)}return me};var Ct={},yt=/^$/;if(vt.env.NODE_DEBUG){var Tt=vt.env.NODE_DEBUG;Tt=Tt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),yt=new RegExp("^"+Tt+"$","i")}Bt.debuglog=function(le){if(le=le.toUpperCase(),!Ct[le])if(yt.test(le)){var Ce=vt.pid;Ct[le]=function(){var fe=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",le,Ce,fe)}}else Ct[le]=function(){};return Ct[le]};function mt(le,Ce){var fe={seen:[],stylize:ft};return arguments.length>=3&&(fe.depth=arguments[2]),arguments.length>=4&&(fe.colors=arguments[3]),At(Ce)?fe.showHidden=Ce:Ce&&Bt._extend(fe,Ce),Wt(fe.showHidden)&&(fe.showHidden=!1),Wt(fe.depth)&&(fe.depth=2),Wt(fe.colors)&&(fe.colors=!1),Wt(fe.customInspect)&&(fe.customInspect=!0),fe.colors&&(fe.stylize=xt),tt(fe,le,fe.depth)}Bt.inspect=mt,mt.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]},mt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function xt(le,Ce){var fe=mt.styles[Ce];return fe?"\x1B["+mt.colors[fe][0]+"m"+le+"\x1B["+mt.colors[fe][1]+"m":le}function ft(le,Ce){return le}function z(le){var Ce={};return le.forEach(function(fe,me){Ce[fe]=!0}),Ce}function tt(le,Ce,fe){if(le.customInspect&&Ce&&se(Ce.inspect)&&Ce.inspect!==Bt.inspect&&!(Ce.constructor&&Ce.constructor.prototype===Ce)){var me=Ce.inspect(fe,le);return Nt(me)||(me=tt(le,me,fe)),me}var ke=at(le,Ce);if(ke)return ke;var pe=Object.keys(Ce),qt=z(pe);if(le.showHidden&&(pe=Object.getOwnPropertyNames(Ce)),oe(Ce)&&(pe.indexOf("message")>=0||pe.indexOf("description")>=0))return it(Ce);if(pe.length===0){if(se(Ce)){var Kt=Ce.name?": "+Ce.name:"";return le.stylize("[Function"+Kt+"]","special")}if(Jt(Ce))return le.stylize(RegExp.prototype.toString.call(Ce),"regexp");if(Vt(Ce))return le.stylize(Date.prototype.toString.call(Ce),"date");if(oe(Ce))return it(Ce)}var wt="",Lt=!1,Zt=["{","}"];if(bt(Ce)&&(Lt=!0,Zt=["[","]"]),se(Ce)){var ee=Ce.name?": "+Ce.name:"";wt=" [Function"+ee+"]"}if(Jt(Ce)&&(wt=" "+RegExp.prototype.toString.call(Ce)),Vt(Ce)&&(wt=" "+Date.prototype.toUTCString.call(Ce)),oe(Ce)&&(wt=" "+it(Ce)),pe.length===0&&(!Lt||Ce.length==0))return Zt[0]+wt+Zt[1];if(fe<0)return Jt(Ce)?le.stylize(RegExp.prototype.toString.call(Ce),"regexp"):le.stylize("[Object]","special");le.seen.push(Ce);var It;return Lt?It=lt(le,Ce,fe,qt,pe):It=pe.map(function(Rt){return ut(le,Ce,fe,qt,Rt,Lt)}),le.seen.pop(),dt(It,wt,Zt)}function at(le,Ce){if(Wt(Ce))return le.stylize("undefined","undefined");if(Nt(Ce)){var fe="'"+JSON.stringify(Ce).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return le.stylize(fe,"string")}if(jt(Ce))return le.stylize(""+Ce,"number");if(At(Ce))return le.stylize(""+Ce,"boolean");if(Dt(Ce))return le.stylize("null","null")}function it(le){return"["+Error.prototype.toString.call(le)+"]"}function lt(le,Ce,fe,me,ke){for(var pe=[],qt=0,Kt=Ce.length;qt<Kt;++qt)Se(Ce,String(qt))?pe.push(ut(le,Ce,fe,me,String(qt),!0)):pe.push("");return ke.forEach(function(wt){wt.match(/^\d+$/)||pe.push(ut(le,Ce,fe,me,wt,!0))}),pe}function ut(le,Ce,fe,me,ke,pe){var qt,Kt,wt;if(wt=Object.getOwnPropertyDescriptor(Ce,ke)||{value:Ce[ke]},wt.get?wt.set?Kt=le.stylize("[Getter/Setter]","special"):Kt=le.stylize("[Getter]","special"):wt.set&&(Kt=le.stylize("[Setter]","special")),Se(me,ke)||(qt="["+ke+"]"),Kt||(le.seen.indexOf(wt.value)<0?(Dt(fe)?Kt=tt(le,wt.value,null):Kt=tt(le,wt.value,fe-1),Kt.indexOf(`
`)>-1&&(pe?Kt=Kt.split(`
`).map(function(Lt){return" "+Lt}).join(`
`).slice(2):Kt=`
`+Kt.split(`
`).map(function(Lt){return" "+Lt}).join(`
`))):Kt=le.stylize("[Circular]","special")),Wt(qt)){if(pe&&ke.match(/^\d+$/))return Kt;qt=JSON.stringify(""+ke),qt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(qt=qt.slice(1,-1),qt=le.stylize(qt,"name")):(qt=qt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),qt=le.stylize(qt,"string"))}return qt+": "+Kt}function dt(le,Ce,fe){var me=0,ke=le.reduce(function(pe,qt){return me++,qt.indexOf(`
`)>=0&&me++,pe+qt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ke>60?fe[0]+(Ce===""?"":Ce+`
`)+" "+le.join(`,
`)+" "+fe[1]:fe[0]+Ce+" "+le.join(", ")+" "+fe[1]}Bt.types=ot("./support/types");function bt(le){return Array.isArray(le)}Bt.isArray=bt;function At(le){return typeof le=="boolean"}Bt.isBoolean=At;function Dt(le){return le===null}Bt.isNull=Dt;function Ft(le){return le==null}Bt.isNullOrUndefined=Ft;function jt(le){return typeof le=="number"}Bt.isNumber=jt;function Nt(le){return typeof le=="string"}Bt.isString=Nt;function _t(le){return typeof le=="symbol"}Bt.isSymbol=_t;function Wt(le){return le===void 0}Bt.isUndefined=Wt;function Jt(le){return Ut(le)&&be(le)==="[object RegExp]"}Bt.isRegExp=Jt,Bt.types.isRegExp=Jt;function Ut(le){return typeof le=="object"&&le!==null}Bt.isObject=Ut;function Vt(le){return Ut(le)&&be(le)==="[object Date]"}Bt.isDate=Vt,Bt.types.isDate=Vt;function oe(le){return Ut(le)&&(be(le)==="[object Error]"||le instanceof Error)}Bt.isError=oe,Bt.types.isNativeError=oe;function se(le){return typeof le=="function"}Bt.isFunction=se;function he(le){return le===null||typeof le=="boolean"||typeof le=="number"||typeof le=="string"||typeof le=="symbol"||typeof le=="undefined"}Bt.isPrimitive=he,Bt.isBuffer=ot("./support/isBuffer");function be(le){return Object.prototype.toString.call(le)}function Yt(le){return le<10?"0"+le.toString(10):le.toString(10)}var ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ve(){var le=new Date,Ce=[Yt(le.getHours()),Yt(le.getMinutes()),Yt(le.getSeconds())].join(":");return[le.getDate(),ne[le.getMonth()],Ce].join(" ")}Bt.log=function(){console.log("%s - %s",ve(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(le,Ce){if(!Ce||!Ut(Ce))return le;for(var fe=Object.keys(Ce),me=fe.length;me--;)le[fe[me]]=Ce[fe[me]];return le};function Se(le,Ce){return Object.prototype.hasOwnProperty.call(le,Ce)}var we=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Bt.promisify=function(Ce){if(typeof Ce!="function")throw new TypeError('The "original" argument must be of type Function');if(we&&Ce[we]){var fe=Ce[we];if(typeof fe!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(fe,we,{value:fe,enumerable:!1,writable:!1,configurable:!0}),fe}function fe(){for(var me,ke,pe=new Promise(function(wt,Lt){me=wt,ke=Lt}),qt=[],Kt=0;Kt<arguments.length;Kt++)qt.push(arguments[Kt]);qt.push(function(wt,Lt){wt?ke(wt):me(Lt)});try{Ce.apply(this,qt)}catch(wt){ke(wt)}return pe}return Object.setPrototypeOf(fe,Object.getPrototypeOf(Ce)),we&&Object.defineProperty(fe,we,{value:fe,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(fe,gt(Ce))},Bt.promisify.custom=we;function ce(le,Ce){if(!le){var fe=new Error("Promise was rejected with a falsy value");fe.reason=le,le=fe}return Ce(le)}function de(le){if(typeof le!="function")throw new TypeError('The "original" argument must be of type Function');function Ce(){for(var fe=[],me=0;me<arguments.length;me++)fe.push(arguments[me]);var ke=fe.pop();if(typeof ke!="function")throw new TypeError("The last argument must be of type Function");var pe=this,qt=function(){return ke.apply(pe,arguments)};le.apply(this,fe).then(function(Kt){vt.nextTick(qt.bind(null,null,Kt))},function(Kt){vt.nextTick(ce.bind(null,Kt,qt))})}return Object.setPrototypeOf(Ce,Object.getPrototypeOf(le)),Object.defineProperties(Ce,gt(le)),Ce}Bt.callbackify=de}).call(this)}).call(this,ot("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("for-each"),kt=ot("available-typed-arrays"),Ct=ot("call-bind"),yt=ot("call-bind/callBound"),Tt=ot("gopd"),mt=yt("Object.prototype.toString"),xt=ot("has-tostringtag/shams")(),ft=typeof globalThis=="undefined"?vt:globalThis,z=kt(),tt=yt("String.prototype.slice"),at=Object.getPrototypeOf,it=yt("Array.prototype.indexOf",!0)||function(At,Dt){for(var Ft=0;Ft<At.length;Ft+=1)if(At[Ft]===Dt)return Ft;return-1},lt={__proto__:null};xt&&Tt&&at?gt(z,function(bt){var At=new ft[bt];if(Symbol.toStringTag in At){var Dt=at(At),Ft=Tt(Dt,Symbol.toStringTag);if(!Ft){var jt=at(Dt);Ft=Tt(jt,Symbol.toStringTag)}lt["$"+bt]=Ct(Ft.get)}}):gt(z,function(bt){var At=new ft[bt];lt["$"+bt]=Ct(At.slice)});var ut=function(At){var Dt=!1;return gt(lt,function(Ft,jt){if(!Dt)try{"$"+Ft(At)===jt&&(Dt=tt(jt,1))}catch(Nt){}}),Dt},dt=function(At){var Dt=!1;return gt(lt,function(Ft,jt){if(!Dt)try{Ft(At),Dt=tt(jt,1)}catch(Nt){}}),Dt};zt.exports=function(At){if(!At||typeof At!="object")return!1;if(!xt){var Dt=tt(mt(At),8,-1);return it(z,Dt)>-1?Dt:Dt!=="Object"?!1:dt(At)}return Tt?ut(At):null}}).call(this)}).call(this,typeof dn!="undefined"?dn: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(ot,zt,Bt){(function(){"use strict";Bt.stripBOM=function(vt){return vt[0]==="\uFEFF"?vt.substring(1):vt}}).call(this)},{}],422:[function(ot,zt,Bt){(function(){"use strict";var vt,gt,kt,Ct,yt,Tt={}.hasOwnProperty;vt=ot("xmlbuilder"),gt=ot("./defaults").defaults,Ct=function(mt){return typeof mt=="string"&&(mt.indexOf("&")>=0||mt.indexOf(">")>=0||mt.indexOf("<")>=0)},yt=function(mt){return"<![CDATA["+kt(mt)+"]]>"},kt=function(mt){return mt.replace("]]>","]]]]><![CDATA[>")},Bt.Builder=function(){function mt(xt){var ft,z,tt;this.options={},z=gt["0.2"];for(ft in z)Tt.call(z,ft)&&(tt=z[ft],this.options[ft]=tt);for(ft in xt)Tt.call(xt,ft)&&(tt=xt[ft],this.options[ft]=tt)}return mt.prototype.buildObject=function(xt){var ft,z,tt,at,it;return ft=this.options.attrkey,z=this.options.charkey,Object.keys(xt).length===1&&this.options.rootName===gt["0.2"].rootName?(it=Object.keys(xt)[0],xt=xt[it]):it=this.options.rootName,tt=function(lt){return function(ut,dt){var bt,At,Dt,Ft,jt,Nt;if(typeof dt!="object")lt.options.cdata&&Ct(dt)?ut.raw(yt(dt)):ut.txt(dt);else if(Array.isArray(dt)){for(Ft in dt)if(Tt.call(dt,Ft)){At=dt[Ft];for(jt in At)Dt=At[jt],ut=tt(ut.ele(jt),Dt).up()}}else for(jt in dt)if(Tt.call(dt,jt))if(At=dt[jt],jt===ft){if(typeof At=="object")for(bt in At)Nt=At[bt],ut=ut.att(bt,Nt)}else if(jt===z)lt.options.cdata&&Ct(At)?ut=ut.raw(yt(At)):ut=ut.txt(At);else if(Array.isArray(At))for(Ft in At)Tt.call(At,Ft)&&(Dt=At[Ft],typeof Dt=="string"?lt.options.cdata&&Ct(Dt)?ut=ut.ele(jt).raw(yt(Dt)).up():ut=ut.ele(jt,Dt).up():ut=tt(ut.ele(jt),Dt).up());else typeof At=="object"?ut=tt(ut.ele(jt),At).up():typeof At=="string"&&lt.options.cdata&&Ct(At)?ut=ut.ele(jt).raw(yt(At)).up():(At==null&&(At=""),ut=ut.ele(jt,At.toString()).up());return ut}}(this),at=vt.create(it,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),tt(at,xt).end(this.options.renderOpts)},mt}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(ot,zt,Bt){(function(){Bt.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(ot,zt,Bt){(function(){"use strict";var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z=function(it,lt){return function(){return it.apply(lt,arguments)}},tt=function(it,lt){for(var ut in lt)at.call(lt,ut)&&(it[ut]=lt[ut]);function dt(){this.constructor=it}return dt.prototype=lt.prototype,it.prototype=new dt,it.__super__=lt.prototype,it},at={}.hasOwnProperty;xt=ot("sax"),Ct=ot("events"),vt=ot("./bom"),mt=ot("./processors"),ft=ot("timers").setImmediate,gt=ot("./defaults").defaults,yt=function(it){return typeof it=="object"&&it!=null&&Object.keys(it).length===0},Tt=function(it,lt,ut){var dt,bt,At;for(dt=0,bt=it.length;dt<bt;dt++)At=it[dt],lt=At(lt,ut);return lt},kt=function(it,lt,ut){var dt;return dt=Object.create(null),dt.value=ut,dt.writable=!0,dt.enumerable=!0,dt.configurable=!0,Object.defineProperty(it,lt,dt)},Bt.Parser=function(it){tt(lt,it);function lt(ut){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 dt,bt,At;if(!(this instanceof Bt.Parser))return new Bt.Parser(ut);this.options={},bt=gt["0.2"];for(dt in bt)at.call(bt,dt)&&(At=bt[dt],this.options[dt]=At);for(dt in ut)at.call(ut,dt)&&(At=ut[dt],this.options[dt]=At);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(mt.normalize)),this.reset()}return lt.prototype.processAsync=function(){var ut,dt;try{return this.remaining.length<=this.options.chunkSize?(ut=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ut),this.saxParser.close()):(ut=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ut),ft(this.processAsync))}catch(bt){if(dt=bt,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(dt)}},lt.prototype.assignOrPush=function(ut,dt,bt){return dt in ut?(ut[dt]instanceof Array||kt(ut,dt,[ut[dt]]),ut[dt].push(bt)):this.options.explicitArray?kt(ut,dt,[bt]):kt(ut,dt,bt)},lt.prototype.reset=function(){var ut,dt,bt,At;return this.removeAllListeners(),this.saxParser=xt.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Dt){return function(Ft){if(Dt.saxParser.resume(),!Dt.saxParser.errThrown)return Dt.saxParser.errThrown=!0,Dt.emit("error",Ft)}}(this),this.saxParser.onend=function(Dt){return function(){if(!Dt.saxParser.ended)return Dt.saxParser.ended=!0,Dt.emit("end",Dt.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,At=[],ut=this.options.attrkey,dt=this.options.charkey,this.saxParser.onopentag=function(Dt){return function(Ft){var jt,Nt,_t,Wt,Jt;if(_t={},_t[dt]="",!Dt.options.ignoreAttrs){Jt=Ft.attributes;for(jt in Jt)at.call(Jt,jt)&&(!(ut in _t)&&!Dt.options.mergeAttrs&&(_t[ut]={}),Nt=Dt.options.attrValueProcessors?Tt(Dt.options.attrValueProcessors,Ft.attributes[jt],jt):Ft.attributes[jt],Wt=Dt.options.attrNameProcessors?Tt(Dt.options.attrNameProcessors,jt):jt,Dt.options.mergeAttrs?Dt.assignOrPush(_t,Wt,Nt):kt(_t[ut],Wt,Nt))}return _t["#name"]=Dt.options.tagNameProcessors?Tt(Dt.options.tagNameProcessors,Ft.name):Ft.name,Dt.options.xmlns&&(_t[Dt.options.xmlnskey]={uri:Ft.uri,local:Ft.local}),At.push(_t)}}(this),this.saxParser.onclosetag=function(Dt){return function(){var Ft,jt,Nt,_t,Wt,Jt,Ut,Vt,oe,se;if(Jt=At.pop(),Wt=Jt["#name"],(!Dt.options.explicitChildren||!Dt.options.preserveChildrenOrder)&&delete Jt["#name"],Jt.cdata===!0&&(Ft=Jt.cdata,delete Jt.cdata),oe=At[At.length-1],Jt[dt].match(/^\s*$/)&&!Ft?(jt=Jt[dt],delete Jt[dt]):(Dt.options.trim&&(Jt[dt]=Jt[dt].trim()),Dt.options.normalize&&(Jt[dt]=Jt[dt].replace(/\s{2,}/g," ").trim()),Jt[dt]=Dt.options.valueProcessors?Tt(Dt.options.valueProcessors,Jt[dt],Wt):Jt[dt],Object.keys(Jt).length===1&&dt in Jt&&!Dt.EXPLICIT_CHARKEY&&(Jt=Jt[dt])),yt(Jt)&&(typeof Dt.options.emptyTag=="function"?Jt=Dt.options.emptyTag():Jt=Dt.options.emptyTag!==""?Dt.options.emptyTag:jt),Dt.options.validator!=null&&(se="/"+function(){var he,be,Yt;for(Yt=[],he=0,be=At.length;he<be;he++)_t=At[he],Yt.push(_t["#name"]);return Yt}().concat(Wt).join("/"),function(){var he;try{return Jt=Dt.options.validator(se,oe&&oe[Wt],Jt)}catch(be){return he=be,Dt.emit("error",he)}}()),Dt.options.explicitChildren&&!Dt.options.mergeAttrs&&typeof Jt=="object"){if(!Dt.options.preserveChildrenOrder)_t={},Dt.options.attrkey in Jt&&(_t[Dt.options.attrkey]=Jt[Dt.options.attrkey],delete Jt[Dt.options.attrkey]),!Dt.options.charsAsChildren&&Dt.options.charkey in Jt&&(_t[Dt.options.charkey]=Jt[Dt.options.charkey],delete Jt[Dt.options.charkey]),Object.getOwnPropertyNames(Jt).length>0&&(_t[Dt.options.childkey]=Jt),Jt=_t;else if(oe){oe[Dt.options.childkey]=oe[Dt.options.childkey]||[],Ut={};for(Nt in Jt)at.call(Jt,Nt)&&kt(Ut,Nt,Jt[Nt]);oe[Dt.options.childkey].push(Ut),delete Jt["#name"],Object.keys(Jt).length===1&&dt in Jt&&!Dt.EXPLICIT_CHARKEY&&(Jt=Jt[dt])}}return At.length>0?Dt.assignOrPush(oe,Wt,Jt):(Dt.options.explicitRoot&&(Vt=Jt,Jt={},kt(Jt,Wt,Vt)),Dt.resultObject=Jt,Dt.saxParser.ended=!0,Dt.emit("end",Dt.resultObject))}}(this),bt=function(Dt){return function(Ft){var jt,Nt;if(Nt=At[At.length-1],Nt)return Nt[dt]+=Ft,Dt.options.explicitChildren&&Dt.options.preserveChildrenOrder&&Dt.options.charsAsChildren&&(Dt.options.includeWhiteChars||Ft.replace(/\\n/g,"").trim()!=="")&&(Nt[Dt.options.childkey]=Nt[Dt.options.childkey]||[],jt={"#name":"__text__"},jt[dt]=Ft,Dt.options.normalize&&(jt[dt]=jt[dt].replace(/\s{2,}/g," ").trim()),Nt[Dt.options.childkey].push(jt)),Nt}}(this),this.saxParser.ontext=bt,this.saxParser.oncdata=function(Dt){return function(Ft){var jt;if(jt=bt(Ft),jt)return jt.cdata=!0}}(this)},lt.prototype.parseString=function(ut,dt){var bt;dt!=null&&typeof dt=="function"&&(this.on("end",function(At){return this.reset(),dt(null,At)}),this.on("error",function(At){return this.reset(),dt(At)}));try{return ut=ut.toString(),ut.trim()===""?(this.emit("end",null),!0):(ut=vt.stripBOM(ut),this.options.async?(this.remaining=ut,ft(this.processAsync),this.saxParser):this.saxParser.write(ut).close())}catch(At){if(bt=At,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw bt}else return this.emit("error",bt),this.saxParser.errThrown=!0}},lt.prototype.parseStringPromise=function(ut){return new Promise(function(dt){return function(bt,At){return dt.parseString(ut,function(Dt,Ft){return Dt?At(Dt):bt(Ft)})}}(this))},lt}(Ct),Bt.parseString=function(it,lt,ut){var dt,bt,At;return ut!=null?(typeof ut=="function"&&(dt=ut),typeof lt=="object"&&(bt=lt)):(typeof lt=="function"&&(dt=lt),bt={}),At=new Bt.Parser(bt),At.parseString(it,dt)},Bt.parseStringPromise=function(it,lt){var ut,dt;return typeof lt=="object"&&(ut=lt),dt=new Bt.Parser(ut),dt.parseStringPromise(it)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(ot,zt,Bt){(function(){"use strict";var vt;vt=new RegExp(/(?!xmlns)^.*:/),Bt.normalize=function(gt){return gt.toLowerCase()},Bt.firstCharLowerCase=function(gt){return gt.charAt(0).toLowerCase()+gt.slice(1)},Bt.stripPrefix=function(gt){return gt.replace(vt,"")},Bt.parseNumbers=function(gt){return isNaN(gt)||(gt=gt%1===0?parseInt(gt,10):parseFloat(gt)),gt},Bt.parseBooleans=function(gt){return/^(?:true|false)$/i.test(gt)&&(gt=gt.toLowerCase()==="true"),gt}}).call(this)},{}],426:[function(ot,zt,Bt){(function(){"use strict";var vt,gt,kt,Ct,yt=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;gt=ot("./defaults"),vt=ot("./builder"),kt=ot("./parser"),Ct=ot("./processors"),Bt.defaults=gt.defaults,Bt.processors=Ct,Bt.ValidationError=function(mt){yt(xt,mt);function xt(ft){this.message=ft}return xt}(Error),Bt.Builder=vt.Builder,Bt.Parser=kt.Parser,Bt.parseString=kt.parseString,Bt.parseStringPromise=kt.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ot,zt,Bt){(function(){zt.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ot,zt,Bt){(function(){zt.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(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt=[].slice,ft={}.hasOwnProperty;vt=function(){var z,tt,at,it,lt,ut;if(ut=arguments[0],lt=2<=arguments.length?xt.call(arguments,1):[],yt(Object.assign))Object.assign.apply(null,arguments);else for(z=0,at=lt.length;z<at;z++)if(it=lt[z],it!=null)for(tt in it)ft.call(it,tt)&&(ut[tt]=it[tt]);return ut},yt=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Tt=function(z){var tt;return!!z&&((tt=typeof z)=="function"||tt==="object")},kt=function(z){return yt(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ct=function(z){var tt;if(kt(z))return!z.length;for(tt in z)if(ft.call(z,tt))return!1;return!0},mt=function(z){var tt,at;return Tt(z)&&(at=Object.getPrototypeOf(z))&&(tt=at.constructor)&&typeof tt=="function"&&tt instanceof tt&&Function.prototype.toString.call(tt)===Function.prototype.toString.call(Object)},gt=function(z){return yt(z.valueOf)?z.valueOf():z},zt.exports.assign=vt,zt.exports.isFunction=yt,zt.exports.isObject=Tt,zt.exports.isArray=kt,zt.exports.isEmpty=Ct,zt.exports.isPlainObject=mt,zt.exports.getValue=gt}).call(this)},{}],430:[function(ot,zt,Bt){(function(){zt.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ot,zt,Bt){(function(){var vt,gt,kt;vt=ot("./NodeType"),kt=ot("./XMLNode"),zt.exports=gt=function(){function Ct(yt,Tt,mt){if(this.parent=yt,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Tt==null)throw new Error("Missing attribute name. "+this.debugInfo(Tt));this.name=this.stringify.name(Tt),this.value=this.stringify.attValue(mt),this.type=vt.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ct.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ct.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ct.prototype,"textContent",{get:function(){return this.value},set:function(yt){return this.value=yt||""}}),Object.defineProperty(Ct.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ct.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ct.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ct.prototype,"specified",{get:function(){return!0}}),Ct.prototype.clone=function(){return Object.create(this)},Ct.prototype.toString=function(yt){return this.options.writer.attribute(this,this.options.writer.filterOptions(yt))},Ct.prototype.debugInfo=function(yt){return yt=yt||this.name,yt==null?"parent: <"+this.parent.name+">":"attribute: {"+yt+"}, parent: <"+this.parent.name+">"},Ct.prototype.isEqualNode=function(yt){return!(yt.namespaceURI!==this.namespaceURI||yt.prefix!==this.prefix||yt.localName!==this.localName||yt.value!==this.value)},Ct}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;vt=ot("./NodeType"),kt=ot("./XMLCharacterData"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=vt.CData,this.value=this.stringify.cdata(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.cdata(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ot,zt,Bt){(function(){var vt,gt,kt=function(yt,Tt){for(var mt in Tt)Ct.call(Tt,mt)&&(yt[mt]=Tt[mt]);function xt(){this.constructor=yt}return xt.prototype=Tt.prototype,yt.prototype=new xt,yt.__super__=Tt.prototype,yt},Ct={}.hasOwnProperty;gt=ot("./XMLNode"),zt.exports=vt=function(yt){kt(Tt,yt);function Tt(mt){Tt.__super__.constructor.call(this,mt),this.value=""}return Object.defineProperty(Tt.prototype,"data",{get:function(){return this.value},set:function(mt){return this.value=mt||""}}),Object.defineProperty(Tt.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Tt.prototype,"textContent",{get:function(){return this.value},set:function(mt){return this.value=mt||""}}),Tt.prototype.clone=function(){return Object.create(this)},Tt.prototype.substringData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.appendData=function(mt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.insertData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.deleteData=function(mt,xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.replaceData=function(mt,xt,ft){throw new Error("This DOM method is not implemented."+this.debugInfo())},Tt.prototype.isEqualNode=function(mt){return!(!Tt.__super__.isEqualNode.apply(this,arguments).isEqualNode(mt)||mt.data!==this.data)},Tt}(gt)}).call(this)},{"./XMLNode":450}],434:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),zt.exports=kt=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=vt.Comment,this.value=this.stringify.comment(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.comment(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ot,zt,Bt){(function(){var vt,gt,kt;gt=ot("./XMLDOMErrorHandler"),kt=ot("./XMLDOMStringList"),zt.exports=vt=function(){function Ct(){var yt;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new gt,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=yt=Object.create(this.defaultParams)}return Object.defineProperty(Ct.prototype,"parameterNames",{get:function(){return new kt(Object.keys(this.defaultParams))}}),Ct.prototype.getParameter=function(yt){return this.params.hasOwnProperty(yt)?this.params[yt]:null},Ct.prototype.canSetParameter=function(yt,Tt){return!0},Ct.prototype.setParameter=function(yt,Tt){return Tt!=null?this.params[yt]=Tt:delete this.params[yt]},Ct}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(){}return gt.prototype.handleError=function(kt){throw new Error(kt)},gt}()}).call(this)},{}],437:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(){}return gt.prototype.hasFeature=function(kt,Ct){return!0},gt.prototype.createDocumentType=function(kt,Ct,yt){throw new Error("This DOM method is not implemented.")},gt.prototype.createDocument=function(kt,Ct,yt){throw new Error("This DOM method is not implemented.")},gt.prototype.createHTMLDocument=function(kt){throw new Error("This DOM method is not implemented.")},gt.prototype.getFeature=function(kt,Ct){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],438:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(kt){this.arr=kt||[]}return Object.defineProperty(gt.prototype,"length",{get:function(){return this.arr.length}}),gt.prototype.item=function(kt){return this.arr[kt]||null},gt.prototype.contains=function(kt){return this.arr.indexOf(kt)!==-1},gt}()}).call(this)},{}],439:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z,tt,at,it){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(ft));if(!tt)throw new Error("Missing DTD attribute type. "+this.debugInfo(ft));if(!at)throw new Error("Missing DTD attribute default. "+this.debugInfo(ft));if(at.indexOf("#")!==0&&(at="#"+at),!at.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(ft));if(it&&!at.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(ft));this.elementName=this.stringify.name(ft),this.type=vt.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(tt),it&&(this.defaultValue=this.stringify.dtdAttDefault(it)),this.defaultValueType=at}return mt.prototype.toString=function(xt){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(ft),this.type=vt.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return mt.prototype.toString=function(xt){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;Ct=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(mt){yt(xt,mt);function xt(ft,z,tt,at){if(xt.__super__.constructor.call(this,ft),tt==null)throw new Error("Missing DTD entity name. "+this.debugInfo(tt));if(at==null)throw new Error("Missing DTD entity value. "+this.debugInfo(tt));if(this.pe=!!z,this.name=this.stringify.name(tt),this.type=vt.EntityDeclaration,!Ct(at))this.value=this.stringify.dtdEntityValue(at),this.internal=!0;else{if(!at.pubID&&!at.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(tt));if(at.pubID&&!at.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(tt));if(this.internal=!1,at.pubID!=null&&(this.pubID=this.stringify.dtdPubID(at.pubID)),at.sysID!=null&&(this.sysID=this.stringify.dtdSysID(at.sysID)),at.nData!=null&&(this.nData=this.stringify.dtdNData(at.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(tt))}}return Object.defineProperty(xt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xt.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xt.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xt.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xt.prototype,"xmlVersion",{get:function(){return null}}),xt.prototype.toString=function(ft){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(ft))},xt}(kt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing DTD notation name. "+this.debugInfo(ft));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(ft));this.name=this.stringify.name(ft),this.type=vt.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(mt.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(mt.prototype,"systemId",{get:function(){return this.sysID}}),mt.prototype.toString=function(xt){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xt))},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;Ct=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(mt){yt(xt,mt);function xt(ft,z,tt,at){var it;xt.__super__.constructor.call(this,ft),Ct(z)&&(it=z,z=it.version,tt=it.encoding,at=it.standalone),z||(z="1.0"),this.type=vt.Declaration,this.version=this.stringify.xmlVersion(z),tt!=null&&(this.encoding=this.stringify.xmlEncoding(tt)),at!=null&&(this.standalone=this.stringify.xmlStandalone(at))}return xt.prototype.toString=function(ft){return this.options.writer.declaration(this,this.options.writer.filterOptions(ft))},xt}(kt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z=function(at,it){for(var lt in it)tt.call(it,lt)&&(at[lt]=it[lt]);function ut(){this.constructor=at}return ut.prototype=it.prototype,at.prototype=new ut,at.__super__=it.prototype,at},tt={}.hasOwnProperty;ft=ot("./Utility").isObject,xt=ot("./XMLNode"),vt=ot("./NodeType"),gt=ot("./XMLDTDAttList"),Ct=ot("./XMLDTDEntity"),kt=ot("./XMLDTDElement"),yt=ot("./XMLDTDNotation"),mt=ot("./XMLNamedNodeMap"),zt.exports=Tt=function(at){z(it,at);function it(lt,ut,dt){var bt,At,Dt,Ft,jt,Nt;if(it.__super__.constructor.call(this,lt),this.type=vt.DocType,lt.children){for(Ft=lt.children,At=0,Dt=Ft.length;At<Dt;At++)if(bt=Ft[At],bt.type===vt.Element){this.name=bt.name;break}}this.documentObject=lt,ft(ut)&&(jt=ut,ut=jt.pubID,dt=jt.sysID),dt==null&&(Nt=[ut,dt],dt=Nt[0],ut=Nt[1]),ut!=null&&(this.pubID=this.stringify.dtdPubID(ut)),dt!=null&&(this.sysID=this.stringify.dtdSysID(dt))}return Object.defineProperty(it.prototype,"entities",{get:function(){var lt,ut,dt,bt,At;for(bt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.EntityDeclaration&&!lt.pe&&(bt[lt.name]=lt);return new mt(bt)}}),Object.defineProperty(it.prototype,"notations",{get:function(){var lt,ut,dt,bt,At;for(bt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.NotationDeclaration&&(bt[lt.name]=lt);return new mt(bt)}}),Object.defineProperty(it.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(it.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(it.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),it.prototype.element=function(lt,ut){var dt;return dt=new kt(this,lt,ut),this.children.push(dt),this},it.prototype.attList=function(lt,ut,dt,bt,At){var Dt;return Dt=new gt(this,lt,ut,dt,bt,At),this.children.push(Dt),this},it.prototype.entity=function(lt,ut){var dt;return dt=new Ct(this,!1,lt,ut),this.children.push(dt),this},it.prototype.pEntity=function(lt,ut){var dt;return dt=new Ct(this,!0,lt,ut),this.children.push(dt),this},it.prototype.notation=function(lt,ut){var dt;return dt=new yt(this,lt,ut),this.children.push(dt),this},it.prototype.toString=function(lt){return this.options.writer.docType(this,this.options.writer.filterOptions(lt))},it.prototype.ele=function(lt,ut){return this.element(lt,ut)},it.prototype.att=function(lt,ut,dt,bt,At){return this.attList(lt,ut,dt,bt,At)},it.prototype.ent=function(lt,ut){return this.entity(lt,ut)},it.prototype.pent=function(lt,ut){return this.pEntity(lt,ut)},it.prototype.not=function(lt,ut){return this.notation(lt,ut)},it.prototype.up=function(){return this.root()||this.documentObject},it.prototype.isEqualNode=function(lt){return!(!it.__super__.isEqualNode.apply(this,arguments).isEqualNode(lt)||lt.name!==this.name||lt.publicId!==this.publicId||lt.systemId!==this.systemId)},it}(xt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft=function(tt,at){for(var it in at)z.call(at,it)&&(tt[it]=at[it]);function lt(){this.constructor=tt}return lt.prototype=at.prototype,tt.prototype=new lt,tt.__super__=at.prototype,tt},z={}.hasOwnProperty;xt=ot("./Utility").isPlainObject,kt=ot("./XMLDOMImplementation"),gt=ot("./XMLDOMConfiguration"),yt=ot("./XMLNode"),vt=ot("./NodeType"),mt=ot("./XMLStringifier"),Tt=ot("./XMLStringWriter"),zt.exports=Ct=function(tt){ft(at,tt);function at(it){at.__super__.constructor.call(this,null),this.name="#document",this.type=vt.Document,this.documentURI=null,this.domConfig=new gt,it||(it={}),it.writer||(it.writer=new Tt),this.options=it,this.stringify=new mt(it)}return Object.defineProperty(at.prototype,"implementation",{value:new kt}),Object.defineProperty(at.prototype,"doctype",{get:function(){var it,lt,ut,dt;for(dt=this.children,lt=0,ut=dt.length;lt<ut;lt++)if(it=dt[lt],it.type===vt.DocType)return it;return null}}),Object.defineProperty(at.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(at.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(at.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(at.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].encoding:null}}),Object.defineProperty(at.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(at.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===vt.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(at.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(at.prototype,"origin",{get:function(){return null}}),Object.defineProperty(at.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(at.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(at.prototype,"contentType",{get:function(){return null}}),at.prototype.end=function(it){var lt;return lt={},it?xt(it)&&(lt=it,it=this.options.writer):it=this.options.writer,it.document(this,it.filterOptions(lt))},at.prototype.toString=function(it){return this.options.writer.document(this,this.options.writer.filterOptions(it))},at.prototype.createElement=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createTextNode=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createComment=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createCDATASection=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createProcessingInstruction=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createAttribute=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createEntityReference=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByTagName=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.importNode=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createElementNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createAttributeNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByTagNameNS=function(it,lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementById=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.adoptNode=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.renameNode=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.getElementsByClassName=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createEvent=function(it){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createNodeIterator=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at.prototype.createTreeWalker=function(it,lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},at}(yt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,bt,At,Dt,Ft,jt,Nt,_t,Wt,Jt={}.hasOwnProperty;Wt=ot("./Utility"),Nt=Wt.isObject,jt=Wt.isFunction,_t=Wt.isPlainObject,Ft=Wt.getValue,vt=ot("./NodeType"),at=ot("./XMLDocument"),lt=ot("./XMLElement"),Ct=ot("./XMLCData"),yt=ot("./XMLComment"),dt=ot("./XMLRaw"),Dt=ot("./XMLText"),ut=ot("./XMLProcessingInstruction"),z=ot("./XMLDeclaration"),tt=ot("./XMLDocType"),Tt=ot("./XMLDTDAttList"),xt=ot("./XMLDTDEntity"),mt=ot("./XMLDTDElement"),ft=ot("./XMLDTDNotation"),kt=ot("./XMLAttribute"),At=ot("./XMLStringifier"),bt=ot("./XMLStringWriter"),gt=ot("./WriterState"),zt.exports=it=function(){function Ut(Vt,oe,se){var he;this.name="?xml",this.type=vt.Document,Vt||(Vt={}),he={},Vt.writer?_t(Vt.writer)&&(he=Vt.writer,Vt.writer=new bt):Vt.writer=new bt,this.options=Vt,this.writer=Vt.writer,this.writerOptions=this.writer.filterOptions(he),this.stringify=new At(Vt),this.onDataCallback=oe||function(){},this.onEndCallback=se||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ut.prototype.createChildNode=function(Vt){var oe,se,he,be,Yt,ne,ve,Se;switch(Vt.type){case vt.CData:this.cdata(Vt.value);break;case vt.Comment:this.comment(Vt.value);break;case vt.Element:he={},ve=Vt.attribs;for(se in ve)Jt.call(ve,se)&&(oe=ve[se],he[se]=oe.value);this.node(Vt.name,he);break;case vt.Dummy:this.dummy();break;case vt.Raw:this.raw(Vt.value);break;case vt.Text:this.text(Vt.value);break;case vt.ProcessingInstruction:this.instruction(Vt.target,Vt.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Vt.constructor.name)}for(Se=Vt.children,Yt=0,ne=Se.length;Yt<ne;Yt++)be=Se[Yt],this.createChildNode(be),be.type===vt.Element&&this.up();return this},Ut.prototype.dummy=function(){return this},Ut.prototype.node=function(Vt,oe,se){var he;if(Vt==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(Vt));return this.openCurrent(),Vt=Ft(Vt),oe==null&&(oe={}),oe=Ft(oe),Nt(oe)||(he=[oe,se],se=he[0],oe=he[1]),this.currentNode=new lt(this,Vt,oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,se!=null&&this.text(se),this},Ut.prototype.element=function(Vt,oe,se){var he,be,Yt,ne,ve,Se;if(this.currentNode&&this.currentNode.type===vt.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Vt)||Nt(Vt)||jt(Vt))for(ne=this.options.noValidation,this.options.noValidation=!0,Se=new at(this.options).element("TEMP_ROOT"),Se.element(Vt),this.options.noValidation=ne,ve=Se.children,be=0,Yt=ve.length;be<Yt;be++)he=ve[be],this.createChildNode(he),he.type===vt.Element&&this.up();else this.node(Vt,oe,se);return this},Ut.prototype.attribute=function(Vt,oe){var se,he;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Vt));if(Vt!=null&&(Vt=Ft(Vt)),Nt(Vt))for(se in Vt)Jt.call(Vt,se)&&(he=Vt[se],this.attribute(se,he));else jt(oe)&&(oe=oe.apply()),this.options.keepNullAttributes&&oe==null?this.currentNode.attribs[Vt]=new kt(this,Vt,""):oe!=null&&(this.currentNode.attribs[Vt]=new kt(this,Vt,oe));return this},Ut.prototype.text=function(Vt){var oe;return this.openCurrent(),oe=new Dt(this,Vt),this.onData(this.writer.text(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.cdata=function(Vt){var oe;return this.openCurrent(),oe=new Ct(this,Vt),this.onData(this.writer.cdata(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.comment=function(Vt){var oe;return this.openCurrent(),oe=new yt(this,Vt),this.onData(this.writer.comment(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.raw=function(Vt){var oe;return this.openCurrent(),oe=new dt(this,Vt),this.onData(this.writer.raw(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.instruction=function(Vt,oe){var se,he,be,Yt,ne;if(this.openCurrent(),Vt!=null&&(Vt=Ft(Vt)),oe!=null&&(oe=Ft(oe)),Array.isArray(Vt))for(se=0,Yt=Vt.length;se<Yt;se++)he=Vt[se],this.instruction(he);else if(Nt(Vt))for(he in Vt)Jt.call(Vt,he)&&(be=Vt[he],this.instruction(he,be));else jt(oe)&&(oe=oe.apply()),ne=new ut(this,Vt,oe),this.onData(this.writer.processingInstruction(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ut.prototype.declaration=function(Vt,oe,se){var he;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return he=new z(this,Vt,oe,se),this.onData(this.writer.declaration(he,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.doctype=function(Vt,oe,se){if(this.openCurrent(),Vt==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 tt(this,oe,se),this.currentNode.rootNodeName=Vt,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ut.prototype.dtdElement=function(Vt,oe){var se;return this.openCurrent(),se=new mt(this,Vt,oe),this.onData(this.writer.dtdElement(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.attList=function(Vt,oe,se,he,be){var Yt;return this.openCurrent(),Yt=new Tt(this,Vt,oe,se,he,be),this.onData(this.writer.dtdAttList(Yt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.entity=function(Vt,oe){var se;return this.openCurrent(),se=new xt(this,!1,Vt,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.pEntity=function(Vt,oe){var se;return this.openCurrent(),se=new xt(this,!0,Vt,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.notation=function(Vt,oe){var se;return this.openCurrent(),se=new ft(this,Vt,oe),this.onData(this.writer.dtdNotation(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.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},Ut.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ut.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ut.prototype.openNode=function(Vt){var oe,se,he,be;if(!Vt.isOpen){if(!this.root&&this.currentLevel===0&&Vt.type===vt.Element&&(this.root=Vt),se="",Vt.type===vt.Element){this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"<"+Vt.name,be=Vt.attribs;for(he in be)Jt.call(be,he)&&(oe=be[he],se+=this.writer.attribute(oe,this.writerOptions,this.currentLevel));se+=(Vt.children?">":"/>")+this.writer.endline(Vt,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.InsideTag}else this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Vt.rootNodeName,Vt.pubID&&Vt.sysID?se+=' PUBLIC "'+Vt.pubID+'" "'+Vt.sysID+'"':Vt.sysID&&(se+=' SYSTEM "'+Vt.sysID+'"'),Vt.children?(se+=" [",this.writerOptions.state=gt.InsideTag):(this.writerOptions.state=gt.CloseTag,se+=">"),se+=this.writer.endline(Vt,this.writerOptions,this.currentLevel);return this.onData(se,this.currentLevel),Vt.isOpen=!0}},Ut.prototype.closeNode=function(Vt){var oe;if(!Vt.isClosed)return oe="",this.writerOptions.state=gt.CloseTag,Vt.type===vt.Element?oe=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"</"+Vt.name+">"+this.writer.endline(Vt,this.writerOptions,this.currentLevel):oe=this.writer.indent(Vt,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Vt,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.None,this.onData(oe,this.currentLevel),Vt.isClosed=!0},Ut.prototype.onData=function(Vt,oe){return this.documentStarted=!0,this.onDataCallback(Vt,oe+1)},Ut.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ut.prototype.debugInfo=function(Vt){return Vt==null?"":"node: <"+Vt+">"},Ut.prototype.ele=function(){return this.element.apply(this,arguments)},Ut.prototype.nod=function(Vt,oe,se){return this.node(Vt,oe,se)},Ut.prototype.txt=function(Vt){return this.text(Vt)},Ut.prototype.dat=function(Vt){return this.cdata(Vt)},Ut.prototype.com=function(Vt){return this.comment(Vt)},Ut.prototype.ins=function(Vt,oe){return this.instruction(Vt,oe)},Ut.prototype.dec=function(Vt,oe,se){return this.declaration(Vt,oe,se)},Ut.prototype.dtd=function(Vt,oe,se){return this.doctype(Vt,oe,se)},Ut.prototype.e=function(Vt,oe,se){return this.element(Vt,oe,se)},Ut.prototype.n=function(Vt,oe,se){return this.node(Vt,oe,se)},Ut.prototype.t=function(Vt){return this.text(Vt)},Ut.prototype.d=function(Vt){return this.cdata(Vt)},Ut.prototype.c=function(Vt){return this.comment(Vt)},Ut.prototype.r=function(Vt){return this.raw(Vt)},Ut.prototype.i=function(Vt,oe){return this.instruction(Vt,oe)},Ut.prototype.att=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.a=function(){return this.currentNode&&this.currentNode.type===vt.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ut.prototype.ent=function(Vt,oe){return this.entity(Vt,oe)},Ut.prototype.pent=function(Vt,oe){return this.pEntity(Vt,oe)},Ut.prototype.not=function(Vt,oe){return this.notation(Vt,oe)},Ut}()}).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(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),zt.exports=gt=function(Tt){Ct(mt,Tt);function mt(xt){mt.__super__.constructor.call(this,xt),this.type=vt.Dummy}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return""},mt}(kt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z=function(at,it){for(var lt in it)tt.call(it,lt)&&(at[lt]=it[lt]);function ut(){this.constructor=at}return ut.prototype=it.prototype,at.prototype=new ut,at.__super__=it.prototype,at},tt={}.hasOwnProperty;ft=ot("./Utility"),xt=ft.isObject,mt=ft.isFunction,Tt=ft.getValue,yt=ot("./XMLNode"),vt=ot("./NodeType"),gt=ot("./XMLAttribute"),Ct=ot("./XMLNamedNodeMap"),zt.exports=kt=function(at){z(it,at);function it(lt,ut,dt){var bt,At,Dt,Ft;if(it.__super__.constructor.call(this,lt),ut==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ut),this.type=vt.Element,this.attribs={},this.schemaTypeInfo=null,dt!=null&&this.attribute(dt),lt.type===vt.Document&&(this.isRoot=!0,this.documentObject=lt,lt.rootObject=this,lt.children)){for(Ft=lt.children,At=0,Dt=Ft.length;At<Dt;At++)if(bt=Ft[At],bt.type===vt.DocType){bt.name=this.name;break}}}return Object.defineProperty(it.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(it.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(it.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(it.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(it.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(it.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new Ct(this.attribs)),this.attributeMap}}),it.prototype.clone=function(){var lt,ut,dt,bt;dt=Object.create(this),dt.isRoot&&(dt.documentObject=null),dt.attribs={},bt=this.attribs;for(ut in bt)tt.call(bt,ut)&&(lt=bt[ut],dt.attribs[ut]=lt.clone());return dt.children=[],this.children.forEach(function(At){var Dt;return Dt=At.clone(),Dt.parent=dt,dt.children.push(Dt)}),dt},it.prototype.attribute=function(lt,ut){var dt,bt;if(lt!=null&&(lt=Tt(lt)),xt(lt))for(dt in lt)tt.call(lt,dt)&&(bt=lt[dt],this.attribute(dt,bt));else mt(ut)&&(ut=ut.apply()),this.options.keepNullAttributes&&ut==null?this.attribs[lt]=new gt(this,lt,""):ut!=null&&(this.attribs[lt]=new gt(this,lt,ut));return this},it.prototype.removeAttribute=function(lt){var ut,dt,bt;if(lt==null)throw new Error("Missing attribute name. "+this.debugInfo());if(lt=Tt(lt),Array.isArray(lt))for(dt=0,bt=lt.length;dt<bt;dt++)ut=lt[dt],delete this.attribs[ut];else delete this.attribs[lt];return this},it.prototype.toString=function(lt){return this.options.writer.element(this,this.options.writer.filterOptions(lt))},it.prototype.att=function(lt,ut){return this.attribute(lt,ut)},it.prototype.a=function(lt,ut){return this.attribute(lt,ut)},it.prototype.getAttribute=function(lt){return this.attribs.hasOwnProperty(lt)?this.attribs[lt].value:null},it.prototype.setAttribute=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNode=function(lt){return this.attribs.hasOwnProperty(lt)?this.attribs[lt]:null},it.prototype.setAttributeNode=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.removeAttributeNode=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setAttributeNS=function(lt,ut,dt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.removeAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getAttributeNodeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setAttributeNodeNS=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagNameNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.hasAttribute=function(lt){return this.attribs.hasOwnProperty(lt)},it.prototype.hasAttributeNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setIdAttribute=function(lt,ut){return this.attribs.hasOwnProperty(lt)?this.attribs[lt].isId:ut},it.prototype.setIdAttributeNS=function(lt,ut,dt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.setIdAttributeNode=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByTagNameNS=function(lt,ut){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.getElementsByClassName=function(lt){throw new Error("This DOM method is not implemented."+this.debugInfo())},it.prototype.isEqualNode=function(lt){var ut,dt,bt;if(!it.__super__.isEqualNode.apply(this,arguments).isEqualNode(lt)||lt.namespaceURI!==this.namespaceURI||lt.prefix!==this.prefix||lt.localName!==this.localName||lt.attribs.length!==this.attribs.length)return!1;for(ut=dt=0,bt=this.attribs.length-1;0<=bt?dt<=bt:dt>=bt;ut=0<=bt?++dt:--dt)if(!this.attribs[ut].isEqualNode(lt.attribs[ut]))return!1;return!0},it}(yt)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(kt){this.nodes=kt}return Object.defineProperty(gt.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),gt.prototype.clone=function(){return this.nodes=null},gt.prototype.getNamedItem=function(kt){return this.nodes[kt]},gt.prototype.setNamedItem=function(kt){var Ct;return Ct=this.nodes[kt.nodeName],this.nodes[kt.nodeName]=kt,Ct||null},gt.prototype.removeNamedItem=function(kt){var Ct;return Ct=this.nodes[kt],delete this.nodes[kt],Ct||null},gt.prototype.item=function(kt){return this.nodes[Object.keys(this.nodes)[kt]]||null},gt.prototype.getNamedItemNS=function(kt,Ct){throw new Error("This DOM method is not implemented.")},gt.prototype.setNamedItemNS=function(kt){throw new Error("This DOM method is not implemented.")},gt.prototype.removeNamedItemNS=function(kt,Ct){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],450:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,bt,At,Dt,Ft={}.hasOwnProperty;Dt=ot("./Utility"),At=Dt.isObject,bt=Dt.isFunction,dt=Dt.isEmpty,ut=Dt.getValue,xt=null,kt=null,Ct=null,yt=null,Tt=null,it=null,lt=null,at=null,mt=null,gt=null,tt=null,ft=null,vt=null,zt.exports=z=function(){function jt(Nt){this.parent=Nt,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,xt||(xt=ot("./XMLElement"),kt=ot("./XMLCData"),Ct=ot("./XMLComment"),yt=ot("./XMLDeclaration"),Tt=ot("./XMLDocType"),it=ot("./XMLRaw"),lt=ot("./XMLText"),at=ot("./XMLProcessingInstruction"),mt=ot("./XMLDummy"),gt=ot("./NodeType"),tt=ot("./XMLNodeList"),ft=ot("./XMLNamedNodeMap"),vt=ot("./DocumentPosition"))}return Object.defineProperty(jt.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(jt.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(jt.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(jt.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(jt.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new tt(this.children)),this.childNodeList}}),Object.defineProperty(jt.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(jt.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(jt.prototype,"previousSibling",{get:function(){var Nt;return Nt=this.parent.children.indexOf(this),this.parent.children[Nt-1]||null}}),Object.defineProperty(jt.prototype,"nextSibling",{get:function(){var Nt;return Nt=this.parent.children.indexOf(this),this.parent.children[Nt+1]||null}}),Object.defineProperty(jt.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(jt.prototype,"textContent",{get:function(){var Nt,_t,Wt,Jt,Ut;if(this.nodeType===gt.Element||this.nodeType===gt.DocumentFragment){for(Ut="",Jt=this.children,_t=0,Wt=Jt.length;_t<Wt;_t++)Nt=Jt[_t],Nt.textContent&&(Ut+=Nt.textContent);return Ut}else return null},set:function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),jt.prototype.setParent=function(Nt){var _t,Wt,Jt,Ut,Vt;for(this.parent=Nt,Nt&&(this.options=Nt.options,this.stringify=Nt.stringify),Ut=this.children,Vt=[],Wt=0,Jt=Ut.length;Wt<Jt;Wt++)_t=Ut[Wt],Vt.push(_t.setParent(this));return Vt},jt.prototype.element=function(Nt,_t,Wt){var Jt,Ut,Vt,oe,se,he,be,Yt,ne,ve,Se;if(he=null,_t===null&&Wt==null&&(ne=[{},null],_t=ne[0],Wt=ne[1]),_t==null&&(_t={}),_t=ut(_t),At(_t)||(ve=[_t,Wt],Wt=ve[0],_t=ve[1]),Nt!=null&&(Nt=ut(Nt)),Array.isArray(Nt))for(Vt=0,be=Nt.length;Vt<be;Vt++)Ut=Nt[Vt],he=this.element(Ut);else if(bt(Nt))he=this.element(Nt.apply());else if(At(Nt)){for(se in Nt)if(Ft.call(Nt,se))if(Se=Nt[se],bt(Se)&&(Se=Se.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&se.indexOf(this.stringify.convertAttKey)===0)he=this.attribute(se.substr(this.stringify.convertAttKey.length),Se);else if(!this.options.separateArrayItems&&Array.isArray(Se)&&dt(Se))he=this.dummy();else if(At(Se)&&dt(Se))he=this.element(se);else if(!this.options.keepNullNodes&&Se==null)he=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Se))for(oe=0,Yt=Se.length;oe<Yt;oe++)Ut=Se[oe],Jt={},Jt[se]=Ut,he=this.element(Jt);else At(Se)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?he=this.element(Se):(he=this.element(se),he.element(Se)):he=this.element(se,Se)}else!this.options.keepNullNodes&&Wt===null?he=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Nt.indexOf(this.stringify.convertTextKey)===0?he=this.text(Wt):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Nt.indexOf(this.stringify.convertCDataKey)===0?he=this.cdata(Wt):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Nt.indexOf(this.stringify.convertCommentKey)===0?he=this.comment(Wt):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Nt.indexOf(this.stringify.convertRawKey)===0?he=this.raw(Wt):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Nt.indexOf(this.stringify.convertPIKey)===0?he=this.instruction(Nt.substr(this.stringify.convertPIKey.length),Wt):he=this.node(Nt,_t,Wt);if(he==null)throw new Error("Could not create any elements with: "+Nt+". "+this.debugInfo());return he},jt.prototype.insertBefore=function(Nt,_t,Wt){var Jt,Ut,Vt,oe,se;if(Nt!=null&&Nt.type)return Vt=Nt,oe=_t,Vt.setParent(this),oe?(Ut=children.indexOf(oe),se=children.splice(Ut),children.push(Vt),Array.prototype.push.apply(children,se)):children.push(Vt),Vt;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Nt));return Ut=this.parent.children.indexOf(this),se=this.parent.children.splice(Ut),Jt=this.parent.element(Nt,_t,Wt),Array.prototype.push.apply(this.parent.children,se),Jt},jt.prototype.insertAfter=function(Nt,_t,Wt){var Jt,Ut,Vt;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Nt));return Ut=this.parent.children.indexOf(this),Vt=this.parent.children.splice(Ut+1),Jt=this.parent.element(Nt,_t,Wt),Array.prototype.push.apply(this.parent.children,Vt),Jt},jt.prototype.remove=function(){var Nt,_t;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Nt=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Nt,Nt-Nt+1].concat(_t=[])),this.parent},jt.prototype.node=function(Nt,_t,Wt){var Jt,Ut;return Nt!=null&&(Nt=ut(Nt)),_t||(_t={}),_t=ut(_t),At(_t)||(Ut=[_t,Wt],Wt=Ut[0],_t=Ut[1]),Jt=new xt(this,Nt,_t),Wt!=null&&Jt.text(Wt),this.children.push(Jt),Jt},jt.prototype.text=function(Nt){var _t;return At(Nt)&&this.element(Nt),_t=new lt(this,Nt),this.children.push(_t),this},jt.prototype.cdata=function(Nt){var _t;return _t=new kt(this,Nt),this.children.push(_t),this},jt.prototype.comment=function(Nt){var _t;return _t=new Ct(this,Nt),this.children.push(_t),this},jt.prototype.commentBefore=function(Nt){var _t,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt),_t=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Jt),this},jt.prototype.commentAfter=function(Nt){var _t,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt+1),_t=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Jt),this},jt.prototype.raw=function(Nt){var _t;return _t=new it(this,Nt),this.children.push(_t),this},jt.prototype.dummy=function(){var Nt;return Nt=new mt(this),Nt},jt.prototype.instruction=function(Nt,_t){var Wt,Jt,Ut,Vt,oe;if(Nt!=null&&(Nt=ut(Nt)),_t!=null&&(_t=ut(_t)),Array.isArray(Nt))for(Vt=0,oe=Nt.length;Vt<oe;Vt++)Wt=Nt[Vt],this.instruction(Wt);else if(At(Nt))for(Wt in Nt)Ft.call(Nt,Wt)&&(Jt=Nt[Wt],this.instruction(Wt,Jt));else bt(_t)&&(_t=_t.apply()),Ut=new at(this,Nt,_t),this.children.push(Ut);return this},jt.prototype.instructionBefore=function(Nt,_t){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt),Wt=this.parent.instruction(Nt,_t),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.instructionAfter=function(Nt,_t){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt+1),Wt=this.parent.instruction(Nt,_t),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.declaration=function(Nt,_t,Wt){var Jt,Ut;return Jt=this.document(),Ut=new yt(Jt,Nt,_t,Wt),Jt.children.length===0?Jt.children.unshift(Ut):Jt.children[0].type===gt.Declaration?Jt.children[0]=Ut:Jt.children.unshift(Ut),Jt.root()||Jt},jt.prototype.dtd=function(Nt,_t){var Wt,Jt,Ut,Vt,oe,se,he,be,Yt,ne;for(Jt=this.document(),Ut=new Tt(Jt,Nt,_t),Yt=Jt.children,Vt=oe=0,he=Yt.length;oe<he;Vt=++oe)if(Wt=Yt[Vt],Wt.type===gt.DocType)return Jt.children[Vt]=Ut,Ut;for(ne=Jt.children,Vt=se=0,be=ne.length;se<be;Vt=++se)if(Wt=ne[Vt],Wt.isRoot)return Jt.children.splice(Vt,0,Ut),Ut;return Jt.children.push(Ut),Ut},jt.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},jt.prototype.root=function(){var Nt;for(Nt=this;Nt;){if(Nt.type===gt.Document)return Nt.rootObject;if(Nt.isRoot)return Nt;Nt=Nt.parent}},jt.prototype.document=function(){var Nt;for(Nt=this;Nt;){if(Nt.type===gt.Document)return Nt;Nt=Nt.parent}},jt.prototype.end=function(Nt){return this.document().end(Nt)},jt.prototype.prev=function(){var Nt;if(Nt=this.parent.children.indexOf(this),Nt<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Nt-1]},jt.prototype.next=function(){var Nt;if(Nt=this.parent.children.indexOf(this),Nt===-1||Nt===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Nt+1]},jt.prototype.importDocument=function(Nt){var _t;return _t=Nt.root().clone(),_t.parent=this,_t.isRoot=!1,this.children.push(_t),this},jt.prototype.debugInfo=function(Nt){var _t,Wt;return Nt=Nt||this.name,Nt==null&&!((_t=this.parent)!=null&&_t.name)?"":Nt==null?"parent: <"+this.parent.name+">":(Wt=this.parent)!=null&&Wt.name?"node: <"+Nt+">, parent: <"+this.parent.name+">":"node: <"+Nt+">"},jt.prototype.ele=function(Nt,_t,Wt){return this.element(Nt,_t,Wt)},jt.prototype.nod=function(Nt,_t,Wt){return this.node(Nt,_t,Wt)},jt.prototype.txt=function(Nt){return this.text(Nt)},jt.prototype.dat=function(Nt){return this.cdata(Nt)},jt.prototype.com=function(Nt){return this.comment(Nt)},jt.prototype.ins=function(Nt,_t){return this.instruction(Nt,_t)},jt.prototype.doc=function(){return this.document()},jt.prototype.dec=function(Nt,_t,Wt){return this.declaration(Nt,_t,Wt)},jt.prototype.e=function(Nt,_t,Wt){return this.element(Nt,_t,Wt)},jt.prototype.n=function(Nt,_t,Wt){return this.node(Nt,_t,Wt)},jt.prototype.t=function(Nt){return this.text(Nt)},jt.prototype.d=function(Nt){return this.cdata(Nt)},jt.prototype.c=function(Nt){return this.comment(Nt)},jt.prototype.r=function(Nt){return this.raw(Nt)},jt.prototype.i=function(Nt,_t){return this.instruction(Nt,_t)},jt.prototype.u=function(){return this.up()},jt.prototype.importXMLBuilder=function(Nt){return this.importDocument(Nt)},jt.prototype.replaceChild=function(Nt,_t){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.removeChild=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.appendChild=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.hasChildNodes=function(){return this.children.length!==0},jt.prototype.cloneNode=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.isSupported=function(Nt,_t){return!0},jt.prototype.hasAttributes=function(){return this.attribs.length!==0},jt.prototype.compareDocumentPosition=function(Nt){var _t,Wt;return _t=this,_t===Nt?0:this.document()!==Nt.document()?(Wt=vt.Disconnected|vt.ImplementationSpecific,Math.random()<.5?Wt|=vt.Preceding:Wt|=vt.Following,Wt):_t.isAncestor(Nt)?vt.Contains|vt.Preceding:_t.isDescendant(Nt)?vt.Contains|vt.Following:_t.isPreceding(Nt)?vt.Preceding:vt.Following},jt.prototype.isSameNode=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.lookupPrefix=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.isDefaultNamespace=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.lookupNamespaceURI=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.isEqualNode=function(Nt){var _t,Wt,Jt;if(Nt.nodeType!==this.nodeType||Nt.children.length!==this.children.length)return!1;for(_t=Wt=0,Jt=this.children.length-1;0<=Jt?Wt<=Jt:Wt>=Jt;_t=0<=Jt?++Wt:--Wt)if(!this.children[_t].isEqualNode(Nt.children[_t]))return!1;return!0},jt.prototype.getFeature=function(Nt,_t){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.setUserData=function(Nt,_t,Wt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.getUserData=function(Nt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.contains=function(Nt){return Nt?Nt===this||this.isDescendant(Nt):!1},jt.prototype.isDescendant=function(Nt){var _t,Wt,Jt,Ut,Vt;for(Vt=this.children,Jt=0,Ut=Vt.length;Jt<Ut;Jt++)if(_t=Vt[Jt],Nt===_t||(Wt=_t.isDescendant(Nt),Wt))return!0;return!1},jt.prototype.isAncestor=function(Nt){return Nt.isDescendant(this)},jt.prototype.isPreceding=function(Nt){var _t,Wt;return _t=this.treePosition(Nt),Wt=this.treePosition(this),_t===-1||Wt===-1?!1:_t<Wt},jt.prototype.isFollowing=function(Nt){var _t,Wt;return _t=this.treePosition(Nt),Wt=this.treePosition(this),_t===-1||Wt===-1?!1:_t>Wt},jt.prototype.treePosition=function(Nt){var _t,Wt;return Wt=0,_t=!1,this.foreachTreeNode(this.document(),function(Jt){if(Wt++,!_t&&Jt===Nt)return _t=!0}),_t?Wt:-1},jt.prototype.foreachTreeNode=function(Nt,_t){var Wt,Jt,Ut,Vt,oe;for(Nt||(Nt=this.document()),Vt=Nt.children,Jt=0,Ut=Vt.length;Jt<Ut;Jt++){if(Wt=Vt[Jt],oe=_t(Wt))return oe;if(oe=this.foreachTreeNode(Wt,_t),oe)return oe}},jt}()}).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(ot,zt,Bt){(function(){var vt;zt.exports=vt=function(){function gt(kt){this.nodes=kt}return Object.defineProperty(gt.prototype,"length",{get:function(){return this.nodes.length||0}}),gt.prototype.clone=function(){return this.nodes=null},gt.prototype.item=function(kt){return this.nodes[kt]||null},gt}()}).call(this)},{}],452:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),zt.exports=kt=function(Tt){Ct(mt,Tt);function mt(xt,ft,z){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=vt.ProcessingInstruction,this.target=this.stringify.insTarget(ft),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xt))},mt.prototype.isEqualNode=function(xt){return!(!mt.__super__.isEqualNode.apply(this,arguments).isEqualNode(xt)||xt.target!==this.target)},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLNode"),zt.exports=kt=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=vt.Raw,this.value=this.stringify.raw(ft)}return mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.raw(this,this.options.writer.filterOptions(xt))},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt=function(mt,xt){for(var ft in xt)Tt.call(xt,ft)&&(mt[ft]=xt[ft]);function z(){this.constructor=mt}return z.prototype=xt.prototype,mt.prototype=new z,mt.__super__=xt.prototype,mt},Tt={}.hasOwnProperty;vt=ot("./NodeType"),Ct=ot("./XMLWriterBase"),gt=ot("./WriterState"),zt.exports=kt=function(mt){yt(xt,mt);function xt(ft,z){this.stream=ft,xt.__super__.constructor.call(this,z)}return xt.prototype.endline=function(ft,z,tt){return ft.isLastRootNode&&z.state===gt.CloseTag?"":xt.__super__.endline.call(this,ft,z,tt)},xt.prototype.document=function(ft,z){var tt,at,it,lt,ut,dt,bt,At,Dt;for(bt=ft.children,at=it=0,ut=bt.length;it<ut;at=++it)tt=bt[at],tt.isLastRootNode=at===ft.children.length-1;for(z=this.filterOptions(z),At=ft.children,Dt=[],lt=0,dt=At.length;lt<dt;lt++)tt=At[lt],Dt.push(this.writeChildNode(tt,z,0));return Dt},xt.prototype.attribute=function(ft,z,tt){return this.stream.write(xt.__super__.attribute.call(this,ft,z,tt))},xt.prototype.cdata=function(ft,z,tt){return this.stream.write(xt.__super__.cdata.call(this,ft,z,tt))},xt.prototype.comment=function(ft,z,tt){return this.stream.write(xt.__super__.comment.call(this,ft,z,tt))},xt.prototype.declaration=function(ft,z,tt){return this.stream.write(xt.__super__.declaration.call(this,ft,z,tt))},xt.prototype.docType=function(ft,z,tt){var at,it,lt,ut;if(tt||(tt=0),this.openNode(ft,z,tt),z.state=gt.OpenTag,this.stream.write(this.indent(ft,z,tt)),this.stream.write("<!DOCTYPE "+ft.root().name),ft.pubID&&ft.sysID?this.stream.write(' PUBLIC "'+ft.pubID+'" "'+ft.sysID+'"'):ft.sysID&&this.stream.write(' SYSTEM "'+ft.sysID+'"'),ft.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(ft,z,tt)),z.state=gt.InsideTag,ut=ft.children,it=0,lt=ut.length;it<lt;it++)at=ut[it],this.writeChildNode(at,z,tt+1);z.state=gt.CloseTag,this.stream.write("]")}return z.state=gt.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(ft,z,tt)),z.state=gt.None,this.closeNode(ft,z,tt)},xt.prototype.element=function(ft,z,tt){var at,it,lt,ut,dt,bt,At,Dt,Ft,jt;tt||(tt=0),this.openNode(ft,z,tt),z.state=gt.OpenTag,this.stream.write(this.indent(ft,z,tt)+"<"+ft.name),Ft=ft.attribs;for(At in Ft)Tt.call(Ft,At)&&(at=Ft[At],this.attribute(at,z,tt));if(lt=ft.children.length,ut=lt===0?null:ft.children[0],lt===0||ft.children.every(function(Nt){return(Nt.type===vt.Text||Nt.type===vt.Raw)&&Nt.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=gt.CloseTag,this.stream.write("</"+ft.name+">")):(z.state=gt.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&lt===1&&(ut.type===vt.Text||ut.type===vt.Raw)&&ut.value!=null)this.stream.write(">"),z.state=gt.InsideTag,z.suppressPrettyCount++,Dt=!0,this.writeChildNode(ut,z,tt+1),z.suppressPrettyCount--,Dt=!1,z.state=gt.CloseTag,this.stream.write("</"+ft.name+">");else{for(this.stream.write(">"+this.endline(ft,z,tt)),z.state=gt.InsideTag,jt=ft.children,dt=0,bt=jt.length;dt<bt;dt++)it=jt[dt],this.writeChildNode(it,z,tt+1);z.state=gt.CloseTag,this.stream.write(this.indent(ft,z,tt)+"</"+ft.name+">")}return this.stream.write(this.endline(ft,z,tt)),z.state=gt.None,this.closeNode(ft,z,tt)},xt.prototype.processingInstruction=function(ft,z,tt){return this.stream.write(xt.__super__.processingInstruction.call(this,ft,z,tt))},xt.prototype.raw=function(ft,z,tt){return this.stream.write(xt.__super__.raw.call(this,ft,z,tt))},xt.prototype.text=function(ft,z,tt){return this.stream.write(xt.__super__.text.call(this,ft,z,tt))},xt.prototype.dtdAttList=function(ft,z,tt){return this.stream.write(xt.__super__.dtdAttList.call(this,ft,z,tt))},xt.prototype.dtdElement=function(ft,z,tt){return this.stream.write(xt.__super__.dtdElement.call(this,ft,z,tt))},xt.prototype.dtdEntity=function(ft,z,tt){return this.stream.write(xt.__super__.dtdEntity.call(this,ft,z,tt))},xt.prototype.dtdNotation=function(ft,z,tt){return this.stream.write(xt.__super__.dtdNotation.call(this,ft,z,tt))},xt}(Ct)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ot,zt,Bt){(function(){var vt,gt,kt=function(yt,Tt){for(var mt in Tt)Ct.call(Tt,mt)&&(yt[mt]=Tt[mt]);function xt(){this.constructor=yt}return xt.prototype=Tt.prototype,yt.prototype=new xt,yt.__super__=Tt.prototype,yt},Ct={}.hasOwnProperty;gt=ot("./XMLWriterBase"),zt.exports=vt=function(yt){kt(Tt,yt);function Tt(mt){Tt.__super__.constructor.call(this,mt)}return Tt.prototype.document=function(mt,xt){var ft,z,tt,at,it;for(xt=this.filterOptions(xt),at="",it=mt.children,z=0,tt=it.length;z<tt;z++)ft=it[z],at+=this.writeChildNode(ft,xt,0);return xt.pretty&&at.slice(-xt.newline.length)===xt.newline&&(at=at.slice(0,-xt.newline.length)),at},Tt}(gt)}).call(this)},{"./XMLWriterBase":458}],456:[function(ot,zt,Bt){(function(){var vt,gt=function(Ct,yt){return function(){return Ct.apply(yt,arguments)}},kt={}.hasOwnProperty;zt.exports=vt=function(){function Ct(yt){this.assertLegalName=gt(this.assertLegalName,this),this.assertLegalChar=gt(this.assertLegalChar,this);var Tt,mt,xt;yt||(yt={}),this.options=yt,this.options.version||(this.options.version="1.0"),mt=yt.stringify||{};for(Tt in mt)kt.call(mt,Tt)&&(xt=mt[Tt],this[Tt]=xt)}return Ct.prototype.name=function(yt){return this.options.noValidation?yt:this.assertLegalName(""+yt||"")},Ct.prototype.text=function(yt){return this.options.noValidation?yt:this.assertLegalChar(this.textEscape(""+yt||""))},Ct.prototype.cdata=function(yt){return this.options.noValidation?yt:(yt=""+yt||"",yt=yt.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(yt))},Ct.prototype.comment=function(yt){if(this.options.noValidation)return yt;if(yt=""+yt||"",yt.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+yt);return this.assertLegalChar(yt)},Ct.prototype.raw=function(yt){return this.options.noValidation?yt:""+yt||""},Ct.prototype.attValue=function(yt){return this.options.noValidation?yt:this.assertLegalChar(this.attEscape(yt=""+yt||""))},Ct.prototype.insTarget=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.insValue=function(yt){if(this.options.noValidation)return yt;if(yt=""+yt||"",yt.match(/\?>/))throw new Error("Invalid processing instruction value: "+yt);return this.assertLegalChar(yt)},Ct.prototype.xmlVersion=function(yt){if(this.options.noValidation)return yt;if(yt=""+yt||"",!yt.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+yt);return yt},Ct.prototype.xmlEncoding=function(yt){if(this.options.noValidation)return yt;if(yt=""+yt||"",!yt.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+yt);return this.assertLegalChar(yt)},Ct.prototype.xmlStandalone=function(yt){return this.options.noValidation?yt:yt?"yes":"no"},Ct.prototype.dtdPubID=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdSysID=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdElementValue=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdAttType=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdAttDefault=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdEntityValue=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.dtdNData=function(yt){return this.options.noValidation?yt:this.assertLegalChar(""+yt||"")},Ct.prototype.convertAttKey="@",Ct.prototype.convertPIKey="?",Ct.prototype.convertTextKey="#text",Ct.prototype.convertCDataKey="#cdata",Ct.prototype.convertCommentKey="#comment",Ct.prototype.convertRawKey="#raw",Ct.prototype.assertLegalChar=function(yt){var Tt,mt;if(this.options.noValidation)return yt;if(Tt="",this.options.version==="1.0"){if(Tt=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mt=yt.match(Tt))throw new Error("Invalid character in string: "+yt+" at index "+mt.index)}else if(this.options.version==="1.1"&&(Tt=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mt=yt.match(Tt)))throw new Error("Invalid character in string: "+yt+" at index "+mt.index);return yt},Ct.prototype.assertLegalName=function(yt){var Tt;if(this.options.noValidation)return yt;if(this.assertLegalChar(yt),Tt=/^([: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])*$/,!yt.match(Tt))throw new Error("Invalid character in name");return yt},Ct.prototype.textEscape=function(yt){var Tt;return this.options.noValidation?yt:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,yt.replace(Tt,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},Ct.prototype.attEscape=function(yt){var Tt;return this.options.noValidation?yt:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,yt.replace(Tt,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},Ct}()}).call(this)},{}],457:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct=function(Tt,mt){for(var xt in mt)yt.call(mt,xt)&&(Tt[xt]=mt[xt]);function ft(){this.constructor=Tt}return ft.prototype=mt.prototype,Tt.prototype=new ft,Tt.__super__=mt.prototype,Tt},yt={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),zt.exports=kt=function(Tt){Ct(mt,Tt);function mt(xt,ft){if(mt.__super__.constructor.call(this,xt),ft==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=vt.Text,this.value=this.stringify.text(ft)}return Object.defineProperty(mt.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(mt.prototype,"wholeText",{get:function(){var xt,ft,z;for(z="",ft=this.previousSibling;ft;)z=ft.data+z,ft=ft.previousSibling;for(z+=this.data,xt=this.nextSibling;xt;)z=z+xt.data,xt=xt.nextSibling;return z}}),mt.prototype.clone=function(){return Object.create(this)},mt.prototype.toString=function(xt){return this.options.writer.text(this,this.options.writer.filterOptions(xt))},mt.prototype.splitText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt.prototype.replaceWholeText=function(xt){throw new Error("This DOM method is not implemented."+this.debugInfo())},mt}(gt)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,bt,At={}.hasOwnProperty;bt=ot("./Utility").assign,vt=ot("./NodeType"),ft=ot("./XMLDeclaration"),z=ot("./XMLDocType"),kt=ot("./XMLCData"),Ct=ot("./XMLComment"),at=ot("./XMLElement"),lt=ot("./XMLRaw"),ut=ot("./XMLText"),it=ot("./XMLProcessingInstruction"),tt=ot("./XMLDummy"),yt=ot("./XMLDTDAttList"),Tt=ot("./XMLDTDElement"),mt=ot("./XMLDTDEntity"),xt=ot("./XMLDTDNotation"),gt=ot("./WriterState"),zt.exports=dt=function(){function Dt(Ft){var jt,Nt,_t;Ft||(Ft={}),this.options=Ft,Nt=Ft.writer||{};for(jt in Nt)At.call(Nt,jt)&&(_t=Nt[jt],this["_"+jt]=this[jt],this[jt]=_t)}return Dt.prototype.filterOptions=function(Ft){var jt,Nt,_t,Wt,Jt,Ut,Vt,oe;return Ft||(Ft={}),Ft=bt({},this.options,Ft),jt={writer:this},jt.pretty=Ft.pretty||!1,jt.allowEmpty=Ft.allowEmpty||!1,jt.indent=(Nt=Ft.indent)!=null?Nt:" ",jt.newline=(_t=Ft.newline)!=null?_t:`
`,jt.offset=(Wt=Ft.offset)!=null?Wt:0,jt.dontPrettyTextNodes=(Jt=(Ut=Ft.dontPrettyTextNodes)!=null?Ut:Ft.dontprettytextnodes)!=null?Jt:0,jt.spaceBeforeSlash=(Vt=(oe=Ft.spaceBeforeSlash)!=null?oe:Ft.spacebeforeslash)!=null?Vt:"",jt.spaceBeforeSlash===!0&&(jt.spaceBeforeSlash=" "),jt.suppressPrettyCount=0,jt.user={},jt.state=gt.None,jt},Dt.prototype.indent=function(Ft,jt,Nt){var _t;return!jt.pretty||jt.suppressPrettyCount?"":jt.pretty&&(_t=(Nt||0)+jt.offset+1,_t>0)?new Array(_t).join(jt.indent):""},Dt.prototype.endline=function(Ft,jt,Nt){return!jt.pretty||jt.suppressPrettyCount?"":jt.newline},Dt.prototype.attribute=function(Ft,jt,Nt){var _t;return this.openAttribute(Ft,jt,Nt),_t=" "+Ft.name+'="'+Ft.value+'"',this.closeAttribute(Ft,jt,Nt),_t},Dt.prototype.cdata=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<![CDATA[",jt.state=gt.InsideTag,_t+=Ft.value,jt.state=gt.CloseTag,_t+="]]>"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.comment=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<!-- ",jt.state=gt.InsideTag,_t+=Ft.value,jt.state=gt.CloseTag,_t+=" -->"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.declaration=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<?xml",jt.state=gt.InsideTag,_t+=' version="'+Ft.version+'"',Ft.encoding!=null&&(_t+=' encoding="'+Ft.encoding+'"'),Ft.standalone!=null&&(_t+=' standalone="'+Ft.standalone+'"'),jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+"?>",_t+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.docType=function(Ft,jt,Nt){var _t,Wt,Jt,Ut,Vt;if(Nt||(Nt=0),this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Ut=this.indent(Ft,jt,Nt),Ut+="<!DOCTYPE "+Ft.root().name,Ft.pubID&&Ft.sysID?Ut+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(Ut+=' SYSTEM "'+Ft.sysID+'"'),Ft.children.length>0){for(Ut+=" [",Ut+=this.endline(Ft,jt,Nt),jt.state=gt.InsideTag,Vt=Ft.children,Wt=0,Jt=Vt.length;Wt<Jt;Wt++)_t=Vt[Wt],Ut+=this.writeChildNode(_t,jt,Nt+1);jt.state=gt.CloseTag,Ut+="]"}return jt.state=gt.CloseTag,Ut+=jt.spaceBeforeSlash+">",Ut+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Ut},Dt.prototype.element=function(Ft,jt,Nt){var _t,Wt,Jt,Ut,Vt,oe,se,he,be,Yt,ne,ve,Se,we;Nt||(Nt=0),Yt=!1,ne="",this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,ne+=this.indent(Ft,jt,Nt)+"<"+Ft.name,ve=Ft.attribs;for(be in ve)At.call(ve,be)&&(_t=ve[be],ne+=this.attribute(_t,jt,Nt));if(Jt=Ft.children.length,Ut=Jt===0?null:Ft.children[0],Jt===0||Ft.children.every(function(ce){return(ce.type===vt.Text||ce.type===vt.Raw)&&ce.value===""}))jt.allowEmpty?(ne+=">",jt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,jt,Nt)):(jt.state=gt.CloseTag,ne+=jt.spaceBeforeSlash+"/>"+this.endline(Ft,jt,Nt));else if(jt.pretty&&Jt===1&&(Ut.type===vt.Text||Ut.type===vt.Raw)&&Ut.value!=null)ne+=">",jt.state=gt.InsideTag,jt.suppressPrettyCount++,Yt=!0,ne+=this.writeChildNode(Ut,jt,Nt+1),jt.suppressPrettyCount--,Yt=!1,jt.state=gt.CloseTag,ne+="</"+Ft.name+">"+this.endline(Ft,jt,Nt);else{if(jt.dontPrettyTextNodes){for(Se=Ft.children,Vt=0,se=Se.length;Vt<se;Vt++)if(Wt=Se[Vt],(Wt.type===vt.Text||Wt.type===vt.Raw)&&Wt.value!=null){jt.suppressPrettyCount++,Yt=!0;break}}for(ne+=">"+this.endline(Ft,jt,Nt),jt.state=gt.InsideTag,we=Ft.children,oe=0,he=we.length;oe<he;oe++)Wt=we[oe],ne+=this.writeChildNode(Wt,jt,Nt+1);jt.state=gt.CloseTag,ne+=this.indent(Ft,jt,Nt)+"</"+Ft.name+">",Yt&&jt.suppressPrettyCount--,ne+=this.endline(Ft,jt,Nt),jt.state=gt.None}return this.closeNode(Ft,jt,Nt),ne},Dt.prototype.writeChildNode=function(Ft,jt,Nt){switch(Ft.type){case vt.CData:return this.cdata(Ft,jt,Nt);case vt.Comment:return this.comment(Ft,jt,Nt);case vt.Element:return this.element(Ft,jt,Nt);case vt.Raw:return this.raw(Ft,jt,Nt);case vt.Text:return this.text(Ft,jt,Nt);case vt.ProcessingInstruction:return this.processingInstruction(Ft,jt,Nt);case vt.Dummy:return"";case vt.Declaration:return this.declaration(Ft,jt,Nt);case vt.DocType:return this.docType(Ft,jt,Nt);case vt.AttributeDeclaration:return this.dtdAttList(Ft,jt,Nt);case vt.ElementDeclaration:return this.dtdElement(Ft,jt,Nt);case vt.EntityDeclaration:return this.dtdEntity(Ft,jt,Nt);case vt.NotationDeclaration:return this.dtdNotation(Ft,jt,Nt);default:throw new Error("Unknown XML node type: "+Ft.constructor.name)}},Dt.prototype.processingInstruction=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<?",jt.state=gt.InsideTag,_t+=Ft.target,Ft.value&&(_t+=" "+Ft.value),jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+"?>",_t+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.raw=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt),jt.state=gt.InsideTag,_t+=Ft.value,jt.state=gt.CloseTag,_t+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.text=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt),jt.state=gt.InsideTag,_t+=Ft.value,jt.state=gt.CloseTag,_t+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.dtdAttList=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<!ATTLIST",jt.state=gt.InsideTag,_t+=" "+Ft.elementName+" "+Ft.attributeName+" "+Ft.attributeType,Ft.defaultValueType!=="#DEFAULT"&&(_t+=" "+Ft.defaultValueType),Ft.defaultValue&&(_t+=' "'+Ft.defaultValue+'"'),jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.dtdElement=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<!ELEMENT",jt.state=gt.InsideTag,_t+=" "+Ft.name+" "+Ft.value,jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.dtdEntity=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<!ENTITY",jt.state=gt.InsideTag,Ft.pe&&(_t+=" %"),_t+=" "+Ft.name,Ft.value?_t+=' "'+Ft.value+'"':(Ft.pubID&&Ft.sysID?_t+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(_t+=' SYSTEM "'+Ft.sysID+'"'),Ft.nData&&(_t+=" NDATA "+Ft.nData)),jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.dtdNotation=function(Ft,jt,Nt){var _t;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,_t=this.indent(Ft,jt,Nt)+"<!NOTATION",jt.state=gt.InsideTag,_t+=" "+Ft.name,Ft.pubID&&Ft.sysID?_t+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.pubID?_t+=' PUBLIC "'+Ft.pubID+'"':Ft.sysID&&(_t+=' SYSTEM "'+Ft.sysID+'"'),jt.state=gt.CloseTag,_t+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),_t},Dt.prototype.openNode=function(Ft,jt,Nt){},Dt.prototype.closeNode=function(Ft,jt,Nt){},Dt.prototype.openAttribute=function(Ft,jt,Nt){},Dt.prototype.closeAttribute=function(Ft,jt,Nt){},Dt}()}).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(ot,zt,Bt){(function(){var vt,gt,kt,Ct,yt,Tt,mt,xt,ft,z;z=ot("./Utility"),xt=z.assign,ft=z.isFunction,kt=ot("./XMLDOMImplementation"),Ct=ot("./XMLDocument"),yt=ot("./XMLDocumentCB"),mt=ot("./XMLStringWriter"),Tt=ot("./XMLStreamWriter"),vt=ot("./NodeType"),gt=ot("./WriterState"),zt.exports.create=function(tt,at,it,lt){var ut,dt;if(tt==null)throw new Error("Root element needs a name.");return lt=xt({},at,it,lt),ut=new Ct(lt),dt=ut.element(tt),lt.headless||(ut.declaration(lt),(lt.pubID!=null||lt.sysID!=null)&&ut.dtd(lt)),dt},zt.exports.begin=function(tt,at,it){var lt;return ft(tt)&&(lt=[tt,at],at=lt[0],it=lt[1],tt={}),at?new yt(tt,at,it):new Ct(tt)},zt.exports.stringWriter=function(tt){return new mt(tt)},zt.exports.streamWriter=function(tt,at){return new Tt(tt,at)},zt.exports.implementation=new kt,zt.exports.nodeType=vt,zt.exports.writerState=gt}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ot,zt,Bt){zt.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(){for(var kt={},Ct=0;Ct<arguments.length;Ct++){var yt=arguments[Ct];for(var Tt in yt)vt.call(yt,Tt)&&(kt[Tt]=yt[Tt])}return kt}},{}],461:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.array.slice.js");var vt=ot("buffer").Buffer,gt=ot("./sha"),kt=ot("./md5"),Ct={sha1:gt,md5:kt},yt=64,Tt=vt.alloc(yt);Tt.fill(0);function mt(z,tt,at){vt.isBuffer(tt)||(tt=vt.from(tt)),vt.isBuffer(at)||(at=vt.from(at)),tt.length>yt?tt=z(tt):tt.length<yt&&(tt=vt.concat([tt,Tt],yt));for(var it=vt.alloc(yt),lt=vt.alloc(yt),ut=0;ut<yt;ut++)it[ut]=tt[ut]^54,lt[ut]=tt[ut]^92;var dt=z(vt.concat([it,at]));return z(vt.concat([lt,dt]))}function xt(z,tt){z=z||"sha1";var at=Ct[z],it=[],lt=0;return at||ft("algorithm:",z,"is not yet supported"),{update:function(dt){return vt.isBuffer(dt)||(dt=vt.from(dt)),it.push(dt),lt+=dt.length,this},digest:function(dt){var bt=vt.concat(it),At=tt?mt(at,tt,bt):at(bt);return it=null,dt?At.toString(dt):At}}}function ft(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}Bt.createHash=function(z){return xt(z)},Bt.createHmac=function(z,tt){return xt(z,tt)},Bt.createCredentials=function(){ft("sorry,createCredentials is not implemented yet")},Bt.createCipher=function(){ft("sorry,createCipher is not implemented yet")},Bt.createCipheriv=function(){ft("sorry,createCipheriv is not implemented yet")},Bt.createDecipher=function(){ft("sorry,createDecipher is not implemented yet")},Bt.createDecipheriv=function(){ft("sorry,createDecipheriv is not implemented yet")},Bt.createSign=function(){ft("sorry,createSign is not implemented yet")},Bt.createVerify=function(){ft("sorry,createVerify is not implemented yet")},Bt.createDiffieHellman=function(){ft("sorry,createDiffieHellman is not implemented yet")},Bt.pbkdf2=function(){ft("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(ot,zt,Bt){"use strict";ot("core-js/modules/es.array.fill.js"),ot("core-js/modules/es.array.concat.js");var vt=ot("buffer").Buffer,gt=4,kt=vt.alloc(gt);kt.fill(0);var Ct=8;function yt(xt,ft){if(xt.length%gt!==0){var z=xt.length+(gt-xt.length%gt);xt=vt.concat([xt,kt],z)}for(var tt=[],at=ft?xt.readInt32BE:xt.readInt32LE,it=0;it<xt.length;it+=gt)tt.push(at.call(xt,it));return tt}function Tt(xt,ft,z){for(var tt=vt.alloc(ft),at=z?tt.writeInt32BE:tt.writeInt32LE,it=0;it<xt.length;it++)at.call(tt,xt[it],it*4,!0);return tt}function mt(xt,ft,z,tt){vt.isBuffer(xt)||(xt=vt.from(xt));var at=ft(yt(xt,tt),xt.length*Ct);return Tt(at,z,tt)}zt.exports={hash:mt}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ot,zt,Bt){"use strict";var vt=ot("./helpers");function gt(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function kt(tt,at){tt[at>>5]|=128<<at%32,tt[(at+64>>>9<<4)+14]=at;for(var it=1732584193,lt=-271733879,ut=-1732584194,dt=271733878,bt=0;bt<tt.length;bt+=16){var At=it,Dt=lt,Ft=ut,jt=dt;it=yt(it,lt,ut,dt,tt[bt+0],7,-680876936),dt=yt(dt,it,lt,ut,tt[bt+1],12,-389564586),ut=yt(ut,dt,it,lt,tt[bt+2],17,606105819),lt=yt(lt,ut,dt,it,tt[bt+3],22,-1044525330),it=yt(it,lt,ut,dt,tt[bt+4],7,-176418897),dt=yt(dt,it,lt,ut,tt[bt+5],12,1200080426),ut=yt(ut,dt,it,lt,tt[bt+6],17,-1473231341),lt=yt(lt,ut,dt,it,tt[bt+7],22,-45705983),it=yt(it,lt,ut,dt,tt[bt+8],7,1770035416),dt=yt(dt,it,lt,ut,tt[bt+9],12,-1958414417),ut=yt(ut,dt,it,lt,tt[bt+10],17,-42063),lt=yt(lt,ut,dt,it,tt[bt+11],22,-1990404162),it=yt(it,lt,ut,dt,tt[bt+12],7,1804603682),dt=yt(dt,it,lt,ut,tt[bt+13],12,-40341101),ut=yt(ut,dt,it,lt,tt[bt+14],17,-1502002290),lt=yt(lt,ut,dt,it,tt[bt+15],22,1236535329),it=Tt(it,lt,ut,dt,tt[bt+1],5,-165796510),dt=Tt(dt,it,lt,ut,tt[bt+6],9,-1069501632),ut=Tt(ut,dt,it,lt,tt[bt+11],14,643717713),lt=Tt(lt,ut,dt,it,tt[bt+0],20,-373897302),it=Tt(it,lt,ut,dt,tt[bt+5],5,-701558691),dt=Tt(dt,it,lt,ut,tt[bt+10],9,38016083),ut=Tt(ut,dt,it,lt,tt[bt+15],14,-660478335),lt=Tt(lt,ut,dt,it,tt[bt+4],20,-405537848),it=Tt(it,lt,ut,dt,tt[bt+9],5,568446438),dt=Tt(dt,it,lt,ut,tt[bt+14],9,-1019803690),ut=Tt(ut,dt,it,lt,tt[bt+3],14,-187363961),lt=Tt(lt,ut,dt,it,tt[bt+8],20,1163531501),it=Tt(it,lt,ut,dt,tt[bt+13],5,-1444681467),dt=Tt(dt,it,lt,ut,tt[bt+2],9,-51403784),ut=Tt(ut,dt,it,lt,tt[bt+7],14,1735328473),lt=Tt(lt,ut,dt,it,tt[bt+12],20,-1926607734),it=mt(it,lt,ut,dt,tt[bt+5],4,-378558),dt=mt(dt,it,lt,ut,tt[bt+8],11,-2022574463),ut=mt(ut,dt,it,lt,tt[bt+11],16,1839030562),lt=mt(lt,ut,dt,it,tt[bt+14],23,-35309556),it=mt(it,lt,ut,dt,tt[bt+1],4,-1530992060),dt=mt(dt,it,lt,ut,tt[bt+4],11,1272893353),ut=mt(ut,dt,it,lt,tt[bt+7],16,-155497632),lt=mt(lt,ut,dt,it,tt[bt+10],23,-1094730640),it=mt(it,lt,ut,dt,tt[bt+13],4,681279174),dt=mt(dt,it,lt,ut,tt[bt+0],11,-358537222),ut=mt(ut,dt,it,lt,tt[bt+3],16,-722521979),lt=mt(lt,ut,dt,it,tt[bt+6],23,76029189),it=mt(it,lt,ut,dt,tt[bt+9],4,-640364487),dt=mt(dt,it,lt,ut,tt[bt+12],11,-421815835),ut=mt(ut,dt,it,lt,tt[bt+15],16,530742520),lt=mt(lt,ut,dt,it,tt[bt+2],23,-995338651),it=xt(it,lt,ut,dt,tt[bt+0],6,-198630844),dt=xt(dt,it,lt,ut,tt[bt+7],10,1126891415),ut=xt(ut,dt,it,lt,tt[bt+14],15,-1416354905),lt=xt(lt,ut,dt,it,tt[bt+5],21,-57434055),it=xt(it,lt,ut,dt,tt[bt+12],6,1700485571),dt=xt(dt,it,lt,ut,tt[bt+3],10,-1894986606),ut=xt(ut,dt,it,lt,tt[bt+10],15,-1051523),lt=xt(lt,ut,dt,it,tt[bt+1],21,-2054922799),it=xt(it,lt,ut,dt,tt[bt+8],6,1873313359),dt=xt(dt,it,lt,ut,tt[bt+15],10,-30611744),ut=xt(ut,dt,it,lt,tt[bt+6],15,-1560198380),lt=xt(lt,ut,dt,it,tt[bt+13],21,1309151649),it=xt(it,lt,ut,dt,tt[bt+4],6,-145523070),dt=xt(dt,it,lt,ut,tt[bt+11],10,-1120210379),ut=xt(ut,dt,it,lt,tt[bt+2],15,718787259),lt=xt(lt,ut,dt,it,tt[bt+9],21,-343485551),it=ft(it,At),lt=ft(lt,Dt),ut=ft(ut,Ft),dt=ft(dt,jt)}return Array(it,lt,ut,dt)}function Ct(tt,at,it,lt,ut,dt){return ft(z(ft(ft(at,tt),ft(lt,dt)),ut),it)}function yt(tt,at,it,lt,ut,dt,bt){return Ct(at&it|~at&lt,tt,at,ut,dt,bt)}function Tt(tt,at,it,lt,ut,dt,bt){return Ct(at&lt|it&~lt,tt,at,ut,dt,bt)}function mt(tt,at,it,lt,ut,dt,bt){return Ct(at^it^lt,tt,at,ut,dt,bt)}function xt(tt,at,it,lt,ut,dt,bt){return Ct(it^(at|~lt),tt,at,ut,dt,bt)}function ft(tt,at){var it=(tt&65535)+(at&65535),lt=(tt>>16)+(at>>16)+(it>>16);return lt<<16|it&65535}function z(tt,at){return tt<<at|tt>>>32-at}zt.exports=function(at){return vt.hash(at,kt,16)}},{"./helpers":462}],464:[function(ot,zt,Bt){"use strict";var vt=ot("./helpers");function gt(mt,xt){mt[xt>>5]|=128<<24-xt%32,mt[(xt+64>>9<<4)+15]=xt;for(var ft=Array(80),z=1732584193,tt=-271733879,at=-1732584194,it=271733878,lt=-1009589776,ut=0;ut<mt.length;ut+=16){for(var dt=z,bt=tt,At=at,Dt=it,Ft=lt,jt=0;jt<80;jt++){jt<16?ft[jt]=mt[ut+jt]:ft[jt]=Tt(ft[jt-3]^ft[jt-8]^ft[jt-14]^ft[jt-16],1);var Nt=yt(yt(Tt(z,5),kt(jt,tt,at,it)),yt(yt(lt,ft[jt]),Ct(jt)));lt=it,it=at,at=Tt(tt,30),tt=z,z=Nt}z=yt(z,dt),tt=yt(tt,bt),at=yt(at,At),it=yt(it,Dt),lt=yt(lt,Ft)}return Array(z,tt,at,it,lt)}function kt(mt,xt,ft,z){return mt<20?xt&ft|~xt&z:mt<40?xt^ft^z:mt<60?xt&ft|xt&z|ft&z:xt^ft^z}function Ct(mt){return mt<20?1518500249:mt<40?1859775393:mt<60?-1894007588:-899497514}function yt(mt,xt){var ft=(mt&65535)+(xt&65535),z=(mt>>16)+(xt>>16)+(ft>>16);return z<<16|ft&65535}function Tt(mt,xt){return mt<<xt|mt>>>32-xt}zt.exports=function(xt){return vt.hash(xt,gt,20,!0)}},{"./helpers":462}],465:[function(ot,zt,Bt){"use strict";zt.exports=function(){return function(){}}},{}],466:[function(ot,zt,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/helpers/typeof")),Ct=ot("stream"),yt=Ct.Stream,Tt=ot("../lib/common/utils/isArray"),mt=Tt.isArray;zt.exports.string=function(z){return typeof z=="string"},zt.exports.array=mt,zt.exports.buffer=vt.isBuffer;function xt(ft){return ft instanceof yt}zt.exports.writableStream=function(z){return xt(z)&&typeof z._write=="function"&&(0,kt.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ot("../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(ot,zt,Bt){"use strict";var vt=ot("immediate"),gt=zt.exports={};gt.nextTick=vt,gt.title="browser",gt.browser=!0,gt.env={},gt.argv=[],gt.version="",gt.versions={};function kt(){}gt.on=kt,gt.addListener=kt,gt.once=kt,gt.off=kt,gt.removeListener=kt,gt.removeAllListeners=kt,gt.emit=kt,gt.prependListener=kt,gt.prependOnceListener=kt,gt.listeners=function(Ct){return[]},gt.binding=function(Ct){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(Ct){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},{immediate:358}],468:[function(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js");var gt=ot("./lib/request"),kt=ot("./lib/response"),Ct=ot("xtend"),yt=ot("builtin-status-codes"),Tt=ot("url"),mt=Bt;mt.request=function(xt,ft){typeof xt=="string"?xt=Tt.parse(xt):xt=Ct(xt);var z=vt.location.protocol.search(/^https?:$/)===-1?"http:":"",tt=xt.protocol||z,at=xt.hostname||xt.host,it=xt.port,lt=xt.path||"/";at&&at.indexOf(":")!==-1&&(at="["+at+"]"),xt.url=(at?tt+"//"+at:"")+(it?":"+it:"")+lt,xt.method=(xt.method||"GET").toUpperCase(),xt.headers=xt.headers||{};var ut=new gt(xt);return ft&&ut.on("response",ft),ut},mt.get=function(ft,z){var tt=mt.request(ft,z);return tt.end(),tt},mt.ClientRequest=gt,mt.IncomingMessage=kt.IncomingMessage,mt.Agent=function(){},mt.Agent.defaultMaxSockets=4,mt.globalAgent=new mt.Agent,mt.STATUS_CODES=yt,mt.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 dn!="undefined"?dn: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(ot,zt,Bt){(function(vt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.array-buffer.constructor.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.array.slice.js"),Bt.fetch=mt(vt.fetch)&&mt(vt.ReadableStream),Bt.writableStream=mt(vt.WritableStream),Bt.abortController=mt(vt.AbortController),Bt.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Bt.blobConstructor=!0}catch(xt){}var gt;function kt(){if(gt!==void 0)return gt;if(vt.XMLHttpRequest){gt=new vt.XMLHttpRequest;try{gt.open("GET",vt.XDomainRequest?"/":"https://example.com")}catch(xt){gt=null}}else gt=null;return gt}function Ct(xt){var ft=kt();if(!ft)return!1;try{return ft.responseType=xt,ft.responseType===xt}catch(z){}return!1}var yt=typeof vt.ArrayBuffer!="undefined",Tt=yt&&mt(vt.ArrayBuffer.prototype.slice);Bt.arraybuffer=Bt.fetch||yt&&Ct("arraybuffer"),Bt.msstream=!Bt.fetch&&Tt&&Ct("ms-stream"),Bt.mozchunkedarraybuffer=!Bt.fetch&&yt&&Ct("moz-chunked-arraybuffer"),Bt.overrideMimeType=Bt.fetch||(kt()?mt(kt().overrideMimeType):!1),Bt.vbArray=mt(vt.VBArray);function mt(xt){return typeof xt=="function"}gt=null}).call(this)}).call(this,typeof dn!="undefined"?dn: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(ot,zt,Bt){(function(vt,gt,kt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.regexp.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.array.map.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js");var Ct=ot("./capability"),yt=ot("inherits"),Tt=ot("./response"),mt=ot("readable-stream"),xt=ot("to-arraybuffer"),ft=Tt.IncomingMessage,z=Tt.readyStates;function tt(ut,dt){return Ct.fetch&&dt?"fetch":Ct.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ct.msstream?"ms-stream":Ct.arraybuffer&&ut?"arraybuffer":Ct.vbArray&&ut?"text:vbarray":"text"}var at=zt.exports=function(ut){var dt=this;mt.Writable.call(dt),dt._opts=ut,dt._body=[],dt._headers={},ut.auth&&dt.setHeader("Authorization","Basic "+new kt(ut.auth).toString("base64")),Object.keys(ut.headers).forEach(function(Dt){dt.setHeader(Dt,ut.headers[Dt])});var bt,At=!0;if(ut.mode==="disable-fetch"||"requestTimeout"in ut&&!Ct.abortController)At=!1,bt=!0;else if(ut.mode==="prefer-streaming")bt=!1;else if(ut.mode==="allow-wrong-content-type")bt=!Ct.overrideMimeType;else if(!ut.mode||ut.mode==="default"||ut.mode==="prefer-fast")bt=!0;else throw new Error("Invalid value for opts.mode");dt._mode=tt(bt,At),dt._fetchTimer=null,dt.on("finish",function(){dt._onFinish()})};yt(at,mt.Writable),at.prototype.setHeader=function(ut,dt){var bt=this,At=ut.toLowerCase();lt.indexOf(At)===-1&&(bt._headers[At]={name:ut,value:dt})},at.prototype.getHeader=function(ut){var dt=this._headers[ut.toLowerCase()];return dt?dt.value:null},at.prototype.removeHeader=function(ut){var dt=this;delete dt._headers[ut.toLowerCase()]},at.prototype._onFinish=function(){var ut=this;if(!ut._destroyed){var dt=ut._opts,bt=ut._headers,At=null;dt.method!=="GET"&&dt.method!=="HEAD"&&(Ct.arraybuffer?At=xt(kt.concat(ut._body)):Ct.blobConstructor?At=new gt.Blob(ut._body.map(function(Wt){return xt(Wt)}),{type:(bt["content-type"]||{}).value||""}):At=kt.concat(ut._body).toString());var Dt=[];if(Object.keys(bt).forEach(function(Wt){var Jt=bt[Wt].name,Ut=bt[Wt].value;Array.isArray(Ut)?Ut.forEach(function(Vt){Dt.push([Jt,Vt])}):Dt.push([Jt,Ut])}),ut._mode==="fetch"){var Ft=null,jt=null;if(Ct.abortController){var Nt=new AbortController;Ft=Nt.signal,ut._fetchAbortController=Nt,"requestTimeout"in dt&&dt.requestTimeout!==0&&(ut._fetchTimer=gt.setTimeout(function(){ut.emit("requestTimeout"),ut._fetchAbortController&&ut._fetchAbortController.abort()},dt.requestTimeout))}gt.fetch(ut._opts.url,{method:ut._opts.method,headers:Dt,body:At||void 0,mode:"cors",credentials:dt.withCredentials?"include":"same-origin",signal:Ft}).then(function(Wt){ut._fetchResponse=Wt,ut._connect()},function(Wt){gt.clearTimeout(ut._fetchTimer),ut._destroyed||ut.emit("error",Wt)})}else{var _t=ut._xhr=new gt.XMLHttpRequest;try{_t.open(ut._opts.method,ut._opts.url,!0)}catch(Wt){vt.nextTick(function(){ut.emit("error",Wt)});return}"responseType"in _t&&(_t.responseType=ut._mode.split(":")[0]),"withCredentials"in _t&&(_t.withCredentials=!!dt.withCredentials),ut._mode==="text"&&"overrideMimeType"in _t&&_t.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in dt&&(_t.timeout=dt.requestTimeout,_t.ontimeout=function(){ut.emit("requestTimeout")}),Dt.forEach(function(Wt){_t.setRequestHeader(Wt[0],Wt[1])}),ut._response=null,_t.onreadystatechange=function(){switch(_t.readyState){case z.LOADING:case z.DONE:ut._onXHRProgress();break}},ut._mode==="moz-chunked-arraybuffer"&&(_t.onprogress=function(){ut._onXHRProgress()}),_t.onerror=function(){ut._destroyed||ut.emit("error",new Error("XHR error"))};try{_t.send(At)}catch(Wt){vt.nextTick(function(){ut.emit("error",Wt)});return}}}};function it(ut){try{var dt=ut.status;return dt!==null&&dt!==0}catch(bt){return!1}}at.prototype._onXHRProgress=function(){var ut=this;!it(ut._xhr)||ut._destroyed||(ut._response||ut._connect(),ut._response._onXHRProgress())},at.prototype._connect=function(){var ut=this;ut._destroyed||(ut._response=new ft(ut._xhr,ut._fetchResponse,ut._mode,ut._fetchTimer),ut._response.on("error",function(dt){ut.emit("error",dt)}),ut.emit("response",ut._response))},at.prototype._write=function(ut,dt,bt){var At=this;At._body.push(ut),bt()},at.prototype.abort=at.prototype.destroy=function(){var ut=this;ut._destroyed=!0,gt.clearTimeout(ut._fetchTimer),ut._response&&(ut._response._destroyed=!0),ut._xhr?ut._xhr.abort():ut._fetchAbortController&&ut._fetchAbortController.abort()},at.prototype.end=function(ut,dt,bt){var At=this;typeof ut=="function"&&(bt=ut,ut=void 0),mt.Writable.prototype.end.call(At,ut,dt,bt)},at.prototype.flushHeaders=function(){},at.prototype.setTimeout=function(){},at.prototype.setNoDelay=function(){},at.prototype.setSocketKeepAlive=function(){};var lt=["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,ot("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,zt,Bt){(function(vt,gt,kt){(function(){"use strict";ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/web.dom-collections.for-each.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.iterator.js"),ot("core-js/modules/es.array-buffer.slice.js"),ot("core-js/modules/es.typed-array.uint8-array.js"),ot("core-js/modules/es.typed-array.copy-within.js"),ot("core-js/modules/es.typed-array.every.js"),ot("core-js/modules/es.typed-array.fill.js"),ot("core-js/modules/es.typed-array.filter.js"),ot("core-js/modules/es.typed-array.find.js"),ot("core-js/modules/es.typed-array.find-index.js"),ot("core-js/modules/es.typed-array.for-each.js"),ot("core-js/modules/es.typed-array.includes.js"),ot("core-js/modules/es.typed-array.index-of.js"),ot("core-js/modules/es.typed-array.iterator.js"),ot("core-js/modules/es.typed-array.join.js"),ot("core-js/modules/es.typed-array.last-index-of.js"),ot("core-js/modules/es.typed-array.map.js"),ot("core-js/modules/es.typed-array.reduce.js"),ot("core-js/modules/es.typed-array.reduce-right.js"),ot("core-js/modules/es.typed-array.reverse.js"),ot("core-js/modules/es.typed-array.set.js"),ot("core-js/modules/es.typed-array.slice.js"),ot("core-js/modules/es.typed-array.some.js"),ot("core-js/modules/es.typed-array.sort.js"),ot("core-js/modules/es.typed-array.subarray.js"),ot("core-js/modules/es.typed-array.to-locale-string.js"),ot("core-js/modules/es.typed-array.to-string.js"),ot("core-js/modules/es.array.slice.js");var Ct=ot("./capability"),yt=ot("inherits"),Tt=ot("readable-stream"),mt=Bt.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},xt=Bt.IncomingMessage=function(ft,z,tt,at){var it=this;if(Tt.Readable.call(it),it._mode=tt,it.headers={},it.rawHeaders=[],it.trailers={},it.rawTrailers=[],it.on("end",function(){vt.nextTick(function(){it.emit("close")})}),tt==="fetch"){var lt=function Ft(){dt.read().then(function(jt){if(!it._destroyed){if(jt.done){gt.clearTimeout(at),it.push(null);return}it.push(new kt(jt.value)),Ft()}}).catch(function(jt){gt.clearTimeout(at),it._destroyed||it.emit("error",jt)})};if(it._fetchResponse=z,it.url=z.url,it.statusCode=z.status,it.statusMessage=z.statusText,z.headers.forEach(function(Ft,jt){it.headers[jt.toLowerCase()]=Ft,it.rawHeaders.push(jt,Ft)}),Ct.writableStream){var ut=new WritableStream({write:function(jt){return new Promise(function(Nt,_t){it._destroyed?_t():it.push(new kt(jt))?Nt():it._resumeFetch=Nt})},close:function(){gt.clearTimeout(at),it._destroyed||it.push(null)},abort:function(jt){it._destroyed||it.emit("error",jt)}});try{z.body.pipeTo(ut).catch(function(Ft){gt.clearTimeout(at),it._destroyed||it.emit("error",Ft)});return}catch(Ft){}}var dt=z.body.getReader();lt()}else{it._xhr=ft,it._pos=0,it.url=ft.responseURL,it.statusCode=ft.status,it.statusMessage=ft.statusText;var bt=ft.getAllResponseHeaders().split(/\r?\n/);if(bt.forEach(function(Ft){var jt=Ft.match(/^([^:]+):\s*(.*)/);if(jt){var Nt=jt[1].toLowerCase();Nt==="set-cookie"?(it.headers[Nt]===void 0&&(it.headers[Nt]=[]),it.headers[Nt].push(jt[2])):it.headers[Nt]!==void 0?it.headers[Nt]+=", "+jt[2]:it.headers[Nt]=jt[2],it.rawHeaders.push(jt[1],jt[2])}}),it._charset="x-user-defined",!Ct.overrideMimeType){var At=it.rawHeaders["mime-type"];if(At){var Dt=At.match(/;\s*charset=([^;])(;|$)/);Dt&&(it._charset=Dt[1].toLowerCase())}it._charset||(it._charset="utf-8")}}};yt(xt,Tt.Readable),xt.prototype._read=function(){var ft=this,z=ft._resumeFetch;z&&(ft._resumeFetch=null,z())},xt.prototype._onXHRProgress=function(){var ft=this,z=ft._xhr,tt=null;switch(ft._mode){case"text:vbarray":if(z.readyState!==mt.DONE)break;try{tt=new gt.VBArray(z.responseBody).toArray()}catch(dt){}if(tt!==null){ft.push(new kt(tt));break}case"text":try{tt=z.responseText}catch(dt){ft._mode="text:vbarray";break}if(tt.length>ft._pos){var at=tt.substr(ft._pos);if(ft._charset==="x-user-defined"){for(var it=new kt(at.length),lt=0;lt<at.length;lt++)it[lt]=at.charCodeAt(lt)&255;ft.push(it)}else ft.push(at,ft._charset);ft._pos=tt.length}break;case"arraybuffer":if(z.readyState!==mt.DONE||!z.response)break;tt=z.response,ft.push(new kt(new Uint8Array(tt)));break;case"moz-chunked-arraybuffer":if(tt=z.response,z.readyState!==mt.LOADING||!tt)break;ft.push(new kt(new Uint8Array(tt)));break;case"ms-stream":if(tt=z.response,z.readyState!==mt.LOADING)break;var ut=new gt.MSStreamReader;ut.onprogress=function(){ut.result.byteLength>ft._pos&&(ft.push(new kt(new Uint8Array(ut.result.slice(ft._pos)))),ft._pos=ut.result.byteLength)},ut.onload=function(){ft.push(null)},ut.readAsArrayBuffer(tt);break}ft._xhr.readyState===mt.DONE&&ft._mode!=="ms-stream"&&ft.push(null)}}).call(this)}).call(this,ot("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ot("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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.search.js"),ot("core-js/modules/es.array.concat.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.string.replace.js"),ot("core-js/modules/es.array.join.js"),ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.string.match.js"),ot("core-js/modules/es.array.slice.js"),ot("core-js/modules/es.object.keys.js"),ot("core-js/modules/es.array.splice.js");var kt=ot("punycode"),Ct=ot("./util");Bt.parse=jt,Bt.resolve=_t,Bt.resolveObject=Wt,Bt.format=Nt,Bt.Url=yt;function yt(){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 Tt=/^([a-z0-9.+-]+:)/i,mt=/:[0-9]*$/,xt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ft=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(ft),tt=["'"].concat(z),at=["%","/","?",";","#"].concat(tt),it=["/","?","#"],lt=255,ut=/^[+a-z0-9A-Z_-]{0,63}$/,dt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,bt={javascript:!0,"javascript:":!0},At={javascript:!0,"javascript:":!0},Dt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ft=ot("querystring");function jt(Jt,Ut,Vt){if(Jt&&Ct.isObject(Jt)&&Jt instanceof yt)return Jt;var oe=new yt;return oe.parse(Jt,Ut,Vt),oe}yt.prototype.parse=function(Jt,Ut,Vt){if(!Ct.isString(Jt))throw new TypeError("Parameter 'url' must be a string, not "+(0,gt.default)(Jt));var oe=Jt.indexOf("?"),se=oe!==-1&&oe<Jt.indexOf("#")?"?":"#",he=Jt.split(se),be=/\\/g;he[0]=he[0].replace(be,"/"),Jt=he.join(se);var Yt=Jt;if(Yt=Yt.trim(),!Vt&&Jt.split("#").length===1){var ne=xt.exec(Yt);if(ne)return this.path=Yt,this.href=Yt,this.pathname=ne[1],ne[2]?(this.search=ne[2],Ut?this.query=Ft.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ut&&(this.search="",this.query={}),this}var ve=Tt.exec(Yt);if(ve){ve=ve[0];var Se=ve.toLowerCase();this.protocol=Se,Yt=Yt.substr(ve.length)}if(Vt||ve||Yt.match(/^\/\/[^@\/]+@[^@\/]+/)){var we=Yt.substr(0,2)==="//";we&&!(ve&&At[ve])&&(Yt=Yt.substr(2),this.slashes=!0)}if(!At[ve]&&(we||ve&&!Dt[ve])){for(var ce=-1,de=0;de<it.length;de++){var le=Yt.indexOf(it[de]);le!==-1&&(ce===-1||le<ce)&&(ce=le)}var Ce,fe;ce===-1?fe=Yt.lastIndexOf("@"):fe=Yt.lastIndexOf("@",ce),fe!==-1&&(Ce=Yt.slice(0,fe),Yt=Yt.slice(fe+1),this.auth=decodeURIComponent(Ce)),ce=-1;for(var de=0;de<at.length;de++){var le=Yt.indexOf(at[de]);le!==-1&&(ce===-1||le<ce)&&(ce=le)}ce===-1&&(ce=Yt.length),this.host=Yt.slice(0,ce),Yt=Yt.slice(ce),this.parseHost(),this.hostname=this.hostname||"";var me=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!me)for(var ke=this.hostname.split("."),de=0,pe=ke.length;de<pe;de++){var qt=ke[de];if(qt&&!qt.match(ut)){for(var Kt="",wt=0,Lt=qt.length;wt<Lt;wt++)qt.charCodeAt(wt)>127?Kt+="x":Kt+=qt[wt];if(!Kt.match(ut)){var Zt=ke.slice(0,de),ee=ke.slice(de+1),It=qt.match(dt);It&&(Zt.push(It[1]),ee.unshift(It[2])),ee.length&&(Yt="/"+ee.join(".")+Yt),this.hostname=Zt.join(".");break}}}this.hostname.length>lt?this.hostname="":this.hostname=this.hostname.toLowerCase(),me||(this.hostname=kt.toASCII(this.hostname));var Rt=this.port?":"+this.port:"",Ht=this.hostname||"";this.host=Ht+Rt,this.href+=this.host,me&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Yt[0]!=="/"&&(Yt="/"+Yt))}if(!bt[Se])for(var de=0,pe=tt.length;de<pe;de++){var re=tt[de];if(Yt.indexOf(re)!==-1){var ye=encodeURIComponent(re);ye===re&&(ye=escape(re)),Yt=Yt.split(re).join(ye)}}var Pe=Yt.indexOf("#");Pe!==-1&&(this.hash=Yt.substr(Pe),Yt=Yt.slice(0,Pe));var Ae=Yt.indexOf("?");if(Ae!==-1?(this.search=Yt.substr(Ae),this.query=Yt.substr(Ae+1),Ut&&(this.query=Ft.parse(this.query)),Yt=Yt.slice(0,Ae)):Ut&&(this.search="",this.query={}),Yt&&(this.pathname=Yt),Dt[Se]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Rt=this.pathname||"",Oe=this.search||"";this.path=Rt+Oe}return this.href=this.format(),this};function Nt(Jt){return Ct.isString(Jt)&&(Jt=jt(Jt)),Jt instanceof yt?Jt.format():yt.prototype.format.call(Jt)}yt.prototype.format=function(){var Jt=this.auth||"";Jt&&(Jt=encodeURIComponent(Jt),Jt=Jt.replace(/%3A/i,":"),Jt+="@");var Ut=this.protocol||"",Vt=this.pathname||"",oe=this.hash||"",se=!1,he="";this.host?se=Jt+this.host:this.hostname&&(se=Jt+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(se+=":"+this.port)),this.query&&Ct.isObject(this.query)&&Object.keys(this.query).length&&(he=Ft.stringify(this.query));var be=this.search||he&&"?"+he||"";return Ut&&Ut.substr(-1)!==":"&&(Ut+=":"),this.slashes||(!Ut||Dt[Ut])&&se!==!1?(se="//"+(se||""),Vt&&Vt.charAt(0)!=="/"&&(Vt="/"+Vt)):se||(se=""),oe&&oe.charAt(0)!=="#"&&(oe="#"+oe),be&&be.charAt(0)!=="?"&&(be="?"+be),Vt=Vt.replace(/[?#]/g,function(Yt){return encodeURIComponent(Yt)}),be=be.replace("#","%23"),Ut+se+Vt+be+oe};function _t(Jt,Ut){return jt(Jt,!1,!0).resolve(Ut)}yt.prototype.resolve=function(Jt){return this.resolveObject(jt(Jt,!1,!0)).format()};function Wt(Jt,Ut){return Jt?jt(Jt,!1,!0).resolveObject(Ut):Ut}yt.prototype.resolveObject=function(Jt){if(Ct.isString(Jt)){var Ut=new yt;Ut.parse(Jt,!1,!0),Jt=Ut}for(var Vt=new yt,oe=Object.keys(this),se=0;se<oe.length;se++){var he=oe[se];Vt[he]=this[he]}if(Vt.hash=Jt.hash,Jt.href==="")return Vt.href=Vt.format(),Vt;if(Jt.slashes&&!Jt.protocol){for(var be=Object.keys(Jt),Yt=0;Yt<be.length;Yt++){var ne=be[Yt];ne!=="protocol"&&(Vt[ne]=Jt[ne])}return Dt[Vt.protocol]&&Vt.hostname&&!Vt.pathname&&(Vt.path=Vt.pathname="/"),Vt.href=Vt.format(),Vt}if(Jt.protocol&&Jt.protocol!==Vt.protocol){if(!Dt[Jt.protocol]){for(var ve=Object.keys(Jt),Se=0;Se<ve.length;Se++){var we=ve[Se];Vt[we]=Jt[we]}return Vt.href=Vt.format(),Vt}if(Vt.protocol=Jt.protocol,!Jt.host&&!At[Jt.protocol]){for(var pe=(Jt.pathname||"").split("/");pe.length&&!(Jt.host=pe.shift()););Jt.host||(Jt.host=""),Jt.hostname||(Jt.hostname=""),pe[0]!==""&&pe.unshift(""),pe.length<2&&pe.unshift(""),Vt.pathname=pe.join("/")}else Vt.pathname=Jt.pathname;if(Vt.search=Jt.search,Vt.query=Jt.query,Vt.host=Jt.host||"",Vt.auth=Jt.auth,Vt.hostname=Jt.hostname||Jt.host,Vt.port=Jt.port,Vt.pathname||Vt.search){var ce=Vt.pathname||"",de=Vt.search||"";Vt.path=ce+de}return Vt.slashes=Vt.slashes||Jt.slashes,Vt.href=Vt.format(),Vt}var le=Vt.pathname&&Vt.pathname.charAt(0)==="/",Ce=Jt.host||Jt.pathname&&Jt.pathname.charAt(0)==="/",fe=Ce||le||Vt.host&&Jt.pathname,me=fe,ke=Vt.pathname&&Vt.pathname.split("/")||[],pe=Jt.pathname&&Jt.pathname.split("/")||[],qt=Vt.protocol&&!Dt[Vt.protocol];if(qt&&(Vt.hostname="",Vt.port=null,Vt.host&&(ke[0]===""?ke[0]=Vt.host:ke.unshift(Vt.host)),Vt.host="",Jt.protocol&&(Jt.hostname=null,Jt.port=null,Jt.host&&(pe[0]===""?pe[0]=Jt.host:pe.unshift(Jt.host)),Jt.host=null),fe=fe&&(pe[0]===""||ke[0]==="")),Ce)Vt.host=Jt.host||Jt.host===""?Jt.host:Vt.host,Vt.hostname=Jt.hostname||Jt.hostname===""?Jt.hostname:Vt.hostname,Vt.search=Jt.search,Vt.query=Jt.query,ke=pe;else if(pe.length)ke||(ke=[]),ke.pop(),ke=ke.concat(pe),Vt.search=Jt.search,Vt.query=Jt.query;else if(!Ct.isNullOrUndefined(Jt.search)){if(qt){Vt.hostname=Vt.host=ke.shift();var Kt=Vt.host&&Vt.host.indexOf("@")>0?Vt.host.split("@"):!1;Kt&&(Vt.auth=Kt.shift(),Vt.host=Vt.hostname=Kt.shift())}return Vt.search=Jt.search,Vt.query=Jt.query,(!Ct.isNull(Vt.pathname)||!Ct.isNull(Vt.search))&&(Vt.path=(Vt.pathname?Vt.pathname:"")+(Vt.search?Vt.search:"")),Vt.href=Vt.format(),Vt}if(!ke.length)return Vt.pathname=null,Vt.search?Vt.path="/"+Vt.search:Vt.path=null,Vt.href=Vt.format(),Vt;for(var wt=ke.slice(-1)[0],Lt=(Vt.host||Jt.host||ke.length>1)&&(wt==="."||wt==="..")||wt==="",Zt=0,ee=ke.length;ee>=0;ee--)wt=ke[ee],wt==="."?ke.splice(ee,1):wt===".."?(ke.splice(ee,1),Zt++):Zt&&(ke.splice(ee,1),Zt--);if(!fe&&!me)for(;Zt--;Zt)ke.unshift("..");fe&&ke[0]!==""&&(!ke[0]||ke[0].charAt(0)!=="/")&&ke.unshift(""),Lt&&ke.join("/").substr(-1)!=="/"&&ke.push("");var It=ke[0]===""||ke[0]&&ke[0].charAt(0)==="/";if(qt){Vt.hostname=Vt.host=It?"":ke.length?ke.shift():"";var Kt=Vt.host&&Vt.host.indexOf("@")>0?Vt.host.split("@"):!1;Kt&&(Vt.auth=Kt.shift(),Vt.host=Vt.hostname=Kt.shift())}return fe=fe||Vt.host&&ke.length,fe&&!It&&ke.unshift(""),ke.length?Vt.pathname=ke.join("/"):(Vt.pathname=null,Vt.path=null),(!Ct.isNull(Vt.pathname)||!Ct.isNull(Vt.search))&&(Vt.path=(Vt.pathname?Vt.pathname:"")+(Vt.search?Vt.search:"")),Vt.auth=Jt.auth||Vt.auth,Vt.slashes=Vt.slashes||Jt.slashes,Vt.href=Vt.format(),Vt},yt.prototype.parseHost=function(){var Jt=this.host,Ut=mt.exec(Jt);Ut&&(Ut=Ut[0],Ut!==":"&&(this.port=Ut.substr(1)),Jt=Jt.substr(0,Jt.length-Ut.length)),Jt&&(this.hostname=Jt)}},{"./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(ot,zt,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));zt.exports={isString:function(Ct){return typeof Ct=="string"},isObject:function(Ct){return(0,gt.default)(Ct)==="object"&&Ct!==null},isNull:function(Ct){return Ct===null},isNullOrUndefined:function(Ct){return Ct==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ot,zt,Bt){"use strict";ot("core-js/modules/es.number.constructor.js"),Bt.encodeURIComponent=function(vt){try{return encodeURIComponent(vt)}catch(gt){return vt}},Bt.escape=ot("escape-html"),Bt.timestamp=function(gt){if(gt){var kt=gt;return typeof kt=="string"&&(kt=Number(kt)),String(gt).length===10&&(kt*=1e3),new Date(kt)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ot,zt,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),Ct=kt(ot("@babel/runtime/helpers/typeof"));ot("core-js/modules/es.string.trim.js"),ot("core-js/modules/es.regexp.exec.js"),ot("core-js/modules/es.string.split.js"),ot("core-js/modules/es.object.to-string.js"),ot("core-js/modules/es.promise.js"),ot("core-js/modules/es.function.name.js"),ot("core-js/modules/es.array.concat.js");var yt=ot("util"),Tt=ot("url"),mt=ot("http"),xt=ot("https"),ft=ot("debug")("urllib"),z=ot("humanize-ms"),tt=0,at=Math.pow(2,31)-10,it=/^https?:\/\//i;function lt(At,Dt){return At===void 0?Dt:At}function ut(At){return At?At.split(";")[0].trim().toLowerCase():""}function dt(At,Dt){return function(Ft,jt,Nt){if(Ft)return Dt(Ft);At({data:jt,status:Nt.statusCode,headers:Nt.headers,res:Nt})}}Bt.TIMEOUTS=[z("300s"),z("300s")];var bt=["json","text"];Bt.request=function(Dt,Ft,jt){return arguments.length===2&&typeof Ft=="function"&&(jt=Ft,Ft=null),typeof jt=="function"?Bt.requestWithCallback(Dt,Ft,jt):new Promise(function(Nt,_t){Bt.requestWithCallback(Dt,Ft,dt(Nt,_t))})},Bt.requestWithCallback=function(Dt,Ft,jt){if(!Dt||typeof Dt!="string"&&(0,Ct.default)(Dt)!=="object"){var Nt=yt.format("expect request url to be a string or a http request options, but got %j",Dt);throw new Error(Nt)}arguments.length===2&&typeof Ft=="function"&&(jt=Ft,Ft=null),Ft=Ft||{},tt>=at&&(tt=0);var _t=++tt;Ft.requestUrls=Ft.requestUrls||[];var Wt={requestId:_t,url:Dt,args:Ft,ctx:Ft.ctx};Ft.emitter&&Ft.emitter.emit("request",Wt),Ft.timeout=Ft.timeout||Bt.TIMEOUTS,Ft.maxRedirects=Ft.maxRedirects||10,Ft.streaming=Ft.streaming||Ft.customResponse;var Jt=Date.now(),Ut;typeof Dt=="string"?(it.test(Dt)||(Dt="https://"+Dt),Ut=Tt.parse(Dt)):Ut=Dt;var Vt=(Ft.type||Ft.method||Ut.method||"GET").toUpperCase(),oe=Ut.port||80,se=mt,he=lt(Ft.agent,Bt.agent),be=Ft.fixJSONCtlChars;Ut.protocol==="https:"&&(se=xt,he=lt(Ft.httpsAgent,Bt.httpsAgent),Ut.port||(oe=443));var Yt={host:Ut.hostname||Ut.host||"localhost",path:Ut.path||"/",method:Vt,port:oe,agent:he,headers:Ft.headers||{},lookup:Ft.lookup};Array.isArray(Ft.timeout)?Yt.requestTimeout=Ft.timeout[Ft.timeout.length-1]:typeof Ft.timeout!="undefined"&&(Yt.requestTimeout=Ft.timeout);var ne=Ft.auth||Ut.auth;ne&&(Yt.auth=ne);var ve=Ft.content||Ft.data,Se=Vt==="GET"||Vt==="HEAD"||Ft.dataAsQueryString;if(!Ft.content&&ve&&!(typeof ve=="string"||gt.isBuffer(ve)))if(Se)ve=Ft.nestedQuerystring?qs.stringify(ve):querystring.stringify(ve);else{var we=Yt.headers["Content-Type"]||Yt.headers["content-type"];we||(Ft.contentType==="json"?we="application/json":we="application/x-www-form-urlencoded",Yt.headers["Content-Type"]=we),ut(we)==="application/json"?ve=JSON.stringify(ve):ve=Ft.nestedQuerystring?qs.stringify(ve):querystring.stringify(ve)}Se&&ve&&(Yt.path+=(Ut.query?"&":"?")+ve,ve=null);var ce=0;if(ve){var de=ve.length;gt.isBuffer(ve)||(de=gt.byteLength(ve)),ce=Yt.headers["Content-Length"]=de}Ft.dataType==="json"&&(Yt.headers.Accept="application/json"),typeof Ft.beforeRequest=="function"&&Ft.beforeRequest(Yt);var le=null,Ce=null,fe=null,me=!1,ke=!1,pe=0,qt=-1,Kt=!1,wt="",Lt="",Zt=null;Ft.timing&&(Zt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function ee(){le&&(clearTimeout(le),le=null)}function It(){Ce&&(clearTimeout(Ce),Ce=null)}function Rt(Ke,Ue,We){if(It(),!jt){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),_t,vt.pid,Yt.method,Dt),Ke&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),_t,vt.pid,Ke.name,Ke.message,Ke.stack);return}var He=jt;jt=null;var rn={};We&&(qt=We.statusCode,rn=We.headers);var ln=Date.now()-Jt;Zt&&(Zt.contentDownload=ln),ft("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",ln,pe,qt,Yt.method,Yt.host,Yt.path,ke,Zt);var un={status:qt,statusCode:qt,headers:rn,size:pe,aborted:Kt,rt:ln,keepAliveSocket:ke,data:Ue,requestUrls:Ft.requestUrls,timing:Zt,remoteAddress:wt,remotePort:Lt};if(Ke){var bn="";he&&typeof he.getCurrentStatus=="function"&&(bn=", agent status: "+JSON.stringify(he.getCurrentStatus())),Ke.message+=", "+Yt.method+" "+Dt+" "+qt+" (connected: "+me+", keepalive socket: "+ke+bn+`)
headers: `+JSON.stringify(rn),Ke.data=Ue,Ke.path=Yt.path,Ke.status=qt,Ke.headers=rn,Ke.res=un}He(Ke,Ue,Ft.streaming?We:un),Ft.emitter&&(Wt.url=Dt,Wt.socket=qe&&qe.connection,Wt.options=Yt,Wt.size=ce,Ft.emitter.emit("response",{requestId:_t,error:Ke,ctx:Ft.ctx,req:Wt,res:un}))}function Ht(Ke){var Ue=null;if(Ft.followRedirect&&statuses.redirect[Ke.statusCode]){Ft._followRedirectCount=(Ft._followRedirectCount||0)+1;var We=Ke.headers.location;if(!We)Ue=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),Ue.name="FollowRedirectError";else if(Ft._followRedirectCount>Ft.maxRedirects)Ue=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Dt),Ue.name="MaxRedirectError";else{var He=Ft.formatRedirectUrl?Ft.formatRedirectUrl(Dt,We):Tt.resolve(Dt,We);ft("Request#%d %s: `redirected` from %s to %s",_t,Yt.path,Dt,He),It(),Ft.headers&&Ft.headers.Host&&it.test(We)&&(Ft.headers.Host=null);var rn=jt;return jt=null,Bt.requestWithCallback(He,Ft,rn),{redirect:!0,error:null}}}return{redirect:!1,error:Ue}}Ft.gzip&&!Yt.headers["Accept-Encoding"]&&!Yt.headers["accept-encoding"]&&(Yt.headers["Accept-Encoding"]="gzip");function re(Ke,Ue,We){var He=Ke.headers["content-encoding"];return We(null,Ue,He)}var ye=Ft.writeStream;ft("Request#%d %s %s with headers %j, options.path: %s",_t,Vt,Dt,Yt.headers,Yt.path),Ft.requestUrls.push(Dt);function Pe(Ke){if(Zt&&(Zt.waiting=Date.now()-Jt),ft("Request#%d %s `req response` event emit: status %d, headers: %j",_t,Dt,Ke.statusCode,Ke.headers),Ft.streaming){var Ue=Ht(Ke);if(Ue.redirect){Ke.resume();return}return Ue.error?(Ke.resume(),Rt(Ue.error,null,Ke)):Rt(null,null,Ke)}if(Ke.on("close",function(){ft("Request#%d %s: `res close` event emit, total size %d",_t,Dt,pe)}),Ke.on("error",function(){ft("Request#%d %s: `res error` event emit, total size %d",_t,Dt,pe)}),Ke.on("aborted",function(){Kt=!0,ft("Request#%d %s: `res aborted` event emit, total size %d",_t,Dt,pe)}),ye){var We=Ht(Ke);if(We.redirect){Ke.resume();return}return We.error?(Ke.resume(),ye.end(),Rt(We.error,null,Ke)):(Ft.consumeWriteStream===!1?Ke.on("end",Rt.bind(null,null,null,Ke)):ye.on("close",function(){ft("Request#%d %s: writeStream close event emitted",_t,Dt),Rt(fe||null,null,Ke)}),Ke.pipe(ye))}var He=[];Ke.on("data",function(rn){ft("Request#%d %s: `res data` event emit, size %d",_t,Dt,rn.length),pe+=rn.length,He.push(rn)}),Ke.on("end",function(){var rn=gt.concat(He,pe);if(ft("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",_t,Dt,pe,Ke._dumped),fe)return Rt(fe,rn,Ke);var ln=Ht(Ke);if(ln.error)return Rt(ln.error,rn,Ke);ln.redirect||re(Ke,rn,function(un,bn,In){if(un)return Rt(un,rn,Ke);if(!In&&bt.indexOf(Ft.dataType)>=0){try{bn=decodeBodyByCharset(bn,Ke)}catch(Kn){return ft("decodeBodyByCharset error: %s",Kn),Rt(null,bn,Ke)}if(Ft.dataType==="json")if(pe===0)bn=null;else{var jn=parseJSON(bn,be);jn.error?un=jn.error:bn=jn.data}}Kt&&ft("Request#%d %s: Remote socket was terminated before `response.end()` was called",_t,Dt),Rt(un,bn,Ke)})})}var Ae,Oe;Array.isArray(Ft.timeout)?(Ae=z(Ft.timeout[0]),Oe=z(Ft.timeout[1])):Ae=Oe=z(Ft.timeout),ft("ConnectTimeout: %d, ResponseTimeout: %d",Ae,Oe);function Ie(){ft("Connect timer ticking, timeout: %d",Ae),le=setTimeout(function(){le=null,qt===-1&&(qt=-2);var Ke="Connect timeout for "+Ae+"ms",Ue="ConnectionTimeoutError";qe.socket||(Ue="SocketAssignTimeoutError",Ke+=", working sockets is full"),fe=new Error(Ke),fe.name=Ue,fe.requestId=_t,ft("ConnectTimeout: Request#%d %s %s: %s, connected: %s",_t,Dt,fe.name,Ke,me),nn()},Ae)}function Qe(){ft("Response timer ticking, timeout: %d",Oe),Ce=setTimeout(function(){Ce=null;var Ke="Response timeout for "+Oe+"ms",Ue="ResponseTimeoutError";fe=new Error(Ke),fe.name=Ue,fe.requestId=_t,ft("ResponseTimeout: Request#%d %s %s: %s, connected: %s",_t,Dt,fe.name,Ke,me),nn()},Oe)}var qe;Yt.mode=Ft.mode?Ft.mode:"";try{qe=se.request(Yt,Pe)}catch(Ke){return Rt(Ke)}typeof window=="undefined"?Ie():qe.on("requestTimeout",function(){qt===-1&&(qt=-2);var Ke="Connect timeout for "+Ae+"ms",Ue="ConnectionTimeoutError";fe=new Error(Ke),fe.name=Ue,fe.requestId=_t,nn()});function nn(){ft("Request#%d %s abort, connected: %s",_t,Dt,me),qe.socket||(fe.noSocket=!0,Rt(fe)),qe.abort()}return Zt&&qe.on("finish",function(){Zt.requestSent=Date.now()-Jt}),qe.once("socket",function(Ke){Zt&&(Zt.queuing=Date.now()-Jt);var Ue=Ke.readyState;if(Ue==="opening"){Ke.once("lookup",function(We,He,rn){ft("Request#%d %s lookup: %s, %s, %s",_t,Dt,We,He,rn),Zt&&(Zt.dnslookup=Date.now()-Jt),He&&(wt=He)}),Ke.once("connect",function(){Zt&&(Zt.connected=Date.now()-Jt),ee(),Qe(),ft("Request#%d %s new socket connected",_t,Dt),me=!0,wt||(wt=Ke.remoteAddress),Lt=Ke.remotePort});return}ft("Request#%d %s reuse socket connected, readyState: %s",_t,Dt,Ue),me=!0,ke=!0,wt||(wt=Ke.remoteAddress),Lt=Ke.remotePort,ee(),Qe()}),qe.on("error",function(Ke){(Ke.name==="Error"||Ke.name==="TypeError")&&(Ke.name=me?"ResponseError":"RequestError"),Ke.message+=' (req "error")',ft("Request#%d %s `req error` event emit, %s: %s",_t,Dt,Ke.name,Ke.message),Rt(fe||Ke)}),ye&&ye.once("error",function(Ke){Ke.message+=' (writeStream "error")',fe=Ke,ft("Request#%d %s `writeStream error` event emit, %s: %s",_t,Dt,Ke.name,Ke.message),nn()}),Ft.stream?(Ft.stream.pipe(qe),Ft.stream.once("error",function(Ke){Ke.message+=' (stream "error")',fe=Ke,ft("Request#%d %s `readStream error` event emit, %s: %s",_t,Dt,Ke.name,Ke.message),nn()})):qe.end(ve),qe.requestId=_t,qe}}).call(this)}).call(this,ot("_process"),ot("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(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){ae.defineOption("placeholder","",function(kt,Ct,yt){var Tt=yt&&yt!=ae.Init;if(Ct&&!Tt)kt.on("blur",Bt),kt.on("change",vt),kt.on("swapDoc",vt),ae.on(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose=function(){zt(kt)}),vt(kt);else if(!Ct&&Tt){kt.off("blur",Bt),kt.off("change",vt),kt.off("swapDoc",vt),ae.off(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose),Re(kt);var mt=kt.getWrapperElement();mt.className=mt.className.replace(" CodeMirror-empty","")}Ct&&!kt.hasFocus()&&Bt(kt)});function Re(kt){kt.state.placeholder&&(kt.state.placeholder.parentNode.removeChild(kt.state.placeholder),kt.state.placeholder=null)}function ot(kt){Re(kt);var Ct=kt.state.placeholder=document.createElement("pre");Ct.style.cssText="height: 0; overflow: visible",Ct.style.direction=kt.getOption("direction"),Ct.className="CodeMirror-placeholder CodeMirror-line-like";var yt=kt.getOption("placeholder");typeof yt=="string"&&(yt=document.createTextNode(yt)),Ct.appendChild(yt),kt.display.lineSpace.insertBefore(Ct,kt.display.lineSpace.firstChild)}function zt(kt){setTimeout(function(){var Ct=!1,yt=kt.getInputField();yt.nodeName=="TEXTAREA"?Ct=!yt.value:kt.lineCount()==1&&(Ct=!/[^\u200b]/.test(yt.querySelector(".CodeMirror-line").textContent)),Ct?ot(kt):Re(kt)},20)}function Bt(kt){gt(kt)&&ot(kt)}function vt(kt){var Ct=kt.getWrapperElement(),yt=gt(kt);Ct.className=Ct.className.replace(" CodeMirror-empty","")+(yt?" CodeMirror-empty":""),yt?ot(kt):Re(kt)}function gt(kt){return kt.lineCount()===1&&kt.getLine(0)===""}})},25717:function(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){var Re={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ot=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(z,tt,at){at&&at!=ae.Init&&(z.removeKeyMap(Bt),z.state.closeBrackets=null),tt&&(vt(zt(tt,"pairs")),z.state.closeBrackets=tt,z.addKeyMap(Bt))});function zt(z,tt){return tt=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[tt]!=null?z[tt]:Re[tt]}var Bt={Backspace:Ct,Enter:yt};function vt(z){for(var tt=0;tt<z.length;tt++){var at=z.charAt(tt),it="'"+at+"'";Bt[it]||(Bt[it]=gt(at))}}vt(Re.pairs+"`");function gt(z){return function(tt){return mt(tt,z)}}function kt(z){var tt=z.state.closeBrackets;if(!tt||tt.override)return tt;var at=z.getModeAt(z.getCursor());return at.closeBrackets||tt}function Ct(z){var tt=kt(z);if(!tt||z.getOption("disableInput"))return ae.Pass;for(var at=zt(tt,"pairs"),it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}for(var lt=it.length-1;lt>=0;lt--){var dt=it[lt].head;z.replaceRange("",ot(dt.line,dt.ch-1),ot(dt.line,dt.ch+1),"+delete")}}function yt(z){var tt=kt(z),at=tt&&zt(tt,"explode");if(!at||z.getOption("disableInput"))return ae.Pass;for(var it=z.listSelections(),lt=0;lt<it.length;lt++){if(!it[lt].empty())return ae.Pass;var ut=xt(z,it[lt].head);if(!ut||at.indexOf(ut)%2!=0)return ae.Pass}z.operation(function(){var dt=z.lineSeparator()||`
`;z.replaceSelection(dt+dt,null),z.execCommand("goCharLeft"),it=z.listSelections();for(var bt=0;bt<it.length;bt++){var At=it[bt].head.line;z.indentLine(At,null,!0),z.indentLine(At+1,null,!0)}})}function Tt(z){var tt=ae.cmpPos(z.anchor,z.head)>0;return{anchor:new ot(z.anchor.line,z.anchor.ch+(tt?-1:1)),head:new ot(z.head.line,z.head.ch+(tt?1:-1))}}function mt(z,tt){var at=kt(z);if(!at||z.getOption("disableInput"))return ae.Pass;var it=zt(at,"pairs"),lt=it.indexOf(tt);if(lt==-1)return ae.Pass;for(var ut=zt(at,"closeBefore"),dt=zt(at,"triples"),bt=it.charAt(lt+1)==tt,At=z.listSelections(),Dt=lt%2==0,Ft,jt=0;jt<At.length;jt++){var Nt=At[jt],_t=Nt.head,Wt,Jt=z.getRange(_t,ot(_t.line,_t.ch+1));if(Dt&&!Nt.empty())Wt="surround";else if((bt||!Dt)&&Jt==tt)bt&&ft(z,_t)?Wt="both":dt.indexOf(tt)>=0&&z.getRange(_t,ot(_t.line,_t.ch+3))==tt+tt+tt?Wt="skipThree":Wt="skip";else if(bt&&_t.ch>1&&dt.indexOf(tt)>=0&&z.getRange(ot(_t.line,_t.ch-2),_t)==tt+tt){if(_t.ch>2&&/\bstring/.test(z.getTokenTypeAt(ot(_t.line,_t.ch-2))))return ae.Pass;Wt="addFour"}else if(bt){var Ut=_t.ch==0?" ":z.getRange(ot(_t.line,_t.ch-1),_t);if(!ae.isWordChar(Jt)&&Ut!=tt&&!ae.isWordChar(Ut))Wt="both";else return ae.Pass}else if(Dt&&(Jt.length===0||/\s/.test(Jt)||ut.indexOf(Jt)>-1))Wt="both";else return ae.Pass;if(!Ft)Ft=Wt;else if(Ft!=Wt)return ae.Pass}var Vt=lt%2?it.charAt(lt-1):tt,oe=lt%2?tt:it.charAt(lt+1);z.operation(function(){if(Ft=="skip")z.execCommand("goCharRight");else if(Ft=="skipThree")for(var se=0;se<3;se++)z.execCommand("goCharRight");else if(Ft=="surround"){for(var he=z.getSelections(),se=0;se<he.length;se++)he[se]=Vt+he[se]+oe;z.replaceSelections(he,"around"),he=z.listSelections().slice();for(var se=0;se<he.length;se++)he[se]=Tt(he[se]);z.setSelections(he)}else Ft=="both"?(z.replaceSelection(Vt+oe,null),z.triggerElectric(Vt+oe),z.execCommand("goCharLeft")):Ft=="addFour"&&(z.replaceSelection(Vt+Vt+Vt+Vt,"before"),z.execCommand("goCharRight"))})}function xt(z,tt){var at=z.getRange(ot(tt.line,tt.ch-1),ot(tt.line,tt.ch+1));return at.length==2?at:null}function ft(z,tt){var at=z.getTokenAt(ot(tt.line,tt.ch+1));return/\bstring/.test(at.type)&&at.start==tt.ch&&(tt.ch==0||!/\bstring/.test(z.getTokenTypeAt(tt)))}})},6313:function(pn,dn,ue){(function(ae){ae(ue(89780),ue(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(Ct,yt,Tt){if(Tt!=ae.Init&&Tt&&Ct.removeKeyMap("autoCloseTags"),!!yt){var mt={name:"autoCloseTags"};(typeof yt!="object"||yt.whenClosing!==!1)&&(mt["'/'"]=function(xt){return vt(xt)}),(typeof yt!="object"||yt.whenOpening!==!1)&&(mt["'>'"]=function(xt){return zt(xt)}),Ct.addKeyMap(mt)}});var Re=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ot=["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 zt(Ct){if(Ct.getOption("disableInput"))return ae.Pass;for(var yt=Ct.listSelections(),Tt=[],mt=Ct.getOption("autoCloseTags"),xt=0;xt<yt.length;xt++){if(!yt[xt].empty())return ae.Pass;var ft=yt[xt].head,z=Ct.getTokenAt(ft),tt=ae.innerMode(Ct.getMode(),z.state),at=tt.state,it=tt.mode.xmlCurrentTag&&tt.mode.xmlCurrentTag(at),lt=it&&it.name;if(!lt)return ae.Pass;var ut=tt.mode.configuration=="html",dt=typeof mt=="object"&&mt.dontCloseTags||ut&&Re,bt=typeof mt=="object"&&mt.indentTags||ut&&ot;z.end>ft.ch&&(lt=lt.slice(0,lt.length-z.end+ft.ch));var At=lt.toLowerCase();if(!lt||z.type=="string"&&(z.end!=ft.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&it.close||z.string.indexOf("/")==ft.ch-z.start-1||dt&&gt(dt,At)>-1||kt(Ct,tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(at)||[],lt,ft,!0))return ae.Pass;var Dt=typeof mt=="object"&&mt.emptyTags;if(Dt&&gt(Dt,lt)>-1){Tt[xt]={text:"/>",newPos:ae.Pos(ft.line,ft.ch+2)};continue}var Ft=bt&&gt(bt,At)>-1;Tt[xt]={indent:Ft,text:">"+(Ft?`
`:"")+"</"+lt+">",newPos:Ft?ae.Pos(ft.line+1,0):ae.Pos(ft.line,ft.ch+1)}}for(var jt=typeof mt=="object"&&mt.dontIndentOnAutoClose,xt=yt.length-1;xt>=0;xt--){var Nt=Tt[xt];Ct.replaceRange(Nt.text,yt[xt].head,yt[xt].anchor,"+insert");var _t=Ct.listSelections().slice(0);_t[xt]={head:Nt.newPos,anchor:Nt.newPos},Ct.setSelections(_t),!jt&&Nt.indent&&(Ct.indentLine(Nt.newPos.line,null,!0),Ct.indentLine(Nt.newPos.line+1,null,!0))}}function Bt(Ct,yt){for(var Tt=Ct.listSelections(),mt=[],xt=yt?"/":"</",ft=Ct.getOption("autoCloseTags"),z=typeof ft=="object"&&ft.dontIndentOnSlash,tt=0;tt<Tt.length;tt++){if(!Tt[tt].empty())return ae.Pass;var at=Tt[tt].head,it=Ct.getTokenAt(at),lt=ae.innerMode(Ct.getMode(),it.state),ut=lt.state;if(yt&&(it.type=="string"||it.string.charAt(0)!="<"||it.start!=at.ch-1))return ae.Pass;var dt,bt=lt.mode.name!="xml"&&Ct.getMode().name=="htmlmixed";if(bt&&lt.mode.name=="javascript")dt=xt+"script";else if(bt&&lt.mode.name=="css")dt=xt+"style";else{var At=lt.mode.xmlCurrentContext&&lt.mode.xmlCurrentContext(ut);if(!At||At.length&&kt(Ct,At,At[At.length-1],at))return ae.Pass;dt=xt+At[At.length-1]}Ct.getLine(at.line).charAt(it.end)!=">"&&(dt+=">"),mt[tt]=dt}if(Ct.replaceSelections(mt),Tt=Ct.listSelections(),!z)for(var tt=0;tt<Tt.length;tt++)(tt==Tt.length-1||Tt[tt].head.line<Tt[tt+1].head.line)&&Ct.indentLine(Tt[tt].head.line)}function vt(Ct){return Ct.getOption("disableInput")?ae.Pass:Bt(Ct,!0)}ae.commands.closeTag=function(Ct){return Bt(Ct)};function gt(Ct,yt){if(Ct.indexOf)return Ct.indexOf(yt);for(var Tt=0,mt=Ct.length;Tt<mt;++Tt)if(Ct[Tt]==yt)return Tt;return-1}function kt(Ct,yt,Tt,mt,xt){if(!ae.scanForClosingTag)return!1;var ft=Math.min(Ct.lastLine()+1,mt.line+500),z=ae.scanForClosingTag(Ct,mt,null,ft);if(!z||z.tag!=Tt)return!1;for(var tt=xt?1:0,at=yt.length-1;at>=0&&yt[at]==Tt;at--)++tt;mt=z.to;for(var at=1;at<tt;at++){var it=ae.scanForClosingTag(Ct,mt,null,ft);if(!it||it.tag!=Tt)return!1;mt=it.to}return!0}})},32855:function(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";var Re=ae.Pos;function ot(at,it){return at.line-it.line||at.ch-it.ch}var zt="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",Bt=zt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",vt=new RegExp("<(/?)(["+zt+"]["+Bt+"]*)","g");function gt(at,it,lt,ut){this.line=it,this.ch=lt,this.cm=at,this.text=at.getLine(it),this.min=ut?Math.max(ut.from,at.firstLine()):at.firstLine(),this.max=ut?Math.min(ut.to-1,at.lastLine()):at.lastLine()}function kt(at,it){var lt=at.cm.getTokenTypeAt(Re(at.line,it));return lt&&/\btag\b/.test(lt)}function Ct(at){if(!(at.line>=at.max))return at.ch=0,at.text=at.cm.getLine(++at.line),!0}function yt(at){if(!(at.line<=at.min))return at.text=at.cm.getLine(--at.line),at.ch=at.text.length,!0}function Tt(at){for(;;){var it=at.text.indexOf(">",at.ch);if(it==-1){if(Ct(at))continue;return}if(!kt(at,it+1)){at.ch=it+1;continue}var lt=at.text.lastIndexOf("/",it),ut=lt>-1&&!/\S/.test(at.text.slice(lt+1,it));return at.ch=it+1,ut?"selfClose":"regular"}}function mt(at){for(;;){var it=at.ch?at.text.lastIndexOf("<",at.ch-1):-1;if(it==-1){if(yt(at))continue;return}if(!kt(at,it+1)){at.ch=it;continue}vt.lastIndex=it,at.ch=it;var lt=vt.exec(at.text);if(lt&&lt.index==it)return lt}}function xt(at){for(;;){vt.lastIndex=at.ch;var it=vt.exec(at.text);if(!it){if(Ct(at))continue;return}if(!kt(at,it.index+1)){at.ch=it.index+1;continue}return at.ch=it.index+it[0].length,it}}function ft(at){for(;;){var it=at.ch?at.text.lastIndexOf(">",at.ch-1):-1;if(it==-1){if(yt(at))continue;return}if(!kt(at,it+1)){at.ch=it;continue}var lt=at.text.lastIndexOf("/",it),ut=lt>-1&&!/\S/.test(at.text.slice(lt+1,it));return at.ch=it+1,ut?"selfClose":"regular"}}function z(at,it){for(var lt=[];;){var ut=xt(at),dt,bt=at.line,At=at.ch-(ut?ut[0].length:0);if(!ut||!(dt=Tt(at)))return;if(dt!="selfClose")if(ut[1]){for(var Dt=lt.length-1;Dt>=0;--Dt)if(lt[Dt]==ut[2]){lt.length=Dt;break}if(Dt<0&&(!it||it==ut[2]))return{tag:ut[2],from:Re(bt,At),to:Re(at.line,at.ch)}}else lt.push(ut[2])}}function tt(at,it){for(var lt=[];;){var ut=ft(at);if(!ut)return;if(ut=="selfClose"){mt(at);continue}var dt=at.line,bt=at.ch,At=mt(at);if(!At)return;if(At[1])lt.push(At[2]);else{for(var Dt=lt.length-1;Dt>=0;--Dt)if(lt[Dt]==At[2]){lt.length=Dt;break}if(Dt<0&&(!it||it==At[2]))return{tag:At[2],from:Re(at.line,at.ch),to:Re(dt,bt)}}}}ae.registerHelper("fold","xml",function(at,it){for(var lt=new gt(at,it.line,0);;){var ut=xt(lt);if(!ut||lt.line!=it.line)return;var dt=Tt(lt);if(!dt)return;if(!ut[1]&&dt!="selfClose"){var bt=Re(lt.line,lt.ch),At=z(lt,ut[2]);return At&&ot(At.from,bt)>0?{from:bt,to:At.from}:null}}}),ae.findMatchingTag=function(at,it,lt){var ut=new gt(at,it.line,it.ch,lt);if(!(ut.text.indexOf(">")==-1&&ut.text.indexOf("<")==-1)){var dt=Tt(ut),bt=dt&&Re(ut.line,ut.ch),At=dt&&mt(ut);if(!(!dt||!At||ot(ut,it)>0)){var Dt={from:Re(ut.line,ut.ch),to:bt,tag:At[2]};return dt=="selfClose"?{open:Dt,close:null,at:"open"}:At[1]?{open:tt(ut,At[2]),close:Dt,at:"close"}:(ut=new gt(at,bt.line,bt.ch,lt),{open:Dt,close:z(ut,At[2]),at:"open"})}}},ae.findEnclosingTag=function(at,it,lt,ut){for(var dt=new gt(at,it.line,it.ch,lt);;){var bt=tt(dt,ut);if(!bt)break;var At=new gt(at,it.line,it.ch,lt),Dt=z(At,bt.tag);if(Dt)return{open:bt,close:Dt}}},ae.scanForClosingTag=function(at,it,lt,ut){var dt=new gt(at,it.line,it.ch,ut?{from:0,to:ut}:null);return z(dt,lt)}})},89780:function(pn){(function(dn,ue){pn.exports=ue()})(this,function(){"use strict";var dn=navigator.userAgent,ue=navigator.platform,ae=/gecko\/\d/i.test(dn),Re=/MSIE \d/.test(dn),ot=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(dn),zt=/Edge\/(\d+)/.exec(dn),Bt=Re||ot||zt,vt=Bt&&(Re?document.documentMode||6:+(zt||ot)[1]),gt=!zt&&/WebKit\//.test(dn),kt=gt&&/Qt\/\d+\.\d+/.test(dn),Ct=!zt&&/Chrome\//.test(dn),yt=/Opera\//.test(dn),Tt=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(dn),xt=/PhantomJS/.test(dn),ft=!zt&&/AppleWebKit/.test(dn)&&/Mobile\/\w+/.test(dn),z=/Android/.test(dn),tt=ft||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(dn),at=ft||/Mac/.test(ue),it=/\bCrOS\b/.test(dn),lt=/win/i.test(ue),ut=yt&&dn.match(/Version\/(\d*\.\d*)/);ut&&(ut=Number(ut[1])),ut&&ut>=15&&(yt=!1,gt=!0);var dt=at&&(kt||yt&&(ut==null||ut<12.11)),bt=ae||Bt&&vt>=9;function At(rt){return new RegExp("(^|\\s)"+rt+"(?:$|\\s)\\s*")}var Dt=function(rt,ct){var Et=rt.className,Pt=At(ct).exec(Et);if(Pt){var Ot=Et.slice(Pt.index+Pt[0].length);rt.className=Et.slice(0,Pt.index)+(Ot?Pt[1]+Ot:"")}};function Ft(rt){for(var ct=rt.childNodes.length;ct>0;--ct)rt.removeChild(rt.firstChild);return rt}function jt(rt,ct){return Ft(rt).appendChild(ct)}function Nt(rt,ct,Et,Pt){var Ot=document.createElement(rt);if(Et&&(Ot.className=Et),Pt&&(Ot.style.cssText=Pt),typeof ct=="string")Ot.appendChild(document.createTextNode(ct));else if(ct)for(var $t=0;$t<ct.length;++$t)Ot.appendChild(ct[$t]);return Ot}function _t(rt,ct,Et,Pt){var Ot=Nt(rt,ct,Et,Pt);return Ot.setAttribute("role","presentation"),Ot}var Wt;document.createRange?Wt=function(rt,ct,Et,Pt){var Ot=document.createRange();return Ot.setEnd(Pt||rt,Et),Ot.setStart(rt,ct),Ot}:Wt=function(rt,ct,Et){var Pt=document.body.createTextRange();try{Pt.moveToElementText(rt.parentNode)}catch(Ot){return Pt}return Pt.collapse(!0),Pt.moveEnd("character",Et),Pt.moveStart("character",ct),Pt};function Jt(rt,ct){if(ct.nodeType==3&&(ct=ct.parentNode),rt.contains)return rt.contains(ct);do if(ct.nodeType==11&&(ct=ct.host),ct==rt)return!0;while(ct=ct.parentNode)}function Ut(){var rt;try{rt=document.activeElement}catch(ct){rt=document.body||null}for(;rt&&rt.shadowRoot&&rt.shadowRoot.activeElement;)rt=rt.shadowRoot.activeElement;return rt}function Vt(rt,ct){var Et=rt.className;At(ct).test(Et)||(rt.className+=(Et?" ":"")+ct)}function oe(rt,ct){for(var Et=rt.split(" "),Pt=0;Pt<Et.length;Pt++)Et[Pt]&&!At(Et[Pt]).test(ct)&&(ct+=" "+Et[Pt]);return ct}var se=function(rt){rt.select()};ft?se=function(rt){rt.selectionStart=0,rt.selectionEnd=rt.value.length}:Bt&&(se=function(rt){try{rt.select()}catch(ct){}});function he(rt){var ct=Array.prototype.slice.call(arguments,1);return function(){return rt.apply(null,ct)}}function be(rt,ct,Et){ct||(ct={});for(var Pt in rt)rt.hasOwnProperty(Pt)&&(Et!==!1||!ct.hasOwnProperty(Pt))&&(ct[Pt]=rt[Pt]);return ct}function Yt(rt,ct,Et,Pt,Ot){ct==null&&(ct=rt.search(/[^\s\u00a0]/),ct==-1&&(ct=rt.length));for(var $t=Pt||0,ge=Ot||0;;){var Te=rt.indexOf(" ",$t);if(Te<0||Te>=ct)return ge+(ct-$t);ge+=Te-$t,ge+=Et-ge%Et,$t=Te+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=he(this.onTimeout,this)};ne.prototype.onTimeout=function(rt){rt.id=0,rt.time<=+new Date?rt.f():setTimeout(rt.handler,rt.time-+new Date)},ne.prototype.set=function(rt,ct){this.f=ct;var Et=+new Date+rt;(!this.id||Et<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,rt),this.time=Et)};function ve(rt,ct){for(var Et=0;Et<rt.length;++Et)if(rt[Et]==ct)return Et;return-1}var Se=50,we={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},de={origin:"*mouse"},le={origin:"+move"};function Ce(rt,ct,Et){for(var Pt=0,Ot=0;;){var $t=rt.indexOf(" ",Pt);$t==-1&&($t=rt.length);var ge=$t-Pt;if($t==rt.length||Ot+ge>=ct)return Pt+Math.min(ge,ct-Ot);if(Ot+=$t-Pt,Ot+=Et-Ot%Et,Pt=$t+1,Ot>=ct)return Pt}}var fe=[""];function me(rt){for(;fe.length<=rt;)fe.push(ke(fe)+" ");return fe[rt]}function ke(rt){return rt[rt.length-1]}function pe(rt,ct){for(var Et=[],Pt=0;Pt<rt.length;Pt++)Et[Pt]=ct(rt[Pt],Pt);return Et}function qt(rt,ct,Et){for(var Pt=0,Ot=Et(ct);Pt<rt.length&&Et(rt[Pt])<=Ot;)Pt++;rt.splice(Pt,0,ct)}function Kt(){}function wt(rt,ct){var Et;return Object.create?Et=Object.create(rt):(Kt.prototype=rt,Et=new Kt),ct&&be(ct,Et),Et}var Lt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Zt(rt){return/\w/.test(rt)||rt>"\x80"&&(rt.toUpperCase()!=rt.toLowerCase()||Lt.test(rt))}function ee(rt,ct){return ct?ct.source.indexOf("\\w")>-1&&Zt(rt)?!0:ct.test(rt):Zt(rt)}function It(rt){for(var ct in rt)if(rt.hasOwnProperty(ct)&&rt[ct])return!1;return!0}var Rt=/[\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 Ht(rt){return rt.charCodeAt(0)>=768&&Rt.test(rt)}function re(rt,ct,Et){for(;(Et<0?ct>0:ct<rt.length)&&Ht(rt.charAt(ct));)ct+=Et;return ct}function ye(rt,ct,Et){for(var Pt=ct>Et?-1:1;;){if(ct==Et)return ct;var Ot=(ct+Et)/2,$t=Pt<0?Math.ceil(Ot):Math.floor(Ot);if($t==ct)return rt($t)?ct:Et;rt($t)?Et=$t:ct=$t+Pt}}function Pe(rt,ct,Et,Pt){if(!rt)return Pt(ct,Et,"ltr",0);for(var Ot=!1,$t=0;$t<rt.length;++$t){var ge=rt[$t];(ge.from<Et&&ge.to>ct||ct==Et&&ge.to==ct)&&(Pt(Math.max(ge.from,ct),Math.min(ge.to,Et),ge.level==1?"rtl":"ltr",$t),Ot=!0)}Ot||Pt(ct,Et,"ltr")}var Ae=null;function Oe(rt,ct,Et){var Pt;Ae=null;for(var Ot=0;Ot<rt.length;++Ot){var $t=rt[Ot];if($t.from<ct&&$t.to>ct)return Ot;$t.to==ct&&($t.from!=$t.to&&Et=="before"?Pt=Ot:Ae=Ot),$t.from==ct&&($t.from!=$t.to&&Et!="before"?Pt=Ot:Ae=Ot)}return Pt!=null?Pt:Ae}var Ie=function(){var rt="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ct="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Et(Be){return Be<=247?rt.charAt(Be):1424<=Be&&Be<=1524?"R":1536<=Be&&Be<=1785?ct.charAt(Be-1536):1774<=Be&&Be<=2220?"r":8192<=Be&&Be<=8203?"w":Be==8204?"b":"L"}var Pt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ot=/[stwN]/,$t=/[LRr]/,ge=/[Lb1n]/,Te=/[1n]/;function Ee(Be,en,ze){this.level=Be,this.from=en,this.to=ze}return function(Be,en){var ze=en=="ltr"?"L":"R";if(Be.length==0||en=="ltr"&&!Pt.test(Be))return!1;for(var gn=Be.length,fn=[],Un=0;Un<gn;++Un)fn.push(Et(Be.charCodeAt(Un)));for(var Jn=0,ar=ze;Jn<gn;++Jn){var Cr=fn[Jn];Cr=="m"?fn[Jn]=ar:ar=Cr}for(var Gr=0,Nr=ze;Gr<gn;++Gr){var Hr=fn[Gr];Hr=="1"&&Nr=="r"?fn[Gr]="n":$t.test(Hr)&&(Nr=Hr,Hr=="r"&&(fn[Gr]="R"))}for(var ci=1,Lr=fn[0];ci<gn-1;++ci){var Mi=fn[ci];Mi=="+"&&Lr=="1"&&fn[ci+1]=="1"?fn[ci]="1":Mi==","&&Lr==fn[ci+1]&&(Lr=="1"||Lr=="n")&&(fn[ci]=Lr),Lr=Mi}for(var Po=0;Po<gn;++Po){var ua=fn[Po];if(ua==",")fn[Po]="N";else if(ua=="%"){var Fo=void 0;for(Fo=Po+1;Fo<gn&&fn[Fo]=="%";++Fo);for(var ps=Po&&fn[Po-1]=="!"||Fo<gn&&fn[Fo]=="1"?"1":"N",Wa=Po;Wa<Fo;++Wa)fn[Wa]=ps;Po=Fo-1}}for(var qo=0,Ts=ze;qo<gn;++qo){var Fa=fn[qo];Ts=="L"&&Fa=="1"?fn[qo]="L":$t.test(Fa)&&(Ts=Fa)}for(var ta=0;ta<gn;++ta)if(Ot.test(fn[ta])){var Ki=void 0;for(Ki=ta+1;Ki<gn&&Ot.test(fn[Ki]);++Ki);for(var Ro=(ta?fn[ta-1]:ze)=="L",Sa=(Ki<gn?fn[Ki]:ze)=="L",Da=Ro==Sa?Ro?"L":"R":ze,vl=ta;vl<Ki;++vl)fn[vl]=Da;ta=Ki-1}for(var Do=[],il,Go=0;Go<gn;)if(ge.test(fn[Go])){var xf=Go;for(++Go;Go<gn&&ge.test(fn[Go]);++Go);Do.push(new Ee(0,xf,Go))}else{var Us=Go,Ls=Do.length,gs=en=="rtl"?1:0;for(++Go;Go<gn&&fn[Go]!="L";++Go);for(var ho=Us;ho<Go;)if(Te.test(fn[ho])){Us<ho&&(Do.splice(Ls,0,new Ee(1,Us,ho)),Ls+=gs);var xa=ho;for(++ho;ho<Go&&Te.test(fn[ho]);++ho);Do.splice(Ls,0,new Ee(2,xa,ho)),Ls+=gs,Us=ho}else++ho;Us<Go&&Do.splice(Ls,0,new Ee(1,Us,Go))}return en=="ltr"&&(Do[0].level==1&&(il=Be.match(/^\s+/))&&(Do[0].from=il[0].length,Do.unshift(new Ee(0,0,il[0].length))),ke(Do).level==1&&(il=Be.match(/\s+$/))&&(ke(Do).to-=il[0].length,Do.push(new Ee(0,gn-il[0].length,gn)))),en=="rtl"?Do.reverse():Do}}();function Qe(rt,ct){var Et=rt.order;return Et==null&&(Et=rt.order=Ie(rt.text,ct)),Et}var qe=[],nn=function(rt,ct,Et){if(rt.addEventListener)rt.addEventListener(ct,Et,!1);else if(rt.attachEvent)rt.attachEvent("on"+ct,Et);else{var Pt=rt._handlers||(rt._handlers={});Pt[ct]=(Pt[ct]||qe).concat(Et)}};function Ke(rt,ct){return rt._handlers&&rt._handlers[ct]||qe}function Ue(rt,ct,Et){if(rt.removeEventListener)rt.removeEventListener(ct,Et,!1);else if(rt.detachEvent)rt.detachEvent("on"+ct,Et);else{var Pt=rt._handlers,Ot=Pt&&Pt[ct];if(Ot){var $t=ve(Ot,Et);$t>-1&&(Pt[ct]=Ot.slice(0,$t).concat(Ot.slice($t+1)))}}}function We(rt,ct){var Et=Ke(rt,ct);if(Et.length)for(var Pt=Array.prototype.slice.call(arguments,2),Ot=0;Ot<Et.length;++Ot)Et[Ot].apply(null,Pt)}function He(rt,ct,Et){return typeof ct=="string"&&(ct={type:ct,preventDefault:function(){this.defaultPrevented=!0}}),We(rt,Et||ct.type,rt,ct),jn(ct)||ct.codemirrorIgnore}function rn(rt){var ct=rt._handlers&&rt._handlers.cursorActivity;if(ct)for(var Et=rt.curOp.cursorActivityHandlers||(rt.curOp.cursorActivityHandlers=[]),Pt=0;Pt<ct.length;++Pt)ve(Et,ct[Pt])==-1&&Et.push(ct[Pt])}function ln(rt,ct){return Ke(rt,ct).length>0}function un(rt){rt.prototype.on=function(ct,Et){nn(this,ct,Et)},rt.prototype.off=function(ct,Et){Ue(this,ct,Et)}}function bn(rt){rt.preventDefault?rt.preventDefault():rt.returnValue=!1}function In(rt){rt.stopPropagation?rt.stopPropagation():rt.cancelBubble=!0}function jn(rt){return rt.defaultPrevented!=null?rt.defaultPrevented:rt.returnValue==!1}function Kn(rt){bn(rt),In(rt)}function kr(rt){return rt.target||rt.srcElement}function pr(rt){var ct=rt.which;return ct==null&&(rt.button&1?ct=1:rt.button&2?ct=3:rt.button&4&&(ct=2)),at&&rt.ctrlKey&&ct==1&&(ct=3),ct}var Er=function(){if(Bt&&vt<9)return!1;var rt=Nt("div");return"draggable"in rt||"dragDrop"in rt}(),Or;function jr(rt){if(Or==null){var ct=Nt("span","\u200B");jt(rt,Nt("span",[ct,document.createTextNode("x")])),rt.firstChild.offsetHeight!=0&&(Or=ct.offsetWidth<=1&&ct.offsetHeight>2&&!(Bt&&vt<8))}var Et=Or?Nt("span","\u200B"):Nt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Et.setAttribute("cm-text",""),Et}var yr;function rr(rt){if(yr!=null)return yr;var ct=jt(rt,document.createTextNode("A\u062EA")),Et=Wt(ct,0,1).getBoundingClientRect(),Pt=Wt(ct,1,2).getBoundingClientRect();return Ft(rt),!Et||Et.left==Et.right?!1:yr=Pt.right-Et.right<3}var Rr=`
b`.split(/\n/).length!=3?function(rt){for(var ct=0,Et=[],Pt=rt.length;ct<=Pt;){var Ot=rt.indexOf(`
`,ct);Ot==-1&&(Ot=rt.length);var $t=rt.slice(ct,rt.charAt(Ot-1)=="\r"?Ot-1:Ot),ge=$t.indexOf("\r");ge!=-1?(Et.push($t.slice(0,ge)),ct+=ge+1):(Et.push($t),ct=Ot+1)}return Et}:function(rt){return rt.split(/\r\n?|\n/)},te=window.getSelection?function(rt){try{return rt.selectionStart!=rt.selectionEnd}catch(ct){return!1}}:function(rt){var ct;try{ct=rt.ownerDocument.selection.createRange()}catch(Et){}return!ct||ct.parentElement()!=rt?!1:ct.compareEndPoints("StartToEnd",ct)!=0},Qn=function(){var rt=Nt("div");return"oncopy"in rt?!0:(rt.setAttribute("oncopy","return;"),typeof rt.oncopy=="function")}(),Vn=null;function Rn(rt){if(Vn!=null)return Vn;var ct=jt(rt,Nt("span","x")),Et=ct.getBoundingClientRect(),Pt=Wt(ct,0,1).getBoundingClientRect();return Vn=Math.abs(Et.left-Pt.left)>1}var zn={},Wn={};function tr(rt,ct){arguments.length>2&&(ct.dependencies=Array.prototype.slice.call(arguments,2)),zn[rt]=ct}function Ar(rt,ct){Wn[rt]=ct}function sn(rt){if(typeof rt=="string"&&Wn.hasOwnProperty(rt))rt=Wn[rt];else if(rt&&typeof rt.name=="string"&&Wn.hasOwnProperty(rt.name)){var ct=Wn[rt.name];typeof ct=="string"&&(ct={name:ct}),rt=wt(ct,rt),rt.name=ct.name}else{if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(rt))return sn("application/xml");if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(rt))return sn("application/json")}return typeof rt=="string"?{name:rt}:rt||{name:"null"}}function tn(rt,ct){ct=sn(ct);var Et=zn[ct.name];if(!Et)return tn(rt,"text/plain");var Pt=Et(rt,ct);if(Ye.hasOwnProperty(ct.name)){var Ot=Ye[ct.name];for(var $t in Ot)Ot.hasOwnProperty($t)&&(Pt.hasOwnProperty($t)&&(Pt["_"+$t]=Pt[$t]),Pt[$t]=Ot[$t])}if(Pt.name=ct.name,ct.helperType&&(Pt.helperType=ct.helperType),ct.modeProps)for(var ge in ct.modeProps)Pt[ge]=ct.modeProps[ge];return Pt}var Ye={};function hn(rt,ct){var Et=Ye.hasOwnProperty(rt)?Ye[rt]:Ye[rt]={};be(ct,Et)}function nr(rt,ct){if(ct===!0)return ct;if(rt.copyState)return rt.copyState(ct);var Et={};for(var Pt in ct){var Ot=ct[Pt];Ot instanceof Array&&(Ot=Ot.concat([])),Et[Pt]=Ot}return Et}function Zn(rt,ct){for(var Et;rt.innerMode&&(Et=rt.innerMode(ct),!(!Et||Et.mode==rt));)ct=Et.state,rt=Et.mode;return Et||{mode:rt,state:ct}}function mr(rt,ct,Et){return rt.startState?rt.startState(ct,Et):!0}var an=function(rt,ct,Et){this.pos=this.start=0,this.string=rt,this.tabSize=ct||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Et};an.prototype.eol=function(){return this.pos>=this.string.length},an.prototype.sol=function(){return this.pos==this.lineStart},an.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},an.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},an.prototype.eat=function(rt){var ct=this.string.charAt(this.pos),Et;if(typeof rt=="string"?Et=ct==rt:Et=ct&&(rt.test?rt.test(ct):rt(ct)),Et)return++this.pos,ct},an.prototype.eatWhile=function(rt){for(var ct=this.pos;this.eat(rt););return this.pos>ct},an.prototype.eatSpace=function(){for(var rt=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>rt},an.prototype.skipToEnd=function(){this.pos=this.string.length},an.prototype.skipTo=function(rt){var ct=this.string.indexOf(rt,this.pos);if(ct>-1)return this.pos=ct,!0},an.prototype.backUp=function(rt){this.pos-=rt},an.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Yt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Yt(this.string,this.lineStart,this.tabSize):0)},an.prototype.indentation=function(){return Yt(this.string,null,this.tabSize)-(this.lineStart?Yt(this.string,this.lineStart,this.tabSize):0)},an.prototype.match=function(rt,ct,Et){if(typeof rt=="string"){var Pt=function(ge){return Et?ge.toLowerCase():ge},Ot=this.string.substr(this.pos,rt.length);if(Pt(Ot)==Pt(rt))return ct!==!1&&(this.pos+=rt.length),!0}else{var $t=this.string.slice(this.pos).match(rt);return $t&&$t.index>0?null:($t&&ct!==!1&&(this.pos+=$t[0].length),$t)}},an.prototype.current=function(){return this.string.slice(this.start,this.pos)},an.prototype.hideFirstChars=function(rt,ct){this.lineStart+=rt;try{return ct()}finally{this.lineStart-=rt}},an.prototype.lookAhead=function(rt){var ct=this.lineOracle;return ct&&ct.lookAhead(rt)},an.prototype.baseToken=function(){var rt=this.lineOracle;return rt&&rt.baseToken(this.pos)};function mn(rt,ct){if(ct-=rt.first,ct<0||ct>=rt.size)throw new Error("There is no line "+(ct+rt.first)+" in the document.");for(var Et=rt;!Et.lines;)for(var Pt=0;;++Pt){var Ot=Et.children[Pt],$t=Ot.chunkSize();if(ct<$t){Et=Ot;break}ct-=$t}return Et.lines[ct]}function $n(rt,ct,Et){var Pt=[],Ot=ct.line;return rt.iter(ct.line,Et.line+1,function($t){var ge=$t.text;Ot==Et.line&&(ge=ge.slice(0,Et.ch)),Ot==ct.line&&(ge=ge.slice(ct.ch)),Pt.push(ge),++Ot}),Pt}function fr(rt,ct,Et){var Pt=[];return rt.iter(ct,Et,function(Ot){Pt.push(Ot.text)}),Pt}function Mn(rt,ct){var Et=ct-rt.height;if(Et)for(var Pt=rt;Pt;Pt=Pt.parent)Pt.height+=Et}function je(rt){if(rt.parent==null)return null;for(var ct=rt.parent,Et=ve(ct.lines,rt),Pt=ct.parent;Pt;ct=Pt,Pt=Pt.parent)for(var Ot=0;Pt.children[Ot]!=ct;++Ot)Et+=Pt.children[Ot].chunkSize();return Et+ct.first}function Ve(rt,ct){var Et=rt.first;t:do{for(var Pt=0;Pt<rt.children.length;++Pt){var Ot=rt.children[Pt],$t=Ot.height;if(ct<$t){rt=Ot;continue t}ct-=$t,Et+=Ot.chunkSize()}return Et}while(!rt.lines);for(var ge=0;ge<rt.lines.length;++ge){var Te=rt.lines[ge],Ee=Te.height;if(ct<Ee)break;ct-=Ee}return Et+ge}function An(rt,ct){return ct>=rt.first&&ct<rt.first+rt.size}function En(rt,ct){return String(rt.lineNumberFormatter(ct+rt.firstLineNumber))}function $e(rt,ct,Et){if(Et===void 0&&(Et=null),!(this instanceof $e))return new $e(rt,ct,Et);this.line=rt,this.ch=ct,this.sticky=Et}function Tn(rt,ct){return rt.line-ct.line||rt.ch-ct.ch}function Xn(rt,ct){return rt.sticky==ct.sticky&&Tn(rt,ct)==0}function hr(rt){return $e(rt.line,rt.ch)}function xr(rt,ct){return Tn(rt,ct)<0?ct:rt}function On(rt,ct){return Tn(rt,ct)<0?rt:ct}function Fn(rt,ct){return Math.max(rt.first,Math.min(ct,rt.first+rt.size-1))}function Dn(rt,ct){if(ct.line<rt.first)return $e(rt.first,0);var Et=rt.first+rt.size-1;return ct.line>Et?$e(Et,mn(rt,Et).text.length):sr(ct,mn(rt,ct.line).text.length)}function sr(rt,ct){var Et=rt.ch;return Et==null||Et>ct?$e(rt.line,ct):Et<0?$e(rt.line,0):rt}function or(rt,ct){for(var Et=[],Pt=0;Pt<ct.length;Pt++)Et[Pt]=Dn(rt,ct[Pt]);return Et}var xn=function(rt,ct){this.state=rt,this.lookAhead=ct},Gn=function(rt,ct,Et,Pt){this.state=ct,this.doc=rt,this.line=Et,this.maxLookAhead=Pt||0,this.baseTokens=null,this.baseTokenPos=1};Gn.prototype.lookAhead=function(rt){var ct=this.doc.getLine(this.line+rt);return ct!=null&&rt>this.maxLookAhead&&(this.maxLookAhead=rt),ct},Gn.prototype.baseToken=function(rt){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=rt;)this.baseTokenPos+=2;var ct=this.baseTokens[this.baseTokenPos+1];return{type:ct&&ct.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-rt}},Gn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Gn.fromSaved=function(rt,ct,Et){return ct instanceof xn?new Gn(rt,nr(rt.mode,ct.state),Et,ct.lookAhead):new Gn(rt,nr(rt.mode,ct),Et)},Gn.prototype.save=function(rt){var ct=rt!==!1?nr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new xn(ct,this.maxLookAhead):ct};function Yr(rt,ct,Et,Pt){var Ot=[rt.state.modeGen],$t={};ni(rt,ct.text,rt.doc.mode,Et,function(Be,en){return Ot.push(Be,en)},$t,Pt);for(var ge=Et.state,Te=function(Be){Et.baseTokens=Ot;var en=rt.state.overlays[Be],ze=1,gn=0;Et.state=!0,ni(rt,ct.text,en.mode,Et,function(fn,Un){for(var Jn=ze;gn<fn;){var ar=Ot[ze];ar>fn&&Ot.splice(ze,1,fn,Ot[ze+1],ar),ze+=2,gn=Math.min(fn,ar)}if(Un)if(en.opaque)Ot.splice(Jn,ze-Jn,fn,"overlay "+Un),ze=Jn+2;else for(;Jn<ze;Jn+=2){var Cr=Ot[Jn+1];Ot[Jn+1]=(Cr?Cr+" ":"")+"overlay "+Un}},$t),Et.state=ge,Et.baseTokens=null,Et.baseTokenPos=1},Ee=0;Ee<rt.state.overlays.length;++Ee)Te(Ee);return{styles:Ot,classes:$t.bgClass||$t.textClass?$t:null}}function ei(rt,ct,Et){if(!ct.styles||ct.styles[0]!=rt.state.modeGen){var Pt=xi(rt,je(ct)),Ot=ct.text.length>rt.options.maxHighlightLength&&nr(rt.doc.mode,Pt.state),$t=Yr(rt,ct,Pt);Ot&&(Pt.state=Ot),ct.stateAfter=Pt.save(!Ot),ct.styles=$t.styles,$t.classes?ct.styleClasses=$t.classes:ct.styleClasses&&(ct.styleClasses=null),Et===rt.doc.highlightFrontier&&(rt.doc.modeFrontier=Math.max(rt.doc.modeFrontier,++rt.doc.highlightFrontier))}return ct.styles}function xi(rt,ct,Et){var Pt=rt.doc,Ot=rt.display;if(!Pt.mode.startState)return new Gn(Pt,!0,ct);var $t=Kr(rt,ct,Et),ge=$t>Pt.first&&mn(Pt,$t-1).stateAfter,Te=ge?Gn.fromSaved(Pt,ge,$t):new Gn(Pt,mr(Pt.mode),$t);return Pt.iter($t,ct,function(Ee){Je(rt,Ee.text,Te);var Be=Te.line;Ee.stateAfter=Be==ct-1||Be%5==0||Be>=Ot.viewFrom&&Be<Ot.viewTo?Te.save():null,Te.nextLine()}),Et&&(Pt.modeFrontier=Te.line),Te}function Je(rt,ct,Et,Pt){var Ot=rt.doc.mode,$t=new an(ct,rt.options.tabSize,Et);for($t.start=$t.pos=Pt||0,ct==""&&cr(Ot,Et.state);!$t.eol();)_r(Ot,$t,Et.state),$t.start=$t.pos}function cr(rt,ct){if(rt.blankLine)return rt.blankLine(ct);if(rt.innerMode){var Et=Zn(rt,ct);if(Et.mode.blankLine)return Et.mode.blankLine(Et.state)}}function _r(rt,ct,Et,Pt){for(var Ot=0;Ot<10;Ot++){Pt&&(Pt[0]=Zn(rt,Et).mode);var $t=rt.token(ct,Et);if(ct.pos>ct.start)return $t}throw new Error("Mode "+rt.name+" failed to advance stream.")}var ir=function(rt,ct,Et){this.start=rt.start,this.end=rt.pos,this.string=rt.current(),this.type=ct||null,this.state=Et};function oi(rt,ct,Et,Pt){var Ot=rt.doc,$t=Ot.mode,ge;ct=Dn(Ot,ct);var Te=mn(Ot,ct.line),Ee=xi(rt,ct.line,Et),Be=new an(Te.text,rt.options.tabSize,Ee),en;for(Pt&&(en=[]);(Pt||Be.pos<ct.ch)&&!Be.eol();)Be.start=Be.pos,ge=_r($t,Be,Ee.state),Pt&&en.push(new ir(Be,ge,nr(Ot.mode,Ee.state)));return Pt?en:new ir(Be,ge,Ee.state)}function Jr(rt,ct){if(rt)for(;;){var Et=rt.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Et)break;rt=rt.slice(0,Et.index)+rt.slice(Et.index+Et[0].length);var Pt=Et[1]?"bgClass":"textClass";ct[Pt]==null?ct[Pt]=Et[2]:new RegExp("(?:^|\\s)"+Et[2]+"(?:$|\\s)").test(ct[Pt])||(ct[Pt]+=" "+Et[2])}return rt}function ni(rt,ct,Et,Pt,Ot,$t,ge){var Te=Et.flattenSpans;Te==null&&(Te=rt.options.flattenSpans);var Ee=0,Be=null,en=new an(ct,rt.options.tabSize,Pt),ze,gn=rt.options.addModeClass&&[null];for(ct==""&&Jr(cr(Et,Pt.state),$t);!en.eol();){if(en.pos>rt.options.maxHighlightLength?(Te=!1,ge&&Je(rt,ct,Pt,en.pos),en.pos=ct.length,ze=null):ze=Jr(_r(Et,en,Pt.state,gn),$t),gn){var fn=gn[0].name;fn&&(ze="m-"+(ze?fn+" "+ze:fn))}if(!Te||Be!=ze){for(;Ee<en.start;)Ee=Math.min(en.start,Ee+5e3),Ot(Ee,Be);Be=ze}en.start=en.pos}for(;Ee<en.pos;){var Un=Math.min(en.pos,Ee+5e3);Ot(Un,Be),Ee=Un}}function Kr(rt,ct,Et){for(var Pt,Ot,$t=rt.doc,ge=Et?-1:ct-(rt.doc.mode.innerMode?1e3:100),Te=ct;Te>ge;--Te){if(Te<=$t.first)return $t.first;var Ee=mn($t,Te-1),Be=Ee.stateAfter;if(Be&&(!Et||Te+(Be instanceof xn?Be.lookAhead:0)<=$t.modeFrontier))return Te;var en=Yt(Ee.text,null,rt.options.tabSize);(Ot==null||Pt>en)&&(Ot=Te-1,Pt=en)}return Ot}function $r(rt,ct){if(rt.modeFrontier=Math.min(rt.modeFrontier,ct),!(rt.highlightFrontier<ct-10)){for(var Et=rt.first,Pt=ct-1;Pt>Et;Pt--){var Ot=mn(rt,Pt).stateAfter;if(Ot&&(!(Ot instanceof xn)||Pt+Ot.lookAhead<ct)){Et=Pt+1;break}}rt.highlightFrontier=Math.min(rt.highlightFrontier,Et)}}var hi=!1,yn=!1;function mi(){hi=!0}function vn(){yn=!0}function ii(rt,ct,Et){this.marker=rt,this.from=ct,this.to=Et}function Gi(rt,ct){if(rt)for(var Et=0;Et<rt.length;++Et){var Pt=rt[Et];if(Pt.marker==ct)return Pt}}function gi(rt,ct){for(var Et,Pt=0;Pt<rt.length;++Pt)rt[Pt]!=ct&&(Et||(Et=[])).push(rt[Pt]);return Et}function Bi(rt,ct){rt.markedSpans=rt.markedSpans?rt.markedSpans.concat([ct]):[ct],ct.marker.attachLine(rt)}function ri(rt,ct,Et){var Pt;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var $t=rt[Ot],ge=$t.marker,Te=$t.from==null||(ge.inclusiveLeft?$t.from<=ct:$t.from<ct);if(Te||$t.from==ct&&ge.type=="bookmark"&&(!Et||!$t.marker.insertLeft)){var Ee=$t.to==null||(ge.inclusiveRight?$t.to>=ct:$t.to>ct);(Pt||(Pt=[])).push(new ii(ge,$t.from,Ee?null:$t.to))}}return Pt}function Br(rt,ct,Et){var Pt;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var $t=rt[Ot],ge=$t.marker,Te=$t.to==null||(ge.inclusiveRight?$t.to>=ct:$t.to>ct);if(Te||$t.from==ct&&ge.type=="bookmark"&&(!Et||$t.marker.insertLeft)){var Ee=$t.from==null||(ge.inclusiveLeft?$t.from<=ct:$t.from<ct);(Pt||(Pt=[])).push(new ii(ge,Ee?null:$t.from-ct,$t.to==null?null:$t.to-ct))}}return Pt}function wi(rt,ct){if(ct.full)return null;var Et=An(rt,ct.from.line)&&mn(rt,ct.from.line).markedSpans,Pt=An(rt,ct.to.line)&&mn(rt,ct.to.line).markedSpans;if(!Et&&!Pt)return null;var Ot=ct.from.ch,$t=ct.to.ch,ge=Tn(ct.from,ct.to)==0,Te=ri(Et,Ot,ge),Ee=Br(Pt,$t,ge),Be=ct.text.length==1,en=ke(ct.text).length+(Be?Ot:0);if(Te)for(var ze=0;ze<Te.length;++ze){var gn=Te[ze];if(gn.to==null){var fn=Gi(Ee,gn.marker);fn?Be&&(gn.to=fn.to==null?null:fn.to+en):gn.to=Ot}}if(Ee)for(var Un=0;Un<Ee.length;++Un){var Jn=Ee[Un];if(Jn.to!=null&&(Jn.to+=en),Jn.from==null){var ar=Gi(Te,Jn.marker);ar||(Jn.from=en,Be&&(Te||(Te=[])).push(Jn))}else Jn.from+=en,Be&&(Te||(Te=[])).push(Jn)}Te&&(Te=Eo(Te)),Ee&&Ee!=Te&&(Ee=Eo(Ee));var Cr=[Te];if(!Be){var Gr=ct.text.length-2,Nr;if(Gr>0&&Te)for(var Hr=0;Hr<Te.length;++Hr)Te[Hr].to==null&&(Nr||(Nr=[])).push(new ii(Te[Hr].marker,null,null));for(var ci=0;ci<Gr;++ci)Cr.push(Nr);Cr.push(Ee)}return Cr}function Eo(rt){for(var ct=0;ct<rt.length;++ct){var Et=rt[ct];Et.from!=null&&Et.from==Et.to&&Et.marker.clearWhenEmpty!==!1&&rt.splice(ct--,1)}return rt.length?rt:null}function Oi(rt,ct,Et){var Pt=null;if(rt.iter(ct.line,Et.line+1,function(fn){if(fn.markedSpans)for(var Un=0;Un<fn.markedSpans.length;++Un){var Jn=fn.markedSpans[Un].marker;Jn.readOnly&&(!Pt||ve(Pt,Jn)==-1)&&(Pt||(Pt=[])).push(Jn)}}),!Pt)return null;for(var Ot=[{from:ct,to:Et}],$t=0;$t<Pt.length;++$t)for(var ge=Pt[$t],Te=ge.find(0),Ee=0;Ee<Ot.length;++Ee){var Be=Ot[Ee];if(!(Tn(Be.to,Te.from)<0||Tn(Be.from,Te.to)>0)){var en=[Ee,1],ze=Tn(Be.from,Te.from),gn=Tn(Be.to,Te.to);(ze<0||!ge.inclusiveLeft&&!ze)&&en.push({from:Be.from,to:Te.from}),(gn>0||!ge.inclusiveRight&&!gn)&&en.push({from:Te.to,to:Be.to}),Ot.splice.apply(Ot,en),Ee+=en.length-3}}return Ot}function Yn(rt){var ct=rt.markedSpans;if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.detachLine(rt);rt.markedSpans=null}}function Le(rt,ct){if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.attachLine(rt);rt.markedSpans=ct}}function Ti(rt){return rt.inclusiveLeft?-1:0}function so(rt){return rt.inclusiveRight?1:0}function Ji(rt,ct){var Et=rt.lines.length-ct.lines.length;if(Et!=0)return Et;var Pt=rt.find(),Ot=ct.find(),$t=Tn(Pt.from,Ot.from)||Ti(rt)-Ti(ct);if($t)return-$t;var ge=Tn(Pt.to,Ot.to)||so(rt)-so(ct);return ge||ct.id-rt.id}function Zi(rt,ct){var Et=yn&&rt.markedSpans,Pt;if(Et)for(var Ot=void 0,$t=0;$t<Et.length;++$t)Ot=Et[$t],Ot.marker.collapsed&&(ct?Ot.from:Ot.to)==null&&(!Pt||Ji(Pt,Ot.marker)<0)&&(Pt=Ot.marker);return Pt}function di(rt){return Zi(rt,!0)}function lr(rt){return Zi(rt,!1)}function wr(rt,ct){var Et=yn&&rt.markedSpans,Pt;if(Et)for(var Ot=0;Ot<Et.length;++Ot){var $t=Et[Ot];$t.marker.collapsed&&($t.from==null||$t.from<ct)&&($t.to==null||$t.to>ct)&&(!Pt||Ji(Pt,$t.marker)<0)&&(Pt=$t.marker)}return Pt}function Vr(rt,ct,Et,Pt,Ot){var $t=mn(rt,ct),ge=yn&&$t.markedSpans;if(ge)for(var Te=0;Te<ge.length;++Te){var Ee=ge[Te];if(Ee.marker.collapsed){var Be=Ee.marker.find(0),en=Tn(Be.from,Et)||Ti(Ee.marker)-Ti(Ot),ze=Tn(Be.to,Pt)||so(Ee.marker)-so(Ot);if(!(en>=0&&ze<=0||en<=0&&ze>=0)&&(en<=0&&(Ee.marker.inclusiveRight&&Ot.inclusiveLeft?Tn(Be.to,Et)>=0:Tn(Be.to,Et)>0)||en>=0&&(Ee.marker.inclusiveRight&&Ot.inclusiveLeft?Tn(Be.from,Pt)<=0:Tn(Be.from,Pt)<0)))return!0}}}function gr(rt){for(var ct;ct=di(rt);)rt=ct.find(-1,!0).line;return rt}function Ur(rt){for(var ct;ct=lr(rt);)rt=ct.find(1,!0).line;return rt}function vr(rt){for(var ct,Et;ct=lr(rt);)rt=ct.find(1,!0).line,(Et||(Et=[])).push(rt);return Et}function ur(rt,ct){var Et=mn(rt,ct),Pt=gr(Et);return Et==Pt?ct:je(Pt)}function Mr(rt,ct){if(ct>rt.lastLine())return ct;var Et=mn(rt,ct),Pt;if(!kn(rt,Et))return ct;for(;Pt=lr(Et);)Et=Pt.find(1,!0).line;return je(Et)+1}function kn(rt,ct){var Et=yn&&ct.markedSpans;if(Et){for(var Pt=void 0,Ot=0;Ot<Et.length;++Ot)if(Pt=Et[Ot],!!Pt.marker.collapsed){if(Pt.from==null)return!0;if(!Pt.marker.widgetNode&&Pt.from==0&&Pt.marker.inclusiveLeft&&fi(rt,ct,Pt))return!0}}}function fi(rt,ct,Et){if(Et.to==null){var Pt=Et.marker.find(1,!0);return fi(rt,Pt.line,Gi(Pt.line.markedSpans,Et.marker))}if(Et.marker.inclusiveRight&&Et.to==ct.text.length)return!0;for(var Ot=void 0,$t=0;$t<ct.markedSpans.length;++$t)if(Ot=ct.markedSpans[$t],Ot.marker.collapsed&&!Ot.marker.widgetNode&&Ot.from==Et.to&&(Ot.to==null||Ot.to!=Et.from)&&(Ot.marker.inclusiveLeft||Et.marker.inclusiveRight)&&fi(rt,ct,Ot))return!0}function Ci(rt){rt=gr(rt);for(var ct=0,Et=rt.parent,Pt=0;Pt<Et.lines.length;++Pt){var Ot=Et.lines[Pt];if(Ot==rt)break;ct+=Ot.height}for(var $t=Et.parent;$t;Et=$t,$t=Et.parent)for(var ge=0;ge<$t.children.length;++ge){var Te=$t.children[ge];if(Te==Et)break;ct+=Te.height}return ct}function io(rt){if(rt.height==0)return 0;for(var ct=rt.text.length,Et,Pt=rt;Et=di(Pt);){var Ot=Et.find(0,!0);Pt=Ot.from.line,ct+=Ot.from.ch-Ot.to.ch}for(Pt=rt;Et=lr(Pt);){var $t=Et.find(0,!0);ct-=Pt.text.length-$t.from.ch,Pt=$t.to.line,ct+=Pt.text.length-$t.to.ch}return ct}function bi(rt){var ct=rt.display,Et=rt.doc;ct.maxLine=mn(Et,Et.first),ct.maxLineLength=io(ct.maxLine),ct.maxLineChanged=!0,Et.iter(function(Pt){var Ot=io(Pt);Ot>ct.maxLineLength&&(ct.maxLineLength=Ot,ct.maxLine=Pt)})}var lo=function(rt,ct,Et){this.text=rt,Le(this,ct),this.height=Et?Et(this):1};lo.prototype.lineNo=function(){return je(this)},un(lo);function xo(rt,ct,Et,Pt){rt.text=ct,rt.stateAfter&&(rt.stateAfter=null),rt.styles&&(rt.styles=null),rt.order!=null&&(rt.order=null),Yn(rt),Le(rt,Et);var Ot=Pt?Pt(rt):1;Ot!=rt.height&&Mn(rt,Ot)}function Bo(rt){rt.parent=null,Yn(rt)}var po={},na={};function Ao(rt,ct){if(!rt||/^\s*$/.test(rt))return null;var Et=ct.addModeClass?na:po;return Et[rt]||(Et[rt]=rt.replace(/\S+/g,"cm-$&"))}function on(rt,ct){var Et=_t("span",null,null,gt?"padding-right: .1px":null),Pt={pre:_t("pre",[Et],"CodeMirror-line"),content:Et,col:0,pos:0,cm:rt,trailingSpace:!1,splitSpaces:rt.getOption("lineWrapping")};ct.measure={};for(var Ot=0;Ot<=(ct.rest?ct.rest.length:0);Ot++){var $t=Ot?ct.rest[Ot-1]:ct.line,ge=void 0;Pt.pos=0,Pt.addToken=za,rr(rt.display.measure)&&(ge=Qe($t,rt.doc.direction))&&(Pt.addToken=Hi(Pt.addToken,ge)),Pt.map=[];var Te=ct!=rt.display.externalMeasured&&je($t);ls($t,Pt,ei(rt,$t,Te)),$t.styleClasses&&($t.styleClasses.bgClass&&(Pt.bgClass=oe($t.styleClasses.bgClass,Pt.bgClass||"")),$t.styleClasses.textClass&&(Pt.textClass=oe($t.styleClasses.textClass,Pt.textClass||""))),Pt.map.length==0&&Pt.map.push(0,0,Pt.content.appendChild(jr(rt.display.measure))),Ot==0?(ct.measure.map=Pt.map,ct.measure.cache={}):((ct.measure.maps||(ct.measure.maps=[])).push(Pt.map),(ct.measure.caches||(ct.measure.caches=[])).push({}))}if(gt){var Ee=Pt.content.lastChild;(/\bcm-tab\b/.test(Ee.className)||Ee.querySelector&&Ee.querySelector(".cm-tab"))&&(Pt.content.className="cm-tab-wrap-hack")}return We(rt,"renderLine",rt,ct.line,Pt.pre),Pt.pre.className&&(Pt.textClass=oe(Pt.pre.className,Pt.textClass||"")),Pt}function ra(rt){var ct=Nt("span","\u2022","cm-invalidchar");return ct.title="\\u"+rt.charCodeAt(0).toString(16),ct.setAttribute("aria-label",ct.title),ct}function za(rt,ct,Et,Pt,Ot,$t,ge){if(ct){var Te=rt.splitSpaces?Ya(ct,rt.trailingSpace):ct,Ee=rt.cm.state.specialChars,Be=!1,en;if(!Ee.test(ct))rt.col+=ct.length,en=document.createTextNode(Te),rt.map.push(rt.pos,rt.pos+ct.length,en),Bt&&vt<9&&(Be=!0),rt.pos+=ct.length;else{en=document.createDocumentFragment();for(var ze=0;;){Ee.lastIndex=ze;var gn=Ee.exec(ct),fn=gn?gn.index-ze:ct.length-ze;if(fn){var Un=document.createTextNode(Te.slice(ze,ze+fn));Bt&&vt<9?en.appendChild(Nt("span",[Un])):en.appendChild(Un),rt.map.push(rt.pos,rt.pos+fn,Un),rt.col+=fn,rt.pos+=fn}if(!gn)break;ze+=fn+1;var Jn=void 0;if(gn[0]==" "){var ar=rt.cm.options.tabSize,Cr=ar-rt.col%ar;Jn=en.appendChild(Nt("span",me(Cr),"cm-tab")),Jn.setAttribute("role","presentation"),Jn.setAttribute("cm-text"," "),rt.col+=Cr}else gn[0]=="\r"||gn[0]==`
`?(Jn=en.appendChild(Nt("span",gn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Jn.setAttribute("cm-text",gn[0]),rt.col+=1):(Jn=rt.cm.options.specialCharPlaceholder(gn[0]),Jn.setAttribute("cm-text",gn[0]),Bt&&vt<9?en.appendChild(Nt("span",[Jn])):en.appendChild(Jn),rt.col+=1);rt.map.push(rt.pos,rt.pos+1,Jn),rt.pos++}}if(rt.trailingSpace=Te.charCodeAt(ct.length-1)==32,Et||Pt||Ot||Be||$t||ge){var Gr=Et||"";Pt&&(Gr+=Pt),Ot&&(Gr+=Ot);var Nr=Nt("span",[en],Gr,$t);if(ge)for(var Hr in ge)ge.hasOwnProperty(Hr)&&Hr!="style"&&Hr!="class"&&Nr.setAttribute(Hr,ge[Hr]);return rt.content.appendChild(Nr)}rt.content.appendChild(en)}}function Ya(rt,ct){if(rt.length>1&&!/ /.test(rt))return rt;for(var Et=ct,Pt="",Ot=0;Ot<rt.length;Ot++){var $t=rt.charAt(Ot);$t==" "&&Et&&(Ot==rt.length-1||rt.charCodeAt(Ot+1)==32)&&($t="\xA0"),Pt+=$t,Et=$t==" "}return Pt}function Hi(rt,ct){return function(Et,Pt,Ot,$t,ge,Te,Ee){Ot=Ot?Ot+" cm-force-border":"cm-force-border";for(var Be=Et.pos,en=Be+Pt.length;;){for(var ze=void 0,gn=0;gn<ct.length&&(ze=ct[gn],!(ze.to>Be&&ze.from<=Be));gn++);if(ze.to>=en)return rt(Et,Pt,Ot,$t,ge,Te,Ee);rt(Et,Pt.slice(0,ze.to-Be),Ot,$t,null,Te,Ee),$t=null,Pt=Pt.slice(ze.to-Be),Be=ze.to}}}function Js(rt,ct,Et,Pt){var Ot=!Pt&&Et.widgetNode;Ot&&rt.map.push(rt.pos,rt.pos+ct,Ot),!Pt&&rt.cm.display.input.needsContentAttribute&&(Ot||(Ot=rt.content.appendChild(document.createElement("span"))),Ot.setAttribute("cm-marker",Et.id)),Ot&&(rt.cm.display.input.setUneditable(Ot),rt.content.appendChild(Ot)),rt.pos+=ct,rt.trailingSpace=!1}function ls(rt,ct,Et){var Pt=rt.markedSpans,Ot=rt.text,$t=0;if(!Pt){for(var ge=1;ge<Et.length;ge+=2)ct.addToken(ct,Ot.slice($t,$t=Et[ge]),Ao(Et[ge+1],ct.cm.options));return}for(var Te=Ot.length,Ee=0,Be=1,en="",ze,gn,fn=0,Un,Jn,ar,Cr,Gr;;){if(fn==Ee){Un=Jn=ar=gn="",Gr=null,Cr=null,fn=1/0;for(var Nr=[],Hr=void 0,ci=0;ci<Pt.length;++ci){var Lr=Pt[ci],Mi=Lr.marker;if(Mi.type=="bookmark"&&Lr.from==Ee&&Mi.widgetNode)Nr.push(Mi);else if(Lr.from<=Ee&&(Lr.to==null||Lr.to>Ee||Mi.collapsed&&Lr.to==Ee&&Lr.from==Ee)){if(Lr.to!=null&&Lr.to!=Ee&&fn>Lr.to&&(fn=Lr.to,Jn=""),Mi.className&&(Un+=" "+Mi.className),Mi.css&&(gn=(gn?gn+";":"")+Mi.css),Mi.startStyle&&Lr.from==Ee&&(ar+=" "+Mi.startStyle),Mi.endStyle&&Lr.to==fn&&(Hr||(Hr=[])).push(Mi.endStyle,Lr.to),Mi.title&&((Gr||(Gr={})).title=Mi.title),Mi.attributes)for(var Po in Mi.attributes)(Gr||(Gr={}))[Po]=Mi.attributes[Po];Mi.collapsed&&(!Cr||Ji(Cr.marker,Mi)<0)&&(Cr=Lr)}else Lr.from>Ee&&fn>Lr.from&&(fn=Lr.from)}if(Hr)for(var ua=0;ua<Hr.length;ua+=2)Hr[ua+1]==fn&&(Jn+=" "+Hr[ua]);if(!Cr||Cr.from==Ee)for(var Fo=0;Fo<Nr.length;++Fo)Js(ct,0,Nr[Fo]);if(Cr&&(Cr.from||0)==Ee){if(Js(ct,(Cr.to==null?Te+1:Cr.to)-Ee,Cr.marker,Cr.from==null),Cr.to==null)return;Cr.to==Ee&&(Cr=!1)}}if(Ee>=Te)break;for(var ps=Math.min(Te,fn);;){if(en){var Wa=Ee+en.length;if(!Cr){var qo=Wa>ps?en.slice(0,ps-Ee):en;ct.addToken(ct,qo,ze?ze+Un:Un,ar,Ee+qo.length==fn?Jn:"",gn,Gr)}if(Wa>=ps){en=en.slice(ps-Ee),Ee=ps;break}Ee=Wa,ar=""}en=Ot.slice($t,$t=Et[Be++]),ze=Ao(Et[Be++],ct.cm.options)}}}function Ml(rt,ct,Et){this.line=ct,this.rest=vr(ct),this.size=this.rest?je(ke(this.rest))-Et+1:1,this.node=this.text=null,this.hidden=kn(rt,ct)}function Ai(rt,ct,Et){for(var Pt=[],Ot,$t=ct;$t<Et;$t=Ot){var ge=new Ml(rt.doc,mn(rt.doc,$t),$t);Ot=$t+ge.size,Pt.push(ge)}return Pt}var No=null;function Ga(rt){No?No.ops.push(rt):rt.ownsGroup=No={ops:[rt],delayedCallbacks:[]}}function dl(rt){var ct=rt.delayedCallbacks,Et=0;do{for(;Et<ct.length;Et++)ct[Et].call(null);for(var Pt=0;Pt<rt.ops.length;Pt++){var Ot=rt.ops[Pt];if(Ot.cursorActivityHandlers)for(;Ot.cursorActivityCalled<Ot.cursorActivityHandlers.length;)Ot.cursorActivityHandlers[Ot.cursorActivityCalled++].call(null,Ot.cm)}}while(Et<ct.length)}function uu(rt,ct){var Et=rt.ownsGroup;if(Et)try{dl(Et)}finally{No=null,ct(Et)}}var xs=null;function Dr(rt,ct){var Et=Ke(rt,ct);if(Et.length){var Pt=Array.prototype.slice.call(arguments,2),Ot;No?Ot=No.delayedCallbacks:xs?Ot=xs:(Ot=xs=[],setTimeout(Gl,0));for(var $t=function(Te){Ot.push(function(){return Et[Te].apply(null,Pt)})},ge=0;ge<Et.length;++ge)$t(ge)}}function Gl(){var rt=xs;xs=null;for(var ct=0;ct<rt.length;++ct)rt[ct]()}function hu(rt,ct,Et,Pt){for(var Ot=0;Ot<ct.changes.length;Ot++){var $t=ct.changes[Ot];$t=="text"?er(rt,ct):$t=="gutter"?qr(rt,ct,Et,Pt):$t=="class"?zr(rt,ct):$t=="widget"&&ai(rt,ct,Pt)}ct.changes=null}function us(rt){return rt.node==rt.text&&(rt.node=Nt("div",null,null,"position: relative"),rt.text.parentNode&&rt.text.parentNode.replaceChild(rt.node,rt.text),rt.node.appendChild(rt.text),Bt&&vt<8&&(rt.node.style.zIndex=2)),rt.node}function Xo(rt,ct){var Et=ct.bgClass?ct.bgClass+" "+(ct.line.bgClass||""):ct.line.bgClass;if(Et&&(Et+=" CodeMirror-linebackground"),ct.background)Et?ct.background.className=Et:(ct.background.parentNode.removeChild(ct.background),ct.background=null);else if(Et){var Pt=us(ct);ct.background=Pt.insertBefore(Nt("div",null,Et),Pt.firstChild),rt.display.input.setUneditable(ct.background)}}function Nu(rt,ct){var Et=rt.display.externalMeasured;return Et&&Et.line==ct.line?(rt.display.externalMeasured=null,ct.measure=Et.measure,Et.built):on(rt,ct)}function er(rt,ct){var Et=ct.text.className,Pt=Nu(rt,ct);ct.text==ct.node&&(ct.node=Pt.pre),ct.text.parentNode.replaceChild(Pt.pre,ct.text),ct.text=Pt.pre,Pt.bgClass!=ct.bgClass||Pt.textClass!=ct.textClass?(ct.bgClass=Pt.bgClass,ct.textClass=Pt.textClass,zr(rt,ct)):Et&&(ct.text.className=Et)}function zr(rt,ct){Xo(rt,ct),ct.line.wrapClass?us(ct).className=ct.line.wrapClass:ct.node!=ct.text&&(ct.node.className="");var Et=ct.textClass?ct.textClass+" "+(ct.line.textClass||""):ct.line.textClass;ct.text.className=Et||""}function qr(rt,ct,Et,Pt){if(ct.gutter&&(ct.node.removeChild(ct.gutter),ct.gutter=null),ct.gutterBackground&&(ct.node.removeChild(ct.gutterBackground),ct.gutterBackground=null),ct.line.gutterClass){var Ot=us(ct);ct.gutterBackground=Nt("div",null,"CodeMirror-gutter-background "+ct.line.gutterClass,"left: "+(rt.options.fixedGutter?Pt.fixedPos:-Pt.gutterTotalWidth)+"px; width: "+Pt.gutterTotalWidth+"px"),rt.display.input.setUneditable(ct.gutterBackground),Ot.insertBefore(ct.gutterBackground,ct.text)}var $t=ct.line.gutterMarkers;if(rt.options.lineNumbers||$t){var ge=us(ct),Te=ct.gutter=Nt("div",null,"CodeMirror-gutter-wrapper","left: "+(rt.options.fixedGutter?Pt.fixedPos:-Pt.gutterTotalWidth)+"px");if(rt.display.input.setUneditable(Te),ge.insertBefore(Te,ct.text),ct.line.gutterClass&&(Te.className+=" "+ct.line.gutterClass),rt.options.lineNumbers&&(!$t||!$t["CodeMirror-linenumbers"])&&(ct.lineNumber=Te.appendChild(Nt("div",En(rt.options,Et),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Pt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+rt.display.lineNumInnerWidth+"px"))),$t)for(var Ee=0;Ee<rt.display.gutterSpecs.length;++Ee){var Be=rt.display.gutterSpecs[Ee].className,en=$t.hasOwnProperty(Be)&&$t[Be];en&&Te.appendChild(Nt("div",[en],"CodeMirror-gutter-elt","left: "+Pt.gutterLeft[Be]+"px; width: "+Pt.gutterWidth[Be]+"px"))}}}function ai(rt,ct,Et){ct.alignable&&(ct.alignable=null);for(var Pt=At("CodeMirror-linewidget"),Ot=ct.node.firstChild,$t=void 0;Ot;Ot=$t)$t=Ot.nextSibling,Pt.test(Ot.className)&&ct.node.removeChild(Ot);Vi(rt,ct,Et)}function pi(rt,ct,Et,Pt){var Ot=Nu(rt,ct);return ct.text=ct.node=Ot.pre,Ot.bgClass&&(ct.bgClass=Ot.bgClass),Ot.textClass&&(ct.textClass=Ot.textClass),zr(rt,ct),qr(rt,ct,Et,Pt),Vi(rt,ct,Pt),ct.node}function Vi(rt,ct,Et){if(Fr(rt,ct.line,ct,Et,!0),ct.rest)for(var Pt=0;Pt<ct.rest.length;Pt++)Fr(rt,ct.rest[Pt],ct,Et,!1)}function Fr(rt,ct,Et,Pt,Ot){if(ct.widgets)for(var $t=us(Et),ge=0,Te=ct.widgets;ge<Te.length;++ge){var Ee=Te[ge],Be=Nt("div",[Ee.node],"CodeMirror-linewidget"+(Ee.className?" "+Ee.className:""));Ee.handleMouseEvents||Be.setAttribute("cm-ignore-events","true"),ws(Ee,Be,Et,Pt),rt.display.input.setUneditable(Be),Ot&&Ee.above?$t.insertBefore(Be,Et.gutter||Et.text):$t.appendChild(Be),Dr(Ee,"redraw")}}function ws(rt,ct,Et,Pt){if(rt.noHScroll){(Et.alignable||(Et.alignable=[])).push(ct);var Ot=Pt.wrapperWidth;ct.style.left=Pt.fixedPos+"px",rt.coverGutter||(Ot-=Pt.gutterTotalWidth,ct.style.paddingLeft=Pt.gutterTotalWidth+"px"),ct.style.width=Ot+"px"}rt.coverGutter&&(ct.style.zIndex=5,ct.style.position="relative",rt.noHScroll||(ct.style.marginLeft=-Pt.gutterTotalWidth+"px"))}function ia(rt){if(rt.height!=null)return rt.height;var ct=rt.doc.cm;if(!ct)return 0;if(!Jt(document.body,rt.node)){var Et="position: relative;";rt.coverGutter&&(Et+="margin-left: -"+ct.display.gutters.offsetWidth+"px;"),rt.noHScroll&&(Et+="width: "+ct.display.wrapper.clientWidth+"px;"),jt(ct.display.measure,Nt("div",[rt.node],null,Et))}return rt.height=rt.node.parentNode.offsetHeight}function Uo(rt,ct){for(var Et=kr(ct);Et!=rt.wrapper;Et=Et.parentNode)if(!Et||Et.nodeType==1&&Et.getAttribute("cm-ignore-events")=="true"||Et.parentNode==rt.sizer&&Et!=rt.mover)return!0}function oo(rt){return rt.lineSpace.offsetTop}function Ja(rt){return rt.mover.offsetHeight-rt.lineSpace.offsetHeight}function bs(rt){if(rt.cachedPaddingH)return rt.cachedPaddingH;var ct=jt(rt.measure,Nt("pre","x","CodeMirror-line-like")),Et=window.getComputedStyle?window.getComputedStyle(ct):ct.currentStyle,Pt={left:parseInt(Et.paddingLeft),right:parseInt(Et.paddingRight)};return!isNaN(Pt.left)&&!isNaN(Pt.right)&&(rt.cachedPaddingH=Pt),Pt}function Aa(rt){return Se-rt.display.nativeBarWidth}function Ps(rt){return rt.display.scroller.clientWidth-Aa(rt)-rt.display.barWidth}function Tl(rt){return rt.display.scroller.clientHeight-Aa(rt)-rt.display.barHeight}function Qs(rt,ct,Et){var Pt=rt.options.lineWrapping,Ot=Pt&&Ps(rt);if(!ct.measure.heights||Pt&&ct.measure.width!=Ot){var $t=ct.measure.heights=[];if(Pt){ct.measure.width=Ot;for(var ge=ct.text.firstChild.getClientRects(),Te=0;Te<ge.length-1;Te++){var Ee=ge[Te],Be=ge[Te+1];Math.abs(Ee.bottom-Be.bottom)>2&&$t.push((Ee.bottom+Be.top)/2-Et.top)}}$t.push(Et.bottom-Et.top)}}function ju(rt,ct,Et){if(rt.line==ct)return{map:rt.measure.map,cache:rt.measure.cache};for(var Pt=0;Pt<rt.rest.length;Pt++)if(rt.rest[Pt]==ct)return{map:rt.measure.maps[Pt],cache:rt.measure.caches[Pt]};for(var Ot=0;Ot<rt.rest.length;Ot++)if(je(rt.rest[Ot])>Et)return{map:rt.measure.maps[Ot],cache:rt.measure.caches[Ot],before:!0}}function Xc(rt,ct){ct=gr(ct);var Et=je(ct),Pt=rt.display.externalMeasured=new Ml(rt.doc,ct,Et);Pt.lineN=Et;var Ot=Pt.built=on(rt,Pt);return Pt.text=Ot.pre,jt(rt.display.lineMeasure,Ot.pre),Pt}function sc(rt,ct,Et,Pt){return Is(rt,Ul(rt,ct),Et,Pt)}function pl(rt,ct){if(ct>=rt.display.viewFrom&&ct<rt.display.viewTo)return rt.display.view[Rs(rt,ct)];var Et=rt.display.externalMeasured;if(Et&&ct>=Et.lineN&&ct<Et.lineN+Et.size)return Et}function Ul(rt,ct){var Et=je(ct),Pt=pl(rt,Et);Pt&&!Pt.text?Pt=null:Pt&&Pt.changes&&(hu(rt,Pt,Et,cu(rt)),rt.curOp.forceUpdate=!0),Pt||(Pt=Xc(rt,ct));var Ot=ju(Pt,ct,Et);return{line:ct,view:Pt,rect:null,map:Ot.map,cache:Ot.cache,before:Ot.before,hasHeights:!1}}function Is(rt,ct,Et,Pt,Ot){ct.before&&(Et=-1);var $t=Et+(Pt||""),ge;return ct.cache.hasOwnProperty($t)?ge=ct.cache[$t]:(ct.rect||(ct.rect=ct.view.text.getBoundingClientRect()),ct.hasHeights||(Qs(rt,ct.view,ct.rect),ct.hasHeights=!0),ge=jo(rt,ct,Et,Pt),ge.bogus||(ct.cache[$t]=ge)),{left:ge.left,right:ge.right,top:Ot?ge.rtop:ge.top,bottom:Ot?ge.rbottom:ge.bottom}}var lc={left:0,right:0,top:0,bottom:0};function uc(rt,ct,Et){for(var Pt,Ot,$t,ge,Te,Ee,Be=0;Be<rt.length;Be+=3)if(Te=rt[Be],Ee=rt[Be+1],ct<Te?(Ot=0,$t=1,ge="left"):ct<Ee?(Ot=ct-Te,$t=Ot+1):(Be==rt.length-3||ct==Ee&&rt[Be+3]>ct)&&($t=Ee-Te,Ot=$t-1,ct>=Ee&&(ge="right")),Ot!=null){if(Pt=rt[Be+2],Te==Ee&&Et==(Pt.insertLeft?"left":"right")&&(ge=Et),Et=="left"&&Ot==0)for(;Be&&rt[Be-2]==rt[Be-3]&&rt[Be-1].insertLeft;)Pt=rt[(Be-=3)+2],ge="left";if(Et=="right"&&Ot==Ee-Te)for(;Be<rt.length-3&&rt[Be+3]==rt[Be+4]&&!rt[Be+5].insertLeft;)Pt=rt[(Be+=3)+2],ge="right";break}return{node:Pt,start:Ot,end:$t,collapse:ge,coverStart:Te,coverEnd:Ee}}function Yc(rt,ct){var Et=lc;if(ct=="left")for(var Pt=0;Pt<rt.length&&(Et=rt[Pt]).left==Et.right;Pt++);else for(var Ot=rt.length-1;Ot>=0&&(Et=rt[Ot]).left==Et.right;Ot--);return Et}function jo(rt,ct,Et,Pt){var Ot=uc(ct.map,Et,Pt),$t=Ot.node,ge=Ot.start,Te=Ot.end,Ee=Ot.collapse,Be;if($t.nodeType==3){for(var en=0;en<4;en++){for(;ge&&Ht(ct.line.text.charAt(Ot.coverStart+ge));)--ge;for(;Ot.coverStart+Te<Ot.coverEnd&&Ht(ct.line.text.charAt(Ot.coverStart+Te));)++Te;if(Bt&&vt<9&&ge==0&&Te==Ot.coverEnd-Ot.coverStart?Be=$t.parentNode.getBoundingClientRect():Be=Yc(Wt($t,ge,Te).getClientRects(),Pt),Be.left||Be.right||ge==0)break;Te=ge,ge=ge-1,Ee="right"}Bt&&vt<11&&(Be=Wf(rt.display.measure,Be))}else{ge>0&&(Ee=Pt="right");var ze;rt.options.lineWrapping&&(ze=$t.getClientRects()).length>1?Be=ze[Pt=="right"?ze.length-1:0]:Be=$t.getBoundingClientRect()}if(Bt&&vt<9&&!ge&&(!Be||!Be.left&&!Be.right)){var gn=$t.parentNode.getClientRects()[0];gn?Be={left:gn.left,right:gn.left+gl(rt.display),top:gn.top,bottom:gn.bottom}:Be=lc}for(var fn=Be.top-ct.rect.top,Un=Be.bottom-ct.rect.top,Jn=(fn+Un)/2,ar=ct.view.measure.heights,Cr=0;Cr<ar.length-1&&!(Jn<ar[Cr]);Cr++);var Gr=Cr?ar[Cr-1]:0,Nr=ar[Cr],Hr={left:(Ee=="right"?Be.right:Be.left)-ct.rect.left,right:(Ee=="left"?Be.left:Be.right)-ct.rect.left,top:Gr,bottom:Nr};return!Be.left&&!Be.right&&(Hr.bogus=!0),rt.options.singleCursorHeightPerLine||(Hr.rtop=fn,Hr.rbottom=Un),Hr}function Wf(rt,ct){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rn(rt))return ct;var Et=screen.logicalXDPI/screen.deviceXDPI,Pt=screen.logicalYDPI/screen.deviceYDPI;return{left:ct.left*Et,right:ct.right*Et,top:ct.top*Pt,bottom:ct.bottom*Pt}}function hc(rt){if(rt.measure&&(rt.measure.cache={},rt.measure.heights=null,rt.rest))for(var ct=0;ct<rt.rest.length;ct++)rt.measure.caches[ct]={}}function Ou(rt){rt.display.externalMeasure=null,Ft(rt.display.lineMeasure);for(var ct=0;ct<rt.display.view.length;ct++)hc(rt.display.view[ct])}function Fu(rt){Ou(rt),rt.display.cachedCharWidth=rt.display.cachedTextHeight=rt.display.cachedPaddingH=null,rt.options.lineWrapping||(rt.display.maxLineChanged=!0),rt.display.lineNumChars=null}function da(){return Ct&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Na(){return Ct&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Yo(rt){var ct=0;if(rt.widgets)for(var Et=0;Et<rt.widgets.length;++Et)rt.widgets[Et].above&&(ct+=ia(rt.widgets[Et]));return ct}function oa(rt,ct,Et,Pt,Ot){if(!Ot){var $t=Yo(ct);Et.top+=$t,Et.bottom+=$t}if(Pt=="line")return Et;Pt||(Pt="local");var ge=Ci(ct);if(Pt=="local"?ge+=oo(rt.display):ge-=rt.display.viewOffset,Pt=="page"||Pt=="window"){var Te=rt.display.lineSpace.getBoundingClientRect();ge+=Te.top+(Pt=="window"?0:Na());var Ee=Te.left+(Pt=="window"?0:da());Et.left+=Ee,Et.right+=Ee}return Et.top+=ge,Et.bottom+=ge,Et}function cc(rt,ct,Et){if(Et=="div")return ct;var Pt=ct.left,Ot=ct.top;if(Et=="page")Pt-=da(),Ot-=Na();else if(Et=="local"||!Et){var $t=rt.display.sizer.getBoundingClientRect();Pt+=$t.left,Ot+=$t.top}var ge=rt.display.lineSpace.getBoundingClientRect();return{left:Pt-ge.left,top:Ot-ge.top}}function Du(rt,ct,Et,Pt,Ot){return Pt||(Pt=mn(rt.doc,ct.line)),oa(rt,Pt,sc(rt,Pt,ct.ch,Ot),Et)}function mo(rt,ct,Et,Pt,Ot,$t){Pt=Pt||mn(rt.doc,ct.line),Ot||(Ot=Ul(rt,Pt));function ge(Un,Jn){var ar=Is(rt,Ot,Un,Jn?"right":"left",$t);return Jn?ar.left=ar.right:ar.right=ar.left,oa(rt,Pt,ar,Et)}var Te=Qe(Pt,rt.doc.direction),Ee=ct.ch,Be=ct.sticky;if(Ee>=Pt.text.length?(Ee=Pt.text.length,Be="before"):Ee<=0&&(Ee=0,Be="after"),!Te)return ge(Be=="before"?Ee-1:Ee,Be=="before");function en(Un,Jn,ar){var Cr=Te[Jn],Gr=Cr.level==1;return ge(ar?Un-1:Un,Gr!=ar)}var ze=Oe(Te,Ee,Be),gn=Ae,fn=en(Ee,ze,Be=="before");return gn!=null&&(fn.other=en(Ee,gn,Be!="before")),fn}function Ui(rt,ct){var Et=0;ct=Dn(rt.doc,ct),rt.options.lineWrapping||(Et=gl(rt.display)*ct.ch);var Pt=mn(rt.doc,ct.line),Ot=Ci(Pt)+oo(rt.display);return{left:Et,right:Et,top:Ot,bottom:Ot+Pt.height}}function Ni(rt,ct,Et,Pt,Ot){var $t=$e(rt,ct,Et);return $t.xRel=Ot,Pt&&($t.outside=Pt),$t}function ja(rt,ct,Et){var Pt=rt.doc;if(Et+=rt.display.viewOffset,Et<0)return Ni(Pt.first,0,null,-1,-1);var Ot=Ve(Pt,Et),$t=Pt.first+Pt.size-1;if(Ot>$t)return Ni(Pt.first+Pt.size-1,mn(Pt,$t).text.length,null,1,1);ct<0&&(ct=0);for(var ge=mn(Pt,Ot);;){var Te=Pn(rt,ge,Ot,ct,Et),Ee=wr(ge,Te.ch+(Te.xRel>0||Te.outside>0?1:0));if(!Ee)return Te;var Be=Ee.find(1);if(Be.line==Ot)return Be;ge=mn(Pt,Ot=Be.line)}}function Sr(rt,ct,Et,Pt){Pt-=Yo(ct);var Ot=ct.text.length,$t=ye(function(ge){return Is(rt,Et,ge-1).bottom<=Pt},Ot,0);return Ot=ye(function(ge){return Is(rt,Et,ge).top>Pt},$t,Ot),{begin:$t,end:Ot}}function Jo(rt,ct,Et,Pt){Et||(Et=Ul(rt,ct));var Ot=oa(rt,ct,Is(rt,Et,Pt),"line").top;return Sr(rt,ct,Et,Ot)}function Ge(rt,ct,Et,Pt){return rt.bottom<=Et?!1:rt.top>Et?!0:(Pt?rt.left:rt.right)>ct}function Pn(rt,ct,Et,Pt,Ot){Ot-=Ci(ct);var $t=Ul(rt,ct),ge=Yo(ct),Te=0,Ee=ct.text.length,Be=!0,en=Qe(ct,rt.doc.direction);if(en){var ze=(rt.options.lineWrapping?Wl:$s)(rt,ct,Et,$t,en,Pt,Ot);Be=ze.level!=1,Te=Be?ze.from:ze.to-1,Ee=Be?ze.to:ze.from-1}var gn=null,fn=null,Un=ye(function(ci){var Lr=Is(rt,$t,ci);return Lr.top+=ge,Lr.bottom+=ge,Ge(Lr,Pt,Ot,!1)?(Lr.top<=Ot&&Lr.left<=Pt&&(gn=ci,fn=Lr),!0):!1},Te,Ee),Jn,ar,Cr=!1;if(fn){var Gr=Pt-fn.left<fn.right-Pt,Nr=Gr==Be;Un=gn+(Nr?0:1),ar=Nr?"after":"before",Jn=Gr?fn.left:fn.right}else{!Be&&(Un==Ee||Un==Te)&&Un++,ar=Un==0?"after":Un==ct.text.length?"before":Is(rt,$t,Un-(Be?1:0)).bottom+ge<=Ot==Be?"after":"before";var Hr=mo(rt,$e(Et,Un,ar),"line",ct,$t);Jn=Hr.left,Cr=Ot<Hr.top?-1:Ot>=Hr.bottom?1:0}return Un=re(ct.text,Un,1),Ni(Et,Un,ar,Cr,Pt-Jn)}function $s(rt,ct,Et,Pt,Ot,$t,ge){var Te=ye(function(ze){var gn=Ot[ze],fn=gn.level!=1;return Ge(mo(rt,$e(Et,fn?gn.to:gn.from,fn?"before":"after"),"line",ct,Pt),$t,ge,!0)},0,Ot.length-1),Ee=Ot[Te];if(Te>0){var Be=Ee.level!=1,en=mo(rt,$e(Et,Be?Ee.from:Ee.to,Be?"after":"before"),"line",ct,Pt);Ge(en,$t,ge,!0)&&en.top>ge&&(Ee=Ot[Te-1])}return Ee}function Wl(rt,ct,Et,Pt,Ot,$t,ge){var Te=Sr(rt,ct,Pt,ge),Ee=Te.begin,Be=Te.end;/\s/.test(ct.text.charAt(Be-1))&&Be--;for(var en=null,ze=null,gn=0;gn<Ot.length;gn++){var fn=Ot[gn];if(!(fn.from>=Be||fn.to<=Ee)){var Un=fn.level!=1,Jn=Is(rt,Pt,Un?Math.min(Be,fn.to)-1:Math.max(Ee,fn.from)).right,ar=Jn<$t?$t-Jn+1e9:Jn-$t;(!en||ze>ar)&&(en=fn,ze=ar)}}return en||(en=Ot[Ot.length-1]),en.from<Ee&&(en={from:Ee,to:en.to,level:en.level}),en.to>Be&&(en={from:en.from,to:Be,level:en.level}),en}var hs;function Qa(rt){if(rt.cachedTextHeight!=null)return rt.cachedTextHeight;if(hs==null){hs=Nt("pre",null,"CodeMirror-line-like");for(var ct=0;ct<49;++ct)hs.appendChild(document.createTextNode("x")),hs.appendChild(Nt("br"));hs.appendChild(document.createTextNode("x"))}jt(rt.measure,hs);var Et=hs.offsetHeight/50;return Et>3&&(rt.cachedTextHeight=Et),Ft(rt.measure),Et||1}function gl(rt){if(rt.cachedCharWidth!=null)return rt.cachedCharWidth;var ct=Nt("span","xxxxxxxxxx"),Et=Nt("pre",[ct],"CodeMirror-line-like");jt(rt.measure,Et);var Pt=ct.getBoundingClientRect(),Ot=(Pt.right-Pt.left)/10;return Ot>2&&(rt.cachedCharWidth=Ot),Ot||10}function cu(rt){for(var ct=rt.display,Et={},Pt={},Ot=ct.gutters.clientLeft,$t=ct.gutters.firstChild,ge=0;$t;$t=$t.nextSibling,++ge){var Te=rt.display.gutterSpecs[ge].className;Et[Te]=$t.offsetLeft+$t.clientLeft+Ot,Pt[Te]=$t.clientWidth}return{fixedPos:Jc(ct),gutterTotalWidth:ct.gutters.offsetWidth,gutterLeft:Et,gutterWidth:Pt,wrapperWidth:ct.wrapper.clientWidth}}function Jc(rt){return rt.scroller.getBoundingClientRect().left-rt.sizer.getBoundingClientRect().left}function wo(rt){var ct=Qa(rt.display),Et=rt.options.lineWrapping,Pt=Et&&Math.max(5,rt.display.scroller.clientWidth/gl(rt.display)-3);return function(Ot){if(kn(rt.doc,Ot))return 0;var $t=0;if(Ot.widgets)for(var ge=0;ge<Ot.widgets.length;ge++)Ot.widgets[ge].height&&($t+=Ot.widgets[ge].height);return Et?$t+(Math.ceil(Ot.text.length/Pt)||1)*ct:$t+ct}}function Qr(rt){var ct=rt.doc,Et=wo(rt);ct.iter(function(Pt){var Ot=Et(Pt);Ot!=Pt.height&&Mn(Pt,Ot)})}function $a(rt,ct,Et,Pt){var Ot=rt.display;if(!Et&&kr(ct).getAttribute("cm-not-content")=="true")return null;var $t,ge,Te=Ot.lineSpace.getBoundingClientRect();try{$t=ct.clientX-Te.left,ge=ct.clientY-Te.top}catch(ze){return null}var Ee=ja(rt,$t,ge),Be;if(Pt&&Ee.xRel>0&&(Be=mn(rt.doc,Ee.line).text).length==Ee.ch){var en=Yt(Be,Be.length,rt.options.tabSize)-Be.length;Ee=$e(Ee.line,Math.max(0,Math.round(($t-bs(rt.display).left)/gl(rt.display))-en))}return Ee}function Rs(rt,ct){if(ct>=rt.display.viewTo||(ct-=rt.display.viewFrom,ct<0))return null;for(var Et=rt.display.view,Pt=0;Pt<Et.length;Pt++)if(ct-=Et[Pt].size,ct<0)return Pt}function bo(rt,ct,Et,Pt){ct==null&&(ct=rt.doc.first),Et==null&&(Et=rt.doc.first+rt.doc.size),Pt||(Pt=0);var Ot=rt.display;if(Pt&&Et<Ot.viewTo&&(Ot.updateLineNumbers==null||Ot.updateLineNumbers>ct)&&(Ot.updateLineNumbers=ct),rt.curOp.viewChanged=!0,ct>=Ot.viewTo)yn&&ur(rt.doc,ct)<Ot.viewTo&&Wo(rt);else if(Et<=Ot.viewFrom)yn&&Mr(rt.doc,Et+Pt)>Ot.viewFrom?Wo(rt):(Ot.viewFrom+=Pt,Ot.viewTo+=Pt);else if(ct<=Ot.viewFrom&&Et>=Ot.viewTo)Wo(rt);else if(ct<=Ot.viewFrom){var $t=cs(rt,Et,Et+Pt,1);$t?(Ot.view=Ot.view.slice($t.index),Ot.viewFrom=$t.lineN,Ot.viewTo+=Pt):Wo(rt)}else if(Et>=Ot.viewTo){var ge=cs(rt,ct,ct,-1);ge?(Ot.view=Ot.view.slice(0,ge.index),Ot.viewTo=ge.lineN):Wo(rt)}else{var Te=cs(rt,ct,ct,-1),Ee=cs(rt,Et,Et+Pt,1);Te&&Ee?(Ot.view=Ot.view.slice(0,Te.index).concat(Ai(rt,Te.lineN,Ee.lineN)).concat(Ot.view.slice(Ee.index)),Ot.viewTo+=Pt):Wo(rt)}var Be=Ot.externalMeasured;Be&&(Et<Be.lineN?Be.lineN+=Pt:ct<Be.lineN+Be.size&&(Ot.externalMeasured=null))}function ki(rt,ct,Et){rt.curOp.viewChanged=!0;var Pt=rt.display,Ot=rt.display.externalMeasured;if(Ot&&ct>=Ot.lineN&&ct<Ot.lineN+Ot.size&&(Pt.externalMeasured=null),!(ct<Pt.viewFrom||ct>=Pt.viewTo)){var $t=Pt.view[Rs(rt,ct)];if($t.node!=null){var ge=$t.changes||($t.changes=[]);ve(ge,Et)==-1&&ge.push(Et)}}}function Wo(rt){rt.display.viewFrom=rt.display.viewTo=rt.doc.first,rt.display.view=[],rt.display.viewOffset=0}function cs(rt,ct,Et,Pt){var Ot=Rs(rt,ct),$t,ge=rt.display.view;if(!yn||Et==rt.doc.first+rt.doc.size)return{index:Ot,lineN:Et};for(var Te=rt.display.viewFrom,Ee=0;Ee<Ot;Ee++)Te+=ge[Ee].size;if(Te!=ct){if(Pt>0){if(Ot==ge.length-1)return null;$t=Te+ge[Ot].size-ct,Ot++}else $t=Te-ct;ct+=$t,Et+=$t}for(;ur(rt.doc,Et)!=Et;){if(Ot==(Pt<0?0:ge.length-1))return null;Et+=Pt*ge[Ot-(Pt<0?1:0)].size,Ot+=Pt}return{index:Ot,lineN:Et}}function ao(rt,ct,Et){var Pt=rt.display,Ot=Pt.view;Ot.length==0||ct>=Pt.viewTo||Et<=Pt.viewFrom?(Pt.view=Ai(rt,ct,Et),Pt.viewFrom=ct):(Pt.viewFrom>ct?Pt.view=Ai(rt,ct,Pt.viewFrom).concat(Pt.view):Pt.viewFrom<ct&&(Pt.view=Pt.view.slice(Rs(rt,ct))),Pt.viewFrom=ct,Pt.viewTo<Et?Pt.view=Pt.view.concat(Ai(rt,Pt.viewTo,Et)):Pt.viewTo>Et&&(Pt.view=Pt.view.slice(0,Rs(rt,Et)))),Pt.viewTo=Et}function Cs(rt){for(var ct=rt.display.view,Et=0,Pt=0;Pt<ct.length;Pt++){var Ot=ct[Pt];!Ot.hidden&&(!Ot.node||Ot.changes)&&++Et}return Et}function aa(rt){rt.display.input.showSelection(rt.display.input.prepareSelection())}function Bu(rt,ct){ct===void 0&&(ct=!0);for(var Et=rt.doc,Pt={},Ot=Pt.cursors=document.createDocumentFragment(),$t=Pt.selection=document.createDocumentFragment(),ge=0;ge<Et.sel.ranges.length;ge++)if(!(!ct&&ge==Et.sel.primIndex)){var Te=Et.sel.ranges[ge];if(!(Te.from().line>=rt.display.viewTo||Te.to().line<rt.display.viewFrom)){var Ee=Te.empty();(Ee||rt.options.showCursorWhenSelecting)&&Ii(rt,Te.head,Ot),Ee||Di(rt,Te,$t)}}return Pt}function Ii(rt,ct,Et){var Pt=mo(rt,ct,"div",null,null,!rt.options.singleCursorHeightPerLine),Ot=Et.appendChild(Nt("div","\xA0","CodeMirror-cursor"));if(Ot.style.left=Pt.left+"px",Ot.style.top=Pt.top+"px",Ot.style.height=Math.max(0,Pt.bottom-Pt.top)*rt.options.cursorHeight+"px",Pt.other){var $t=Et.appendChild(Nt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$t.style.display="",$t.style.left=Pt.other.left+"px",$t.style.top=Pt.other.top+"px",$t.style.height=(Pt.other.bottom-Pt.other.top)*.85+"px"}}function qa(rt,ct){return rt.top-ct.top||rt.left-ct.left}function Di(rt,ct,Et){var Pt=rt.display,Ot=rt.doc,$t=document.createDocumentFragment(),ge=bs(rt.display),Te=ge.left,Ee=Math.max(Pt.sizerWidth,Ps(rt)-Pt.sizer.offsetLeft)-ge.right,Be=Ot.direction=="ltr";function en(Nr,Hr,ci,Lr){Hr<0&&(Hr=0),Hr=Math.round(Hr),Lr=Math.round(Lr),$t.appendChild(Nt("div",null,"CodeMirror-selected","position: absolute; left: "+Nr+`px;
top: `+Hr+"px; width: "+(ci==null?Ee-Nr:ci)+`px;
height: `+(Lr-Hr)+"px"))}function ze(Nr,Hr,ci){var Lr=mn(Ot,Nr),Mi=Lr.text.length,Po,ua;function Fo(qo,Ts){return Du(rt,$e(Nr,qo),"div",Lr,Ts)}function ps(qo,Ts,Fa){var ta=Jo(rt,Lr,null,qo),Ki=Ts=="ltr"==(Fa=="after")?"left":"right",Ro=Fa=="after"?ta.begin:ta.end-(/\s/.test(Lr.text.charAt(ta.end-1))?2:1);return Fo(Ro,Ki)[Ki]}var Wa=Qe(Lr,Ot.direction);return Pe(Wa,Hr||0,ci==null?Mi:ci,function(qo,Ts,Fa,ta){var Ki=Fa=="ltr",Ro=Fo(qo,Ki?"left":"right"),Sa=Fo(Ts-1,Ki?"right":"left"),Da=Hr==null&&qo==0,vl=ci==null&&Ts==Mi,Do=ta==0,il=!Wa||ta==Wa.length-1;if(Sa.top-Ro.top<=3){var Go=(Be?Da:vl)&&Do,xf=(Be?vl:Da)&&il,Us=Go?Te:(Ki?Ro:Sa).left,Ls=xf?Ee:(Ki?Sa:Ro).right;en(Us,Ro.top,Ls-Us,Ro.bottom)}else{var gs,ho,xa,Yl;Ki?(gs=Be&&Da&&Do?Te:Ro.left,ho=Be?Ee:ps(qo,Fa,"before"),xa=Be?Te:ps(Ts,Fa,"after"),Yl=Be&&vl&&il?Ee:Sa.right):(gs=Be?ps(qo,Fa,"before"):Te,ho=!Be&&Da&&Do?Ee:Ro.right,xa=!Be&&vl&&il?Te:Sa.left,Yl=Be?ps(Ts,Fa,"after"):Ee),en(gs,Ro.top,ho-gs,Ro.bottom),Ro.bottom<Sa.top&&en(Te,Ro.bottom,null,Sa.top),en(xa,Sa.top,Yl-xa,Sa.bottom)}(!Po||qa(Ro,Po)<0)&&(Po=Ro),qa(Sa,Po)<0&&(Po=Sa),(!ua||qa(Ro,ua)<0)&&(ua=Ro),qa(Sa,ua)<0&&(ua=Sa)}),{start:Po,end:ua}}var gn=ct.from(),fn=ct.to();if(gn.line==fn.line)ze(gn.line,gn.ch,fn.ch);else{var Un=mn(Ot,gn.line),Jn=mn(Ot,fn.line),ar=gr(Un)==gr(Jn),Cr=ze(gn.line,gn.ch,ar?Un.text.length+1:null).end,Gr=ze(fn.line,ar?0:null,fn.ch).start;ar&&(Cr.top<Gr.top-2?(en(Cr.right,Cr.top,null,Cr.bottom),en(Te,Gr.top,Gr.left,Gr.bottom)):en(Cr.right,Cr.top,Gr.left-Cr.right,Cr.bottom)),Cr.bottom<Gr.top&&en(Te,Cr.bottom,null,Gr.top)}Et.appendChild($t)}function $i(rt){if(rt.state.focused){var ct=rt.display;clearInterval(ct.blinker);var Et=!0;ct.cursorDiv.style.visibility="",rt.options.cursorBlinkRate>0?ct.blinker=setInterval(function(){rt.hasFocus()||wh(rt),ct.cursorDiv.style.visibility=(Et=!Et)?"":"hidden"},rt.options.cursorBlinkRate):rt.options.cursorBlinkRate<0&&(ct.cursorDiv.style.visibility="hidden")}}function vo(rt){rt.state.focused||(rt.display.input.focus(),Ri(rt))}function Mo(rt){rt.state.delayingBlurEvent=!0,setTimeout(function(){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1,wh(rt))},100)}function Ri(rt,ct){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1),rt.options.readOnly!="nocursor"&&(rt.state.focused||(We(rt,"focus",rt,ct),rt.state.focused=!0,Vt(rt.display.wrapper,"CodeMirror-focused"),!rt.curOp&&rt.display.selForContextMenu!=rt.doc.sel&&(rt.display.input.reset(),gt&&setTimeout(function(){return rt.display.input.reset(!0)},20)),rt.display.input.receivedFocus()),$i(rt))}function wh(rt,ct){rt.state.delayingBlurEvent||(rt.state.focused&&(We(rt,"blur",rt,ct),rt.state.focused=!1,Dt(rt.display.wrapper,"CodeMirror-focused")),clearInterval(rt.display.blinker),setTimeout(function(){rt.state.focused||(rt.display.shift=!1)},150))}function Zr(rt){for(var ct=rt.display,Et=ct.lineDiv.offsetTop,Pt=0;Pt<ct.view.length;Pt++){var Ot=ct.view[Pt],$t=rt.options.lineWrapping,ge=void 0,Te=0;if(!Ot.hidden){if(Bt&&vt<8){var Ee=Ot.node.offsetTop+Ot.node.offsetHeight;ge=Ee-Et,Et=Ee}else{var Be=Ot.node.getBoundingClientRect();ge=Be.bottom-Be.top,!$t&&Ot.text.firstChild&&(Te=Ot.text.firstChild.getBoundingClientRect().right-Be.left-1)}var en=Ot.line.height-ge;if((en>.005||en<-.005)&&(Mn(Ot.line,ge),Dg(Ot.line),Ot.rest))for(var ze=0;ze<Ot.rest.length;ze++)Dg(Ot.rest[ze]);if(Te>rt.display.sizerWidth){var gn=Math.ceil(Te/gl(rt.display));gn>rt.display.maxLineLength&&(rt.display.maxLineLength=gn,rt.display.maxLine=Ot.line,rt.display.maxLineChanged=!0)}}}}function Dg(rt){if(rt.widgets)for(var ct=0;ct<rt.widgets.length;++ct){var Et=rt.widgets[ct],Pt=Et.node.parentNode;Pt&&(Et.height=Pt.offsetHeight)}}function Fi(rt,ct,Et){var Pt=Et&&Et.top!=null?Math.max(0,Et.top):rt.scroller.scrollTop;Pt=Math.floor(Pt-oo(rt));var Ot=Et&&Et.bottom!=null?Et.bottom:Pt+rt.wrapper.clientHeight,$t=Ve(ct,Pt),ge=Ve(ct,Ot);if(Et&&Et.ensure){var Te=Et.ensure.from.line,Ee=Et.ensure.to.line;Te<$t?($t=Te,ge=Ve(ct,Ci(mn(ct,Te))+rt.wrapper.clientHeight)):Math.min(Ee,ct.lastLine())>=ge&&($t=Ve(ct,Ci(mn(ct,Ee))-rt.wrapper.clientHeight),ge=Ee)}return{from:$t,to:Math.max(ge,$t+1)}}function Bg(rt,ct){if(!He(rt,"scrollCursorIntoView")){var Et=rt.display,Pt=Et.sizer.getBoundingClientRect(),Ot=null;if(ct.top+Pt.top<0?Ot=!0:ct.bottom+Pt.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ot=!1),Ot!=null&&!xt){var $t=Nt("div","\u200B",null,`position: absolute;
top: `+(ct.top-Et.viewOffset-oo(rt.display))+`px;
height: `+(ct.bottom-ct.top+Aa(rt)+Et.barHeight)+`px;
left: `+ct.left+"px; width: "+Math.max(2,ct.right-ct.left)+"px;");rt.display.lineSpace.appendChild($t),$t.scrollIntoView(Ot),rt.display.lineSpace.removeChild($t)}}}function fc(rt,ct,Et,Pt){Pt==null&&(Pt=0);var Ot;!rt.options.lineWrapping&&ct==Et&&(ct=ct.ch?$e(ct.line,ct.sticky=="before"?ct.ch-1:ct.ch,"after"):ct,Et=ct.sticky=="before"?$e(ct.line,ct.ch+1,"before"):ct);for(var $t=0;$t<5;$t++){var ge=!1,Te=mo(rt,ct),Ee=!Et||Et==ct?Te:mo(rt,Et);Ot={left:Math.min(Te.left,Ee.left),top:Math.min(Te.top,Ee.top)-Pt,right:Math.max(Te.left,Ee.left),bottom:Math.max(Te.bottom,Ee.bottom)+Pt};var Be=ep(rt,Ot),en=rt.doc.scrollTop,ze=rt.doc.scrollLeft;if(Be.scrollTop!=null&&(Ph(rt,Be.scrollTop),Math.abs(rt.doc.scrollTop-en)>1&&(ge=!0)),Be.scrollLeft!=null&&(du(rt,Be.scrollLeft),Math.abs(rt.doc.scrollLeft-ze)>1&&(ge=!0)),!ge)break}return Ot}function Qc(rt,ct){var Et=ep(rt,ct);Et.scrollTop!=null&&Ph(rt,Et.scrollTop),Et.scrollLeft!=null&&du(rt,Et.scrollLeft)}function ep(rt,ct){var Et=rt.display,Pt=Qa(rt.display);ct.top<0&&(ct.top=0);var Ot=rt.curOp&&rt.curOp.scrollTop!=null?rt.curOp.scrollTop:Et.scroller.scrollTop,$t=Tl(rt),ge={};ct.bottom-ct.top>$t&&(ct.bottom=ct.top+$t);var Te=rt.doc.height+Ja(Et),Ee=ct.top<Pt,Be=ct.bottom>Te-Pt;if(ct.top<Ot)ge.scrollTop=Ee?0:ct.top;else if(ct.bottom>Ot+$t){var en=Math.min(ct.top,(Be?Te:ct.bottom)-$t);en!=Ot&&(ge.scrollTop=en)}var ze=rt.options.fixedGutter?0:Et.gutters.offsetWidth,gn=rt.curOp&&rt.curOp.scrollLeft!=null?rt.curOp.scrollLeft:Et.scroller.scrollLeft-ze,fn=Ps(rt)-Et.gutters.offsetWidth,Un=ct.right-ct.left>fn;return Un&&(ct.right=ct.left+fn),ct.left<10?ge.scrollLeft=0:ct.left<gn?ge.scrollLeft=Math.max(0,ct.left+ze-(Un?0:10)):ct.right>fn+gn-3&&(ge.scrollLeft=ct.right+(Un?0:10)-fn),ge}function Hf(rt,ct){ct!=null&&(Hl(rt),rt.curOp.scrollTop=(rt.curOp.scrollTop==null?rt.doc.scrollTop:rt.curOp.scrollTop)+ct)}function fu(rt){Hl(rt);var ct=rt.getCursor();rt.curOp.scrollToPos={from:ct,to:ct,margin:rt.options.cursorScrollMargin}}function bh(rt,ct,Et){(ct!=null||Et!=null)&&Hl(rt),ct!=null&&(rt.curOp.scrollLeft=ct),Et!=null&&(rt.curOp.scrollTop=Et)}function _i(rt,ct){Hl(rt),rt.curOp.scrollToPos=ct}function Hl(rt){var ct=rt.curOp.scrollToPos;if(ct){rt.curOp.scrollToPos=null;var Et=Ui(rt,ct.from),Pt=Ui(rt,ct.to);Vf(rt,Et,Pt,ct.margin)}}function Vf(rt,ct,Et,Pt){var Ot=ep(rt,{left:Math.min(ct.left,Et.left),top:Math.min(ct.top,Et.top)-Pt,right:Math.max(ct.right,Et.right),bottom:Math.max(ct.bottom,Et.bottom)+Pt});bh(rt,Ot.scrollLeft,Ot.scrollTop)}function Ph(rt,ct){Math.abs(rt.doc.scrollTop-ct)<2||(ae||Uu(rt,{top:ct}),np(rt,ct,!0),ae&&Uu(rt),dc(rt,100))}function np(rt,ct,Et){ct=Math.max(0,Math.min(rt.display.scroller.scrollHeight-rt.display.scroller.clientHeight,ct)),!(rt.display.scroller.scrollTop==ct&&!Et)&&(rt.doc.scrollTop=ct,rt.display.scrollbars.setScrollTop(ct),rt.display.scroller.scrollTop!=ct&&(rt.display.scroller.scrollTop=ct))}function du(rt,ct,Et,Pt){ct=Math.max(0,Math.min(ct,rt.display.scroller.scrollWidth-rt.display.scroller.clientWidth)),!((Et?ct==rt.doc.scrollLeft:Math.abs(rt.doc.scrollLeft-ct)<2)&&!Pt)&&(rt.doc.scrollLeft=ct,Xf(rt),rt.display.scroller.scrollLeft!=ct&&(rt.display.scroller.scrollLeft=ct),rt.display.scrollbars.setScrollLeft(ct))}function tl(rt){var ct=rt.display,Et=ct.gutters.offsetWidth,Pt=Math.round(rt.doc.height+Ja(rt.display));return{clientHeight:ct.scroller.clientHeight,viewHeight:ct.wrapper.clientHeight,scrollWidth:ct.scroller.scrollWidth,clientWidth:ct.scroller.clientWidth,viewWidth:ct.wrapper.clientWidth,barLeft:rt.options.fixedGutter?Et:0,docHeight:Pt,scrollHeight:Pt+Aa(rt)+ct.barHeight,nativeBarWidth:ct.nativeBarWidth,gutterWidth:Et}}var Iu=function(rt,ct,Et){this.cm=Et;var Pt=this.vert=Nt("div",[Nt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ot=this.horiz=Nt("div",[Nt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Pt.tabIndex=Ot.tabIndex=-1,rt(Pt),rt(Ot),nn(Pt,"scroll",function(){Pt.clientHeight&&ct(Pt.scrollTop,"vertical")}),nn(Ot,"scroll",function(){Ot.clientWidth&&ct(Ot.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Bt&&vt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Iu.prototype.update=function(rt){var ct=rt.scrollWidth>rt.clientWidth+1,Et=rt.scrollHeight>rt.clientHeight+1,Pt=rt.nativeBarWidth;if(Et){this.vert.style.display="block",this.vert.style.bottom=ct?Pt+"px":"0";var Ot=rt.viewHeight-(ct?Pt:0);this.vert.firstChild.style.height=Math.max(0,rt.scrollHeight-rt.clientHeight+Ot)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ct){this.horiz.style.display="block",this.horiz.style.right=Et?Pt+"px":"0",this.horiz.style.left=rt.barLeft+"px";var $t=rt.viewWidth-rt.barLeft-(Et?Pt:0);this.horiz.firstChild.style.width=Math.max(0,rt.scrollWidth-rt.clientWidth+$t)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&rt.clientHeight>0&&(Pt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Et?Pt:0,bottom:ct?Pt:0}},Iu.prototype.setScrollLeft=function(rt){this.horiz.scrollLeft!=rt&&(this.horiz.scrollLeft=rt),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Iu.prototype.setScrollTop=function(rt){this.vert.scrollTop!=rt&&(this.vert.scrollTop=rt),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Iu.prototype.zeroWidthHack=function(){var rt=at&&!mt?"12px":"18px";this.horiz.style.height=this.vert.style.width=rt,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},Iu.prototype.enableZeroWidthBar=function(rt,ct,Et){rt.style.pointerEvents="auto";function Pt(){var Ot=rt.getBoundingClientRect(),$t=Et=="vert"?document.elementFromPoint(Ot.right-1,(Ot.top+Ot.bottom)/2):document.elementFromPoint((Ot.right+Ot.left)/2,Ot.bottom-1);$t!=rt?rt.style.pointerEvents="none":ct.set(1e3,Pt)}ct.set(1e3,Pt)},Iu.prototype.clear=function(){var rt=this.horiz.parentNode;rt.removeChild(this.horiz),rt.removeChild(this.vert)};var Ll=function(){};Ll.prototype.update=function(){return{bottom:0,right:0}},Ll.prototype.setScrollLeft=function(){},Ll.prototype.setScrollTop=function(){},Ll.prototype.clear=function(){};function Ru(rt,ct){ct||(ct=tl(rt));var Et=rt.display.barWidth,Pt=rt.display.barHeight;Kf(rt,ct);for(var Ot=0;Ot<4&&Et!=rt.display.barWidth||Pt!=rt.display.barHeight;Ot++)Et!=rt.display.barWidth&&rt.options.lineWrapping&&Zr(rt),Kf(rt,tl(rt)),Et=rt.display.barWidth,Pt=rt.display.barHeight}function Kf(rt,ct){var Et=rt.display,Pt=Et.scrollbars.update(ct);Et.sizer.style.paddingRight=(Et.barWidth=Pt.right)+"px",Et.sizer.style.paddingBottom=(Et.barHeight=Pt.bottom)+"px",Et.heightForcer.style.borderBottom=Pt.bottom+"px solid transparent",Pt.right&&Pt.bottom?(Et.scrollbarFiller.style.display="block",Et.scrollbarFiller.style.height=Pt.bottom+"px",Et.scrollbarFiller.style.width=Pt.right+"px"):Et.scrollbarFiller.style.display="",Pt.bottom&&rt.options.coverGutterNextToScrollbar&&rt.options.fixedGutter?(Et.gutterFiller.style.display="block",Et.gutterFiller.style.height=Pt.bottom+"px",Et.gutterFiller.style.width=ct.gutterWidth+"px"):Et.gutterFiller.style.display=""}var rp={native:Iu,null:Ll};function ip(rt){rt.display.scrollbars&&(rt.display.scrollbars.clear(),rt.display.scrollbars.addClass&&Dt(rt.display.wrapper,rt.display.scrollbars.addClass)),rt.display.scrollbars=new rp[rt.options.scrollbarStyle](function(ct){rt.display.wrapper.insertBefore(ct,rt.display.scrollbarFiller),nn(ct,"mousedown",function(){rt.state.focused&&setTimeout(function(){return rt.display.input.focus()},0)}),ct.setAttribute("cm-not-content","true")},function(ct,Et){Et=="horizontal"?du(rt,ct):Ph(rt,ct)},rt),rt.display.scrollbars.addClass&&Vt(rt.display.wrapper,rt.display.scrollbars.addClass)}var Ig=0;function _u(rt){rt.curOp={cm:rt,viewChanged:!1,startHeight:rt.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:++Ig},Ga(rt.curOp)}function zu(rt){var ct=rt.curOp;ct&&uu(ct,function(Et){for(var Pt=0;Pt<Et.ops.length;Pt++)Et.ops[Pt].cm.curOp=null;Qv(Et)})}function Qv(rt){for(var ct=rt.ops,Et=0;Et<ct.length;Et++)$v(ct[Et]);for(var Pt=0;Pt<ct.length;Pt++)qv(ct[Pt]);for(var Ot=0;Ot<ct.length;Ot++)Rg(ct[Ot]);for(var $t=0;$t<ct.length;$t++)Io(ct[$t]);for(var ge=0;ge<ct.length;ge++)Gu(ct[ge])}function $v(rt){var ct=rt.cm,Et=ct.display;_g(ct),rt.updateMaxLine&&bi(ct),rt.mustUpdate=rt.viewChanged||rt.forceUpdate||rt.scrollTop!=null||rt.scrollToPos&&(rt.scrollToPos.from.line<Et.viewFrom||rt.scrollToPos.to.line>=Et.viewTo)||Et.maxLineChanged&&ct.options.lineWrapping,rt.update=rt.mustUpdate&&new Ch(ct,rt.mustUpdate&&{top:rt.scrollTop,ensure:rt.scrollToPos},rt.forceUpdate)}function qv(rt){rt.updatedDisplay=rt.mustUpdate&&Zf(rt.cm,rt.update)}function Rg(rt){var ct=rt.cm,Et=ct.display;rt.updatedDisplay&&Zr(ct),rt.barMeasure=tl(ct),Et.maxLineChanged&&!ct.options.lineWrapping&&(rt.adjustWidthTo=sc(ct,Et.maxLine,Et.maxLine.text.length).left+3,ct.display.sizerWidth=rt.adjustWidthTo,rt.barMeasure.scrollWidth=Math.max(Et.scroller.clientWidth,Et.sizer.offsetLeft+rt.adjustWidthTo+Aa(ct)+ct.display.barWidth),rt.maxScrollLeft=Math.max(0,Et.sizer.offsetLeft+rt.adjustWidthTo-Ps(ct))),(rt.updatedDisplay||rt.selectionChanged)&&(rt.preparedSelection=Et.input.prepareSelection())}function Io(rt){var ct=rt.cm;rt.adjustWidthTo!=null&&(ct.display.sizer.style.minWidth=rt.adjustWidthTo+"px",rt.maxScrollLeft<ct.doc.scrollLeft&&du(ct,Math.min(ct.display.scroller.scrollLeft,rt.maxScrollLeft),!0),ct.display.maxLineChanged=!1);var Et=rt.focus&&rt.focus==Ut();rt.preparedSelection&&ct.display.input.showSelection(rt.preparedSelection,Et),(rt.updatedDisplay||rt.startHeight!=ct.doc.height)&&Ru(ct,rt.barMeasure),rt.updatedDisplay&&Hu(ct,rt.barMeasure),rt.selectionChanged&&$i(ct),ct.state.focused&&rt.updateInput&&ct.display.input.reset(rt.typing),Et&&vo(rt.cm)}function Gu(rt){var ct=rt.cm,Et=ct.display,Pt=ct.doc;if(rt.updatedDisplay&&qi(ct,rt.update),Et.wheelStartX!=null&&(rt.scrollTop!=null||rt.scrollLeft!=null||rt.scrollToPos)&&(Et.wheelStartX=Et.wheelStartY=null),rt.scrollTop!=null&&np(ct,rt.scrollTop,rt.forceScroll),rt.scrollLeft!=null&&du(ct,rt.scrollLeft,!0,!0),rt.scrollToPos){var Ot=fc(ct,Dn(Pt,rt.scrollToPos.from),Dn(Pt,rt.scrollToPos.to),rt.scrollToPos.margin);Bg(ct,Ot)}var $t=rt.maybeHiddenMarkers,ge=rt.maybeUnhiddenMarkers;if($t)for(var Te=0;Te<$t.length;++Te)$t[Te].lines.length||We($t[Te],"hide");if(ge)for(var Ee=0;Ee<ge.length;++Ee)ge[Ee].lines.length&&We(ge[Ee],"unhide");Et.wrapper.offsetHeight&&(Pt.scrollTop=ct.display.scroller.scrollTop),rt.changeObjs&&We(ct,"changes",ct,rt.changeObjs),rt.update&&rt.update.finish()}function Xi(rt,ct){if(rt.curOp)return ct();_u(rt);try{return ct()}finally{zu(rt)}}function sa(rt,ct){return function(){if(rt.curOp)return ct.apply(rt,arguments);_u(rt);try{return ct.apply(rt,arguments)}finally{zu(rt)}}}function pa(rt){return function(){if(this.curOp)return rt.apply(this,arguments);_u(this);try{return rt.apply(this,arguments)}finally{zu(this)}}}function ga(rt){return function(){var ct=this.cm;if(!ct||ct.curOp)return rt.apply(this,arguments);_u(ct);try{return rt.apply(this,arguments)}finally{zu(ct)}}}function dc(rt,ct){rt.doc.highlightFrontier<rt.display.viewTo&&rt.state.highlight.set(ct,he(ma,rt))}function ma(rt){var ct=rt.doc;if(!(ct.highlightFrontier>=rt.display.viewTo)){var Et=+new Date+rt.options.workTime,Pt=xi(rt,ct.highlightFrontier),Ot=[];ct.iter(Pt.line,Math.min(ct.first+ct.size,rt.display.viewTo+500),function($t){if(Pt.line>=rt.display.viewFrom){var ge=$t.styles,Te=$t.text.length>rt.options.maxHighlightLength?nr(ct.mode,Pt.state):null,Ee=Yr(rt,$t,Pt,!0);Te&&(Pt.state=Te),$t.styles=Ee.styles;var Be=$t.styleClasses,en=Ee.classes;en?$t.styleClasses=en:Be&&($t.styleClasses=null);for(var ze=!ge||ge.length!=$t.styles.length||Be!=en&&(!Be||!en||Be.bgClass!=en.bgClass||Be.textClass!=en.textClass),gn=0;!ze&&gn<ge.length;++gn)ze=ge[gn]!=$t.styles[gn];ze&&Ot.push(Pt.line),$t.stateAfter=Pt.save(),Pt.nextLine()}else $t.text.length<=rt.options.maxHighlightLength&&Je(rt,$t.text,Pt),$t.stateAfter=Pt.line%5==0?Pt.save():null,Pt.nextLine();if(+new Date>Et)return dc(rt,rt.options.workDelay),!0}),ct.highlightFrontier=Pt.line,ct.modeFrontier=Math.max(ct.modeFrontier,Pt.line),Ot.length&&Xi(rt,function(){for(var $t=0;$t<Ot.length;$t++)ki(rt,Ot[$t],"text")})}}var Ch=function(rt,ct,Et){var Pt=rt.display;this.viewport=ct,this.visible=Fi(Pt,rt.doc,ct),this.editorIsHidden=!Pt.wrapper.offsetWidth,this.wrapperHeight=Pt.wrapper.clientHeight,this.wrapperWidth=Pt.wrapper.clientWidth,this.oldDisplayWidth=Ps(rt),this.force=Et,this.dims=cu(rt),this.events=[]};Ch.prototype.signal=function(rt,ct){ln(rt,ct)&&this.events.push(arguments)},Ch.prototype.finish=function(){for(var rt=0;rt<this.events.length;rt++)We.apply(null,this.events[rt])};function _g(rt){var ct=rt.display;!ct.scrollbarsClipped&&ct.scroller.offsetWidth&&(ct.nativeBarWidth=ct.scroller.offsetWidth-ct.scroller.clientWidth,ct.heightForcer.style.height=Aa(rt)+"px",ct.sizer.style.marginBottom=-ct.nativeBarWidth+"px",ct.sizer.style.borderRightWidth=Aa(rt)+"px",ct.scrollbarsClipped=!0)}function zg(rt){if(rt.hasFocus())return null;var ct=Ut();if(!ct||!Jt(rt.display.lineDiv,ct))return null;var Et={activeElt:ct};if(window.getSelection){var Pt=window.getSelection();Pt.anchorNode&&Pt.extend&&Jt(rt.display.lineDiv,Pt.anchorNode)&&(Et.anchorNode=Pt.anchorNode,Et.anchorOffset=Pt.anchorOffset,Et.focusNode=Pt.focusNode,Et.focusOffset=Pt.focusOffset)}return Et}function fs(rt){if(!(!rt||!rt.activeElt||rt.activeElt==Ut())&&(rt.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(rt.activeElt.nodeName)&&rt.anchorNode&&Jt(document.body,rt.anchorNode)&&Jt(document.body,rt.focusNode))){var ct=window.getSelection(),Et=document.createRange();Et.setEnd(rt.anchorNode,rt.anchorOffset),Et.collapse(!1),ct.removeAllRanges(),ct.addRange(Et),ct.extend(rt.focusNode,rt.focusOffset)}}function Zf(rt,ct){var Et=rt.display,Pt=rt.doc;if(ct.editorIsHidden)return Wo(rt),!1;if(!ct.force&&ct.visible.from>=Et.viewFrom&&ct.visible.to<=Et.viewTo&&(Et.updateLineNumbers==null||Et.updateLineNumbers>=Et.viewTo)&&Et.renderedView==Et.view&&Cs(rt)==0)return!1;Qo(rt)&&(Wo(rt),ct.dims=cu(rt));var Ot=Pt.first+Pt.size,$t=Math.max(ct.visible.from-rt.options.viewportMargin,Pt.first),ge=Math.min(Ot,ct.visible.to+rt.options.viewportMargin);Et.viewFrom<$t&&$t-Et.viewFrom<20&&($t=Math.max(Pt.first,Et.viewFrom)),Et.viewTo>ge&&Et.viewTo-ge<20&&(ge=Math.min(Ot,Et.viewTo)),yn&&($t=ur(rt.doc,$t),ge=Mr(rt.doc,ge));var Te=$t!=Et.viewFrom||ge!=Et.viewTo||Et.lastWrapHeight!=ct.wrapperHeight||Et.lastWrapWidth!=ct.wrapperWidth;ao(rt,$t,ge),Et.viewOffset=Ci(mn(rt.doc,Et.viewFrom)),rt.display.mover.style.top=Et.viewOffset+"px";var Ee=Cs(rt);if(!Te&&Ee==0&&!ct.force&&Et.renderedView==Et.view&&(Et.updateLineNumbers==null||Et.updateLineNumbers>=Et.viewTo))return!1;var Be=zg(rt);return Ee>4&&(Et.lineDiv.style.display="none"),op(rt,Et.updateLineNumbers,ct.dims),Ee>4&&(Et.lineDiv.style.display=""),Et.renderedView=Et.view,fs(Be),Ft(Et.cursorDiv),Ft(Et.selectionDiv),Et.gutters.style.height=Et.sizer.style.minHeight=0,Te&&(Et.lastWrapHeight=ct.wrapperHeight,Et.lastWrapWidth=ct.wrapperWidth,dc(rt,400)),Et.updateLineNumbers=null,!0}function qi(rt,ct){for(var Et=ct.viewport,Pt=!0;;Pt=!1){if(!Pt||!rt.options.lineWrapping||ct.oldDisplayWidth==Ps(rt)){if(Et&&Et.top!=null&&(Et={top:Math.min(rt.doc.height+Ja(rt.display)-Tl(rt),Et.top)}),ct.visible=Fi(rt.display,rt.doc,Et),ct.visible.from>=rt.display.viewFrom&&ct.visible.to<=rt.display.viewTo)break}else Pt&&(ct.visible=Fi(rt.display,rt.doc,Et));if(!Zf(rt,ct))break;Zr(rt);var Ot=tl(rt);aa(rt),Ru(rt,Ot),Hu(rt,Ot),ct.force=!1}ct.signal(rt,"update",rt),(rt.display.viewFrom!=rt.display.reportedViewFrom||rt.display.viewTo!=rt.display.reportedViewTo)&&(ct.signal(rt,"viewportChange",rt,rt.display.viewFrom,rt.display.viewTo),rt.display.reportedViewFrom=rt.display.viewFrom,rt.display.reportedViewTo=rt.display.viewTo)}function Uu(rt,ct){var Et=new Ch(rt,ct);if(Zf(rt,Et)){Zr(rt),qi(rt,Et);var Pt=tl(rt);aa(rt),Ru(rt,Pt),Hu(rt,Pt),Et.finish()}}function op(rt,ct,Et){var Pt=rt.display,Ot=rt.options.lineNumbers,$t=Pt.lineDiv,ge=$t.firstChild;function Te(Un){var Jn=Un.nextSibling;return gt&&at&&rt.display.currentWheelTarget==Un?Un.style.display="none":Un.parentNode.removeChild(Un),Jn}for(var Ee=Pt.view,Be=Pt.viewFrom,en=0;en<Ee.length;en++){var ze=Ee[en];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=$t){var gn=pi(rt,ze,Be,Et);$t.insertBefore(gn,ge)}else{for(;ge!=ze.node;)ge=Te(ge);var fn=Ot&&ct!=null&&ct<=Be&&ze.lineNumber;ze.changes&&(ve(ze.changes,"gutter")>-1&&(fn=!1),hu(rt,ze,Be,Et)),fn&&(Ft(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(En(rt.options,Be)))),ge=ze.node.nextSibling}Be+=ze.size}for(;ge;)ge=Te(ge)}function Wu(rt){var ct=rt.gutters.offsetWidth;rt.sizer.style.marginLeft=ct+"px"}function Hu(rt,ct){rt.display.sizer.style.minHeight=ct.docHeight+"px",rt.display.heightForcer.style.top=ct.docHeight+"px",rt.display.gutters.style.height=ct.docHeight+rt.display.barHeight+Aa(rt)+"px"}function Xf(rt){var ct=rt.display,Et=ct.view;if(!(!ct.alignWidgets&&(!ct.gutters.firstChild||!rt.options.fixedGutter))){for(var Pt=Jc(ct)-ct.scroller.scrollLeft+rt.doc.scrollLeft,Ot=ct.gutters.offsetWidth,$t=Pt+"px",ge=0;ge<Et.length;ge++)if(!Et[ge].hidden){rt.options.fixedGutter&&(Et[ge].gutter&&(Et[ge].gutter.style.left=$t),Et[ge].gutterBackground&&(Et[ge].gutterBackground.style.left=$t));var Te=Et[ge].alignable;if(Te)for(var Ee=0;Ee<Te.length;Ee++)Te[Ee].style.left=$t}rt.options.fixedGutter&&(ct.gutters.style.left=Pt+Ot+"px")}}function Qo(rt){if(!rt.options.lineNumbers)return!1;var ct=rt.doc,Et=En(rt.options,ct.first+ct.size-1),Pt=rt.display;if(Et.length!=Pt.lineNumChars){var Ot=Pt.measure.appendChild(Nt("div",[Nt("div",Et)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$t=Ot.firstChild.offsetWidth,ge=Ot.offsetWidth-$t;return Pt.lineGutter.style.width="",Pt.lineNumInnerWidth=Math.max($t,Pt.lineGutter.offsetWidth-ge)+1,Pt.lineNumWidth=Pt.lineNumInnerWidth+ge,Pt.lineNumChars=Pt.lineNumInnerWidth?Et.length:-1,Pt.lineGutter.style.width=Pt.lineNumWidth+"px",Wu(rt.display),!0}return!1}function va(rt,ct){for(var Et=[],Pt=!1,Ot=0;Ot<rt.length;Ot++){var $t=rt[Ot],ge=null;if(typeof $t!="string"&&(ge=$t.style,$t=$t.className),$t=="CodeMirror-linenumbers")if(ct)Pt=!0;else continue;Et.push({className:$t,style:ge})}return ct&&!Pt&&Et.push({className:"CodeMirror-linenumbers",style:null}),Et}function kh(rt){var ct=rt.gutters,Et=rt.gutterSpecs;Ft(ct),rt.lineGutter=null;for(var Pt=0;Pt<Et.length;++Pt){var Ot=Et[Pt],$t=Ot.className,ge=Ot.style,Te=ct.appendChild(Nt("div",null,"CodeMirror-gutter "+$t));ge&&(Te.style.cssText=ge),$t=="CodeMirror-linenumbers"&&(rt.lineGutter=Te,Te.style.width=(rt.lineNumWidth||1)+"px")}ct.style.display=Et.length?"":"none",Wu(rt)}function _s(rt){kh(rt.display),bo(rt),Xf(rt)}function Vu(rt,ct,Et,Pt){var Ot=this;this.input=Et,Ot.scrollbarFiller=Nt("div",null,"CodeMirror-scrollbar-filler"),Ot.scrollbarFiller.setAttribute("cm-not-content","true"),Ot.gutterFiller=Nt("div",null,"CodeMirror-gutter-filler"),Ot.gutterFiller.setAttribute("cm-not-content","true"),Ot.lineDiv=_t("div",null,"CodeMirror-code"),Ot.selectionDiv=Nt("div",null,null,"position: relative; z-index: 1"),Ot.cursorDiv=Nt("div",null,"CodeMirror-cursors"),Ot.measure=Nt("div",null,"CodeMirror-measure"),Ot.lineMeasure=Nt("div",null,"CodeMirror-measure"),Ot.lineSpace=_t("div",[Ot.measure,Ot.lineMeasure,Ot.selectionDiv,Ot.cursorDiv,Ot.lineDiv],null,"position: relative; outline: none");var $t=_t("div",[Ot.lineSpace],"CodeMirror-lines");Ot.mover=Nt("div",[$t],null,"position: relative"),Ot.sizer=Nt("div",[Ot.mover],"CodeMirror-sizer"),Ot.sizerWidth=null,Ot.heightForcer=Nt("div",null,null,"position: absolute; height: "+Se+"px; width: 1px;"),Ot.gutters=Nt("div",null,"CodeMirror-gutters"),Ot.lineGutter=null,Ot.scroller=Nt("div",[Ot.sizer,Ot.heightForcer,Ot.gutters],"CodeMirror-scroll"),Ot.scroller.setAttribute("tabIndex","-1"),Ot.wrapper=Nt("div",[Ot.scrollbarFiller,Ot.gutterFiller,Ot.scroller],"CodeMirror"),Bt&&vt<8&&(Ot.gutters.style.zIndex=-1,Ot.scroller.style.paddingRight=0),!gt&&!(ae&&tt)&&(Ot.scroller.draggable=!0),rt&&(rt.appendChild?rt.appendChild(Ot.wrapper):rt(Ot.wrapper)),Ot.viewFrom=Ot.viewTo=ct.first,Ot.reportedViewFrom=Ot.reportedViewTo=ct.first,Ot.view=[],Ot.renderedView=null,Ot.externalMeasured=null,Ot.viewOffset=0,Ot.lastWrapHeight=Ot.lastWrapWidth=0,Ot.updateLineNumbers=null,Ot.nativeBarWidth=Ot.barHeight=Ot.barWidth=0,Ot.scrollbarsClipped=!1,Ot.lineNumWidth=Ot.lineNumInnerWidth=Ot.lineNumChars=null,Ot.alignWidgets=!1,Ot.cachedCharWidth=Ot.cachedTextHeight=Ot.cachedPaddingH=null,Ot.maxLine=null,Ot.maxLineLength=0,Ot.maxLineChanged=!1,Ot.wheelDX=Ot.wheelDY=Ot.wheelStartX=Ot.wheelStartY=null,Ot.shift=!1,Ot.selForContextMenu=null,Ot.activeTouch=null,Ot.gutterSpecs=va(Pt.gutters,Pt.lineNumbers),kh(Ot),Et.init(Ot)}var ks=0,Ho=null;Bt?Ho=-.53:ae?Ho=15:Ct?Ho=-.7:Tt&&(Ho=-1/3);function Al(rt){var ct=rt.wheelDeltaX,Et=rt.wheelDeltaY;return ct==null&&rt.detail&&rt.axis==rt.HORIZONTAL_AXIS&&(ct=rt.detail),Et==null&&rt.detail&&rt.axis==rt.VERTICAL_AXIS?Et=rt.detail:Et==null&&(Et=rt.wheelDelta),{x:ct,y:Et}}function zs(rt){var ct=Al(rt);return ct.x*=Ho,ct.y*=Ho,ct}function ya(rt,ct){var Et=Al(ct),Pt=Et.x,Ot=Et.y,$t=rt.display,ge=$t.scroller,Te=ge.scrollWidth>ge.clientWidth,Ee=ge.scrollHeight>ge.clientHeight;if(Pt&&Te||Ot&&Ee){if(Ot&&at&&gt){t:for(var Be=ct.target,en=$t.view;Be!=ge;Be=Be.parentNode)for(var ze=0;ze<en.length;ze++)if(en[ze].node==Be){rt.display.currentWheelTarget=Be;break t}}if(Pt&&!ae&&!yt&&Ho!=null){Ot&&Ee&&Ph(rt,Math.max(0,ge.scrollTop+Ot*Ho)),du(rt,Math.max(0,ge.scrollLeft+Pt*Ho)),(!Ot||Ot&&Ee)&&bn(ct),$t.wheelStartX=null;return}if(Ot&&Ho!=null){var gn=Ot*Ho,fn=rt.doc.scrollTop,Un=fn+$t.wrapper.clientHeight;gn<0?fn=Math.max(0,fn+gn-50):Un=Math.min(rt.doc.height,Un+gn+50),Uu(rt,{top:fn,bottom:Un})}ks<20&&($t.wheelStartX==null?($t.wheelStartX=ge.scrollLeft,$t.wheelStartY=ge.scrollTop,$t.wheelDX=Pt,$t.wheelDY=Ot,setTimeout(function(){if($t.wheelStartX!=null){var Jn=ge.scrollLeft-$t.wheelStartX,ar=ge.scrollTop-$t.wheelStartY,Cr=ar&&$t.wheelDY&&ar/$t.wheelDY||Jn&&$t.wheelDX&&Jn/$t.wheelDX;$t.wheelStartX=$t.wheelStartY=null,Cr&&(Ho=(Ho*ks+Cr)/(ks+1),++ks)}},200)):($t.wheelDX+=Pt,$t.wheelDY+=Ot))}}var el=function(rt,ct){this.ranges=rt,this.primIndex=ct};el.prototype.primary=function(){return this.ranges[this.primIndex]},el.prototype.equals=function(rt){if(rt==this)return!0;if(rt.primIndex!=this.primIndex||rt.ranges.length!=this.ranges.length)return!1;for(var ct=0;ct<this.ranges.length;ct++){var Et=this.ranges[ct],Pt=rt.ranges[ct];if(!Xn(Et.anchor,Pt.anchor)||!Xn(Et.head,Pt.head))return!1}return!0},el.prototype.deepCopy=function(){for(var rt=[],ct=0;ct<this.ranges.length;ct++)rt[ct]=new to(hr(this.ranges[ct].anchor),hr(this.ranges[ct].head));return new el(rt,this.primIndex)},el.prototype.somethingSelected=function(){for(var rt=0;rt<this.ranges.length;rt++)if(!this.ranges[rt].empty())return!0;return!1},el.prototype.contains=function(rt,ct){ct||(ct=rt);for(var Et=0;Et<this.ranges.length;Et++){var Pt=this.ranges[Et];if(Tn(ct,Pt.from())>=0&&Tn(rt,Pt.to())<=0)return Et}return-1};var to=function(rt,ct){this.anchor=rt,this.head=ct};to.prototype.from=function(){return On(this.anchor,this.head)},to.prototype.to=function(){return xr(this.anchor,this.head)},to.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ml(rt,ct,Et){var Pt=rt&&rt.options.selectionsMayTouch,Ot=ct[Et];ct.sort(function(gn,fn){return Tn(gn.from(),fn.from())}),Et=ve(ct,Ot);for(var $t=1;$t<ct.length;$t++){var ge=ct[$t],Te=ct[$t-1],Ee=Tn(Te.to(),ge.from());if(Pt&&!ge.empty()?Ee>0:Ee>=0){var Be=On(Te.from(),ge.from()),en=xr(Te.to(),ge.to()),ze=Te.empty()?ge.from()==ge.head:Te.from()==Te.head;$t<=Et&&--Et,ct.splice(--$t,2,new to(ze?en:Be,ze?Be:en))}}return new el(ct,Et)}function pu(rt,ct){return new el([new to(rt,ct||rt)],0)}function Ku(rt){return rt.text?$e(rt.from.line+rt.text.length-1,ke(rt.text).length+(rt.text.length==1?rt.from.ch:0)):rt.to}function Eh(rt,ct){if(Tn(rt,ct.from)<0)return rt;if(Tn(rt,ct.to)<=0)return Ku(ct);var Et=rt.line+ct.text.length-(ct.to.line-ct.from.line)-1,Pt=rt.ch;return rt.line==ct.to.line&&(Pt+=Ku(ct).ch-ct.to.ch),$e(Et,Pt)}function $c(rt,ct){for(var Et=[],Pt=0;Pt<rt.sel.ranges.length;Pt++){var Ot=rt.sel.ranges[Pt];Et.push(new to(Eh(Ot.anchor,ct),Eh(Ot.head,ct)))}return ml(rt.cm,Et,rt.sel.primIndex)}function pc(rt,ct,Et){return rt.line==ct.line?$e(Et.line,rt.ch-ct.ch+Et.ch):$e(Et.line+(rt.line-ct.line),rt.ch)}function qc(rt,ct,Et){for(var Pt=[],Ot=$e(rt.first,0),$t=Ot,ge=0;ge<ct.length;ge++){var Te=ct[ge],Ee=pc(Te.from,Ot,$t),Be=pc(Ku(Te),Ot,$t);if(Ot=Te.to,$t=Be,Et=="around"){var en=rt.sel.ranges[ge],ze=Tn(en.head,en.anchor)<0;Pt[ge]=new to(ze?Be:Ee,ze?Ee:Be)}else Pt[ge]=new to(Ee,Ee)}return new el(Pt,rt.sel.primIndex)}function Ei(rt){rt.doc.mode=tn(rt.options,rt.doc.modeOption),tf(rt)}function tf(rt){rt.doc.iter(function(ct){ct.stateAfter&&(ct.stateAfter=null),ct.styles&&(ct.styles=null)}),rt.doc.modeFrontier=rt.doc.highlightFrontier=rt.doc.first,dc(rt,100),rt.state.modeGen++,rt.curOp&&bo(rt)}function ap(rt,ct){return ct.from.ch==0&&ct.to.ch==0&&ke(ct.text)==""&&(!rt.cm||rt.cm.options.wholeLineUpdateBefore)}function Yf(rt,ct,Et,Pt){function Ot(Gr){return Et?Et[Gr]:null}function $t(Gr,Nr,Hr){xo(Gr,Nr,Hr,Pt),Dr(Gr,"change",Gr,ct)}function ge(Gr,Nr){for(var Hr=[],ci=Gr;ci<Nr;++ci)Hr.push(new lo(Be[ci],Ot(ci),Pt));return Hr}var Te=ct.from,Ee=ct.to,Be=ct.text,en=mn(rt,Te.line),ze=mn(rt,Ee.line),gn=ke(Be),fn=Ot(Be.length-1),Un=Ee.line-Te.line;if(ct.full)rt.insert(0,ge(0,Be.length)),rt.remove(Be.length,rt.size-Be.length);else if(ap(rt,ct)){var Jn=ge(0,Be.length-1);$t(ze,ze.text,fn),Un&&rt.remove(Te.line,Un),Jn.length&&rt.insert(Te.line,Jn)}else if(en==ze)if(Be.length==1)$t(en,en.text.slice(0,Te.ch)+gn+en.text.slice(Ee.ch),fn);else{var ar=ge(1,Be.length-1);ar.push(new lo(gn+en.text.slice(Ee.ch),fn,Pt)),$t(en,en.text.slice(0,Te.ch)+Be[0],Ot(0)),rt.insert(Te.line+1,ar)}else if(Be.length==1)$t(en,en.text.slice(0,Te.ch)+Be[0]+ze.text.slice(Ee.ch),Ot(0)),rt.remove(Te.line+1,Un);else{$t(en,en.text.slice(0,Te.ch)+Be[0],Ot(0)),$t(ze,gn+ze.text.slice(Ee.ch),fn);var Cr=ge(1,Be.length-1);Un>1&&rt.remove(Te.line+1,Un-1),rt.insert(Te.line+1,Cr)}Dr(rt,"change",rt,ct)}function Nl(rt,ct,Et){function Pt(Ot,$t,ge){if(Ot.linked)for(var Te=0;Te<Ot.linked.length;++Te){var Ee=Ot.linked[Te];if(Ee.doc!=$t){var Be=ge&&Ee.sharedHist;Et&&!Be||(ct(Ee.doc,Be),Pt(Ee.doc,Ot,Be))}}}Pt(rt,null,!0)}function Jf(rt,ct){if(ct.cm)throw new Error("This document is already in use.");rt.doc=ct,ct.cm=rt,Qr(rt),Ei(rt),ef(rt),rt.options.lineWrapping||bi(rt),rt.options.mode=ct.modeOption,bo(rt)}function ef(rt){(rt.doc.direction=="rtl"?Vt:Dt)(rt.display.lineDiv,"CodeMirror-rtl")}function t0(rt){Xi(rt,function(){ef(rt),bo(rt)})}function gc(rt){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=rt||1}function Qf(rt,ct){var Et={from:hr(ct.from),to:Ku(ct),text:$n(rt,ct.from,ct.to)};return Zu(rt,Et,ct.from.line,ct.to.line+1),Nl(rt,function(Pt){return Zu(Pt,Et,ct.from.line,ct.to.line+1)},!0),Et}function mc(rt){for(;rt.length;){var ct=ke(rt);if(ct.ranges)rt.pop();else break}}function nf(rt,ct){if(ct)return mc(rt.done),ke(rt.done);if(rt.done.length&&!ke(rt.done).ranges)return ke(rt.done);if(rt.done.length>1&&!rt.done[rt.done.length-2].ranges)return rt.done.pop(),ke(rt.done)}function rf(rt,ct,Et,Pt){var Ot=rt.history;Ot.undone.length=0;var $t=+new Date,ge,Te;if((Ot.lastOp==Pt||Ot.lastOrigin==ct.origin&&ct.origin&&(ct.origin.charAt(0)=="+"&&Ot.lastModTime>$t-(rt.cm?rt.cm.options.historyEventDelay:500)||ct.origin.charAt(0)=="*"))&&(ge=nf(Ot,Ot.lastOp==Pt)))Te=ke(ge.changes),Tn(ct.from,ct.to)==0&&Tn(ct.from,Te.to)==0?Te.to=Ku(ct):ge.changes.push(Qf(rt,ct));else{var Ee=ke(Ot.done);for((!Ee||!Ee.ranges)&&vc(rt.sel,Ot.done),ge={changes:[Qf(rt,ct)],generation:Ot.generation},Ot.done.push(ge);Ot.done.length>Ot.undoDepth;)Ot.done.shift(),Ot.done[0].ranges||Ot.done.shift()}Ot.done.push(Et),Ot.generation=++Ot.maxGeneration,Ot.lastModTime=Ot.lastSelTime=$t,Ot.lastOp=Ot.lastSelOp=Pt,Ot.lastOrigin=Ot.lastSelOrigin=ct.origin,Te||We(rt,"historyAdded")}function sp(rt,ct,Et,Pt){var Ot=ct.charAt(0);return Ot=="*"||Ot=="+"&&Et.ranges.length==Pt.ranges.length&&Et.somethingSelected()==Pt.somethingSelected()&&new Date-rt.history.lastSelTime<=(rt.cm?rt.cm.options.historyEventDelay:500)}function of(rt,ct,Et,Pt){var Ot=rt.history,$t=Pt&&Pt.origin;Et==Ot.lastSelOp||$t&&Ot.lastSelOrigin==$t&&(Ot.lastModTime==Ot.lastSelTime&&Ot.lastOrigin==$t||sp(rt,$t,ke(Ot.done),ct))?Ot.done[Ot.done.length-1]=ct:vc(ct,Ot.done),Ot.lastSelTime=+new Date,Ot.lastSelOrigin=$t,Ot.lastSelOp=Et,Pt&&Pt.clearRedo!==!1&&mc(Ot.undone)}function vc(rt,ct){var Et=ke(ct);Et&&Et.ranges&&Et.equals(rt)||ct.push(rt)}function Zu(rt,ct,Et,Pt){var Ot=ct["spans_"+rt.id],$t=0;rt.iter(Math.max(rt.first,Et),Math.min(rt.first+rt.size,Pt),function(ge){ge.markedSpans&&((Ot||(Ot=ct["spans_"+rt.id]={}))[$t]=ge.markedSpans),++$t})}function ts(rt){if(!rt)return null;for(var ct,Et=0;Et<rt.length;++Et)rt[Et].marker.explicitlyCleared?ct||(ct=rt.slice(0,Et)):ct&&ct.push(rt[Et]);return ct?ct.length?ct:null:rt}function Vl(rt,ct){var Et=ct["spans_"+rt.id];if(!Et)return null;for(var Pt=[],Ot=0;Ot<ct.text.length;++Ot)Pt.push(ts(Et[Ot]));return Pt}function $f(rt,ct){var Et=Vl(rt,ct),Pt=wi(rt,ct);if(!Et)return Pt;if(!Pt)return Et;for(var Ot=0;Ot<Et.length;++Ot){var $t=Et[Ot],ge=Pt[Ot];if($t&&ge)t:for(var Te=0;Te<ge.length;++Te){for(var Ee=ge[Te],Be=0;Be<$t.length;++Be)if($t[Be].marker==Ee.marker)continue t;$t.push(Ee)}else ge&&(Et[Ot]=ge)}return Et}function gu(rt,ct,Et){for(var Pt=[],Ot=0;Ot<rt.length;++Ot){var $t=rt[Ot];if($t.ranges){Pt.push(Et?el.prototype.deepCopy.call($t):$t);continue}var ge=$t.changes,Te=[];Pt.push({changes:Te});for(var Ee=0;Ee<ge.length;++Ee){var Be=ge[Ee],en=void 0;if(Te.push({from:Be.from,to:Be.to,text:Be.text}),ct)for(var ze in Be)(en=ze.match(/^spans_(\d+)$/))&&ve(ct,Number(en[1]))>-1&&(ke(Te)[ze]=Be[ze],delete Be[ze])}}return Pt}function qf(rt,ct,Et,Pt){if(Pt){var Ot=rt.anchor;if(Et){var $t=Tn(ct,Ot)<0;$t!=Tn(Et,Ot)<0?(Ot=ct,ct=Et):$t!=Tn(ct,Et)<0&&(ct=Et)}return new to(Ot,ct)}else return new to(Et||ct,ct)}function td(rt,ct,Et,Pt,Ot){Ot==null&&(Ot=rt.cm&&(rt.cm.display.shift||rt.extend)),Ua(rt,new el([qf(rt.sel.primary(),ct,Et,Ot)],0),Pt)}function Gg(rt,ct,Et){for(var Pt=[],Ot=rt.cm&&(rt.cm.display.shift||rt.extend),$t=0;$t<rt.sel.ranges.length;$t++)Pt[$t]=qf(rt.sel.ranges[$t],ct[$t],null,Ot);var ge=ml(rt.cm,Pt,rt.sel.primIndex);Ua(rt,ge,Et)}function Xu(rt,ct,Et,Pt){var Ot=rt.sel.ranges.slice(0);Ot[ct]=Et,Ua(rt,ml(rt.cm,Ot,rt.sel.primIndex),Pt)}function Mh(rt,ct,Et,Pt){Ua(rt,pu(ct,Et),Pt)}function Ug(rt,ct,Et){var Pt={ranges:ct.ranges,update:function(Ot){this.ranges=[];for(var $t=0;$t<Ot.length;$t++)this.ranges[$t]=new to(Dn(rt,Ot[$t].anchor),Dn(rt,Ot[$t].head))},origin:Et&&Et.origin};return We(rt,"beforeSelectionChange",rt,Pt),rt.cm&&We(rt.cm,"beforeSelectionChange",rt.cm,Pt),Pt.ranges!=ct.ranges?ml(rt.cm,Pt.ranges,Pt.ranges.length-1):ct}function ed(rt,ct,Et){var Pt=rt.history.done,Ot=ke(Pt);Ot&&Ot.ranges?(Pt[Pt.length-1]=ct,Th(rt,ct,Et)):Ua(rt,ct,Et)}function Ua(rt,ct,Et){Th(rt,ct,Et),of(rt,rt.sel,rt.cm?rt.cm.curOp.id:NaN,Et)}function Th(rt,ct,Et){(ln(rt,"beforeSelectionChange")||rt.cm&&ln(rt.cm,"beforeSelectionChange"))&&(ct=Ug(rt,ct,Et));var Pt=Et&&Et.bias||(Tn(ct.primary().head,rt.sel.primary().head)<0?-1:1);lp(rt,sf(rt,ct,Pt,!0)),!(Et&&Et.scroll===!1)&&rt.cm&&fu(rt.cm)}function lp(rt,ct){ct.equals(rt.sel)||(rt.sel=ct,rt.cm&&(rt.cm.curOp.updateInput=1,rt.cm.curOp.selectionChanged=!0,rn(rt.cm)),Dr(rt,"cursorActivity",rt))}function af(rt){lp(rt,sf(rt,rt.sel,null,!1))}function sf(rt,ct,Et,Pt){for(var Ot,$t=0;$t<ct.ranges.length;$t++){var ge=ct.ranges[$t],Te=ct.ranges.length==rt.sel.ranges.length&&rt.sel.ranges[$t],Ee=lf(rt,ge.anchor,Te&&Te.anchor,Et,Pt),Be=lf(rt,ge.head,Te&&Te.head,Et,Pt);(Ot||Ee!=ge.anchor||Be!=ge.head)&&(Ot||(Ot=ct.ranges.slice(0,$t)),Ot[$t]=new to(Ee,Be))}return Ot?ml(rt.cm,Ot,ct.primIndex):ct}function mu(rt,ct,Et,Pt,Ot){var $t=mn(rt,ct.line);if($t.markedSpans)for(var ge=0;ge<$t.markedSpans.length;++ge){var Te=$t.markedSpans[ge],Ee=Te.marker,Be="selectLeft"in Ee?!Ee.selectLeft:Ee.inclusiveLeft,en="selectRight"in Ee?!Ee.selectRight:Ee.inclusiveRight;if((Te.from==null||(Be?Te.from<=ct.ch:Te.from<ct.ch))&&(Te.to==null||(en?Te.to>=ct.ch:Te.to>ct.ch))){if(Ot&&(We(Ee,"beforeCursorEnter"),Ee.explicitlyCleared))if($t.markedSpans){--ge;continue}else break;if(!Ee.atomic)continue;if(Et){var ze=Ee.find(Pt<0?1:-1),gn=void 0;if((Pt<0?en:Be)&&(ze=up(rt,ze,-Pt,ze&&ze.line==ct.line?$t:null)),ze&&ze.line==ct.line&&(gn=Tn(ze,Et))&&(Pt<0?gn<0:gn>0))return mu(rt,ze,ct,Pt,Ot)}var fn=Ee.find(Pt<0?-1:1);return(Pt<0?Be:en)&&(fn=up(rt,fn,Pt,fn.line==ct.line?$t:null)),fn?mu(rt,fn,ct,Pt,Ot):null}}return ct}function lf(rt,ct,Et,Pt,Ot){var $t=Pt||1,ge=mu(rt,ct,Et,$t,Ot)||!Ot&&mu(rt,ct,Et,$t,!0)||mu(rt,ct,Et,-$t,Ot)||!Ot&&mu(rt,ct,Et,-$t,!0);return ge||(rt.cantEdit=!0,$e(rt.first,0))}function up(rt,ct,Et,Pt){return Et<0&&ct.ch==0?ct.line>rt.first?Dn(rt,$e(ct.line-1)):null:Et>0&&ct.ch==(Pt||mn(rt,ct.line)).text.length?ct.line<rt.first+rt.size-1?$e(ct.line+1,0):null:new $e(ct.line,ct.ch+Et)}function Vo(rt){rt.setSelection($e(rt.firstLine(),0),$e(rt.lastLine()),ce)}function uf(rt,ct,Et){var Pt={canceled:!1,from:ct.from,to:ct.to,text:ct.text,origin:ct.origin,cancel:function(){return Pt.canceled=!0}};return Et&&(Pt.update=function(Ot,$t,ge,Te){Ot&&(Pt.from=Dn(rt,Ot)),$t&&(Pt.to=Dn(rt,$t)),ge&&(Pt.text=ge),Te!==void 0&&(Pt.origin=Te)}),We(rt,"beforeChange",rt,Pt),rt.cm&&We(rt.cm,"beforeChange",rt.cm,Pt),Pt.canceled?(rt.cm&&(rt.cm.curOp.updateInput=2),null):{from:Pt.from,to:Pt.to,text:Pt.text,origin:Pt.origin}}function Yu(rt,ct,Et){if(rt.cm){if(!rt.cm.curOp)return sa(rt.cm,Yu)(rt,ct,Et);if(rt.cm.state.suppressEdits)return}if(!((ln(rt,"beforeChange")||rt.cm&&ln(rt.cm,"beforeChange"))&&(ct=uf(rt,ct,!0),!ct))){var Pt=hi&&!Et&&Oi(rt,ct.from,ct.to);if(Pt)for(var Ot=Pt.length-1;Ot>=0;--Ot)Lh(rt,{from:Pt[Ot].from,to:Pt[Ot].to,text:Ot?[""]:ct.text,origin:ct.origin});else Lh(rt,ct)}}function Lh(rt,ct){if(!(ct.text.length==1&&ct.text[0]==""&&Tn(ct.from,ct.to)==0)){var Et=$c(rt,ct);rf(rt,ct,Et,rt.cm?rt.cm.curOp.id:NaN),yc(rt,ct,Et,wi(rt,ct));var Pt=[];Nl(rt,function(Ot,$t){!$t&&ve(Pt,Ot.history)==-1&&(cp(Ot.history,ct),Pt.push(Ot.history)),yc(Ot,ct,null,wi(Ot,ct))})}}function hf(rt,ct,Et){var Pt=rt.cm&&rt.cm.state.suppressEdits;if(!(Pt&&!Et)){for(var Ot=rt.history,$t,ge=rt.sel,Te=ct=="undo"?Ot.done:Ot.undone,Ee=ct=="undo"?Ot.undone:Ot.done,Be=0;Be<Te.length&&($t=Te[Be],!(Et?$t.ranges&&!$t.equals(rt.sel):!$t.ranges));Be++);if(Be!=Te.length){for(Ot.lastOrigin=Ot.lastSelOrigin=null;;)if($t=Te.pop(),$t.ranges){if(vc($t,Ee),Et&&!$t.equals(rt.sel)){Ua(rt,$t,{clearRedo:!1});return}ge=$t}else if(Pt){Te.push($t);return}else break;var en=[];vc(ge,Ee),Ee.push({changes:en,generation:Ot.generation}),Ot.generation=$t.generation||++Ot.maxGeneration;for(var ze=ln(rt,"beforeChange")||rt.cm&&ln(rt.cm,"beforeChange"),gn=function(Jn){var ar=$t.changes[Jn];if(ar.origin=ct,ze&&!uf(rt,ar,!1))return Te.length=0,{};en.push(Qf(rt,ar));var Cr=Jn?$c(rt,ar):ke(Te);yc(rt,ar,Cr,$f(rt,ar)),!Jn&&rt.cm&&rt.cm.scrollIntoView({from:ar.from,to:Ku(ar)});var Gr=[];Nl(rt,function(Nr,Hr){!Hr&&ve(Gr,Nr.history)==-1&&(cp(Nr.history,ar),Gr.push(Nr.history)),yc(Nr,ar,null,$f(Nr,ar))})},fn=$t.changes.length-1;fn>=0;--fn){var Un=gn(fn);if(Un)return Un.v}}}}function hp(rt,ct){if(ct!=0&&(rt.first+=ct,rt.sel=new el(pe(rt.sel.ranges,function(Ot){return new to($e(Ot.anchor.line+ct,Ot.anchor.ch),$e(Ot.head.line+ct,Ot.head.ch))}),rt.sel.primIndex),rt.cm)){bo(rt.cm,rt.first,rt.first-ct,ct);for(var Et=rt.cm.display,Pt=Et.viewFrom;Pt<Et.viewTo;Pt++)ki(rt.cm,Pt,"gutter")}}function yc(rt,ct,Et,Pt){if(rt.cm&&!rt.cm.curOp)return sa(rt.cm,yc)(rt,ct,Et,Pt);if(ct.to.line<rt.first){hp(rt,ct.text.length-1-(ct.to.line-ct.from.line));return}if(!(ct.from.line>rt.lastLine())){if(ct.from.line<rt.first){var Ot=ct.text.length-1-(rt.first-ct.from.line);hp(rt,Ot),ct={from:$e(rt.first,0),to:$e(ct.to.line+Ot,ct.to.ch),text:[ke(ct.text)],origin:ct.origin}}var $t=rt.lastLine();ct.to.line>$t&&(ct={from:ct.from,to:$e($t,mn(rt,$t).text.length),text:[ct.text[0]],origin:ct.origin}),ct.removed=$n(rt,ct.from,ct.to),Et||(Et=$c(rt,ct)),rt.cm?Wg(rt.cm,ct,Pt):Yf(rt,ct,Pt),Th(rt,Et,ce),rt.cantEdit&&lf(rt,$e(rt.firstLine(),0))&&(rt.cantEdit=!1)}}function Wg(rt,ct,Et){var Pt=rt.doc,Ot=rt.display,$t=ct.from,ge=ct.to,Te=!1,Ee=$t.line;rt.options.lineWrapping||(Ee=je(gr(mn(Pt,$t.line))),Pt.iter(Ee,ge.line+1,function(fn){if(fn==Ot.maxLine)return Te=!0,!0})),Pt.sel.contains(ct.from,ct.to)>-1&&rn(rt),Yf(Pt,ct,Et,wo(rt)),rt.options.lineWrapping||(Pt.iter(Ee,$t.line+ct.text.length,function(fn){var Un=io(fn);Un>Ot.maxLineLength&&(Ot.maxLine=fn,Ot.maxLineLength=Un,Ot.maxLineChanged=!0,Te=!1)}),Te&&(rt.curOp.updateMaxLine=!0)),$r(Pt,$t.line),dc(rt,400);var Be=ct.text.length-(ge.line-$t.line)-1;ct.full?bo(rt):$t.line==ge.line&&ct.text.length==1&&!ap(rt.doc,ct)?ki(rt,$t.line,"text"):bo(rt,$t.line,ge.line+1,Be);var en=ln(rt,"changes"),ze=ln(rt,"change");if(ze||en){var gn={from:$t,to:ge,text:ct.text,removed:ct.removed,origin:ct.origin};ze&&Dr(rt,"change",rt,gn),en&&(rt.curOp.changeObjs||(rt.curOp.changeObjs=[])).push(gn)}rt.display.selForContextMenu=null}function Ah(rt,ct,Et,Pt,Ot){var $t;Pt||(Pt=Et),Tn(Pt,Et)<0&&($t=[Pt,Et],Et=$t[0],Pt=$t[1]),typeof ct=="string"&&(ct=rt.splitLines(ct)),Yu(rt,{from:Et,to:Pt,text:ct,origin:Ot})}function nl(rt,ct,Et,Pt){Et<rt.line?rt.line+=Pt:ct<rt.line&&(rt.line=ct,rt.ch=0)}function Hg(rt,ct,Et,Pt){for(var Ot=0;Ot<rt.length;++Ot){var $t=rt[Ot],ge=!0;if($t.ranges){$t.copied||($t=rt[Ot]=$t.deepCopy(),$t.copied=!0);for(var Te=0;Te<$t.ranges.length;Te++)nl($t.ranges[Te].anchor,ct,Et,Pt),nl($t.ranges[Te].head,ct,Et,Pt);continue}for(var Ee=0;Ee<$t.changes.length;++Ee){var Be=$t.changes[Ee];if(Et<Be.from.line)Be.from=$e(Be.from.line+Pt,Be.from.ch),Be.to=$e(Be.to.line+Pt,Be.to.ch);else if(ct<=Be.to.line){ge=!1;break}}ge||(rt.splice(0,Ot+1),Ot=0)}}function cp(rt,ct){var Et=ct.from.line,Pt=ct.to.line,Ot=ct.text.length-(Pt-Et)-1;Hg(rt.done,Et,Pt,Ot),Hg(rt.undone,Et,Pt,Ot)}function Nh(rt,ct,Et,Pt){var Ot=ct,$t=ct;return typeof ct=="number"?$t=mn(rt,Fn(rt,ct)):Ot=je(ct),Ot==null?null:(Pt($t,Ot)&&rt.cm&&ki(rt.cm,Ot,Et),$t)}function Sc(rt){this.lines=rt,this.parent=null;for(var ct=0,Et=0;Et<rt.length;++Et)rt[Et].parent=this,ct+=rt[Et].height;this.height=ct}Sc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(rt,ct){for(var Et=rt,Pt=rt+ct;Et<Pt;++Et){var Ot=this.lines[Et];this.height-=Ot.height,Bo(Ot),Dr(Ot,"delete")}this.lines.splice(rt,ct)},collapse:function(rt){rt.push.apply(rt,this.lines)},insertInner:function(rt,ct,Et){this.height+=Et,this.lines=this.lines.slice(0,rt).concat(ct).concat(this.lines.slice(rt));for(var Pt=0;Pt<ct.length;++Pt)ct[Pt].parent=this},iterN:function(rt,ct,Et){for(var Pt=rt+ct;rt<Pt;++rt)if(Et(this.lines[rt]))return!0}};function Oo(rt){this.children=rt;for(var ct=0,Et=0,Pt=0;Pt<rt.length;++Pt){var Ot=rt[Pt];ct+=Ot.chunkSize(),Et+=Ot.height,Ot.parent=this}this.size=ct,this.height=Et,this.parent=null}Oo.prototype={chunkSize:function(){return this.size},removeInner:function(rt,ct){this.size-=ct;for(var Et=0;Et<this.children.length;++Et){var Pt=this.children[Et],Ot=Pt.chunkSize();if(rt<Ot){var $t=Math.min(ct,Ot-rt),ge=Pt.height;if(Pt.removeInner(rt,$t),this.height-=ge-Pt.height,Ot==$t&&(this.children.splice(Et--,1),Pt.parent=null),(ct-=$t)==0)break;rt=0}else rt-=Ot}if(this.size-ct<25&&(this.children.length>1||!(this.children[0]instanceof Sc))){var Te=[];this.collapse(Te),this.children=[new Sc(Te)],this.children[0].parent=this}},collapse:function(rt){for(var ct=0;ct<this.children.length;++ct)this.children[ct].collapse(rt)},insertInner:function(rt,ct,Et){this.size+=ct.length,this.height+=Et;for(var Pt=0;Pt<this.children.length;++Pt){var Ot=this.children[Pt],$t=Ot.chunkSize();if(rt<=$t){if(Ot.insertInner(rt,ct,Et),Ot.lines&&Ot.lines.length>50){for(var ge=Ot.lines.length%25+25,Te=ge;Te<Ot.lines.length;){var Ee=new Sc(Ot.lines.slice(Te,Te+=25));Ot.height-=Ee.height,this.children.splice(++Pt,0,Ee),Ee.parent=this}Ot.lines=Ot.lines.slice(0,ge),this.maybeSpill()}break}rt-=$t}},maybeSpill:function(){if(!(this.children.length<=10)){var rt=this;do{var ct=rt.children.splice(rt.children.length-5,5),Et=new Oo(ct);if(rt.parent){rt.size-=Et.size,rt.height-=Et.height;var Ot=ve(rt.parent.children,rt);rt.parent.children.splice(Ot+1,0,Et)}else{var Pt=new Oo(rt.children);Pt.parent=rt,rt.children=[Pt,Et],rt=Pt}Et.parent=rt.parent}while(rt.children.length>10);rt.parent.maybeSpill()}},iterN:function(rt,ct,Et){for(var Pt=0;Pt<this.children.length;++Pt){var Ot=this.children[Pt],$t=Ot.chunkSize();if(rt<$t){var ge=Math.min(ct,$t-rt);if(Ot.iterN(rt,ge,Et))return!0;if((ct-=ge)==0)break;rt=0}else rt-=$t}}};var vu=function(rt,ct,Et){if(Et)for(var Pt in Et)Et.hasOwnProperty(Pt)&&(this[Pt]=Et[Pt]);this.doc=rt,this.node=ct};vu.prototype.clear=function(){var rt=this.doc.cm,ct=this.line.widgets,Et=this.line,Pt=je(Et);if(!(Pt==null||!ct)){for(var Ot=0;Ot<ct.length;++Ot)ct[Ot]==this&&ct.splice(Ot--,1);ct.length||(Et.widgets=null);var $t=ia(this);Mn(Et,Math.max(0,Et.height-$t)),rt&&(Xi(rt,function(){Vg(rt,Et,-$t),ki(rt,Pt,"widget")}),Dr(rt,"lineWidgetCleared",rt,this,Pt))}},vu.prototype.changed=function(){var rt=this,ct=this.height,Et=this.doc.cm,Pt=this.line;this.height=null;var Ot=ia(this)-ct;Ot&&(kn(this.doc,Pt)||Mn(Pt,Pt.height+Ot),Et&&Xi(Et,function(){Et.curOp.forceUpdate=!0,Vg(Et,Pt,Ot),Dr(Et,"lineWidgetChanged",Et,rt,je(Pt))}))},un(vu);function Vg(rt,ct,Et){Ci(ct)<(rt.curOp&&rt.curOp.scrollTop||rt.doc.scrollTop)&&Hf(rt,Et)}function nd(rt,ct,Et,Pt){var Ot=new vu(rt,Et,Pt),$t=rt.cm;return $t&&Ot.noHScroll&&($t.display.alignWidgets=!0),Nh(rt,ct,"widget",function(ge){var Te=ge.widgets||(ge.widgets=[]);if(Ot.insertAt==null?Te.push(Ot):Te.splice(Math.min(Te.length-1,Math.max(0,Ot.insertAt)),0,Ot),Ot.line=ge,$t&&!kn(rt,ge)){var Ee=Ci(ge)<rt.scrollTop;Mn(ge,ge.height+ia(Ot)),Ee&&Hf($t,Ot.height),$t.curOp.forceUpdate=!0}return!0}),$t&&Dr($t,"lineWidgetAdded",$t,Ot,typeof ct=="number"?ct:je(ct)),Ot}var Kg=0,Xe=function(rt,ct){this.lines=[],this.type=ct,this.doc=rt,this.id=++Kg};Xe.prototype.clear=function(){if(!this.explicitlyCleared){var rt=this.doc.cm,ct=rt&&!rt.curOp;if(ct&&_u(rt),ln(this,"clear")){var Et=this.find();Et&&Dr(this,"clear",Et.from,Et.to)}for(var Pt=null,Ot=null,$t=0;$t<this.lines.length;++$t){var ge=this.lines[$t],Te=Gi(ge.markedSpans,this);rt&&!this.collapsed?ki(rt,je(ge),"text"):rt&&(Te.to!=null&&(Ot=je(ge)),Te.from!=null&&(Pt=je(ge))),ge.markedSpans=gi(ge.markedSpans,Te),Te.from==null&&this.collapsed&&!kn(this.doc,ge)&&rt&&Mn(ge,Qa(rt.display))}if(rt&&this.collapsed&&!rt.options.lineWrapping)for(var Ee=0;Ee<this.lines.length;++Ee){var Be=gr(this.lines[Ee]),en=io(Be);en>rt.display.maxLineLength&&(rt.display.maxLine=Be,rt.display.maxLineLength=en,rt.display.maxLineChanged=!0)}Pt!=null&&rt&&this.collapsed&&bo(rt,Pt,Ot+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,rt&&af(rt.doc)),rt&&Dr(rt,"markerCleared",rt,this,Pt,Ot),ct&&zu(rt),this.parent&&this.parent.clear()}},Xe.prototype.find=function(rt,ct){rt==null&&this.type=="bookmark"&&(rt=1);for(var Et,Pt,Ot=0;Ot<this.lines.length;++Ot){var $t=this.lines[Ot],ge=Gi($t.markedSpans,this);if(ge.from!=null&&(Et=$e(ct?$t:je($t),ge.from),rt==-1))return Et;if(ge.to!=null&&(Pt=$e(ct?$t:je($t),ge.to),rt==1))return Pt}return Et&&{from:Et,to:Pt}},Xe.prototype.changed=function(){var rt=this,ct=this.find(-1,!0),Et=this,Pt=this.doc.cm;!ct||!Pt||Xi(Pt,function(){var Ot=ct.line,$t=je(ct.line),ge=pl(Pt,$t);if(ge&&(hc(ge),Pt.curOp.selectionChanged=Pt.curOp.forceUpdate=!0),Pt.curOp.updateMaxLine=!0,!kn(Et.doc,Ot)&&Et.height!=null){var Te=Et.height;Et.height=null;var Ee=ia(Et)-Te;Ee&&Mn(Ot,Ot.height+Ee)}Dr(Pt,"markerChanged",Pt,rt)})},Xe.prototype.attachLine=function(rt){if(!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(!ct.maybeHiddenMarkers||ve(ct.maybeHiddenMarkers,this)==-1)&&(ct.maybeUnhiddenMarkers||(ct.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(rt)},Xe.prototype.detachLine=function(rt){if(this.lines.splice(ve(this.lines,rt),1),!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(ct.maybeHiddenMarkers||(ct.maybeHiddenMarkers=[])).push(this)}},un(Xe);function jh(rt,ct,Et,Pt,Ot){if(Pt&&Pt.shared)return Zg(rt,ct,Et,Pt,Ot);if(rt.cm&&!rt.cm.curOp)return sa(rt.cm,jh)(rt,ct,Et,Pt,Ot);var $t=new Xe(rt,Ot),ge=Tn(ct,Et);if(Pt&&be(Pt,$t,!1),ge>0||ge==0&&$t.clearWhenEmpty!==!1)return $t;if($t.replacedWith&&($t.collapsed=!0,$t.widgetNode=_t("span",[$t.replacedWith],"CodeMirror-widget"),Pt.handleMouseEvents||$t.widgetNode.setAttribute("cm-ignore-events","true"),Pt.insertLeft&&($t.widgetNode.insertLeft=!0)),$t.collapsed){if(Vr(rt,ct.line,ct,Et,$t)||ct.line!=Et.line&&Vr(rt,Et.line,ct,Et,$t))throw new Error("Inserting collapsed marker partially overlapping an existing one");vn()}$t.addToHistory&&rf(rt,{from:ct,to:Et,origin:"markText"},rt.sel,NaN);var Te=ct.line,Ee=rt.cm,Be;if(rt.iter(Te,Et.line+1,function(ze){Ee&&$t.collapsed&&!Ee.options.lineWrapping&&gr(ze)==Ee.display.maxLine&&(Be=!0),$t.collapsed&&Te!=ct.line&&Mn(ze,0),Bi(ze,new ii($t,Te==ct.line?ct.ch:null,Te==Et.line?Et.ch:null)),++Te}),$t.collapsed&&rt.iter(ct.line,Et.line+1,function(ze){kn(rt,ze)&&Mn(ze,0)}),$t.clearOnEnter&&nn($t,"beforeCursorEnter",function(){return $t.clear()}),$t.readOnly&&(mi(),(rt.history.done.length||rt.history.undone.length)&&rt.clearHistory()),$t.collapsed&&($t.id=++Kg,$t.atomic=!0),Ee){if(Be&&(Ee.curOp.updateMaxLine=!0),$t.collapsed)bo(Ee,ct.line,Et.line+1);else if($t.className||$t.startStyle||$t.endStyle||$t.css||$t.attributes||$t.title)for(var en=ct.line;en<=Et.line;en++)ki(Ee,en,"text");$t.atomic&&af(Ee.doc),Dr(Ee,"markerAdded",Ee,$t)}return $t}var Kl=function(rt,ct){this.markers=rt,this.primary=ct;for(var Et=0;Et<rt.length;++Et)rt[Et].parent=this};Kl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var rt=0;rt<this.markers.length;++rt)this.markers[rt].clear();Dr(this,"clear")}},Kl.prototype.find=function(rt,ct){return this.primary.find(rt,ct)},un(Kl);function Zg(rt,ct,Et,Pt,Ot){Pt=be(Pt),Pt.shared=!1;var $t=[jh(rt,ct,Et,Pt,Ot)],ge=$t[0],Te=Pt.widgetNode;return Nl(rt,function(Ee){Te&&(Pt.widgetNode=Te.cloneNode(!0)),$t.push(jh(Ee,Dn(Ee,ct),Dn(Ee,Et),Pt,Ot));for(var Be=0;Be<Ee.linked.length;++Be)if(Ee.linked[Be].isParent)return;ge=ke($t)}),new Kl($t,ge)}function fp(rt){return rt.findMarks($e(rt.first,0),rt.clipPos($e(rt.lastLine())),function(ct){return ct.parent})}function Xg(rt,ct){for(var Et=0;Et<ct.length;Et++){var Pt=ct[Et],Ot=Pt.find(),$t=rt.clipPos(Ot.from),ge=rt.clipPos(Ot.to);if(Tn($t,ge)){var Te=jh(rt,$t,ge,Pt.primary,Pt.primary.type);Pt.markers.push(Te),Te.parent=Pt}}}function dp(rt){for(var ct=function(Pt){var Ot=rt[Pt],$t=[Ot.primary.doc];Nl(Ot.primary.doc,function(Ee){return $t.push(Ee)});for(var ge=0;ge<Ot.markers.length;ge++){var Te=Ot.markers[ge];ve($t,Te.doc)==-1&&(Te.parent=null,Ot.markers.splice(ge--,1))}},Et=0;Et<rt.length;Et++)ct(Et)}var e0=0,Oa=function(rt,ct,Et,Pt,Ot){if(!(this instanceof Oa))return new Oa(rt,ct,Et,Pt,Ot);Et==null&&(Et=0),Oo.call(this,[new Sc([new lo("",null)])]),this.first=Et,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Et;var $t=$e(Et,0);this.sel=pu($t),this.history=new gc(null),this.id=++e0,this.modeOption=ct,this.lineSep=Pt,this.direction=Ot=="rtl"?"rtl":"ltr",this.extend=!1,typeof rt=="string"&&(rt=this.splitLines(rt)),Yf(this,{from:$t,to:$t,text:rt}),Ua(this,pu($t),ce)};Oa.prototype=wt(Oo.prototype,{constructor:Oa,iter:function(rt,ct,Et){Et?this.iterN(rt-this.first,ct-rt,Et):this.iterN(this.first,this.first+this.size,rt)},insert:function(rt,ct){for(var Et=0,Pt=0;Pt<ct.length;++Pt)Et+=ct[Pt].height;this.insertInner(rt-this.first,ct,Et)},remove:function(rt,ct){this.removeInner(rt-this.first,ct)},getValue:function(rt){var ct=fr(this,this.first,this.first+this.size);return rt===!1?ct:ct.join(rt||this.lineSeparator())},setValue:ga(function(rt){var ct=$e(this.first,0),Et=this.first+this.size-1;Yu(this,{from:ct,to:$e(Et,mn(this,Et).text.length),text:this.splitLines(rt),origin:"setValue",full:!0},!0),this.cm&&bh(this.cm,0,0),Ua(this,pu(ct),ce)}),replaceRange:function(rt,ct,Et,Pt){ct=Dn(this,ct),Et=Et?Dn(this,Et):ct,Ah(this,rt,ct,Et,Pt)},getRange:function(rt,ct,Et){var Pt=$n(this,Dn(this,rt),Dn(this,ct));return Et===!1?Pt:Pt.join(Et||this.lineSeparator())},getLine:function(rt){var ct=this.getLineHandle(rt);return ct&&ct.text},getLineHandle:function(rt){if(An(this,rt))return mn(this,rt)},getLineNumber:function(rt){return je(rt)},getLineHandleVisualStart:function(rt){return typeof rt=="number"&&(rt=mn(this,rt)),gr(rt)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(rt){return Dn(this,rt)},getCursor:function(rt){var ct=this.sel.primary(),Et;return rt==null||rt=="head"?Et=ct.head:rt=="anchor"?Et=ct.anchor:rt=="end"||rt=="to"||rt===!1?Et=ct.to():Et=ct.from(),Et},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ga(function(rt,ct,Et){Mh(this,Dn(this,typeof rt=="number"?$e(rt,ct||0):rt),null,Et)}),setSelection:ga(function(rt,ct,Et){Mh(this,Dn(this,rt),Dn(this,ct||rt),Et)}),extendSelection:ga(function(rt,ct,Et){td(this,Dn(this,rt),ct&&Dn(this,ct),Et)}),extendSelections:ga(function(rt,ct){Gg(this,or(this,rt),ct)}),extendSelectionsBy:ga(function(rt,ct){var Et=pe(this.sel.ranges,rt);Gg(this,or(this,Et),ct)}),setSelections:ga(function(rt,ct,Et){if(rt.length){for(var Pt=[],Ot=0;Ot<rt.length;Ot++)Pt[Ot]=new to(Dn(this,rt[Ot].anchor),Dn(this,rt[Ot].head));ct==null&&(ct=Math.min(rt.length-1,this.sel.primIndex)),Ua(this,ml(this.cm,Pt,ct),Et)}}),addSelection:ga(function(rt,ct,Et){var Pt=this.sel.ranges.slice(0);Pt.push(new to(Dn(this,rt),Dn(this,ct||rt))),Ua(this,ml(this.cm,Pt,Pt.length-1),Et)}),getSelection:function(rt){for(var ct=this.sel.ranges,Et,Pt=0;Pt<ct.length;Pt++){var Ot=$n(this,ct[Pt].from(),ct[Pt].to());Et=Et?Et.concat(Ot):Ot}return rt===!1?Et:Et.join(rt||this.lineSeparator())},getSelections:function(rt){for(var ct=[],Et=this.sel.ranges,Pt=0;Pt<Et.length;Pt++){var Ot=$n(this,Et[Pt].from(),Et[Pt].to());rt!==!1&&(Ot=Ot.join(rt||this.lineSeparator())),ct[Pt]=Ot}return ct},replaceSelection:function(rt,ct,Et){for(var Pt=[],Ot=0;Ot<this.sel.ranges.length;Ot++)Pt[Ot]=rt;this.replaceSelections(Pt,ct,Et||"+input")},replaceSelections:ga(function(rt,ct,Et){for(var Pt=[],Ot=this.sel,$t=0;$t<Ot.ranges.length;$t++){var ge=Ot.ranges[$t];Pt[$t]={from:ge.from(),to:ge.to(),text:this.splitLines(rt[$t]),origin:Et}}for(var Te=ct&&ct!="end"&&qc(this,Pt,ct),Ee=Pt.length-1;Ee>=0;Ee--)Yu(this,Pt[Ee]);Te?ed(this,Te):this.cm&&fu(this.cm)}),undo:ga(function(){hf(this,"undo")}),redo:ga(function(){hf(this,"redo")}),undoSelection:ga(function(){hf(this,"undo",!0)}),redoSelection:ga(function(){hf(this,"redo",!0)}),setExtending:function(rt){this.extend=rt},getExtending:function(){return this.extend},historySize:function(){for(var rt=this.history,ct=0,Et=0,Pt=0;Pt<rt.done.length;Pt++)rt.done[Pt].ranges||++ct;for(var Ot=0;Ot<rt.undone.length;Ot++)rt.undone[Ot].ranges||++Et;return{undo:ct,redo:Et}},clearHistory:function(){var rt=this;this.history=new gc(this.history.maxGeneration),Nl(this,function(ct){return ct.history=rt.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(rt){return rt&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(rt){return this.history.generation==(rt||this.cleanGeneration)},getHistory:function(){return{done:gu(this.history.done),undone:gu(this.history.undone)}},setHistory:function(rt){var ct=this.history=new gc(this.history.maxGeneration);ct.done=gu(rt.done.slice(0),null,!0),ct.undone=gu(rt.undone.slice(0),null,!0)},setGutterMarker:ga(function(rt,ct,Et){return Nh(this,rt,"gutter",function(Pt){var Ot=Pt.gutterMarkers||(Pt.gutterMarkers={});return Ot[ct]=Et,!Et&&It(Ot)&&(Pt.gutterMarkers=null),!0})}),clearGutter:ga(function(rt){var ct=this;this.iter(function(Et){Et.gutterMarkers&&Et.gutterMarkers[rt]&&Nh(ct,Et,"gutter",function(){return Et.gutterMarkers[rt]=null,It(Et.gutterMarkers)&&(Et.gutterMarkers=null),!0})})}),lineInfo:function(rt){var ct;if(typeof rt=="number"){if(!An(this,rt)||(ct=rt,rt=mn(this,rt),!rt))return null}else if(ct=je(rt),ct==null)return null;return{line:ct,handle:rt,text:rt.text,gutterMarkers:rt.gutterMarkers,textClass:rt.textClass,bgClass:rt.bgClass,wrapClass:rt.wrapClass,widgets:rt.widgets}},addLineClass:ga(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Pt){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass";if(!Pt[Ot])Pt[Ot]=Et;else{if(At(Et).test(Pt[Ot]))return!1;Pt[Ot]+=" "+Et}return!0})}),removeLineClass:ga(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Pt){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass",$t=Pt[Ot];if($t)if(Et==null)Pt[Ot]=null;else{var ge=$t.match(At(Et));if(!ge)return!1;var Te=ge.index+ge[0].length;Pt[Ot]=$t.slice(0,ge.index)+(!ge.index||Te==$t.length?"":" ")+$t.slice(Te)||null}else return!1;return!0})}),addLineWidget:ga(function(rt,ct,Et){return nd(this,rt,ct,Et)}),removeLineWidget:function(rt){rt.clear()},markText:function(rt,ct,Et){return jh(this,Dn(this,rt),Dn(this,ct),Et,Et&&Et.type||"range")},setBookmark:function(rt,ct){var Et={replacedWith:ct&&(ct.nodeType==null?ct.widget:ct),insertLeft:ct&&ct.insertLeft,clearWhenEmpty:!1,shared:ct&&ct.shared,handleMouseEvents:ct&&ct.handleMouseEvents};return rt=Dn(this,rt),jh(this,rt,rt,Et,"bookmark")},findMarksAt:function(rt){rt=Dn(this,rt);var ct=[],Et=mn(this,rt.line).markedSpans;if(Et)for(var Pt=0;Pt<Et.length;++Pt){var Ot=Et[Pt];(Ot.from==null||Ot.from<=rt.ch)&&(Ot.to==null||Ot.to>=rt.ch)&&ct.push(Ot.marker.parent||Ot.marker)}return ct},findMarks:function(rt,ct,Et){rt=Dn(this,rt),ct=Dn(this,ct);var Pt=[],Ot=rt.line;return this.iter(rt.line,ct.line+1,function($t){var ge=$t.markedSpans;if(ge)for(var Te=0;Te<ge.length;Te++){var Ee=ge[Te];!(Ee.to!=null&&Ot==rt.line&&rt.ch>=Ee.to||Ee.from==null&&Ot!=rt.line||Ee.from!=null&&Ot==ct.line&&Ee.from>=ct.ch)&&(!Et||Et(Ee.marker))&&Pt.push(Ee.marker.parent||Ee.marker)}++Ot}),Pt},getAllMarks:function(){var rt=[];return this.iter(function(ct){var Et=ct.markedSpans;if(Et)for(var Pt=0;Pt<Et.length;++Pt)Et[Pt].from!=null&&rt.push(Et[Pt].marker)}),rt},posFromIndex:function(rt){var ct,Et=this.first,Pt=this.lineSeparator().length;return this.iter(function(Ot){var $t=Ot.text.length+Pt;if($t>rt)return ct=rt,!0;rt-=$t,++Et}),Dn(this,$e(Et,ct))},indexFromPos:function(rt){rt=Dn(this,rt);var ct=rt.ch;if(rt.line<this.first||rt.ch<0)return 0;var Et=this.lineSeparator().length;return this.iter(this.first,rt.line,function(Pt){ct+=Pt.text.length+Et}),ct},copy:function(rt){var ct=new Oa(fr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ct.scrollTop=this.scrollTop,ct.scrollLeft=this.scrollLeft,ct.sel=this.sel,ct.extend=!1,rt&&(ct.history.undoDepth=this.history.undoDepth,ct.setHistory(this.getHistory())),ct},linkedDoc:function(rt){rt||(rt={});var ct=this.first,Et=this.first+this.size;rt.from!=null&&rt.from>ct&&(ct=rt.from),rt.to!=null&&rt.to<Et&&(Et=rt.to);var Pt=new Oa(fr(this,ct,Et),rt.mode||this.modeOption,ct,this.lineSep,this.direction);return rt.sharedHist&&(Pt.history=this.history),(this.linked||(this.linked=[])).push({doc:Pt,sharedHist:rt.sharedHist}),Pt.linked=[{doc:this,isParent:!0,sharedHist:rt.sharedHist}],Xg(Pt,fp(this)),Pt},unlinkDoc:function(rt){if(rt instanceof Wi&&(rt=rt.doc),this.linked)for(var ct=0;ct<this.linked.length;++ct){var Et=this.linked[ct];if(Et.doc==rt){this.linked.splice(ct,1),rt.unlinkDoc(this),dp(fp(this));break}}if(rt.history==this.history){var Pt=[rt.id];Nl(rt,function(Ot){return Pt.push(Ot.id)},!0),rt.history=new gc(null),rt.history.done=gu(this.history.done,Pt),rt.history.undone=gu(this.history.undone,Pt)}},iterLinkedDocs:function(rt){Nl(this,rt)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(rt){return this.lineSep?rt.split(this.lineSep):Rr(rt)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ga(function(rt){rt!="rtl"&&(rt="ltr"),rt!=this.direction&&(this.direction=rt,this.iter(function(ct){return ct.order=null}),this.cm&&t0(this.cm))})}),Oa.prototype.eachLine=Oa.prototype.iter;var cf=0;function pp(rt){var ct=this;if(Qg(ct),!(He(ct,rt)||Uo(ct.display,rt))){bn(rt),Bt&&(cf=+new Date);var Et=$a(ct,rt,!0),Pt=rt.dataTransfer.files;if(!(!Et||ct.isReadOnly()))if(Pt&&Pt.length&&window.FileReader&&window.File)for(var Ot=Pt.length,$t=Array(Ot),ge=0,Te=function(){++ge==Ot&&sa(ct,function(){Et=Dn(ct.doc,Et);var fn={from:Et,to:Et,text:ct.doc.splitLines($t.filter(function(Un){return Un!=null}).join(ct.doc.lineSeparator())),origin:"paste"};Yu(ct.doc,fn),ed(ct.doc,pu(Dn(ct.doc,Et),Dn(ct.doc,Ku(fn))))})()},Ee=function(fn,Un){if(ct.options.allowDropFileTypes&&ve(ct.options.allowDropFileTypes,fn.type)==-1){Te();return}var Jn=new FileReader;Jn.onerror=function(){return Te()},Jn.onload=function(){var ar=Jn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ar)){Te();return}$t[Un]=ar,Te()},Jn.readAsText(fn)},Be=0;Be<Pt.length;Be++)Ee(Pt[Be],Be);else{if(ct.state.draggingText&&ct.doc.sel.contains(Et)>-1){ct.state.draggingText(rt),setTimeout(function(){return ct.display.input.focus()},20);return}try{var en=rt.dataTransfer.getData("Text");if(en){var ze;if(ct.state.draggingText&&!ct.state.draggingText.copy&&(ze=ct.listSelections()),Th(ct.doc,pu(Et,Et)),ze)for(var gn=0;gn<ze.length;++gn)Ah(ct.doc,"",ze[gn].anchor,ze[gn].head,"drag");ct.replaceSelection(en,"around","paste"),ct.display.input.focus()}}catch(fn){}}}}function Yg(rt,ct){if(Bt&&(!rt.state.draggingText||+new Date-cf<100)){Kn(ct);return}if(!(He(rt,ct)||Uo(rt.display,ct))&&(ct.dataTransfer.setData("Text",rt.getSelection()),ct.dataTransfer.effectAllowed="copyMove",ct.dataTransfer.setDragImage&&!Tt)){var Et=Nt("img",null,null,"position: fixed; left: 0; top: 0;");Et.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",yt&&(Et.width=Et.height=1,rt.display.wrapper.appendChild(Et),Et._top=Et.offsetTop),ct.dataTransfer.setDragImage(Et,0,0),yt&&Et.parentNode.removeChild(Et)}}function Jg(rt,ct){var Et=$a(rt,ct);if(Et){var Pt=document.createDocumentFragment();Ii(rt,Et,Pt),rt.display.dragCursor||(rt.display.dragCursor=Nt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),rt.display.lineSpace.insertBefore(rt.display.dragCursor,rt.display.cursorDiv)),jt(rt.display.dragCursor,Pt)}}function Qg(rt){rt.display.dragCursor&&(rt.display.lineSpace.removeChild(rt.display.dragCursor),rt.display.dragCursor=null)}function $g(rt){if(document.getElementsByClassName){for(var ct=document.getElementsByClassName("CodeMirror"),Et=[],Pt=0;Pt<ct.length;Pt++){var Ot=ct[Pt].CodeMirror;Ot&&Et.push(Ot)}Et.length&&Et[0].operation(function(){for(var $t=0;$t<Et.length;$t++)rt(Et[$t])})}}var gp=!1;function Gs(){gp||(xc(),gp=!0)}function xc(){var rt;nn(window,"resize",function(){rt==null&&(rt=setTimeout(function(){rt=null,$g(mp)},100))}),nn(window,"blur",function(){return $g(wh)})}function mp(rt){var ct=rt.display;ct.cachedCharWidth=ct.cachedTextHeight=ct.cachedPaddingH=null,ct.scrollbarsClipped=!1,rt.setSize()}for(var Zl={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"},ff=0;ff<10;ff++)Zl[ff+48]=Zl[ff+96]=String(ff);for(var rd=65;rd<=90;rd++)Zl[rd]=String.fromCharCode(rd);for(var df=1;df<=12;df++)Zl[df+111]=Zl[df+63235]="F"+df;var Es={};Es.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"},Es.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"},Es.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"},Es.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"]},Es.default=at?Es.macDefault:Es.pcDefault;function vp(rt){var ct=rt.split(/-(?!$)/);rt=ct[ct.length-1];for(var Et,Pt,Ot,$t,ge=0;ge<ct.length-1;ge++){var Te=ct[ge];if(/^(cmd|meta|m)$/i.test(Te))$t=!0;else if(/^a(lt)?$/i.test(Te))Et=!0;else if(/^(c|ctrl|control)$/i.test(Te))Pt=!0;else if(/^s(hift)?$/i.test(Te))Ot=!0;else throw new Error("Unrecognized modifier name: "+Te)}return Et&&(rt="Alt-"+rt),Pt&&(rt="Ctrl-"+rt),$t&&(rt="Cmd-"+rt),Ot&&(rt="Shift-"+rt),rt}function yp(rt){var ct={};for(var Et in rt)if(rt.hasOwnProperty(Et)){var Pt=rt[Et];if(/^(name|fallthrough|(de|at)tach)$/.test(Et))continue;if(Pt=="..."){delete rt[Et];continue}for(var Ot=pe(Et.split(" "),vp),$t=0;$t<Ot.length;$t++){var ge=void 0,Te=void 0;$t==Ot.length-1?(Te=Ot.join(" "),ge=Pt):(Te=Ot.slice(0,$t+1).join(" "),ge="...");var Ee=ct[Te];if(!Ee)ct[Te]=ge;else if(Ee!=ge)throw new Error("Inconsistent bindings for "+Te)}delete rt[Et]}for(var Be in ct)rt[Be]=ct[Be];return rt}function rl(rt,ct,Et,Pt){ct=Oh(ct);var Ot=ct.call?ct.call(rt,Pt):ct[rt];if(Ot===!1)return"nothing";if(Ot==="...")return"multi";if(Ot!=null&&Et(Ot))return"handled";if(ct.fallthrough){if(Object.prototype.toString.call(ct.fallthrough)!="[object Array]")return rl(rt,ct.fallthrough,Et,Pt);for(var $t=0;$t<ct.fallthrough.length;$t++){var ge=rl(rt,ct.fallthrough[$t],Et,Pt);if(ge)return ge}}}function wc(rt){var ct=typeof rt=="string"?rt:Zl[rt.keyCode];return ct=="Ctrl"||ct=="Alt"||ct=="Shift"||ct=="Mod"}function Sp(rt,ct,Et){var Pt=rt;return ct.altKey&&Pt!="Alt"&&(rt="Alt-"+rt),(dt?ct.metaKey:ct.ctrlKey)&&Pt!="Ctrl"&&(rt="Ctrl-"+rt),(dt?ct.ctrlKey:ct.metaKey)&&Pt!="Mod"&&(rt="Cmd-"+rt),!Et&&ct.shiftKey&&Pt!="Shift"&&(rt="Shift-"+rt),rt}function qg(rt,ct){if(yt&&rt.keyCode==34&&rt.char)return!1;var Et=Zl[rt.keyCode];return Et==null||rt.altGraphKey?!1:(rt.keyCode==3&&rt.code&&(Et=rt.code),Sp(Et,rt,ct))}function Oh(rt){return typeof rt=="string"?Es[rt]:rt}function Ms(rt,ct){for(var Et=rt.doc.sel.ranges,Pt=[],Ot=0;Ot<Et.length;Ot++){for(var $t=ct(Et[Ot]);Pt.length&&Tn($t.from,ke(Pt).to)<=0;){var ge=Pt.pop();if(Tn(ge.from,$t.from)<0){$t.from=ge.from;break}}Pt.push($t)}Xi(rt,function(){for(var Te=Pt.length-1;Te>=0;Te--)Ah(rt.doc,"",Pt[Te].from,Pt[Te].to,"+delete");fu(rt)})}function xp(rt,ct,Et){var Pt=re(rt.text,ct+Et,Et);return Pt<0||Pt>rt.text.length?null:Pt}function Ko(rt,ct,Et){var Pt=xp(rt,ct.ch,Et);return Pt==null?null:new $e(ct.line,Pt,Et<0?"after":"before")}function pf(rt,ct,Et,Pt,Ot){if(rt){ct.doc.direction=="rtl"&&(Ot=-Ot);var $t=Qe(Et,ct.doc.direction);if($t){var ge=Ot<0?ke($t):$t[0],Te=Ot<0==(ge.level==1),Ee=Te?"after":"before",Be;if(ge.level>0||ct.doc.direction=="rtl"){var en=Ul(ct,Et);Be=Ot<0?Et.text.length-1:0;var ze=Is(ct,en,Be).top;Be=ye(function(gn){return Is(ct,en,gn).top==ze},Ot<0==(ge.level==1)?ge.from:ge.to-1,Be),Ee=="before"&&(Be=xp(Et,Be,1))}else Be=Ot<0?ge.to:ge.from;return new $e(Pt,Be,Ee)}}return new $e(Pt,Ot<0?Et.text.length:0,Ot<0?"before":"after")}function id(rt,ct,Et,Pt){var Ot=Qe(ct,rt.doc.direction);if(!Ot)return Ko(ct,Et,Pt);Et.ch>=ct.text.length?(Et.ch=ct.text.length,Et.sticky="before"):Et.ch<=0&&(Et.ch=0,Et.sticky="after");var $t=Oe(Ot,Et.ch,Et.sticky),ge=Ot[$t];if(rt.doc.direction=="ltr"&&ge.level%2==0&&(Pt>0?ge.to>Et.ch:ge.from<Et.ch))return Ko(ct,Et,Pt);var Te=function(Cr,Gr){return xp(ct,Cr instanceof $e?Cr.ch:Cr,Gr)},Ee,Be=function(Cr){return rt.options.lineWrapping?(Ee=Ee||Ul(rt,ct),Jo(rt,ct,Ee,Cr)):{begin:0,end:ct.text.length}},en=Be(Et.sticky=="before"?Te(Et,-1):Et.ch);if(rt.doc.direction=="rtl"||ge.level==1){var ze=ge.level==1==Pt<0,gn=Te(Et,ze?1:-1);if(gn!=null&&(ze?gn<=ge.to&&gn<=en.end:gn>=ge.from&&gn>=en.begin)){var fn=ze?"before":"after";return new $e(Et.line,gn,fn)}}var Un=function(Cr,Gr,Nr){for(var Hr=function(Po,ua){return ua?new $e(Et.line,Te(Po,1),"before"):new $e(Et.line,Po,"after")};Cr>=0&&Cr<Ot.length;Cr+=Gr){var ci=Ot[Cr],Lr=Gr>0==(ci.level!=1),Mi=Lr?Nr.begin:Te(Nr.end,-1);if(ci.from<=Mi&&Mi<ci.to||(Mi=Lr?ci.from:Te(ci.to,-1),Nr.begin<=Mi&&Mi<Nr.end))return Hr(Mi,Lr)}},Jn=Un($t+Pt,Pt,en);if(Jn)return Jn;var ar=Pt>0?en.end:Te(en.begin,-1);return ar!=null&&!(Pt>0&&ar==ct.text.length)&&(Jn=Un(Pt>0?0:Ot.length-1,Pt,Be(ar)),Jn)?Jn:null}var Ju={selectAll:Vo,singleSelection:function(rt){return rt.setSelection(rt.getCursor("anchor"),rt.getCursor("head"),ce)},killLine:function(rt){return Ms(rt,function(ct){if(ct.empty()){var Et=mn(rt.doc,ct.head.line).text.length;return ct.head.ch==Et&&ct.head.line<rt.lastLine()?{from:ct.head,to:$e(ct.head.line+1,0)}:{from:ct.head,to:$e(ct.head.line,Et)}}else return{from:ct.from(),to:ct.to()}})},deleteLine:function(rt){return Ms(rt,function(ct){return{from:$e(ct.from().line,0),to:Dn(rt.doc,$e(ct.to().line+1,0))}})},delLineLeft:function(rt){return Ms(rt,function(ct){return{from:$e(ct.from().line,0),to:ct.from()}})},delWrappedLineLeft:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Pt=rt.coordsChar({left:0,top:Et},"div");return{from:Pt,to:ct.from()}})},delWrappedLineRight:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Pt=rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:Et},"div");return{from:ct.from(),to:Pt}})},undo:function(rt){return rt.undo()},redo:function(rt){return rt.redo()},undoSelection:function(rt){return rt.undoSelection()},redoSelection:function(rt){return rt.redoSelection()},goDocStart:function(rt){return rt.extendSelection($e(rt.firstLine(),0))},goDocEnd:function(rt){return rt.extendSelection($e(rt.lastLine()))},goLineStart:function(rt){return rt.extendSelectionsBy(function(ct){return bc(rt,ct.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(rt){return rt.extendSelectionsBy(function(ct){return wp(rt,ct.head)},{origin:"+move",bias:1})},goLineEnd:function(rt){return rt.extendSelectionsBy(function(ct){return Pc(rt,ct.head.line)},{origin:"+move",bias:-1})},goLineRight:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:Et},"div")},le)},goLineLeft:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5;return rt.coordsChar({left:0,top:Et},"div")},le)},goLineLeftSmart:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5,Pt=rt.coordsChar({left:0,top:Et},"div");return Pt.ch<rt.getLine(Pt.line).search(/\S/)?wp(rt,ct.head):Pt},le)},goLineUp:function(rt){return rt.moveV(-1,"line")},goLineDown:function(rt){return rt.moveV(1,"line")},goPageUp:function(rt){return rt.moveV(-1,"page")},goPageDown:function(rt){return rt.moveV(1,"page")},goCharLeft:function(rt){return rt.moveH(-1,"char")},goCharRight:function(rt){return rt.moveH(1,"char")},goColumnLeft:function(rt){return rt.moveH(-1,"column")},goColumnRight:function(rt){return rt.moveH(1,"column")},goWordLeft:function(rt){return rt.moveH(-1,"word")},goGroupRight:function(rt){return rt.moveH(1,"group")},goGroupLeft:function(rt){return rt.moveH(-1,"group")},goWordRight:function(rt){return rt.moveH(1,"word")},delCharBefore:function(rt){return rt.deleteH(-1,"codepoint")},delCharAfter:function(rt){return rt.deleteH(1,"char")},delWordBefore:function(rt){return rt.deleteH(-1,"word")},delWordAfter:function(rt){return rt.deleteH(1,"word")},delGroupBefore:function(rt){return rt.deleteH(-1,"group")},delGroupAfter:function(rt){return rt.deleteH(1,"group")},indentAuto:function(rt){return rt.indentSelection("smart")},indentMore:function(rt){return rt.indentSelection("add")},indentLess:function(rt){return rt.indentSelection("subtract")},insertTab:function(rt){return rt.replaceSelection(" ")},insertSoftTab:function(rt){for(var ct=[],Et=rt.listSelections(),Pt=rt.options.tabSize,Ot=0;Ot<Et.length;Ot++){var $t=Et[Ot].from(),ge=Yt(rt.getLine($t.line),$t.ch,Pt);ct.push(me(Pt-ge%Pt))}rt.replaceSelections(ct)},defaultTab:function(rt){rt.somethingSelected()?rt.indentSelection("add"):rt.execCommand("insertTab")},transposeChars:function(rt){return Xi(rt,function(){for(var ct=rt.listSelections(),Et=[],Pt=0;Pt<ct.length;Pt++)if(ct[Pt].empty()){var Ot=ct[Pt].head,$t=mn(rt.doc,Ot.line).text;if($t){if(Ot.ch==$t.length&&(Ot=new $e(Ot.line,Ot.ch-1)),Ot.ch>0)Ot=new $e(Ot.line,Ot.ch+1),rt.replaceRange($t.charAt(Ot.ch-1)+$t.charAt(Ot.ch-2),$e(Ot.line,Ot.ch-2),Ot,"+transpose");else if(Ot.line>rt.doc.first){var ge=mn(rt.doc,Ot.line-1).text;ge&&(Ot=new $e(Ot.line,1),rt.replaceRange($t.charAt(0)+rt.doc.lineSeparator()+ge.charAt(ge.length-1),$e(Ot.line-1,ge.length-1),Ot,"+transpose"))}}Et.push(new to(Ot,Ot))}rt.setSelections(Et)})},newlineAndIndent:function(rt){return Xi(rt,function(){for(var ct=rt.listSelections(),Et=ct.length-1;Et>=0;Et--)rt.replaceRange(rt.doc.lineSeparator(),ct[Et].anchor,ct[Et].head,"+input");ct=rt.listSelections();for(var Pt=0;Pt<ct.length;Pt++)rt.indentLine(ct[Pt].from().line,null,!0);fu(rt)})},openLine:function(rt){return rt.replaceSelection(`
`,"start")},toggleOverwrite:function(rt){return rt.toggleOverwrite()}};function bc(rt,ct){var Et=mn(rt.doc,ct),Pt=gr(Et);return Pt!=Et&&(ct=je(Pt)),pf(!0,rt,Pt,ct,1)}function Pc(rt,ct){var Et=mn(rt.doc,ct),Pt=Ur(Et);return Pt!=Et&&(ct=je(Pt)),pf(!0,rt,Et,ct,-1)}function wp(rt,ct){var Et=bc(rt,ct.line),Pt=mn(rt.doc,Et.line),Ot=Qe(Pt,rt.doc.direction);if(!Ot||Ot[0].level==0){var $t=Math.max(Et.ch,Pt.text.search(/\S/)),ge=ct.line==Et.line&&ct.ch<=$t&&ct.ch;return $e(Et.line,ge?0:$t,Et.sticky)}return Et}function Cc(rt,ct,Et){if(typeof ct=="string"&&(ct=Ju[ct],!ct))return!1;rt.display.input.ensurePolled();var Pt=rt.display.shift,Ot=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Et&&(rt.display.shift=!1),Ot=ct(rt)!=we}finally{rt.display.shift=Pt,rt.state.suppressEdits=!1}return Ot}function bp(rt,ct,Et){for(var Pt=0;Pt<rt.state.keyMaps.length;Pt++){var Ot=rl(ct,rt.state.keyMaps[Pt],Et,rt);if(Ot)return Ot}return rt.options.extraKeys&&rl(ct,rt.options.extraKeys,Et,rt)||rl(ct,rt.options.keyMap,Et,rt)}var Xl=new ne;function Fh(rt,ct,Et,Pt){var Ot=rt.state.keySeq;if(Ot){if(wc(ct))return"handled";if(/\'$/.test(ct)?rt.state.keySeq=null:Xl.set(50,function(){rt.state.keySeq==Ot&&(rt.state.keySeq=null,rt.display.input.reset())}),od(rt,Ot+" "+ct,Et,Pt))return!0}return od(rt,ct,Et,Pt)}function od(rt,ct,Et,Pt){var Ot=bp(rt,ct,Pt);return Ot=="multi"&&(rt.state.keySeq=ct),Ot=="handled"&&Dr(rt,"keyHandled",rt,ct,Et),(Ot=="handled"||Ot=="multi")&&(bn(Et),$i(rt)),!!Ot}function ad(rt,ct){var Et=qg(ct,!0);return Et?ct.shiftKey&&!rt.state.keySeq?Fh(rt,"Shift-"+Et,ct,function(Pt){return Cc(rt,Pt,!0)})||Fh(rt,Et,ct,function(Pt){if(typeof Pt=="string"?/^go[A-Z]/.test(Pt):Pt.motion)return Cc(rt,Pt)}):Fh(rt,Et,ct,function(Pt){return Cc(rt,Pt)}):!1}function sd(rt,ct,Et){return Fh(rt,"'"+Et+"'",ct,function(Pt){return Cc(rt,Pt,!0)})}var Dh=null;function Pp(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&(ct.curOp.focus=Ut(),!He(ct,rt))){Bt&&vt<11&&rt.keyCode==27&&(rt.returnValue=!1);var Et=rt.keyCode;ct.display.shift=Et==16||rt.shiftKey;var Pt=ad(ct,rt);yt&&(Dh=Pt?Et:null,!Pt&&Et==88&&!Qn&&(at?rt.metaKey:rt.ctrlKey)&&ct.replaceSelection("",null,"cut")),ae&&!at&&!Pt&&Et==46&&rt.shiftKey&&!rt.ctrlKey&&document.execCommand&&document.execCommand("cut"),Et==18&&!/\bCodeMirror-crosshair\b/.test(ct.display.lineDiv.className)&&Cp(ct)}}function Cp(rt){var ct=rt.display.lineDiv;Vt(ct,"CodeMirror-crosshair");function Et(Pt){(Pt.keyCode==18||!Pt.altKey)&&(Dt(ct,"CodeMirror-crosshair"),Ue(document,"keyup",Et),Ue(document,"mouseover",Et))}nn(document,"keyup",Et),nn(document,"mouseover",Et)}function kp(rt){rt.keyCode==16&&(this.doc.sel.shift=!1),He(this,rt)}function jl(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&!(Uo(ct.display,rt)||He(ct,rt)||rt.ctrlKey&&!rt.altKey||at&&rt.metaKey)){var Et=rt.keyCode,Pt=rt.charCode;if(yt&&Et==Dh){Dh=null,bn(rt);return}if(!(yt&&(!rt.which||rt.which<10)&&ad(ct,rt))){var Ot=String.fromCharCode(Pt==null?Et:Pt);Ot!="\b"&&(sd(ct,rt,Ot)||ct.display.input.onKeyPress(rt))}}}var tm=400,Ep=function(rt,ct,Et){this.time=rt,this.pos=ct,this.button=Et};Ep.prototype.compare=function(rt,ct,Et){return this.time+tm>rt&&Tn(ct,this.pos)==0&&Et==this.button};var kc,Bh;function Mp(rt,ct){var Et=+new Date;return Bh&&Bh.compare(Et,rt,ct)?(kc=Bh=null,"triple"):kc&&kc.compare(Et,rt,ct)?(Bh=new Ep(Et,rt,ct),kc=null,"double"):(kc=new Ep(Et,rt,ct),Bh=null,"single")}function Ol(rt){var ct=this,Et=ct.display;if(!(He(ct,rt)||Et.activeTouch&&Et.input.supportsTouch())){if(Et.input.ensurePolled(),Et.shift=rt.shiftKey,Uo(Et,rt)){gt||(Et.scroller.draggable=!1,setTimeout(function(){return Et.scroller.draggable=!0},100));return}if(!hd(ct,rt)){var Pt=$a(ct,rt),Ot=pr(rt),$t=Pt?Mp(Pt,Ot):"single";window.focus(),Ot==1&&ct.state.selectingText&&ct.state.selectingText(rt),!(Pt&&Tp(ct,Ot,Pt,$t,rt))&&(Ot==1?Pt?em(ct,Pt,$t,rt):kr(rt)==Et.scroller&&bn(rt):Ot==2?(Pt&&td(ct.doc,Pt),setTimeout(function(){return Et.input.focus()},20)):Ot==3&&(bt?ct.display.input.onContextMenu(rt):Mo(ct)))}}}function Tp(rt,ct,Et,Pt,Ot){var $t="Click";return Pt=="double"?$t="Double"+$t:Pt=="triple"&&($t="Triple"+$t),$t=(ct==1?"Left":ct==2?"Middle":"Right")+$t,Fh(rt,Sp($t,Ot),Ot,function(ge){if(typeof ge=="string"&&(ge=Ju[ge]),!ge)return!1;var Te=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Te=ge(rt,Et)!=we}finally{rt.state.suppressEdits=!1}return Te})}function ld(rt,ct,Et){var Pt=rt.getOption("configureMouse"),Ot=Pt?Pt(rt,ct,Et):{};if(Ot.unit==null){var $t=it?Et.shiftKey&&Et.metaKey:Et.altKey;Ot.unit=$t?"rectangle":ct=="single"?"char":ct=="double"?"word":"line"}return(Ot.extend==null||rt.doc.extend)&&(Ot.extend=rt.doc.extend||Et.shiftKey),Ot.addNew==null&&(Ot.addNew=at?Et.metaKey:Et.ctrlKey),Ot.moveOnDrag==null&&(Ot.moveOnDrag=!(at?Et.altKey:Et.ctrlKey)),Ot}function em(rt,ct,Et,Pt){Bt?setTimeout(he(vo,rt),0):rt.curOp.focus=Ut();var Ot=ld(rt,Et,Pt),$t=rt.doc.sel,ge;rt.options.dragDrop&&Er&&!rt.isReadOnly()&&Et=="single"&&(ge=$t.contains(ct))>-1&&(Tn((ge=$t.ranges[ge]).from(),ct)<0||ct.xRel>0)&&(Tn(ge.to(),ct)>0||ct.xRel<0)?Lp(rt,Pt,ct,Ot):n0(rt,Pt,ct,Ot)}function Lp(rt,ct,Et,Pt){var Ot=rt.display,$t=!1,ge=sa(rt,function(Be){gt&&(Ot.scroller.draggable=!1),rt.state.draggingText=!1,Ue(Ot.wrapper.ownerDocument,"mouseup",ge),Ue(Ot.wrapper.ownerDocument,"mousemove",Te),Ue(Ot.scroller,"dragstart",Ee),Ue(Ot.scroller,"drop",ge),$t||(bn(Be),Pt.addNew||td(rt.doc,Et,null,null,Pt.extend),gt&&!Tt||Bt&&vt==9?setTimeout(function(){Ot.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ot.input.focus()},20):Ot.input.focus())}),Te=function(Be){$t=$t||Math.abs(ct.clientX-Be.clientX)+Math.abs(ct.clientY-Be.clientY)>=10},Ee=function(){return $t=!0};gt&&(Ot.scroller.draggable=!0),rt.state.draggingText=ge,ge.copy=!Pt.moveOnDrag,Ot.scroller.dragDrop&&Ot.scroller.dragDrop(),nn(Ot.wrapper.ownerDocument,"mouseup",ge),nn(Ot.wrapper.ownerDocument,"mousemove",Te),nn(Ot.scroller,"dragstart",Ee),nn(Ot.scroller,"drop",ge),Mo(rt),setTimeout(function(){return Ot.input.focus()},20)}function Ap(rt,ct,Et){if(Et=="char")return new to(ct,ct);if(Et=="word")return rt.findWordAt(ct);if(Et=="line")return new to($e(ct.line,0),Dn(rt.doc,$e(ct.line+1,0)));var Pt=Et(rt,ct);return new to(Pt.from,Pt.to)}function n0(rt,ct,Et,Pt){var Ot=rt.display,$t=rt.doc;bn(ct);var ge,Te,Ee=$t.sel,Be=Ee.ranges;if(Pt.addNew&&!Pt.extend?(Te=$t.sel.contains(Et),Te>-1?ge=Be[Te]:ge=new to(Et,Et)):(ge=$t.sel.primary(),Te=$t.sel.primIndex),Pt.unit=="rectangle")Pt.addNew||(ge=new to(Et,Et)),Et=$a(rt,ct,!0,!0),Te=-1;else{var en=Ap(rt,Et,Pt.unit);Pt.extend?ge=qf(ge,en.anchor,en.head,Pt.extend):ge=en}Pt.addNew?Te==-1?(Te=Be.length,Ua($t,ml(rt,Be.concat([ge]),Te),{scroll:!1,origin:"*mouse"})):Be.length>1&&Be[Te].empty()&&Pt.unit=="char"&&!Pt.extend?(Ua($t,ml(rt,Be.slice(0,Te).concat(Be.slice(Te+1)),0),{scroll:!1,origin:"*mouse"}),Ee=$t.sel):Xu($t,Te,ge,de):(Te=0,Ua($t,new el([ge],0),de),Ee=$t.sel);var ze=Et;function gn(Nr){if(Tn(ze,Nr)!=0)if(ze=Nr,Pt.unit=="rectangle"){for(var Hr=[],ci=rt.options.tabSize,Lr=Yt(mn($t,Et.line).text,Et.ch,ci),Mi=Yt(mn($t,Nr.line).text,Nr.ch,ci),Po=Math.min(Lr,Mi),ua=Math.max(Lr,Mi),Fo=Math.min(Et.line,Nr.line),ps=Math.min(rt.lastLine(),Math.max(Et.line,Nr.line));Fo<=ps;Fo++){var Wa=mn($t,Fo).text,qo=Ce(Wa,Po,ci);Po==ua?Hr.push(new to($e(Fo,qo),$e(Fo,qo))):Wa.length>qo&&Hr.push(new to($e(Fo,qo),$e(Fo,Ce(Wa,ua,ci))))}Hr.length||Hr.push(new to(Et,Et)),Ua($t,ml(rt,Ee.ranges.slice(0,Te).concat(Hr),Te),{origin:"*mouse",scroll:!1}),rt.scrollIntoView(Nr)}else{var Ts=ge,Fa=Ap(rt,Nr,Pt.unit),ta=Ts.anchor,Ki;Tn(Fa.anchor,ta)>0?(Ki=Fa.head,ta=On(Ts.from(),Fa.anchor)):(Ki=Fa.anchor,ta=xr(Ts.to(),Fa.head));var Ro=Ee.ranges.slice(0);Ro[Te]=nm(rt,new to(Dn($t,ta),Ki)),Ua($t,ml(rt,Ro,Te),de)}}var fn=Ot.wrapper.getBoundingClientRect(),Un=0;function Jn(Nr){var Hr=++Un,ci=$a(rt,Nr,!0,Pt.unit=="rectangle");if(ci)if(Tn(ci,ze)!=0){rt.curOp.focus=Ut(),gn(ci);var Lr=Fi(Ot,$t);(ci.line>=Lr.to||ci.line<Lr.from)&&setTimeout(sa(rt,function(){Un==Hr&&Jn(Nr)}),150)}else{var Mi=Nr.clientY<fn.top?-20:Nr.clientY>fn.bottom?20:0;Mi&&setTimeout(sa(rt,function(){Un==Hr&&(Ot.scroller.scrollTop+=Mi,Jn(Nr))}),50)}}function ar(Nr){rt.state.selectingText=!1,Un=1/0,Nr&&(bn(Nr),Ot.input.focus()),Ue(Ot.wrapper.ownerDocument,"mousemove",Cr),Ue(Ot.wrapper.ownerDocument,"mouseup",Gr),$t.history.lastSelOrigin=null}var Cr=sa(rt,function(Nr){Nr.buttons===0||!pr(Nr)?ar(Nr):Jn(Nr)}),Gr=sa(rt,ar);rt.state.selectingText=Gr,nn(Ot.wrapper.ownerDocument,"mousemove",Cr),nn(Ot.wrapper.ownerDocument,"mouseup",Gr)}function nm(rt,ct){var Et=ct.anchor,Pt=ct.head,Ot=mn(rt.doc,Et.line);if(Tn(Et,Pt)==0&&Et.sticky==Pt.sticky)return ct;var $t=Qe(Ot);if(!$t)return ct;var ge=Oe($t,Et.ch,Et.sticky),Te=$t[ge];if(Te.from!=Et.ch&&Te.to!=Et.ch)return ct;var Ee=ge+(Te.from==Et.ch==(Te.level!=1)?0:1);if(Ee==0||Ee==$t.length)return ct;var Be;if(Pt.line!=Et.line)Be=(Pt.line-Et.line)*(rt.doc.direction=="ltr"?1:-1)>0;else{var en=Oe($t,Pt.ch,Pt.sticky),ze=en-ge||(Pt.ch-Et.ch)*(Te.level==1?-1:1);en==Ee-1||en==Ee?Be=ze<0:Be=ze>0}var gn=$t[Ee+(Be?-1:0)],fn=Be==(gn.level==1),Un=fn?gn.from:gn.to,Jn=fn?"after":"before";return Et.ch==Un&&Et.sticky==Jn?ct:new to(new $e(Et.line,Un,Jn),Pt)}function ud(rt,ct,Et,Pt){var Ot,$t;if(ct.touches)Ot=ct.touches[0].clientX,$t=ct.touches[0].clientY;else try{Ot=ct.clientX,$t=ct.clientY}catch(gn){return!1}if(Ot>=Math.floor(rt.display.gutters.getBoundingClientRect().right))return!1;Pt&&bn(ct);var ge=rt.display,Te=ge.lineDiv.getBoundingClientRect();if($t>Te.bottom||!ln(rt,Et))return jn(ct);$t-=Te.top-ge.viewOffset;for(var Ee=0;Ee<rt.display.gutterSpecs.length;++Ee){var Be=ge.gutters.childNodes[Ee];if(Be&&Be.getBoundingClientRect().right>=Ot){var en=Ve(rt.doc,$t),ze=rt.display.gutterSpecs[Ee];return We(rt,Et,rt,en,ze.className,ct),jn(ct)}}}function hd(rt,ct){return ud(rt,ct,"gutterClick",!0)}function cd(rt,ct){Uo(rt.display,ct)||rm(rt,ct)||He(rt,ct,"contextmenu")||bt||rt.display.input.onContextMenu(ct)}function rm(rt,ct){return ln(rt,"gutterContextMenu")?ud(rt,ct,"gutterContextMenu",!1):!1}function fd(rt){rt.display.wrapper.className=rt.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+rt.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fu(rt)}var Qu={toString:function(){return"CodeMirror.Init"}},Np={},gf={};function im(rt){var ct=rt.optionHandlers;function Et(Pt,Ot,$t,ge){rt.defaults[Pt]=Ot,$t&&(ct[Pt]=ge?function(Te,Ee,Be){Be!=Qu&&$t(Te,Ee,Be)}:$t)}rt.defineOption=Et,rt.Init=Qu,Et("value","",function(Pt,Ot){return Pt.setValue(Ot)},!0),Et("mode",null,function(Pt,Ot){Pt.doc.modeOption=Ot,Ei(Pt)},!0),Et("indentUnit",2,Ei,!0),Et("indentWithTabs",!1),Et("smartIndent",!0),Et("tabSize",4,function(Pt){tf(Pt),Fu(Pt),bo(Pt)},!0),Et("lineSeparator",null,function(Pt,Ot){if(Pt.doc.lineSep=Ot,!!Ot){var $t=[],ge=Pt.doc.first;Pt.doc.iter(function(Ee){for(var Be=0;;){var en=Ee.text.indexOf(Ot,Be);if(en==-1)break;Be=en+Ot.length,$t.push($e(ge,en))}ge++});for(var Te=$t.length-1;Te>=0;Te--)Ah(Pt.doc,Ot,$t[Te],$e($t[Te].line,$t[Te].ch+Ot.length))}}),Et("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Pt,Ot,$t){Pt.state.specialChars=new RegExp(Ot.source+(Ot.test(" ")?"":"| "),"g"),$t!=Qu&&Pt.refresh()}),Et("specialCharPlaceholder",ra,function(Pt){return Pt.refresh()},!0),Et("electricChars",!0),Et("inputStyle",tt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Et("spellcheck",!1,function(Pt,Ot){return Pt.getInputField().spellcheck=Ot},!0),Et("autocorrect",!1,function(Pt,Ot){return Pt.getInputField().autocorrect=Ot},!0),Et("autocapitalize",!1,function(Pt,Ot){return Pt.getInputField().autocapitalize=Ot},!0),Et("rtlMoveVisually",!lt),Et("wholeLineUpdateBefore",!0),Et("theme","default",function(Pt){fd(Pt),_s(Pt)},!0),Et("keyMap","default",function(Pt,Ot,$t){var ge=Oh(Ot),Te=$t!=Qu&&Oh($t);Te&&Te.detach&&Te.detach(Pt,ge),ge.attach&&ge.attach(Pt,Te||null)}),Et("extraKeys",null),Et("configureMouse",null),Et("lineWrapping",!1,om,!0),Et("gutters",[],function(Pt,Ot){Pt.display.gutterSpecs=va(Ot,Pt.options.lineNumbers),_s(Pt)},!0),Et("fixedGutter",!0,function(Pt,Ot){Pt.display.gutters.style.left=Ot?Jc(Pt.display)+"px":"0",Pt.refresh()},!0),Et("coverGutterNextToScrollbar",!1,function(Pt){return Ru(Pt)},!0),Et("scrollbarStyle","native",function(Pt){ip(Pt),Ru(Pt),Pt.display.scrollbars.setScrollTop(Pt.doc.scrollTop),Pt.display.scrollbars.setScrollLeft(Pt.doc.scrollLeft)},!0),Et("lineNumbers",!1,function(Pt,Ot){Pt.display.gutterSpecs=va(Pt.options.gutters,Ot),_s(Pt)},!0),Et("firstLineNumber",1,_s,!0),Et("lineNumberFormatter",function(Pt){return Pt},_s,!0),Et("showCursorWhenSelecting",!1,aa,!0),Et("resetSelectionOnContextMenu",!0),Et("lineWiseCopyCut",!0),Et("pasteLinesPerSelection",!0),Et("selectionsMayTouch",!1),Et("readOnly",!1,function(Pt,Ot){Ot=="nocursor"&&(wh(Pt),Pt.display.input.blur()),Pt.display.input.readOnlyChanged(Ot)}),Et("screenReaderLabel",null,function(Pt,Ot){Ot=Ot===""?null:Ot,Pt.display.input.screenReaderLabelChanged(Ot)}),Et("disableInput",!1,function(Pt,Ot){Ot||Pt.display.input.reset()},!0),Et("dragDrop",!0,dd),Et("allowDropFileTypes",null),Et("cursorBlinkRate",530),Et("cursorScrollMargin",0),Et("cursorHeight",1,aa,!0),Et("singleCursorHeightPerLine",!0,aa,!0),Et("workTime",100),Et("workDelay",100),Et("flattenSpans",!0,tf,!0),Et("addModeClass",!1,tf,!0),Et("pollInterval",100),Et("undoDepth",200,function(Pt,Ot){return Pt.doc.history.undoDepth=Ot}),Et("historyEventDelay",1250),Et("viewportMargin",10,function(Pt){return Pt.refresh()},!0),Et("maxHighlightLength",1e4,tf,!0),Et("moveInputWithCursor",!0,function(Pt,Ot){Ot||Pt.display.input.resetPosition()}),Et("tabindex",null,function(Pt,Ot){return Pt.display.input.getField().tabIndex=Ot||""}),Et("autofocus",null),Et("direction","ltr",function(Pt,Ot){return Pt.doc.setDirection(Ot)},!0),Et("phrases",null)}function dd(rt,ct,Et){var Pt=Et&&Et!=Qu;if(!ct!=!Pt){var Ot=rt.display.dragFunctions,$t=ct?nn:Ue;$t(rt.display.scroller,"dragstart",Ot.start),$t(rt.display.scroller,"dragenter",Ot.enter),$t(rt.display.scroller,"dragover",Ot.over),$t(rt.display.scroller,"dragleave",Ot.leave),$t(rt.display.scroller,"drop",Ot.drop)}}function om(rt){rt.options.lineWrapping?(Vt(rt.display.wrapper,"CodeMirror-wrap"),rt.display.sizer.style.minWidth="",rt.display.sizerWidth=null):(Dt(rt.display.wrapper,"CodeMirror-wrap"),bi(rt)),Qr(rt),bo(rt),Fu(rt),setTimeout(function(){return Ru(rt)},100)}function Wi(rt,ct){var Et=this;if(!(this instanceof Wi))return new Wi(rt,ct);this.options=ct=ct?be(ct):{},be(Np,ct,!1);var Pt=ct.value;typeof Pt=="string"?Pt=new Oa(Pt,ct.mode,null,ct.lineSeparator,ct.direction):ct.mode&&(Pt.modeOption=ct.mode),this.doc=Pt;var Ot=new Wi.inputStyles[ct.inputStyle](this),$t=this.display=new Vu(rt,Pt,Ot,ct);$t.wrapper.CodeMirror=this,fd(this),ct.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ip(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 ne,keySeq:null,specialChars:null},ct.autofocus&&!tt&&$t.input.focus(),Bt&&vt<11&&setTimeout(function(){return Et.display.input.reset(!0)},20),Ec(this),Gs(),_u(this),this.curOp.forceUpdate=!0,Jf(this,Pt),ct.autofocus&&!tt||this.hasFocus()?setTimeout(function(){Et.hasFocus()&&!Et.state.focused&&Ri(Et)},20):wh(this);for(var ge in gf)gf.hasOwnProperty(ge)&&gf[ge](this,ct[ge],Qu);Qo(this),ct.finishInit&&ct.finishInit(this);for(var Te=0;Te<Ih.length;++Te)Ih[Te](this);zu(this),gt&&ct.lineWrapping&&getComputedStyle($t.lineDiv).textRendering=="optimizelegibility"&&($t.lineDiv.style.textRendering="auto")}Wi.defaults=Np,Wi.optionHandlers=gf;function Ec(rt){var ct=rt.display;nn(ct.scroller,"mousedown",sa(rt,Ol)),Bt&&vt<11?nn(ct.scroller,"dblclick",sa(rt,function(Ee){if(!He(rt,Ee)){var Be=$a(rt,Ee);if(!(!Be||hd(rt,Ee)||Uo(rt.display,Ee))){bn(Ee);var en=rt.findWordAt(Be);td(rt.doc,en.anchor,en.head)}}})):nn(ct.scroller,"dblclick",function(Ee){return He(rt,Ee)||bn(Ee)}),nn(ct.scroller,"contextmenu",function(Ee){return cd(rt,Ee)}),nn(ct.input.getField(),"contextmenu",function(Ee){ct.scroller.contains(Ee.target)||cd(rt,Ee)});var Et,Pt={end:0};function Ot(){ct.activeTouch&&(Et=setTimeout(function(){return ct.activeTouch=null},1e3),Pt=ct.activeTouch,Pt.end=+new Date)}function $t(Ee){if(Ee.touches.length!=1)return!1;var Be=Ee.touches[0];return Be.radiusX<=1&&Be.radiusY<=1}function ge(Ee,Be){if(Be.left==null)return!0;var en=Be.left-Ee.left,ze=Be.top-Ee.top;return en*en+ze*ze>20*20}nn(ct.scroller,"touchstart",function(Ee){if(!He(rt,Ee)&&!$t(Ee)&&!hd(rt,Ee)){ct.input.ensurePolled(),clearTimeout(Et);var Be=+new Date;ct.activeTouch={start:Be,moved:!1,prev:Be-Pt.end<=300?Pt:null},Ee.touches.length==1&&(ct.activeTouch.left=Ee.touches[0].pageX,ct.activeTouch.top=Ee.touches[0].pageY)}}),nn(ct.scroller,"touchmove",function(){ct.activeTouch&&(ct.activeTouch.moved=!0)}),nn(ct.scroller,"touchend",function(Ee){var Be=ct.activeTouch;if(Be&&!Uo(ct,Ee)&&Be.left!=null&&!Be.moved&&new Date-Be.start<300){var en=rt.coordsChar(ct.activeTouch,"page"),ze;!Be.prev||ge(Be,Be.prev)?ze=new to(en,en):!Be.prev.prev||ge(Be,Be.prev.prev)?ze=rt.findWordAt(en):ze=new to($e(en.line,0),Dn(rt.doc,$e(en.line+1,0))),rt.setSelection(ze.anchor,ze.head),rt.focus(),bn(Ee)}Ot()}),nn(ct.scroller,"touchcancel",Ot),nn(ct.scroller,"scroll",function(){ct.scroller.clientHeight&&(Ph(rt,ct.scroller.scrollTop),du(rt,ct.scroller.scrollLeft,!0),We(rt,"scroll",rt))}),nn(ct.scroller,"mousewheel",function(Ee){return ya(rt,Ee)}),nn(ct.scroller,"DOMMouseScroll",function(Ee){return ya(rt,Ee)}),nn(ct.wrapper,"scroll",function(){return ct.wrapper.scrollTop=ct.wrapper.scrollLeft=0}),ct.dragFunctions={enter:function(Ee){He(rt,Ee)||Kn(Ee)},over:function(Ee){He(rt,Ee)||(Jg(rt,Ee),Kn(Ee))},start:function(Ee){return Yg(rt,Ee)},drop:sa(rt,pp),leave:function(Ee){He(rt,Ee)||Qg(rt)}};var Te=ct.input.getField();nn(Te,"keyup",function(Ee){return kp.call(rt,Ee)}),nn(Te,"keydown",sa(rt,Pp)),nn(Te,"keypress",sa(rt,jl)),nn(Te,"focus",function(Ee){return Ri(rt,Ee)}),nn(Te,"blur",function(Ee){return wh(rt,Ee)})}var Ih=[];Wi.defineInitHook=function(rt){return Ih.push(rt)};function la(rt,ct,Et,Pt){var Ot=rt.doc,$t;Et==null&&(Et="add"),Et=="smart"&&(Ot.mode.indent?$t=xi(rt,ct).state:Et="prev");var ge=rt.options.tabSize,Te=mn(Ot,ct),Ee=Yt(Te.text,null,ge);Te.stateAfter&&(Te.stateAfter=null);var Be=Te.text.match(/^\s*/)[0],en;if(!Pt&&!/\S/.test(Te.text))en=0,Et="not";else if(Et=="smart"&&(en=Ot.mode.indent($t,Te.text.slice(Be.length),Te.text),en==we||en>150)){if(!Pt)return;Et="prev"}Et=="prev"?ct>Ot.first?en=Yt(mn(Ot,ct-1).text,null,ge):en=0:Et=="add"?en=Ee+rt.options.indentUnit:Et=="subtract"?en=Ee-rt.options.indentUnit:typeof Et=="number"&&(en=Ee+Et),en=Math.max(0,en);var ze="",gn=0;if(rt.options.indentWithTabs)for(var fn=Math.floor(en/ge);fn;--fn)gn+=ge,ze+=" ";if(gn<en&&(ze+=me(en-gn)),ze!=Be)return Ah(Ot,ze,$e(ct,0),$e(ct,Be.length),"+input"),Te.stateAfter=null,!0;for(var Un=0;Un<Ot.sel.ranges.length;Un++){var Jn=Ot.sel.ranges[Un];if(Jn.head.line==ct&&Jn.head.ch<Be.length){var ar=$e(ct,Be.length);Xu(Ot,Un,new to(ar,ar));break}}}var ds=null;function Rh(rt){ds=rt}function mf(rt,ct,Et,Pt,Ot){var $t=rt.doc;rt.display.shift=!1,Pt||(Pt=$t.sel);var ge=+new Date-200,Te=Ot=="paste"||rt.state.pasteIncoming>ge,Ee=Rr(ct),Be=null;if(Te&&Pt.ranges.length>1)if(ds&&ds.text.join(`
`)==ct){if(Pt.ranges.length%ds.text.length==0){Be=[];for(var en=0;en<ds.text.length;en++)Be.push($t.splitLines(ds.text[en]))}}else Ee.length==Pt.ranges.length&&rt.options.pasteLinesPerSelection&&(Be=pe(Ee,function(Cr){return[Cr]}));for(var ze=rt.curOp.updateInput,gn=Pt.ranges.length-1;gn>=0;gn--){var fn=Pt.ranges[gn],Un=fn.from(),Jn=fn.to();fn.empty()&&(Et&&Et>0?Un=$e(Un.line,Un.ch-Et):rt.state.overwrite&&!Te?Jn=$e(Jn.line,Math.min(mn($t,Jn.line).text.length,Jn.ch+ke(Ee).length)):Te&&ds&&ds.lineWise&&ds.text.join(`
`)==Ee.join(`
`)&&(Un=Jn=$e(Un.line,0)));var ar={from:Un,to:Jn,text:Be?Be[gn%Be.length]:Ee,origin:Ot||(Te?"paste":rt.state.cutIncoming>ge?"cut":"+input")};Yu(rt.doc,ar),Dr(rt,"inputRead",rt,ar)}ct&&!Te&&Op(rt,ct),fu(rt),rt.curOp.updateInput<2&&(rt.curOp.updateInput=ze),rt.curOp.typing=!0,rt.state.pasteIncoming=rt.state.cutIncoming=-1}function jp(rt,ct){var Et=rt.clipboardData&&rt.clipboardData.getData("Text");if(Et)return rt.preventDefault(),!ct.isReadOnly()&&!ct.options.disableInput&&Xi(ct,function(){return mf(ct,Et,0,null,"paste")}),!0}function Op(rt,ct){if(!(!rt.options.electricChars||!rt.options.smartIndent))for(var Et=rt.doc.sel,Pt=Et.ranges.length-1;Pt>=0;Pt--){var Ot=Et.ranges[Pt];if(!(Ot.head.ch>100||Pt&&Et.ranges[Pt-1].head.line==Ot.head.line)){var $t=rt.getModeAt(Ot.head),ge=!1;if($t.electricChars){for(var Te=0;Te<$t.electricChars.length;Te++)if(ct.indexOf($t.electricChars.charAt(Te))>-1){ge=la(rt,Ot.head.line,"smart");break}}else $t.electricInput&&$t.electricInput.test(mn(rt.doc,Ot.head.line).text.slice(0,Ot.head.ch))&&(ge=la(rt,Ot.head.line,"smart"));ge&&Dr(rt,"electricInput",rt,Ot.head.line)}}}function Fp(rt){for(var ct=[],Et=[],Pt=0;Pt<rt.doc.sel.ranges.length;Pt++){var Ot=rt.doc.sel.ranges[Pt].head.line,$t={anchor:$e(Ot,0),head:$e(Ot+1,0)};Et.push($t),ct.push(rt.getRange($t.anchor,$t.head))}return{text:ct,ranges:Et}}function Dp(rt,ct,Et,Pt){rt.setAttribute("autocorrect",Et?"":"off"),rt.setAttribute("autocapitalize",Pt?"":"off"),rt.setAttribute("spellcheck",!!ct)}function Bp(){var rt=Nt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ct=Nt("div",[rt],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return gt?rt.style.width="1000px":rt.setAttribute("wrap","off"),ft&&(rt.style.border="1px solid black"),Dp(rt),ct}function $u(rt){var ct=rt.optionHandlers,Et=rt.helpers={};rt.prototype={constructor:rt,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Pt,Ot){var $t=this.options,ge=$t[Pt];$t[Pt]==Ot&&Pt!="mode"||($t[Pt]=Ot,ct.hasOwnProperty(Pt)&&sa(this,ct[Pt])(this,Ot,ge),We(this,"optionChange",this,Pt))},getOption:function(Pt){return this.options[Pt]},getDoc:function(){return this.doc},addKeyMap:function(Pt,Ot){this.state.keyMaps[Ot?"push":"unshift"](Oh(Pt))},removeKeyMap:function(Pt){for(var Ot=this.state.keyMaps,$t=0;$t<Ot.length;++$t)if(Ot[$t]==Pt||Ot[$t].name==Pt)return Ot.splice($t,1),!0},addOverlay:pa(function(Pt,Ot){var $t=Pt.token?Pt:rt.getMode(this.options,Pt);if($t.startState)throw new Error("Overlays may not be stateful.");qt(this.state.overlays,{mode:$t,modeSpec:Pt,opaque:Ot&&Ot.opaque,priority:Ot&&Ot.priority||0},function(ge){return ge.priority}),this.state.modeGen++,bo(this)}),removeOverlay:pa(function(Pt){for(var Ot=this.state.overlays,$t=0;$t<Ot.length;++$t){var ge=Ot[$t].modeSpec;if(ge==Pt||typeof Pt=="string"&&ge.name==Pt){Ot.splice($t,1),this.state.modeGen++,bo(this);return}}}),indentLine:pa(function(Pt,Ot,$t){typeof Ot!="string"&&typeof Ot!="number"&&(Ot==null?Ot=this.options.smartIndent?"smart":"prev":Ot=Ot?"add":"subtract"),An(this.doc,Pt)&&la(this,Pt,Ot,$t)}),indentSelection:pa(function(Pt){for(var Ot=this.doc.sel.ranges,$t=-1,ge=0;ge<Ot.length;ge++){var Te=Ot[ge];if(Te.empty())Te.head.line>$t&&(la(this,Te.head.line,Pt,!0),$t=Te.head.line,ge==this.doc.sel.primIndex&&fu(this));else{var Ee=Te.from(),Be=Te.to(),en=Math.max($t,Ee.line);$t=Math.min(this.lastLine(),Be.line-(Be.ch?0:1))+1;for(var ze=en;ze<$t;++ze)la(this,ze,Pt);var gn=this.doc.sel.ranges;Ee.ch==0&&Ot.length==gn.length&&gn[ge].from().ch>0&&Xu(this.doc,ge,new to(Ee,gn[ge].to()),ce)}}}),getTokenAt:function(Pt,Ot){return oi(this,Pt,Ot)},getLineTokens:function(Pt,Ot){return oi(this,$e(Pt),Ot,!0)},getTokenTypeAt:function(Pt){Pt=Dn(this.doc,Pt);var Ot=ei(this,mn(this.doc,Pt.line)),$t=0,ge=(Ot.length-1)/2,Te=Pt.ch,Ee;if(Te==0)Ee=Ot[2];else for(;;){var Be=$t+ge>>1;if((Be?Ot[Be*2-1]:0)>=Te)ge=Be;else if(Ot[Be*2+1]<Te)$t=Be+1;else{Ee=Ot[Be*2+2];break}}var en=Ee?Ee.indexOf("overlay "):-1;return en<0?Ee:en==0?null:Ee.slice(0,en-1)},getModeAt:function(Pt){var Ot=this.doc.mode;return Ot.innerMode?rt.innerMode(Ot,this.getTokenAt(Pt).state).mode:Ot},getHelper:function(Pt,Ot){return this.getHelpers(Pt,Ot)[0]},getHelpers:function(Pt,Ot){var $t=[];if(!Et.hasOwnProperty(Ot))return $t;var ge=Et[Ot],Te=this.getModeAt(Pt);if(typeof Te[Ot]=="string")ge[Te[Ot]]&&$t.push(ge[Te[Ot]]);else if(Te[Ot])for(var Ee=0;Ee<Te[Ot].length;Ee++){var Be=ge[Te[Ot][Ee]];Be&&$t.push(Be)}else Te.helperType&&ge[Te.helperType]?$t.push(ge[Te.helperType]):ge[Te.name]&&$t.push(ge[Te.name]);for(var en=0;en<ge._global.length;en++){var ze=ge._global[en];ze.pred(Te,this)&&ve($t,ze.val)==-1&&$t.push(ze.val)}return $t},getStateAfter:function(Pt,Ot){var $t=this.doc;return Pt=Fn($t,Pt==null?$t.first+$t.size-1:Pt),xi(this,Pt+1,Ot).state},cursorCoords:function(Pt,Ot){var $t,ge=this.doc.sel.primary();return Pt==null?$t=ge.head:typeof Pt=="object"?$t=Dn(this.doc,Pt):$t=Pt?ge.from():ge.to(),mo(this,$t,Ot||"page")},charCoords:function(Pt,Ot){return Du(this,Dn(this.doc,Pt),Ot||"page")},coordsChar:function(Pt,Ot){return Pt=cc(this,Pt,Ot||"page"),ja(this,Pt.left,Pt.top)},lineAtHeight:function(Pt,Ot){return Pt=cc(this,{top:Pt,left:0},Ot||"page").top,Ve(this.doc,Pt+this.display.viewOffset)},heightAtLine:function(Pt,Ot,$t){var ge=!1,Te;if(typeof Pt=="number"){var Ee=this.doc.first+this.doc.size-1;Pt<this.doc.first?Pt=this.doc.first:Pt>Ee&&(Pt=Ee,ge=!0),Te=mn(this.doc,Pt)}else Te=Pt;return oa(this,Te,{top:0,left:0},Ot||"page",$t||ge).top+(ge?this.doc.height-Ci(Te):0)},defaultTextHeight:function(){return Qa(this.display)},defaultCharWidth:function(){return gl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Pt,Ot,$t,ge,Te){var Ee=this.display;Pt=mo(this,Dn(this.doc,Pt));var Be=Pt.bottom,en=Pt.left;if(Ot.style.position="absolute",Ot.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ot),Ee.sizer.appendChild(Ot),ge=="over")Be=Pt.top;else if(ge=="above"||ge=="near"){var ze=Math.max(Ee.wrapper.clientHeight,this.doc.height),gn=Math.max(Ee.sizer.clientWidth,Ee.lineSpace.clientWidth);(ge=="above"||Pt.bottom+Ot.offsetHeight>ze)&&Pt.top>Ot.offsetHeight?Be=Pt.top-Ot.offsetHeight:Pt.bottom+Ot.offsetHeight<=ze&&(Be=Pt.bottom),en+Ot.offsetWidth>gn&&(en=gn-Ot.offsetWidth)}Ot.style.top=Be+"px",Ot.style.left=Ot.style.right="",Te=="right"?(en=Ee.sizer.clientWidth-Ot.offsetWidth,Ot.style.right="0px"):(Te=="left"?en=0:Te=="middle"&&(en=(Ee.sizer.clientWidth-Ot.offsetWidth)/2),Ot.style.left=en+"px"),$t&&Qc(this,{left:en,top:Be,right:en+Ot.offsetWidth,bottom:Be+Ot.offsetHeight})},triggerOnKeyDown:pa(Pp),triggerOnKeyPress:pa(jl),triggerOnKeyUp:kp,triggerOnMouseDown:pa(Ol),execCommand:function(Pt){if(Ju.hasOwnProperty(Pt))return Ju[Pt].call(null,this)},triggerElectric:pa(function(Pt){Op(this,Pt)}),findPosH:function(Pt,Ot,$t,ge){var Te=1;Ot<0&&(Te=-1,Ot=-Ot);for(var Ee=Dn(this.doc,Pt),Be=0;Be<Ot&&(Ee=vf(this.doc,Ee,Te,$t,ge),!Ee.hitSide);++Be);return Ee},moveH:pa(function(Pt,Ot){var $t=this;this.extendSelectionsBy(function(ge){return $t.display.shift||$t.doc.extend||ge.empty()?vf($t.doc,ge.head,Pt,Ot,$t.options.rtlMoveVisually):Pt<0?ge.from():ge.to()},le)}),deleteH:pa(function(Pt,Ot){var $t=this.doc.sel,ge=this.doc;$t.somethingSelected()?ge.replaceSelection("",null,"+delete"):Ms(this,function(Te){var Ee=vf(ge,Te.head,Pt,Ot,!1);return Pt<0?{from:Ee,to:Te.head}:{from:Te.head,to:Ee}})}),findPosV:function(Pt,Ot,$t,ge){var Te=1,Ee=ge;Ot<0&&(Te=-1,Ot=-Ot);for(var Be=Dn(this.doc,Pt),en=0;en<Ot;++en){var ze=mo(this,Be,"div");if(Ee==null?Ee=ze.left:ze.left=Ee,Be=qu(this,ze,Te,$t),Be.hitSide)break}return Be},moveV:pa(function(Pt,Ot){var $t=this,ge=this.doc,Te=[],Ee=!this.display.shift&&!ge.extend&&ge.sel.somethingSelected();if(ge.extendSelectionsBy(function(en){if(Ee)return Pt<0?en.from():en.to();var ze=mo($t,en.head,"div");en.goalColumn!=null&&(ze.left=en.goalColumn),Te.push(ze.left);var gn=qu($t,ze,Pt,Ot);return Ot=="page"&&en==ge.sel.primary()&&Hf($t,Du($t,gn,"div").top-ze.top),gn},le),Te.length)for(var Be=0;Be<ge.sel.ranges.length;Be++)ge.sel.ranges[Be].goalColumn=Te[Be]}),findWordAt:function(Pt){var Ot=this.doc,$t=mn(Ot,Pt.line).text,ge=Pt.ch,Te=Pt.ch;if($t){var Ee=this.getHelper(Pt,"wordChars");(Pt.sticky=="before"||Te==$t.length)&&ge?--ge:++Te;for(var Be=$t.charAt(ge),en=ee(Be,Ee)?function(ze){return ee(ze,Ee)}:/\s/.test(Be)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!ee(ze)};ge>0&&en($t.charAt(ge-1));)--ge;for(;Te<$t.length&&en($t.charAt(Te));)++Te}return new to($e(Pt.line,ge),$e(Pt.line,Te))},toggleOverwrite:function(Pt){Pt!=null&&Pt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Vt(this.display.cursorDiv,"CodeMirror-overwrite"):Dt(this.display.cursorDiv,"CodeMirror-overwrite"),We(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ut()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:pa(function(Pt,Ot){bh(this,Pt,Ot)}),getScrollInfo:function(){var Pt=this.display.scroller;return{left:Pt.scrollLeft,top:Pt.scrollTop,height:Pt.scrollHeight-Aa(this)-this.display.barHeight,width:Pt.scrollWidth-Aa(this)-this.display.barWidth,clientHeight:Tl(this),clientWidth:Ps(this)}},scrollIntoView:pa(function(Pt,Ot){Pt==null?(Pt={from:this.doc.sel.primary().head,to:null},Ot==null&&(Ot=this.options.cursorScrollMargin)):typeof Pt=="number"?Pt={from:$e(Pt,0),to:null}:Pt.from==null&&(Pt={from:Pt,to:null}),Pt.to||(Pt.to=Pt.from),Pt.margin=Ot||0,Pt.from.line!=null?_i(this,Pt):Vf(this,Pt.from,Pt.to,Pt.margin)}),setSize:pa(function(Pt,Ot){var $t=this,ge=function(Ee){return typeof Ee=="number"||/^\d+$/.test(String(Ee))?Ee+"px":Ee};Pt!=null&&(this.display.wrapper.style.width=ge(Pt)),Ot!=null&&(this.display.wrapper.style.height=ge(Ot)),this.options.lineWrapping&&Ou(this);var Te=this.display.viewFrom;this.doc.iter(Te,this.display.viewTo,function(Ee){if(Ee.widgets){for(var Be=0;Be<Ee.widgets.length;Be++)if(Ee.widgets[Be].noHScroll){ki($t,Te,"widget");break}}++Te}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(Pt){return Xi(this,Pt)},startOperation:function(){return _u(this)},endOperation:function(){return zu(this)},refresh:pa(function(){var Pt=this.display.cachedTextHeight;bo(this),this.curOp.forceUpdate=!0,Fu(this),bh(this,this.doc.scrollLeft,this.doc.scrollTop),Wu(this.display),(Pt==null||Math.abs(Pt-Qa(this.display))>.5||this.options.lineWrapping)&&Qr(this),We(this,"refresh",this)}),swapDoc:pa(function(Pt){var Ot=this.doc;return Ot.cm=null,this.state.selectingText&&this.state.selectingText(),Jf(this,Pt),Fu(this),this.display.input.reset(),bh(this,Pt.scrollLeft,Pt.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,Ot),Ot}),phrase:function(Pt){var Ot=this.options.phrases;return Ot&&Object.prototype.hasOwnProperty.call(Ot,Pt)?Ot[Pt]:Pt},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}},un(rt),rt.registerHelper=function(Pt,Ot,$t){Et.hasOwnProperty(Pt)||(Et[Pt]=rt[Pt]={_global:[]}),Et[Pt][Ot]=$t},rt.registerGlobalHelper=function(Pt,Ot,$t,ge){rt.registerHelper(Pt,Ot,ge),Et[Pt]._global.push({pred:$t,val:ge})}}function vf(rt,ct,Et,Pt,Ot){var $t=ct,ge=Et,Te=mn(rt,ct.line),Ee=Ot&&rt.direction=="rtl"?-Et:Et;function Be(){var Gr=ct.line+Ee;return Gr<rt.first||Gr>=rt.first+rt.size?!1:(ct=new $e(Gr,ct.ch,ct.sticky),Te=mn(rt,Gr))}function en(Gr){var Nr;if(Pt=="codepoint"){var Hr=Te.text.charCodeAt(ct.ch+(Pt>0?0:-1));isNaN(Hr)?Nr=null:Nr=new $e(ct.line,Math.max(0,Math.min(Te.text.length,ct.ch+Et*(Hr>=55296&&Hr<56320?2:1))),-Et)}else Ot?Nr=id(rt.cm,Te,ct,Et):Nr=Ko(Te,ct,Et);if(Nr==null)if(!Gr&&Be())ct=pf(Ot,rt.cm,Te,ct.line,Ee);else return!1;else ct=Nr;return!0}if(Pt=="char"||Pt=="codepoint")en();else if(Pt=="column")en(!0);else if(Pt=="word"||Pt=="group")for(var ze=null,gn=Pt=="group",fn=rt.cm&&rt.cm.getHelper(ct,"wordChars"),Un=!0;!(Et<0&&!en(!Un));Un=!1){var Jn=Te.text.charAt(ct.ch)||`
`,ar=ee(Jn,fn)?"w":gn&&Jn==`
`?"n":!gn||/\s/.test(Jn)?null:"p";if(gn&&!Un&&!ar&&(ar="s"),ze&&ze!=ar){Et<0&&(Et=1,en(),ct.sticky="after");break}if(ar&&(ze=ar),Et>0&&!en(!Un))break}var Cr=lf(rt,ct,$t,ge,!0);return Xn($t,Cr)&&(Cr.hitSide=!0),Cr}function qu(rt,ct,Et,Pt){var Ot=rt.doc,$t=ct.left,ge;if(Pt=="page"){var Te=Math.min(rt.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ee=Math.max(Te-.5*Qa(rt.display),3);ge=(Et>0?ct.bottom:ct.top)+Et*Ee}else Pt=="line"&&(ge=Et>0?ct.bottom+3:ct.top-3);for(var Be;Be=ja(rt,$t,ge),!!Be.outside;){if(Et<0?ge<=0:ge>=Ot.height){Be.hitSide=!0;break}ge+=Et*5}return Be}var uo=function(rt){this.cm=rt,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};uo.prototype.init=function(rt){var ct=this,Et=this,Pt=Et.cm,Ot=Et.div=rt.lineDiv;Dp(Ot,Pt.options.spellcheck,Pt.options.autocorrect,Pt.options.autocapitalize);function $t(Te){for(var Ee=Te.target;Ee;Ee=Ee.parentNode){if(Ee==Ot)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ee.className))break}return!1}nn(Ot,"paste",function(Te){!$t(Te)||He(Pt,Te)||jp(Te,Pt)||vt<=11&&setTimeout(sa(Pt,function(){return ct.updateFromDOM()}),20)}),nn(Ot,"compositionstart",function(Te){ct.composing={data:Te.data,done:!1}}),nn(Ot,"compositionupdate",function(Te){ct.composing||(ct.composing={data:Te.data,done:!1})}),nn(Ot,"compositionend",function(Te){ct.composing&&(Te.data!=ct.composing.data&&ct.readFromDOMSoon(),ct.composing.done=!0)}),nn(Ot,"touchstart",function(){return Et.forceCompositionEnd()}),nn(Ot,"input",function(){ct.composing||ct.readFromDOMSoon()});function ge(Te){if(!(!$t(Te)||He(Pt,Te))){if(Pt.somethingSelected())Rh({lineWise:!1,text:Pt.getSelections()}),Te.type=="cut"&&Pt.replaceSelection("",null,"cut");else if(Pt.options.lineWiseCopyCut){var Ee=Fp(Pt);Rh({lineWise:!0,text:Ee.text}),Te.type=="cut"&&Pt.operation(function(){Pt.setSelections(Ee.ranges,0,ce),Pt.replaceSelection("",null,"cut")})}else return;if(Te.clipboardData){Te.clipboardData.clearData();var Be=ds.text.join(`
`);if(Te.clipboardData.setData("Text",Be),Te.clipboardData.getData("Text")==Be){Te.preventDefault();return}}var en=Bp(),ze=en.firstChild;Pt.display.lineSpace.insertBefore(en,Pt.display.lineSpace.firstChild),ze.value=ds.text.join(`
`);var gn=document.activeElement;se(ze),setTimeout(function(){Pt.display.lineSpace.removeChild(en),gn.focus(),gn==Ot&&Et.showPrimarySelection()},50)}}nn(Ot,"copy",ge),nn(Ot,"cut",ge)},uo.prototype.screenReaderLabelChanged=function(rt){rt?this.div.setAttribute("aria-label",rt):this.div.removeAttribute("aria-label")},uo.prototype.prepareSelection=function(){var rt=Bu(this.cm,!1);return rt.focus=document.activeElement==this.div,rt},uo.prototype.showSelection=function(rt,ct){!rt||!this.cm.display.view.length||((rt.focus||ct)&&this.showPrimarySelection(),this.showMultipleSelections(rt))},uo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},uo.prototype.showPrimarySelection=function(){var rt=this.getSelection(),ct=this.cm,Et=ct.doc.sel.primary(),Pt=Et.from(),Ot=Et.to();if(ct.display.viewTo==ct.display.viewFrom||Pt.line>=ct.display.viewTo||Ot.line<ct.display.viewFrom){rt.removeAllRanges();return}var $t=yf(ct,rt.anchorNode,rt.anchorOffset),ge=yf(ct,rt.focusNode,rt.focusOffset);if(!($t&&!$t.bad&&ge&&!ge.bad&&Tn(On($t,ge),Pt)==0&&Tn(xr($t,ge),Ot)==0)){var Te=ct.display.view,Ee=Pt.line>=ct.display.viewFrom&&pd(ct,Pt)||{node:Te[0].measure.map[2],offset:0},Be=Ot.line<ct.display.viewTo&&pd(ct,Ot);if(!Be){var en=Te[Te.length-1].measure,ze=en.maps?en.maps[en.maps.length-1]:en.map;Be={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!Ee||!Be){rt.removeAllRanges();return}var gn=rt.rangeCount&&rt.getRangeAt(0),fn;try{fn=Wt(Ee.node,Ee.offset,Be.offset,Be.node)}catch(Un){}fn&&(!ae&&ct.state.focused?(rt.collapse(Ee.node,Ee.offset),fn.collapsed||(rt.removeAllRanges(),rt.addRange(fn))):(rt.removeAllRanges(),rt.addRange(fn)),gn&&rt.anchorNode==null?rt.addRange(gn):ae&&this.startGracePeriod()),this.rememberSelection()}},uo.prototype.startGracePeriod=function(){var rt=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){rt.gracePeriod=!1,rt.selectionChanged()&&rt.cm.operation(function(){return rt.cm.curOp.selectionChanged=!0})},20)},uo.prototype.showMultipleSelections=function(rt){jt(this.cm.display.cursorDiv,rt.cursors),jt(this.cm.display.selectionDiv,rt.selection)},uo.prototype.rememberSelection=function(){var rt=this.getSelection();this.lastAnchorNode=rt.anchorNode,this.lastAnchorOffset=rt.anchorOffset,this.lastFocusNode=rt.focusNode,this.lastFocusOffset=rt.focusOffset},uo.prototype.selectionInEditor=function(){var rt=this.getSelection();if(!rt.rangeCount)return!1;var ct=rt.getRangeAt(0).commonAncestorContainer;return Jt(this.div,ct)},uo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},uo.prototype.blur=function(){this.div.blur()},uo.prototype.getField=function(){return this.div},uo.prototype.supportsTouch=function(){return!0},uo.prototype.receivedFocus=function(){var rt=this;this.selectionInEditor()?this.pollSelection():Xi(this.cm,function(){return rt.cm.curOp.selectionChanged=!0});function ct(){rt.cm.state.focused&&(rt.pollSelection(),rt.polling.set(rt.cm.options.pollInterval,ct))}this.polling.set(this.cm.options.pollInterval,ct)},uo.prototype.selectionChanged=function(){var rt=this.getSelection();return rt.anchorNode!=this.lastAnchorNode||rt.anchorOffset!=this.lastAnchorOffset||rt.focusNode!=this.lastFocusNode||rt.focusOffset!=this.lastFocusOffset},uo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var rt=this.getSelection(),ct=this.cm;if(z&&Ct&&this.cm.display.gutterSpecs.length&&Ip(rt.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Et=yf(ct,rt.anchorNode,rt.anchorOffset),Pt=yf(ct,rt.focusNode,rt.focusOffset);Et&&Pt&&Xi(ct,function(){Ua(ct.doc,pu(Et,Pt),ce),(Et.bad||Pt.bad)&&(ct.curOp.selectionChanged=!0)})}}},uo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var rt=this.cm,ct=rt.display,Et=rt.doc.sel.primary(),Pt=Et.from(),Ot=Et.to();if(Pt.ch==0&&Pt.line>rt.firstLine()&&(Pt=$e(Pt.line-1,mn(rt.doc,Pt.line-1).length)),Ot.ch==mn(rt.doc,Ot.line).text.length&&Ot.line<rt.lastLine()&&(Ot=$e(Ot.line+1,0)),Pt.line<ct.viewFrom||Ot.line>ct.viewTo-1)return!1;var $t,ge,Te;Pt.line==ct.viewFrom||($t=Rs(rt,Pt.line))==0?(ge=je(ct.view[0].line),Te=ct.view[0].node):(ge=je(ct.view[$t].line),Te=ct.view[$t-1].node.nextSibling);var Ee=Rs(rt,Ot.line),Be,en;if(Ee==ct.view.length-1?(Be=ct.viewTo-1,en=ct.lineDiv.lastChild):(Be=je(ct.view[Ee+1].line)-1,en=ct.view[Ee+1].node.previousSibling),!Te)return!1;for(var ze=rt.doc.splitLines(Tc(rt,Te,en,ge,Be)),gn=$n(rt.doc,$e(ge,0),$e(Be,mn(rt.doc,Be).text.length));ze.length>1&&gn.length>1;)if(ke(ze)==ke(gn))ze.pop(),gn.pop(),Be--;else if(ze[0]==gn[0])ze.shift(),gn.shift(),ge++;else break;for(var fn=0,Un=0,Jn=ze[0],ar=gn[0],Cr=Math.min(Jn.length,ar.length);fn<Cr&&Jn.charCodeAt(fn)==ar.charCodeAt(fn);)++fn;for(var Gr=ke(ze),Nr=ke(gn),Hr=Math.min(Gr.length-(ze.length==1?fn:0),Nr.length-(gn.length==1?fn:0));Un<Hr&&Gr.charCodeAt(Gr.length-Un-1)==Nr.charCodeAt(Nr.length-Un-1);)++Un;if(ze.length==1&&gn.length==1&&ge==Pt.line)for(;fn&&fn>Pt.ch&&Gr.charCodeAt(Gr.length-Un-1)==Nr.charCodeAt(Nr.length-Un-1);)fn--,Un++;ze[ze.length-1]=Gr.slice(0,Gr.length-Un).replace(/^\u200b+/,""),ze[0]=ze[0].slice(fn).replace(/\u200b+$/,"");var ci=$e(ge,fn),Lr=$e(Be,gn.length?ke(gn).length-Un:0);if(ze.length>1||ze[0]||Tn(ci,Lr))return Ah(rt.doc,ze,ci,Lr,"+input"),!0},uo.prototype.ensurePolled=function(){this.forceCompositionEnd()},uo.prototype.reset=function(){this.forceCompositionEnd()},uo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},uo.prototype.readFromDOMSoon=function(){var rt=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(rt.readDOMTimeout=null,rt.composing)if(rt.composing.done)rt.composing=null;else return;rt.updateFromDOM()},80))},uo.prototype.updateFromDOM=function(){var rt=this;(this.cm.isReadOnly()||!this.pollContent())&&Xi(this.cm,function(){return bo(rt.cm)})},uo.prototype.setUneditable=function(rt){rt.contentEditable="false"},uo.prototype.onKeyPress=function(rt){rt.charCode==0||this.composing||(rt.preventDefault(),this.cm.isReadOnly()||sa(this.cm,mf)(this.cm,String.fromCharCode(rt.charCode==null?rt.keyCode:rt.charCode),0))},uo.prototype.readOnlyChanged=function(rt){this.div.contentEditable=String(rt!="nocursor")},uo.prototype.onContextMenu=function(){},uo.prototype.resetPosition=function(){},uo.prototype.needsContentAttribute=!0;function pd(rt,ct){var Et=pl(rt,ct.line);if(!Et||Et.hidden)return null;var Pt=mn(rt.doc,ct.line),Ot=ju(Et,Pt,ct.line),$t=Qe(Pt,rt.doc.direction),ge="left";if($t){var Te=Oe($t,ct.ch);ge=Te%2?"right":"left"}var Ee=uc(Ot.map,ct.ch,ge);return Ee.offset=Ee.collapse=="right"?Ee.end:Ee.start,Ee}function Ip(rt){for(var ct=rt;ct;ct=ct.parentNode)if(/CodeMirror-gutter-wrapper/.test(ct.className))return!0;return!1}function Mc(rt,ct){return ct&&(rt.bad=!0),rt}function Tc(rt,ct,Et,Pt,Ot){var $t="",ge=!1,Te=rt.doc.lineSeparator(),Ee=!1;function Be(fn){return function(Un){return Un.id==fn}}function en(){ge&&($t+=Te,Ee&&($t+=Te),ge=Ee=!1)}function ze(fn){fn&&(en(),$t+=fn)}function gn(fn){if(fn.nodeType==1){var Un=fn.getAttribute("cm-text");if(Un){ze(Un);return}var Jn=fn.getAttribute("cm-marker"),ar;if(Jn){var Cr=rt.findMarks($e(Pt,0),$e(Ot+1,0),Be(+Jn));Cr.length&&(ar=Cr[0].find(0))&&ze($n(rt.doc,ar.from,ar.to).join(Te));return}if(fn.getAttribute("contenteditable")=="false")return;var Gr=/^(pre|div|p|li|table|br)$/i.test(fn.nodeName);if(!/^br$/i.test(fn.nodeName)&&fn.textContent.length==0)return;Gr&&en();for(var Nr=0;Nr<fn.childNodes.length;Nr++)gn(fn.childNodes[Nr]);/^(pre|p)$/i.test(fn.nodeName)&&(Ee=!0),Gr&&(ge=!0)}else fn.nodeType==3&&ze(fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;gn(ct),ct!=Et;)ct=ct.nextSibling,Ee=!1;return $t}function yf(rt,ct,Et){var Pt;if(ct==rt.display.lineDiv){if(Pt=rt.display.lineDiv.childNodes[Et],!Pt)return Mc(rt.clipPos($e(rt.display.viewTo-1)),!0);ct=null,Et=0}else for(Pt=ct;;Pt=Pt.parentNode){if(!Pt||Pt==rt.display.lineDiv)return null;if(Pt.parentNode&&Pt.parentNode==rt.display.lineDiv)break}for(var Ot=0;Ot<rt.display.view.length;Ot++){var $t=rt.display.view[Ot];if($t.node==Pt)return am($t,ct,Et)}}function am(rt,ct,Et){var Pt=rt.text.firstChild,Ot=!1;if(!ct||!Jt(Pt,ct))return Mc($e(je(rt.line),0),!0);if(ct==Pt&&(Ot=!0,ct=Pt.childNodes[Et],Et=0,!ct)){var $t=rt.rest?ke(rt.rest):rt.line;return Mc($e(je($t),$t.text.length),Ot)}var ge=ct.nodeType==3?ct:null,Te=ct;for(!ge&&ct.childNodes.length==1&&ct.firstChild.nodeType==3&&(ge=ct.firstChild,Et&&(Et=ge.nodeValue.length));Te.parentNode!=Pt;)Te=Te.parentNode;var Ee=rt.measure,Be=Ee.maps;function en(ar,Cr,Gr){for(var Nr=-1;Nr<(Be?Be.length:0);Nr++)for(var Hr=Nr<0?Ee.map:Be[Nr],ci=0;ci<Hr.length;ci+=3){var Lr=Hr[ci+2];if(Lr==ar||Lr==Cr){var Mi=je(Nr<0?rt.line:rt.rest[Nr]),Po=Hr[ci]+Gr;return(Gr<0||Lr!=ar)&&(Po=Hr[ci+(Gr?1:0)]),$e(Mi,Po)}}}var ze=en(ge,Te,Et);if(ze)return Mc(ze,Ot);for(var gn=Te.nextSibling,fn=ge?ge.nodeValue.length-Et:0;gn;gn=gn.nextSibling){if(ze=en(gn,gn.firstChild,0),ze)return Mc($e(ze.line,ze.ch-fn),Ot);fn+=gn.textContent.length}for(var Un=Te.previousSibling,Jn=Et;Un;Un=Un.previousSibling){if(ze=en(Un,Un.firstChild,-1),ze)return Mc($e(ze.line,ze.ch+Jn),Ot);Jn+=Un.textContent.length}}var $o=function(rt){this.cm=rt,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};$o.prototype.init=function(rt){var ct=this,Et=this,Pt=this.cm;this.createField(rt);var Ot=this.textarea;rt.wrapper.insertBefore(this.wrapper,rt.wrapper.firstChild),ft&&(Ot.style.width="0px"),nn(Ot,"input",function(){Bt&&vt>=9&&ct.hasSelection&&(ct.hasSelection=null),Et.poll()}),nn(Ot,"paste",function(ge){He(Pt,ge)||jp(ge,Pt)||(Pt.state.pasteIncoming=+new Date,Et.fastPoll())});function $t(ge){if(!He(Pt,ge)){if(Pt.somethingSelected())Rh({lineWise:!1,text:Pt.getSelections()});else if(Pt.options.lineWiseCopyCut){var Te=Fp(Pt);Rh({lineWise:!0,text:Te.text}),ge.type=="cut"?Pt.setSelections(Te.ranges,null,ce):(Et.prevInput="",Ot.value=Te.text.join(`
`),se(Ot))}else return;ge.type=="cut"&&(Pt.state.cutIncoming=+new Date)}}nn(Ot,"cut",$t),nn(Ot,"copy",$t),nn(rt.scroller,"paste",function(ge){if(!(Uo(rt,ge)||He(Pt,ge))){if(!Ot.dispatchEvent){Pt.state.pasteIncoming=+new Date,Et.focus();return}var Te=new Event("paste");Te.clipboardData=ge.clipboardData,Ot.dispatchEvent(Te)}}),nn(rt.lineSpace,"selectstart",function(ge){Uo(rt,ge)||bn(ge)}),nn(Ot,"compositionstart",function(){var ge=Pt.getCursor("from");Et.composing&&Et.composing.range.clear(),Et.composing={start:ge,range:Pt.markText(ge,Pt.getCursor("to"),{className:"CodeMirror-composing"})}}),nn(Ot,"compositionend",function(){Et.composing&&(Et.poll(),Et.composing.range.clear(),Et.composing=null)})},$o.prototype.createField=function(rt){this.wrapper=Bp(),this.textarea=this.wrapper.firstChild},$o.prototype.screenReaderLabelChanged=function(rt){rt?this.textarea.setAttribute("aria-label",rt):this.textarea.removeAttribute("aria-label")},$o.prototype.prepareSelection=function(){var rt=this.cm,ct=rt.display,Et=rt.doc,Pt=Bu(rt);if(rt.options.moveInputWithCursor){var Ot=mo(rt,Et.sel.primary().head,"div"),$t=ct.wrapper.getBoundingClientRect(),ge=ct.lineDiv.getBoundingClientRect();Pt.teTop=Math.max(0,Math.min(ct.wrapper.clientHeight-10,Ot.top+ge.top-$t.top)),Pt.teLeft=Math.max(0,Math.min(ct.wrapper.clientWidth-10,Ot.left+ge.left-$t.left))}return Pt},$o.prototype.showSelection=function(rt){var ct=this.cm,Et=ct.display;jt(Et.cursorDiv,rt.cursors),jt(Et.selectionDiv,rt.selection),rt.teTop!=null&&(this.wrapper.style.top=rt.teTop+"px",this.wrapper.style.left=rt.teLeft+"px")},$o.prototype.reset=function(rt){if(!(this.contextMenuPending||this.composing)){var ct=this.cm;if(ct.somethingSelected()){this.prevInput="";var Et=ct.getSelection();this.textarea.value=Et,ct.state.focused&&se(this.textarea),Bt&&vt>=9&&(this.hasSelection=Et)}else rt||(this.prevInput=this.textarea.value="",Bt&&vt>=9&&(this.hasSelection=null))}},$o.prototype.getField=function(){return this.textarea},$o.prototype.supportsTouch=function(){return!1},$o.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!tt||Ut()!=this.textarea))try{this.textarea.focus()}catch(rt){}},$o.prototype.blur=function(){this.textarea.blur()},$o.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$o.prototype.receivedFocus=function(){this.slowPoll()},$o.prototype.slowPoll=function(){var rt=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){rt.poll(),rt.cm.state.focused&&rt.slowPoll()})},$o.prototype.fastPoll=function(){var rt=!1,ct=this;ct.pollingFast=!0;function Et(){var Pt=ct.poll();!Pt&&!rt?(rt=!0,ct.polling.set(60,Et)):(ct.pollingFast=!1,ct.slowPoll())}ct.polling.set(20,Et)},$o.prototype.poll=function(){var rt=this,ct=this.cm,Et=this.textarea,Pt=this.prevInput;if(this.contextMenuPending||!ct.state.focused||te(Et)&&!Pt&&!this.composing||ct.isReadOnly()||ct.options.disableInput||ct.state.keySeq)return!1;var Ot=Et.value;if(Ot==Pt&&!ct.somethingSelected())return!1;if(Bt&&vt>=9&&this.hasSelection===Ot||at&&/[\uf700-\uf7ff]/.test(Ot))return ct.display.input.reset(),!1;if(ct.doc.sel==ct.display.selForContextMenu){var $t=Ot.charCodeAt(0);if($t==8203&&!Pt&&(Pt="\u200B"),$t==8666)return this.reset(),this.cm.execCommand("undo")}for(var ge=0,Te=Math.min(Pt.length,Ot.length);ge<Te&&Pt.charCodeAt(ge)==Ot.charCodeAt(ge);)++ge;return Xi(ct,function(){mf(ct,Ot.slice(ge),Pt.length-ge,null,rt.composing?"*compose":null),Ot.length>1e3||Ot.indexOf(`
`)>-1?Et.value=rt.prevInput="":rt.prevInput=Ot,rt.composing&&(rt.composing.range.clear(),rt.composing.range=ct.markText(rt.composing.start,ct.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$o.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$o.prototype.onKeyPress=function(){Bt&&vt>=9&&(this.hasSelection=null),this.fastPoll()},$o.prototype.onContextMenu=function(rt){var ct=this,Et=ct.cm,Pt=Et.display,Ot=ct.textarea;ct.contextMenuPending&&ct.contextMenuPending();var $t=$a(Et,rt),ge=Pt.scroller.scrollTop;if(!$t||yt)return;var Te=Et.options.resetSelectionOnContextMenu;Te&&Et.doc.sel.contains($t)==-1&&sa(Et,Ua)(Et.doc,pu($t),ce);var Ee=Ot.style.cssText,Be=ct.wrapper.style.cssText,en=ct.wrapper.offsetParent.getBoundingClientRect();ct.wrapper.style.cssText="position: static",Ot.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(rt.clientY-en.top-5)+"px; left: "+(rt.clientX-en.left-5)+`px;
z-index: 1000; background: `+(Bt?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ze;gt&&(ze=window.scrollY),Pt.input.focus(),gt&&window.scrollTo(null,ze),Pt.input.reset(),Et.somethingSelected()||(Ot.value=ct.prevInput=" "),ct.contextMenuPending=fn,Pt.selForContextMenu=Et.doc.sel,clearTimeout(Pt.detectingSelectAll);function gn(){if(Ot.selectionStart!=null){var Jn=Et.somethingSelected(),ar="\u200B"+(Jn?Ot.value:"");Ot.value="\u21DA",Ot.value=ar,ct.prevInput=Jn?"":"\u200B",Ot.selectionStart=1,Ot.selectionEnd=ar.length,Pt.selForContextMenu=Et.doc.sel}}function fn(){if(ct.contextMenuPending==fn&&(ct.contextMenuPending=!1,ct.wrapper.style.cssText=Be,Ot.style.cssText=Ee,Bt&&vt<9&&Pt.scrollbars.setScrollTop(Pt.scroller.scrollTop=ge),Ot.selectionStart!=null)){(!Bt||Bt&&vt<9)&&gn();var Jn=0,ar=function(){Pt.selForContextMenu==Et.doc.sel&&Ot.selectionStart==0&&Ot.selectionEnd>0&&ct.prevInput=="\u200B"?sa(Et,Vo)(Et):Jn++<10?Pt.detectingSelectAll=setTimeout(ar,500):(Pt.selForContextMenu=null,Pt.input.reset())};Pt.detectingSelectAll=setTimeout(ar,200)}}if(Bt&&vt>=9&&gn(),bt){Kn(rt);var Un=function(){Ue(window,"mouseup",Un),setTimeout(fn,20)};nn(window,"mouseup",Un)}else setTimeout(fn,50)},$o.prototype.readOnlyChanged=function(rt){rt||this.reset(),this.textarea.disabled=rt=="nocursor",this.textarea.readOnly=!!rt},$o.prototype.setUneditable=function(){},$o.prototype.needsContentAttribute=!1;function sm(rt,ct){if(ct=ct?be(ct):{},ct.value=rt.value,!ct.tabindex&&rt.tabIndex&&(ct.tabindex=rt.tabIndex),!ct.placeholder&&rt.placeholder&&(ct.placeholder=rt.placeholder),ct.autofocus==null){var Et=Ut();ct.autofocus=Et==rt||rt.getAttribute("autofocus")!=null&&Et==document.body}function Pt(){rt.value=Te.getValue()}var Ot;if(rt.form&&(nn(rt.form,"submit",Pt),!ct.leaveSubmitMethodAlone)){var $t=rt.form;Ot=$t.submit;try{var ge=$t.submit=function(){Pt(),$t.submit=Ot,$t.submit(),$t.submit=ge}}catch(Ee){}}ct.finishInit=function(Ee){Ee.save=Pt,Ee.getTextArea=function(){return rt},Ee.toTextArea=function(){Ee.toTextArea=isNaN,Pt(),rt.parentNode.removeChild(Ee.getWrapperElement()),rt.style.display="",rt.form&&(Ue(rt.form,"submit",Pt),!ct.leaveSubmitMethodAlone&&typeof rt.form.submit=="function"&&(rt.form.submit=Ot))}},rt.style.display="none";var Te=Wi(function(Ee){return rt.parentNode.insertBefore(Ee,rt.nextSibling)},ct);return Te}function Lc(rt){rt.off=Ue,rt.on=nn,rt.wheelEventPixels=zs,rt.Doc=Oa,rt.splitLines=Rr,rt.countColumn=Yt,rt.findColumn=Ce,rt.isWordChar=Zt,rt.Pass=we,rt.signal=We,rt.Line=lo,rt.changeEnd=Ku,rt.scrollbarModel=rp,rt.Pos=$e,rt.cmpPos=Tn,rt.modes=zn,rt.mimeModes=Wn,rt.resolveMode=sn,rt.getMode=tn,rt.modeExtensions=Ye,rt.extendMode=hn,rt.copyState=nr,rt.startState=mr,rt.innerMode=Zn,rt.commands=Ju,rt.keyMap=Es,rt.keyName=qg,rt.isModifierKey=wc,rt.lookupKey=rl,rt.normalizeKeyMap=yp,rt.StringStream=an,rt.SharedTextMarker=Kl,rt.TextMarker=Xe,rt.LineWidget=vu,rt.e_preventDefault=bn,rt.e_stopPropagation=In,rt.e_stop=Kn,rt.addClass=Vt,rt.contains=Jt,rt.rmClass=Dt,rt.keyNames=Zl}im(Wi),$u(Wi);var yu="iter insert remove copy getEditor constructor".split(" ");for(var Sf in Oa.prototype)Oa.prototype.hasOwnProperty(Sf)&&ve(yu,Sf)<0&&(Wi.prototype[Sf]=function(rt){return function(){return rt.apply(this.doc,arguments)}}(Oa.prototype[Sf]));return un(Oa),Wi.inputStyles={textarea:$o,contenteditable:uo},Wi.defineMode=function(rt){!Wi.defaults.mode&&rt!="null"&&(Wi.defaults.mode=rt),tr.apply(this,arguments)},Wi.defineMIME=Ar,Wi.defineMode("null",function(){return{token:function(rt){return rt.skipToEnd()}}}),Wi.defineMIME("text/plain","null"),Wi.defineExtension=function(rt,ct){Wi.prototype[rt]=ct},Wi.defineDocExtension=function(rt,ct){Oa.prototype[rt]=ct},Wi.fromTextArea=sm,Lc(Wi),Wi.version="5.58.2",Wi})},25419:function(pn,dn,ue){(function(ae){ae(ue(89780),ue(15525),ue(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(Re,ot){var zt=ae.getMode(Re,"text/html"),Bt=zt.name=="null";function vt(Yt){if(ae.findModeByName){var ne=ae.findModeByName(Yt);ne&&(Yt=ne.mime||ne.mimes[0])}var ve=ae.getMode(Re,Yt);return ve.name=="null"?null:ve}ot.highlightFormatting===void 0&&(ot.highlightFormatting=!1),ot.maxBlockquoteDepth===void 0&&(ot.maxBlockquoteDepth=0),ot.taskLists===void 0&&(ot.taskLists=!1),ot.strikethrough===void 0&&(ot.strikethrough=!1),ot.emoji===void 0&&(ot.emoji=!1),ot.fencedCodeBlockHighlighting===void 0&&(ot.fencedCodeBlockHighlighting=!0),ot.fencedCodeBlockDefaultMode===void 0&&(ot.fencedCodeBlockDefaultMode="text/plain"),ot.xml===void 0&&(ot.xml=!0),ot.tokenTypeOverrides===void 0&&(ot.tokenTypeOverrides={});var gt={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 kt in gt)gt.hasOwnProperty(kt)&&ot.tokenTypeOverrides[kt]&&(gt[kt]=ot.tokenTypeOverrides[kt]);var Ct=/^([*\-_])(?:\s*\1){2,}\s*$/,yt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Tt=/^\[(x| )\](?=\s)/i,mt=ot.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ft=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,tt=/^\s*\[[^\]]+?\]:.*$/,at=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,it=" ";function lt(Yt,ne,ve){return ne.f=ne.inline=ve,ve(Yt,ne)}function ut(Yt,ne,ve){return ne.f=ne.block=ve,ve(Yt,ne)}function dt(Yt){return!Yt||!/\S/.test(Yt.string)}function bt(Yt){if(Yt.linkTitle=!1,Yt.linkHref=!1,Yt.linkText=!1,Yt.em=!1,Yt.strong=!1,Yt.strikethrough=!1,Yt.quote=0,Yt.indentedCode=!1,Yt.f==Dt){var ne=Bt;if(!ne){var ve=ae.innerMode(zt,Yt.htmlState);ne=ve.mode.name=="xml"&&ve.state.tagStart===null&&!ve.state.context&&ve.state.tokenize.isInText}ne&&(Yt.f=_t,Yt.block=At,Yt.htmlState=null)}return Yt.trailingSpace=0,Yt.trailingSpaceNewLine=!1,Yt.prevLine=Yt.thisLine,Yt.thisLine={stream:null},null}function At(Yt,ne){var ve=Yt.column()===ne.indentation,Se=dt(ne.prevLine.stream),we=ne.indentedCode,ce=ne.prevLine.hr,de=ne.list!==!1,le=(ne.listStack[ne.listStack.length-1]||0)+3;ne.indentedCode=!1;var Ce=ne.indentation;if(ne.indentationDiff===null&&(ne.indentationDiff=ne.indentation,de)){for(ne.list=null;Ce<ne.listStack[ne.listStack.length-1];)ne.listStack.pop(),ne.listStack.length?ne.indentation=ne.listStack[ne.listStack.length-1]:ne.list=!1;ne.list!==!1&&(ne.indentationDiff=Ce-ne.listStack[ne.listStack.length-1])}var fe=!Se&&!ce&&!ne.prevLine.header&&(!de||!we)&&!ne.prevLine.fencedCodeEnd,me=(ne.list===!1||ce||Se)&&ne.indentation<=le&&Yt.match(Ct),ke=null;if(ne.indentationDiff>=4&&(we||ne.prevLine.fencedCodeEnd||ne.prevLine.header||Se))return Yt.skipToEnd(),ne.indentedCode=!0,gt.code;if(Yt.eatSpace())return null;if(ve&&ne.indentation<=le&&(ke=Yt.match(mt))&&ke[1].length<=6)return ne.quote=0,ne.header=ke[1].length,ne.thisLine.header=!0,ot.highlightFormatting&&(ne.formatting="header"),ne.f=ne.inline,jt(ne);if(ne.indentation<=le&&Yt.eat(">"))return ne.quote=ve?1:ne.quote+1,ot.highlightFormatting&&(ne.formatting="quote"),Yt.eatSpace(),jt(ne);if(!me&&!ne.setext&&ve&&ne.indentation<=le&&(ke=Yt.match(yt))){var pe=ke[1]?"ol":"ul";return ne.indentation=Ce+Yt.current().length,ne.list=!0,ne.quote=0,ne.listStack.push(ne.indentation),ne.em=!1,ne.strong=!1,ne.code=!1,ne.strikethrough=!1,ot.taskLists&&Yt.match(Tt,!1)&&(ne.taskList=!0),ne.f=ne.inline,ot.highlightFormatting&&(ne.formatting=["list","list-"+pe]),jt(ne)}else{if(ve&&ne.indentation<=le&&(ke=Yt.match(z,!0)))return ne.quote=0,ne.fencedEndRE=new RegExp(ke[1]+"+ *$"),ne.localMode=ot.fencedCodeBlockHighlighting&&vt(ke[2]||ot.fencedCodeBlockDefaultMode),ne.localMode&&(ne.localState=ae.startState(ne.localMode)),ne.f=ne.block=Ft,ot.highlightFormatting&&(ne.formatting="code-block"),ne.code=-1,jt(ne);if(ne.setext||(!fe||!de)&&!ne.quote&&ne.list===!1&&!ne.code&&!me&&!tt.test(Yt.string)&&(ke=Yt.lookAhead(1))&&(ke=ke.match(xt)))return ne.setext?(ne.header=ne.setext,ne.setext=0,Yt.skipToEnd(),ot.highlightFormatting&&(ne.formatting="header")):(ne.header=ke[0].charAt(0)=="="?1:2,ne.setext=ne.header),ne.thisLine.header=!0,ne.f=ne.inline,jt(ne);if(me)return Yt.skipToEnd(),ne.hr=!0,ne.thisLine.hr=!0,gt.hr;if(Yt.peek()==="[")return lt(Yt,ne,oe)}return lt(Yt,ne,ne.inline)}function Dt(Yt,ne){var ve=zt.token(Yt,ne.htmlState);if(!Bt){var Se=ae.innerMode(zt,ne.htmlState);(Se.mode.name=="xml"&&Se.state.tagStart===null&&!Se.state.context&&Se.state.tokenize.isInText||ne.md_inside&&Yt.current().indexOf(">")>-1)&&(ne.f=_t,ne.block=At,ne.htmlState=null)}return ve}function Ft(Yt,ne){var ve=ne.listStack[ne.listStack.length-1]||0,Se=ne.indentation<ve,we=ve+3;if(ne.fencedEndRE&&ne.indentation<=we&&(Se||Yt.match(ne.fencedEndRE))){ot.highlightFormatting&&(ne.formatting="code-block");var ce;return Se||(ce=jt(ne)),ne.localMode=ne.localState=null,ne.block=At,ne.f=_t,ne.fencedEndRE=null,ne.code=0,ne.thisLine.fencedCodeEnd=!0,Se?ut(Yt,ne,ne.block):ce}else return ne.localMode?ne.localMode.token(Yt,ne.localState):(Yt.skipToEnd(),gt.code)}function jt(Yt){var ne=[];if(Yt.formatting){ne.push(gt.formatting),typeof Yt.formatting=="string"&&(Yt.formatting=[Yt.formatting]);for(var ve=0;ve<Yt.formatting.length;ve++)ne.push(gt.formatting+"-"+Yt.formatting[ve]),Yt.formatting[ve]==="header"&&ne.push(gt.formatting+"-"+Yt.formatting[ve]+"-"+Yt.header),Yt.formatting[ve]==="quote"&&(!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ne.push(gt.formatting+"-"+Yt.formatting[ve]+"-"+Yt.quote):ne.push("error"))}if(Yt.taskOpen)return ne.push("meta"),ne.length?ne.join(" "):null;if(Yt.taskClosed)return ne.push("property"),ne.length?ne.join(" "):null;if(Yt.linkHref?ne.push(gt.linkHref,"url"):(Yt.strong&&ne.push(gt.strong),Yt.em&&ne.push(gt.em),Yt.strikethrough&&ne.push(gt.strikethrough),Yt.emoji&&ne.push(gt.emoji),Yt.linkText&&ne.push(gt.linkText),Yt.code&&ne.push(gt.code),Yt.image&&ne.push(gt.image),Yt.imageAltText&&ne.push(gt.imageAltText,"link"),Yt.imageMarker&&ne.push(gt.imageMarker)),Yt.header&&ne.push(gt.header,gt.header+"-"+Yt.header),Yt.quote&&(ne.push(gt.quote),!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ne.push(gt.quote+"-"+Yt.quote):ne.push(gt.quote+"-"+ot.maxBlockquoteDepth)),Yt.list!==!1){var Se=(Yt.listStack.length-1)%3;Se?Se===1?ne.push(gt.list2):ne.push(gt.list3):ne.push(gt.list1)}return Yt.trailingSpaceNewLine?ne.push("trailing-space-new-line"):Yt.trailingSpace&&ne.push("trailing-space-"+(Yt.trailingSpace%2?"a":"b")),ne.length?ne.join(" "):null}function Nt(Yt,ne){if(Yt.match(ft,!0))return jt(ne)}function _t(Yt,ne){var ve=ne.text(Yt,ne);if(typeof ve!="undefined")return ve;if(ne.list)return ne.list=null,jt(ne);if(ne.taskList){var Se=Yt.match(Tt,!0)[1]===" ";return Se?ne.taskOpen=!0:ne.taskClosed=!0,ot.highlightFormatting&&(ne.formatting="task"),ne.taskList=!1,jt(ne)}if(ne.taskOpen=!1,ne.taskClosed=!1,ne.header&&Yt.match(/^#+$/,!0))return ot.highlightFormatting&&(ne.formatting="header"),jt(ne);var we=Yt.next();if(ne.linkTitle){ne.linkTitle=!1;var ce=we;we==="("&&(ce=")"),ce=(ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var de="^\\s*(?:[^"+ce+"\\\\]+|\\\\\\\\|\\\\.)"+ce;if(Yt.match(new RegExp(de),!0))return gt.linkHref}if(we==="`"){var le=ne.formatting;ot.highlightFormatting&&(ne.formatting="code"),Yt.eatWhile("`");var Ce=Yt.current().length;if(ne.code==0&&(!ne.quote||Ce==1))return ne.code=Ce,jt(ne);if(Ce==ne.code){var fe=jt(ne);return ne.code=0,fe}else return ne.formatting=le,jt(ne)}else if(ne.code)return jt(ne);if(we==="\\"&&(Yt.next(),ot.highlightFormatting)){var me=jt(ne),ke=gt.formatting+"-escape";return me?me+" "+ke:ke}if(we==="!"&&Yt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ne.imageMarker=!0,ne.image=!0,ot.highlightFormatting&&(ne.formatting="image"),jt(ne);if(we==="["&&ne.imageMarker&&Yt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ne.imageMarker=!1,ne.imageAltText=!0,ot.highlightFormatting&&(ne.formatting="image"),jt(ne);if(we==="]"&&ne.imageAltText){ot.highlightFormatting&&(ne.formatting="image");var me=jt(ne);return ne.imageAltText=!1,ne.image=!1,ne.inline=ne.f=Jt,me}if(we==="["&&!ne.image)return ne.linkText&&Yt.match(/^.*?\]/)||(ne.linkText=!0,ot.highlightFormatting&&(ne.formatting="link")),jt(ne);if(we==="]"&&ne.linkText){ot.highlightFormatting&&(ne.formatting="link");var me=jt(ne);return ne.linkText=!1,ne.inline=ne.f=Yt.match(/\(.*?\)| ?\[.*?\]/,!1)?Jt:_t,me}if(we==="<"&&Yt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Wt,ot.highlightFormatting&&(ne.formatting="link");var me=jt(ne);return me?me+=" ":me="",me+gt.linkInline}if(we==="<"&&Yt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=Wt,ot.highlightFormatting&&(ne.formatting="link");var me=jt(ne);return me?me+=" ":me="",me+gt.linkEmail}if(ot.xml&&we==="<"&&Yt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pe=Yt.string.indexOf(">",Yt.pos);if(pe!=-1){var qt=Yt.string.substring(Yt.start,pe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(qt)&&(ne.md_inside=!0)}return Yt.backUp(1),ne.htmlState=ae.startState(zt),ut(Yt,ne,Dt)}if(ot.xml&&we==="<"&&Yt.match(/^\/\w*?>/))return ne.md_inside=!1,"tag";if(we==="*"||we==="_"){for(var Kt=1,wt=Yt.pos==1?" ":Yt.string.charAt(Yt.pos-2);Kt<3&&Yt.eat(we);)Kt++;var Lt=Yt.peek()||" ",Zt=!/\s/.test(Lt)&&(!at.test(Lt)||/\s/.test(wt)||at.test(wt)),ee=!/\s/.test(wt)&&(!at.test(wt)||/\s/.test(Lt)||at.test(Lt)),It=null,Rt=null;if(Kt%2&&(!ne.em&&Zt&&(we==="*"||!ee||at.test(wt))?It=!0:ne.em==we&&ee&&(we==="*"||!Zt||at.test(Lt))&&(It=!1)),Kt>1&&(!ne.strong&&Zt&&(we==="*"||!ee||at.test(wt))?Rt=!0:ne.strong==we&&ee&&(we==="*"||!Zt||at.test(Lt))&&(Rt=!1)),Rt!=null||It!=null){ot.highlightFormatting&&(ne.formatting=It==null?"strong":Rt==null?"em":"strong em"),It===!0&&(ne.em=we),Rt===!0&&(ne.strong=we);var fe=jt(ne);return It===!1&&(ne.em=!1),Rt===!1&&(ne.strong=!1),fe}}else if(we===" "&&(Yt.eat("*")||Yt.eat("_"))){if(Yt.peek()===" ")return jt(ne);Yt.backUp(1)}if(ot.strikethrough){if(we==="~"&&Yt.eatWhile(we)){if(ne.strikethrough){ot.highlightFormatting&&(ne.formatting="strikethrough");var fe=jt(ne);return ne.strikethrough=!1,fe}else if(Yt.match(/^[^\s]/,!1))return ne.strikethrough=!0,ot.highlightFormatting&&(ne.formatting="strikethrough"),jt(ne)}else if(we===" "&&Yt.match(/^~~/,!0)){if(Yt.peek()===" ")return jt(ne);Yt.backUp(2)}}if(ot.emoji&&we===":"&&Yt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ne.emoji=!0,ot.highlightFormatting&&(ne.formatting="emoji");var Ht=jt(ne);return ne.emoji=!1,Ht}return we===" "&&(Yt.match(/^ +$/,!1)?ne.trailingSpace++:ne.trailingSpace&&(ne.trailingSpaceNewLine=!0)),jt(ne)}function Wt(Yt,ne){var ve=Yt.next();if(ve===">"){ne.f=ne.inline=_t,ot.highlightFormatting&&(ne.formatting="link");var Se=jt(ne);return Se?Se+=" ":Se="",Se+gt.linkInline}return Yt.match(/^[^>]+/,!0),gt.linkInline}function Jt(Yt,ne){if(Yt.eatSpace())return null;var ve=Yt.next();return ve==="("||ve==="["?(ne.f=ne.inline=Vt(ve==="("?")":"]"),ot.highlightFormatting&&(ne.formatting="link-string"),ne.linkHref=!0,jt(ne)):"error"}var Ut={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Vt(Yt){return function(ne,ve){var Se=ne.next();if(Se===Yt){ve.f=ve.inline=_t,ot.highlightFormatting&&(ve.formatting="link-string");var we=jt(ve);return ve.linkHref=!1,we}return ne.match(Ut[Yt]),ve.linkHref=!0,jt(ve)}}function oe(Yt,ne){return Yt.match(/^([^\]\\]|\\.)*\]:/,!1)?(ne.f=se,Yt.next(),ot.highlightFormatting&&(ne.formatting="link"),ne.linkText=!0,jt(ne)):lt(Yt,ne,_t)}function se(Yt,ne){if(Yt.match(/^\]:/,!0)){ne.f=ne.inline=he,ot.highlightFormatting&&(ne.formatting="link");var ve=jt(ne);return ne.linkText=!1,ve}return Yt.match(/^([^\]\\]|\\.)+/,!0),gt.linkText}function he(Yt,ne){return Yt.eatSpace()?null:(Yt.match(/^[^\s]+/,!0),Yt.peek()===void 0?ne.linkTitle=!0:Yt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ne.f=ne.inline=_t,gt.linkHref+" url")}var be={startState:function(){return{f:At,prevLine:{stream:null},thisLine:{stream:null},block:At,htmlState:null,indentation:0,inline:_t,text:Nt,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(Yt){return{f:Yt.f,prevLine:Yt.prevLine,thisLine:Yt.thisLine,block:Yt.block,htmlState:Yt.htmlState&&ae.copyState(zt,Yt.htmlState),indentation:Yt.indentation,localMode:Yt.localMode,localState:Yt.localMode?ae.copyState(Yt.localMode,Yt.localState):null,inline:Yt.inline,text:Yt.text,formatting:!1,linkText:Yt.linkText,linkTitle:Yt.linkTitle,linkHref:Yt.linkHref,code:Yt.code,em:Yt.em,strong:Yt.strong,strikethrough:Yt.strikethrough,emoji:Yt.emoji,header:Yt.header,setext:Yt.setext,hr:Yt.hr,taskList:Yt.taskList,list:Yt.list,listStack:Yt.listStack.slice(0),quote:Yt.quote,indentedCode:Yt.indentedCode,trailingSpace:Yt.trailingSpace,trailingSpaceNewLine:Yt.trailingSpaceNewLine,md_inside:Yt.md_inside,fencedEndRE:Yt.fencedEndRE}},token:function(Yt,ne){if(ne.formatting=!1,Yt!=ne.thisLine.stream){if(ne.header=0,ne.hr=!1,Yt.match(/^\s*$/,!0))return bt(ne),null;if(ne.prevLine=ne.thisLine,ne.thisLine={stream:Yt},ne.taskList=!1,ne.trailingSpace=0,ne.trailingSpaceNewLine=!1,!ne.localState&&(ne.f=ne.block,ne.f!=Dt)){var ve=Yt.match(/^\s*/,!0)[0].replace(/\t/g,it).length;if(ne.indentation=ve,ne.indentationDiff=null,ve>0)return null}}return ne.f(Yt,ne)},innerMode:function(Yt){return Yt.block==Dt?{state:Yt.htmlState,mode:zt}:Yt.localState?{state:Yt.localState,mode:Yt.localMode}:{state:Yt,mode:be}},indent:function(Yt,ne,ve){return Yt.block==Dt&&zt.indent?zt.indent(Yt.htmlState,ne,ve):Yt.localState&&Yt.localMode.indent?Yt.localMode.indent(Yt.localState,ne,ve):ae.Pass},blankLine:bt,getType:jt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return be},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";ae.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 Re=0;Re<ae.modeInfo.length;Re++){var ot=ae.modeInfo[Re];ot.mimes&&(ot.mime=ot.mimes[0])}ae.findModeByMIME=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.mime==zt)return vt;if(vt.mimes){for(var gt=0;gt<vt.mimes.length;gt++)if(vt.mimes[gt]==zt)return vt}}if(/\+xml$/.test(zt))return ae.findModeByMIME("application/xml");if(/\+json$/.test(zt))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.ext){for(var gt=0;gt<vt.ext.length;gt++)if(vt.ext[gt]==zt)return vt}}},ae.findModeByFileName=function(zt){for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.file&&vt.file.test(zt))return vt}var gt=zt.lastIndexOf("."),kt=gt>-1&&zt.substring(gt+1,zt.length);if(kt)return ae.findModeByExtension(kt)},ae.findModeByName=function(zt){zt=zt.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.name.toLowerCase()==zt)return vt;if(vt.alias){for(var gt=0;gt<vt.alias.length;gt++)if(vt.alias[gt].toLowerCase()==zt)return vt}}}})},67549:function(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";ae.defineMode("stex",function(Re,ot){"use strict";function zt(ft,z){ft.cmdState.push(z)}function Bt(ft){return ft.cmdState.length>0?ft.cmdState[ft.cmdState.length-1]:null}function vt(ft){var z=ft.cmdState.pop();z&&z.closeBracket()}function gt(ft){for(var z=ft.cmdState,tt=z.length-1;tt>=0;tt--){var at=z[tt];if(at.name!="DEFAULT")return at}return{styleIdentifier:function(){return null}}}function kt(ft,z,tt){return function(){this.name=ft,this.bracketNo=0,this.style=z,this.styles=tt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ct={};Ct.importmodule=kt("importmodule","tag",["string","builtin"]),Ct.documentclass=kt("documentclass","tag",["","atom"]),Ct.usepackage=kt("usepackage","tag",["atom"]),Ct.begin=kt("begin","tag",["atom"]),Ct.end=kt("end","tag",["atom"]),Ct.label=kt("label","tag",["atom"]),Ct.ref=kt("ref","tag",["atom"]),Ct.eqref=kt("eqref","tag",["atom"]),Ct.cite=kt("cite","tag",["atom"]),Ct.bibitem=kt("bibitem","tag",["atom"]),Ct.Bibitem=kt("Bibitem","tag",["atom"]),Ct.RBibitem=kt("RBibitem","tag",["atom"]),Ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function yt(ft,z){ft.f=z}function Tt(ft,z){var tt;if(ft.match(/^\\[a-zA-Z@]+/)){var at=ft.current().slice(1);return tt=Ct.hasOwnProperty(at)?Ct[at]:Ct.DEFAULT,tt=new tt,zt(z,tt),yt(z,xt),tt.style}if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/\\]/))return"tag";if(ft.match("\\["))return yt(z,function(lt,ut){return mt(lt,ut,"\\]")}),"keyword";if(ft.match("\\("))return yt(z,function(lt,ut){return mt(lt,ut,"\\)")}),"keyword";if(ft.match("$$"))return yt(z,function(lt,ut){return mt(lt,ut,"$$")}),"keyword";if(ft.match("$"))return yt(z,function(lt,ut){return mt(lt,ut,"$")}),"keyword";var it=ft.next();if(it=="%")return ft.skipToEnd(),"comment";if(it=="}"||it=="]"){if(tt=Bt(z),tt)tt.closeBracket(it),yt(z,xt);else return"error";return"bracket"}else return it=="{"||it=="["?(tt=Ct.DEFAULT,tt=new tt,zt(z,tt),"bracket"):/\d/.test(it)?(ft.eatWhile(/[\w.%]/),"atom"):(ft.eatWhile(/[\w\-_]/),tt=gt(z),tt.name=="begin"&&(tt.argument=ft.current()),tt.styleIdentifier())}function mt(ft,z,tt){if(ft.eatSpace())return null;if(tt&&ft.match(tt))return yt(z,Tt),"keyword";if(ft.match(/^\\[a-zA-Z@]+/))return"tag";if(ft.match(/^[a-zA-Z]+/))return"variable-2";if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/]/)||ft.match(/^[\^_&]/))return"tag";if(ft.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ft.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var at=ft.next();return at=="{"||at=="}"||at=="["||at=="]"||at=="("||at==")"?"bracket":at=="%"?(ft.skipToEnd(),"comment"):"error"}function xt(ft,z){var tt=ft.peek(),at;return tt=="{"||tt=="["?(at=Bt(z),at.openBracket(tt),ft.eat(tt),yt(z,Tt),"bracket"):/[ \t\r]/.test(tt)?(ft.eat(tt),null):(yt(z,Tt),vt(z),Tt(ft,z))}return{startState:function(){var ft=ot.inMathMode?function(z,tt){return mt(z,tt)}:Tt;return{cmdState:[],f:ft}},copyState:function(ft){return{cmdState:ft.cmdState.slice(),f:ft.f}},token:function(ft,z){return z.f(ft,z)},blankLine:function(ft){ft.f=Tt,ft.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},15525:function(pn,dn,ue){(function(ae){ae(ue(89780))})(function(ae){"use strict";var Re={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},ot={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(zt,Bt){var vt=zt.indentUnit,gt={},kt=Bt.htmlMode?Re:ot;for(var Ct in kt)gt[Ct]=kt[Ct];for(var Ct in Bt)gt[Ct]=Bt[Ct];var yt,Tt;function mt(Wt,Jt){function Ut(se){return Jt.tokenize=se,se(Wt,Jt)}var Vt=Wt.next();if(Vt=="<")return Wt.eat("!")?Wt.eat("[")?Wt.match("CDATA[")?Ut(z("atom","]]>")):null:Wt.match("--")?Ut(z("comment","-->")):Wt.match("DOCTYPE",!0,!0)?(Wt.eatWhile(/[\w\._\-]/),Ut(tt(1))):null:Wt.eat("?")?(Wt.eatWhile(/[\w\._\-]/),Jt.tokenize=z("meta","?>"),"meta"):(yt=Wt.eat("/")?"closeTag":"openTag",Jt.tokenize=xt,"tag bracket");if(Vt=="&"){var oe;return Wt.eat("#")?Wt.eat("x")?oe=Wt.eatWhile(/[a-fA-F\d]/)&&Wt.eat(";"):oe=Wt.eatWhile(/[\d]/)&&Wt.eat(";"):oe=Wt.eatWhile(/[\w\.\-:]/)&&Wt.eat(";"),oe?"atom":"error"}else return Wt.eatWhile(/[^&<]/),null}mt.isInText=!0;function xt(Wt,Jt){var Ut=Wt.next();if(Ut==">"||Ut=="/"&&Wt.eat(">"))return Jt.tokenize=mt,yt=Ut==">"?"endTag":"selfcloseTag","tag bracket";if(Ut=="=")return yt="equals",null;if(Ut=="<"){Jt.tokenize=mt,Jt.state=ut,Jt.tagName=Jt.tagStart=null;var Vt=Jt.tokenize(Wt,Jt);return Vt?Vt+" tag error":"tag error"}else return/[\'\"]/.test(Ut)?(Jt.tokenize=ft(Ut),Jt.stringStartCol=Wt.column(),Jt.tokenize(Wt,Jt)):(Wt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ft(Wt){var Jt=function(Ut,Vt){for(;!Ut.eol();)if(Ut.next()==Wt){Vt.tokenize=xt;break}return"string"};return Jt.isInAttribute=!0,Jt}function z(Wt,Jt){return function(Ut,Vt){for(;!Ut.eol();){if(Ut.match(Jt)){Vt.tokenize=mt;break}Ut.next()}return Wt}}function tt(Wt){return function(Jt,Ut){for(var Vt;(Vt=Jt.next())!=null;){if(Vt=="<")return Ut.tokenize=tt(Wt+1),Ut.tokenize(Jt,Ut);if(Vt==">")if(Wt==1){Ut.tokenize=mt;break}else return Ut.tokenize=tt(Wt-1),Ut.tokenize(Jt,Ut)}return"meta"}}function at(Wt,Jt,Ut){this.prev=Wt.context,this.tagName=Jt,this.indent=Wt.indented,this.startOfLine=Ut,(gt.doNotIndent.hasOwnProperty(Jt)||Wt.context&&Wt.context.noIndent)&&(this.noIndent=!0)}function it(Wt){Wt.context&&(Wt.context=Wt.context.prev)}function lt(Wt,Jt){for(var Ut;;){if(!Wt.context||(Ut=Wt.context.tagName,!gt.contextGrabbers.hasOwnProperty(Ut)||!gt.contextGrabbers[Ut].hasOwnProperty(Jt)))return;it(Wt)}}function ut(Wt,Jt,Ut){return Wt=="openTag"?(Ut.tagStart=Jt.column(),dt):Wt=="closeTag"?bt:ut}function dt(Wt,Jt,Ut){return Wt=="word"?(Ut.tagName=Jt.current(),Tt="tag",Ft):gt.allowMissingTagName&&Wt=="endTag"?(Tt="tag bracket",Ft(Wt,Jt,Ut)):(Tt="error",dt)}function bt(Wt,Jt,Ut){if(Wt=="word"){var Vt=Jt.current();return Ut.context&&Ut.context.tagName!=Vt&&gt.implicitlyClosed.hasOwnProperty(Ut.context.tagName)&&it(Ut),Ut.context&&Ut.context.tagName==Vt||gt.matchClosing===!1?(Tt="tag",At):(Tt="tag error",Dt)}else return gt.allowMissingTagName&&Wt=="endTag"?(Tt="tag bracket",At(Wt,Jt,Ut)):(Tt="error",Dt)}function At(Wt,Jt,Ut){return Wt!="endTag"?(Tt="error",At):(it(Ut),ut)}function Dt(Wt,Jt,Ut){return Tt="error",At(Wt,Jt,Ut)}function Ft(Wt,Jt,Ut){if(Wt=="word")return Tt="attribute",jt;if(Wt=="endTag"||Wt=="selfcloseTag"){var Vt=Ut.tagName,oe=Ut.tagStart;return Ut.tagName=Ut.tagStart=null,Wt=="selfcloseTag"||gt.autoSelfClosers.hasOwnProperty(Vt)?lt(Ut,Vt):(lt(Ut,Vt),Ut.context=new at(Ut,Vt,oe==Ut.indented)),ut}return Tt="error",Ft}function jt(Wt,Jt,Ut){return Wt=="equals"?Nt:(gt.allowMissing||(Tt="error"),Ft(Wt,Jt,Ut))}function Nt(Wt,Jt,Ut){return Wt=="string"?_t:Wt=="word"&&gt.allowUnquoted?(Tt="string",Ft):(Tt="error",Ft(Wt,Jt,Ut))}function _t(Wt,Jt,Ut){return Wt=="string"?_t:Ft(Wt,Jt,Ut)}return{startState:function(Wt){var Jt={tokenize:mt,state:ut,indented:Wt||0,tagName:null,tagStart:null,context:null};return Wt!=null&&(Jt.baseIndent=Wt),Jt},token:function(Wt,Jt){if(!Jt.tagName&&Wt.sol()&&(Jt.indented=Wt.indentation()),Wt.eatSpace())return null;yt=null;var Ut=Jt.tokenize(Wt,Jt);return(Ut||yt)&&Ut!="comment"&&(Tt=null,Jt.state=Jt.state(yt||Ut,Wt,Jt),Tt&&(Ut=Tt=="error"?Ut+" error":Tt)),Ut},indent:function(Wt,Jt,Ut){var Vt=Wt.context;if(Wt.tokenize.isInAttribute)return Wt.tagStart==Wt.indented?Wt.stringStartCol+1:Wt.indented+vt;if(Vt&&Vt.noIndent)return ae.Pass;if(Wt.tokenize!=xt&&Wt.tokenize!=mt)return Ut?Ut.match(/^(\s*)/)[0].length:0;if(Wt.tagName)return gt.multilineTagIndentPastTag!==!1?Wt.tagStart+Wt.tagName.length+2:Wt.tagStart+vt*(gt.multilineTagIndentFactor||1);if(gt.alignCDATA&&/<!\[CDATA\[/.test(Jt))return 0;var oe=Jt&&/^<(\/)?([\w_:\.-]*)/.exec(Jt);if(oe&&oe[1])for(;Vt;)if(Vt.tagName==oe[2]){Vt=Vt.prev;break}else if(gt.implicitlyClosed.hasOwnProperty(Vt.tagName))Vt=Vt.prev;else break;else if(oe)for(;Vt;){var se=gt.contextGrabbers[Vt.tagName];if(se&&se.hasOwnProperty(oe[2]))Vt=Vt.prev;else break}for(;Vt&&Vt.prev&&!Vt.startOfLine;)Vt=Vt.prev;return Vt?Vt.indent+vt:Wt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:gt.htmlMode?"html":"xml",helperType:gt.htmlMode?"html":"xml",skipAttribute:function(Wt){Wt.state==Nt&&(Wt.state=Ft)},xmlCurrentTag:function(Wt){return Wt.tagName?{name:Wt.tagName,close:Wt.type=="closeTag"}:null},xmlCurrentContext:function(Wt){for(var Jt=[],Ut=Wt.context;Ut;Ut=Ut.prev)Ut.tagName&&Jt.push(Ut.tagName);return Jt.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(pn,dn,ue){"use strict";ue.d(dn,{$u:function(){return Ct},BD:function(){return Kt},E9:function(){return kt},FF:function(){return Or},FJ:function(){return ut},Hn:function(){return lt},KX:function(){return bt},NB:function(){return Pe},S0:function(){return ke},UL:function(){return yt},Vk:function(){return it},Vm:function(){return Oe},YI:function(){return pe},ZA:function(){return ot},Zt:function(){return Tt},al:function(){return It},bn:function(){return ee},bx:function(){return wt},g2:function(){return qt},h1:function(){return Nt},hD:function(){return un},l4:function(){return vt},rU:function(){return Ae},s_:function(){return Lt},uz:function(){return ye},z6:function(){return mt}}),pn=ue.hmd(pn),function(){var te;function Qn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Vn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Qn(a)}}function Rn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var zn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Wn;if(typeof Object.setPrototypeOf=="function")Wn=Object.setPrototypeOf;else{var tr;t:{var Ar={a:!0},sn={};try{sn.__proto__=Ar,tr=sn.a;break t}catch(a){}tr=!1}Wn=tr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var tn=Wn;function Ye(a,y){if(a.prototype=zn(y.prototype),a.prototype.constructor=a,tn)tn(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 hn=typeof ue.g!="undefined"&&ue.g!=null?ue.g:self,nr=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},Zn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function mr(a,y){if(y){var x=hn;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&&Zn(x,a,{writable:!0,value:y})}}mr("Object.assign",function(a){return a||nr}),mr("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 an=typeof globalThis=="object"&&globalThis||typeof ue.g=="object"&&ue.g.global===ue.g&&ue.g||typeof self=="object"&&self.self===self&&self||{};an.requestAnimationFrame===void 0&&(an.setImmediate===void 0?an.requestAnimationFrame=function(a){an.setTimeout(a,0)}:an.requestAnimationFrame=an.setImmediate);function mn(){}function $n(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&an.clearTimeout(x),x=fr(function(){x=-1,a.apply(b,E)},y)}}function fr(a,y){return an.setTimeout(a,y)}function Mn(a){return an.document.createElement(a)}function je(a){throw Error(a)}function Ve(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),je(a)}function An(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),je(x+" is not in the range "+y+": "+a)}function En(a){an.console&&an.console.log(a)}function $e(a){return typeof a=="object"&&a!==null}function Tn(a){return Array.isArray(a)||an.NodeList&&a instanceof an.NodeList||an.HTMLCollection&&a instanceof an.HTMLCollection}function Xn(a){return Array.prototype.slice.call(a)}function hr(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):je("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function xr(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):je("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function On(){var a=xi.pop();return a===void 0?[]:a}function Fn(a){a.length=0,xi.push(a)}function Dn(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($e(a)&&a.constructor)return Dn(a.constructor);return typeof a}function sr(a){var y=a;return $e(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 or(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 xn(a,y,x){Object.defineProperty(Fi.prototype,a,{get:y,set:x})}function Gn(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 et="",nt=0;nt<a.length;nt++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,et+=String.fromCharCode(a.charCodeAt(nt)^y[(y[x]+y[b])%256]);return et.indexOf("GoJS 2.1 evaluation")>-1||et.indexOf("\xA9 1998-2021 Northwoods Software")>-1||et.indexOf("Not for distribution or production use")>-1||et.indexOf("gojs.net")>-1?"":et}var Yr=an.navigator!==void 0&&0<an.navigator.userAgent.indexOf("Trident/7"),ei=an.navigator!==void 0&&an.navigator.platform!==void 0&&an.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,xi=[];Object.freeze([]),mn.className="Util",mn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",mn.adym="gojs.net",mn.vfo="28e645fdb266",mn.className="Util";function Je(a,y,x){ii(this),this.j=a,this.xa=y,this.o=x}Je.prototype.toString=function(){return"EnumValue."+this.xa};function cr(a,y){return y==null||y===""?null:a[y]}hn.Object.defineProperties(Je.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Je.className="EnumValue";function _r(){this.ew=[]}_r.prototype.toString=function(){return this.ew.join("")},_r.prototype.add=function(a){a!==""&&this.ew.push(a)},_r.className="StringBuilder";function ir(){}ir.className="PropertyCollection";var oi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){an.console&&an.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 et=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);et.get!==void 0&&et.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(nt,st){return function(){throw Error("Property "+nt.Zl[st.Tj]+" of "+nt.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Jr(){}Jr.prototype.reset=function(){},Jr.prototype.next=function(){return!1},Jr.prototype.Ad=function(){return!1},Jr.prototype.first=function(){return null},Jr.prototype.any=function(){return!1},Jr.prototype.all=function(){return!0},Jr.prototype.each=function(){return this},Jr.prototype.map=function(){return this},Jr.prototype.filter=function(){return this},Jr.prototype.de=function(){},Jr.prototype.toString=function(){return"EmptyIterator"},hn.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset;var ni=null;Jr.className="EmptyIterator",ni=new Jr;function Kr(a){this.key=-1,this.value=a}Kr.prototype.reset=function(){this.key=-1},Kr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Kr.prototype.Ad=function(){return this.next()},Kr.prototype.first=function(){return this.key=0,this.value},Kr.prototype.any=function(a){return this.key=-1,a(this.value)},Kr.prototype.all=function(a){return this.key=-1,a(this.value)},Kr.prototype.each=function(a){return this.key=-1,a(this.value),this},Kr.prototype.map=function(a){return new Kr(a(this.value))},Kr.prototype.filter=function(a){return a(this.value)?new Kr(this.value):ni},Kr.prototype.de=function(){this.value=null},Kr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},hn.Object.defineProperties(Kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="SingletonIterator";function $r(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}$r.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},$r.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},$r.prototype.Ad=function(){return this.next()},$r.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},$r.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 et=y[E];if((b===null||b(et))&&a(et))return!0}return!1},$r.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 et=y[E];if((b===null||b(et))&&!a(et))return!1}return!0},$r.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 et=y[E];(b===null||b(et))&&a(et)}return this},$r.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,et=0;et<b;et++){var nt=y[et];(E===null||E(nt))&&x.push(a(nt))}return a=new yn,a.s=x,a.xb(),a.iterator},$r.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,et=0;et<b;et++){var nt=y[et];(E===null||E(nt))&&a(nt)&&x.push(nt)}return a=new yn,a.s=x,a.xb(),a.iterator},$r.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},$r.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},hn.Object.defineProperties($r.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}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="ListIterator";function hi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hi.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)},hi.prototype.Ad=function(){return this.next()},hi.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},hi.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},hi.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},hi.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},hi.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 yn,a.s=x,a.xb(),a.iterator},hi.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 yn,a.s=x,a.xb(),a.iterator},hi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},hn.Object.defineProperties(hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),hi.prototype.first=hi.prototype.first,hi.prototype.hasNext=hi.prototype.Ad,hi.prototype.next=hi.prototype.next,hi.prototype.reset=hi.prototype.reset,hi.className="ListIteratorBackwards";function yn(a){ii(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&je("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}te=yn.prototype,te.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return this._isFrozen=!1,this},te.toString=function(){return"List()#"+gi(this)},te.add=function(a){return a===null?this:(this._isFrozen&&Ve(this,a),this.s.push(a),this.xb(),this)},te.push=function(a){this.add(a)},te.addAll=function(a){if(a===null)return this;this._isFrozen&&Ve(this);var y=this.s;if(Tn(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},te.clear=function(){this._isFrozen&&Ve(this),this.s.length=0,this.xb()},te.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},te.has=function(a){return this.contains(a)},te.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},te.M=function(a){var y=this.s;return(0>a||a>=y.length)&&An(a,"0 <= i < length",yn,"elt:i"),y[a]},te.get=function(a){return this.M(a)},te.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&An(a,"0 <= i < length",yn,"setElt:i"),this._isFrozen&&Ve(this,a),x[a]=y},te.set=function(a,y){this.cd(a,y)},te.first=function(){var a=this.s;return a.length===0?null:a[0]},te.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},te.pop=function(){this._isFrozen&&Ve(this);var a=this.s;return 0<a.length?a.pop():null},yn.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},yn.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},yn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},yn.prototype.map=function(a){for(var y=new yn,x=[],b=this.s,E=b.length,et=0;et<E;et++)x.push(a(b[et]));return y.s=x,y.xb(),y},yn.prototype.filter=function(a){for(var y=new yn,x=[],b=this.s,E=b.length,et=0;et<E;et++){var nt=b[et];a(nt)&&x.push(nt)}return y.s=x,y.xb(),y},te=yn.prototype,te.Gb=function(a,y){0>a&&An(a,">= 0",yn,"insertAt:i"),this._isFrozen&&Ve(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},te.remove=function(a){if(a===null)return!1;this._isFrozen&&Ve(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)},te.delete=function(a){return this.remove(a)},te.mb=function(a){var y=this.s;(0>a||a>=y.length)&&An(a,"0 <= i < length",yn,"removeAt:i"),this._isFrozen&&Ve(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},te.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&&Ve(this);for(var E=a,et=y+1;et<b;)x[E++]=x[et++];return x.length=b-(y-a+1),this.xb(),this},yn.prototype.copy=function(){var a=new yn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},te=yn.prototype,te.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},te.Iv=function(){for(var a=new vn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},te.sort=function(a){return this._isFrozen&&Ve(this),this.s.sort(a),this.xb(),this},te.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Ve(this);var et=x-y;if(1>=et)return this;if((0>y||y>=E-1)&&An(y,"0 <= from < length",yn,"sortRange:from"),et===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},te.reverse=function(){return this._isFrozen&&Ve(this),this.s.reverse(),this.xb(),this},hn.Object.defineProperties(yn.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 ni;var a=this.Sa;return a!==null?(a.reset(),a):new $r(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ni;var a=this.Hg;return a!==null?(a.reset(),a):new hi(this)}}}),yn.prototype.reverse=yn.prototype.reverse,yn.prototype.sortRange=yn.prototype.zi,yn.prototype.sort=yn.prototype.sort,yn.prototype.toSet=yn.prototype.Iv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.removeRange=yn.prototype.removeRange,yn.prototype.removeAt=yn.prototype.mb,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.insertAt=yn.prototype.Gb,yn.prototype.pop=yn.prototype.pop,yn.prototype.last=yn.prototype.jc,yn.prototype.first=yn.prototype.first,yn.prototype.set=yn.prototype.set,yn.prototype.setElt=yn.prototype.cd,yn.prototype.get=yn.prototype.get,yn.prototype.elt=yn.prototype.M,yn.prototype.indexOf=yn.prototype.indexOf,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.clear=yn.prototype.clear,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.push=yn.prototype.push,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze,yn.className="List";function mi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}mi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},mi.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)},mi.prototype.Ad=function(){return this.next()},mi.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},mi.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},mi.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},mi.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},mi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},mi.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},mi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},mi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},hn.Object.defineProperties(mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),mi.prototype.first=mi.prototype.first,mi.prototype.hasNext=mi.prototype.Ad,mi.prototype.next=mi.prototype.next,mi.prototype.reset=mi.prototype.reset,mi.className="SetIterator";function vn(a){ii(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&je("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}te=vn.prototype,te.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return this._isFrozen=!1,this},te.toString=function(){return"Set()#"+gi(this)},te.add=function(a){if(a===null)return this;this._isFrozen&&Ve(this,a);var y=a;return $e(a)&&(y=Gi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Eo(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},te.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Ve(this),Tn(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},te.contains=function(a){if(a===null)return!1;var y=a;return $e(a)&&(y=gi(a),y===void 0)?!1:this.Tb[y]!==void 0},te.has=function(a){return this.contains(a)},te.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},te.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},te.first=function(){var a=this.ea;return a===null?null:a.value},vn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},vn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},vn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},vn.prototype.map=function(a){for(var y=new vn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},vn.prototype.filter=function(a){for(var y=new vn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},te=vn.prototype,te.remove=function(a){if(a===null)return!1;this._isFrozen&&Ve(this,a);var y=a;if($e(a)&&(y=gi(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},te.delete=function(a){return this.remove(a)},te.hp=function(a){if(a===null)return this;if(this._isFrozen&&Ve(this),Tn(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},te.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Ve(this);var y=new vn;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},te.clear=function(){this._isFrozen&&Ve(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},vn.prototype.copy=function(){var a=new vn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},vn.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},vn.prototype.Hv=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function ii(a){a.__gohashid=Bi++}function Gi(a){var y=a.__gohashid;return y===void 0&&(y=Bi++,a.__gohashid=y),y}function gi(a){return a.__gohashid}hn.Object.defineProperties(vn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ni;var a=this.Sa;return a!==null?(a.reset(),a):new mi(this)}}}),vn.prototype.toList=vn.prototype.Hv,vn.prototype.toArray=vn.prototype.Fa,vn.prototype.clear=vn.prototype.clear,vn.prototype.retainAll=vn.prototype.pA,vn.prototype.removeAll=vn.prototype.hp,vn.prototype.delete=vn.prototype.delete,vn.prototype.remove=vn.prototype.remove,vn.prototype.first=vn.prototype.first,vn.prototype.containsAny=vn.prototype.Ty,vn.prototype.containsAll=vn.prototype.Sy,vn.prototype.has=vn.prototype.has,vn.prototype.contains=vn.prototype.contains,vn.prototype.addAll=vn.prototype.addAll,vn.prototype.add=vn.prototype.add,vn.prototype.thaw=vn.prototype.ka,vn.prototype.freeze=vn.prototype.freeze;var Bi=1;vn.className="Set",vn.uniqueHash=ii,vn.hashIdUnique=Gi,vn.hashId=gi;function ri(a){this.ma=a,this.qa=a.Ja,this.sa=null}ri.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ri.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},ri.prototype.Ad=function(){return this.next()},ri.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},ri.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},ri.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},ri.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},ri.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ri.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ri.prototype.de=function(){this.value=this.key=null,this.qa=-1},ri.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},hn.Object.defineProperties(ri.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ri.prototype.first=ri.prototype.first,ri.prototype.hasNext=ri.prototype.Ad,ri.prototype.next=ri.prototype.next,ri.prototype.reset=ri.prototype.reset,ri.className="MapKeySetIterator";function Br(a){vn.call(this),ii(this),this._isFrozen=!0,this.ma=a}Ye(Br,vn),te=Br.prototype,te.freeze=function(){return this},te.ka=function(){return this},te.toString=function(){return"MapKeySet("+this.ma.toString()+")"},te.add=function(){je("This Set is read-only: "+this.toString())},te.contains=function(a){return this.ma.contains(a)},te.has=function(a){return this.contains(a)},te.remove=function(){je("This Set is read-only: "+this.toString())},te.delete=function(a){return this.remove(a)},te.clear=function(){je("This Set is read-only: "+this.toString())},te.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Br.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Br.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Br.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Br.prototype.map=function(a){for(var y=new vn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Br.prototype.filter=function(a){for(var y=new vn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Br.prototype.copy=function(){return new Br(this.ma)},Br.prototype.Iv=function(){var a=new vn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Br.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},Br.prototype.Hv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},hn.Object.defineProperties(Br.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ni:new ri(this.ma)}}}),Br.prototype.toList=Br.prototype.Hv,Br.prototype.toArray=Br.prototype.Fa,Br.prototype.toSet=Br.prototype.Iv,Br.prototype.first=Br.prototype.first,Br.prototype.clear=Br.prototype.clear,Br.prototype.delete=Br.prototype.delete,Br.prototype.remove=Br.prototype.remove,Br.prototype.has=Br.prototype.has,Br.prototype.contains=Br.prototype.contains,Br.prototype.add=Br.prototype.add,Br.prototype.thaw=Br.prototype.ka,Br.prototype.freeze=Br.prototype.freeze,Br.className="MapKeySet";function wi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}wi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},wi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},wi.prototype.Ad=function(){return this.next()},wi.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},wi.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},wi.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},wi.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},wi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},wi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},wi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},hn.Object.defineProperties(wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wi.prototype.first=wi.prototype.first,wi.prototype.hasNext=wi.prototype.Ad,wi.prototype.next=wi.prototype.next,wi.prototype.reset=wi.prototype.reset,wi.className="MapValueSetIterator";function Eo(a,y){this.key=a,this.value=y,this.ll=this.va=null}Eo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Eo.className="KeyValuePair";function Oi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Oi.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)},Oi.prototype.Ad=function(){return this.next()},Oi.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},Oi.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},Oi.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},Oi.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},Oi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Oi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},hn.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="MapIterator";function Yn(a){ii(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"&&je("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}te=Yn.prototype,te.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return this._isFrozen=!1,this},te.toString=function(){return"Map()#"+gi(this)},te.add=function(a,y){this._isFrozen&&Ve(this,a);var x=a;$e(a)&&(x=Gi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Eo(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},te.set=function(a,y){return this.add(a,y)},te.addAll=function(a){if(a===null)return this;if(Tn(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 Yn)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},te.first=function(){return this.ea},Yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Yn.prototype.map=function(a){for(var y=new Yn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Yn.prototype.filter=function(a){for(var y=new Yn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},te=Yn.prototype,te.contains=function(a){var y=a;return $e(a)&&(y=gi(a),y===void 0)?!1:this.Tb[y]!==void 0},te.has=function(a){return this.contains(a)},te.I=function(a){var y=a;return $e(a)&&(y=gi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},te.get=function(a){return this.I(a)},te.remove=function(a){if(a===null)return!1;this._isFrozen&&Ve(this,a);var y=a;if($e(a)&&(y=gi(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},te.delete=function(a){return this.remove(a)},te.clear=function(){this._isFrozen&&Ve(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Yn.prototype.copy=function(){var a=new Yn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Yn.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 Eo(E.key,E.value),x++}return y},Yn.prototype.Lf=function(){return new Br(this)},hn.Object.defineProperties(Yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ni;var a=this.Sa;return a!==null?(a.reset(),a):new Oi(this)}},iteratorKeys:{get:function(){return 0>=this.count?ni:new ri(this)}},iteratorValues:{get:function(){if(0>=this.count)return ni;var a=this.jf;return a!==null?(a.reset(),a):new wi(this)}}}),Yn.prototype.toKeySet=Yn.prototype.Lf,Yn.prototype.toArray=Yn.prototype.Fa,Yn.prototype.clear=Yn.prototype.clear,Yn.prototype.delete=Yn.prototype.delete,Yn.prototype.remove=Yn.prototype.remove,Yn.prototype.get=Yn.prototype.get,Yn.prototype.getValue=Yn.prototype.I,Yn.prototype.has=Yn.prototype.has,Yn.prototype.contains=Yn.prototype.contains,Yn.prototype.first=Yn.prototype.first,Yn.prototype.addAll=Yn.prototype.addAll,Yn.prototype.set=Yn.prototype.set,Yn.prototype.add=Yn.prototype.add,Yn.prototype.thaw=Yn.prototype.ka,Yn.prototype.freeze=Yn.prototype.freeze,Yn.className="Map";function Le(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):je("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ti,so,Ji,Zi,di;Le.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Le.prototype.h=function(a,y){return this.x=a,this.y=y,this},Le.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Le.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Le.prototype.copy=function(){var a=new Le;return a.x=this.x,a.y=this.y,a},te=Le.prototype,te.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},te.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this};function lr(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 Le(x,E)}return new Le}function wr(a){return a.x.toString()+" "+a.y.toString()}te.toString=function(){return"Point("+this.x+","+this.y+")"},te.D=function(a){return a instanceof Le?this.x===a.x&&this.y===a.y:!1},te.hi=function(a,y){return this.x===a&&this.y===y},te.Xa=function(a){return Ge.B(this.x,a.x)&&Ge.B(this.y,a.y)},te.add=function(a){return this.x+=a.x,this.y+=a.y,this},te.re=function(a){return this.x-=a.x,this.y-=a.y,this},te.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.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},te=Le.prototype,te.scale=function(a,y){return this.x*=a,this.y*=y,this},te.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},te.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},te.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},te.ab=function(a){return Vr(a.x-this.x,a.y-this.y)},te.direction=function(a,y){return Vr(a-this.x,y-this.y)};function Vr(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}te.Ry=function(a,y){return Ge.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},te.fA=function(a,y,x,b){return Ge.qh(a,y,x,b,this.x,this.y,this),this},te.gA=function(a,y){return Ge.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},te.uA=function(a,y,x,b){return Ge.No(this.x,this.y,a,y,x,b,this),this},te.vA=function(a,y){return Ge.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},te.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},te.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},te.transform=function(a){return a.Ga(this),this};function gr(a,y){return y.Cd(a),a}function Ur(a,y,x,b,E,et){var nt=E-x,st=et-b,ht=nt*nt+st*st;x-=a,b-=y;var pt=-x*nt-b*st;return 0>=pt||pt>=ht?(nt=E-a,st=et-y,Math.min(x*x+b*b,nt*nt+st*st)):(a=nt*b-st*x,a*a/ht)}function vr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ur(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)}te.w=function(){return isFinite(this.x)&&isFinite(this.y)},Le.alloc=function(){var a=Mr.pop();return a===void 0?new Le:a},Le.allocAt=function(a,y){var x=Mr.pop();return x===void 0?new Le(a,y):(x.x=a,x.y=y,x)},Le.free=function(a){Mr.push(a)},Le.prototype.isReal=Le.prototype.w,Le.prototype.setSpot=Le.prototype.yi,Le.prototype.setRectSpot=Le.prototype.xi,Le.prototype.snapToGridPoint=Le.prototype.vA,Le.prototype.snapToGrid=Le.prototype.uA,Le.prototype.projectOntoLineSegmentPoint=Le.prototype.gA,Le.prototype.projectOntoLineSegment=Le.prototype.fA,Le.intersectingLineSegments=function(a,y,x,b,E,et,nt,st){return Ge.Rl(a,y,x,b,E,et,nt,st)},Le.prototype.compareWithLineSegmentPoint=Le.prototype.Ry,Le.compareWithLineSegment=function(a,y,x,b,E,et){return Ge.Fl(a,y,x,b,E,et)},Le.prototype.direction=Le.prototype.direction,Le.prototype.directionPoint=Le.prototype.ab,Le.prototype.normalize=Le.prototype.normalize,Le.prototype.distanceSquared=Le.prototype.zd,Le.prototype.distanceSquaredPoint=Le.prototype.Bf,Le.prototype.scale=Le.prototype.scale,Le.prototype.rotate=Le.prototype.rotate,Le.prototype.offset=Le.prototype.offset,Le.prototype.subtract=Le.prototype.re,Le.prototype.add=Le.prototype.add,Le.prototype.equalsApprox=Le.prototype.Xa,Le.prototype.equalTo=Le.prototype.hi,Le.prototype.equals=Le.prototype.D,Le.prototype.set=Le.prototype.set,Le.prototype.setTo=Le.prototype.sg;var Mr=[];Le.className="Point",Le.parse=lr,Le.stringify=wr,Le.distanceLineSegmentSquared=Ur,Le.distanceSquared=vr,Le.direction=ur,Le.Origin=Ti=new Le(0,0).ja(),Le.InfiniteTopLeft=so=new Le(-1/0,-1/0).ja(),Le.InfiniteBottomRight=Ji=new Le(1/0,1/0).ja(),Le.SixPoint=Zi=new Le(6,6).ja(),Le.NoPoint=di=new Le(NaN,NaN).ja(),Le.parse=lr,Le.stringify=wr,Le.distanceLineSegmentSquared=Ur,Le.distanceSquared=vr,Le.direction=ur;function kn(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):je("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var fi,Ci,io,bi,lo,xo,Bo;kn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.h=function(a,y){return this.width=a,this.height=y,this},kn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},kn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},kn.prototype.copy=function(){var a=new kn;return a.width=this.width,a.height=this.height,a},te=kn.prototype,te.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},te.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this};function po(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 kn(x,E)}return new kn}function na(a){return a.width.toString()+" "+a.height.toString()}te.toString=function(){return"Size("+this.width+","+this.height+")"},te.D=function(a){return a instanceof kn?this.width===a.width&&this.height===a.height:!1},te.hi=function(a,y){return this.width===a&&this.height===y},te.Xa=function(a){return Ge.B(this.width,a.width)&&Ge.B(this.height,a.height)},te.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},te.w=function(){return isFinite(this.width)&&isFinite(this.height)},kn.alloc=function(){var a=Ao.pop();return a===void 0?new kn:a},kn.free=function(a){Ao.push(a)},kn.prototype.isReal=kn.prototype.w,kn.prototype.inflate=kn.prototype.Bc,kn.prototype.equalsApprox=kn.prototype.Xa,kn.prototype.equalTo=kn.prototype.hi,kn.prototype.equals=kn.prototype.D,kn.prototype.set=kn.prototype.set,kn.prototype.setTo=kn.prototype.sg;var Ao=[];kn.className="Size",kn.parse=po,kn.stringify=na,kn.ZeroSize=fi=new kn(0,0).ja(),kn.OneSize=Ci=new kn(1,1).ja(),kn.SixSize=io=new kn(6,6).ja(),kn.EightSize=bi=new kn(8,8).ja(),kn.TenSize=lo=new kn(10,10).ja(),kn.InfiniteSize=xo=new kn(1/0,1/0).ja(),kn.NoSize=Bo=new kn(NaN,NaN).ja(),kn.parse=po,kn.stringify=na;function on(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 Le?(x=a.x,a=a.y,y instanceof Le?(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 kn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):je("Incorrect second argument supplied to Rect constructor "+y)):je("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}te=on.prototype,te.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},te.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function ra(a,y,x){a.width=y,a.height=x}te.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},te.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},te.dd=function(a){return this.x=a.x,this.y=a.y,this},te.tA=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},te=on.prototype,te.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},te.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this};function za(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 et=0;a[y]==="";)y++;(b=a[y++])&&(et=parseFloat(b));for(var nt=0;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),new on(x,E,et,nt)}return new on}function Ya(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}te.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},te.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},te.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},te.Xa=function(a){return Ge.B(this.x,a.x)&&Ge.B(this.y,a.y)&&Ge.B(this.width,a.width)&&Ge.B(this.height,a.height)};function Hi(a,y){return Ge.$(a.x,y.x)&&Ge.$(a.y,y.y)&&Ge.$(a.width,y.width)&&Ge.$(a.height,y.height)}te.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},te.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},te.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},te.offset=function(a,y){return this.x+=a,this.y+=y,this},te.Bc=function(a,y){return Js(this,y,a,y,a)},te.Co=function(a){return Js(this,a.top,a.right,a.bottom,a.left)},te.Fv=function(a){return Js(this,-a.top,-a.right,-a.bottom,-a.left)},te.Hz=function(a,y,x,b){return Js(this,a,y,x,b)};function Js(a,y,x,b,E){var et=a.width;return x+E<=-et?(a.x+=et/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}te.Ex=function(a){return ls(this,a.x,a.y,a.width,a.height)},te.Uu=function(a,y,x,b){return ls(this,a,y,x,b)};function ls(a,y,x,b,E){var et=Math.max(a.x,y),nt=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=et,a.y=nt,a.width=Math.max(0,y-et),a.height=Math.max(0,x-nt),a}te.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},te.Vu=function(a,y,x,b){var E=this.width,et=this.x;return E!==1/0&&x!==1/0&&(E+=et,x+=a,isNaN(x)||isNaN(E)||et>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 Ml(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))}te.Ye=function(a){return Ai(this,a.x,a.y,0,0)},te.ed=function(a){return Ai(this,a.x,a.y,a.width,a.height)},te.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ai(this,a,y,x,b)};function Ai(a,y,x,b,E){var et=Math.min(a.x,y),nt=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=et,a.y=nt,a.width=y-et,a.height=x-nt,a}te.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 No(a,y,x,b,E,et,nt,st){return nt===void 0&&(nt=0),st===void 0&&(st=0),a<=E&&E+nt<=a+x&&y<=et&&et+st<=y+b}function Ga(a,y,x,b,E,et,nt,st){return a>nt+E||E>x+a?!1:!(y>st+et||et>b+y)}te.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},te.Mz=function(){return this.width===0&&this.height===0},on.alloc=function(){var a=xs.pop();return a===void 0?new on:a},on.allocAt=function(a,y,x,b){var E=xs.pop();return E===void 0?new on(a,y,x,b):E.h(a,y,x,b)},on.free=function(a){xs.push(a)},hn.Object.defineProperties(on.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 Le(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new kn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Le(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}}}),on.prototype.isEmpty=on.prototype.Mz,on.prototype.isReal=on.prototype.w,on.intersectsLineSegment=function(a,y,x,b,E,et,nt,st){return Ge.Fx(a,y,x,b,E,et,nt,st)},on.prototype.setSpot=on.prototype.yi,on.prototype.union=on.prototype.Kv,on.prototype.unionRect=on.prototype.ed,on.prototype.unionPoint=on.prototype.Ye,on.prototype.intersects=on.prototype.Vu,on.prototype.intersectsRect=on.prototype.Yc,on.prototype.intersect=on.prototype.Uu,on.prototype.intersectRect=on.prototype.Ex,on.prototype.grow=on.prototype.Hz,on.prototype.subtractMargin=on.prototype.Fv,on.prototype.addMargin=on.prototype.Co,on.prototype.inflate=on.prototype.Bc,on.prototype.offset=on.prototype.offset,on.prototype.contains=on.prototype.contains,on.prototype.containsRect=on.prototype.Re,on.prototype.containsPoint=on.prototype.ca,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.setSize=on.prototype.tA,on.prototype.setPoint=on.prototype.dd,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var dl=null,uu=null,xs=[];on.className="Rect",on.parse=za,on.stringify=Ya,on.contains=No,on.intersects=Ga,on.ZeroRect=dl=new on(0,0,0,0).ja(),on.NoRect=uu=new on(NaN,NaN,NaN,NaN).ja(),on.parse=za,on.stringify=Ya,on.contains=No,on.intersects=Ga;function Dr(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):je("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Dr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Dr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Dr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Dr.prototype.copy=function(){var a=new Dr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},te=Dr.prototype,te.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},te.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gl(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 Dr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Dr(x);for(var et=NaN;a[y]==="";)y++;if((b=a[y++])&&(et=parseFloat(b)),isNaN(et))return new Dr(x,E);for(var nt=NaN;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),isNaN(nt)?new Dr(x,E):new Dr(x,E,et,nt)}return new Dr}function hu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}te.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},te.D=function(a){return a instanceof Dr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},te.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},te.Xa=function(a){return Ge.B(this.top,a.top)&&Ge.B(this.right,a.right)&&Ge.B(this.bottom,a.bottom)&&Ge.B(this.left,a.left)},te.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Dr.alloc=function(){var a=Nu.pop();return a===void 0?new Dr:a},Dr.free=function(a){Nu.push(a)},Dr.prototype.isReal=Dr.prototype.w,Dr.prototype.equalsApprox=Dr.prototype.Xa,Dr.prototype.equalTo=Dr.prototype.hi,Dr.prototype.equals=Dr.prototype.D,Dr.prototype.set=Dr.prototype.set,Dr.prototype.setTo=Dr.prototype.sg;var us=null,Xo=null,Nu=[];Dr.className="Margin",Dr.parse=Gl,Dr.stringify=hu,Dr.ZeroMargin=us=new Dr(0,0,0,0).ja(),Dr.TwoMargin=Xo=new Dr(2,2,2,2).ja(),Dr.parse=Gl,Dr.stringify=hu;function er(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 zr,qr,ai,pi,Vi,Fr,ws,ia,Uo,oo,Ja,bs,Aa,Ps,Tl,Qs,ju,Xc,sc,pl,Ul,Is,lc,uc,Yc,jo,Wf,hc,Ou,Fu,da,Na,Yo,oa,cc,Du;er.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},er.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.copy=function(){var a=new er;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},te=er.prototype,te.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},te.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this};function mo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Ui(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return zr;if(a==="TopLeft")return qr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return ai;if(a==="TopRight")return pi;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Vi;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ws;if(a==="BottomLeft")return ia;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Uo;if(a==="BottomRight")return oo;if(a==="TopSide")return Ja;if(a==="LeftSide")return bs;if(a==="RightSide")return Aa;if(a==="BottomSide")return Ps;if(a==="TopBottomSides")return Tl;if(a==="LeftRightSides")return Qs;if(a==="TopLeftSides")return ju;if(a==="TopRightSides")return Xc;if(a==="BottomLeftSides")return sc;if(a==="BottomRightSides")return pl;if(a==="NotTopSide")return Ul;if(a==="NotLeftSide")return Is;if(a==="NotRightSide")return lc;if(a==="NotBottomSide")return uc;if(a==="AllSides")return Yc;if(a==="Default")return jo;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 et=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(et=parseFloat(b));for(var nt=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(nt=parseFloat(b)),new er(x,E,et,nt)}return new er}function Ni(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}te.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(zr)?"None":this.D(qr)?"TopLeft":this.D(ai)?"Top":this.D(pi)?"TopRight":this.D(Vi)?"Left":this.D(Fr)?"Center":this.D(ws)?"Right":this.D(ia)?"BottomLeft":this.D(Uo)?"Bottom":this.D(oo)?"BottomRight":this.D(Ja)?"TopSide":this.D(bs)?"LeftSide":this.D(Aa)?"RightSide":this.D(Ps)?"BottomSide":this.D(Tl)?"TopBottomSides":this.D(Qs)?"LeftRightSides":this.D(ju)?"TopLeftSides":this.D(Xc)?"TopRightSides":this.D(sc)?"BottomLeftSides":this.D(pl)?"BottomRightSides":this.D(Ul)?"NotTopSide":this.D(Is)?"NotLeftSide":this.D(lc)?"NotRightSide":this.D(uc)?"NotBottomSide":this.D(Yc)?"AllSides":this.D(jo)?"Default":"None"},te.D=function(a){return a instanceof er?(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},te.gv=function(){return new er(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},te.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Wf))a=bs;else if(a.D(hc))a=Aa;else if(a.D(Ou))a=Ja;else if(a.D(Fu))a=Ps;else return!1;return a=a.offsetY,(this.offsetY&a)===a},te.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},te.Mc=function(){return isNaN(this.x)||isNaN(this.y)},te.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},te.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},te.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},er.alloc=function(){var a=ja.pop();return a===void 0?new er:a},er.free=function(a){ja.push(a)},er.prototype.isDefault=er.prototype.Xb,er.prototype.isNone=er.prototype.ys,er.prototype.isSide=er.prototype.$c,er.prototype.isNoSpot=er.prototype.Mc,er.prototype.isSpot=er.prototype.sb,er.prototype.includesSide=er.prototype.Hf,er.prototype.opposite=er.prototype.gv,er.prototype.equals=er.prototype.D,er.prototype.set=er.prototype.set,er.prototype.setTo=er.prototype.sg;var ja=[];er.className="Spot",er.parse=Ui,er.stringify=Ni,er.None=zr=mo(new er(0,0,0,0),0).ja(),er.Default=jo=mo(new er(0,0,-1,0),-1).ja(),er.TopLeft=qr=new er(0,0,0,0).ja(),er.TopCenter=ai=new er(.5,0,0,0).ja(),er.TopRight=pi=new er(1,0,0,0).ja(),er.LeftCenter=Vi=new er(0,.5,0,0).ja(),er.Center=Fr=new er(.5,.5,0,0).ja(),er.RightCenter=ws=new er(1,.5,0,0).ja(),er.BottomLeft=ia=new er(0,1,0,0).ja(),er.BottomCenter=Uo=new er(.5,1,0,0).ja(),er.BottomRight=oo=new er(1,1,0,0).ja(),er.MiddleTop=da=ai,er.MiddleLeft=Na=Vi,er.MiddleRight=Yo=ws,er.MiddleBottom=oa=Uo,er.Top=Ou=ai,er.Left=Wf=Vi,er.Right=hc=ws,er.Bottom=Fu=Uo,er.TopSide=Ja=mo(new er(0,0,1,1),1).ja(),er.LeftSide=bs=mo(new er(0,0,1,2),1).ja(),er.RightSide=Aa=mo(new er(0,0,1,4),1).ja(),er.BottomSide=Ps=mo(new er(0,0,1,8),1).ja(),er.TopBottomSides=Tl=mo(new er(0,0,1,9),1).ja(),er.LeftRightSides=Qs=mo(new er(0,0,1,6),1).ja(),er.TopLeftSides=ju=mo(new er(0,0,1,3),1).ja(),er.TopRightSides=Xc=mo(new er(0,0,1,5),1).ja(),er.BottomLeftSides=sc=mo(new er(0,0,1,10),1).ja(),er.BottomRightSides=pl=mo(new er(0,0,1,12),1).ja(),er.NotTopSide=Ul=mo(new er(0,0,1,14),1).ja(),er.NotLeftSide=Is=mo(new er(0,0,1,13),1).ja(),er.NotRightSide=lc=mo(new er(0,0,1,11),1).ja(),er.NotBottomSide=uc=mo(new er(0,0,1,7),1).ja(),er.AllSides=Yc=mo(new er(0,0,1,15),1).ja(),cc=new er(.156,.156).ja(),Du=new er(.844,.844).ja(),er.parse=Ui,er.stringify=Ni;function Sr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Sr.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},Sr.prototype.setTransform=function(a,y,x,b,E,et){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=et,this},Sr.prototype.copy=function(){var a=new Sr;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},Sr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Sr.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},Sr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Sr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Sr.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},Sr.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,et=a.m11*y,nt=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*et,E=this.m12*E+this.m22*et,this.dx=this.m11*nt+this.m21*a+this.dx,this.dy=this.m12*nt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Sr.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),et=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=et,this},Sr.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,et=this.m11*-b+this.m21*a,nt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=et,this.m22=nt,this.translate(-y,-x),this},te=Sr.prototype,te.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},te.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},te.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)},te.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))},te.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))},te.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,et=this.m11,nt=this.m12,st=this.m21,ht=this.m22,pt=this.dx,St=this.dy,Mt=y*et+x*st+pt,Gt=y*nt+x*ht+St,Xt=b*et+x*st+pt,Qt=b*nt+x*ht+St;return x=y*et+E*st+pt,y=y*nt+E*ht+St,et=b*et+E*st+pt,b=b*nt+E*ht+St,E=Math.min(Mt,Xt),Mt=Math.max(Mt,Xt),Xt=Math.min(Gt,Qt),Gt=Math.max(Gt,Qt),E=Math.min(E,x),Mt=Math.max(Mt,x),Xt=Math.min(Xt,y),Gt=Math.max(Gt,y),E=Math.min(E,et),Mt=Math.max(Mt,et),Xt=Math.min(Xt,b),Gt=Math.max(Gt,b),a.h(E,Xt,Mt-E,Gt-Xt),a},Sr.alloc=function(){var a=Jo.pop();return a===void 0?new Sr:a},Sr.free=function(a){Jo.push(a)},Sr.prototype.transformRect=Sr.prototype.pp,Sr.prototype.transformPoint=Sr.prototype.Ga,Sr.prototype.scale=Sr.prototype.scale,Sr.prototype.translate=Sr.prototype.translate,Sr.prototype.rotate=Sr.prototype.rotate,Sr.prototype.invert=Sr.prototype.Vj,Sr.prototype.multiplyInverted=Sr.prototype.bv,Sr.prototype.multiply=Sr.prototype.multiply,Sr.prototype.reset=Sr.prototype.reset,Sr.prototype.isIdentity=Sr.prototype.ws,Sr.prototype.equals=Sr.prototype.D,Sr.prototype.setTransform=Sr.prototype.setTransform,Sr.prototype.set=Sr.prototype.set;var Jo=[];Sr.className="Transform",Sr.xF="54a702f3e53909c447824c6706603faf4c";var Ge={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ge.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ge.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,et,nt){if(0>=E&&(E=1e-6),a<x)var st=a,ht=x;else st=x,ht=a;if(y<b)var pt=y,St=b;else pt=b,St=y;if(a===x)return pt<=nt&&nt<=St&&a-E<=et&&et<=a+E;if(y===b)return st<=et&&et<=ht&&y-E<=nt&&nt<=y+E;if(ht+=E,st-=E,st<=et&&et<=ht&&(St+=E,pt-=E,pt<=nt&&nt<=St))if(ht-st>St-pt)if(a-x>E||x-a>E){if(et=(b-y)/(x-a)*(et-a)+y,et-E<=nt&&nt<=et+E)return!0}else return!0;else if(y-b>E||b-y>E){if(nt=(x-a)/(b-y)*(nt-y)+a,nt-E<=et&&et<=nt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,et,nt,st,ht,pt,St,Mt){if(Ge.Yb(a,y,nt,st,Mt,x,b)&&Ge.Yb(a,y,nt,st,Mt,E,et))return Ge.Yb(a,y,nt,st,Mt,pt,St);var Gt=(a+x)/2,Xt=(y+b)/2,Qt=(x+E)/2,ie=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Gt+Qt)/2,x=(Xt+ie)/2,Qt=(Qt+E)/2,ie=(ie+et)/2;var Me=(b+Qt)/2,xe=(x+ie)/2;return Ge.cs(a,y,Gt,Xt,b,x,Me,xe,ht,pt,St,Mt)||Ge.cs(Me,xe,Qt,ie,E,et,nt,st,ht,pt,St,Mt)},ax:function(a,y,x,b,E,et,nt,st,ht){var pt=(x+E)/2,St=(b+et)/2;return ht.h((((a+x)/2+pt)/2+(pt+(E+nt)/2)/2)/2,(((y+b)/2+St)/2+(St+(et+st)/2)/2)/2),ht},My:function(a,y,x,b,E,et,nt,st){var ht=(x+E)/2,pt=(b+et)/2;return ur(((a+x)/2+ht)/2,((y+b)/2+pt)/2,(ht+(E+nt)/2)/2,(pt+(et+st)/2)/2)},Dl:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,nt,st,ht,x,b)&&Ge.Yb(a,y,nt,st,ht,E,et))Ai(pt,a,y,0,0),Ai(pt,nt,st,0,0);else{var St=(a+x)/2,Mt=(y+b)/2,Gt=(x+E)/2,Xt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(St+Gt)/2,x=(Mt+Xt)/2,Gt=(Gt+E)/2,Xt=(Xt+et)/2;var Qt=(b+Gt)/2,ie=(x+Xt)/2;Ge.Dl(a,y,St,Mt,b,x,Qt,ie,ht,pt),Ge.Dl(Qt,ie,Gt,Xt,E,et,nt,st,ht,pt)}return pt},Qe:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,nt,st,ht,x,b)&&Ge.Yb(a,y,nt,st,ht,E,et))pt.length===0&&(pt.push(a),pt.push(y)),pt.push(nt),pt.push(st);else{var St=(a+x)/2,Mt=(y+b)/2,Gt=(x+E)/2,Xt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(St+Gt)/2,x=(Mt+Xt)/2,Gt=(Gt+E)/2,Xt=(Xt+et)/2;var Qt=(b+Gt)/2,ie=(x+Xt)/2;Ge.Qe(a,y,St,Mt,b,x,Qt,ie,ht,pt),Ge.Qe(Qt,ie,Gt,Xt,E,et,nt,st,ht,pt)}return pt},jv:function(a,y,x,b,E,et,nt,st,ht,pt){if(Ge.Yb(a,y,E,et,pt,x,b))return Ge.Yb(a,y,E,et,pt,st,ht);var St=(a+x)/2,Mt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var Gt=(St+x)/2,Xt=(Mt+b)/2;return Ge.jv(a,y,St,Mt,Gt,Xt,nt,st,ht,pt)||Ge.jv(Gt,Xt,x,b,E,et,nt,st,ht,pt)},OA:function(a,y,x,b,E,et,nt){return nt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+et)/2)/2),nt},iv:function(a,y,x,b,E,et,nt,st){if(Ge.Yb(a,y,E,et,nt,x,b))Ai(st,a,y,0,0),Ai(st,E,et,0,0);else{var ht=(a+x)/2,pt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var St=(ht+x)/2,Mt=(pt+b)/2;Ge.iv(a,y,ht,pt,St,Mt,nt,st),Ge.iv(St,Mt,x,b,E,et,nt,st)}return st},ep:function(a,y,x,b,E,et,nt,st){if(Ge.Yb(a,y,E,et,nt,x,b))st.length===0&&(st.push(a),st.push(y)),st.push(E),st.push(et);else{var ht=(a+x)/2,pt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var St=(ht+x)/2,Mt=(pt+b)/2;Ge.ep(a,y,ht,pt,St,Mt,nt,st),Ge.ep(St,Mt,x,b,E,et,nt,st)}return st},Eo:function(a,y,x,b,E,et,nt,st,ht,pt,St,Mt,Gt,Xt){if(Ge.Yb(a,y,nt,st,Gt,x,b)&&Ge.Yb(a,y,nt,st,Gt,E,et))return!Ge.Rl(a,y,nt,st,ht,pt,St,Mt)||(Gt=(a-nt)*(pt-Mt)-(y-st)*(ht-St),Gt===0)?!1:(Xt.h(((a*st-y*nt)*(ht-St)-(a-nt)*(ht*Mt-pt*St))/Gt,((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*St))/Gt),!0);var Qt=(a+x)/2,ie=(y+b)/2,Me=(x+E)/2,xe=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Me)/2,x=(ie+xe)/2,Me=(Me+E)/2,xe=(xe+et)/2;var Ne=(b+Me)/2,Fe=(x+xe)/2,De=1/0,_e=!1,Ze=0,Ln=0;return Ge.Eo(a,y,Qt,ie,b,x,Ne,Fe,ht,pt,St,Mt,Gt,Xt)&&(a=(Xt.x-ht)*(Xt.x-ht)+(Xt.y-pt)*(Xt.y-pt),a<De&&(De=a,_e=!0,Ze=Xt.x,Ln=Xt.y)),Ge.Eo(Ne,Fe,Me,xe,E,et,nt,st,ht,pt,St,Mt,Gt,Xt)&&(Xt.x-ht)*(Xt.x-ht)+(Xt.y-pt)*(Xt.y-pt)<De&&(_e=!0,Ze=Xt.x,Ln=Xt.y),_e&&(Xt.x=Ze,Xt.y=Ln),_e},Fo:function(a,y,x,b,E,et,nt,st,ht,pt,St,Mt,Gt){var Xt=0;if(Ge.Yb(a,y,nt,st,Gt,x,b)&&Ge.Yb(a,y,nt,st,Gt,E,et)){if(Gt=(a-nt)*(pt-Mt)-(y-st)*(ht-St),Gt===0)return Xt;var Qt=((a*st-y*nt)*(ht-St)-(a-nt)*(ht*Mt-pt*St))/Gt,ie=((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*St))/Gt;if(Qt>=St)return Xt;if((ht>St?ht-St:St-ht)<(pt>Mt?pt-Mt:Mt-pt)){if(y<st?(ht=y,a=st):(ht=st,a=y),ie<ht||ie>a)return Xt}else if(a<nt?(ht=a,a=nt):ht=nt,Qt<ht||Qt>a)return Xt;0<Gt?Xt++:0>Gt&&Xt--}else{Qt=(a+x)/2,ie=(y+b)/2;var Me=(x+E)/2,xe=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Me)/2,x=(ie+xe)/2,Me=(Me+E)/2,xe=(xe+et)/2;var Ne=(b+Me)/2,Fe=(x+xe)/2;Xt+=Ge.Fo(a,y,Qt,ie,b,x,Ne,Fe,ht,pt,St,Mt,Gt),Xt+=Ge.Fo(Ne,Fe,Me,xe,E,et,nt,st,ht,pt,St,Mt,Gt)}return Xt},qh:function(a,y,x,b,E,et,nt){return Ge.$(a,x)?(y<b?(x=y,y=b):x=b,et<x?(nt.h(a,x),!1):et>y?(nt.h(a,y),!1):(nt.h(a,et),!0)):Ge.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(nt.h(b,y),!1):E>a?(nt.h(a,y),!1):(nt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-et)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(nt.h(a,y),!1):1.000005<E?(nt.h(x,b),!1):(nt.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,et,nt,st,ht){return Ge.B(a,x)&&Ge.B(y,b)?(ht.h(a,y),!1):Ge.$(E,nt)?Ge.$(a,x)?(Ge.qh(a,y,x,b,E,et,ht),!1):Ge.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,ht):(st=(st-et)/(nt-E),Ge.$(a,x)?(x=st*(a-E)+et,y<b?(E=y,y=b):E=b,x<E?(ht.h(a,E),!1):x>y?(ht.h(a,y),!1):(ht.h(a,x),!0)):(nt=(b-y)/(x-a),Ge.$(st,nt)?(Ge.qh(a,y,x,b,E,et,ht),!1):(E=(nt*a-st*E+et-y)/(nt-st),Ge.$(nt,0)?(a<x?(b=a,a=x):b=x,E<b?(ht.h(b,y),!1):E>a?(ht.h(a,y),!1):(ht.h(E,y),!0)):Ge.qh(a,y,x,b,E,nt*(E-a)+y,ht))))},MA:function(a,y,x,b,E){return Ge.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,et,nt,st,ht,pt){function St(Me,xe){var Ne=(Me-a)*(Me-a)+(xe-y)*(xe-y);Ne<Mt&&(Mt=Ne,ht.h(Me,xe))}var Mt=1/0;St(ht.x,ht.y);var Gt=0,Xt=0,Qt=0,ie=0;if(E<nt?(Gt=E,Xt=nt):(Gt=nt,Xt=E),et<st?(Qt=E,ie=nt):(Qt=nt,ie=E),Gt=(Xt-Gt)/2+pt,pt=(ie-Qt)/2+pt,E=(E+nt)/2,et=(et+st)/2,Gt===0||pt===0)return ht;if(.5>(x>a?x-a:a-x)){if(Gt=1-(x-E)*(x-E)/(Gt*Gt),0>Gt)return ht;Gt=Math.sqrt(Gt),b=-pt*Gt+et,St(x,pt*Gt+et),St(x,b)}else{if(x=(b-y)/(x-a),b=1/(Gt*Gt)+x*x/(pt*pt),st=2*x*(y-x*a)/(pt*pt)-2*x*et/(pt*pt)-2*E/(Gt*Gt),Gt=st*st-4*b*(2*x*a*et/(pt*pt)-2*y*et/(pt*pt)+et*et/(pt*pt)+E*E/(Gt*Gt)-1+(y-x*a)*(y-x*a)/(pt*pt)),0>Gt)return ht;Gt=Math.sqrt(Gt),pt=(-st+Gt)/(2*b),St(pt,x*pt-x*a+y),Gt=(-st-Gt)/(2*b),St(Gt,x*Gt-x*a+y)}return ht},Ff:function(a,y,x,b,E,et,nt,st,ht){var pt=1e21,St=a,Mt=y;if(Ge.Ve(a,y,a,b,E,et,nt,st,ht)){var Gt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et);Gt<pt&&(pt=Gt,St=ht.x,Mt=ht.y)}return Ge.Ve(x,y,x,b,E,et,nt,st,ht)&&(Gt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),Gt<pt&&(pt=Gt,St=ht.x,Mt=ht.y)),Ge.Ve(a,y,x,y,E,et,nt,st,ht)&&(y=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),y<pt&&(pt=y,St=ht.x,Mt=ht.y)),Ge.Ve(a,b,x,b,E,et,nt,st,ht)&&(a=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),a<pt&&(pt=a,St=ht.x,Mt=ht.y)),ht.h(St,Mt),1e21>pt},us:function(a,y,x){return Ge.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,et,nt,st){var ht=a+x,pt=y+b;return E===nt?(et<st?(nt=et,et=st):nt=st,a<=E&&E<=ht&&nt<=pt&&et>=y):et===st?(E<nt?(st=E,E=nt):st=nt,y<=et&&et<=pt&&st<=ht&&E>=a):!!(No(a,y,x,b,E,et)||No(a,y,x,b,nt,st)||Ge.Rl(a,y,ht,y,E,et,nt,st)||Ge.Rl(ht,y,ht,pt,E,et,nt,st)||Ge.Rl(ht,pt,a,pt,E,et,nt,st)||Ge.Rl(a,pt,a,y,E,et,nt,st))},Rl:function(a,y,x,b,E,et,nt,st){return a===x&&y===b&&E===nt&&et===st?a===E&&y===et:0>=Ge.Fl(a,y,x,b,E,et)*Ge.Fl(a,y,x,b,nt,st)&&0>=Ge.Fl(E,et,nt,st,a,y)*Ge.Fl(E,et,nt,st,x,b)},Fl:function(a,y,x,b,E,et){return x-=a,b-=y,a=E-a,y=et-y,et=a*b-y*x,et===0&&(et=a*x+y*b,0<et&&(et=(a-x)*x+(y-b)*b,0>et&&(et=0))),et},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,et){var nt=Math.PI;et||(b*=nt/180,E*=nt/180);var st=b>E?-1:1;et=[];var ht=nt/2,pt=b;if(b=Math.min(2*nt,Math.abs(E-b)),1e-5>b)return ht=pt+st*Math.min(b,ht),st=a+x*Math.cos(pt),pt=y+x*Math.sin(pt),a+=x*Math.cos(ht),y+=x*Math.sin(ht),x=(st+a)/2,ht=(pt+y)/2,et.push([st,pt,x,ht,x,ht,a,y]),et;for(;1e-5<b;)E=pt+st*Math.min(b,ht),et.push(Ge.Vy(x,pt,E,a,y)),b-=Math.abs(E-pt),pt=E;return et},Vy:function(a,y,x,b,E){var et=(x-y)/2,nt=a*Math.cos(et),st=a*Math.sin(et),ht=-st,pt=nt*nt+ht*ht,St=pt+nt*nt+ht*st;return pt=4/3*(Math.sqrt(2*pt*St)-St)/(nt*st-ht*nt),st=nt-pt*ht,nt=ht+pt*nt,ht=-nt,pt=et+y,et=Math.cos(pt),pt=Math.sin(pt),[b+a*Math.cos(y),E+a*Math.sin(y),b+st*et-nt*pt,E+st*pt+nt*et,b+st*et-ht*pt,E+st*pt+ht*et,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,et,nt){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/et)*et+b;var st=x;return x+E-a<E/2&&(st=x+E),a=b,b+et-y<et/2&&(a=b+et),nt.h(st,a),nt},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,et=0>b;if(a<y)var nt=1,st=0;else nt=0,st=1;var ht=nt===0?a:y,pt=nt===0?x:b;return(nt===0?E:et)&&(pt=-pt),nt=st,x=nt===0?x:b,(nt===0?E:et)&&(x=-x),Ge.az(ht,nt===0?a:y,pt,x,0,0)},az:function(a,y,x,b,E,et){if(0<b)if(0<x){E=a*a,et=y*y,a*=x;var nt=y*b,st=-et+nt,ht=-et+Math.sqrt(a*a+nt*nt);y=st;for(var pt=0;9999999999>pt&&(y=.5*(st+ht),!(y===st||y===ht));++pt){var St=a/(y+E),Mt=nt/(y+et);if(St=St*St+Mt*Mt-1,0<St)st=y;else if(0>St)ht=y;else break}x=E*x/(y+E)-x,b=et*b/(y+et)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,et=a*x,et<b?(b=et/b,et=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+et*et)):x=Math.abs(x-a);return x},Ze:new ir,um:new ir,Mf:new ir,Nf:0,vm:100};Ge.za=Ge.AA;function Pn(a){ii(this),this.l=2,a===void 0&&(a=Pn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Pn.o?this.ee=new yn:(Pn.V===null&&(Pn.V=new yn().freeze()),this.ee=Pn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=qr,this.gg=oo,this.Rk=this.Sk=NaN,this.Uf=gn}Pn.prototype.copy=function(){var a=new Pn;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===Pn.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},Pn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Pn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Pn.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},Pn.prototype.ka=function(){if(Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Pn.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},Pn.prototype.Xa=function(a){if(!(a instanceof Pn))return!1;if(this.type!==a.type)return this.type===Pn.j&&a.type===Pn.o?$s(this,a):a.type===Pn.j&&this.type===Pn.o?$s(a,this):!1;if(this.type===Pn.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 Ge.B(this.startX,a.startX)&&Ge.B(this.startY,a.startY)&&Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)};function $s(a,y){return a.type!==Pn.j||y.type!==Pn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Ge.B(a.startX,y.startX)&&Ge.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ki&&Ge.B(a.endX,y.endX)&&Ge.B(a.endY,y.endY))))}Pn.ia=function(a){return a.toString()},Pn.prototype.qb=function(a){a.classType===Pn&&(this.type=a)},Pn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Pn.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 Pn.u:var y=new on(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 Pn.F:if(y=new on(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 Pn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var et=x[E];0<E&&(y+=" x "),et.isFilled&&(y+="F "),y+=et.toString(a)}return y;default:return this.type.toString()}},Pn.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},Pn.parse=function(a,y){function x(){return ie>=De-1?!0:pt[ie+1].match(_e)!==null}function b(){return ie++,pt[ie]}function E(br){var dr=parseFloat(b()),ti=parseFloat(b());Me===Me.toLowerCase()&&(dr=Fe.x+dr,ti=Fe.y+ti),br.h(dr,ti)}function et(){return E(Fe),Fe}function nt(){return E(Ne),Ne}function st(){var br=xe.toLowerCase();return br!=="c"&&br!=="s"&&br!=="q"&&br!=="t"?Fe:new Le(2*Fe.x-Ne.x,2*Fe.y-Ne.y)}y===void 0&&(y=!1);var ht=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ht,"$1 $2"),a=a.replace(ht,"$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 pt=a.split(" ");for(a=0;a<pt.length;a++){var St=pt[a];if(St.match(/(\.[0-9]*)(\.)/gm)!==null){ht=On();for(var Mt="",Gt=!1,Xt=0;Xt<St.length;Xt++){var Qt=St[Xt];Qt!=="."||Gt?Qt==="."?(ht.push(Mt),Mt="."):Mt+=Qt:(Gt=!0,Mt+=Qt)}for(ht.push(Mt),pt.splice(a,1),St=0;St<ht.length;St++)pt.splice(a+St,0,ht[St]);a+=ht.length-1,Fn(ht)}}var ie=-1,Me="",xe="";ht=new Le(0,0);var Ne=new Le(0,0),Fe=new Le(0,0),De=pt.length;a=N1(null),Gt=Mt=St=!1,Xt=!0,Qt=null;for(var _e=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ie>=De-1);)if(xe=Me,Me=b(),Me!=="")switch(Me.toUpperCase()){case"X":Xt=!0,Mt=St=!1;break;case"M":for(Qt=et(),a.mc===null||Xt===!0?(Td(a,Qt.x,Qt.y,St,!Mt,Gt),Xt=!1):a.moveTo(Qt.x,Qt.y),ht.assign(Fe);!x();)Qt=et(),a.lineTo(Qt.x,Qt.y);break;case"L":for(;!x();)Qt=et(),a.lineTo(Qt.x,Qt.y);break;case"H":for(;!x();)Fe=new Le((Me===Me.toLowerCase()?Fe.x:0)+parseFloat(b()),Fe.y),a.lineTo(Fe.x,Fe.y);break;case"V":for(;!x();)Fe=new Le(Fe.x,(Me===Me.toLowerCase()?Fe.y:0)+parseFloat(b())),a.lineTo(Fe.x,Fe.y);break;case"C":for(;!x();){Qt=new Le,E(Qt);var Ze=nt(),Ln=et();rh(a,Qt.x,Qt.y,Ze.x,Ze.y,Ln.x,Ln.y)}break;case"S":for(;!x();)Qt=st(),Ze=nt(),Ln=et(),rh(a,Qt.x,Qt.y,Ze.x,Ze.y,Ln.x,Ln.y);break;case"Q":for(;!x();)Qt=nt(),Ze=et(),Im(a,Qt.x,Qt.y,Ze.x,Ze.y);break;case"T":for(;!x();)Ne=Qt=st(),Ze=et(),Im(a,Qt.x,Qt.y,Ze.x,Ze.y);break;case"B":for(;!x();){Qt=parseFloat(b()),Ze=parseFloat(b()),Ln=parseFloat(b());var _n=parseFloat(b()),Bn=parseFloat(b()),wn=Bn,cn=!1;x()||(wn=parseFloat(b()),x()||(cn=parseFloat(b())!==0)),Me===Me.toLowerCase()&&(Ln+=Fe.x,_n+=Fe.y),a.arcTo(Qt,Ze,Ln,_n,Bn,wn,cn)}break;case"A":for(;!x();)Qt=Math.abs(parseFloat(b())),Ze=Math.abs(parseFloat(b())),Ln=parseFloat(b()),Bn=_n=!1,cn=wn=0,wn=b(),wn.length===1?(_n=!!parseFloat(wn),Bn=!!parseFloat(b()),wn=parseFloat(b())):wn.length===2?(_n=!!parseFloat(wn[0]),Bn=!!parseFloat(wn[1]),wn=parseFloat(b())):(_n=!!parseFloat(wn[0]),Bn=!!parseFloat(wn[1]),wn=parseFloat(wn.slice(2))),cn=parseFloat(b()),Me===Me.toLowerCase()&&(wn=Fe.x+wn,cn=Fe.y+cn),Fe.h(wn,cn),Px(a,Qt,Ze,Ln,_n,Bn,wn,cn);break;case"Z":bx(a),Fe.assign(ht);break;case"F":for(Qt="",Ze=1;pt[ie+Ze];)if(pt[ie+Ze]==="0")Gt=!0,Ze++;else if(pt[ie+Ze].match(/[Uu]/)!==null)Ze++;else if(pt[ie+Ze].match(_e)===null)Ze++;else{Qt=pt[ie+Ze];break}Qt.match(/[Mm]/)?St=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qt="",Ze=1;pt[ie+Ze];)if(pt[ie+Ze].match(/[Ff]/)!==null)Ze++;else if(pt[ie+Ze].match(_e)===null)Ze++;else{Qt=pt[ie+Ze];break}Qt.match(/[Mm]/)?Mt=!0:a.mc.isShadowed=!1}if(ht=a.os,Rm=a,y)for(y=ht.figures.iterator;y.next();)y.value.isFilled=!0;return ht},Pn.Ha=function(a,y){for(var x=a.length,b=Le.alloc(),E=0;E<x;E++){var et=a[E];b.x=et[0],b.y=et[1],y.Ga(b),et[0]=b.x,et[1]=b.y,b.x=et[2],b.y=et[3],y.Ga(b),et[2]=b.x,et[3]=b.y,b.x=et[4],b.y=et[5],y.Ga(b),et[4]=b.x,et[5]=b.y,b.x=et[6],b.y=et[7],y.Ga(b),et[6]=b.x,et[7]=b.y}Le.free(b)},Pn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Pn.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},Pn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Pn.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 et=0;et<E;et++){var nt=b[et];nt._isInvalidBounds=!1,nt.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),Wl(this,a,!1),Ai(a,0,0,0,0),a.freeze()},Pn.prototype.ix=function(){var a=new on;return Wl(this,a,!0),a};function Wl(a,y,x){switch(a.type){case Pn.j:case Pn.u:case Pn.F:x?y.h(a.od,a.pd,0,0):Ai(y,a.od,a.pd,0,0),Ai(y,a.Dc,a.Ec,0,0);break;case Pn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var et=a[E];x&&E===0?y.h(et.startX,et.startY,0,0):Ai(y,et.startX,et.startY,0,0);for(var nt=et.segments.s,st=nt.length,ht=et.startX,pt=et.startY,St=0;St<st;St++){var Mt=nt[St];switch(Mt.type){case ki:case bo:ht=Mt.endX,pt=Mt.endY,Ai(y,ht,pt,0,0);break;case Wo:Ge.Dl(ht,pt,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.5,y),ht=Mt.endX,pt=Mt.endY;break;case cs:Ge.iv(ht,pt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.5,y),ht=Mt.endX,pt=Mt.endY;break;case ao:case Cs:var Gt=Mt.type===ao?$a(Mt,et):Rs(Mt,et,ht,pt),Xt=Gt.length;if(Xt===0){ht=Mt.type===ao?Mt.centerX:Mt.endX,pt=Mt.type===ao?Mt.centerY:Mt.endY,Ai(y,ht,pt,0,0);break}Mt=null;for(var Qt=0;Qt<Xt;Qt++)Mt=Gt[Qt],Ge.Dl(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,y);Mt!==null&&(ht=Mt[6],pt=Mt[7]);break;default:je("Unknown Segment type: "+Mt.type)}}}break;default:je("Unknown Geometry type: "+a.type)}}Pn.prototype.normalize=function(){this._isFrozen&&Ve(this);var a=this.ix();return this.offset(-a.x,-a.y),new Le(-a.x,-a.y)},Pn.prototype.offset=function(a,y){return this._isFrozen&&Ve(this),this.transform(1,0,0,1,a,y),this},Pn.prototype.scale=function(a,y){return this._isFrozen&&Ve(this),this.transform(a,0,0,y,0,0),this},Pn.prototype.rotate=function(a,y,x){this._isFrozen&&Ve(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Sr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Sr.free(b),this},te=Pn.prototype,te.transform=function(a,y,x,b,E,et){switch(this.type){case Pn.j:case Pn.u:case Pn.F:var nt=this.od,st=this.pd;this.od=nt*a+st*x+E,this.pd=nt*y+st*b+et,nt=this.Dc,st=this.Ec,this.Dc=nt*a+st*x+E,this.Ec=nt*y+st*b+et;break;case Pn.o:for(var ht=this.figures.s,pt=ht.length,St=0;St<pt;St++){var Mt=ht[St];nt=Mt.startX,st=Mt.startY,Mt.startX=nt*a+st*x+E,Mt.startY=nt*y+st*b+et,Mt=Mt.segments.s;for(var Gt=Mt.length,Xt=0;Xt<Gt;Xt++){var Qt=Mt[Xt];switch(Qt.type){case ki:case bo:nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case Wo:nt=Qt.point1X,st=Qt.point1Y,Qt.point1X=nt*a+st*x+E,Qt.point1Y=nt*y+st*b+et,nt=Qt.point2X,st=Qt.point2Y,Qt.point2X=nt*a+st*x+E,Qt.point2Y=nt*y+st*b+et,nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case cs:nt=Qt.point1X,st=Qt.point1Y,Qt.point1X=nt*a+st*x+E,Qt.point1Y=nt*y+st*b+et,nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case ao:nt=Qt.centerX,st=Qt.centerY,Qt.centerX=nt*a+st*x+E,Qt.centerY=nt*y+st*b+et,y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Qt.startAngle+=nt),0>a&&(Qt.startAngle=180-Qt.startAngle,Qt.sweepAngle=-Qt.sweepAngle),0>b&&(Qt.startAngle=-Qt.startAngle,Qt.sweepAngle=-Qt.sweepAngle),Qt.radiusX*=Math.sqrt(a*a+x*x),Qt.radiusY!==void 0&&(Qt.radiusY*=Math.sqrt(y*y+b*b));break;case Cs:if(nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et,Qt.radiusX===0||Qt.radiusY===0)break;y!==0&&(nt=180*Math.atan2(y,a)/Math.PI,0>nt&&(nt+=360),Qt.xAxisRotation+=nt),0>a&&(Qt.xAxisRotation=180-Qt.xAxisRotation,Qt.isClockwiseArc=!Qt.isClockwiseArc),0>b&&(Qt.xAxisRotation=-Qt.xAxisRotation,Qt.isClockwiseArc=!Qt.isClockwiseArc),Qt.radiusX*=Math.sqrt(a*a+x*x),Qt.radiusY*=Math.sqrt(y*y+b*b);break;default:je("Unknown Segment type: "+Qt.type)}}}}return this._isInvalidBounds=!0,this},te.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,et=this.Ec;switch(this.type){case Pn.j:return Ge.Yb(x,b,E,et,y,a.x,a.y);case Pn.u:var nt=on.allocAt(Math.min(x,E)-y,Math.min(b,et)-y,Math.abs(E-x)+2*y,Math.abs(et-b)+2*y);return a=nt.ca(a),on.free(nt),a;case Pn.F:nt=Math.min(x,E)-y;var st=Math.min(b,et)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(et-b)+2*y)/2,0>=x||0>=y?!1:(nt=a.x-(nt+x),st=a.y-(st+y),1>=nt*nt/(x*x)+st*st/(y*y));case Pn.o:return hs(this,a,y,!0,!1);default:return!1}};function hs(a,y,x,b,E){var et=y.x;y=y.y;for(var nt=a.bounds.x-20,st=0,ht,pt,St,Mt,Gt=a.figures.s,Xt=Gt.length,Qt=0;Qt<Xt;Qt++){var ie=Gt[Qt],Me=!ie.isEvenOdd;if(ie.isFilled){if(b&&ie.ca(et,y,x))return!0;var xe=ie.segments;ht=ie.startX,pt=ie.startY;for(var Ne=ht,Fe=pt,De=xe.s,_e=0;_e<=xe.length;_e++){var Ze=void 0;if(_e!==xe.length){Ze=De[_e];var Ln=Ze.type;a=Ze.endX,Mt=Ze.endY}else Ln=ki,a=Ne,Mt=Fe;switch(Ln){case bo:if(Ne=Qa(et,y,nt,y,ht,pt,Ne,Fe),isNaN(Ne))return!0;st+=Ne,Ne=a,Fe=Mt;break;case ki:if(ht=Qa(et,y,nt,y,ht,pt,a,Mt),isNaN(ht))return!0;st+=ht;break;case Wo:St=Ge.Fo(ht,pt,Ze.point1X,Ze.point1Y,Ze.point2X,Ze.point2Y,a,Mt,nt,y,et,y,.5),st+=St;break;case cs:St=Ge.Fo(ht,pt,(ht+2*Ze.point1X)/3,(pt+2*Ze.point1Y)/3,(2*Ze.point1X+a)/3,(2*Ze.point1Y+Mt)/3,a,Mt,nt,y,et,y,.5),st+=St;break;case ao:case Cs:Ln=Ze.type===ao?$a(Ze,ie):Rs(Ze,ie,ht,pt);var _n=Ln.length;if(_n===0){if(ht=Qa(et,y,nt,y,ht,pt,Ze.type===ao?Ze.centerX:Ze.endX,Ze.type===ao?Ze.centerY:Ze.endY),isNaN(ht))return!0;st+=ht;break}Ze=null;for(var Bn=0;Bn<_n;Bn++){if(Ze=Ln[Bn],Bn===0){if(St=Qa(et,y,nt,y,ht,pt,Ze[0],Ze[1]),isNaN(St))return!0;st+=St}St=Ge.Fo(Ze[0],Ze[1],Ze[2],Ze[3],Ze[4],Ze[5],Ze[6],Ze[7],nt,y,et,y,.5),st+=St}Ze!==null&&(a=Ze[6],Mt=Ze[7]);break;default:je("Unknown Segment type: "+Ze.type)}ht=a,pt=Mt}if(Me){if(st!==0)return!0}else if(st%2!==0)return!0;st=0}else if(ie.ca(et,y,E?x:x+2))return!0}return!1}function Qa(a,y,x,b,E,et,nt,st){if(Ge.Yb(E,et,nt,st,.05,a,y))return NaN;var ht=(a-x)*(et-st);if(ht===0)return 0;var pt=((a*b-y*x)*(E-nt)-(a-x)*(E*st-et*nt))/ht;if(y=(a*b-y*x)*(et-st)/ht,pt>=a)return 0;if((E>nt?E-nt:nt-E)<(et>st?et-st:st-et)){if(et<st){if(y<et||y>st)return 0}else if(y<st||y>et)return 0}else if(E<nt){if(pt<E||pt>nt)return 0}else if(pt<nt||pt>E)return 0;return 0<ht?1:-1}function gl(a,y,x,b){a=a.figures.s;for(var E=a.length,et=0;et<E;et++)if(a[et].ca(y,x,b))return!0;return!1}te.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Le),this.type===Pn.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,et=this.flattenedTotalLength*a,nt=0,st=0;st<E;st++){var ht=b[st],pt=ht.length;for(a=0;a<pt;a++){var St=ht[a];if(nt+St>=et)return b=et-nt,b=St===0?0:b/St,x=x[st],st=x[2*a],E=x[2*a+1],y.h(st+(x[2*a+2]-st)*b,E+(x[2*a+3]-E)*b),y;nt+=St}}return y},te.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Pn.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,et=0,nt=0;nt<b;nt++){var st=x[nt],ht=st.length;for(a=0;a<ht;a++){var pt=st[a];if(et+pt>=E)return E=y[nt],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;et+=pt}}return NaN},te.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Pn.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,et=this.flattenedTotalLength*a,nt=0,st=0;st<E;st++){var ht=b[st],pt=ht.length;for(a=0;a<pt;a++){var St=ht[a];if(nt+St>=et)return b=et-nt,b=St===0?0:b/St,St=x[st],x=St[2*a],st=St[2*a+1],E=St[2*a+2],a=St[2*a+3],y[0]=x+(E-x)*b,y[1]=st+(a-st)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-st)?0:1>Math.abs(E-x)?0<=a-st?90:270:1>Math.abs(a-st)?0<=E-x?0:180:180*Math.atan2(a-st,E-x)/Math.PI,y;nt+=St}}return y},te.xx=function(a){if(this.type===Pn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var et=a.x;if(a=a.y,y===b){if(x<E){var nt=x;b=E}else nt=E,b=x;return a<=nt?nt===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-nt)}if(x===E)return y<b?nt=y:(nt=b,b=y),et<=nt?nt===y?0:1:et>=b?b===y?0:1:Math.abs(et-y)/(b-nt);nt=(b-y)*(b-y)+(E-x)*(E-x);var st=Le.alloc();return Ge.qh(y,x,b,E,et,a,st),a=st.x,et=st.y,Le.free(st),Math.sqrt(((a-y)*(a-y)+(et-x)*(et-x))/nt)}}else if(this.type===Pn.u){nt=this.startX,st=this.startY;var ht=this.endX;if(E=this.endY,nt!==ht||st!==E){y=ht-nt,x=E-st,et=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,nt),ht),a=Math.min(Math.max(a,st),E),nt=Math.abs(b-nt),ht=Math.abs(b-ht),st=Math.abs(a-st),E=Math.abs(a-E);var pt=Math.min(nt,ht,st,E);if(pt===st)return b/et;if(pt===ht)return(y+a)/et;if(pt===E)return(2*y+x-b)/et;if(pt===nt)return(2*y+2*x-a)/et}}else{y=this.flattenedSegments,x=this.flattenedLengths,et=this.flattenedTotalLength,b=Le.alloc(),E=1/0,st=nt=0,ht=y.length;for(var St=pt=0,Mt=0;Mt<ht;Mt++)for(var Gt=y[Mt],Xt=x[Mt],Qt=Gt.length,ie=0;ie<Qt;ie+=2){var Me=Gt[ie],xe=Gt[ie+1];if(ie!==0){Ge.qh(pt,St,Me,xe,a.x,a.y,b);var Ne=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ne<E&&(E=Ne,nt=st,nt+=Math.sqrt((b.x-pt)*(b.x-pt)+(b.y-St)*(b.y-St))),st+=Xt[(ie-2)/2]}pt=Me,St=xe}return Le.free(b),a=nt/et,0>a?0:1<a?1:a}return 0};function cu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Pn.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===Pn.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===Pn.F){var et=new wo;et.startX=a.endX,et.startY=(a.startY+a.endY)/2;var nt=new Qr(ao);if(nt.startAngle=0,nt.sweepAngle=360,nt.centerX=(a.startX+a.endX)/2,nt.centerY=(a.startY+a.endY)/2,nt.radiusX=Math.abs(a.startX-a.endX)/2,nt.radiusY=Math.abs(a.startY-a.endY)/2,et.add(nt),a=$a(nt,et),E=a.length,E===0)b.push(nt.centerX),b.push(nt.centerY);else{nt=et.startX,et=et.startY;for(var st=0;st<E;st++){var ht=a[st];Ge.Qe(nt,et,ht[2],ht[3],ht[4],ht[5],ht[6],ht[7],.5,b),nt=ht[6],et=ht[7]}}y.push(b),x.push(Jc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),nt=E.startX,et=E.startY,st=nt,ht=et;for(var pt=E.segments.s,St=pt.length,Mt=0;Mt<St;Mt++){var Gt=pt[Mt];switch(Gt.type){case bo:4<=b.length&&(y.push(b),x.push(Jc(b))),b=[],b.push(Gt.endX),b.push(Gt.endY),nt=Gt.endX,et=Gt.endY,st=nt,ht=et;break;case ki:b.push(Gt.endX),b.push(Gt.endY),nt=Gt.endX,et=Gt.endY;break;case Wo:Ge.Qe(nt,et,Gt.point1X,Gt.point1Y,Gt.point2X,Gt.point2Y,Gt.endX,Gt.endY,.5,b),nt=Gt.endX,et=Gt.endY;break;case cs:Ge.ep(nt,et,Gt.point1X,Gt.point1Y,Gt.endX,Gt.endY,.5,b),nt=Gt.endX,et=Gt.endY;break;case ao:var Xt=$a(Gt,E),Qt=Xt.length;if(Qt===0){b.push(Gt.centerX),b.push(Gt.centerY),nt=Gt.centerX,et=Gt.centerY;break}for(var ie=0;ie<Qt;ie++){var Me=Xt[ie];Ge.Qe(nt,et,Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,b),nt=Me[6],et=Me[7]}break;case Cs:if(Xt=Rs(Gt,E,nt,et),Qt=Xt.length,ie=Gt.endX,Me=Gt.endY,Qt===0){b.push(ie),b.push(Me),nt=ie,et=Me;break}for(ie=0;ie<Qt;ie++)Me=Xt[ie],Ge.Qe(nt,et,Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,b),nt=Me[6],et=Me[7];break;default:je("Segment not of valid type: "+Gt.type)}Gt.isClosed&&(b.push(st),b.push(ht))}4<=b.length&&(y.push(b),x.push(Jc(b)))}}}function Jc(a){for(var y=[],x=0,b=0,E=a.length,et=0;et<E;et+=2){var nt=a[et],st=a[et+1];et!==0&&y.push(Math.sqrt(vr(x,b,nt,st))),x=nt,b=st}return y}te.add=function(a){return this.ee.add(a),this},te.pm=function(a,y,x,b,E,et,nt,st){return this._isFrozen&&Ve(this),this.fg=new er(a,y,E,et).freeze(),this.gg=new er(x,b,nt,st).freeze(),this},hn.Object.defineProperties(Pn.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 cu(this),this.tk}},flattenedLengths:{get:function(){return cu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Pn.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===Pn.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],et=E.length,nt=0;nt<et;nt++)a+=E[nt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Ve(this,a),this.na=a,a===Pn.o?this.ee=new yn:(Pn.V===null&&(Pn.V=new yn().freeze()),this.ee=Pn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ve(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ve(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ve(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ve(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ve(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ve(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ve(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ve(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Pn.prototype.setSpots=Pn.prototype.pm,Pn.prototype.add=Pn.prototype.add,Pn.prototype.getFractionForPoint=Pn.prototype.xx,Pn.prototype.getPointAndAngleAlongPath=Pn.prototype.Qu,Pn.prototype.getAngleAlongPath=Pn.prototype.wx,Pn.prototype.getPointAlongPath=Pn.prototype.Pu,Pn.prototype.containsPoint=Pn.prototype.ca,Pn.prototype.transform=Pn.prototype.transform,Pn.prototype.rotate=Pn.prototype.rotate,Pn.prototype.scale=Pn.prototype.scale,Pn.prototype.offset=Pn.prototype.offset,Pn.prototype.normalize=Pn.prototype.normalize,Pn.prototype.computeBoundsWithoutOrigin=Pn.prototype.ix,Pn.prototype.equalsApprox=Pn.prototype.Xa,Pn.className="Geometry",Pn.j=new Je(Pn,"Line",0),Pn.u=new Je(Pn,"Rectangle",1),Pn.F=new Je(Pn,"Ellipse",2),Pn.o=new Je(Pn,"Path",3),Pn.V=null,Pn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Pn.className="Geometry",Pn.stringify=Pn.ia,Pn.fillPath=Pn.nb,Pn.parse=Pn.parse,Pn.Line=Pn.j,Pn.Rectangle=Pn.u,Pn.Ellipse=Pn.F,Pn.Path=Pn.o;function wo(a,y,x,b,E){ii(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 yn,this.sr=this.pl.Ja,this.fw=null}wo.prototype.copy=function(){var a=new wo;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 et=y[E].copy();b.add(et)}return a.sr=this.sr,a.fw=this.fw,a},te=wo.prototype,te.Xa=function(a){if(!(a instanceof wo&&Ge.B(this.startX,a.startX)&&Ge.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},te.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},te.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},te.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},te.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},te.add=function(a){return this.pl.add(a),this},te.ca=function(a,y,x){for(var b=this.startX,E=this.startY,et=b,nt=E,st=this.segments.s,ht=st.length,pt=0;pt<ht;pt++){var St=st[pt];switch(St.type){case bo:et=St.endX,nt=St.endY,b=St.endX,E=St.endY;break;case ki:if(Ge.Yb(b,E,St.endX,St.endY,x,a,y))return!0;b=St.endX,E=St.endY;break;case Wo:if(Ge.cs(b,E,St.point1X,St.point1Y,St.point2X,St.point2Y,St.endX,St.endY,.5,a,y,x))return!0;b=St.endX,E=St.endY;break;case cs:if(Ge.jv(b,E,St.point1X,St.point1Y,St.endX,St.endY,.5,a,y,x))return!0;b=St.endX,E=St.endY;break;case ao:case Cs:var Mt=St.type===ao?$a(St,this):Rs(St,this,b,E),Gt=Mt.length,Xt=St.type===ao?St.centerX:St.endX,Qt=St.type===ao?St.centerY:St.endY;if(Gt===0){if(Ge.Yb(b,E,Xt,Qt,x,a,y))return!0;b=Xt,E=Qt;break}for(Xt=null,Qt=0;Qt<Gt;Qt++)if(Xt=Mt[Qt],Qt===0&&Ge.Yb(b,E,Xt[0],Xt[1],x,a,y)||Ge.cs(Xt[0],Xt[1],Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7],.5,a,y,x))return!0;Xt!==null&&(b=Xt[6],E=Xt[7]);break;default:je("Unknown Segment type: "+St.type)}if(St.isClosed&&(b!==et||E!==nt)&&Ge.Yb(b,E,et,nt,x,a,y))return!0}return!1},hn.Object.defineProperties(wo.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&&Ve(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ve(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ve(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ve(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ve(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ve(this,a),this.pl=a,this._isInvalidBounds=!0}}}),wo.prototype.add=wo.prototype.add,wo.prototype.equalsApprox=wo.prototype.Xa,wo.className="PathFigure";function Qr(a,y,x,b,E,et,nt,st){ii(this),a===void 0&&(a=ki),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),et===void 0&&(et=0),nt===void 0&&(nt=0),a===Cs?(a=et%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof nt=="boolean"?nt&&(this.isLargeArc=!0):typeof nt=="number"&&nt&&(this.isLargeArc=!0),st&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===ao&&(et=Math.max(et,0)),this.Wh=et,typeof nt=="number"?(a===ao&&(nt=Math.max(nt,0)),this.Pg=nt):this.Pg=0),this.ae=null}Qr.prototype.copy=function(){var a=new Qr;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},te=Qr.prototype,te.Xa=function(a){if(!(a instanceof Qr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case bo:case ki:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY);case Wo:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.point1X,a.point1X)&&Ge.B(this.point1Y,a.point1Y)&&Ge.B(this.point2X,a.point2X)&&Ge.B(this.point2Y,a.point2Y);case cs:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.point1X,a.point1X)&&Ge.B(this.point1Y,a.point1Y);case ao:return Ge.B(this.startAngle,a.startAngle)&&Ge.B(this.sweepAngle,a.sweepAngle)&&Ge.B(this.centerX,a.centerX)&&Ge.B(this.centerY,a.centerY)&&Ge.B(this.radiusX,a.radiusX)&&Ge.B(this.radiusY,a.radiusY);case Cs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ge.B(this.xAxisRotation,a.xAxisRotation)&&Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY)&&Ge.B(this.radiusX,a.radiusX)&&Ge.B(this.radiusY,a.radiusY);default:return!1}},te.qb=function(a){a.classType===Qr&&(this.type=a)},te.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ki:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wo: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 cs: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 ao: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 Cs: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":"")},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return this._isFrozen=!1,this},te.close=function(){return this.isClosed=!0,this};function $a(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,et=Ge.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var nt=Sr.alloc();nt.reset(),x<b?nt.scale(1,b/x):nt.scale(x/b,1),Pn.Ha(et,nt),Sr.free(nt)}for(x=et.length,b=0;b<x;b++)nt=et[b],nt[0]+=y,nt[1]+=E,nt[2]+=y,nt[3]+=E,nt[4]+=y,nt[5]+=E,nt[6]+=y,nt[7]+=E;return a.ae=et,a.ae}function Rs(a,y,x,b){function E(ie,Me,xe,Ne){return(ie*Ne<Me*xe?-1:1)*Math.acos((ie*xe+Me*Ne)/(Math.sqrt(ie*ie+Me*Me)*Math.sqrt(xe*xe+Ne*Ne)))}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 et=a.Pg;y===0&&(y=1e-4),et===0&&(et=1e-4);var nt=Math.PI/180*a.Ne,st=a.isLargeArc,ht=a.isClockwiseArc,pt=a.Dc,St=a.Ec,Mt=Math.cos(nt),Gt=Math.sin(nt),Xt=Mt*(x-pt)/2+Gt*(b-St)/2;nt=-Gt*(x-pt)/2+Mt*(b-St)/2;var Qt=Xt*Xt/(y*y)+nt*nt/(et*et);return 1<Qt&&(y*=Math.sqrt(Qt),et*=Math.sqrt(Qt)),Qt=(st===ht?-1:1)*Math.sqrt((y*y*et*et-y*y*nt*nt-et*et*Xt*Xt)/(y*y*nt*nt+et*et*Xt*Xt)),isNaN(Qt)&&(Qt=0),st=Qt*y*nt/et,Qt=Qt*-et*Xt/y,isNaN(st)&&(st=0),isNaN(Qt)&&(Qt=0),x=(x+pt)/2+Mt*st-Gt*Qt,b=(b+St)/2+Gt*st+Mt*Qt,St=E(1,0,(Xt-st)/y,(nt-Qt)/et),Mt=(Xt-st)/y,pt=(nt-Qt)/et,Xt=(-Xt-st)/y,st=(-nt-Qt)/et,nt=E(Mt,pt,Xt,st),Xt=(Mt*Xt+pt*st)/(Math.sqrt(Mt*Mt+pt*pt)*Math.sqrt(Xt*Xt+st*st)),-1>=Xt?nt=Math.PI:1<=Xt&&(nt=0),!ht&&0<nt&&(nt-=2*Math.PI),ht&&0>nt&&(nt+=2*Math.PI),ht=y>et?1:y/et,Xt=y>et?et/y:1,y=Ge.jx(0,0,y>et?y:et,St,St+nt,!0),et=Sr.alloc(),et.reset(),et.translate(x,b),et.rotate(a.Ne,0,0),et.scale(ht,Xt),Pn.Ha(y,et),Sr.free(et),a.ae=y,a.ae}hn.Object.defineProperties(Qr.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&&Ve(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ve(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ve(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ve(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ve(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ve(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ve(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ve(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ve(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&An(a,">= zero",Qr,"radiusX"),this._isFrozen&&Ve(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&An(a,">= zero",Qr,"radiusY"),this._isFrozen&&Ve(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ve(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&&Ve(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&&Ve(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&&Ve(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&&Ve(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Qr.prototype.equalsApprox=Qr.prototype.Xa;var bo=new Je(Qr,"Move",0),ki=new Je(Qr,"Line",1),Wo=new Je(Qr,"Bezier",2),cs=new Je(Qr,"QuadraticBezier",3),ao=new Je(Qr,"Arc",4),Cs=new Je(Qr,"SvgArc",4);Qr.className="PathSegment",Qr.Move=bo,Qr.Line=ki,Qr.Bezier=Wo,Qr.QuadraticBezier=cs,Qr.Arc=ao,Qr.SvgArc=Cs;function aa(){this.H=null,this.xu=new Le(0,0).freeze(),this.mt=new Le(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}aa.prototype.copy=function(){var a=new aa;return this.clone(a)},aa.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},aa.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},aa.prototype.So=function(a,y){var x=this.diagram;return x===null||Sp(x,a,y),y},aa.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Sp(x,a,y),y.assign(x.Ps(y))),y},hn.Object.defineProperties(aa.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}}}),aa.prototype.getMultiTouchDocumentPoint=aa.prototype.Bz,aa.prototype.getMultiTouchViewPoint=aa.prototype.So,aa.className="InputEvent";function Bu(){this.H=null,this.xa="",this.ar=this.Lr=null}Bu.prototype.copy=function(){var a=new Bu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Bu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},hn.Object.defineProperties(Bu.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}}}),Bu.className="DiagramEvent";function Ii(){this.Fm=Di,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ii.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ii.prototype.copy=function(){var a=new Ii;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=$e(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=$e(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=$e(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=$e(y)&&typeof y.J=="function"?y.J():y,a},Ii.prototype.qb=function(a){a.classType===Ii&&(this.change=a)},Ii.prototype.toString=function(){var a="";return a=this.change===qa?a+"* ":this.change===Di?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===qa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=sr(this.object)),this.oldValue!==null&&(a+=" old: "+sr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+sr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ii.prototype.I=function(a){return a?this.oldValue:this.newValue},Ii.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ii.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ii.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ii.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},hn.Object.defineProperties(Ii.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===qa&&(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}}}),Ii.prototype.redo=Ii.prototype.redo,Ii.prototype.canRedo=Ii.prototype.canRedo,Ii.prototype.undo=Ii.prototype.undo,Ii.prototype.canUndo=Ii.prototype.canUndo,Ii.prototype.getParam=Ii.prototype.Dz,Ii.prototype.getValue=Ii.prototype.I,Ii.prototype.clear=Ii.prototype.clear;var qa=new Je(Ii,"Transaction",-1),Di=new Je(Ii,"Property",0),$i=new Je(Ii,"Insert",1),vo=new Je(Ii,"Remove",2);Ii.className="ChangedEvent",Ii.Transaction=qa,Ii.Property=Di,Ii.Insert=$i,Ii.Remove=vo;function Mo(){this.o=new yn().freeze(),this.xa="",this.j=!1}Mo.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},Mo.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()},Mo.prototype.canUndo=function(){return this.isComplete},Mo.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()}},Mo.prototype.canRedo=function(){return this.isComplete},Mo.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()}},Mo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Yn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Di&&b.object){var E=y.get(b.object);E||(E=new Yn,y.set(b.object,E));var et=E.get(b.propertyName);et===null?E.set(b.propertyName,-1):(0<et&&a.cd(et,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()}},hn.Object.defineProperties(Mo.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}}}),Mo.prototype.optimize=Mo.prototype.ak,Mo.prototype.redo=Mo.prototype.redo,Mo.prototype.canRedo=Mo.prototype.canRedo,Mo.prototype.undo=Mo.prototype.undo,Mo.prototype.canUndo=Mo.prototype.canUndo,Mo.prototype.clear=Mo.prototype.clear,Mo.className="Transaction";function Ri(){this.Pt=new vn,this.Jd=!1,this.u=new yn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new yn().freeze(),this.hl=new yn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ri.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},Ri.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},Ri.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},te=Ri.prototype,te.Xw=function(a){this.Pt.add(a)},te.Rx=function(a){this.Pt.remove(a)},te.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},te.eb=function(a){return a===void 0&&(a=""),wh(this,!0,a)},te.Kf=function(){return wh(this,!1,"")};function wh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&En("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 et=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var nt=a.Ie.count;0<nt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(nt-1),a.Ie.freeze()),nt=a.hl.count,0<nt&&(et=a.hl.M(nt-1),a.hl.mb(nt-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&&(et=y.M(0),et!==null&&et.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=et,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}te.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()}},Ri.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ri.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){En("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ri.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ri.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){En("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ri.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Ii;for(b.change=qa,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Ri.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Mo);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||En("Change not within a transaction: "+x.toString()))}},Ri.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},hn.Object.defineProperties(Ri.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}}}),Ri.prototype.handleChanged=Ri.prototype.Tu,Ri.prototype.redo=Ri.prototype.redo,Ri.prototype.undo=Ri.prototype.undo,Ri.prototype.canUndo=Ri.prototype.canUndo,Ri.prototype.discardHistoryAfterIndex=Ri.prototype.lx,Ri.prototype.rollbackTransaction=Ri.prototype.Kf,Ri.prototype.commitTransaction=Ri.prototype.eb,Ri.prototype.startTransaction=Ri.prototype.Ea,Ri.prototype.removeModel=Ri.prototype.Rx,Ri.prototype.addModel=Ri.prototype.Xw,Ri.prototype.clear=Ri.prototype.clear,Ri.className="UndoManager";function Zr(){ii(this),this.H=Kl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new aa,this.Zr=-1}Zr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Dn(this.constructor)},Zr.prototype.updateAdornments=function(){},Zr.prototype.canStart=function(){return this.isEnabled},Zr.prototype.doStart=function(){},Zr.prototype.doActivate=function(){this.isActive=!0},Zr.prototype.doDeactivate=function(){this.isActive=!1},Zr.prototype.doStop=function(){},Zr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Zr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Zr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Zr.prototype.doMouseMove=function(){},Zr.prototype.doMouseUp=function(){this.stopTool()},Zr.prototype.doMouseWheel=function(){},Zr.prototype.canStartMultiTouch=function(){return!0},Zr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Le.allocAt(NaN,NaN)),b=y.So(1,Le.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,et=b.y-x.y;a.Jw=Math.sqrt(E*E+et*et),y.bubbles=!1}Le.free(x),Le.free(b)},Zr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Le.allocAt(NaN,NaN)),b=y.So(1,Le.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,et=b.y-x.y;et=Math.sqrt(E*E+et*et)/a.Jw,E=new Le((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),et*=a.Bw;var nt=a.commandHandler;if(et!==a.scale&&nt.canResetZoom(et)){var st=a.zoomPoint;a.zoomPoint=E,nt.resetZoom(et),a.zoomPoint=st}y.bubbles=!1}Le.free(x),Le.free(b)},Zr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Zr.prototype.doKeyUp=function(){},Zr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Zr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Zr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ei?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||(ei?y.meta:y.control)||y.shift||a.clearSelection()}},Zr.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,Dg(a,b,x),b.handled};function Dg(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)}}}Zr.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 et=a.Ck,nt=et;for(a.Ck=b,this.doCurrentObjectChanged(et,b),y.handled=!1;et!==null;){var st=et.mouseLeave;if(st!==null&&(b===et||b!==null&&b.rg(et)||(st(y,et,b),E=!0,y.handled)))break;et=et.panel}for(et=nt,y.handled=!1;b!==null&&(nt=b.mouseEnter,!(nt!==null&&(et===b||et!==null&&et.rg(b)||(nt(y,b,et),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(et=b,nt="";et!==null&&(nt=et.cursor,nt==="");)et=et.panel;for(a.currentCursor=nt,y.handled=!1,et=b;et!==null&&(b=et.mouseOver,!(b!==null&&(b(y,et),E=!0,y.handled)));)et=et.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Zr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Zr.prototype.doCurrentObjectChanged=function(){},Zr.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===Qc&&!y.shift||E===fc&&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===Qc&&y.shift||E===fc&&!y.control){b=a.position.copy();var et=y.event;E=et.deltaMode;var nt=et.deltaX;et=et.deltaY;var st="pixel";if(nt===0&&et===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(st,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(st,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:st="pixel";break;case 1:st="line";break;case 2:st="page"}nt!==0&&a.allowHorizontalScroll&&(nt*=a.scrollHorizontalLineChange/16,a.scroll(st,0<nt?"right":"left",Math.abs(nt))),et!==0&&a.allowVerticalScroll&&(et*=a.scrollVerticalLineChange/16,a.scroll(st,0<et?"down":"up",Math.abs(et)))}this.doWheelChange(a,b,y)}}},Zr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Zr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=fr(function(){x.doWaitAfter(b)},a)},Zr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&an.clearTimeout(this.Zr),this.Zr=-1},Zr.prototype.doWaitAfter=function(){},Zr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Xr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Zr.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},hn.Object.defineProperties(Zr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Xe&&(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}}}),Zr.prototype.startTransaction=Zr.prototype.Ea,Zr.className="Tool";function Fi(){Zr.call(this),this.name="ToolManager",this.hb=new yn,this.ob=new yn,this.Hb=new yn,this.F=this.V=850,this.o=new kn(2,2).ja(),this.Ha=5e3,this.ia=fc,this.u=Hf,this.Mp=this.j=null,this.zj=-1}Ye(Fi,Zr),Fi.prototype.initializeStandardTools=function(){},Fi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Xr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Fi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===fu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===fu)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===fc?this.mouseWheelBehavior=Qc:this.mouseWheelBehavior===Qc&&(this.mouseWheelBehavior=fc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Fi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===fu)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}}Bg(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Bg(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Fi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Xr&&(y===a||y.rg(a))||this.hideToolTip()},Fi.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()))},Fi.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)},Fi.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 Xr)||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()},Fi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Xr){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 Al&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(an.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=fr(function(){E.hideToolTip()},a)}},Fi.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}},Fi.prototype.hideToolTip=function(){this.zj!==-1&&(an.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Xr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Al&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Fi.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()},Fi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Fi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Fi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Fi.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},Fi.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},Fi.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)},hn.Object.defineProperties(Fi.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 Xr?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}}}),Fi.prototype.replaceStandardTool=Fi.prototype.gb;var fc=new Je(Fi,"WheelScroll",0),Qc=new Je(Fi,"WheelZoom",1),ep=new Je(Fi,"WheelNone",2),Hf=new Je(Fi,"GestureZoom",3),fu=new Je(Fi,"GestureCancel",4),bh=new Je(Fi,"GestureNone",5);Fi.className="ToolManager",Fi.WheelScroll=fc,Fi.WheelZoom=Qc,Fi.WheelNone=ep,Fi.GestureZoom=Hf,Fi.GestureCancel=fu,Fi.GestureNone=bh;function _i(){Zr.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 Le(NaN,NaN),this.Fr=new Le,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new vn().freeze(),this.ia=new ct,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Hl;Ye(_i,Zr),_i.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},_i.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},_i.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,(ei?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},_i.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),Io=null,this.isActive=!0,this.tl.set(a.position),Vf(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&&Oa(a),sd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Io=this,Gu=this.diagram,this.doSimulatedDragOut()))};function Vf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Cn?(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 fs,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}_i.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},_i.prototype.Pd=function(a){return a===void 0?new yu(Ti):this.isGridSnapEnabled?new yu(new Le(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new yu(a.copy())},_i.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Ph(this),Dh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Hl.count){for(var y=Hl,x=y.length,b=0;b<x;b++){var E=y.M(b);Iu(E),tl(E),Ph(E),E.diagram.ug()}y.clear()}Iu(this),this.tl.h(NaN,NaN),Gu!==null&&(Gu.currentCursor=""),Io=Gu=null,tl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),cf(a,!0)},_i.prototype.stopTransaction=function(){var a=this.diagram,y=Zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Ph(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,rp(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function np(){var a=Io;tl(a),Ru(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}_i.prototype.doCancel=function(){tl(this),Ru(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},_i.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},_i.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function du(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")):Ru(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Yn,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var et=y.I(E);et!==null&&(et.location=E.location,et.Va(),x.add(et,a.Pd(et.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Cn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Vf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ah(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function tl(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 Cn&&(x.value.point=new Le(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Iu(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 Ll(a,y,x){var b=a.diagram,E=a.startPoint,et=Le.alloc();et.assign(b.lastInput.documentPoint),a.moveParts(y,et.re(E),x),Le.free(et),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Oa(b),b.hk())}_i.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Fh(b,a,y,this.dragOptions,x)};function Ru(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 Cn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),ah(b,-E.x,-E.y)}y.bd()}}function Kf(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),_u(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var et=x.skipsUndoManager,nt=!1;try{if(x.skipsUndoManager=!0,nt=rp(a,E,b),!a.isActive&&Io===null)return;var st=b!==null?b.part:null;if(st===null||x.handlesDragDropForTopLevelParts&&st.isTopLevel&&!(st instanceof Pr)){var ht=x.mouseDragOver;ht!==null&&(ht(E),nt=!0)}if(!a.isActive&&Io===null||(a.doDragOver(y,b),!a.isActive&&Io===null))return}finally{x.skipsUndoManager=et,nt&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}_i.prototype.findDragOverObject=function(a){var y=this;return Zl(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Xr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},_i.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 rp(a,y,x){var b=!1,E=a.Cg.length,et=0<E?a.Cg[0]:null;if(x===et)return!1;y.handled=!1;for(var nt=0;nt<E;nt++){var st=a.Cg[nt],ht=st.mouseDragLeave;if(ht!==null&&(ht(y,st,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Io===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=ip(E);for(E=a.Cg.length,x=0;x<E&&(nt=a.Cg[x],st=nt.mouseDragEnter,st===null||(st(y,nt,et),b=!0,!y.handled));x++);return b}function ip(a){var y=a.panel;return y!==null?y:a instanceof qn&&!(a instanceof Pr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ig(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(pt){return b.findValidLinkablePort(pt,x)});a=Le.alloc();var et=1/0,nt=null;for(E=E.iterator;E.next();){var st=E.value;if(st.part!==null){var ht=st.ga(Fr,a);ht=y.Bf(ht),ht<et&&(nt=st,et=ht)}}return Le.free(a),nt}function _u(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 et=null,nt=null;x.fromNode===null&&(et=Ig(a,x.i(0),!1),et!==null&&(nt=et.part));var st=null,ht=null;x.toNode===null&&(st=Ig(a,x.i(x.pointsCount-1),!0),st!==null&&(ht=st.part)),E.isValidLink(nt,et,ht,st)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=nt,et!==null&&(x.fromPortId=et.portId),x.toNode=ht,st!==null&&(x.toPortId=st.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Zf(E,nt,et,ht,st):Zf(E,null,null,null,null)}}}}_i.prototype.doDragOver=function(){};function zu(a,y){var x=a.diagram;a.dragsLink&&_u(a,!0),Ph(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var et=b;et!==null;){var nt=et.mouseDrop;if(nt!==null&&(nt(E,et),E.handled))break;Qv(a,E,et),et=ip(et)}}else et=x.mouseDrop,et!==null&&et(E);if(a.isActive||Io!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)et=E.key,et instanceof Nn&&et.linksConnected.each(function(st){st.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Io!==null){for(a=on.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Nn&&$v(x,b,a);on.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Pr||(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 Cn},!0,function(E){return E instanceof Cn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}_i.prototype.doDropOnto=function(){},_i.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()?(du(this,!1),sd(a,this.copiedParts),Ll(this,this.copiedParts,!1),Dh(a,this.copiedParts)):this.mayMove()?(tl(this),Ll(this,this.draggedParts,!0)):this.mayDragOut()?(du(this,!1),Ll(this,this.copiedParts,!1)):tl(this),Kf(this,a.lastInput.documentPoint))}},_i.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?(tl(this),du(this,!0),sd(a,this.copiedParts),Ll(this,this.copiedParts,!1),Dh(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,tl(this),this.mayMove()&&(Ll(this,this.draggedParts,!0),Kf(this,a.lastInput.documentPoint))),this.Ym=!0,zu(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qv(this),a.Ya(),Dh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},_i.prototype.simulatedMouseMove=function(a,y,x){if(Io===null)return!1;var b=Io.diagram;x instanceof Xe||(x=null);var E=Gu;return x!==E&&(E!==null&&E!==b&&(E.ug(),Io.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Gu=x,x!==null&&x!==b&&(np(),E=x.toolManager.findTool("Dragging"),E!==null&&(Hl.contains(E)||Hl.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)},_i.prototype.simulatedMouseUp=function(a,y,x){if(Io===null)return!1;var b=Gu,E=Io.diagram;if(x===null)return Io.doCancel(),!0;if(x!==b){var et=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&et!==null)return b.ug(),Io.isDragOutStarted=!1,et.doSimulatedDragLeave(),!1;Gu=x,b=x.toolManager.findTool("Dragging"),b!==null&&(np(),Hl.contains(b)||Hl.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 Le),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=Io,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 Nn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}_i.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ei?!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())},_i.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())},_i.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())},_i.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},_i.prototype.Az=function(){return Io},_i.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Io;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},_i.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ms(a),a.animationManager.Cc(),a=Io,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},_i.prototype.doSimulatedDragLeave=function(){var a=Io;a!==null&&a.doSimulatedDragOut(),this.doCancel()},_i.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Io;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Ll(this,this.copiedParts,!1),Kf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},_i.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Io;if(y!==null){var x=y.diagram;if(y.Ym=!0,tl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Ll(this,this.copiedParts,!1);var b=new vn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),zu(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 et=on.alloc();E=b=1/0;for(var nt=-1/0,st=-1/0,ht=y.iterator;ht.next();){var pt=ht.value;if(pt.isVisible()){var St=pt.location;pt=St.x,St=St.y,isNaN(pt)||isNaN(St)||(pt<b&&(b=pt),St<E&&(E=St),pt>nt&&(nt=pt),St>st&&(st=St))}}for(b===1/0?et.h(0,0,0,0):et.h(b,E,nt-b,st-E),b=et.x+et.width/2,E=et.y+et.height/2,on.free(et),et=a.Fr,nt=new Yn,st=Le.alloc(),ht=y.iterator;ht.next();)pt=ht.value,pt instanceof Cn&&pt.canCopy()&&(St=x.I(pt),St!==null&&(St.points=pt.points,ah(St,et.x-b,et.y-E),St.suspendsRouting=!0,nt.add(St,a.Pd())));for(y=y.iterator;y.next();)pt=y.value,pt.Zc()&&pt.canCopy()&&(ht=x.I(pt),ht!==null&&(pt=pt.location,st.h(et.x-(b-pt.x),et.y-(E-pt.y)),ht.location=st,ht.Va(),nt.add(ht,a.Pd(st))));Le.free(st),a.copiedParts=nt,Vf(a,nt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,ah(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}_i.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},_i.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Le},hn.Object.defineProperties(_i.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}}}),_i.prototype.getDraggingSource=_i.prototype.Az;var Io=null,Gu=null;_i.className="DraggingTool",Hl=new yn,xn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Fi.prototype.doCancel=function(){Io!==null&&Io.doCancel(),Zr.prototype.doCancel.call(this)};function Xi(){Zr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Cn,y=new Tr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Tr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Nn,y=new Tr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Nn,y=new Tr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ci,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Yn,this.Of=this.gj=this.Pf=null}Ye(Xi,Zr),Xi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Xi.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var et=y.Df(),nt=kn.alloc();nt.width=y.naturalBounds.width*et,nt.height=y.naturalBounds.height*et,b.desiredSize=nt,kn.free(nt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Fr,et=Le.alloc(),x.location=y.ga(Fr,et),Le.free(et),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Xi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ci,y.fromSpot=zr,y.toSpot=zr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Xi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Xi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Nn){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)}},Xi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Nn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Nn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Xi.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,et=y.og(x,b,function(Mt){return E.findValidLinkablePort(Mt,a)},null,!0);for(b=1/0,y=null,et=et.iterator;et.next();){var nt=et.value,st=nt.part;if(st instanceof Nn){var ht=nt.ga(Fr,Le.alloc()),pt=x.x-ht.x,St=x.y-ht.y;Le.free(ht),ht=pt*pt+St*St,ht<b&&(pt=this.validPortsCache.I(nt),pt!==null?pt&&(y=nt,b=ht):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,st,nt)||!a&&this.isValidLink(st,nt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(nt,!0),y=nt,b=ht):this.validPortsCache.add(nt,!1))}}return y!==null&&(x=y.part,x instanceof Nn&&(x.layer===null||x.layer.allowLink))?y:null},Xi.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},Xi.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},Xi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Xi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Nn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Nn))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},Xi.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)},Xi.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 vn;return b.add(a),sa(this,x,y,b)};function sa(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),sa(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),sa(a,y.labeledLink,x,b))))}Xi.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!==mf){if(b===Dp){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!pa(this,a,y,x,!0)}if(b===Bp){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!pa(this,a,y,x,!0)}if(b===jp)return a===y?a=!0:(b=new vn,b.add(y),a=ga(this,b,a,y,x)),!a;if(b===Op)return!pa(this,a,y,x,!1);if(b===Fp)return a===y?a=!0:(b=new vn,b.add(y),a=dc(this,b,a,y,x)),!a}return!0};function pa(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var et=y.linksConnected;et.next();){var nt=et.value;if(nt!==b&&(!E||nt.isTreeLink)&&nt.toNode===y&&(nt=nt.fromNode,nt!==y&&pa(a,nt,x,b,E)))return!0}return!1}function ga(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 et=x.linksConnected;et.next();){var nt=et.value;if(nt!==E&&nt.toNode===x&&(nt=nt.fromNode,nt!==x&&ga(a,y,nt,b,E)))return!0}return!1}function dc(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 et=x.linksConnected;et.next();){var nt=et.value;if(nt!==E){var st=nt.fromNode;if(nt=nt.toNode,st=st===x?nt:st,st!==x&&dc(a,y,st,b,E))return!0}}return!1}hn.Object.defineProperties(Xi.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}}}),Xi.className="LinkingBaseTool";function ma(){Xi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ch,this.Xd=null}Ye(ma,Xi),ma.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},ma.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 Nn)))return null;var x=this.direction;if(x===Ch||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===Ch||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ma.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 Nn&&(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 Nn&&(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)},ma.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()},ma.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.startObject=null},ma.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,et=null;try{var nt=this.targetPort=this.findTargetPort(this.isForwards);if(nt!==null){var st=nt.part;st instanceof Nn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=st,E=nt):(y=st,x=nt,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?(et=this.insertLink(y,x,b,E),et!==null?(nt===null&&(this.isForwards?et.defaultToPoint=a.lastInput.documentPoint:et.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),et.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",et)):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(),et&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ma.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Cn)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)},ma.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ma.prototype.doNoLink=function(){},hn.Object.defineProperties(ma.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 Ch=new Je(ma,"Either",0),_g=new Je(ma,"ForwardsOnly",0),zg=new Je(ma,"BackwardsOnly",0);ma.className="LinkingTool",ma.Either=Ch,ma.ForwardsOnly=_g,ma.BackwardsOnly=zg;function fs(){Xi.call(this),this.name="Relinking";var a=new Tr;a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Tr,a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}Ye(fs,Xi),fs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){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)}},fs.prototype.makeAdornment=function(a,y){var x=new Xr;return x.type=Sn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},fs.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},fs.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 Xr&&x.adornedPart instanceof Cn))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=fi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=fi),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},fs.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Nd||x===sh)&&(x=Pa),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}},fs.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()},fs.prototype.doStop=function(){Xi.prototype.doStop.call(this),this.handle=null},fs.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,et=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var nt=this.targetPort.part;nt instanceof Nn&&(this.isForwards?(b=nt,E=this.targetPort):(y=nt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:et=null;et!==null?(this.reconnectLink(et,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?et.defaultToPoint=a.lastInput.documentPoint:et.defaultFromPoint=a.lastInput.documentPoint,et.bb()),this.transactionResult=this.name,a.R("LinkRelinked",et,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},fs.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},fs.prototype.doNoRelink=function(){};function Zf(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)}hn.Object.defineProperties(fs.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 Xr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),fs.className="RelinkingTool",xn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),xn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function qi(){Zr.call(this),this.name="LinkReshaping";var a=new Tr;a.figure="Rectangle",a.desiredSize=io,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Tr,a.figure="Diamond",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Le,this.Yq=new yn}Ye(qi,Zr),qi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:op},qi.prototype.om=function(a,y){a.reshapingBehavior=y},qi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Cn){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)}},qi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Xr,E.type=Sn.Link,x=y.firstPickIndex;var et=y.lastPickIndex,nt=b?1:0;if(y.resegmentable&&y.computeCurve()!==vs)for(var st=x+nt;st<et-nt;st++){var ht=this.makeResegmentHandle(a,st);ht!==null&&(ht.segmentIndex=st,ht.segmentFraction=.5,ht.fromMaxLinks=999,E.add(ht))}for(nt=x+1;nt<et;nt++)if(st=this.makeHandle(a,nt),st!==null){if(st.segmentIndex=nt,nt!==x)if(nt===x+1&&b){ht=y.i(x);var pt=y.i(x+1);Ge.B(ht.x,pt.x)&&Ge.B(ht.y,pt.y)&&(pt=y.i(x-1)),Ge.B(ht.x,pt.x)?(this.om(st,Hu),st.cursor="n-resize"):Ge.B(ht.y,pt.y)&&(this.om(st,Wu),st.cursor="w-resize")}else nt===et-1&&b?(ht=y.i(et-1),pt=y.i(et),Ge.B(ht.x,pt.x)&&Ge.B(ht.y,pt.y)&&(ht=y.i(et+1)),Ge.B(ht.x,pt.x)?(this.om(st,Hu),st.cursor="n-resize"):Ge.B(ht.y,pt.y)&&(this.om(st,Wu),st.cursor="w-resize")):nt!==et&&(this.om(st,Xf),st.cursor="move");E.add(st)}E.adornedObject=a}return E},qi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},qi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},qi.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},qi.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 Cn){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}}},qi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},qi.prototype.stopTransaction=function(){var a=this.diagram,y=Zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},qi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},qi.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},qi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},qi.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),et=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var nt=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Uu(this,nt,b,E,et,!0)||Uu(this,nt,b,E,et,!1))){var st=y.points.copy();Uu(this,nt,b,E,et,!0)?(st.cd(x-2,new Le(nt.x,(et.y+nt.y)/2)),st.cd(x+1,new Le(et.x,(et.y+nt.y)/2))):(st.cd(x-2,new Le((et.x+nt.x)/2,nt.y)),st.cd(x+1,new Le((et.x+nt.x)/2,et.y))),st.mb(x),st.mb(x-1),y.points=st,y.Wb()}else nt=y.i(x+2),Math.abs(E.x-et.x)<this.resegmentingDistance&&Math.abs(E.y-et.y)<this.resegmentingDistance&&(Uu(this,b,E,et,nt,!0)||Uu(this,b,E,et,nt,!1))&&(st=y.points.copy(),Uu(this,b,E,et,nt,!0)?(st.cd(x-1,new Le(b.x,(b.y+nt.y)/2)),st.cd(x+2,new Le(nt.x,(b.y+nt.y)/2))):(st.cd(x-1,new Le((b.x+nt.x)/2,b.y)),st.cd(x+2,new Le((b.x+nt.x)/2,nt.y))),st.mb(x+1),st.mb(x),y.points=st,y.Wb())}}else nt=Le.alloc(),Ge.qh(b.x,b.y,et.x,et.y,E.x,E.y,nt)&&nt.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Le.free(nt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Uu(a,y,x,b,E,et){return et?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}qi.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===Hu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Wu&&(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===Hu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Wu&&(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),et=y.i(b-1),nt=y.i(b+1);Ge.B(et.x,E.x)&&Ge.B(E.y,nt.y)?(Ge.B(et.x,y.i(b-2).x)&&!Ge.B(et.y,y.i(b-2).y)?(y.m(b,a.x,et.y),x++,b++):y.L(b-1,a.x,et.y),Ge.B(nt.y,y.i(b+2).y)&&!Ge.B(nt.x,y.i(b+2).x)?y.m(b+1,nt.x,a.y):y.L(b+1,nt.x,a.y)):Ge.B(et.y,E.y)&&Ge.B(E.x,nt.x)?(Ge.B(et.y,y.i(b-2).y)&&!Ge.B(et.x,y.i(b-2).x)?(y.m(b,et.x,a.y),x++,b++):y.L(b-1,et.x,a.y),Ge.B(nt.x,y.i(b+2).x)&&!Ge.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ge.B(et.x,E.x)&&Ge.B(E.x,nt.x)?(Ge.B(et.x,y.i(b-2).x)&&!Ge.B(et.y,y.i(b-2).y)?(y.m(b,a.x,et.y),x++,b++):y.L(b-1,a.x,et.y),Ge.B(nt.x,y.i(b+2).x)&&!Ge.B(nt.y,y.i(b+2).y)?y.m(b+1,a.x,nt.y):y.L(b+1,a.x,nt.y)):Ge.B(et.y,E.y)&&Ge.B(E.y,nt.y)&&(Ge.B(et.y,y.i(b-2).y)&&!Ge.B(et.x,y.i(b-2).x)?(y.m(b,et.x,a.y),x++,b++):y.L(b-1,et.x,a.y),Ge.B(nt.y,y.i(b+2).y)&&!Ge.B(nt.x,y.i(b+2).x)?y.m(b+1,nt.x,a.y):y.L(b+1,nt.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&&(et=b.findVisibleNode(),et!==null&&et!==b&&(b=et,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(et=E.ga(Fr,Le.alloc()),b=y.getLinkPointFromPoint(b,E,et,a,!0,Le.alloc()),y.L(0,b.x,b.y),Le.free(et),Le.free(b)),b=y.toNode,E=y.toPort,b!==null&&(et=b.findVisibleNode(),et!==null&&et!==b&&(b=et,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(Fr,Le.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Le.alloc()),y.L(y.pointsCount-1,a.x,a.y),Le.free(x),Le.free(a));y.zf()},qi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Xf:return a;case Hu:return new Le(y.i(x).x,a.y);case Wu:return new Le(a.x,y.i(x).y);default:case op:return y.i(x)}},hn.Object.defineProperties(qi.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 Xr))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}}}),qi.prototype.setReshapingBehavior=qi.prototype.om,qi.prototype.getReshapingBehavior=qi.prototype.Ru;var op=new Je(qi,"None",0),Wu=new Je(qi,"Horizontal",1),Hu=new Je(qi,"Vertical",2),Xf=new Je(qi,"All",3);qi.className="LinkReshapingTool",qi.None=op,qi.Horizontal=Wu,qi.Vertical=Hu,qi.All=Xf,xn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Qo(){Zr.call(this),this.name="Resizing",this.o=new kn(1,1).freeze(),this.j=new kn(9999,9999).freeze(),this.yg=new kn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Tr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=io,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Le,this.Dw=new kn,this.Tn=new Le,this.rt=new kn(0,0),this.qt=new kn(1/0,1/0),this.pt=new kn(1,1)}Ye(Qo,Zr),Qo.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Cn)){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(),Gh(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Qo.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Xr,y.type=Sn.Spot,y.locationSpot=Fr;var x=new ba;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,qr)),y.add(this.makeHandle(a,pi)),y.add(this.makeHandle(a,oo)),y.add(this.makeHandle(a,ia)),y.add(this.makeHandle(a,da)),y.add(this.makeHandle(a,Yo)),y.add(this.makeHandle(a,oa)),y.add(this.makeHandle(a,Na))}else if(Hs(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Qo.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Qo.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Fr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Sn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Qo.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},Qo.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))},Qo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Qo.prototype.stopTransaction=function(){var a=this.diagram,y=Zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Qo.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Qo.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,Le.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),a.bd(),Le.free(E)}},Qo.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,Le.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),Le.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Qo.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 Pr){var b=new yn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ct;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()}},Qo.prototype.computeResize=function(a,y,x,b,E,et){y.Mc()&&(y=Fr);var nt=this.adornedObject.naturalBounds,st=nt.x,ht=nt.y,pt=nt.x+nt.width,St=nt.y+nt.height,Mt=1;if(!et){Mt=nt.width;var Gt=nt.height;0>=Mt&&(Mt=1),0>=Gt&&(Gt=1),Mt=Gt/Mt}return Gt=Le.alloc(),Ge.No(a.x,a.y,st,ht,E.width,E.height,Gt),a=nt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Gt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=Math.max(pt-a.x,x.width),a.y=Math.max(Gt.y,St-b.height),a.y=Math.min(a.y,St-x.height),a.height=Math.max(St-a.y,x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.x=pt-a.width,a.y=St-a.height)):1<=y.y?(a.x=Math.max(Gt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=Math.max(pt-a.x,x.width),a.height=Math.max(Math.min(Gt.y-ht,b.height),x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.x=pt-a.width)):(a.x=Math.max(Gt.x,pt-b.width),a.x=Math.min(a.x,pt-x.width),a.width=pt-a.x,et||(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt,a.y=ht+.5*(St-ht-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Gt.x-st,b.width),x.width),a.y=Math.max(Gt.y,St-b.height),a.y=Math.min(a.y,St-x.height),a.height=Math.max(St-a.y,x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width),a.y=St-a.height)):1<=y.y?(a.width=Math.max(Math.min(Gt.x-st,b.width),x.width),a.height=Math.max(Math.min(Gt.y-ht,b.height),x.height),et||(1<=a.height/a.width?(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt):(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width))):(a.width=Math.max(Math.min(Gt.x-st,b.width),x.width),et||(a.height=Math.max(Math.min(Mt*a.width,b.height),x.height),a.width=a.height/Mt,a.y=ht+.5*(St-ht-a.height))):0>=y.y?(a.y=Math.max(Gt.y,St-b.height),a.y=Math.min(a.y,St-x.height),a.height=St-a.y,et||(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width,a.x=st+.5*(pt-st-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Gt.y-ht,b.height),x.height),et||(a.width=Math.max(Math.min(a.height/Mt,b.width),x.width),a.height=Mt*a.width,a.x=st+.5*(pt-st-a.width))),Le.free(Gt),a},Qo.prototype.computeReshape=function(){var a=fn;return this.adornedObject instanceof Tr&&(a=k0(this.adornedObject)),!(a===Un||this.diagram.lastInput.shift)},Qo.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},Qo.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},Qo.prototype.computeCellSize=function(){var a=new kn(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},hn.Object.defineProperties(Qo.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 Xr))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 Xr)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}}}),Qo.className="ResizingTool",xn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function va(){Zr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Le,this.ue=null;var a=new Tr;a.figure="Ellipse",a.desiredSize=bi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Le(NaN,NaN),this.u=0,this.F=50}Ye(va,Zr),va.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)}},va.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Xr,y.type=Sn.Position,y.locationSpot=Fr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Hs(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},va.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},va.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)},va.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(Fr)},va.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)},va.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Le(NaN,NaN),this.isActive=a.isMouseCaptured=!1},va.prototype.stopTransaction=function(){var a=this.diagram,y=Zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},va.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},va.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},va.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()},va.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()}},va.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},hn.Object.defineProperties(va.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 Xr))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 Xr)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}}}),va.className="RotatingTool",xn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function kh(){Zr.call(this),this.name="ClickSelecting"}Ye(kh,Zr),kh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},kh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},kh.className="ClickSelectingTool";function _s(){Zr.call(this),this.name="Action",this.pk=null}Ye(_s,Zr),_s.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},_s.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()},_s.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))}},_s.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()},_s.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())},_s.prototype.doStop=function(){this.pk=null},_s.className="ActionTool";function Vu(){Zr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Le(0,0)}Ye(Vu,Zr),Vu.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)},Vu.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Vu.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 qn)x.Zc()&&(Hs(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);$e(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var et=Le.allocAt(a.x,a.y);this.isGridSnapEnabled&&ad(this.diagram,b,a,et),b.location=et,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Le.free(et)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},hn.Object.defineProperties(Vu.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}}}),Vu.className="ClickCreatingTool";function ks(){Zr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new qn;a.layerName="Tool",a.selectable=!1;var y=new Tr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ye(ks,Zr),ks.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))},ks.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},ks.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},ks.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=kn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),kn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},ks.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()},ks.prototype.computeBoxBounds=function(){var a=this.diagram;return new on(a.firstInput.documentPoint,a.lastInput.documentPoint)},ks.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ei?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 yn,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)}},hn.Object.defineProperties(ks.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}}}),ks.className="DragSelectingTool";function Ho(){Zr.call(this),this.name="Panning",this.Xt=new Le,this.xy=new Le,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(an.document,"scroll",a.Kw,!1),a.stopTool()}}Ye(Ho,Zr),Ho.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())},Ho.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(an.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ho.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ho.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ho.prototype.doMouseMove=function(){this.move()},Ho.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ho.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)}},hn.Object.defineProperties(Ho.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ho.className="PanningTool",xn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),xn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),xn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),xn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),xn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Al(){this.F=this.u=this.j=this.o=null}hn.Object.defineProperties(Al.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}}}),Al.className="HTMLInfo";function zs(a,y,x){this.text=a,this.hx=y,this.visible=x}zs.className="ContextMenuButtonInfo";function ya(){Zr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Le,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ye(ya,Zr);function el(a){var y=new Al;y.show=function(E,et,nt){nt.showDefaultContextMenu()},y.hide=function(E,et){et.hideDefaultContextMenu()},Eh=y,a.tu=function(){a.stopTool()},y=Mn("div");var x=Mn("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=Mn("style");an.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",an.document.body&&(an.document.body.appendChild(y),an.document.body.appendChild(x)),qc=y,pc=x,$c=!0}function to(a){return a.preventDefault(),!1}ya.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)},ya.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ya.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ya.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Xe||(a instanceof ze?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},ya.prototype.doActivate=function(){},ya.prototype.doMouseDown=function(){if(Zr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ml(this)},ya.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ml(this)};function ml(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Al||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(pu(a,!0),a.isActive||a.stopTool())}ya.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function pu(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=Eh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof ze?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Xr&&!a.currentContextMenu.visible&&a.stopTool()}}ya.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ya.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Xr){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 Al&&a.show(y,x,this);this.currentContextMenu=a},ya.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}},ya.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Xr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Al&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ku(a){var y=new yn;return y.add(new zs("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new zs("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new zs("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new zs("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new zs("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new zs("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new zs("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new zs("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new zs("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new zs("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new zs("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new zs("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new zs("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ya.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ku(this)),qc.innerHTML="",pc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Mn("ul");x.className="goCXul",qc.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,et=E.visible;if(typeof E.hx=="function"&&(typeof et!="function"||et(a))){et=Mn("li"),et.className="goCXli";var nt=Mn("a");nt.className="goCXa",nt.href="#",nt.ky=E.hx,nt.addEventListener("pointerdown",function(st){return this.ky(a),y.stopTool(),st.preventDefault(),!1},!1),nt.textContent=E.text,et.appendChild(nt),x.appendChild(et)}}qc.style.display="block",pc.style.display="block"},ya.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Eh){qc.style.display="none",pc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(pc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},hn.Object.defineProperties(ya.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Xr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return $c===!1&&Eh===null&&Wi&&el(this),Eh},set:function(a){a===null&&($c=!0),Eh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Eh=null,$c=!1,pc=null,qc=null;ya.className="ContextMenuTool",xn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ei(){Zr.call(this),this.name="TextEditing",this.Zh=new yi,this.ia=null,this.V=gc,this.vj=null,this.qa=mc,this.u=1,this.F=!0,this.o=null,this.j=new Al,this.kt=null,tf(this,this.j)}Ye(Ei,Zr);function tf(a,y){if(Wi){var x=Mn("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(ef)):E==="Tab"?(a.acceptText(Jf),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==mc){var b=a.kt;a.qa===nf&&(a.qa=rf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==mc){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,et){if(b instanceof yi&&et instanceof Ei)if(et.state===of)x.style.border="3px solid red",x.focus();else{var nt=b.ga(Fr),st=E.position,ht=E.scale,pt=b.Df()*ht;pt<et.minimumEditorScale&&(pt=et.minimumEditorScale);var St=b.naturalBounds.width*pt+6,Mt=b.naturalBounds.height*pt+2,Gt=(nt.x-st.x)*ht;nt=(nt.y-st.y)*ht,st=b.verticalAlignment,ht=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*pt,Mt=st.y*Mt-st.y*ht+st.offsetY-(.5*Mt-.5*ht)-ht/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*pt+"%",x.style.lineHeight="normal",x.style.width=St+"px",x.style.left=(Gt-St/2|0)-1+"px",x.style.top=(nt+Mt|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=pt,x.className="goTXarea",E.div.appendChild(x),x.focus(),et.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Ei.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Zu&&Zu!==this&&(Zu.acceptText(Nl),Zu&&Zu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof yi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gc&&!y.isSelected||this.starting===Qf&&2>a.lastInput.clickCount)):!1},Ei.prototype.doStart=function(){Zu=this,this.textBlock!==null&&this.doActivate()},Ei.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 yi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=nf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new on(this.textBlock.ga(qr),this.textBlock.ga(oo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ei.prototype.doCancel=function(){this.stopTool()},Ei.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ei.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Nl)},Ei.prototype.acceptText=function(a){switch(a){case Nl:this.qa===vc?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===nf||this.qa===of||this.qa===rf)&&(this.qa=sp,ap(this));break;case Yf:case ef:case Jf:(ef!==a||this.textBlock.isMultiline!==!0)&&(this.qa===nf||this.qa===of||this.qa===rf)&&(this.qa=sp,ap(this))}};function ap(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,et="";b.valueFunction!==null&&(et=b.valueFunction()),a.isValidText(y,E,et)?(a.Ea(a.name),a.qa=vc,a.transactionResult=a.name,y.text=et,a.doSuccess(E,et),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=of,a.doError(E,et))}}Ei.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)},Ei.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ei.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=mc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ei.prototype.doStop=function(){Zu=null},Ei.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)))},Ei.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},hn.Object.defineProperties(Ei.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)}}}),Ei.prototype.measureTemporaryTextBlock=Ei.prototype.Lx;var Yf=new Je(Ei,"LostFocus",0),Nl=new Je(Ei,"MouseDown",1),Jf=new Je(Ei,"Tab",2),ef=new Je(Ei,"Enter",3),t0=new Je(Ei,"SingleClick",0),gc=new Je(Ei,"SingleClickSelected",1),Qf=new Je(Ei,"DoubleClick",2),mc=new Je(Ei,"StateNone",0),nf=new Je(Ei,"StateActive",1),rf=new Je(Ei,"StateEditing",2),sp=new Je(Ei,"StateValidating",3),of=new Je(Ei,"StateInvalid",4),vc=new Je(Ei,"StateValidated",5),Zu=null;Ei.className="TextEditingTool",Ei.LostFocus=Yf,Ei.MouseDown=Nl,Ei.Tab=Jf,Ei.Enter=ef,Ei.SingleClick=t0,Ei.SingleClickSelected=gc,Ei.DoubleClick=Qf,Ei.StateNone=mc,Ei.StateActive=nf,Ei.StateEditing=rf,Ei.StateValidating=sp,Ei.StateInvalid=of,Ei.StateValidated=vc,xn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ts(a){sf||(lp(),sf=!0),this.H=Kl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=mu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new vn,this.ce=new Vo,this.ce.Yd=this,this.Ei=new vn,this.pu=new vn,this.Sr=new vn,this.pr=new vn,a&&Object.assign(this,a)}ts.prototype.Xe=function(a){this.H=a},ts.prototype.canStart=function(){return!0};function Vl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ko(a.H),a.zb=!0)}function $f(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===mu?(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===up&&y.vc.clear(),a.Qw=!!(a.Pk===lf&&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(),uf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==la&&b!==null&&(delete b.start.scale,delete b.end.scale),an.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Oa(x),pp(x),a.zb=!1,y.start(),y.bc&&(Xu(a),x.Ya(),hp(y,0),Ms(x,!0),Mh(a),x.R("AnimationStarting",a)))}))}}function gu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function qf(a,y,x,b){a.isTicking||gu(a)||y instanceof Cn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}te=ts.prototype,te.fv=function(a){return this.ce.fv(a)},te.Xu=function(a){return this.ce.Xu(a)};function td(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 et=E.pu.iterator;et.next();){var nt=et.value;if(nt.bc!==!1){t:if(0<nt.yl.count)var st=!0;else{for(st=nt.vc.iterator;st.next();){var ht=st.key;if(ht instanceof ze&&ht.diagram!==null||ht instanceof Xe){st=!0;break t}}st=!1}st?hf(nt,!1):nt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Xu(E),Ms(E.H),Mh(E)),an.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),an.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Xu(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 Mh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}te.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(),uf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),uf(y,this.H)},te.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))},te.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ua(this,a))},te.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Yu(this.ce,y,"position",y.position,y.position),Ua(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||gu(a)||(a.H.pi||(y=x.copy()),Yu(a.ce,a.H,"position",y,x))}function ed(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Ua(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Th(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var et=a[0],nt=a[1],st=a[2];a=a[3];var ht=y[0],pt=y[1],St=y[2];return y=y[3],st===0||st===100?(et=ht,nt=pt):(St===0||St===100)&&(ht=et,pt=nt),180<Math.abs(ht-et)&&(ht>et?et+=360:ht+=360),et=E(x,et,ht-et,b)%360,nt=E(x,nt,pt-nt,b),st=E(x,st,St-st,b),x=E(x,a,y-a,b),"hsla("+et+", "+nt+"%, "+st+"%, "+x+")"}function lp(){function a(x,b,E,et,nt,st){x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}var y=new Yn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!1):x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("location",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!0):x.location=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("position:placeholder",function(x,b,E,et,nt,st){nt<st?x.mm(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st),!1):x.position=new Le(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}),y.add("position:nodeCollapse",function(x,b,E,et,nt,st){var ht=x.actualBounds,pt=E.actualBounds;E=pt.x+pt.width/2-ht.width/2,ht=pt.y+pt.height/2-ht.height/2,nt<st?x.mm(et(nt,b.x,E-b.x,st),et(nt,b.y,ht-b.y,st),!1):x.position=new Le(et(nt,b.x,E-b.x,st),et(nt,b.y,ht-b.y,st))}),y.add("desiredSize",function(x,b,E,et,nt,st){x.desiredSize=new on(et(nt,b.width,E.width-b.width,st),et(nt,b.height,E.height-b.height,st))}),y.add("width",function(x,b,E,et,nt,st){x.width=et(nt,b,E-b,st)}),y.add("height",function(x,b,E,et,nt,st){x.height=et(nt,b,E-b,st)}),y.add("fill",function(x,b,E,et,nt,st){x.fill=Th(b,E,nt,st,et)}),y.add("stroke",function(x,b,E,et,nt,st){x.stroke=Th(b,E,nt,st,et)}),y.add("strokeWidth",function(x,b,E,et,nt,st){x.strokeWidth=et(nt,b,E-b,st)}),y.add("strokeDashOffset",function(x,b,E,et,nt,st){x.strokeDashOffset=et(nt,b,E-b,st)}),y.add("background",function(x,b,E,et,nt,st){x.background=Th(b,E,nt,st,et)}),y.add("areaBackground",function(x,b,E,et,nt,st){x.areaBackground=Th(b,E,nt,st,et)}),y.add("opacity",function(x,b,E,et,nt,st){x.opacity=et(nt,b,E-b,st)}),y.add("scale",function(x,b,E,et,nt,st){x.scale=et(nt,b,E-b,st)}),y.add("angle",function(x,b,E,et,nt,st){x.angle=et(nt,b,E-b,st)}),af=y}hn.Object.defineProperties(ts.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&&An(a,">= 1",ts,"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}}}),ts.prototype.stopAnimation=ts.prototype.Cc;var af=null,sf=!1,mu=new Je(ts,"Default",1),lf=new Je(ts,"AnimateLocations",2),up=new Je(ts,"None",3);ts.className="AnimationManager",ts.defineAnimationEffect=function(a,y){sf||(lp(),sf=!0),af.add(a,y)},ts.Default=mu,ts.AnimateLocations=lf,ts.None=up;function Vo(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=yc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ti,this.vc=new Yn,this.Tt=new Yn,this.yl=new vn,this.Ut=new vn,this.dw=$u,a&&Object.assign(this,a)}Vo.prototype.suspend=function(){this.Xk=!0},Vo.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,hf(this,!0),Xu(this.Yd),Ms(this.H),Mh(this.Yd),this.H.redraw()};function uf(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}te=Vo.prototype,te.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 Xe?a=x:x instanceof ze&&(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===mu&&this===y.defaultAnimation&&(this.Lp=Wg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=vf),Xu(y),this.yl.each(function(b){b.data=null,a.add(b)}),Mh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,td(y,this),this)},te.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},te.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Xe?this.H=a:a instanceof ze&&a.diagram!==null&&(this.H=a.diagram)),a instanceof qn){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Yu(this,a,y,x,b,E),this};function Yu(a,y,x,b,E,et){var nt=a.vc;if(y instanceof Xe&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(xu(b),s0(),b=[ms.j,ms.u,ms.o,ms.F],xu(E),s0(),E=[ms.j,ms.u,ms.o,ms.F]),nt.contains(y)){var st=nt.I(y),ht=st.start,pt=st.end;ht[x]===void 0&&(ht[x]=Lh(b)),pt[x]=Lh(E)}else ht={},pt={},ht[x]=Lh(b),pt[x]=Lh(E),st=ht.position,y instanceof ze&&st instanceof Le&&!st.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&st.assign(pt.position),st=new Ah(ht,pt,et),nt.add(y,st);nt=ht[x],nt instanceof Le&&!nt.w()&&nt.assign(a.o),et&&x.indexOf("position:")===0&&y instanceof qn?st.Ku.location=Lh(y.location):et&&(st.Ku[x]=Lh(b))}function Lh(a){return a instanceof Le||a instanceof kn?a.copy():a}te.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},te.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function hf(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),Xu(x),hp(a,E),Ms(a.H,!0),Mh(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 hp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var et=b.key;if(!(et instanceof ze&&et.diagram===null)){var nt=b.value,st=E?nt.end:nt.start;nt=E?nt.start:nt.end;var ht=af,pt;for(pt in nt)pt==="position"&&(nt["position:placeholder"]||nt["position:nodeCollapse"])||ht.get(pt)===null||ht.get(pt)(et,st[pt],nt[pt],a.Lp,y,x,a)}}}te.stop=function(){return this.bc?(this.Ml(!0),this):this},te.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,Xu(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 et=af;b.next();){var nt=b.key,st=b.value,ht=E?st.end:st.start,pt=E?st.start:st.end,St=st.Ku,Mt;for(Mt in pt)if(et.get(Mt)!==null){var Gt=Mt;!st.Hu||Gt!=="position:nodeCollapse"&&Gt!=="position:placeholder"||(Gt="position"),et.get(Gt)(nt,ht[Mt],St[Mt]!==void 0?St[Mt]:st.Hu?ht[Mt]:pt[Mt],this.Lp,this.Gd,this.Gd,this)}st.Hu&&St.location!==void 0&&nt instanceof qn&&(nt.location=St.location),st.nv&&nt instanceof qn&&nt.Zb(!1)}if(y.As.clear(),cf(y,!1),y.Ya(),y.N(),Ms(y,!0),x.defaultAnimation===this){for(Mt=x.pr.iterator;Mt.next();)E=Mt.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ms(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Mh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),uf(this,null),x.Ml(this),y.$b())}},te.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Pr&&(b=y.placeholder),b!==null?(x=b.ga(qr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Le(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Pr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Nn&&this.Cj(b,y)},te.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Pr&&(x=y.placeholder),x!==null){var b=x.ga(qr);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 Pr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Nn&&this.Aj(b,y)}},te.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},hn.Object.defineProperties(Vo.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&An(a,">= 1",Vo,"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:je("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}}}),Vo.prototype.getTemporaryState=Vo.prototype.Ez,Vo.prototype.stop=Vo.prototype.stop,Vo.prototype.add=Vo.prototype.add,Vo.prototype.addTemporaryPart=Vo.prototype.Iy;function yc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Vo.className="Animation",Vo.EaseLinear=function(a,y,x,b){return x*a/b+y},Vo.EaseInOutQuad=yc,Vo.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Vo.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Vo.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Vo.EaseOutExpo=Wg;function Ah(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ah.className="AnimationState";function nl(a,y,x){this.xd=null,this.rf=a,this.so=x||cp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Nh))}nl.prototype.copy=function(){var a=new nl(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 Hg(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))}hn.Object.defineProperties(nl.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 cp=new Je(nl,"Default",1),Nh=new Je(nl,"Immediate",2),Sc=new Je(nl,"Bundled",3);nl.className="AnimationTrigger",nl.Default=cp,nl.Immediate=Nh,nl.Bundled=Sc;function Oo(a){ii(this),this.H=null,this.Pa=new yn,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)}te=Oo.prototype,te.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ta(x)}a.clear(),this.Zq.length=0},te.Xe=function(a){this.H=a},te.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,et=0,nt=0,st=this.Pa.iterator;st.next();){var ht=st.value;ht instanceof Pr?E++:ht instanceof Nn?b++:ht instanceof Cn?et++:ht instanceof Xr?nt++:x++}if(st="",0<x&&(st+=x+" Parts "),0<b&&(st+=b+" Nodes "),0<E&&(st+=E+" Groups "),0<et&&(st+=et+" Links "),0<nt&&(st+=nt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,st+=`
`+x.toString(),b=x.data,b!==null&&gi(b)&&(st+=" #"+gi(b)),x instanceof Nn?st+=" "+sr(b):x instanceof Cn&&(st+=" "+sr(x.fromNode)+" "+sr(x.toNode));return y+" "+this.Pa.count+": "+st},te.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=Le.alloc(),et=this.Pa.s,nt=et.length;nt--;){var st=et[nt];if((b!==!0||Gh(st)!==!1)&&st.isVisible()&&(E.assign(a),gr(E,st.oe),st=st.ic(E,y,x),st!==null&&(y!==null&&(st=y(st)),st!==null&&(x===null||x(st)))))return Le.free(E),st}return Le.free(E),null},te.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof vn||(b=new vn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var et=Le.alloc(),nt=this.Pa.s,st=nt.length;st--;){var ht=nt[st];if((E!==!0||Gh(ht)!==!1)&&ht.isVisible()){et.assign(a),gr(et,ht.oe);var pt=ht;ht.ji(et,y,x,b)&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||b.add(pt))}}return Le.free(et),b},te.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 yn||E instanceof vn||(E=new vn),this.Uh===!1)return E;var et=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(et=!0);for(var nt=this.Pa.s,st=nt.length;st--;){var ht=nt[st];if((et!==!0||Gh(ht)!==!1)&&ht.isVisible()){var pt=ht;ht.Cf(a,y,x,b,E)&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||E.add(pt))}}return E},te.Nu=function(a,y,x,b,E,et,nt){if(this.Uh===!1)return E;for(var st=this.Pa.s,ht=st.length;ht--;){var pt=st[ht];if((nt!==!0||Gh(pt)!==!1)&&et(pt)&&pt.isVisible()){var St=pt;pt.Cf(a,y,x,b,E)&&(y!==null&&(St=y(St)),St===null||x!==null&&!x(St)||E.add(St))}}return E},te.og=function(a,y,x,b,E,et){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof vn)&&(et=E),E=!0),et instanceof yn||et instanceof vn||(et=new vn),this.Uh===!1)return et;var nt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(nt=!0);for(var st=Le.alloc(),ht=Le.alloc(),pt=this.Pa.s,St=pt.length;St--;){var Mt=pt[St];if((nt!==!0||Gh(Mt)!==!1)&&Mt.isVisible()){st.assign(a),gr(st,Mt.oe),ht.h(a.x+y,a.y),gr(ht,Mt.oe);var Gt=Mt;Mt.og(st,ht,x,b,E,et)&&(x!==null&&(Gt=x(Gt)),Gt===null||b!==null&&!b(Gt)||et.add(Gt))}}return Le.free(st),Le.free(ht),et},te.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=On();for(var E=On(),et=0;et<b;et++){var nt=x[et];if(nt.vw=et,nt instanceof Cn){if(nt.fd===!1)continue}else if(nt instanceof Xr&&nt.adornedPart!==null)continue;var st=nt.actualBounds;nt.isVisible()&&Ml(st,y)?(nt.Fd(!0),a.push(nt)):(nt.Fd(!1),nt.adornments!==null&&0<nt.adornments.count&&E.push(nt))}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]);Fn(a),Fn(E)}}};function vu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}te.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=vu(this,a);var et=this.Zq;et.length=0;for(var nt=y.scale,st=on.alloc(),ht=0;ht<b;ht++)this.Oj(a,x[ht],y,et,nt,st,!0);if(on.free(st),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Vg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var et=E.length;if(et!==0){var nt=vu(a,y),st=a.Zq;st.length=0;for(var ht=x.scale,pt=on.alloc(),St=0;St<et;St++){var Mt=E[St];b.contains(Mt)&&a.Oj(y,Mt,x,st,ht,pt,!1)}on.free(pt),y.globalAlpha=nt}}}te.Oj=function(a,y,x,b,E,et,nt){if(nt&&!Gh(y))a.Hs(y);else{if(b!==null&&y instanceof Cn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(nt=!1,b=y.containingGroup;b!==null;)nt?b.tb!==null&&et.Ex(b.tb):b.tb!==null&&(nt=!0,et.assign(b.tb)),b=b.containingGroup;var st=y.actualBounds;if(b=!1,nt&&y.isVisible()){if(!et.Yc(st)){a.Hs(y);return}b=!et.Re(st)}b&&(a.save(),a instanceof es?a.bk=et.copy():(a.beginPath(),a.rect(et.x,et.y,et.width,et.height),a.clip())),st.width*E>x.Oq||st.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,et=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Ki(y,a,y.areaBackground,!0,!0,et,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Ki(y,a,"rgba(0,0,0,0.3)",!0,!1,et,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),Ki(y,a,y.background,!0,!1,et,E),a.fillRect(0,0,et.width/2,et.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))}},te.g=function(a,y,x,b,E){var et=this.diagram;et!==null&&et.cb(Di,a,this,y,x,b,E)},te.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ta(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)),nd(this,a,y),a},te.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,ta(y),a};function nd(a,y,x){if(y=Kg(a,y,x),x instanceof Pr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];if(st===x&&(y=nt,0<=b)||0>b&&st.containingGroup===x&&(b=nt,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&nd(a,-1,y)}x.svg!==null&&x.svg.remove()}function Kg(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 et=y-1,nt=NaN;0<=et&&(nt=a.M(et).zOrder,!!isNaN(nt));)et--;for(var st=y+1,ht=NaN;st<E&&(ht=a.M(st).zOrder,!!isNaN(ht));)st++;if(!isNaN(nt)&&nt>b)for(;;){if(et===-1||nt<=b){if(et++,et===y)break;return a.mb(y),a.Gb(et,x),et}for(nt=NaN;0<=--et&&(nt=a.M(et).zOrder,isNaN(nt)););}else if(!isNaN(ht)&&ht<b)for(;;){if(st===E||ht>=b){if(st--,st===y)break;return a.mb(y),a.Gb(st,x),st}for(ht=NaN;++st<E&&(ht=a.M(st).zOrder,isNaN(ht)););}return y}hn.Object.defineProperties(Oo.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===""&&je("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&je("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)&&An(a,"0 <= value <= 1",Oo,"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))}}}),Oo.prototype.findObjectsNear=Oo.prototype.og,Oo.prototype.findObjectsIn=Oo.prototype.Cf,Oo.prototype.findObjectsAt=Oo.prototype.ji,Oo.prototype.findObjectAt=Oo.prototype.ic,Oo.className="Layer";function Xe(a,y){if(am||($o(),am=!0),ii(this),Kl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Wi){var x=this,b=function(){x.removeEventListener(an.document,"DOMContentLoaded",b,!1),x.setRTL()};an.document.body!==null?this.setRTL():x.addEventListener(an.document,"DOMContentLoaded",b,!1)}this.ol=null,dd.add("Model",li);var E=this;return this.Hb=function(et){var nt=E.partManager;if(et.model===nt.diagram.model&&nt.diagram.aa){nt.diagram.aa=!1;try{var st=et.change;et.modelChange===""&&st===Di&&nt.updateDataBindings(et.object,et.propertyName)}finally{nt.diagram.aa=!0}}},this.Oc=function(et){E.partManager.doModelChanged(et)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new ji,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"||an.Element&&a instanceof Element?dp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var jh,Kl;function Zg(a){a.Yd=new ts,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new yn,a.pj=new Yn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Le(NaN,NaN).freeze(),a.du=new Le(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Le(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Sr,a.zu=new Le(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new Dr(0,0,0,0).freeze(),a.sj=$u,a.nu=!1,a.Zt=null,a.fu=null,a.yh=la,a.zk=jo,a.Fg=la,a.pq=jo,a.yt=qr,a.Bt=qr,a.Fc=!0,a.pn=!1,a.De=new vn,a.Eh=new Yn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Dr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new aa,a.bq.diagram=a,a.Qg=new aa,a.Qg.diagram=a,a.cj=new aa,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new vn,a.Ht=!0,a.uu=qu,a.pw=!1,a.wu=mf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Yn,a.Xn=new yn,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 Dr(5).freeze(),a.Hw=new vn().freeze(),a.Nt=999999999,a.nw=new vn().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 vn,a.ow=new vn,a.Xh=null,a.aw=new kn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Le,bounds:new on,Py:new kn,bA:new kn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new on(NaN,NaN,NaN,NaN).freeze(),a.wo=new kn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Yn;var y=new Nn,x=new yi;x.bind(new eo("text","",sr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Nn,x=new yi,x.stroke="brown",x.bind(new eo("text","",sr)),y.add(x),a.Lg.add("Comment",y),y=new Nn,y.selectable=!1,y.avoidable=!1,x=new Tr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new kn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Yn,y=new Pr,y.selectionObjectName="GROUPPANEL",y.type=Sn.Vertical,x=new yi,x.font="bold 12pt sans-serif",x.bind(new eo("text","",sr)),y.add(x),x=new Sn(Sn.Auto),x.name="GROUPPANEL";var b=new Tr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new ba,b.padding=new Dr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Yn,y=new Cn,x=new Tr,x.isPanelMain=!0,y.add(x),x=new Tr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Cn,x=new Tr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Xr,y.type=Sn.Auto,x=new Tr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ba,x.margin=new Dr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Xr,y.type=Sn.Link,x=new Tr,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 li,a.toolManager=new Fi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ct,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=di,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 Le,a.zy=500,a.wp=new Le,a.wq=!1}Xe.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ec=null,Ih="",fp(this,!1),this.Xn.clear(),Ed(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function fp(a,y){a.animationManager.Cc(!0),a.Hw=new vn().freeze(),a.nw=new vn().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 et=[],nt=a.Wa.length;if(y){for(y=0;y<nt;y++)for(var st=a.Wa.s[y].parts;st.next();){var ht=st.value;ht!==E&&ht.data===null&&et.push(ht)}for(y=0;y<et.length;y++)a.remove(et[y])}for(y=0;y<nt;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(),Ed(),a.Og.clear(),xi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),et}function Xg(){return null}Xe.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),Ol(this),this.Wg=!0,Yg(this),this.layout=new ji,this.Wg=!1,this.model=cy(),this.model.undoManager=new Ri,this.vb=this.rn=!1,this.N()},Xe.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=an.document.body);var y=Mn("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},Xe.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=an.document.body);var y=0;if(Wi){var x=om;y=jh,x===null&&(x=om=Mn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=jh=Mn("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||ei||(y=11)}this.Db=y,this.Gw=!0},Xe.prototype.qb=function(a){a.classType===Xe&&(this.autoScale=a)},Xe.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 dp(a,y){if(Wi){if(y!=null||je("Diagram setup requires an argument DIV."),a.Ka!==null&&je("Diagram has already completed setup."),typeof y=="string"?a.Ka=an.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:je("No DIV or DIV id supplied: "+y),a.Ka===null&&je("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&je("Invalid div id; div already has a Diagram associated with it."),!a.ol&&an.ResizeObserver){var x=$n(function(){a.$b()},250);a.ol=new an.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}an.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=an.go;var E=new Ws(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",an.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),wp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Ws(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Wi){E=Mn("div");var et=Mn("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",et.style.position="absolute",et.style.width="1px",et.style.height="1px",a.Ka.appendChild(E),E.appendChild(et),E.onscroll=Qg,E.addEventListener("pointerdown",$g),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=et}a.hk=$n(function(){a.Yh=null,a.N()},300),a.Ov=$n(function(){pp(a)},250),a.preventDefault=function(nt){return nt.preventDefault(),!1},a.$j=function(nt){if(a.isEnabled){var st=Es(a,nt,!0);st.bubbles=!0;var ht=0,pt=0;st.delta=0,nt.deltaX!==void 0?(nt.deltaX!==0&&(ht=0<nt.deltaX?1:-1),nt.deltaY!==0&&(pt=0<nt.deltaY?1:-1),st.delta=Math.abs(nt.deltaX)>Math.abs(nt.deltaY)?-ht:-pt):nt.wheelDeltaX!==void 0?(nt.wheelDeltaX!==0&&(ht=0<nt.wheelDeltaX?-1:1),nt.wheelDeltaY!==0&&(pt=0<nt.wheelDeltaY?-1:1),st.delta=Math.abs(nt.wheelDeltaX)>Math.abs(nt.wheelDeltaY)?-ht:-pt):nt.wheelDelta!==void 0&&nt.wheelDelta!==0&&(st.delta=0<nt.wheelDelta?1:-1),a.doMouseWheel(),rl(st,nt)}},a.aA=function(nt){a.isEnabled&&(a.Vk=!1,Es(a,nt,!0),nt=a.currentTool,nt.cancelWaitAfter(),nt.standardMouseOver())},a.ui=function(nt){if(a.isEnabled){a.Vk=!0;var st=a.Yt;st[nt.pointerId]===void 0&&(st[nt.pointerId]=nt),st=a.oj;var ht=!1;if(st[0]===null||st[0].pointerId!==nt.pointerId&&st[0].pointerType===nt.pointerType)if(st[1]!==null&&st[1].pointerId===nt.pointerId)st[1]=nt,ht=!0;else if(st[0]===null)st[0]=nt;else if(st[1]===null)st[1]=nt,ht=!0;else{nt.preventDefault();return}else st[0]=nt;(st=nt.pointerType==="touch"||nt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var pt=ht;ht=yp(a,nt,!0,!1,!0,pt),wc(a,nt,ht),ht.targetDiagram=vp(nt,nt.target),ht.targetObject=null,pt||ht.clone(a.bq),pt=a.uw,st=st?25:10,nt.timeStamp-a.tw<a.zy&&!(Math.abs(pt.x-nt.screenX)>st||Math.abs(pt.y-nt.screenY)>st)?a.yq++:a.yq=1,ht.clickCount=a.yq,a.tw=nt.timeStamp,a.uw.sg(nt.screenX,nt.screenY),a.doMouseDown(),nt.button===1?nt.preventDefault():rl(ht,nt)}},a.dk=function(nt){if(a.isEnabled){a.Vk=!0;var st=a.oj;if(st[0]===null||st[0].pointerId!==nt.pointerId&&st[0].pointerType===nt.pointerType){if(st[1]!==null&&st[1].pointerId===nt.pointerId){st[1]=nt;return}if(st[0]===null)st[0]=nt;else return}else st[0]=nt;if(st[0].pointerId===nt.pointerId){st=yp(a,nt,!1,!1,!1,st[1]!==null);var ht=an.document.elementFromPoint(nt.clientX,nt.clientY)||null;ht!==null&&ht.shadowRoot!==void 0&&ht.shadowRoot!==null&&(ht=ht.shadowRoot.elementFromPoint(nt.clientX,nt.clientY));var pt=a,St=nt;ht&&ht.H&&(St=nt,pt=ht.H),st.targetDiagram=pt,wc(a,St,st),st.targetObject=null,a.doMouseMove(),rl(st,nt)}}},a.fk=function(nt){if(a.isEnabled){a.Vk=!0;var st=nt.pointerType==="touch"||nt.pointerType==="pen",ht=a.Yt;if(st&&a.qu)delete ht[nt.pointerId],nt.preventDefault();else if(ht=a.oj,ht[0]===null||ht[0].pointerId!==nt.pointerId&&ht[0].pointerType===nt.pointerType)ht[1]!==null&&ht[1].pointerId===nt.pointerId&&(ht[1]=null);else{ht[0]=null,ht=yp(a,nt,!1,!0,!0,!1);var pt=an.document.elementFromPoint(nt.clientX,nt.clientY)||null;pt!==null&&pt.shadowRoot!==void 0&&pt.shadowRoot!==null&&(pt=pt.shadowRoot.elementFromPoint(nt.clientX,nt.clientY)),pt!==null&&pt.H instanceof Xe&&pt.H!==a&&wc(pt.H,nt,ht),pt===null&&(pt=nt.target),wc(a,nt,ht),ht.clickCount=a.yq,ht.targetDiagram=vp(nt,pt),ht.targetObject=null,a.doMouseUp(),rl(ht,nt),st&&(a.wq=!1)}}},a.ek=function(nt){if(a.isEnabled){a.Vk=!1;var st=a.Yt;st[nt.pointerId]&&delete st[nt.pointerId],st=a.oj,st[0]!==null&&st[0].pointerId===nt.pointerId&&(st[0]=null),st[1]!==null&&st[1].pointerId===nt.pointerId&&(st[1]=null),nt.pointerType!=="touch"&&nt.pointerType!=="pen"&&(nt=a.currentTool,nt.cancelWaitAfter(),nt.standardMouseOver())}},a.ck=function(nt){var st=a.oj;st[0]!==null&&st[0].pointerId===nt.pointerId?(st[0]=null,a.wq=!1):st[1]!==null&&st[1].pointerId===nt.pointerId&&(st[1]=null)},a.Vp=b.Z["d"+Sf[1]+Sf[2]+"wI"+Tc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,yf,y,y),b.Vc(!0),e0(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Xe.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Xe.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function e0(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(an,"resize",a.Ov,!1)}function Oa(a){30<a.Sq&&(a.Yh=1)}function cf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),oi&&oi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Xe.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:an.devicePixelRatio||1},Xe.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Xe.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Xe.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Xe.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Xe.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Xe.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Xe.prototype.doFocus=function(){this.focus()},Xe.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=an.scrollX||an.pageXOffset,y=an.scrollY||an.pageYOffset;this.ta.focus(),an.scrollTo(a,y)}},Xe.prototype.Oy=function(){this.H.R("GainedFocus")},Xe.prototype.Ny=function(){this.H.R("LostFocus")};function pp(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===la&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new Oo;y.name="Background",a.Al(y),y=new Oo,y.name="",a.Al(y),y=new Oo,y.name="Foreground",a.Al(y),y=new Oo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Oo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Oo,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 Sn(Sn.Grid);y.name="GRID";var x=new Tr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Tr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Tr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Tr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Tr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Tr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new qn,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):Cc(this.H)}function $g(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Cc(this.H)}Xe.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,et=this.rj,nt=b.x-et.left,st=b.y-et.top,ht=b.width+et.left+et.right,pt=b.height+et.top+et.bottom,St=b.right+et.right;et=b.bottom+et.bottom;var Mt=E.x;b=E.y;var Gt=E.width,Xt=E.height,Qt=E.right,ie=E.bottom;E=this.scale;var Me=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Me=Me+a.scrollWidth-a.clientWidth;break;case"reverse":Me=a.scrollWidth-Me-a.clientWidth}var xe=Me;Gt<ht||Xt<pt?(Me=Le.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==xe&&(Me.x=xe/E+nt,this.ju=xe),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Me.y=a.scrollTop/E+st,this.lu=a.scrollTop),this.position=Me,Le.free(Me),this.Ee=this.qr=!1):(Me=Le.alloc(),a.uy&&this.allowHorizontalScroll&&(nt<Mt&&(this.position=Me.h(xe+nt,this.position.y)),St>Qt&&(this.position=Me.h(-(y.scrollWidth-this.Aa)+xe-this.Aa/E+St,this.position.y))),a.vy&&this.allowVerticalScroll&&(st<b&&(this.position=Me.h(this.position.x,a.scrollTop+st)),et>ie&&(this.position=Me.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+et))),Le.free(Me),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,St=b.right,Qt=E.right,et=b.bottom,ie=E.bottom,nt=b.x,Mt=E.x,st=b.y,b=E.y,Gt>=ht&&nt>=Mt&&St<=Qt&&(x.style.width="1px"),Xt>=pt&&st>=b&&et<=ie&&(x.style.height="1px"))}},Xe.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Ko(this),gp(this,a)};function gp(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,et=0;et<E;et++){var nt=b[et];if(nt.visible&&nt.isInDocumentBounds){nt=nt.Pa.s;for(var st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];pt.isInDocumentBounds&&pt.isVisible()&&(pt=pt.actualBounds,pt.w()&&(x?(x=!1,y.assign(pt)):y.ed(pt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Xe.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Tn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Cn||(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 Cn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new on(NaN,NaN,0,0):x};function Gs(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=Le.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=on.allocAt(0,0,b.width,b.height);var E=Le.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,on.free(b),Le.free(E),Le.free(x)}x=a.yh,y&&a.Fg!==la&&(x=a.Fg);var et=x!==la?xc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/et;var nt=a.ya/et,st=a.zk,ht=a.pq;y&&!st.sb()&&(ht.sb()||ht.Xb())&&(st=ht.Xb()?Fr:ht),mp(a,a.documentBounds,E,nt,st,y),y=a.scale,a.scale=et,a.vb=!1,et=a.viewportBounds,Ge.B(et.x,x)&&Ge.B(et.y,b)&&Ge.B(et.width,E)&&Ge.B(et.height,nt)||a.onViewportBoundsChanged(new on(x,b,E,nt),et,y,!1)}}function xc(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 et=a.Aa+(a.gf?a.Db:0),nt=a.ya+(a.Be?a.Db:0),st=et/E,ht=nt/b;return y===ds?(y=Math.min(ht,st),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Rh?(y=ht>st?(nt-a.Db)/b:(et-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Xe.prototype.zoomToFit=function(){var a=this.sj;this.sj=$u,this.scale=xc(this,ds),a!==$u&&(Gs(this,!1),mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},te=Xe.prototype,te.BA=function(a,y){y===void 0&&(y=ds);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ds||y===Rh)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 et=this.ya;E=y===Rh?et/b>E/x?(et-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(et/b,E/x)}this.scale=E,this.position=new Le(a.x,a.y)}},te.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Le(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))},te.zz=function(a){if(a instanceof ze){this.eq=a;var y=Le.alloc();this.fq=this.op(a.ga(qr,y)),Le.free(y)}else this.eq=null,this.fq=di};function mp(a,y,x,b,E,et){var nt=Le.allocAt(a.pa.x,a.pa.y),st=nt.x,ht=nt.y;if(a.eq!==null){var pt=Le.alloc();pt=a.eq.ga(qr,pt),st=pt.x-a.fq.x/a.scale,ht=pt.y-a.fq.y/a.scale,E=zr,Le.free(pt)}(et||a.scrollMode===$u)&&(E.sb()&&(x>y.width&&(st=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(ht=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,et=x-y.width,x<y.width+E.left+E.right?(st=Math.min(st+x/2,y.right+Math.max(et,E.right)-x/2),st=Math.max(st,y.left-Math.max(et,E.left)+x/2),st-=x/2):st>y.left?st=y.left:st<y.right-x&&(st=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(ht=Math.min(ht+b/2,y.bottom+Math.max(x,E.bottom)-b/2),ht=Math.max(ht,y.top-Math.max(x,E.top)+b/2),ht-=b/2):ht>y.top?ht=y.top:ht<y.bottom-b&&(ht=y.bottom-b)),nt.x=isFinite(st)?st:-a.yb.left,nt.y=isFinite(ht)?ht:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,nt),nt.x=y.x,nt.y=y.y),Ug(a.Yd,a.pa,nt),a.pa.h(nt.x,nt.y),Ol(a),Le.free(nt)}te.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Zl(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof qn)return a}else if(a=Zl(this,a,function(x){return x.part}),a instanceof qn)return a;return null},te.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ko(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 Zl(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Ko(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}te.lz=function(a,y,x){return y===void 0&&(y=!0),ff(this,a,function(b){return b.part},y?function(b){return b instanceof qn&&b.canSelect()}:null,x)};function ff(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof yn||E instanceof vn||(E=new vn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var et=a.value;et.visible&&!et.isTemporary&&et.ji(y,x,b,E)}return E}te.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof vn||(b=new vn),Ko(this);for(var E=this.Wa.iteratorBackwards;E.next();){var et=E.value;et.visible&&et.ji(a,y,x,b)}return b},te.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),rd(this,a,function(E){return E instanceof qn&&(!x||E.canSelect())},y,b)},te.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof yn||E instanceof vn||(E=new vn),Ko(this);for(var et=this.Wa.iteratorBackwards;et.next();){var nt=et.value;nt.visible&&nt.Cf(a,y,x,b,E)}return E},te.Nu=function(a,y,x,b,E,et){var nt=new vn;Ko(this);for(var st=this.Wa.iteratorBackwards;st.next();){var ht=st.value;ht.visible&&ht.Nu(a,y,x,b,nt,E,et)}return nt};function rd(a,y,x,b,E){var et=null;for(et===void 0&&(et=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof yn||E instanceof vn||(E=new vn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var nt=a.value;nt.visible&&!nt.isTemporary&&nt.Cf(y,et,x,b,E)}return E}te.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),df(this,a,y,function(et){return et instanceof qn&&(!b||et.canSelect())},x,E)},te.og=function(a,y,x,b,E,et){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof vn)&&(et=E),E=!0),et instanceof yn||et instanceof vn||(et=new vn),Ko(this);for(var nt=this.Wa.iteratorBackwards;nt.next();){var st=nt.value;st.visible&&st.og(a,y,x,b,E,et)}return et};function df(a,y,x,b,E,et){var nt=null;for(nt===void 0&&(nt=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof vn)&&(et=E),E=!0),et instanceof yn||et instanceof vn||(et=new vn),Ko(a),a=a.Wa.iteratorBackwards;a.next();){var st=a.value;st.visible&&!st.isTemporary&&st.og(y,x,nt,b,E,et)}return et}Xe.prototype.acceptEvent=function(a){return Es(this,a,a instanceof MouseEvent)};function Es(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?wc(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),ei&&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=vp(y,y.target),b.targetObject=null,b}function vp(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 yp(a,y,x,b,E,et){var nt=a.Qg;return a.Qg=a.cj,a.cj=nt,nt.diagram=a,nt.clickCount=1,a=nt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),nt.modifiers=a,nt.event=y,nt.timestamp=y.timeStamp,nt.button=y.button,nt.buttons=y.buttons,ei&&y.button===0&&y.ctrlKey&&(nt.button=2),nt.down=x,nt.up=b,nt.handled=!1,nt.bubbles=E,nt.isMultiTouch=et,nt}function rl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Xe.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Es(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(),rl(x,a)},Xe.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(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(),rl(x,a)},Xe.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),rl(x,a)},Xe.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Es(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),rl(x,a)},Xe.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Le(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?gr(new Le(y,a),this.Ab):new Le(y,a)};function wc(a,y,x){var b=a.ta,E=a.Aa,et=a.ya,nt=0,st=0;b!==null&&(b=b.getBoundingClientRect(),nt=y.clientX-E/b.width*b.left,st=y.clientY-et/b.height*b.top),x.viewPoint.h(nt,st),a.Ab!==null?(y=Le.allocAt(nt,st),a.Ab.Cd(y),x.documentPoint.assign(y),Le.free(y)):x.documentPoint.h(nt,st)}function Sp(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))}}Xe.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Ko(a),a.Va()}Xe.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},te=Xe.prototype,te.Pz=function(){return this.kg},te.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ms(this),this.hf=!1,this.du=new Le(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&fr(function(){b.ld=!1,Vl(y,"Model"),a(b)},1)},te.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;an.requestAnimationFrame(function(){y.kg&&y.bd()})}},te.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ms(this))};function Oh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Cc(a)||(y&&Ko(a),x&&Gs(a,!1))}function Ms(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,et=E.length,nt=0;nt<et;nt++){var st=E[nt];ho(st,!1),st.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(ht){ht.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||pp(a),Oh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(jl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ko(a),et=!1,(!a.hf||a.xh)&&(a.hf?Lp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Lp(a,!1)),et=!0),a.Jk=!1,Ko(a),a.ou||qg(a),Oh(a,!0,!1),nt=!1,et?(x=on.alloc(),x.assign(a.viewportBounds),a.hf||(nt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,xp(a)),a.R("LayoutCompleted"),Oh(a,!0,!1),on.free(x)):x.Ok&&x.Qw&&(a.Fg!==la?a.scale=xc(a,a.Fg):a.yh!==la?a.scale=xc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Gs(a,!0)),et&&nt&&a.eb("Initial Layout"),Ko(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function xp(a){if(a.Fg!==la)a.scale=xc(a,a.Fg);else if(a.yh!==la)a.scale=xc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Gs(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),jl(a)}function Ko(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 vn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Pr&&b.U&65536&&(b.U=b.U^65536)})}}te.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Pr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Pr&&x.isVisible()&&pf(this,x);for(a.reset();a.next();)x=a.value,x instanceof Cn&&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 Xr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function pf(a,y){for(var x=On(),b=On(),E=y.memberParts;E.next();){var et=E.value;et.isVisible()&&(et instanceof Pr?(gs(et)||xa(et)||zh(et))&&pf(a,et):et instanceof Cn?et.fromNode===y||et.toNode===y?b.push(et):x.push(et):(et.measure(1/0,1/0),et.arrange()))}for(a=x.length,E=0;E<a;E++)et=x[E],et.measure(1/0,1/0),et.arrange();for(Fn(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();Fn(b)}te.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},te.gc=function(a){if(this.Ka!==null){if(this.ta===null&&je("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Pc(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,et=Math.round(y.x*E)/E,nt=Math.round(y.y*E)/E,st=this.Ab;for(st.reset(),E!==1&&st.scale(E),y.x===0&&y.y===0||st.translate(-et,-nt),a.ti=null,Yy(a,st.m11,st.m12,st.m21,st.m22,st.dx,st.dy),this.pb!==1&&(a.globalAlpha=this.pb),Ju(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?Lc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Sr.prototype.Cd=Sr.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(et=this.animationManager,!et.zb&&(!et.isAnimating||et.isTicking)&&(x=new Date,Pc(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&&!et.isAnimating)break t;et=this.Ab,et.reset(),nt=this.Mb,st=this.pa;var ht=this.Ca,pt=Math.round(st.x*ht)/ht,St=Math.round(st.y*ht)/ht;for(ht!==1&&et.scale(ht),st.x===0&&st.y===0||et.translate(-pt,-St),a.setTransform(nt,0,0,nt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Ju(this,a),st=0;st<E;st++)a.setTransform(nt,0,0,nt,0,0),a.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),a.yc(),y[st].gc(a,this);if(y=!1,this.Yf?Lc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Sr.prototype.Cd=Sr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=oi&&oi.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 id(a,y,x,b,E,et,nt,st,ht,pt){if(a.Ka!==null){a.ta===null&&je("No canvas specified"),nt===void 0&&(nt=null),st===void 0&&(st=null),ht===void 0&&(ht=!1),pt===void 0&&(pt=!1),Pc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var St=a.Ca;a.Ca=E;var Mt=a.Wa.s,Gt=Mt.length;try{var Xt=new on(et.x,et.y,b.width/E,b.height/E),Qt=Xt.copy();Qt.Co(x),jl(a,Qt),Ko(a),a.Fd(Mt,Gt,a,Xt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),st!==null&&st!==""&&(y.fillStyle=st,y.ox(0,0,b.width,b.height));var ie=a.Mb;y.scale(ie,ie);var Me=Sr.alloc();Me.reset(),Me.translate(x.left,x.top),Me.scale(E),et.x===0&&et.y===0||Me.translate(-et.x,-et.y),y.setTransform(Me.m11,Me.m12,Me.m21,Me.m22,Me.dx,Me.dy),y.yc(),y instanceof es&&Yy(y,Me.m11,Me.m12,Me.m21,Me.m22,Me.dx,Me.dy),Sr.free(Me),Ju(a,y),y.globalAlpha=a.pb;var xe=a.Qj("Grid");if(nt){var Ne=new vn,Fe=nt.iterator;for(Fe.reset();Fe.next();){var De=Fe.value;De instanceof qn&&(pt||De.layer!==xe)&&(De.Gj(),Ne.add(De))}for(pt=0;pt<Gt;pt++)Vg(Mt[pt],y,a,Ne,ht);Ne.each(function(Ze){return Ze.Gj()})}else for(Ne=0;Ne<Gt;Ne++){var _e=Mt[Ne];_e===xe?pt&&_e.gc(y,a,!0):_e.gc(y,a,ht)}a.$i=!1,a.Yf&&Lc(a.Yf,a)&&a.Vp()}finally{a.Ca=St,a.ib.Vc(!0),a.vd=!0,a.Fd(Mt,Gt,a,a.viewportBounds),jl(a),a.ib instanceof es&&(a.ib.Nj.PA(),a.redraw())}}}te.Gf=function(a){return this.Rg[a]},te.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},te.Tx=function(){this.Rg=new ir,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ei||Yr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Ju(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}te.Ql=function(a){return this.on[a]},te.sA=function(a,y){this.on[a]=y},te.Sx=function(){this.on=new ir,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},te.set=function(a){return Object.assign(this,a),this},te.Du=function(a){return this.nm(a)},te.nm=function(a){return bc(this,a),this};function bc(a,y){var x=a instanceof Sn,b=a instanceof Xe,E;for(E in y){E===""&&je("Setting properties requires non-empty property names");var et=a,nt=E;if(x||b){var st=E.indexOf(".");if(0<st){var ht=E.substring(0,st);x?et=a.fb(ht):(et=a[ht],et==null&&(et=a.toolManager[ht])),$e(et)?nt=E.substr(st+1):je("Unable to find object named: "+ht+" in "+a.toString()+" when trying to set property: "+E)}}if(nt[0]!=="_"&&!or(et,nt))if(b&&nt==="ModelChanged"){a.Yw(y[nt]);continue}else if(b&&nt==="Changed"){a.Pe(y[nt]);continue}else if(b&&or(a.toolManager,nt))et=a.toolManager;else if(b&&nm(a,nt)){a.Bj(nt,y[nt]);continue}else if(a instanceof Hn&&nt==="Changed"){a.Pe(y[nt]);continue}else je('Trying to set undefined property "'+nt+'" on object: '+et.toString());et[nt]=y[E],nt[0]==="_"&&et instanceof ze&&et.Vw(nt)}}te.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Yn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},te.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")},Xe.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!==vf&&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),et=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,et-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=on.alloc(),Tp(this,this.computeBounds(b)),on.free(b)),b=this.ta,b===null||b instanceof Fl)))){var nt=this.Mb;E=this.Aa*nt;var st=this.ya*nt,ht=this.scale*nt;et=Math.round(Math.round(y.x*ht)-Math.round(a.x*ht)),y=Math.round(Math.round(y.y*ht)-Math.round(a.y*ht)),ht=this.jw,a=this.oy,ht.width!==E&&(ht.width=E),ht.height!==st&&(ht.height=st),a.clearRect(0,0,E,st),ht=190*nt;var pt=70*nt,St=Math.max(et,0),Mt=Math.max(y,0),Gt=Math.floor(E-St),Xt=Math.floor(st-Mt);a.drawImage(b.Oa,St,Mt,Gt,Xt,0,0,Gt,Xt),Lc(this.Yf,this)&&a.clearRect(0,0,ht,pt),b=On(),a=On(),Xt=Math.abs(et),Gt=Math.abs(y);var Qt=St===0?0:E-Xt;St=Le.allocAt(Qt,0),Xt=Le.allocAt(Xt+Qt,st),a.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y)));var ie=this.Ab;if(ie.reset(),ie.scale(nt,nt),this.Ca!==1&&ie.scale(this.Ca),nt=this.pa,(nt.x!==0||nt.y!==0)&&isFinite(nt.x)&&isFinite(nt.y)&&ie.translate(-nt.x,-nt.y),gr(St,ie),gr(Xt,ie),b.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y))),Qt=Mt===0?0:st-Gt,St.h(0,Qt),Xt.h(E,Gt+Qt),a.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y))),gr(St,ie),gr(Xt,ie),b.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y))),Lc(this.Yf,this)&&(E=0<et?0:-et,st=0<y?0:-y,St.h(E,st),Xt.h(ht+E,pt+st),a.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y))),gr(St,ie),gr(Xt,ie),b.push(new on(Math.min(St.x,Xt.x),Math.min(St.y,Xt.y),Math.abs(St.x-Xt.x),Math.abs(St.y-Xt.y)))),Le.free(St),Le.free(Xt),Oh(this,!1,!0),this.Ka===null&&je("No div specified"),this.ta===null&&je("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Pc(this),st=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*st,this.ya*st),E.drawImage(this.jw.Oa,0<et?0:Math.round(-et),0<y?0:Math.round(-y)),et=this.pa,nt=this.Ca,ht=Math.round(et.x*nt)/nt,pt=Math.round(et.y*nt)/nt,y=this.Ab,y.reset(),nt!==1&&y.scale(nt),et.x===0&&et.y===0||y.translate(-ht,-pt),E.save(),E.beginPath(),et=a.length,nt=0;nt<et;nt++)ht=a[nt],ht.width!==0&&ht.height!==0&&E.rect(Math.floor(ht.x),Math.floor(ht.y),Math.ceil(ht.width),Math.ceil(ht.height));for(E.clip(),E.setTransform(st,0,0,st,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,et=y.length,this.Fd(y,et,this,this.viewportBounds),Ju(this,E),E.globalAlpha=this.pb,st=0;st<et;st++)if(nt=y[st],ht=b,nt.visible&&nt.pb!==0){pt=vu(nt,E),Mt=nt.Zq,Mt.length=0,St=this.scale,Gt=on.alloc(),Xt=nt.Pa.s,ie=Xt.length,Qt=ht.length;for(var Me=0;Me<ie;Me++){var xe=Xt[Me],Ne=Bc(xe,xe.actualBounds);t:{for(var Fe=2/St,De=4/St,_e=0;_e<Qt;_e++){var Ze=ht[_e];if(Ze.width!==0&&Ze.height!==0&&Ne.Vu(Ze.x-Fe,Ze.y-Fe,Ze.width+De,Ze.height+De)){Ne=!0;break t}}Ne=!1}Ne&&nt.Oj(E,xe,this,Mt,St,Gt,!0)}on.free(Gt),E.globalAlpha=pt}E.restore(),E.Vc(!0),this.Yf&&Lc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Fn(b),Fn(a),this.ld=!1}}else this.bd();x&&(Oa(this),this.bd(),cf(this,!0))}else x?(Oa(this),this.bd(),cf(this,!0)):this.bd()}};function Pc(a){a.pn!==!1&&(a.pn=!1,wp(a,a.Aa,a.ya))}function wp(a,y,x){Ol(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Cc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,et=!1,nt=a.gf?a.Db:0,st=a.Be?a.Db:0,ht=E.clientWidth||x+nt,pt=E.clientHeight||b+st,St=a.viewportBounds;E=St.x;var Mt=St.y,Gt=St.width,Xt=St.height;if((ht!==x+nt||pt!==b+st)&&(a.gf=!1,a.Be=!1,st=nt=0,a.Aa=ht,a.ya=pt,et=a.pn=!0,Ol(a)),!a.hf||!a.viewportBounds.w())return!0;var Qt=a.ku,ie=a.hu;if(a.Ee=!1,!(et||a.gf||a.Be||a.mn||a.nn))return!0;var Me=a.documentBounds,xe=0,Ne=0,Fe=0,De=0,_e=St.width,Ze=St.height,Ln=a.rj;a.contentAlignment.sb()?(Me.width>_e&&(xe=Ln.left,Ne=Ln.right),Me.height>Ze&&(Fe=Ln.top,De=Ln.bottom)):(xe=Ln.left,Ne=Ln.right,Fe=Ln.top,De=Ln.bottom);var _n=Me.width+xe+Ne,Bn=Me.height+Fe+De;Ln=a.scale;var wn=_n>ht/Ln,cn=Bn>pt/Ln;if(!(et||a.gf||a.Be||wn||cn))return!0;xe=Me.x-xe,ht=St.x,Ne=Me.right+Ne,pt=St.right+nt,Fe=Me.y-Fe;var br=St.y;Me=Me.bottom+De,St=St.bottom+st;var dr="1px";if(De="1px",a.scrollMode===$u&&(wn||cn)&&(wn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(wn=1,xe+1<ht&&(wn=Math.max((ht-xe)*Ln+a.Aa,wn)),Ne>pt+1&&(wn=Math.max((Ne-pt)*Ln+a.Aa,wn)),_e+nt+1<_n&&(wn=Math.max((_n-_e)*Ln+a.Aa,wn)),dr=wn.toString()+"px"),cn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(wn=1,Fe+1<br&&(wn=Math.max((br-Fe)*Ln+a.ya,wn)),Me>St+1&&(wn=Math.max((Me-St)*Ln+a.ya,wn)),Ze+st+1<Bn&&(wn=Math.max((Bn-Ze)*Ln+a.ya,wn)),De=wn.toString()+"px")),wn=dr!=="1px",cn=De!=="1px",wn&&cn||!wn&&!cn||(cn&&(pt-=a.Db),wn&&(St-=a.Db),_n<_e+nt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(nt=1,xe+1<ht&&(nt=Math.max((ht-xe)*Ln+a.Aa,nt)),Ne>pt+1&&(nt=Math.max((Ne-pt)*Ln+a.Aa,nt)),_e+1<_n&&(nt=Math.max((_n-_e)*Ln+a.Aa,nt)),dr=nt.toString()+"px"),wn=dr!=="1px",nt=a.ya,wn!==a.Be&&(nt=wn?a.ya-a.Db:a.ya+a.Db),Bn<Ze+st||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(st=1,Fe+1<br&&(st=Math.max((br-Fe)*Ln+nt,st)),Me>St+1&&(st=Math.max((Me-St)*Ln+nt,st)),Ze+1<Bn&&(st=Math.max((Bn-Ze)*Ln+nt,st)),De=st.toString()+"px"),cn=De!=="1px"),a.qr&&wn===a.Be&&cn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(wn!==a.Be&&(dr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),et=!0),a.Be=wn,ie.style.width=dr,cn!==a.gf&&(De==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),et=!0,a.tn&&(st=Le.alloc(),cn?(y.style.left=a.Db+"px",a.position=st.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=st.h(a.pa.x-a.Db/a.scale,a.pa.y)),Le.free(st))),et&&Ol(a),a.gf=cn,ie.style.height=De,a.gu=!0,et&&(a.pn=!0),y=Qt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_e+1<_n?y=(a.position.x-xe)*Ln:xe+1<ht?y=Qt.scrollWidth-Qt.clientWidth:Ne>pt+1&&(y=a.position.x*Ln)),a.tn)switch(a.bu){case"negative":y=-(Qt.scrollWidth-y-Qt.clientWidth);break;case"reverse":y=Qt.scrollWidth-y-Qt.clientWidth}return Qt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ze+1<Bn?Qt.scrollTop=(a.position.y-Fe)*Ln:Fe+1<br?Qt.scrollTop=Qt.scrollHeight-Qt.clientHeight:Me>St+1&&(Qt.scrollTop=a.position.y*Ln)),ht=a.Aa,pt=a.ya,Qt.style.width=ht+(a.gf?a.Db:0)+"px",Qt.style.height=pt+(a.Be?a.Db:0)+"px",x!==ht||b!==pt||a.animationManager.zb?(x=on.allocAt(E,Mt,Gt,Xt),a.onViewportBoundsChanged(x,a.viewportBounds,Ln,et),on.free(x),!1):!0}te=Xe.prototype,te.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&je("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&&je('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($i,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},te.oi=function(a){this.partManager.oi(a);var y=this;Oc(a,function(x){kc(y,x)}),(a instanceof Xr||a instanceof Pr&&a.placeholder!==null)&&a.v(),a.data!==null&&Oc(a,function(x){ly(y.partManager,x)}),xa(a)!==!0&&zh(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.$b()},te.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Oc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Bc(a,a.actualBounds)),this.$b()},te.remove=function(a){bp(this,a,!0)};function bp(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(vo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}te.Is=function(a,y){if(y===void 0&&(y=!1),Tn(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 vn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},te.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Xe.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=od(this)),this.toolManager!==null){var E=new Yn;if(a!==null)if(Tn(a))for(var et=0;et<a.length;et++)Xl(this,E,a[et],x,b);else for(a=a.iterator;a.next();)Xl(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Xl(this,E,a.value,x,b);for(a=this.nodes;a.next();)Xl(this,E,a.value,x,b);for(a=this.links;a.next();)Xl(this,E,a.value,x,b)}Fh(this,E,y,b,x)}};function Xl(a,y,x,b,E,et){if(!y.contains(x)&&(et===void 0&&(et=!1),!b||et||x.canMove()||x.canCopy()))if(E===void 0&&(E=od(a)),x instanceof Nn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Pr&&(x.placeholder!==null||E.dragsMembers))for(et=x.memberParts;et.next();)Xl(a,y,et.value,b,E,E.groupsAlwaysMove);for(et=x.linksConnected;et.next();){var nt=et.value;if(!y.contains(nt)){var st=nt.fromNode,ht=nt.toNode;st!==null&&y.contains(st)&&ht!==null&&y.contains(ht)&&Xl(a,y,nt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Xl(a,y,x.value,b,E)}else if(x instanceof Cn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Xl(a,y,x.value,b,E);else x instanceof Xr||y.add(x,a.Pd(E,x,x.location))}function Fh(a,y,x,b,E){if(y!==null&&y.count!==0){var et=Le.alloc(),nt=Le.alloc();nt.assign(x),isNaN(nt.x)&&(nt.x=0),isNaN(nt.y)&&(nt.y=0),(x=a.Mr)||sd(a,y);for(var st=On(),ht=On(),pt=y.iterator,St=Le.alloc();pt.next();){var Mt=pt.key,Gt=pt.value;if(Mt.Zc()){var Xt=Pp(a,Mt,y);Xt!==null?st.push(new rt(Mt,Gt,Xt)):(!E||Mt.canMove())&&(Xt=Gt.point,et.assign(Xt),a.computeMove(Mt,et.add(nt),b,St),Mt.location=St,Gt.shifted===void 0&&(Gt.shifted=new Le),Gt.shifted.assign(St.re(Xt)))}else pt.key instanceof Cn&&ht.push(pt.sa)}for(Le.free(St),E=st.length,pt=0;pt<E;pt++)Mt=st[pt],et.assign(Mt.info.point),Mt.Su.shifted===void 0&&(Mt.Su.shifted=new Le),Mt.node.location=et.add(Mt.Su.shifted);for(E=Le.alloc(),pt=Le.alloc(),Mt=ht.length,Gt=0;Gt<Mt;Gt++){var Qt=ht[Gt];if(Xt=Qt.key,Xt instanceof Cn)if(Xt.suspendsRouting){Xt.Tg=null,St=Xt.fromNode;var ie=Xt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ie=Qt.value.point,Xt.dragComputation===null)y.add(Xt,a.Pd(b,Xt,nt)),ah(Xt,nt.x-ie.x,nt.y-ie.y);else{Qt=Le.allocAt(0,0),(St=Xt.i(0))&&St.w()&&Qt.assign(St);var Me=St=Le.alloc().assign(Qt).add(nt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Me=Le.alloc(),ad(a,Xt,St,Me,b)),St.assign(Xt.dragComputation(Xt,St,Me)).re(Qt),y.add(Xt,a.Pd(b,Xt,St)),ah(Xt,St.x-ie.x,St.y-ie.y),Le.free(Qt),Le.free(St),Me!==St&&Le.free(Me)}else St!==null&&(E.assign(St.location),Me=y.I(St),Me!==null&&E.re(Me.point)),ie!==null&&(pt.assign(ie.location),Me=y.I(ie),Me!==null&&pt.re(Me.point)),St!==null&&ie!==null?E.Xa(pt)?(St=Qt.value.point,ie=et,ie.assign(E),ie.re(St),y.add(Xt,a.Pd(b,Xt,E)),ah(Xt,ie.x,ie.y)):(Xt.suspendsRouting=!1,Xt.bb()):(Qt=Qt.value.point,St=St!==null?E:ie!==null?pt:nt,y.add(Xt,a.Pd(b,Xt,St)),ah(Xt,St.x-Qt.x,St.y-Qt.y))}else(Xt.fromNode===null||Xt.toNode===null)&&(St=Qt.value.point,y.add(Xt,a.Pd(b,Xt,nt)),ah(Xt,nt.x-St.x,nt.y-St.y))}Le.free(et),Le.free(nt),Le.free(E),Le.free(pt),Fn(st),Fn(ht),x||(Ko(a),Dh(a,y))}}Xe.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Le),b.assign(y),a===null)return b;var E=y,et=x.isGridSnapEnabled;et&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Le.alloc(),ad(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var nt=a.minLocation,st=nt.x;isNaN(st)&&(st=et?Math.round(1e3*a.location.x)/1e3:a.location.x),nt=nt.y,isNaN(nt)&&(nt=et?Math.round(1e3*a.location.y)/1e3:a.location.y);var ht=a.maxLocation,pt=ht.x;return isNaN(pt)&&(pt=et?Math.round(1e3*a.location.x)/1e3:a.location.x),ht=ht.y,isNaN(ht)&&(ht=et?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(st,Math.min(x.x,pt)),Math.max(nt,Math.min(x.y,ht))),E!==y&&Le.free(E),b};function od(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function ad(a,y,x,b,E){if(E===void 0&&(E=od(a)),b.assign(x),y!==null){var et=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var nt=E.gridSnapOrigin,st=nt.x;if(nt=nt.y,E=E.gridSnapCellSpot,et!==null){var ht=et.gridCellSize;isNaN(a)&&(a=ht.width),isNaN(y)&&(y=ht.height),et=et.gridOrigin,isNaN(st)&&(st=et.x),isNaN(nt)&&(nt=et.y)}et=Le.allocAt(0,0),et.yi(0,0,a,y,E),Ge.No(x.x,x.y,st+et.x,nt+et.y,a,y,b),Le.free(et)}}function sd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Cn&&(y.suspendsRouting=!0)}function Dh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Cn&&(x.suspendsRouting=!1,X0(x)&&x.bb())}a.Mr=!1}}function Pp(a,y,x){return y=y.containingGroup,y!==null&&(a=Pp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}te=Xe.prototype,te.Pd=function(a,y,x){if(x===void 0)return new yu(Ti);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new yu(new Le(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new yu(x.copy())};function Cp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&je("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&je("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&je("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&je("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&&je("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}te.Al=function(a){Cp(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($i,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},te.Ww=function(a,y){Cp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(vo,"layers",this,a,null,b,null));var E=x.count,et;for(et=0;et<E;et++)if(x.M(et)===y){x.Gb(et,a);break}return this.cc!==null&&this.cb($i,"layers",this,null,a,null,et),this.N(),0>b&&this.Ya(),this},te.Cy=function(a,y){Cp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(vo,"layers",this,a,null,b,null));var E=x.count,et;for(et=0;et<E;et++)if(x.M(et)===y){x.Gb(et+1,a);break}return this.cc!==null&&this.cb($i,"layers",this,null,a,null,et+1),this.N(),0>b&&this.Ya(),this},te.kA=function(a){if(a.diagram!==this&&je("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(vo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},te.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},te.Yw=function(a){return this.pf===null&&(this.pf=new yn),this.pf.add(a),this.model.Pe(a),this},te.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},te.Pe=function(a){return this.zg===null&&(this.zg=new yn),this.zg.add(a),this},te.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},te.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==qa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},te.cb=function(a,y,x,b,E,et,nt){et===void 0&&(et=null),nt===void 0&&(nt=null);var st=new Ii;st.diagram=this,st.change=a,st.propertyName=y,st.object=x,st.oldValue=b,st.oldParam=et,st.newValue=E,st.newParam=nt,this.ds(st)},te.g=function(a,y,x,b,E){this.cb(Di,a,this,y,x,b,E)},Xe.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===Di){var E=a.object;if(Li(E,a.propertyName,a.I(y)),E instanceof ze){var et=E.part;et!==null&&et.Wb()}this.isModified=!0}else if(b===$i){var nt=a.object,st=a.newParam,ht=a.newValue;if(nt instanceof Sn)if(typeof st=="number"&&ht instanceof ze){y?nt.pc(st):nt.Gb(st,ht);var pt=nt.part;pt!==null&&pt.Wb()}else typeof st=="number"&&ht instanceof co&&(ht.isRow?c1(nt,st,y?void 0:ht):f1(nt,st,y?void 0:ht));else if(nt instanceof Oo){var St=a.oldParam===!0;typeof st=="number"&&ht instanceof qn&&(y?(ht.isSelected=!1,ht.isHighlighted=!1,ht.Wb(),nt.pc(St?st:-1,ht,St)):nt.oi(st,ht,St))}else nt instanceof Xe?typeof st=="number"&&ht instanceof Oo&&(y?this.Wa.mb(st):(ht.Xe(this),this.Wa.Gb(st,ht))):je("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===vo){var Mt=a.object,Gt=a.oldParam,Xt=a.oldValue;if(Mt instanceof Sn)typeof Gt=="number"&&Xt instanceof ze?y?Mt.Gb(Gt,Xt):Mt.pc(Gt):typeof Gt=="number"&&Xt instanceof co&&(Xt.isRow?c1(Mt,Gt,y?Xt:void 0):f1(Mt,Gt,y?Xt:void 0));else if(Mt instanceof Oo){var Qt=a.newParam===!0;typeof Gt=="number"&&Xt instanceof qn&&(y?0>Mt.Pa.indexOf(Xt)&&Mt.oi(Gt,Xt,Qt):(Xt.isSelected=!1,Xt.isHighlighted=!1,Xt.Wb(),Mt.pc(Qt?Gt:-1,Xt,Qt)))}else Mt instanceof Xe?typeof Gt=="number"&&Xt instanceof Oo&&(y?(Xt.Xe(this),this.Wa.Gb(Gt,Xt)):this.Wa.mb(Gt)):je("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==qa&&je("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Xe.prototype.Ea=function(a){return this.undoManager.Ea(a)},Xe.prototype.eb=function(a){return this.undoManager.eb(a)},Xe.prototype.Kf=function(){return this.undoManager.Kf()},Xe.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}},Xe.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Xe.prototype.rp=function(){this.partManager.rp()};function kp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ol(a),a.N(),a.Ee=!0,b.zb&&(gu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ol(a);else{a.vb=!0;var E=a.viewportBounds.copy(),et=a.Aa,nt=a.ya,st=a.zoomPoint.x,ht=a.zoomPoint.y,pt=a.contentAlignment;isNaN(st)&&(pt.$c()?pt.Hf(bs)?st=0:pt.Hf(Aa)&&(st=et-1):st=pt.sb()?pt.x*(et-1):et/2),isNaN(ht)&&(pt.$c()?pt.Hf(Ja)?ht=0:pt.Hf(Ps)&&(ht=nt-1):ht=pt.sb()?pt.y*(nt-1):nt/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),et=Le.allocAt(a.pa.x+st/y-st/x,a.pa.y+ht/y-ht/x),a.position=et,Le.free(et),a.Ca=x,Ol(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Gs(a,!1),b.zb&&(gu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Xe.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!==la||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Fi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Bg(E,this)),this.vb||this.invalidateViewport(a,y),jl(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(et){et.isAvoiding&&et.actualBounds.Yc(y)&&et.bb()})}};function jl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=kn.alloc(),E=1,et=1,nt=x.O.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht],St=Math.abs(pt.interval);2>St||(m0(pt.figure)?et=et*St/Ge.vx(et,St):E=E*St/Ge.vx(E,St))}if(nt=x.gridCellSize,b.h(et*nt.width,E*nt.height),y!==void 0)E=y.width,et=y.height,a=y.x,nt=y.y;else{if(y=on.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){on.free(y);return}E=y.width,et=y.height,a=y.x,nt=y.y,on.free(y)}x.width=E+2*b.width,x.height=et+2*b.height,y=Le.alloc(),Ge.No(a,nt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),kn.free(b),x.part.location=y,Le.free(y)}}Xe.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)}},Xe.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))},Xe.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Tn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof qn||je("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 qn||je("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Xe.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()}},te=Xe.prototype,te.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},te.Jz=function(a){a=new vn().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 qn||je("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},te.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,et=Le.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=et.h(x.x,E.y):y==="left"?this.position=et.h(E.x,x.y):y==="down"?this.position=et.h(x.x,E.bottom-x.height):y==="right"&&(this.position=et.h(E.right-x.width,x.y)),Le.free(et);return}je("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=et.h(x.x,x.y-E):y==="down"?this.position=et.h(x.x,x.y+E):y==="left"?this.position=et.h(x.x-E,x.y):y==="right"?this.position=et.h(x.x+E,x.y):je("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Le.free(et)},te.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)},te.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},te.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)},te.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,et=b+a.height,nt=y.m11,st=y.m12,ht=y.m21,pt=y.m22,St=y.dx,Mt=y.dy,Gt=x*nt+b*ht+St;y=x*st+b*pt+Mt;var Xt=E*nt+b*ht+St;return a=E*st+b*pt+Mt,b=x*nt+et*ht+St,x=x*st+et*pt+Mt,nt=E*nt+et*ht+St,E=E*st+et*pt+Mt,et=Math.min(Gt,Xt),Gt=Math.max(Gt,Xt),Xt=Math.min(y,a),y=Math.max(y,a),et=Math.min(et,b),Gt=Math.max(Gt,b),Xt=Math.min(Xt,x),y=Math.max(y,x),et=Math.min(et,nt),Gt=Math.max(Gt,nt),Xt=Math.min(Xt,E),y=Math.max(y,E),new on(et,Xt,Gt-et,y-Xt)},te.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),gr(a.copy(),this.Ab)};function tm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Ep(a){return a=dd.get(a),a!==null?new a:new li}Xe.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===qa&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(ht){return ht.diagram=E}),a.mouseMoveTools.each(function(ht){return ht.diagram=E}),a.mouseUpTools.each(function(ht){return ht.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===qa){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ko(this));var et=this.animationManager;b==="RolledBackTransaction"&&et.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||$f(et),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 nt=a.isTransactionFinished;if(nt&&(tm(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&nt&&this.lastInput.targetDiagram){this.Rt=!0;var st=this;fr(function(){st.currentTool.standardMouseOver(),st.Rt=!1},10)}}}finally{this.aa=!0}}}};function kc(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Bh(a,y[b])}function Bh(a,y){if(y instanceof Ia){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof vn&&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 Mp(a,y){if(y instanceof Ia){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 et=0;et<E.length;et++)if(E[et]===y){E.splice(et,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 vn&&x.Bg.remove(a),Ed(b));break}}}}}Xe.prototype.Wd=function(){this.partManager.Wd()},Xe.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Xe.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Xe.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Xe.prototype.Vb=function(a){return this.partManager.Vb(a)},Xe.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},te=Xe.prototype,te.Lc=function(a){return this.partManager.Lc(a)},te.ii=function(a){return this.partManager.ii(a)},te.Kc=function(a){return this.partManager.Kc(a)},te.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:Rn(Vn(y)))},te.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:Rn(Vn(y)))};function Ol(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Tp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Gs(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}te.Va=function(){if(this.Zi){var a=on.alloc();Tp(this,this.computeBounds(a)),on.free(a)}},te.rz=function(){for(var a=new vn,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},te.qz=function(){return this.ai.iterator},te.Uz=function(a){Ko(this),a&&ld(this,!0),this.ld?Lp(this,!1):(this.Jk=!0,Ms(this))};function ld(a,y){for(var x=a.ai.iterator;x.next();)em(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function em(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)em(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Lp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,et=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!et.defaultAnimation.isAnimating&&!et.zb&&(y||Vl(et,"Layout")),a.xh=!1;for(var nt=a.ai.iterator;nt.next();)Ap(a,nt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Ko(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||$f(et),a.aa=x}}}function Ap(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Ap(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),pf(a,y),E.isValidLayout=!0):a.xh=!0)}}te.yz=function(){for(var a=new yn,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 et=E.toLowerCase(),nt=new yn;x.add(E,nt),x.add(et,nt),b.add(E,E),b.add(et,E)}var x=new Yn,b=new Yn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function ud(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;je("Unknown DiagramEvent name: "+y)}te.Bj=function(a,y){return a=ud(this,a),a!==null&&a.add(y),this},te.am=function(a,y){a=ud(this,a),a!==null&&a.remove(y)},te.R=function(a,y,x){var b=ud(this,a),E=new Bu;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 hd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}te.Yj=function(a,y){return cd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Xe.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?gp(this,a):a.assign(this.documentBounds)};function cd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new og(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=on.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var et=a.nodes;et.next();){var nt=et.value,st=nt.layer;st!==null&&st.visible&&!st.isTemporary&&fd(a,nt,b,y)}on.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=on.alloc(),et=x.memberParts;et.next();)nt=et.value,nt instanceof Nn&&fd(a,nt,b,y);on.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 fd(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,et=y.y;if(jd(a,E,et))for(x=(et-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((et+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(et=a.ac[E],et.fill)et.fill(lh,x,y+1);else for(var nt=x;nt<=y;nt++)et[nt]=lh}else if(y instanceof Pr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Nn&&fd(a,E,x,b)}}function Qu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Xe.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Np(this)};function Np(a){a.vk===-1&&(a.vk=fr(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=on.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Tp(a,y),on.free(y),a.Fc=!0,a.bd(),Np(a))}},a.vp))}Xe.prototype.ug=function(){this.vk!==-1&&(an.clearTimeout(this.vk),this.vk=-1)},Xe.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=on.allocAt(0,0,b.width*E,b.height*E);var et=Le.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var nt=Math.max(this.scrollHorizontalLineChange,1);nt|=0,et.x-=nt,a.x<b.x+x.left/2&&(et.x-=nt),a.x<b.x+x.left/4&&(et.x-=4*nt)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(nt=Math.max(this.scrollHorizontalLineChange,1),nt|=0,et.x+=nt,a.x>b.x+b.width-x.right/2&&(et.x+=nt),a.x>b.x+b.width-x.right/4&&(et.x+=4*nt));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(nt=Math.max(this.scrollVerticalLineChange,1),nt|=0,et.y-=nt,a.y<b.y+x.top/2&&(et.y-=nt),a.y<b.y+x.top/4&&(et.y-=4*nt)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(nt=Math.max(this.scrollVerticalLineChange,1),nt|=0,et.y+=nt,a.y>b.y+b.height-x.bottom/2&&(et.y+=nt),a.y>b.y+b.height-x.bottom/4&&(et.y+=4*nt)),et.Xa(Ti)||(y=new Le(y.x+et.x/E,y.y+et.y/E)),on.free(b),Le.free(et),y},te=Xe.prototype,te.Cs=function(){return null},te.av=function(){return null},te.bs=function(a,y){this.pj.add(a,y)},te.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Pr&&(y.$p=null)})};function gf(a,y,x){function b(){var St=+new Date;for(et=!0,nt.reset();nt.next();)if(!nt.value[0].al){et=!1;break}et||St-pt>ht?y(x,E,st):an.requestAnimationFrame(b)}for(var E=x.callback,et=!0,nt=a.Og.iterator;nt.next();)if(!nt.value[0].al){et=!1;break}if(typeof E!="function"||et)return y(x,E,a);var st=a,ht=x.callbackTimeout||300,pt=+new Date;return an.requestAnimationFrame(function(){b()}),null}te.Wz=function(a){return Wi?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},te.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},te.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 Tc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Tc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&je('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"&&je("properties argument must be an Object.");var E=y.size||null,et=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(et="NaN");var nt=y.maxSize;y.maxSize===void 0&&(nt=x==="SVG"?new kn(1/0,1/0):new kn(2e3,2e3));var st=y.position||null,ht=y.parts||null,pt=y.padding===void 0?1:y.padding,St=y.background||null,Mt=y.omitTemporary;Mt===void 0&&(Mt=!0);var Gt=y.document||document,Xt=y.elementFinished||null,Qt=y.showTemporary;Qt===void 0&&(Qt=!Mt),y=y.showGrid,y===void 0&&(y=Qt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pt=="number"?pt=new Dr(pt):pt instanceof Dr||je("MakeImage padding must be a Margin or a number."),pt.left=Math.max(pt.left,0),pt.right=Math.max(pt.right,0),pt.top=Math.max(pt.top,0),pt.bottom=Math.max(pt.bottom,0),a.ib.Vc(!0),Mt=new Ws(null,Gt,void 0,!0);var ie=Mt.context;if(!(E||et||ht||st))return Mt.width=a.Aa+Math.ceil(pt.left+pt.right),Mt.height=a.ya+Math.ceil(pt.top+pt.bottom),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=Gt,b.hs=Xt,id(a,b.context,pt,new kn(Mt.width,Mt.height),a.Ca,a.pa,ht,St,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new kn(Mt.width,Mt.height),a.Ca,a.pa,ht,St,Qt,y),a.Xm=!0,Mt.context);var Me=a.Pp,xe=a.documentBounds.copy();if(xe.Fv(a.yb),Qt)for(var Ne=a.Wa.s,Fe=Ne.length,De=0;De<Fe;De++){var _e=Ne[De];if(_e.visible&&_e.isTemporary){_e=_e.Pa.s;for(var Ze=_e.length,Ln=0;Ln<Ze;Ln++){var _n=_e[Ln];_n.isInDocumentBounds&&_n.isVisible()&&(_n=_n.actualBounds,_n.w()&&xe.ed(_n))}}}if(Ne=new Le(xe.x,xe.y),ht!==null){for(Fe=new on(0,0,0,0),De=!0,_e=ht.iterator,_e.reset();_e.next();)Ze=_e.value,Ze instanceof qn&&(Ln=Ze.layer,Ln!==null&&!Ln.visible||Ln!==null&&!Qt&&Ln.isTemporary||!Ze.isVisible()||(Ze=Ze.actualBounds,Ze.w()&&(De?(De=!1,Fe.assign(Ze)):Fe.ed(Ze))));xe.width=Fe.width,xe.height=Fe.height,Ne.x=Fe.x,Ne.y=Fe.y}return st!==null&&st.w()&&(Ne=st,et||(et=Me)),Fe=st=0,pt!==null&&(st=pt.left+pt.right,Fe=pt.top+pt.bottom),De=_e=0,E!==null&&(_e=E.width,De=E.height,isFinite(_e)&&(_e=Math.max(0,_e-st)),isFinite(De)&&(De=Math.max(0,De-Fe))),E!==null&&et!==null?(et==="NaN"&&(et=Me),E.w()?(E=_e,xe=De):isNaN(De)?(E=_e,xe=xe.height*et):(E=xe.width*et,xe=De)):E!==null?E.w()?(et=Math.min(_e/xe.width,De/xe.height),E=_e,xe=De):isNaN(De)?(et=_e/xe.width,E=_e,xe=xe.height*et):(et=De/xe.height,E=xe.width*et,xe=De):et!==null?et==="NaN"&&nt.w()?(et=Math.min((nt.width-st)/xe.width,(nt.height-Fe)/xe.height),et>Me?(et=Me,E=xe.width,xe=xe.height):(E=nt.width,xe=nt.height)):(E=xe.width*et,xe=xe.height*et):(et=Me,E=xe.width,xe=xe.height),pt!==null?(E+=st,xe+=Fe):pt=new Dr(0),nt!==null&&(Me=nt.width,nt=nt.height,isNaN(Me)&&(Me=2e3),isNaN(nt)&&(nt=2e3),isFinite(Me)&&(E=Math.min(E,Me)),isFinite(nt)&&(xe=Math.min(xe,nt))),Mt.width=Math.ceil(E),Mt.height=Math.ceil(xe),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=Gt,b.hs=Xt,id(a,b.context,pt,new kn(Math.ceil(E),Math.ceil(xe)),et,Ne,ht,St,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new kn(Math.ceil(E),Math.ceil(xe)),et,Ne,ht,St,Qt,y),a.Xm=!0,Mt.context)}hn.Object.defineProperties(Xe.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Ot||(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 Fl(this,an.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 Fl(this,an.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(an,"resize",this.Ov,!1),this.removeEventListener(an,"wheel",this.$j,!0),Kl===this&&(Kl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),dp(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)&&An(a,"0 <= value <= 1",Xe,"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),Gs(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),Gs(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),Gs(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),Gs(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&An(a,">= 0",Xe,"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&&An(a,">= 0",Xe,"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 An(a,">= 0",Xe,"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||tm(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&&je("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=fp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Vl(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(et){return y.ik(et)}),y.ik(this.Oc)),this.cc=a,this.partManager=Ep(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(et){return a.Pe(et)}),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(an,"pointermove",this.dk,!0),this.addEventListener(an,"pointerdown",this.ui,!0),this.addEventListener(an,"pointerup",this.fk,!0),this.addEventListener(an,"pointerout",this.ek,!0),this.addEventListener(an,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(an,"wheel",this.$j,!0),this.addEventListener(an,"selectstart",this.preventDefault,!1)):(this.removeEventListener(an,"pointermove",this.dk,!0),this.removeEventListener(an,"pointerdown",this.ui,!0),this.removeEventListener(an,"pointerup",this.fk,!0),this.removeEventListener(an,"pointerout",this.ek,!0),this.removeEventListener(an,"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(an,"wheel",this.$j,!0),this.removeEventListener(an,"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=Le.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()?Ol(this):(this.vb=!0,a=this.scale,mp(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)}Le.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!==Sn.Grid&&je("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),jl(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),Ol(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||je("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 Dr(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===$u&&Gs(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,Gs(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,kp(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&&kp(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!==la&&Gs(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()||je("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()||je("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)):An(a,"> 0",Xe,"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)):An(a,"> 0",Xe,"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),Gs(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 Dr(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&&je("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();)Yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==qu&&a!==uo&&a!==pd&&je("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 kn(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 Dr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),hn.Object.defineProperties(Xe,{licenseKey:{get:function(){return Ip.jc()},set:function(a){Ip.add(a.replace(/\s/g,""))}},version:{get:function(){return Mc}}}),Xe.prototype.makeImageData=Xe.prototype.Jx,Xe.prototype.makeImage=Xe.prototype.Wz,Xe.prototype.cacheGroupExternalLinks=Xe.prototype.Fu,Xe.prototype.addRenderer=Xe.prototype.bs,Xe.prototype.makeSVG=Xe.prototype.av,Xe.prototype.makeSvg=Xe.prototype.Cs,Xe.prototype.stopAutoScroll=Xe.prototype.ug,Xe.prototype.doAutoScroll=Xe.prototype.gs,Xe.prototype.isUnoccupied=Xe.prototype.Yj,Xe.prototype.raiseDiagramEvent=Xe.prototype.R,Xe.prototype.removeDiagramListener=Xe.prototype.am,Xe.prototype.addDiagramListener=Xe.prototype.Bj,Xe.prototype.findTreeRoots=Xe.prototype.yz,Xe.prototype.layoutDiagram=Xe.prototype.Uz,Xe.prototype.findTopLevelGroups=Xe.prototype.qz,Xe.prototype.findTopLevelNodesAndLinks=Xe.prototype.rz,Xe.prototype.ensureBounds=Xe.prototype.Va,Xe.prototype.findLinksByExample=Xe.prototype.ls,Xe.prototype.findNodesByExample=Xe.prototype.ms,Xe.prototype.findLinkForData=Xe.prototype.Kc,Xe.prototype.findNodeForData=Xe.prototype.ii,Xe.prototype.findPartForData=Xe.prototype.Lc,Xe.prototype.findLinkForKey=Xe.prototype.findLinkForKey,Xe.prototype.findNodeForKey=Xe.prototype.Vb,Xe.prototype.findPartForKey=Xe.prototype.findPartForKey,Xe.prototype.rebuildParts=Xe.prototype.Wd,Xe.prototype.transformViewToDoc=Xe.prototype.Ps,Xe.prototype.transformRectDocToView=Xe.prototype.zA,Xe.prototype.transformDocToView=Xe.prototype.op,Xe.prototype.centerRect=Xe.prototype.es,Xe.prototype.scrollToRect=Xe.prototype.tv,Xe.prototype.scroll=Xe.prototype.scroll,Xe.prototype.highlightCollection=Xe.prototype.Jz,Xe.prototype.highlight=Xe.prototype.Iz,Xe.prototype.selectCollection=Xe.prototype.rA,Xe.prototype.select=Xe.prototype.select,Xe.prototype.updateAllRelationshipsFromData=Xe.prototype.rp,Xe.prototype.updateAllTargetBindings=Xe.prototype.updateAllTargetBindings,Xe.prototype.commit=Xe.prototype.commit,Xe.prototype.rollbackTransaction=Xe.prototype.Kf,Xe.prototype.commitTransaction=Xe.prototype.eb,Xe.prototype.startTransaction=Xe.prototype.Ea,Xe.prototype.raiseChanged=Xe.prototype.g,Xe.prototype.raiseChangedEvent=Xe.prototype.cb,Xe.prototype.removeChangedListener=Xe.prototype.ik,Xe.prototype.addChangedListener=Xe.prototype.Pe,Xe.prototype.removeModelChangedListener=Xe.prototype.mA,Xe.prototype.addModelChangedListener=Xe.prototype.Yw,Xe.prototype.findLayer=Xe.prototype.Qj,Xe.prototype.removeLayer=Xe.prototype.kA,Xe.prototype.addLayerAfter=Xe.prototype.Cy,Xe.prototype.addLayerBefore=Xe.prototype.Ww,Xe.prototype.addLayer=Xe.prototype.Al,Xe.prototype.moveParts=Xe.prototype.moveParts,Xe.prototype.copyParts=Xe.prototype.Kj,Xe.prototype.removeParts=Xe.prototype.Is,Xe.prototype.remove=Xe.prototype.remove,Xe.prototype.add=Xe.prototype.add,Xe.prototype.clearDelayedGeometries=Xe.prototype.bx,Xe.prototype.setProperties=Xe.prototype.nm,Xe.prototype.attach=Xe.prototype.Du,Xe.prototype.set=Xe.prototype.set,Xe.prototype.resetInputOptions=Xe.prototype.Sx,Xe.prototype.setInputOption=Xe.prototype.sA,Xe.prototype.getInputOption=Xe.prototype.Ql,Xe.prototype.resetRenderingHints=Xe.prototype.Tx,Xe.prototype.setRenderingHint=Xe.prototype.Xx,Xe.prototype.getRenderingHint=Xe.prototype.Gf,Xe.prototype.maybeUpdate=Xe.prototype.bd,Xe.prototype.requestUpdate=Xe.prototype.$b,Xe.prototype.delayInitialization=Xe.prototype.Xy,Xe.prototype.isUpdateRequested=Xe.prototype.Pz,Xe.prototype.invalidateDocumentBounds=Xe.prototype.Ya,Xe.prototype.findObjectsNear=Xe.prototype.og,Xe.prototype.findPartsNear=Xe.prototype.mz,Xe.prototype.findObjectsIn=Xe.prototype.Cf,Xe.prototype.findPartsIn=Xe.prototype.ux,Xe.prototype.findObjectsAt=Xe.prototype.ji,Xe.prototype.findPartsAt=Xe.prototype.lz,Xe.prototype.findObjectAt=Xe.prototype.ic,Xe.prototype.findPartAt=Xe.prototype.Ol,Xe.prototype.focusObject=Xe.prototype.zz,Xe.prototype.alignDocument=Xe.prototype.Jy,Xe.prototype.zoomToRect=Xe.prototype.BA,Xe.prototype.zoomToFit=Xe.prototype.zoomToFit,Xe.prototype.diagramScroll=Xe.prototype.kx,Xe.prototype.focus=Xe.prototype.focus;var dd=new Yn,om=null,Wi=an.document!==void 0,Ec=null,Ih="",la=new Je(Xe,"None",0),ds=new Je(Xe,"Uniform",1),Rh=new Je(Xe,"UniformToFill",2),mf=new Je(Xe,"CycleAll",10),jp=new Je(Xe,"CycleNotDirected",11),Op=new Je(Xe,"CycleNotDirectedFast",12),Fp=new Je(Xe,"CycleNotUndirected",13),Dp=new Je(Xe,"CycleDestinationTree",14),Bp=new Je(Xe,"CycleSourceTree",15),$u=new Je(Xe,"DocumentScroll",1),vf=new Je(Xe,"InfiniteScroll",2),qu=new Je(Xe,"TreeParentCollapsed",21),uo=new Je(Xe,"AllParentsCollapsed",22),pd=new Je(Xe,"AnyParentsCollapsed",23),Ip=new yn,Mc="2.3.10",Tc="image",yf=null,am=!1;function $o(){if(Wi){var a=an.document.createElement("canvas"),y=a.getContext("2d"),x=Gn("7ca11abfd022028846");y[x]=Gn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",mn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Sr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ge.za],E=1;5>E;E++)y[Gn("7ca11abfd7330390")](Gn(b[E-1]),10,15*E);for(y[x]=Gn("39f046ebb36e4b"),x=1;5>x;x++)y[Gn("7ca11abfd7330390")](Gn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Sr.prototype.Cd=Sr.prototype.Eu),yf=a}}Xe.className="Diagram",Xe.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=an.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Xe?y.H:null},Xe.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},Xe.useDOM=function(a){Wi=a?an.document!==void 0:!1},Xe.isUsingDOM=function(){return Wi},Xe.None=la,Xe.Uniform=ds,Xe.UniformToFill=Rh,Xe.CycleAll=mf,Xe.CycleNotDirected=jp,Xe.CycleNotDirectedFast=Op,Xe.CycleNotUndirected=Fp,Xe.CycleDestinationTree=Dp,Xe.CycleSourceTree=Bp,Xe.DocumentScroll=$u,Xe.InfiniteScroll=vf,Xe.TreeParentCollapsed=qu,Xe.AllParentsCollapsed=uo,Xe.AnyParentsCollapsed=pd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Lc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=an[Gn("76a715b2f73f148a")][Gn("72ba13b5")]||"";if(a.Rc=!0,Wi){var b=Xe[Gn("76a115b6ed251eaf4692")];if(b)for(var E=Ip.iterator;E.next()&&(b=E.value,b=Gn(b).split(Gn("39e9")),!(6>b.length));){var et=Gn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var nt=Gn(mn[Gn("6cae19")]).split(".");if(et[0]>nt[0]||et[0]===nt[0]&&et[1]>=nt[1]){var st=an[Gn("74a900bae4370f8b51")][Gn("6fbb13a1c2311e8a57")].toLowerCase();if(nt=st[Gn("73a612b6fb191d")](Gn("3aad1ab6e022098b4dc4")),et=Gn(b[2]),-1<nt&&(st=st[Gn("73a612b6fb191d")](et.toLowerCase()+"/"),a.Rc=!(-1<st&&st<nt),!a.Rc))break;for(nt=x[Gn("76ad18b4f73e")],st=x[Gn("73a612b6fb191d")](Gn("35e7"))+2;st<nt;st++)y+=x[st];if(nt=y[Gn("73a612b6fb191d")](et),0>nt&&et!==Gn("7da71ca0ad381e90")&&(nt=y[Gn("73a612b6fb191d")](Gn("76a715b2ef3e149757"))),0>nt&&(nt=y[Gn("73a612b6fb191d")](Gn("76a715b2ef3e149757"))),0>nt&&(nt=y[Gn("73a612b6fb191d")](Gn("2bfa41fdb3784bca12"))),0>nt&&(nt=x[Gn("73a612b6fb191d")](Gn("7baa19a6f76c1988428554"))),a.Rc=!(0<=nt&&nt<y[Gn("73a612b6fb191d")](Gn("35"))||y[Gn("73a612b6fb191d")](Gn("35"))===-1),!a.Rc||x[Gn("73a612b6fb191d")](Gn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Gn("73a612b6fb191d")](et)),!a.Rc)||(nt=an[Gn("76a715b2f73f148a")][Gn("69ad17a1e03e")],st=nt[Gn("73a612b6fb191d")](Gn("7fb002b6ed25128b4da25b2e")),-1<st&&(a.Rc=!(nt[Gn("73a612b6fb191d")](et)>st),!a.Rc)))break;if(et[0]==="#"){nt=an.document.createElement("div");for(var ht=b[0].replace(/[A-Za-z]/g,"");4>ht.length;)ht+="9";if(st=ht,ht=ht.substr(ht.length-4),b="",b+=["gsh","gsf"][parseInt(ht.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(ht.substr(0,1),10)%4],nt[Gn("79a417a0f0181a8946")]=b,an.document[Gn("78a712aa")]){an.document[Gn("78a712aa")][Gn("7bb806b6ed32388c4a875b")](nt),ht=an.getComputedStyle(nt).getPropertyValue(Gn("78a704b7e62456904c9b12701b6532a8"));var pt=an.getComputedStyle(nt).getPropertyValue(Gn("75b817b0ea2202"));if(an.document[Gn("78a712aa")][Gn("68ad1bbcf533388c4a875b")](nt),ht){if(nt=an[Gn("77a902b0eb1b1e804a8a")],pt==="0."+parseInt(st,10)%100||ht.indexOf(parseInt(et[1]+et[2],16))!==-1&&ht.indexOf(parseInt(et[3]+et[4],16))!==-1){a.Rc=!1;break}else if(nt&&nt(Gn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,et=0;et<document.styleSheets.length;et++){nt=document.styleSheets[et].rules||document.styleSheets[et].cssRules;for(var St in nt)if(b===nt[St].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(St=x[Gn("76ad18b4f73e")],E=x[Gn("73a612b6fb191d")](Gn("35e7"))+2;E<St;E++)y+=x[E];x=y[Gn("73a612b6fb191d")](Gn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Gn("73a612b6fb191d")](Gn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function yu(a){this.j=a===void 0?new Le:a,this.o=new Le}hn.Object.defineProperties(yu.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 Sf="DraggingInfo";yu.className="DraggingInfo";function rt(a,y,x){this.node=a,this.info=y,this.Su=x}rt.className="DraggingNodeInfoPair";function ct(){this.reset()}ct.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new kn(NaN,NaN).freeze(),this.gridSnapCellSpot=qr,this.gridSnapOrigin=new Le(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ct.className="DraggingOptions";function Et(a,y){if(typeof a=="string"||an.Element&&a instanceof Element)var x=Xe.call(this,a)||this;else x=Xe.call(this)||this,y=a;return Pt(x),y&&x.nm(y),x}Ye(Et,Xe);function Pt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=ai,a.layout=new _o}Et.prototype.reset=function(){Xe.prototype.reset.call(this),Pt(this)},Et.className="Palette";function Ot(a,y){if(typeof a=="string"||an.Element&&a instanceof Element)var x=Xe.call(this,a)||this;else x=Xe.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 qn;var E=new Tr;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 Dr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Te,x.toolManager.mouseMoveTools),x.click=function(){var et=b.observed;if(et!==null){var nt=et.viewportBounds,st=b.lastInput.documentPoint;et.position=new Le(st.x-nt.width/2,st.y-nt.height/2)}},x.Pf=function(){b.Ya(),ge(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&&ge(b)},x.autoScale=ds,x.vb=!1,y&&Object.assign(x,y),x}Ye(Ot,Xe),Ot.prototype.computePixelRatio=function(){return 1},Ot.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(Pc(this),this.ql===null){var x=new Ws(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),$t(this)}finally{this.ta=a,this.ib=y}}}Xe.prototype.redraw.call(this)},Ot.prototype.gc=function(){if(this.Ka===null&&je("No div specified"),this.ta===null&&je("No canvas specified"),!(this.ta instanceof Fl)&&(B0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Pc(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?$t(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 $t(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=on.alloc().assign(a.viewportBounds).ed(y.viewportBounds),jl(y,E),on.free(E),Ko(y));var et=a.Ab;et.reset(),a.scale!==1&&et.scale(a.scale),a.position.x===0&&a.position.y===0||et.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),E.yc(),y=y.Wa.s,et=y.length;for(var nt=0;nt<et;nt++){var st=y[nt],ht=a;if(st.visible&&st.opacity!==0){var pt=st.diagram.grid.part;if(!x&&st.isTemporary)b&&pt.layer===st&&(st=vu(st,E),pt.gc(E,ht),E.globalAlpha=st);else{for(var St=vu(st,E),Mt=ht.scale,Gt=on.alloc(),Xt=st.Pa.s,Qt=Xt.length,ie=0;ie<Qt;ie++){var Me=Xt[ie];(b||Me!==pt)&&st.Oj(E,Me,ht,null,Mt,Gt,!1)}on.free(Gt),E.globalAlpha=St}}}}}function ge(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=kn.alloc();E.h(x.width,x.height),b.desiredSize=E,kn.free(E),a=2/a.scale,b instanceof Tr&&(b.strokeWidth=a),y.location=new Le(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ot.prototype.computeBounds=function(){var a=this.observed;if(a===null)return dl;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Ot.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Ot.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),ge(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))},hn.Object.defineProperties(Ot.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ot&&je("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),ge(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),ge(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)}}}),Ot.className="Overview";function Te(){_i.call(this),this.j=null}Ye(Te,_i),Te.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 Le(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Le(a.x-this.j.x,a.y-this.j.y)),!0)},Te.prototype.doActivate=function(){this.j=null,_i.prototype.doActivate.call(this)},Te.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Te.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 Le(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Le(a.x-this.j.x,a.y-this.j.y)}}},Te.className="OverviewDraggingTool";function Ee(){ii(this),this.H=Kl,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=dl,this.hb=!0,this.cg=null,this.ob=200}Ee.prototype.toString=function(){return"CommandHandler"},Ee.prototype.Xe=function(a){this.H=a},Ee.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ei?y.meta:y.control,b=y.shift,E=y.alt,et=y.key;!x||et!=="C"&&et!=="Insert"?x&&et==="X"||b&&et==="Del"?this.canCutSelection()&&this.cutSelection():x&&et==="V"||b&&et==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&et==="Y"||E&&b&&et==="Backspace"?this.canRedo()&&this.redo():x&&et==="Z"||E&&et==="Backspace"?this.canUndo()&&this.undo():et==="Del"||et==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&et==="A"?this.canSelectAll()&&this.selectAll():et==="Esc"?this.canStopCommand()&&this.stopCommand():et==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):et==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):et==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):et==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):et==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):et==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):et==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):et==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):et===" "?this.canScrollToPart()&&this.scrollToPart():et==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():et==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&et==="0"?this.canResetZoom()&&this.resetZoom():b&&et==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&et==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&et==="G"?this.canUngroupSelection()&&this.ungroupSelection():et==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():et==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Ee.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ee.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Fi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ee.prototype.canStopCommand=function(){return!0},Ee.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=""}},Ee.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ee.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 vn,x=a.selection.iterator;x.next();)Uh(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=""}},Ee.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ee.prototype.copySelection=function(){var a=this.diagram,y=new vn;for(a=a.selection.iterator;a.next();)Uh(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Ee.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ee.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ee.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ee.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ec=null,Ih="";else{x=y.model;var b=!1,E=!1,et=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),et=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new yn,x.addAll(et),Ec=x,Ih=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ee.prototype.pasteFromClipboard=function(){var a=new vn,y=Ec;if(y===null)return a;var x=this.diagram;if(Ih!==x.model.dataFormat)return a;var b=x.model,E=!1,et=!1,nt=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(et=b.Ij,b.Ij=this.copiesGroupKey),nt=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=et),y=nt.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},Ee.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 et=this.computeEffectiveCollection(y.selection,y.Wm);Fh(y,et,new Le(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=""}},Ee.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ec===null||Ec.count===0||Ih!==a.model.dataFormat)},Ee.prototype.undo=function(){this.diagram.undoManager.undo()},Ee.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ee.prototype.redo=function(){this.diagram.undoManager.redo()},Ee.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ee.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===la&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ee.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==la?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ee.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===la&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ee.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==la?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ee.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ee.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ee.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Vl(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=dl):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),$f(y)},Ee.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ee.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(ht){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;Vl(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Be(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var et=function(){y.Ea();for(var ht=E.pop();0<E.length&&ht instanceof Nn&&ht.isTreeExpanded&&(!(ht instanceof Pr)||ht.isSubGraphExpanded);)ht=E.pop();0<E.length?(ht instanceof qn&&y.tv(ht.actualBounds),ht instanceof Nn&&!ht.isTreeExpanded&&(ht.isTreeExpanded=!0),ht instanceof Pr&&!ht.isSubGraphExpanded&&(ht.isSubGraphExpanded=!0)):(ht instanceof qn&&y.es(ht.actualBounds),y.am("LayoutCompleted",nt)),y.eb("Scroll To Part")},nt=function(){fr(et,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",nt),et()}}else{var st=y.position.copy();y.es(a.actualBounds),st.Xa(y.position)&&x.Cc()}}};function Be(a,y,x){if(y.isVisible())return x;if(y instanceof Xr)Be(a,y.adornedPart,x);else if(y instanceof Cn){var b=y.fromNode;b!==null&&Be(a,b,x),y=y.toNode,y!==null&&Be(a,y,x)}else y instanceof Nn&&(b=y.labeledLink,b!==null&&Be(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Be(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Be(a,y,x));return x}Ee.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof qn)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ee.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Vl(y.animationManager,"Collapse Tree");var x=new yn;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 Nn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ee.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Nn&&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 Nn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ee.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Vl(y.animationManager,"Expand Tree");var x=new yn;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 Nn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ee.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Nn)||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 Nn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ee.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 yn,et=a.selection.iterator;et.next();){var nt=et.value;nt.Zc()&&nt.canGroup()&&E.add(nt)}for(var st=new yn,ht=E.iterator;ht.next();){var pt=ht.value;et=!1;for(var St=E.iterator;St.next();)if(pt.Td(St.value)){et=!0;break}et||st.add(pt)}if(0<st.count){var Mt=st.first().containingGroup;if(Mt!==null)for(;Mt!==null;){E=!1;for(var Gt=st.iterator;Gt.next();)if(!Gt.value.Td(Mt)){E=!0;break}if(E)Mt=Mt.containingGroup;else break}if(x instanceof Pr)Hs(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Xt=y.copyNodeData(x);$e(Xt)&&(y.xf(Xt),b=a.ii(Xt))}if(b!==null){Mt!==null&&this.isValidMember(Mt,b)&&(b.containingGroup=Mt);for(var Qt=st.iterator;Qt.next();){var ie=Qt.value;this.isValidMember(b,ie)&&(ie.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Ee.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 en(a){var y=On();for(a=a.iterator;a.next();){var x=a.value;x instanceof Cn||y.push(x)}a=new vn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],et=!0,nt=0;nt<x;nt++)if(E.Td(y[nt])){et=!1;break}et&&a.add(E)}return Fn(y),a}Ee.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Cn)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},Ee.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 yn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var et=E.value;et instanceof Pr&&et.canUngroup()&&b.add(et)}var nt=new yn;if(0<b.count){y.clearSelection(!0);for(var st=b.iterator;st.next();){var ht=st.value;ht.expandSubGraph();var pt=ht.containingGroup,St=pt!==null&&pt.data!==null?x.wa(pt.data):void 0;nt.addAll(ht.memberParts);for(var Mt=nt.iterator;Mt.next();){var Gt=Mt.value;if(Gt.isSelected=!0,!(Gt instanceof Cn)){var Xt=Gt.data;Xt!==null?x.mp(Xt,St):Gt.containingGroup=pt}}y.remove(ht)}}y.R("SelectionUngrouped",b,nt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Ee.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 Pr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&y.canUngroup())return!0;return!1},Ee.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=en(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Ee.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Vl(y.animationManager,"Collapse SubGraph");var x=new yn;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 Pr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ee.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Pr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&y.isSubGraphExpanded)return!0;return!1},Ee.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Vl(y.animationManager,"Expand SubGraph");var x=new yn;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 Pr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ee.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Pr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Pr&&!y.isSubGraphExpanded)return!0;return!1},Ee.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(et){return et instanceof yi&&et.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Ee.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 yi))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 yi&&x.editable}),a!==null))return!0;return!1},Ee.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 ze?E=a.ga(Fr):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Le(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,pu(x,!1,a)}},Ee.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)},Ee.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 Yn,a===null)return b;for(var et=a.iterator;et.next();)Xl(x,b,et.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(et=a.iterator;et.next();)a=et.value,a instanceof Cn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},hn.Object.defineProperties(Ee.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||je("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}}}),Ee.className="CommandHandler",Xg=function(){return new Ee};function ze(){ii(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Le(NaN,NaN).freeze(),this.jd=Bo,this.Ab=new Sr,this.wh=new Sr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=us,this.uc=new on(NaN,NaN,NaN,NaN).freeze(),this.Ib=new on(NaN,NaN,NaN,NaN).freeze(),this.dc=new on(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=jo,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 gn,fn,Un,Jn,ar,Cr,Gr,Nr,Hr,ci;ze.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=Xn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ze.prototype.Vw=function(a){var y=this.Dh;if(Tn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ze.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ze.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},ze.prototype.copy=function(){return this.clone()},te=ze.prototype,te.qb=function(a){a.classType===Cn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:je("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ze&&(this.stretch=a)},te.toString=function(){return Dn(this.constructor)+"#"+gi(this)},te.th=function(){this.A!==null&&(this.A.nc=!0)};function Lr(a){a.A===null?a.A=new wf:a.A.nc&&(a.A=a.A.copy())}te.Xc=function(){if(this.ba===null){var a=new Rp;a.Xi=zr,a.yj=zr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},te.cb=function(a,y,x,b,E,et,nt){var st=this.part;if(st!==null&&(st.gk(a,y,x,b,E,et,nt),x===this&&a===Di&&Go(this)&&Mi(this,st,y),et=this.diagram,this.animationTriggers===null||et===null||!et.pi||et.undoManager.isUndoingRedoing||et.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&et.animationManager.isEnabled&&!et.animationManager.isTicking&&(this.jo===null&&(this.jo=new Yn),nt=et.undoManager.transactionLevel===0,a.startCondition===Nh?nt=!0:a.startCondition===Sc&&(nt=!1),nt?(et=new Vo,Hg(a,et),nt=this.jo.get(a),nt!==null&&nt.stop(),this.jo.add(a,et),et.vu=this,et.Nw=a,et.add(this,y,b,E),et.start()):(Vl(et.animationManager,"Trigger"),et.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Sn&&x===st&&(st.l&16777216)!==0&&st.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)st=x[E],st instanceof Sn&&Oc(st,function(ht){ht.data!==null&&ht.l&16777216&&ht.La(y)})};function Mi(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var et=E.value,nt=null;if(et.sourceName!==null){if(nt=MS(et,b,a),nt===null)continue;et.sp(a,nt,x,null)}else if(et.isToModel){var st=y.diagram;st===null||st.skipsModelSourceBindings||et.sp(a,st.model.modelData,x,b)}else{if(st=b.data,st===null)continue;var ht=y.diagram;ht===null||ht.skipsModelSourceBindings||et.sp(a,st,x,b)}nt===a&&(st=b.ks(et.Ai),st!==null&&et.Mv(st,nt,x))}}te.ks=function(a){return this.bindingId===a?this:null},te.g=function(a,y,x){this.cb(Di,a,this,y,x)},te.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 Sr);var et=this.Lb;et.reset(),this.no(et,a,y,x,b),et.pp(E)}};function Po(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}te.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Ur(a.x,a.y,0,0,0,b.height)<=y||Ur(a.x,a.y,0,b.height,b.width,b.height)<=y||Ur(a.x,a.y,b.width,b.height,b.width,0)<=y||Ur(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},te.se=function(){return!0},te.ca=function(a){var y=Le.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Le.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),et=b.Ql("extraTouchArea"),nt=et/2,st=this.naturalBounds;b=this.Df()*b.scale;var ht=1/b;if(st.width*b<E&&st.height*b<E)return a=No(x.x-nt*ht,x.y-nt*ht,x.width+et*ht,x.height+et*ht,y.x,y.y),Le.free(y),a}return E=!1,(this instanceof Xr||this instanceof Tr?No(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)),Le.free(y),E},te.gh=function(a){var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},te.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=on.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Le.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)))),Le.free(E),on.free(y),b},te.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Le.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)))),Le.free(E),b},te.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Le.allocAt(0,0),E=Le.allocAt(0,x.height),et=Le.allocAt(x.width,x.height),nt=Le.allocAt(x.width,0),st=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(et))||a.ca(y.Ga(nt)))st=!0;else{x=on.allocAt(0,0,x.width,x.height);var ht=Le.allocAt(a.x,a.y);x.ca(y.Cd(ht))?st=!0:(ht.h(a.x,a.bottom),x.ca(y.Cd(ht))?st=!0:(ht.h(a.right,a.bottom),x.ca(y.Cd(ht))?st=!0:(ht.h(a.right,a.y),x.ca(y.Cd(ht))&&(st=!0)))),Le.free(ht),on.free(x),!st&&(Ge.us(a,b,E)||Ge.us(a,E,et)||Ge.us(a,et,nt)||Ge.us(a,nt,b))&&(st=!0)}return Le.free(b),Le.free(E),Le.free(et),Le.free(nt),st},te.ga=function(a,y){if(y===void 0&&(y=new Le),a instanceof er){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},te.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe,b=Le.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ai(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ai(a,b.x,b.y,0,0),Le.free(b),a},te.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},te.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},te.qs=function(a,y){return y===void 0&&(y=new Le),y.assign(a),this.oe.Cd(y),y},te.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},te.Sj=function(a,y,x,b,E){var et=this.transform,nt=1/(et.m11*et.m22-et.m12*et.m21),st=et.m22*nt,ht=-et.m12*nt,pt=-et.m21*nt,St=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),Gt=nt*(et.m12*et.dx-et.m11*et.dy);return this.areaBackground!==null?(et=this.actualBounds,Ge.Ff(et.left,et.top,et.right,et.bottom,a,y,x,b,E)):(nt=a*st+y*pt+Mt,a=a*ht+y*St+Gt,y=x*st+b*pt+Mt,x=x*ht+b*St+Gt,E.h(0,0),b=this.naturalBounds,x=Ge.Ff(0,0,b.width,b.height,nt,a,y,x,E),E.transform(et),x)},ze.prototype.measure=function(a,y,x,b){if(gs(this)!==!1){var E=this.Kg,et=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-et,0),y=Math.max(y-E,0),x=Math.max((x||0)-et,0),b=Math.max((b||0)-E,0),et=this.angle,E=this.desiredSize;var nt=this.kq();et===90||et===270?(a=isFinite(E.height)?E.height+nt:a,y=isFinite(E.width)?E.width+nt:y):(a=isFinite(E.width)?E.width+nt:a,y=isFinite(E.height)?E.height+nt:y),E=x||0,nt=b||0;var st=this instanceof Sn;switch(Da(this,!0)){case fn:nt=E=0,st&&(y=a=1/0);break;case gn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(nt=y);break;case Jn:isFinite(a)&&a>x&&(E=a),nt=0,st&&(y=1/0);break;case ar:isFinite(y)&&y>b&&(nt=y),E=0,st&&(a=1/0)}st=this.maxSize;var ht=this.minSize;E>st.width&&ht.width<st.width&&(E=st.width),nt>st.height&&ht.height<st.height&&(nt=st.height),x=Math.max(E,ht.width),b=Math.max(nt,ht.height),st.width<x&&(x=Math.min(ht.width,x)),st.height<b&&(b=Math.min(ht.height,b)),a=Math.min(st.width,a),y=Math.min(st.height,y),a=Math.max(x,a),y=Math.max(b,y),(et===90||et===270)&&(et=a,a=y,y=et,et=x,x=b,b=et),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||je("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ho(this,!1)}},ze.prototype.Wl=function(){},ze.prototype.Dd=function(){return!1},ze.prototype.arrange=function(a,y,x,b,E){this.Uk();var et=on.alloc();et.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&&nh(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 yi&&(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()||je("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(et,this.Ib),Yl(this,!1),on.free(et)},te=ze.prototype,te.eh=function(){};function ua(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var et=a.uc;x=a.Kg,y=x.right+x.left;var nt=x.top+x.bottom;switch(x=et.width+y,et=et.height+nt,b+=y,E+=nt,y=Da(a,!0),x===b&&et===E&&(y=fn),y){case fn:(x>b||et>E)&&(ho(a,!0),a.measure(x>b?b:x,et>E?E:et,0,0));break;case gn:ho(a,!0),a.measure(b,E,0,0);break;case Jn:ho(a,!0),a.measure(b,et,0,0);break;case ar:ho(a,!0),a.measure(x,E,0,0)}}}te.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(),Hi(a,y)||(x.oh(),this.Pn(x)))},te.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Nn&&H1(a,this))},te.gc=function(a,y){if(!Ts(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 et=this instanceof Sn&&nh(this),nt=this.Ib;if(et){var st=this.Ib,ht=this.dc,pt=this.areaBackground,St=this.Ma;pt===null&&St===null||a.yc(),pt!==null&&(Ki(this,a,pt,!0,!0,ht,st),pt instanceof si&&pt.type===Ns?(a.beginPath(),a.rect(st.x,st.y,st.width,st.height),a.ng(pt)):a.fillRect(st.x,st.y,st.width,st.height)),St!==null&&(Ki(this,a,St,!0,!1,ht,st),St instanceof si&&St.type===Ns?(a.beginPath(),a.rect(st.x,st.y,st.width,st.height),a.ng(St)):a.fillRect(st.x,st.y,st.width,st.height)),this.hh(a,y)}if(!et&&(et||nt.width!==0&&nt.height!==0&&!isNaN(nt.x)&&!isNaN(nt.y))){et=this.transform,st=this.panel,this.l&4096&&Ro(this),pt=this.part,ht=!1;var Mt=0;pt&&y.Gf("drawShadows")&&(ht=pt.isShadowed)&&(St=pt.shadowOffset,Mt=Math.max(St.y,St.x)*y.scale*y.Mb),St=this.Dd();var Gt;if(!(Gt=y.$i||!St)){var Xt=this.naturalBounds;Gt=this.wh;var Qt=Gt.m11,ie=Gt.m21,Me=Gt.dx,xe=Gt.m12,Ne=Gt.m22,Fe=Gt.dy,De,_e=De=0;Gt=De*Qt+_e*ie+Me;var Ze=De*xe+_e*Ne+Fe;De=Xt.width+Mt,_e=0;var Ln=De*Qt+_e*ie+Me;De=De*xe+_e*Ne+Fe,_e=Math.min(Gt,Ln);var _n=Math.min(Ze,De),Bn=Math.max(Gt+0,Ln)-_e,wn=Math.max(Ze+0,De)-_n;Gt=_e,Ze=_n,De=Xt.width+Mt,_e=Xt.height+Mt,Ln=De*Qt+_e*ie+Me,De=De*xe+_e*Ne+Fe,_e=Math.min(Gt,Ln),_n=Math.min(Ze,De),Bn=Math.max(Gt+Bn,Ln)-_e,wn=Math.max(Ze+wn,De)-_n,Gt=_e,Ze=_n,De=0,_e=Xt.height+Mt,Ln=De*Qt+_e*ie+Me,De=De*xe+_e*Ne+Fe,_e=Math.min(Gt,Ln),_n=Math.min(Ze,De),Bn=Math.max(Gt+Bn,Ln)-_e,wn=Math.max(Ze+wn,De)-_n,Gt=_e,Ze=_n,Mt=y.viewportBounds,Xt=Mt.x,Qt=Mt.y,Gt=!(Gt>Mt.width+Xt||Xt>Bn+Gt||Ze>Mt.height+Qt||Qt>wn+Ze)}if(Gt){if(Gt=(this.l&256)!==0,a.clipInsteadOfFill&&(Gt=!1),this instanceof yi&&(a.font=this.font),Gt){if(Ze=st.se()?st.naturalBounds:st.actualBounds,Bn=Math.max(nt.x,Ze.x),wn=Math.max(nt.y,Ze.y),Mt=Math.min(nt.right,Ze.right)-Bn,Xt=Math.min(nt.bottom,Ze.bottom)-wn,Qt=this.tb,Qt!==null&&(Bn=Qt.x,wn=Qt.y,Mt=Qt.width,Xt=Qt.height),Bn>nt.width+nt.x||nt.x>Ze.width+Ze.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Bn,wn,Mt,Xt),a.clip()}if(St){if(!pt.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ht&&(Ze=pt.shadowOffset,a.Ev(Ze.x*y.scale*this.scale*y.Mb,Ze.y*y.scale*this.scale*y.Mb,pt.shadowBlur),Su(a),a.shadowColor=pt.shadowColor)}ht&&this.shadowVisible===!0?Su(a):ht&&this.shadowVisible===!1&&Jl(a),pt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ps(this,a,pt,nt)),a.transform(et.m11,et.m12,et.m21,et.m22,et.dx,et.dy),ht&&Fo(this,st)&&this.shadowVisible===null&&Jl(a),this.Ma!==null&&(a.yc(),Wa(this,a,pt,nt)),ht&&(this.Ma!==null||this.areaBackground!==null||Fo(this,st))?(il(this,!0),this.shadowVisible===null&&Jl(a)):il(this,!1),this.hh(a,y),ht&&this.l&512&&Su(a),St&&ht&&Jl(a),Gt&&(a.restore(),a.Vc(this instanceof Sn)),et.ws()||(y=1/(et.m11*et.m22-et.m12*et.m21),a.transform(et.m22*y,-et.m12*y,-et.m21*y,et.m11*y,y*(et.m21*et.dy-et.m22*et.dx),y*(et.m12*et.dx-et.m11*et.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Fo(a,y){return y===null?!1:(nh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Sn.Auto||y.type===Sn.Spot)&&y.Pb()!==a)}te.Dv=function(){};function ps(a,y,x,b){Ki(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof si&&a.areaBackground.type===Ns?(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 Wa(a,y,x,b){var E=a.kq(),et=x.x,nt=x.y,st=x.width+E,ht=x.height+E;Ki(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof si&&a.Ma.type===Ns?(y.beginPath(),y.rect(et-E/2,nt-E/2,st,ht),y.ng(a.Ma)):y.fillRect(et-E/2,nt-E/2,st,ht)}function qo(a,y,x){for(var b=y.O.s,E=b.length,et=-1,nt=0;nt<E;nt++)if(b[nt]===a){et=nt;break}if(a=et,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Sn.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 Ts(a,y,x){if(!(y instanceof es))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&&qo(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var et=a.shadowOffset;y.Ev(et.x*x.scale*a.scale*x.Mb,et.y*x.scale*a.scale*x.Mb,a.shadowBlur),Su(y),y.shadowColor=a.shadowColor}a instanceof yi&&(y.font=a.font),y.yd=null;var nt=a.transform;et=a instanceof Sn;var st=a instanceof Sn?nh(a):!1;a.l&4096&&Ro(a);var ht=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,et&&st?(_p(y,1,0,0,1,0,0),a.svg=y.ad):et?(_p(y,nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy),a.svg=y.ad):_p(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var pt=nt.copy().Vj();y.rb.ha=[pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy],ps(a,y,E,ht),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return et||(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy]),a.background!==null&&(et?(st&&(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy]),Wa(a,y,E,ht),st&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy],Wa(a,y,E,ht)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),nt=y.yd,E=a.part,st=!1,E&&x.Gf("drawShadows")&&(st=E.isShadowed),y.clipInsteadOfFill&&(st=!1),a.Dd()&&st&&Su(y),st&&a.shadowVisible===!0?Su(y):st&&a.shadowVisible===!1&&Jl(y),E=a.panel,st&&Fo(a,E)&&a.shadowVisible===null&&Jl(y),y.Il&&(pt=x.computePixelRatio(),pt="drop-shadow("+y.shadowOffsetX/pt+"px "+y.shadowOffsetY/pt+"px "+y.shadowBlur/pt/2+"px "+y.shadowColor+")",a.background!==null&&nt.Ma.setAttributeNS(null,"filter",pt),a.areaBackground!==null&&nt.gd.setAttributeNS(null,"filter",pt)),st&&(a.Ma!==null||a.areaBackground!==null||Fo(a,E))?(il(a,!0),a.shadowVisible===null&&Jl(y)):il(a,!1),E=st,a.hh(y,x),et&&y.nh.pop(),y.o&&y.nh.pop(),nt=y.Gv.hs,st=et?a.svg:y.yd,pt=a.svg,!et&&pt!==null&&st!==pt&&pt.parentNode===a.panel.svg?(a.svg.replaceWith(st),a.svg=st,st!==null&&a.$o(y,b,ht,st),Fa(y,pt),!0):(a.svg=st,nt!==null&&st===null&&(um(y),y.nh.pop()),st===null||(a.$o(y,b,ht,st),y.Il&&(x=x.computePixelRatio(),a.Dv(st,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Su(y),a.Dd()&&Jl(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&st.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&st.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(st):y.Nj.prepend(st),y.ti=st):b!==null&&qo(a,b,st),nt!==null&&nt(a,st)),!0)}te.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var et=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,et.x),E=Math.max(x.y,et.y);var nt=Math.min(x.right,et.right)-y;x=Math.min(x.bottom,et.bottom)-E,et=this.tb,et!==null&&(y=et.x,E=et.y,nt=et.width,x=et.height),et=b.getAttribute("clip-path");var st=null;et!==null&&(st=a.svg.getElementById(et.split("#")[1].slice(0,-1))),st===null?(et="CLIP"+Bi++,st=a.Ud("clipPath",{id:et}),y=a.Ud("rect",{x:y,y:E,width:nt,height:x}),this instanceof Sn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),st.appendChild(y),a.svg.appendChild(st),b.setAttributeNS(null,"clip-path","url(#"+et+")")):(a=st.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",nt.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Fa(a,b)};function Fa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ta(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Vn(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()}}te.hh=function(){},te.lv=function(){this.Uc=!0},te.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 Sn?nh(this):!1;if(!(this instanceof Sn&&E))if(this instanceof Ia){var et=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],et!==null&&Jy(a,et[0],et[1],et[2],et[3],et[4],et[5],et[6],et[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof Sn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Tr){et=y.getElementsByTagName("path");for(var nt=0;nt<et.length;nt++)et[nt].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 et=this.Dd()?this.opacity*a.globalAlpha:this.opacity,et===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",et.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(et=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(nt=b.copy().Vj(),a.rb.ha=[nt.m11,nt.m12,nt.m21,nt.m22,nt.dx,nt.dy],ps(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(nt=y.gd.getAttribute("filter"),nt!==null&&a.ad.setAttribute("filter",nt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),et&&hm(a,et)),(this.background!==null||y.Ma!==void 0)&&(et=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Sn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Wa(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),et&&hm(a,et)),this.$o(a,this.panel,this.actualBounds,y),!0},te.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 Ki(a,y,x,b,E,et,nt){if(x!==null){var st=1,ht=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===eh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var pt=a.kq();if(st=et.width,ht=et.height,E?(st=nt.width,ht=nt.height):b||(st+=pt,ht+=pt),(et=y instanceof jc)&&x.xe&&(x.type===wd||x.yk===st&&x.ft===ht))var St=x.xe;else{var Mt=0,Gt=0,Xt=0,Qt=0,ie=0,Me=0;if(Me=ie=0,E?(ie=nt.x,Me=nt.y):b||(ie-=pt/2,Me-=pt/2),Mt=x.start.x*st+x.start.offsetX,Gt=x.start.y*ht+x.start.offsetY,Xt=x.end.x*st+x.end.offsetX,Qt=x.end.y*ht+x.end.offsetY,Mt+=ie,Xt+=ie,Gt+=Me,Qt+=Me,x.type===wu)St=y.createLinearGradient(Mt,Gt,Xt,Qt);else if(x.type===Ns)Me=isNaN(x.endRadius)?Math.max(st,ht)/2:x.endRadius,isNaN(x.startRadius)?(ie=0,Me=Math.max(st,ht)/2):ie=x.startRadius,St=y.createRadialGradient(Mt,Gt,ie,Xt,Qt,Me);else if(x.type===wd)try{St=y.createPattern(x.pattern,"repeat")}catch(Ne){St=null}if(x.type!==wd&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)St.addColorStop(E.key,E.value);if(et&&(x.xe=St,St!==null&&(x.yk=st,x.ft=ht),St===null&&x.type===wd&&x.yk!==-1)){x.yk=-1;var xe=a.diagram;xe!==null&&x.yk===-1&&fr(function(){xe.redraw()},600)}}b?y.fillStyle=St:y.strokeStyle=St}}}te.rg=function(a){if(a instanceof Sn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},te.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},te.If=function(){for(var a=this instanceof Sn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ro(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Us(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)}Us(a,!1),Ls(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ls(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,Ls(a,!1)))}te.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Le.alloc();et.yi(y,x,b,E,Fr),a.rotate(this.Kb,et.x,et.y),Le.free(et)}},te.v=function(a){if(!gs(this)){a===void 0&&(a=!1),ho(this,!0),Yl(this,!0);var y=this.panel;y===null||a||y.v()}},te.Uj=function(){gs(this)||(ho(this,!0),Yl(this,!0))};function Sa(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 Nn&&a.Bd(),y.$b())),Yl(a,!0)}}te.Uk=function(){!(this.l&2048)&&(Us(this,!0),Ls(this,!0))},te.Wu=function(){Ls(this,!0)},te.N=function(){var a=this.part;a!==null&&a.N()};function Da(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Sn.Table?vl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Sn.Auto&&b.Pb()===a?Do(a,gn,y):x===Cr?b!==null?b.type===Sn.Spot&&b.Pb()===a?Do(a,gn,y):(x=b.defaultStretch,x===Cr?Do(a,fn,y):Do(a,x,y)):Do(a,fn,y):Do(a,x,y)}function vl(a,y,x,b){var E=a.stretch;if(E!==Cr)return Do(a,E,b);var et=E=null;switch(y.stretch){case ar:et=!0;break;case gn:et=!0}switch(x.stretch){case Jn:E=!0;break;case gn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Jn||y===gn),et===null&&(et=y===ar||y===gn),E===!0&&et===!0?Do(a,gn,b):E===!0?Do(a,Jn,b):et===!0?Do(a,ar,b):Do(a,fn,b)}function Do(a,y,x){if(x)return y;if(y===fn||(x=a.desiredSize,x.w()))return fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Jn)return fn;if(y===gn)return ar}else{if(y===ar)return fn;if(y===gn)return Jn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ar)return fn;if(y===gn)return Jn}else{if(y===Jn)return fn;if(y===gn)return ar}return y}function il(a,y){a.l=y?a.l|512:a.l&-513}function Go(a){return(a.l&1024)!==0}function xf(a,y){a.l=y?a.l|1024:a.l&-1025}function Us(a,y){a.l=y?a.l|2048:a.l&-2049}function Ls(a,y){a.l=y?a.l|4096:a.l&-4097}function gs(a){return(a.l&8192)!==0}function ho(a,y){a.l=y?a.l|8192:a.l&-8193}function xa(a){return(a.l&16384)!==0}function Yl(a,y){a.l=y?a.l|16384:a.l&-16385}te.Gj=function(){this.svg=null},te.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},te.Av=function(){},te.zv=function(a){return this.pa=a,Sa(this),!0},te.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},te.kq=function(){return 0};function Ac(a){var y=a.part;if(y instanceof Nn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||H1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Sn?a instanceof Nn?a.Bd():a.qm(a,function(x){Ac(x)}):Ac(a))}te.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new eo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&je("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new yn),this.localBindings.add(E),this},te.set=function(a){return Object.assign(this,a),this},te.Du=function(a){return r0(this,a),this},te.apply=function(a){return a(this),this},te.nm=function(a){return bc(this,a),this},te.pz=function(){return this.ih()},te.ih=function(){for(var a=this instanceof Sn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},te.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Yn),this.animationTriggers.add(a.propertyName,a),this};function As(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 et=gd.I(a);typeof et=="function"?(x=Xn(arguments),b=et(x),$e(b)||je('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=an.go[a]}if(b===null&&(E!=null&&E.constructor||je("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 Xe&&1<x.length){et=b;var nt=x[1];(typeof nt=="string"||nt instanceof HTMLDivElement)&&(dp(et,nt),E++)}for(;E<x.length;E++)et=x[E],et===void 0?je("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,et);return b}function r0(a,y){if(typeof y=="string")if(a instanceof yi)a.text=y;else if(a instanceof Tr)a.figure=y;else if(a instanceof Ia)a.source=y;else if(a instanceof Sn)y=ol.I(y),y!==null&&(a.type=y);else if(a instanceof si){var x=cr(si,y);x!==null?a.type=x:je("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Pn?(y=cr(Pn,y),y!==null&&(a.type=y)):a instanceof Qr&&(y=cr(Qr,y),y!==null&&(a.type=y));else if(y instanceof ze)a instanceof Sn||je("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof co){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 co?Em(b,y):je("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Je)typeof a.qb=="function"&&a.qb(y);else if(y instanceof yo)a.type=y;else if(y instanceof eo)a instanceof ze||a instanceof co?a.bind(y):je("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof nl)a instanceof ze?a.Jv(y):je("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof wo)a instanceof Pn&&a.type===Pn.o?a.figures.add(y):je("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Qr)a instanceof wo?a.segments.add(y):je("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ji)a instanceof Xe||a instanceof Pr?a.layout=y:je("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 si){x=new ir;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 co){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&je("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)&&je("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ir;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);bc(a,E)}else bc(a,y);else je('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function th(a,y){gd.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}hn.Object.defineProperties(ze.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new wf),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 wf),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 wf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Lr(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&&(Lr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Pa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new _h),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Pa&&(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 _h),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 _h),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ti},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new _h),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Cr},set:function(a){var y=this.stretch;y!==a&&(Lr(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&&(Lr(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)&&An(a,"0 <= value <= 1",ze,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Bc(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(Bc(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&&Pf(a,"GraphObject.areaBackground"),a instanceof si&&a.freeze(),Lr(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&&Pf(a,"GraphObject.background"),a instanceof si&&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 qn)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 Le(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&&je("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,et=b.height;(E===y||isNaN(E)&&isNaN(y))&&(et===x||isNaN(et)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Tr&&this.qc(),this.g("desiredSize",b,a),Go(this)&&(a=this.part,a!==null&&(Mi(this,a,"width"),Mi(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 kn(a,this.jd.height).freeze(),this.v(),this instanceof Tr&&this.qc(),this.g("desiredSize",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 kn(this.jd.width,a).freeze(),this.v(),this instanceof Tr&&this.qc(),this.g("desiredSize",y,a),Go(this)&&(a=this.part,a!==null&&Mi(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:fi},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(),Lr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:xo},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(),Lr(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 Dr(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&&Ro(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ro(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Lr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:fn},set:function(a){this.reshapingBehavior!==a&&(Lr(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()&&je("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Sa(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&&An(a,">= 0",ze,"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&&An(a,">= 1",ze,"columnSpan"),Lr(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&&An(a,">= 0",ze,"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&&An(a,">= 1",ze,"rowSpan"),Lr(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&&(Lr(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 Nn||je("Cannot set portID on a Link: "+a),y!==null&&x!==null&&W0(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:zr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Ac(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",ze,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Ac(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),Ac(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&&An(a,">= 0",ze,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:zr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Ac(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",ze,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Ac(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),Ac(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&&An(a,">= 0",ze,"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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(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&&(Lr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),ze.prototype.trigger=ze.prototype.Jv,ze.prototype.findBindingPanel=ze.prototype.ih,ze.prototype.findTemplateBinder=ze.prototype.pz,ze.prototype.setProperties=ze.prototype.nm,ze.prototype.apply=ze.prototype.apply,ze.prototype.attach=ze.prototype.Du,ze.prototype.set=ze.prototype.set,ze.prototype.isEnabledObject=ze.prototype.If,ze.prototype.isVisibleObject=ze.prototype.Ed,ze.prototype.isContainedBy=ze.prototype.rg,ze.prototype.getNearestIntersectionPoint=ze.prototype.rs,ze.prototype.getLocalPoint=ze.prototype.qs,ze.prototype.getDocumentScale=ze.prototype.Df,ze.prototype.getDocumentAngle=ze.prototype.li,ze.prototype.getDocumentBounds=ze.prototype.mi,ze.prototype.getDocumentPoint=ze.prototype.ga,ze.prototype.intersectsRect=ze.prototype.Yc,ze.prototype.containedInRect=ze.prototype.fh,ze.prototype.containsRect=ze.prototype.Re,ze.prototype.containsPoint=ze.prototype.ca,ze.prototype.raiseChanged=ze.prototype.g,ze.prototype.raiseChangedEvent=ze.prototype.cb,ze.prototype.addCopyProperty=ze.prototype.Vw;var gd=null;ze.className="GraphObject",gd=new Yn,th("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=As(Sn,Sn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Sn){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"},As(Tr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new er(0,0,2.76142374915397,2.761423749153969),spot2:new er(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 Sn&&(x=b.fb("ButtonBorder"),x instanceof Tr)){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 Sn&&(x=b.fb("ButtonBorder"),x instanceof Tr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Sn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Tr){x=x.diagram;var et=x.skipsUndoManager;x.skipsUndoManager=!0;var nt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=nt,nt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=nt,x.skipsUndoManager=et}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Sn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Tr){var et=x.diagram,nt=et.skipsUndoManager;et.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),et.skipsUndoManager=nt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Sn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Tr){var et=x.diagram,nt=et.skipsUndoManager;et.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),et.skipsUndoManager=nt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Sn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Tr))){var et=E.skipsUndoManager;E.skipsUndoManager=!0;var nt=b._buttonFillPressed;x.fill!==nt&&(x.fill=nt),nt=b._buttonStrokePressed,x.stroke!==nt&&(x.stroke=nt),E.skipsUndoManager=et}}},y}),th("TreeExpanderButton",function(){var a=As("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},As(Tr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:bi},new eo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new eo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Xr&&(x=x.adornedPart),x instanceof Nn){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}),th("SubGraphExpanderButton",function(){var a=As("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},As(Tr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:bi},new eo("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 Xr&&(x=x.adornedPart),x instanceof Pr){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}),th("ToolTip",function(){return As(Xr,Sn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Le(0,3),shadowBlur:5},As(Tr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new er(0,0,4,6),spot2:new er(1,1,-4,-4)}))}),th("ContextMenu",function(){return As(Xr,Sn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Le(0,3),shadowBlur:5},new eo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),th("ContextMenuButton",function(){var a=As("Button");a.stretch=Jn;var y=a.fb("ButtonBorder");return y instanceof Tr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new er(0,0,2,3),y.spot2=new er(1,1,-2,-2)),a}),th("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=As("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},As(Tr,{name:"ButtonIcon",strokeWidth:2},new eo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Tr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var et=E.diagram;if(et!==null&&!et.isReadOnly){var nt=E.ih();nt===null&&(nt=E.part),nt!==null&&(E=nt.fb(y),E!==null&&(b.handled=!0,et.Ea("Collapse/Expand Panel"),E.visible=!E.visible,et.eb("Collapse/Expand Panel")))}},x}),th("CheckBoxButton",function(a){var y=lm(a);return a=As("Button",{desiredSize:new kn(14,14)},As(Tr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:gn,geometryStretch:Un,visible:!1},y!==""?new eo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Sn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var et=b.fb("ButtonIcon");E.Ea("checkbox"),et.visible=!et.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),th("CheckBox",function(a){a=lm(a),a=As("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Dr(0,1,0,0)});var y=As(Sn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Dr(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}),ze.None=fn=new Je(ze,"None",0),ze.Default=Cr=new Je(ze,"Default",0),ze.Vertical=ar=new Je(ze,"Vertical",4),ze.Horizontal=Jn=new Je(ze,"Horizontal",5),ze.Fill=gn=new Je(ze,"Fill",3),ze.Uniform=Un=new Je(ze,"Uniform",1),ze.UniformToFill=Gr=new Je(ze,"UniformToFill",2),ze.FlipVertical=Nr=new Je(ze,"FlipVertical",1),ze.FlipHorizontal=Hr=new Je(ze,"FlipHorizontal",2),ze.FlipBoth=ci=new Je(ze,"FlipBoth",3),ze.make=As,ze.getBuilders=function(){var a=new Yn,y;for(y in gd)if(y!==y.toLowerCase()){var x=gd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},ze.defineBuilder=th,ze.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=gd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof ze))return y&&b.set(y),b;je('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ze.takeBuilderArgument=lm;function wf(){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=fi,this.o=xo,this.hg=Cr,this.ob=this.Bi=1,this.Pf=fn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}wf.prototype.copy=function(){var a=new wf;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 _h(){this.u=-1/0,this.o=0,this.F=Ti,this.rr=Pa,this.j=this.V="None"}_h.prototype.copy=function(){var a=new _h;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},_h.className="LinkElementSettings";function Rp(){this.yj=this.Xi=jo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Rp.prototype.copy=function(){var a=new Rp;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},Rp.className="LinkSettings";function Nc(){this.ha=[1,0,0,1,0,0]}Nc.prototype.copy=function(){var a=new Nc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Nc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Nc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Nc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var 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,et=this.ha[0]*-b+this.ha[2]*a,nt=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]=et,this.ha[3]=nt,this.translate(-y,-x)}},Nc.className="STransform";function bf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}bf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},bf.className="SGradient";function Fl(a,y,x){this.ownerDocument=a=y===void 0?an.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 es(this,x)}Fl.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},Fl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),$e(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},Fl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Fl.prototype.focus=function(){this.Oa.focus()},Fl.prototype.mx=function(){this.ownerDocument=null},hn.Object.defineProperties(Fl.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}}}),Fl.className="SVGSurface";function es(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Nc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Bi++,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,et,nt){a.Nj===void 0?_p(a,y,x,b,E,et,nt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+et+", "+nt+")")}te=es.prototype,te.arc=function(a,y,x,b,E,et,nt,st){var ht=2*Math.PI,pt=ht-1e-6,St=x*Math.cos(b),Mt=x*Math.sin(b),Gt=a+St,Xt=y+Mt,Qt=et?0:1;b=et?b-E:E-b,(1e-6<Math.abs(nt-Gt)||1e-6<Math.abs(st-Xt))&&this.path.push(["L",Gt,+Xt]),0>b&&(b=b%ht+ht),b>pt?(this.path.push(["A",x,x,0,1,Qt,a-St,y-Mt]),this.path.push(["A",x,x,0,1,Qt,Gt,Xt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Qt,a+x*Math.cos(E),y+x*Math.sin(E)])},te.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},te.Se=function(a){this.addPath(this.path,this.rb,a||0)},te.bezierCurveTo=function(a,y,x,b,E,et){this.path.push(["C",a,y,x,b,E,et])},te.clearRect=function(){},te.clip=function(){this.Yl.clipPath=!0},te.closePath=function(){this.path.push(["z"])},te.createLinearGradient=function(a,y,x,b){var E=new bf("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},te.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"+Bi++,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(Tc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},te.createRadialGradient=function(a,y,x,b,E,et){var nt=new bf("radial");return nt.x1=a,nt.y1=y,nt.r1=x,nt.x2=b,nt.y2=E,nt.r2=et,nt};function Jy(a,y,x,b,E,et,nt,st,ht){b=st/b,E=ht/E,et===0&&nt===0||a.rb.translate(et,nt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}te.drawImage=function(a,y,x,b,E,et,nt,st,ht){var pt="";a instanceof HTMLCanvasElement&&(pt=a.toDataURL()),a instanceof HTMLImageElement&&(pt=a.getAttribute("src"));var St=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(et=y,nt=x,st=b=St,ht=E=a),b=b||0,E=E||0,st=st||0,ht=ht||0,Jy(this,y,x,b,E,et||0,nt||0,st,ht),et={x:0,y:0,width:St||b,height:a||E,href:pt},Ge.$(b,st)&&Ge.$(E,ht)?pt.toLowerCase().indexOf(".svg")===-1&&pt.toLowerCase().indexOf("data:image/svg")===-1&&(et.preserveAspectRatio="xMidYMid slice"):et.preserveAspectRatio="none",(y!==0||x!==0||b!==St||E!==a)&&(b+=y,E+=x,et["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),md(this,Tc,et,this.rb),this.addElement(Tc,et)},te.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},te.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},te.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},md(this,"fill",a,this.rb),this.addElement("rect",a)},te.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},md(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},te.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},md(this,"fill",y,this.rb),this.addElement("text",y,a[0])},te.lineTo=function(a,y){this.path.push(["L",a,y])},te.moveTo=function(a,y){this.path.push(["M",a,y])},te.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},te.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"])},te.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},te.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())},te.setTransform=function(a,y,x,b,E,et){a===1&&y===0&&x===0&&b===1&&E===0&&et===0||_p(this,a,y,x,b,E,et)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}te.scale=function(a,y){this.rb.scale(a,y)},te.translate=function(a,y){this.rb.translate(a,y)},te.transform=function(){},te.yc=function(){},te.stroke=function(){qy(this,this.Yl)},te.jk=function(){this.clipInsteadOfFill||this.stroke()},te.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},te.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 md(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 bf?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 bf?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 bf)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"+Bi++,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 et=[],nt=0;nt<y;nt++){var st=E[nt],ht=st.color;st={offset:st.offset,"stop-color":ht},/^rgba\(/.test(ht)&&(ht=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ht),st["stop-color"]="rgb("+ht[1]+","+ht[2]+","+ht[3]+")",st["stop-opacity"]=ht[4]),et.push(st)}for(et.sort(function(pt,St){return pt.offset>St.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",et[E]));return a.svg.appendChild(x),"url(#"+b+")"}te.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var et=Xn(a[E]),nt=[et.shift()];if(nt[0]==="A")nt.push(et.shift()+","+et.shift(),et.shift(),et.shift()+","+et.shift(),et.shift()+","+et.shift());else for(;et.length;)nt.push(et.shift()+","+et.shift());b.push(nt.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,md(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var st in a)st!=="transform"&&y.setAttributeNS(null,st,a[st]);else{st=y.getElementsByTagName("path");for(var ht in a)ht!=="transform"&&st[x].setAttributeNS(null,ht,a[ht])}else this.addElement("path",a)};function _p(a,y,x,b,E,et,nt){var st=new Nc;st.ha=[y,x,b,E,et,nt],y={},md(a,"g",y,st),st=a.addElement("g",y),a.nh.push(st)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}te.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Jl(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Su(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}te.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},te.fs=function(){this.Ct=!1},te.Vc=function(){},te.Wx=function(){},es.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},es.prototype.getImageData=function(){return null},es.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()))}es.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},es.className="SVGContext",Xe.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Fl(this,an.document));var y=new Fl(this,an.document,!0);a===void 0&&(a=new ir);var x=this;return gf(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)},Xe.prototype.makeSvg=Xe.prototype.Cs,Xe.prototype.av=function(a){return this.Cs(a)},Xe.prototype.makeSVG=Xe.prototype.av;function Ws(a,y,x,b){this.ownerDocument=y=y===void 0?an.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new jc(y,x,b),y.H=a}Ws.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},Ws.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Ws.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ws.prototype.focus=function(){this.Oa.focus()},Ws.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},hn.Object.defineProperties(Ws.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}}}),Ws.className="CanvasSurface";function jc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&je("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 Sr,this.isTemporary=!!x}te=jc.prototype,te.Wx=function(a){this.Z.imageSmoothingEnabled=a},te.arc=function(a,y,x,b,E,et){this.Z.arc(a,y,x,b,E,et)},te.beginPath=function(){this.Z.beginPath()},te.Se=function(){},te.bezierCurveTo=function(a,y,x,b,E,et){this.Z.bezierCurveTo(a,y,x,b,E,et)},te.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},te.clip=function(){this.Z.clip()},te.closePath=function(){this.Z.closePath()},te.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},te.createPattern=function(a,y){return this.Z.createPattern(a,y)},te.createRadialGradient=function(a,y,x,b,E,et){return this.Z.createRadialGradient(a,y,x,b,E,et)},te.drawImage=function(a,y,x,b,E,et,nt,st,ht){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,et,nt,st,ht)},te.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},te.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},te.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},te.fillText=function(a,y,x){this.Z.fillText(a,y,x)},te.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},te.lineTo=function(a,y){this.Z.lineTo(a,y)},te.measureText=function(a){return this.Z.measureText(a)},te.moveTo=function(a,y){this.Z.moveTo(a,y)},te.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},te.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},te.restore=function(){this.Z.restore()},te.save=function(){this.yc(),this.Z.save()},jc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},te=jc.prototype,te.setTransform=function(a,y,x,b,E,et){this.El.setTransform(a,y,x,b,E,et)},te.scale=function(a,y){this.El.scale(a,y)},te.translate=function(a,y){this.El.translate(a,y)},te.stroke=function(){this.Z.stroke()},te.transform=function(a,y,x,b,E,et){if(a!==1||y!==0||x!==0||b!==1||E!==0||et!==0){var nt=this.El,st=nt.m11*a+nt.m21*y;a=nt.m12*a+nt.m22*y,y=nt.m11*x+nt.m21*b,x=nt.m12*x+nt.m22*b,nt.dx=nt.m11*E+nt.m21*et+nt.dx,nt.dy=nt.m12*E+nt.m22*et+nt.dy,nt.m11=st,nt.m12=a,nt.m21=y,nt.m22=x}},te.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},te.ng=function(a,y){if(a instanceof si&&a.type===Ns){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)},te.jk=function(){this.Hm||this.stroke()},te.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},te.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},te.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},te.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},te.Hs=function(){},hn.Object.defineProperties(jc.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([]);jc.className="CanvasSurfaceContext";function zp(){this.F=this.o=this.u=this.j=0}zp.className="ColorNumbers";function si(a,y){xd||(c0(),xd=!0),ii(this),this._isFrozen=!1,a===void 0?(this.na=eh,this.xk="black"):typeof a=="string"?(this.na=eh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===wu?(this.Qd=ai,this.Lk=Uo):this.Lk=a===Ns?this.Qd=Fr:this.Qd=zr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}si.prototype.copy=function(){var a=new si;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},te=si.prototype,te.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},te.ka=function(){return Object.isFrozen(this)&&je("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},te.qb=function(a){a.classType===si&&(this.type=a)},te.toString=function(){var a="Brush(";if(this.type===eh)a+=this.color;else if(a=this.type===wu?a+"Linear ":this.type===Ns?a+"Radial ":this.type===wd?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+")"},te.addColorStop=function(a,y){return this._isFrozen&&Ve(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&An(a,"0 <= loc <= 1",si,"addColorStop:loc"),this.we===null&&(this.we=new Yn),this.we.add(a,y),this.na===eh&&(this.type=wu),this.xe=null,this},te.Vz=function(a,y){if(this._isFrozen&&Ve(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===eh)xu(this.color),this.color=yd(a,y);else if((this.type===wu||this.type===Ns)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)xu(x.value),this.addColorStop(x.key,yd(a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?bd:x,xu(a),yd(y,x)}te.Wy=function(a,y){if(this._isFrozen&&Ve(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?bd:y,this.type===eh)xu(this.color),this.color=yd(-a,y);else if((this.type===wu||this.type===Ns)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)xu(x.value),this.addColorStop(x.key,yd(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?bd:x,xu(a),yd(-y,x)}function a0(a,y,x){xu(a),a=Pi.j;var b=Pi.u,E=Pi.o,et=Pi.F;return xu(y),x===void 0&&(x=.5),"rgba("+Math.round((Pi.j-a)*x+a)+", "+Math.round((Pi.u-b)*x+b)+", "+Math.round((Pi.o-E)*x+E)+", "+Math.round((Pi.F-et)*x+et)+")"}te.Gx=function(){if(this.type===eh)return vd(this.color);if((this.type===wu||this.type===Ns)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ns)return vd(a.first().value);if(a.get(.5)!==null)return vd(a.get(.5));if(a.count===2)return a=a.Fa(),vd(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,et=1;y.next();){var nt=y.key,st=Math.abs(.5-y.key);E>et&&st<E?(x=nt,E=st):et>=E&&st<et&&(b=nt,et=st)}return x>b&&(et=x,x=b,b=et,et=E),E=b-x,vd(a0(a.get(x),a.get(b),1-et/E))}return!1};function vd(a){return a?a instanceof si?a.Gx():(xu(a),128>(299*Pi.j+587*Pi.u+114*Pi.o)/1e3):!1}function yd(a,y){switch(y){case bd:y=100*l0(Pi.j);var x=100*l0(Pi.u),b=100*l0(Pi.o);return wa.j=.4124564*y+.3575761*x+.1804375*b,wa.u=.2126729*y+.7151522*x+.072175*b,wa.o=.0193339*y+.119192*x+.9503041*b,wa.F=Pi.F,y=h0(wa.j/Sd[0]),x=h0(wa.u/Sd[1]),b=h0(wa.o/Sd[2]),Ql.j=116*x-16,Ql.u=500*(y-x),Ql.o=200*(x-b),Ql.F=wa.F,Ql.j=Math.min(100,Math.max(0,Ql.j+100*a)),a=(Ql.j+16)/116,y=a-Ql.o/200,wa.j=Sd[0]*n1(Ql.u/500+a),wa.u=Sd[1]*(Ql.j>cm*f0?Math.pow(a,3):Ql.j/cm),wa.o=Sd[2]*n1(y),wa.F=Ql.F,a=-.969266*wa.j+1.8760108*wa.u+.041556*wa.o,y=.0556434*wa.j+-.2040259*wa.u+1.0572252*wa.o,Pi.j=255*u0((3.2404542*wa.j+-1.5371385*wa.u+-.4985314*wa.o)/100),Pi.u=255*u0(a/100),Pi.o=255*u0(y/100),Pi.F=wa.F,Pi.j=Math.round(Pi.j),255<Pi.j?Pi.j=255:0>Pi.j&&(Pi.j=0),Pi.u=Math.round(Pi.u),255<Pi.u?Pi.u=255:0>Pi.u&&(Pi.u=0),Pi.o=Math.round(Pi.o),255<Pi.o?Pi.o=255:0>Pi.o&&(Pi.o=0),"rgba("+Pi.j+", "+Pi.u+", "+Pi.o+", "+Pi.F+")";case r1:return s0(),ms.o=Math.min(100,Math.max(0,ms.o+100*a)),"hsla("+ms.j+", "+ms.u+"%, "+ms.o+"%, "+ms.F+")";default:je("Unknown color space: "+y)}}function xu(a){xd||(c0(),xd=!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,Pi.j=a[0],Pi.u=a[1],Pi.o=a[2],Pi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Pi.j=0,Pi.u=0,Pi.o=0,Pi.F=1)}}function s0(){var a=Pi.j/255,y=Pi.u/255,x=Pi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),et=b-E;if(E=(b+E)/2,et===0)var nt=a=0;else{switch(b){case a:nt=(y-x)/et%6;break;case y:nt=(x-a)/et+2;break;case x:nt=(a-y)/et+4}nt*=60,0>nt&&(nt+=360),a=et/(1-Math.abs(2*E-1))}ms.j=Math.round(nt),ms.u=Math.round(100*a),ms.o=Math.round(100*E),ms.F=Pi.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 Pf(a,y){typeof a!="string"&&(a instanceof si||je("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Wi?new Ws(null,void 0,{willReadFrequently:!0}).context:null}hn.Object.defineProperties(si.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ve(this,a),this.na=a,this.start.Mc()&&(a===wu?this.start=ai:a===Ns&&(this.start=Fr)),this.end.Mc()&&(a===wu?this.end=Uo:a===Ns&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ve(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ve(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ve(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ve(this,a),0>a&&An(a,">= zero",si,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ve(this,a),0>a&&An(a,">= zero",si,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ve(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ve(this,a),this.cr=a,this.xe=null}}}),si.prototype.isDark=si.prototype.Gx,si.prototype.darkenBy=si.prototype.Wy,si.prototype.lightenBy=si.prototype.Vz,si.prototype.addColorStop=si.prototype.addColorStop;var f0=216/24389,cm=24389/27,Sd=[95.047,100,108.883],d0=null,Pi=new zp,ms=new zp,wa=new zp,Ql=new zp,xd=!1;si.className="Brush";var eh;si.Solid=eh=new Je(si,"Solid",0);var wu;si.Linear=wu=new Je(si,"Linear",1);var Ns;si.Radial=Ns=new Je(si,"Radial",2);var wd;si.Pattern=wd=new Je(si,"Pattern",4);var bd;si.Lab=bd=new Je(si,"Lab",5);var r1;si.HSL=r1=new Je(si,"HSL",6),si.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},si.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;xd||(c0(),xd=!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)},si.lighten=function(a){return t1(a)},si.lightenBy=t1,si.darken=function(a){return e1(a)},si.darkenBy=e1,si.mix=a0,si.isDark=vd;function yo(){this.xa="Base"}yo.prototype.measure=function(){},yo.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},yo.prototype.arrange=function(){},yo.prototype.Ly=function(a,y,x,b,E,et){a.arrange(y,x,b,E,et)},yo.prototype.iA=function(a){a.Uj()},yo.prototype.gc=function(){},hn.Object.defineProperties(yo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Sn}}}),yo.prototype.remeasureObject=yo.prototype.iA,yo.prototype.arrangeElement=yo.prototype.Ly,yo.prototype.measureElement=yo.prototype.Yz,yo.className="PanelLayout";function fm(){this.xa="Base"}Ye(fm,yo),fm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;a=bu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===a){var St=pt.margin,Mt=St.right+St.left;St=St.top+St.bottom,pt.measure(y,x,et,nt);var Gt=pt.measuredBounds;Mt=Math.max(Gt.width+Mt,0),St=Math.max(Gt.height+St,0),Gt=pt.position.x;var Xt=pt.position.y;isFinite(Gt)||(Gt=0),isFinite(Xt)||(Xt=0),pt instanceof Tr&&pt.isGeometryPositioned&&(pt=pt.strokeWidth/2,Gt-=pt,Xt-=pt),Ai(E,Gt,Xt,Mt,St)}}},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 et=y[E],nt=et.measuredBounds,st=et.margin,ht=et.position.x,pt=et.position.y;if(ht=isNaN(ht)?-a:ht-a,pt=isNaN(pt)?-x:pt-x,et instanceof Tr&&et.isGeometryPositioned){var St=et.strokeWidth/2;ht-=St,pt-=St}et.visible&&et.arrange(ht+st.left,pt+st.top,nt.width,nt.height)}};function dm(){this.xa="Base"}Ye(dm,yo),dm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;y=On(),et=bu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===et){var St=Da(pt,!1);if(St!==fn&&St!==Jn)y.push(pt);else{pt.measure(1/0,x,0,nt),St=pt.margin,pt=pt.measuredBounds;var Mt=Math.max(pt.height+St.top+St.bottom,0);E.width+=Math.max(pt.width+St.right+St.left,0),E.height=Math.max(E.height,Mt)}}}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++)ht=y[a],(ht.visible||ht===et)&&(St=ht.margin,st=St.right+St.left,St=St.top+St.bottom,ht.measure(1/0,x,0,nt),ht=ht.measuredBounds,St=Math.max(ht.height+St,0),E.width+=Math.max(ht.width+st,0),E.height=Math.max(E.height,St));Fn(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,et=E.top,nt=a.isOpposite,st=nt?x.width:E.left,ht=0;ht<b;ht++){var pt=et,St=y[ht];if(St.visible){var Mt=St.measuredBounds,Gt=St.margin,Xt=Gt.top+Gt.bottom,Qt=et+E.bottom,ie=Mt.height,Me=Da(St,!1);(isNaN(St.desiredSize.height)&&Me===gn||Me===ar)&&(ie=Math.max(x.height-Xt-Qt,0)),Xt=ie+Xt+Qt,Qt=St.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Fr),nt&&(st-=Mt.width+Gt.left+Gt.right),St.arrange(st+Qt.offsetX+Gt.left,pt+Qt.offsetY+Gt.top+(x.height*Qt.y-Xt*Qt.y),Mt.width,ie),nt||(st+=Mt.width+Gt.left+Gt.right)}}};function pm(){this.xa="Base"}Ye(pm,yo),pm.prototype.measure=function(a,y,x,b,E,et){var nt=b.length;x=On();for(var st=bu(a),ht=0;ht<nt;ht++){var pt=b[ht];if(pt.visible||pt===st){var St=Da(pt,!1);if(St!==fn&&St!==ar)x.push(pt);else{var Mt=pt.margin;St=Mt.right+Mt.left,Mt=Mt.top+Mt.bottom,pt.measure(y,1/0,et,0),pt=pt.measuredBounds,ra(E,Math.max(E.width,Math.max(pt.width+St,0)),E.height+Math.max(pt.height+Mt,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++)ht=x[a],(ht.visible||ht===st)&&(pt=ht.margin,nt=pt.right+pt.left,pt=pt.top+pt.bottom,ht.measure(y,1/0,et,0),ht=ht.measuredBounds,pt=Math.max(ht.height+pt,0),E.width=Math.max(E.width,Math.max(ht.width+nt,0)),E.height+=pt);Fn(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,et=E.left,nt=a.isOpposite,st=nt?x.height:E.top,ht=0;ht<b;ht++){var pt=et,St=y[ht];if(St.visible){var Mt=St.measuredBounds,Gt=St.margin,Xt=Gt.left+Gt.right,Qt=et+E.right,ie=Mt.width,Me=Da(St,!1);(isNaN(St.desiredSize.width)&&Me===gn||Me===Jn)&&(ie=Math.max(x.width-Xt-Qt,0)),Xt=ie+Xt+Qt,Qt=St.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Fr),nt&&(st-=Mt.height+Gt.bottom+Gt.top),St.arrange(pt+Qt.offsetX+Gt.left+(x.width*Qt.x-Xt*Qt.x),st+Qt.offsetY+Gt.top,ie,Mt.height),nt||(st+=Mt.height+Gt.bottom+Gt.top)}}};function gm(){this.xa="Base"}Ye(gm,yo),gm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,St=pt.right+pt.left,Mt=pt.top+pt.bottom;ht.measure(y,x,et,nt);var Gt=ht.measuredBounds;et=Gt.width,nt=Gt.height;var Xt=Math.max(et+St,0),Qt=Math.max(nt+Mt,0),ie=a.isClipping,Me=on.allocAt(-pt.left,-pt.top,Xt,Qt),xe=on.allocAt(0,0,et,nt);p0(ht,xe,!0),et=xe.width,nt=xe.height;for(var Ne=!0,Fe=bu(a),De=0;De<st;De++){var _e=b[De];Gt=y;var Ze=x;if(_e!==ht&&(_e.visible||_e===Fe)){pt=_e.margin;var Ln=pt.left,_n=pt.top;switch(Xt=pt.right+pt.left,Qt=pt.top+pt.bottom,pt=Da(_e,!1),pt){case gn:Gt=et,Ze=nt,_n=Ln=Qt=Xt=0;break;case Jn:Gt=et,Ln=Xt=0;break;case ar:Ze=nt,_n=Qt=0}_e.measure(Gt,Ze,0,0),Gt=_e.measuredBounds,Xt=Math.max(Gt.width+Xt,0),Qt=Math.max(Gt.height+Qt,0),pt=_e.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Fr);var Bn=_e.alignmentFocus;if(Bn.Xb()&&(Bn=Fr),Ze=null,_e instanceof Sn&&_e.$e!==""&&(Ze=_e.fb(_e.$e),Ze===_e&&(Ze=null)),Ln=xe.x-Ln,_n=xe.y-_n,Ze!==null){for(_e.arrange(0,0,Gt.width,Gt.height),Gt=Ze.actualBounds,Gt=Le.allocAt(Gt.x+(Bn.x*Gt.width-Bn.offsetX),Gt.y+(Bn.y*Gt.height-Bn.offsetY)),Ze=Ze.panel;Ze!==_e;)Ze.transform.Ga(Gt),Ze=Ze.panel;Ln+=pt.x*et+pt.offsetX-Gt.x,_n+=pt.y*nt+pt.offsetY-Gt.y,Le.free(Gt)}else Ln+=pt.x*et+pt.offsetX-(Bn.x*Gt.width+Bn.offsetX),_n+=pt.y*nt+pt.offsetY-(Bn.y*Gt.height+Bn.offsetY);Ne?(Ne=!1,E.h(Ln,_n,Xt,Qt)):Ai(E,Ln,_n,Xt,Qt)}}switch(Ne?E.assign(Me):ie?E.Uu(xe.x,xe.y,xe.width,xe.height):Ai(E,Me.x,Me.y,Me.width,Me.height),on.free(Me),on.free(xe),pt=ht.stretch,pt===Cr&&(pt=Da(ht,!1)),pt){case fn:return;case gn:if(!isFinite(y)&&!isFinite(x))return;break;case Jn:if(!isFinite(y))return;break;case ar:if(!isFinite(x))return}for(Gt=ht.measuredBounds,et=Gt.width,nt=Gt.height,Xt=Math.max(et+St,0),Qt=Math.max(nt+Mt,0),pt=ht.margin,xe=on.allocAt(-pt.left,-pt.top,Xt,Qt),p0(ht,xe,!0),et=xe.width,nt=xe.height,y=0;y<st;y++)x=b[y],x===ht||!x.visible&&x!==Fe||(pt=x.margin,Xt=pt.right+pt.left,Qt=pt.top+pt.bottom,Gt=x.measuredBounds,Xt=Math.max(Gt.width+Xt,0),Qt=Math.max(Gt.height+Qt,0),St=x.alignment,St.Xb()&&(St=a.defaultAlignment),St.sb()||(St=Fr),x=x.alignmentFocus,x.Xb()&&(x=Fr),Ne?(Ne=!1,E.h(St.x*et+St.offsetX-(x.x*Gt.width+x.offsetX)-pt.left,St.y*nt+St.offsetY-(x.y*Gt.height+x.offsetY)-pt.top,Xt,Qt)):Ai(E,St.x*et+St.offsetX-(x.x*Gt.width+x.offsetX)-pt.left,St.y*nt+St.offsetY-(x.y*Gt.height+x.offsetY)-pt.top,Xt,Qt));Ne?E.assign(Me):ie?E.Uu(xe.x,xe.y,xe.width,xe.height):Ai(E,Me.x,Me.y,Me.width,Me.height),on.free(xe)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),et=E.measuredBounds,nt=et.width,st=et.height,ht=a.padding;et=ht.left,ht=ht.top;var pt=et-x.x,St=ht-x.y;for(E.arrange(pt,St,nt,st),nt=on.allocAt(0,0,nt,st),p0(E,nt,!1),st=0;st<b;st++){var Mt=y[st];if(Mt!==E){pt=Mt.measuredBounds;var Gt=pt.width,Xt=pt.height;St=Mt.alignment,St.Xb()&&(St=a.defaultAlignment),St.sb()||(St=Fr);var Qt=Mt.alignmentFocus;if(Qt.Xb()&&(Qt=Fr),pt=null,Mt instanceof Sn&&Mt.$e!==""&&(pt=Mt.fb(Mt.$e),pt===Mt&&(pt=null)),pt!==null){var ie=pt.actualBounds;for(Qt=Le.allocAt(ie.x+(Qt.x*ie.width-Qt.offsetX),ie.y+(Qt.y*ie.height-Qt.offsetY)),pt=pt.panel;pt!==Mt;)pt.transform.Ga(Qt),pt=pt.panel;pt=St.x*nt.width+St.offsetX-Qt.x,St=St.y*nt.height+St.offsetY-Qt.y,Le.free(Qt)}else pt=St.x*nt.width+St.offsetX-(Qt.x*Gt+Qt.offsetX),St=St.y*nt.height+St.offsetY-(Qt.y*Xt+Qt.offsetY);pt+=nt.x-x.x,St+=nt.y-x.y,Mt.visible&&Mt.arrange(et+pt,ht+St,Gt,Xt)}}on.free(nt)};function p0(a,y,x){var b=null;if(a instanceof Sn&&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"}Ye(mm,yo),mm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,St=y,Mt=x,Gt=pt.right+pt.left,Xt=pt.top+pt.bottom;ht.measure(y,x,et,nt),pt=ht.measuredBounds;var Qt=0,ie=null;ht instanceof Tr&&(ie=ht,Qt=ie.strokeWidth*ie.scale);var Me=Math.max(pt.width+Gt,0);pt=Math.max(pt.height+Xt,0);var xe=y0(ht),Ne=xe.x*Me+xe.offsetX;xe=xe.y*pt+xe.offsetY;var Fe=S0(ht),De=Fe.x*Me+Fe.offsetX;for(Fe=Fe.y*pt+Fe.offsetY,isFinite(y)&&(St=Math.max(Math.abs(Ne-De)-Qt,0)),isFinite(x)&&(Mt=Math.max(Math.abs(xe-Fe)-Qt,0)),Qt=kn.alloc(),Qt.h(0,0),a=bu(a),Fe=0;Fe<st;Fe++)xe=b[Fe],xe===ht||!xe.visible&&xe!==a||(pt=xe.margin,Me=pt.right+pt.left,Ne=pt.top+pt.bottom,xe.measure(St,Mt,0,0),pt=xe.measuredBounds,Me=Math.max(pt.width+Me,0),pt=Math.max(pt.height+Ne,0),Qt.h(Math.max(Me,Qt.width),Math.max(pt,Qt.height)));if(st===1)E.width=Me,E.height=pt,kn.free(Qt);else{switch(xe=y0(ht),Fe=S0(ht),st=b=0,Fe.x!==xe.x&&Fe.y!==xe.y&&(b=Qt.width/Math.abs(Fe.x-xe.x),st=Qt.height/Math.abs(Fe.y-xe.y)),kn.free(Qt),Qt=0,ie!==null&&(Qt=ie.strokeWidth*ie.scale,k0(ie)===Un&&(b=st=Math.max(b,st))),b+=Math.abs(xe.offsetX)+Math.abs(Fe.offsetX)+Qt,st+=Math.abs(xe.offsetY)+Math.abs(Fe.offsetY)+Qt,ie=ht.stretch,ie===Cr&&(ie=Da(ht,!1)),ie){case fn:nt=et=0;break;case gn:isFinite(y)&&(b=y),isFinite(x)&&(st=x);break;case Jn:isFinite(y)&&(b=y),nt=0;break;case ar:et=0,isFinite(x)&&(st=x)}ht.Uj(),ht.measure(b,st,et,nt),E.width=ht.measuredBounds.width+Gt,E.height=ht.measuredBounds.height+Xt}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,et=on.alloc();et.h(0,0,1,1);var nt=b.margin,st=nt.left;nt=nt.top;var ht=a.padding,pt=ht.left;ht=ht.top,b.arrange(pt+st,ht+nt,E.width,E.height);var St=y0(b),Mt=S0(b),Gt=St.y*E.height+St.offsetY,Xt=Mt.x*E.width+Mt.offsetX;for(Mt=Mt.y*E.height+Mt.offsetY,et.x=St.x*E.width+St.offsetX,et.y=Gt,Ai(et,Xt,Mt,0,0),et.x+=st+pt,et.y+=nt+ht,E=0;E<x;E++)st=y[E],st!==b&&(pt=st.measuredBounds,nt=st.margin,ht=Math.max(pt.width+nt.right+nt.left,0),St=Math.max(pt.height+nt.top+nt.bottom,0),Gt=st.alignment,Gt.Xb()&&(Gt=a.defaultAlignment),Gt.sb()||(Gt=Fr),ht=et.width*Gt.x+Gt.offsetX-ht*Gt.x+nt.left+et.x,nt=et.height*Gt.y+Gt.offsetY-St*Gt.y+nt.top+et.y,st.visible&&(No(et.x,et.y,et.width,et.height,ht,nt,pt.width,pt.height)?st.arrange(ht,nt,pt.width,pt.height):st.arrange(ht,nt,pt.width,pt.height,new on(et.x,et.y,et.width,et.height))));on.free(et)};function vm(){this.xa="Base",this.name="Table"}Ye(vm,yo),vm.prototype.measure=function(a,y,x,b,E){for(var et=b.length,nt=On(),st=On(),ht=0;ht<et;ht++){var pt=b[ht],St=pt instanceof Sn?pt:null;if(St!==null&&nh(St)&&pt.visible){st.push(St);for(var Mt=St.O.s,Gt=Mt.length,Xt=0;Xt<Gt;Xt++){var Qt=Mt[Xt];St.type===Sn.TableRow?Qt.row=pt.row:St.type===Sn.TableColumn&&(Qt.column=pt.column),nt.push(Qt)}}else nt.push(pt)}et=nt.length,et===0&&(a.Fb(0),a.Eb(0));for(var ie=[],Me=0;Me<et;Me++){var xe=nt[Me];xe.visible&&(ho(xe,!0),Yl(xe,!0),ie[xe.row]||(ie[xe.row]=[]),ie[xe.row][xe.column]||(ie[xe.row][xe.column]=[]),ie[xe.row][xe.column].push(xe))}Fn(nt);var Ne=On(),Fe=On(),De=On(),_e={count:0},Ze={count:0},Ln=y,_n=x,Bn=a.rowDefs,wn=a.colDefs,cn=null;et=Bn.length;for(var br=0;br<et;br++)cn=Bn[br],cn!==void 0&&(cn.actual=0);et=wn.length;for(var dr=0;dr<et;dr++)cn=wn[dr],cn!==void 0&&(cn.actual=0);for(var ti=ie.length,vi=0,Co=0;Co<ti;Co++)ie[Co]&&(vi=Math.max(vi,ie[Co].length));var Lo=Math.min(a.topIndex,ti-1),ha=Math.min(a.leftIndex,vi-1),ko=0;ti=ie.length;for(var fh=bu(a),no=0;no<ti;no++)if(ie[no]){vi=ie[no].length;var bl=a.Fb(no);bl.actual=0;for(var ca=bl.oc=0;ca<vi;ca++)if(ie[no][ca]){var dh=a.Eb(ca);Ne[ca]===void 0&&(dh.actual=0,dh.oc=0,Ne[ca]=!0);for(var Ss=ie[no][ca],Zs=Ss.length,is=0;is<Zs;is++){var Va=Ss[is];if(Va.visible||Va===fh){var qh=1<Va.rowSpan||1<Va.columnSpan;qh&&(no<Lo||ca<ha||Fe.push(Va));var Pl=Va.margin,Vd=Pl.right+Pl.left,os=Pl.top+Pl.bottom,fa=vl(Va,bl,dh,!1),Mg=Va.desiredSize,Df=!isNaN(Mg.height),Il=!isNaN(Mg.width)&&Df;if(qh||fa===fn||Il||no<Lo||ca<ha||(_e[ca]!==void 0||fa!==gn&&fa!==Jn||(_e[ca]=-1,_e.count++),Ze[no]!==void 0||fa!==gn&&fa!==ar||(Ze[no]=-1,Ze.count++),De.push(Va)),Va.measure(1/0,1/0,0,0),!(no<Lo||ca<ha)){var Ka=Va.measuredBounds,Gc=Math.max(Ka.width+Vd,0),as=Math.max(Ka.height+os,0);if(Va.rowSpan===1&&(fa===fn||fa===Jn)){cn=a.Fb(no);var tc=cn.Wc();ko=Math.max(as-cn.actual,0),ko+tc>_n&&(ko=Math.max(_n-tc,0));var zv=cn.oa===0;cn.oc=cn.oc+ko,cn.actual=cn.oa+ko,_n=Math.max(_n-(ko+(zv?tc:0)),0)}if(Va.columnSpan===1&&(fa===fn||fa===ar)){cn=a.Eb(ca);var Tg=cn.Wc();ko=Math.max(Gc-cn.actual,0),ko+Tg>Ln&&(ko=Math.max(Ln-Tg,0));var Gy=cn.oa===0;cn.oc=cn.oc+ko,cn.actual=cn.oa+ko,Ln=Math.max(Ln-(ko+(Gy?Tg:0)),0)}qh&&Va.Uj()}}}}}Fn(Ne);var au=0,ku=0;et=a.columnCount;for(var Bf=0;Bf<et;Bf++){var ec=wn[Bf];ec!==void 0&&(au+=isNaN(ec.Hc)?ec.oc:ec.Hc,ec.oc!==0&&(au+=ec.Wc()))}et=a.rowCount;for(var Kd=0;Kd<et;Kd++){var nc=Bn[Kd];nc!==void 0&&(ku+=isNaN(nc.Hc)?nc.oc:nc.Hc,nc.oc!==0&&(ku+=nc.Wc()))}Ln=Math.max(y-au,0);var su=_n=Math.max(x-ku,0),ph=Ln;et=De.length;for(var Za=0;Za<et;Za++){var Rl=De[Za],Gv=a.Fb(Rl.row),Eu=a.Eb(Rl.column),Zd=Rl.measuredBounds,Cl=Rl.margin,Uc=Cl.right+Cl.left,_l=Cl.top+Cl.bottom;_e[Rl.column]=Eu.oc===0&&_e[Rl.column]!==void 0?Math.max(Zd.width+Uc,_e[Rl.column]):null,Ze[Rl.row]=Gv.oc===0&&Ze[Rl.row]!==void 0?Math.max(Zd.height+_l,Ze[Rl.row]):null}var If=0,Xd=0,cl;for(cl in Ze)cl!=="count"&&(If+=Ze[cl]);for(cl in _e)cl!=="count"&&(Xd+=_e[cl]);for(var zo=kn.alloc(),Lg=0;Lg<et;Lg++){var Ta=De[Lg];if(Ta.visible||Ta===fh){var ro=a.Fb(Ta.row),La=a.Eb(Ta.column),Mu=0;isFinite(La.width)?Mu=La.width:(isFinite(Ln)&&_e[Ta.column]!==null?Xd===0?Mu=La.actual+Ln:Mu=_e[Ta.column]/Xd*ph:_e[Ta.column]!==null?Mu=Ln:Mu=La.actual||Ln,Mu=Math.max(0,Mu-La.Wc()));var gh=0;switch(isFinite(ro.height)?gh=ro.height:(isFinite(_n)&&Ze[Ta.row]!==null?If===0?gh=ro.actual+_n:gh=Ze[Ta.row]/If*su:Ze[Ta.row]!==null?gh=_n:gh=ro.actual||_n,gh=Math.max(0,gh-ro.Wc())),zo.h(Math.max(La.minimum,Math.min(Mu,La.maximum)),Math.max(ro.minimum,Math.min(gh,ro.maximum))),fa=vl(Ta,ro,La,!1),fa){case Jn:zo.height=Math.max(zo.height,ro.actual+_n);break;case ar:zo.width=Math.max(zo.width,La.actual+Ln)}var Wc=Ta.margin,Uy=Wc.right+Wc.left,Uv=Wc.top+Wc.bottom;Ta.Uj(),Ta.measure(zo.width,zo.height,La.minimum,ro.minimum);var Yd=Ta.measuredBounds,Hc=Math.max(Yd.width+Uy,0),Rf=Math.max(Yd.height+Uv,0);isFinite(Ln)&&(Hc=Math.min(Hc,zo.width)),isFinite(_n)&&(Rf=Math.min(Rf,zo.height));var Xa=0;Xa=ro.actual,ro.actual=Math.max(ro.actual,Rf),ro.oc=Math.max(ro.oc,Rf),ko=ro.actual-Xa,_n=Math.max(_n-ko,0),Ze[Ta.row]===null&&(su=Math.max(su-ko,0)),Xa=La.actual,La.actual=Math.max(La.actual,Hc),La.oc=Math.max(La.oc,Hc),ko=La.actual-Xa,Ln=Math.max(Ln-ko,0),_e[Ta.column]===null&&(ph=Math.max(ph-ko,0))}}Fn(De);var Tu=kn.alloc(),kl=On(),Bs=On();if(et=Fe.length,et!==0){for(var rc=0;rc<ti;rc++)if(ie[rc]){vi=ie[rc].length;var Jd=a.Fb(rc);kl[rc]=Jd.actual;for(var ic=0;ic<vi;ic++)if(ie[rc][ic]){var Wv=a.Eb(ic);Bs[ic]=Wv.actual}}}for(var Qd=0;Qd<et;Qd++){var Yi=Fe[Qd];if(Yi.visible||Yi===fh){var fl=a.Fb(Yi.row),Xs=a.Eb(Yi.column);switch(zo.h(Math.max(Xs.minimum,Math.min(y,Xs.maximum)),Math.max(fl.minimum,Math.min(x,fl.maximum))),fa=vl(Yi,fl,Xs,!1),fa){case gn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index])),kl[fl.index]!==0&&(zo.height=Math.min(zo.height,kl[fl.index]));break;case Jn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index]));break;case ar:kl[fl.index]!==0&&(zo.height=Math.min(zo.height,kl[fl.index]))}isFinite(Xs.width)&&(zo.width=Xs.width),isFinite(fl.height)&&(zo.height=fl.height),Tu.h(0,0);for(var Hv=Xs.minimum,ss=fl.minimum,mh=1;mh<Yi.rowSpan&&!(Yi.row+mh>=a.rowCount);mh++)cn=a.Fb(Yi.row+mh),ko=0,ko=fa===gn||fa===ar?Math.max(cn.minimum,kl[Yi.row+mh]===0?cn.maximum:Math.min(kl[Yi.row+mh],cn.maximum)):Math.max(cn.minimum,isNaN(cn.Hc)?cn.maximum:Math.min(cn.Hc,cn.maximum)),Tu.height+=ko,ss+=cn.minimum;for(var Ys=1;Ys<Yi.columnSpan&&!(Yi.column+Ys>=a.columnCount);Ys++)cn=a.Eb(Yi.column+Ys),ko=0,ko=fa===gn||fa===Jn?Math.max(cn.minimum,Bs[Yi.column+Ys]===0?cn.maximum:Math.min(Bs[Yi.column+Ys],cn.maximum)):Math.max(cn.minimum,isNaN(cn.Hc)?cn.maximum:Math.min(cn.Hc,cn.maximum)),Tu.width+=ko,Hv+=cn.minimum;zo.width+=Tu.width,zo.height+=Tu.height;var $d=Yi.margin,oc=$d.right+$d.left,Ag=$d.top+$d.bottom;Yi.measure(zo.width,zo.height,Hv,ss);for(var qd=Yi.measuredBounds,zl=Math.max(qd.width+oc,0),Vc=Math.max(qd.height+Ag,0),ac=0,tp=0;tp<Yi.rowSpan&&!(Yi.row+tp>=a.rowCount);tp++)cn=a.Fb(Yi.row+tp),ac+=cn.total||0;if(ac<Vc){var vh=Vc-ac,lu=Vc-ac;if(Yi.spanAllocation!==null)for(var yh=Yi.spanAllocation,Lu=0;Lu<Yi.rowSpan&&!(0>=vh)&&!(Yi.row+Lu>=a.rowCount);Lu++){cn=a.Fb(Yi.row+Lu);var Sh=cn.oa||0,Kc=yh(Yi,cn,lu);cn.actual=Math.min(cn.maximum,Sh+Kc),cn.oa!==Sh&&(vh-=cn.oa-Sh)}for(;0<vh;){var El=cn.oa||0;if(isNaN(cn.height)&&cn.maximum>El&&(cn.actual=Math.min(cn.maximum,El+vh),cn.oa!==El&&(vh-=cn.oa-El)),cn.index===0)break;cn=a.Fb(cn.index-1)}}for(var _f=0,xh=0;xh<Yi.columnSpan&&!(Yi.column+xh>=a.columnCount);xh++)cn=a.Eb(Yi.column+xh),_f+=cn.total||0;if(_f<zl){var zf=zl-_f,Wy=zl-_f;if(Yi.spanAllocation!==null)for(var Au=Yi.spanAllocation,Zc=0;Zc<Yi.columnSpan&&!(0>=zf)&&!(Yi.column+Zc>=a.columnCount);Zc++){cn=a.Eb(Yi.column+Zc);var Ng=cn.oa||0,Hy=Au(Yi,cn,Wy);cn.actual=Math.min(cn.maximum,Ng+Hy),cn.oa!==Ng&&(zf-=cn.oa-Ng)}for(;0<zf;){var Vv=cn.oa||0;if(isNaN(cn.width)&&cn.maximum>Vv&&(cn.actual=Math.min(cn.maximum,Vv+zf),cn.oa!==Vv&&(zf-=cn.oa-Vv)),cn.index===0)break;cn=a.Eb(cn.index-1)}}}}Fn(Fe),kn.free(Tu),kn.free(zo),kl!==void 0&&Fn(kl),Bs!==void 0&&Fn(Bs);var Gf=0,Uf=0,Kv=a.desiredSize,gx=a.maxSize;fa=Da(a,!0);var jg=ku=au=0,Og=0;et=a.columnCount;for(var Zv=0;Zv<et;Zv++)wn[Zv]!==void 0&&(cn=a.Eb(Zv),isFinite(cn.width)?(jg+=cn.width,jg+=cn.Wc()):Mm(cn)===Hp?(jg+=cn.oa,jg+=cn.Wc()):cn.oa!==0&&(au+=cn.oa,au+=cn.Wc()));isFinite(Kv.width)?Gf=Math.min(Kv.width,gx.width):Gf=fa!==fn&&isFinite(y)?y:au,Gf=Math.max(Gf,a.minSize.width),Gf=Math.max(Gf-jg,0);for(var $x=au===0?1:Math.max(Gf/au,1),Xv=0;Xv<et;Xv++)wn[Xv]!==void 0&&(cn=a.Eb(Xv),isFinite(cn.width)||Mm(cn)===Hp||(cn.actual=cn.oa*$x),cn.position=E.width,cn.oa!==0&&(E.width+=cn.oa,E.width+=cn.Wc()));et=a.rowCount;for(var Yv=0;Yv<et;Yv++)Bn[Yv]!==void 0&&(cn=a.Fb(Yv),isFinite(cn.height)?(Og+=cn.height,Og+=cn.Wc()):Mm(cn)===Hp?(Og+=cn.oa,Og+=cn.Wc()):cn.oa!==0&&(ku+=cn.oa,ku+=cn.Wc()));isFinite(Kv.height)?Uf=Math.min(Kv.height,gx.height):Uf=fa!==fn&&isFinite(x)?x:ku,Uf=Math.max(Uf,a.minSize.height),Uf=Math.max(Uf-Og,0);for(var qx=ku===0?1:Math.max(Uf/ku,1),Jv=0;Jv<et;Jv++)Bn[Jv]!==void 0&&(cn=a.Fb(Jv),isFinite(cn.height)||Mm(cn)===Hp||(cn.actual=cn.oa*qx),cn.position=E.height,cn.oa!==0&&(E.height+=cn.oa,E.height+=cn.Wc()));et=st.length;for(var Vy=0;Vy<et;Vy++){var Fg=st[Vy],Ky=0,Zy=0;Fg.type===Sn.TableRow?(Ky=E.width,cn=a.Fb(Fg.row),Zy=cn.actual):(cn=a.Eb(Fg.column),Ky=cn.actual,Zy=E.height),Fg.measuredBounds.h(0,0,Ky,Zy),ho(Fg,!1)}Fn(st),a.inRowsCols=ie},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,et=E.left;E=E.top;var nt=a.inRowsCols;if(nt!==null){for(var st,ht,pt=nt.length,St=0,Mt=0;Mt<pt;Mt++)nt[Mt]&&(St=Math.max(St,nt[Mt].length));ht=a.rowDefs,st=a.colDefs;var Gt=Mt=0,Xt=Math.min(a.topIndex,pt-1);if(0<ht.length){for(;Xt!==pt&&(ht[Xt]===void 0||ht[Xt].oa===0);)Xt++;Xt=Math.max(Math.min(Xt,pt-1),0),Mt=-ht[Xt].position}var Qt=Math.min(a.leftIndex,St-1);if(0<st.length){for(;Qt!==St&&(st[Qt]===void 0||st[Qt].oa===0);)Qt++;Qt=Math.max(Math.min(Qt,St-1),0),Gt=-st[Qt].position}for(var ie=0,Me=0;ie!==pt&&ht[ie]===void 0;)ie++;for(;Me!==pt&&st[Me]===void 0;)Me++;St=a.part,a.Fb(ie),a.Eb(Me);for(var xe=0;xe<y.length;xe++){var Ne=y[xe];if(Ne instanceof Sn&&Ne.visible&&nh(Ne)){if(Ne.type===Sn.TableRow){st=a.Fb(Ne.row);var Fe=a.Eb(Me)}else st=a.Fb(ie),Fe=a.Eb(Ne.column);ht=st.position+Mt+E,st.oa!==0&&(ht+=st.Io(Math.max(ie,Xt))),st=Fe.position+Gt+et,Fe.oa!==0&&(st+=Fe.Io(Math.max(Me,Qt))),Fe=Ne.measuredBounds,Ne.Uk(),Ne.actualBounds.ka();var De=Ne.actualBounds,_e=on.allocAt(De.x,De.y,De.width,De.height);De.x=Ne.type===Sn.TableRow?et:st,De.y=Ne.type===Sn.TableColumn?E:ht,De.width=Fe.width,De.height=Fe.height,Ne.actualBounds.freeze(),Yl(Ne,!1),Hi(_e,De)||St===null||(St.oh(),Ne.Pn(St)),on.free(_e)}}for(xe=kn.alloc(),Ne=0;Ne<pt;Ne++)if(nt[Ne]){for(St=nt[Ne].length,Fe=a.Fb(Ne),ht=Fe.position+Mt+E,Fe.oa!==0&&(ht+=Fe.Io(Math.max(ie,Xt))),De=0;De<St;De++)if(nt[Ne][De]){_e=a.Eb(De),st=_e.position+Gt+et,_e.oa!==0&&(st+=_e.Io(Math.max(Me,Qt)));for(var Ze=nt[Ne][De],Ln=Ze.length,_n=0;_n<Ln;_n++){var Bn=Ze[_n],wn=Bn.measuredBounds;xe.h(0,0);for(var cn=1;cn<Bn.rowSpan&&!(Ne+cn>=a.rowCount);cn++){var br=a.Fb(Ne+cn);br.oa!==0&&(xe.height+=br.total)}for(cn=1;cn<Bn.columnSpan&&!(De+cn>=a.columnCount);cn++)br=a.Eb(De+cn),br.oa!==0&&(xe.width+=br.total);var dr=_e.oa+xe.width,ti=Fe.oa+xe.height;cn=st,br=ht;var vi=dr,Co=ti,Lo=st,ha=ht,ko=dr,fh=ti;st+dr>x.width&&(ko=Math.max(x.width-st,0)),ht+ti>x.height&&(fh=Math.max(x.height-ht,0));var no=Bn.alignment;if(no.Xb()){no=a.defaultAlignment,no.sb()||(no=Fr);var bl=no.x,ca=no.y,dh=no.offsetX;no=no.offsetY;var Ss=_e.alignment,Zs=Fe.alignment;Ss.sb()&&(bl=Ss.x,dh=Ss.offsetX),Zs.sb()&&(ca=Zs.y,no=Zs.offsetY)}else bl=no.x,ca=no.y,dh=no.offsetX,no=no.offsetY;(isNaN(bl)||isNaN(ca))&&(ca=bl=.5,no=dh=0),Ss=wn.width,Zs=wn.height;var is=Bn.margin,Va=is.left+is.right,qh=is.top+is.bottom,Pl=vl(Bn,Fe,_e,!1);!isNaN(Bn.desiredSize.width)||Pl!==gn&&Pl!==Jn||(Ss=Math.max(dr-Va,0)),!isNaN(Bn.desiredSize.height)||Pl!==gn&&Pl!==ar||(Zs=Math.max(ti-qh,0)),dr=Bn.maxSize,ti=Bn.minSize,Ss=Math.min(dr.width,Ss),Zs=Math.min(dr.height,Zs),Ss=Math.max(ti.width,Ss),Zs=Math.max(ti.height,Zs),dr=Zs+qh,cn+=vi*bl-(Ss+Va)*bl+dh+is.left,br+=Co*ca-dr*ca+no+is.top,Bn.visible&&(No(Lo,ha,ko,fh,cn,br,wn.width,wn.height)?Bn.arrange(cn,br,Ss,Zs):Bn.arrange(cn,br,Ss,Zs,new on(Lo,ha,ko,fh)))}}}for(kn.free(xe),a=0;a<b;a++)x=y[a],et=x instanceof Sn?x:null,et!==null&&nh(et)&&(et=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,et.width,et.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}Ye(ym,yo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Ye(Sm,yo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Ye(xm,yo),xm.prototype.measure=function(a,y,x,b,E,et,nt){1<b.length&&je("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,et,nt);var st=b.measuredBounds,ht=b.margin,pt=ht.right+ht.left;if(ht=ht.top+ht.bottom,isFinite(y)||isFinite(x)){var St=b.scale,Mt=st.width;st=st.height;var Gt=Math.max(y-pt,0),Xt=Math.max(x-ht,0),Qt=1;a.viewboxStretch===Un?Mt!==0&&st!==0&&(Qt=Math.min(Gt/Mt,Xt/st)):Mt!==0&&st!==0&&(Qt=Math.max(Gt/Mt,Xt/st)),Qt===0&&(Qt=1e-4),b.Ca*=Qt,St!==b.scale&&(ho(b,!0),b.measure(1/0,1/0,et,nt))}st=b.measuredBounds,E.width=isFinite(y)?y:Math.max(st.width+pt,0),E.height=isFinite(x)?x:Math.max(st.height+ht,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,et=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var nt=y.alignment;nt.Xb()&&(nt=a.defaultAlignment),nt.sb()||(nt=Fr),y.arrange(x.width*nt.x-et*nt.x+nt.offsetX,x.height*nt.y-E*nt.y+nt.offsetY,b.width,b.height)};function Gp(){this.xa="Base"}Ye(Gp,yo),Gp.prototype.measure=function(){},Gp.prototype.arrange=function(){},Gp.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 et=a.naturalBounds,nt=a.actualBounds,st=et.width,ht=et.height,pt=Math.ceil(st/E),St=Math.ceil(ht/b),Mt=a.gridOrigin,Gt=Mt.x;Mt=Mt.y,y.save(),y.beginPath(),y.rect(0,0,st,ht),y.clip(),y.Se();for(var Xt=[],Qt=a.O.s,ie=Qt.length,Me=0;Me<ie;Me++){var xe=Qt[Me],Ne=[];if(Xt.push(Ne),xe.visible){var Fe=xe.interval;if(!(0>Fe)){xe=m0(xe.figure);for(var De=0;De<ie;De++)if(De!==Me){var _e=Qt[De];_e.visible&&m0(_e.figure)===xe&&(_e=_e.interval,_e>Fe&&Ne.push(_e))}}}}for(Qt=a.O.s,ie=Qt.length,Me=0;Me<ie;Me++){var Ze=Qt[Me];if(Ze.visible&&(Ne=Ze.interval||1,xe=Math.abs(Ne),!(2>E*xe*x))){if(Fe=Ze.segmentIndex,(!isFinite(Fe)||isNaN(Fe))&&(Fe=0),0>Fe&&(Fe=xe-Math.min(-Fe,xe)),Fe=Math.round(Fe%xe),xe=Ze.opacity,De=1,xe!==1){if(xe===0)continue;De=y.globalAlpha,y.globalAlpha=De*xe}_e=Xt[Me];var Ln=!1,_n=Ze.strokeDashArray;if(_n!==null&&(Ln=!0,y.js(_n,Ze.strokeDashOffset)),Ze.figure==="LineV"&&Ze.stroke!==null&&0<Ze.strokeWidth){for(y.lineWidth=Ze.strokeWidth,Ki(a,y,Ze.stroke,!1,!1,et,nt),y.beginPath(),_n=Ze=Math.floor((Gt-E)/E);_n<=Ze+pt;_n++){var Bn=_n*E+Gt;0<=Bn&&Bn<=st&&wm(_n,Ne,Fe,_e)&&(y.moveTo(Bn,0),y.lineTo(Bn,ht))}y.stroke(),y.Se()}else if(Ze.figure==="LineH"&&Ze.stroke!==null&&0<Ze.strokeWidth){for(y.lineWidth=Ze.strokeWidth,Ki(a,y,Ze.stroke,!1,!1,et,nt),y.beginPath(),_n=Ze=Math.floor((Mt-b)/b);_n<=Ze+St;_n++)Bn=_n*b+Mt,0<=Bn&&Bn<=ht&&wm(_n,Ne,Fe,_e)&&(y.moveTo(0,Bn),y.lineTo(st,Bn));y.stroke(),y.Se()}else if(Ze.figure==="BarV"&&Ze.fill!==null)for(Ki(a,y,Ze.fill,!0,!1,et,nt),Ze=Ze.width,isNaN(Ze)&&(Ze=E),Bn=_n=Math.floor((Gt-E)/E);Bn<=_n+pt;Bn++){var wn=Bn*E+Gt;0<=wn+Ze&&wn<=st&&wm(Bn,Ne,Fe,_e)&&y.fillRect(wn,0,Ze,ht)}else if(Ze.figure==="BarH"&&Ze.fill!==null)for(Ki(a,y,Ze.fill,!0,!1,et,nt),Ze=Ze.height,isNaN(Ze)&&(Ze=b),Bn=_n=Math.floor((Mt-b)/b);Bn<=_n+St;Bn++)wn=Bn*b+Mt,0<=wn+Ze&&wn<=ht&&wm(Bn,Ne,Fe,_e)&&y.fillRect(0,wn,st,Ze);Ln&&y.fs(),xe!==1&&(y.globalAlpha=De)}}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"}Ye(bm,yo),bm.prototype.measure=function(a,y,x,b,E){var et=b.length;if(a instanceof Xr||a instanceof Cn){var nt=null,st=null;if(a instanceof Cn&&(nt=a),a instanceof Xr&&(st=a,nt=st.adornedPart,a.j===null&&(a.j=[])),nt instanceof Cn){var ht=nt;if(et===0)ra(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pt=a instanceof Xr?null:nt.path;y=nt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var St=ht.points,Mt=nt.pointsCount;st!==null?st.Ul(!1):nt!==null&&nt.Ul(!1),st=y.width;var Gt=y.height,Xt=a.j;if(Xt.length=0,pt!==null){i1(a,st,Gt,pt);var Qt=pt.measuredBounds;x.ed(Qt),Xt.push(Qt)}Qt=Sr.alloc();for(var ie=Le.alloc(),Me=Le.alloc(),xe=0;xe<et;xe++){var Ne=b[xe];if(Ne!==pt)if(Ne.isPanelMain&&Ne instanceof Tr){i1(a,st,Gt,Ne);var Fe=Ne.measuredBounds;x.ed(Fe),Xt.push(Fe)}else if(2>Mt)Ne.measure(1/0,1/0,0,0),Fe=Ne.measuredBounds,x.ed(Fe),Xt.push(Fe);else{var De=Ne.segmentIndex,_e=Ne.segmentFraction,Ze=Ne.alignmentFocus;Ze.Mc()&&(Ze=Fr);var Ln=Ne.segmentOrientation,_n=Ne.segmentOffset;if(isNaN(De)){var Bn=ht.ua;Fe=On(),Bn.Qu(_e,Fe);var wn=Le.allocAt(Fe[0],Fe[1]);if(wn.add(ht.i(0)),Bn.type===Pn.j?wn.offset(-Bn.startX,-Bn.startY):(Bn=Bn.figures.first(),Bn!==null&&wn.offset(-Bn.startX,-Bn.startY)),Bn=Fe[2],Ln!==Pa){var cn=ht.computeAngle(Ne,Ln,Bn);Ne.Kb=cn}cn=wn.x-y.x;var br=wn.y-y.y;Le.free(wn),Fn(Fe)}else if(De<-Mt||De>=Mt)Fe=Le.alloc(),ht.vg(),ht.computeMidPoint(Fe),Bn=ht.midAngle,Ln!==Pa&&(cn=ht.computeAngle(Ne,Ln,Bn),Ne.Kb=cn),cn=Fe.x-y.x,br=Fe.y-y.y,Le.free(Fe);else{if(cn=0,0<=De?(br=St.M(De),Fe=De<Mt-1?St.M(De+1):br):(cn=Mt+De,br=St.M(cn),Fe=0<cn?St.M(cn-1):br),br.Xa(Fe)){0<=De?(Bn=0<De?St.M(De-1):br,cn=De<Mt-2?St.M(De+2):Fe):(Bn=cn<Mt-1?St.M(cn+1):br,cn=1<cn?St.M(cn-2):Fe),wn=Bn.Bf(br);var dr=Fe.Bf(cn);Bn=wn>dr+10?0<=De?Bn.ab(br):br.ab(Bn):dr>wn+10?0<=De?Fe.ab(cn):cn.ab(Fe):0<=De?Bn.ab(cn):cn.ab(Bn)}else Bn=0<=De?br.ab(Fe):Fe.ab(br);Ln!==Pa&&(cn=ht.computeAngle(Ne,Ln,Bn),Ne.Kb=cn),cn=br.x+(Fe.x-br.x)*_e-y.x,br=br.y+(Fe.y-br.y)*_e-y.y}Ne.measure(1/0,1/0,0,0),Fe=Ne.measuredBounds,wn=Ne.naturalBounds;var ti=0;Ne instanceof Tr&&(ti=Ne.strokeWidth),dr=wn.width+ti;var vi=wn.height+ti;Qt.reset(),Qt.translate(-Fe.x,-Fe.y),Qt.scale(Ne.scale,Ne.scale),Qt.rotate(Ln===Pa?Ne.angle:Bn,dr/2,vi/2),Ln!==tg&&Ln!==ng||Qt.rotate(90,dr/2,vi/2),Ln!==eg&&Ln!==rg||Qt.rotate(-90,dr/2,vi/2),Ln===$m&&(45<Bn&&135>Bn||225<Bn&&315>Bn)&&Qt.rotate(-Bn,dr/2,vi/2),wn=new on(0,0,dr,vi),ie.xi(wn,Ze),Qt.Ga(ie),Ze=-ie.x+ti/2*Ne.scale,Ne=-ie.y+ti/2*Ne.scale,Me.assign(_n),ti=isNaN(_n.x);var Co=isNaN(_n.y);if(ti||Co){dr=dr/2+3,vi=vi/2+3;var Lo=45<=Bn&&135>=Bn,ha=225<=Bn&&315>=Bn;Ln===Pa&&(Lo||ha)?(Me.x=Co?dr:_n.y,Me.y=ti?vi:_n.x,Lo?0<=De||isNaN(De)&&.5>_e||!ti||(Me.y=-vi):ha&&((0<=De||isNaN(De)&&.5>_e)&&ti&&(Me.y=-vi),Co&&(Me.x=-dr))):(ti&&(Me.x=0<=De||isNaN(De)&&.5>_e?dr:-dr),Co&&(Me.y=-vi),Me.rotate(Bn))}else Me.rotate(Bn);cn+=Me.x,br+=Me.y,wn.set(Fe),wn.h(cn+Ze,br+Ne,Fe.width,Fe.height),Xt.push(wn),x.ed(wn)}}if(nt!==null)for(b=nt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),ra(E,x.width||0,x.height||0),Sr.free(Qt),Le.free(ie),Le.free(Me)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Xr||a instanceof Cn){var b=a,E=null;a instanceof Xr&&(E=a,b=E.adornedPart);var et=a instanceof Xr?null:b.path,nt=a.j;if(nt.length!==0){var st=0;if(et!==null&&st<nt.length){var ht=nt[st];st++,et.arrange(ht.x-a.jg.x,ht.y-a.jg.y,ht.width,ht.height)}for(ht=0;ht<x;ht++){var pt=y[ht];if(pt!==et&&st<nt.length){var St=nt[st];st++,pt.arrange(St.x-a.jg.x,St.y-a.jg.y,St.width,St.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Cn)for(et=a.labelNodes;et.next();){var Mt=a;nt=et.value,st=nt.segmentIndex,ht=nt.segmentFraction;var Gt=nt.alignmentFocus;if(pt=nt.segmentOrientation,St=nt.segmentOffset,isNaN(st)){var Xt=Mt.ua,Qt=On();Xt.Qu(ht,Qt);var ie=Le.allocAt(Qt[0],Qt[1]);ie.add(Mt.i(0)),Xt.type===Pn.j||(Xt=Xt.figures.first()),ie.offset(-Xt.startX,-Xt.startY),Xt=Qt[2],pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Xt),nt.angle=Mt),Mt=ie.x;var Me=ie.y;Le.free(ie),Fn(Qt)}else if(st<-x||st>=x)Qt=Le.alloc(),Xt=Mt,Me=Qt,Xt.vg(),Xt.computeMidPoint(Me),Xt=Mt.midAngle,pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Xt),nt.angle=Mt),Mt=Qt.x,Me=Qt.y,Le.free(Qt);else{if(ie=0,0<=st?(Qt=y.s[st],Me=st<x-1?y.s[st+1]:Qt):(ie=x+st,Qt=y.s[ie],Me=0<ie?y.s[ie-1]:Qt),Qt.Xa(Me)){0<=st?(Xt=0<st?y.s[st-1]:Qt,ie=st<x-2?y.s[st+2]:Me):(Xt=ie<x-1?y.s[ie+1]:Qt,ie=1<ie?y.s[ie-2]:Me);var xe=Xt.Bf(Qt),Ne=Me.Bf(ie);Xt=xe>Ne+10?0<=st?Xt.ab(Qt):Qt.ab(Xt):Ne>xe+10?0<=st?Me.ab(ie):ie.ab(Me):0<=st?Xt.ab(ie):ie.ab(Xt)}else Xt=0<=st?Qt.ab(Me):Me.ab(Qt);pt!==Pa&&(Mt=Mt.computeAngle(nt,pt,Xt),nt.angle=Mt),Mt=Qt.x+(Me.x-Qt.x)*ht,Me=Qt.y+(Me.y-Qt.y)*ht}if(Gt.ys())nt.location=new Le(Mt,Me);else{Gt.Mc()&&(Gt=Fr),Qt=Sr.alloc(),Qt.reset(),Qt.scale(nt.scale,nt.scale),Qt.rotate(nt.angle,0,0);var Fe=nt.naturalBounds;ie=on.allocAt(0,0,Fe.width,Fe.height),xe=Le.alloc(),xe.xi(ie,Gt),Qt.Ga(xe),Gt=-xe.x,Ne=-xe.y;var De=Fe.width,_e=Fe.height;Fe=Le.alloc(),Fe.assign(St);var Ze=isNaN(St.x),Ln=isNaN(St.y);if(Ze||Ln){De=De/2+3,_e=_e/2+3;var _n=45<=Xt&&135>=Xt,Bn=225<=Xt&&315>=Xt;pt===Pa&&(_n||Bn)?(Fe.x=Ln?De:St.y,Fe.y=Ze?_e:St.x,_n?0<=st||isNaN(st)&&.5>ht||!Ze||(Fe.y=-_e):Bn&&((0<=st||isNaN(st)&&.5>ht)&&Ze&&(Fe.y=-_e),Ln&&(Fe.x=-De))):(Ze&&(Fe.x=0<=st||isNaN(st)&&.5>ht?De:-De),Ln&&(Fe.y=-_e),Fe.rotate(Xt))}else Fe.rotate(Xt);Mt+=Fe.x,Me+=Fe.y,Qt.pp(ie),Gt+=ie.x,Ne+=ie.y,st=Le.allocAt(Mt+Gt,Me+Ne),nt.move(st),Le.free(st),Le.free(Fe),Le.free(xe),on.free(ie),Sr.free(Qt)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Le.free(b)}};function i1(a,y,x,b){if(gs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Xr&&a.type===Sn.Link&&a.adornedObject instanceof Tr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Cn&&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 Xr&&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),ho(b,!1)}}function Up(){this.xa="Base"}Ye(Up,yo),Up.prototype.measure=function(a,y,x,b,E,et,nt){var st=a.Pb();a.graduatedBounds=[];var ht=st.margin,pt=ht.right+ht.left,St=ht.top+ht.bottom;st.measure(y,x,et,nt);var Mt=st.measuredBounds,Gt=new on(-ht.left,-ht.top,Math.max(Mt.width+pt,0),Math.max(Mt.height+St,0));a.graduatedBounds.push(Gt),E.assign(Gt);for(var Xt=st.geometry,Qt=st.strokeWidth,ie=Xt.flattenedSegments,Me=Xt.flattenedLengths,xe=Xt.flattenedTotalLength,Ne=ie.length,Fe=0,De=0,_e=On(),Ze=0;Ze<Ne;Ze++){var Ln=ie[Ze],_n=[];De=Fe=0;for(var Bn=Ln.length,wn=0;wn<Bn;wn+=2){var cn=Ln[wn],br=Ln[wn+1];if(wn!==0){var dr=180*Math.atan2(br-De,cn-Fe)/Math.PI;0>dr&&(dr+=360),_n.push(dr)}Fe=cn,De=br}_e.push(_n)}if(a.graduatedIntervals===null){for(var ti=[],vi=a.O.s,Co=vi.length,Lo=0;Lo<Co;Lo++){var ha=vi[Lo],ko=[];if(ti.push(ko),ha.visible){var fh=ha.interval;if(!(0>fh)){for(var no=0;no<Co;no++)if(no!==Lo){var bl=vi[no];if(bl.visible&&ha.constructor===bl.constructor){var ca=bl.interval;ca>fh&&ko.push(ca)}}}}}a.graduatedIntervals=ti}var dh=a.graduatedIntervals,Ss=a.O.s,Zs=Ss.length,is=0,Va=0,qh=xe;a.graduatedMarks=[];for(var Pl,Vd=0;Vd<Zs;Vd++){var os=Ss[Vd];if(Pl=[],os.visible&&os!==st){var fa=Math.abs(os.interval),Mg=a.graduatedTickUnit;if(!(2>Mg*fa*xe/a.graduatedRange&&os.graduatedSkip===null)){var Df=Me[0][0],Il=0,Ka=0;Va=xe*os.graduatedStart-1e-4,qh=xe*os.graduatedEnd+1e-4;var Gc=Mg*fa,as=a.graduatedTickBase;if(as<a.graduatedMin){var tc=(a.graduatedMin-as)/Gc;tc=tc%1===0?tc:Math.floor(tc+1),as+=tc*Gc}else as>a.graduatedMin+Gc&&(as-=Math.floor((as-a.graduatedMin)/Gc)*Gc);for(var zv=dh[Vd],Tg=as,Gy=1e-6*a.graduatedMax,au=1;as<=a.graduatedMax+Gy;au++){t:{for(var ku=zv.length,Bf=0;Bf<ku;Bf++){var ec=(as-a.graduatedTickBase)%(zv[Bf]*a.graduatedTickUnit),Kd=1e-6*a.graduatedTickUnit;if(ec<Kd&&ec>-Kd){var nc=!1;break t}}nc=!0}if(nc&&(as>a.graduatedMax&&(as=a.graduatedMax),os.graduatedSkip===null||os instanceof yi&&!os.graduatedSkip(as,os)||os instanceof Tr&&!os.graduatedSkip(as,os))&&(is=(as-a.graduatedMin)*xe/a.graduatedRange,is>xe&&(is=xe),Va<=is&&is<=qh)){for(var su=_e[Il][Ka],ph=Me[Il][Ka];Il<Me.length;){for(;is>Df&&Ka<Me[Il].length-1;)Ka++,su=_e[Il][Ka],ph=Me[Il][Ka],Df+=ph;if(is<=Df)break;Il++,Ka=0,su=_e[Il][Ka],ph=Me[Il][Ka],Df+=ph}var Za=ie[Il],Rl=Za[2*Ka],Gv=Za[2*Ka+1],Eu=(is-(Df-ph))/ph,Zd=new Le(Rl+(Za[2*Ka+2]-Rl)*Eu+Qt/2-Xt.bounds.x,Gv+(Za[2*Ka+3]-Gv)*Eu+Qt/2-Xt.bounds.y);Zd.scale(st.scale,st.scale);t:{var Cl=su,Uc=_e[Il];if(!(.5005>Eu&&.4995<Eu)){var _l=Cl;if(.5>Eu?0<Ka?_l=Uc[Ka-1]:Ge.$(Za[0],Za[Za.length-2])&&Ge.$(Za[1],Za[Za.length-1])&&(_l=Uc[Uc.length-1]):.5<Eu&&(Ka+1<Uc.length?_l=Uc[Ka+1]:Ge.$(Za[0],Za[Za.length-2])&&Ge.$(Za[1],Za[Za.length-1])&&(_l=Uc[0])),Cl!==_l){var If=Math.abs(Cl-_l);if(180<If&&(Cl<_l?Cl+=360:_l+=360,If=Math.abs(Cl-_l)),5e-4>Eu||.9995<Eu){su=(Cl+_l)/2%360;break t}if(10>If){var Xd=1-Math.abs(.5-Eu);su=(Cl*Xd+_l*(1-Xd))%360;break t}}}su=Cl}if(os instanceof yi){var cl="";os.graduatedFunction!==null?(cl=os.graduatedFunction(as,os),cl=cl!=null?cl.toString():""):cl=(+as.toFixed(2)).toString(),cl!==""&&Pl.push({$l:Zd,angle:su,text:cl})}else Pl.push({$l:Zd,angle:su})}as=Tg+au*Gc}}}a.graduatedMarks.push(Pl)}Fn(_e);var zo=a.graduatedMarks;if(zo!==null)for(var Lg=b.length,Ta=0;Ta<Lg;Ta++){var ro=b[Ta],La=zo[Ta];if(ro.visible&&ro!==st&&La.length!==0){if(ro instanceof Tr){var Mu=a,gh=E,Wc=ro.alignmentFocus;Wc.Mc()&&(Wc=ai);var Uy=ro.angle;ro.Kb=0,ro.measure(1/0,1/0,0,0),ro.Kb=Uy;var Uv=ro.measuredBounds,Yd=Uv.width,Hc=Uv.height,Rf=on.allocAt(0,0,Yd,Hc),Xa=Le.alloc();Xa.xi(Rf,Wc),on.free(Rf);for(var Tu=-Xa.x,kl=-Xa.y,Bs=new on,rc=La.length,Jd=0;Jd<rc;Jd++)for(var ic=La[Jd],Wv=ic.$l.x,Qd=ic.$l.y,Yi=ic.angle,fl=0;4>fl;fl++){switch(fl){case 0:Xa.h(Tu,kl);break;case 1:Xa.h(Tu+Yd,kl);break;case 2:Xa.h(Tu,kl+Hc);break;case 3:Xa.h(Tu+Yd,kl+Hc)}Xa.rotate(Yi+ro.angle),Xa.offset(Wv,Qd),Jd===0&&fl===0?Bs.h(Xa.x,Xa.y,0,0):Bs.Ye(Xa),Xa.offset(-Wv,-Qd),Xa.rotate(-Yi-ro.angle)}Le.free(Xa),Mu.graduatedBounds!==null&&Mu.graduatedBounds.push(Bs),Ai(gh,Bs.x,Bs.y,Bs.width,Bs.height)}else if(ro instanceof yi){var Xs=a,Hv=E;Xs.temporaryTextBlock===null&&(Xs.temporaryTextBlock=new yi);var ss=Xs.temporaryTextBlock;S1(ss,ro);var mh=ro.alignmentFocus;mh.Mc()&&(mh=ai);for(var Ys=ro.segmentOrientation,$d=ro.segmentOffset,oc=new on,Ag=0,qd=0,zl=0,Vc=0,ac=0,tp=La.length,vh=0;vh<tp;vh++){var lu=La[vh];Ag=lu.$l.x,qd=lu.$l.y,zl=lu.angle,ac=Vc=ro.angle,Ys!==Pa&&(ac=Ys===qp||Ys===Qm?zl+ro.angle:zl,Vc=Cn.computeAngle(Ys,ac)),ss.Kb=Vc,ss.text=lu.text||"",ss.measure(1/0,1/0,0,0);var yh=ss.measuredBounds,Lu=ss.naturalBounds,Sh=Lu.width,Kc=Lu.height,El=Sr.alloc();El.reset(),El.translate(-yh.x,-yh.y),El.scale(ss.scale,ss.scale),El.rotate(ac,Sh/2,Kc/2),Ys!==tg&&Ys!==ng||El.rotate(90,Sh/2,Kc/2),Ys!==eg&&Ys!==rg||El.rotate(-90,Sh/2,Kc/2),Ys===$m&&(45<zl&&135>zl||225<zl&&315>zl)&&El.rotate(-zl,Sh/2,Kc/2);var _f=on.allocAt(0,0,Sh,Kc),xh=Le.alloc();xh.xi(_f,mh),El.Ga(xh);var zf=-xh.x,Wy=-xh.y,Au=Le.alloc();Au.assign($d),isNaN(Au.x)&&(Au.x=Sh/2+3),isNaN(Au.y)&&(Au.y=-(Kc/2+3)),Au.rotate(zl),Ag+=Au.x+zf,qd+=Au.y+Wy;var Zc=new on(Ag,qd,yh.width,yh.height),Ng=new on(yh.x,yh.y,yh.width,yh.height),Hy=new on(Lu.x,Lu.y,Lu.width,Lu.height);lu.Sz=Vc,lu.lineCount=ss.lineCount,lu.lines=[ss.Cb,ss.Ih,ss.df,ss.Le,ss.Qc,ss.Qb,ss.ze],lu.actualBounds=Zc,lu.measuredBounds=Ng,lu.naturalBounds=Hy,vh===0?oc.assign(Zc):oc.ed(Zc),Le.free(Au),Le.free(xh),on.free(_f),Sr.free(El)}Xs.graduatedBounds!==null&&Xs.graduatedBounds.push(oc),Ai(Hv,oc.x,oc.y,oc.width,oc.height)}ho(ro,!1)}}},Up.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var et=a.graduatedBounds,nt=0,st=et[nt];nt++,b!==null&&b.arrange(st.x-x.x,st.y-x.y,st.width,st.height);for(var ht=y.length,pt=0;pt<ht;pt++){var St=y[pt];st=E[pt],St.visible&&St!==b&&st.length!==0&&(st=et[nt],nt++,St.arrange(st.x-x.x,st.y-x.y,st.width,st.height))}a.graduatedBounds=null}}},Up.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,et=E.width,nt=E.height;E=y instanceof es,y.save(),y.beginPath(),y.rect(-1,-1,et+1,nt+1),y.clip(),y.Se(),et=a.Pb(),et.gc(y,x),nt=a.Df()*x.scale,0>=nt&&(nt=1);for(var st=et.actualBounds,ht=a.O.s,pt=a.graduatedMarks,St=ht.length,Mt=0;Mt<St;Mt++){var Gt=ht[Mt],Xt=pt[Mt],Qt=Xt.length;if(Gt.visible&&Gt!==et&&Xt.length!==0){if(Gt instanceof Tr){if(!(2>a.graduatedTickUnit*Gt.interval*et.geometry.flattenedTotalLength/a.graduatedRange*nt&&Gt.graduatedSkip===null)){var ie=Gt.measuredBounds,Me=Gt.strokeWidth*Gt.scale,xe=Gt.alignmentFocus;xe.Mc()&&(xe=ai);for(var Ne=0;Ne<Qt;Ne++){var Fe=Xt[Ne].$l,De=Xt[Ne].angle,_e=xe,Ze=Gt.Ab;Ze.reset(),Ze.translate(Fe.x+st.x,Fe.y+st.y),Ze.rotate(De+Gt.angle,0,0),Ze.translate(-ie.width*_e.x+_e.offsetX+Me/2,-ie.height*_e.y+_e.offsetY+Me/2),Ze.scale(Gt.scale,Gt.scale),Us(Gt,!1),Gt.wh.set(Gt.Ab),Gt.Kk=Gt.scale,Ls(Gt,!1),Gt.gc(y,x),E&&(a.svg.appendChild(Gt.svg),Gt.svg=null),Gt.Ab.reset()}}}else if(Gt instanceof yi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new yi),ie=a.temporaryTextBlock,S1(ie,Gt),Me=0;Me<Qt;Me++)xe=Xt[Me],xe.actualBounds&&xe.measuredBounds&&xe.naturalBounds&&(ie.ec=xe.text||"",ie.Kb=xe.Sz||0,ie.Gc=xe.lineCount||0,Ne=xe.lines,Ne!==void 0&&(ie.Cb=Ne[0],ie.Ih=Ne[1],ie.df=Ne[2],ie.Le=Ne[3],ie.Qc=Ne[4],ie.Qb=Ne[5],ie.ze=Ne[6]),xe.naturalBounds&&(ie.dc=xe.naturalBounds),xe.actualBounds&&(Ne=xe.actualBounds,ie.arrange(Ne.x,Ne.y,Ne.width,Ne.height)),Ne=xe.actualBounds,ie.arrange(Ne.x,Ne.y,Ne.width,Ne.height),Fe=xe.measuredBounds,xe=xe.naturalBounds,De=ie.Ab,De.reset(),De.translate(Ne.x+st.x,Ne.y+st.y),De.translate(-Fe.x,-Fe.y),ie.no(De,xe.x,xe.y,xe.width,xe.height),Us(ie,!1),ie.wh.set(ie.Ab),ie.Kk=ie.scale,Ls(ie,!1),ie.Ng=Gt.part,ie.Me=Gt.panel,ie.gc(y,x),ie.Me=null,ie.Ng=null,E&&(a.svg.appendChild(ie.svg),ie.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Sn(a,y){if(ze.call(this),this.na=null,a===void 0)this.na=Sn.Position;else if(typeof a=="string"){var x=ol.I(a);x!==null&&(this.na=x)}else a instanceof yo?this.na=a:a&&(this.na=Sn.Position,y=a);this.na===null&&je("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Sn.Grid?1048576:0),this.O=new yn,this.yb=us,this.Tm=jo,this.Uf=Cr,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Un,this.jn=lo,this.kn=Ti,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ye(Sn,ze),Sn.prototype.cloneProtected=function(a){ze.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},Sn.prototype.Af=function(a){ze.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},Sn.prototype.copy=function(){var a=ze.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 et=a.O,nt=et.count;if(et.Gb(nt,E),et=a.part,et!==null){et.Rh=null,E.portId!==null&&et instanceof Nn&&(et.Te=!0);var st=a.diagram;st!==null&&st.undoManager.isUndoingRedoing||et.cb($i,"elements",a,null,E,null,nt)}}return a}return null},te=Sn.prototype,te.toString=function(){return"Panel("+this.type.name+")#"+gi(this)},te.Pn=function(a){ze.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},te.hh=function(a,y){if(this.na===Sn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Sn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Sn.Table)if(a.yc(),a instanceof es){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===Sn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];x&&st===b&&(a.clipInsteadOfFill=!0),st.gc(a,y),x&&st===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,et=a.actualBounds,nt=a.naturalBounds,st=!0,ht=0;ht<E;ht++){var pt=b[ht];if(pt!==void 0&&pt.actual!==0)if(st)st=!1;else{if(x){if(pt.position>nt.height)continue}else if(pt.position>nt.width)continue;var St=pt.separatorStrokeWidth;isNaN(St)&&(St=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=pt.separatorStroke;if(Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),St!==0&&Mt!==null){Ki(a,y,Mt,!1,!1,nt,et),Mt=!1;var Gt=pt.separatorDashArray;Gt===null&&(Gt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Gt!==null&&(Mt=!0,y.js(Gt,0)),y.beginPath(),Gt=pt.position+St,x?Gt>nt.height&&(St-=Gt-nt.height):Gt>nt.width&&(St-=Gt-nt.width),pt=pt.position+St/2,y.lineWidth=St,St=a.yb,x?(pt+=St.top,Gt=nt.width-St.right,y.moveTo(St.left,pt),y.lineTo(Gt,pt)):(pt+=St.left,Gt=nt.height-St.bottom,y.moveTo(pt,St.top),y.lineTo(pt,Gt)),y.stroke(),y.Se(),Mt&&y.fs()}}}}function Pm(a,y,x,b,E){for(var et=b.length,nt=a.actualBounds,st=a.naturalBounds,ht=a1(a,!0),pt=a1(a,!1),St=0;St<et;St++){var Mt=b[St];if(Mt!==void 0&&Mt.background!==null&&Mt.coversSeparators!==E&&Mt.actual!==0){var Gt=x?nt.height:nt.width;if(!(Mt.position>Gt)){var Xt=Mt.Wc(),Qt=Mt.separatorStrokeWidth;isNaN(Qt)&&(Qt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ie=Mt.separatorStroke;ie===null&&(ie=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ie===null||Mt.index===(x?ht:pt))&&(Qt=0),Xt-=Qt,Qt=Mt.position+Qt,Xt+=Mt.actual,Qt+Xt>Gt&&(Xt=Gt-Qt),0>=Xt||(Gt=a.yb,Ki(a,y,Mt.background,!0,!1,st,nt),x?y.fillRect(Gt.left,Qt+Gt.top,nt.width-(Gt.left+Gt.right),Xt):y.fillRect(Qt+Gt.left,Gt.top,Xt,nt.height-(Gt.top+Gt.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"}te.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},te.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(this.type===Sn.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===Sn.Grid||this.na===Sn.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},te.nk=function(){return!0},te.$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,et=0,nt=0;nt<y.length;nt++)if(y[nt].Ed()){var st=y[nt].actualBounds;E=nt===0?st.x:Math.min(st.x,E),et=nt===0?st.y:Math.min(st.y,et)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-et)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else ze.prototype.$o.call(this,a,y,x,b)},te.Sj=function(a,y,x,b,E){var et=this.se(),nt=this.transform,st=1/(nt.m11*nt.m22-nt.m12*nt.m21),ht=nt.m22*st,pt=-nt.m12*st,St=-nt.m21*st,Mt=nt.m11*st,Gt=st*(nt.m21*nt.dy-nt.m22*nt.dx),Xt=st*(nt.m12*nt.dx-nt.m11*nt.dy);if(this.areaBackground!==null)return nt=this.actualBounds,Ge.Ff(nt.left,nt.top,nt.right,nt.bottom,a,y,x,b,E);if(this.background!==null)return et=a*ht+y*St+Gt,st=a*pt+y*Mt+Xt,a=x*ht+b*St+Gt,ht=x*pt+b*Mt+Xt,E.h(0,0),x=this.naturalBounds,et=Ge.Ff(0,0,x.width,x.height,et,st,a,ht,E),E.transform(nt),et;et||(ht=1,St=pt=0,Mt=1,Xt=Gt=0),st=a*ht+y*St+Gt,a=a*pt+y*Mt+Xt,ht=x*ht+b*St+Gt,x=x*pt+b*Mt+Xt,E.h(ht,x),b=(ht-st)*(ht-st)+(x-a)*(x-a),pt=!1,Mt=this.O.s,Xt=Mt.length,St=Le.alloc(),Gt=null,y=1/0;var Qt=null,ie=this.isClipping&&this.na===Sn.Spot;ie&&(Qt=Le.alloc(),Gt=this.Pb(),(pt=Gt.Sj(st,a,ht,x,Qt))&&(y=(st-Qt.x)*(st-Qt.x)+(a-Qt.y)*(a-Qt.y)));for(var Me=0;Me<Xt;Me++){var xe=Mt[Me];xe.visible&&xe!==Gt&&xe.Sj(st,a,ht,x,St)&&(pt=!0,xe=(st-St.x)*(st-St.x)+(a-St.y)*(a-St.y),xe<b&&(b=xe,E.set(St)))}return ie&&(y>b&&E.set(Qt),Le.free(Qt)),Le.free(St),et&&E.transform(nt),pt},te.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ze.prototype.Gj.call(this)},te.v=function(a){if(!gs(this)){ze.prototype.v.call(this,a),a=null,(this.na===Sn.Auto||this.na===Sn.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 et=Da(E,!1);(E instanceof ba||E instanceof Sn||E instanceof yi||et!==fn)&&E.v(!0)}}}},te.Uj=function(){if(!gs(this)){ho(this,!0),Yl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},te.Uk=function(){if(!(this.l&2048)){Us(this,!0),Ls(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},te.Wu=function(){Ls(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},te.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var et=this.desiredSize,nt=this.minSize;x===void 0&&(x=nt.width,b=nt.height),x=Math.max(x,nt.width),b=Math.max(b,nt.height);var st=this.maxSize;isNaN(et.width)||(a=Math.min(et.width,st.width)),isNaN(et.height)||(y=Math.min(et.height,st.height)),a=Math.max(x,a),y=Math.max(b,y);var ht=this.yb;a=Math.max(a-ht.left-ht.right,0),y=Math.max(y-ht.top-ht.bottom,0);var pt=this.O.s;pt.length!==0&&this.na.measure(this,a,y,pt,E,x,b),a=E.width+ht.left+ht.right,ht=E.height+ht.top+ht.bottom,isFinite(et.width)&&(a=et.width),isFinite(et.height)&&(ht=et.height),a=Math.min(st.width,a),ht=Math.min(st.height,ht),a=Math.max(nt.width,a),ht=Math.max(nt.height,ht),a=Math.max(x,a),ht=Math.max(b,ht),ra(E,a,ht),ra(this.naturalBounds,a,ht),this.Ge(0,0,a,ht)},te.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 bu(a){return a.part!==null?a.part.locationObject:null}te.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=Da(this,!0);var et=this.measuredBounds;y=et.width,et=et.height;var nt=this.Kg,st=nt.left+nt.right;switch(nt=nt.top+nt.bottom,y===x&&et===b&&(a=fn),a){case fn:(y>x||et>b)&&(this.v(),this.measure(y>x?x:y,et>b?b:et,0,0));break;case gn:this.v(!0),this.measure(x+st,b+nt,0,0);break;case Jn:this.v(!0),this.measure(x+st,et+nt,0,0);break;case ar:this.v(!0),this.measure(y+st,b+nt,0,0)}}this.na.arrange(this,E,this.jg)}},te.gh=function(a){var y=this.naturalBounds,x=bu(this);if(No(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Le.allocAt(0,0);b--;){var et=y[b];if((et.visible||et===x)&&(gr(E.set(a),et.transform),et.ca(E)))return Le.free(E),!0}return Le.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},te.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},te.qm=function(a,y){if(y(this,a),a instanceof Sn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Oc(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 et=y[E];et instanceof Sn&&s1(a,et,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Sn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}te.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Sn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var et=u1(a,y[E],x);if(et!==null)return et}}return null}te.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Wp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Sn){var et=E.fb(a);if(et!==null)return et}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 Sn?x=Math.max(x,h1(E)):E instanceof Tr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}te.se=function(){return!(this.type===Sn.TableRow||this.type===Sn.TableColumn)};function nh(a){return a.type===Sn.TableRow||a.type===Sn.TableColumn}te.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(),et=this.se(),nt=et?a:gr(Le.allocAt(a.x,a.y),this.transform),st=this.diagram,ht=10,pt=5;if(st!==null&&(ht=st.Ql("extraTouchArea"),pt=ht/2),No(-(pt*E),-(pt*E),b.width+ht*E,b.height+ht*E,nt.x,nt.y)){if(!this.isAtomic){E=this.O.s;var St=E.length;if(st=Le.alloc(),pt=(ht=this.isClipping&&this.na===Sn.Spot)?this.Pb():null,ht&&(pt.se()?gr(st.set(a),pt.transform):st.set(a),!pt.ca(st)))return Le.free(st),et||Le.free(nt),null;for(var Mt=bu(this);St--;){var Gt=E[St];if((Gt.visible||Gt===Mt)&&(Gt.se()?gr(st.set(a),Gt.transform):st.set(a),!ht||Gt!==pt)){var Xt=null;if(Gt instanceof Sn?Xt=Gt.ic(st,y,x):Gt.pickable===!0&&Gt.ca(st)&&(Xt=Gt),Xt!==null&&(y!==null&&(Xt=y(Xt)),Xt!==null&&(x===null||x(Xt))))return Le.free(st),et||Le.free(nt),Xt}}Le.free(st)}return this.background===null&&this.areaBackground===null?(et||Le.free(nt),null):(a=No(0,0,b.width,b.height,nt.x,nt.y)?this:null,et||Le.free(nt),a)}return et||Le.free(nt),null},te.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,et=this.se(),nt=et?a:gr(Le.allocAt(a.x,a.y),this.transform);if(E=No(0,0,E.width,E.height,nt.x,nt.y),nh(this)||E){if(!this.isAtomic){for(var st=this.O.s,ht=st.length,pt=Le.alloc(),St=bu(this);ht--;){var Mt=st[ht];if(Mt.visible||Mt===St){Mt.se()?gr(pt.set(a),Mt.transform):pt.set(a);var Gt=Mt;Mt=Mt instanceof Sn?Mt:null,(Mt!==null?Mt.ji(pt,y,x,b):Gt.ca(pt))&&Gt.pickable!==!1&&(y!==null&&(Gt=y(Gt)),Gt===null||x!==null&&!x(Gt)||b.add(Gt))}}Le.free(pt)}return et||Le.free(nt),E&&(this.background!==null||this.areaBackground!==null)}return et||Le.free(nt),!1},te.Cf=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var nt=et;if(et===void 0&&(nt=Sr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&Sr.free(nt),!0;if(this.Yc(a,nt)){if(!this.isAtomic)for(var st=bu(this),ht=this.O.s,pt=ht.length;pt--;){var St=ht[pt];if(St.visible||St===st){var Mt=St.actualBounds,Gt=this.naturalBounds;Mt.x>Gt.width||Mt.y>Gt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height||(Mt=St,St=St instanceof Sn?St:null,Gt=Sr.alloc(),Gt.set(nt),(St!==null?St.Cf(a,y,x,b,E,Gt):Po(Mt,a,b,Gt))&&(y!==null&&(Mt=y(Mt)),Mt===null||x!==null&&!x(Mt)||E.add(Mt)),Sr.free(Gt))}}return et===void 0&&Sr.free(nt),b}return et===void 0&&Sr.free(nt),!1};function v0(a,y,x,b){for(var E=a.O.s,et=E.length;et--;){var nt=E[et];if(nt.visible){var st=nt.actualBounds,ht=a.naturalBounds;st.x>ht.width||st.y>ht.height||0>st.x+st.width||0>st.y+st.height||(nt instanceof Sn&&v0(nt,y,x,b),y!==null&&(nt=y(nt)),nt===null||x!==null&&!x(nt)||b.add(nt))}}}te.og=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var nt=this.naturalBounds,st=this.se(),ht=st?a:gr(Le.allocAt(a.x,a.y),this.transform),pt=st?y:gr(Le.allocAt(y.x,y.y),this.transform),St=ht.Bf(pt),Mt=0<ht.x&&ht.x<nt.width&&0<ht.y&&ht.y<nt.height||Ur(ht.x,ht.y,0,0,0,nt.height)<=St||Ur(ht.x,ht.y,0,nt.height,nt.width,nt.height)<=St||Ur(ht.x,ht.y,nt.width,nt.height,nt.width,0)<=St||Ur(ht.x,ht.y,nt.width,0,0,0)<=St;if(nt=ht.zd(0,0)<=St&&ht.zd(0,nt.height)<=St&&ht.zd(nt.width,0)<=St&&ht.zd(nt.width,nt.height)<=St,st||(Le.free(ht),Le.free(pt)),Mt){if(!this.isAtomic){ht=Le.alloc(),pt=Le.alloc(),St=bu(this);for(var Gt=this.O.s,Xt=Gt.length;Xt--;){var Qt=Gt[Xt];if(Qt.visible||Qt===St){var ie=Qt.actualBounds,Me=this.naturalBounds;(!st||!(ie.x>Me.width||ie.y>Me.height||0>ie.x+ie.width||0>ie.y+ie.height))&&(Qt.se()?(ie=Qt.transform,gr(ht.set(a),ie),gr(pt.set(y),ie)):(ht.set(a),pt.set(y)),ie=Qt,Qt=Qt instanceof Sn?Qt:null,(Qt!==null?Qt.og(ht,pt,x,b,E,et):ie.tx(ht,pt,E))&&(x!==null&&(ie=x(ie)),ie===null||b!==null&&!b(ie)||et.add(ie)))}}Le.free(ht),Le.free(pt)}return E?Mt:nt}return!1};function y0(a){var y=null;return a instanceof Tr&&(y=a.spot1,y===jo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=qr),y}function S0(a){var y=null;return a instanceof Tr&&(y=a.spot2,y===jo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=oo),y}te.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},te.M=function(a){return this.O.M(a)},te.Gb=function(a,y){y instanceof qn&&je("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&je("Cannot make a Panel contain itself: "+this.toString()),je("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&je("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!==Sn.Grid||y instanceof Tr||je("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Sn.Graduated||y instanceof Tr||y instanceof yi||je("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 Yn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var et=-1,nt=this.O.s,st=nt.length,ht=0;ht<st;ht++)if(nt[ht]===y){et=ht;break}if(et!==-1){if(et===a||et+1>=E.count&&a>=E.count)return;E.mb(et),b=et}else je("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),gs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Sn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Nn&&(x.Te=!0),x.Te&&x instanceof Nn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(vo,"elements",this,y,null,b,null),x.cb($i,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}te.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)},te.mb=function(a){0<=a&&this.pc(a,!0)},te.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),ho(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var et=this.part;et!==null&&(et.Rh=null,et.ag=NaN,et.Wb(),et instanceof Nn&&(b instanceof Sn?b.qm(b,function(nt,st){W0(et,st,y)}):W0(et,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||et.cb(vo,"elements",this,b,null,a,null))},te.Fb=function(a){0>a&&An(a,">= 0",Sn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new co;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb($i,"rowdefs",this,null,x,null,a)}return y[a]},te.oA=function(a){if(0>a&&An(a,">= 0",Sn,"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(vo,"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 co?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}te.Eb=function(a){0>a&&An(a,">= 0",Sn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new co;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb($i,"coldefs",this,null,x,null,a)}return y[a]},te.jA=function(a){if(0>a&&An(a,">= 0",Sn,"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(vo,"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 co?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}te.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Em(y,a),this},te.Hy=function(a,y){return(a=this.Fb(a))&&Em(a,new co(y)),this},te.By=function(a,y){return(a=this.Eb(a))&&Em(a,new co(y)),this},te.nz=function(a){if(0>a||this.type!==Sn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var et=x[E];if(et!==void 0&&(y+=et.total,a<y))break}return E},te.fz=function(a){if(0>a||this.type!==Sn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var et=x[E];if(et!==void 0&&(y+=et.total,a<y))break}return E},te.Fz=function(a,y){if(y===void 0&&(y=new Le(NaN,NaN)),this.type!==Sn.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)},te.Gz=function(a){if(this.type!==Sn.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 Hs(a){var y=a.allBindings;if(y===null)a.data!==null&&je("Template cannot have .data be non-null: "+a),a.allBindings=y=new yn;else if(y._isFrozen)return;var x=new yn;x0(a,!1),a.qm(a,function(pt,St){St.th();var Mt=St.localBindings;if(Mt!==null)for(xf(St,!1),Mt=Mt.iterator;Mt.next();){var Gt=Mt.value;Gt.mode===cg&&xf(St,!0);var Xt=Gt.sourceName;Xt!==null&&(Xt==="/"&&x0(pt,!0),Xt=MS(Gt,pt,St),Xt!==null&&(x.add(Xt),Xt.srcBindings===null&&(Xt.srcBindings=new yn),Xt.srcBindings.add(Gt))),y.add(Gt)}if(St instanceof Sn&&St.type===Sn.Table){if(0<St.rowCount){for(pt=St.rowDefs,Mt=pt.length,Gt=0;Gt<Mt;Gt++)if(Xt=pt[Gt],Xt!==void 0&&Xt.be!==null)for(var Qt=Xt.be.iterator;Qt.next();){var ie=Qt.value;ie.xd=Xt,ie.to=2,ie.wl=Xt.index,y.add(ie)}}if(0<St.columnCount){for(St=St.colDefs,pt=St.length,Mt=0;Mt<pt;Mt++)if(Gt=St[Mt],Gt!==void 0&&Gt.be!==null)for(Xt=Gt.be.iterator;Xt.next();)Qt=Xt.value,Qt.xd=Gt,Qt.to=1,Qt.wl=Gt.index,y.add(Qt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){xf(E,!0);for(var et=E.srcBindings.iterator;et.next();){var nt=et.value;E.localBindings===null&&(E.localBindings=new yn),E.localBindings.add(nt)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,et=E.xd,et!==null){E.xd=null;var st=E.targetProperty,ht=st.indexOf(".");0<ht&&et instanceof Sn&&(nt=st.substring(0,ht),st=st.substr(ht+1),ht=et.fb(nt),ht!==null?(et=ht,E.targetProperty=st):En('Warning: unable to find GraphObject named "'+nt+'" for Binding: '+E.toString())),et instanceof co?(nt=gi(et.panel),E.Ai=nt===void 0?-1:nt,et.panel.bindingId=E.Ai):et instanceof ze?(nt=gi(et),E.Ai=nt===void 0?-1:nt,et.bindingId=E.Ai):je("Unknown type of binding target: "+et)}y.freeze(),a instanceof qn&&a.Zc()&&a.Va()}te.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Sn&&(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&&Hs(y),y},te.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 et=this,nt=x.Ai;if(nt!==-1){if(et=this.ks(nt),et===null)continue}else x.xd!==null&&(et=x.xd);if(E==="/"?b=et.part:E==="."?b=et:E===".."&&(b=et.panel),E=x.to,E!==0){if(!(et instanceof Sn))continue;E===1?et=et.Eb(x.wl):E===2&&(et=et.Fb(x.wl))}et!==void 0&&x.Mv(et,b)}}},te.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,et=null;E<x&&(et=a[E],!(et instanceof Sn&&et.data!==null));)E++,et=a[E];if(x-E!==b)return!0;if(et===null)return 0<b;for(var nt=0;E<x&&nt<b;){if(et=a[E],!(et instanceof Sn)||et.data!==y[nt])return!0;E++,nt++}return!1}function Wp(a){if(a.type===Sn.Spot||a.type===Sn.Auto)return Math.min(a.O.length,1);if(a.type===Sn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Tr&&b.isPanelMain))break}return x}return a.type===Sn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Sn&&nh(a))?1:0}te.mv=function(){for(var a=Wp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Wp(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 et=y[E],nt=b<a.O.length?a.O.M(b):null;if(nt instanceof Sn){if(nt.data!==et){var st=b0(a,nt.data),ht=b0(a,et),pt=ht!==st;pt||(st=P0(a,st),pt=P0(a,ht)!==st),pt?(a.pc(b,!1),Cm(a,et,E,!1)):nt.data=et}}else Cm(a,et,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),gs(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Nn&&(y.Te=!0),y.Te&&y instanceof Nn&&(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(Hs(E),E=E.copy(),E.l&16777216){var et=a.ih();et!==null&&x0(et,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Yn),a.ge.add(y,E)),et=x+Wp(a),a.Gb(et,E),b&&(E.ub=y,w0(a,et,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 Sn){var E=y,et=x;b.type===Sn.TableRow?b.row=E:b.type===Sn.TableColumn&&(b.column=E),b.itemIndex=et}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=Qi(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;je("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,En('No item template Panel found for category "'+y+'" on '+a),En(" Using default item template."),a=new Sn,y=new yi,y.bind(new eo("text","",sr)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Sn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var et=y[E];x&&et instanceof Sn&&!et.isEnabled||km(a,et,x)}}}function Dl(a,y){y.name=a,ol.add(a,y)}hn.Object.defineProperties(Sn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Sn.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&&An(a,">= 0",Sn,"padding"),a=new Dr(a)):(0>a.left&&An(a.left,">= 0",Sn,"padding:value.left"),0>a.right&&An(a.right,">= 0",Sn,"padding:value.right"),0>a.top&&An(a.top,">= 0",Sn,"padding:value.top"),0>a.bottom&&An(a.bottom,">= 0",Sn,"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:us},set:function(a){typeof a=="number"&&(a=new Dr(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 si)&&(a instanceof si&&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 et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||je("defaultRowSeparatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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 si)&&(a instanceof si&&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 et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||je("defaultColumnSeparatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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||je("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&jl(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()||je("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&jl(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 Pu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 Pu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Go(this)&&(a=this.part,a!==null&&Mi(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 Pu),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 Pu),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 Pu,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 Pu,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 Pu,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 Pu,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:Tm},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:Tm},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)&&je("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)&&je("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 qn&&!(this instanceof Xr);Hs(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Cn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof qn&&(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 wf),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 Yn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof qn||a.isPanelMain)&&je("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(););Lr(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&&(Lr(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 Pr&&(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&&km(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))}}}),hn.Object.defineProperties(Sn,{Position:{get:function(){return ol.I("Position")}},Horizontal:{get:function(){return ol.I("Horizontal")}},Vertical:{get:function(){return ol.I("Vertical")}},Spot:{get:function(){return ol.I("Spot")}},Auto:{get:function(){return ol.I("Auto")}},Table:{get:function(){return ol.I("Table")}},Viewbox:{get:function(){return ol.I("Viewbox")}},TableRow:{get:function(){return ol.I("TableRow")}},TableColumn:{get:function(){return ol.I("TableColumn")}},Link:{get:function(){return ol.I("Link")}},Grid:{get:function(){return ol.I("Grid")}},Graduated:{get:function(){return ol.I("Graduated")}}}),Sn.prototype.rebuildItemElements=Sn.prototype.mv,Sn.prototype.findItemPanelForData=Sn.prototype.sx,Sn.prototype.updateTargetBindings=Sn.prototype.La,Sn.prototype.copyTemplate=Sn.prototype.Uy,Sn.prototype.graduatedValueForPoint=Sn.prototype.Gz,Sn.prototype.graduatedPointForValue=Sn.prototype.Fz,Sn.prototype.findColumnForLocalX=Sn.prototype.fz,Sn.prototype.findRowForLocalY=Sn.prototype.nz,Sn.prototype.addColumnDefinition=Sn.prototype.By,Sn.prototype.addRowDefinition=Sn.prototype.Hy,Sn.prototype.addRowColumnDefinition=Sn.prototype.Gy,Sn.prototype.removeColumnDefinition=Sn.prototype.jA,Sn.prototype.getColumnDefinition=Sn.prototype.Eb,Sn.prototype.removeRowDefinition=Sn.prototype.oA,Sn.prototype.getRowDefinition=Sn.prototype.Fb,Sn.prototype.removeAt=Sn.prototype.mb,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.insertAt=Sn.prototype.Gb,Sn.prototype.elt=Sn.prototype.M,Sn.prototype.add=Sn.prototype.add,Sn.prototype.findObject=Sn.prototype.fb,Sn.prototype.findInVisualTree=Sn.prototype.Nl,Sn.prototype.walkVisualTreeFrom=Sn.prototype.qm,Sn.prototype.findMainElement=Sn.prototype.Pb;var g1=!1,m1=null,ol=new Yn;Sn.className="Panel",Sn.definePanelLayout=Dl,Dl("Position",new fm),Dl("Vertical",new pm),Dl("Auto",new mm),Dl("Link",new bm);function Pu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Pu.prototype.copy=function(){var a=new Pu;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},Pu.className="GradPanelSettings";function js(){this.Pc=[],this.Oc=[],this.j=this.ob=Tm,this.hb=this.Hb=0,this.Qp=us,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,et=0;et<b;et++)if(x[et]!==void 0){var nt=x[et].copy();nt.wi(a),E[et]=nt}for(x=this.Oc,b=x.length,E=y.Oc,et=0;et<b;et++)x[et]!==void 0&&(nt=x[et].copy(),nt.wi(a),E[et]=nt);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 co(a){ii(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=jo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Cr,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))}co.prototype.copy=function(){var a=new co;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=Xn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Em(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Xn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}te=co.prototype,te.qb=function(a){a.classType===co&&(this.sizing=a)},te.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+gi(this)},te.wi=function(a){this.Me=a},te.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)},te.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Sn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,et=0;et<E;et++){var nt=b?y.rowDefs[et]:y.colDefs[et];if(nt!==void 0&&nt.oa!==0){x=nt.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)},te.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Di,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 Mm(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}te.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new eo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&je("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new yn),this.be.add(E),this},hn.Object.defineProperties(co.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&&An(a,">= 0",co,"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&&An(a,">= 0",co,"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))&&An(a,">= 0",co,"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&&An(a,">= 0",co,"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 Dr(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&&Pf(a,"RowColumnDefinition.separatorStroke"),a instanceof si&&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 et=a[E];typeof et=="number"&&0<=et&&isFinite(et)||je("separatorDashArray value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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&&Pf(a,"RowColumnDefinition.background"),a instanceof si&&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}}}),co.prototype.computeEffectiveSpacing=co.prototype.Wc,co.prototype.computeEffectiveSpacingTop=co.prototype.Io;var C0=new Je(co,"Default",0),Hp=new Je(co,"None",1),Tm=new Je(co,"ProportionalExtra",2);co.className="RowColumnDefinition",co.Default=C0,co.None=Hp,co.ProportionalExtra=Tm;function Tr(a,y){ze.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)}Ye(Tr,ze),Tr.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=Xn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Fc(a){a.Na===null?a.Na=new M0:a.Na.nc&&(a.Na=a.Na.copy())}te=Tr.prototype,te.th=function(){ze.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},te.qb=function(a){a===fn||a===Un||a===Gr||a===Cr?this.geometryStretch=a:ze.prototype.qb.call(this,a)},te.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+gi(this)};function Pd(a,y,x,b){var E=x.length;if(!(4>E)){var et=b.measuredBounds,nt=Math.max(1,et.width);et=et.height;for(var st=x[0],ht=x[1],pt,St,Mt,Gt,Xt,Qt,ie=0,Me=On(),xe=2;xe<E;xe+=2)pt=x[xe],St=x[xe+1],Mt=pt-st,st=St-ht,Mt===0&&(Mt=.001),Gt=st/Mt,Xt=Math.atan2(st,Mt),Qt=Math.sqrt(Mt*Mt+st*st),Me.push([Mt,Xt,Gt,Qt]),ie+=Qt,st=pt,ht=St;st=x[0],ht=x[1],Mt=b.measuredBounds.width,b instanceof Tr&&(Mt-=b.strokeWidth),1>Mt&&(Mt=1),E=x=Mt,pt=nt/2,St=pt!==0,xe=0,Qt=Me[xe],Mt=Qt[0],Xt=Qt[1],Gt=Qt[2],Qt=Qt[3];for(var Ne=0;.1<=ie;){if(Ne===0&&(St?(E=x,E-=pt,ie-=pt,St=!1):E=x,E===0&&(E=1)),E>ie){Fn(Me);return}E>Qt?(Ne=E-Qt,E=Qt):Ne=0;var Fe=Math.sqrt(E*E/(1+Gt*Gt));if(0>Mt&&(Fe=-Fe),st+=Fe,ht+=Gt*Fe,a.translate(st,ht),a.rotate(Xt),a.translate(-(nt/2),-(et/2)),Ne===0&&b.hh(a,y),a.translate(nt/2,et/2),a.rotate(-Xt),a.translate(-st,-ht),ie-=E,Qt-=E,Ne!==0){if(xe++,xe===Me.length){Fn(Me);return}Qt=Me[xe],Mt=Qt[0],Xt=Qt[1],Gt=Qt[2],Qt=Qt[3],E=Ne}}Fn(Me)}}te.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 et=this.actualBounds,nt=this.naturalBounds;b!==null&&Ki(this,a,b,!0,!1,nt,et);var st=this.part,ht=this.ig;if(x===null||ht!==0||st===null||!this.isPanelMain&&st.Pb()!==this||(ht=st.type===Sn.Link&&st instanceof Xr&&st.category==="Selection"&&st.adornedObject instanceof Tr&&st.adornedPart.Pb()===st.adornedObject?st.adornedObject.strokeWidth:0),ht===0&&(x=null),x!==null&&ht!==0&&(Ki(this,a,x,!1,!1,nt,et),a.lineWidth=ht,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),et=!1,st&&y.Gf("drawShadows")&&(et=st.isShadowed),a.Il===!1&&(et=!1),st=!0,x===null||b!==null&&b!=="transparent"||(st=!1),nt=!1,ht=this.strokeDashArray,ht!==null&&(nt=!0,a.js(ht,this.strokeDashOffset)),E.type===Pn.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===Pn.u){var pt=E.startX;ht=E.startY;var St=E.endX,Mt=E.endY;E=Math.min(pt,St);var Gt=Math.min(ht,Mt);pt=Math.abs(St-pt),ht=Math.abs(Mt-ht),a.beginPath(),a.rect(E,Gt,pt,ht),b!==null&&a.ng(b),x!==null&&(st&&et&&Jl(a),a.jk(),st&&et&&Su(a)),a.Se()}else if(E.type===Pn.F)pt=E.startX,ht=E.startY,St=E.endX,Mt=E.endY,E=Math.abs(St-pt)/2,Gt=Math.abs(Mt-ht)/2,pt=Math.min(pt,St)+E,ht=Math.min(ht,Mt)+Gt,a.beginPath(),a.moveTo(pt,ht-Gt),a.bezierCurveTo(pt+Ge.wg*E,ht-Gt,pt+E,ht-Ge.wg*Gt,pt+E,ht),a.bezierCurveTo(pt+E,ht+Ge.wg*Gt,pt+Ge.wg*E,ht+Gt,pt,ht+Gt),a.bezierCurveTo(pt-Ge.wg*E,ht+Gt,pt-E,ht+Ge.wg*Gt,pt-E,ht),a.bezierCurveTo(pt-E,ht-Ge.wg*Gt,pt-Ge.wg*E,ht-Gt,pt,ht-Gt),a.closePath(),b!==null&&a.ng(b),x!==null&&(st&&et&&Jl(a),a.jk(),st&&et&&Su(a)),a.Se();else if(E.type===Pn.o)for(E=E.figures,ht=E.length,Gt=0;Gt<ht;Gt++){pt=E.s[Gt],a.beginPath(),a.moveTo(pt.startX,pt.startY),St=pt.segments.s,Mt=St.length;for(var Xt=null,Qt=0;Qt<Mt;Qt++){var ie=St[Qt];switch(ie.type){case bo:a.moveTo(ie.endX,ie.endY);break;case ki:a.lineTo(ie.endX,ie.endY);break;case Wo:a.bezierCurveTo(ie.point1X,ie.point1Y,ie.point2X,ie.point2Y,ie.endX,ie.endY);break;case cs:a.quadraticCurveTo(ie.point1X,ie.point1Y,ie.endX,ie.endY);break;case ao:if(ie.radiusX===ie.radiusY){var Me=Math.PI/180;a.arc(ie.point1X,ie.point1Y,ie.radiusX,ie.startAngle*Me,(ie.startAngle+ie.sweepAngle)*Me,0>ie.sweepAngle,Xt!==null?Xt.endX:pt.startX,Xt!==null?Xt.endY:pt.startY)}else if(Xt=$a(ie,pt),Me=Xt.length,Me===0)a.lineTo(ie.centerX,ie.centerY);else for(var xe=0;xe<Me;xe++){var Ne=Xt[xe];xe===0&&a.lineTo(Ne[0],Ne[1]),a.bezierCurveTo(Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7])}break;case Cs:if(xe=Me=0,Xt!==null&&Xt.type===ao){if(Xt=$a(Xt,pt),Ne=Xt.length,Ne===0){a.lineTo(ie.endX,ie.endY);break}Xt=Xt[Ne-1]||null,Xt!==null&&(Me=Xt[6],xe=Xt[7])}else Me=Xt!==null?Xt.endX:pt.startX,xe=Xt!==null?Xt.endY:pt.startY;if(Xt=Rs(ie,pt,Me,xe),Me=Xt.length,Me===0){a.lineTo(ie.endX,ie.endY);break}for(xe=0;xe<Me;xe++)Ne=Xt[xe],a.bezierCurveTo(Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7]);break;default:je("Segment not of valid type: "+ie.type)}ie.isClosed&&a.closePath(),Xt=ie}St=pt.isFilled,et?pt.isShadowed?(St===!0&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&(St&&st&&Jl(a),a.jk(),St&&st&&Su(a))):(Jl(a),St&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk(),Su(a)):(St&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk()),a.Se(Gt)}if(nt&&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),et=this.geometry,a.save(),a.beginPath(),b=On(),et.type===Pn.j)b.push(et.startX),b.push(et.startY),b.push(et.endX),b.push(et.endY),Pd(a,y,b,x);else if(et.type===Pn.o)for(et=et.figures.iterator;et.next();){for(st=et.value,b.length=0,b.push(st.startX),b.push(st.startY),nt=st.startX,E=st.startY,ht=nt,Gt=E,pt=st.segments.s,St=pt.length,Mt=0;Mt<St;Mt++){switch(Qt=pt[Mt],Qt.type){case bo:Pd(a,y,b,x),b.length=0,b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY,ht=nt,Gt=E;break;case ki:b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break;case Wo:Ge.Qe(nt,E,Qt.point1X,Qt.point1Y,Qt.point2X,Qt.point2Y,Qt.endX,Qt.endY,.5,b),nt=Qt.endX,E=Qt.endY;break;case cs:Ge.ep(nt,E,Qt.point1X,Qt.point1Y,Qt.endX,Qt.endY,.5,b),nt=Qt.endX,E=Qt.endY;break;case ao:if(ie=$a(Qt,st),Xt=ie.length,Xt===0){b.push(Qt.centerX),b.push(Qt.centerY),nt=Qt.centerX,E=Qt.centerY;break}for(Me=0;Me<Xt;Me++)xe=ie[Me],Ge.Qe(nt,E,xe[2],xe[3],xe[4],xe[5],xe[6],xe[7],.5,b),nt=xe[6],E=xe[7];break;case Cs:if(ie=Rs(Qt,st,nt,E),Xt=ie.length,Xt===0){b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break}for(Me=0;Me<Xt;Me++)xe=ie[Me],Ge.Qe(nt,E,xe[2],xe[3],xe[4],xe[5],xe[6],xe[7],.5,b),nt=xe[6],E=xe[7];break;default:je("Segment not of valid type: "+Qt.type)}Qt.isClosed&&(b.push(ht),b.push(Gt),Pd(a,y,b,x))}Pd(a,y,b,x)}else if(et.type===Pn.u)b.push(et.startX),b.push(et.startY),b.push(et.endX),b.push(et.startY),b.push(et.endX),b.push(et.endY),b.push(et.startX),b.push(et.endY),b.push(et.startX),b.push(et.startY),Pd(a,y,b,x);else if(et.type===Pn.F){if(E=new wo,E.startX=et.endX,E.startY=(et.startY+et.endY)/2,nt=new Qr(ao),nt.startAngle=0,nt.sweepAngle=360,nt.centerX=(et.startX+et.endX)/2,nt.centerY=(et.startY+et.endY)/2,nt.radiusX=Math.abs(et.startX-et.endX)/2,nt.radiusY=Math.abs(et.startY-et.endY)/2,E.add(nt),et=$a(nt,E),st=et.length,st===0)b.push(nt.centerX),b.push(nt.centerY);else for(nt=E.startX,E=E.startY,ht=0;ht<st;ht++)Gt=et[ht],Ge.Qe(nt,E,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,b),nt=Gt[6],E=Gt[7];Pd(a,y,b,x)}Fn(b),a.restore(),a.Vc(!1)}}}},te.kk=function(a,y,x){return!ze.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)},te.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ze.prototype.nk.call(this,a)},te.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)}},te.ga=function(a,y){if(y===void 0&&(y=new Le),a instanceof er){a.Mc()&&je("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},te.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe;y=on.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Le.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ai(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ai(a,b.x,b.y,0,0),on.free(y),Le.free(b),a},te.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!==Pn.j||y||(E+=2);var et=on.alloc();if(et.assign(b),et.Bc(E+2,E+2),!et.ca(a))return on.free(et),!1;if(b=E+1e-4,x.type===Pn.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:(on.free(et),Ge.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Pn.u){y=x.startX;var nt=x.startY,st=x.endX;if(x=x.endY,et.x=Math.min(y,st),et.y=Math.min(nt,x),et.width=Math.abs(st-y),et.height=Math.abs(x-nt),this.fill===null){if(et.Bc(-b,-b),et.ca(a))return on.free(et),!1;et.Bc(b,b)}return this.stroke!==null&&et.Bc(E,E),a=et.ca(a),on.free(et),a}if(x.type===Pn.F){nt=x.startX,E=x.startY,st=x.endX;var ht=x.endY;if(x=Math.min(nt,st),y=Math.min(E,ht),nt=Math.abs(st-nt)/2,E=Math.abs(ht-E)/2,x=a.x-(x+nt),y=a.y-(y+E),this.fill===null){if(nt-=b,E-=b,0>=nt||0>=E||1>=x*x/(nt*nt)+y*y/(E*E))return on.free(et),!1;nt+=b,E+=b}return this.stroke!==null&&(nt+=b,E+=b),on.free(et),0>=nt||0>=E?!1:1>=x*x/(nt*nt)+y*y/(E*E)}if(x.type===Pn.o)return on.free(et),this.fill===null?gl(x,a.x,a.y,E):hs(x,a,E,1<this.strokeWidth,y);je("Unknown Geometry type: "+x.type)},te.Wl=function(a,y,x,b){var E=this.desiredSize,et=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var nt=this.geometry.bounds;else{var st=this.figure,ht=E0[st];if(ht===void 0){var pt=Ge.Ze[st];typeof pt=="string"&&(pt=Ge.Ze[pt]),typeof pt=="function"?(ht=pt(null,100,100),E0[st]=ht):je("Unsupported Figure: "+st)}nt=ht.bounds}st=nt.width,ht=nt.height,pt=nt.width;var St=nt.height;switch(Da(this,!0)){case fn:b=x=0;break;case gn:pt=Math.max(a-et,0),St=Math.max(y-et,0);break;case Jn:pt=Math.max(a-et,0),b=0;break;case ar:x=0,St=Math.max(y-et,0)}isFinite(E.width)&&(pt=E.width),isFinite(E.height)&&(St=E.height);var Mt=this.maxSize,Gt=this.minSize;switch(x=Math.max(x-et,Gt.width),b=Math.max(b-et,Gt.height),pt=Math.min(Mt.width,pt),St=Math.min(Mt.height,St),pt=isFinite(pt)?Math.max(x,pt):Math.max(st,x),St=isFinite(St)?Math.max(b,St):Math.max(ht,b),x=k0(this),x){case fn:break;case gn:st=pt,ht=St;break;case Un:x=Math.min(pt/st,St/ht),isFinite(x)||(x=1),st*=x,ht*=x;break;default:je(x+" is not a valid geometryStretch.")}this.Rd!==null?(st===0&&(st=.001),ht===0&&(ht=.001),x=this.Rd!==null?this.Rd:this.ua,nt=x.bounds,b=st/nt.width,nt=ht/nt.height,isFinite(b)||(b=1),isFinite(nt)||(nt=1),this.ua=b===1&&nt===1?x:x.copy().scale(b,nt)):this.ua!==null&&Ge.$(this.ua.Sk,a-et)&&Ge.$(this.ua.Rk,y-et)||(this.ua=Tr.makeGeometry(this,st,ht)),nt=this.ua.bounds,a===1/0||y===1/0?this.Ge(nt.x-et/2,nt.y-et/2,a===0&&st===0?0:nt.width+et,y===0&&ht===0?0:nt.height+et):this.Ge(-(et/2),-(et/2),pt+et,St+et),E.w()?(pt=E.width,St=E.height,pt=Math.min(Mt.width,pt),St=Math.min(Mt.height,St),pt=Math.max(Gt.width,pt),St=Math.max(Gt.height,St),this.dc.h(0,0,pt,St)):this.dc.assign(nt)};function k0(a){var y=a.geometryStretch;return a.Rd!==null?y===Cr?gn:y:y===Cr?E0[a.figure].defaultStretch:y}te.eh=function(a,y,x,b){ua(this,a,y,x,b)},te.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},te.Sj=function(a,y,x,b,E){var et=this.transform,nt=1/(et.m11*et.m22-et.m12*et.m21),st=et.m22*nt,ht=-et.m12*nt,pt=-et.m21*nt,St=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),Gt=nt*(et.m12*et.dx-et.m11*et.dy);et=a*st+y*pt+Mt,nt=a*ht+y*St+Gt,st=x*st+b*pt+Mt,ht=x*ht+b*St+Gt,Mt=this.ig/2,pt=this.ua,pt===null&&(this.measure(1/0,1/0),pt=this.ua);var Xt=pt.bounds;if(St=!1,pt.type===Pn.j)if(1.5>=this.strokeWidth)St=Ge.Ve(pt.startX,pt.startY,pt.endX,pt.endY,et,nt,st,ht,E);else{if(pt.startX===pt.endX?(b=Mt,St=0):(y=(pt.endY-pt.startY)/(pt.endX-pt.startX),St=Mt/Math.sqrt(1+y*y),b=St*y),y=On(),a=new Le,Ge.Ve(pt.startX+b,pt.startY+St,pt.endX+b,pt.endY+St,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.startX-b,pt.startY-St,pt.endX-b,pt.endY-St,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.startX+b,pt.startY+St,pt.startX-b,pt.startY-St,et,nt,st,ht,a)&&y.push(a),a=new Le,Ge.Ve(pt.endX+b,pt.endY+St,pt.endX-b,pt.endY-St,et,nt,st,ht,a)&&y.push(a),st=y.length,st===0)return Fn(y),!1;for(St=!0,ht=1/0,b=0;b<st;b++)a=y[b],x=(a.x-et)*(a.x-et)+(a.y-nt)*(a.y-nt),x<ht&&(ht=x,E.x=a.x,E.y=a.y);Fn(y)}else if(pt.type===Pn.u)St=Ge.Ff(Xt.x-Mt,Xt.y-Mt,Xt.x+Xt.width+Mt,Xt.y+Xt.height+Mt,et,nt,st,ht,E);else if(pt.type===Pn.F){y=on.allocAt(Xt.x,Xt.y,Xt.width,Xt.height).Bc(Mt,Mt);t:if(y.width===0)St=Ge.Ve(y.x,y.y,y.x,y.y+y.height,et,nt,st,ht,E);else if(y.height===0)St=Ge.Ve(y.x,y.y,y.x+y.width,y.y,et,nt,st,ht,E);else{if(a=y.width/2,pt=y.height/2,b=y.x+a,St=y.y+pt,x=9999,et!==st&&(x=(nt-ht)/(et-st)),9999>Math.abs(x)){if(ht=nt-St-x*(et-b),0>a*a*x*x+pt*pt-ht*ht){E.x=NaN,E.y=NaN,St=!1;break t}Mt=Math.sqrt(a*a*x*x+pt*pt-ht*ht),st=(-(a*a*x*ht)+a*pt*Mt)/(pt*pt+a*a*x*x)+b,a=(-(a*a*x*ht)-a*pt*Mt)/(pt*pt+a*a*x*x)+b,pt=x*(st-b)+ht+St,ht=x*(a-b)+ht+St,Math.abs((et-st)*(et-st))+Math.abs((nt-pt)*(nt-pt))<Math.abs((et-a)*(et-a))+Math.abs((nt-ht)*(nt-ht))?(E.x=st,E.y=pt):(E.x=a,E.y=ht)}else{if(st=pt*pt,ht=et-b,st-=st/(a*a)*ht*ht,0>st){E.x=NaN,E.y=NaN,St=!1;break t}ht=Math.sqrt(st),st=St+ht,ht=St-ht,Math.abs(st-nt)<Math.abs(ht-nt)?(E.x=et,E.y=st):(E.x=et,E.y=ht)}St=!0}on.free(y)}else if(pt.type===Pn.o){Gt=Le.alloc();var Qt=st-et,ie=ht-nt,Me=Qt*Qt+ie*ie,xe=et,Ne=nt;if(0<Me&&Xt.contains(xe,Ne)&&(Gt.x=xe,Gt.y=Ne,this.ca(Gt)))for(Qt!==0&&.5>Math.abs(Qt)?(ie*=.5/Qt,Qt=.5):ie!==0&&.5>Math.abs(ie)&&(Qt*=.5/ie,ie=.5),xe-=Qt,Ne-=ie;Xt.contains(xe,Ne);)xe-=Qt,Ne-=ie;for(E.x=st,E.y=ht,ie=0;ie<pt.figures.count;ie++){var Fe=pt.figures.s[ie],De=Fe.isFilled?xe:et,_e=Fe.isFilled?Ne:nt,Ze=Fe.segments;Xt=Fe.startX,Qt=Fe.startY;for(var Ln=Xt,_n=Qt,Bn=0;Bn<Ze.count;Bn++){var wn=Ze.s[Bn],cn=wn.type,br=wn.endX,dr=wn.endY,ti=!1;switch(cn){case bo:Ln=br,_n=dr;break;case ki:ti=Am(Xt,Qt,br,dr,De,_e,st,ht,Gt);break;case Wo:ti=Ge.Eo(Xt,Qt,wn.point1X,wn.point1Y,wn.point2X,wn.point2Y,br,dr,De,_e,st,ht,.6,Gt);break;case cs:ti=Ge.Eo(Xt,Qt,Xt+2/3*(wn.point1X-Xt),Qt+2/3*(wn.point1Y-Qt),br+2/3*(wn.point1X-br),dr+2/3*(wn.point1Y-dr),br,dr,De,_e,st,ht,.6,Gt);break;case ao:case Cs:cn=wn.type===ao?$a(wn,Fe):Rs(wn,Fe,Xt,Qt);var vi=cn.length;if(vi===0){ti=Am(Xt,Qt,wn.type===ao?wn.centerX:wn.endX,wn.type===ao?wn.centerY:wn.endY,De,_e,st,ht,Gt);break}for(dr=null,br=0;br<vi;br++){if(dr=cn[br],br===0&&Am(Xt,Qt,dr[0],dr[1],De,_e,st,ht,Gt)){var Co=Lm(De,_e,Gt,Me,E);Co<Me&&(Me=Co,St=!0)}Ge.Eo(dr[0],dr[1],dr[2],dr[3],dr[4],dr[5],dr[6],dr[7],De,_e,st,ht,.6,Gt)&&(Co=Lm(De,_e,Gt,Me,E),Co<Me&&(Me=Co,St=!0))}br=dr[6],dr=dr[7];break;default:je("Unknown Segment type: "+cn)}Xt=br,Qt=dr,ti&&(ti=Lm(De,_e,Gt,Me,E),ti<Me&&(Me=ti,St=!0)),wn.isClosed&&(br=Ln,dr=_n,Am(Xt,Qt,br,dr,De,_e,st,ht,Gt)&&(wn=Lm(De,_e,Gt,Me,E),wn<Me&&(Me=wn,St=!0)))}}et=x-a,nt=b-y,st=Math.sqrt(et*et+nt*nt),st!==0&&(et/=st,nt/=st),E.x-=et*Mt,E.y-=nt*Mt,Le.free(Gt)}else je("Unknown Geometry type: "+pt.type);return St?(this.transform.Ga(E),!0):!1};function Lm(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 Am(a,y,x,b,E,et,nt,st,ht){if(Ge.$(a,x)&&Ge.$(y,b)||Ge.$(E,nt)&&Ge.$(et,st))return!1;var pt=!1,St=(E-nt)*(y-b)-(et-st)*(a-x);return St===0?!1:(ht.x=((E*st-et*nt)*(a-x)-(E-nt)*(a*b-y*x))/St,ht.y=((E*st-et*nt)*(y-b)-(et-st)*(a*b-y*x))/St,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(ht.y>a||Ge.$(ht.y,a))&&(ht.y<y||Ge.$(ht.y,y))&&(pt=!0)):(y=a<x?a:x,a=a<x?x:a,(ht.x>y||Ge.$(ht.x,y))&&(ht.x<a||Ge.$(ht.x,a))&&(pt=!0)),pt)}te.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,et=Le.alloc();return et.h(x.x-b,x.y-b),a.ca(y.Ga(et))&&(et.h(x.x-b,x.bottom+b),a.ca(y.Ga(et))&&(et.h(x.right+b,x.bottom+b),a.ca(y.Ga(et))&&(et.h(x.right+b,x.y-b),a.ca(y.Ga(et))&&(E=!0)))),Le.free(et),E},te.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Sr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,et=a.top;a=a.bottom;var nt=Le.alloc();if(nt.h(b,et),x.Ga(nt),this.gh(nt,!0)||(nt.h(E,et),x.Ga(nt),this.gh(nt,!0))||(nt.h(b,a),x.Ga(nt),this.gh(nt,!0))||(nt.h(E,a),x.Ga(nt),this.gh(nt,!0)))return Le.free(nt),!0;var st=Le.alloc(),ht=Le.alloc();return x.set(y),x.bv(this.transform),x.Vj(),st.x=E,st.y=et,st.transform(x),nt.x=b,nt.y=et,nt.transform(x),y=!1,Dc(this,nt,st,ht)?y=!0:(nt.x=E,nt.y=a,nt.transform(x),Dc(this,nt,st,ht)?y=!0:(st.x=b,st.y=a,st.transform(x),Dc(this,nt,st,ht)?y=!0:(nt.x=b,nt.y=et,nt.transform(x),Dc(this,nt,st,ht)&&(y=!0)))),Le.free(nt),Sr.free(x),Le.free(st),Le.free(ht),y};function Dc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,et=x.y;return x=b.x,b=b.y,a===E?(y<et?(a=y,y=et):a=et,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}te.tx=function(a,y,x){function b(Me,xe){for(var Ne=Me.length,Fe=0;Fe<Ne;Fe+=2)if(xe.zd(Me[Fe],Me[Fe+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),et=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 nt=y.bounds,st=nt.x,ht=nt.y,pt=nt.x+nt.width;if(nt=nt.y+nt.height,vr(a.x,a.y,st,ht)<=E&&vr(a.x,a.y,pt,ht)<=E&&vr(a.x,a.y,st,nt)<=E&&vr(a.x,a.y,pt,nt)<=E)return!0}if(st=y.startX,ht=y.startY,pt=y.endX,nt=y.endY,y.type===Pn.j){if(x=(st-pt)*(a.x-pt)+(ht-nt)*(a.y-nt),Ur(a.x,a.y,st,ht,pt,nt)<=(0<=(pt-st)*(a.x-st)+(nt-ht)*(a.y-ht)&&0<=x?E:et))return!0}else{if(y.type===Pn.u)return y=!1,x&&(y=Ur(a.x,a.y,st,ht,st,nt)<=E||Ur(a.x,a.y,st,ht,pt,ht)<=E||Ur(a.x,a.y,pt,ht,pt,nt)<=E||Ur(a.x,a.y,st,nt,pt,nt)<=E),y;if(y.type===Pn.F){y=a.x-(st+pt)/2,et=a.y-(ht+nt)/2;var St=Math.abs(pt-st)/2,Mt=Math.abs(nt-ht)/2;if(St===0||Mt===0)return Ur(a.x,a.y,st,ht,pt,nt)<=E;if(x){if(a=Ge.$y(St,Mt,y,et),a*a<=E)return!0}else return!(vr(y,et,-St,0)>=E||vr(y,et,0,-Mt)>=E||vr(y,et,0,Mt)>=E||vr(y,et,St,0)>=E)}else if(y.type===Pn.o){if(pt=y.bounds,et=pt.x,st=pt.y,ht=pt.x+pt.width,pt=pt.y+pt.height,a.x>ht&&a.x<et&&a.y>pt&&a.y<st&&Ur(a.x,a.y,et,st,et,pt)>E&&Ur(a.x,a.y,et,st,ht,st)>E&&Ur(a.x,a.y,ht,pt,et,pt)>E&&Ur(a.x,a.y,ht,pt,ht,st)>E)return!1;if(et=Math.sqrt(E),x){if(this.fill===null?gl(y,a.x,a.y,et):hs(y,a,et,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(et=x.s[y],nt=et.startX,St=et.startY,a.zd(nt,St)>E)return!1;for(st=et.segments.s,ht=st.length,pt=0;pt<ht;pt++)switch(Mt=st[pt],Mt.type){case bo:case ki:if(nt=Mt.endX,St=Mt.endY,a.zd(nt,St)>E)return!1;break;case Wo:var Gt=On();if(Ge.Qe(nt,St,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.8,Gt),nt=b(Gt,a),Fn(Gt),nt||(nt=Mt.endX,St=Mt.endY,a.zd(nt,St)>E))return!1;break;case cs:if(Gt=On(),Ge.ep(nt,St,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.8,Gt),nt=b(Gt,a),Fn(Gt),nt||(nt=Mt.endX,St=Mt.endY,a.zd(nt,St)>E))return!1;break;case ao:case Cs:Gt=Mt.type===ao?$a(Mt,et):Rs(Mt,et,nt,St);var Xt=Gt.length;if(Xt===0){if(nt=Mt.type===ao?Mt.centerX:Mt.endX,St=Mt.type===ao?Mt.centerY:Mt.endY,a.zd(nt,St)>E)return!1;break}Mt=null;for(var Qt=On(),ie=0;ie<Xt;ie++)if(Mt=Gt[ie],Qt.length=0,Ge.Qe(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.8,Qt),b(Qt,a))return Fn(Qt),!1;Fn(Qt),Mt!==null&&(nt=Mt[6],St=Mt[7]);break;default:je("Unknown Segment type: "+Mt.type)}}return!0}}}return!1},te.qc=function(){this.ua=null},te.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=qp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Yo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new er(1-Yo.x,Yo.y)))}Tr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=$l[a.toArrow];else a.fromArrow!=="None"?b=$l[a.fromArrow]:(b=Ge.Ze[a.figure],typeof b=="string"&&(b=Ge.Ze[b]),b===void 0&&je("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Ge.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=$l[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=$l[x],y===void 0){var b=null,E;for(E in Ge.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Pn.parse(Ge.um[b],!1),$l[b]=a,x!==b&&($l[x]=b),b}}return typeof y=="string"?y:y instanceof Pn?a:null}hn.Object.defineProperties(Tr.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),Go(this)&&(a=this.part,a!==null&&Mi(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Pn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Le.allocAt(-y.x,-y.y),Le.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&&Pf(a,"Shape.fill"),a instanceof si&&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&&Pf(a,"Shape.stroke"),a instanceof si&&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 An(a,"value >= 0",Tr,"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"?An(a,'"butt", "round", or "square"',Tr,"strokeCap"):(Fc(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"?An(a,'"miter", "bevel", or "round"',Tr,"strokeJoin"):(Fc(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){Fc(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 et=a[E];0<=et&&isFinite(et)||je("strokeDashArray:value "+et+" at index "+E+" must be a positive number or zero."),b+=et}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&&(Fc(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=Ge.Ze[a];typeof x=="function"?x=a:(x=Ge.Ze[a.toLowerCase()])||je("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?je("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new _h),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?je("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new _h),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:jo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Fc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:jo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Fc(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&&(Fc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Cr},set:function(a){var y=this.geometryStretch;y!==a&&(Fc(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 ql),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&jl(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 ql),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 ql),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 ql),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Tr.prototype.intersectsRect=Tr.prototype.Yc,Tr.prototype.containedInRect=Tr.prototype.fh,Tr.prototype.getNearestIntersectionPoint=Tr.prototype.rs,Tr.prototype.getDocumentBounds=Tr.prototype.mi,Tr.prototype.getDocumentPoint=Tr.prototype.ga;var $l=new ir,E0=new ir;Tr.className="Shape",Tr.getFigureGenerators=function(){var a=new Yn,y;for(y in Ge.Ze)y!==y.toLowerCase()&&a.add(y,Ge.Ze[y]);return a.freeze(),a},Tr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Ge.Ze;b[a]=y,b[x]=a},Tr.getArrowheadGeometries=function(){var a=new Yn;for(b in Ge.um)if($l[b]===void 0){var y=Pn.parse(Ge.um[b],!1);$l[b]=y,y=b.toLowerCase(),y!==b&&($l[y]=b)}for(var x in $l)if(x!==x.toLowerCase()){var b=$l[x];b instanceof Pn&&a.add(x,b)}return a.freeze(),a},Tr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Pn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||je("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=$l;b[a]=x,b[y]=a};function M0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Cr,this.gg=this.fg=jo}M0.prototype.copy=function(){var a=new M0;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 yi(a,y){return ze.call(this),Dm||(Ba=Wi?new Ws(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}Ye(yi,ze),yi.prototype.cloneProtected=function(a){ze.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 Bl(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}te=yi.prototype,te.th=function(){ze.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}te.qb=function(a){a.classType===yi?this.wrap=a:ze.prototype.qb.call(this,a)},te.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},te.v=function(){ze.prototype.v.call(this)},te.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,et=x.height,nt=Kp(this),st=a.textAlign=this.textAlign,ht=y.tn;st==="start"?st=ht?"right":"left":st==="end"&&(st=ht?"left":"right"),ht=this.isUnderline;var pt=this.isStrikethrough;Ki(this,a,this.xc,!0,!1,x,b),(ht||pt)&&Ki(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var St=this.oe,Mt=St.dx-(nt*St.m21+St.dx);St=St.dy-(nt*St.m22+St.dy);var Gt=y.scale;switch(8>(Mt*Mt+St*St)*Gt*Gt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof es&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Mt=this.spacingBelow,this.flip){case Hr:a.translate(E,0),a.scale(-1,1);break;case Nr:a.translate(0,et),a.scale(1,-1);break;case ci:a.translate(E,et),a.scale(-1,-1)}if(a.yc(),St=this.Gc,Gt=(y+nt+Mt)*St,et>Gt&&(b=this.verticalAlignment,b=b.y*et-b.y*Gt+b.offsetY),St===1&&this.ze!==null)Mt=this.Cb,Mt>E&&(Mt=E),this.Oj(this.ze,a,0,b+y,E,nt,Mt,x,st,ht,pt);else if(this.Qc!==null&&this.Qb!==null)for(Gt=0;Gt<St;Gt++){var Xt=this.Qc[Gt];Xt>E&&(Xt=E),b+=y,this.Oj(this.Qb[Gt],a,0,b,E,nt,Xt,x,st,ht,pt),b+=nt+Mt}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-E,0);break;case Nr:a.scale(1,-1),a.translate(0,-et);break;case ci:a.scale(-1,-1),a.translate(-E,-et)}}},te.Oj=function(a,y,x,b,E,et,nt,st,ht,pt,St){var Mt=0;if(st)ht==="left"?Mt=0:ht==="right"?Mt=E-nt:ht==="center"&&(Mt=(E-nt)/2),y.fillRect(x+Mt,b+.25*et,nt,1);else{if(ht==="left"?Mt=0:ht==="right"?Mt=E:ht==="center"&&(Mt=E/2),E=Nm!==null?Nm(this,et):.75*et,y.fillText(a,x+Mt,b+E),a=et/20|0,a===0&&(a=1),ht==="right"?Mt-=nt:ht==="center"&&(Mt-=nt/2),pt){st=jm!==null?jm(this,et):.8*et,ht=x+Mt,pt=b+st,E=x+Mt+nt,st=b+st;var Gt=a;y.beginPath(),y.lineWidth=Gt,y.moveTo(ht,pt),y.lineTo(E,st),y.stroke(),y.Se(),y instanceof es&&y.ad.classList.add("gojs-td")}St&&(St=b+et-et/2.2|0,a%2!==0&&(St+=.5),b=x+Mt,et=St,x=x+Mt+nt,nt=St,Mt=a,y.beginPath(),y.lineWidth=Mt,y.moveTo(b,et),y.lineTo(x,nt),y.stroke(),y.Se(),y instanceof es&&y.ad.classList.add("gojs-td"))}},te.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(Ki(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},te.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ze.prototype.nk.call(this,a)},te.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)}},te.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var et=this.Ae;Ba!==null&&E1!==et&&(E1=Ba.font=et),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var nt;if(isNaN(this.desiredSize.width)){if(et=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),et.length===0)et=8;else if(this.isMultiline){for(var st=nt=0,ht=!1;!ht;){var pt=et.indexOf(`
`,st);pt===-1&&(pt=et.length,ht=!0),st=et.substr(st,pt-st),this.formatting===Zp&&(st=st.trim()),nt=Math.max(nt,al(st)),st=pt+1}et=nt}else nt=et.indexOf(`
`,0),0<=nt&&(et=et.substr(0,nt)),et=al(et);et=Math.min(et,a/this.scale)}else et=this.desiredSize.width;if(this.panel!==null&&(et=Math.min(et,this.panel.maxSize.width)),nt=w1(this,et),isNaN(this.desiredSize.height)?nt=Math.min(nt,y/this.scale):nt=this.desiredSize.height,ht=nt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,pt=this.spacingAbove+this.spacingBelow,pt=Math.max(0,Kp(this)+pt),ht=Math.min(this.maxLines-1,Math.max(Math.floor(ht/pt+.01)-1,0)),!(ht+1>=this.Qb.length))){for(this.l|=16777216,pt=this.Qb[ht],y=Math.max(1,a-y);al(pt)>y&&1<pt.length;)pt=pt.substr(0,pt.length-1);pt+=Xp,y=al(pt),this.Qb[ht]=pt,this.Qb=this.Qb.slice(0,ht+1),this.Qc[ht]=y,this.Qc=this.Qc.slice(0,ht+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))&&(et=isNaN(a)?this.Cb:Math.min(a,this.Cb)),et=Math.max(x,et),nt=Math.max(b,nt),ra(this.dc,et,nt),this.Ge(0,0,et,nt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},te.eh=function(a,y,x,b){ua(this,a,y,x,b)};function Vp(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 T0(a,y,x,b){var E=a.formatting===Zp;E&&(y=y.trim());var et=0,nt=a.Ae,st=a.spacingAbove+a.spacingBelow;st=Math.max(0,Kp(a)+st);var ht=a.overflow===Om?x1(nt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,st);else if(nt=y,a.wrap===L0){a.Le=1;var pt=al(y);if(ht===0||pt<=x)a.Cb=Math.max(a.Cb,pt),Vp(a,y,a.Cb),b!==null&&b.h(pt,st);else{for(et=Cd(a,nt),nt=nt.substr(et.length),y=Cd(a,nt),pt=al(et+y);0<y.length&&pt<=x;)et+=y,nt=nt.substr(y.length),y=Cd(a,nt),pt=et+y,E&&(pt=pt.trim()),pt=al(pt);for(E&&(y=y.trim()),et+=y,x=Math.max(1,x-ht);al(et)>x&&1<et.length;)et=et.substr(0,et.length-1);a.l|=16777216,et+=Xp;var St=al(et);a.Cb=St,Vp(a,et,St),b!==null&&b.h(St,st)}}else{for(ht=0,nt.length===0&&(ht=1,Vp(a,nt,0));0<nt.length;){for(y=Cd(a,nt),nt=nt.substr(y.length);al(y)>x;){var Mt=1;for(pt=al(y.substr(0,Mt)),St=0;pt<=x;)Mt++,St=pt,pt=al(y.substr(0,Mt));if(Mt===1){var Gt=pt;et=Math.max(et,pt)}else Gt=St,et=Math.max(et,St);if(Mt--,1>Mt&&(Mt=1),Vp(a,y.substr(0,Mt),Gt),ht++,y=y.substr(Mt),a.Gc+ht>a.maxLines)break}for(St=Cd(a,nt),pt=al(y+St);0<St.length&&pt<=x;)y+=St,nt=nt.substr(St.length),St=Cd(a,nt),pt=y+St,E&&(pt=pt.trim()),pt=al(pt);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),St.length===0?(Mt=pt,et=Math.max(et,pt)):(Mt=St=al(y),et=Math.max(et,St)),Vp(a,y,Mt),ht++,a.Gc+ht>a.maxLines))break}a.Le=Math.min(a.maxLines,ht),a.Cb=Math.max(a.Cb,et),b!==null&&b.h(a.Cb,st*a.Le)}}function Cd(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 al(a){return Ba===null?8*a.length:Ba.measureText(a).width}function Kp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Ba===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>k1?x=j0[y]:(x=1.3*Ba.measureText("M").width,j0[y]=x,k1++),a.df=x}function x1(a){if(Ba===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=Ba.measureText(Xp).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,Kp(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 et=a.Gc=0,nt,st=!1;!st;){if(nt=x.indexOf(`
`,et),nt===-1&&(nt=x.length,st=!0),et<=nt){if(et=x.substr(et,nt-et),a.wrap!==L0){a.Le=0;var ht=kn.alloc();T0(a,et,y,ht),E+=ht.height,kn.free(ht),a.Gc+=a.Le}else T0(a,et,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(st=!0)}et=nt+1}return a.Lq=E}hn.Object.defineProperties(yi.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"||(Bl(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:fn},set:function(a){var y=this.flip;y!==a&&(Bl(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ou},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Bl(this),this.da.Yr=a,Sa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=kn.alloc();T0(this,this.ec,999999,a);var y=a.width;kn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ra(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:A0},set:function(a){var y=this.wrap;y!==a&&(Bl(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:N0},set:function(a){var y=this.overflow;y!==a&&(Bl(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&&Pf(a,"TextBlock.stroke"),a instanceof si&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Kp(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&&(Bl(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&&(Bl(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 ql),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 ql),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 ql),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 ql),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 ql),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&&(Bl(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&&(Bl(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&&(Bl(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&&(Bl(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Zp},set:function(a){var y=this.formatting;y!==a&&(Bl(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&&An(a,"> 0",yi,"maxLines"),Bl(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 Nm=null,jm=null,L0=new Je(yi,"None",0),b1=new Je(yi,"WrapFit",1),A0=new Je(yi,"WrapDesiredSize",2),P1=new Je(yi,"WrapBreakAll",3),N0=new Je(yi,"OverflowClip",0),Om=new Je(yi,"OverflowEllipsis",1),Zp=new Je(yi,"FormatTrim",0),C1=new Je(yi,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new ir,k1=0,Fm=new ir,O0=0,Xp="...",E1="",Ba=null,Dm=!1;yi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=fn,this.gq=Zp,this.Jq=1/0,this.$q=N0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ou,this.$r=A0}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},yi.getEllipsis=function(){return Xp},yi.setEllipsis=function(a){Xp=a,Fm=new ir,O0=0},yi.getBaseline=function(){return Nm},yi.setBaseline=function(a){Nm=a},yi.getUnderline=function(){return jm},yi.setUnderline=function(a){jm=a},yi.isValidFont=function(a){if(Dm||(Ba=Wi?new Ws(null).context:null,Dm=!0),Ba===null)return!0;var y=Ba.font;if(a===y||a==="10px sans-serif")return!0;Ba.font="10px sans-serif",Ba.font=a;var x=Ba.font;if(x!=="10px sans-serif")return Ba.font=y,!0;Ba.font="19px serif";var b=Ba.font;return Ba.font=a,x=Ba.font,Ba.font=y,x!==b},yi.FormatNone=C1,yi.FormatTrim=Zp,yi.None=L0,yi.OverflowClip=N0,yi.OverflowEllipsis=Om,yi.WrapBreakAll=P1,yi.WrapDesiredSize=A0,yi.WrapFit=b1;function ql(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}ql.prototype.copy=function(){var a=new ql;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},ql.className="GradElementSettings";function Ia(a,y){ze.call(this),this.Eg=null,this.qo="",this.Xg=uu,this.Nk=gn,this.Zg=this.Hd=null,this.Mk=Fr,this.Xf=fn,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 kd;Ye(Ia,ze),Ia.prototype.cloneProtected=function(a){ze.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},Ia.prototype.qb=function(a){a===fn||a===Un||a===Gr?this.imageStretch=a:ze.prototype.qb.call(this,a)},Ia.prototype.toString=function(){return"Picture("+this.source+")#"+gi(this)};function Ed(a){a===void 0&&(a=""),a!==""?kd[a]&&(delete kd[a],Bm--):(kd=new ir,Bm=0)}function M1(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 et=y.getAttribute("src")||"",nt=E.Og.I(et);if(nt!==null)for(var st=nt.length,ht=0;ht<st;ht++)et=nt[ht],E.Xn.add(et),et.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),et.Zg!==null&&et.Zg(et,x))}y.Bg.clear()}a.desiredSize.w()||(ho(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,et=y.getAttribute("src")||"",nt=E.Og.I(et);if(nt!==null){E=nt.length,et=On();for(var st=0;st<E;st++)et.push(nt[st]);if(y.hn)for(st=0;st<E;st++)nt=et[st],nt.Hd!==null&&nt.Hd(nt,x);Fn(et)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ia.prototype.hA=function(){if(this.source!==""){Ed(this.source);var a=this.source;this.source="",this.source=a}},Ia.prototype.redraw=function(){this.N(),this.Uc=!0},Ia.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 jc)){var E=a instanceof es;b=this.naturalBounds;var et=0,nt=0,st=this.qn,ht=st?+x.width:x.naturalWidth;if(st=st?+x.height:x.naturalHeight,ht===void 0&&x.videoWidth&&(ht=x.videoWidth),st===void 0&&x.videoHeight&&(st=x.videoHeight),ht=ht||b.width,st=st||b.height,ht!==0&&st!==0){var pt=ht,St=st;this.sourceRect.w()&&(et=this.Xg.x,nt=this.Xg.y,ht=this.Xg.width,st=this.Xg.height);var Mt=ht,Gt=st,Xt=this.Nk,Qt=this.Mk;switch(Xt){case fn:if(this.sourceRect.w())break;Mt>=b.width&&(et=et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)),Gt>=b.height&&(nt=nt+Qt.offsetY+(Gt*Qt.y-b.height*Qt.y)),ht=Math.min(b.width,Mt),st=Math.min(b.height,Gt);break;case gn:Mt=b.width,Gt=b.height;break;case Un:case Gr:Xt===Un?(Xt=Math.min(b.height/Gt,b.width/Mt),Mt*=Xt,Gt*=Xt):Xt===Gr&&(Xt=Math.max(b.height/Gt,b.width/Mt),Mt*=Xt,Gt*=Xt,Mt>=b.width&&(et=(et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)/Mt)*ht),Gt>=b.height&&(nt=(nt+Qt.offsetY+(Gt*Qt.y-b.height*Qt.y)/Gt)*st),ht*=1/(Mt/b.width),st*=1/(Gt/b.height),Mt=b.width,Gt=b.height)}Xt=this.Df()*y.scale;var ie=Mt*Xt*Gt*Xt,Me=ht*st/ie,xe=x.__goCache;Xt=null;var Ne=wx;if(!E){if(x.sq&&xe!==void 0&&4<ie&&Me>Ne*Ne)for(xe.gi===null&&(L1(xe,4,pt,St,x),L1(xe,16,pt,St,x)),E=xe.gi,pt=E.length,St=0;St<pt&&E[St].ratio*E[St].ratio<Me;St++)Xt=E[St];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Ws(null).context;try{E.drawImage(this.Eg,0,0)}catch(Fe){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Fe){this.vl=!0}}if(this.vl)return}}switch(E=Mt<b.width?Qt.offsetX+(b.width*Qt.x-Mt*Qt.x):0,Qt=Gt<b.height?Qt.offsetY+(b.height*Qt.y-Gt*Qt.y):0,this.flip){case Hr:a.translate(Math.min(b.width,Mt),0),a.scale(-1,1);break;case Nr:a.translate(0,Math.min(b.height,Gt)),a.scale(1,-1);break;case ci:a.translate(Math.min(b.width,Mt),Math.min(b.height,Gt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&xe!==void 0&&Xt!==null&&Xt.ratio!==1){a.save(),y=Xt.ratio;try{a.drawImage(Xt.source,et/y,nt/y,Math.min(Xt.source.width,ht/y),Math.min(Xt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,Gt)),a instanceof es&&(this.bt=[et/y,nt/y,Math.min(Xt.source.width,ht/y),Math.min(Xt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,Gt)])}catch(Fe){this.en=!1}a.restore()}else try{a.drawImage(x,et,nt,ht,st,E,Qt,Math.min(b.width,Mt),Math.min(b.height,Gt)),a instanceof es&&(this.bt=[et,nt,ht,st,E,Qt,Math.min(b.width,Mt),Math.min(b.height,Gt)])}catch(Fe){this.en=!1}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-Math.min(b.width,Mt),0);break;case Nr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Gt));break;case ci:a.scale(-1,-1),a.translate(-Math.min(b.width,Mt),-Math.min(b.height,Gt))}}}}},Ia.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,et=Da(this,!0),nt=this.Eg,st=this.qn,ht=0,pt=0;(st||!this.al&&nt&&nt.complete)&&(this.al=!0),nt===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(ht=st?+nt.width:nt.naturalWidth,pt=st?+nt.height:nt.naturalHeight),isFinite(E.width)||et===gn||et===Jn?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:nt!==null&&(a=ht)),x=0):nt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ht),isFinite(E.height)||et===gn||et===ar?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:nt!==null&&(y=pt)),b=0):nt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:pt),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,et=this.minSize,x=Math.max(x||0,et.width),b=Math.max(b||0,et.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),nt===null||nt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),ra(this.dc,a,y),this.Ge(0,0,a,y)},Ia.prototype.eh=function(a,y,x,b){ua(this,a,y,x,b)},hn.Object.defineProperties(Ia.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||je("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Mp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new vn),b!==null&&x&&Bh(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()||(ho(this,!1),this.v())):x&&M1(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=kd;if(Wi){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Ed(),x=kd),b=Mn("img"),b.hn=!0,M1(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 T1),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}}}),Ia.prototype.redraw=Ia.prototype.redraw,Ia.prototype.reloadSource=Ia.prototype.hA;var Bm=0,wx=4;Ia.className="Picture",kd=new ir,Ia.clearCache=Ed;function T1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var et=new Ws(null),nt=et.context,st=1/y;et.width=x/y,et.height=b/y,et.width!==0&&et.height!==0&&(y=new A1(et.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),nt.setTransform(st*x,0,0,st*x,0,0),nt.yc(),nt.drawImage(E,0,0),a.gi.push(y))}T1.className="PictureCacheArray";function A1(a,y){this.source=a,this.ratio=y}A1.className="PictureCacheInstance";function Md(){this.os=new Pn,this.mc=null}Md.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Pn,this.mc=null};function Td(a,y,x,b,E,et){a.mc=new wo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=et||!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()}Md.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Qr(bo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Md.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Qr(ki);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function rh(a,y,x,b,E,et,nt){var st;st===void 0&&(st=!1);var ht=new Qr(Wo);ht.point1X=y,ht.point1Y=x,ht.point2X=b,ht.point2Y=E,ht.endX=et,ht.endY=nt,st&&ht.close(),a.mc.segments.add(ht)}function Im(a,y,x,b,E){var et;et===void 0&&(et=!1);var nt=new Qr(cs);nt.point1X=y,nt.point1Y=x,nt.endX=b,nt.endY=E,et&&nt.close(),a.mc.segments.add(nt)}Md.prototype.arcTo=function(a,y,x,b,E,et,nt){et===void 0&&(et=0),nt===void 0&&(nt=!1);var st=new Qr(ao);st.startAngle=a,st.sweepAngle=y,st.centerX=x,st.centerY=b,st.radiusX=E,st.radiusY=et!==0?et:E,nt&&st.close(),this.mc.segments.add(st)};function Px(a,y,x,b,E,et,nt,st){var ht;ht===void 0&&(ht=!1),y=new Qr(Cs,nt,st,y,x,b,E,et),ht&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Md,y.reset(a),y)}var Rm=null;Md.className="StreamGeometryContext";function ea(a,y){var x=a.toLowerCase(),b=Ge.Ze;b[a]=y,b[x]=a}ea("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new Pn(Pn.u),b.endX=y,b.endY=x,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("Square",function(a,y,x){a="s"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new Pn(Pn.u),b.endX=y,b.endY=x,b.defaultStretch=Un,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("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=Ge.Mf[b];if(E!==void 0)return E;var et=a*Ge.wg;return E=new Pn().add(new wo(a,0,!0).add(new Qr(ki,y-a,0)).add(new Qr(Wo,y,a,y-et,0,y,et)).add(new Qr(ki,y,x-a)).add(new Qr(Wo,y-a,x,y,x-et,y-et,x)).add(new Qr(ki,a,x)).add(new Qr(Wo,0,x-a,et,x,0,x-et)).add(new Qr(ki,0,a)).add(new Qr(Wo,a,0,0,et,et,0).close())),1<et&&(E.spot1=new er(0,0,et,et),E.spot2=new er(1,1,-et,-et)),Ge.Nf<Ge.vm&&(Ge.Mf[b]=E,Ge.Nf++),E}),ea("Border","RoundedRectangle"),ea("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new Pn(Pn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("Circle",function(a,y,x){a="c"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new Pn(Pn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,b.defaultStretch=Un,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ea("TriangleRight",function(a,y,x){return new Pn().add(new wo(0,0).add(new Qr(ki,y,.5*x)).add(new Qr(ki,0,x).close())).pm(0,.25,.5,.75)}),ea("TriangleDown",function(a,y,x){return new Pn().add(new wo(0,0).add(new Qr(ki,y,0)).add(new Qr(ki,.5*y,x).close())).pm(.25,0,.75,.5)}),ea("TriangleLeft",function(a,y,x){return new Pn().add(new wo(y,x).add(new Qr(ki,0,.5*x)).add(new Qr(ki,y,0).close())).pm(.5,.25,1,.75)}),ea("TriangleUp",function(a,y,x){return new Pn().add(new wo(y,x).add(new Qr(ki,0,x)).add(new Qr(ki,.5*y,0).close())).pm(.25,.5,.75,1)}),ea("Triangle","TriangleUp"),ea("Diamond",function(a,y,x){return new Pn().add(new wo(.5*y,0).add(new Qr(ki,0,.5*x)).add(new Qr(ki,.5*y,x)).add(new Qr(ki,y,.5*x).close())).pm(.25,.25,.75,.75)}),ea("LineH",function(a,y,x){return a=new Pn(Pn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ea("LineV",function(a,y,x){return a=new Pn(Pn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ea("None","Rectangle"),ea("BarH","Rectangle"),ea("BarV","Rectangle"),ea("MinusLine","LineH"),ea("PlusLine",function(a,y,x){return new Pn().add(new wo(0,x/2,!1).add(new Qr(ki,y,x/2)).add(new Qr(bo,y/2,0)).add(new Qr(ki,y/2,x)))}),ea("XLine",function(a,y,x){return new Pn().add(new wo(0,x,!1).add(new Qr(ki,y,0)).add(new Qr(bo,0,0)).add(new Qr(ki,y,x)))}),ea("LineRight",function(a,y,x){return new Pn().add(new wo(.25*y,0,!1).add(new Qr(ki,.75*y,.5*x)).add(new Qr(ki,.25*y,x)))}),ea("LineDown",function(a,y,x){return new Pn().add(new wo(0,.25*x,!1).add(new Qr(ki,.5*y,.75*x)).add(new Qr(ki,y,.25*x)))}),ea("LineLeft",function(a,y,x){return new Pn().add(new wo(.75*y,0,!1).add(new Qr(ki,.25*y,.5*x)).add(new Qr(ki,.75*y,x)))}),ea("LineUp",function(a,y,x){return new Pn().add(new wo(0,.75*x,!1).add(new Qr(ki,.5*y,.25*x)).add(new Qr(ki,y,.75*x)))}),Ge.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=Bo,this.ir=null,this.jr="",this.lr=jo,this.Gq="",this.Hq=qr,this.Pq=so,this.Kq=Ji,this.Up=null,this.Cq=127,this.zr=Zi,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 qn(a,y){a===void 0||a instanceof yo||typeof a=="string"?Sn.call(this,a):(Sn.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 Le(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new on,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ye(qn,Sn),qn.prototype.cloneProtected=function(a){Sn.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},te=qn.prototype,te.Af=function(a){Sn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},te.toString=function(){var a=Dn(this.constructor)+"#"+gi(this);return this.data!==null&&(a+="("+sr(this.data)+")"),a};function Ra(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}te.th=function(){Sn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},te.gk=function(a,y,x,b,E,et,nt){var st=this.diagram;st!==null&&(a===$i&&y==="elements"?E instanceof Sn?Oc(E,function(ht){ly(st.partManager,ht),kc(st,ht)}):Bh(st,E):a===vo&&y==="elements"&&(E instanceof Sn?Oc(E,function(ht){uy(st.partManager,ht,st)}):Mp(st,E)),st.cb(a,y,x,b,E,et,nt))},te.La=function(a){if(Sn.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 Sn&&Oc(E,function(et){et.data!==null&&et.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},qn.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},qn.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},qn.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 Yn),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)))}}},qn.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)}},qn.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=On();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Fn(y)}},qn.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Pr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Xr))break t;Hs(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Sn.Link),x.adornedObject=y)}if(x!==null){x.type===Sn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},qn.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(zh(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,zh(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=on.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),on.free(b),R0(a,!1)}}qn.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Sr);var et=this.Lb;et.reset(),this.no(et,a,y,x,b),this.Lb=et,et.ws()||et.pp(E)},qn.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Fr;this.locationSpot.sb()&&(et=this.locationSpot);var nt=Le.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,nt.yi(x.x,x.y,x.width,x.height,et),y.Lb!==null&&y.Lb.Ga(nt),nt.offset(-y.measuredBounds.x,-y.measuredBounds.y),et=y.panel;et!==null&&et!==this;)et.Lb!==null&&et.Lb.Ga(nt),nt.offset(-et.measuredBounds.x,-et.measuredBounds.y),et=et.panel;else nt.yi(y,x,b,E,et);a.rotate(this.Kb,nt.x,nt.y),Le.free(nt)}},qn.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},qn.prototype.moveTo=function(a,y,x){a=Le.allocAt(a,y),this.move(a,x),Le.free(a)},qn.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())},qn.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())},qn.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Yn),y.I(a)!==null)return y.I(a);var x=Sn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ih(a,y,x,b){b===void 0&&(b=new Le),x=x.Mc()?Fr: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}qn.prototype.mi=function(a){return a===void 0&&(a=new on),a.assign(this.actualBounds)},qn.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Le.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Tr?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 Bc(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 et=y.width;y=y.height;var nt=a.shadowBlur;return a=a.shadowOffset,et+=nt,y+=nt,b-=nt/2,E-=nt/2,0<a.x?et+=a.x:(b+=a.x,et-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,et+2,y+2),x}qn.prototype.arrange=function(){if(xa(this)===!1)j1(this);else{Yl(this,!1);var a=this.Ib,y=on.alloc();y.assign(a);var x=Gh(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()||Ge.B(y.width,a.width)&&Ge.B(y.height,a.height)||0<=this.vw&&this.C(16),on.free(y),R0(this,!1)}},te=qn.prototype,te.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=on.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),on.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Hi(a,y)||(this instanceof Nn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},te.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 Le(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),zh(this)===!1&&xa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof Xr||(y=y.animationManager,y.zb&&qf(y,a,new Le(b,E),x))}te.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;zh(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)},te.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,et=x.w(),nt=y.w();et&&nt?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):et?B1(a,y,x,E,b):nt&&I1(a,y,x,E,b),a.G|=2097152,Le.free(b),a.Uk()}function B1(a,y,x,b,E){var et=y.x,nt=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 Xr||qf(x,a,new Le(et,nt),y),b||y.x===et&&y.y===nt||a.g("position",new Le(et,nt),y.copy()))}function I1(a,y,x,b,E){var et=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(et)||b===null||a.g("location",et,x.copy())}function R1(a,y,x){_0(a,!1),a instanceof Nn&&Qu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Gh(a)?(Ml(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}te.si=function(){return!0},te.Zc=function(){return!0},te.ph=function(){return!1},te.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,En('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),En(" Old class: "+Dn(a.constructor)+", new class: "+Dn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var et=a.isSelected,nt=a.isHighlighted,st=!0,ht=!0,pt=!1;a instanceof Nn&&(st=a.isTreeLeaf,ht=a.isTreeExpanded,pt=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=et?a.G|4096:a.G&-4097,a.G=nt?a.G|524288:a.G&-524289,a instanceof Nn&&(a.U=st?a.U|4:a.U&-5,a.U=ht?a.U|1:a.U&-2,a.U=pt?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)}qn.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},qn.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},qn.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},qn.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},qn.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},qn.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},qn.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},qn.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},qn.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 zh(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 Gh(a){return(a.G&131072)!==0}te=qn.prototype,te.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}te.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},te.N=function(){var a=this.diagram;a!==null&&!xa(this)&&!zh(this)&&this.isVisible()&&this.Ib.w()&&a.N(Bc(this,this.Ib))},te.v=function(){Sn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Nn&&this.labeledLink!==null&&Sa(this.labeledLink),a.$b(!0))},te.Vo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},te.Wo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},te.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},te.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Nn&&(y=y.labeledLink,y!==null)?z0(a,y):0}te.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Nn&&(x=y.labeledLink,x!==null)?_1(a,x):y}te.Td=function(a){return a instanceof Pr?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 Nn&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}te.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Pr&&zm(y,!0),y instanceof Nn){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 Nn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Pr&&zm(y,!1),y instanceof Nn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},qn.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Nn&&this.isLinkLabel)},qn.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 Nn&&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 Uh(a,y,x,b,E,et){if(et===void 0&&(et=null),!(a.contains(y)||et!==null&&!et(y)||y instanceof Xr)){if(a.add(y),y instanceof Nn){if(x&&y instanceof Pr)for(var nt=y.memberParts;nt.next();)Uh(a,nt.value,x,b,E,et);if(E!==!1)for(nt=y.linksConnected;nt.next();){var st=nt.value;if(!a.contains(st)){var ht=st.fromNode,pt=st.toNode;ht=ht===null||a.contains(ht),pt=pt===null||a.contains(pt),(E?ht&&pt:ht||pt)&&Uh(a,st,x,b,E,et)}}if(1<b)for(y=y.Ou();y.next();)Uh(a,y.value,x,b-1,E,et)}else if(y instanceof Cn)for(y=y.labelNodes;y.next();)Uh(a,y.value,x,b,E,et)}}hn.Object.defineProperties(qn.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ni: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(vo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb($i,"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&&(Ra(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&&nd(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 Xr?this.type!==Sn.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:so},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ra(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ji},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ra(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&&(Ra(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:qr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ra(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 et=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,et.x,et.y),this.g("position",et,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 Xr)){var et=x.model.undoManager;et.isEnabled&&!et.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof Xr?this instanceof Xr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(et=x.model,et.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Hs(x),x=x.copy(),x!==null&&I0(this,x,y,a))):(et!==null&&et.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(Hs(x),x=x.copy(),x===null||x instanceof Cn||(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&&(Ra(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&&(Ra(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&&(Ra(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 Cn?(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&&(Ra(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&&(Ra(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&&(Ra(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:Bo},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ra(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&&(Ra(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&&(Ra(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:jo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ra(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&&je("Cannot make a Group a member of itself: "+this.toString()),je("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?K0(y,this):this instanceof Pr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof Pr&&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 et=E.wa(a!==null?a.data:null);E.mp(b,et)}}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 Pr){for(x=new vn,Uh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Nn)for(b=b.linksConnected;b.next();)Ld(b.value)}if(this instanceof Nn){for(x=this.linksConnected;x.next();)Ld(x.value);x=this.labeledLink,x!==null&&Ld(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&nd(y,-1,a))}}else je("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&&(Ra(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Nn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ra(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&&(Ra(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Zi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ra(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&&(Ra(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&&(Ra(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),qn.prototype.invalidateLayout=qn.prototype.C,qn.prototype.findCommonContainingGroup=qn.prototype.px,qn.prototype.isMemberOf=qn.prototype.Td,qn.prototype.findTopLevelPart=qn.prototype.sz,qn.prototype.findSubGraphLevel=qn.prototype.oz,qn.prototype.ensureBounds=qn.prototype.Va,qn.prototype.getDocumentBounds=qn.prototype.mi,qn.prototype.findObject=qn.prototype.fb,qn.prototype.moveTo=qn.prototype.moveTo,qn.prototype.invalidateAdornments=qn.prototype.Wb,qn.prototype.clearAdornments=qn.prototype.Ej,qn.prototype.removeAdornment=qn.prototype.Jf,qn.prototype.addAdornment=qn.prototype.bh,qn.prototype.findAdornment=qn.prototype.Pj,qn.prototype.updateTargetBindings=qn.prototype.La;var G1=!1;qn.className="Part",qn.LayoutNone=0,qn.LayoutAdded=1,qn.LayoutRemoved=2,qn.LayoutShown=4,qn.LayoutHidden=8,qn.LayoutNodeSized=16,qn.LayoutGroupLayout=32,qn.LayoutNodeReplaced=64,qn.LayoutStandard=127,qn.LayoutAll=16777215;function Xr(a,y){a===void 0||a instanceof yo||typeof a=="string"?qn.call(this,a):(qn.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)}Ye(Xr,qn),Xr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Xr.prototype.updateRelationshipsFromData=function(){},Xr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Cn&&y instanceof Tr){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 Tr&&(E.ua=a)}}},Xr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!xa(a))},Xr.prototype.Zc=function(){return!1},Xr.prototype.gk=function(a,y,x,b,E,et,nt){if(a===$i&&y==="elements"){if(E instanceof ba)this.$a===null&&(this.$a=E);else if(E instanceof Sn){var st=E.Nl(function(ht){return ht instanceof ba});st instanceof ba&&this.$a===null&&(this.$a=st)}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Sn&&this.$a.rg(b)&&(this.$a=null));qn.prototype.gk.call(this,a,y,x,b,E,et,nt)},Xr.prototype.updateAdornments=function(){},Xr.prototype.Lj=function(){},hn.Object.defineProperties(Xr.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}}}),Xr.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Xo,this.er=Wm,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 Nn(a,y){a===void 0||a instanceof yo||typeof a=="string"?qn.call(this,a):(qn.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new yn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ye(Nn,qn),Nn.prototype.cloneProtected=function(a){qn.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},te=Nn.prototype,te.Af=function(a){qn.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function oh(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}te.th=function(){qn.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new vn),a.af.add(y))}function W1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var et=E.value;if(et.Ds===a&&et.cv===y&&et.Ox===x&&et.Px===b||et.Ds===y&&et.cv===a&&et.Ox===b&&et.Px===x)return et}return null}te.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},te.gk=function(a,y,x,b,E,et,nt){a===$i&&y==="elements"?this.wc=null:a===vo&&y==="elements"&&(this.wc=null),qn.prototype.gk.call(this,a,y,x,b,E,et,nt)},te.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(ns(x.fromPort),ns(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ns(x.fromPort),ns(x.toPort),x.bb())}}function ns(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ns(y.port)}}te.si=function(){return!0},Nn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Nn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Nn.prototype.isVisible=function(){if(!qn.prototype.isVisible.call(this))return!1;var a=!0,y=qu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===qu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===uo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===pd&&(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},Nn.prototype.Zb=function(a){qn.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)}},Nn.prototype.qx=function(){var a=new vn,y=new vn;return V1(this,this,a,y),y.iterator};function V1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,et=a.diagram;et!==null&&(E=et.isTreePathToChildren),y.linksConnected.each(function(nt){nt.isTreeLink?(E?nt.fromNode===y:nt.toNode===y)&&V1(a,E?nt.toNode:nt.fromNode,x,b):b.add(nt)})}}Nn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new $r(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},te=Nn.prototype,te.Mo=function(a){a===void 0&&(a=null);var y=new $r(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},te.Sd=function(a){a===void 0&&(a=null);var y=new $r(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},te.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 vn,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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):ni},te.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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):ni},te.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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):ni},te.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $r(this.jb),E=this;return b.predicate=function(et){return!((et.fromNode!==E||et.toNode!==a||y!==null&&et.fromPortId!==y||x!==null&&et.toPortId!==x)&&(et.fromNode!==a||et.toNode!==E||x!==null&&et.fromPortId!==x||y!==null&&et.toPortId!==y))},b},te.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new $r(this.jb),E=this;return b.predicate=function(et){return!(et.fromNode!==E||et.toNode!==a||y!==null&&et.fromPortId!==y||x!==null&&et.toPortId!==x)},b};function Gm(a,y,x){ns(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 et=!0,nt=a.diagram;nt!==null&&(et=nt.aa,nt.aa=!0),E(a,y,x),nt!==null&&(nt.aa=et)}}!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,et=b?x:y,E.ci||(E.ci=et),!et.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===et&&(et.isTreeLeaf=!1):y===et&&(et.isTreeLeaf=!1))))}function Um(a,y,x){ns(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var et=a.linkDisconnected;if(E=a.diagram,et!==null){var nt=!0;E!==null&&(nt=E.aa,E.aa=!0),et(a,y,x),E!==null&&(E.aa=nt)}}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)):Yp(y)))}function Yp(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}}}Nn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},te=Nn.prototype,te.Vo=function(a){qn.prototype.Vo.call(this,a),a||(Yp(this),a=this.Yk,a!==null&&tS(a,this))},te.Wo=function(a){qn.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},te.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,qn.prototype.Lj.call(this)},te.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new Yn: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 W0(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=On()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Fn(x)}}}te.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},te.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}},te.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},te.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},te.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Nn)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},te.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 vn;return a(this,y),y},te.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}te.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new $r(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},te.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 yn,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 yn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Kr(x):ni},te.wz=function(a){a===void 0&&(a=1/0);var y=new vn;return Uh(y,this,!1,a,!0),y},Nn.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 vn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===qu),y.Ue=!1}};function Y1(a,y,x,b,E,et,nt){if(1<b)for(var st=x?a.Mo():a.Sd();st.next();){var ht=st.value;ht.isTreeLink&&(ht=ht.To(a),ht===null||ht===a||y.contains(ht)||(y.add(ht),Y1(ht,y,x,b-1,E,et,nt)))}else J1(a,y,x,E,et,nt)}function J1(a,y,x,b,E,et){for(var nt=E===a?!0:a.isTreeExpanded,st=x?a.Mo():a.Sd(),ht={};st.next();){var pt=st.value;if(pt.isTreeLink&&(pt=pt.To(a),pt!==null&&pt!==a)){var St=y.contains(pt);if(St||y.add(pt),nt){var Mt=x?pt.Oo():pt.Po();ht.uv=a,Mt.all(function(Gt){return function(Xt){return Xt===Gt.uv||!Xt.isTreeExpanded}}(ht))&&b.Aj(pt,E),pt.oh(),pt.Zb(!1)}pt.isTreeExpanded&&(pt.wasTreeExpanded=pt.isTreeExpanded,St||J1(pt,y,x,b,E,et))}ht={uv:ht.uv}}a.isTreeExpanded=!1}Nn.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 vn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===qu),y.Ue=!1}};function Q1(a,y,x,b,E,et,nt){for(var st=et===a?!1:a.isTreeExpanded,ht=x?a.Mo():a.Sd(),pt={};ht.next();){var St=ht.value;if(St.isTreeLink&&(st||St.fd||St.bb(),St=St.To(a),St!==null&&St!==a&&!y.contains(St))){if(y.add(St),!st){St.Zb(!0),St.oh();var Mt=x?St.Oo():St.Po();pt.vv=a,Mt.all(function(Gt){return function(Xt){return Xt===Gt.vv||!Xt.isTreeExpanded}}(pt))&&E.Cj(St,et)}(2<b||St.wasTreeExpanded)&&(St.wasTreeExpanded=!1,Q1(St,y,x,b-1,E,et,nt))}pt={vv:pt.vv}}a.isTreeExpanded=!0}hn.Object.defineProperties(Nn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(oh(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&&Qu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Xo},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),oh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Qu(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&&(oh(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&&(oh(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&&(oh(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,et=x.model;if(E!==null&&et.ri()){var nt=et.wa(b);nt!==void 0&&et.Qx(E,nt)}}this.containingGroup=null}this.Yk=a,a!==null&&(tS(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),Sa(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(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&&(oh(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))}}}),Nn.prototype.expandTree=Nn.prototype.expandTree,Nn.prototype.collapseTree=Nn.prototype.collapseTree,Nn.prototype.findTreeParts=Nn.prototype.wz,Nn.prototype.findTreeChildrenNodes=Nn.prototype.Ou,Nn.prototype.findTreeChildrenLinks=Nn.prototype.Qo,Nn.prototype.findTreeLevel=Nn.prototype.uz,Nn.prototype.findTreeParentChain=Nn.prototype.vz,Nn.prototype.findTreeParentNode=Nn.prototype.pg,Nn.prototype.findTreeParentLink=Nn.prototype.kh,Nn.prototype.findCommonTreeParent=Nn.prototype.gz,Nn.prototype.findTreeRoot=Nn.prototype.xz,Nn.prototype.isInTreeOf=Nn.prototype.Nz,Nn.prototype.findPort=Nn.prototype.ns,Nn.prototype.findLinksTo=Nn.prototype.kz,Nn.prototype.findLinksBetween=Nn.prototype.jz,Nn.prototype.findNodesInto=Nn.prototype.Oo,Nn.prototype.findNodesOutOf=Nn.prototype.Po,Nn.prototype.findNodesConnected=Nn.prototype.Mu,Nn.prototype.findLinksInto=Nn.prototype.Sd,Nn.prototype.findLinksOutOf=Nn.prototype.Mo,Nn.prototype.findExternalTreeLinksConnected=Nn.prototype.qx,Nn.prototype.invalidateConnectedLinks=Nn.prototype.Bd,Nn.prototype.invalidateLinkBundle=Nn.prototype.Lz;var kx=new Je(Nn,"SpreadingNone",10),Wm=new Je(Nn,"SpreadingEvenly",11),H0=new Je(Nn,"SpreadingPacked",12);Nn.className="Node",Nn.SpreadingNone=kx,Nn.SpreadingEvenly=Wm,Nn.SpreadingPacked=H0;function Pr(a,y){a===void 0||a instanceof yo||typeof a=="string"?Nn.call(this,a):(Nn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new vn,this.$a=null,this.Sc=new ji,this.Sc.group=this,this.gl=new vn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ye(Pr,Nn),Pr.prototype.cloneProtected=function(a){Nn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ba});y instanceof ba?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())},te=Pr.prototype,te.Af=function(a){Nn.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 Nn)x.Bd(y);else if(x instanceof Cn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},te.gk=function(a,y,x,b,E,et,nt){if(a===$i&&y==="elements"){if(E instanceof ba)this.$a===null?this.$a=E:this.$a!==E&&je("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Sn){var st=E.Nl(function(ht){return ht instanceof ba});st instanceof ba&&(this.$a===null?this.$a=st:this.$a!==st&&je("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Sn&&this.$a.rg(b)&&(this.$a=null));Nn.prototype.gk.call(this,a,y,x,b,E,et,nt)},te.Xl=function(a,y){Nn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Sn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Sn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof Tr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},te.eh=function(a,y,x,b){this.nf=this.$a,Nn.prototype.eh.call(this,a,y,x,b)},te.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Cn||y.Va()}),Nn.prototype.Va.call(this)},te.si=function(){if(!Nn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Nn){if(y.isVisible()&&xa(y))return!1}else if(y instanceof Cn&&y.isVisible()&&xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function V0(a,y){if(a.Gn.add(y)){y instanceof Pr&&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 Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function K0(a,y){if(a.Gn.remove(y)){y instanceof Pr&&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 Cn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}te.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)}Nn.prototype.Lj.call(this)},Pr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=en(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Pr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=en(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Pr.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))},te=Pr.prototype,te.Bd=function(a){var y=(this.U&65536)!==0;if(Nn.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()?(ns(x.fromPort),ns(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(ns(x.fromPort),ns(x.toPort),x.bb()))}}},te.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 vn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Nn)for(E=E.linksConnected;E.next();){var et=E.value;y.contains(et)||x.add(et)}}return a&&(this.$p=x),x.iterator},te.iz=function(){var a=this.Rj();a.add(this);for(var y=new vn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Nn)for(b=b.linksConnected;b.next();){var E=b.value,et=E.fromNode;et===null||a.contains(et)&&et!==this||y.add(et),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},te.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new vn;return a(this,y),y},te.Rj=function(){var a=new vn;return Uh(a,this,!0,0,!0),a.remove(this),a},te.Zb=function(a){Nn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Pr.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 et=E.value;if(et.Zb(!1),et instanceof Pr&&et.isSubGraphExpanded&&(et.wasSubGraphExpanded=et.isSubGraphExpanded,$1(et,y,x,b)),et instanceof Nn)et.Bd(y),x.Aj(et,b);else if(et instanceof Cn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!1}Pr.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 et=E.value;if(et.Zb(!0),et instanceof Pr&&et.wasSubGraphExpanded&&(et.wasSubGraphExpanded=!1,q1(et,y,x,b)),et instanceof Nn)et.Bd(y),x.Cj(et,b);else if(et instanceof Cn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!0}Pr.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,et=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===et||isNaN(x)&&isNaN(et))){for(b=E-(isNaN(b)?0:b),x=et-(isNaN(x)?0:x),et=Le.alloc(),Nn.prototype.move.call(this,a,y),a=new vn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Cn&&(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 Nn&&E.isLinkLabel)){var nt=E.position,st=E.location;nt.w()?(et.x=nt.x+b,et.y=nt.y+x,E.position=et):st.w()&&(et.x=st.x+b,et.y=st.y+x,E.location=et)}for(y.reset();y.next();)E=y.value,E instanceof Cn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(nt=E.position,et.x=nt.x+b,et.y=nt.y+x,et.w()?E.move(et):E.bb(),X0(E)&&E.bb());Le.free(et)}},hn.Object.defineProperties(Pr.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&&je("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&&(oh(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&&(oh(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&&(oh(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&&(oh(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)}}}),Pr.prototype.expandSubGraph=Pr.prototype.expandSubGraph,Pr.prototype.collapseSubGraph=Pr.prototype.collapseSubGraph,Pr.prototype.findSubGraphParts=Pr.prototype.Rj,Pr.prototype.findContainingGroupChain=Pr.prototype.hz,Pr.prototype.findExternalNodesConnected=Pr.prototype.iz,Pr.prototype.findExternalLinksConnected=Pr.prototype.Lu,Pr.prototype.ensureBounds=Pr.prototype.Va,Pr.className="Group";function ba(a){ze.call(this),this.yb=us,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ye(ba,ze),ba.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ba.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return No(0,0,y.width,y.height,a.x,a.y)},ba.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Pr||a instanceof Xr)||je("Placeholder is not inside a Group or Adornment."),a instanceof Pr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(ra(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=Le.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Le.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,et=a.adornedObject;a.angle=et.li();var nt=0;et instanceof Tr&&(nt=et.strokeWidth);var st=et.Df(),ht=et.naturalBounds,pt=(ht.width+nt)*st;nt=(ht.height+nt)*st,a.type!==Sn.Link&&(st=et.ga(a.category==="Selection"?qr:a.locationSpot,Le.alloc()),a.location=st,Le.free(st)),isNaN(pt)||isNaN(nt)?(a=et.ga(qr,Le.alloc()),pt=on.allocAt(a.x,a.y,0,0),pt.Ye(et.ga(oo,a)),pt.Ye(et.ga(pi,a)),pt.Ye(et.ga(ia,a)),ra(y,pt.width+b||0,pt.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Le.free(a),on.free(pt)):(ra(y,pt+b||0,nt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ba.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},ba.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Pr&&!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=on.alloc(),E=this.computeMemberBounds(x);var et=this.yb;return y instanceof Pr&&!y.isSubGraphExpanded?a.h(E.x-et.left,E.y-et.top,0,0):a.h(E.x-et.left,E.y-et.top,Math.max(E.width+et.left+et.right,0),Math.max(E.height+et.top+et.bottom,0)),on.free(x),b&&y instanceof Pr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ba.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Pr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,et=-1/0,nt=y.memberParts;nt.next();){var st=nt.value;if(st.isVisible()){if(st instanceof Cn&&(!y.computesBoundsIncludingLinks||gs(st)||st.fromNode===y||st.toNode===y))continue;st=st.actualBounds,st.left<x&&(x=st.left),st.top<b&&(b=st.top),st.right>E&&(E=st.right),st.bottom>et&&(et=st.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,et-b):(y=y.location,a.h(y.x,y.y,0,0)),a},hn.Object.defineProperties(ba.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ba.className="Placeholder";function Cn(a){qn.call(this,Sn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Pa,this.Om=0,this.Qm=Pa,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new yn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new Pn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Le,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ye(Cn,qn),Cn.prototype.cloneProtected=function(a){qn.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())},te=Cn.prototype,te.Af=function(a){qn.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&&ns(y),a=a.toPort,a!==null&&ns(a)},te.qb=function(a){a.classType===Cn?(a.value&2)===2?this.routing=a:a===vs||a===sh||a===Nd?this.curve=a:a===$p||a===Ym||a===Jm?this.adjusting=a:a!==Q0&&a!==Pa&&je("Unknown Link enum value for a Link property: "+a):qn.prototype.qb.call(this,a)},te.Xc=function(){this.ba===null&&(this.ba=new Rp)},te.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),xa(a)||zh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),xa(a)||zh(a)))},te.zv=function(){return!1},te.Av=function(){},te.Zc=function(){return!1},Cn.prototype.computeAngle=function(a,y,x){return Cn.computeAngle(y,x)},Cn.computeAngle=function(a,y){switch(a){default:case Pa:a=0;break;case qp:a=y;break;case tg:a=y+90;break;case eg:a=y-90;break;case $0:a=y+180;break;case Qm:a=Ge.bp(y),90<a&&270>a&&(a-=180);break;case ng:a=Ge.bp(y+90),90<a&&270>a&&(a-=180);break;case rg:a=Ge.bp(y-90),90<a&&270>a&&(a-=180);break;case $m:if(a=Ge.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ge.bp(a)};function Ld(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&&K0(x,a),a.Ah=y,y!==null&&V0(y,a);var E=a.containingGroupChanged;if(E!==null){var et=!0,nt=a.diagram;nt!==null&&(et=nt.aa,nt.aa=!0),E(a,x,y),nt!==null&&(nt.aa=et)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}te=Cn.prototype,te.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&qn.prototype.oh.call(this)},te.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},te.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tS(a,y){a.wd===null&&(a.wd=new vn),a.wd.add(y),a.v()}te.Vo=function(a){if(qn.prototype.Vo.call(this,a),Ic(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)}Jp(this)}},te.Wo=function(a){if(qn.prototype.Wo.call(this,a),Ic(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)}Qp(this)}},te.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))},Cn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Cn.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?qn.prototype.move.call(this,a,!1):(a=Le.allocAt(x.x+b,x.y+E),qn.prototype.move.call(this,a,!1),Le.free(a)),ah(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Cn.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},Cn.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},Cn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(di),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()===vs))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()===vs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Ge.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 et=this.i(x+2);x=this.i(x+3),Ge.ax(b.x,b.y,E.x,E.y,et.x,et.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var nt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=et=b=0;b<x/2&&et<y&&(E=nt[et],!(b+E>x/2));)b+=E,et++;return y=this.i(et),et=this.i(et+1),1>Math.abs(y.x-et.x)?y.y>et.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-et.y)?y.x>et.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*(et.x-y.x),y.y+x*(et.y-y.y))),a},Cn.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()===vs))return this.ua.wx(.5);if(this.computeCurve()===vs&&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),Ge.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 et;E<b/2&&x<a&&(et=y[x],!(E+et>b/2));)E+=et,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)},te=Cn.prototype,te.i=function(a){return this.Nb.s[a]},te.dd=function(a,y){this.Nb.cd(a,y)},te.L=function(a,y,x){this.Nb.cd(a,new Le(y,x))},te.Kz=function(a,y){this.Nb.Gb(a,y)},te.m=function(a,y,x){this.Nb.Gb(a,new Le(y,x))},te.ne=function(a){this.Nb.add(a)},te.yf=function(a,y){this.Nb.add(new Le(a,y))},te.pv=function(a){this.Nb.mb(a)},te.Fj=function(){this.Nb.clear()};function ah(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 yn,et=a.Nb.iterator;et.next();){var nt=et.value;E.add(new Le(nt.x+y,nt.y+x).freeze())}E.freeze(),et=a.Nb,a.Nb=E,nt=a.diagram,isNaN(y)||isNaN(x)||nt!==null&&nt.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),Sa(a)),b?Hm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),nt!==null&&nt.animationManager.zb&&ed(nt.animationManager,a,E),a.g("points",et,E)}}te.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},te.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,et=E.length,nt=0;nt<et;nt++){var st=E[nt];x=Math.min(st.x,x),b=Math.min(st.y,b)}st=nt=1/0;for(var ht=y.s,pt=ht.length,St=0;St<pt;St++){var Mt=ht[St];nt=Math.min(Mt.x,nt),st=Math.min(Mt.y,st),Mt.freeze()}if(y.freeze(),pt===et){for(et=0;et<pt;et++)if(St=E[et],Mt=ht[et],St.x-x!==Mt.x-nt||St.y-b!==Mt.y-st){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ed(x.animationManager,this,y),Hm(this),this.g("points",a,y)}},te.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Hm(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))}te.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())}},te.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()}}},Cn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ef||(Ef=new Nn,Ef.desiredSize=fi,Ef.Va()),this.defaultFromPoint&&(Ef.location=this.defaultFromPoint,Ef.Va(),y=a=Ef)):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?(Mf||(Mf=new Nn,Mf.desiredSize=fi,Mf.Va()),this.defaultToPoint&&(Mf.location=this.defaultToPoint,Mf.Va(),E=b=Mf)):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 et=this.pointsCount,nt=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var st=Ad(nt),ht=Ad(x),pt=y===E&&y!==null,St=this.isOrthogonal,Mt=this.curve===vs;this.Wf=pt&&!St?Mt=!0:!1;var Gt=this.computeAdjusting()===Pa||pt;if(!St&&!pt&&st&&ht){if(st=!1,!Gt&&3<=et&&(Gt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),st=this.adjustPoints(0,Gt,et-1,ht))&&(Gt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Gt,et-1,ht)),!st)if(this.Fj(),Mt){et=this.getLinkPoint(a,y,nt,!0,!1,b,E),Gt=this.getLinkPoint(b,E,x,!1,!1,a,y),st=Gt.x-et.x,ht=Gt.y-et.y,pt=this.computeCurviness(),Mt=St=0;var Xt=et.x+st/3,Qt=et.y+ht/3,ie=Xt,Me=Qt;Ge.B(ht,0)?Me=0<st?Me-pt:Me+pt:(St=-st/ht,Mt=Math.sqrt(pt*pt/(St*St+1)),0>pt&&(Mt=-Mt),ie=(0>ht?-1:1)*Mt+Xt,Me=St*(ie-Xt)+Qt),Xt=et.x+2*st/3,Qt=et.y+2*ht/3;var xe=Xt,Ne=Qt;Ge.B(ht,0)?Ne=0<st?Ne-pt:Ne+pt:(xe=(0>ht?-1:1)*Mt+Xt,Ne=St*(xe-Xt)+Qt),this.Fj(),this.ne(et),this.yf(ie,Me),this.yf(xe,Ne),this.ne(Gt),this.dd(0,this.getLinkPoint(a,y,nt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else et=b,Gt=E,b=this.getLinkPoint(a,y,nt,!0,!1,et,Gt),E=this.getLinkPoint(et,Gt,x,!1,!1,a,y),this.hasCurviness()?(Gt=E.x-b.x,x=E.y-b.y,nt=this.computeCurviness(),a=b.x+Gt/2,y=b.y+x/2,et=a,st=y,Ge.B(x,0)?st=0<Gt?st-nt:st+nt:(Gt=-Gt/x,et=Math.sqrt(nt*nt/(Gt*Gt+1)),0>nt&&(et=-et),et=(0>x?-1:1)*et+a,st=Gt*(et-a)+y),this.ne(b),this.yf(et,st),this.ne(E)):(this.ne(b),this.ne(E),st=on.alloc(),y.mi(st),ht=st.ca(E),Gt.mi(st),pt=st.ca(b),(ht||pt)&&(nt=y.ga(Km(nt),new Le),this.dd(0,this.getLinkPointFromPoint(a,y,nt,E,!0,nt)),x=Gt.ga(Km(x),new Le),this.dd(1,this.getLinkPointFromPoint(et,Gt,x,b,!1,x))),on.free(st))}else{Mt=this.isAvoiding,Gt&&(St&&Mt||pt)&&this.Fj();var Fe=pt?this.computeCurviness():0;Mt=this.getLinkPoint(a,y,nt,!0,St,b,E),Xt=ie=Qt=0,(St||!st||pt)&&(Me=this.computeEndSegmentLength(a,y,nt,!0),Xt=this.getLinkDirection(a,y,Mt,nt,!0,St,b,E),pt&&(st||nt.D(x)||!St&&nt.x+x.x===1&&nt.y+x.y===1)&&(Xt-=St?90:30,0>Fe&&(Xt-=180)),0>Xt?Xt+=360:360<=Xt&&(Xt-=360),pt&&(Me+=Math.abs(Fe)*(St?1:2)),Xt===0?Qt=Me:Xt===90?ie=Me:Xt===180?Qt=-Me:Xt===270?ie=-Me:(Qt=Me*Math.cos(Xt*Math.PI/180),ie=Me*Math.sin(Xt*Math.PI/180)),nt.Mc()&&pt&&(Me=y.ga(Fr,Le.alloc()),xe=Le.allocAt(Me.x+1e3*Qt,Me.y+1e3*ie),this.getLinkPointFromPoint(a,y,Me,xe,!0,Mt),Le.free(Me),Le.free(xe))),Me=this.getLinkPoint(b,E,x,!1,St,a,y);var De=Ne=xe=0;if(St||!ht||pt){var _e=this.computeEndSegmentLength(b,E,x,!1);De=this.getLinkDirection(b,E,Me,x,!1,St,a,y),pt&&(ht||nt.D(x)||!St&&nt.x+x.x===1&&nt.y+x.y===1)&&(De+=St?0:30,0>Fe&&(De+=180)),0>De?De+=360:360<=De&&(De-=360),pt&&(_e+=Math.abs(Fe)*(St?1:2)),De===0?xe=_e:De===90?Ne=_e:De===180?xe=-_e:De===270?Ne=-_e:(xe=_e*Math.cos(De*Math.PI/180),Ne=_e*Math.sin(De*Math.PI/180)),x.Mc()&&pt&&(x=E.ga(Fr,Le.alloc()),nt=Le.allocAt(x.x+1e3*xe,x.y+1e3*Ne),this.getLinkPointFromPoint(b,E,x,nt,!1,Me),Le.free(x),Le.free(nt))}x=Mt,(St||!st||pt)&&(x=new Le(Mt.x+Qt,Mt.y+ie)),nt=Me,(St||!ht||pt)&&(nt=new Le(Me.x+xe,Me.y+Ne)),!Gt&&!St&&st&&3<et&&this.adjustPoints(0,Mt,et-2,nt)?this.dd(et-1,Me):!Gt&&!St&&ht&&3<et&&this.adjustPoints(1,x,et-1,Me)?this.dd(0,Mt):!Gt&&(St?6<=et:4<et)&&this.adjustPoints(1,x,et-2,nt)?(this.dd(0,Mt),this.dd(et-1,Me)):(this.Fj(),this.ne(Mt),(St||!st||pt)&&this.ne(x),St&&this.addOrthoPoints(x,Xt,nt,De,a,b),(St||!ht||pt)&&this.ne(nt),this.ne(Me))}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}Cn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,et){if(et===void 0&&(et=new Le),a===null||y===null)return et.assign(x),et;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 nt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),nt=a.m22*E;var st=-a.m12*E,ht=-a.m21*E,pt=a.m11*E,St=E*(a.m21*a.dy-a.m22*a.dx),Mt=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*nt+b.y*ht+St,b=b.x*st+b.y*pt+Mt,nt=x.x*nt+x.y*ht+St,x=x.x*st+x.y*pt+Mt}return y.Sj(E,b,nt,x,et),a!==null&&et.transform(a),et};function Vm(a,y){var x=y.Zn;return x===null&&(x=new Tf,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Cn.prototype.getLinkPoint=function(a,y,x,b,E,et,nt,st){if(st===void 0&&(st=new Le),x.sb()&&!Ad(x))return y.ga(x,st),st;if(x.$c()){var ht=Vm(this,y);if(ht!==null){if(st.assign(ht.Zo),E&&this.routing===nS){var pt=Vm(this,nt);if(pt!==null&&ht.Gl<pt.Gl){ht=Le.alloc(),pt=Le.alloc();var St=new on(y.ga(qr,ht),y.ga(oo,pt)),Mt=this.computeSpot(!b,nt);a=this.getLinkPoint(et,nt,Mt,!b,E,a,y,pt),(x.Hf(bs)||x.Hf(Aa))&&a.y>=St.y&&a.y<=St.y+St.height?st.y=a.y:(x.Hf(Ja)||x.Hf(Ps))&&a.x>=St.x&&a.x<=St.x+St.width&&(st.x=a.x),Le.free(ht),Le.free(pt)}}return st}}return x=y.ga(Km(x),Le.alloc()),this.pointsCount>(E?6:2)?(nt=b?this.i(1):this.i(this.pointsCount-2),E&&(nt=Z0(x,nt.copy()))):(ht=this.computeSpot(!b,nt),et=Le.alloc(),nt=nt.ga(Km(ht),et),E&&(nt=Z0(x,nt)),Le.free(et)),this.getLinkPointFromPoint(a,y,x,nt,b,st),Le.free(x),st},Cn.prototype.getLinkDirection=function(a,y,x,b,E,et,nt,st){t:if(b.sb())var ht=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()&&(ht=Vm(this,y),ht!==null))switch(ht.Nc){case 1:ht=270;break t;case 2:ht=180;break t;default:case 4:ht=0;break t;case 8:ht=90;break t}ht=y.ga(Fr,Le.alloc()),this.pointsCount>(et?6:2)?(st=E?this.i(1):this.i(this.pointsCount-2),st=et?Z0(ht,st.copy()):x):(x=Le.alloc(),st=st.ga(Fr,x),Le.free(x)),x=Math.abs(st.x-ht.x)>Math.abs(st.y-ht.y)?st.x>=ht.x?0:180:st.y>=ht.y?90:270,Le.free(ht),ht=x}return b.Mc()&&nt.Td(a)&&(ht+=180,360<=ht&&(ht-=360)),Ad(b)||(a=y.li(),a===0)||(45<=a&&135>a?ht+=90:135<=a&&225>a?ht+=180:225<=a&&315>a&&(ht+=270),360<=ht&&(ht-=360)),ht},Cn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Vm(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)},Cn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Fr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===jo?zr:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===jo?zr:y)),a};function Ad(a){return a===zr||a.x===.5&&a.y===.5}function Km(a){return a.x===.5&&a.y===.5?a:Fr}Cn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Pa&&4<this.pointsCount?this.computeMidPoint(new Le):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Fr))},Cn.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},Cn.prototype.Cf=function(a,y,x,b,E,et){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var nt=et;if(et===void 0&&(nt=Sr.alloc(),nt.reset()),nt.multiply(this.transform),this.fh(a,nt))return v0(this,y,x,E),et===void 0&&Sr.free(nt),!0;if(this.Yc(a,nt)){var st=!1;if(!this.isAtomic)for(var ht=this.O.s,pt=ht.length;pt--;){var St=ht[pt];if(St.visible||St===this.locationObject){var Mt=St.actualBounds,Gt=this.naturalBounds;if(!(Mt.x>Gt.width||Mt.y>Gt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height)){if(Mt=Sr.alloc(),Mt.set(nt),St instanceof Sn)st=St.Cf(a,y,x,b,E,Mt);else if(this.path===St){if(St instanceof Tr)if(st=a,Gt=b,St.pickable===!1)st=!1;else if(Mt.multiply(St.transform),Gt)t:{var Xt=st,Qt=Mt;if(St.fh(Xt,Qt))st=!0;else{if(Qt===void 0&&(Qt=St.transform,Xt.Re(St.actualBounds))){st=!0;break t}st=Xt.left,Gt=Xt.right;var ie=Xt.top;Xt=Xt.bottom;var Me=Le.alloc(),xe=Le.alloc(),Ne=Le.alloc(),Fe=Sr.alloc();Fe.set(Qt),Fe.bv(St.transform),Fe.Vj(),xe.x=Gt,xe.y=ie,xe.transform(Fe),Me.x=st,Me.y=ie,Me.transform(Fe),Qt=!1,Dc(St,Me,xe,Ne)?Qt=!0:(Me.x=Gt,Me.y=Xt,Me.transform(Fe),Dc(St,Me,xe,Ne)?Qt=!0:(xe.x=st,xe.y=Xt,xe.transform(Fe),Dc(St,Me,xe,Ne)?Qt=!0:(Me.x=st,Me.y=ie,Me.transform(Fe),Dc(St,Me,xe,Ne)&&(Qt=!0)))),Sr.free(Fe),Le.free(Me),Le.free(xe),Le.free(Ne),st=Qt}}else st=St.fh(st,Mt)}else st=Po(St,a,b,Mt);st&&(Gt=St,y!==null&&(Gt=y(St)),Gt&&(x===null||x(Gt))&&E.add(Gt)),Sr.free(Mt)}}}return et===void 0&&Sr.free(nt),st||this.background!==null||this.areaBackground!==null}return et===void 0&&Sr.free(nt),!1},Cn.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?vs:this.curve},Cn.prototype.computeCorner=function(){if(this.curve===vs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Cn.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},Cn.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,et=b.margin,nt=isNaN(E.width)?30:E.width*b.scale+et.left+et.right;E=isNaN(E.height)?14:E.height*b.scale+et.top+et.bottom,b=b.segmentOrientation,b===qp||b===Qm||b===$0?a=Math.max(a,E):b===eg||b===rg||b===tg||b===ng?a=Math.max(a,nt):(y=y.ga(Fr).ab(x.ga(Fr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*nt)+Math.abs(Math.cos(y)*E)+1)),this.curve===vs&&(a*=1.333)}}return a},Cn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Pa&&x.bb()}},Cn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=On(),b=0,E=y.links,et=0;et<E.length;et++){var nt=E[et].computeSpacing();x.push(nt),b+=nt}for(b=-b/2,et=0;et<E.length;et++){if(E[et]===this){a=b+x[et]/2;break}b+=x[et]}y.Ds===this.fromNode&&(a=-a),Fn(x)}}return a},Cn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Cn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Cn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===Jm&&(E=$p)}switch(E){case Ym:var et=this.i(a),nt=this.i(x);if(!et.Xa(y)||!nt.Xa(b)){E=et.x,et=et.y;var st=nt.x-E,ht=nt.y-et,pt=Math.sqrt(st*st+ht*ht);if(!Ge.$(pt,0)){if(Ge.$(st,0))var St=0>ht?-Math.PI/2:Math.PI/2;else St=Math.atan(ht/Math.abs(st)),0>st&&(St=Math.PI-St);nt=y.x;var Mt=y.y;st=b.x-nt;var Gt=b.y-Mt;for(ht=Math.sqrt(st*st+Gt*Gt),Ge.$(st,0)?Gt=0>Gt?-Math.PI/2:Math.PI/2:(Gt=Math.atan(Gt/Math.abs(st)),0>st&&(Gt=Math.PI-Gt)),pt=ht/pt,St=Gt-St,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),st=y.x-E,ht=y.y-et,y=Math.sqrt(st*st+ht*ht),Ge.$(y,0)||(Ge.$(st,0)?ht=0>ht?-Math.PI/2:Math.PI/2:(ht=Math.atan(ht/Math.abs(st)),0>st&&(ht=Math.PI-ht)),st=ht+St,y*=pt,this.L(a,nt+y*Math.cos(st),Mt+y*Math.sin(st)));this.dd(x,b)}}return!0;case Jm:if(et=this.i(a),Mt=this.i(x),!et.Xa(y)||!Mt.Xa(b)){E=et.x,et=et.y,nt=Mt.x,Mt=Mt.y,pt=(nt-E)*(nt-E)+(Mt-et)*(Mt-et),st=y.x,St=y.y,ht=b.x,Gt=b.y;var Xt=1;if(ht-st!==0){var Qt=(Gt-St)/(ht-st);Xt=Math.sqrt(1+1/(Qt*Qt))}else Qt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ie=y.x,Me=y.y,xe=.5;pt!==0&&(xe=((E-ie)*(E-nt)+(et-Me)*(et-Mt))/pt);var Ne=E+xe*(nt-E),Fe=et+xe*(Mt-et);y=Math.sqrt((ie-Ne)*(ie-Ne)+(Me-Fe)*(Me-Fe)),Me<Qt*(ie-Ne)+Fe&&(y=-y),0<Qt&&(y=-y),ie=st+xe*(ht-st),xe=St+xe*(Gt-St),Qt!==0?(y=ie+y/Xt,this.L(a,y,xe-(y-ie)/Qt)):this.L(a,ie,xe+y)}this.dd(x,b)}return!0;case $p:t:{if(this.isOrthogonal&&(E=this.i(a),et=this.i(a+1),nt=this.i(a+2),st=et.x,St=et.y,Mt=st,pt=St,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?St=y.y:Ge.B(et.y,nt.y)&&(st=y.x):Ge.B(E.x,et.x)&&(Ge.B(et.y,nt.y)?st=y.x:Ge.B(et.x,nt.x)&&(St=y.y)),this.L(a+1,st,St),E=this.i(x),et=this.i(x-1),nt=this.i(x-2),st=et.x,St=et.y,ht=st,Gt=St,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?St=b.y:Ge.B(et.y,nt.y)&&(st=b.x):Ge.B(E.x,et.x)&&(Ge.B(et.y,nt.y)?st=b.x:Ge.B(et.x,nt.x)&&(St=b.y)),this.L(x-1,st,St),X0(this))){this.L(a+1,Mt,pt),this.L(x-1,ht,Gt),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Cn.prototype.addOrthoPoints=function(a,y,x,b,E,et){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var nt=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 st=E.actualBounds.copy(),ht=et.actualBounds.copy();if(st.w()&&ht.w()){st.Bc(ig,ig),ht.Bc(ig,ig),st.Ye(a),ht.Ye(x);var pt=Le.alloc(),St=Le.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&ht.right>a.x||b===90&&x.y>a.y&&ht.right>a.x?(pt.h(x.x,a.y),St.h(x.x,(a.y+x.y)/2),b===180?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),St.x=pt.x,St.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pt.x=a.x<ht.left?this.computeMidOrthoPosition(a.x,a.y,ht.left,x.y,!1):a.x<ht.right&&(b===270&&a.y<ht.top||b===90&&a.y>ht.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ht.right,St.x=pt.x,St.y=x.y):b===0&&a.x<ht.left&&a.y>ht.top&&a.y<ht.bottom&&(pt.x=a.x,pt.y=a.y<x.y?Math.min(x.y,ht.top):Math.max(x.y,ht.bottom),St.y=pt.y)):(pt.h(a.x,x.y),St.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<st.top||b===270&&x.y>st.bottom)&&(b===180&&(ht.ca(a)||st.ca(x))?pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?pt.y=this.computeMidOrthoPosition(a.x,st.top,x.x,Math.max(x.y,ht.bottom),!0):x.y>a.y&&(b===180||b===270)&&(pt.y=this.computeMidOrthoPosition(a.x,st.bottom,x.x,Math.min(x.y,ht.top),!0)),St.x=x.x,St.y=pt.y),pt.y>st.top&&pt.y<st.bottom&&(x.x>=st.left&&x.x<=a.x||a.x<=ht.right&&a.x>=x.x?(b===90||b===270)&&(pt.h(Math.max((a.x+x.x)/2,a.x),a.y),St.h(pt.x,x.y)):(pt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?st.top:Math.min(st.top,ht.top)):Math.max(x.y,b===0?st.bottom:Math.max(st.bottom,ht.bottom)),St.x=x.x,St.y=pt.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&ht.left<a.x||b===90&&x.y>a.y&&ht.left<a.x?(pt.h(x.x,a.y),St.h(x.x,(a.y+x.y)/2),b===0?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),St.x=pt.x,St.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pt.x=a.x>ht.right?this.computeMidOrthoPosition(a.x,a.y,ht.right,x.y,!1):a.x>ht.left&&(b===270&&a.y<ht.top||b===90&&a.y>ht.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ht.left,St.x=pt.x,St.y=x.y):b===180&&a.x>ht.right&&a.y>ht.top&&a.y<ht.bottom&&(pt.x=a.x,pt.y=a.y<x.y?Math.min(x.y,ht.top):Math.max(x.y,ht.bottom),St.y=pt.y)):(pt.h(a.x,x.y),St.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<st.top||b===270&&x.y>st.bottom)&&(b===0&&(ht.ca(a)||st.ca(x))?pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?pt.y=this.computeMidOrthoPosition(a.x,st.top,x.x,Math.max(x.y,ht.bottom),!0):x.y>a.y&&(b===0||b===270)&&(pt.y=this.computeMidOrthoPosition(a.x,st.bottom,x.x,Math.min(x.y,ht.top),!0)),St.x=x.x,St.y=pt.y),pt.y>st.top&&pt.y<st.bottom&&(x.x<=st.right&&x.x>=a.x||a.x>=ht.left&&a.x<=x.x?(b===90||b===270)&&(pt.h(Math.min((a.x+x.x)/2,a.x),a.y),St.h(pt.x,x.y)):(pt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?st.top:Math.min(st.top,ht.top)):Math.max(x.y,b===180?st.bottom:Math.max(st.bottom,ht.bottom)),St.x=x.x,St.y=pt.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&ht.bottom>a.y||b===0&&x.x>a.x&&ht.bottom>a.y?(pt.h(a.x,x.y),St.h((a.x+x.x)/2,x.y),b===270?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),St.x=x.x,St.y=pt.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(pt.y=a.y<ht.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ht.top,!0):a.y<ht.bottom&&(b===180&&a.x<ht.left||b===0&&a.x>ht.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ht.bottom,St.x=x.x,St.y=pt.y):b===90&&a.y<ht.top&&a.x>ht.left&&a.x<ht.right&&(pt.x=a.x<x.x?Math.min(x.x,ht.left):Math.max(x.x,ht.right),pt.y=a.y,St.x=pt.x)):(pt.h(x.x,a.y),St.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<st.left||b===180&&x.x>st.right)&&(b===270&&(ht.ca(a)||st.ca(x))?pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?pt.x=this.computeMidOrthoPosition(st.left,a.y,Math.max(x.x,ht.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(pt.x=this.computeMidOrthoPosition(st.right,a.y,Math.min(x.x,ht.left),x.y,!1)),St.x=pt.x,St.y=x.y),pt.x>st.left&&pt.x<st.right&&(x.y>=st.top&&x.y<=a.y||a.y<=ht.bottom&&a.y>=x.y?(b===0||b===180)&&(pt.h(a.x,Math.max((a.y+x.y)/2,a.y)),St.h(x.x,pt.y)):(pt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?st.left:Math.min(st.left,ht.left)):Math.max(x.x,b===90?st.right:Math.max(st.right,ht.right)),St.x=pt.x,St.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&ht.top<a.y||b===0&&x.x>a.x&&ht.top<a.y?(pt.h(a.x,x.y),St.h((a.x+x.x)/2,x.y),b===90?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),St.x=x.x,St.y=pt.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(pt.y=a.y>ht.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ht.bottom,!0):a.y>ht.top&&(b===180&&a.x<ht.left||b===0&&a.x>ht.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ht.top,St.x=x.x,St.y=pt.y):b===270&&a.y>ht.bottom&&a.x>ht.left&&a.x<ht.right&&(pt.x=a.x<x.x?Math.min(x.x,ht.left):Math.max(x.x,ht.right),pt.y=a.y,St.x=pt.x)):(pt.h(x.x,a.y),St.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<st.left||b===180&&x.x>st.right)&&(b===90&&(ht.ca(a)||st.ca(x))?pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?pt.x=this.computeMidOrthoPosition(st.left,a.y,Math.max(x.x,ht.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(pt.x=this.computeMidOrthoPosition(st.right,a.y,Math.min(x.x,ht.left),x.y,!1)),St.x=pt.x,St.y=x.y),pt.x>st.left&&pt.x<st.right&&(x.y<=st.bottom&&x.y>=a.y||a.y>=ht.top&&a.y<=x.y?(b===0||b===180)&&(pt.h(a.x,Math.min((a.y+x.y)/2,a.y)),St.h(x.x,pt.y)):(pt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?st.left:Math.min(st.left,ht.left)):Math.max(x.x,b===270?st.right:Math.max(st.right,ht.right)),St.x=pt.x,St.y=x.y)));var Mt=x;if(this.isAvoiding){var Gt=this.diagram;if(Gt===null||E===et||this.layer.isTemporary||!hd(Gt)||st.ca(Mt)&&!et.Td(E)||ht.ca(a)&&!E.Td(et))y=!1;else{var Xt=cd(Gt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Xt.Yj(Math.min(a.x,pt.x),Math.min(a.y,pt.y),Math.abs(a.x-pt.x),Math.abs(a.y-pt.y))&&Xt.Yj(Math.min(pt.x,St.x),Math.min(pt.y,St.y),Math.abs(pt.x-St.x),Math.abs(pt.y-St.y))&&Xt.Yj(Math.min(St.x,Mt.x),Math.min(St.y,Mt.y),Math.abs(St.x-Mt.x),Math.abs(St.y-Mt.y)))y=!1;else{E=a,et=Mt;var Qt=x=null;if(Gt.isVirtualized){Gt=Xt.bounds.copy(),Gt.Bc(-Xt.Ho,-Xt.Go);var ie=Le.alloc();jd(Xt,a.x,a.y)||(Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,a.x,a.y,pt.x,pt.y,ie)?(x=a=ie.copy(),y=ie.ab(pt)):Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,pt.x,pt.y,St.x,St.y,ie)?(x=a=ie.copy(),y=ie.ab(St)):Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,St.x,St.y,Mt.x,Mt.y,ie)&&(x=a=ie.copy(),y=ie.ab(Mt))),jd(Xt,Mt.x,Mt.y)||(Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,Mt.x,Mt.y,St.x,St.y,ie)?(Qt=Mt=ie.copy(),b=St.ab(ie)):Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,St.x,St.y,pt.x,pt.y,ie)?(Qt=Mt=ie.copy(),b=pt.ab(ie)):Ge.Ff(Gt.x,Gt.y,Gt.x+Gt.width,Gt.y+Gt.height,pt.x,pt.y,a.x,a.y,ie)&&(Qt=Mt=ie.copy(),b=a.ab(ie))),Le.free(ie)}st=st.copy().ed(ht),st.Bc(Xt.Ho*Xt.Os,Xt.Go*Xt.Os),aS(Xt,a,y,Mt,b,st,!0),ht=tu(Xt,Mt.x,Mt.y),!Xt.abort&&ht>=Od&&(oS(Xt),st.Bc(Xt.Ho*Xt.Hx,Xt.Go*Xt.Ix),aS(Xt,a,y,Mt,b,st,!1),ht=tu(Xt,Mt.x,Mt.y)),!Xt.abort&&ht<Od&&tu(Xt,Mt.x,Mt.y)!==lh?(Y0(this,Xt,Mt.x,Mt.y,b,!0,nt),st=this.i(2),4>this.pointsCount?(y===0||y===180?(st.x=a.x,st.y=Mt.y):(st.x=Mt.x,st.y=a.y),this.L(2,st.x,st.y),this.m(3,st.x,st.y)):(nt=this.i(3),y===0||y===180?Ge.B(st.x,nt.x)?(st=y===0?Math.max(st.x,a.x):Math.min(st.x,a.x),this.L(2,st,a.y),this.L(3,st,nt.y)):Ge.B(st.y,nt.y)?(Math.abs(a.y-st.y)<=Xt.Go/2&&(this.L(2,st.x,a.y),this.L(3,nt.x,a.y)),this.m(2,st.x,a.y)):this.L(2,a.x,st.y):(y===90||y===270)&&(Ge.B(st.y,nt.y)?(st=y===90?Math.max(st.y,a.y):Math.min(st.y,a.y),this.L(2,a.x,st),this.L(3,nt.x,st)):Ge.B(st.x,nt.x)?(Math.abs(a.x-st.x)<=Xt.Ho/2&&(this.L(2,a.x,st.y),this.L(3,a.x,nt.y)),this.m(2,a.x,st.y)):this.L(2,st.x,a.y))),x!==null&&(a=this.i(1),nt=this.i(2),a.x!==nt.x&&a.y!==nt.y?y===0||y===180?this.m(2,a.x,nt.y):this.m(2,nt.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Qt!==null&&(b===0||b===180?this.yf(et.x,Qt.y):this.yf(Qt.x,et.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(pt.copy()),this.ne(St.copy())),Le.free(pt),Le.free(St)}},Cn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var et=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(et=this.computeCurviness()),E?(y+b)/2+et:(a+x)/2+et};function X0(a){if(a.diagram===null||!a.isAvoiding||!hd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=cd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],et=y[b+1];if(!a.Yj(Math.min(E.x,et.x),Math.min(E.y,et.y),Math.abs(E.x-et.x),Math.abs(E.y-et.y)))return!0}return!1}function Y0(a,y,x,b,E,et,nt){var st=y.Ho,ht=y.Go,pt=tu(y,x,b),St=x,Mt=b;for(E===0?St+=st:E===90?Mt+=ht:E===180?St-=st:Mt-=ht,E!==nt&&pt>Rc&&tu(y,St,Mt)!==pt-1&&(tu(y,x-st,b)===pt-1?(E=180,St=x-st,Mt=b):tu(y,x+st,b)===pt-1?(E=0,St=x+st,Mt=b):tu(y,x,b-ht)===pt-1?(E=270,St=x,Mt=b-ht):tu(y,x,b+ht)===pt-1&&(E=90,St=x,Mt=b+ht));pt>Rc&&tu(y,St,Mt)===pt-1;)x=St,b=Mt,E===0?St+=st:E===90?Mt+=ht:E===180?St-=st:Mt-=ht,--pt;et?pt>Rc&&(E===180||E===0?x=Math.floor(x/st)*st+st/2:(E===90||E===270)&&(b=Math.floor(b/ht)*ht+ht/2)):(x=Math.floor(x/st)*st+st/2,b=Math.floor(b/ht)*ht+ht/2),pt>Rc&&(et=E,nt=x,St=b,E===0?(et=90,St+=ht):E===90?(et=180,nt-=st):E===180?(et=270,St-=ht):E===270&&(et=0,nt+=st),tu(y,nt,St)===pt-1?Y0(a,y,nt,St,et,!1,et):(nt=x,St=b,E===0?(et=270,St-=ht):E===90?(et=0,nt+=st):E===180?(et=90,St+=ht):E===270&&(et=180,nt-=st),tu(y,nt,St)===pt-1&&Y0(a,y,nt,St,et,!1,et))),a.yf(x,b)}Cn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Ur(y,a,x.x,x.y,b.x,b.y),et=0,nt=1;nt<this.pointsCount-1;nt++){x=this.i(nt+1);var st=Ur(y,a,b.x,b.y,x.x,x.y);b=x,st<E&&(et=nt,E=st)}return et},Cn.prototype.qc=function(){this.lk=!1,this.v()},Cn.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 Tr&&(E.ua=this.ua)}}},Cn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Ic(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(),et=E.copy();b=this.Nb.s;var nt=this.computeCurve();if(nt===vs&&3<=y&&!Ge.$(this.smoothness,0))if(y===3){var st=this.i(1);b=Math.min(E.x,st.x);var ht=Math.min(E.y,st.y);st=this.i(2),b=Math.min(b,st.x),ht=Math.min(ht,st.y)}else{if(this.isOrthogonal)for(ht=0;ht<y;ht++)st=b[ht],et.x=Math.min(st.x,et.x),et.y=Math.min(st.y,et.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),ht=this.i(b),et.x=Math.min(ht.x,et.x),et.y=Math.min(ht.y,et.y);b=et.x,ht=et.y}else{for(ht=0;ht<y;ht++)st=b[ht],et.x=Math.min(st.x,et.x),et.y=Math.min(st.y,et.y);b=et.x,ht=et.y}if(b-=this.su.x,ht-=this.su.y,E.x-=b,E.y-=ht,y!==2||Ic(this)){if(a.type=Pn.o,st=N1(a),this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,et)),Td(st,E.x,E.y,!1),nt===vs&&3<=y&&!Ge.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-ht,E=this.i(2).copy(),E.x-=b,E.y-=ht,this.computeShortLength(!1)!==0&&(E=Cf(this,E,!1,et)),rh(st,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Le.allocAt(b,ht),x=Le.alloc(),x.assign(this.i(1)),et=Le.allocAt(b,ht),E=Le.allocAt(b,ht),nt=this.i(0);for(var pt,St=this.smoothness/3,Mt=1;Mt<this.pointsCount-1;Mt++){pt=this.i(Mt);var Gt=nt,Xt=pt,Qt=this.i(J0(this,pt,Mt,!1));if((!Ge.$(Gt.x,Xt.x)||!Ge.$(Xt.x,Qt.x))&&(!Ge.$(Gt.y,Xt.y)||!Ge.$(Xt.y,Qt.y))){var ie=St;isNaN(ie)&&(ie=this.smoothness/3);var Me=Gt.x;Gt=Gt.y;var xe=Xt.x;Xt=Xt.y;var Ne=Qt.x;Qt=Qt.y;var Fe=ie*Zm(Me,Gt,xe,Xt);ie*=Zm(xe,Xt,Ne,Qt),Ge.$(Gt,Xt)&&Ge.$(xe,Ne)&&(xe>Me?Qt>Xt?(et.x=xe-Fe,et.y=Xt-Fe,E.x=xe+ie,E.y=Xt+ie):(et.x=xe-Fe,et.y=Xt+Fe,E.x=xe+ie,E.y=Xt-ie):Qt>Xt?(et.x=xe+Fe,et.y=Xt-Fe,E.x=xe-ie,E.y=Xt+ie):(et.x=xe+Fe,et.y=Xt+Fe,E.x=xe-ie,E.y=Xt-ie)),Ge.$(Me,xe)&&Ge.$(Xt,Qt)&&(Xt>Gt?(Ne>xe?(et.x=xe-Fe,et.y=Xt-Fe,E.x=xe+ie):(et.x=xe+Fe,et.y=Xt-Fe,E.x=xe-ie),E.y=Xt+ie):(Ne>xe?(et.x=xe-Fe,et.y=Xt+Fe,E.x=xe+ie):(et.x=xe+Fe,et.y=Xt+Fe,E.x=xe-ie),E.y=Xt-ie)),(Ge.$(Me,xe)&&Ge.$(xe,Ne)||Ge.$(Gt,Xt)&&Ge.$(Xt,Qt))&&(Me=.5*(Me+Ne),Gt=.5*(Gt+Qt),et.x=Me,et.y=Gt,E.x=Me,E.y=Gt),(Mt===1||Mt===2&&Ge.$(nt.x,this.i(0).x)&&Ge.$(nt.y,this.i(0).y))&&(x.x=.5*(nt.x+pt.x),x.y=.5*(nt.y+pt.y)),rh(st,x.x-b,x.y-ht,et.x-b,et.y-ht,pt.x-b,pt.y-ht),y.set(et),x.set(E),nt=pt}}pt=nt.x,nt=nt.y,St=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(St=Cf(this,St.copy(),!1,Ti)),pt=.5*(pt+St.x),nt=.5*(nt+St.y),rh(st,E.x-b,E.y-ht,pt-b,nt-ht,St.x-b,St.y-ht),Le.free(y),Le.free(x),Le.free(et),Le.free(E)}else for(x=3;x<y;x+=3)et=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),nt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(nt=Cf(this,nt.copy(),!1,Ti)),rh(st,et.x-b,et.y-ht,E.x-b,E.y-ht,nt.x-b,nt.y-ht);else{for(et=Le.alloc(),et.assign(this.i(0)),E=Le.alloc(),E.assign(et),nt=this.computeCorner(),Mt=1,pt=0;Mt<y;){if(Mt=J0(this,et,Mt,1<Mt),St=this.i(Mt),Mt>=y-1){if(!et.D(St))this.computeShortLength(!1)!==0&&(St=Cf(this,St.copy(),!1,Ti)),kf(this,st,-b,-ht,et,St,x);else if(pt===0)for(Mt=1;Mt<y;)E.assign(et),St=this.i(Mt++),kf(this,st,-b,-ht,et,St,x),et.assign(St);break}if(pt=J0(this,St,Mt+1,Mt<y-3),Mt=-b,Me=-ht,Gt=St,xe=this.i(pt),ie=x,Ge.B(et.y,Gt.y)&&Ge.B(Gt.x,xe.x))if(Qt=Math.min(nt,Math.abs(Gt.x-E.x)/2),Qt=Fe=Math.min(Qt,Math.abs(xe.y-Gt.y)/2),Ge.B(Qt,0))kf(this,st,Mt,Me,et,Gt,ie),et.assign(Gt);else{var De=Gt.x,_e=Gt.y;Xt=De,Ne=_e,Gt.x>et.x?De=Gt.x-Qt:De=Gt.x+Qt,xe.y>Gt.y?Ne=Gt.y+Fe:Ne=Gt.y-Fe,xe=Le.allocAt(De,_e),kf(this,st,Mt,Me,et,xe,ie),Le.free(xe),Im(st,Gt.x+Mt,Gt.y+Me,Xt+Mt,Ne+Me),et.h(Xt,Ne)}else Ge.B(et.x,Gt.x)&&Ge.B(Gt.y,xe.y)?(Qt=Math.min(nt,Math.abs(Gt.y-E.y)/2),Qt=Fe=Math.min(Qt,Math.abs(xe.x-Gt.x)/2),Ge.B(Fe,0)?(kf(this,st,Mt,Me,et,Gt,ie),et.assign(Gt)):(De=Gt.x,_e=Gt.y,Xt=De,Ne=_e,Gt.y>et.y?_e=Gt.y-Qt:_e=Gt.y+Qt,xe.x>Gt.x?Xt=Gt.x+Fe:Xt=Gt.x-Fe,xe=Le.allocAt(De,_e),kf(this,st,Mt,Me,et,xe,ie),Le.free(xe),Im(st,Gt.x+Mt,Gt.y+Me,Xt+Mt,Ne+Me),et.h(Xt,Ne))):(kf(this,st,Mt,Me,et,Gt,ie),et.assign(Gt));E.assign(St),Mt=pt}Le.free(et)}Rm=st}else st=this.i(1).copy(),st.x-=b,st.y-=ht,this.computeShortLength(!0)!==0&&(E=Cf(this,E,!0,et)),this.computeShortLength(!1)!==0&&(st=Cf(this,st,!1,et)),a.type=Pn.j,a.startX=E.x,a.startY=E.y,a.endX=st.x,a.endY=st.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),Ge.$(a,0)?y:Ge.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var et=a.i(1);if(x=et.x-b.x,et=et.y-b.y,b=Zm(y.x,y.y,x,et),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(et-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(et=a.i(E-2),x=et.x-b.x,et=et.y-b.y,b=Zm(y.x,y.y,x,et),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-et)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,et=y;Ge.$(y.x,et.x)&&Ge.$(y.y,et.y);){if(x>=E)return E-1;et=a.i(x++)}if(!Ge.$(y.x,et.x)&&!Ge.$(y.y,et.y))return x-1;for(var nt=et;Ge.$(y.x,et.x)&&Ge.$(et.x,nt.x)&&(!b||(y.y>=et.y?et.y>=nt.y:et.y<=nt.y))||Ge.$(y.y,et.y)&&Ge.$(et.y,nt.y)&&(!b||(y.x>=et.x?et.x>=nt.x:et.x<=nt.x));){if(x>=E)return E-1;nt=a.i(x++)}return x-2}Cn.prototype.computeJumpLength=function(){return 10};function kf(a,y,x,b,E,et,nt){if(!nt&&Ic(a)){nt=a.computeJumpLength();var st=nt/2,ht=[],pt=0;if(a.isVisible()&&(pt=Ex(a,E,et,ht)),0<pt){if(Ge.B(E.y,et.y))if(E.x<et.x)for(var St=0;St<pt;){var Mt=Math.max(E.x,Math.min(ht[St++]-st,et.x-nt));y.lineTo(Mt+x,et.y+b);for(var Gt=Mt+x,Xt=Math.min(Mt+nt,et.x);St<pt&&(Mt=ht[St],Mt<Xt+nt);)St++,Xt=Math.min(Mt+st,et.x);Mt=et.y-nt+b,Xt+=x;var Qt=et.y+b;a.curve===sh?Td(y,Xt,Qt,!1):rh(y,Gt,Mt,Xt,Mt,Xt,Qt)}else for(--pt;0<=pt;){for(St=Math.min(E.x,Math.max(ht[pt--]+st,et.x+nt)),y.lineTo(St+x,et.y+b),Gt=St+x,Mt=Math.max(St-nt,et.x);0<=pt&&(St=ht[pt],St>Mt-nt);)pt--,Mt=Math.max(St-st,et.x);St=et.y-nt+b,Mt+=x,Xt=et.y+b,a.curve===sh?Td(y,Mt,Xt,!1):rh(y,Gt,St,Mt,St,Mt,Xt)}else if(Ge.B(E.x,et.x))if(E.y<et.y)for(St=0;St<pt;){for(Mt=Math.max(E.y,Math.min(ht[St++]-st,et.y-nt)),y.lineTo(et.x+x,Mt+b),Gt=Mt+b,Mt=Math.min(Mt+nt,et.y);St<pt&&(Xt=ht[St],Xt<Mt+nt);)St++,Mt=Math.min(Xt+st,et.y);Xt=et.x-nt+x,Qt=et.x+x,Mt+=b,a.curve===sh?Td(y,Qt,Mt,!1):rh(y,Xt,Gt,Xt,Mt,Qt,Mt)}else for(--pt;0<=pt;){for(St=Math.min(E.y,Math.max(ht[pt--]+st,et.y+nt)),y.lineTo(et.x+x,St+b),Gt=St+b,St=Math.max(St-nt,et.y);0<=pt&&(Mt=ht[pt],Mt>St-nt);)pt--,St=Math.max(Mt-st,et.y);Mt=et.x-nt+x,Xt=et.x+x,St+=b,a.curve===sh?Td(y,Xt,St,!1):rh(y,Mt,Gt,Mt,St,Xt,St)}}}y.lineTo(et.x+x,et.y+b)}function Ex(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var et=E.value;if(et!==null&&et.visible){et=et.Pa.s;for(var nt=et.length,st=0;st<nt;st++){var ht=et[st];if(ht instanceof Cn){if(ht===a)return 0<b.length&&b.sort(function(St,Mt){return St-Mt}),b.length;if(ht.isVisible()&&Ic(ht)){var pt=ht.routeBounds;pt.w()&&a.routeBounds.Yc(pt)&&!a.usesSamePort(ht)&&(pt=ht.path,pt!==null&&pt.Ed()&&Mx(y,x,b,ht))}}}}}return 0<b.length&&b.sort(function(St,Mt){return St-Mt}),b.length}function Mx(a,y,x,b){for(var E=Ge.B(a.y,y.y),et=b.pointsCount,nt=b.i(0),st=Le.alloc(),ht=1;ht<et;ht++){var pt=b.i(ht);if(ht<et-1){var St=b.i(ht+1);if(nt.y===pt.y&&pt.y===St.y){if(pt.x>nt.x&&St.x>=pt.x||pt.x<nt.x&&St.x<=pt.x)continue}else if(nt.x===pt.x&&pt.x===St.x&&(pt.y>nt.y&&St.y>=pt.y||pt.y<nt.y&&St.y<=pt.y))continue}t:{St=a.x;var Mt=a.y,Gt=y.x,Xt=y.y,Qt=nt.x;nt=nt.y;var ie=pt.x,Me=pt.y;if(Ge.B(St,Gt)){if(!Ge.B(Mt,Xt)&&Ge.B(nt,Me)&&Math.min(Mt,Xt)<nt&&Math.max(Mt,Xt)>nt&&Math.min(Qt,ie)<St&&Math.max(Qt,ie)>St&&!Ge.B(Qt,ie)){st.x=St,st.y=nt,St=!0;break t}}else if(Ge.B(Mt,Xt)&&Ge.B(Qt,ie)&&Math.min(St,Gt)<Qt&&Math.max(St,Gt)>Qt&&Math.min(nt,Me)<Mt&&Math.max(nt,Me)>Mt&&!Ge.B(nt,Me)){st.x=Qt,st.y=Mt,St=!0;break t}st.x=0,st.y=0,St=!1}St&&(E?x.push(st.x):x.push(st.y)),nt=pt}Le.free(st)}function Ic(a){return a=a.curve,a===Nd||a===sh}function Xm(a,y){(y||Ic(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()))}Cn.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 et=!1;E=E.Pa.s;for(var nt=E.length,st=0;st<nt;st++){var ht=E[st];ht instanceof Cn&&(ht===this?et=!0:et&&eS(this,ht,a))}}else if(b)for(et=E.Pa.s,E=et.length,nt=0;nt<E;nt++)st=et[nt],st instanceof Cn&&eS(this,st,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&Ic(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Cn.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},Cn.prototype.isVisible=function(){if(!qn.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},Cn.prototype.Zb=function(a){if(qn.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)},Cn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?$p:this.qk};function Jp(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,et=a=null,nt=y.jb.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht];(pt.ef===y&&pt.ff===b&&pt.uf===x&&pt.vf===E||pt.ef===x&&pt.ff===E&&pt.uf===y&&pt.vf===b)&&(et===null?et=pt:(a===null&&(a=[],a.push(et)),a.push(pt)))}if(a!==null){for(et=W1(y,x,b,E),et===null&&(et=new qm(y,b,x,E),U1(y,et),U1(x,et)),et.links=a,y=0;y<a.length;y++)a[y].Sf=et;et.Sl()}}}}function Qp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(xr(y.links,a),y.Sl()))}Cn.prototype.ph=function(){return!0},hn.Object.defineProperties(Cn.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),Qp(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,et=this.fromPortChanged;if(et!==null){var nt=!0;b!==null&&(nt=b.aa,b.aa=!0),et(this,x,E),b!==null&&(b.aa=nt)}a!==null&&(this.uf!==a&&Gm(a,this,E),Jp(this),this.C(1)),this.g("fromNode",y,a),Ld(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&ns(x),Qp(this),this.ff=a;var b=this.fromPort;b!==null&&ns(b);var E=this.diagram;if(E!==null){var et=this.data,nt=E.model;et!==null&&nt.ri()&&nt.xv(et,a)}x!==b&&(this.Wf=null,this.bb(),et=this.fromPortChanged,et!==null&&(nt=!0,E!==null&&(nt=E.aa,E.aa=!0),et(this,x,b),E!==null&&(E.aa=nt))),Jp(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),Qp(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,et=this.toPortChanged;if(et!==null){var nt=!0;b!==null&&(nt=b.aa,b.aa=!0),et(this,x,E),b!==null&&(b.aa=nt)}a!==null&&(this.ef!==a&&Gm(a,this,E),Jp(this),this.C(1)),this.g("toNode",y,a),Ld(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&ns(x),Qp(this),this.vf=a;var b=this.toPort;b!==null&&ns(b);var E=this.diagram;if(E!==null){var et=this.data,nt=E.model;et!==null&&nt.ri()&&nt.Cv(et,a)}x!==b&&(this.Wf=null,this.bb(),et=this.toPortChanged,et!==null&&(nt=!0,E!==null&&(nt=E.aa,E.aa=!0),et(this,x,b),E!==null&&(E.aa=nt))),Jp(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:jo},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&&ns(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&&An(a,">= 0",Cn,"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:jo},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&&ns(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&&An(a,">= 0",Cn,"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?ni: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&&Yp(this.fromNode),this.toNode!==null&&Yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Tr?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()===vs&&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 et=this.i(2);y=Math.min(et.x,y),x=Math.min(et.y,x),Ge.Dl(E.x,E.y,b.x,b.y,b.x,b.y,et.x,et.y,.5,a)}else for(et=3;et<b;et+=3){var nt=this.i(et-2);et+3>=b&&(et=b-1);var st=this.i(et-1),ht=this.i(et);Ge.Dl(E.x,E.y,nt.x,nt.y,st.x,st.y,ht.x,ht.y,.5,a),y=Math.min(ht.x,y),x=Math.min(ht.y,x),E=ht}else for(E=this.i(0),et=this.i(1),y=Math.min(E.x,et.x),x=Math.min(E.y,et.y),a.h(E.x,E.y,0,0),a.Ye(et),E=2;E<b;E++)et=this.i(E),y=Math.min(et.x,y),x=Math.min(et.y,x),a.Ye(et);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Le)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Hm(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);Ge.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Ge.$(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 yn,b=0;b<a.length/2;b++)E=new Le(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var et=a[E];if(!$e(et)||typeof et.x!="number"||isNaN(et.x)||typeof et.y!="number"||isNaN(et.y)){b=!1;break}}if(b)for(x=new yn,b=0;b<a.length;b++)E=a[b],x.add(new Le(E.x,E.y).freeze())}}else if(a instanceof yn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else je("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Hm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ed(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||!Ad(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Ad(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===sh||y===Nd||a===sh||a===Nd),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)}}}),Cn.prototype.invalidateOtherJumpOvers=Cn.prototype.Xo,Cn.prototype.findClosestSegment=Cn.prototype.ez,Cn.prototype.updateRoute=Cn.prototype.vg,Cn.prototype.invalidateRoute=Cn.prototype.bb,Cn.prototype.rollbackRoute=Cn.prototype.rv,Cn.prototype.commitRoute=Cn.prototype.zf,Cn.prototype.startRoute=Cn.prototype.uh,Cn.prototype.clearPoints=Cn.prototype.Fj,Cn.prototype.removePoint=Cn.prototype.pv,Cn.prototype.addPointAt=Cn.prototype.yf,Cn.prototype.addPoint=Cn.prototype.ne,Cn.prototype.insertPointAt=Cn.prototype.m,Cn.prototype.insertPoint=Cn.prototype.Kz,Cn.prototype.setPointAt=Cn.prototype.L,Cn.prototype.setPoint=Cn.prototype.dd,Cn.prototype.getPoint=Cn.prototype.i,Cn.prototype.getOtherPort=Cn.prototype.Cz,Cn.prototype.getOtherNode=Cn.prototype.To;var Ef=null,Mf=null,Q0=new Je(Cn,"Normal",1),Tx=new Je(Cn,"Orthogonal",2),Lx=new Je(Cn,"AvoidsNodes",6),nS=new Je(Cn,"AvoidsNodesStraight",7),Pa=new Je(Cn,"None",0),vs=new Je(Cn,"Bezier",9),sh=new Je(Cn,"JumpGap",10),Nd=new Je(Cn,"JumpOver",11),$p=new Je(Cn,"End",17),Ym=new Je(Cn,"Scale",18),Jm=new Je(Cn,"Stretch",19),qp=new Je(Cn,"OrientAlong",21),tg=new Je(Cn,"OrientPlus90",22),eg=new Je(Cn,"OrientMinus90",23),$0=new Je(Cn,"OrientOpposite",24),Qm=new Je(Cn,"OrientUpright",25),ng=new Je(Cn,"OrientPlus90Upright",26),rg=new Je(Cn,"OrientMinus90Upright",27),$m=new Je(Cn,"OrientUpright45",28),rS=16,iS=14,ig=8;Cn.className="Link",Cn.Normal=Q0,Cn.Orthogonal=Tx,Cn.AvoidsNodes=Lx,Cn.AvoidsNodesStraight=nS,Cn.None=Pa,Cn.Bezier=vs,Cn.JumpGap=sh,Cn.JumpOver=Nd,Cn.End=$p,Cn.Scale=Ym,Cn.Stretch=Jm,Cn.OrientAlong=qp,Cn.OrientPlus90=tg,Cn.OrientMinus90=eg,Cn.OrientOpposite=$0,Cn.OrientUpright=Qm,Cn.OrientPlus90Upright=ng,Cn.OrientMinus90Upright=rg,Cn.OrientUpright45=$m,Cn.EndSegmentStep=8,Cn.CurvinessStart=rS,Cn.SpacingMin=iS,Cn.OrthoShortCut=ig;function qm(a,y,x,b){ii(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 og(a){ii(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}og.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 jd(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function tu(a,y,x){return jd(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]>=Rc&&(x[b]=q0)}og.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 et=y;et<=x;et++)if(E[et]===lh)return!1}return!0};function eu(a,y,x,b,E,et,nt,st,ht){if(!(y<et||y>nt||x<st||x>ht)){var pt=y|0,St=x|0,Mt=a.ac[pt][St];if(Mt>=Rc&&Mt<Od)for(E?St+=b:pt+=b,Mt+=1;et<=pt&&pt<=nt&&st<=St&&St<=ht&&!(Mt>=a.ac[pt][St]);)a.ac[pt][St]=Mt,Mt+=1,E?St+=b:pt+=b;if(pt=E?St:pt,E)if(0<b)for(x+=b;x<pt;x+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else for(x+=b;x>pt;x+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else if(0<b)for(y+=b;y<pt;y+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht);else for(y+=b;y>pt;y+=b)eu(a,y,x,1,!E,et,nt,st,ht),eu(a,y,x,-1,!E,et,nt,st,ht)}}function tv(a,y,x,b,E,et,nt,st,ht){y|=0,x|=0;var pt=lh,St=Rc;for(a.ac[y][x]=St;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)St+=1,a.ac[y][x]=St,E?x+=b:y+=b,pt=a.ac[y][x]}function ev(a,y,x,b,E,et,nt,st,ht){y|=0,x|=0;var pt=lh,St=Od;for(a.ac[y][x]=St;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)a.ac[y][x]=St,E?x+=b:y+=b,pt=a.ac[y][x]}function aS(a,y,x,b,E,et,nt){if(a.ac!==null){a.abort=!1;var st=y.x,ht=y.y;if(jd(a,st,ht)){st-=a.Nd,st/=a.rc,ht-=a.Od,ht/=a.sc;var pt=b.x,St=b.y;if(jd(a,pt,St))if(pt-=a.Nd,pt/=a.rc,St-=a.Od,St/=a.sc,1>=Math.abs(st-pt)&&1>=Math.abs(ht-St))a.abort=!0;else{var Mt=et.x;b=et.y,y=et.x+et.width;var Gt=et.y+et.height;Mt-=a.Nd,Mt/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Gt-=a.Od,Gt/=a.sc,et=Math.max(0,Math.min(a.di,Mt|0)),y=Math.min(a.di,Math.max(0,y|0)),Mt=Math.max(0,Math.min(a.ei,b|0)),Gt=Math.min(a.ei,Math.max(0,Gt|0)),b=a.ac,st|=0,ht|=0,pt|=0,St|=0;var Xt=x===0||x===90?1:-1;if(x=x===90||x===270,b[st][ht]===lh?(tv(a,st,ht,Xt,x,et,y,Mt,Gt),tv(a,st,ht,1,!x,et,y,Mt,Gt),tv(a,st,ht,-1,!x,et,y,Mt,Gt)):tv(a,st,ht,Xt,x,st,ht,st,ht),b[pt][St]===lh?(ev(a,pt,St,E===0||E===90?1:-1,E===90||E===270,et,y,Mt,Gt),ev(a,pt,St,1,!(E===90||E===270),et,y,Mt,Gt),ev(a,pt,St,-1,!(E===90||E===270),et,y,Mt,Gt)):ev(a,pt,St,Xt,x,pt,St,pt,St),x=On(),nt&&sS(a,pt,St,E,st,ht,x))for((x[0]!==pt||x[1]!==St)&&(x.unshift(St),x.unshift(pt)),(x[x.length-2]!==st||x[x.length-1]!==ht)&&(x.push(st),x.push(ht)),a=Rc,E=x[x.length-2],nt=x[x.length-1],b[E][nt]=a++,et=x.length-4;0<=et;et-=2)for(E=x[et+2],nt=x[et+3],y=x[et],pt=x[et+1];y>E?E++:y<E?E--:pt>nt?nt++:pt<nt&&nt--,b[E][nt]=a++,E!==y||nt!==pt;);else eu(a,st,ht,1,!1,et,y,Mt,Gt),eu(a,st,ht,-1,!1,et,y,Mt,Gt),eu(a,st,ht,1,!0,et,y,Mt,Gt),eu(a,st,ht,-1,!0,et,y,Mt,Gt);Fn(x)}}}}function sS(a,y,x,b,E,et,nt){for(var st=a.ac,ht=y,pt=x;;){if(ht===E&&pt===et)return!0;var St=ht,Mt=pt;if(b===0)if(St<E)St++;else break;else if(b===90)if(Mt<et)Mt++;else break;else if(b===180)if(St>E)St--;else break;else if(Mt>et)Mt--;else break;var Gt=st[St][Mt];if(Gt===0||Gt===ty)break;ht=St,pt=Mt}for(;;){if(St=b,Mt=ht,Gt=pt,b===0?Gt<et?(St=90,Gt++):Gt>et&&(St=270,Gt--):b===90?Mt<E?(St=0,Mt++):Mt>E&&(St=180,Mt--):b===180?Gt<et?(St=90,Gt++):Gt>et&&(St=270,Gt--):Mt<E?(St=0,Mt++):Mt>E&&(St=180,Mt--),Mt=st[Mt][Gt],St!==b&&Mt!==0&&Mt!==ty){if(nt.push(ht),nt.push(pt),sS(a,ht,pt,St,E,et,nt))return!0;nt.pop(),nt.pop()}if(st[ht][pt]=ty,b===0){if(ht===y)return!1;ht--}else if(b===90){if(pt===x)return!1;pt--}else if(b===180){if(ht===y)return!1;ht++}else{if(pt===x)return!1;pt++}}}hn.Object.defineProperties(og.prototype,{bounds:{get:function(){return new on(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 lh=0,Rc=1,Od=999999,q0=Od+1,ty=Od+2;og.className="PositionArray";function Tf(){ii(this),this.port=this.node=null,this.pe=[],this.ap=!1}Tf.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 Ax(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}Tf.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,et=E instanceof Pr?E:null;if(et===null||et.isSubGraphExpanded)var nt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!et.actualBounds.w()){a.ap=x;break t}b=et,nt=b.Lu()}et=a.pe.length=0;var st=a.port.ga(qr,Le.alloc()),ht=a.port.ga(oo,Le.alloc());for(E=on.allocAt(st.x,st.y,0,0),E.Ye(ht),Le.free(st),Le.free(ht),st=Le.allocAt(E.x+E.width/2,E.y+E.height/2),ht=a.port.li(),nt=nt.iterator;nt.next();){var pt=nt.value;if(pt.isVisible()&&pt.fromPort!==pt.toPort){var St=pt.fromPort===a.port||pt.fromNode!==null&&pt.fromNode.Td(b),Mt=pt.computeSpot(St,a.port);if(Mt.$c()&&(St=St?pt.toPort:pt.fromPort,St!==null)){var Gt=St.part;if(Gt!==null){var Xt=Gt.findVisibleNode();Xt!==null&&Xt!==Gt&&(Gt=Xt,St=Gt.port),St=pt.computeOtherPoint(Gt,St),Gt=st.ab(St),Gt-=ht,0>Gt?Gt+=360:360<=Gt&&(Gt-=360),Mt=Ax(E,Mt,Gt,pt.isOrthogonal),Mt===0?(Mt=4,180<Gt&&(Gt-=360)):Mt===90?(Mt=8,270<Gt&&(Gt-=360)):Mt===180?Mt=2:(Mt=1,90>Gt&&(Gt+=360)),Xt=a.pe[et],Xt===void 0?(Xt=new ey(pt,Gt,Mt),a.pe[et]=Xt):(Xt.link=pt,Xt.angle=Gt,Xt.Nc=Mt),Xt.hv.set(St),et++}}}}for(Le.free(st),a.pe.sort(Tf.prototype.j),ht=a.pe.length,b=-1,et=st=0;et<ht;et++)nt=a.pe[et],nt!==void 0&&(nt.Nc!==b&&(b=nt.Nc,st=0),nt.Uo=st,st++);for(b=-1,st=0,et=ht-1;0<=et;et--)ht=a.pe[et],ht!==void 0&&(ht.Nc!==b&&(b=ht.Nc,st=ht.Uo+1),ht.Gl=st);if(et=a.pe,Mt=a.port,b=a.node.portSpreading,st=Le.alloc(),ht=Le.alloc(),nt=Le.alloc(),pt=Le.alloc(),Mt.ga(qr,st),Mt.ga(pi,ht),Mt.ga(oo,nt),Mt.ga(ia,pt),Xt=Gt=St=Mt=0,b===H0)for(var Qt=0;Qt<et.length;Qt++){var ie=et[Qt];if(ie!==null){var Me=ie.link.computeThickness();switch(ie.Nc){case 8:Gt+=Me;break;case 2:Xt+=Me;break;case 1:Mt+=Me;break;default:case 4:St+=Me}}}var xe=Qt=0,Ne=1,Fe=ie=0;for(Me=0;Me<et.length;Me++){var De=et[Me];if(De!==null){if(Qt!==De.Nc){switch(Qt=De.Nc,Qt){case 8:var _e=nt;xe=pt;break;case 2:_e=pt,xe=st;break;case 1:_e=st,xe=ht;break;default:case 4:_e=ht,xe=nt}switch(ie=xe.x-_e.x,Fe=xe.y-_e.y,Qt){case 8:Gt>Math.abs(ie)?(Ne=Math.abs(ie)/Gt,Gt=Math.abs(ie)):Ne=1;break;case 2:Xt>Math.abs(Fe)?(Ne=Math.abs(Fe)/Xt,Xt=Math.abs(Fe)):Ne=1;break;case 1:Mt>Math.abs(ie)?(Ne=Math.abs(ie)/Mt,Mt=Math.abs(ie)):Ne=1;break;default:case 4:St>Math.abs(Fe)?(Ne=Math.abs(Fe)/St,St=Math.abs(Fe)):Ne=1}xe=0}var Ze=De.Zo;if(b===H0){switch(De=De.link.computeThickness(),De*=Ne,Ze.set(_e),Qt){case 8:Ze.x=_e.x+ie/2+Gt/2-xe-De/2;break;case 2:Ze.y=_e.y+Fe/2+Xt/2-xe-De/2;break;case 1:Ze.x=_e.x+ie/2-Mt/2+xe+De/2;break;default:case 4:Ze.y=_e.y+Fe/2-St/2+xe+De/2}xe+=De}else{var Ln=.5;b===Wm&&(Ln=(De.Uo+1)/(De.Gl+1)),Ze.x=_e.x+ie*Ln,Ze.y=_e.y+Fe*Ln}}}for(Le.free(st),Le.free(ht),Le.free(nt),Le.free(pt),_e=a.pe,et=0;et<_e.length;et++)b=_e[et],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,on.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}Tf.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},Tf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,zr,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 et=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<et.y:y.x<et.x)?x+8*b:(a?y.y===et.y:y.x===et.x)?x:x+8*(E-1-b)},Tf.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Le,this.Gl=this.Uo=0,this.Zo=new Le,this.Ju=0}ey.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()},ey.className="LinkInfo";function ji(a){ii(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Le(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ji.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},ji.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ji.prototype.qb=function(){},ji.prototype.toString=function(){var a=Dn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ji.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())}}},ji.prototype.createNetwork=function(){return new Si(this)},ji.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Xe?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Pr?y.lg(a.memberParts):y.lg(a.iterator),y},ji.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")}},ji.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()}},ji.prototype.doLayout=function(a){var y=new vn;a instanceof Xe?(Wh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Wh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Pr?Wh(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},ji.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,et=0,nt=0;for(a=a.iterator;a.next();){var st=a.value;ag(st);var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(b,E),st instanceof Pr&&(st.rh=!1),b+=Math.max(pt,50)+20,nt=Math.max(nt,Math.max(ht,50)),et>=y-1?(et=0,b=x,E+=nt+20,nt=0):et++}},ji.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,et=0,nt=this.network.vertexes.iterator;nt.next();){var st=nt.value.node;if(!(st===null||st instanceof Cn)&&(ag(st),this.rh(st))){var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(x,b),st instanceof Pr&&(st.rh=!1),x+=Math.max(pt,50)+20,et=Math.max(et,Math.max(ht,50)),E>=a-1?(E=0,x=y,b+=et+20,et=0):E++}}},ji.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Pr&&a.rh)};function Wh(a,y,x,b,E,et,nt,st){for(x=x.iterator;x.next();){var ht=x.value;b&&!ht.isTopLevel||E!==null&&!E(ht)||!ht.canLayout()||(et&&ht instanceof Nn?ht.isLinkLabel||(ht instanceof Pr&&ht.layout===null?Wh(a,y,ht.memberParts,!1,E,et,nt,st):(ag(ht),y.add(ht))):nt&&ht instanceof Cn?y.add(ht):!st||!ht.Zc()||ht instanceof Nn||(ag(ht),y.add(ht)))}}function ag(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ji.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new on),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ji.prototype.ex=function(a){var y=new vn;return a instanceof Xe?(Wh(this,y,a.nodes,!0,null,!0,!0,!0),Wh(this,y,a.links,!0,null,!0,!0,!0),Wh(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Pr?Wh(this,y,a.memberParts,!1,null,!0,!0,!0):Wh(this,y,a.iterator,!1,null,!0,!0,!0),y},ji.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(qr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},hn.Object.defineProperties(ji.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())}}}),ji.prototype.collectParts=ji.prototype.ex,ji.prototype.getLayoutBounds=ji.prototype.ni,ji.prototype.invalidateLayout=ji.prototype.C,ji.className="Layout";function Si(a){ii(this),this.Sc=a,this.wf=new vn,this.ye=new vn,this.Es=new Yn,this.zs=new Yn}Si.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 vn,this.ye=new vn,this.Es=new Yn,this.zs=new Yn},Si.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},Si.prototype.createVertex=function(){return new So(this)},Si.prototype.createEdge=function(){return new rs(this)},Si.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(nt){if(nt instanceof Nn)return!nt.isLinkLabel;if(nt instanceof Cn){var st=nt.fromNode;return st===null||st.isLinkLabel?!1:(nt=nt.toNode,!(nt===null||nt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Nn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Pr&&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 Cn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var et=b.fromNode;E=b.toNode,et!==null&&E!==null&&et!==E&&(et=this.findGroupVertex(et),E=this.findGroupVertex(E),et!==null&&E!==null&&this.Zj(et,E,b))}}},Si.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},te=Si.prototype,te.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},te.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},te.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}te.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},te.ki=function(a){return a===null?null:this.Es.I(a)},te.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}}te.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},te.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))}te.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},te.Lo=function(a){return a===null?null:this.zs.I(a)},te.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},te.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))}},te.Ko=function(){for(var a=On(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);Fn(a)},Si.prototype.deleteArtificialVertexes=function(){for(var a=On(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=On(),x=this.ye.iterator;x.next();){var 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]);Fn(a),Fn(y)};function Nx(a){for(var y=On(),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]);Fn(y)}Si.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new yn;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,et){return E===null||et===null||E===et?0:et.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))}}Si.prototype.dz=function(){for(var a=new vn,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},hn.Object.defineProperties(Si.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}}}),Si.prototype.findAllParts=Si.prototype.dz,Si.prototype.splitIntoSubNetworks=Si.prototype.Zx,Si.prototype.deleteSelfEdges=Si.prototype.Ko,Si.prototype.reverseEdge=Si.prototype.gm,Si.prototype.linkVertexes=Si.prototype.Zj,Si.prototype.findEdge=Si.prototype.Lo,Si.prototype.deleteLink=Si.prototype.Yy,Si.prototype.deleteEdge=Si.prototype.Mj,Si.prototype.addLink=Si.prototype.Dy,Si.prototype.addEdge=Si.prototype.Bo,Si.prototype.findVertex=Si.prototype.ki,Si.prototype.deleteNode=Si.prototype.Zy,Si.prototype.deleteVertex=Si.prototype.Iu,Si.prototype.addNode=Si.prototype.Bl,Si.prototype.addVertex=Si.prototype.dh,Si.prototype.addParts=Si.prototype.lg,Si.className="LayoutNetwork";function So(a){ii(this),this.ob=a,this.j=new on(0,0,10,10).freeze(),this.o=new Le(5,5).freeze(),this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn}So.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn},So.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+gi(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 et=b.value;x?x=!1:E+=",",E+=et.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},So.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;$e(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 Pr)){x=on.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Fr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),on.free(x);return}on.free(x)}a.moveTo(y.x,y.y)}},So.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},So.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},So.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},So.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}hn.Object.defineProperties(So.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=on.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,et=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,et,b),on.free(x),!(a instanceof Pr)&&(a=a.locationObject.ga(Fr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(et/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 vn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new vn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new vn,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 yn,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}}}),So.prototype.deleteDestinationEdge=So.prototype.Jl,So.prototype.addDestinationEdge=So.prototype.zl,So.prototype.deleteSourceEdge=So.prototype.Kl,So.prototype.addSourceEdge=So.prototype.Cl,So.className="LayoutVertex",So.standardComparer=oy,So.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 rs(a){ii(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}rs.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},rs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+gi(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},rs.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},rs.prototype.commit=function(){},rs.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},hn.Object.defineProperties(rs.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)}}}),rs.prototype.getOtherVertex=rs.prototype.Ax,rs.className="LayoutEdge";function _o(a){ji.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new kn(NaN,NaN).freeze(),this.tf=new kn(10,10).freeze(),this.Jb=sg,this.Rb=rv,this.nd=lg,this.hd=hS,a&&Object.assign(this,a)}Ye(_o,ji),_o.prototype.cloneProtected=function(a){ji.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},_o.prototype.qb=function(a){a.classType===_o?a===lg||a===ov||a===ay||a===iv?this.sorting=a:a===rv||a===yl?this.arrangement=a:a===sg||a===nv?this.alignment=a:je("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},_o.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 Pr)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 lg:E.sort(this.comparer);break;case ov:E.sort(this.comparer),E.reverse()}var et=this.wrappingColumn;isNaN(et)&&(et=0);var nt=this.wrappingWidth;switch(isNaN(nt)&&a!==null?(y=a.padding,nt=Math.max(a.viewportBounds.width-y.left-y.right,0)):nt=Math.max(this.wrappingWidth,0),0>=et&&0>=nt&&(et=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 st=y,ht=x,pt=on.alloc(),St=Math.max(this.cellSize.width,1);if(!isFinite(St))for(var Mt=St=0;Mt<E.length;Mt++){var Gt=this.ni(E[Mt],pt);St=Math.max(St,Gt.width)}if(St=Math.max(St+st,1),Mt=Math.max(this.cellSize.height,1),!isFinite(Mt))for(Gt=Mt=0;Gt<E.length;Gt++){var Xt=this.ni(E[Gt],pt);Mt=Math.max(Mt,Xt.height)}Mt=Math.max(Mt+ht,1),Gt=this.arrangement;for(var Qt=Xt=this.arrangementOrigin.x,ie=this.arrangementOrigin.y,Me=0,xe=0,Ne=0;Ne<E.length;Ne++){var Fe=E[Ne],De=this.ni(Fe,pt),_e=Math.ceil((De.width+st)/St)*St,Ze=Math.ceil((De.height+ht)/Mt)*Mt;switch(Gt){case yl:var Ln=Math.abs(Qt-De.width);break;default:Ln=Qt+De.width}switch((0<et&&Me>et-1||0<nt&&0<Me&&Ln-Xt>nt)&&(b.push(new on(0,ie,nt+st,xe)),Me=0,Qt=Xt,ie+=xe,xe=0),xe=Math.max(xe,Ze),Gt){case yl:De=-De.width;break;default:De=0}switch(Fe.moveTo(Qt+De,ie),Gt){case yl:Qt-=_e;break;default:Qt+=_e}Me++}b.push(new on(0,ie,nt+st,xe)),on.free(pt);break;case sg:for(ht=nt,St=et,Mt=y,Gt=x,nt=on.alloc(),Xt=Math.max(this.cellSize.width,1),et=ie=pt=0,st=Le.alloc(),Qt=0;Qt<E.length;Qt++)xe=E[Qt],Me=this.ni(xe,nt),xe=ih(xe,xe.locationObject,xe.locationSpot,st),pt=Math.max(pt,xe.x),ie=Math.max(ie,Me.width-xe.x),et=Math.max(et,xe.y);switch(Qt=this.arrangement,Qt){case yl:pt+=Mt;break;default:ie+=Mt}Xt=isFinite(Xt)?Math.max(Xt+Mt,1):Math.max(pt+ie,1);var _n=xe=this.arrangementOrigin.x;for(Ne=this.arrangementOrigin.y,ie=0,ht>=pt&&(ht-=pt),pt=Fe=0,_e=Math.max(this.cellSize.height,1),De=et=0,Ze=!0,Me=Le.alloc(),Ln=0;Ln<E.length;Ln++){var Bn=E[Ln],wn=this.ni(Bn,nt),cn=ih(Bn,Bn.locationObject,Bn.locationSpot,st);if(0<ie)switch(Qt){case yl:_n=(_n-xe-(wn.width-cn.x))/Xt,_n=Ge.$(Math.round(_n),_n)?Math.round(_n):Math.floor(_n),_n=_n*Xt+xe;break;default:_n=(_n-xe+cn.x)/Xt,_n=Ge.$(Math.round(_n),_n)?Math.round(_n):Math.ceil(_n),_n=_n*Xt+xe}else switch(Qt){case yl:Fe=_n+cn.x+wn.width;break;default:Fe=_n-cn.x}switch(Qt){case yl:var br=-(_n+cn.x)+Fe;break;default:br=_n+wn.width-cn.x-Fe}if(0<St&&ie>St-1||0<ht&&0<ie&&br>ht){for(b.push(new on(0,Ze?Ne-et:Ne,ht+Mt,De+et+Gt)),_n=0;_n<ie&&Ln!==ie;_n++){br=E[Ln-ie+_n];var dr=ih(br,br.locationObject,br.locationSpot,Me);br.moveTo(br.position.x,br.position.y+et-dr.y)}De+=Gt,Ne=Ze?Ne+De:Ne+(De+et),ie=De=et=0,_n=xe,Ze=!1}switch(_n===xe&&(pt=Qt===yl?Math.max(pt,wn.width-cn.x):Math.min(pt,-cn.x)),et=Math.max(et,cn.y),De=Math.max(De,wn.height-cn.y),isFinite(_e)&&(De=Math.max(De,Math.max(wn.height,_e)-cn.y)),Ze?Bn.moveTo(_n-cn.x,Ne-cn.y):Bn.moveTo(_n-cn.x,Ne),Qt){case yl:_n-=cn.x+Mt;break;default:_n+=wn.width-cn.x+Mt}ie++}if(b.push(new on(0,Ne,ht+Mt,(Ze?De:De+et)+Gt)),E.length!==ie)for(ht=0;ht<ie;ht++)St=E[E.length-ie+ht],Mt=ih(St,St.locationObject,St.locationSpot,st),St.moveTo(St.position.x,St.position.y+et-Mt.y);if(Le.free(st),Le.free(Me),Qt===yl)for(E=0;E<b.length;E++)et=b[E],et.width+=pt,et.x-=pt;else for(E=0;E<b.length;E++)et=b[E],et.x>pt&&(et.width+=et.x-pt,et.x=pt);on.free(nt)}for(st=et=nt=E=0;st<b.length;st++)ht=b[st],E=Math.min(E,ht.x),nt=Math.min(nt,ht.y),et=Math.max(et,ht.x+ht.width);this.arrangement===yl?this.commitLayers(b,new Le(E+y/2-(et+E),nt-x/2)):this.commitLayers(b,new Le(E-y/2,nt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},_o.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}hn.Object.defineProperties(_o.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!==sg&&a!==nv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==rv&&a!==yl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==iv&&a!==lg&&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 Je(_o,"Position",0),sg=new Je(_o,"Location",1),rv=new Je(_o,"LeftToRight",2),yl=new Je(_o,"RightToLeft",3),ay=new Je(_o,"Forward",4),iv=new Je(_o,"Reverse",5),lg=new Je(_o,"Ascending",6),ov=new Je(_o,"Descending",7);_o.className="GridLayout",_o.standardComparer=hS,_o.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},_o.Position=nv,_o.Location=sg,_o.LeftToRight=rv,_o.RightToLeft=yl,_o.Forward=ay,_o.Reverse=iv,_o.Ascending=lg,_o.Descending=ov;function li(){this.On=new vn,this.Dn=new vn,this.Pa=new vn,this.cf=new Yn,this.bf=new Yn,this.aj=new Yn,this.H=null,this.tp=!1}te=li.prototype,te.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},te.Xe=function(a){this.H=a},te.oi=function(a){if(a instanceof Nn){if(this.On.add(a),a instanceof Pr){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 Cn?this.Dn.add(a):a instanceof Xr||this.Pa.add(a);y=a.data,y===null||a instanceof Xr||(a instanceof Cn?this.bf.add(y,a):this.cf.add(y,a))},te.pc=function(a){if(a.Ej(),a instanceof Nn){if(this.On.remove(a),a instanceof Pr){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 Cn?this.Dn.remove(a):a instanceof Xr||this.Pa.remove(a);y=a.data,y===null||a instanceof Xr||(a instanceof Cn?this.bf.remove(y):this.cf.remove(y))},te.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 Pr)&&je('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 Pr||je('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 Cn||je('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=On(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=On(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=On(),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]);Fn(y),Fn(x),Fn(a)}},li.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},li.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&&ld(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(Hs(E),E=E.copy(),E!==null)){var et=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=et,b=E;break t}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}li.prototype.insertLink=function(){return null},li.prototype.resolveReferencesForData=function(){},li.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,En('No Group template found for category "'+x+'"'),En(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,En('No Node template found for category "'+x+'"'),En(" Using default node template")),y=a.ny))),y}li.prototype.getLinkCategoryForData=function(){return""},li.prototype.setLinkCategoryForData=function(){},li.prototype.setFromNodeForLink=function(){},li.prototype.setToNodeForLink=function(){},li.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,En('No Link template found for category "'+a+'"'),En(" Using default link template")),x=y.my)),x},li.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},li.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},li.prototype.ip=function(a){a=this.Lc(a),a!==null&&(bp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},li.prototype.unresolveReferencesForPart=function(){},li.prototype.removeDataForLink=function(){},li.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},li.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Nn?a:null)},li.prototype.findLinkForKey=function(){return null},te=li.prototype,te.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},te.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Nn?a:null)},te.Kc=function(a){return a===null?null:this.bf.I(a)},te.ms=function(a){for(var y=0;y<arguments.length;++y);y=new vn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var et=0;et<arguments.length;et++){var nt=arguments[et];if($e(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator},te.ls=function(a){for(var y=0;y<arguments.length;++y);y=new vn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var et=0;et<arguments.length;et++){var nt=arguments[et];if($e(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],et=x[b];if(Tn(et)){if(!Tn(E)||E.length<et.length)return!1;for(var nt=0;nt<E.length;nt++){var st=et[nt];if(st!==void 0&&!dS(a,E[nt],st))return!1}}else if(!dS(a,E,et))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($e(y)&&$e(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}li.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===Di){if(b==="nodeCategory"){var E=this.Lc(a.object),et=a.newValue;E!==null&&typeof et=="string"&&(E.category=et)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===$i){var nt=a.newValue;b==="nodeDataArray"&&$e(nt)&&cS(this,nt),y.isModified=!0}else if(x===vo){var st=a.oldValue;b==="nodeDataArray"&&$e(st)&&this.ip(st),y.isModified=!0}else x===qa&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Di){var ht=a.propertyName,pt=a.object;pt===y.model?(ht==="nodeKeyProperty"||ht==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(pt,ht),y.isModified=!0}else if(x===$i||x===vo){var St=a.change===$i,Mt=St?a.newParam:a.oldParam,Gt=St?a.newValue:a.oldValue,Xt=this.aj.I(a.object);if(Array.isArray(Xt))for(a=0;a<Xt.length;a++){var Qt=Xt[a];if(St)Cm(Qt,Gt,Mt,!0);else if(!(0>Mt)){var ie=Mt+Wp(Qt);Qt.pc(ie,!0),w0(Qt,ie,Mt)}}y.isModified=!0}}finally{y.aa=!0}}}}},li.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)},li.prototype.rp=function(){for(var a=this.H.model,y=new vn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(nt){nt.data===null||y.contains(nt.data)||E.push(nt.data)}),this.parts.each(function(nt){nt.data===null||y.contains(nt.data)||E.push(nt.data)}),E.forEach(function(nt){kS(a,nt,!1)}),b=0;b<x.length;b++){var et=x[b];this.Lc(et)===null&&CS(a,et,!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()},li.prototype.refreshDataBoundLinks=function(){},li.prototype.updateRelationshipsFromData=function(){},li.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,et=0;et<E.length;et++){var nt=E[et].sx(a);nt!==null&&(x===null&&(x=On()),x.push(nt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Fn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Tn(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){Oc(y,function(nt){nt=nt.O.s;for(var st=nt.length,ht=0;ht<st;ht++)Mp(x,nt[ht])});var b=y.Hh;if(Tn(b)){var E=a.aj.I(b);if(E!==null){for(var et=0;et<E.length;et++)if(E[et]===y){E.splice(et,1),E.length===0&&a.aj.remove(b);break}}}}li.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Yn;if(Tn(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 vn;for(var et=new Yn,nt=b.iterator;nt.next();){var st=nt.value;if(st instanceof Cn)a||st.fromNode!==null&&st.toNode!==null||E.add(st);else if(st instanceof Nn&&st.data!==null&&x.Tl()){var ht=st;st=nt.key;var pt=st.pg();pt!==null&&(pt=b.I(pt),pt!==null?(x.qe(ht.data,x.wa(pt.data)),ht=y.Kc(ht.data),st=st.kh(),st!==null&&ht!==null&&et.add(st,ht)):x.qe(ht.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<et.count)for(x=et.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var St=new Yn;b.each(function(Mt){Mt.key.data!==null&&St.add(Mt.key.data,Mt.value.data)}),x(St,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 et=a.copyPartData(y,x);if(!(et instanceof qn))return null;if(et.isSelected=!1,et.isHighlighted=!1,b.add(y,et),y instanceof Nn){for(var nt=y.linksConnected;nt.next();){var st=nt.value;if(st.fromNode===y){var ht=b.I(st);ht!==null&&(ht.fromNode=et)}st.toNode===y&&(st=b.I(st),st!==null&&(st.toNode=et))}if(y instanceof Pr&&et instanceof Pr)for(y=y.memberParts;y.next();)nt=av(a,y.value,x,b,E),nt instanceof Cn||nt===null||(nt.containingGroup=et)}else if(y instanceof Cn&&et instanceof Cn)for(nt=y.fromNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.fromNode=nt)),nt=y.toNode,nt!==null&&(nt=b.I(nt),nt!==null&&(et.toNode=nt)),y=y.labelNodes;y.next();)nt=av(a,y.value,x,b,E),nt!==null&&nt instanceof Nn&&(nt.labeledLink=et);return et}li.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Cn||(b=E.copyNodeData(b),$e(b)&&(E.xf(b),x=y.Lc(b)))}else Hs(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 Cn||(E=y.copyNodeData(b)),$e(E)&&(x.data=E)));return x},hn.Object.defineProperties(li.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}}}),li.prototype.updateAllRelationshipsFromData=li.prototype.rp,li.prototype.findLinksByExample=li.prototype.ls,li.prototype.findNodesByExample=li.prototype.ms,li.prototype.findLinkForData=li.prototype.Kc,li.prototype.findNodeForData=li.prototype.ii,li.prototype.findPartForData=li.prototype.Lc,li.prototype.findNodeForKey=li.prototype.Vb,li.prototype.removeModeledPart=li.prototype.ip,li.prototype.removeModeledParts=li.prototype.Gs,li.prototype.rebuildParts=li.prototype.Wd;var pS=!1,gS=!1,mS=!1;li.className="PartManager";function To(a){li.apply(this,arguments)}Ye(To,li),To.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},To.prototype.addModeledParts=function(a){for(li.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Ld(a.value);ld(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),ld(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){Hs(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 et=hv(x,y,!0);et!==""&&(E.fromPortId=et),et=ys(x,y,!0),et!==void 0&&(et=a.Vb(et),et instanceof Nn&&(E.fromNode=et)),et=hv(x,y,!1),et!==""&&(E.toPortId=et),et=ys(x,y,!1),et!==void 0&&(et=a.Vb(et),et instanceof Nn&&(E.toNode=et)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(nt){nt=a.Vb(nt),nt!==null&&(nt.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}To.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)})}To.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},To.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},To.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},To.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},To.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},To.prototype.findPartForKey=function(a){var y=li.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},To.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},To.prototype.doModelChanged=function(a){var y=this;if(li.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===Di){if(E==="linkFromKey"){var et=this.Kc(a.object);if(et!==null){var nt=this.Vb(a.newValue);et.fromNode=nt}}else if(E==="linkToKey"){var st=this.Kc(a.object);if(st!==null){var ht=this.Vb(a.newValue);st.toNode=ht}}else if(E==="linkFromPortId"){var pt=this.Kc(a.object);if(pt!==null){var St=a.newValue;typeof St=="string"&&(pt.fromPortId=St)}}else if(E==="linkToPortId"){var Mt=this.Kc(a.object);if(Mt!==null){var Gt=a.newValue;typeof Gt=="string"&&(Mt.toPortId=Gt)}}else if(E==="nodeGroupKey"){var Xt=this.Lc(a.object);if(Xt!==null){var Qt=a.newValue;if(Qt!==void 0){var ie=this.Vb(Qt);ie instanceof Pr?Xt.containingGroup=ie:Xt.containingGroup=null}else Xt.containingGroup=null}}else if(E==="linkLabelKeys"){var Me=this.Kc(a.object);if(Me!==null){var xe=a.oldValue,Ne=a.newValue;Array.isArray(xe)&&xe.forEach(function(cn){0<=Ne.indexOf(cn)||(cn=y.Vb(cn),cn!==null&&(cn.labeledLink=null))}),Array.isArray(Ne)&&Ne.forEach(function(cn){cn=y.Vb(cn),cn!==null&&(cn.labeledLink=Me)})}}else if(E==="linkCategory"){var Fe=this.Kc(a.object),De=a.newValue;Fe!==null&&typeof De=="string"&&(Fe.category=De)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===$i){var _e=a.newValue;if(E==="linkDataArray"&&typeof _e=="object"&&_e!==null)yS(this,_e);else if(E==="linkLabelKeys"&&Vh(_e)){var Ze=this.Kc(a.object),Ln=this.Vb(_e);Ze!==null&&Ln!==null&&(Ln.labeledLink=Ze)}x.isModified=!0}else if(b===vo){var _n=a.oldValue;if(E==="linkDataArray"&&typeof _n=="object"&&_n!==null)this.ip(_n);else if(E==="linkLabelKeys"&&Vh(_n)){var Bn=this.Vb(_n);Bn!==null&&(Bn.labeledLink=null)}x.isModified=!0}}else if(b===Di){var wn=a.propertyName;a.object!==x.model||wn!=="linkFromKeyProperty"&&wn!=="linkToKeyProperty"&&wn!=="linkFromPortIdProperty"&&wn!=="linkToPortIdProperty"&&wn!=="linkLabelKeysProperty"&&wn!=="nodeIsGroupProperty"&&wn!=="nodeGroupKeyProperty"&&wn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},To.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new vn,b=y.linkDataArray;b.forEach(function(et){x.add(et)});var E=[];this.links.each(function(et){et.data===null||x.contains(et.data)||E.push(et.data)}),E.forEach(function(et){NS(y,et,!1)}),b.forEach(function(et){a.Kc(et)===null&&AS(y,et,!1)})},To.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 Cn){var E=ys(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=ys(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 et=a.labelNodes.first();if(b.wa(et.data)===E)return}E=new vn().addAll(y);var nt=new vn;a.labelNodes.each(function(st){st.data!==null&&(st=b.wa(st.data),st!==void 0&&nt.add(st))}),y=nt.copy(),y.hp(E),E=E.copy(),E.hp(nt),(0<y.count||0<E.count)&&(y.each(function(st){st=x.Vb(st),st!==null&&st.labeledLink===a&&(st.labeledLink=null)}),E.each(function(st){st=x.Vb(st),st!==null&&st.labeledLink!==a&&(st.labeledLink=a)}))}}else!(a instanceof Xr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Pr)&&(a.containingGroup=y)}}},To.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ug(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var et={};b.next();){var nt=b.value;y.lb(nt)?E instanceof Pr&&y.lh(nt)===x&&(nt=this.Lc(nt),nt!==null&&(nt.containingGroup=E)):(et.link=this.Kc(nt),et.link!==null&&E instanceof Nn&&(ys(y,nt,!0)===x&&(et.link.fromNode=E),ys(y,nt,!1)===x&&(et.link.toNode=E),nt=y.Ef(nt),Array.isArray(nt)&&nt.some(function(st){return function(ht){return ht===x?(E.labeledLink=st.link,!0):!1}}(et)))),et={link:et.link}}xl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Pr&&(E.containingGroup=a))}},To.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Nn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Sl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Sl(y,x,b.data)),a instanceof Pr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Sl(y,x,b)}}},To.prototype.copyPartData=function(a,y){var x=li.prototype.copyPartData.call(this,a,y);if(a instanceof Cn)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},To.prototype.insertLink=function(a,y,x,b){var E=this.diagram,et=E.model,nt=E.toolManager.findTool("Linking"),st="";if(a!==null&&(y===null&&(y=a),st=y.portId,st===null&&(st="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=nt.archetypeLinkData,b instanceof Cn){if(Hs(b),et=b.copy(),et!==null)return et.fromNode=a,et.fromPortId=st,et.toNode=x,et.toPortId=y,E.add(et),a=nt.archetypeLabelNodeData,a instanceof Nn&&(Hs(a),a=a.copy(),a!==null&&(a.labeledLink=et,E.add(a))),et}else if(b!==null&&(b=et.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Dd(et,b,et.wa(a.data),!0),Bd(et,b,st,!0),x!==null&&Dd(et,b,et.wa(x.data),!1),Bd(et,b,y,!1),et.fi(b),a=nt.archetypeLabelNodeData,a===null||a instanceof Nn||(a=et.copyNodeData(a),typeof a=="object"&&a!==null&&(et.xf(a),a=et.wa(a),a!==void 0&&et.Bu(b,a))),E.Kc(b);return null},To.prototype.findLinkForKey=To.prototype.findLinkForKey,To.prototype.findPartForKey=To.prototype.findPartForKey,To.prototype.removeAllModeledParts=To.prototype.removeAllModeledParts,To.prototype.addModeledParts=To.prototype.addModeledParts,To.prototype.addAllModeledParts=To.prototype.addAllModeledParts,To.className="GraphLinksPartManager";function Os(){li.apply(this,arguments),this.Sg=null}Ye(Os,li);function sv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,et=x;if(a.diagram.isTreePathToChildren||(E=x,et=y),(b===null||!pa(b,E,et,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Hs(b),b=b.copy(),b!==null))){var nt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=et,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=nt}}}Os.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Os.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Os.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}},Os.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))},Os.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Os.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Os.prototype.doModelChanged=function(a){if(li.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===Di){if(b==="nodeParentKey"){var E=a.object,et=this.Vb(a.newValue),nt=this.ii(E);if(this.Sg!==null)et!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(nt!==null){var st=nt.kh();st!==null?et===null?y.remove(st):y.isTreePathToChildren?st.fromNode=et:st.toNode=et:sv(this,et,nt)}}else if(b==="parentLinkCategory"){var ht=this.ii(a.object),pt=a.newValue;if(ht!==null&&typeof pt=="string"){var St=ht.kh();St!==null&&(St.category=pt)}}y.isModified=!0}}else if(x===Di){var Mt=a.propertyName;a.object===y.model&&Mt==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Os.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Nn&&(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&&bp(x,b,!1)))}}},Os.prototype.updateDataBindings=function(a,y){li.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Os.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ug(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var et=b.value;y.lb(et)&&E instanceof Nn&&y.mh(et)===x&&sv(this,E,this.ii(et))}xl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Nn&&(a=this.Vb(a),sv(this,a,E))}},Os.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Nn){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 et=E.pc(-1,b,!1);0<=et&&this.diagram.cb(vo,"parts",E,b,null,et,null),et=b.layerChanged,et!==null&&et(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)&&Sl(y,x,E)}},Os.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},Os.prototype.findLinkForKey=Os.prototype.findLinkForKey,Os.className="TreePartManager";function Hn(a,y){this.kl=new vn,this.il=new vn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,ii(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Yn,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Yn,this.Lt=new yn,this.Wg=!1,this.o=null,this.undoManager=new Ri,a!==void 0&&(Tn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Hn.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},Hn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Hn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Hn.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)+":"+sr(E)}}return y},Hn.prototype.xA=function(a){a.change!==qa&&je("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Mo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Hn.prototype.Qv=function(a,y){var x=this,b=!1,E=new vn,et=new vn,nt=new vn,st=this.vh;a.changes.each(function(Mt){Mt.model===x&&(Mt.modelChange==="nodeDataArray"?Mt.change===$i?E.add(Mt.newValue):Mt.change===vo&&nt.add(Mt.oldValue):x.lb(Mt.object)?et.add(Mt.object):Mt.change!==Di||x.modelData!==Mt.object&&Mt.propertyName!=="modelData"?Mt.object!==null&&(st&&st.contains(Mt.object)?st.get(Mt.object).each(function(Gt){x.lb(Gt)&&et.add(Gt)}):Mt.object instanceof Hn||x.ri()&&x.Jc(Mt.object)||bS(x,Mt.object).each(function(Gt){et.add(Gt)})):b=!0)});var ht=this.il;ht.clear(),E.each(function(Mt){ht.add(x.wa(Mt)),y||et.add(Mt)});var pt=this.kl;pt.clear(),nt.each(function(Mt){pt.add(x.wa(Mt)),y&&et.add(Mt)}),a=x.cloneDeep(et.Fa());var St=null;return b&&(St===null&&(St={}),St.modelData=this.cloneDeep(this.modelData)),0<ht.count&&(St===null&&(St={}),y?St.removedNodeKeys=ht.Fa():St.insertedNodeKeys=ht.Fa()),0<a.length&&(St===null&&(St={}),St.modifiedNodeData=a),0<pt.count&&(St===null&&(St={}),y?St.insertedNodeKeys=pt.Fa():St.removedNodeKeys=pt.Fa()),pt.clear(),ht.clear(),St},Hn.prototype.cloneDeep=function(a){return Fd(this,a,!0)};function Fd(a,y,x,b,E,et){function nt(Mt,Gt){st?(Mt.__gohashid===void 0&&et.push(Mt),b.set(Mt,Gt)):(Mt=Bi++,b.set(Mt,Gt),E.set(Mt,y))}if(!$e(y))return y;et||(et=[]);var st=Object.isExtensible(y);if(b||(b=new Yn),st){var ht=b.get(y);if(ht)return ht}else for(E||(E=new Yn),ht=E.iterator;ht.next();){var pt=ht.key;if(ht.value===y&&(pt=b.get(pt)))return pt}if(Array.isArray(y)){ht=[],nt(y,ht);for(var St=0;St<y.length;St++)ht.push(Fd(a,y[St],!1,b,E,et))}else if(y instanceof Le||y instanceof kn||y instanceof on||y instanceof Dr||y instanceof er)ht=y.copy(),nt(y,ht);else{if(y instanceof si||y instanceof Pn||y instanceof Je)return y;if(y instanceof yn)ht=new yn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof vn)ht=new vn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof Yn)ht=new Yn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof Date)ht=new Date(y.getTime()),nt(y,ht);else if(y instanceof RegExp)ht=new RegExp(y),nt(y,ht),ht.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ht=y.copy(),nt(y,ht);else for(St in ht={},nt(y,ht),y)St!=="__gohashid"&&(ht[St]=Fd(a,y[St],!1,b,E,et))}return x&&et.forEach(function(Mt){delete Mt.__gohashid}),ht}te=Hn.prototype,te.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},te.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},te.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,$e(y)&&(a.dm(y),a.modelData=y)}te.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": `+Hh(this,this.nodeDataArray,!0)},te.kv=function(a){xS(this,a),a=a.nodeDataArray,Tn(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,et){if((et=et.part)&&(et=et.data,E!==et)){var nt=b.get(E);nt===null?(nt=new vn,nt.add(et),b.add(E,nt)):nt.add(et)}}var b=a.vh;b===null&&(b=new Yn,y.changes.each(function(E){if(E.diagram!==null){var et=E.change;et===Di?(E=E.object.panel)&&(et=E.data)&&x(et,E):(et===$i||et===vo)&&(E=E.object,(et=E.itemArray)&&x(et,E))}}),a.vh=b)}function bS(a,y){for(var x=new vn,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 et=0;et<x.length;et++){var nt=x[et];if(nt===y)return E.add(b),!0;if(lv(a,y,nt,b,E))return!0}else if($e(x)&&Object.getPrototypeOf(x)===Object.prototype)for(et in x){if(nt=x[et],nt===y)return E.add(b),!0;if(lv(a,y,nt,b,E))return!0}return!1}te.Pv=function(a,y){var x=this,b=!1,E=new vn,et=new vn,nt=new vn,st=this.vh;a.changes.each(function(St){St.model===x&&(St.modelChange==="nodeDataArray"?St.change===$i?E.add(St.newValue):St.change===vo&&nt.add(St.oldValue):x.lb(St.object)?et.add(St.object):St.change!==Di||x.modelData!==St.object&&St.propertyName!=="modelData"?St.object!==null&&(st&&st.contains(St.object)?st.get(St.object).each(function(Mt){x.lb(Mt)&&et.add(Mt)}):St.object instanceof Hn||x.ri()&&x.Jc(St.object)||bS(x,St.object).each(function(Mt){et.add(Mt)})):b=!0)});var ht=this.il;ht.clear(),E.each(function(St){ht.add(x.wa(St)),y||et.add(St)});var pt=this.kl;return pt.clear(),nt.each(function(St){pt.add(x.wa(St)),y&&et.add(St)}),a="",b&&(a+=`,
"modelData": `+hy(this,this.modelData)),0<ht.count&&(a+=(y?this.Yv:this.Wv)+Hh(this,ht.Fa(),!0)),0<et.count&&(a+=this.jy+Hh(this,et.Fa(),!0)),0<pt.count&&(a+=(y?this.Wv:this.Yv)+Hh(this,pt.Fa(),!0)),pt.clear(),ht.clear(),a},te.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)&&je("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Yn;if(Array.isArray(x))for(var E=0;E<x.length;E++){var et=x[E],nt=this.wa(et);nt!=null&&b.set(nt,et)}if(Array.isArray(y))for(E=y.length,et=0;et<E;et++){nt=y[et];var st=this.hc(nt);st===null&&(st=(st=b.get(nt))?st:this.copyNodeData({}),this.km(st,nt),this.xf(st))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],et=this.wa(E),et=this.hc(et),et!==null){for(var ht in E)ht==="__gohashid"||ht===this.nodeKeyProperty||this.Wj()&&ht===this.nodeIsGroupProperty||this.setDataProperty(et,ht,E[ht]);this.lm(E,et)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ht=0;ht<x;ht++)y=this.hc(a[ht]),y!==null&&this.cm(y)},te.$x=function(a,y){a.change!==qa&&je("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Mo?(y===void 0&&(y=hg(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 }'},te.yA=function(a,y){return this.$x(a,y)},te.np=function(a){return a===void 0&&(a=hg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},te.toJSON=function(a){return this.np(a)},te.Zw=function(a){var y=null;if(typeof a=="string")try{y=an.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:je("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&je("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},te.Ky=function(a){return this.Zw(a)},Hn.constructGraphLinksModel=function(){return new Hn},te=Hn.prototype,te.dm=function(a){if(Tn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if($e(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:je("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if($e(a)){for(y in a)if(x=a[y],$e(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 yn,b=0;b<x.length/2;b++)E.add(new Le(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},te.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()):Tn(a)?Hh(this,a):$e(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function Hh(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new _r;E.add("["),x&&1<b&&E.add(`
`);for(var et=0;et<b;et++){var nt=y[et];nt!==void 0&&(0<et&&(E.add(","),x&&E.add(`
`)),E.add(a.sm(nt)))}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 Ca(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Le)y={class:"go.Point",x:Ca(x.x),y:Ca(x.y)};else if(x instanceof kn)y={class:"go.Size",width:Ca(x.width),height:Ca(x.height)};else if(x instanceof on)y={class:"go.Rect",x:Ca(x.x),y:Ca(x.y),width:Ca(x.width),height:Ca(x.height)};else if(x instanceof Dr)y={class:"go.Margin",top:Ca(x.top),right:Ca(x.right),bottom:Ca(x.bottom),left:Ca(x.left)};else if(x instanceof er)x.sb()?y={class:"go.Spot",x:Ca(x.x),y:Ca(x.y),offsetX:Ca(x.offsetX),offsetY:Ca(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof si){if(y={class:"go.Brush",type:x.type.name},x.type===eh?y.color=x.color:(x.type===wu||x.type===Ns)&&(y.start=x.start,y.end=x.end,x.type===Ns&&(x.startRadius!==0&&(y.startRadius=Ca(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ca(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 Pn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ca(x.startX)),x.startY!==0&&(y.startY=Ca(x.startY)),x.endX!==0&&(y.endX=Ca(x.endX)),x.endY!==0&&(y.endY=Ca(x.endY)),x.spot1.D(qr)||(y.spot1=x.spot1),x.spot2.D(oo)||(y.spot2=x.spot2),x.type===Pn.o&&(y.path=Pn.ia(x))):x instanceof Je&&(y={class:"go.EnumValue",classType:hg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var et=Qi(y,E);if(!PS(E,et))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&et instanceof yn){var nt="[";for(et=et.iterator;et.next();){var st=et.value;1<nt.length&&(nt+=","),nt+=a.sm(st.x),nt+=",",nt+=a.sm(st.y)}nt+="]",b+=nt}else b+=a.sm(et)}return b+"}"}function ka(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 Le(ka(a.x),ka(a.y));else if(y==="Size")x=new kn(ka(a.width),ka(a.height));else if(y==="Rect")x=new on(ka(a.x),ka(a.y),ka(a.width),ka(a.height));else if(y==="Margin")x=new Dr(ka(a.top),ka(a.right),ka(a.bottom),ka(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Ui(a.enum):x=new er(ka(a.x),ka(a.y),ka(a.offsetX),ka(a.offsetY));else if(y==="Brush"){if(x=new si,x.type=cr(si,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof er&&(x.start=a.start),a.end instanceof er&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ka(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ka(a.endRadius)),a=a.colorStops,$e(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Pn.parse(a.path):x=new Pn,x.type=cr(Pn,a.type),typeof a.startX=="number"&&(x.startX=ka(a.startX)),typeof a.startY=="number"&&(x.startY=ka(a.startY)),typeof a.endX=="number"&&(x.endX=ka(a.endX)),typeof a.endY=="number"&&(x.endY=ka(a.endY)),a.spot1 instanceof er&&(x.spot1=a.spot1),a.spot2 instanceof er&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=cr(b,a.name)));return x}te.Pe=function(a){return this.Lt.add(a),this},te.ik=function(a){this.Lt.remove(a)},te.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)},te.cb=function(a,y,x,b,E,et,nt){fo(this,"",a,y,x,b,E,et,nt)},te.g=function(a,y,x,b,E){fo(this,"",Di,a,this,y,x,b,E)},te.Fs=function(a,y,x,b,E,et){fo(this,"",Di,y,a,x,b,E,et)};function fo(a,y,x,b,E,et,nt,st,ht){st===void 0&&(st=null),ht===void 0&&(ht=null);var pt=new Ii;pt.model=a,pt.change=x,pt.modelChange=y,pt.propertyName=b,pt.object=E,pt.oldValue=et,pt.oldParam=st,pt.newValue=nt,pt.newParam=ht,a.ds(pt)}Hn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Di){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)),Li(x,b,E)}else a.change===$i?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,$e(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&xr(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&hr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Tn(b)&&a.propertyName&&(b=Qi(a.object,a.propertyName)),Tn(b)&&typeof x=="number"&&(a=a.newValue,y?xr(b,x):hr(b,x,a))):je("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===vo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,$e(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&hr(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&xr(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Tn(b)&&a.propertyName&&(b=Qi(a.object,a.propertyName)),Tn(b)&&typeof x=="number"&&(a=a.oldValue,y?hr(b,x,a):xr(b,x))):je("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==qa&&je("unknown ChangedEvent: "+a.toString())},Hn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Hn.prototype.eb=function(a){return this.undoManager.eb(a)},Hn.prototype.Kf=function(){return this.undoManager.Kf()},Hn.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}},te=Hn.prototype,te.La=function(a,y){y===void 0&&(y=""),fo(this,"SourceChanged",qa,y,a,null,null)},te.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;je("Key value for node data "+a+" is not a number or a string: "+y)}}},te.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b!==y&&this.hc(y)===null&&(Li(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),fo(this,"nodeKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Li(a,x,y)}};function Vh(a){return typeof a=="number"||typeof a=="string"}te.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},te.hc=function(a){return a===null&&je("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.kb.I(a):null},te.$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))){Li(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Li(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Li(a,y,x)}}}}},te.xf=function(a){a!==null&&(Gi(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&&je("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,hr(a.Tc,b,y)),fo(a,"nodeDataArray",$i,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}te.Fy=function(a){if(Tn(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)},te.cm=function(a){a!==null&&kS(this,a,!0)};function kS(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){t: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 t}b=-1}if(0>b)return;xr(a.Tc,b)}fo(a,"nodeDataArray",vo,"nodeDataArray",a,y,null,b,null),a.qp(y)}te.nA=function(a){if(Tn(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)},te.$z=function(a){if(a!==this.nodeDataArray&&Tn(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 et=a[E],nt=this.wa(et);if(nt!==void 0){x.add(nt);var st=this.hc(nt);st!==et&&(st!==null?(this.Do(st,et),this.lm(et,st)):(et=this.cloneDeep(et),this.km(et,nt),this.xf(et)))}else nt=this.cloneDeep(et),this.xf(nt),x.add(this.wa(nt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},te.jp=function(a,y){y!==void 0&&(a=ug(this,a),a instanceof vn&&this.Vf.add(y,a))},te.Lv=function(){},te.fm=function(){},te.em=function(){},te.qp=function(){};function Sl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new vn,a.Vf.add(y,b)),b.add(x)}}function xl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof vn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function ug(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof vn?a:null)}te.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Hn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),$e(a)&&ii(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 ii(b),b}if(x&&$e(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 et=Qi(y,b),nt=hg(a,et);nt==="GraphObject"||nt==="Diagram"||nt==="Layer"||nt==="RowColumnDefinition"||nt==="AnimationManager"||nt==="Tool"||nt==="CommandHandler"||nt==="Layout"||nt==="InputEvent"||nt==="DiagramEvent"||et instanceof Hn||et instanceof Ri||et instanceof Mo||et instanceof Ii||(et=uv(a,et,!1)),Li(x,b,et)}return ii(x),x}return y instanceof Le||y instanceof kn||y instanceof on||y instanceof er||y instanceof Dr?y.copy():y}Hn.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!ES&&a instanceof ze&&(ES=!0,En('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),En(" Is that really your intent?"));var b=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},te=Hn.prototype,te.set=function(a,y,x){this.setDataProperty(a,y,x)},te.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])}},te.Ay=function(a,y){this.ts(a,-1,y)},te.ts=function(a,y,x){0>y&&(y=a.length),hr(a,y,x),fo(this,"",$i,"",a,null,x,null,y)},te.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&je("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];xr(a,y),fo(this,"",vo,"",a,x,null,y,null)},te.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Qi(a,y),y===void 0))return"";if(typeof y=="string")return y;je("getCategoryForNodeData found a non-string category for "+a+": "+y)},te.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"nodeCategory",Di,x,a,b,y))}else Li(a,x,y)}},te.lm=function(a,y){this.jm(y,this.Ro(a))},te.Tl=function(){return!1},te.Wj=function(){return!1},te.ri=function(){return!1},te.xs=function(){return!1},te.Xj=function(){return!1};function cy(){return new Hn}function hg(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 hg(a,y.constructor);return typeof y}function fy(a){return sl[a]?sl[a]:an.go!==void 0&&an.go[a]?an.go[a]:null}function Qi(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 Li(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){}}hn.Object.defineProperties(Hn.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===""&&je("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&je("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];$e(E)||je("Model.nodeDataArray must only contain Objects, not: "+E),Gi(E)}for(this.Tc=a,b=new yn,E=0;E<x;E++){var et=a[E],nt=this.wa(et);nt===void 0||this.kb.I(nt)!==null?b.add(et):this.kb.add(nt,et)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),et=this.wa(E),et!==void 0&&this.kb.add(et,E);for(fo(this,"nodeDataArray",Di,"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"}}}),Hn.prototype.setCategoryForNodeData=Hn.prototype.jm,Hn.prototype.getCategoryForNodeData=Hn.prototype.Ro,Hn.prototype.removeArrayItem=Hn.prototype.ov,Hn.prototype.insertArrayItem=Hn.prototype.ts,Hn.prototype.addArrayItem=Hn.prototype.Ay,Hn.prototype.assignAllDataProperties=Hn.prototype.Do,Hn.prototype.set=Hn.prototype.set,Hn.prototype.clearUnresolvedReferences=Hn.prototype.Qy,Hn.prototype.mergeNodeDataArray=Hn.prototype.$z,Hn.prototype.removeNodeDataCollection=Hn.prototype.nA,Hn.prototype.removeNodeData=Hn.prototype.cm,Hn.prototype.addNodeDataCollection=Hn.prototype.Fy,Hn.prototype.addNodeData=Hn.prototype.xf,Hn.prototype.makeNodeDataKeyUnique=Hn.prototype.$u,Hn.prototype.findNodeDataForKey=Hn.prototype.hc,Hn.prototype.containsNodeData=Hn.prototype.lb,Hn.prototype.setKeyForNodeData=Hn.prototype.km,Hn.prototype.getKeyForNodeData=Hn.prototype.wa,Hn.prototype.updateTargetBindings=Hn.prototype.La,Hn.prototype.commit=Hn.prototype.commit,Hn.prototype.rollbackTransaction=Hn.prototype.Kf,Hn.prototype.commitTransaction=Hn.prototype.eb,Hn.prototype.startTransaction=Hn.prototype.Ea,Hn.prototype.raiseDataChanged=Hn.prototype.Fs,Hn.prototype.raiseChanged=Hn.prototype.g,Hn.prototype.raiseChangedEvent=Hn.prototype.cb,Hn.prototype.removeChangedListener=Hn.prototype.ik,Hn.prototype.addChangedListener=Hn.prototype.Pe,Hn.prototype.writeJsonValue=Hn.prototype.sm,Hn.prototype.replaceJsonObjects=Hn.prototype.dm,Hn.prototype.applyIncrementalJSON=Hn.prototype.Ky,Hn.prototype.applyIncrementalJson=Hn.prototype.Zw,Hn.prototype.toJSON=Hn.prototype.toJSON,Hn.prototype.toJson=Hn.prototype.np,Hn.prototype.toIncrementalJSON=Hn.prototype.yA,Hn.prototype.toIncrementalJson=Hn.prototype.$x,Hn.prototype.toIncrementalData=Hn.prototype.xA,Hn.prototype.clear=Hn.prototype.clear;var ES=!1,sl={};Hn.className="Model",Hn.fromJSON=Hn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=an.JSON.parse(a)}catch(et){}else typeof a=="object"?x=a:je("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=an[b])),typeof E=="function"&&(a=new E)}catch(et){}a===null||a instanceof Hn?y=a:je("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Hn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Hn.safePropertyValue=Qi,Hn.safePropertySet=Li,sl.Brush=si,sl.ChangedEvent=Ii,sl.Geometry=Pn,sl.Margin=Dr,sl.Panel=Sn,sl.Point=Le,sl.Rect=on,sl.Size=kn,sl.Spot=er,sl.Transaction=Mo,sl.UndoManager=Ri;function eo(a,y,x,b){ii(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=TS,this.wk=null):(this.el=cg,this.wk=b),this.st=new vn}eo.prototype.copy=function(){var a=new eo;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},te=eo.prototype,te.qb=function(a){a.classType===eo&&(this.mode=a)},te.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},te.freeze=function(){return this._isFrozen=!0,this},te.ka=function(){return this._isFrozen=!1,this},te.Kx=function(a){return a===void 0&&(a=null),this.mode=cg,this.backConverter=a,this},te.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},te.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}te.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==="")En("Binding error: target property is the empty string: "+this.toString());else{var et=y;if(b!==""&&(et=Qi(y,b)),et!==void 0)if(E===null)x!==""&&Li(a,x,et);else try{if(x!==""){var nt=E(et,a);Li(a,x,nt)}else E(et,a)}catch(st){}}}},te.sp=function(a,y,x,b){if(this.el===cg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var et=this.wk,nt=a;if(E!==""&&(nt=Qi(a,E)),nt!==void 0&&!this.st.contains(a))try{this.st.add(a);var st=b!==null?b.diagram:null,ht=st!==null?st.model:null;if(et===null){if(x!=="")ht!==null?ht.setDataProperty(y,x,nt):Li(y,x,nt);else if(ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var pt=b.itemIndex,St=b.panel.itemArray;ht.ov(St,pt),ht.ts(St,pt,nt)}}else try{if(x!==""){var Mt=et(nt,y,ht);ht!==null?ht.setDataProperty(y,x,Mt):Li(y,x,Mt)}else{var Gt=et(nt,y,ht);if(Gt!==void 0&&ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Xt=b.itemIndex,Qt=b.panel.itemArray;ht.ov(Qt,Xt),ht.ts(Qt,Xt,Gt)}}}catch(ie){}}finally{this.st.remove(a)}}}},hn.Object.defineProperties(eo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ve(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ve(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ve(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ve(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ve(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ve(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ve(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ve(this),this.el=a}}}),eo.prototype.updateSource=eo.prototype.sp,eo.prototype.updateTarget=eo.prototype.Mv,eo.prototype.ofModel=eo.prototype.dA,eo.prototype.ofObject=eo.prototype.cp,eo.prototype.makeTwoWay=eo.prototype.Kx;var Ox="Binding",TS=new Je(eo,"OneWay",1),cg=new Je(eo,"TwoWay",2);eo.className="Binding",eo.parseEnum=function(a,y){return function(x){return x=cr(a,x),x===null?y:x}},eo.toString=sr,eo.OneWay=TS,eo.TwoWay=cg;function Wr(a,y,x){Hn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new vn,this.wb=new Yn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(Tn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ye(Wr,Hn),Wr.constructGraphLinksModel=Hn.constructGraphLinksModel,Wr.prototype.cloneProtected=function(a){Hn.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},te=Wr.prototype,te.clear=function(){Hn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},te.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)+":"+sr(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+ys(this,E,!0)+"-->"+ys(this,E,!1)}return y},te.Qv=function(a,y){this.linkKeyProperty===""&&je("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Hn.prototype.Qv.call(this,a,y),b=this,E=new vn,et=new vn,nt=new vn,st=this.vh;a.changes.each(function(St){St.model===b&&(St.modelChange==="linkDataArray"?St.change===$i?E.add(St.newValue):St.change===vo&&nt.add(St.oldValue):b.Jc(St.object)?et.add(St.object):St.object!==null&&(St.object!==null&&st&&st.contains(St.object)?st.get(St.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):St.object instanceof Hn||b.lb(St.object)||LS(b,St.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(St){ht.add(b.Ac(St)),y||et.add(St)});var pt=this.kl;return pt.clear(),nt.each(function(St){pt.add(b.Ac(St)),y&&et.add(St)}),a=b.cloneDeep(et.Fa()),0<ht.count&&(x===null&&(x={}),y?x.removedLinkKeys=ht.Fa():x.insertedLinkKeys=ht.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<pt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=pt.Fa():x.removedLinkKeys=pt.Fa()),pt.clear(),ht.clear(),x},te.rm=function(){var a=Hn.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},te.gp=function(a){Hn.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)},te.Rv=function(){var a=Hn.prototype.Rv.call(this),y=`,
"linkDataArray": `+Hh(this,this.linkDataArray,!0);return a+y},te.kv=function(a){Hn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function LS(a,y){for(var x=new vn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}te.Pv=function(a,y){this.linkKeyProperty===""&&je("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Hn.prototype.Pv.call(this,a,y),b=this,E=new vn,et=new vn,nt=new vn,st=this.vh;a.changes.each(function(St){St.model===b&&(St.modelChange==="linkDataArray"?St.change===$i?E.add(St.newValue):St.change===vo&&nt.add(St.oldValue):b.Jc(St.object)?et.add(St.object):St.object!==null&&(St.object!==null&&st&&st.contains(St.object)?st.get(St.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):St.object instanceof Hn||b.lb(St.object)||LS(b,St.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(St){ht.add(b.Ac(St)),y||et.add(St)});var pt=this.kl;return pt.clear(),nt.each(function(St){pt.add(b.Ac(St)),y&&et.add(St)}),a=x,0<ht.count&&(a+=(y?this.Xv:this.Vv)+Hh(this,ht.Fa(),!0)),0<et.count&&(a+=this.iy+Hh(this,et.Fa(),!0)),0<pt.count&&(a+=(y?this.Vv:this.Xv)+Hh(this,pt.Fa(),!0)),pt.clear(),ht.clear(),a},te.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)&&je("applyIncrementalJson cannot change Model properties"),Hn.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],et=this.jh(E);et===null&&(et=this.Jo({}),this.Ks(et,E),this.fi(et))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],et=this.Ac(E),et=this.jh(et),et!==null){for(var nt in E)nt!=="__gohashid"&&nt!==this.linkKeyProperty&&this.setDataProperty(et,nt,E[nt]);jS(this,E,et)}}if(a=a.removedLinkKeys,Array.isArray(a))for(nt=a.length,y=0;y<nt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Wr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Di){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),Li(x,b,E);return}}else if(a.change===$i){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,$e(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===vo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,$e(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}}Hn.prototype.changeState.call(this,a,y)}},te=Wr.prototype,te.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),Li(x,this.nodeKeyProperty,a),this.xf(x))}return a}},te.yx=function(a){return ys(this,a,!0)},te.wv=function(a,y){Dd(this,a,y,!0)},te.Bx=function(a){return ys(this,a,!1)},te.Bv=function(a,y){Dd(this,a,y,!1)};function ys(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Qi(y,a),a!==void 0))){if(Vh(a))return a;je((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Dd(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 et=Qi(y,E);et!==x&&(xl(a,et,y),Li(y,E,x),a.hc(x)===null&&Sl(a,x,y),fo(a,b?"linkFromKey":"linkToKey",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}te.zx=function(a){return hv(this,a,!0)},te.xv=function(a,y){Bd(this,a,y,!0)},te.Cx=function(a){return hv(this,a,!1)},te.Cv=function(a,y){Bd(this,a,y,!1)};function hv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Qi(y,a),y===void 0?"":y)}function Bd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var et=Qi(y,E);et===void 0&&(et=""),et!==x&&(Li(y,E,x),fo(a,b?"linkFromPortId":"linkToPortId",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}te.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=Qi(a,y),a===void 0?cv:a)},te.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)xl(this,b[et],a);for(Li(a,x,y),E=y.length,et=0;et<E;et++){var nt=y[et];this.hc(nt)===null&&Sl(this,nt,a)}fo(this,"linkLabelKeys",Di,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Li(a,x,y)}},te.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Qi(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&&Sl(this,y,a),fo(this,"linkLabelKeys",$i,x,a,null,y,null,E)))}else je(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},te.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Qi(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(xl(this,y,a),fo(this,"linkLabelKeys",vo,x,a,y,null,E,null)))}else b!==void 0&&je(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},te.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;je("Key value for link data "+a+" is not a number or a string: "+y)}}},te.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);b!==y&&this.jh(y)===null&&(Li(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),fo(this,"linkKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},te.jh=function(a){return a===null&&je("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.wb.I(a):null},te.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))){Li(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Li(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Li(a,y,x)}}}}},te.Jc=function(a){return a===null?!1:this.$f.contains(a)},te.fi=function(a){a!==null&&(Gi(a),this.Jc(a)||AS(this,a,!0))};function AS(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&&je("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)),fo(a,"linkDataArray",$i,"linkDataArray",a,null,y,null,b),dy(a,y)}te.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)},te.bm=function(a){a!==null&&NS(this,a,!0)};function NS(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(fo(a,"linkDataArray",vo,"linkDataArray",a,y,null,b,null),x=ys(a,y,!0),xl(a,x,y),x=ys(a,y,!1),xl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],xl(a,x,y)}te.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)},te.Zz=function(a){if(this.linkKeyProperty===""&&je("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Tn(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 et=a[E],nt=this.Ac(et);if(nt!==void 0){x.add(nt);var st=this.jh(nt);st!==et&&(st!==null?(this.Do(st,et),jS(this,et,st)):(et=this.cloneDeep(et),this.Ks(et,nt),this.fi(et)))}else nt=this.cloneDeep(et),this.fi(nt),x.add(this.Ac(nt))}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=ys(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Sl(a,x,y),x=ys(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Sl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],a.hc(x)===null&&Sl(a,x,y)}te.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),$e(a)&&(ii(a),this.lf!==""&&Li(a,this.lf,void 0),this.mf!==""&&Li(a,this.mf,void 0),this.je!==""&&Li(a,this.je,[])),a},te.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qi(a,y)},te.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;je("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},te.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b!==y&&(xl(this,b,a),Li(a,x,y),this.hc(y)===null&&Sl(this,y,a),fo(this,"nodeGroupKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Wr.prototype.copyNodeData=function(a){return a===null?null:(a=Hn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Qi(a,this.Je)===void 0||Li(a,this.Je,void 0),a)},Wr.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){Dd(this,a,x,!0);return}if(y===this.linkToKeyProperty){Dd(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Bd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Bd(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=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},te=Wr.prototype,te.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&&Qi(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},te.jp=function(a,y){Hn.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,et=y;if(ys(this,b,!0)===E){var nt=this.lf;Li(b,nt,et),fo(this,"linkFromKey",Di,nt,b,E,et),typeof nt=="string"&&this.La(b,nt)}if(ys(this,b,!1)===E&&(nt=this.mf,Li(b,nt,et),fo(this,"linkToKey",Di,nt,b,E,et),typeof nt=="string"&&this.La(b,nt)),nt=this.Ef(b),Array.isArray(nt))for(var st=nt.length,ht=this.je,pt=0;pt<st;pt++)nt[pt]===E&&(nt[pt]=et,fo(this,"linkLabelKeys",$i,ht,b,E,et,pt,pt))}},te.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Li(a,b,x),fo(this,"nodeGroupKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},te.Lv=function(){Hn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},te.fm=function(a){Hn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=On();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;fo(this,"nodeGroupKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(ys(this,b,!0)===a&&(E=this.lf,fo(this,"linkFromKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),ys(this,b,!1)===a&&(E=this.mf,fo(this,"linkToKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var et=E.length,nt=this.je,st=0;st<et;st++)E[st]===a&&(fo(this,"linkLabelKeys",$i,nt,b,a,a,st,st),x.push(b))}for(y=0;y<x.length;y++)xl(this,a,x[y]);Fn(x)}},te.em=function(a){Hn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Sl(this,y,a)},te.qp=function(a){Hn.prototype.qp.call(this,a);var y=this.lh(a);xl(this,y,a)},te.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Qi(a,y),y===void 0))return"";if(typeof y=="string")return y;je("getCategoryForLinkData found a non-string category for "+a+": "+y)},Wr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Wr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"linkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Wr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},te=Wr.prototype,te.lm=function(a,y){Hn.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))}te.Wj=function(){return!0},te.ri=function(){return!0},te.xs=function(){return!0},te.Xj=function(){return!0},hn.Object.defineProperties(Wr.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];$e(E)||je("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Gi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new yn,E=0;E<x;E++){var et=a[E],nt=this.Ac(et);nt===void 0||this.wb.I(nt)!==null?b.add(et):this.wb.add(nt,et)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),et=this.Ac(E),et!==void 0&&this.wb.add(et,E)}for(b=new vn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,fo(this,"linkDataArray",Di,"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],et=this.Ac(E);et===void 0&&(this.Bs(E),et=this.Ac(E)),et!==void 0&&this.wb.add(et,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"}}}),Wr.prototype.setCategoryForLinkData=Wr.prototype.lp,Wr.prototype.getCategoryForLinkData=Wr.prototype.ps,Wr.prototype.assignAllDataProperties=Wr.prototype.Do,Wr.prototype.setGroupKeyForNodeData=Wr.prototype.mp,Wr.prototype.getGroupKeyForNodeData=Wr.prototype.lh,Wr.prototype.isGroupForNodeData=Wr.prototype.Yu,Wr.prototype.copyLinkData=Wr.prototype.Jo,Wr.prototype.mergeLinkDataArray=Wr.prototype.Zz,Wr.prototype.removeLinkDataCollection=Wr.prototype.lA,Wr.prototype.removeLinkData=Wr.prototype.bm,Wr.prototype.addLinkDataCollection=Wr.prototype.Ey,Wr.prototype.addLinkData=Wr.prototype.fi,Wr.prototype.containsLinkData=Wr.prototype.Jc,Wr.prototype.makeLinkDataKeyUnique=Wr.prototype.Bs,Wr.prototype.findLinkDataForKey=Wr.prototype.jh,Wr.prototype.setKeyForLinkData=Wr.prototype.Ks,Wr.prototype.getKeyForLinkData=Wr.prototype.Ac,Wr.prototype.removeLabelKeyForLinkData=Wr.prototype.Qx,Wr.prototype.addLabelKeyForLinkData=Wr.prototype.Bu,Wr.prototype.setLabelKeysForLinkData=Wr.prototype.Ls,Wr.prototype.getLabelKeysForLinkData=Wr.prototype.Ef,Wr.prototype.setToPortIdForLinkData=Wr.prototype.Cv,Wr.prototype.getToPortIdForLinkData=Wr.prototype.Cx,Wr.prototype.setFromPortIdForLinkData=Wr.prototype.xv,Wr.prototype.getFromPortIdForLinkData=Wr.prototype.zx,Wr.prototype.setToKeyForLinkData=Wr.prototype.Bv,Wr.prototype.getToKeyForLinkData=Wr.prototype.Bx,Wr.prototype.setFromKeyForLinkData=Wr.prototype.wv,Wr.prototype.getFromKeyForLinkData=Wr.prototype.yx,Wr.prototype.clear=Wr.prototype.clear;var cv=Object.freeze([]);Wr.className="GraphLinksModel",sl.GraphLinksModel=Wr,Hn.constructGraphLinksModel=Hn.constructGraphLinksModel=function(){return new Wr},Hn.initDiagramModel=cy=function(){return new Wr};function Ea(a,y){Hn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Tn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ye(Ea,Hn),Ea.constructGraphLinksModel=Hn.constructGraphLinksModel,Ea.prototype.cloneProtected=function(a){Hn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},te=Ea.prototype,te.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)+":"+sr(E)}}return y},te.rm=function(){var a=Hn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},te.gp=function(a){Hn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},te.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&je("applyIncrementalJson cannot change Model properties"),Hn.prototype.fp.call(this,a)},te.Vl=function(a){return a},te.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Qi(a,y),y!==void 0)){if(Vh(y))return y;je("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},te.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=Qi(a,x);b!==y&&(xl(this,b,a),Li(a,x,y),this.hc(y)===null&&Sl(this,y,a),fo(this,"nodeParentKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},te.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qi(a,y),y===void 0)?"":typeof y=="string"?y:(je("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ea.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ea.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Qi(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),fo(this,"parentLinkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Ea.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ea.prototype.copyNodeData=function(a){return a===null?null:(a=Hn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Qi(a,this.Ke)===void 0||Li(a,this.Ke,void 0),a)},Ea.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=Qi(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},te=Ea.prototype,te.jp=function(a,y){Hn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},te.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Li(a,b,x),fo(this,"nodeParentKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},te.fm=function(a){Hn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=On();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;fo(this,"nodeParentKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)xl(this,a,x[y]);Fn(x)}},te.em=function(a){Hn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Sl(this,y,a)},te.qp=function(a){Hn.prototype.qp.call(this,a);var y=this.mh(a);xl(this,y,a)},te.lm=function(a,y){Hn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},te.Tl=function(){return!0},te.xs=function(){return!0},hn.Object.defineProperties(Ea.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"}}}),Ea.prototype.setParentLinkCategoryForNodeData=Ea.prototype.Ms,Ea.prototype.getParentLinkCategoryForNodeData=Ea.prototype.ss,Ea.prototype.setParentKeyForNodeData=Ea.prototype.qe,Ea.prototype.getParentKeyForNodeData=Ea.prototype.mh,Ea.className="TreeModel",sl.TreeModel=Ea;function zi(a){ji.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ll,this.Ti=0,this.Zv=new Le,this.Jp=this.me=0,this.Xr=new gg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=ll,this.K=Ma,this.nd=Rd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}Ye(zi,ji),zi.prototype.cloneProtected=function(a){ji.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},zi.prototype.qb=function(a){a.classType===zi?a===mv||a===vv||a===pv||a===gv||a===Rd?this.sorting=a:a===_c||a===Id||a===Ma||a===Zh?this.direction=a:a===uh||a===Kh||a===ll||a===ul?this.arrangement=a:(a===Lf||a===yv)&&(this.nodeDiameterFormula=a):ji.prototype.qb.call(this,a)},zi.prototype.createNetwork=function(){return new _d(this)},zi.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 yn;y.addAll(a.iterator),a=new yn;var x=new yn,b=this.sort(y),E,et,nt=this.Jp,st=this.arrangement,ht=this.nodeDiameterFormula,pt=this.radius;(!isFinite(pt)||0>=pt)&&(pt=NaN);var St=this.aspectRatio;(!isFinite(St)||0>=St)&&(St=1);var Mt=this.startAngle;isFinite(Mt)||(Mt=0);var Gt=this.sweepAngle;if((!isFinite(Gt)||360<Gt||1>Gt)&&(Gt=360),y=this.spacing,isFinite(y)||(y=NaN),st===ul&&ht===Lf?st=ll:st===ul&&ht!==Lf&&(st=this.arrangement),(this.direction===_c||this.direction===Id)&&this.sorting!==Rd){for(ht=0;!(ht>=b.length)&&(a.add(b.M(ht)),!(ht+1>=b.length));ht+=2)x.add(b.M(ht+1));this.direction===_c?(this.arrangement===ul&&a.reverse(),b=new yn,b.addAll(a),b.addAll(x)):(this.arrangement===ul&&x.reverse(),b=new yn,b.addAll(x),b.addAll(a))}ht=b.length;for(var Xt=et=E=0;Xt<b.length;Xt++){var Qt=Mt+Gt*et*(this.direction===Ma?1:-1)/ht,ie=b.M(Xt).diameter;isNaN(ie)&&(ie=Xh(b.M(Xt),Qt)),360>Gt&&(Xt===0||Xt===b.length-1)&&(ie/=2),E+=ie,et++}if(isNaN(pt)||st===ul){if(isNaN(y)&&(y=6),st!==ll&&st!==ul){for(et=-1/0,nt=0;nt<ht;nt++)Xt=b.M(nt),E=b.M(nt===ht-1?0:nt+1),isNaN(Xt.diameter)&&Xh(Xt,0),isNaN(E.diameter)&&Xh(E,0),et=Math.max(et,(Xt.diameter+E.diameter)/2);nt=et+y,st===uh?pt=(et+y)/(2*Math.PI/ht):pt=fv(this,nt*(360<=Gt?ht:ht-1),St,Mt*Math.PI/180,Gt*Math.PI/180)}else pt=fv(this,E+(360<=Gt?ht:ht-1)*(st!==ul?y:1.6*y),St,Mt*Math.PI/180,Gt*Math.PI/180);et=pt*St}else if(et=pt*St,Xt=py(this,pt,et,Mt*Math.PI/180,Gt*Math.PI/180),isNaN(y))(st===ll||st===ul)&&(y=(Xt-E)/(360<=Gt?ht:ht-1));else if(st===ll||st===ul)Xt=(Xt-E)/(360<=Gt?ht:ht-1),Xt<y?(pt=fv(this,E+y*(360<=Gt?ht:ht-1),St,Mt*Math.PI/180,Gt*Math.PI/180),et=pt*St):y=Xt;else{for(nt=-1/0,E=0;E<ht;E++)Qt=b.M(E),ie=b.M(E===ht-1?0:E+1),isNaN(Qt.diameter)&&Xh(Qt,0),isNaN(ie.diameter)&&Xh(ie,0),nt=Math.max(nt,(Qt.diameter+ie.diameter)/2);nt+=y,E=fv(this,nt*(360<=Gt?ht:ht-1),St,Mt*Math.PI/180,Gt*Math.PI/180),E>pt?(pt=E,et=pt*St):nt=Xt/(360<=Gt?ht:ht-1)}if(this.kw=st,this.lc=pt,this.Zm=St,this.lw=Mt,this.Wp=Gt,this.Ti=y,this.me=et,this.Jp=nt,y=b,b=this.kw,st=this.lc,pt=this.lw,St=this.Wp,Mt=this.Ti,Gt=this.me,ht=this.Jp,this.direction!==_c&&this.direction!==Id||b!==ul)if(this.direction===_c||this.direction===Id){switch(nt=0,b){case Kh:nt=180*dv(this,st,Gt,pt,ht)/Math.PI;break;case ll:ht=y=0,nt=a.first(),nt!==null&&(y=Xh(nt,Math.PI/2)),nt=x.first(),nt!==null&&(ht=Xh(nt,Math.PI/2)),nt=180*dv(this,st,Gt,pt,Mt+(y+ht)/2)/Math.PI;break;case uh:nt=St/y.length}if(this.direction===_c){switch(b){case Kh:pg(this,a,pt,Zh);break;case ll:dg(this,a,pt,Zh);break;case uh:fg(this,a,St/2,pt,Zh)}switch(b){case Kh:pg(this,x,pt+nt,Ma);break;case ll:dg(this,x,pt+nt,Ma);break;case uh:fg(this,x,St/2,pt+nt,Ma)}}else{switch(b){case Kh:pg(this,x,pt,Zh);break;case ll:dg(this,x,pt,Zh);break;case uh:fg(this,x,St/2,pt,Zh)}switch(b){case Kh:pg(this,a,pt+nt,Ma);break;case ll:dg(this,a,pt+nt,Ma);break;case uh:fg(this,a,St/2,pt+nt,Ma)}}}else switch(b){case Kh:pg(this,y,pt,this.direction);break;case ll:dg(this,y,pt,this.direction);break;case uh:fg(this,y,St,pt,this.direction);break;case ul:OS(this,y,St,pt,this.direction)}else OS(this,y,St,pt-St/2,Ma)}this.updateParts(),this.network=null,this.isValidLayout=!0};function fg(a,y,x,b,E){var et=a.Wp,nt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=b+(E===Ma?ht*x/(360<=et?st:st-1):-(ht*x)/st),St=y.M(ht),Mt=nt*Math.tan(pt)/a;Mt=Math.sqrt((nt*nt+a*a*Mt*Mt)/(1+Mt*Mt)),St.centerX=Mt*Math.cos(pt),St.centerY=Mt*Math.sin(pt),St.actualAngle=180*pt/Math.PI}}function dg(a,y,x,b){var E=a.lc,et=a.me,nt=a.Ti;x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=y.M(ht),St=y.M(ht===st-1?0:ht+1),Mt=et*Math.sin(x);pt.centerX=E*Math.cos(x),pt.centerY=Mt,pt.actualAngle=180*x/Math.PI,isNaN(pt.diameter)&&Xh(pt,0),isNaN(St.diameter)&&Xh(St,0),pt=dv(a,E,et,b===Ma?x:-x,(pt.diameter+St.diameter)/2+nt),x+=b===Ma?pt:-pt}}function pg(a,y,x,b){var E=a.lc,et=a.me,nt=a.Jp;x=x*Math.PI/180;for(var st=y.length,ht=0;ht<st;ht++){var pt=y.M(ht);pt.centerX=E*Math.cos(x),pt.centerY=et*Math.sin(x),pt.actualAngle=180*x/Math.PI,pt=dv(a,E,et,b===Ma?x:-x,nt),x+=b===Ma?pt:-pt}}function OS(a,y,x,b,E){var et=a.Wp;if(a.mj=0,a.Xr=new gg,360>x){for(et=b+(E===Ma?et:-et);0>et;)et+=360;et%=360,180<et&&(et-=360),et*=Math.PI/180,a.gt=et,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 et=a.lc,nt=a.Ti,st=a.Zm,ht=et*Math.cos(b*Math.PI/180),pt=a.me*Math.sin(b*Math.PI/180),St=y.Fa();if(St.length===3)St[0].centerX=et,St[0].centerY=0,St[1].centerX=St[0].centerX-St[0].width/2-St[1].width/2-nt,St[1].y=St[0].y,St[2].centerX=(St[0].centerX+St[1].centerX)/2,St[2].y=St[0].y-St[2].height-nt;else if(St.length===4)St[0].centerX=et,St[0].centerY=0,St[2].centerX=-St[0].centerX,St[2].centerY=St[0].centerY,St[1].centerX=0,St[1].y=Math.min(St[0].y,St[2].y)-St[1].height-nt,St[3].centerX=0,St[3].y=Math.max(St[0].y+St[0].height+nt,St[2].y+St[2].height+nt);else{et=Le.alloc();for(var Mt=0;Mt<St.length&&(St[Mt].centerX=ht,St[Mt].centerY=pt,!(Mt>=St.length-1));Mt++)BS(a,ht,pt,St,Mt,E,et)||IS(a,ht,pt,St,Mt,E,et),ht=et.x,pt=et.y;if(Le.free(et),a.mj++,!(23<a.mj)){ht=St[0].centerX,pt=St[0].centerY,et=St[St.length-1].centerX,Mt=St[St.length-1].centerY;var Gt=Math.abs(ht-et)-((St[0].width+St[St.length-1].width)/2+nt),Xt=Math.abs(pt-Mt)-((St[0].height+St[St.length-1].height)/2+nt);nt=0,1>Math.abs(Xt)?Math.abs(ht-et)<(St[0].width+St[St.length-1].width)/2&&(nt=0):nt=0<Xt?Xt:1>Math.abs(Gt)?0:Gt,ht=Math.abs(et)>Math.abs(Mt)?0<et!=pt>Mt:0<Mt!=ht<et,(ht=E===Ma?ht:!ht)&&(nt=-Math.abs(nt),nt=Math.min(nt,-St[St.length-1].width),nt=Math.min(nt,-St[St.length-1].height)),a.Xr.compare(nt,St),1<Math.abs(nt)&&(a.lc=8>a.mj?a.lc-nt/(2*Math.PI):5>St.length&&10<nt?a.lc/2:a.lc-(0<nt?1.7:-2.3),a.me=a.lc*st,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var et=a.lc,nt=a.me,st=a.Zm,ht=et*Math.cos(b*Math.PI/180),pt=nt*Math.sin(b*Math.PI/180),St=Le.alloc(),Mt=y.Fa(),Gt=0;Gt<Mt.length&&(Mt[Gt].centerX=ht,Mt[Gt].centerY=pt,!(Gt>=Mt.length-1));Gt++)BS(a,ht,pt,Mt,Gt,E,St)||IS(a,ht,pt,Mt,Gt,E,St),ht=St.x,pt=St.y;if(Le.free(St),a.mj++,!(23<a.mj)){if(ht=Math.atan2(pt,ht),ht=E===Ma?a.gt-ht:ht-a.gt,ht=Math.abs(ht)<Math.abs(ht-2*Math.PI)?ht:ht-2*Math.PI,et=ht*(et+nt)/2,nt=a.Xr,Math.abs(et)<Math.abs(nt.Pl))for(nt.Pl=et,nt.mk=[],nt.tm=[],ht=0;ht<Mt.length;ht++)nt.mk[ht]=Mt[ht].bounds.x,nt.tm[ht]=Mt[ht].bounds.y;1<Math.abs(et)&&(a.lc=8>a.mj?a.lc-et/(2*Math.PI):a.lc-(0<et?1.7:-2.3),a.me=a.lc*st,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,et,nt){var st=a.lc,ht=a.me,pt=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var St=!1;if(0<=x!=(et===Ma)){if(et=y+a,et>st){if(et=y-a,et<-st)return nt.x=et,nt.y=pt,!1;St=!0}}else if(et=y-a,et<-st){if(et=y+a,et>st)return nt.x=et,nt.y=pt,!1;St=!0}return pt=Math.sqrt(1-Math.min(1,et*et/(st*st)))*ht,0>x!==St&&(pt=-pt),Math.abs(x-pt)>(b[E].height+b[E+1].height)/2?(nt.x=et,nt.y=pt,!1):(nt.x=et,nt.y=pt,!0)}function IS(a,y,x,b,E,et,nt){var st=a.lc,ht=a.me,pt=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(et===Ma)){if(et=x-a,et<-ht){if(et=x+a,et>ht){nt.x=pt,nt.y=et;return}b=!0}}else if(et=x+a,et>ht){if(et=x-a,et<-ht){nt.x=pt,nt.y=et;return}b=!0}pt=Math.sqrt(1-Math.min(1,et*et/(ht*ht)))*st,0>y!==b&&(pt=-pt),nt.x=pt,nt.y=et}zi.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},zi.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 Le(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))},zi.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var et=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 nt=0,st=b!==void 0&&E!==void 0?E/(et+1):Math.PI/(2*(et+1)),ht=0,pt=0;pt<=et;pt++){b!==void 0&&E!==void 0?ht=b+pt*E/et:ht=pt*Math.PI/(2*et);var St=Math.sin(ht);nt+=Math.sqrt(1-a*a*St*St)*st}return b!==void 0&&E!==void 0?(y>x?y:x)*nt:4*(y>x?y:x)*nt}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 et=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,nt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var st=0;;st++){var ht=Math.sin(b+st*a);if(nt+=(y>x?y:x)*Math.sqrt(1-et*et*ht*ht)*a,nt>=E)return st*a}}zi.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 Rd:return this.ak(Fx(a));default:je("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new yn;for(var b=0;b<a.length;b++){var E=-1,et=-1;if(b===0)for(var nt=0;nt<a.length;nt++){var st=a.M(nt).edgesCount;st>E&&(E=st,et=nt)}else for(nt=0;nt<a.length;nt++)st=y[nt],st>E&&(E=st,et=nt);for(x.add(a.M(et)),y[et]=-1,et=a.M(et),nt=et.sourceEdges;nt.next();)E=a.indexOf(nt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(et=et.destinationEdges;et.next();)E=a.indexOf(et.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}zi.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,et=b.destinationEdges;et.next();)E=a.indexOf(et.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(et=[],x=0;x<y.length;x++)et[x]=0;x=[];var nt=[],st=[];b=[],E=new yn;for(var ht=0,pt=0;pt<y.length;pt++){var St=y[pt].length;if(St===1)b.push(pt);else if(St===0)E.add(a.M(pt));else{if(ht===0)x.push(pt);else{for(var Mt=St=1/0,Gt=-1,Xt=[],Qt=0;Qt<x.length;Qt++)0>y[x[Qt]].indexOf(x[Qt===x.length-1?0:Qt+1])&&Xt.push(Qt===x.length-1?0:Qt+1);if(Xt.length===0)for(Qt=0;Qt<x.length;Qt++)Xt.push(Qt);for(Qt=0;Qt<Xt.length;Qt++){for(var ie=Xt[Qt],Me=y[pt],xe=0,Ne=0;Ne<nt.length;Ne++){var Fe=et[nt[Ne]],De=et[st[Ne]];if(Fe<De){var _e=Fe;Fe=De}else _e=De;if(_e<ie&&ie<=Fe)for(De=0;De<Me.length;De++){var Ze=Me[De];0>x.indexOf(Ze)||_e<et[Ze]&&et[Ze]<Fe||_e===et[Ze]||Fe===et[Ze]||xe++}else for(De=0;De<Me.length;De++)Ze=Me[De],0>x.indexOf(Ze)||_e<et[Ze]&&et[Ze]<Fe&&_e!==et[Ze]&&Fe!==et[Ze]&&xe++}for(Me=xe,Ne=xe=0;Ne<y[pt].length;Ne++)_e=x.indexOf(y[pt][Ne]),0<=_e&&(_e=Math.abs(ie-(_e>=ie?_e+1:_e)),xe+=_e<x.length+1-_e?_e:x.length+1-_e);for(Ne=0;Ne<nt.length;Ne++)_e=et[nt[Ne]],Fe=et[st[Ne]],_e>=ie&&_e++,Fe>=ie&&Fe++,_e>Fe&&(De=Fe,Fe=_e,_e=De),Fe-_e<(x.length+2)/2==(_e<ie&&ie<=Fe)&&xe++;(Me<St||Me===St&&xe<Mt)&&(St=Me,Mt=xe,Gt=ie)}for(x.splice(Gt,0,pt),St=0;St<x.length;St++)et[x[St]]=St;for(St=0;St<y[pt].length;St++)Mt=y[pt][St],0<=x.indexOf(Mt)&&(nt.push(pt),st.push(Mt))}ht++}}for(nt=x.length;;){for(et=!0,st=0;st<b.length;st++)if(ht=b[st],pt=y[ht][0],St=x.indexOf(pt),0<=St){for(Gt=Mt=0;Gt<y[pt].length;Gt++)Xt=x.indexOf(y[pt][Gt]),0>Xt||Xt===St||(Qt=Xt>St?Xt-St:St-Xt,Mt+=Xt<St!=Qt>nt-Qt?1:-1);x.splice(0>Mt?St:St+1,0,ht),b.splice(st,1),st--}else et=!1;if(et)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},hn.Object.defineProperties(zi.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!==ul&&a!==ll&&a!==Kh&&a!==uh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ma&&a!==Zh&&a!==_c&&a!==Id||(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!==Rd||(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!==Lf||(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 ll=new Je(zi,"ConstantSpacing",0),Kh=new Je(zi,"ConstantDistance",1),uh=new Je(zi,"ConstantAngle",2),ul=new Je(zi,"Packed",3),Ma=new Je(zi,"Clockwise",4),Zh=new Je(zi,"Counterclockwise",5),_c=new Je(zi,"BidirectionalLeft",6),Id=new Je(zi,"BidirectionalRight",7),pv=new Je(zi,"Forwards",8),gv=new Je(zi,"Reverse",9),mv=new Je(zi,"Ascending",10),vv=new Je(zi,"Descending",11),Rd=new Je(zi,"Optimized",12),yv=new Je(zi,"Pythagorean",13),Lf=new Je(zi,"Circular",14);zi.className="CircularLayout",zi.ConstantSpacing=ll,zi.ConstantDistance=Kh,zi.ConstantAngle=uh,zi.Packed=ul,zi.Clockwise=Ma,zi.Counterclockwise=Zh,zi.BidirectionalLeft=_c,zi.BidirectionalRight=Id,zi.Forwards=pv,zi.Reverse=gv,zi.Ascending=mv,zi.Descending=vv,zi.Optimized=Rd,zi.Pythagorean=yv,zi.Circular=Lf;function gg(){this.Pl=-1/0,this.tm=this.mk=null}gg.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},gg.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]}},gg.className="VertexArrangement";function _d(a){Si.call(this,a)}Ye(_d,Si),_d.prototype.createVertex=function(){return new mg(this)},_d.prototype.createEdge=function(){return new Sv(this)},_d.className="CircularNetwork";function mg(a){So.call(this,a),this.u=this.Si=NaN}Ye(mg,So);function Xh(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===ul)if(x.nodeDiameterFormula===Lf)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===Lf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}hn.Object.defineProperties(mg.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)}}}),mg.className="CircularVertex";function Sv(a){rs.call(this,a)}Ye(Sv,rs),Sv.className="CircularEdge";function Zo(a){ji.call(this),this.ah=null,this.An=0,this.$d=new kn(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)}Ye(Zo,ji),Zo.prototype.cloneProtected=function(a){ji.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},Zo.prototype.createNetwork=function(){return new Af(this)},Zo.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 et=E.value;et.Vd=et.vertexes.count,et.sh=1,et.Hj=null,et.We=null}RS(this,0,a)}this.network=y;var nt=b=x.iterator;b=this.arrangementSpacing;var st=nt.count,ht=!0;et=E=0;for(var pt=On(),St=0;St<st+y.vertexes.count+2;St++)pt[St]=null;st=0,nt.reset();for(var Mt=on.alloc();nt.next();)if(St=nt.value,this.computeBounds(St,Mt),ht)ht=!1,E=Mt.x+Mt.width/2,et=Mt.y+Mt.height/2,pt[0]=new Le(Mt.x+Mt.width+b.width,Mt.y),pt[1]=new Le(Mt.x,Mt.y+Mt.height+b.height),st=2;else{var Gt=_S(pt,st,E,et,Mt.width,Mt.height,b),Xt=pt[Gt],Qt=new Le(Xt.x+Mt.width+b.width,Xt.y),ie=new Le(Xt.x,Xt.y+Mt.height+b.height);for(Gt+1<st&&pt.splice(Gt+1,0,null),pt[Gt]=Qt,pt[Gt+1]=ie,st++,Gt=Xt.x-Mt.x,Xt=Xt.y-Mt.y,St=St.vertexes.iterator;St.next();)Qt=St.value,Qt.centerX+=Gt,Qt.centerY+=Xt}for(on.free(Mt),St=y.vertexes.iterator;St.next();)nt=St.value,Gt=nt.bounds,2>st?(E=Gt.x+Gt.width/2,et=Gt.y+Gt.height/2,pt[0]=new Le(Gt.x+Gt.width+b.width,Gt.y),pt[1]=new Le(Gt.x,Gt.y+Gt.height+b.height),st=2):(ht=_S(pt,st,E,et,Gt.width,Gt.height,b),Mt=pt[ht],Xt=new Le(Mt.x+Gt.width+b.width,Mt.y),Gt=new Le(Mt.x,Mt.y+Gt.height+b.height),ht+1<st&&pt.splice(ht+1,0,null),pt[ht]=Xt,pt[ht+1]=Gt,st++,nt.centerX=Mt.x+nt.width/2,nt.centerY=Mt.y+nt.height/2);for(Fn(pt),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},Zo.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},Zo.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),et=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=et,RS(a,y+1,x),GS(a,et),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(nt,st){return nt===null||st===null||nt===st?0:st.Vd-nt.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 Af(a),E=0;E<a.ah.length;E++){var et=a.ah[E];if(1<et.Vd){b.dh(et);var nt=new US;nt.Rs=et.Vd,nt.Ss=et.width,nt.Qs=et.height,nt.Sv=et.focus.x,nt.Tv=et.focus.y,et.We===null&&(et.We=new yn),et.We.add(nt),et.sv=et.We.count-1}else break}for(et=x.edges.iterator;et.next();){var st=et.value;E=st.fromVertex,nt=st.toVertex,E.network===b&&nt.network===b?b.Bo(st):E.network===b?(st=E.Hj,st===null&&(st=new yn,E.Hj=st),st.add(nt),E.Vd--,E.sh+=nt.sh):nt.network===b&&(st=nt.Hj,st===null&&(st=new yn,nt.Hj=st),st.add(E),nt.Vd--,nt.sh+=E.sh)}for(E=b.edges.iterator;E.next();)et=E.value,et.length*=Math.max(1,Ge.sqrt((et.fromVertex.sh+et.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var ht=E.Hj;if(ht!==null&&0<ht.count&&(nt=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=nt))){for(var pt=st=0,St=ht.count-nt;St<ht.count;St++){var Mt=ht.M(St),Gt=null;for(et=Mt.edges.iterator;et.next();){var Xt=et.value;if(Xt.Ax(Mt)===E){Gt=Xt;break}}Gt!==null&&(pt+=Gt.length,st+=Mt.width*Mt.height)}et=E.centerX,ht=E.centerY,St=E.width,Mt=E.height,Gt=E.focus,Xt=St*Mt,1>Xt&&(Xt=1),st=Ge.sqrt((st+Xt+pt*pt*4/(nt*nt))/Xt),nt=(st-1)*St/2,st=(st-1)*Mt/2,E.bounds=new on(et-Gt.x-nt,ht-Gt.y-st,St+2*nt,Mt+2*st),E.focus=new Le(Gt.x+nt,Gt.y+st)}}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 et=E.Sv,nt=E.Tv;b.bounds=new on(b.centerX-et,b.centerY-nt,E.Ss,E.Qs),b.focus=new Le(et,nt),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,et=y.width,nt=y.height;y.We!==null&&0<y.We.count&&(nt=y.We.M(0),et=nt.Ss,nt=nt.Qs),et=Ge.sqrt(et*et+nt*nt)/2;for(var st=!1,ht=nt=0,pt=0,St=y.vertexes.iterator;St.next();){var Mt=St.value;1>=Mt.Vd?ht++:(st=!0,pt++,nt+=Math.atan2(y.centerY-Mt.centerY,y.centerX-Mt.centerX))}if(ht!==0){for(0<pt&&(nt/=pt),pt=y=0,y=st?2*Math.PI/(ht+1):2*Math.PI/ht,ht%2===0&&(pt=y/2),1<x.count&&x.sort(function(Xt,Qt){return Xt===null||Qt===null||Xt===Qt?0:Qt.width*Qt.height-Xt.width*Xt.height}),st=ht%2===0?0:1,x=x.iterator;x.next();)if(ht=x.value,!(1<ht.Vd||a.isFixed(ht))){for(St=null,Mt=ht.edges.iterator;Mt.next();){St=Mt.value;break}Mt=ht.width;var Gt=ht.height;Mt=Ge.sqrt(Mt*Mt+Gt*Gt)/2,St=et+St.length+Mt,Mt=nt+(y*(st/2>>1)+pt)*(st%2===0?1:-1),ht.centerX=b+St*Math.cos(Mt),ht.centerY=E+St*Math.sin(Mt),st++}}}}function _S(a,y,x,b,E,et,nt){var st=9e19,ht=-1,pt=0;t:for(;pt<y;pt++){var St=a[pt],Mt=St.x-x,Gt=St.y-b;if(Mt=Mt*Mt+Gt*Gt,Mt<st){for(Gt=pt-1;0<=Gt;Gt--)if(a[Gt].y>St.y&&a[Gt].x-St.x<E+nt.width)continue t;for(Gt=pt+1;Gt<y;Gt++)if(a[Gt].x>St.x&&a[Gt].y-St.y<et+nt.height)continue t;ht=pt,st=Mt}}return ht}Zo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Zo.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 et=E.value;if(et.toVertex===a){x=et;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(et=E.value,et.fromVertex===a){x=et;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 et=y.bounds,nt=et.x;y=et.y;var st=et.width;return et=et.height,b+E<nt?a>y+et?(x=b+E-nt,a=a-y-et,Ge.sqrt(x*x+a*a)):a+x<y?(b=b+E-nt,a=a+x-y,Ge.sqrt(b*b+a*a)):nt-(b+E):b>nt+st?a>y+et?(x=b-nt-st,a=a-y-et,Ge.sqrt(x*x+a*a)):a+x<y?(b=b-nt-st,a=a+x-y,Ge.sqrt(b*b+a*a)):b-(nt+st):a>y+et?a-(y+et):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,et=x=x.centerY,nt=1;nt<y.length;nt++){var st=y[nt];st.forceX=0,st.forceY=0;var ht=st.centerX;st=st.centerY,b=Math.min(b,ht),E=Math.max(E,ht),x=Math.min(x,st),et=Math.max(et,st)}(E=E-b>et-x)?y.sort(function(ie,Me){return ie===null||Me===null||ie===Me?0:ie.centerX-Me.centerX}):y.sort(function(ie,Me){return ie===null||Me===null||ie===Me?0:ie.centerY-Me.centerY}),x=a.Zf;var pt=b=st=0;for(et=0;et<y.length;et++){nt=y[et],b=nt.bounds,st=nt.focus,ht=b.x+st.x;var St=b.y+st.y;b=nt.charge*a.electricalFieldX(ht,St),pt=nt.charge*a.electricalFieldY(ht,St),b+=nt.mass*a.gravitationalFieldX(ht,St),pt+=nt.mass*a.gravitationalFieldY(ht,St),nt.forceX+=b,nt.forceY+=pt;for(var Mt=et+1;Mt<y.length;Mt++){var Gt=y[Mt];if(Gt!==nt){b=Gt.bounds,st=Gt.focus,pt=b.x+st.x;var Xt=b.y+st.y;if(ht-pt>x||pt-ht>x){if(E)break}else if(St-Xt>x||Xt-St>x){if(!E)break}else{var Qt=zS(nt,Gt);1>Qt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Qt=b.random(),st=b.random(),ht>pt?(b=Math.abs(Gt.bounds.right-nt.bounds.x),b=(1+b)*Qt):ht<pt?(b=Math.abs(Gt.bounds.x-nt.bounds.right),b=-(1+b)*Qt):(b=Math.max(Gt.width,nt.width),b=(1+b)*Qt-b/2),St>Xt?(pt=Math.abs(Gt.bounds.bottom-nt.bounds.y),pt=(1+pt)*st):ht<pt?(pt=Math.abs(Gt.bounds.y-nt.bounds.bottom),pt=-(1+pt)*st):(pt=Math.max(Gt.height,nt.height),pt=(1+pt)*st-pt/2)):(st=-(nt.charge*Gt.charge)/(Qt*Qt),b=(pt-ht)/Qt*st,pt=(Xt-St)/Qt*st),nt.forceX+=b,nt.forceY+=pt,Gt.forceX-=b,Gt.forceY-=pt}}}}for(E=a.network.edges.iterator;E.next();)st=E.value,x=st.fromVertex,et=st.toVertex,nt=x.bounds,ht=x.focus,b=nt.x+ht.x,nt=nt.y+ht.y,St=et.bounds,Mt=et.focus,ht=St.x+Mt.x,St=St.y+Mt.y,Mt=zS(x,et),1>Mt?(Mt=a.randomNumberGenerator,Mt===null&&(a.randomNumberGenerator=Mt=new xv),st=Mt.random(),Mt=Mt.random(),b=(b>ht?1:-1)*(1+(et.width>x.width?et.width:x.width))*st,pt=(nt>St?1:-1)*(1+(et.height>x.height?et.height:x.height))*Mt):(st=st.stiffness*(Mt-st.length),b=(ht-b)/Mt*st,pt=(St-nt)/Mt*st),x.forceX+=b,x.forceY+=pt,et.forceX-=b,et.forceY-=pt;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}Zo.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},Zo.prototype.moveFixedVertex=function(){},Zo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Zo.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=jo,y.toSpot=jo)}},Zo.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=on.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,on.free(x)}x=on.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()}on.free(x)},Zo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Zo.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Zo.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Zo.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Zo.prototype.electricalFieldX=function(){return 0},Zo.prototype.electricalFieldY=function(){return 0},Zo.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Zo.prototype.gravitationalFieldX=function(){return 0},Zo.prototype.gravitationalFieldY=function(){return 0},Zo.prototype.isFixed=function(a){return a.isFixed},hn.Object.defineProperties(Zo.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"&&je('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())}}}),Zo.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Af(a){Si.call(this,a)}Ye(Af,Si),Af.prototype.createVertex=function(){return new vg(this)},Af.prototype.createEdge=function(){return new yg(this)},Af.className="ForceDirectedNetwork";function vg(a){So.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}Ye(vg,So),hn.Object.defineProperties(vg.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)}}}),vg.className="ForceDirectedVertex";function yg(a){rs.call(this,a),this.j=this.o=NaN}Ye(yg,rs),hn.Object.defineProperties(yg.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)}}}),yg.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 ui(a){ji.call(this),this.kc=this.ie=25,this.K=0,this.Dk=kv,this.Zk=Ev,this.Qk=Mv,this.bj=4,this.rk=Tv,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 Le,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ye(ui,ji),ui.prototype.cloneProtected=function(a){ji.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},ui.prototype.qb=function(a){a.classType===ui?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:je("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},ui.prototype.createNetwork=function(){return new Gd(this)},ui.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!==xg&&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===xg&&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,et=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||et.node===null&&et.data===null)&&E.layer===et.layer)){var nt=0,st=0,ht=0,pt=0;if(b.link!==null){if(st=b.link,st===null)continue;var St=E.node;if(nt=et.node,St===null||nt===null)continue;var Mt=st.fromNode;ht=st.toNode;for(var Gt=st.fromPort;Gt!==null&&!Gt.Ed();)Gt=Gt.panel;for(st=st.toPort;st!==null&&!st.Ed();)st=st.panel;if(b.rev){pt=Mt;var Xt=Gt;Mt=ht,Gt=st,ht=pt,st=Xt}var Qt=E.focus;pt=et.focus;var ie=b.rev?et.bounds:E.bounds;Xt=Le.alloc(),St!==Mt?ie.w()&&Mt.isVisible()?Mt.actualBounds.w()?(ih(Mt,Gt,Fr,Xt),Xt.x+=Mt.actualBounds.x-ie.x,Xt.y+=Mt.actualBounds.y-ie.y):(ih(Mt,Gt,Fr,Xt),Xt.w()||Xt.assign(Qt)):Xt.assign(Qt):ie.w()?(ih(Mt,Gt,Fr,Xt),Xt.w()||Xt.assign(Qt)):Xt.assign(Qt),Mt=b.rev?E.bounds:et.bounds,St=Le.alloc(),nt!==ht?Mt.w()&&ht.isVisible()?ht.actualBounds.w()?(ih(ht,st,Fr,St),St.x+=ht.actualBounds.x-Mt.x,St.y+=ht.actualBounds.y-Mt.y):(ih(ht,st,Fr,St),St.w()||St.assign(pt)):St.assign(pt):Mt.w()?(ih(ht,st,Fr,St),St.w()||St.assign(pt)):St.assign(pt),this.K===90||this.K===270?(nt=Math.round((Xt.x-Qt.x)/this.kc),ht=Xt.x,st=Math.round((St.x-pt.x)/this.kc),pt=St.x):(nt=Math.round((Xt.y-Qt.y)/this.kc),ht=Xt.y,st=Math.round((St.y-pt.y)/this.kc),pt=St.y),Le.free(Xt),Le.free(St),b.portFromColOffset=nt,b.portFromPos=ht,b.portToColOffset=st,b.portToPos=pt}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Xt=E.layer,St=et.layer,Mt=0,ie=b.link,ie!==null){var Me=ie.fromPort,xe=ie.toPort;if(Me!==null&&xe!==null){var Ne=ie.fromNode;if(Gt=ie.toNode,Ne!==null&&Gt!==null){var Fe=Cv(this,!0),De=Cv(this,!1),_e=this.setsPortSpots?Fe:ie.computeSpot(!0,Me);Qt=this.setsPortSpots?De:ie.computeSpot(!1,xe);var Ze=ie.isOrthogonal;_e.$c()&&_e.Hf(De)&&Qt.$c()&&Qt.Hf(Fe)?Mt=0:(Fe=ie.getLinkPoint(Ne,Me,_e,!0,Ze,Gt,xe,Le.alloc()),De=ie.getLinkDirection(Ne,Me,Fe,_e,!0,Ze,Gt,xe),Le.free(Fe),_e.ys()||De!==QS(this,b,!0)?this.setsPortSpots&&Ne!==null&&Ne.ports.count===1&&b.rev&&(Mt+=1):Mt+=1,_e=ie.getLinkPoint(Gt,xe,Qt,!1,Ze,Ne,Me,Le.alloc()),ie=ie.getLinkDirection(Gt,xe,_e,Qt,!1,Ze,Ne,Me),Le.free(_e),Qt.ys()||ie!==QS(this,b,!1)?this.setsPortSpots&&Gt!==null&&Gt.ports.count===1&&b.rev&&(Mt+=2):Mt+=2)}}}if(Gt=Mt,Mt=Gt===1||Gt===3,(Gt=Gt===2||Gt===3)&&(Qt=a.createVertex(),Qt.node=null,Qt.Dj=1,Qt.layer=Xt,Qt.near=E,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=nt,E.portToColOffset=0,E.portFromPos=ht,E.portToPos=0,E=Qt),ie=1,Mt&&ie--,Xt-St>ie&&0<Xt){for(b.valid=!1,Qt=a.createVertex(),Qt.node=null,Qt.Dj=2,Qt.layer=Xt-1,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Gt?0:nt,E.portToColOffset=0,E.portFromPos=Gt?0:ht,E.portToPos=0,E=Qt,Xt--;Xt-St>ie&&0<Xt;)Qt=a.createVertex(),Qt.node=null,Qt.Dj=3,Qt.layer=Xt-1,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Qt,Xt--;E=a.Zj(Qt,et,b.link),E.valid=!Mt,Mt&&(Qt.near=et),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=st,E.portFromPos=0,E.portToPos=pt}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=Yh(this,a),x=0,b=this.tc[a],et=0;et<b;et++)E=y[et],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Jh(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ui.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}ui.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},ui.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function _a(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var 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 Fs(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 WS(a,y,x){var b=Yh(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var et=a.Jn,nt=0;nt<E;nt++){var st=0,ht=b[nt],pt=ht.near;if(pt!==null&&pt.layer===ht.layer)if(ht=pt.index,ht>nt)for(var St=nt+1;St<ht;St++){var Mt=b[St];Mt.near===pt&&Mt.Dj===pt.Dj||st++}else for(St=nt-1;St>ht;St--)Mt=b[St],Mt.near===pt&&Mt.Dj===pt.Dj||st++;var Gt;if(0<=x)for(ht=b[nt].sourceEdgesArrayAccess,pt=0;pt<ht.length;pt++){var Xt=ht[pt];if(Xt.valid&&Xt.fromVertex.layer!==y)for(Mt=Xt.fromVertex.index,St=Xt.portToPos,Xt=Xt.portFromPos,Gt=pt+1;Gt<ht.length;Gt++){var Qt=ht[Gt];if(Qt.valid&&Qt.fromVertex.layer!==y){var ie=Qt.fromVertex.index,Me=Qt.portToPos;Qt=Qt.portFromPos,St<Me&&(Mt>ie||Mt===ie&&Xt>Qt)&&st++,Me<St&&(ie>Mt||ie===Mt&&Qt>Xt)&&st++}}}if(0>=x){for(ht=b[nt].destinationEdgesArrayAccess,pt=0;pt<ht.length;pt++)if(Xt=ht[pt],Xt.valid&&Xt.toVertex.layer!==y)for(Mt=Xt.toVertex.index,St=Xt.portToPos,Xt=Xt.portFromPos,Gt=pt+1;Gt<ht.length;Gt++)Qt=ht[Gt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Me=Qt.portToPos,Qt=Qt.portFromPos,Xt<Qt&&(Mt>ie||Mt===ie&&St>Me)&&st++,Qt<Xt&&(ie>Mt||ie===Mt&&Me>St)&&st++)}for(et[nt*E+nt]=st,ht=nt+1;ht<E;ht++){var xe=0,Ne=0;if(0<=x){st=b[nt].sourceEdgesArrayAccess;var Fe=b[ht].sourceEdgesArrayAccess;for(pt=0;pt<st.length;pt++)if(Xt=st[pt],Xt.valid&&Xt.fromVertex.layer!==y)for(Mt=Xt.fromVertex.index,Xt=Xt.portFromPos,Gt=0;Gt<Fe.length;Gt++)Qt=Fe[Gt],Qt.valid&&Qt.fromVertex.layer!==y&&(ie=Qt.fromVertex.index,Qt=Qt.portFromPos,(Mt<ie||Mt===ie&&Xt<Qt)&&Ne++,(ie<Mt||ie===Mt&&Qt<Xt)&&xe++)}if(0>=x){for(st=b[nt].destinationEdgesArrayAccess,Fe=b[ht].destinationEdgesArrayAccess,pt=0;pt<st.length;pt++)if(Xt=st[pt],Xt.valid&&Xt.toVertex.layer!==y)for(Mt=Xt.toVertex.index,St=Xt.portToPos,Gt=0;Gt<Fe.length;Gt++)Qt=Fe[Gt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Me=Qt.portToPos,(Mt<ie||Mt===ie&&St<Me)&&Ne++,(ie<Mt||ie===Mt&&Me<St)&&xe++)}et[nt*E+ht]=xe,et[ht*E+nt]=Ne}}return Jh(a,y,b),et}ui.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=WS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var et=E;et<b;et++)a+=x[E*b+et];return a};function wv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,et=Yh(b,E),nt=b.tc[E],st=0,ht=0;ht<nt;ht++){var pt=et[ht].destinationEdgesArrayAccess;if(pt!==null)for(var St=0;St<pt.length;St++){var Mt=pt[St];if(Mt.valid&&Mt.toVertex.layer!==E){var Gt=Mt.fromVertex.column+Mt.portFromColOffset,Xt=Mt.toVertex.column+Mt.portToColOffset;st+=(Math.abs(Gt-Xt)+1)*gy(Mt)}}}Jh(b,E,et),y+=st}return y}ui.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=Yh(a,y),E=a.tc[y],et=[],nt=0;nt<E;nt++){var st=b[nt],ht=null;0>=x&&(ht=st.sourceEdgesArrayAccess);var pt=null;0<=x&&(pt=st.destinationEdgesArrayAccess);var St=0,Mt=0,Gt=st.near;if(Gt!==null&&Gt.layer===st.layer&&(St+=Gt.column-1,Mt++),ht!==null)for(Gt=0;Gt<ht.length;Gt++){st=ht[Gt];var Xt=st.fromVertex;st.valid&&!st.rev&&Xt.layer!==y&&(St+=Xt.column,Mt++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],Gt=st.toVertex,st.valid&&!st.rev&&Gt.layer!==y&&(St+=Gt.column,Mt++);et[nt]=Mt===0?-1:St/Mt}return Jh(a,y,b),et}function HS(a,y,x){for(var b=Yh(a,y),E=a.tc[y],et=[],nt=0;nt<E;nt++){var st=b[nt],ht=null;0>=x&&(ht=st.sourceEdgesArrayAccess);var pt=null;0<=x&&(pt=st.destinationEdgesArrayAccess);var St=0,Mt=[],Gt=st.near;if(Gt!==null&&Gt.layer===st.layer&&(Mt[St]=Gt.column-1,St++),st=void 0,ht!==null)for(Gt=0;Gt<ht.length;Gt++){st=ht[Gt];var Xt=st.fromVertex;st.valid&&!st.rev&&Xt.layer!==y&&(Mt[St]=Xt.column+st.portFromColOffset,St++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],Gt=st.toVertex,st.valid&&!st.rev&&Gt.layer!==y&&(Mt[St]=Gt.column+st.portToColOffset,St++);St===0?et[nt]=-1:(Mt.sort(function(Qt,ie){return Qt-ie}),pt=St>>1,et[nt]=St&1?Mt[pt]:Mt[pt-1]+Mt[pt]>>1)}return Jh(a,y,b),et}function Sg(a,y,x,b,E,et){if(y.component===b){if(y.component=x,E)for(var nt=y.destinationEdges;nt.next();){var st=nt.value,ht=st.toVertex,pt=y.layer-ht.layer;st=a.linkMinLength(st),pt===st&&Sg(a,ht,x,b,E,et)}if(et)for(nt=y.sourceEdges;nt.next();)st=nt.value,ht=st.fromVertex,pt=ht.layer-y.layer,st=a.linkMinLength(st),pt===st&&Sg(a,ht,x,b,E,et)}}function vy(a,y,x,b,E,et){if(y.component===b){if(y.component=x,E)for(var nt=y.destinationEdges;nt.next();)vy(a,nt.value.toVertex,x,b,E,et);if(et)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,et)}}ui.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=VS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=VS(a);for(E=KS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=KS(a);E=null;for(var et=0,nt=this.network.vertexes.iterator;nt.next();){var st=nt.value;if(st.valid){for(var ht=0,pt=st.destinationEdges;pt.next();)pt.value.toVertex.valid&&ht++;pt=0;for(var St=st.sourceEdges;St.next();)St.value.fromVertex.valid&&pt++;(E===null||et<ht-pt)&&(E=st,et=ht-pt)}}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 kv: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,et=E.finish,E.Ll<y.Ll&&x<et&&(this.network.gm(b),b.rev=!0));break;case xg: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(et=0;et<E.length;et++)E[et].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 VS(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 KS(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++}ui.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 Ev: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,et=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,et)+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,et=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,et)+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,et=0;et<E;et++){var nt=b[et],st=nt.fromVertex,ht=nt.toVertex;nt=a.linkMinLength(nt),st.layer-ht.layer>nt&&Sg(a,st,0,-1,!0,!1)}for(Sg(a,y,1,-1,!0,!0);y.component!==0;){for(et=0,b=1/0,st=0,ht=null,nt=a.network.vertexes.iterator;nt.next();){var pt=nt.value;if(pt.component===1){var St=0,Mt=!1,Gt=pt.sourceEdgesArrayAccess;E=Gt.length;for(var Xt=0;Xt<E;Xt++){var Qt=Gt[Xt],ie=Qt.fromVertex;St+=1,ie.component!==1&&(et+=1,ie=ie.layer-pt.layer,Qt=a.linkMinLength(Qt),b=Math.min(b,ie-Qt))}for(Gt=pt.destinationEdgesArrayAccess,E=Gt.length,Xt=0;Xt<E;Xt++)Qt=Gt[Xt].toVertex,--St,Qt.component!==1?--et:Mt=!0;(ht===null||St<st)&&!Mt&&(ht=pt,st=St)}}if(0<et){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else ht.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Sg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,et=0,st=null,ht=a.network.vertexes.iterator;ht.next();)if(nt=ht.value,nt.component===1){for(pt=0,St=!1,Gt=nt.sourceEdgesArrayAccess,Mt=Gt.length,Xt=0;Xt<Mt;Xt++)Qt=Gt[Xt].fromVertex,pt+=1,Qt.component!==1?b+=1:St=!0;for(Gt=nt.destinationEdgesArrayAccess,Mt=Gt.length,Xt=0;Xt<Mt;Xt++)Qt=Gt[Xt],ie=Qt.toVertex,--pt,ie.component!==1&&(--b,ie=nt.layer-ie.layer,Qt=a.linkMinLength(Qt),E=Math.min(E,ie-Qt));(st===null||pt>et)&&!St&&(st=nt,et=pt)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else st.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}ui.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 Mv: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],et=y[b+1];E.portFromColOffset>et.portFromColOffset&&(x=!0,y[b]=et,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],et=y[x+1];E.portToColOffset>et.portToColOffset&&(b=!0,y[x]=et,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))}ui.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=_a(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,1),Vs(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=_a(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),Vs(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=_a(this))}for(Fs(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)bv(this,b,0),Vs(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=_a(this)),b=this.Ia;0<=b;b--)bv(this,b,0),Vs(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=_a(this))}Fs(this,y);var et,nt,st;switch(this.rk){case ky:break;case Ey:for(st=a+1;(b=this.countCrossings())<st;)for(st=b,x=this.Ia;0<=x;x--)for(nt=0;nt<=x;nt++){for(et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,-1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,0)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,0)||et;E>=a?Fs(this,y):(a=E,y=_a(this))}break;default:case Tv:for(x=this.Ia,nt=0,st=a+1;(b=this.countCrossings())<st;){for(st=b,et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,-1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,1)||et;for(E=this.countCrossings(),E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,-1)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=x;b>=nt;b--)et=Vs(this,b,0)||et;for(E>=a?Fs(this,y):(a=E,y=_a(this)),et=!0;et;)for(et=!1,b=nt;b<=x;b++)et=Vs(this,b,0)||et;E>=a?Fs(this,y):(a=E,y=_a(this))}}Fs(this,y)};function bv(a,y,x){var b=Yh(a,y),E=a.tc[y],et=HS(a,y,x),nt=my(a,y,x);for(x=0;x<E;x++)nt[x]===-1&&(nt[x]=b[x].column),et[x]===-1&&(et[x]=b[x].column);for(var st=!0,ht;st;)for(st=!1,x=0;x<E-1;x++)(et[x+1]<et[x]||et[x+1]===et[x]&&nt[x+1]<nt[x])&&(st=!0,ht=et[x],et[x]=et[x+1],et[x+1]=ht,ht=nt[x],nt[x]=nt[x+1],nt[x+1]=ht,ht=b[x],b[x]=b[x+1],b[x+1]=ht);for(x=et=0;x<E;x++)ht=b[x],ht.index=x,et+=a.nodeMinColumnSpace(ht,!0),ht.column=et,et+=1,et+=a.nodeMinColumnSpace(ht,!1);Jh(a,y,b)}function Vs(a,y,x){var b=Yh(a,y),E=a.tc[y];x=WS(a,y,x);var et,nt=[];for(et=0;et<E;et++)nt[et]=-1;var st=[];for(et=0;et<E;et++)st[et]=-1;for(var ht=!1,pt=!0;pt;)for(pt=!1,et=0;et<E-1;et++){var St=x[b[et].index*E+b[et+1].index],Mt=x[b[et+1].index*E+b[et].index],Gt=0,Xt=0,Qt=b[et].column,ie=b[et+1].column,Me=a.nodeMinColumnSpace(b[et],!0),xe=a.nodeMinColumnSpace(b[et],!1),Ne=a.nodeMinColumnSpace(b[et+1],!0),Fe=a.nodeMinColumnSpace(b[et+1],!1);Me=Qt-Me+Ne,xe=ie-xe+Fe;var De=b[et].sourceEdges.iterator;for(De.reset();De.next();)if(Ne=De.value,Fe=Ne.fromVertex,Ne.valid&&Fe.layer===y){for(Ne=0;b[Ne]!==Fe;)Ne++;Ne<et&&(Gt+=2*(et-Ne),Xt+=2*(et+1-Ne)),Ne===et+1&&(Gt+=1),Ne>et+1&&(Gt+=4*(Ne-et),Xt+=4*(Ne-(et+1)))}for(De=b[et].destinationEdges.iterator,De.reset();De.next();)if(Ne=De.value,Fe=Ne.toVertex,Ne.valid&&Fe.layer===y){for(Ne=0;b[Ne]!==Fe;)Ne++;Ne===et+1&&(Xt+=1)}for(De=b[et+1].sourceEdges.iterator,De.reset();De.next();)if(Ne=De.value,Fe=Ne.fromVertex,Ne.valid&&Fe.layer===y){for(Ne=0;b[Ne]!==Fe;)Ne++;Ne<et&&(Gt+=2*(et+1-Ne),Xt+=2*(et-Ne)),Ne===et&&(Xt+=1),Ne>et+1&&(Gt+=4*(Ne-(et+1)),Xt+=4*(Ne-et))}for(De=b[et+1].destinationEdges.iterator,De.reset();De.next();)if(Ne=De.value,Fe=Ne.toVertex,Ne.valid&&Fe.layer===y){for(Ne=0;b[Ne]!==Fe;)Ne++;Ne===et&&(Gt+=1)}Ne=Fe=0,De=nt[b[et].index];var _e=st[b[et].index],Ze=nt[b[et+1].index],Ln=st[b[et+1].index];De!==-1&&(Fe+=Math.abs(De-Qt),Ne+=Math.abs(De-xe)),_e!==-1&&(Fe+=Math.abs(_e-Qt),Ne+=Math.abs(_e-xe)),Ze!==-1&&(Fe+=Math.abs(Ze-ie),Ne+=Math.abs(Ze-Me)),Ln!==-1&&(Fe+=Math.abs(Ln-ie),Ne+=Math.abs(Ln-Me)),(Xt<Gt-.5||Xt===Gt&&Mt<St-.5||Xt===Gt&&Mt===St&&Ne<Fe-.5)&&(pt=ht=!0,b[et].column=xe,b[et+1].column=Me,St=b[et],b[et]=b[et+1],b[et+1]=St)}for(et=0;et<E;et++)b[et].index=et;return Jh(a,y,b),ht}ui.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 et=E.value;y=et.layer,b=et.column,et=this.nodeMinColumnSpace(et,!1),x[y]=Math.max(x[y],b+et)}for(E.reset();E.next();)et=E.value,y=et.layer,b=et.column,et.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&&(tx(this,-1),tx(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 Hx(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=Yh(a,y),et=a.tc[y],nt=my(a,y,-1);if(0<x)for(b=0;b<et;b++)nt[b]=-1;var st=my(a,y,1);if(0>x)for(b=0;b<et;b++)st[b]=-1;for(var ht=!1,pt=!0;pt;)for(pt=!1,b=0;b<et;b++){var St=E[b].column,Mt=a.nodeMinColumnSpace(E[b],!0),Gt=a.nodeMinColumnSpace(E[b],!1),Xt=0;0>b-1||St-E[b-1].column-1>Mt+a.nodeMinColumnSpace(E[b-1],!1)?Xt=St-1:Xt=St,Mt=b+1>=et||E[b+1].column-St-1>Gt+a.nodeMinColumnSpace(E[b+1],!0)?St+1:St;var Qt=Gt=0,ie=0;if(0>=x)for(var Me=E[b].sourceEdges.iterator;Me.next();){var xe=Me.value,Ne=xe.fromVertex;if(xe.valid&&Ne.layer!==y){var Fe=gy(xe),De=xe.portFromColOffset;xe=xe.portToColOffset,Ne=Ne.column,Gt+=(Math.abs(St+xe-(Ne+De))+1)*Fe,Qt+=(Math.abs(Xt+xe-(Ne+De))+1)*Fe,ie+=(Math.abs(Mt+xe-(Ne+De))+1)*Fe}}if(0<=x)for(Me=E[b].destinationEdges.iterator;Me.next();)xe=Me.value,Ne=xe.toVertex,xe.valid&&Ne.layer!==y&&(Fe=gy(xe),De=xe.portFromColOffset,xe=xe.portToColOffset,Ne=Ne.column,Gt+=(Math.abs(St+De-(Ne+xe))+1)*Fe,Qt+=(Math.abs(Xt+De-(Ne+xe))+1)*Fe,ie+=(Math.abs(Mt+De-(Ne+xe))+1)*Fe);xe=De=Fe=0,Me=nt[E[b].index],Ne=st[E[b].index],Me!==-1&&(Fe+=Math.abs(Me-St),De+=Math.abs(Me-Xt),xe+=Math.abs(Me-Mt)),Ne!==-1&&(Fe+=Math.abs(Ne-St),De+=Math.abs(Ne-Xt),xe+=Math.abs(Ne-Mt)),Qt<Gt||Qt===Gt&&De<Fe?(pt=ht=!0,E[b].column=Xt):(ie<Gt||ie===Gt&&xe<Fe)&&(pt=ht=!0,E[b].column=Mt)}return Jh(a,y,E),a.normalize(),ht}function Sy(a,y,x){var b=Yh(a,y),E=a.tc[y],et=HS(a,y,x),nt=[];for(x=0;x<E;x++)nt[x]=et[x];for(et=!0;et;)for(et=!1,x=0;x<E;x++){var st=b[x].column,ht=a.nodeMinColumnSpace(b[x],!0),pt=a.nodeMinColumnSpace(b[x],!1),St=0;if(nt[x]===-1)if(x===0&&x===E-1)St=st;else if(x===0){var Mt=b[x+1].column;Mt-st===pt+a.nodeMinColumnSpace(b[x+1],!0)?St=st-1:St=st}else x===E-1?(Mt=b[x-1].column,St=st-Mt===ht+a.nodeMinColumnSpace(b[x-1],!1)?st+1:st):(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,St=(ht+pt)/2|0);else x===0&&x===E-1?St=nt[x]:x===0?(Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,St=Math.min(nt[x],pt)):x===E-1?(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,St=Math.max(nt[x],ht)):(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,ht<nt[x]&&nt[x]<pt?St=nt[x]:ht>=nt[x]?St=ht:pt<=nt[x]&&(St=pt));St!==st&&(et=!0,b[x].column=St)}Jh(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,et=a.nodeMinColumnSpace(E,!0),nt=a.nodeMinColumnSpace(E,!1);if(E.column-et<=y&&E.column+nt>=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 Wx(a,y){var x=y+1,b,E=[],et=[];for(b=0;b<=a.Ia;b++)E[b]=!1,et[b]=!1;for(var nt=a.network.vertexes.iterator;nt.next();){b=nt.value;var st=b.column-a.nodeMinColumnSpace(b,!0),ht=b.column+a.nodeMinColumnSpace(b,!1);st<=y&&ht>=y&&(E[b.layer]=!0),st<=x&&ht>=x&&(et[b.layer]=!0)}for(st=!0,x=!1,b=0;b<=a.Ia;b++)st=st&&!(E[b]&&et[b]);if(st)for(nt.reset();nt.next();)a=nt.value,a.column>y&&(--a.column,x=!0);return x}function tx(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=_a(a),et=wv(a);for(b=et+1;et<b;){b=et,ex(a,x,1);var nt=wv(a);nt>et?Fs(a,E):nt<et&&(et=nt,E=_a(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=_a(a),et=wv(a),b=et+1;et<b;)b=et,ex(a,x,-1),nt=wv(a),nt>et?Fs(a,E):nt<et&&(et=nt,E=_a(a));a.normalize()}function ex(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 et;for(y=[],et=0;et<a.le*a.le;et++)y[et]=!1;for(E=[],et=0;et<(a.Ia+1)*(a.Ra+1);et++)E[et]=-1;for(b.reset();b.next();){et=b.value;for(var nt=et.layer,st=Math.max(0,et.column-a.nodeMinColumnSpace(et,!0)),ht=Math.min(a.Ra,et.column+a.nodeMinColumnSpace(et,!1));st<=ht;st++)E[nt*(a.Ra+1)+st]=et.component}for(et=0;et<=a.Ia;et++){if(0<x)for(nt=0;nt<a.Ra;nt++)E[et*(a.Ra+1)+nt]!==-1&&E[et*(a.Ra+1)+nt+1]!==-1&&E[et*(a.Ra+1)+nt]!==E[et*(a.Ra+1)+nt+1]&&(y[E[et*(a.Ra+1)+nt]*a.le+E[et*(a.Ra+1)+nt+1]]=!0);if(0>x)for(nt=a.Ra;0<nt;nt--)E[et*(a.Ra+1)+nt]!==-1&&E[et*(a.Ra+1)+nt-1]!==-1&&E[et*(a.Ra+1)+nt]!==E[et*(a.Ra+1)+nt-1]&&(y[E[et*(a.Ra+1)+nt]*a.le+E[et*(a.Ra+1)+nt-1]]=!0)}for(E=[],et=0;et<a.le;et++)E[et]=!0;for(nt=[],nt.push(0);nt.length!==0;)if(ht=nt[nt.length-1],nt.pop(),E[ht])for(E[ht]=!1,et=0;et<a.le;et++)y[ht*a.le+et]&&nt.splice(0,0,et);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 Hx(a){for(var y=On(),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 vn,Vx(y,x);var et=null,nt=null,st=null,ht=null,pt=(a.ve&1)!==0,St=(a.ve&2)!==0,Mt=(a.ve&4)!==0,Gt=(a.ve&8)!==0;for(pt&&(a.verticalAlignment(y,x,!0),et=Pv(a,y,!0,!1)),y.reverse(),Mt&&(a.verticalAlignment(y,x,!1),st=Pv(a,y,!1,!1)),b=Vn(y),E=b.next();!E.done;E=b.next())E.value.reverse();Gt&&(a.verticalAlignment(y,x,!1),ht=Pv(a,y,!1,!0)),y.reverse(),St&&(a.verticalAlignment(y,x,!0),nt=Pv(a,y,!0,!0)),Fn(y),a.u(et,nt,st,ht),a.network.vertexes.each(function(Xt){var Qt=On();pt&&Qt.push(et.get(Xt)),St&&Qt.push(nt.get(Xt)),Mt&&Qt.push(st.get(Xt)),Gt&&Qt.push(ht.get(Xt)),Qt.sort(function(Me,xe){return Me-xe});var ie=Qt.length;ie=(Qt[Math.floor((ie-1)/2)]+Qt[Math.ceil((ie-1)/2)])/2,Fn(Qt),Xt.zc=ie})}function Vx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,et=0,nt=a[b],st=a[b+1],ht=0;et<st.length;ht++){var pt=st[ht];t:{if(pt.node===null){var St=My(pt);if(0<St.length){St=St[0].node===null;break t}}St=!1}var Mt=St;if(ht===st.length-1||Mt){for(St=nt.length-1,Mt&&(St=My(pt)[0].index);et<=ht;){if(pt=st[et],!pt.bo){Mt=[];for(var Gt=Vn(pt.sourceEdgesArrayAccess),Xt=Gt.next();!Xt.done;Xt=Gt.next())Xt=Xt.value,Xt.valid&&Mt.push(Xt);pt.bo=Mt}for(pt=Vn(pt.bo),Mt=pt.next();!Mt.done;Mt=pt.next())Mt=Mt.value,Gt=Mt.fromVertex.index,(Gt<E||Gt>St)&&y.add(Mt);et++}E=St}}}ui.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Vn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Vn(b.value);for(var et=b.next();!et.done;et=b.next()){et=et.value;var nt=x?My(et):Yx(et),st=nt.length;if(0<st){nt.sort(function(Mt,Gt){return Mt.vi-Gt.vi});var ht=(st-1)/2;for(st=Math.floor(ht),ht=Math.ceil(ht);st<=ht;st++)if(et.align===et){var pt=nt[st],St=void 0;St=x?Lv(pt,et):Lv(et,pt),!y.contains(St)&&E<pt.vi&&(pt.align=et,et.root=pt.root,et.align=pt.root,E=pt.vi)}}}}};function Kx(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,et=Vn(y),nt=et.next();!nt.done;nt=et.next()){var st=Vn(nt.value);for(nt=st.next();!nt.done;nt=st.next())nt=nt.value,nt.sd=nt,nt.shift=1/0,nt.zc=NaN,nt.qg=0}for(nt=a.K===90||a.K===270,et=Vn(y),st=et.next();!st.done;st=et.next()){st=Vn(st.value);for(var ht=st.next();!ht.done;ht=st.next())if(ht=ht.value,ht.root===ht){for(var pt=0,St=ht;St.align!==ht;){var Mt=St.align,Gt=nt?St.width:St.height,Xt=nt?Mt.width:Mt.height;if(x){var Qt=Lv(St,Mt),ie=Qt.portFromPos,Me=Qt.portToPos;Qt.link!==null&&(St.node&&St.node!==Qt.link.fromNode&&(ie=nt?St.focusX:St.focusY),Mt.node&&Mt.node!==Qt.link.toNode&&(Me=nt?Mt.focusX:Mt.focusY))}else Qt=Lv(Mt,St),ie=Qt.portToPos,Me=Qt.portFromPos,Qt.link!==null&&(St.node&&St.node!==Qt.link.toNode&&(ie=nt?St.focusX:St.focusY),Mt.node&&Mt.node!==Qt.link.fromNode&&(Me=nt?Mt.focusX:Mt.focusY));Gt=b?St.qg+(Gt-ie)-(Xt-Me):St.qg+ie-Me,Mt.qg=Gt,pt=Math.min(pt,Gt),St=St.align}St=ht;do St.qg=St.qg-pt,St=St.align;while(St!==ht)}}for(x=Vn(y),nt=x.next();!nt.done;nt=x.next())for(et=Vn(nt.value),nt=et.next();!nt.done;nt=et.next())nt=nt.value,nt.root===nt&&nx(a,nt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(nt=y[x][0],nt.sd===nt)){nt.sd.shift===1/0&&(nt.sd.shift=0),nt=x,st=0;do{for(et=y[nt][st];et.align!==et.root;)et=et.align,nt++,0<et.vi&&(st=rx(et,y),st.sd.shift=Math.min(st.sd.shift,et.sd.shift+et.zc+et.qg-(st.zc+st.qg+(E?st.width:st.height)+a.columnSpacing)));st=et.vi+1}while(nt<y.length&&st<y[nt].length&&et.sd===y[nt][st].sd)}for(a=new Yn,y=Vn(y),nt=y.next();!nt.done;nt=y.next())for(x=Vn(nt.value),nt=x.next();!nt.done;nt=x.next())nt=nt.value,nt.zc=nt.zc+nt.sd.shift+nt.qg,et=E?nt.width:nt.height,a.add(nt,b?-nt.zc-et:nt.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),et=E.root;nx(a,et,x),y.sd===y&&(y.sd=et.sd);var nt=a.K===90||a.K===270?E.width:E.height;y.sd===et.sd&&(y.zc=Math.max(y.zc,et.zc+E.qg+nt-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&&je("Could not determine previous vertex in layer"),y[x][a-1]}ui.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=On(),E=On(),et=1/0,nt=0;4>nt;nt++)if(y[nt]){var st=Zx(this,y[nt],b,E,nt);st<et&&(x=nt,et=st)}for(et={},nt=0;4>nt;et={delta:et.delta},nt++)y[nt]&&(et.delta=nt===0||nt===2?b[x]-b[nt]:E[x]-E[nt],et.delta!==0&&y[nt].each(function(ht){return function(pt){pt.value+=ht.delta}}(et)));Fn(b),Fn(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var et=1/0,nt=-1/0;return y.each(function(st){var ht=st.key;st=st.value,ht=a.K===90||a.K===270?ht.width:ht.height,st<et&&(et=st),st+ht>nt&&(nt=st+ht)}),x[E]=et,b[E]=nt,nt-et}ui.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?da:oa:a.K===90?y?oa:da:a.K===180?y?Na:Yo:y?Yo:Na}ui.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 et=1/0,nt=E=1/0,st=-1/0;a.next();){var ht=a.value,pt=ht.layer,St=ht.column|0;b?(nt=y.x+this.kc*St,pt=this.Kd[pt]):(nt=this.Kd[pt],pt=y.y+this.kc*St),ht.centerX=nt,ht.centerY=pt,x&&isFinite(ht.zc)&&(b?ht.node?ht.x=y.x+ht.zc:ht.centerX=y.x+ht.zc:ht.node?ht.y=y.y+ht.zc:ht.centerY=y.y+ht.zc),et=Math.min(ht.x,et),E=Math.min(ht.y,E),b?(nt=et,st=Math.max(st,ht.bounds.right)):(nt=E,st=Math.max(st,ht.bounds.bottom))}for(this.xw=st-nt,et=y.x-et,y=y.y-E,this.Rf=new Le(x&&b?0:et,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=et,x.y+=y,x.commit()},ui.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 on(0,0,x,Math.abs(this.Ta[0]))):y.push(new on(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new on(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new on(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new on(0,0,Math.abs(this.Ta[0]),x)):y.push(new on(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new on(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new on(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ui.prototype.commitLayers=function(){},ui.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,et=b.toNode,nt=b.fromPort,st=b.toPort;if(E!==null){var ht=E.findVisibleNode();ht!==null&&ht!==E&&(E=ht,nt=ht.port)}et!==null&&(ht=et.findVisibleNode(),ht!==null&&ht!==et&&(et=ht,st=ht.port));var pt=y.computeSpot(!0,nt);ht=y.computeSpot(!1,st);var St=x.fromVertex,Mt=x.toVertex;if(x.valid)y.curve===vs&&y.pointsCount===4&&(St.column===Mt.column&&this.alignOption===0?(x=y.getLinkPoint(E,nt,pt,!0,!1,et,st),st=y.getLinkPoint(et,st,ht,!1,!1,E,nt),x.w()||x.set(E.actualBounds.center),st.w()||st.set(et.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+st.x)/3,(2*x.y+st.y)/3),y.yf((x.x+2*st.x)/3,(x.y+2*st.y)/3),y.yf(st.x,st.y)):(x=b=!1,nt!==null&&pt===zr&&(b=!0),st!==null&&ht===zr&&(x=!0),(b||x)&&(ht=null,b&&(ht=y.getLinkPointFromPoint(E,nt,nt.ga(Fr),y.i(3),!0),ht.w()||ht.set(E.actualBounds.center),y.L(0,ht.x,ht.y)),E=null,x&&(E=y.getLinkPointFromPoint(et,st,st.ga(Fr),y.i(0),!1),E.w()||E.set(et.actualBounds.center),y.L(3,E.x,E.y)),ht&&(et=y.i(2),y.L(1,(2*ht.x+et.x)/3,(2*ht.y+et.y)/3)),E&&(et=y.i(1),y.L(2,(2*E.x+et.x)/3,(2*E.y+et.y)/3))))),y.zf();else if(St.layer===Mt.layer)y.zf();else{var Gt=!1,Xt=!1,Qt=this.ie,ie=y.firstPickIndex+1;if(y.isOrthogonal){Xt=!0;var Me=y.pointsCount;4<Me&&y.points.removeRange(2,Me-3)}else if(y.curve===vs)Gt=!0,Me=y.pointsCount,4<Me&&y.points.removeRange(2,Me-3),Me===4&&(ie=2);else{Me=y.pointsCount;var xe=pt===zr,Ne=ht===zr;2<Me&&xe&&Ne?y.points.removeRange(1,Me-2):3<Me&&xe&&!Ne?y.points.removeRange(1,Me-3):3<Me&&!xe&&Ne?y.points.removeRange(2,Me-2):4<Me&&!xe&&!Ne&&y.points.removeRange(2,Me-3)}if(x.rev){for(;Mt!==null&&St!==Mt;){var Fe=Me=null;for(xe=Mt.sourceEdges.iterator;xe.next()&&(Ne=xe.value,Ne.link!==x.link||(Me=Ne.fromVertex,Fe=Ne.toVertex,Me.node!==null)););if(Me===null)break;if(Me!==St){xe=y.i(ie-1).x,Ne=y.i(ie-1).y;var De=Me.centerX,_e=Me.centerY;if(Xt)this.K===180||this.K===0?ie===y.firstPickIndex+1?(y.m(ie++,xe,Ne),y.m(ie++,xe,_e)):(Fe!==null?Fe.centerY:Ne)!==_e&&(Fe=this.Ta[Me.layer-1]+this.Rf.x,y.m(ie++,Fe,Ne),y.m(ie++,Fe,_e)):ie===y.firstPickIndex+1?(y.m(ie++,xe,Ne),y.m(ie++,De,Ne)):(Fe!==null?Fe.centerX:xe)!==De&&(Fe=this.Ta[Me.layer-1]+this.Rf.y,y.m(ie++,xe,Fe),y.m(ie++,De,Fe));else if(ie===y.firstPickIndex+1){Fe=Math.max(10,this.he[Mt.layer]);var Ze=Math.max(10,this.Ld[Mt.layer]);if(Gt)this.K===180?De<=Mt.bounds.x?(Mt=Mt.bounds.x,y.m(ie++,Mt-Fe,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt+Ze,_e)):(y.m(ie++,De-Fe,_e),y.m(ie++,De,_e),y.m(ie++,De+Ze,_e)):this.K===90?_e>=Mt.bounds.bottom?(Mt=Mt.bounds.y+Mt.bounds.height,y.m(ie++,De,Mt+Ze),y.m(ie++,De,Mt),y.m(ie++,De,Mt-Fe)):(y.m(ie++,De,_e+Ze),y.m(ie++,De,_e),y.m(ie++,De,_e-Fe)):this.K===270?_e<=Mt.bounds.y?(Mt=Mt.bounds.y,y.m(ie++,De,Mt-Fe),y.m(ie++,De,Mt),y.m(ie++,De,Mt+Ze)):(y.m(ie++,De,_e-Fe),y.m(ie++,De,_e),y.m(ie++,De,_e+Ze)):this.K===0&&(De>=Mt.bounds.right?(Mt=Mt.bounds.x+Mt.bounds.width,y.m(ie++,Mt+Ze,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt-Fe,_e)):(y.m(ie++,De+Ze,_e),y.m(ie++,De,_e),y.m(ie++,De-Fe,_e)));else{y.m(ie++,xe,Ne);var Ln=0;this.K===180||this.K===0?((this.K===180?De>=Mt.bounds.right:De<=Mt.bounds.x)&&(Ln=(this.K===0?-Fe:Ze)/2),y.m(ie++,xe+Ln,_e)):((this.K===270?_e>=Mt.bounds.bottom:_e<=Mt.bounds.y)&&(Ln=(this.K===90?-Fe:Ze)/2),y.m(ie++,De,Ne+Ln)),y.m(ie++,De,_e)}}else Fe=Math.max(10,this.he[Me.layer]),Ze=Math.max(10,this.Ld[Me.layer]),Gt?this.K===180?(y.m(ie++,De-Fe-Qt,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Ze-Qt/2,De),_e),y.m(ie++,De+Ze+Qt,_e)):this.K===90?(y.m(ie++,De,_e+Ze+Qt),y.m(ie++,De,Math.max(_e+Ze-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e-Fe-Qt)):this.K===270?(y.m(ie++,De,_e-Fe-Qt),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Ze-Qt/2,_e)),y.m(ie++,De,_e+Ze+Qt)):(y.m(ie++,De+Ze+Qt,_e),y.m(ie++,Math.max(De+Ze-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De-Fe-Qt,_e)):y.m(ie++,De,_e)}Mt=Me}(st===null||pt!==zr||Xt)&&(xe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,Xt?(Qt=this.Ld[St.layer],this.K===180||this.K===0?(Xt=Ne,Xt>=St.bounds.y&&Xt<=St.bounds.bottom&&(this.K===180?De>=St.bounds.x:De<=St.bounds.right)&&(Mt=St.centerX+(this.K===180?-Qt:Qt),Xt<St.bounds.y+St.bounds.height/2?Xt=St.bounds.y-this.kc/2:Xt=St.bounds.bottom+this.kc/2,y.m(ie++,Mt,Ne),y.m(ie++,Mt,Xt)),y.m(ie++,De,Xt)):(Xt=xe,Xt>=St.bounds.x&&Xt<=St.bounds.right&&(this.K===270?_e>=St.bounds.y:_e<=St.bounds.bottom)&&(Mt=St.centerY+(this.K===270?-Qt:Qt),Xt<St.bounds.x+St.bounds.width/2?Xt=St.bounds.x-this.kc/2:Xt=St.bounds.right+this.kc/2,y.m(ie++,xe,Mt),y.m(ie++,Xt,Mt)),y.m(ie++,Xt,_e)),y.m(ie++,De,_e)):Gt?(Fe=Math.max(10,this.he[St.layer]),Ze=Math.max(10,this.Ld[St.layer]),this.K===180&&De>=St.bounds.x?(Mt=St.bounds.x+St.bounds.width,y.L(ie-2,Mt,Ne),y.L(ie-1,Mt+Ze,Ne)):this.K===90&&_e<=St.bounds.bottom?(Mt=St.bounds.y,y.L(ie-2,xe,Mt),y.L(ie-1,xe,Mt-Fe)):this.K===270&&_e>=St.bounds.y?(Mt=St.bounds.y+St.bounds.height,y.L(ie-2,xe,Mt),y.L(ie-1,xe,Mt+Ze)):this.K===0&&De<=St.bounds.right&&(Mt=St.bounds.x,y.L(ie-2,Mt,Ne),y.L(ie-1,Mt-Fe,Ne))):(Fe=Math.max(10,this.he[St.layer]),Ze=Math.max(10,this.Ld[St.layer]),Xt=0,this.K===180||this.K===0?((this.K===180?De<=St.bounds.x:De>=St.bounds.right)&&(Xt=(this.K===0?Ze:-Fe)/2),y.m(ie++,De+Xt,Ne)):((this.K===270?_e<=St.bounds.y:_e>=St.bounds.bottom)&&(Xt=(this.K===90?Ze:-Fe)/2),y.m(ie++,xe,_e+Xt)),y.m(ie++,De,_e)))}else{for(;St!==null&&St!==Mt;){for(Fe=Me=null,St=St.destinationEdges.iterator;St.next()&&(xe=St.value,xe.link!==x.link||(Me=xe.toVertex,Fe=xe.fromVertex,Fe.node!==null&&(Fe=null),Me.node!==null)););if(Me===null)break;Me!==Mt&&(xe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=Me.centerX,_e=Me.centerY,Xt?this.K===180||this.K===0?(Fe!==null?Fe.centerY:Ne)!==_e&&(Fe=this.Ta[Me.layer]+this.Rf.x,ie===y.firstPickIndex+1&&(Fe=this.K===0?Math.max(Fe,xe):Math.min(Fe,xe)),y.m(ie++,Fe,Ne),y.m(ie++,Fe,_e)):(Fe!==null?Fe.centerX:xe)!==De&&(Fe=this.Ta[Me.layer]+this.Rf.y,ie===y.firstPickIndex+1&&(Fe=this.K===90?Math.max(Fe,Ne):Math.min(Fe,Ne)),y.m(ie++,xe,Fe),y.m(ie++,De,Fe)):(Fe=Math.max(10,this.he[Me.layer]),Ze=Math.max(10,this.Ld[Me.layer]),Gt?this.K===180?(y.m(ie++,De+Ze+Qt,_e),y.m(ie++,Math.max(De+Ze-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De-Fe-Qt,_e)):this.K===90?(y.m(ie++,De,_e-Fe-Qt),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Ze-Qt/2,_e)),y.m(ie++,De,_e+Ze+Qt)):this.K===270?(y.m(ie++,De,_e+Ze+Qt),y.m(ie++,De,Math.max(_e+Ze-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Fe+Qt/2,_e)),y.m(ie++,De,_e-Fe-Qt)):(y.m(ie++,De-Fe-Qt,_e),y.m(ie++,Math.min(De-Fe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Ze-Qt/2,De),_e),y.m(ie++,De+Ze+Qt,_e)):this.K===180?(y.m(ie++,De+Ze,_e),y.m(ie++,De-Fe,_e)):this.K===90?(y.m(ie++,De,_e-Fe),y.m(ie++,De,_e+Ze)):this.K===270?(y.m(ie++,De,_e+Ze),y.m(ie++,De,_e-Fe)):(y.m(ie++,De-Fe,_e),y.m(ie++,De+Ze,_e)))),St=Me}Xt&&(xe=y.i(ie-1).x,Ne=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,this.K===180||this.K===0?Ne!==_e&&(Fe=this.K===0?Math.min(Math.max((De+xe)/2,this.Ta[Mt.layer]+this.Rf.x),De):Math.max(Math.min((De+xe)/2,this.Ta[Mt.layer]+this.Rf.x),De),y.m(ie++,Fe,Ne),y.m(ie++,Fe,_e)):xe!==De&&(Fe=this.K===90?Math.min(Math.max((_e+Ne)/2,this.Ta[Mt.layer]+this.Rf.y),_e):Math.max(Math.min((_e+Ne)/2,this.Ta[Mt.layer]+this.Rf.y),_e),y.m(ie++,xe,Fe),y.m(ie++,De,Fe)))}b!==null&&Gt&&4<=y.pointsCount&&(nt!==null&&(nt=pt===zr?y.getLinkPointFromPoint(E,nt,nt.ga(Fr),y.i(3),!0):y.i(0),pt===zr&&(pt=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(nt.x+pt.x)/2,pt.y),y.L(2,b.x,(pt.y+b.y)/2)):(y.L(1,pt.x,(nt.y+pt.y)/2),y.L(2,(pt.x+b.x)/2,b.y))),nt.w()||nt.set(E.actualBounds.center),y.L(0,nt.x,nt.y)),st!==null&&(E=ht===zr?y.getLinkPointFromPoint(et,st,st.ga(Fr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ht===zr&&(st=y.i(y.pointsCount-3),ht=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+st.x)/2,st.y),y.L(y.pointsCount-2,ht.x,(st.y+ht.y)/2)):(y.L(y.pointsCount-2,st.x,(E.y+st.y)/2),y.L(y.pointsCount-3,(st.x+ht.x)/2,ht.y))),E.w()||E.set(et.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ui.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new yn,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 et=b.i(E),nt=b.i(E+1);if(this.B(et.y,nt.y)&&!this.B(et.x,nt.x)){var st=new Qh;st.layer=Math.floor(et.y/2);var ht=b.i(0),pt=b.i(b.pointsCount-1);if(st.first=ht.x*ht.x+ht.y,st.jc=pt.x*pt.x+pt.y,st.rd=Math.min(et.x,nt.x),st.Ic=Math.max(et.x,nt.x),st.index=E,st.link=b,E+2<b.pointsCount){ht=b.i(E-1),pt=b.i(E+2);var St=0;ht.y<et.y?St=pt.y<et.y?3:et.x<nt.x?2:1:ht.y>et.y&&(St=pt.y>et.y?0:nt.x<et.x?2:1),st.j=St}x.push(st)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(et=x[a].layer,b=a+1;b<x.length&&x[b].layer===et;)b++;if(1<b-a)for(et=a;et<b;){for(nt=x[et].Ic,E=a+1;E<b&&x[E].rd<nt;)nt=Math.max(nt,x[E].Ic),E++;if(nt=E-et,1<nt){for(this.zi(x,this.Js,et,et+nt),St=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(St++,st=pt.jc);this.zi(x,this.Ux,et,et+nt);var Mt=1;for(st=x[et].first,ht=et;ht<E;ht++)pt=x[ht],pt.first!==st&&(Mt++,st=pt.first);for(ht=!0,pt=Mt,St<Mt?(ht=!1,pt=St,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,St=0,Mt=et;Mt<E;Mt++){var Gt=x[Mt];(ht?Gt.first:Gt.jc)!==st&&(St++,st=ht?Gt.first:Gt.jc);var Xt=Gt.link;et=Xt.i(Gt.index),nt=Xt.i(Gt.index+1);var Qt=this.linkSpacing*(St-(pt-1)/2);y++,Xt.uh(),Xt.L(Gt.index,et.x,et.y+Qt),Xt.L(Gt.index+1,nt.x,nt.y+Qt),Xt.zf()}}et=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++)et=b.i(E),nt=b.i(E+1),this.B(et.x,nt.x)&&!this.B(et.y,nt.y)&&(st=new Qh,st.layer=Math.floor(et.x/2),ht=b.i(0),pt=b.i(b.pointsCount-1),st.first=ht.x+ht.y*ht.y,st.jc=pt.x+pt.y*pt.y,st.rd=Math.min(et.y,nt.y),st.Ic=Math.max(et.y,nt.y),st.index=E,st.link=b,E+2<b.pointsCount&&(ht=b.i(E-1),pt=b.i(E+2),St=0,ht.x<et.x?St=pt.x<et.x?3:et.y<nt.y?2:1:ht.x>et.x&&(St=pt.x>et.x?0:nt.y<et.y?2:1),st.j=St),x.push(st));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(et=x[a].layer,b=a+1;b<x.length&&x[b].layer===et;)b++;if(1<b-a)for(et=a;et<b;){for(nt=x[et].Ic,E=a+1;E<b&&x[E].rd<nt;)nt=Math.max(nt,x[E].Ic),E++;if(nt=E-et,1<nt){for(this.zi(x,this.Js,et,et+nt),St=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(St++,st=pt.jc);for(this.zi(x,this.Ux,et,et+nt),Mt=1,st=x[et].first,ht=et;ht<E;ht++)pt=x[ht],pt.first!==st&&(Mt++,st=pt.first);for(ht=!0,pt=Mt,St<Mt?(ht=!1,pt=St,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,St=0,Mt=et;Mt<E;Mt++)Gt=x[Mt],(ht?Gt.first:Gt.jc)!==st&&(St++,st=ht?Gt.first:Gt.jc),Xt=Gt.link,et=Xt.i(Gt.index),nt=Xt.i(Gt.index+1),Qt=this.linkSpacing*(St-(pt-1)/2),y++,Xt.uh(),Xt.L(Gt.index,et.x+Qt,et.y),Xt.L(Gt.index+1,nt.x+Qt,nt.y),Xt.zf()}et=E}a=b}}}},te=ui.prototype,te.Vx=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},te.Ux=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},te.Js=function(a,y){return a instanceof Qh&&y instanceof Qh&&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},te.B=function(a,y){return a-=y,-1<a&&1>a},te.zi=function(a,y,x,b){var E=a.length,et=b-x;if(!(1>=et))if((0>x||x>=E-1)&&je("not in range 0 <= from < length: "+x),et===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 Yh(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 Jh(a,y,x){a.He[a.tc[y]]=x}hn.Object.defineProperties(ui.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()):je("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==kv&&a!==xg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Ev&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Mv&&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!==ky&&a!==Tv&&a!==Ey||(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 kv=new Je(ui,"CycleDepthFirst",0),xy=new Je(ui,"CycleGreedy",1),xg=new Je(ui,"CycleFromLayers",2),Ev=new Je(ui,"LayerOptimalLinkLength",0),wy=new Je(ui,"LayerLongestPathSink",1),by=new Je(ui,"LayerLongestPathSource",2),Mv=new Je(ui,"InitDepthFirstOut",0),Py=new Je(ui,"InitDepthFirstIn",1),Cy=new Je(ui,"InitNaive",2),ky=new Je(ui,"AggressiveNone",0),Tv=new Je(ui,"AggressiveLess",1),Ey=new Je(ui,"AggressiveMore",2),Xx=8;ui.className="LayeredDigraphLayout",ui.CycleDepthFirst=kv,ui.CycleGreedy=xy,ui.CycleFromLayers=xg,ui.LayerOptimalLinkLength=Ev,ui.LayerLongestPathSink=wy,ui.LayerLongestPathSource=by,ui.InitDepthFirstOut=Mv,ui.InitDepthFirstIn=Py,ui.InitNaive=Cy,ui.AggressiveNone=ky,ui.AggressiveLess=Tv,ui.AggressiveMore=Ey,ui.PackNone=0,ui.PackExpand=1,ui.PackStraighten=2,ui.PackMedian=4,ui.PackAll=15,ui.AlignNone=0,ui.AlignUpperLeft=1,ui.AlignUpperRight=2,ui.AlignLowerLeft=4,ui.AlignLowerRight=8,ui.AlignAll=15;function Qh(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Qh.className="SegInfo";function Gd(a){Si.call(this,a)}Ye(Gd,Si),Gd.prototype.createVertex=function(){return new Ds(this)},Gd.prototype.createEdge=function(){return new wg(this)},Gd.className="LayeredDigraphNetwork";function Ds(a){So.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}Ye(Ds,So);function ix(a,y){return a.index-y.index}function Lv(a,y){if(!a.$n){for(var x=[],b=Vn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Vn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;je("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Vn(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=Vn(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}Ds.prototype.Cl=function(a){So.prototype.Cl.call(this,a),this.bo=this.co=null},Ds.prototype.Kl=function(a){So.prototype.Kl.call(this,a),this.bo=this.co=null},Ds.prototype.zl=function(a){So.prototype.zl.call(this,a),this.$n=this.ao=null},Ds.prototype.Jl=function(a){So.prototype.Jl.call(this,a),this.$n=this.ao=null},hn.Object.defineProperties(Ds.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)}}}),Ds.prototype.deleteDestinationEdge=Ds.prototype.Jl,Ds.prototype.addDestinationEdge=Ds.prototype.zl,Ds.prototype.deleteSourceEdge=Ds.prototype.Kl,Ds.prototype.addSourceEdge=Ds.prototype.Cl,Ds.className="LayeredDigraphVertex";function wg(a){rs.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ye(wg,rs),hn.Object.defineProperties(wg.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)}}}),wg.className="LayeredDigraphEdge";function Ir(a){ji.call(this),this.Ub=new vn,this.Wn=Ov,this.ud=nu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new kn(10,10).freeze();var y=new Ff(this);this.W=new Ks(y),this.Y=new Ks(y),this.ru=[],a&&Object.assign(this,a)}Ye(Ir,ji),Ir.prototype.cloneProtected=function(a){ji.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)},Ir.prototype.qb=function(a){a.classType===Ir?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:je("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},Ir.prototype.createNetwork=function(){return new Ff(this)},Ir.prototype.makeNetwork=function(a){function y(b){if(b instanceof Nn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Cn){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 Xe?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Pr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ir.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 Xe&&(y=a),this.path===Ov&&y!==null?this.ud=y.isTreePathToChildren?nu:jf:this.ud=this.path===Ov?nu: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 vn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Nn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Ks&&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,Ty(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,Ty(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&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 et=y.children[E];b=Math.max(b,x?et.width:et.height)}if(0<=b)for(E=0;E<y.children.length;E++)et=y.children[E],x?(y.angle===180&&(et.focusX+=b-et.width),et.width=b):(y.angle===270&&(et.focusY+=b-et.height),et.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ks&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new vn,this.isValidLayout=!0};function Jx(a){var y=new vn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ir.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nu:x.sourceEdges.count===0&&this.Ub.add(x);break;case jf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:je("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 nu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case jf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:je("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case nu:if(0<y.destinationEdges.count){for(var x=new yn,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 jf:if(0<y.sourceEdges.count){for(x=new yn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:je("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var et=x[E];et.initialized=!0,et.level=y.level+1,et.parent=y,a.Ub.remove(et)}for(y=0;y<b;y++)Ty(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}Ir.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 et=E=0;et<x.length;et++)x[et]!==y&&(b[E++]=x[et]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===ou&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,et=y.children,nt=et.length,st=0;st<nt;st++){var ht=et[st];sx(a,ht),x+=ht.descendantCount+1,b=Math.max(b,ht.maxChildrenCount),E=Math.max(E,ht.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,et=0;et<E;et++)if(0<b[et].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ir.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===ou){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])}}Ir.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==ou&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Ir.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ud:break;case Pg:a.children.reverse();break;case Cg:a.children.sort(a.comparer);break;case kg:a.children.sort(a.comparer),a.children.reverse();break;default:je("Unhandled sorting value "+a.sorting.toString())}},Ir.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ir.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=$h(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var et=0,nt=0,st=0,ht=a.commentSpacing;if(a.node!==null)for(var pt=a.node.Mu();pt.next();){var St=pt.value;St.category==="Comment"&&St.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(St),St.Va(),St=St.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(et=Math.max(et,St.width),nt+=St.height+Math.abs(st)):(et+=St.width+Math.abs(st),nt=Math.max(nt,St.height)),st=ht)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(et+=Math.abs(a.commentMargin),nt=Math.max(0,nt-a.height)):(nt+=Math.abs(a.commentMargin),et=Math.max(0,et-a.width)),E=on.allocAt(0,0,a.bounds.width+et,a.bounds.height+nt),a.bounds=E,on.free(E))};function $h(a){return a===hh||a===ou||a===ch||a===Cu}function bg(a){return a===hh||a===ou}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if($h(x)){if(bg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ch)return!0}}return!1}Ir.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,et=!1;x!==null&&(E=x.angle,et=x.alignment,et=$h(et)),b=b===90||b===270,x=E===90||E===270;for(var nt=a.childrenCount===0,st=Ly(a),ht=0,pt=a.comments,St=pt.length,Mt=Le.alloc(),Gt=0;Gt<St;Gt++){var Xt=pt[Gt],Qt=Xt.measuredBounds;if(b&&!nt||!et&&!x&&nt||et&&x&&nt){if(135<E&&!et||x&&st)if(0<=a.commentMargin)for(Mt.h(a.bounds.x-a.commentMargin-Qt.width,a.bounds.y+ht),Xt.move(Mt),Xt=Xt.Sd();Xt.next();){var ie=Xt.value;ie.fromSpot=Na,ie.toSpot=Yo}else for(Mt.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ht),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=Yo,ie.toSpot=Na;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ht),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=Yo,ie.toSpot=Na;else for(Mt.h(a.bounds.x+a.commentMargin-Qt.width,a.bounds.y+ht),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=Na,ie.toSpot=Yo;ht=0<=a.commentSpacing?ht+(Qt.height+a.commentSpacing):ht+(a.commentSpacing-Qt.height)}else{if(135<E&&!et||!x&&st)if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y-a.commentMargin-Qt.height),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=da,ie.toSpot=oa;else for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y-a.commentMargin),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=oa,ie.toSpot=da;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y+a.commentMargin),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=oa,ie.toSpot=da;else for(Mt.h(a.bounds.x+ht,a.bounds.y+a.commentMargin-Qt.height),Xt.move(Mt),Xt=Xt.Sd();Xt.next();)ie=Xt.value,ie.fromSpot=da,ie.toSpot=oa;ht=0<=a.commentSpacing?ht+(Qt.width+a.commentSpacing):ht+(a.commentSpacing-Qt.width)}}if(Le.free(Mt),y=ht-a.commentSpacing-(b?y.height:y.width),this.ud===nu)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)}},Ir.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 Eg:if(a.alignment===ou)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=$h(x)),b=Ly(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=hl(a);y=E===90||E===270;var et=0,nt=a.children,st=nt.length;for(x=0;x<st;x++)b=nt[x],et=Math.max(et,y?b.Da.width:b.Da.height);var ht=a.alignment;b=ht===ru;var pt=ht===iu,St=$h(ht),Mt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Gt=a.nodeSpacing,Xt=this.computeNodeIndent(a),Qt=a.rowSpacing,ie=0;(b||pt||a.hm||a.im&&a.maxGenerationCount===1)&&(ie=Math.max(0,a.rowIndent)),b=a.width;var Me=a.height,xe=0,Ne=0,Fe=0,De=null,_e=null,Ze=0,Ln=0,_n=0,Bn=0,wn=0,cn=0,br=0,dr=0;if(St&&!bg(ht)&&135<E&&nt.reverse(),bg(ht))if(1<st)for(var ti=0;ti<st;ti++)ti%2===0&&ti!==st-1&&(dr=Math.max(dr,y?nt[ti].Da.width:nt[ti].Da.height));else st===1&&(dr=y?nt[0].Da.width:nt[0].Da.height);if(St){switch(ht){case hh:Ne=135>E?cx(this,a,nt,dr,xe,Ne):fx(this,a,nt,dr,xe,Ne),dr=Ne.x,xe=Ne.width,Ne=Ne.height;break;case ch:for(De=0;De<st;De++)_e=nt[De],Mt=_e.Da,Fe=cn===0?0:Qt,y?(_e.S.h(et-Mt.width,Bn+Fe),xe=Math.max(xe,Mt.width),Ne=Math.max(Ne,Bn+Fe+Mt.height),Bn+=Fe+Mt.height):(_e.S.h(_n+Fe,et-Mt.height),xe=Math.max(xe,_n+Fe+Mt.width),Ne=Math.max(Ne,Mt.height),_n+=Fe+Mt.width),cn++;break;case Cu:for(De=0;De<st;De++)_e=nt[De],et=_e.Da,Mt=cn===0?0:Qt,y?(_e.S.h(Gt/2+a.focus.x,Bn+Mt),xe=Math.max(xe,et.width),Ne=Math.max(Ne,Bn+Mt+et.height),Bn+=Mt+et.height):(_e.S.h(_n+Mt,Gt/2+a.focus.y),xe=Math.max(xe,_n+Mt+et.width),Ne=Math.max(Ne,et.height),_n+=Mt+et.width),cn++}De=Ha(this,2),_e=Ha(this,2),y?(De[0].h(0,0),De[1].h(0,Ne),_e[0].h(xe,0)):(De[0].h(0,0),De[1].h(xe,0),_e[0].h(0,Ne)),_e[1].h(xe,Ne)}else for(ti=0;ti<st;ti++){var vi=nt[ti],Co=vi.Da;if(y){0<Mt&&0<cn&&_n+Gt+Co.width>Mt&&(_n<et&&zc(a,ht,et-_n,0,br,ti-1),wn++,cn=0,br=ti,Fe=Ne,_n=0,Bn=135<E?-Ne-Qt:Ne+Qt),Nv(this,vi,0,Bn);var Lo=0;if(cn===0)De=vi.Yo,_e=vi.kp,Ze=Co.width,Ln=Co.height,(De===null||_e===null||E!==hl(vi))&&(De=Ha(this,2),_e=Ha(this,2),De[0].h(0,0),De[1].h(0,Ln),_e[0].h(Ze,0),_e[1].h(Ze,Ln));else{var ha=On();Ln=dx(this,a,vi,De,_e,Ze,Ln,ha),Lo=Ln.x,De=ha[0],_e=ha[1],Ze=Ln.width,Ln=Ln.height,Fn(ha),_n<Co.width&&0>Lo&&(Nf(a,-Lo,0,br,ti-1),jv(De,-Lo,0),jv(_e,-Lo,0),Lo=0)}vi.S.h(Lo,Bn),xe=Math.max(xe,Ze),Ne=Math.max(Ne,Fe+(wn===0?0:Qt)+Co.height),_n=Ze}else 0<Mt&&0<cn&&Bn+Gt+Co.height>Mt&&(Bn<et&&zc(a,ht,0,et-Bn,br,ti-1),wn++,cn=0,br=ti,Fe=xe,Bn=0,_n=135<E?-xe-Qt:xe+Qt),Nv(this,vi,_n,0),Lo=0,cn===0?(De=vi.Yo,_e=vi.kp,Ze=Co.width,Ln=Co.height,(De===null||_e===null||E!==hl(vi))&&(De=Ha(this,2),_e=Ha(this,2),De[0].h(0,0),De[1].h(Ze,0),_e[0].h(0,Ln),_e[1].h(Ze,Ln))):(ha=On(),Ln=dx(this,a,vi,De,_e,Ze,Ln,ha),Lo=Ln.x,De=ha[0],_e=ha[1],Ze=Ln.width,Ln=Ln.height,Fn(ha),Bn<Co.height&&0>Lo&&(Nf(a,0,-Lo,br,ti-1),jv(De,0,-Lo),jv(_e,0,-Lo),Lo=0)),vi.S.h(_n,Lo),Ne=Math.max(Ne,Ln),xe=Math.max(xe,Fe+(wn===0?0:Qt)+Co.width),Bn=Ln;cn++}switch(0<wn&&(y?(Ne+=Math.max(0,x),_n<xe&&zc(a,ht,xe-_n,0,br,st-1),0<ie&&(pt||Nf(a,ie,0,0,st-1),xe+=ie)):(xe+=Math.max(0,x),Bn<Ne&&zc(a,ht,0,Ne-Bn,br,st-1),0<ie&&(pt||Nf(a,0,ie,0,st-1),Ne+=ie))),ie=pt=0,ht){case Wd:y?pt+=xe/2-a.focus.x-Xt/2:ie+=Ne/2-a.focus.y-Xt/2;break;case Of:0<wn?y?pt+=xe/2-a.focus.x-Xt/2:ie+=Ne/2-a.focus.y-Xt/2:y?(dr=nt[0].S.x+nt[0].la.x,pt+=dr+(nt[st-1].S.x+nt[st-1].la.x+2*nt[st-1].focus.x-dr)/2-a.focus.x-Xt/2):(dr=nt[0].S.y+nt[0].la.y,ie+=dr+(nt[st-1].S.y+nt[st-1].la.y+2*nt[st-1].focus.y-dr)/2-a.focus.y-Xt/2);break;case ru:y?(pt-=Xt,xe+=Xt):(ie-=Xt,Ne+=Xt);break;case iu:y?(pt+=xe-a.width+Xt,xe+=Xt):(ie+=Ne-a.height+Xt,Ne+=Xt);break;case hh:y?1<st?pt+=dr+Gt/2-a.focus.x:pt+=nt[0].focus.x-a.focus.x+nt[0].la.x:1<st?ie+=dr+Gt/2-a.focus.y:ie+=nt[0].focus.y-a.focus.y+nt[0].la.y;break;case ch:y?pt+=xe+Gt/2-a.focus.x:ie+=Ne+Gt/2-a.focus.y;break;case Cu:break;default:Ne=this.customAlignment(a,pt,ie,xe,Ne),pt=Ne[0],ie=Ne[1],xe=Ne[2],Ne=Ne[3]}for(Xt=0;Xt<st;Xt++)dr=nt[Xt],y?dr.S.h(dr.S.x+dr.la.x-pt,dr.S.y+(135<E?(St?-Ne:-dr.Da.height)+dr.la.y-x:Me+x+dr.la.y)):dr.S.h(dr.S.x+(135<E?(St?-xe:-dr.Da.width)+dr.la.x-x:b+x+dr.la.x),dr.S.y+dr.la.y-ie);if(st=nt=0,St?y?(xe=Ay(a,xe,pt),0>pt&&(pt=0),135<E&&(ie+=Ne+x),Ne+=Me+x,ht===Cu&&(nt+=Gt/2+a.focus.x),st+=Me+x):(135<E&&(pt+=xe+x),xe+=b+x,Ne=Ny(a,Ne,ie),0>ie&&(ie=0),ht===Cu&&(st+=Gt/2+a.focus.y),nt+=b+x):y?(a.comments===null?b>xe&&(xe=jy(ht,b-xe,0),nt=xe.x,st=xe.y,xe=b,pt=0):xe=Ay(a,xe,pt),0>pt&&(nt-=pt,pt=0),135<E&&(ie+=Ne+x),Ne=Math.max(Math.max(Ne,Me),Ne+Me+x),st+=Me+x):(135<E&&(pt+=xe+x),xe=Math.max(Math.max(xe,b),xe+b+x),a.comments===null?Me>Ne&&(Ne=jy(ht,0,Me-Ne),nt=Ne.x,st=Ne.y,Ne=Me,ie=0):Ne=Ny(a,Ne,ie),0>ie&&(st-=ie,ie=0),nt+=b+x),0<wn)E=Ha(this,4),wn=Ha(this,4),y?(E[2].h(0,Me+x),E[3].h(E[2].x,Ne),wn[2].h(xe,E[2].y),wn[3].h(wn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(xe,E[2].y),wn[2].h(E[2].x,Ne),wn[3].h(E[3].x,wn[2].y));else{for(E=Ha(this,De.length+2),wn=Ha(this,_e.length+2),ht=0;ht<De.length;ht++)St=De[ht],E[ht+2].h(St.x+nt,St.y+st);for(ht=0;ht<_e.length;ht++)St=_e[ht],wn[ht+2].h(St.x+nt,St.y+st)}y?(E[0].h(pt,0),E[1].h(E[0].x,Me),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])),wn[0].h(pt+b,0),wn[1].h(wn[0].x,Me),wn[2].y<wn[1].y&&(wn[2].x<wn[0].x?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].y<wn[2].y&&(wn[3].x<wn[0].x?wn[3].assign(wn[2]):wn[2].assign(wn[3])),E[2].y-=x/2,wn[2].y-=x/2):(E[0].h(0,ie),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])),wn[0].h(0,ie+Me),wn[1].h(b,wn[0].y),wn[2].x<wn[1].x&&(wn[2].y<wn[0].y?wn[2].assign(wn[1]):wn[1].assign(wn[2])),wn[3].x<wn[2].x&&(wn[3].y<wn[0].y?wn[3].assign(wn[2]):wn[2].assign(wn[3])),E[2].x-=x/2,wn[2].x-=x/2),wl(this,De),wl(this,_e),a.Yo=E,a.kp=wn,a.la.h(pt,ie),a.Da.h(xe,Ne)}break;default:je("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=$h(x));var E=Ly(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=hl(y),x=b===90||b===270;var et=0;E=y.children;for(var nt=E.length,st=0;st<nt;st++){var ht=E[st];et=Math.max(et,x?ht.Da.width:ht.Da.height)}var pt=y.alignment,St=pt===ru,Mt=pt===iu;st=$h(pt);var Gt=Math.max(0,y.breadthLimit);ht=a.computeLayerSpacing(y);var Xt=y.nodeSpacing,Qt=a.computeNodeIndent(y),ie=St||Mt?0:Qt/2,Me=y.rowSpacing,xe=0;(St||Mt||y.hm||y.im&&y.maxGenerationCount===1)&&(xe=Math.max(0,y.rowIndent)),St=y.width;var Ne=y.height,Fe=0,De=0,_e=0,Ze=0,Ln=0,_n=0,Bn=0,wn=0,cn=0,br=0;if(st&&!bg(pt)&&135<b&&E.reverse(),bg(pt))if(1<nt)for(var dr=0;dr<nt;dr++){var ti=E[dr],vi=ti.Da;dr%2===0&&dr!==nt-1?cn=Math.max(cn,(x?vi.width:vi.height)+a.computeBusNodeSpacing(ti)-Xt):dr%2!==0&&(br=Math.max(br,(x?vi.width:vi.height)+a.computeBusNodeSpacing(ti)-Xt))}else nt===1&&(cn=x?E[0].Da.width:E[0].Da.height);if(st)switch(pt){case hh:case ou:De=135>b?cx(a,y,E,cn,Fe,De):fx(a,y,E,cn,Fe,De),cn=De.x,Fe=De.width,De=De.height;break;case ch:for(Gt=0;Gt<nt;Gt++)ie=E[Gt],_e=ie.Da,br=Bn===0?0:Me,x?(ie.S.h(et-_e.width,Ln+br),Fe=Math.max(Fe,_e.width),De=Math.max(De,Ln+br+_e.height),Ln+=br+_e.height):(ie.S.h(Ze+br,et-_e.height),Fe=Math.max(Fe,Ze+br+_e.width),De=Math.max(De,_e.height),Ze+=br+_e.width),Bn++;break;case Cu:for(et=0;et<nt;et++)Gt=E[et],ie=Gt.Da,_e=Bn===0?0:Me,x?(Gt.S.h(Xt/2+y.focus.x,Ln+_e),Fe=Math.max(Fe,ie.width),De=Math.max(De,Ln+_e+ie.height),Ln+=_e+ie.height):(Gt.S.h(Ze+_e,Xt/2+y.focus.y),Fe=Math.max(Fe,Ze+_e+ie.width),De=Math.max(De,ie.height),Ze+=_e+ie.width),Bn++}else for(br=0;br<nt;br++)dr=E[br],ti=dr.Da,x?(0<Gt&&0<Bn&&Ze+Xt+ti.width>Gt&&(Ze<et&&zc(y,pt,et-Ze,0,wn,br-1),_n++,Bn=0,wn=br,_e=De,Ze=0,Ln=135<b?-De-Me:De+Me),vi=Bn===0?ie:Xt,Nv(a,dr,0,Ln),dr.S.h(Ze+vi,Ln),Fe=Math.max(Fe,Ze+vi+ti.width),De=Math.max(De,_e+(_n===0?0:Me)+ti.height),Ze+=vi+ti.width):(0<Gt&&0<Bn&&Ln+Xt+ti.height>Gt&&(Ln<et&&zc(y,pt,0,et-Ln,wn,br-1),_n++,Bn=0,wn=br,_e=Fe,Ln=0,Ze=135<b?-Fe-Me:Fe+Me),vi=Bn===0?ie:Xt,Nv(a,dr,Ze,0),dr.S.h(Ze,Ln+vi),De=Math.max(De,Ln+vi+ti.height),Fe=Math.max(Fe,_e+(_n===0?0:Me)+ti.width),Ln+=vi+ti.height),Bn++;switch(0<_n&&(x?(De+=Math.max(0,ht),Ze<Fe&&zc(y,pt,Fe-Ze,0,wn,nt-1),0<xe&&(Mt||Nf(y,xe,0,0,nt-1),Fe+=xe)):(Fe+=Math.max(0,ht),Ln<De&&zc(y,pt,0,De-Ln,wn,nt-1),0<xe&&(Mt||Nf(y,0,xe,0,nt-1),De+=xe))),xe=Mt=0,pt){case Wd:x?Mt+=Fe/2-y.focus.x-Qt/2:xe+=De/2-y.focus.y-Qt/2;break;case Of:0<_n?x?Mt+=Fe/2-y.focus.x-Qt/2:xe+=De/2-y.focus.y-Qt/2:x?(a=E[0].S.x+E[0].la.x,Mt+=a+(E[nt-1].S.x+E[nt-1].la.x+2*E[nt-1].focus.x-a)/2-y.focus.x-Qt/2):(a=E[0].S.y+E[0].la.y,xe+=a+(E[nt-1].S.y+E[nt-1].la.y+2*E[nt-1].focus.y-a)/2-y.focus.y-Qt/2);break;case ru:x?(Mt-=Qt,Fe+=Qt):(xe-=Qt,De+=Qt);break;case iu:x?(Mt+=Fe-y.width+Qt,Fe+=Qt):(xe+=De-y.height+Qt,De+=Qt);break;case hh:case ou:x?1<nt?Mt+=cn+Xt/2-y.focus.x:Mt+=E[0].focus.x-y.focus.x+E[0].la.x:1<nt?xe+=cn+Xt/2-y.focus.y:xe+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ch:x?Mt+=Fe+Xt/2-y.focus.x:xe+=De+Xt/2-y.focus.y;break;case Cu:break;default:a=a.customAlignment(y,Mt,xe,Fe,De),Mt=a[0],xe=a[1],Fe=a[2],De=a[3]}for(a=0;a<nt;a++)Qt=E[a],x?Qt.S.h(Qt.S.x+Qt.la.x-Mt,Qt.S.y+(135<b?(st?-De:-Qt.Da.height)+Qt.la.y-ht:Ne+ht+Qt.la.y)):Qt.S.h(Qt.S.x+(135<b?(st?-Fe:-Qt.Da.width)+Qt.la.x-ht:St+ht+Qt.la.x),Qt.S.y+Qt.la.y-xe);x?(Fe=Ay(y,Fe,Mt),0>Mt&&(Mt=0),135<b&&(xe+=De+ht),De=Math.max(Math.max(De,Ne),De+Ne+ht)):(135<b&&(Mt+=Fe+ht),Fe=Math.max(Math.max(Fe,St),Fe+St+ht),De=Ny(y,De,xe),0>xe&&(xe=0)),y.la.h(Mt,xe),y.Da.h(Fe,De)}}Ir.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,et){var nt=x.length;if(nt===0)return new on(b,0,E,et);if(nt===1)return y=x[0],E=y.Da.width,et=y.Da.height,new on(b,0,E,et);for(var st=y.nodeSpacing,ht=y.rowSpacing,pt=hl(y)===90,St=0,Mt=0,Gt=0,Xt=0;Xt<nt;Xt++)if(!(Xt%2!==0||1<nt&&Xt===nt-1)){var Qt=x[Xt],ie=Qt.Da,Me=St===0?0:ht;if(pt){var xe=a.computeBusNodeSpacing(Qt)-st;Qt.S.h(b-(ie.width+xe),Gt+Me),E=Math.max(E,ie.width+xe),et=Math.max(et,Gt+Me+ie.height),Gt+=Me+ie.height}else xe=a.computeBusNodeSpacing(Qt)-st,Qt.S.h(Mt+Me,b-(ie.height+xe)),et=Math.max(et,ie.height+xe),E=Math.max(E,Mt+Me+ie.width),Mt+=Me+ie.width;St++}for(St=0,Qt=Mt,Xt=Gt,pt?(Mt=b+st,Gt=0):(Mt=0,Gt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Me=x[ie],xe=Me.Da;var Ne=St===0?0:ht;if(pt){var Fe=a.computeBusNodeSpacing(Me)-st;Me.S.h(Mt+Fe,Gt+Ne),E=Math.max(E,Mt+xe.width+Fe),et=Math.max(et,Gt+Ne+xe.height),Gt+=Ne+xe.height}else Fe=a.computeBusNodeSpacing(Me)-st,Me.S.h(Mt+Ne,Gt+Fe),E=Math.max(E,Mt+Ne+xe.width),et=Math.max(et,Gt+xe.height+Fe),Mt+=Ne+xe.width;St++}return 1<nt&&nt%2===1&&(x=x[nt-1],nt=x.Da,a=a.computeBusLastRowSpacing(x,pt?Math.max(Math.abs(Xt),Math.abs(Gt)):Math.max(Math.abs(Qt),Math.abs(Mt))),pt?(x.S.h(b+st/2-x.focus.x-x.la.x,et+a),pt=b+st/2-x.focus.x-x.la.x,E=Math.max(E,pt+nt.width),0>pt&&(E-=pt),et=Math.max(et,Math.max(Xt,Gt)+a+nt.height),0>x.S.x&&(b=Av(y,x.S.x,!1,b,st))):(x.S.h(E+a,b+st/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Qt,Mt)+a+nt.width),Gt=b+st/2-x.focus.y-x.la.y,et=Math.max(et,Gt+nt.height),0>Gt&&(et-=Gt),0>x.S.y&&(b=Av(y,x.S.y,!0,b,st)))),new on(b,0,E,et)}function fx(a,y,x,b,E,et){var nt=x.length;if(nt===0)return new on(b,0,E,et);if(nt===1)return x=x[0],E=x.Da.width,et=x.Da.height,new on(b,0,E,et);for(var st=y.nodeSpacing,ht=y.rowSpacing,pt=hl(y)===270,St=0,Mt=0,Gt=0,Xt=0;Xt<nt;Xt++)if(!(Xt%2!==0||1<nt&&Xt===nt-1)){var Qt=x[Xt],ie=Qt.Da,Me=St===0?0:ht;if(pt){var xe=a.computeBusNodeSpacing(Qt)-st;Gt-=Me+ie.height,Qt.S.h(b-(ie.width+xe),Gt),E=Math.max(E,ie.width+xe),et=Math.max(et,Math.abs(Gt))}else xe=a.computeBusNodeSpacing(Qt)-st,Mt-=Me+ie.width,Qt.S.h(Mt,b-(ie.height+xe)),et=Math.max(et,ie.height+xe),E=Math.max(E,Math.abs(Mt));St++}for(St=0,Qt=Mt,Xt=Gt,pt?(Mt=b+st,Gt=0):(Mt=0,Gt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Me=x[ie],xe=Me.Da;var Ne=St===0?0:ht;if(pt){var Fe=a.computeBusNodeSpacing(Me)-st;Gt-=Ne+xe.height,Me.S.h(Mt+Fe,Gt),E=Math.max(E,Mt+xe.width+Fe),et=Math.max(et,Math.abs(Gt))}else Fe=a.computeBusNodeSpacing(Me)-st,Mt-=Ne+xe.width,Me.S.h(Mt,Gt+Fe),et=Math.max(et,Gt+xe.height+Fe),E=Math.max(E,Math.abs(Mt));St++}for(1<nt&&nt%2===1&&(ht=x[nt-1],St=ht.Da,a=a.computeBusLastRowSpacing(ht,pt?Math.max(Math.abs(Xt),Math.abs(Gt)):Math.max(Math.abs(Qt),Math.abs(Mt))),pt?(ht.S.h(b+st/2-ht.focus.x-ht.la.x,-et-St.height-a),Mt=b+st/2-ht.focus.x-ht.la.x,E=Math.max(E,Mt+St.width),0>Mt&&(E-=Mt),et=Math.max(et,Math.abs(Math.min(Xt,Gt))+a+St.height),0>ht.S.x&&(b=Av(y,ht.S.x,!1,b,st))):(ht.S.h(-E-St.width-a,b+st/2-ht.focus.y-ht.la.y),E=Math.max(E,Math.abs(Math.min(Qt,Mt))+a+St.width),Gt=b+st/2-ht.focus.y-ht.la.y,et=Math.max(et,Gt+St.height),0>Gt&&(et-=Gt),0>ht.S.y&&(b=Av(y,ht.S.y,!0,b,st)))),y=0;y<nt;y++)st=x[y],pt?st.S.h(st.S.x,st.S.y+et):st.S.h(st.S.x+E,st.S.y);return new on(b,0,E,et)}Ir.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ir.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Av(a,y,x,b,E){a=a.children;for(var et=a.length,nt=0;nt<et;nt++)x?a[nt].S.h(a[nt].S.x,a[nt].S.y-y):a[nt].S.h(a[nt].S.x-y,a[nt].S.y);return y=a[et-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ay(a,y,x){switch(a.alignment){case Of:case Wd:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ru:return a.width>y?a.width:y;case iu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case hh:case ou:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ch:return a.width-a.focus.x+a.nodeSpacing/2+y;case Cu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case Of:case Wd:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ru:return a.height>y?a.height:y;case iu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case hh:case ou:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ch:return a.height-a.focus.y+a.nodeSpacing/2+y;case Cu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Wd:y/=2,x/=2;break;case Of:y/=2,x/=2;break;case ru:x=y=0;break;case iu:break;default:je("Unhandled alignment value "+a.toString())}return new Le(y,x)}function zc(a,y,x,b,E,et){y=jy(y,x,b),Nf(a,y.x,y.y,E,et)}function Nf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var et=a[b].S;et.x+=y,et.y+=x}}function Nv(a,y,x,b){var E=y.parent;switch(a.ud){case nu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case jf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:je("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,et,nt,st){var ht=hl(y),pt=ht===90||ht===270,St=y.nodeSpacing;y=b;var Mt=E;b=et;var Gt=nt,Xt=x.Yo,Qt=x.kp;nt=x.Da;var ie=pt?Math.max(Gt,nt.height):Math.max(b,nt.width);if((Xt===null||ht!==hl(x))&&(Xt=Ha(a,2),Qt=Ha(a,2),pt?(Xt[0].h(0,0),Xt[1].h(0,nt.height),Qt[0].h(nt.width,0),Qt[1].h(Qt[0].x,Xt[1].y)):(Xt[0].h(0,0),Xt[1].h(nt.width,0),Qt[0].h(0,nt.height),Qt[1].h(Xt[1].x,Qt[0].y))),pt){if(Gt=9999999,!(Mt===null||2>Mt.length||Xt===null||2>Xt.length))for(E=x=0;x<Mt.length&&E<Xt.length;){et=Mt[x];var Me=Xt[E];ht=Me.x,pt=Me.y,ht+=b;var xe=et;x+1<Mt.length&&(xe=Mt[x+1]);var Ne=Me;Me=Ne.x,Ne=Ne.y,E+1<Xt.length&&(Ne=Xt[E+1],Me=Ne.x,Ne=Ne.y,Me+=b);var Fe=Gt;et.y===pt?Fe=ht-et.x:et.y>pt&&et.y<Ne?Fe=ht+(et.y-pt)/(Ne-pt)*(Me-ht)-et.x:pt>et.y&&pt<xe.y&&(Fe=ht-(et.x+(pt-et.y)/(xe.y-et.y)*(xe.x-et.x))),Fe<Gt&&(Gt=Fe),xe.y<=et.y?x++:Ne<=pt?E++:(xe.y<=Ne&&x++,Ne<=xe.y&&E++)}if(Gt=b-Gt,Gt+=St,x=Xt,E=Gt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(St=Ha(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].y<y[0].y;)pt=x[et++],St[b++].h(pt.x+E,pt.y);for(;ht<y.length;)pt=y[ht++],St[b++].h(pt.x,pt.y);for(ht=y[y.length-1].y;et<x.length&&x[et].y<=ht;)et++;for(;et<x.length&&x[et].y>ht;)pt=x[et++],St[b++].h(pt.x+E,pt.y);for(x=Ha(a,b),ht=0;ht<b;ht++)x[ht].assign(St[ht]);wl(a,St),b=x}if(et=Qt,ht=Gt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(St=Ha(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].y<et[0].y;)xe=Mt[x++],St[E++].h(xe.x,xe.y);for(;pt<et.length;)xe=et[pt++],St[E++].h(xe.x+ht,xe.y);for(et=et[et.length-1].y;x<Mt.length&&Mt[x].y<=et;)x++;for(;x<Mt.length&&Mt[x].y>et;)ht=Mt[x++],St[E++].h(ht.x,ht.y);for(et=Ha(a,E),x=0;x<E;x++)et[x].assign(St[x]);wl(a,St),E=et}return et=Math.max(0,Gt)+nt.width,nt=ie,wl(a,y),wl(a,Xt),wl(a,Mt),wl(a,Qt),st[0]=b,st[1]=E,new on(Gt,0,et,nt)}if(b=9999999,!(Mt===null||2>Mt.length||Xt===null||2>Xt.length))for(E=x=0;x<Mt.length&&E<Xt.length;)et=Mt[x],Me=Xt[E],ht=Me.x,pt=Me.y,pt+=Gt,xe=et,x+1<Mt.length&&(xe=Mt[x+1]),Ne=Me,Me=Ne.x,Ne=Ne.y,E+1<Xt.length&&(Ne=Xt[E+1],Me=Ne.x,Ne=Ne.y,Ne+=Gt),Fe=b,et.x===ht?Fe=pt-et.y:et.x>ht&&et.x<Me?Fe=pt+(et.x-ht)/(Me-ht)*(Ne-pt)-et.y:ht>et.x&&ht<xe.x&&(Fe=pt-(et.y+(ht-et.x)/(xe.x-et.x)*(xe.y-et.y))),Fe<b&&(b=Fe),xe.x<=et.x?x++:Me<=ht?E++:(xe.x<=Me&&x++,Me<=xe.x&&E++);if(Gt-=b,Gt+=St,x=Xt,E=Gt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(St=Ha(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].x<y[0].x;)pt=x[et++],St[b++].h(pt.x,pt.y+E);for(;ht<y.length;)pt=y[ht++],St[b++].h(pt.x,pt.y);for(ht=y[y.length-1].x;et<x.length&&x[et].x<=ht;)et++;for(;et<x.length&&x[et].x>ht;)pt=x[et++],St[b++].h(pt.x,pt.y+E);for(x=Ha(a,b),ht=0;ht<b;ht++)x[ht].assign(St[ht]);wl(a,St),b=x}if(et=Qt,ht=Gt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(St=Ha(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].x<et[0].x;)xe=Mt[x++],St[E++].h(xe.x,xe.y);for(;pt<et.length;)xe=et[pt++],St[E++].h(xe.x,xe.y+ht);for(et=et[et.length-1].x;x<Mt.length&&Mt[x].x<=et;)x++;for(;x<Mt.length&&Mt[x].x>et;)ht=Mt[x++],St[E++].h(ht.x,ht.y);for(et=Ha(a,E),x=0;x<E;x++)et[x].assign(St[x]);wl(a,St),E=et}return et=ie,nt=Math.max(0,Gt)+nt.height,wl(a,y),wl(a,Xt),wl(a,Mt),wl(a,Qt),st[0]=b,st[1]=E,new on(Gt,0,et,nt)}function Ha(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 Le;return a}function wl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Ir.prototype.arrangeTrees=function(){if(this.Rb===Iv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Ks){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 Ks&&a.push(x);switch(this.sorting){case Ud:break;case Pg:a.reverse();break;case Cg:a.sort(this.comparer);break;case kg:a.sort(this.comparer),a.reverse();break;default:je("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:je("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,et=0;et<E;et++){var nt=y[et];Oy(a,nt,x+nt.S.x,b+nt.S.y)}}}Ir.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ir.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ir.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 et=y[E.level];et===void 0?et=this.computeLayerSpacing(E):et=Math.max(et,this.computeLayerSpacing(E)),y[E.level]=et}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 Le(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Le(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,et=0,this.angle===180||this.angle===270)for(var nt=0;nt<a.length;nt++)et+=a[nt]+y[nt];for(nt=0;nt<a.length;nt++){var st=a[nt]+y[nt];this.angle===270?(et-=st,E.push(new on(0,et,x,st))):this.angle===90?(E.push(new on(0,et,x,st)),et+=st):this.angle===180?(et-=st,E.push(new on(et,0,st,x))):(E.push(new on(et,0,st,x)),et+=st)}this.commitLayers(E,b)}},Ir.prototype.commitLayers=function(){},Ir.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ir.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Ks&&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])}}Ir.prototype.setPortSpots=function(a){var y=a.alignment;if($h(y)){var x=this.ud===nu,b=hl(a);switch(b){case 0:var E=Yo;break;case 90:E=oa;break;case 180:E=Na;break;default:E=da}var et=a.children,nt=et.length;switch(y){case hh:case ou:for(y=0;y<nt;y++){var st=et[y];if(st=(x?st.sourceEdges:st.destinationEdges).first(),st!==null&&(st=st.link,st!==null)){var ht=b===90||b===270?Na:da;if(nt===1||y===nt-1&&nt%2===1)switch(b){case 0:ht=Na;break;case 90:ht=da;break;case 180:ht=Yo;break;default:ht=oa}else y%2===0&&(ht=b===90||b===270?Yo:oa);x?(a.setsPortSpot&&(st.fromSpot=E),a.setsChildPortSpot&&(st.toSpot=ht)):(a.setsPortSpot&&(st.fromSpot=ht),a.setsChildPortSpot&&(st.toSpot=E))}}break;case ch:for(b=b===90||b===270?Yo:oa,et=x?a.destinationEdges:a.sourceEdges;et.next();)nt=et.value.link,nt!==null&&(x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=b)):(a.setsPortSpot&&(nt.fromSpot=b),a.setsChildPortSpot&&(nt.toSpot=E)));break;case Cu:for(b=b===90||b===270?Na:da,et=x?a.destinationEdges:a.sourceEdges;et.next();)nt=et.value.link,nt!==null&&(x?(a.setsPortSpot&&(nt.fromSpot=E),a.setsChildPortSpot&&(nt.toSpot=b)):(a.setsPortSpot&&(nt.fromSpot=b),a.setsChildPortSpot&&(nt.toSpot=E)))}}else if(x=hl(a),this.ud===nu){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=Yo;break;case 90:b.fromSpot=oa;break;case 180:b.fromSpot=Na;break;default:b.fromSpot=da}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Na;break;case 90:b.toSpot=da;break;case 180:b.toSpot=Yo;break;default:b.toSpot=oa}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=Yo;break;case 90:b.toSpot=oa;break;case 180:b.toSpot=Na;break;default:b.toSpot=da}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Na;break;case 90:b.fromSpot=da;break;case 180:b.fromSpot=Yo;break;default:b.fromSpot=oa}else b.fromSpot=a.childPortSpot}};function hl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ir.prototype.computeLayerSpacing=function(a){var y=hl(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},Ir.prototype.computeNodeIndent=function(a){var y=hl(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)},hn.Object.defineProperties(Ir.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!==Ud&&a!==Pg&&a!==Cg&&!kg||(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()):je("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!==Eg||(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!==Ud&&a!==Pg&&a!==Cg&&!kg||(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!==Eg||(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 Je(Ir,"PathDefault",-1),nu=new Je(Ir,"PathDestination",0),jf=new Je(Ir,"PathSource",1),Ud=new Je(Ir,"SortingForwards",10),Pg=new Je(Ir,"SortingReverse",11),Cg=new Je(Ir,"SortingAscending",12),kg=new Je(Ir,"SortingDescending",13),Wd=new Je(Ir,"AlignmentCenterSubtrees",20),Of=new Je(Ir,"AlignmentCenterChildren",21),ru=new Je(Ir,"AlignmentStart",22),iu=new Je(Ir,"AlignmentEnd",23),hh=new Je(Ir,"AlignmentBus",24),ou=new Je(Ir,"AlignmentBusBranching",25),ch=new Je(Ir,"AlignmentTopLeftBus",26),Cu=new Je(Ir,"AlignmentBottomRightBus",27),Fv=new Je(Ir,"CompactionNone",30),Eg=new Je(Ir,"CompactionBlock",31),Dv=new Je(Ir,"StyleLayered",40),Fy=new Je(Ir,"StyleLastParents",41),Dy=new Je(Ir,"StyleAlternating",42),By=new Je(Ir,"StyleRootOnly",43),Bv=new Je(Ir,"ArrangementVertical",50),Iy=new Je(Ir,"ArrangementHorizontal",51),Iv=new Je(Ir,"ArrangementFixedRoots",52),Ry=new Je(Ir,"LayerIndividual",60),_y=new Je(Ir,"LayerSiblings",61),Rv=new Je(Ir,"LayerUniform",62);Ir.className="TreeLayout",Ir.PathDefault=Ov,Ir.PathDestination=nu,Ir.PathSource=jf,Ir.SortingForwards=Ud,Ir.SortingReverse=Pg,Ir.SortingAscending=Cg,Ir.SortingDescending=kg,Ir.AlignmentCenterSubtrees=Wd,Ir.AlignmentCenterChildren=Of,Ir.AlignmentStart=ru,Ir.AlignmentEnd=iu,Ir.AlignmentBus=hh,Ir.AlignmentBusBranching=ou,Ir.AlignmentTopLeftBus=ch,Ir.AlignmentBottomRightBus=Cu,Ir.CompactionNone=Fv,Ir.CompactionBlock=Eg,Ir.StyleLayered=Dv,Ir.StyleLastParents=Fy,Ir.StyleAlternating=Dy,Ir.StyleRootOnly=By,Ir.ArrangementVertical=Bv,Ir.ArrangementHorizontal=Iy,Ir.ArrangementFixedRoots=Iv,Ir.LayerIndividual=Ry,Ir.LayerSiblings=_y,Ir.LayerUniform=Rv;function Ff(a){Si.call(this,a)}Ye(Ff,Si),Ff.prototype.createVertex=function(){return new Ks(this)},Ff.prototype.createEdge=function(){return new Hd(this)},Ff.className="TreeNetwork";function Ks(a){So.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 Le(0,0),this.Da=new kn(0,0),this.la=new Le(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ud,this.hd=oy,this.Kb=0,this.Jb=Of,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Eg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=jo,this.wr=!0,this.Dp=jo}Ye(Ks,So),Ks.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)},hn.Object.defineProperties(Ks.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)}}}),Ks.className="TreeVertex";function Hd(a){rs.call(this,a),this.$t=new Le(0,0)}Ye(Hd,rs),Hd.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 nu:x=this.fromVertex,b=this.toVertex;break;case jf:x=this.toVertex,b=this.fromVertex;break;default:je("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 et=hl(x),nt=y.computeLayerSpacing(x),st=x.rowSpacing;a.vg();var ht=a.curve===vs,pt=a.isOrthogonal,St;if(a.uh(),pt||ht){for(St=2;4<a.pointsCount;)a.pv(2);var Mt=a.i(1),Gt=a.i(2)}else{for(St=1;3<a.pointsCount;)a.pv(1);Mt=a.i(0),Gt=a.i(a.pointsCount-1)}var Xt=a.i(a.pointsCount-1);et===0?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Xt.y+x.rowIndent&&(et=Math.min(et,Math.max(Mt.y,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.top+E.y,E.y===0&&Mt.y<Xt.y-x.rowIndent&&(et=Math.max(et,Math.min(Mt.y,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ht?(a.m(St,Mt.x,et),St++,a.m(St,b.right+nt,et),St++,a.m(St,b.right+nt+(E.x-st)/3,et),St++,a.m(St,b.right+nt+2*(E.x-st)/3,et),St++,a.m(St,b.right+nt+(E.x-st),et),St++,a.m(St,Gt.x,et)):(pt&&(a.m(St,b.right+nt/2,Mt.y),St++),a.m(St,b.right+nt/2,et),St++,a.m(St,b.right+nt+E.x-(pt?st/2:st),et),St++,pt&&a.m(St,a.i(St-1).x,Gt.y))):et===90?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Xt.x+x.rowIndent&&(et=Math.min(et,Math.max(Mt.x,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.left+E.x,E.x===0&&Mt.x<Xt.x-x.rowIndent&&(et=Math.max(et,Math.min(Mt.x,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ht?(a.m(St,et,Mt.y),St++,a.m(St,et,b.bottom+nt),St++,a.m(St,et,b.bottom+nt+(E.y-st)/3),St++,a.m(St,et,b.bottom+nt+2*(E.y-st)/3),St++,a.m(St,et,b.bottom+nt+(E.y-st)),St++,a.m(St,et,Gt.y)):(pt&&(a.m(St,Mt.x,b.bottom+nt/2),St++),a.m(St,et,b.bottom+nt/2),St++,a.m(St,et,b.bottom+nt+E.y-(pt?st/2:st)),St++,pt&&a.m(St,Gt.x,a.i(St-1).y))):et===180?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Xt.y+x.rowIndent&&(et=Math.min(et,Math.max(Mt.y,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.top+E.y,E.y===0&&Mt.y<Xt.y-x.rowIndent&&(et=Math.max(et,Math.min(Mt.y,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,ht?(a.m(St,Mt.x,et),St++,a.m(St,b.left-nt,et),St++,a.m(St,b.left-nt+(E.x+st)/3,et),St++,a.m(St,b.left-nt+2*(E.x+st)/3,et),St++,a.m(St,b.left-nt+(E.x+st),et),St++,a.m(St,Gt.x,et)):(pt&&(a.m(St,b.left-nt/2,Mt.y),St++),a.m(St,b.left-nt/2,et),St++,a.m(St,b.left-nt+E.x+(pt?st/2:st),et),St++,pt&&a.m(St,a.i(St-1).x,Gt.y))):et===270?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Xt.x+x.rowIndent&&(et=Math.min(et,Math.max(Mt.x,et-y.computeNodeIndent(x))))):x.alignment===ru?(et=b.left+E.x,E.x===0&&Mt.x<Xt.x-x.rowIndent&&(et=Math.max(et,Math.min(Mt.x,et+y.computeNodeIndent(x))))):et=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,ht?(a.m(St,et,Mt.y),St++,a.m(St,et,b.top-nt),St++,a.m(St,et,b.top-nt+(E.y+st)/3),St++,a.m(St,et,b.top-nt+2*(E.y+st)/3),St++,a.m(St,et,b.top-nt+(E.y+st)),St++,a.m(St,et,Gt.y)):(pt&&(a.m(St,Mt.x,b.top-nt/2),St++),a.m(St,et,b.top-nt/2),St++,a.m(St,et,b.top-nt+E.y+(pt?st/2:st)),St++,pt&&a.m(St,Gt.x,a.i(St-1).y))):je("Invalid angle "+et),a.zf()}else E=b,a=this.link,b=this.network.layout,y=hl(x),y!==hl(E)&&(nt=b.computeLayerSpacing(x),st=x.bounds,x=E.bounds,y===0&&x.left-st.right<nt+1||y===90&&x.top-st.bottom<nt+1||y===180&&st.left-x.right<nt+1||y===270&&st.top-x.bottom<nt+1||(a.vg(),x=a.curve===vs,E=a.isOrthogonal,b=$h(this.fromVertex.alignment),a.uh(),y===0?(y=st.right+nt/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=st.bottom+nt/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=st.left-nt/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=st.top-nt/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()))}}},hn.Object.defineProperties(Hd.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)}}}),Hd.className="TreeEdge",Fi.prototype.initializeStandardTools=function(){this.gb("Action",new _s,this.mouseDownTools),this.gb("Relinking",new fs,this.mouseDownTools),this.gb("LinkReshaping",new qi,this.mouseDownTools),this.gb("Rotating",new va,this.mouseDownTools),this.gb("Resizing",new Qo,this.mouseDownTools),this.gb("Linking",new ma,this.mouseMoveTools),this.gb("Dragging",new _i,this.mouseMoveTools),this.gb("DragSelecting",new ks,this.mouseMoveTools),this.gb("Panning",new Ho,this.mouseMoveTools),this.gb("ContextMenu",new ya,this.mouseUpTools),this.gb("TextEditing",new Ei,this.mouseUpTools),this.gb("ClickCreating",new Vu,this.mouseUpTools),this.gb("ClickSelecting",new kh,this.mouseUpTools)},Dl("Horizontal",new dm),Dl("Spot",new gm),Dl("Table",new vm),Dl("Viewbox",new xm),Dl("TableRow",new ym),Dl("TableColumn",new Sm),Dl("Graduated",new Up),Dl("Grid",new Gp),dd.add("GraphLinksModel",To),dd.add("TreeModel",Os);var _v=an.go,zy={get licenseKey(){return Xe.licenseKey},set licenseKey(a){Xe.licenseKey=a},get version(){return Xe.version},Group:Pr,EnumValue:Je,List:yn,Set:vn,Map:Yn,Point:Le,Size:kn,Rect:on,Margin:Dr,Spot:er,Geometry:Pn,PathFigure:wo,PathSegment:Qr,InputEvent:aa,DiagramEvent:Bu,ChangedEvent:Ii,Model:Hn,GraphLinksModel:Wr,TreeModel:Ea,Binding:eo,Transaction:Mo,UndoManager:Ri,CommandHandler:Ee,Tool:Zr,DraggingTool:_i,DraggingInfo:yu,DraggingOptions:ct,LinkingBaseTool:Xi,LinkingTool:ma,RelinkingTool:fs,LinkReshapingTool:qi,ResizingTool:Qo,RotatingTool:va,ClickSelectingTool:kh,ActionTool:_s,ClickCreatingTool:Vu,HTMLInfo:Al,ContextMenuTool:ya,DragSelectingTool:ks,PanningTool:Ho,TextEditingTool:Ei,ToolManager:Fi,Animation:Vo,AnimationManager:ts,AnimationTrigger:nl,Layer:Oo,Diagram:Xe,Palette:Et,Overview:Ot,Brush:si,GraphObject:ze,Panel:Sn,RowColumnDefinition:co,Shape:Tr,TextBlock:yi,Picture:Ia,Part:qn,Adornment:Xr,Node:Nn,Link:Cn,Placeholder:ba,Layout:ji,LayoutNetwork:Si,LayoutVertex:So,LayoutEdge:rs,GridLayout:_o,PanelLayout:yo,CircularLayout:zi,CircularNetwork:_d,CircularVertex:mg,CircularEdge:Sv,ForceDirectedLayout:Zo,ForceDirectedNetwork:Af,ForceDirectedVertex:vg,ForceDirectedEdge:yg,LayeredDigraphLayout:ui,LayeredDigraphNetwork:Gd,LayeredDigraphVertex:Ds,LayeredDigraphEdge:wg,TreeLayout:Ir,TreeNetwork:Ff,TreeVertex:Ks,TreeEdge:Hd};typeof _v=="object"&&_v.version&&En("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),Xe.prototype.go=zy,an.go=zy,typeof pn.exports=="object"&&(pn.exports=typeof ue.g!="undefined"?ue.g.go:self.go)}();var ae=typeof ue.g!="undefined"?ue.g.go:self.go;const Re=typeof ue.g!="undefined"?ue.g.go:self.go,ot=Re.Group,zt=Re.EnumValue,Bt=Re.List,vt=Re.Set,gt=Re.Map,kt=Re.Point,Ct=Re.Size,yt=Re.Rect,Tt=Re.Margin,mt=Re.Spot,xt=Re.Geometry,ft=Re.PathFigure,z=Re.PathSegment,tt=Re.InputEvent,at=Re.DiagramEvent,it=Re.ChangedEvent,lt=Re.Model,ut=Re.GraphLinksModel,dt=Re.TreeModel,bt=Re.Binding,At=Re.Transaction,Dt=Re.UndoManager,Ft=Re.CommandHandler,jt=Re.Tool,Nt=Re.DraggingTool,_t=Re.DraggingInfo,Wt=Re.LinkingBaseTool,Jt=Re.LinkingTool,Ut=Re.RelinkingTool,Vt=Re.LinkReshapingTool,oe=Re.ResizingTool,se=Re.RotatingTool,he=Re.ClickSelectingTool,be=Re.ActionTool,Yt=Re.ClickCreatingTool,ne=Re.HTMLInfo,ve=Re.ContextMenuTool,Se=Re.DragSelectingTool,we=Re.PanningTool,ce=Re.TextEditingTool,de=Re.ToolManager,le=Re.Animation,Ce=Re.AnimationManager,fe=Re.AnimationTrigger,me=Re.Layer,ke=Re.Diagram,pe=Re.Palette,qt=Re.Overview,Kt=Re.Brush,wt=Re.GraphObject,Lt=Re.Panel,Zt=Re.RowColumnDefinition,ee=Re.Shape,It=Re.TextBlock,Rt=Re.TextBlockMetrics,Ht=Re.Picture,re=Re.Part,ye=Re.Adornment,Pe=Re.Node,Ae=Re.Link,Oe=Re.Placeholder,Ie=Re.Layout,Qe=Re.LayoutNetwork,qe=Re.LayoutVertex,nn=Re.LayoutEdge,Ke=Re.GridLayout,Ue=Re.PanelLayout,We=Re.CircularLayout,He=Re.CircularNetwork,rn=Re.CircularVertex,ln=Re.CircularEdge,un=Re.ForceDirectedLayout,bn=Re.ForceDirectedNetwork,In=Re.ForceDirectedVertex,jn=Re.ForceDirectedEdge,Kn=Re.LayeredDigraphLayout,kr=Re.LayeredDigraphNetwork,pr=Re.LayeredDigraphVertex,Er=Re.LayeredDigraphEdge,Or=Re.TreeLayout,jr=Re.TreeNetwork,yr=Re.TreeVertex,rr=Re.TreeEdge,Rr=Re.version},24334:function(pn,dn,ue){var ae,Re;(function(ot,zt){pn.exports=zt(ot)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ue.g!="undefined"?ue.g:this,function(ot){"use strict";ot=ot||{};var zt=ot.Base64,Bt="2.6.4",vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=function(Ut){for(var Vt={},oe=0,se=Ut.length;oe<se;oe++)Vt[Ut.charAt(oe)]=oe;return Vt}(vt),kt=String.fromCharCode,Ct=function(Ut){if(Ut.length<2){var Vt=Ut.charCodeAt(0);return Vt<128?Ut:Vt<2048?kt(192|Vt>>>6)+kt(128|Vt&63):kt(224|Vt>>>12&15)+kt(128|Vt>>>6&63)+kt(128|Vt&63)}else{var Vt=65536+(Ut.charCodeAt(0)-55296)*1024+(Ut.charCodeAt(1)-56320);return kt(240|Vt>>>18&7)+kt(128|Vt>>>12&63)+kt(128|Vt>>>6&63)+kt(128|Vt&63)}},yt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tt=function(Ut){return Ut.replace(yt,Ct)},mt=function(Ut){var Vt=[0,2,1][Ut.length%3],oe=Ut.charCodeAt(0)<<16|(Ut.length>1?Ut.charCodeAt(1):0)<<8|(Ut.length>2?Ut.charCodeAt(2):0),se=[vt.charAt(oe>>>18),vt.charAt(oe>>>12&63),Vt>=2?"=":vt.charAt(oe>>>6&63),Vt>=1?"=":vt.charAt(oe&63)];return se.join("")},xt=ot.btoa&&typeof ot.btoa=="function"?function(Ut){return ot.btoa(Ut)}:function(Ut){if(Ut.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ut.replace(/[\s\S]{1,3}/g,mt)},ft=function(Ut){return xt(Tt(String(Ut)))},z=function(Ut){return Ut.replace(/[+\/]/g,function(Vt){return Vt=="+"?"-":"_"}).replace(/=/g,"")},tt=function(Ut,Vt){return Vt?z(ft(Ut)):ft(Ut)},at=function(Ut){return tt(Ut,!0)},it;ot.Uint8Array&&(it=function(Ut,Vt){for(var oe="",se=0,he=Ut.length;se<he;se+=3){var be=Ut[se],Yt=Ut[se+1],ne=Ut[se+2],ve=be<<16|Yt<<8|ne;oe+=vt.charAt(ve>>>18)+vt.charAt(ve>>>12&63)+(typeof Yt!="undefined"?vt.charAt(ve>>>6&63):"=")+(typeof ne!="undefined"?vt.charAt(ve&63):"=")}return Vt?z(oe):oe});var lt=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ut=function(Ut){switch(Ut.length){case 4:var Vt=(7&Ut.charCodeAt(0))<<18|(63&Ut.charCodeAt(1))<<12|(63&Ut.charCodeAt(2))<<6|63&Ut.charCodeAt(3),oe=Vt-65536;return kt((oe>>>10)+55296)+kt((oe&1023)+56320);case 3:return kt((15&Ut.charCodeAt(0))<<12|(63&Ut.charCodeAt(1))<<6|63&Ut.charCodeAt(2));default:return kt((31&Ut.charCodeAt(0))<<6|63&Ut.charCodeAt(1))}},dt=function(Ut){return Ut.replace(lt,ut)},bt=function(Ut){var Vt=Ut.length,oe=Vt%4,se=(Vt>0?gt[Ut.charAt(0)]<<18:0)|(Vt>1?gt[Ut.charAt(1)]<<12:0)|(Vt>2?gt[Ut.charAt(2)]<<6:0)|(Vt>3?gt[Ut.charAt(3)]:0),he=[kt(se>>>16),kt(se>>>8&255),kt(se&255)];return he.length-=[0,0,2,1][oe],he.join("")},At=ot.atob&&typeof ot.atob=="function"?function(Ut){return ot.atob(Ut)}:function(Ut){return Ut.replace(/\S{1,4}/g,bt)},Dt=function(Ut){return At(String(Ut).replace(/[^A-Za-z0-9\+\/]/g,""))},Ft=function(Ut){return dt(At(Ut))},jt=function(Ut){return String(Ut).replace(/[-_]/g,function(Vt){return Vt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Nt=function(Ut){return Ft(jt(Ut))},_t;ot.Uint8Array&&(_t=function(Ut){return Uint8Array.from(Dt(jt(Ut)),function(Vt){return Vt.charCodeAt(0)})});var Wt=function(){var Ut=ot.Base64;return ot.Base64=zt,Ut};if(ot.Base64={VERSION:Bt,atob:Dt,btoa:xt,fromBase64:Nt,toBase64:tt,utob:Tt,encode:tt,encodeURI:at,btou:dt,decode:Nt,noConflict:Wt,fromUint8Array:it,toUint8Array:_t},typeof Object.defineProperty=="function"){var Jt=function(Ut){return{value:Ut,enumerable:!1,writable:!0,configurable:!0}};ot.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Jt(function(){return Nt(this)})),Object.defineProperty(String.prototype,"toBase64",Jt(function(Ut){return tt(this,Ut)})),Object.defineProperty(String.prototype,"toBase64URI",Jt(function(){return tt(this,!0)}))}}return ot.Meteor&&(Base64=ot.Base64),pn.exports?pn.exports.Base64=ot.Base64:(ae=[],Re=function(){return ot.Base64}.apply(dn,ae),Re!==void 0&&(pn.exports=Re)),{Base64:ot.Base64}})},2859:function(pn,dn,ue){"use strict";ue.d(dn,{hP:function(){return qt}});var ae=function(Kt,wt){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Lt,Zt){Lt.__proto__=Zt}||function(Lt,Zt){for(var ee in Zt)Object.prototype.hasOwnProperty.call(Zt,ee)&&(Lt[ee]=Zt[ee])})(Kt,wt)};function Re(Kt,wt){function Lt(){this.constructor=Kt}ae(Kt,wt),Kt.prototype=wt===null?Object.create(wt):(Lt.prototype=wt.prototype,new Lt)}function ot(Kt,wt,Lt,Zt){return new(Lt||(Lt=Promise))(function(ee,It){function Rt(ye){try{re(Zt.next(ye))}catch(Pe){It(Pe)}}function Ht(ye){try{re(Zt.throw(ye))}catch(Pe){It(Pe)}}function re(ye){var Pe;ye.done?ee(ye.value):(Pe=ye.value,Pe instanceof Lt?Pe:new Lt(function(Ae){Ae(Pe)})).then(Rt,Ht)}re((Zt=Zt.apply(Kt,wt||[])).next())})}function zt(Kt,wt){var Lt,Zt,ee,It,Rt={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return It={next:Ht(0),throw:Ht(1),return:Ht(2)},typeof Symbol=="function"&&(It[Symbol.iterator]=function(){return this}),It;function Ht(re){return function(ye){return function(Pe){if(Lt)throw new TypeError("Generator is already executing.");for(;Rt;)try{if(Lt=1,Zt&&(ee=2&Pe[0]?Zt.return:Pe[0]?Zt.throw||((ee=Zt.return)&&ee.call(Zt),0):Zt.next)&&!(ee=ee.call(Zt,Pe[1])).done)return ee;switch(Zt=0,ee&&(Pe=[2&Pe[0],ee.value]),Pe[0]){case 0:case 1:ee=Pe;break;case 4:return Rt.label++,{value:Pe[1],done:!1};case 5:Rt.label++,Zt=Pe[1],Pe=[0];continue;case 7:Pe=Rt.ops.pop(),Rt.trys.pop();continue;default:if(ee=Rt.trys,!((ee=ee.length>0&&ee[ee.length-1])||Pe[0]!==6&&Pe[0]!==2)){Rt=0;continue}if(Pe[0]===3&&(!ee||Pe[1]>ee[0]&&Pe[1]<ee[3])){Rt.label=Pe[1];break}if(Pe[0]===6&&Rt.label<ee[1]){Rt.label=ee[1],ee=Pe;break}if(ee&&Rt.label<ee[2]){Rt.label=ee[2],Rt.ops.push(Pe);break}ee[2]&&Rt.ops.pop(),Rt.trys.pop();continue}Pe=wt.call(Kt,Rt)}catch(Ae){Pe=[6,Ae],Zt=0}finally{Lt=ee=0}if(5&Pe[0])throw Pe[1];return{value:Pe[0]?Pe[1]:void 0,done:!0}}([re,ye])}}}function Bt(){for(var Kt=0,wt=0,Lt=arguments.length;wt<Lt;wt++)Kt+=arguments[wt].length;var Zt=Array(Kt),ee=0;for(wt=0;wt<Lt;wt++)for(var It=arguments[wt],Rt=0,Ht=It.length;Rt<Ht;Rt++,ee++)Zt[ee]=It[Rt];return Zt}var vt=function(){function Kt(){}return Kt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Kt.setAttributes=function(wt,Lt){for(var Zt=0,ee=Lt;Zt<ee.length;Zt++){var It=ee[Zt],Rt=It[0],Ht=It[1];wt.setAttribute(Rt,Ht)}},Kt.createRect=function(wt,Lt,Zt){var ee=document.createElementNS("http://www.w3.org/2000/svg","rect");return ee.setAttribute("width",wt.toString()),ee.setAttribute("height",Lt.toString()),Zt&&Kt.setAttributes(ee,Zt),ee},Kt.createLine=function(wt,Lt,Zt,ee,It){var Rt=document.createElementNS("http://www.w3.org/2000/svg","line");return Rt.setAttribute("x1",wt.toString()),Rt.setAttribute("y1",Lt.toString()),Rt.setAttribute("x2",Zt.toString()),Rt.setAttribute("y2",ee.toString()),It&&Kt.setAttributes(Rt,It),Rt},Kt.createPolygon=function(wt,Lt){var Zt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Zt.setAttribute("points",wt),Lt&&Kt.setAttributes(Zt,Lt),Zt},Kt.createCircle=function(wt,Lt){var Zt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Zt.setAttribute("cx",(wt/2).toString()),Zt.setAttribute("cy",(wt/2).toString()),Zt.setAttribute("r",wt.toString()),Lt&&Kt.setAttributes(Zt,Lt),Zt},Kt.createEllipse=function(wt,Lt,Zt){var ee=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ee.setAttribute("cx",(wt/2).toString()),ee.setAttribute("cy",(Lt/2).toString()),ee.setAttribute("rx",(wt/2).toString()),ee.setAttribute("ry",(Lt/2).toString()),Zt&&Kt.setAttributes(ee,Zt),ee},Kt.createGroup=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","g");return wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Kt.createMarker=function(wt,Lt,Zt,ee,It,Rt,Ht){var re=document.createElementNS("http://www.w3.org/2000/svg","marker");return Kt.setAttributes(re,[["id",wt],["orient",Lt],["markerWidth",Zt.toString()],["markerHeight",ee.toString()],["refX",It.toString()],["refY",Rt.toString()]]),re.appendChild(Ht),re},Kt.createText=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","text");return Lt.setAttribute("x","0"),Lt.setAttribute("y","0"),wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createTSpan=function(wt,Lt){var Zt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Zt.textContent=wt,Lt&&Kt.setAttributes(Zt,Lt),Zt},Kt.createImage=function(wt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","image");return wt&&Kt.setAttributes(Lt,wt),Lt},Kt.createPoint=function(wt,Lt){var Zt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Zt.x=wt,Zt.y=Lt,Zt},Kt.createPath=function(wt,Lt){var Zt=document.createElementNS("http://www.w3.org/2000/svg","path");return Zt.setAttribute("d",wt),Lt&&Kt.setAttributes(Zt,Lt),Zt},Kt}(),gt=function(){function Kt(){}return Kt.addKey=function(wt){Kt.key=wt},Object.defineProperty(Kt,"isLicensed",{get:function(){return!!Kt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Kt.key)},enumerable:!1,configurable:!0}),Kt}(),kt=function(){function Kt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Kt.prototype.rasterize=function(wt,Lt,Zt){var ee=this;return new Promise(function(It){var Rt=Zt!==void 0?Zt:document.createElement("canvas");wt===null&&(ee.markersOnly=!0,ee.naturalSize=!1);var Ht=document.createElementNS("http://www.w3.org/2000/svg","svg");Ht.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ht.setAttribute("width",Lt.width.baseVal.valueAsString),Ht.setAttribute("height",Lt.height.baseVal.valueAsString),Ht.setAttribute("viewBox","0 0 "+Lt.viewBox.baseVal.width.toString()+" "+Lt.viewBox.baseVal.height.toString()),Ht.innerHTML=Lt.innerHTML,ee.naturalSize===!0?(Ht.width.baseVal.value=wt.naturalWidth,Ht.height.baseVal.value=wt.naturalHeight):ee.width!==void 0&&ee.height!==void 0&&(Ht.width.baseVal.value=ee.width,Ht.height.baseVal.value=ee.height),Rt.width=Ht.width.baseVal.value,Rt.height=Ht.height.baseVal.value;var re=Ht.outerHTML,ye=Rt.getContext("2d");ee.markersOnly!==!0&&ye.drawImage(wt,0,0,Rt.width,Rt.height);var Pe=window.URL,Ae=new Image(Rt.width,Rt.height);Ae.setAttribute("crossOrigin","anonymous");var Oe=new Blob([re],{type:"image/svg+xml"}),Ie=Pe.createObjectURL(Oe);Ae.onload=function(){ye.drawImage(Ae,0,0),Pe.revokeObjectURL(Ie);var Qe=Rt.toDataURL(ee.imageType,ee.imageQuality);It(Qe)},Ae.src=Ie})},Kt}(),Ct=function(){},yt=function(){function Kt(wt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+wt+"_"}return Object.defineProperty(Kt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.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(Kt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Kt.prototype.addClass=function(wt){return this.styleSheet===void 0&&this.addStyleSheet(),wt.name=""+this.classNamePrefix+wt.localName,this.classes.push(wt),this.styleSheet.sheet.insertRule("."+wt.name+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length),wt},Kt.prototype.addRule=function(wt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(wt),this.styleSheet.sheet.insertRule(wt.selector+" {"+wt.style+"}",this.styleSheet.sheet.cssRules.length)},Kt.prototype.addStyleSheet=function(){var wt;this.styleSheet=document.createElement("style"),((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).appendChild(this.styleSheet),this.addRule(new Tt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Tt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Tt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new mt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new mt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Kt.prototype.removeStyleSheet=function(){var wt;this.styleSheet&&(((wt=this.styleSheetRoot)!==null&&wt!==void 0?wt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Kt}(),Tt=function(Kt,wt){this.selector=Kt,this.style=wt},mt=function(Kt,wt){this.localName=Kt,this.style=wt},xt=function(){function Kt(wt,Lt,Zt,ee,It){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=wt,this.displayMode=Lt,this.markerItems=Zt,this.uiStyleSettings=ee,this.styles=It,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Kt.prototype.show=function(wt){var Lt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Zt=document.createElement("div");Zt.className=this.toolbarBlockStyleClass.name,Zt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Zt),this.addActionButton(Zt,'<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(Zt,'<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(Zt,'<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(Zt,'<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(Zt,'<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(Zt,'<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(Zt,'<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(Zt,'<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(It){var Rt=document.createElement("div");Rt.className=""+Lt.toolbarButtonStyleClass.name,Rt.setAttribute("data-type-name",It.typeName),Rt.innerHTML=It.icon,Rt.addEventListener("click",function(){Lt.markerToolbarButtonClicked(Rt,It)}),Lt.buttons.push(Rt),Lt.markerButtons.push(Rt)}),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 ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",ee.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<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(ee,'<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()},Kt.prototype.addButtonClickListener=function(wt){this.buttonClickListeners.push(wt)},Kt.prototype.removeButtonClickListener=function(wt){this.buttonClickListeners.indexOf(wt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(wt),1)},Kt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Kt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var wt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Lt=0;Lt<this.markerButtons.length;Lt++)Lt<wt||Lt===wt&&this.markerButtons.length-1===wt?this.markerButtonBlock.appendChild(this.markerButtons[Lt]):(Lt===wt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Lt]))}},Kt.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")},Kt.prototype.resetButtonStyles=function(){var wt=this;this.buttons.forEach(function(Lt){Lt.className=Lt.className.replace(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className=Lt.className.replace(wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?wt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:wt.toolbarActiveButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(wt.uiStyleSettings.toolbarButtonStyleColorsClassName?wt.uiStyleSettings.toolbarButtonStyleColorsClassName:wt.toolbarButtonStyleColorsClass.name)})},Kt.prototype.addActionButton=function(wt,Lt,Zt){var ee=this,It=document.createElement("div");switch(It.className=""+this.toolbarButtonStyleClass.name,It.innerHTML=Lt,It.setAttribute("data-action",Zt),It.addEventListener("click",function(){ee.actionToolbarButtonClicked(It,Zt)}),Zt){case"select":It.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":It.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":It.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":It.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":It.style.fill=this.uiStyleSettings.closeButtonColor}wt.appendChild(It),this.buttons.push(It)},Kt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new mt("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 mt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new mt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new mt("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 mt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var wt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new mt("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*wt)+`px;
padding: `+wt+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new mt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new mt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Tt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Tt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Kt.prototype.markerToolbarButtonClicked=function(wt,Lt){this.setActiveButton(wt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Zt){return Zt("marker",Lt)}),this.markerButtonOverflowBlock.style.display="none"},Kt.prototype.actionToolbarButtonClicked=function(wt,Lt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Zt){return Zt("action",Lt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Kt.prototype.setActiveButton=function(wt){this.resetButtonStyles(),wt.className=wt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),wt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Kt.prototype.setActiveMarkerButton=function(wt){var Lt=this.markerButtons.find(function(Zt){return Zt.getAttribute("data-type-name")===wt});Lt&&this.setActiveButton(Lt)},Kt.prototype.setCurrentMarker=function(wt){var Lt=this;this.currentMarker=wt,this.buttons.filter(function(Zt){return/delete|notes/.test(Zt.getAttribute("data-action"))}).forEach(function(Zt){Lt.currentMarker===void 0?(Zt.style.fillOpacity="0.4",Zt.style.pointerEvents="none"):(Zt.style.fillOpacity="1",Zt.style.pointerEvents="all")})},Kt}(),ft=function(){function Kt(wt,Lt,Zt,ee){this.panels=[],this.panelButtons=[],this.markerjsContainer=wt,this.displayMode=Lt,this.uiStyleSettings=Zt,this.styles=ee,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Kt.prototype.addStyles=function(){var wt;this.toolboxStyleClass=this.styles.addClass(new mt("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 mt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new mt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new mt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new mt("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 mt("toolbox-panel-row_colors",`
background-color: `+((wt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&wt!==void 0?wt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new mt("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
padding: `+Lt+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new mt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new mt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Tt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Tt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Kt.prototype.show=function(wt){var Lt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=wt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Kt.prototype.setPanelButtons=function(wt){var Lt,Zt,ee=this;this.panels=wt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Zt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Zt!==void 0?Zt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(It){var Rt;It.uiStyleSettings=ee.uiStyleSettings;var Ht=document.createElement("div");Ht.className=ee.toolboxButtonStyleClass.name+" "+((Rt=ee.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:ee.toolboxButtonStyleColorsClass.name),Ht.innerHTML=It.icon,Ht.title=It.title,Ht.addEventListener("click",function(){ee.panelButtonClick(It)}),ee.panelButtons.push(Ht),ee.buttonRow.appendChild(Ht)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Kt.prototype.panelButtonClick=function(wt){var Lt=this,Zt=-1;if(wt!==this.activePanel){Zt=this.panels.indexOf(wt),this.panelRow.innerHTML="";var ee=wt.getUi();ee.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ee),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=wt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Lt.displayMode==="inline"?Lt.panelRow.style.display="none":Lt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(It,Rt){var Ht,re;It.className=Lt.toolboxButtonStyleClass.name+" "+(Rt===Zt?""+((Ht=Lt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ht!==void 0?Ht:Lt.toolboxActiveButtonStyleColorsClass.name):""+((re=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&re!==void 0?re:Lt.toolboxButtonStyleColorsClass.name))})},Kt}(),z=function(Kt,wt){this.title=Kt,this.icon=wt},tt=function(Kt){function wt(Lt,Zt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.colors=[],Rt.addTransparent=!1,Rt.colorBoxes=[],Rt.colors=Zt,Rt.currentColor=ee,Rt.setCurrentColor=Rt.setCurrentColor.bind(Rt),Rt.getColorBox=Rt.getColorBox.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");return Zt.style.overflow="hidden",Zt.style.whiteSpace="nowrap",this.colors.forEach(function(ee){var It=Lt.getColorBox(ee);Zt.appendChild(It),Lt.colorBoxes.push(It)}),Zt},wt.prototype.getColorBox=function(Lt){var Zt=this,ee=this.uiStyleSettings.toolbarHeight/4,It=this.uiStyleSettings.toolbarHeight-ee,Rt=document.createElement("div");Rt.style.display="inline-block",Rt.style.boxSizing="content-box",Rt.style.width=It-2+"px",Rt.style.height=It-2+"px",Rt.style.padding="1px",Rt.style.marginRight="2px",Rt.style.marginBottom="2px",Rt.style.borderWidth="2px",Rt.style.borderStyle="solid",Rt.style.borderRadius=(It+2)/2+"px",Rt.style.borderColor=Lt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Rt.addEventListener("click",function(){Zt.setCurrentColor(Lt,Rt)});var Ht=document.createElement("div");return Ht.style.display="inline-block",Ht.style.width=It-2+"px",Ht.style.height=It-2+"px",Ht.style.backgroundColor=Lt,Ht.style.borderRadius=It/2+"px",Lt==="transparent"&&(Ht.style.fill=this.uiStyleSettings.toolboxAccentColor,Ht.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>`),Rt.appendChild(Ht),Rt},wt.prototype.setCurrentColor=function(Lt,Zt){var ee=this;this.currentColor=Lt,this.colorBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Lt)},wt}(z),at=function(){function Kt(wt,Lt,Zt){this._state="new",this._isSelected=!1,this._container=wt,this._overlayContainer=Lt,this.globalSettings=Zt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Kt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Kt.prototype.ownsTarget=function(wt){return!1},Object.defineProperty(Kt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Kt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Kt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Kt.prototype.pointerDown=function(wt,Lt){},Kt.prototype.dblClick=function(wt,Lt){},Kt.prototype.manipulate=function(wt){},Kt.prototype.pointerUp=function(wt){this.stateChanged()},Kt.prototype.dispose=function(){},Kt.prototype.addMarkerVisualToContainer=function(wt){this.container.childNodes.length>0?this.container.insertBefore(wt,this.container.childNodes[0]):this.container.appendChild(wt)},Kt.prototype.getState=function(){return{typeName:Kt.typeName,state:this.state,notes:this.notes}},Kt.prototype.restoreState=function(wt){this._state=wt.state,this.notes=wt.notes},Kt.prototype.scale=function(wt,Lt){},Kt.prototype.colorChanged=function(wt){this.onColorChanged&&this.onColorChanged(wt),this.stateChanged()},Kt.prototype.fillColorChanged=function(wt){this.onFillColorChanged&&this.onFillColorChanged(wt),this.stateChanged()},Kt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var wt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),wt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(wt)&&this.onStateChanged(this)}},Kt.typeName="MarkerBase",Kt}(),it=function(){function Kt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Kt.prototype.findGripByVisual=function(wt){return this.topLeft.ownsTarget(wt)?this.topLeft:this.topCenter.ownsTarget(wt)?this.topCenter:this.topRight.ownsTarget(wt)?this.topRight:this.centerLeft.ownsTarget(wt)?this.centerLeft:this.centerRight.ownsTarget(wt)?this.centerRight:this.bottomLeft.ownsTarget(wt)?this.bottomLeft:this.bottomCenter.ownsTarget(wt)?this.bottomCenter:this.bottomRight.ownsTarget(wt)?this.bottomRight:void 0},Kt}(),lt=function(){function Kt(){this.GRIP_SIZE=10,this.visual=vt.createGroup(),this.visual.appendChild(vt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(vt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Kt.prototype.ownsTarget=function(wt){return wt===this.visual||wt===this.visual.childNodes[0]||wt===this.visual.childNodes[1]},Kt}(),ut=function(){function Kt(){}return Kt.toITransformMatrix=function(wt){return{a:wt.a,b:wt.b,c:wt.c,d:wt.d,e:wt.e,f:wt.f}},Kt.toSVGMatrix=function(wt,Lt){return wt.a=Lt.a,wt.b=Lt.b,wt.c=Lt.c,wt.d=Lt.d,wt.e=Lt.e,wt.f=Lt.f,wt},Kt}(),dt=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.left=0,It.top=0,It.width=0,It.height=0,It.defaultSize={x:50,y:20},It.offsetX=0,It.offsetY=0,It.rotationAngle=0,It.CB_DISTANCE=10,It._suppressMarkerCreateEvent=!1,It.container.transform.baseVal.appendItem(vt.createTransform()),It.setupControlBox(),It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(wt.prototype,"visual",{get:function(){return this._visual},set:function(Lt){this._visual=Lt;var Zt=vt.createTransform();this._visual.transform.baseVal.appendItem(Zt)},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(Lt){return!!Kt.prototype.ownsTarget.call(this,Lt)||!!(this.controlGrips.findGripByVisual(Lt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Lt))},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="new"&&(this.left=Lt.x,this.top=Lt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ee=this.unrotatePoint(Lt);if(this.manipulationStartX=ee.x,this.manipulationStartY=ee.y,this.offsetX=ee.x-this.left,this.offsetY=ee.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Zt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Zt)){this.activeGrip=this.rotatorGrip;var It=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=It.x-this.width/2,this.top=It.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Rt=this.container.transform.baseVal.getItem(0);Rt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Rt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},wt.prototype.pointerUp=function(Lt){var Zt=this.state;Kt.prototype.pointerUp.call(this,Lt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Lt),this._state="select",Zt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},wt.prototype.moveVisual=function(Lt){this.visual.style.transform="translate("+Lt.x+"px, "+Lt.y+"px)"},wt.prototype.manipulate=function(Lt){var Zt=this.unrotatePoint(Lt);this.state==="creating"?this.resize(Lt):this.state==="move"?(this.left=this.manipulationStartLeft+(Zt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Zt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Zt):this.state==="rotate"&&this.rotate(Lt)},wt.prototype.resize=function(Lt){var Zt=this.manipulationStartLeft,ee=this.manipulationStartWidth,It=this.manipulationStartTop,Rt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Zt=this.manipulationStartLeft+Lt.x-this.manipulationStartX,ee=this.manipulationStartWidth+this.manipulationStartLeft-Zt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ee=this.manipulationStartWidth+Lt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:It=this.manipulationStartTop+Lt.y-this.manipulationStartY,Rt=this.manipulationStartHeight+this.manipulationStartTop-It;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Rt=this.manipulationStartHeight+Lt.y-this.manipulationStartY}ee>=0?(this.left=Zt,this.width=ee):(this.left=Zt+ee,this.width=-ee),Rt>=0?(this.top=It,this.height=Rt):(this.top=It+Rt,this.height=-Rt),this.setSize()},wt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},wt.prototype.rotate=function(Lt){if(Math.abs(Lt.x-this.centerX)>.1){var Zt=Math.sign(Lt.x-this.centerX);this.rotationAngle=180*Math.atan((Lt.y-this.centerY)/(Lt.x-this.centerX))/Math.PI+90*Zt,this.applyRotation()}},wt.prototype.applyRotation=function(){var Lt=this.container.transform.baseVal.getItem(0);Lt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Lt,0)},wt.prototype.rotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Zt=this.container.getCTM(),ee=vt.createPoint(Lt.x,Lt.y);return{x:(ee=ee.matrixTransform(Zt)).x,y:ee.y}},wt.prototype.unrotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Zt=this.container.getCTM();Zt=Zt.inverse();var ee=vt.createPoint(Lt.x,Lt.y);return{x:(ee=ee.matrixTransform(Zt)).x,y:ee.y}},wt.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=vt.createGroup();var Lt=vt.createTransform();Lt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Lt),this.container.appendChild(this.controlBox),this.controlRect=vt.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=vt.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 it,this.addControlGrips(),this.controlBox.style.display="none"},wt.prototype.adjustControlBox=function(){var Lt=this.controlBox.transform.baseVal.getItem(0);Lt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Lt,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()},wt.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()},wt.prototype.createGrip=function(){var Lt=new lt;return Lt.visual.transform.baseVal.appendItem(vt.createTransform()),this.controlBox.appendChild(Lt.visual),Lt},wt.prototype.positionGrips=function(){var Lt=this.controlGrips.topLeft.GRIP_SIZE,Zt=-Lt/2,ee=Zt,It=(this.width+this.CB_DISTANCE)/2-Lt/2,Rt=(this.height+this.CB_DISTANCE)/2-Lt/2,Ht=this.height+this.CB_DISTANCE-Lt/2,re=this.width+this.CB_DISTANCE-Lt/2;this.positionGrip(this.controlGrips.topLeft.visual,Zt,ee),this.positionGrip(this.controlGrips.topCenter.visual,It,ee),this.positionGrip(this.controlGrips.topRight.visual,re,ee),this.positionGrip(this.controlGrips.centerLeft.visual,Zt,Rt),this.positionGrip(this.controlGrips.centerRight.visual,re,Rt),this.positionGrip(this.controlGrips.bottomLeft.visual,Zt,Ht),this.positionGrip(this.controlGrips.bottomCenter.visual,It,Ht),this.positionGrip(this.controlGrips.bottomRight.visual,re,Ht),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,It,ee-3*this.CB_DISTANCE)},wt.prototype.positionGrip=function(Lt,Zt,ee){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Zt,ee),Lt.transform.baseVal.replaceItem(It,0)},wt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},wt.prototype.showControlBox=function(){this.controlBox.style.display=""},wt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ut.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ut.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Zt=Lt;this.left=Zt.left,this.top=Zt.top,this.width=Zt.width,this.height=Zt.height,this.rotationAngle=Zt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Zt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Zt.containerTransformMatrix))},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt);var ee=this.rotatePoint({x:this.left,y:this.top}),It=this.unrotatePoint({x:ee.x*Lt,y:ee.y*Zt});this.left=It.x,this.top=It.y,this.width=this.width*Lt,this.height=this.height*Zt,this.adjustControlBox()},wt}(at),bt=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.createVisual=It.createVisual.bind(It),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual)},wt.prototype.createVisual=function(){this.visual=vt.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)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.visual&&vt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){var Zt=Lt;this.fillColor=Zt.fillColor,this.strokeColor=Zt.strokeColor,this.strokeWidth=Zt.strokeWidth,this.strokeDasharray=Zt.strokeDasharray,this.opacity=Zt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.setSize()},wt.title="Rectangle marker",wt}(dt),At=function(Kt){function wt(Lt,Zt,ee,It){var Rt=Kt.call(this,Lt,It||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Rt.widths=[],Rt.widthBoxes=[],Rt.widths=Zt,Rt.currentWidth=ee,Rt.setCurrentWidth=Rt.setCurrentWidth.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");return Zt.style.display="flex",Zt.style.overflow="hidden",Zt.style.flexGrow="2",this.widths.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.flexGrow="2",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.borderColor=ee===Lt.currentWidth?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentWidth(ee,It)}),Zt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=ee.toString(),Rt.style.marginRight="5px",It.appendChild(Rt);var Ht=document.createElement("div");Ht.style.minHeight="20px",Ht.style.flexGrow="2",Ht.style.display="flex",Ht.style.alignItems="center";var re=document.createElement("hr");re.style.minWidth="20px",re.style.border="0px",re.style.borderTop=ee+"px solid "+Lt.uiStyleSettings.toolboxColor,re.style.flexGrow="2",Ht.appendChild(re),It.appendChild(Ht),Lt.widthBoxes.push(It)}),Zt},wt.prototype.setCurrentWidth=function(Lt,Zt){var ee=this;this.currentWidth=Lt,this.widthBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},wt}(z),Dt=function(Kt){function wt(Lt,Zt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.styles=[],Rt.styleBoxes=[],Rt.styles=Zt,Rt.currentStyle=ee,Rt.setCurrentStyle=Rt.setCurrentStyle.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");return Zt.style.display="flex",Zt.style.overflow="hidden",Zt.style.flexGrow="2",this.styles.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.overflow="hidden",It.style.maxWidth=100/Lt.styles.length-5+"%",It.style.borderColor=ee===Lt.currentStyle?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentStyle(ee,It)}),Zt.appendChild(It);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.overflow="hidden";var Ht=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Lt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ee!==""?'stroke-dasharray="'+ee+'"':"")+` />
</svg>`;Rt.innerHTML=Ht,It.appendChild(Rt),Lt.styleBoxes.push(It)}),Zt},wt.prototype.setCurrentStyle=function(Lt,Zt){var ee=this;this.currentStyle=Lt,this.styleBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},wt}(z),Ft=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="FrameMarker",wt.title="Frame marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',wt}(bt),jt=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"},Nt=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.x1=0,It.y1=0,It.x2=0,It.y2=0,It.defaultLength=50,It.manipulationStartX=0,It.manipulationStartY=0,It.manipulationStartX1=0,It.manipulationStartY1=0,It.manipulationStartX2=0,It.manipulationStartY2=0,It.setupControlBox(),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!!Kt.prototype.ownsTarget.call(this,Lt)||!(!this.grip1.ownsTarget(Lt)&&!this.grip2.ownsTarget(Lt))},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.manipulationStartX=Lt.x,this.manipulationStartY=Lt.y,this.state==="new"&&(this.x1=Lt.x,this.y1=Lt.y,this.x2=Lt.x,this.y2=Lt.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(Zt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Zt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},wt.prototype.pointerUp=function(Lt){var Zt=this.state;Kt.prototype.pointerUp.call(this,Lt),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(Lt),this._state="select",Zt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},wt.prototype.adjustVisual=function(){},wt.prototype.manipulate=function(Lt){this.state==="creating"?this.resize(Lt):this.state==="move"?(this.x1=this.manipulationStartX1+Lt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Lt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Lt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Lt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Lt)},wt.prototype.resize=function(Lt){switch(this.activeGrip){case this.grip1:this.x1=Lt.x,this.y1=Lt.y;break;case this.grip2:case void 0:this.x2=Lt.x,this.y2=Lt.y}this.adjustVisual(),this.adjustControlBox()},wt.prototype.select=function(){Kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},wt.prototype.deselect=function(){Kt.prototype.deselect.call(this),this.controlBox.style.display="none"},wt.prototype.setupControlBox=function(){this.controlBox=vt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},wt.prototype.adjustControlBox=function(){this.positionGrips()},wt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},wt.prototype.createGrip=function(){var Lt=new lt;return Lt.visual.transform.baseVal.appendItem(vt.createTransform()),this.controlBox.appendChild(Lt.visual),Lt},wt.prototype.positionGrips=function(){var Lt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Lt/2,this.y1-Lt/2),this.positionGrip(this.grip2.visual,this.x2-Lt/2,this.y2-Lt/2)},wt.prototype.positionGrip=function(Lt,Zt,ee){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Zt,ee),Lt.transform.baseVal.replaceItem(It,0)},wt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Kt.prototype.getState.call(this))},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Zt=Lt;this.x1=Zt.x1,this.y1=Zt.y1,this.x2=Zt.x2,this.y2=Zt.y2},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.x1=this.x1*Lt,this.y1=this.y1*Zt,this.x2=this.x2*Lt,this.y2=this.y2*Zt,this.adjustVisual(),this.adjustControlBox()},wt}(at),_t=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.setStrokeColor=It.setStrokeColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.selectorLine&&Lt!==this.visibleLine)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.selectorLine=vt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=vt.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)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},wt.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()),vt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),vt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),vt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.adjustVisual(),this.colorChanged(Lt)},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Zt=Lt;this.strokeColor=Zt.strokeColor,this.strokeWidth=Zt.strokeWidth,this.strokeDasharray=Zt.strokeDasharray,this.createVisual(),this.adjustVisual()},wt.typeName="LineMarker",wt.title="Line marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',wt}(Nt),Wt=function(Kt){function wt(Lt,Zt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.fonts=[],Rt.fontBoxes=[],Rt.fonts=Zt,Rt.currentFont=ee,Rt.setCurrentFont=Rt.setCurrentFont.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");return Zt.style.overflow="hidden",Zt.style.flexGrow="2",this.fonts.forEach(function(ee){var It=document.createElement("div");It.style.display="inline-block",It.style.alignItems="center",It.style.justifyContent="space-between",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.overflow="hidden",It.style.maxWidth=100/Lt.fonts.length-5+"%",It.style.borderColor=ee===Lt.currentFont?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentFont(ee,It)}),Zt.appendChild(It);var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.fontFamily=ee,Rt.style.overflow="hidden";var Ht=document.createElement("div");Ht.style.whiteSpace="nowrap",Ht.style.overflow="hidden",Ht.style.textOverflow="ellipsis",Ht.innerHTML="The quick brown fox jumps over the lazy dog",Rt.appendChild(Ht),It.appendChild(Rt),Lt.fontBoxes.push(It)}),Zt},wt.prototype.setCurrentFont=function(Lt,Zt){var ee=this;this.currentFont=Lt,this.fontBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},wt}(z),Jt=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.color="transparent",It.padding=5,It.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",It.text=It.DEFAULT_TEXT,It.isMoved=!1,It.color=ee.defaultColor,It.fontFamily=ee.defaultFontFamily,It.defaultSize={x:100,y:30},It.setColor=It.setColor.bind(It),It.setFont=It.setFont.bind(It),It.renderText=It.renderText.bind(It),It.sizeText=It.sizeText.bind(It),It.textEditDivClicked=It.textEditDivClicked.bind(It),It.showTextEditor=It.showTextEditor.bind(It),It.setSize=It.setSize.bind(It),It.positionTextEditor=It.positionTextEditor.bind(It),It.colorPanel=new tt("Color",ee.defaultColorSet,ee.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){if(Kt.prototype.ownsTarget.call(this,Lt)||Lt===this.visual||Lt===this.textElement||Lt===this.bgRectangle)return!0;var Zt=!1;return this.textElement.childNodes.forEach(function(ee){ee===Lt&&(Zt=!0)}),Zt},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.bgRectangle=vt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=vt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(vt.createTransform()),this.textElement.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.isMoved=!1,this.pointerDownPoint=Lt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.renderText=function(){var Lt=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(Zt){Lt.textElement.appendChild(vt.createTSpan(Zt.trim()===""?" ":Zt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},wt.prototype.getTextScale=function(){var Lt=this.textElement.getBBox(),Zt=1;if(Lt.width>0&&Lt.height>0){var ee=(1*this.width-this.width*this.padding*2/100)/Lt.width,It=(1*this.height-this.height*this.padding*2/100)/Lt.height;Zt=Math.min(ee,It)}return Zt},wt.prototype.getTextPosition=function(Lt){var Zt=this.textElement.getBBox(),ee=0,It=0;return Zt.width>0&&Zt.height>0&&(ee=(this.width-Zt.width*Lt)/2,It=this.height/2-Zt.height*Lt/2),{x:ee,y:It}},wt.prototype.sizeText=function(){var Lt=this.textElement.getBBox(),Zt=this.getTextScale(),ee=this.getTextPosition(Zt);ee.y-=Lt.y*Zt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ee.x+"px, "+ee.y+"px) scale("+Zt+", "+Zt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ee.x,ee.y),this.textElement.transform.baseVal.getItem(1).setScale(Zt,Zt))},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Lt.x-this.pointerDownPoint.x)>5||Math.abs(Lt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.isMoved=!0,this.setSize(),this.sizeText()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},wt.prototype.pointerUp=function(Lt){var Zt=this.state;Zt==="creating"&&(this._suppressMarkerCreateEvent=!0),Kt.prototype.pointerUp.call(this,Lt),this.setSize(),(Zt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.showTextEditor=function(){var Lt=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(Zt){Zt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Zt=Number.parseFloat(Lt.textEditor.style.fontSize);Lt.textEditor.clientWidth>=Number.parseInt(Lt.textEditor.style.maxWidth)&&Zt>.9;)Zt-=.1,Lt.textEditor.style.fontSize=Math.max(Zt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Zt){Zt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Zt){if(Zt.clipboardData){var ee=Zt.clipboardData.getData("text"),It=window.getSelection();if(!It.rangeCount)return!1;It.deleteFromDocument(),It.getRangeAt(0).insertNode(document.createTextNode(ee)),Zt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Lt.textEditDivClicked(Lt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},wt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Lt=this.getTextScale(),Zt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ee=this.textElement.getBBox(),It={x:ee.width*Lt,y:ee.height*Lt};Zt.x-=It.x/2,Zt.y-=It.y/2,this.textEditor.style.top=Zt.y+"px",this.textEditor.style.left=Zt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Zt.x+"px",this.textEditor.style.fontSize=Math.max(16*Lt,12)+"px",this.textElement.style.display="none"}},wt.prototype.textEditDivClicked=function(Lt){this.text=Lt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},wt.prototype.select=function(){Kt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},wt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Kt.prototype.deselect.call(this)},wt.prototype.dblClick=function(Lt,Zt){Kt.prototype.dblClick.call(this,Lt,Zt),this.showTextEditor()},wt.prototype.setColor=function(Lt){this.textElement&&vt.setAttributes(this.textElement,[["fill",Lt]]),this.color=Lt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Lt)},wt.prototype.setFont=function(Lt){this.textElement&&vt.setAttributes(this.textElement,[["font-family",Lt]]),this.fontFamily=Lt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},wt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},wt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Zt=Lt;this.color=Zt.color,this.fontFamily=Zt.fontFamily,this.padding=Zt.padding,this.text=Zt.text,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.setSize(),this.sizeText(),this.positionTextEditor()},wt.typeName="TextMarker",wt.title="Text marker",wt.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>',wt}(dt),Ut=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.color="transparent",It.lineWidth=3,It.drawing=!1,It.pixelRatio=1,It.color=ee.defaultColor,It.lineWidth=ee.defaultStrokeWidth,It.pixelRatio=ee.freehandPixelRatio,It.setColor=It.setColor.bind(It),It.addCanvas=It.addCanvas.bind(It),It.finishCreation=It.finishCreation.bind(It),It.setLineWidth=It.setLineWidth.bind(It),It.colorPanel=new tt("Color",ee.defaultColorSet,ee.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.lineWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.lineWidthPanel.onWidthChanged=It.setLineWidth,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.drawingImage)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.drawingImage=vt.createImage(),this.visual.appendChild(this.drawingImage);var Lt=vt.createTransform();this.visual.transform.baseVal.appendItem(Lt),this.addMarkerVisualToContainer(this.visual)},wt.prototype.pointerDown=function(Lt,Zt){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(Lt.x,Lt.y),this.drawing=!0):Kt.prototype.pointerDown.call(this,Lt,Zt)},wt.prototype.manipulate=function(Lt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Lt.x,Lt.y),this.canvasContext.stroke()):Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),vt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},wt.prototype.pointerUp=function(Lt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Kt.prototype.pointerUp.call(this,Lt)},wt.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)},wt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.select.call(this)},wt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Kt.prototype.deselect.call(this)},wt.prototype.finishCreation=function(){for(var Lt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Zt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ee=Zt[0],It=Zt[1],Rt=Zt[2],Ht=Zt[3],re=!1,ye=0;ye<this.canvasElement.height;ye++)for(var Pe=0;Pe<this.canvasElement.width;Pe++)Lt.data[ye*this.canvasElement.width*4+4*Pe+3]>0&&(re=!0,ye<It&&(It=ye),Pe<ee&&(ee=Pe),ye>Ht&&(Ht=ye),Pe>Rt&&(Rt=Pe));if(re){this.left=ee/this.pixelRatio,this.top=It/this.pixelRatio,this.width=(Rt-ee)/this.pixelRatio,this.height=(Ht-It)/this.pixelRatio;var Ae=document.createElement("canvas");Ae.width=Rt-ee,Ae.height=Ht-It,Ae.getContext("2d").putImageData(this.canvasContext.getImageData(ee,It,Rt-ee,Ht-It),0,0),this.drawingImgUrl=Ae.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},wt.prototype.setDrawingImage=function(){vt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),vt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},wt.prototype.setColor=function(Lt){this.color=Lt,this.colorChanged(Lt)},wt.prototype.setLineWidth=function(Lt){this.lineWidth=Lt},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({drawingImgUrl:this.drawingImgUrl},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.drawingImgUrl=Lt.drawingImgUrl,this.setDrawingImage()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.setDrawingImage()},wt.typeName="FreehandMarker",wt.title="Freehand marker",wt.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>',wt}(dt),Vt=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,ee||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return It.typeBoxes=[],It.currentType=Zt,It.setCurrentType=It.setCurrentType.bind(It),It}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");Zt.style.display="flex",Zt.style.overflow="hidden",Zt.style.flexGrow="2";for(var ee=function(Ht){var re="both";switch(Ht){case 0:re="both";break;case 1:re="start";break;case 2:re="end";break;case 3:re="none"}var ye=document.createElement("div");if(ye.style.display="flex",ye.style.flexGrow="2",ye.style.alignItems="center",ye.style.justifyContent="space-between",ye.style.padding="5px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderColor=re===It.currentType?It.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){Lt.setCurrentType(re,ye)}),Zt.appendChild(ye),re==="both"||re==="start"){var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.alignItems="center",Pe.style.minHeight="20px",Pe.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="`+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pe.style.marginLeft="5px",ye.appendChild(Pe)}var Ae=document.createElement("div");Ae.style.display="flex",Ae.style.alignItems="center",Ae.style.minHeight="20px",Ae.style.flexGrow="2";var Oe=document.createElement("hr");if(Oe.style.minWidth="20px",Oe.style.border="0px",Oe.style.borderTop="3px solid "+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee"),Oe.style.flexGrow="2",Ae.appendChild(Oe),ye.appendChild(Ae),re==="both"||re==="end"){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.minHeight="20px",Ie.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="`+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ie.style.marginRight="5px",ye.appendChild(Ie)}It.typeBoxes.push(ye)},It=this,Rt=0;Rt<4;Rt++)ee(Rt);return Zt},wt.prototype.setCurrentType=function(Lt,Zt){var ee=this;this.currentType=Lt,this.typeBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings!==void 0?ee.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},wt}(z),oe=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.arrowType="end",It.arrowBaseHeight=10,It.arrowBaseWidth=10,It.getArrowPoints=It.getArrowPoints.bind(It),It.setArrowType=It.setArrowType.bind(It),It.arrowTypePanel=new Vt("Arrow type","end"),It.arrowTypePanel.onArrowTypeChanged=It.setArrowType,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.arrow1&&Lt!==this.arrow2)},wt.prototype.getArrowPoints=function(Lt,Zt){var ee=this.arrowBaseWidth+2*this.strokeWidth,It=this.arrowBaseHeight+2*this.strokeWidth;return Lt-ee/2+","+(Zt+It/2)+" "+Lt+","+(Zt-It/2)+" "+(Lt+ee/2)+","+(Zt+It/2)},wt.prototype.createTips=function(){this.arrow1=vt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=vt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(vt.createTransform()),this.visual.appendChild(this.arrow2)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(Kt.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",vt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),vt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Lt=0;Math.abs(this.x1-this.x2)>.1&&(Lt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Zt=this.arrow1.transform.baseVal.getItem(0);Zt.setRotate(Lt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Zt,0);var ee=this.arrow2.transform.baseVal.getItem(0);ee.setRotate(Lt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ee,0)}},wt.prototype.setArrowType=function(Lt){this.arrowType=Lt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({arrowType:this.arrowType},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Zt=Lt;this.arrowType=Zt.arrowType,this.createTips(),this.adjustVisual()},wt.typeName="ArrowMarker",wt.title="Arrow marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',wt}(_t),se=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.fillColor=ee.defaultFillColor,It.strokeWidth=0,It.fillPanel=new tt("Color",ee.defaultColorSet,ee.defaultFillColor),It.fillPanel.onColorChanged=It.setFillColor,It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="CoverMarker",wt.title="Cover marker",wt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',wt}(bt),he=function(Kt){function wt(Lt,Zt,ee,It){var Rt=Kt.call(this,Lt,It||'<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 Rt.opacities=[],Rt.opacityBoxes=[],Rt.opacities=Zt,Rt.currentOpacity=ee,Rt.setCurrentOpacity=Rt.setCurrentOpacity.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Zt=document.createElement("div");return Zt.style.display="flex",Zt.style.overflow="hidden",Zt.style.flexGrow="2",Zt.style.justifyContent="space-between",this.opacities.forEach(function(ee){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.justifyContent="center",It.style.padding="5px",It.style.borderWidth="2px",It.style.borderStyle="solid",It.style.borderColor=ee===Lt.currentOpacity?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentOpacity(ee,It)}),Zt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=100*ee+"%",It.appendChild(Rt),Lt.opacityBoxes.push(It)}),Zt},wt.prototype.setCurrentOpacity=function(Lt,Zt){var ee=this;this.currentOpacity=Lt,this.opacityBoxes.forEach(function(It){It.style.borderColor=It===Zt?ee.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},wt}(z),be=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.setOpacity=It.setOpacity.bind(It),It.fillColor=ee.defaultHighlightColor,It.strokeWidth=0,It.opacity=ee.defaultHighlightOpacity,It.fillPanel=new tt("Color",ee.defaultColorSet,It.fillColor),It.fillPanel.onColorChanged=It.setFillColor,It.opacityPanel=new he("Opacity",ee.defaultOpacitySteps,It.opacity),It.opacityPanel.onOpacityChanged=It.setOpacity,It}return Re(wt,Kt),wt.prototype.setOpacity=function(Lt){this.opacity=Lt,this.visual&&vt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="HighlightMarker",wt.title="Highlight marker",wt.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>',wt}(se),Yt='<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>',ne='<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>',ve=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.bgColor="transparent",It.tipPosition={x:0,y:0},It.tipBase1Position={x:0,y:0},It.tipBase2Position={x:0,y:0},It.tipMoving=!1,It.color=ee.defaultStrokeColor,It.bgColor=ee.defaultFillColor,It.fontFamily=ee.defaultFontFamily,It.defaultSize={x:100,y:30},It.setBgColor=It.setBgColor.bind(It),It.getTipPoints=It.getTipPoints.bind(It),It.positionTip=It.positionTip.bind(It),It.setTipPoints=It.setTipPoints.bind(It),It.colorPanel=new tt("Text color",ee.defaultColorSet,It.color,Yt),It.colorPanel.onColorChanged=It.setColor,It.bgColorPanel=new tt("Fill color",ee.defaultColorSet,It.bgColor,ne),It.bgColorPanel.onColorChanged=It.setBgColor,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.tipGrip=new lt,It.tipGrip.visual.transform.baseVal.appendItem(vt.createTransform()),It.controlBox.appendChild(It.tipGrip.visual),It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return Kt.prototype.ownsTarget.call(this,Lt)||this.tipGrip.ownsTarget(Lt)||this.tip===Lt},wt.prototype.createTip=function(){vt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=vt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},wt.prototype.pointerDown=function(Lt,Zt){this.state==="new"&&Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Zt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Kt.prototype.pointerDown.call(this,Lt,Zt)},wt.prototype.pointerUp=function(Lt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Kt.prototype.pointerUp.call(this,Lt);else{var Zt=this.state==="creating";Kt.prototype.pointerUp.call(this,Lt),this.setTipPoints(Zt),this.positionTip()}},wt.prototype.manipulate=function(Lt){if(this.tipMoving){var Zt=this.unrotatePoint(Lt);this.tipPosition={x:Zt.x-this.manipulationStartLeft,y:Zt.y-this.manipulationStartTop},this.positionTip()}else Kt.prototype.manipulate.call(this,Lt)},wt.prototype.setBgColor=function(Lt){this.bgRectangle&&this.tip&&(vt.setAttributes(this.bgRectangle,[["fill",Lt]]),vt.setAttributes(this.tip,[["fill",Lt]])),this.bgColor=Lt,this.fillColorChanged(Lt)},wt.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},wt.prototype.setTipPoints=function(Lt){Lt===void 0&&(Lt=!1);var Zt=Math.min(this.height/2,15),ee=this.height/5;Lt&&(this.tipPosition={x:Zt+ee/2,y:this.height+20});var It=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?It<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,Zt=Math.min(this.width/2,15),this.tipBase1Position={x:Zt,y:0},this.tipBase2Position={x:Zt+ee,y:0}):(this.tipBase1Position={x:0,y:Zt},this.tipBase2Position={x:0,y:Zt+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?It<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,Zt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Zt-ee,y:0},this.tipBase2Position={x:this.width-Zt,y:0}):(this.tipBase1Position={x:this.width,y:Zt},this.tipBase2Position={x:this.width,y:Zt+ee}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?It<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ee=this.width/5,Zt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Zt-ee,y:this.height},this.tipBase2Position={x:this.width-Zt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Zt-ee},this.tipBase2Position={x:this.width,y:this.height-Zt}):It<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ee=this.width/5,Zt=Math.min(this.width/2,15),this.tipBase1Position={x:Zt,y:this.height},this.tipBase2Position={x:Zt+ee,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Zt},this.tipBase2Position={x:0,y:this.height-Zt-ee})},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.positionTip()},wt.prototype.positionTip=function(){vt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Lt=this.tipGrip.visual.transform.baseVal.getItem(0);Lt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Lt,0)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),wt.prototype.select=function(){this.positionTip(),Kt.prototype.select.call(this)},wt.prototype.getState=function(){var Lt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Zt=Lt;this.bgColor=Zt.bgColor,this.tipPosition=Zt.tipPosition,Kt.prototype.restoreState.call(this,Lt),this.createTip(),this.setTipPoints()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.tipPosition={x:this.tipPosition.x*Lt,y:this.tipPosition.y*Zt},this.positionTip()},wt.typeName="CalloutMarker",wt.title="Callout marker",wt.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>',wt}(Jt),Se=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.fillColor=ee.defaultFillColor,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.setOpacity=It.setOpacity.bind(It),It.createVisual=It.createVisual.bind(It),It.strokePanel=new tt("Line color",Bt(ee.defaultColorSet,["transparent"]),ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ee.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.opacityPanel=new he("Opacity",ee.defaultOpacitySteps,It.opacity),It.opacityPanel.onOpacityChanged=It.setOpacity,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual)},wt.prototype.createVisual=function(){this.visual=vt.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)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.visual&&vt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Lt),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.visual&&vt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},wt.prototype.setOpacity=function(Lt){this.opacity=Lt,this.visual&&vt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){var Zt=Lt;this.fillColor=Zt.fillColor,this.strokeColor=Zt.strokeColor,this.strokeWidth=Zt.strokeWidth,this.strokeDasharray=Zt.strokeDasharray,this.opacity=Zt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.setSize()},wt.typeName="EllipseMarker",wt.title="Ellipse marker",wt.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>',wt}(dt),we=function(Kt){function wt(Lt,Zt,ee){return Kt.call(this,Lt,Zt,ee)||this}return Re(wt,Kt),Object.defineProperty(wt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.tip1&&Lt!==this.tip2)},wt.prototype.createTips=function(){this.tip1=vt.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(vt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=vt.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(vt.createTransform()),this.visual.appendChild(this.tip2)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.state==="creating"&&this.createTips()},wt.prototype.adjustVisual=function(){if(Kt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(vt.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()]]),vt.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 Lt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Zt=this.tip1.transform.baseVal.getItem(0);Zt.setRotate(Lt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Zt,0);var ee=this.tip2.transform.baseVal.getItem(0);ee.setRotate(Lt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ee,0)}},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt),this.createTips(),this.adjustVisual()},wt.typeName="MeasurementMarker",wt.title="Measurement marker",wt.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>',wt}(_t),ce=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.strokePanel.colors=ee.defaultColorSet,It.fillColor="transparent",It}return Re(wt,Kt),Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Kt.prototype.getState.call(this);return Lt.typeName=wt.typeName,Lt},wt.typeName="EllipseFrameMarker",wt.title="Ellipse frame marker",wt.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>',wt}(Se),de=function(){function Kt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Kt.prototype.addUndoStep=function(wt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(wt)||(this.undoStack.push(wt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(wt)&&this.redoStack.splice(0,this.redoStack.length))},Kt.prototype.replaceLastUndoStep=function(wt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=wt)},Kt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Kt.prototype.undo=function(){if(this.undoStack.length>1){var wt=this.undoStack.pop();return wt!==void 0&&this.redoStack.push(wt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Kt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Kt}(),le=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.curveX=0,It.curveY=0,It.manipulationStartCurveX=0,It.manipulationStartCurveY=0,It.setStrokeColor=It.setStrokeColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.positionGrips=It.positionGrips.bind(It),It.addControlGrips=It.addControlGrips.bind(It),It.adjustVisual=It.adjustVisual.bind(It),It.setupControlBox=It.setupControlBox.bind(It),It.resize=It.resize.bind(It),It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ee.defaultColorSet,ee.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.selectorCurve&&Lt!==this.visibleCurve&&!this.curveGrip.ownsTarget(Lt))},wt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.selectorCurve=vt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=vt.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)},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Lt.x,this.curveY=Lt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Zt)&&(this.activeGrip=this.curveGrip,this._state="resize")},wt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),vt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),vt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),vt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},wt.prototype.setupControlBox=function(){Kt.prototype.setupControlBox.call(this),this.curveControlLine1=vt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=vt.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)},wt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Kt.prototype.addControlGrips.call(this)},wt.prototype.positionGrips=function(){Kt.prototype.positionGrips.call(this);var Lt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Lt/2,this.curveY-Lt/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()))},wt.prototype.manipulate=function(Lt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Lt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Lt.y-this.manipulationStartY),Kt.prototype.manipulate.call(this,Lt)},wt.prototype.resize=function(Lt){this.activeGrip===this.curveGrip&&(this.curveX=Lt.x,this.curveY=Lt.y),Kt.prototype.resize.call(this,Lt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.adjustVisual(),this.colorChanged(Lt)},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.adjustVisual()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.adjustVisual()},wt.prototype.scale=function(Lt,Zt){this.curveX=this.curveX*Lt,this.curveY=this.curveY*Zt,Kt.prototype.scale.call(this,Lt,Zt)},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Kt.prototype.getState.call(this));return Lt.typeName=wt.typeName,Lt},wt.prototype.restoreState=function(Lt){Kt.prototype.restoreState.call(this,Lt);var Zt=Lt;this.strokeColor=Zt.strokeColor,this.strokeWidth=Zt.strokeWidth,this.strokeDasharray=Zt.strokeDasharray,this.curveX=Zt.curveX,this.curveY=Zt.curveY,this.createVisual(),this.adjustVisual()},wt.typeName="CurveMarker",wt.title="Curve marker",wt.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>',wt}(Nt),Ce=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,Zt,ee)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.textColor="transparent",It.fontSize="1rem",It.isMoved=!1,It.captionText="Caption",It.PADDING=5,It.captionBoxWidth=0,It.captionBoxHeight=0,It.strokeColor=ee.defaultColor,It.strokeWidth=ee.defaultStrokeWidth,It.strokeDasharray=ee.defaultStrokeDasharray,It.fillColor=ee.defaultFillColor,It.textColor=ee.defaultStrokeColor,It.fontFamily=ee.defaultFontFamily,It.fontSize=ee.defaultCaptionFontSize,It.captionText=ee.defaultCaptionText,It.setStrokeColor=It.setStrokeColor.bind(It),It.setFillColor=It.setFillColor.bind(It),It.setStrokeWidth=It.setStrokeWidth.bind(It),It.setStrokeDasharray=It.setStrokeDasharray.bind(It),It.createVisual=It.createVisual.bind(It),It.sizeCaption=It.sizeCaption.bind(It),It.setCaptionText=It.setCaptionText.bind(It),It.showTextEditor=It.showTextEditor.bind(It),It.positionTextEditor=It.positionTextEditor.bind(It),It.finishTextEditing=It.finishTextEditing.bind(It),It.setFont=It.setFont.bind(It),It.setTextColor=It.setTextColor.bind(It),It.strokePanel=new tt("Line color",Bt(ee.defaultColorSet,["transparent"]),It.strokeColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ee.defaultColorSet,["transparent"]),It.fillColor,ne),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ee.defaultStrokeWidths,ee.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ee.defaultStrokeDasharrays,ee.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.fontFamilyPanel=new Wt("Font",ee.defaultFontFamilies,ee.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.textColorPanel=new tt("Text color",ee.defaultColorSet,It.textColor,Yt),It.textColorPanel.onColorChanged=It.setTextColor,It}return Re(wt,Kt),wt.prototype.ownsTarget=function(Lt){return!(!Kt.prototype.ownsTarget.call(this,Lt)&&Lt!==this.visual&&Lt!==this.frame&&Lt!==this.captionBg&&Lt!==this.captionElement)},wt.prototype.createVisual=function(){this.visual=vt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=vt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=vt.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=vt.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()},wt.prototype.setCaptionText=function(Lt){this.captionText=Lt,this.captionElement.textContent=this.captionText,this.sizeCaption()},wt.prototype.pointerDown=function(Lt,Zt){Kt.prototype.pointerDown.call(this,Lt,Zt),this.isMoved=!1,this.pointerDownPoint=Lt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Lt),this._state="creating")},wt.prototype.manipulate=function(Lt){Kt.prototype.manipulate.call(this,Lt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Lt.x-this.pointerDownPoint.x)>5||Math.abs(Lt.y-this.pointerDownPoint.y)>5)},wt.prototype.resize=function(Lt){Kt.prototype.resize.call(this,Lt),this.setSize()},wt.prototype.sizeCaption=function(){var Lt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Lt.width+2*this.PADDING,this.captionBoxHeight=Lt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),vt.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')"]]),vt.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')"]])},wt.prototype.showTextEditor=function(){var Lt=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(Zt){Zt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Zt){Zt.key==="Enter"&&Lt.finishTextEditing(Lt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Zt){Zt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Lt.finishTextEditing(Lt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Lt.finishTextEditing(Lt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},wt.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"))},wt.prototype.finishTextEditing=function(Lt){this.setCaptionText(Lt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},wt.prototype.setFont=function(Lt){this.captionElement&&vt.setAttributes(this.captionElement,[["font-family",Lt]]),this.fontFamily=Lt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},wt.prototype.setTextColor=function(Lt){this.captionElement&&vt.setAttributes(this.captionElement,[["fill",Lt]]),this.textColor=Lt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},wt.prototype.setSize=function(){Kt.prototype.setSize.call(this),vt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},wt.prototype.pointerUp=function(Lt){Kt.prototype.pointerUp.call(this,Lt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},wt.prototype.dblClick=function(Lt,Zt){Kt.prototype.dblClick.call(this,Lt,Zt),this.showTextEditor()},wt.prototype.setStrokeColor=function(Lt){this.strokeColor=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Lt),this.stateChanged()},wt.prototype.setFillColor=function(Lt){this.fillColor=Lt,this.captionBg&&vt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Lt),this.stateChanged()},wt.prototype.setStrokeWidth=function(Lt){this.strokeWidth=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},wt.prototype.setStrokeDasharray=function(Lt){this.strokeDasharray=Lt,this.frame&&vt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(wt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),wt.prototype.getState=function(){var Lt=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},Kt.prototype.getState.call(this));return Lt.typeName=this.typeName,Lt},wt.prototype.restoreState=function(Lt){var Zt=Lt;this.fillColor=Zt.fillColor,this.strokeColor=Zt.strokeColor,this.strokeWidth=Zt.strokeWidth,this.strokeDasharray=Zt.strokeDasharray,this.textColor=Zt.textColor,this.fontFamily=Zt.fontFamily,this.captionText=Zt.captionText,this.fontSize=Zt.fontSize,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Zt){Kt.prototype.scale.call(this,Lt,Zt),this.setSize()},wt.typeName="CaptionFrameMarker",wt.title="Caption frame marker",wt.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>',wt}(dt),fe=function(){function Kt(wt,Lt){Lt===void 0&&(Lt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=wt,this.cancelable=Lt}return Object.defineProperty(Kt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Kt.prototype.preventDefault=function(){this._defaultPrevented=!0},Kt}(),me=function(Kt){function wt(Lt,Zt,ee){var It=Kt.call(this,Lt,!1)||this;return It.dataUrl=Zt,It.state=ee,It}return Re(wt,Kt),wt}(fe),ke=function(Kt){function wt(Lt,Zt,ee){ee===void 0&&(ee=!1);var It=Kt.call(this,Lt,ee)||this;return It.marker=Zt,It}return Re(wt,Kt),wt}(fe),pe=function(){function Kt(){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 Kt.prototype.addEventListener=function(wt,Lt){this[wt].push(Lt)},Kt.prototype.removeEventListener=function(wt,Lt){var Zt=this[wt].indexOf(Lt);Zt>-1&&this[wt].splice(Zt,1)},Kt}(),qt=function(){function Kt(wt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new jt,this._isOpen=!1,this.undoRedoManager=new de,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 pe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Kt.instanceCounter++,this.styles=new yt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=wt,this.targetRoot=document.body,this.width=wt.clientWidth,this.height=wt.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(Kt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,ce,Se,be,ve,we,se,_t,le,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,Se,be,ve]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,be]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(wt){var Lt=this;this._availableMarkerTypes.splice(0),wt.forEach(function(Zt){if(typeof Zt=="string"){var ee=Lt.ALL_MARKER_TYPES.find(function(It){return It.typeName===Zt});ee!==void 0&&Lt._availableMarkerTypes.push(ee)}else Lt._availableMarkerTypes.push(Zt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(wt){this._zoomLevel=wt,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(Kt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Kt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),gt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Kt.prototype.show=function(){var wt=this;this.styles.styleSheetRoot===void 0&&Ct.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ct.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Lt){return Lt(new fe(wt))})},Kt.prototype.render=function(){return ot(this,void 0,void 0,function(){var wt;return zt(this,function(Lt){switch(Lt.label){case 0:return this.setCurrentMarker(),(wt=new kt).naturalSize=this.renderAtNaturalSize,wt.imageType=this.renderImageType,wt.imageQuality=this.renderImageQuality,wt.markersOnly=this.renderMarkersOnly,wt.width=this.renderWidth,wt.height=this.renderHeight,[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Lt.sent(),[4,wt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Lt.sent()]}})})},Kt.prototype.close=function(wt){var Lt=this;if(wt===void 0&&(wt=!1),this.isOpen){var Zt=!1;wt||this.eventListeners.beforeclose.forEach(function(ee){var It=new fe(Lt,!0);ee(It),It.defaultPrevented&&(Zt=!0)}),Zt||(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(ee){return ee(new fe(Lt))}),this.detachEvents(),this._isOpen=!1)}},Kt.prototype.addMarkersToToolbar=function(){for(var wt,Lt=[],Zt=0;Zt<arguments.length;Zt++)Lt[Zt]=arguments[Zt];(wt=this._availableMarkerTypes).push.apply(wt,Lt)},Kt.prototype.addRenderEventListener=function(wt){this.addEventListener("render",function(Lt){wt(Lt.dataUrl,Lt.state)})},Kt.prototype.removeRenderEventListener=function(wt){},Kt.prototype.addCloseEventListener=function(wt){this.addEventListener("close",function(){wt()})},Kt.prototype.removeCloseEventListener=function(wt){},Kt.prototype.setupResizeObserver=function(){var wt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){wt.resize(wt.target.clientWidth,wt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return wt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Kt.prototype.onPopupTargetResize=function(){var wt=1*this.target.clientWidth/this.target.clientHeight,Lt=this.editorCanvas.clientWidth/wt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*wt:this.editorCanvas.clientWidth,Zt=Lt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/wt;this.resize(Lt,Zt)},Kt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Kt.prototype.resize=function(wt,Lt){this._isResizing=!0;var Zt=wt/this.imageWidth,ee=Lt/this.imageHeight;this.imageWidth=Math.round(wt),this.imageHeight=Math.round(Lt),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(Zt,ee),this._isResizing=!1},Kt.prototype.scaleMarkers=function(wt,Lt){var Zt,ee=this;this._currentMarker&&this._currentMarker instanceof Jt?this._currentMarker.scale(wt,Lt):(Zt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(It){It!==ee._currentMarker&&It.scale(wt,Lt)}),Zt!==void 0&&this.setCurrentMarker(Zt)},Kt.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"},Kt.prototype.setTopLeft=function(){var wt=this.editingTarget.getBoundingClientRect(),Lt=this.editorCanvas.getBoundingClientRect();this.left=wt.left-Lt.left,this.top=wt.top-Lt.top},Kt.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)},Kt.prototype.addDefs=function(){for(var wt,Lt=[],Zt=0;Zt<arguments.length;Zt++)Lt[Zt]=arguments[Zt];this.defs=vt.createDefs(),this.addDefsToImage(),(wt=this.defs).append.apply(wt,Lt)},Kt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Kt.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)},Kt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Kt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Kt.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)},Kt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Kt.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)},Kt.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 wt=document.createElement("a");wt.href="https://markerjs.com/",wt.target="_blank",wt.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>',wt.title="Powered by marker.js",wt.style.display="grid",wt.style.alignItems="center",wt.style.justifyItems="center",wt.style.padding="3px",wt.style.width="20px",wt.style.height="20px",this.logoUI.appendChild(wt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Kt.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")},Kt.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"},Kt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Kt.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 wt=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=wt+"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 xt(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 ft(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Kt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Kt.prototype.removeMarker=function(wt){this.markerImage.removeChild(wt.container),this.markers.indexOf(wt)>-1&&this.markers.splice(this.markers.indexOf(wt),1),wt.dispose()},Kt.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())},Kt.prototype.toolbarButtonClicked=function(wt,Lt){if(wt==="marker"&&Lt!==void 0)this.createNewMarker(Lt);else if(wt==="action")switch(Lt){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()}},Kt.prototype.deleteSelectedMarker=function(){var wt=this;if(this._currentMarker!==void 0){var Lt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ee){var It=new ke(wt,wt._currentMarker,!0);ee(It),It.defaultPrevented&&(Lt=!0)}),!Lt){var Zt=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(ee){return ee(new ke(wt,Zt))})}}},Kt.prototype.clear=function(){var wt=this,Lt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Rt){var Ht=new ke(wt,void 0,!0);Rt(Ht),Ht.defaultPrevented&&(Lt=!0)}),!Lt)){this.setCurrentMarker();for(var Zt=function(Rt){var Ht=ee.markers[Rt];ee.setCurrentMarker(ee.markers[Rt]),ee._currentMarker.dispose(),ee.markerImage.removeChild(ee._currentMarker.container),ee.markers.splice(ee.markers.indexOf(ee._currentMarker),1),ee.eventListeners.markerdelete.forEach(function(re){return re(new ke(wt,Ht))})},ee=this,It=this.markers.length-1;It>=0;It--)Zt(It);this.addUndoStep()}},Object.defineProperty(Kt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Kt.prototype.showNotesEditor=function(){var wt;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=(wt=this._currentMarker.notes)!==null&&wt!==void 0?wt:"",this.overlayContainer.appendChild(this.notesArea))},Kt.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)},Kt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Kt.prototype.addUndoStep=function(){var wt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Lt=this.getState(),Zt=this.undoRedoManager.getLastUndoStep();if(!Zt||Zt.width===Lt.width&&Zt.height===Lt.height){var ee=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Lt),ee<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(It){return It(new fe(wt))})}else this.undoRedoManager.replaceLastUndoStep(Lt),this.eventListeners.statechange.forEach(function(It){return It(new fe(wt))})}},Kt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Kt.prototype.undoStep=function(){var wt=this,Lt=this.undoRedoManager.undo();Lt!==void 0&&(this.restoreState(Lt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Zt){return Zt(new fe(wt))}))},Kt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Kt.prototype.redoStep=function(){var wt=this,Lt=this.undoRedoManager.redo();Lt!==void 0&&(this.restoreState(Lt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Zt){return Zt(new fe(wt))}))},Kt.prototype.stepZoom=function(){var wt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=wt<this.zoomSteps.length-1?this.zoomSteps[wt+1]:this.zoomSteps[0]},Kt.prototype.panTo=function(wt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-wt.x,top:this.prevPanPoint.y-wt.y}),this.prevPanPoint=wt},Kt.prototype.startRenderAndClose=function(){return ot(this,void 0,void 0,function(){var wt,Lt,Zt=this;return zt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return wt=ee.sent(),Lt=this.getState(),this.eventListeners.render.forEach(function(It){return It(new me(Zt,wt,Lt))}),this.close(!0),[2]}})})},Kt.prototype.getState=function(wt){wt===!0&&this.setCurrentMarker();var Lt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Zt){return Lt.markers.push(Zt.getState())}),Lt},Kt.prototype.restoreState=function(wt){var Lt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);wt.markers.forEach(function(Zt){var ee=Lt._availableMarkerTypes.find(function(Rt){return Rt.typeName===Zt.typeName});if(ee!==void 0){var It=Lt.addNewMarker(ee);It.restoreState(Zt),Lt.markers.push(It)}}),wt.width&&wt.height&&(wt.width!==this.imageWidth||wt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/wt.width,this.imageHeight/wt.height),this.eventListeners.restorestate.forEach(function(Zt){return Zt(new fe(Lt))})},Kt.prototype.addNewMarker=function(wt){var Lt=vt.createGroup();return this.markerImage.appendChild(Lt),new wt(Lt,this.overlayContainer,this.settings)},Kt.prototype.createNewMarker=function(wt){var Lt,Zt=this;(Lt=typeof wt=="string"?this._availableMarkerTypes.find(function(ee){return ee.typeName===wt}):wt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Lt),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(Lt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ee){return ee(new ke(Zt,Zt._currentMarker))}))},Kt.prototype.markerCreated=function(wt){var Lt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(wt),this.setCurrentMarker(wt),wt instanceof Ut&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ut):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Zt){return Zt(new ke(Lt,Lt._currentMarker))})},Kt.prototype.colorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=wt,this.settings.defaultStrokeColor=wt)},Kt.prototype.fillColorChanged=function(wt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=wt)},Kt.prototype.markerStateChanged=function(wt){var Lt=this;this.eventListeners.markerchange.forEach(function(Zt){return Zt(new ke(Lt,wt))})},Kt.prototype.setCurrentMarker=function(wt){var Lt=this;this._currentMarker!==wt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Zt){return Zt(new ke(Lt,Lt._currentMarker))})),this._currentMarker=wt,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(Zt){return Zt(new ke(Lt,Lt._currentMarker))}))},Kt.prototype.onPointerDown=function(wt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||wt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Lt=this.markers.find(function(Zt){return Zt.ownsTarget(wt.target)});Lt!==void 0?(this.setCurrentMarker(Lt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:wt.clientX,y:wt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(wt.clientX,wt.clientY))},Kt.prototype.onDblClick=function(wt){if(this._isFocused||this.focus(),this.mode==="select"){var Lt=this.markers.find(function(Zt){return Zt.ownsTarget(wt.target)});Lt!==void 0&&Lt!==this._currentMarker&&this.setCurrentMarker(Lt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(wt.clientX,wt.clientY),wt.target):this.setCurrentMarker()}},Kt.prototype.onPointerMove=function(wt){this.touchPoints!==1&&wt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||wt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(wt.clientX,wt.clientY)):this.zoomLevel>1&&this.panTo({x:wt.clientX,y:wt.clientY}))},Kt.prototype.onPointerUp=function(wt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(wt.clientX,wt.clientY)),this.isDragging=!1,this.addUndoStep()},Kt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Kt.prototype.onKeyUp=function(wt){this._currentMarker===void 0||this.notesArea!==void 0||wt.key!=="Delete"&&wt.key!=="Backspace"||this.deleteSelectedMarker()},Kt.prototype.clientToLocalCoordinates=function(wt,Lt){var Zt=this.markerImage.getBoundingClientRect();return{x:(wt-Zt.left)/this.zoomLevel,y:(Lt-Zt.top)/this.zoomLevel}},Kt.prototype.onWindowResize=function(){this.positionUI()},Kt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var wt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=wt+"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()},Kt.prototype.addLicenseKey=function(wt){gt.addKey(wt)},Kt.prototype.addEventListener=function(wt,Lt){this.eventListeners.addEventListener(wt,Lt)},Kt.prototype.removeEventListener=function(wt,Lt){this.eventListeners.removeEventListener(wt,Lt)},Kt.prototype.renderState=function(wt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(wt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Kt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Kt.prototype.focus=function(){var wt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Lt){return Lt(new fe(wt))}))},Kt.prototype.blur=function(){var wt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Lt){return Lt(new fe(wt))}))},Kt.instanceCounter=0,Kt}()},63727:function(pn,dn,ue){"use strict";ue.d(dn,{s:function(){return Pe},default:function(){return Ke}});var ae=ue(67711),Re=ue(98506),ot=ue(15142),zt=ue(16886),Bt=ue(33346),vt=ue(37463),gt=ue(6551),kt=ue(6089),Ct=ue(18929),yt=ue(59301),Tt=yt.createContext({}),mt=Tt,xt=ue(26420),ft=ue(52873),z="__rc_cascader_search_mark__",tt=function(We,He,rn){var ln=rn.label,un=ln===void 0?"":ln;return He.some(function(bn){return String(bn[un]).toLowerCase().includes(We.toLowerCase())})},at=function(We,He,rn,ln){return He.map(function(un){return un[ln.label]}).join(" / ")},it=function(We,He,rn,ln,un,bn){var In=un.filter,jn=In===void 0?tt:In,Kn=un.render,kr=Kn===void 0?at:Kn,pr=un.limit,Er=pr===void 0?50:pr,Or=un.sort;return yt.useMemo(function(){var jr=[];if(!We)return[];function yr(rr,Rr){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;rr.forEach(function(Qn){if(!(!Or&&Er!==!1&&Er>0&&jr.length>=Er)){var Vn=[].concat((0,ot.Z)(Rr),[Qn]),Rn=Qn[rn.children],zn=te||Qn.disabled;if((!Rn||Rn.length===0||bn)&&jn(We,Vn,{label:rn.label})){var Wn;jr.push((0,Re.Z)((0,Re.Z)({},Qn),{},(Wn={disabled:zn},(0,ft.Z)(Wn,rn.label,kr(We,Vn,ln,rn)),(0,ft.Z)(Wn,z,Vn),(0,ft.Z)(Wn,rn.children,void 0),Wn)))}Rn&&yr(Qn[rn.children],Vn,zn)}})}return yr(He,[]),Or&&jr.sort(function(rr,Rr){return Or(rr[z],Rr[z],We,rn)}),Er!==!1&&Er>0?jr.slice(0,Er):jr},[We,He,rn,ln,kr,bn,jn,Or,Er])},lt=it,ut="__RC_CASCADER_SPLIT__",dt="SHOW_PARENT",bt="SHOW_CHILD";function At(Ue){return Ue.join(ut)}function Dt(Ue){return Ue.map(At)}function Ft(Ue){return Ue.split(ut)}function jt(Ue){var We=Ue||{},He=We.label,rn=We.value,ln=We.children,un=rn||"value";return{label:He||"label",value:un,key:un,children:ln||"children"}}function Nt(Ue,We){var He,rn;return(He=Ue.isLeaf)!==null&&He!==void 0?He:!((rn=Ue[We.children])!==null&&rn!==void 0&&rn.length)}function _t(Ue){var We=Ue.parentElement;if(We){var He=Ue.offsetTop-We.offsetTop;He-We.scrollTop<0?We.scrollTo({top:He}):He+Ue.offsetHeight-We.scrollTop>We.offsetHeight&&We.scrollTo({top:He+Ue.offsetHeight-We.offsetHeight})}}function Wt(Ue,We){return Ue.map(function(He){var rn;return(rn=He[z])===null||rn===void 0?void 0:rn.map(function(ln){return ln[We.value]})})}function Jt(Ue){return Array.isArray(Ue)&&Array.isArray(Ue[0])}function Ut(Ue){return Ue?Jt(Ue)?Ue:(Ue.length===0?[]:[Ue]).map(function(We){return Array.isArray(We)?We:[We]}):[]}function Vt(Ue,We,He){var rn=new Set(Ue),ln=We();return Ue.filter(function(un){var bn=ln[un],In=bn?bn.parent:null,jn=bn?bn.children:null;return bn&&bn.node.disabled?!0:He===bt?!(jn&&jn.some(function(Kn){return Kn.key&&rn.has(Kn.key)})):!(In&&!In.node.disabled&&rn.has(In.key))})}function oe(Ue,We,He){for(var rn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ln=We,un=[],bn=function(){var Kn,kr,pr,Er=Ue[In],Or=(Kn=ln)===null||Kn===void 0?void 0:Kn.findIndex(function(yr){var rr=yr[He.value];return rn?String(rr)===String(Er):rr===Er}),jr=Or!==-1?(kr=ln)===null||kr===void 0?void 0:kr[Or]:null;un.push({value:(pr=jr==null?void 0:jr[He.value])!==null&&pr!==void 0?pr:Er,index:Or,option:jr}),ln=jr==null?void 0:jr[He.children]},In=0;In<Ue.length;In+=1)bn();return un}var se=function(Ue,We,He,rn,ln){return yt.useMemo(function(){var un=ln||function(bn){var In=rn?bn.slice(-1):bn,jn=" / ";return In.every(function(Kn){return["string","number"].includes((0,xt.Z)(Kn))})?In.join(jn):In.reduce(function(Kn,kr,pr){var Er=yt.isValidElement(kr)?yt.cloneElement(kr,{key:pr}):kr;return pr===0?[Er]:[].concat((0,ot.Z)(Kn),[jn,Er])},[])};return Ue.map(function(bn){var In,jn=oe(bn,We,He),Kn=un(jn.map(function(pr){var Er,Or=pr.option,jr=pr.value;return(Er=Or==null?void 0:Or[He.label])!==null&&Er!==void 0?Er:jr}),jn.map(function(pr){var Er=pr.option;return Er})),kr=At(bn);return{label:Kn,value:kr,key:kr,valueCells:bn,disabled:(In=jn[jn.length-1])===null||In===void 0||(In=In.option)===null||In===void 0?void 0:In.disabled}})},[Ue,We,He,ln,rn])};function he(Ue,We){return yt.useCallback(function(He){var rn=[],ln=[];return He.forEach(function(un){var bn=oe(un,Ue,We);bn.every(function(In){return In.option})?ln.push(un):rn.push(un)}),[ln,rn]},[Ue,We])}var be=ue(34061),Yt=function(Ue,We){var He=yt.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),rn=yt.useCallback(function(){return He.current.options!==Ue&&(He.current.options=Ue,He.current.info=(0,be.I8)(Ue,{fieldNames:We,initWrapper:function(un){return(0,Re.Z)((0,Re.Z)({},un),{},{pathKeyEntities:{}})},processEntity:function(un,bn){var In=un.nodes.map(function(jn){return jn[We.value]}).join(ut);bn.pathKeyEntities[In]=un,un.key=In}})),He.current.info.pathKeyEntities},[We,Ue]);return rn};function ne(Ue,We){var He=yt.useMemo(function(){return We||[]},[We]),rn=Yt(He,Ue),ln=yt.useCallback(function(un){var bn=rn();return un.map(function(In){var jn=bn[In].nodes;return jn.map(function(Kn){return Kn[Ue.value]})})},[rn,Ue]);return[He,rn,ln]}var ve=ue(48736);function Se(Ue){return yt.useMemo(function(){if(!Ue)return[!1,{}];var We={matchInputWidth:!0,limit:50};return Ue&&(0,xt.Z)(Ue)==="object"&&(We=(0,Re.Z)((0,Re.Z)({},We),Ue)),We.limit<=0&&(We.limit=!1),[!0,We]},[Ue])}var we=ue(34643);function ce(Ue,We,He,rn,ln,un,bn,In){return function(jn){if(!Ue)We(jn);else{var Kn=At(jn),kr=Dt(He),pr=Dt(rn),Er=kr.includes(Kn),Or=ln.some(function(zn){return At(zn)===Kn}),jr=He,yr=ln;if(Or&&!Er)yr=ln.filter(function(zn){return At(zn)!==Kn});else{var rr=Er?kr.filter(function(zn){return zn!==Kn}):[].concat((0,ot.Z)(kr),[Kn]),Rr=un(),te;if(Er){var Qn=(0,we.S)(rr,{checked:!1,halfCheckedKeys:pr},Rr);te=Qn.checkedKeys}else{var Vn=(0,we.S)(rr,!0,Rr);te=Vn.checkedKeys}var Rn=Vt(te,un,In);jr=bn(Rn)}We([].concat((0,ot.Z)(yr),(0,ot.Z)(jr)))}}}function de(Ue,We,He,rn,ln){return yt.useMemo(function(){var un=ln(We),bn=(0,zt.Z)(un,2),In=bn[0],jn=bn[1];if(!Ue||!We.length)return[In,[],jn];var Kn=Dt(In),kr=He(),pr=(0,we.S)(Kn,!0,kr),Er=pr.checkedKeys,Or=pr.halfCheckedKeys;return[rn(Er),rn(Or),jn]},[Ue,We,He,rn,ln])}var le=ue(92310),Ce=ue.n(le),fe=yt.memo(function(Ue){var We=Ue.children;return We},function(Ue,We){return!We.open}),me=fe;function ke(Ue){var We,He=Ue.prefixCls,rn=Ue.checked,ln=Ue.halfChecked,un=Ue.disabled,bn=Ue.onClick,In=Ue.disableCheckbox,jn=yt.useContext(mt),Kn=jn.checkable,kr=typeof Kn!="boolean"?Kn:null;return yt.createElement("span",{className:Ce()("".concat(He),(We={},(0,ft.Z)(We,"".concat(He,"-checked"),rn),(0,ft.Z)(We,"".concat(He,"-indeterminate"),!rn&&ln),(0,ft.Z)(We,"".concat(He,"-disabled"),un||In),We)),onClick:bn},kr)}var pe="__cascader_fix_label__";function qt(Ue){var We=Ue.prefixCls,He=Ue.multiple,rn=Ue.options,ln=Ue.activeValue,un=Ue.prevValuePath,bn=Ue.onToggleOpen,In=Ue.onSelect,jn=Ue.onActive,Kn=Ue.checkedSet,kr=Ue.halfCheckedSet,pr=Ue.loadingKeys,Er=Ue.isSelectable,Or=Ue.disabled,jr="".concat(We,"-menu"),yr="".concat(We,"-menu-item"),rr=yt.useContext(mt),Rr=rr.fieldNames,te=rr.changeOnSelect,Qn=rr.expandTrigger,Vn=rr.expandIcon,Rn=rr.loadingIcon,zn=rr.dropdownMenuColumnStyle,Wn=rr.optionRender,tr=Qn==="hover",Ar=function(Ye){return Or||Ye},sn=yt.useMemo(function(){return rn.map(function(tn){var Ye,hn=tn.disabled,nr=tn.disableCheckbox,Zn=tn[z],mr=(Ye=tn[pe])!==null&&Ye!==void 0?Ye:tn[Rr.label],an=tn[Rr.value],mn=Nt(tn,Rr),$n=Zn?Zn.map(function(An){return An[Rr.value]}):[].concat((0,ot.Z)(un),[an]),fr=At($n),Mn=pr.includes(fr),je=Kn.has(fr),Ve=kr.has(fr);return{disabled:hn,label:mr,value:an,isLeaf:mn,isLoading:Mn,checked:je,halfChecked:Ve,option:tn,disableCheckbox:nr,fullPath:$n,fullPathKey:fr}})},[rn,Kn,Rr,kr,pr,un]);return yt.createElement("ul",{className:jr,role:"menu"},sn.map(function(tn){var Ye,hn=tn.disabled,nr=tn.label,Zn=tn.value,mr=tn.isLeaf,an=tn.isLoading,mn=tn.checked,$n=tn.halfChecked,fr=tn.option,Mn=tn.fullPath,je=tn.fullPathKey,Ve=tn.disableCheckbox,An=function(){if(!Ar(hn)){var Xn=(0,ot.Z)(Mn);tr&&mr&&Xn.pop(),jn(Xn)}},En=function(){Er(fr)&&!Ar(hn)&&In(Mn,mr)},$e;return typeof fr.title=="string"?$e=fr.title:typeof nr=="string"&&($e=nr),yt.createElement("li",{key:je,className:Ce()(yr,(Ye={},(0,ft.Z)(Ye,"".concat(yr,"-expand"),!mr),(0,ft.Z)(Ye,"".concat(yr,"-active"),ln===Zn||ln===je),(0,ft.Z)(Ye,"".concat(yr,"-disabled"),Ar(hn)),(0,ft.Z)(Ye,"".concat(yr,"-loading"),an),Ye)),style:zn,role:"menuitemcheckbox",title:$e,"aria-checked":mn,"data-path-key":je,onClick:function(){An(),!Ve&&(!He||mr)&&En()},onDoubleClick:function(){te&&bn(!1)},onMouseEnter:function(){tr&&An()},onMouseDown:function(Xn){Xn.preventDefault()}},He&&yt.createElement(ke,{prefixCls:"".concat(We,"-checkbox"),checked:mn,halfChecked:$n,disabled:Ar(hn)||Ve,disableCheckbox:Ve,onClick:function(Xn){Ve||(Xn.stopPropagation(),En())}}),yt.createElement("div",{className:"".concat(yr,"-content")},Wn?Wn(fr):nr),!an&&Vn&&!mr&&yt.createElement("div",{className:"".concat(yr,"-expand-icon")},Vn),an&&Rn&&yt.createElement("div",{className:"".concat(yr,"-loading-icon")},Rn))}))}var Kt=function(We,He){var rn=yt.useContext(mt),ln=rn.values,un=ln[0],bn=yt.useState([]),In=(0,zt.Z)(bn,2),jn=In[0],Kn=In[1];return yt.useEffect(function(){We||Kn(un||[])},[He,un]),[jn,Kn]},wt=Kt,Lt=ue(10228),Zt=function(Ue,We,He,rn,ln,un,bn){var In=bn.direction,jn=bn.searchValue,Kn=bn.toggleOpen,kr=bn.open,pr=In==="rtl",Er=yt.useMemo(function(){for(var zn=-1,Wn=We,tr=[],Ar=[],sn=rn.length,tn=Wt(We,He),Ye=function(an){var mn=Wn.findIndex(function($n,fr){return(tn[fr]?At(tn[fr]):$n[He.value])===rn[an]});if(mn===-1)return 1;zn=mn,tr.push(zn),Ar.push(rn[an]),Wn=Wn[zn][He.children]},hn=0;hn<sn&&Wn&&!Ye(hn);hn+=1);for(var nr=We,Zn=0;Zn<tr.length-1;Zn+=1)nr=nr[tr[Zn]][He.children];return[Ar,zn,nr,tn]},[rn,He,We]),Or=(0,zt.Z)(Er,4),jr=Or[0],yr=Or[1],rr=Or[2],Rr=Or[3],te=function(Wn){ln(Wn)},Qn=function(Wn){var tr=rr.length,Ar=yr;Ar===-1&&Wn<0&&(Ar=tr);for(var sn=0;sn<tr;sn+=1){Ar=(Ar+Wn+tr)%tr;var tn=rr[Ar];if(tn&&!tn.disabled){var Ye=jr.slice(0,-1).concat(Rr[Ar]?At(Rr[Ar]):tn[He.value]);te(Ye);return}}},Vn=function(){if(jr.length>1){var Wn=jr.slice(0,-1);te(Wn)}else Kn(!1)},Rn=function(){var Wn,tr=((Wn=rr[yr])===null||Wn===void 0?void 0:Wn[He.children])||[],Ar=tr.find(function(tn){return!tn.disabled});if(Ar){var sn=[].concat((0,ot.Z)(jr),[Ar[He.value]]);te(sn)}};yt.useImperativeHandle(Ue,function(){return{onKeyDown:function(Wn){var tr=Wn.which;switch(tr){case Lt.Z.UP:case Lt.Z.DOWN:{var Ar=0;tr===Lt.Z.UP?Ar=-1:tr===Lt.Z.DOWN&&(Ar=1),Ar!==0&&Qn(Ar);break}case Lt.Z.LEFT:{if(jn)break;pr?Rn():Vn();break}case Lt.Z.RIGHT:{if(jn)break;pr?Vn():Rn();break}case Lt.Z.BACKSPACE:{jn||Vn();break}case Lt.Z.ENTER:{if(jr.length){var sn=rr[yr],tn=(sn==null?void 0:sn[z])||[];tn.length?un(tn.map(function(Ye){return Ye[He.value]}),tn[tn.length-1]):un(jr,rr[yr])}break}case Lt.Z.ESC:Kn(!1),kr&&Wn.stopPropagation()}},onKeyUp:function(){}}})},ee=yt.forwardRef(function(Ue,We){var He,rn,ln,un=Ue.prefixCls,bn=Ue.multiple,In=Ue.searchValue,jn=Ue.toggleOpen,Kn=Ue.notFoundContent,kr=Ue.direction,pr=Ue.open,Er=Ue.disabled,Or=yt.useRef(null),jr=kr==="rtl",yr=yt.useContext(mt),rr=yr.options,Rr=yr.values,te=yr.halfValues,Qn=yr.fieldNames,Vn=yr.changeOnSelect,Rn=yr.onSelect,zn=yr.searchOptions,Wn=yr.dropdownPrefixCls,tr=yr.loadData,Ar=yr.expandTrigger,sn=Wn||un,tn=yt.useState([]),Ye=(0,zt.Z)(tn,2),hn=Ye[0],nr=Ye[1],Zn=function(sr){if(!(!tr||In)){var or=oe(sr,rr,Qn),xn=or.map(function(ei){var xi=ei.option;return xi}),Gn=xn[xn.length-1];if(Gn&&!Nt(Gn,Qn)){var Yr=At(sr);nr(function(ei){return[].concat((0,ot.Z)(ei),[Yr])}),tr(xn)}}};yt.useEffect(function(){hn.length&&hn.forEach(function(Dn){var sr=Ft(Dn),or=oe(sr,rr,Qn,!0).map(function(Gn){var Yr=Gn.option;return Yr}),xn=or[or.length-1];(!xn||xn[Qn.children]||Nt(xn,Qn))&&nr(function(Gn){return Gn.filter(function(Yr){return Yr!==Dn})})})},[rr,hn,Qn]);var mr=yt.useMemo(function(){return new Set(Dt(Rr))},[Rr]),an=yt.useMemo(function(){return new Set(Dt(te))},[te]),mn=wt(bn,pr),$n=(0,zt.Z)(mn,2),fr=$n[0],Mn=$n[1],je=function(sr){Mn(sr),Zn(sr)},Ve=function(sr){if(Er)return!1;var or=sr.disabled,xn=Nt(sr,Qn);return!or&&(xn||Vn||bn)},An=function(sr,or){var xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Rn(sr),!bn&&(or||Vn&&(Ar==="hover"||xn))&&jn(!1)},En=yt.useMemo(function(){return In?zn:rr},[In,zn,rr]),$e=yt.useMemo(function(){for(var Dn=[{options:En}],sr=En,or=Wt(sr,Qn),xn=function(){var ei=fr[Gn],xi=sr.find(function(cr,_r){return(or[_r]?At(or[_r]):cr[Qn.value])===ei}),Je=xi==null?void 0:xi[Qn.children];if(!(Je!=null&&Je.length))return 1;sr=Je,Dn.push({options:Je})},Gn=0;Gn<fr.length&&!xn();Gn+=1);return Dn},[En,fr,Qn]),Tn=function(sr,or){Ve(or)&&An(sr,Nt(or,Qn),!0)};Zt(We,En,Qn,fr,je,Tn,{direction:kr,searchValue:In,toggleOpen:jn,open:pr}),yt.useEffect(function(){if(!In)for(var Dn=0;Dn<fr.length;Dn+=1){var sr,or=fr.slice(0,Dn+1),xn=At(or),Gn=(sr=Or.current)===null||sr===void 0?void 0:sr.querySelector('li[data-path-key="'.concat(xn.replace(/\\{0,2}"/g,'\\"'),'"]'));Gn&&_t(Gn)}},[fr,In]);var Xn=!((He=$e[0])!==null&&He!==void 0&&(He=He.options)!==null&&He!==void 0&&He.length),hr=[(rn={},(0,ft.Z)(rn,Qn.value,"__EMPTY__"),(0,ft.Z)(rn,pe,Kn),(0,ft.Z)(rn,"disabled",!0),rn)],xr=(0,Re.Z)((0,Re.Z)({},Ue),{},{multiple:!Xn&&bn,onSelect:An,onActive:je,onToggleOpen:jn,checkedSet:mr,halfCheckedSet:an,loadingKeys:hn,isSelectable:Ve}),On=Xn?[{options:hr}]:$e,Fn=On.map(function(Dn,sr){var or=fr.slice(0,sr),xn=fr[sr];return yt.createElement(qt,(0,ae.Z)({key:sr},xr,{prefixCls:sn,options:Dn.options,prevValuePath:or,activeValue:xn}))});return yt.createElement(me,{open:pr},yt.createElement("div",{className:Ce()("".concat(sn,"-menus"),(ln={},(0,ft.Z)(ln,"".concat(sn,"-menu-empty"),Xn),(0,ft.Z)(ln,"".concat(sn,"-rtl"),jr),ln)),ref:Or},Fn))}),It=ee,Rt=yt.forwardRef(function(Ue,We){var He=(0,vt.lk)();return yt.createElement(It,(0,ae.Z)({},Ue,He,{ref:We}))}),Ht=Rt,re=ue(70425);function ye(){}function Pe(Ue){var We,He=Ue,rn=He.prefixCls,ln=rn===void 0?"rc-cascader":rn,un=He.style,bn=He.className,In=He.options,jn=He.checkable,Kn=He.defaultValue,kr=He.value,pr=He.fieldNames,Er=He.changeOnSelect,Or=He.onChange,jr=He.showCheckedStrategy,yr=He.loadData,rr=He.expandTrigger,Rr=He.expandIcon,te=Rr===void 0?">":Rr,Qn=He.loadingIcon,Vn=He.direction,Rn=He.notFoundContent,zn=Rn===void 0?"Not Found":Rn,Wn=He.disabled,tr=!!jn,Ar=(0,re.C8)(Kn,{value:kr,postState:Ut}),sn=(0,zt.Z)(Ar,2),tn=sn[0],Ye=sn[1],hn=yt.useMemo(function(){return jt(pr)},[JSON.stringify(pr)]),nr=ne(hn,In),Zn=(0,zt.Z)(nr,3),mr=Zn[0],an=Zn[1],mn=Zn[2],$n=he(mr,hn),fr=de(tr,tn,an,mn,$n),Mn=(0,zt.Z)(fr,3),je=Mn[0],Ve=Mn[1],An=Mn[2],En=(0,re.zX)(function(On){if(Ye(On),Or){var Fn=Ut(On),Dn=Fn.map(function(xn){return oe(xn,mr,hn).map(function(Gn){return Gn.option})}),sr=tr?Fn:Fn[0],or=tr?Dn:Dn[0];Or(sr,or)}}),$e=ce(tr,En,je,Ve,An,an,mn,jr),Tn=(0,re.zX)(function(On){$e(On)}),Xn=yt.useMemo(function(){return{options:mr,fieldNames:hn,values:je,halfValues:Ve,changeOnSelect:Er,onSelect:Tn,checkable:jn,searchOptions:[],dropdownPrefixCls:void 0,loadData:yr,expandTrigger:rr,expandIcon:te,loadingIcon:Qn,dropdownMenuColumnStyle:void 0}},[mr,hn,je,Ve,Er,Tn,jn,yr,rr,te,Qn]),hr="".concat(ln,"-panel"),xr=!mr.length;return yt.createElement(mt.Provider,{value:Xn},yt.createElement("div",{className:Ce()(hr,(We={},(0,ft.Z)(We,"".concat(hr,"-rtl"),Vn==="rtl"),(0,ft.Z)(We,"".concat(hr,"-empty"),xr),We),bn),style:un},xr?zn:yt.createElement(It,{prefixCls:ln,searchValue:"",multiple:tr,toggleOpen:ye,open:!0,direction:Vn,disabled:Wn})))}function Ae(Ue){var We=Ue.onPopupVisibleChange,He=Ue.popupVisible,rn=Ue.popupClassName,ln=Ue.popupPlacement;warning(!We,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(He===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(rn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(ln===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Oe(Ue,We){if(Ue){var He=function rn(ln){for(var un=0;un<ln.length;un++){var bn=ln[un];if(bn[We==null?void 0:We.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(bn[We==null?void 0:We.children])&&rn(bn[We==null?void 0:We.children]))return!0}};He(Ue)}}var Ie=null,Qe=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],qe=yt.forwardRef(function(Ue,We){var He=Ue.id,rn=Ue.prefixCls,ln=rn===void 0?"rc-cascader":rn,un=Ue.fieldNames,bn=Ue.defaultValue,In=Ue.value,jn=Ue.changeOnSelect,Kn=Ue.onChange,kr=Ue.displayRender,pr=Ue.checkable,Er=Ue.autoClearSearchValue,Or=Er===void 0?!0:Er,jr=Ue.searchValue,yr=Ue.onSearch,rr=Ue.showSearch,Rr=Ue.expandTrigger,te=Ue.options,Qn=Ue.dropdownPrefixCls,Vn=Ue.loadData,Rn=Ue.popupVisible,zn=Ue.open,Wn=Ue.popupClassName,tr=Ue.dropdownClassName,Ar=Ue.dropdownMenuColumnStyle,sn=Ue.dropdownStyle,tn=Ue.popupPlacement,Ye=Ue.placement,hn=Ue.onDropdownVisibleChange,nr=Ue.onPopupVisibleChange,Zn=Ue.expandIcon,mr=Zn===void 0?">":Zn,an=Ue.loadingIcon,mn=Ue.children,$n=Ue.dropdownMatchSelectWidth,fr=$n===void 0?!1:$n,Mn=Ue.showCheckedStrategy,je=Mn===void 0?dt:Mn,Ve=Ue.optionRender,An=(0,Bt.Z)(Ue,Qe),En=(0,gt.ZP)(He),$e=!!pr,Tn=(0,Ct.Z)(bn,{value:In,postState:Ut}),Xn=(0,zt.Z)(Tn,2),hr=Xn[0],xr=Xn[1],On=yt.useMemo(function(){return jt(un)},[JSON.stringify(un)]),Fn=ne(On,te),Dn=(0,zt.Z)(Fn,3),sr=Dn[0],or=Dn[1],xn=Dn[2],Gn=(0,Ct.Z)("",{value:jr,postState:function(Ji){return Ji||""}}),Yr=(0,zt.Z)(Gn,2),ei=Yr[0],xi=Yr[1],Je=function(Ji,Zi){xi(Ji),Zi.source!=="blur"&&yr&&yr(Ji)},cr=Se(rr),_r=(0,zt.Z)(cr,2),ir=_r[0],oi=_r[1],Jr=lt(ei,sr,On,Qn||ln,oi,jn||$e),ni=he(sr,On),Kr=de($e,hr,or,xn,ni),$r=(0,zt.Z)(Kr,3),hi=$r[0],yn=$r[1],mi=$r[2],vn=yt.useMemo(function(){var so=Dt(hi),Ji=Vt(so,or,je);return[].concat((0,ot.Z)(mi),(0,ot.Z)(xn(Ji)))},[hi,or,xn,mi,je]),ii=se(vn,sr,On,$e,kr),Gi=(0,kt.Z)(function(so){if(xr(so),Kn){var Ji=Ut(so),Zi=Ji.map(function(wr){return oe(wr,sr,On).map(function(Vr){return Vr.option})}),di=$e?Ji:Ji[0],lr=$e?Zi:Zi[0];Kn(di,lr)}}),gi=ce($e,Gi,hi,yn,mi,or,xn,je),Bi=(0,kt.Z)(function(so){(!$e||Or)&&xi(""),gi(so)}),ri=function(Ji,Zi){if(Zi.type==="clear"){Gi([]);return}var di=Zi.values[0],lr=di.valueCells;Bi(lr)},Br=zn!==void 0?zn:Rn,wi=tr||Wn,Eo=Ye||tn,Oi=function(Ji){hn==null||hn(Ji),nr==null||nr(Ji)},Yn=yt.useMemo(function(){return{options:sr,fieldNames:On,values:hi,halfValues:yn,changeOnSelect:jn,onSelect:Bi,checkable:pr,searchOptions:Jr,dropdownPrefixCls:Qn,loadData:Vn,expandTrigger:Rr,expandIcon:mr,loadingIcon:an,dropdownMenuColumnStyle:Ar,optionRender:Ve}},[sr,On,hi,yn,jn,Bi,pr,Jr,Qn,Vn,Rr,mr,an,Ar,Ve]),Le=!(ei?Jr:sr).length,Ti=ei&&oi.matchInputWidth||Le?{}:{minWidth:"auto"};return yt.createElement(mt.Provider,{value:Yn},yt.createElement(vt.Ac,(0,ae.Z)({},An,{ref:We,id:En,prefixCls:ln,autoClearSearchValue:Or,dropdownMatchSelectWidth:fr,dropdownStyle:(0,Re.Z)((0,Re.Z)({},Ti),sn),displayValues:ii,onDisplayValuesChange:ri,mode:$e?"multiple":void 0,searchValue:ei,onSearch:Je,showSearch:ir,OptionList:Ht,emptyOptions:Le,open:Br,dropdownClassName:wi,placement:Eo,onDropdownVisibleChange:Oi,getRawInputElement:function(){return mn}})))});qe.SHOW_PARENT=dt,qe.SHOW_CHILD=bt,qe.Panel=Pe;var nn=qe,Ke=nn},98535:function(pn,dn,ue){"use strict";ue.r(dn),ue.d(dn,{Panel:function(){return Ut},default:function(){return Jt}});var ae=ue(67711),Re=ue(15142),ot=ue(16886),zt=ue(26420),Bt=ue(92310),vt=ue.n(Bt),gt=ue(18929),kt=ue(48736),Ct=ue(59301),yt=ue(33346),Tt=ue(11592),mt=ue(98506),xt=ue(52873),ft=ue(77900),z=ue(10228),tt=Ct.forwardRef(function(Vt,oe){var se=Vt.prefixCls,he=Vt.forceRender,be=Vt.className,Yt=Vt.style,ne=Vt.children,ve=Vt.isActive,Se=Vt.role,we=Vt.classNames,ce=Vt.styles,de=Ct.useState(ve||he),le=(0,ot.Z)(de,2),Ce=le[0],fe=le[1];return Ct.useEffect(function(){(he||ve)&&fe(!0)},[he,ve]),Ce?Ct.createElement("div",{ref:oe,className:vt()("".concat(se,"-content"),(0,xt.Z)((0,xt.Z)({},"".concat(se,"-content-active"),ve),"".concat(se,"-content-inactive"),!ve),be),style:Yt,role:Se},Ct.createElement("div",{className:vt()("".concat(se,"-content-box"),we==null?void 0:we.body),style:ce==null?void 0:ce.body},ne)):null});tt.displayName="PanelContent";var at=tt,it=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lt=Ct.forwardRef(function(Vt,oe){var se=Vt.showArrow,he=se===void 0?!0:se,be=Vt.headerClass,Yt=Vt.isActive,ne=Vt.onItemClick,ve=Vt.forceRender,Se=Vt.className,we=Vt.classNames,ce=we===void 0?{}:we,de=Vt.styles,le=de===void 0?{}:de,Ce=Vt.prefixCls,fe=Vt.collapsible,me=Vt.accordion,ke=Vt.panelKey,pe=Vt.extra,qt=Vt.header,Kt=Vt.expandIcon,wt=Vt.openMotion,Lt=Vt.destroyInactivePanel,Zt=Vt.children,ee=(0,yt.Z)(Vt,it),It=fe==="disabled",Rt=pe!=null&&typeof pe!="boolean",Ht=(0,xt.Z)((0,xt.Z)((0,xt.Z)({onClick:function(){ne==null||ne(ke)},onKeyDown:function(Qe){(Qe.key==="Enter"||Qe.keyCode===z.Z.ENTER||Qe.which===z.Z.ENTER)&&(ne==null||ne(ke))},role:me?"tab":"button"},"aria-expanded",Yt),"aria-disabled",It),"tabIndex",It?-1:0),re=typeof Kt=="function"?Kt(Vt):Ct.createElement("i",{className:"arrow"}),ye=re&&Ct.createElement("div",(0,ae.Z)({className:"".concat(Ce,"-expand-icon")},["header","icon"].includes(fe)?Ht:{}),re),Pe=vt()("".concat(Ce,"-item"),(0,xt.Z)((0,xt.Z)({},"".concat(Ce,"-item-active"),Yt),"".concat(Ce,"-item-disabled"),It),Se),Ae=vt()(be,"".concat(Ce,"-header"),(0,xt.Z)({},"".concat(Ce,"-collapsible-").concat(fe),!!fe),ce.header),Oe=(0,mt.Z)({className:Ae,style:le.header},["header","icon"].includes(fe)?{}:Ht);return Ct.createElement("div",(0,ae.Z)({},ee,{ref:oe,className:Pe}),Ct.createElement("div",Oe,he&&ye,Ct.createElement("span",(0,ae.Z)({className:"".concat(Ce,"-header-text")},fe==="header"?Ht:{}),qt),Rt&&Ct.createElement("div",{className:"".concat(Ce,"-extra")},pe)),Ct.createElement(ft.default,(0,ae.Z)({visible:Yt,leavedClassName:"".concat(Ce,"-content-hidden")},wt,{forceRender:ve,removeOnLeave:Lt}),function(Ie,Qe){var qe=Ie.className,nn=Ie.style;return Ct.createElement(at,{ref:Qe,prefixCls:Ce,className:qe,classNames:ce,style:nn,styles:le,isActive:Yt,forceRender:ve,role:me?"tabpanel":void 0},Zt)}))}),ut=lt,dt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],bt=function(oe,se){var he=se.prefixCls,be=se.accordion,Yt=se.collapsible,ne=se.destroyInactivePanel,ve=se.onItemClick,Se=se.activeKey,we=se.openMotion,ce=se.expandIcon;return oe.map(function(de,le){var Ce=de.children,fe=de.label,me=de.key,ke=de.collapsible,pe=de.onItemClick,qt=de.destroyInactivePanel,Kt=(0,yt.Z)(de,dt),wt=String(me!=null?me:le),Lt=ke!=null?ke:Yt,Zt=qt!=null?qt:ne,ee=function(Ht){Lt!=="disabled"&&(ve(Ht),pe==null||pe(Ht))},It=!1;return be?It=Se[0]===wt:It=Se.indexOf(wt)>-1,Ct.createElement(ut,(0,ae.Z)({},Kt,{prefixCls:he,key:wt,panelKey:wt,isActive:It,accordion:be,openMotion:we,expandIcon:ce,header:fe,collapsible:Lt,onItemClick:ee,destroyInactivePanel:Zt}),Ce)})},At=function(oe,se,he){if(!oe)return null;var be=he.prefixCls,Yt=he.accordion,ne=he.collapsible,ve=he.destroyInactivePanel,Se=he.onItemClick,we=he.activeKey,ce=he.openMotion,de=he.expandIcon,le=oe.key||String(se),Ce=oe.props,fe=Ce.header,me=Ce.headerClass,ke=Ce.destroyInactivePanel,pe=Ce.collapsible,qt=Ce.onItemClick,Kt=!1;Yt?Kt=we[0]===le:Kt=we.indexOf(le)>-1;var wt=pe!=null?pe:ne,Lt=function(It){wt!=="disabled"&&(Se(It),qt==null||qt(It))},Zt={key:le,panelKey:le,header:fe,headerClass:me,isActive:Kt,prefixCls:be,destroyInactivePanel:ke!=null?ke:ve,openMotion:ce,accordion:Yt,children:oe.props.children,onItemClick:Lt,expandIcon:de,collapsible:wt};return typeof oe.type=="string"?oe:(Object.keys(Zt).forEach(function(ee){typeof Zt[ee]=="undefined"&&delete Zt[ee]}),Ct.cloneElement(oe,Zt))};function Dt(Vt,oe,se){return Array.isArray(Vt)?bt(Vt,se):(0,Tt.Z)(oe).map(function(he,be){return At(he,be,se)})}var Ft=Dt,jt=ue(26112);function Nt(Vt){var oe=Vt;if(!Array.isArray(oe)){var se=(0,zt.Z)(oe);oe=se==="number"||se==="string"?[oe]:[]}return oe.map(function(he){return String(he)})}var _t=Ct.forwardRef(function(Vt,oe){var se=Vt.prefixCls,he=se===void 0?"rc-collapse":se,be=Vt.destroyInactivePanel,Yt=be===void 0?!1:be,ne=Vt.style,ve=Vt.accordion,Se=Vt.className,we=Vt.children,ce=Vt.collapsible,de=Vt.openMotion,le=Vt.expandIcon,Ce=Vt.activeKey,fe=Vt.defaultActiveKey,me=Vt.onChange,ke=Vt.items,pe=vt()(he,Se),qt=(0,gt.Z)([],{value:Ce,onChange:function(Rt){return me==null?void 0:me(Rt)},defaultValue:fe,postState:Nt}),Kt=(0,ot.Z)(qt,2),wt=Kt[0],Lt=Kt[1],Zt=function(Rt){return Lt(function(){if(ve)return wt[0]===Rt?[]:[Rt];var Ht=wt.indexOf(Rt),re=Ht>-1;return re?wt.filter(function(ye){return ye!==Rt}):[].concat((0,Re.Z)(wt),[Rt])})};(0,kt.ZP)(!we,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var ee=Ft(ke,we,{prefixCls:he,accordion:ve,openMotion:de,expandIcon:le,collapsible:ce,destroyInactivePanel:Yt,onItemClick:Zt,activeKey:wt});return Ct.createElement("div",(0,ae.Z)({ref:oe,className:pe,style:ne,role:ve?"tablist":void 0},(0,jt.Z)(Vt,{aria:!0,data:!0})),ee)}),Wt=Object.assign(_t,{Panel:ut}),Jt=Wt,Ut=Wt.Panel},66042:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return Jt}});var ae=ue(98506),Re=ue(16886),ot=ue(43403),zt=ue(34280),Bt=ue(59301),vt=Bt.createContext(null),gt=Bt.createContext({}),kt=vt,Ct=ue(52873),yt=ue(67711),Tt=ue(92310),mt=ue.n(Tt),xt=ue(77900),ft=ue(10228),z=ue(26112),tt=ue(33346),at=ue(8654),it=["prefixCls","className","containerRef"],lt=function(Vt){var oe=Vt.prefixCls,se=Vt.className,he=Vt.containerRef,be=(0,tt.Z)(Vt,it),Yt=Bt.useContext(gt),ne=Yt.panel,ve=(0,at.x1)(ne,he);return Bt.createElement("div",(0,yt.Z)({className:mt()("".concat(oe,"-content"),se),role:"dialog",ref:ve},(0,z.Z)(Vt,{aria:!0}),{"aria-modal":"true"},be))},ut=lt,dt=ue(48736);function bt(Ut){return typeof Ut=="string"&&String(Number(Ut))===Ut?((0,dt.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ut)):Ut}function At(Ut){warning(!("wrapperClassName"in Ut),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ut.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Dt={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ft(Ut,Vt){var oe,se,he,be=Ut.prefixCls,Yt=Ut.open,ne=Ut.placement,ve=Ut.inline,Se=Ut.push,we=Ut.forceRender,ce=Ut.autoFocus,de=Ut.keyboard,le=Ut.classNames,Ce=Ut.rootClassName,fe=Ut.rootStyle,me=Ut.zIndex,ke=Ut.className,pe=Ut.id,qt=Ut.style,Kt=Ut.motion,wt=Ut.width,Lt=Ut.height,Zt=Ut.children,ee=Ut.mask,It=Ut.maskClosable,Rt=Ut.maskMotion,Ht=Ut.maskClassName,re=Ut.maskStyle,ye=Ut.afterOpenChange,Pe=Ut.onClose,Ae=Ut.onMouseEnter,Oe=Ut.onMouseOver,Ie=Ut.onMouseLeave,Qe=Ut.onClick,qe=Ut.onKeyDown,nn=Ut.onKeyUp,Ke=Ut.styles,Ue=Ut.drawerRender,We=Bt.useRef(),He=Bt.useRef(),rn=Bt.useRef();Bt.useImperativeHandle(Vt,function(){return We.current});var ln=function(Vn){var Rn=Vn.keyCode,zn=Vn.shiftKey;switch(Rn){case ft.Z.TAB:{if(Rn===ft.Z.TAB){if(!zn&&document.activeElement===rn.current){var Wn;(Wn=He.current)===null||Wn===void 0||Wn.focus({preventScroll:!0})}else if(zn&&document.activeElement===He.current){var tr;(tr=rn.current)===null||tr===void 0||tr.focus({preventScroll:!0})}}break}case ft.Z.ESC:{Pe&&de&&(Vn.stopPropagation(),Pe(Vn));break}}};Bt.useEffect(function(){if(Yt&&ce){var Qn;(Qn=We.current)===null||Qn===void 0||Qn.focus({preventScroll:!0})}},[Yt]);var un=Bt.useState(!1),bn=(0,Re.Z)(un,2),In=bn[0],jn=bn[1],Kn=Bt.useContext(kt),kr;typeof Se=="boolean"?kr=Se?{}:{distance:0}:kr=Se||{};var pr=(oe=(se=(he=kr)===null||he===void 0?void 0:he.distance)!==null&&se!==void 0?se:Kn==null?void 0:Kn.pushDistance)!==null&&oe!==void 0?oe:180,Er=Bt.useMemo(function(){return{pushDistance:pr,push:function(){jn(!0)},pull:function(){jn(!1)}}},[pr]);Bt.useEffect(function(){if(Yt){var Qn;Kn==null||(Qn=Kn.push)===null||Qn===void 0||Qn.call(Kn)}else{var Vn;Kn==null||(Vn=Kn.pull)===null||Vn===void 0||Vn.call(Kn)}},[Yt]),Bt.useEffect(function(){return function(){var Qn;Kn==null||(Qn=Kn.pull)===null||Qn===void 0||Qn.call(Kn)}},[]);var Or=ee&&Bt.createElement(xt.default,(0,yt.Z)({key:"mask"},Rt,{visible:Yt}),function(Qn,Vn){var Rn=Qn.className,zn=Qn.style;return Bt.createElement("div",{className:mt()("".concat(be,"-mask"),Rn,le==null?void 0:le.mask,Ht),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},zn),re),Ke==null?void 0:Ke.mask),onClick:It&&Yt?Pe:void 0,ref:Vn})}),jr=typeof Kt=="function"?Kt(ne):Kt,yr={};if(In&&pr)switch(ne){case"top":yr.transform="translateY(".concat(pr,"px)");break;case"bottom":yr.transform="translateY(".concat(-pr,"px)");break;case"left":yr.transform="translateX(".concat(pr,"px)");break;default:yr.transform="translateX(".concat(-pr,"px)");break}ne==="left"||ne==="right"?yr.width=bt(wt):yr.height=bt(Lt);var rr={onMouseEnter:Ae,onMouseOver:Oe,onMouseLeave:Ie,onClick:Qe,onKeyDown:qe,onKeyUp:nn},Rr=Bt.createElement(xt.default,(0,yt.Z)({key:"panel"},jr,{visible:Yt,forceRender:we,onVisibleChanged:function(Vn){ye==null||ye(Vn)},removeOnLeave:!1,leavedClassName:"".concat(be,"-content-wrapper-hidden")}),function(Qn,Vn){var Rn=Qn.className,zn=Qn.style,Wn=Bt.createElement(ut,(0,yt.Z)({id:pe,containerRef:Vn,prefixCls:be,className:mt()(ke,le==null?void 0:le.content),style:(0,ae.Z)((0,ae.Z)({},qt),Ke==null?void 0:Ke.content)},(0,z.Z)(Ut,{aria:!0}),rr),Zt);return Bt.createElement("div",(0,yt.Z)({className:mt()("".concat(be,"-content-wrapper"),le==null?void 0:le.wrapper,Rn),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},yr),zn),Ke==null?void 0:Ke.wrapper)},(0,z.Z)(Ut,{data:!0})),Ue?Ue(Wn):Wn)}),te=(0,ae.Z)({},fe);return me&&(te.zIndex=me),Bt.createElement(kt.Provider,{value:Er},Bt.createElement("div",{className:mt()(be,"".concat(be,"-").concat(ne),Ce,(0,Ct.Z)((0,Ct.Z)({},"".concat(be,"-open"),Yt),"".concat(be,"-inline"),ve)),style:te,tabIndex:-1,ref:We,onKeyDown:ln},Or,Bt.createElement("div",{tabIndex:0,ref:He,style:Dt,"aria-hidden":"true","data-sentinel":"start"}),Rr,Bt.createElement("div",{tabIndex:0,ref:rn,style:Dt,"aria-hidden":"true","data-sentinel":"end"})))}var jt=Bt.forwardRef(Ft),Nt=jt,_t=function(Vt){var oe=Vt.open,se=oe===void 0?!1:oe,he=Vt.prefixCls,be=he===void 0?"rc-drawer":he,Yt=Vt.placement,ne=Yt===void 0?"right":Yt,ve=Vt.autoFocus,Se=ve===void 0?!0:ve,we=Vt.keyboard,ce=we===void 0?!0:we,de=Vt.width,le=de===void 0?378:de,Ce=Vt.mask,fe=Ce===void 0?!0:Ce,me=Vt.maskClosable,ke=me===void 0?!0:me,pe=Vt.getContainer,qt=Vt.forceRender,Kt=Vt.afterOpenChange,wt=Vt.destroyOnClose,Lt=Vt.onMouseEnter,Zt=Vt.onMouseOver,ee=Vt.onMouseLeave,It=Vt.onClick,Rt=Vt.onKeyDown,Ht=Vt.onKeyUp,re=Vt.panelRef,ye=Bt.useState(!1),Pe=(0,Re.Z)(ye,2),Ae=Pe[0],Oe=Pe[1],Ie=Bt.useState(!1),Qe=(0,Re.Z)(Ie,2),qe=Qe[0],nn=Qe[1];(0,zt.Z)(function(){nn(!0)},[]);var Ke=qe?se:!1,Ue=Bt.useRef(),We=Bt.useRef();(0,zt.Z)(function(){Ke&&(We.current=document.activeElement)},[Ke]);var He=function(In){var jn;if(Oe(In),Kt==null||Kt(In),!In&&We.current&&!((jn=Ue.current)!==null&&jn!==void 0&&jn.contains(We.current))){var Kn;(Kn=We.current)===null||Kn===void 0||Kn.focus({preventScroll:!0})}},rn=Bt.useMemo(function(){return{panel:re}},[re]);if(!qt&&!Ae&&!Ke&&wt)return null;var ln={onMouseEnter:Lt,onMouseOver:Zt,onMouseLeave:ee,onClick:It,onKeyDown:Rt,onKeyUp:Ht},un=(0,ae.Z)((0,ae.Z)({},Vt),{},{open:Ke,prefixCls:be,placement:ne,autoFocus:Se,keyboard:ce,width:le,mask:fe,maskClosable:ke,inline:pe===!1,afterOpenChange:He,ref:Ue},ln);return Bt.createElement(gt.Provider,{value:rn},Bt.createElement(ot.Z,{open:Ke||qt||Ae,autoDestroy:!1,getContainer:pe,autoLock:fe&&(Ke||Ae)},Bt.createElement(Nt,un)))},Wt=_t,Jt=Wt},25930:function(pn,dn,ue){"use strict";ue.d(dn,{Cd:function(){return _t}});var ae=ue(67711),Re=ue(98506),ot=ue(33346),zt=ue(59301),Bt=ue(92310),vt=ue.n(Bt),gt={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},kt=function(){var Ut=(0,zt.useRef)([]),Vt=(0,zt.useRef)(null);return(0,zt.useEffect)(function(){var oe=Date.now(),se=!1;Ut.current.forEach(function(he){if(he){se=!0;var be=he.style;be.transitionDuration=".3s, .3s, .3s, .06s",Vt.current&&oe-Vt.current<100&&(be.transitionDuration="0s, 0s")}}),se&&(Vt.current=Date.now())}),Ut.current},Ct=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],yt=function(Ut){var Vt=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Vt.className,se=Vt.percent,he=Vt.prefixCls,be=Vt.strokeColor,Yt=Vt.strokeLinecap,ne=Vt.strokeWidth,ve=Vt.style,Se=Vt.trailColor,we=Vt.trailWidth,ce=Vt.transition,de=(0,ot.Z)(Vt,Ct);delete de.gapPosition;var le=Array.isArray(se)?se:[se],Ce=Array.isArray(be)?be:[be],fe=kt(),me=ne/2,ke=100-ne/2,pe="M ".concat(Yt==="round"?me:0,",").concat(me,`
L `).concat(Yt==="round"?ke:100,",").concat(me),qt="0 0 100 ".concat(ne),Kt=0;return zt.createElement("svg",(0,ae.Z)({className:vt()("".concat(he,"-line"),oe),viewBox:qt,preserveAspectRatio:"none",style:ve},de),zt.createElement("path",{className:"".concat(he,"-line-trail"),d:pe,strokeLinecap:Yt,stroke:Se,strokeWidth:we||ne,fillOpacity:"0"}),le.map(function(wt,Lt){var Zt=1;switch(Yt){case"round":Zt=1-ne/100;break;case"square":Zt=1-ne/2/100;break;default:Zt=1;break}var ee={strokeDasharray:"".concat(wt*Zt,"px, 100px"),strokeDashoffset:"-".concat(Kt,"px"),transition:ce||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},It=Ce[Lt]||Ce[Ce.length-1];return Kt+=wt,zt.createElement("path",{key:Lt,className:"".concat(he,"-line-path"),d:pe,strokeLinecap:Yt,stroke:It,strokeWidth:ne,fillOpacity:"0",ref:function(Ht){fe[Lt]=Ht},style:ee})}))},Tt=yt,mt=ue(26420),xt=ue(16886),ft=ue(47273),z=0,tt=(0,ft.Z)();function at(){var Jt;return tt?(Jt=z,z+=1):Jt="TEST_OR_SSR",Jt}var it=function(Jt){var Ut=zt.useState(),Vt=(0,xt.Z)(Ut,2),oe=Vt[0],se=Vt[1];return zt.useEffect(function(){se("rc_progress_".concat(at()))},[]),Jt||oe},lt=function(Ut){var Vt=Ut.bg,oe=Ut.children;return zt.createElement("div",{style:{width:"100%",height:"100%",background:Vt}},oe)};function ut(Jt,Ut){return Object.keys(Jt).map(function(Vt){var oe=parseFloat(Vt),se="".concat(Math.floor(oe*Ut),"%");return"".concat(Jt[Vt]," ").concat(se)})}var dt=zt.forwardRef(function(Jt,Ut){var Vt=Jt.prefixCls,oe=Jt.color,se=Jt.gradientId,he=Jt.radius,be=Jt.style,Yt=Jt.ptg,ne=Jt.strokeLinecap,ve=Jt.strokeWidth,Se=Jt.size,we=Jt.gapDegree,ce=oe&&(0,mt.Z)(oe)==="object",de=ce?"#FFF":void 0,le=Se/2,Ce=zt.createElement("circle",{className:"".concat(Vt,"-circle-path"),r:he,cx:le,cy:le,stroke:de,strokeLinecap:ne,strokeWidth:ve,opacity:Yt===0?0:1,style:be,ref:Ut});if(!ce)return Ce;var fe="".concat(se,"-conic"),me=we?"".concat(180+we/2,"deg"):"0deg",ke=ut(oe,(360-we)/360),pe=ut(oe,1),qt="conic-gradient(from ".concat(me,", ").concat(ke.join(", "),")"),Kt="linear-gradient(to ".concat(we?"bottom":"top",", ").concat(pe.join(", "),")");return zt.createElement(zt.Fragment,null,zt.createElement("mask",{id:fe},Ce),zt.createElement("foreignObject",{x:0,y:0,width:Se,height:Se,mask:"url(#".concat(fe,")")},zt.createElement(lt,{bg:Kt},zt.createElement(lt,{bg:qt}))))}),bt=dt,At=100,Dt=function(Ut,Vt,oe,se,he,be,Yt,ne,ve,Se){var we=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ce=oe/100*360*((360-be)/360),de=be===0?0:{bottom:0,top:180,left:90,right:-90}[Yt],le=(100-se)/100*Vt;ve==="round"&&se!==100&&(le+=Se/2,le>=Vt&&(le=Vt-.01));var Ce=At/2;return{stroke:typeof ne=="string"?ne:void 0,strokeDasharray:"".concat(Vt,"px ").concat(Ut),strokeDashoffset:le+we,transform:"rotate(".concat(he+ce+de,"deg)"),transformOrigin:"".concat(Ce,"px ").concat(Ce,"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}},Ft=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function jt(Jt){var Ut=Jt!=null?Jt:[];return Array.isArray(Ut)?Ut:[Ut]}var Nt=function(Ut){var Vt=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Vt.id,se=Vt.prefixCls,he=Vt.steps,be=Vt.strokeWidth,Yt=Vt.trailWidth,ne=Vt.gapDegree,ve=ne===void 0?0:ne,Se=Vt.gapPosition,we=Vt.trailColor,ce=Vt.strokeLinecap,de=Vt.style,le=Vt.className,Ce=Vt.strokeColor,fe=Vt.percent,me=(0,ot.Z)(Vt,Ft),ke=At/2,pe=it(oe),qt="".concat(pe,"-gradient"),Kt=ke-be/2,wt=Math.PI*2*Kt,Lt=ve>0?90+ve/2:-90,Zt=wt*((360-ve)/360),ee=(0,mt.Z)(he)==="object"?he:{count:he,gap:2},It=ee.count,Rt=ee.gap,Ht=jt(fe),re=jt(Ce),ye=re.find(function(nn){return nn&&(0,mt.Z)(nn)==="object"}),Pe=ye&&(0,mt.Z)(ye)==="object",Ae=Pe?"butt":ce,Oe=Dt(wt,Zt,0,100,Lt,ve,Se,we,Ae,be),Ie=kt(),Qe=function(){var Ke=0;return Ht.map(function(Ue,We){var He=re[We]||re[re.length-1],rn=Dt(wt,Zt,Ke,Ue,Lt,ve,Se,He,Ae,be);return Ke+=Ue,zt.createElement(bt,{key:We,color:He,ptg:Ue,radius:Kt,prefixCls:se,gradientId:qt,style:rn,strokeLinecap:Ae,strokeWidth:be,gapDegree:ve,ref:function(un){Ie[We]=un},size:At})}).reverse()},qe=function(){var Ke=Math.round(It*(Ht[0]/100)),Ue=100/It,We=0;return new Array(It).fill(null).map(function(He,rn){var ln=rn<=Ke-1?re[0]:we,un=ln&&(0,mt.Z)(ln)==="object"?"url(#".concat(qt,")"):void 0,bn=Dt(wt,Zt,We,Ue,Lt,ve,Se,ln,"butt",be,Rt);return We+=(Zt-bn.strokeDashoffset+Rt)*100/Zt,zt.createElement("circle",{key:rn,className:"".concat(se,"-circle-path"),r:Kt,cx:ke,cy:ke,stroke:un,strokeWidth:be,opacity:1,style:bn,ref:function(jn){Ie[rn]=jn}})})};return zt.createElement("svg",(0,ae.Z)({className:vt()("".concat(se,"-circle"),le),viewBox:"0 0 ".concat(At," ").concat(At),style:de,id:oe,role:"presentation"},me),!It&&zt.createElement("circle",{className:"".concat(se,"-circle-trail"),r:Kt,cx:ke,cy:ke,stroke:we,strokeLinecap:Ae,strokeWidth:Yt||be,style:Oe}),It?qe():Qe())},_t=Nt,Wt={Line:Tt,Circle:_t}},738:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return ut}});var ae=ue(67711),Re=ue(52873),ot=ue(16886),zt=ue(33346),Bt=ue(92310),vt=ue.n(Bt),gt=ue(18929),kt=ue(10228),Ct=ue(26112),yt=ue(59301);function Tt(dt,bt){var At=dt.disabled,Dt=dt.prefixCls,Ft=dt.character,jt=dt.characterRender,Nt=dt.index,_t=dt.count,Wt=dt.value,Jt=dt.allowHalf,Ut=dt.focused,Vt=dt.onHover,oe=dt.onClick,se=function(ce){Vt(ce,Nt)},he=function(ce){oe(ce,Nt)},be=function(ce){ce.keyCode===kt.Z.ENTER&&oe(ce,Nt)},Yt=Nt+1,ne=new Set([Dt]);Wt===0&&Nt===0&&Ut?ne.add("".concat(Dt,"-focused")):Jt&&Wt+.5>=Yt&&Wt<Yt?(ne.add("".concat(Dt,"-half")),ne.add("".concat(Dt,"-active")),Ut&&ne.add("".concat(Dt,"-focused"))):(Yt<=Wt?ne.add("".concat(Dt,"-full")):ne.add("".concat(Dt,"-zero")),Yt===Wt&&Ut&&ne.add("".concat(Dt,"-focused")));var ve=typeof Ft=="function"?Ft(dt):Ft,Se=yt.createElement("li",{className:vt()(Array.from(ne)),ref:bt},yt.createElement("div",{onClick:At?null:he,onKeyDown:At?null:be,onMouseMove:At?null:se,role:"radio","aria-checked":Wt>Nt?"true":"false","aria-posinset":Nt+1,"aria-setsize":_t,tabIndex:At?-1:0},yt.createElement("div",{className:"".concat(Dt,"-first")},ve),yt.createElement("div",{className:"".concat(Dt,"-second")},ve)));return jt&&(Se=jt(Se,dt)),Se}var mt=yt.forwardRef(Tt);function xt(){var dt=yt.useRef({});function bt(Dt){return dt.current[Dt]}function At(Dt){return function(Ft){dt.current[Dt]=Ft}}return[bt,At]}function ft(dt){var bt=dt.pageXOffset,At="scrollLeft";if(typeof bt!="number"){var Dt=dt.document;bt=Dt.documentElement[At],typeof bt!="number"&&(bt=Dt.body[At])}return bt}function z(dt){var bt,At,Dt=dt.ownerDocument,Ft=Dt.body,jt=Dt&&Dt.documentElement,Nt=dt.getBoundingClientRect();return bt=Nt.left,At=Nt.top,bt-=jt.clientLeft||Ft.clientLeft||0,At-=jt.clientTop||Ft.clientTop||0,{left:bt,top:At}}function tt(dt){var bt=z(dt),At=dt.ownerDocument,Dt=At.defaultView||At.parentWindow;return bt.left+=ft(Dt),bt.left}var at=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function it(dt,bt){var At=dt.prefixCls,Dt=At===void 0?"rc-rate":At,Ft=dt.className,jt=dt.defaultValue,Nt=dt.value,_t=dt.count,Wt=_t===void 0?5:_t,Jt=dt.allowHalf,Ut=Jt===void 0?!1:Jt,Vt=dt.allowClear,oe=Vt===void 0?!0:Vt,se=dt.keyboard,he=se===void 0?!0:se,be=dt.character,Yt=be===void 0?"\u2605":be,ne=dt.characterRender,ve=dt.disabled,Se=dt.direction,we=Se===void 0?"ltr":Se,ce=dt.tabIndex,de=ce===void 0?0:ce,le=dt.autoFocus,Ce=dt.onHoverChange,fe=dt.onChange,me=dt.onFocus,ke=dt.onBlur,pe=dt.onKeyDown,qt=dt.onMouseLeave,Kt=(0,zt.Z)(dt,at),wt=xt(),Lt=(0,ot.Z)(wt,2),Zt=Lt[0],ee=Lt[1],It=yt.useRef(null),Rt=function(){if(!ve){var rr;(rr=It.current)===null||rr===void 0||rr.focus()}};yt.useImperativeHandle(bt,function(){return{focus:Rt,blur:function(){if(!ve){var rr;(rr=It.current)===null||rr===void 0||rr.blur()}}}});var Ht=(0,gt.Z)(jt||0,{value:Nt}),re=(0,ot.Z)(Ht,2),ye=re[0],Pe=re[1],Ae=(0,gt.Z)(null),Oe=(0,ot.Z)(Ae,2),Ie=Oe[0],Qe=Oe[1],qe=function(rr,Rr){var te=we==="rtl",Qn=rr+1;if(Ut){var Vn=Zt(rr),Rn=tt(Vn),zn=Vn.clientWidth;(te&&Rr-Rn>zn/2||!te&&Rr-Rn<zn/2)&&(Qn-=.5)}return Qn},nn=function(rr){Pe(rr),fe==null||fe(rr)},Ke=yt.useState(!1),Ue=(0,ot.Z)(Ke,2),We=Ue[0],He=Ue[1],rn=function(){He(!0),me==null||me()},ln=function(){He(!1),ke==null||ke()},un=yt.useState(null),bn=(0,ot.Z)(un,2),In=bn[0],jn=bn[1],Kn=function(rr,Rr){var te=qe(Rr,rr.pageX);te!==Ie&&(jn(te),Qe(null)),Ce==null||Ce(te)},kr=function(rr){ve||(jn(null),Qe(null),Ce==null||Ce(void 0)),rr&&(qt==null||qt(rr))},pr=function(rr,Rr){var te=qe(Rr,rr.pageX),Qn=!1;oe&&(Qn=te===ye),kr(),nn(Qn?0:te),Qe(Qn?te:null)},Er=function(rr){var Rr=rr.keyCode,te=we==="rtl",Qn=Ut?.5:1;he&&(Rr===kt.Z.RIGHT&&ye<Wt&&!te?(nn(ye+Qn),rr.preventDefault()):Rr===kt.Z.LEFT&&ye>0&&!te||Rr===kt.Z.RIGHT&&ye>0&&te?(nn(ye-Qn),rr.preventDefault()):Rr===kt.Z.LEFT&&ye<Wt&&te&&(nn(ye+Qn),rr.preventDefault())),pe==null||pe(rr)};yt.useEffect(function(){le&&!ve&&Rt()},[]);var Or=new Array(Wt).fill(0).map(function(yr,rr){return yt.createElement(mt,{ref:ee(rr),index:rr,count:Wt,disabled:ve,prefixCls:"".concat(Dt,"-star"),allowHalf:Ut,value:In===null?ye:In,onClick:pr,onHover:Kn,key:yr||rr,character:Yt,characterRender:ne,focused:We})}),jr=vt()(Dt,Ft,(0,Re.Z)((0,Re.Z)({},"".concat(Dt,"-disabled"),ve),"".concat(Dt,"-rtl"),we==="rtl"));return yt.createElement("ul",(0,ae.Z)({className:jr,onMouseLeave:kr,tabIndex:ve?-1:de,onFocus:ve?null:rn,onBlur:ve?null:ln,onKeyDown:ve?null:Er,ref:It},(0,Ct.Z)(Kt,{aria:!0,data:!0,attr:!0})),Or)}var lt=yt.forwardRef(it),ut=lt},6551:function(pn,dn,ue){"use strict";ue.d(dn,{ZP:function(){return gt}});var ae=ue(16886),Re=ue(59301),ot=ue(47273),zt=0,Bt=(0,ot.Z)();function vt(){var kt;return Bt?(kt=zt,zt+=1):kt="TEST_OR_SSR",kt}function gt(kt){var Ct=Re.useState(),yt=(0,ae.Z)(Ct,2),Tt=yt[0],mt=yt[1];return Re.useEffect(function(){mt("rc_select_".concat(vt()))},[]),kt||Tt}},37463:function(pn,dn,ue){"use strict";ue.d(dn,{Ac:function(){return He},Xo:function(){return ln},Wx:function(){return bn},ZP:function(){return Mn},lk:function(){return ut}});var ae=ue(67711),Re=ue(15142),ot=ue(52873),zt=ue(98506),Bt=ue(16886),vt=ue(33346),gt=ue(26420),kt=ue(18929),Ct=ue(48736),yt=ue(59301),Tt=ue(92310),mt=ue.n(Tt),xt=ue(34280),ft=ue(49658),z=ue(8654),tt=function(Ve){var An=Ve.className,En=Ve.customizeIcon,$e=Ve.customizeIconProps,Tn=Ve.children,Xn=Ve.onMouseDown,hr=Ve.onClick,xr=typeof En=="function"?En($e):En;return yt.createElement("span",{className:An,onMouseDown:function(Fn){Fn.preventDefault(),Xn==null||Xn(Fn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:hr,"aria-hidden":!0},xr!==void 0?xr:yt.createElement("span",{className:mt()(An.split(/\s+/).map(function(On){return"".concat(On,"-icon")}))},Tn))},at=tt,it=function(Ve,An,En,$e,Tn){var Xn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,hr=arguments.length>6?arguments[6]:void 0,xr=arguments.length>7?arguments[7]:void 0,On=yt.useMemo(function(){if((0,gt.Z)($e)==="object")return $e.clearIcon;if(Tn)return Tn},[$e,Tn]),Fn=yt.useMemo(function(){return!!(!Xn&&$e&&(En.length||hr)&&!(xr==="combobox"&&hr===""))},[$e,Xn,En.length,hr,xr]);return{allowClear:Fn,clearIcon:yt.createElement(at,{className:"".concat(Ve,"-clear"),onMouseDown:An,customizeIcon:On},"\xD7")}},lt=yt.createContext(null);function ut(){return yt.useContext(lt)}function dt(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ve=yt.useState(!1),An=(0,Bt.Z)(Ve,2),En=An[0],$e=An[1],Tn=yt.useRef(null),Xn=function(){window.clearTimeout(Tn.current)};yt.useEffect(function(){return Xn},[]);var hr=function(On,Fn){Xn(),Tn.current=window.setTimeout(function(){$e(On),Fn&&Fn()},je)};return[En,hr,Xn]}function bt(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ve=yt.useRef(null),An=yt.useRef(null);yt.useEffect(function(){return function(){window.clearTimeout(An.current)}},[]);function En($e){($e||Ve.current===null)&&(Ve.current=$e),window.clearTimeout(An.current),An.current=window.setTimeout(function(){Ve.current=null},je)}return[function(){return Ve.current},En]}function At(je,Ve,An,En){var $e=yt.useRef(null);$e.current={open:Ve,triggerOpen:An,customizedTrigger:En},yt.useEffect(function(){function Tn(Xn){var hr;if(!((hr=$e.current)!==null&&hr!==void 0&&hr.customizedTrigger)){var xr=Xn.target;xr.shadowRoot&&Xn.composed&&(xr=Xn.composedPath()[0]||xr),$e.current.open&&je().filter(function(On){return On}).every(function(On){return!On.contains(xr)&&On!==xr})&&$e.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Tn),function(){return window.removeEventListener("mousedown",Tn)}},[])}var Dt=ue(10228);function Ft(je){return je&&![Dt.Z.ESC,Dt.Z.SHIFT,Dt.Z.BACKSPACE,Dt.Z.TAB,Dt.Z.WIN_KEY,Dt.Z.ALT,Dt.Z.META,Dt.Z.WIN_KEY_RIGHT,Dt.Z.CTRL,Dt.Z.SEMICOLON,Dt.Z.EQUALS,Dt.Z.CAPS_LOCK,Dt.Z.CONTEXT_MENU,Dt.Z.F1,Dt.Z.F2,Dt.Z.F3,Dt.Z.F4,Dt.Z.F5,Dt.Z.F6,Dt.Z.F7,Dt.Z.F8,Dt.Z.F9,Dt.Z.F10,Dt.Z.F11,Dt.Z.F12].includes(je)}var jt=ue(26112),Nt=ue(11780);function _t(je,Ve,An){var En=(0,zt.Z)((0,zt.Z)({},je),An?Ve:{});return Object.keys(Ve).forEach(function($e){var Tn=Ve[$e];typeof Tn=="function"&&(En[$e]=function(){for(var Xn,hr=arguments.length,xr=new Array(hr),On=0;On<hr;On++)xr[On]=arguments[On];return Tn.apply(void 0,xr),(Xn=je[$e])===null||Xn===void 0?void 0:Xn.call.apply(Xn,[je].concat(xr))})}),En}var Wt=_t,Jt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ut=function(Ve,An){var En=Ve.prefixCls,$e=Ve.id,Tn=Ve.inputElement,Xn=Ve.autoFocus,hr=Ve.autoComplete,xr=Ve.editable,On=Ve.activeDescendantId,Fn=Ve.value,Dn=Ve.open,sr=Ve.attrs,or=(0,vt.Z)(Ve,Jt),xn=Tn||yt.createElement("input",null),Gn=xn,Yr=Gn.ref,ei=Gn.props;return(0,Ct.Kp)(!("maxLength"in xn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),xn=yt.cloneElement(xn,(0,zt.Z)((0,zt.Z)((0,zt.Z)({type:"search"},Wt(or,ei,!0)),{},{id:$e,ref:(0,z.sQ)(An,Yr),autoComplete:hr||"off",autoFocus:Xn,className:mt()("".concat(En,"-selection-search-input"),ei==null?void 0:ei.className),role:"combobox","aria-expanded":Dn||!1,"aria-haspopup":"listbox","aria-owns":"".concat($e,"_list"),"aria-autocomplete":"list","aria-controls":"".concat($e,"_list"),"aria-activedescendant":Dn?On:void 0},sr),{},{value:xr?Fn:"",readOnly:!xr,unselectable:xr?null:"on",style:(0,zt.Z)((0,zt.Z)({},ei.style),{},{opacity:xr?null:0})})),xn},Vt=yt.forwardRef(Ut),oe=Vt;function se(je){return Array.isArray(je)?je:je!==void 0?[je]:[]}var he=typeof window!="undefined"&&window.document&&window.document.documentElement,be=he;function Yt(je){return je!=null}function ne(je){return!je&&je!==0}function ve(je){return["string","number"].includes((0,gt.Z)(je))}function Se(je){var Ve=void 0;return je&&(ve(je.title)?Ve=je.title.toString():ve(je.label)&&(Ve=je.label.toString())),Ve}function we(je,Ve){be?yt.useLayoutEffect(je,Ve):yt.useEffect(je,Ve)}function ce(je){var Ve;return(Ve=je.key)!==null&&Ve!==void 0?Ve:je.value}var de=function(Ve){Ve.preventDefault(),Ve.stopPropagation()},le=function(Ve){var An=Ve.id,En=Ve.prefixCls,$e=Ve.values,Tn=Ve.open,Xn=Ve.searchValue,hr=Ve.autoClearSearchValue,xr=Ve.inputRef,On=Ve.placeholder,Fn=Ve.disabled,Dn=Ve.mode,sr=Ve.showSearch,or=Ve.autoFocus,xn=Ve.autoComplete,Gn=Ve.activeDescendantId,Yr=Ve.tabIndex,ei=Ve.removeIcon,xi=Ve.maxTagCount,Je=Ve.maxTagTextLength,cr=Ve.maxTagPlaceholder,_r=cr===void 0?function(Vr){return"+ ".concat(Vr.length," ...")}:cr,ir=Ve.tagRender,oi=Ve.onToggleOpen,Jr=Ve.onRemove,ni=Ve.onInputChange,Kr=Ve.onInputPaste,$r=Ve.onInputKeyDown,hi=Ve.onInputMouseDown,yn=Ve.onInputCompositionStart,mi=Ve.onInputCompositionEnd,vn=Ve.onInputBlur,ii=yt.useRef(null),Gi=(0,yt.useState)(0),gi=(0,Bt.Z)(Gi,2),Bi=gi[0],ri=gi[1],Br=(0,yt.useState)(!1),wi=(0,Bt.Z)(Br,2),Eo=wi[0],Oi=wi[1],Yn="".concat(En,"-selection"),Le=Tn||Dn==="multiple"&&hr===!1||Dn==="tags"?Xn:"",Ti=Dn==="tags"||Dn==="multiple"&&hr===!1||sr&&(Tn||Eo);we(function(){ri(ii.current.scrollWidth)},[Le]);var so=function(gr,Ur,vr,ur,Mr){return yt.createElement("span",{title:Se(gr),className:mt()("".concat(Yn,"-item"),(0,ot.Z)({},"".concat(Yn,"-item-disabled"),vr))},yt.createElement("span",{className:"".concat(Yn,"-item-content")},Ur),ur&&yt.createElement(at,{className:"".concat(Yn,"-item-remove"),onMouseDown:de,onClick:Mr,customizeIcon:ei},"\xD7"))},Ji=function(gr,Ur,vr,ur,Mr,kn){var fi=function(io){de(io),oi(!Tn)};return yt.createElement("span",{onMouseDown:fi},ir({label:Ur,value:gr,disabled:vr,closable:ur,onClose:Mr,isMaxTag:!!kn}))},Zi=function(gr){var Ur=gr.disabled,vr=gr.label,ur=gr.value,Mr=!Fn&&!Ur,kn=vr;if(typeof Je=="number"&&(typeof vr=="string"||typeof vr=="number")){var fi=String(kn);fi.length>Je&&(kn="".concat(fi.slice(0,Je),"..."))}var Ci=function(bi){bi&&bi.stopPropagation(),Jr(gr)};return typeof ir=="function"?Ji(ur,kn,Ur,Mr,Ci):so(gr,kn,Ur,Mr,Ci)},di=function(gr){if(!$e.length)return null;var Ur=typeof _r=="function"?_r(gr):_r;return typeof ir=="function"?Ji(void 0,Ur,!1,!1,void 0,!0):so({title:Ur},Ur,!1)},lr=yt.createElement("div",{className:"".concat(Yn,"-search"),style:{width:Bi},onFocus:function(){Oi(!0)},onBlur:function(){Oi(!1)}},yt.createElement(oe,{ref:xr,open:Tn,prefixCls:En,id:An,inputElement:null,disabled:Fn,autoFocus:or,autoComplete:xn,editable:Ti,activeDescendantId:Gn,value:Le,onKeyDown:$r,onMouseDown:hi,onChange:ni,onPaste:Kr,onCompositionStart:yn,onCompositionEnd:mi,onBlur:vn,tabIndex:Yr,attrs:(0,jt.Z)(Ve,!0)}),yt.createElement("span",{ref:ii,className:"".concat(Yn,"-search-mirror"),"aria-hidden":!0},Le,"\xA0")),wr=yt.createElement(Nt.Z,{prefixCls:"".concat(Yn,"-overflow"),data:$e,renderItem:Zi,renderRest:di,suffix:lr,itemKey:ce,maxCount:xi});return yt.createElement("span",{className:"".concat(Yn,"-wrap")},wr,!$e.length&&!Le&&yt.createElement("span",{className:"".concat(Yn,"-placeholder")},On))},Ce=le,fe=function(Ve){var An=Ve.inputElement,En=Ve.prefixCls,$e=Ve.id,Tn=Ve.inputRef,Xn=Ve.disabled,hr=Ve.autoFocus,xr=Ve.autoComplete,On=Ve.activeDescendantId,Fn=Ve.mode,Dn=Ve.open,sr=Ve.values,or=Ve.placeholder,xn=Ve.tabIndex,Gn=Ve.showSearch,Yr=Ve.searchValue,ei=Ve.activeValue,xi=Ve.maxLength,Je=Ve.onInputKeyDown,cr=Ve.onInputMouseDown,_r=Ve.onInputChange,ir=Ve.onInputPaste,oi=Ve.onInputCompositionStart,Jr=Ve.onInputCompositionEnd,ni=Ve.onInputBlur,Kr=Ve.title,$r=yt.useState(!1),hi=(0,Bt.Z)($r,2),yn=hi[0],mi=hi[1],vn=Fn==="combobox",ii=vn||Gn,Gi=sr[0],gi=Yr||"";vn&&ei&&!yn&&(gi=ei),yt.useEffect(function(){vn&&mi(!1)},[vn,ei]);var Bi=Fn!=="combobox"&&!Dn&&!Gn?!1:!!gi,ri=Kr===void 0?Se(Gi):Kr,Br=yt.useMemo(function(){return Gi?null:yt.createElement("span",{className:"".concat(En,"-selection-placeholder"),style:Bi?{visibility:"hidden"}:void 0},or)},[Gi,Bi,or,En]);return yt.createElement("span",{className:"".concat(En,"-selection-wrap")},yt.createElement("span",{className:"".concat(En,"-selection-search")},yt.createElement(oe,{ref:Tn,prefixCls:En,id:$e,open:Dn,inputElement:An,disabled:Xn,autoFocus:hr,autoComplete:xr,editable:ii,activeDescendantId:On,value:gi,onKeyDown:Je,onMouseDown:cr,onChange:function(Eo){mi(!0),_r(Eo)},onPaste:ir,onCompositionStart:oi,onCompositionEnd:Jr,onBlur:ni,tabIndex:xn,attrs:(0,jt.Z)(Ve,!0),maxLength:vn?xi:void 0})),!vn&&Gi?yt.createElement("span",{className:"".concat(En,"-selection-item"),title:ri,style:Bi?{visibility:"hidden"}:void 0},Gi.label):null,Br)},me=fe,ke=function(Ve,An){var En=(0,yt.useRef)(null),$e=(0,yt.useRef)(!1),Tn=Ve.prefixCls,Xn=Ve.open,hr=Ve.mode,xr=Ve.showSearch,On=Ve.tokenWithEnter,Fn=Ve.disabled,Dn=Ve.prefix,sr=Ve.autoClearSearchValue,or=Ve.onSearch,xn=Ve.onSearchSubmit,Gn=Ve.onToggleOpen,Yr=Ve.onInputKeyDown,ei=Ve.onInputBlur,xi=Ve.domRef;yt.useImperativeHandle(An,function(){return{focus:function(ri){En.current.focus(ri)},blur:function(){En.current.blur()}}});var Je=bt(0),cr=(0,Bt.Z)(Je,2),_r=cr[0],ir=cr[1],oi=function(ri){var Br=ri.which,wi=En.current instanceof HTMLTextAreaElement;!wi&&Xn&&(Br===Dt.Z.UP||Br===Dt.Z.DOWN)&&ri.preventDefault(),Yr&&Yr(ri),Br===Dt.Z.ENTER&&hr==="tags"&&!$e.current&&!Xn&&(xn==null||xn(ri.target.value)),!(wi&&!Xn&&~[Dt.Z.UP,Dt.Z.DOWN,Dt.Z.LEFT,Dt.Z.RIGHT].indexOf(Br))&&Ft(Br)&&Gn(!0)},Jr=function(){ir(!0)},ni=(0,yt.useRef)(null),Kr=function(ri){or(ri,!0,$e.current)!==!1&&Gn(!0)},$r=function(){$e.current=!0},hi=function(ri){$e.current=!1,hr!=="combobox"&&Kr(ri.target.value)},yn=function(ri){var Br=ri.target.value;if(On&&ni.current&&/[\r\n]/.test(ni.current)){var wi=ni.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Br=Br.replace(wi,ni.current)}ni.current=null,Kr(Br)},mi=function(ri){var Br=ri.clipboardData,wi=Br==null?void 0:Br.getData("text");ni.current=wi||""},vn=function(ri){var Br=ri.target;if(Br!==En.current){var wi=document.body.style.msTouchAction!==void 0;wi?setTimeout(function(){En.current.focus()}):En.current.focus()}},ii=function(ri){var Br=_r();ri.target!==En.current&&!Br&&!(hr==="combobox"&&Fn)&&ri.preventDefault(),(hr!=="combobox"&&(!xr||!Br)||!Xn)&&(Xn&&sr!==!1&&or("",!0,!1),Gn())},Gi={inputRef:En,onInputKeyDown:oi,onInputMouseDown:Jr,onInputChange:yn,onInputPaste:mi,onInputCompositionStart:$r,onInputCompositionEnd:hi,onInputBlur:ei},gi=hr==="multiple"||hr==="tags"?yt.createElement(Ce,(0,ae.Z)({},Ve,Gi)):yt.createElement(me,(0,ae.Z)({},Ve,Gi));return yt.createElement("div",{ref:xi,className:"".concat(Tn,"-selector"),onClick:vn,onMouseDown:ii},Dn&&yt.createElement("div",{className:"".concat(Tn,"-prefix")},Dn),gi)},pe=yt.forwardRef(ke),qt=pe,Kt=ue(65030),wt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Lt=function(Ve){var An=Ve===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:An,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:An,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:An,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:An,adjustY:1},htmlRegion:"scroll"}}},Zt=function(Ve,An){var En=Ve.prefixCls,$e=Ve.disabled,Tn=Ve.visible,Xn=Ve.children,hr=Ve.popupElement,xr=Ve.animation,On=Ve.transitionName,Fn=Ve.dropdownStyle,Dn=Ve.dropdownClassName,sr=Ve.direction,or=sr===void 0?"ltr":sr,xn=Ve.placement,Gn=Ve.builtinPlacements,Yr=Ve.dropdownMatchSelectWidth,ei=Ve.dropdownRender,xi=Ve.dropdownAlign,Je=Ve.getPopupContainer,cr=Ve.empty,_r=Ve.getTriggerDOMNode,ir=Ve.onPopupVisibleChange,oi=Ve.onPopupMouseEnter,Jr=(0,vt.Z)(Ve,wt),ni="".concat(En,"-dropdown"),Kr=hr;ei&&(Kr=ei(hr));var $r=yt.useMemo(function(){return Gn||Lt(Yr)},[Gn,Yr]),hi=xr?"".concat(ni,"-").concat(xr):On,yn=typeof Yr=="number",mi=yt.useMemo(function(){return yn?null:Yr===!1?"minWidth":"width"},[Yr,yn]),vn=Fn;yn&&(vn=(0,zt.Z)((0,zt.Z)({},vn),{},{width:Yr}));var ii=yt.useRef(null);return yt.useImperativeHandle(An,function(){return{getPopupElement:function(){var gi;return(gi=ii.current)===null||gi===void 0?void 0:gi.popupElement}}}),yt.createElement(Kt.Z,(0,ae.Z)({},Jr,{showAction:ir?["click"]:[],hideAction:ir?["click"]:[],popupPlacement:xn||(or==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:$r,prefixCls:ni,popupTransitionName:hi,popup:yt.createElement("div",{onMouseEnter:oi},Kr),ref:ii,stretch:mi,popupAlign:xi,popupVisible:Tn,getPopupContainer:Je,popupClassName:mt()(Dn,(0,ot.Z)({},"".concat(ni,"-empty"),cr)),popupStyle:vn,getTriggerDOMNode:_r,onPopupVisibleChange:ir}),Xn)},ee=yt.forwardRef(Zt),It=ee,Rt=ue(57879);function Ht(je,Ve){var An=je.key,En;return"value"in je&&(En=je.value),An!=null?An:En!==void 0?En:"rc-index-key-".concat(Ve)}function re(je){return typeof je!="undefined"&&!Number.isNaN(je)}function ye(je,Ve){var An=je||{},En=An.label,$e=An.value,Tn=An.options,Xn=An.groupLabel,hr=En||(Ve?"children":"label");return{label:hr,value:$e||"value",options:Tn||"options",groupLabel:Xn||hr}}function Pe(je){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},An=Ve.fieldNames,En=Ve.childrenAsData,$e=[],Tn=ye(An,!1),Xn=Tn.label,hr=Tn.value,xr=Tn.options,On=Tn.groupLabel;function Fn(Dn,sr){Array.isArray(Dn)&&Dn.forEach(function(or){if(sr||!(xr in or)){var xn=or[hr];$e.push({key:Ht(or,$e.length),groupOption:sr,data:or,label:or[Xn],value:xn})}else{var Gn=or[On];Gn===void 0&&En&&(Gn=or.label),$e.push({key:Ht(or,$e.length),group:!0,data:or,label:Gn}),Fn(or[xr],!0)}})}return Fn(je,!1),$e}function Ae(je){var Ve=(0,zt.Z)({},je);return"props"in Ve||Object.defineProperty(Ve,"props",{get:function(){return(0,Ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ve}}),Ve}var Oe=function(Ve,An,En){if(!An||!An.length)return null;var $e=!1,Tn=function hr(xr,On){var Fn=(0,Rt.Z)(On),Dn=Fn[0],sr=Fn.slice(1);if(!Dn)return[xr];var or=xr.split(Dn);return $e=$e||or.length>1,or.reduce(function(xn,Gn){return[].concat((0,Re.Z)(xn),(0,Re.Z)(hr(Gn,sr)))},[]).filter(Boolean)},Xn=Tn(Ve,An);return $e?typeof En!="undefined"?Xn.slice(0,En):Xn:null},Ie=yt.createContext(null),Qe=Ie;function qe(je){var Ve=je.visible,An=je.values;if(!Ve)return null;var En=50;return yt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(An.slice(0,En).map(function($e){var Tn=$e.label,Xn=$e.value;return["number","string"].includes((0,gt.Z)(Tn))?Tn:Xn}).join(", ")),An.length>En?", ...":null)}var nn=["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"],Ke=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ue=function(Ve){return Ve==="tags"||Ve==="multiple"},We=yt.forwardRef(function(je,Ve){var An,En=je.id,$e=je.prefixCls,Tn=je.className,Xn=je.showSearch,hr=je.tagRender,xr=je.direction,On=je.omitDomProps,Fn=je.displayValues,Dn=je.onDisplayValuesChange,sr=je.emptyOptions,or=je.notFoundContent,xn=or===void 0?"Not Found":or,Gn=je.onClear,Yr=je.mode,ei=je.disabled,xi=je.loading,Je=je.getInputElement,cr=je.getRawInputElement,_r=je.open,ir=je.defaultOpen,oi=je.onDropdownVisibleChange,Jr=je.activeValue,ni=je.onActiveValueChange,Kr=je.activeDescendantId,$r=je.searchValue,hi=je.autoClearSearchValue,yn=je.onSearch,mi=je.onSearchSplit,vn=je.tokenSeparators,ii=je.allowClear,Gi=je.prefix,gi=je.suffixIcon,Bi=je.clearIcon,ri=je.OptionList,Br=je.animation,wi=je.transitionName,Eo=je.dropdownStyle,Oi=je.dropdownClassName,Yn=je.dropdownMatchSelectWidth,Le=je.dropdownRender,Ti=je.dropdownAlign,so=je.placement,Ji=je.builtinPlacements,Zi=je.getPopupContainer,di=je.showAction,lr=di===void 0?[]:di,wr=je.onFocus,Vr=je.onBlur,gr=je.onKeyUp,Ur=je.onKeyDown,vr=je.onMouseDown,ur=(0,vt.Z)(je,nn),Mr=Ue(Yr),kn=(Xn!==void 0?Xn:Mr)||Yr==="combobox",fi=(0,zt.Z)({},ur);Ke.forEach(function(Ui){delete fi[Ui]}),On==null||On.forEach(function(Ui){delete fi[Ui]});var Ci=yt.useState(!1),io=(0,Bt.Z)(Ci,2),bi=io[0],lo=io[1];yt.useEffect(function(){lo((0,ft.Z)())},[]);var xo=yt.useRef(null),Bo=yt.useRef(null),po=yt.useRef(null),na=yt.useRef(null),Ao=yt.useRef(null),on=yt.useRef(!1),ra=dt(),za=(0,Bt.Z)(ra,3),Ya=za[0],Hi=za[1],Js=za[2];yt.useImperativeHandle(Ve,function(){var Ui,Ni;return{focus:(Ui=na.current)===null||Ui===void 0?void 0:Ui.focus,blur:(Ni=na.current)===null||Ni===void 0?void 0:Ni.blur,scrollTo:function(Sr){var Jo;return(Jo=Ao.current)===null||Jo===void 0?void 0:Jo.scrollTo(Sr)},nativeElement:xo.current||Bo.current}});var ls=yt.useMemo(function(){var Ui;if(Yr!=="combobox")return $r;var Ni=(Ui=Fn[0])===null||Ui===void 0?void 0:Ui.value;return typeof Ni=="string"||typeof Ni=="number"?String(Ni):""},[$r,Yr,Fn]),Ml=Yr==="combobox"&&typeof Je=="function"&&Je()||null,Ai=typeof cr=="function"&&cr(),No=(0,z.x1)(Bo,Ai==null||(An=Ai.props)===null||An===void 0?void 0:An.ref),Ga=yt.useState(!1),dl=(0,Bt.Z)(Ga,2),uu=dl[0],xs=dl[1];(0,xt.Z)(function(){xs(!0)},[]);var Dr=(0,kt.Z)(!1,{defaultValue:ir,value:_r}),Gl=(0,Bt.Z)(Dr,2),hu=Gl[0],us=Gl[1],Xo=uu?hu:!1,Nu=!xn&&sr;(ei||Nu&&Xo&&Yr==="combobox")&&(Xo=!1);var er=Nu?!1:Xo,zr=yt.useCallback(function(Ui){var Ni=Ui!==void 0?Ui:!Xo;ei||(us(Ni),Xo!==Ni&&(oi==null||oi(Ni)))},[ei,Xo,us,oi]),qr=yt.useMemo(function(){return(vn||[]).some(function(Ui){return[`
`,`\r
`].includes(Ui)})},[vn]),ai=yt.useContext(Qe)||{},pi=ai.maxCount,Vi=ai.rawValues,Fr=function(Ni,ja,Sr){if(!(Mr&&re(pi)&&(Vi==null?void 0:Vi.size)>=pi)){var Jo=!0,Ge=Ni;ni==null||ni(null);var Pn=Oe(Ni,vn,re(pi)?pi-Vi.size:void 0),$s=Sr?null:Pn;return Yr!=="combobox"&&$s&&(Ge="",mi==null||mi($s),zr(!1),Jo=!1),yn&&ls!==Ge&&yn(Ge,{source:ja?"typing":"effect"}),Jo}},ws=function(Ni){!Ni||!Ni.trim()||yn(Ni,{source:"submit"})};yt.useEffect(function(){!Xo&&!Mr&&Yr!=="combobox"&&Fr("",!1,!1)},[Xo]),yt.useEffect(function(){hu&&ei&&us(!1),ei&&!on.current&&Hi(!1)},[ei]);var ia=bt(),Uo=(0,Bt.Z)(ia,2),oo=Uo[0],Ja=Uo[1],bs=yt.useRef(!1),Aa=function(Ni){var ja=oo(),Sr=Ni.key,Jo=Sr==="Enter";if(Jo&&(Yr!=="combobox"&&Ni.preventDefault(),Xo||zr(!0)),Ja(!!ls),Sr==="Backspace"&&!ja&&Mr&&!ls&&Fn.length){for(var Ge=(0,Re.Z)(Fn),Pn=null,$s=Ge.length-1;$s>=0;$s-=1){var Wl=Ge[$s];if(!Wl.disabled){Ge.splice($s,1),Pn=Wl;break}}Pn&&Dn(Ge,{type:"remove",values:[Pn]})}for(var hs=arguments.length,Qa=new Array(hs>1?hs-1:0),gl=1;gl<hs;gl++)Qa[gl-1]=arguments[gl];if(Xo&&(!Jo||!bs.current)){var cu;Jo&&(bs.current=!0),(cu=Ao.current)===null||cu===void 0||cu.onKeyDown.apply(cu,[Ni].concat(Qa))}Ur==null||Ur.apply(void 0,[Ni].concat(Qa))},Ps=function(Ni){for(var ja=arguments.length,Sr=new Array(ja>1?ja-1:0),Jo=1;Jo<ja;Jo++)Sr[Jo-1]=arguments[Jo];if(Xo){var Ge;(Ge=Ao.current)===null||Ge===void 0||Ge.onKeyUp.apply(Ge,[Ni].concat(Sr))}Ni.key==="Enter"&&(bs.current=!1),gr==null||gr.apply(void 0,[Ni].concat(Sr))},Tl=function(Ni){var ja=Fn.filter(function(Sr){return Sr!==Ni});Dn(ja,{type:"remove",values:[Ni]})},Qs=function(){bs.current=!1},ju=yt.useRef(!1),Xc=function(){Hi(!0),ei||(wr&&!ju.current&&wr.apply(void 0,arguments),lr.includes("focus")&&zr(!0)),ju.current=!0},sc=function(){on.current=!0,Hi(!1,function(){ju.current=!1,on.current=!1,zr(!1)}),!ei&&(ls&&(Yr==="tags"?yn(ls,{source:"submit"}):Yr==="multiple"&&yn("",{source:"blur"})),Vr&&Vr.apply(void 0,arguments))},pl=[];yt.useEffect(function(){return function(){pl.forEach(function(Ui){return clearTimeout(Ui)}),pl.splice(0,pl.length)}},[]);var Ul=function(Ni){var ja,Sr=Ni.target,Jo=(ja=po.current)===null||ja===void 0?void 0:ja.getPopupElement();if(Jo&&Jo.contains(Sr)){var Ge=setTimeout(function(){var hs=pl.indexOf(Ge);if(hs!==-1&&pl.splice(hs,1),Js(),!bi&&!Jo.contains(document.activeElement)){var Qa;(Qa=na.current)===null||Qa===void 0||Qa.focus()}});pl.push(Ge)}for(var Pn=arguments.length,$s=new Array(Pn>1?Pn-1:0),Wl=1;Wl<Pn;Wl++)$s[Wl-1]=arguments[Wl];vr==null||vr.apply(void 0,[Ni].concat($s))},Is=yt.useState({}),lc=(0,Bt.Z)(Is,2),uc=lc[1];function Yc(){uc({})}var jo;Ai&&(jo=function(Ni){zr(Ni)}),At(function(){var Ui;return[xo.current,(Ui=po.current)===null||Ui===void 0?void 0:Ui.getPopupElement()]},er,zr,!!Ai);var Wf=yt.useMemo(function(){return(0,zt.Z)((0,zt.Z)({},je),{},{notFoundContent:xn,open:Xo,triggerOpen:er,id:En,showSearch:kn,multiple:Mr,toggleOpen:zr})},[je,xn,er,Xo,En,kn,Mr,zr]),hc=!!gi||xi,Ou;hc&&(Ou=yt.createElement(at,{className:mt()("".concat($e,"-arrow"),(0,ot.Z)({},"".concat($e,"-arrow-loading"),xi)),customizeIcon:gi,customizeIconProps:{loading:xi,searchValue:ls,open:Xo,focused:Ya,showSearch:kn}}));var Fu=function(){var Ni;Gn==null||Gn(),(Ni=na.current)===null||Ni===void 0||Ni.focus(),Dn([],{type:"clear",values:Fn}),Fr("",!1,!1)},da=it($e,Fu,Fn,ii,Bi,ei,ls,Yr),Na=da.allowClear,Yo=da.clearIcon,oa=yt.createElement(ri,{ref:Ao}),cc=mt()($e,Tn,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat($e,"-focused"),Ya),"".concat($e,"-multiple"),Mr),"".concat($e,"-single"),!Mr),"".concat($e,"-allow-clear"),ii),"".concat($e,"-show-arrow"),hc),"".concat($e,"-disabled"),ei),"".concat($e,"-loading"),xi),"".concat($e,"-open"),Xo),"".concat($e,"-customize-input"),Ml),"".concat($e,"-show-search"),kn)),Du=yt.createElement(It,{ref:po,disabled:ei,prefixCls:$e,visible:er,popupElement:oa,animation:Br,transitionName:wi,dropdownStyle:Eo,dropdownClassName:Oi,direction:xr,dropdownMatchSelectWidth:Yn,dropdownRender:Le,dropdownAlign:Ti,placement:so,builtinPlacements:Ji,getPopupContainer:Zi,empty:sr,getTriggerDOMNode:function(Ni){return Bo.current||Ni},onPopupVisibleChange:jo,onPopupMouseEnter:Yc},Ai?yt.cloneElement(Ai,{ref:No}):yt.createElement(qt,(0,ae.Z)({},je,{domRef:Bo,prefixCls:$e,inputElement:Ml,ref:na,id:En,prefix:Gi,showSearch:kn,autoClearSearchValue:hi,mode:Yr,activeDescendantId:Kr,tagRender:hr,values:Fn,open:Xo,onToggleOpen:zr,activeValue:Jr,searchValue:ls,onSearch:Fr,onSearchSubmit:ws,onRemove:Tl,tokenWithEnter:qr,onInputBlur:Qs}))),mo;return Ai?mo=Du:mo=yt.createElement("div",(0,ae.Z)({className:cc},fi,{ref:xo,onMouseDown:Ul,onKeyDown:Aa,onKeyUp:Ps,onFocus:Xc,onBlur:sc}),yt.createElement(qe,{visible:Ya&&!Xo,values:Fn}),Du,Ou,Na&&Yo),yt.createElement(lt.Provider,{value:Wf},mo)}),He=We,rn=function(){return null};rn.isSelectOptGroup=!0;var ln=rn,un=function(){return null};un.isSelectOption=!0;var bn=un,In=ue(80547),jn=ue(2738),Kn=ue(6790);function kr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var pr=["disabled","title","children","style","className"];function Er(je){return typeof je=="string"||typeof je=="number"}var Or=function(Ve,An){var En=ut(),$e=En.prefixCls,Tn=En.id,Xn=En.open,hr=En.multiple,xr=En.mode,On=En.searchValue,Fn=En.toggleOpen,Dn=En.notFoundContent,sr=En.onPopupScroll,or=yt.useContext(Qe),xn=or.maxCount,Gn=or.flattenOptions,Yr=or.onActiveValue,ei=or.defaultActiveFirstOption,xi=or.onSelect,Je=or.menuItemSelectedIcon,cr=or.rawValues,_r=or.fieldNames,ir=or.virtual,oi=or.direction,Jr=or.listHeight,ni=or.listItemHeight,Kr=or.optionRender,$r="".concat($e,"-item"),hi=(0,In.Z)(function(){return Gn},[Xn,Gn],function(di,lr){return lr[0]&&di[1]!==lr[1]}),yn=yt.useRef(null),mi=yt.useMemo(function(){return hr&&re(xn)&&(cr==null?void 0:cr.size)>=xn},[hr,xn,cr==null?void 0:cr.size]),vn=function(lr){lr.preventDefault()},ii=function(lr){var wr;(wr=yn.current)===null||wr===void 0||wr.scrollTo(typeof lr=="number"?{index:lr}:lr)},Gi=yt.useCallback(function(di){return xr==="combobox"?!1:cr.has(di)},[xr,(0,Re.Z)(cr).toString(),cr.size]),gi=function(lr){for(var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Vr=hi.length,gr=0;gr<Vr;gr+=1){var Ur=(lr+gr*wr+Vr)%Vr,vr=hi[Ur]||{},ur=vr.group,Mr=vr.data;if(!ur&&!(Mr!=null&&Mr.disabled)&&(Gi(Mr.value)||!mi))return Ur}return-1},Bi=yt.useState(function(){return gi(0)}),ri=(0,Bt.Z)(Bi,2),Br=ri[0],wi=ri[1],Eo=function(lr){var wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;wi(lr);var Vr={source:wr?"keyboard":"mouse"},gr=hi[lr];if(!gr){Yr(null,-1,Vr);return}Yr(gr.value,lr,Vr)};(0,yt.useEffect)(function(){Eo(ei!==!1?gi(0):-1)},[hi.length,On]);var Oi=yt.useCallback(function(di){return xr==="combobox"?String(di).toLowerCase()===On.toLowerCase():cr.has(di)},[xr,On,(0,Re.Z)(cr).toString(),cr.size]);(0,yt.useEffect)(function(){var di=setTimeout(function(){if(!hr&&Xn&&cr.size===1){var wr=Array.from(cr)[0],Vr=hi.findIndex(function(gr){var Ur=gr.data;return On?String(Ur.value).startsWith(On):Ur.value===wr});Vr!==-1&&(Eo(Vr),ii(Vr))}});if(Xn){var lr;(lr=yn.current)===null||lr===void 0||lr.scrollTo(void 0)}return function(){return clearTimeout(di)}},[Xn,On]);var Yn=function(lr){lr!==void 0&&xi(lr,{selected:!cr.has(lr)}),hr||Fn(!1)};if(yt.useImperativeHandle(An,function(){return{onKeyDown:function(lr){var wr=lr.which,Vr=lr.ctrlKey;switch(wr){case Dt.Z.N:case Dt.Z.P:case Dt.Z.UP:case Dt.Z.DOWN:{var gr=0;if(wr===Dt.Z.UP?gr=-1:wr===Dt.Z.DOWN?gr=1:kr()&&Vr&&(wr===Dt.Z.N?gr=1:wr===Dt.Z.P&&(gr=-1)),gr!==0){var Ur=gi(Br+gr,gr);ii(Ur),Eo(Ur,!0)}break}case Dt.Z.TAB:case Dt.Z.ENTER:{var vr,ur=hi[Br];ur&&!(ur!=null&&(vr=ur.data)!==null&&vr!==void 0&&vr.disabled)&&!mi?Yn(ur.value):Yn(void 0),Xn&&lr.preventDefault();break}case Dt.Z.ESC:Fn(!1),Xn&&lr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(lr){ii(lr)}}}),hi.length===0)return yt.createElement("div",{role:"listbox",id:"".concat(Tn,"_list"),className:"".concat($r,"-empty"),onMouseDown:vn},Dn);var Le=Object.keys(_r).map(function(di){return _r[di]}),Ti=function(lr){return lr.label};function so(di,lr){var wr=di.group;return{role:wr?"presentation":"option",id:"".concat(Tn,"_list_").concat(lr)}}var Ji=function(lr){var wr=hi[lr];if(!wr)return null;var Vr=wr.data||{},gr=Vr.value,Ur=wr.group,vr=(0,jt.Z)(Vr,!0),ur=Ti(wr);return wr?yt.createElement("div",(0,ae.Z)({"aria-label":typeof ur=="string"&&!Ur?ur:null},vr,{key:lr},so(wr,lr),{"aria-selected":Oi(gr)}),gr):null},Zi={role:"listbox",id:"".concat(Tn,"_list")};return yt.createElement(yt.Fragment,null,ir&&yt.createElement("div",(0,ae.Z)({},Zi,{style:{height:0,width:0,overflow:"hidden"}}),Ji(Br-1),Ji(Br),Ji(Br+1)),yt.createElement(Kn.Z,{itemKey:"key",ref:yn,data:hi,height:Jr,itemHeight:ni,fullHeight:!1,onMouseDown:vn,onScroll:sr,virtual:ir,direction:oi,innerProps:ir?null:Zi},function(di,lr){var wr=di.group,Vr=di.groupOption,gr=di.data,Ur=di.label,vr=di.value,ur=gr.key;if(wr){var Mr,kn=(Mr=gr.title)!==null&&Mr!==void 0?Mr:Er(Ur)?Ur.toString():void 0;return yt.createElement("div",{className:mt()($r,"".concat($r,"-group"),gr.className),title:kn},Ur!==void 0?Ur:ur)}var fi=gr.disabled,Ci=gr.title,io=gr.children,bi=gr.style,lo=gr.className,xo=(0,vt.Z)(gr,pr),Bo=(0,jn.Z)(xo,Le),po=Gi(vr),na=fi||!po&&mi,Ao="".concat($r,"-option"),on=mt()($r,Ao,lo,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(Ao,"-grouped"),Vr),"".concat(Ao,"-active"),Br===lr&&!na),"".concat(Ao,"-disabled"),na),"".concat(Ao,"-selected"),po)),ra=Ti(di),za=!Je||typeof Je=="function"||po,Ya=typeof ra=="number"?ra:ra||vr,Hi=Er(Ya)?Ya.toString():void 0;return Ci!==void 0&&(Hi=Ci),yt.createElement("div",(0,ae.Z)({},(0,jt.Z)(Bo),ir?{}:so(di,lr),{"aria-selected":Oi(vr),className:on,title:Hi,onMouseMove:function(){Br===lr||na||Eo(lr)},onClick:function(){na||Yn(vr)},style:bi}),yt.createElement("div",{className:"".concat(Ao,"-content")},typeof Kr=="function"?Kr(di,{index:lr}):Ya),yt.isValidElement(Je)||po,za&&yt.createElement(at,{className:"".concat($r,"-option-state"),customizeIcon:Je,customizeIconProps:{value:vr,disabled:na,isSelected:po}},po?"\u2713":null))}))},jr=yt.forwardRef(Or),yr=jr,rr=function(je,Ve){var An=yt.useRef({values:new Map,options:new Map}),En=yt.useMemo(function(){var Tn=An.current,Xn=Tn.values,hr=Tn.options,xr=je.map(function(Dn){if(Dn.label===void 0){var sr;return(0,zt.Z)((0,zt.Z)({},Dn),{},{label:(sr=Xn.get(Dn.value))===null||sr===void 0?void 0:sr.label})}return Dn}),On=new Map,Fn=new Map;return xr.forEach(function(Dn){On.set(Dn.value,Dn),Fn.set(Dn.value,Ve.get(Dn.value)||hr.get(Dn.value))}),An.current.values=On,An.current.options=Fn,xr},[je,Ve]),$e=yt.useCallback(function(Tn){return Ve.get(Tn)||An.current.options.get(Tn)},[Ve]);return[En,$e]};function Rr(je,Ve){return se(je).join("").toUpperCase().includes(Ve)}var te=function(je,Ve,An,En,$e){return yt.useMemo(function(){if(!An||En===!1)return je;var Tn=Ve.options,Xn=Ve.label,hr=Ve.value,xr=[],On=typeof En=="function",Fn=An.toUpperCase(),Dn=On?En:function(or,xn){return $e?Rr(xn[$e],Fn):xn[Tn]?Rr(xn[Xn!=="children"?Xn:"label"],Fn):Rr(xn[hr],Fn)},sr=On?function(or){return Ae(or)}:function(or){return or};return je.forEach(function(or){if(or[Tn]){var xn=Dn(An,sr(or));if(xn)xr.push(or);else{var Gn=or[Tn].filter(function(Yr){return Dn(An,sr(Yr))});Gn.length&&xr.push((0,zt.Z)((0,zt.Z)({},or),{},(0,ot.Z)({},Tn,Gn)))}return}Dn(An,sr(or))&&xr.push(or)}),xr},[je,En,$e,An,Ve])},Qn=ue(6551),Vn=ue(11592),Rn=["children","value"],zn=["children"];function Wn(je){var Ve=je,An=Ve.key,En=Ve.props,$e=En.children,Tn=En.value,Xn=(0,vt.Z)(En,Rn);return(0,zt.Z)({key:An,value:Tn!==void 0?Tn:An,children:$e},Xn)}function tr(je){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Vn.Z)(je).map(function(An,En){if(!yt.isValidElement(An)||!An.type)return null;var $e=An,Tn=$e.type.isSelectOptGroup,Xn=$e.key,hr=$e.props,xr=hr.children,On=(0,vt.Z)(hr,zn);return Ve||!Tn?Wn(An):(0,zt.Z)((0,zt.Z)({key:"__RC_SELECT_GRP__".concat(Xn===null?En:Xn,"__"),label:Xn},On),{},{options:tr(xr)})}).filter(function(An){return An})}var Ar=function(Ve,An,En,$e,Tn){return yt.useMemo(function(){var Xn=Ve,hr=!Ve;hr&&(Xn=tr(An));var xr=new Map,On=new Map,Fn=function(or,xn,Gn){Gn&&typeof Gn=="string"&&or.set(xn[Gn],xn)},Dn=function sr(or){for(var xn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gn=0;Gn<or.length;Gn+=1){var Yr=or[Gn];!Yr[En.options]||xn?(xr.set(Yr[En.value],Yr),Fn(On,Yr,En.label),Fn(On,Yr,$e),Fn(On,Yr,Tn)):sr(Yr[En.options],!0)}};return Dn(Xn),{options:Xn,valueOptions:xr,labelOptions:On}},[Ve,An,En,$e,Tn])},sn=Ar;function tn(je){var Ve=yt.useRef();Ve.current=je;var An=yt.useCallback(function(){return Ve.current.apply(Ve,arguments)},[]);return An}function Ye(je){var Ve=je.mode,An=je.options,En=je.children,$e=je.backfill,Tn=je.allowClear,Xn=je.placeholder,hr=je.getInputElement,xr=je.showSearch,On=je.onSearch,Fn=je.defaultOpen,Dn=je.autoFocus,sr=je.labelInValue,or=je.value,xn=je.inputValue,Gn=je.optionLabelProp,Yr=isMultiple(Ve),ei=xr!==void 0?xr:Yr||Ve==="combobox",xi=An||convertChildrenToData(En);if(warning(Ve!=="tags"||xi.every(function(ir){return!ir.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ve==="tags"||Ve==="combobox"){var Je=xi.some(function(ir){return ir.options?ir.options.some(function(oi){return typeof("value"in oi?oi.value:oi.key)=="number"}):typeof("value"in ir?ir.value:ir.key)=="number"});warning(!Je,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ve!=="combobox"||!Gn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ve==="combobox"||!$e,"`backfill` only works with `combobox` mode."),warning(Ve==="combobox"||!hr,"`getInputElement` only work with `combobox` mode."),noteOnce(Ve!=="combobox"||!hr||!Tn||!Xn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),On&&!ei&&Ve!=="combobox"&&Ve!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Fn||Dn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),or!=null){var cr=toArray(or);warning(!sr||cr.every(function(ir){return _typeof(ir)==="object"&&("key"in ir||"value"in ir)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Yr||Array.isArray(or),"`value` should be array when `mode` is `multiple` or `tags`")}if(En){var _r=null;toNodeArray(En).some(function(ir){if(!React.isValidElement(ir)||!ir.type)return!1;var oi=ir,Jr=oi.type;if(Jr.isSelectOption)return!1;if(Jr.isSelectOptGroup){var ni=toNodeArray(ir.props.children).every(function(Kr){return!React.isValidElement(Kr)||!ir.type||Kr.type.isSelectOption?!0:(_r=Kr.type,!1)});return!ni}return _r=Jr,!0}),_r&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(_r.displayName||_r.name||_r,"`.")),warning(xn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function hn(je,Ve){if(je){var An=function En($e){for(var Tn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xn=0;Xn<$e.length;Xn++){var hr=$e[Xn];if(hr[Ve==null?void 0:Ve.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Tn&&Array.isArray(hr[Ve==null?void 0:Ve.options])&&En(hr[Ve==null?void 0:Ve.options],!0))break}};An(je)}}var nr=null,Zn=["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"],mr=["inputValue"];function an(je){return!je||(0,gt.Z)(je)!=="object"}var mn=yt.forwardRef(function(je,Ve){var An=je.id,En=je.mode,$e=je.prefixCls,Tn=$e===void 0?"rc-select":$e,Xn=je.backfill,hr=je.fieldNames,xr=je.inputValue,On=je.searchValue,Fn=je.onSearch,Dn=je.autoClearSearchValue,sr=Dn===void 0?!0:Dn,or=je.onSelect,xn=je.onDeselect,Gn=je.dropdownMatchSelectWidth,Yr=Gn===void 0?!0:Gn,ei=je.filterOption,xi=je.filterSort,Je=je.optionFilterProp,cr=je.optionLabelProp,_r=je.options,ir=je.optionRender,oi=je.children,Jr=je.defaultActiveFirstOption,ni=je.menuItemSelectedIcon,Kr=je.virtual,$r=je.direction,hi=je.listHeight,yn=hi===void 0?200:hi,mi=je.listItemHeight,vn=mi===void 0?20:mi,ii=je.labelRender,Gi=je.value,gi=je.defaultValue,Bi=je.labelInValue,ri=je.onChange,Br=je.maxCount,wi=(0,vt.Z)(je,Zn),Eo=(0,Qn.ZP)(An),Oi=Ue(En),Yn=!!(!_r&&oi),Le=yt.useMemo(function(){return ei===void 0&&En==="combobox"?!1:ei},[ei,En]),Ti=yt.useMemo(function(){return ye(hr,Yn)},[JSON.stringify(hr),Yn]),so=(0,kt.Z)("",{value:On!==void 0?On:xr,postState:function(qr){return qr||""}}),Ji=(0,Bt.Z)(so,2),Zi=Ji[0],di=Ji[1],lr=sn(_r,oi,Ti,Je,cr),wr=lr.valueOptions,Vr=lr.labelOptions,gr=lr.options,Ur=yt.useCallback(function(zr){var qr=se(zr);return qr.map(function(ai){var pi,Vi,Fr,ws,ia;if(an(ai))pi=ai;else{var Uo;Fr=ai.key,Vi=ai.label,pi=(Uo=ai.value)!==null&&Uo!==void 0?Uo:Fr}var oo=wr.get(pi);if(oo){var Ja;if(Vi===void 0&&(Vi=oo==null?void 0:oo[cr||Ti.label]),Fr===void 0&&(Fr=(Ja=oo==null?void 0:oo.key)!==null&&Ja!==void 0?Ja:pi),ws=oo==null?void 0:oo.disabled,ia=oo==null?void 0:oo.title,0)var bs}return{label:Vi,value:pi,key:Fr,disabled:ws,title:ia}})},[Ti,cr,wr]),vr=(0,kt.Z)(gi,{value:Gi}),ur=(0,Bt.Z)(vr,2),Mr=ur[0],kn=ur[1],fi=yt.useMemo(function(){var zr,qr=Oi&&Mr===null?[]:Mr,ai=Ur(qr);return En==="combobox"&&ne((zr=ai[0])===null||zr===void 0?void 0:zr.value)?[]:ai},[Mr,Ur,En,Oi]),Ci=rr(fi,wr),io=(0,Bt.Z)(Ci,2),bi=io[0],lo=io[1],xo=yt.useMemo(function(){if(!En&&bi.length===1){var zr=bi[0];if(zr.value===null&&(zr.label===null||zr.label===void 0))return[]}return bi.map(function(qr){var ai;return(0,zt.Z)((0,zt.Z)({},qr),{},{label:(ai=typeof ii=="function"?ii(qr):qr.label)!==null&&ai!==void 0?ai:qr.value})})},[En,bi,ii]),Bo=yt.useMemo(function(){return new Set(bi.map(function(zr){return zr.value}))},[bi]);yt.useEffect(function(){if(En==="combobox"){var zr,qr=(zr=bi[0])===null||zr===void 0?void 0:zr.value;di(Yt(qr)?String(qr):"")}},[bi]);var po=tn(function(zr,qr){var ai=qr!=null?qr:zr;return(0,ot.Z)((0,ot.Z)({},Ti.value,zr),Ti.label,ai)}),na=yt.useMemo(function(){if(En!=="tags")return gr;var zr=(0,Re.Z)(gr),qr=function(pi){return wr.has(pi)};return(0,Re.Z)(bi).sort(function(ai,pi){return ai.value<pi.value?-1:1}).forEach(function(ai){var pi=ai.value;qr(pi)||zr.push(po(pi,ai.label))}),zr},[po,gr,wr,bi,En]),Ao=te(na,Ti,Zi,Le,Je),on=yt.useMemo(function(){return En!=="tags"||!Zi||Ao.some(function(zr){return zr[Je||"value"]===Zi})||Ao.some(function(zr){return zr[Ti.value]===Zi})?Ao:[po(Zi)].concat((0,Re.Z)(Ao))},[po,Je,En,Ao,Zi,Ti]),ra=function zr(qr){var ai=(0,Re.Z)(qr).sort(function(pi,Vi){return xi(pi,Vi,{searchValue:Zi})});return ai.map(function(pi){return Array.isArray(pi.options)?(0,zt.Z)((0,zt.Z)({},pi),{},{options:pi.options.length>0?zr(pi.options):pi.options}):pi})},za=yt.useMemo(function(){return xi?ra(on):on},[on,xi,Zi]),Ya=yt.useMemo(function(){return Pe(za,{fieldNames:Ti,childrenAsData:Yn})},[za,Ti,Yn]),Hi=function(qr){var ai=Ur(qr);if(kn(ai),ri&&(ai.length!==bi.length||ai.some(function(Fr,ws){var ia;return((ia=bi[ws])===null||ia===void 0?void 0:ia.value)!==(Fr==null?void 0:Fr.value)}))){var pi=Bi?ai:ai.map(function(Fr){return Fr.value}),Vi=ai.map(function(Fr){return Ae(lo(Fr.value))});ri(Oi?pi:pi[0],Oi?Vi:Vi[0])}},Js=yt.useState(null),ls=(0,Bt.Z)(Js,2),Ml=ls[0],Ai=ls[1],No=yt.useState(0),Ga=(0,Bt.Z)(No,2),dl=Ga[0],uu=Ga[1],xs=Jr!==void 0?Jr:En!=="combobox",Dr=yt.useCallback(function(zr,qr){var ai=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pi=ai.source,Vi=pi===void 0?"keyboard":pi;uu(qr),Xn&&En==="combobox"&&zr!==null&&Vi==="keyboard"&&Ai(String(zr))},[Xn,En]),Gl=function(qr,ai,pi){var Vi=function(){var Tl,Qs=lo(qr);return[Bi?{label:Qs==null?void 0:Qs[Ti.label],value:qr,key:(Tl=Qs==null?void 0:Qs.key)!==null&&Tl!==void 0?Tl:qr}:qr,Ae(Qs)]};if(ai&&or){var Fr=Vi(),ws=(0,Bt.Z)(Fr,2),ia=ws[0],Uo=ws[1];or(ia,Uo)}else if(!ai&&xn&&pi!=="clear"){var oo=Vi(),Ja=(0,Bt.Z)(oo,2),bs=Ja[0],Aa=Ja[1];xn(bs,Aa)}},hu=tn(function(zr,qr){var ai,pi=Oi?qr.selected:!0;pi?ai=Oi?[].concat((0,Re.Z)(bi),[zr]):[zr]:ai=bi.filter(function(Vi){return Vi.value!==zr}),Hi(ai),Gl(zr,pi),En==="combobox"?Ai(""):(!Ue||sr)&&(di(""),Ai(""))}),us=function(qr,ai){Hi(qr);var pi=ai.type,Vi=ai.values;(pi==="remove"||pi==="clear")&&Vi.forEach(function(Fr){Gl(Fr.value,!1,pi)})},Xo=function(qr,ai){if(di(qr),Ai(null),ai.source==="submit"){var pi=(qr||"").trim();if(pi){var Vi=Array.from(new Set([].concat((0,Re.Z)(Bo),[pi])));Hi(Vi),Gl(pi,!0),di("")}return}ai.source!=="blur"&&(En==="combobox"&&Hi(qr),Fn==null||Fn(qr))},Nu=function(qr){var ai=qr;En!=="tags"&&(ai=qr.map(function(Vi){var Fr=Vr.get(Vi);return Fr==null?void 0:Fr.value}).filter(function(Vi){return Vi!==void 0}));var pi=Array.from(new Set([].concat((0,Re.Z)(Bo),(0,Re.Z)(ai))));Hi(pi),pi.forEach(function(Vi){Gl(Vi,!0)})},er=yt.useMemo(function(){var zr=Kr!==!1&&Yr!==!1;return(0,zt.Z)((0,zt.Z)({},lr),{},{flattenOptions:Ya,onActiveValue:Dr,defaultActiveFirstOption:xs,onSelect:hu,menuItemSelectedIcon:ni,rawValues:Bo,fieldNames:Ti,virtual:zr,direction:$r,listHeight:yn,listItemHeight:vn,childrenAsData:Yn,maxCount:Br,optionRender:ir})},[Br,lr,Ya,Dr,xs,hu,ni,Bo,Ti,Kr,Yr,$r,yn,vn,Yn,ir]);return yt.createElement(Qe.Provider,{value:er},yt.createElement(He,(0,ae.Z)({},wi,{id:Eo,prefixCls:Tn,ref:Ve,omitDomProps:mr,mode:En,displayValues:xo,onDisplayValuesChange:us,direction:$r,searchValue:Zi,onSearch:Xo,autoClearSearchValue:sr,onSearchSplit:Nu,dropdownMatchSelectWidth:Yr,OptionList:yr,emptyOptions:!Ya.length,activeValue:Ml,activeDescendantId:"".concat(Eo,"_list_").concat(dl)})))}),$n=mn;$n.Option=bn,$n.OptGroup=ln;var fr=$n,Mn=fr},63158:function(pn,dn,ue){"use strict";var ae=ue(67711),Re=ue(52873),ot=ue(16886),zt=ue(33346),Bt=ue(59301),vt=ue(92310),gt=ue.n(vt),kt=ue(18929),Ct=ue(10228),yt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Tt=Bt.forwardRef(function(mt,xt){var ft,z=mt.prefixCls,tt=z===void 0?"rc-switch":z,at=mt.className,it=mt.checked,lt=mt.defaultChecked,ut=mt.disabled,dt=mt.loadingIcon,bt=mt.checkedChildren,At=mt.unCheckedChildren,Dt=mt.onClick,Ft=mt.onChange,jt=mt.onKeyDown,Nt=(0,zt.Z)(mt,yt),_t=(0,kt.Z)(!1,{value:it,defaultValue:lt}),Wt=(0,ot.Z)(_t,2),Jt=Wt[0],Ut=Wt[1];function Vt(be,Yt){var ne=Jt;return ut||(ne=be,Ut(ne),Ft==null||Ft(ne,Yt)),ne}function oe(be){be.which===Ct.Z.LEFT?Vt(!1,be):be.which===Ct.Z.RIGHT&&Vt(!0,be),jt==null||jt(be)}function se(be){var Yt=Vt(!Jt,be);Dt==null||Dt(Yt,be)}var he=gt()(tt,at,(ft={},(0,Re.Z)(ft,"".concat(tt,"-checked"),Jt),(0,Re.Z)(ft,"".concat(tt,"-disabled"),ut),ft));return Bt.createElement("button",(0,ae.Z)({},Nt,{type:"button",role:"switch","aria-checked":Jt,disabled:ut,className:he,ref:xt,onKeyDown:oe,onClick:se}),dt,Bt.createElement("span",{className:"".concat(tt,"-inner")},Bt.createElement("span",{className:"".concat(tt,"-inner-checked")},bt),Bt.createElement("span",{className:"".concat(tt,"-inner-unchecked")},At)))});Tt.displayName="Switch",dn.Z=Tt},22711:function(pn,dn,ue){"use strict";ue.r(dn),ue.d(dn,{ResizableTextArea:function(){return Wt},default:function(){return oe}});var ae=ue(67711),Re=ue(52873),ot=ue(98506),zt=ue(15142),Bt=ue(16886),vt=ue(33346),gt=ue(92310),kt=ue.n(gt),Ct=ue(36901),yt=ue(66003),Tt=ue(30292),mt=ue(18929),xt=ue(59301),ft=ue(26420),z=ue(29301),tt=ue(34280),at=ue(16089),it=`
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;
`,lt=["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"],ut={},dt;function bt(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=se.getAttribute("id")||se.getAttribute("data-reactid")||se.getAttribute("name");if(he&&ut[be])return ut[be];var Yt=window.getComputedStyle(se),ne=Yt.getPropertyValue("box-sizing")||Yt.getPropertyValue("-moz-box-sizing")||Yt.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(Yt.getPropertyValue("padding-bottom"))+parseFloat(Yt.getPropertyValue("padding-top")),Se=parseFloat(Yt.getPropertyValue("border-bottom-width"))+parseFloat(Yt.getPropertyValue("border-top-width")),we=lt.map(function(de){return"".concat(de,":").concat(Yt.getPropertyValue(de))}).join(";"),ce={sizingStyle:we,paddingSize:ve,borderSize:Se,boxSizing:ne};return he&&be&&(ut[be]=ce),ce}function At(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Yt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;dt||(dt=document.createElement("textarea"),dt.setAttribute("tab-index","-1"),dt.setAttribute("aria-hidden","true"),dt.setAttribute("name","hiddenTextarea"),document.body.appendChild(dt)),se.getAttribute("wrap")?dt.setAttribute("wrap",se.getAttribute("wrap")):dt.removeAttribute("wrap");var ne=bt(se,he),ve=ne.paddingSize,Se=ne.borderSize,we=ne.boxSizing,ce=ne.sizingStyle;dt.setAttribute("style","".concat(ce,";").concat(it)),dt.value=se.value||se.placeholder||"";var de=void 0,le=void 0,Ce,fe=dt.scrollHeight;if(we==="border-box"?fe+=Se:we==="content-box"&&(fe-=ve),be!==null||Yt!==null){dt.value=" ";var me=dt.scrollHeight-ve;be!==null&&(de=me*be,we==="border-box"&&(de=de+ve+Se),fe=Math.max(de,fe)),Yt!==null&&(le=me*Yt,we==="border-box"&&(le=le+ve+Se),Ce=fe>le?"":"hidden",fe=Math.min(le,fe))}var ke={height:fe,overflowY:Ce,resize:"none"};return de&&(ke.minHeight=de),le&&(ke.maxHeight=le),ke}var Dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ft=0,jt=1,Nt=2,_t=xt.forwardRef(function(se,he){var be=se,Yt=be.prefixCls,ne=be.defaultValue,ve=be.value,Se=be.autoSize,we=be.onResize,ce=be.className,de=be.style,le=be.disabled,Ce=be.onChange,fe=be.onInternalAutoSize,me=(0,vt.Z)(be,Dt),ke=(0,mt.Z)(ne,{value:ve,postState:function(bn){return bn!=null?bn:""}}),pe=(0,Bt.Z)(ke,2),qt=pe[0],Kt=pe[1],wt=function(bn){Kt(bn.target.value),Ce==null||Ce(bn)},Lt=xt.useRef();xt.useImperativeHandle(he,function(){return{textArea:Lt.current}});var Zt=xt.useMemo(function(){return Se&&(0,ft.Z)(Se)==="object"?[Se.minRows,Se.maxRows]:[]},[Se]),ee=(0,Bt.Z)(Zt,2),It=ee[0],Rt=ee[1],Ht=!!Se,re=function(){try{if(document.activeElement===Lt.current){var bn=Lt.current,In=bn.selectionStart,jn=bn.selectionEnd,Kn=bn.scrollTop;Lt.current.setSelectionRange(In,jn),Lt.current.scrollTop=Kn}}catch(kr){}},ye=xt.useState(Nt),Pe=(0,Bt.Z)(ye,2),Ae=Pe[0],Oe=Pe[1],Ie=xt.useState(),Qe=(0,Bt.Z)(Ie,2),qe=Qe[0],nn=Qe[1],Ke=function(){Oe(Ft)};(0,tt.Z)(function(){Ht&&Ke()},[ve,It,Rt,Ht]),(0,tt.Z)(function(){if(Ae===Ft)Oe(jt);else if(Ae===jt){var un=At(Lt.current,!1,It,Rt);Oe(Nt),nn(un)}else re()},[Ae]);var Ue=xt.useRef(),We=function(){at.Z.cancel(Ue.current)},He=function(bn){Ae===Nt&&(we==null||we(bn),Se&&(We(),Ue.current=(0,at.Z)(function(){Ke()})))};xt.useEffect(function(){return We},[]);var rn=Ht?qe:null,ln=(0,ot.Z)((0,ot.Z)({},de),rn);return(Ae===Ft||Ae===jt)&&(ln.overflowY="hidden",ln.overflowX="hidden"),xt.createElement(z.Z,{onResize:He,disabled:!(Se||we)},xt.createElement("textarea",(0,ae.Z)({},me,{ref:Lt,style:ln,className:kt()(Yt,ce,(0,Re.Z)({},"".concat(Yt,"-disabled"),le)),disabled:le,value:qt,onChange:wt})))}),Wt=_t,Jt=["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"],Ut=xt.forwardRef(function(se,he){var be,Yt=se.defaultValue,ne=se.value,ve=se.onFocus,Se=se.onBlur,we=se.onChange,ce=se.allowClear,de=se.maxLength,le=se.onCompositionStart,Ce=se.onCompositionEnd,fe=se.suffix,me=se.prefixCls,ke=me===void 0?"rc-textarea":me,pe=se.showCount,qt=se.count,Kt=se.className,wt=se.style,Lt=se.disabled,Zt=se.hidden,ee=se.classNames,It=se.styles,Rt=se.onResize,Ht=se.onClear,re=se.onPressEnter,ye=se.readOnly,Pe=se.autoSize,Ae=se.onKeyDown,Oe=(0,vt.Z)(se,Jt),Ie=(0,mt.Z)(Yt,{value:ne,defaultValue:Yt}),Qe=(0,Bt.Z)(Ie,2),qe=Qe[0],nn=Qe[1],Ke=qe==null?"":String(qe),Ue=xt.useState(!1),We=(0,Bt.Z)(Ue,2),He=We[0],rn=We[1],ln=xt.useRef(!1),un=xt.useState(null),bn=(0,Bt.Z)(un,2),In=bn[0],jn=bn[1],Kn=(0,xt.useRef)(null),kr=(0,xt.useRef)(null),pr=function(){var $n;return($n=kr.current)===null||$n===void 0?void 0:$n.textArea},Er=function(){pr().focus()};(0,xt.useImperativeHandle)(he,function(){var mn;return{resizableTextArea:kr.current,focus:Er,blur:function(){pr().blur()},nativeElement:((mn=Kn.current)===null||mn===void 0?void 0:mn.nativeElement)||pr()}}),(0,xt.useEffect)(function(){rn(function(mn){return!Lt&&mn})},[Lt]);var Or=xt.useState(null),jr=(0,Bt.Z)(Or,2),yr=jr[0],rr=jr[1];xt.useEffect(function(){if(yr){var mn;(mn=pr()).setSelectionRange.apply(mn,(0,zt.Z)(yr))}},[yr]);var Rr=(0,yt.Z)(qt,pe),te=(be=Rr.max)!==null&&be!==void 0?be:de,Qn=Number(te)>0,Vn=Rr.strategy(Ke),Rn=!!te&&Vn>te,zn=function($n,fr){var Mn=fr;!ln.current&&Rr.exceedFormatter&&Rr.max&&Rr.strategy(fr)>Rr.max&&(Mn=Rr.exceedFormatter(fr,{max:Rr.max}),fr!==Mn&&rr([pr().selectionStart||0,pr().selectionEnd||0])),nn(Mn),(0,Tt.rJ)($n.currentTarget,$n,we,Mn)},Wn=function($n){ln.current=!0,le==null||le($n)},tr=function($n){ln.current=!1,zn($n,$n.currentTarget.value),Ce==null||Ce($n)},Ar=function($n){zn($n,$n.target.value)},sn=function($n){$n.key==="Enter"&&re&&re($n),Ae==null||Ae($n)},tn=function($n){rn(!0),ve==null||ve($n)},Ye=function($n){rn(!1),Se==null||Se($n)},hn=function($n){nn(""),Er(),(0,Tt.rJ)(pr(),$n,we)},nr=fe,Zn;Rr.show&&(Rr.showFormatter?Zn=Rr.showFormatter({value:Ke,count:Vn,maxLength:te}):Zn="".concat(Vn).concat(Qn?" / ".concat(te):""),nr=xt.createElement(xt.Fragment,null,nr,xt.createElement("span",{className:kt()("".concat(ke,"-data-count"),ee==null?void 0:ee.count),style:It==null?void 0:It.count},Zn)));var mr=function($n){var fr;Rt==null||Rt($n),(fr=pr())!==null&&fr!==void 0&&fr.style.height&&jn(!0)},an=!Pe&&!pe&&!ce;return xt.createElement(Ct.BaseInput,{ref:Kn,value:Ke,allowClear:ce,handleReset:hn,suffix:nr,prefixCls:ke,classNames:(0,ot.Z)((0,ot.Z)({},ee),{},{affixWrapper:kt()(ee==null?void 0:ee.affixWrapper,(0,Re.Z)((0,Re.Z)({},"".concat(ke,"-show-count"),pe),"".concat(ke,"-textarea-allow-clear"),ce))}),disabled:Lt,focused:He,className:kt()(Kt,Rn&&"".concat(ke,"-out-of-range")),style:(0,ot.Z)((0,ot.Z)({},wt),In&&!an?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Zn=="string"?Zn:void 0}},hidden:Zt,readOnly:ye,onClear:Ht},xt.createElement(Wt,(0,ae.Z)({},Oe,{autoSize:Pe,maxLength:de,onKeyDown:sn,onChange:Ar,onFocus:tn,onBlur:Ye,onCompositionStart:Wn,onCompositionEnd:tr,className:kt()(ee==null?void 0:ee.textarea),style:(0,ot.Z)((0,ot.Z)({},It==null?void 0:It.textarea),{},{resize:wt==null?void 0:wt.resize}),disabled:Lt,prefixCls:ke,onResize:mr,ref:kr,readOnly:ye})))}),Vt=Ut,oe=Vt},639:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return ut}});var ae=ue(67711),Re=ue(52873),ot=ue(98506),zt=ue(16886),Bt=ue(33346),vt=ue(59301),gt=ue(92310),kt=ue.n(gt),Ct=ue(26112),yt=ue(30699),Tt=function(bt){for(var At=bt.prefixCls,Dt=bt.level,Ft=bt.isStart,jt=bt.isEnd,Nt="".concat(At,"-indent-unit"),_t=[],Wt=0;Wt<Dt;Wt+=1)_t.push(vt.createElement("span",{key:Wt,className:kt()(Nt,(0,Re.Z)((0,Re.Z)({},"".concat(Nt,"-start"),Ft[Wt]),"".concat(Nt,"-end"),jt[Wt]))}));return vt.createElement("span",{"aria-hidden":"true",className:"".concat(At,"-indent")},_t)},mt=vt.memo(Tt),xt=ue(65065),ft=ue(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],tt="open",at="close",it="---",lt=function(bt){var At,Dt,Ft,jt=bt.eventKey,Nt=bt.className,_t=bt.style,Wt=bt.dragOver,Jt=bt.dragOverGapTop,Ut=bt.dragOverGapBottom,Vt=bt.isLeaf,oe=bt.isStart,se=bt.isEnd,he=bt.expanded,be=bt.selected,Yt=bt.checked,ne=bt.halfChecked,ve=bt.loading,Se=bt.domRef,we=bt.active,ce=bt.data,de=bt.onMouseMove,le=bt.selectable,Ce=(0,Bt.Z)(bt,z),fe=vt.useContext(yt.k),me=vt.useContext(yt.y),ke=vt.useRef(null),pe=vt.useState(!1),qt=(0,zt.Z)(pe,2),Kt=qt[0],wt=qt[1],Lt=!!(fe.disabled||bt.disabled||(At=me.nodeDisabled)!==null&&At!==void 0&&At.call(me,ce)),Zt=vt.useMemo(function(){return!fe.checkable||bt.checkable===!1?!1:fe.checkable},[fe.checkable,bt.checkable]),ee=function(Vn){Lt||fe.onNodeSelect(Vn,(0,ft.F)(bt))},It=function(Vn){Lt||!Zt||bt.disableCheckbox||fe.onNodeCheck(Vn,(0,ft.F)(bt),!Yt)},Rt=vt.useMemo(function(){return typeof le=="boolean"?le:fe.selectable},[le,fe.selectable]),Ht=function(Vn){fe.onNodeClick(Vn,(0,ft.F)(bt)),Rt?ee(Vn):It(Vn)},re=function(Vn){fe.onNodeDoubleClick(Vn,(0,ft.F)(bt))},ye=function(Vn){fe.onNodeMouseEnter(Vn,(0,ft.F)(bt))},Pe=function(Vn){fe.onNodeMouseLeave(Vn,(0,ft.F)(bt))},Ae=function(Vn){fe.onNodeContextMenu(Vn,(0,ft.F)(bt))},Oe=vt.useMemo(function(){return!!(fe.draggable&&(!fe.draggable.nodeDraggable||fe.draggable.nodeDraggable(ce)))},[fe.draggable,ce]),Ie=function(Vn){Vn.stopPropagation(),wt(!0),fe.onNodeDragStart(Vn,bt);try{Vn.dataTransfer.setData("text/plain","")}catch(Rn){}},Qe=function(Vn){Vn.preventDefault(),Vn.stopPropagation(),fe.onNodeDragEnter(Vn,bt)},qe=function(Vn){Vn.preventDefault(),Vn.stopPropagation(),fe.onNodeDragOver(Vn,bt)},nn=function(Vn){Vn.stopPropagation(),fe.onNodeDragLeave(Vn,bt)},Ke=function(Vn){Vn.stopPropagation(),wt(!1),fe.onNodeDragEnd(Vn,bt)},Ue=function(Vn){Vn.preventDefault(),Vn.stopPropagation(),wt(!1),fe.onNodeDrop(Vn,bt)},We=function(Vn){ve||fe.onNodeExpand(Vn,(0,ft.F)(bt))},He=vt.useMemo(function(){var Qn=(0,xt.Z)(fe.keyEntities,jt)||{},Vn=Qn.children;return!!(Vn||[]).length},[fe.keyEntities,jt]),rn=vt.useMemo(function(){return Vt===!1?!1:Vt||!fe.loadData&&!He||fe.loadData&&bt.loaded&&!He},[Vt,fe.loadData,He,bt.loaded]);vt.useEffect(function(){ve||typeof fe.loadData=="function"&&he&&!rn&&!bt.loaded&&fe.onNodeLoad((0,ft.F)(bt))},[ve,fe.loadData,fe.onNodeLoad,he,rn,bt]);var ln=vt.useMemo(function(){var Qn;return(Qn=fe.draggable)!==null&&Qn!==void 0&&Qn.icon?vt.createElement("span",{className:"".concat(fe.prefixCls,"-draggable-icon")},fe.draggable.icon):null},[fe.draggable]),un=function(Vn){var Rn=bt.switcherIcon||fe.switcherIcon;return typeof Rn=="function"?Rn((0,ot.Z)((0,ot.Z)({},bt),{},{isLeaf:Vn})):Rn},bn=function(){if(rn){var Vn=un(!0);return Vn!==!1?vt.createElement("span",{className:kt()("".concat(fe.prefixCls,"-switcher"),"".concat(fe.prefixCls,"-switcher-noop"))},Vn):null}var Rn=un(!1);return Rn!==!1?vt.createElement("span",{onClick:We,className:kt()("".concat(fe.prefixCls,"-switcher"),"".concat(fe.prefixCls,"-switcher_").concat(he?tt:at))},Rn):null},In=vt.useMemo(function(){if(!Zt)return null;var Qn=typeof Zt!="boolean"?Zt:null;return vt.createElement("span",{className:kt()("".concat(fe.prefixCls,"-checkbox"),(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(fe.prefixCls,"-checkbox-checked"),Yt),"".concat(fe.prefixCls,"-checkbox-indeterminate"),!Yt&&ne),"".concat(fe.prefixCls,"-checkbox-disabled"),Lt||bt.disableCheckbox)),onClick:It,role:"checkbox","aria-checked":ne?"mixed":Yt,"aria-disabled":Lt||bt.disableCheckbox,"aria-label":"Select ".concat(typeof bt.title=="string"?bt.title:"tree node")},Qn)},[Zt,Yt,ne,Lt,bt.disableCheckbox,bt.title]),jn=vt.useMemo(function(){return rn?null:he?tt:at},[rn,he]),Kn=vt.useMemo(function(){return vt.createElement("span",{className:kt()("".concat(fe.prefixCls,"-iconEle"),"".concat(fe.prefixCls,"-icon__").concat(jn||"docu"),(0,Re.Z)({},"".concat(fe.prefixCls,"-icon_loading"),ve))})},[fe.prefixCls,jn,ve]),kr=vt.useMemo(function(){var Qn=!!fe.draggable,Vn=!bt.disabled&&Qn&&fe.dragOverNodeKey===jt;return Vn?fe.dropIndicatorRender({dropPosition:fe.dropPosition,dropLevelOffset:fe.dropLevelOffset,indent:fe.indent,prefixCls:fe.prefixCls,direction:fe.direction}):null},[fe.dropPosition,fe.dropLevelOffset,fe.indent,fe.prefixCls,fe.direction,fe.draggable,fe.dragOverNodeKey,fe.dropIndicatorRender]),pr=vt.useMemo(function(){var Qn=bt.title,Vn=Qn===void 0?it:Qn,Rn="".concat(fe.prefixCls,"-node-content-wrapper"),zn;if(fe.showIcon){var Wn=bt.icon||fe.icon;zn=Wn?vt.createElement("span",{className:kt()("".concat(fe.prefixCls,"-iconEle"),"".concat(fe.prefixCls,"-icon__customize"))},typeof Wn=="function"?Wn(bt):Wn):Kn}else fe.loadData&&ve&&(zn=Kn);var tr;return typeof Vn=="function"?tr=Vn(ce):fe.titleRender?tr=fe.titleRender(ce):tr=Vn,vt.createElement("span",{ref:ke,title:typeof Vn=="string"?Vn:"",className:kt()(Rn,"".concat(Rn,"-").concat(jn||"normal"),(0,Re.Z)({},"".concat(fe.prefixCls,"-node-selected"),!Lt&&(be||Kt))),onMouseEnter:ye,onMouseLeave:Pe,onContextMenu:Ae,onClick:Ht,onDoubleClick:re},zn,vt.createElement("span",{className:"".concat(fe.prefixCls,"-title")},tr),kr)},[fe.prefixCls,fe.showIcon,bt,fe.icon,Kn,fe.titleRender,ce,jn,ye,Pe,Ae,Ht,re]),Er=(0,Ct.Z)(Ce,{aria:!0,data:!0}),Or=(0,xt.Z)(fe.keyEntities,jt)||{},jr=Or.level,yr=se[se.length-1],rr=!Lt&&Oe,Rr=fe.draggingNodeKey===jt,te=le!==void 0?{"aria-selected":!!le}:void 0;return vt.createElement("div",(0,ae.Z)({ref:Se,role:"treeitem","aria-expanded":Vt?void 0:he,className:kt()(Nt,"".concat(fe.prefixCls,"-treenode"),(Ft={},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"".concat(fe.prefixCls,"-treenode-disabled"),Lt),"".concat(fe.prefixCls,"-treenode-switcher-").concat(he?"open":"close"),!Vt),"".concat(fe.prefixCls,"-treenode-checkbox-checked"),Yt),"".concat(fe.prefixCls,"-treenode-checkbox-indeterminate"),ne),"".concat(fe.prefixCls,"-treenode-selected"),be),"".concat(fe.prefixCls,"-treenode-loading"),ve),"".concat(fe.prefixCls,"-treenode-active"),we),"".concat(fe.prefixCls,"-treenode-leaf-last"),yr),"".concat(fe.prefixCls,"-treenode-draggable"),Oe),"dragging",Rr),(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"drop-target",fe.dropTargetKey===jt),"drop-container",fe.dropContainerKey===jt),"drag-over",!Lt&&Wt),"drag-over-gap-top",!Lt&&Jt),"drag-over-gap-bottom",!Lt&&Ut),"filter-node",(Dt=fe.filterTreeNode)===null||Dt===void 0?void 0:Dt.call(fe,(0,ft.F)(bt))),"".concat(fe.prefixCls,"-treenode-leaf"),rn))),style:_t,draggable:rr,onDragStart:rr?Ie:void 0,onDragEnter:Oe?Qe:void 0,onDragOver:Oe?qe:void 0,onDragLeave:Oe?nn:void 0,onDrop:Oe?Ue:void 0,onDragEnd:Oe?Ke:void 0,onMouseMove:de},te,Er),vt.createElement(mt,{prefixCls:fe.prefixCls,level:jr,isStart:oe,isEnd:se}),ln,bn(),In,pr)};lt.isTreeNode=1;var ut=lt},30699:function(pn,dn,ue){"use strict";ue.d(dn,{k:function(){return Re},y:function(){return ot}});var ae=ue(59301),Re=ae.createContext(null),ot=ae.createContext({})},71598:function(pn,dn,ue){"use strict";ue.d(dn,{OF:function(){return jt.Z},y6:function(){return at.y},ZP:function(){return Lt}});var ae=ue(67711),Re=ue(26420),ot=ue(98506),zt=ue(15142),Bt=ue(42573),vt=ue(58698),gt=ue(62437),kt=ue(74700),Ct=ue(45080),yt=ue(52873),Tt=ue(92310),mt=ue.n(Tt),xt=ue(10228),ft=ue(26112),z=ue(48736),tt=ue(59301),at=ue(30699),it=function(ee){var It=ee.dropPosition,Rt=ee.dropLevelOffset,Ht=ee.indent,re={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(It){case-1:re.top=0,re.left=-Rt*Ht;break;case 1:re.bottom=0,re.left=-Rt*Ht;break;case 0:re.bottom=0,re.left=Ht;break}return tt.createElement("div",{style:re})},lt=it;function ut(Zt){if(Zt==null)throw new TypeError("Cannot destructure "+Zt)}var dt=ue(16886),bt=ue(33346),At=ue(34280),Dt=ue(6790),Ft=ue(77900),jt=ue(639);function Nt(Zt,ee){var It=tt.useState(!1),Rt=(0,dt.Z)(It,2),Ht=Rt[0],re=Rt[1];(0,At.Z)(function(){if(Ht)return Zt(),function(){ee()}},[Ht]),(0,At.Z)(function(){return re(!0),function(){re(!1)}},[])}var _t=Nt,Wt=ue(34061),Jt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ut=tt.forwardRef(function(Zt,ee){var It=Zt.className,Rt=Zt.style,Ht=Zt.motion,re=Zt.motionNodes,ye=Zt.motionType,Pe=Zt.onMotionStart,Ae=Zt.onMotionEnd,Oe=Zt.active,Ie=Zt.treeNodeRequiredProps,Qe=(0,bt.Z)(Zt,Jt),qe=tt.useState(!0),nn=(0,dt.Z)(qe,2),Ke=nn[0],Ue=nn[1],We=tt.useContext(at.k),He=We.prefixCls,rn=re&&ye!=="hide";(0,At.Z)(function(){re&&rn!==Ke&&Ue(rn)},[re]);var ln=function(){re&&Pe()},un=tt.useRef(!1),bn=function(){re&&!un.current&&(un.current=!0,Ae())};_t(ln,bn);var In=function(Kn){rn===Kn&&bn()};return re?tt.createElement(Ft.default,(0,ae.Z)({ref:ee,visible:Ke},Ht,{motionAppear:ye==="show",onVisibleChanged:In}),function(jn,Kn){var kr=jn.className,pr=jn.style;return tt.createElement("div",{ref:Kn,className:mt()("".concat(He,"-treenode-motion"),kr),style:pr},re.map(function(Er){var Or=Object.assign({},(ut(Er.data),Er.data)),jr=Er.title,yr=Er.key,rr=Er.isStart,Rr=Er.isEnd;delete Or.children;var te=(0,Wt.H8)(yr,Ie);return tt.createElement(jt.Z,(0,ae.Z)({},Or,te,{title:jr,active:Oe,data:Er.data,key:yr,isStart:rr,isEnd:Rr}))}))}):tt.createElement(jt.Z,(0,ae.Z)({domRef:ee,className:It,style:Rt},Qe,{active:Oe}))}),Vt=Ut;function oe(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],It=Zt.length,Rt=ee.length;if(Math.abs(It-Rt)!==1)return{add:!1,key:null};function Ht(re,ye){var Pe=new Map;re.forEach(function(Oe){Pe.set(Oe,!0)});var Ae=ye.filter(function(Oe){return!Pe.has(Oe)});return Ae.length===1?Ae[0]:null}return It<Rt?{add:!0,key:Ht(Zt,ee)}:{add:!1,key:Ht(ee,Zt)}}function se(Zt,ee,It){var Rt=Zt.findIndex(function(Pe){return Pe.key===It}),Ht=Zt[Rt+1],re=ee.findIndex(function(Pe){return Pe.key===It});if(Ht){var ye=ee.findIndex(function(Pe){return Pe.key===Ht.key});return ee.slice(re+1,ye)}return ee.slice(re+1)}var he=["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"],be={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yt=function(){},ne="RC_TREE_MOTION_".concat(Math.random()),ve={key:ne},Se={key:ne,level:0,index:0,pos:"0",node:ve,nodes:[ve]},we={parent:null,children:[],pos:Se.pos,data:ve,title:null,key:ne,isStart:[],isEnd:[]};function ce(Zt,ee,It,Rt){return ee===!1||!It?Zt:Zt.slice(0,Math.ceil(It/Rt)+1)}function de(Zt){var ee=Zt.key,It=Zt.pos;return(0,Wt.km)(ee,It)}function le(Zt){for(var ee=String(Zt.data.key),It=Zt;It.parent;)It=It.parent,ee="".concat(It.data.key," > ").concat(ee);return ee}var Ce=tt.forwardRef(function(Zt,ee){var It=Zt.prefixCls,Rt=Zt.data,Ht=Zt.selectable,re=Zt.checkable,ye=Zt.expandedKeys,Pe=Zt.selectedKeys,Ae=Zt.checkedKeys,Oe=Zt.loadedKeys,Ie=Zt.loadingKeys,Qe=Zt.halfCheckedKeys,qe=Zt.keyEntities,nn=Zt.disabled,Ke=Zt.dragging,Ue=Zt.dragOverNodeKey,We=Zt.dropPosition,He=Zt.motion,rn=Zt.height,ln=Zt.itemHeight,un=Zt.virtual,bn=Zt.scrollWidth,In=Zt.focusable,jn=Zt.activeItem,Kn=Zt.focused,kr=Zt.tabIndex,pr=Zt.onKeyDown,Er=Zt.onFocus,Or=Zt.onBlur,jr=Zt.onActiveChange,yr=Zt.onListChangeStart,rr=Zt.onListChangeEnd,Rr=(0,bt.Z)(Zt,he),te=tt.useRef(null),Qn=tt.useRef(null);tt.useImperativeHandle(ee,function(){return{scrollTo:function(hr){te.current.scrollTo(hr)},getIndentWidth:function(){return Qn.current.offsetWidth}}});var Vn=tt.useState(ye),Rn=(0,dt.Z)(Vn,2),zn=Rn[0],Wn=Rn[1],tr=tt.useState(Rt),Ar=(0,dt.Z)(tr,2),sn=Ar[0],tn=Ar[1],Ye=tt.useState(Rt),hn=(0,dt.Z)(Ye,2),nr=hn[0],Zn=hn[1],mr=tt.useState([]),an=(0,dt.Z)(mr,2),mn=an[0],$n=an[1],fr=tt.useState(null),Mn=(0,dt.Z)(fr,2),je=Mn[0],Ve=Mn[1],An=tt.useRef(Rt);An.current=Rt;function En(){var Xn=An.current;tn(Xn),Zn(Xn),$n([]),Ve(null),rr()}(0,At.Z)(function(){Wn(ye);var Xn=oe(zn,ye);if(Xn.key!==null)if(Xn.add){var hr=sn.findIndex(function(or){var xn=or.key;return xn===Xn.key}),xr=ce(se(sn,Rt,Xn.key),un,rn,ln),On=sn.slice();On.splice(hr+1,0,we),Zn(On),$n(xr),Ve("show")}else{var Fn=Rt.findIndex(function(or){var xn=or.key;return xn===Xn.key}),Dn=ce(se(Rt,sn,Xn.key),un,rn,ln),sr=Rt.slice();sr.splice(Fn+1,0,we),Zn(sr),$n(Dn),Ve("hide")}else sn!==Rt&&(tn(Rt),Zn(Rt))},[ye,Rt]),tt.useEffect(function(){Ke||En()},[Ke]);var $e=He?nr:Rt,Tn={expandedKeys:ye,selectedKeys:Pe,loadedKeys:Oe,loadingKeys:Ie,checkedKeys:Ae,halfCheckedKeys:Qe,dragOverNodeKey:Ue,dropPosition:We,keyEntities:qe};return tt.createElement(tt.Fragment,null,Kn&&jn&&tt.createElement("span",{style:be,"aria-live":"assertive"},le(jn)),tt.createElement("div",null,tt.createElement("input",{style:be,disabled:In===!1||nn,tabIndex:In!==!1?kr:null,onKeyDown:pr,onFocus:Er,onBlur:Or,value:"",onChange:Yt,"aria-label":"for screen reader"})),tt.createElement("div",{className:"".concat(It,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},tt.createElement("div",{className:"".concat(It,"-indent")},tt.createElement("div",{ref:Qn,className:"".concat(It,"-indent-unit")}))),tt.createElement(Dt.Z,(0,ae.Z)({},Rr,{data:$e,itemKey:de,height:rn,fullHeight:!1,virtual:un,itemHeight:ln,scrollWidth:bn,prefixCls:"".concat(It,"-list"),ref:te,role:"tree",onVisibleChange:function(hr){hr.every(function(xr){return de(xr)!==ne})&&En()}}),function(Xn){var hr=Xn.pos,xr=Object.assign({},(ut(Xn.data),Xn.data)),On=Xn.title,Fn=Xn.key,Dn=Xn.isStart,sr=Xn.isEnd,or=(0,Wt.km)(Fn,hr);delete xr.key,delete xr.children;var xn=(0,Wt.H8)(or,Tn);return tt.createElement(Vt,(0,ae.Z)({},xr,xn,{title:On,active:!!jn&&Fn===jn.key,pos:hr,data:Xn.data,isStart:Dn,isEnd:sr,motion:He,motionNodes:Fn===ne?mn:null,motionType:je,onMotionStart:yr,onMotionEnd:En,treeNodeRequiredProps:Tn,onMouseMove:function(){jr(null)}}))}))}),fe=Ce,me=ue(82661),ke=ue(34643),pe=ue(65065),qt=10,Kt=function(Zt){(0,kt.Z)(It,Zt);var ee=(0,Ct.Z)(It);function It(){var Rt;(0,Bt.Z)(this,It);for(var Ht=arguments.length,re=new Array(Ht),ye=0;ye<Ht;ye++)re[ye]=arguments[ye];return Rt=ee.call.apply(ee,[this].concat(re)),(0,yt.Z)((0,gt.Z)(Rt),"destroyed",!1),(0,yt.Z)((0,gt.Z)(Rt),"delayedDragEnterLogic",void 0),(0,yt.Z)((0,gt.Z)(Rt),"loadingRetryTimes",{}),(0,yt.Z)((0,gt.Z)(Rt),"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,Wt.w$)()}),(0,yt.Z)((0,gt.Z)(Rt),"dragStartMousePosition",null),(0,yt.Z)((0,gt.Z)(Rt),"dragNodeProps",null),(0,yt.Z)((0,gt.Z)(Rt),"currentMouseOverDroppableNodeKey",null),(0,yt.Z)((0,gt.Z)(Rt),"listRef",tt.createRef()),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDragStart",function(Pe,Ae){var Oe=Rt.state,Ie=Oe.expandedKeys,Qe=Oe.keyEntities,qe=Rt.props.onDragStart,nn=Ae.eventKey;Rt.dragNodeProps=Ae,Rt.dragStartMousePosition={x:Pe.clientX,y:Pe.clientY};var Ke=(0,me._5)(Ie,nn);Rt.setState({draggingNodeKey:nn,dragChildrenKeys:(0,me.wA)(nn,Qe),indent:Rt.listRef.current.getIndentWidth()}),Rt.setExpandedKeys(Ke),window.addEventListener("dragend",Rt.onWindowDragEnd),qe==null||qe({event:Pe,node:(0,Wt.F)(Ae)})}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDragEnter",function(Pe,Ae){var Oe=Rt.state,Ie=Oe.expandedKeys,Qe=Oe.keyEntities,qe=Oe.dragChildrenKeys,nn=Oe.flattenNodes,Ke=Oe.indent,Ue=Rt.props,We=Ue.onDragEnter,He=Ue.onExpand,rn=Ue.allowDrop,ln=Ue.direction,un=Ae.pos,bn=Ae.eventKey;if(Rt.currentMouseOverDroppableNodeKey!==bn&&(Rt.currentMouseOverDroppableNodeKey=bn),!Rt.dragNodeProps){Rt.resetDragState();return}var In=(0,me.OM)(Pe,Rt.dragNodeProps,Ae,Ke,Rt.dragStartMousePosition,rn,nn,Qe,Ie,ln),jn=In.dropPosition,Kn=In.dropLevelOffset,kr=In.dropTargetKey,pr=In.dropContainerKey,Er=In.dropTargetPos,Or=In.dropAllowed,jr=In.dragOverNodeKey;if(qe.includes(kr)||!Or){Rt.resetDragState();return}if(Rt.delayedDragEnterLogic||(Rt.delayedDragEnterLogic={}),Object.keys(Rt.delayedDragEnterLogic).forEach(function(yr){clearTimeout(Rt.delayedDragEnterLogic[yr])}),Rt.dragNodeProps.eventKey!==Ae.eventKey&&(Pe.persist(),Rt.delayedDragEnterLogic[un]=window.setTimeout(function(){if(Rt.state.draggingNodeKey!==null){var yr=(0,zt.Z)(Ie),rr=(0,pe.Z)(Qe,Ae.eventKey);rr&&(rr.children||[]).length&&(yr=(0,me.L0)(Ie,Ae.eventKey)),Rt.props.hasOwnProperty("expandedKeys")||Rt.setExpandedKeys(yr),He==null||He(yr,{node:(0,Wt.F)(Ae),expanded:!0,nativeEvent:Pe.nativeEvent})}},800)),Rt.dragNodeProps.eventKey===kr&&Kn===0){Rt.resetDragState();return}Rt.setState({dragOverNodeKey:jr,dropPosition:jn,dropLevelOffset:Kn,dropTargetKey:kr,dropContainerKey:pr,dropTargetPos:Er,dropAllowed:Or}),We==null||We({event:Pe,node:(0,Wt.F)(Ae),expandedKeys:Ie})}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDragOver",function(Pe,Ae){var Oe=Rt.state,Ie=Oe.dragChildrenKeys,Qe=Oe.flattenNodes,qe=Oe.keyEntities,nn=Oe.expandedKeys,Ke=Oe.indent,Ue=Rt.props,We=Ue.onDragOver,He=Ue.allowDrop,rn=Ue.direction;if(Rt.dragNodeProps){var ln=(0,me.OM)(Pe,Rt.dragNodeProps,Ae,Ke,Rt.dragStartMousePosition,He,Qe,qe,nn,rn),un=ln.dropPosition,bn=ln.dropLevelOffset,In=ln.dropTargetKey,jn=ln.dropContainerKey,Kn=ln.dropTargetPos,kr=ln.dropAllowed,pr=ln.dragOverNodeKey;Ie.includes(In)||!kr||(Rt.dragNodeProps.eventKey===In&&bn===0?Rt.state.dropPosition===null&&Rt.state.dropLevelOffset===null&&Rt.state.dropTargetKey===null&&Rt.state.dropContainerKey===null&&Rt.state.dropTargetPos===null&&Rt.state.dropAllowed===!1&&Rt.state.dragOverNodeKey===null||Rt.resetDragState():un===Rt.state.dropPosition&&bn===Rt.state.dropLevelOffset&&In===Rt.state.dropTargetKey&&jn===Rt.state.dropContainerKey&&Kn===Rt.state.dropTargetPos&&kr===Rt.state.dropAllowed&&pr===Rt.state.dragOverNodeKey||Rt.setState({dropPosition:un,dropLevelOffset:bn,dropTargetKey:In,dropContainerKey:jn,dropTargetPos:Kn,dropAllowed:kr,dragOverNodeKey:pr}),We==null||We({event:Pe,node:(0,Wt.F)(Ae)}))}}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDragLeave",function(Pe,Ae){Rt.currentMouseOverDroppableNodeKey===Ae.eventKey&&!Pe.currentTarget.contains(Pe.relatedTarget)&&(Rt.resetDragState(),Rt.currentMouseOverDroppableNodeKey=null);var Oe=Rt.props.onDragLeave;Oe==null||Oe({event:Pe,node:(0,Wt.F)(Ae)})}),(0,yt.Z)((0,gt.Z)(Rt),"onWindowDragEnd",function(Pe){Rt.onNodeDragEnd(Pe,null,!0),window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDragEnd",function(Pe,Ae){var Oe=Rt.props.onDragEnd;Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Oe==null||Oe({event:Pe,node:(0,Wt.F)(Ae)}),Rt.dragNodeProps=null,window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDrop",function(Pe,Ae){var Oe,Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Qe=Rt.state,qe=Qe.dragChildrenKeys,nn=Qe.dropPosition,Ke=Qe.dropTargetKey,Ue=Qe.dropTargetPos,We=Qe.dropAllowed;if(We){var He=Rt.props.onDrop;if(Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Ke!==null){var rn=(0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(Ke,Rt.getTreeNodeRequiredProps())),{},{active:((Oe=Rt.getActiveItem())===null||Oe===void 0?void 0:Oe.key)===Ke,data:(0,pe.Z)(Rt.state.keyEntities,Ke).node}),ln=qe.includes(Ke);(0,z.ZP)(!ln,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var un=(0,me.yx)(Ue),bn={event:Pe,node:(0,Wt.F)(rn),dragNode:Rt.dragNodeProps?(0,Wt.F)(Rt.dragNodeProps):null,dragNodesKeys:[Rt.dragNodeProps.eventKey].concat(qe),dropToGap:nn!==0,dropPosition:nn+Number(un[un.length-1])};Ie||He==null||He(bn),Rt.dragNodeProps=null}}}),(0,yt.Z)((0,gt.Z)(Rt),"cleanDragState",function(){var Pe=Rt.state.draggingNodeKey;Pe!==null&&Rt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Rt.dragStartMousePosition=null,Rt.currentMouseOverDroppableNodeKey=null}),(0,yt.Z)((0,gt.Z)(Rt),"triggerExpandActionExpand",function(Pe,Ae){var Oe=Rt.state,Ie=Oe.expandedKeys,Qe=Oe.flattenNodes,qe=Ae.expanded,nn=Ae.key,Ke=Ae.isLeaf;if(!(Ke||Pe.shiftKey||Pe.metaKey||Pe.ctrlKey)){var Ue=Qe.filter(function(He){return He.key===nn})[0],We=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(nn,Rt.getTreeNodeRequiredProps())),{},{data:Ue.data}));Rt.setExpandedKeys(qe?(0,me._5)(Ie,nn):(0,me.L0)(Ie,nn)),Rt.onNodeExpand(Pe,We)}}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeClick",function(Pe,Ae){var Oe=Rt.props,Ie=Oe.onClick,Qe=Oe.expandAction;Qe==="click"&&Rt.triggerExpandActionExpand(Pe,Ae),Ie==null||Ie(Pe,Ae)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeDoubleClick",function(Pe,Ae){var Oe=Rt.props,Ie=Oe.onDoubleClick,Qe=Oe.expandAction;Qe==="doubleClick"&&Rt.triggerExpandActionExpand(Pe,Ae),Ie==null||Ie(Pe,Ae)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeSelect",function(Pe,Ae){var Oe=Rt.state.selectedKeys,Ie=Rt.state,Qe=Ie.keyEntities,qe=Ie.fieldNames,nn=Rt.props,Ke=nn.onSelect,Ue=nn.multiple,We=Ae.selected,He=Ae[qe.key],rn=!We;rn?Ue?Oe=(0,me.L0)(Oe,He):Oe=[He]:Oe=(0,me._5)(Oe,He);var ln=Oe.map(function(un){var bn=(0,pe.Z)(Qe,un);return bn?bn.node:null}).filter(Boolean);Rt.setUncontrolledState({selectedKeys:Oe}),Ke==null||Ke(Oe,{event:"select",selected:rn,node:Ae,selectedNodes:ln,nativeEvent:Pe.nativeEvent})}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeCheck",function(Pe,Ae,Oe){var Ie=Rt.state,Qe=Ie.keyEntities,qe=Ie.checkedKeys,nn=Ie.halfCheckedKeys,Ke=Rt.props,Ue=Ke.checkStrictly,We=Ke.onCheck,He=Ae.key,rn,ln={event:"check",node:Ae,checked:Oe,nativeEvent:Pe.nativeEvent};if(Ue){var un=Oe?(0,me.L0)(qe,He):(0,me._5)(qe,He),bn=(0,me._5)(nn,He);rn={checked:un,halfChecked:bn},ln.checkedNodes=un.map(function(Er){return(0,pe.Z)(Qe,Er)}).filter(Boolean).map(function(Er){return Er.node}),Rt.setUncontrolledState({checkedKeys:un})}else{var In=(0,ke.S)([].concat((0,zt.Z)(qe),[He]),!0,Qe),jn=In.checkedKeys,Kn=In.halfCheckedKeys;if(!Oe){var kr=new Set(jn);kr.delete(He);var pr=(0,ke.S)(Array.from(kr),{checked:!1,halfCheckedKeys:Kn},Qe);jn=pr.checkedKeys,Kn=pr.halfCheckedKeys}rn=jn,ln.checkedNodes=[],ln.checkedNodesPositions=[],ln.halfCheckedKeys=Kn,jn.forEach(function(Er){var Or=(0,pe.Z)(Qe,Er);if(Or){var jr=Or.node,yr=Or.pos;ln.checkedNodes.push(jr),ln.checkedNodesPositions.push({node:jr,pos:yr})}}),Rt.setUncontrolledState({checkedKeys:jn},!1,{halfCheckedKeys:Kn})}We==null||We(rn,ln)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeLoad",function(Pe){var Ae,Oe=Pe.key,Ie=Rt.state.keyEntities,Qe=(0,pe.Z)(Ie,Oe);if(!(Qe!=null&&(Ae=Qe.children)!==null&&Ae!==void 0&&Ae.length)){var qe=new Promise(function(nn,Ke){Rt.setState(function(Ue){var We=Ue.loadedKeys,He=We===void 0?[]:We,rn=Ue.loadingKeys,ln=rn===void 0?[]:rn,un=Rt.props,bn=un.loadData,In=un.onLoad;if(!bn||He.includes(Oe)||ln.includes(Oe))return null;var jn=bn(Pe);return jn.then(function(){var Kn=Rt.state.loadedKeys,kr=(0,me.L0)(Kn,Oe);In==null||In(kr,{event:"load",node:Pe}),Rt.setUncontrolledState({loadedKeys:kr}),Rt.setState(function(pr){return{loadingKeys:(0,me._5)(pr.loadingKeys,Oe)}}),nn()}).catch(function(Kn){if(Rt.setState(function(pr){return{loadingKeys:(0,me._5)(pr.loadingKeys,Oe)}}),Rt.loadingRetryTimes[Oe]=(Rt.loadingRetryTimes[Oe]||0)+1,Rt.loadingRetryTimes[Oe]>=qt){var kr=Rt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Rt.setUncontrolledState({loadedKeys:(0,me.L0)(kr,Oe)}),nn()}Ke(Kn)}),{loadingKeys:(0,me.L0)(ln,Oe)}})});return qe.catch(function(){}),qe}}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeMouseEnter",function(Pe,Ae){var Oe=Rt.props.onMouseEnter;Oe==null||Oe({event:Pe,node:Ae})}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeMouseLeave",function(Pe,Ae){var Oe=Rt.props.onMouseLeave;Oe==null||Oe({event:Pe,node:Ae})}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeContextMenu",function(Pe,Ae){var Oe=Rt.props.onRightClick;Oe&&(Pe.preventDefault(),Oe({event:Pe,node:Ae}))}),(0,yt.Z)((0,gt.Z)(Rt),"onFocus",function(){var Pe=Rt.props.onFocus;Rt.setState({focused:!0});for(var Ae=arguments.length,Oe=new Array(Ae),Ie=0;Ie<Ae;Ie++)Oe[Ie]=arguments[Ie];Pe==null||Pe.apply(void 0,Oe)}),(0,yt.Z)((0,gt.Z)(Rt),"onBlur",function(){var Pe=Rt.props.onBlur;Rt.setState({focused:!1}),Rt.onActiveChange(null);for(var Ae=arguments.length,Oe=new Array(Ae),Ie=0;Ie<Ae;Ie++)Oe[Ie]=arguments[Ie];Pe==null||Pe.apply(void 0,Oe)}),(0,yt.Z)((0,gt.Z)(Rt),"getTreeNodeRequiredProps",function(){var Pe=Rt.state,Ae=Pe.expandedKeys,Oe=Pe.selectedKeys,Ie=Pe.loadedKeys,Qe=Pe.loadingKeys,qe=Pe.checkedKeys,nn=Pe.halfCheckedKeys,Ke=Pe.dragOverNodeKey,Ue=Pe.dropPosition,We=Pe.keyEntities;return{expandedKeys:Ae||[],selectedKeys:Oe||[],loadedKeys:Ie||[],loadingKeys:Qe||[],checkedKeys:qe||[],halfCheckedKeys:nn||[],dragOverNodeKey:Ke,dropPosition:Ue,keyEntities:We}}),(0,yt.Z)((0,gt.Z)(Rt),"setExpandedKeys",function(Pe){var Ae=Rt.state,Oe=Ae.treeData,Ie=Ae.fieldNames,Qe=(0,Wt.oH)(Oe,Pe,Ie);Rt.setUncontrolledState({expandedKeys:Pe,flattenNodes:Qe},!0)}),(0,yt.Z)((0,gt.Z)(Rt),"onNodeExpand",function(Pe,Ae){var Oe=Rt.state.expandedKeys,Ie=Rt.state,Qe=Ie.listChanging,qe=Ie.fieldNames,nn=Rt.props,Ke=nn.onExpand,Ue=nn.loadData,We=Ae.expanded,He=Ae[qe.key];if(!Qe){var rn=Oe.includes(He),ln=!We;if((0,z.ZP)(We&&rn||!We&&!rn,"Expand state not sync with index check"),Oe=ln?(0,me.L0)(Oe,He):(0,me._5)(Oe,He),Rt.setExpandedKeys(Oe),Ke==null||Ke(Oe,{node:Ae,expanded:ln,nativeEvent:Pe.nativeEvent}),ln&&Ue){var un=Rt.onNodeLoad(Ae);un&&un.then(function(){var bn=(0,Wt.oH)(Rt.state.treeData,Oe,qe);Rt.setUncontrolledState({flattenNodes:bn})}).catch(function(){var bn=Rt.state.expandedKeys,In=(0,me._5)(bn,He);Rt.setExpandedKeys(In)})}}}),(0,yt.Z)((0,gt.Z)(Rt),"onListChangeStart",function(){Rt.setUncontrolledState({listChanging:!0})}),(0,yt.Z)((0,gt.Z)(Rt),"onListChangeEnd",function(){setTimeout(function(){Rt.setUncontrolledState({listChanging:!1})})}),(0,yt.Z)((0,gt.Z)(Rt),"onActiveChange",function(Pe){var Ae=Rt.state.activeKey,Oe=Rt.props,Ie=Oe.onActiveChange,Qe=Oe.itemScrollOffset,qe=Qe===void 0?0:Qe;Ae!==Pe&&(Rt.setState({activeKey:Pe}),Pe!==null&&Rt.scrollTo({key:Pe,offset:qe}),Ie==null||Ie(Pe))}),(0,yt.Z)((0,gt.Z)(Rt),"getActiveItem",function(){var Pe=Rt.state,Ae=Pe.activeKey,Oe=Pe.flattenNodes;return Ae===null?null:Oe.find(function(Ie){var Qe=Ie.key;return Qe===Ae})||null}),(0,yt.Z)((0,gt.Z)(Rt),"offsetActiveKey",function(Pe){var Ae=Rt.state,Oe=Ae.flattenNodes,Ie=Ae.activeKey,Qe=Oe.findIndex(function(Ke){var Ue=Ke.key;return Ue===Ie});Qe===-1&&Pe<0&&(Qe=Oe.length),Qe=(Qe+Pe+Oe.length)%Oe.length;var qe=Oe[Qe];if(qe){var nn=qe.key;Rt.onActiveChange(nn)}else Rt.onActiveChange(null)}),(0,yt.Z)((0,gt.Z)(Rt),"onKeyDown",function(Pe){var Ae=Rt.state,Oe=Ae.activeKey,Ie=Ae.expandedKeys,Qe=Ae.checkedKeys,qe=Ae.fieldNames,nn=Rt.props,Ke=nn.onKeyDown,Ue=nn.checkable,We=nn.selectable;switch(Pe.which){case xt.Z.UP:{Rt.offsetActiveKey(-1),Pe.preventDefault();break}case xt.Z.DOWN:{Rt.offsetActiveKey(1),Pe.preventDefault();break}}var He=Rt.getActiveItem();if(He&&He.data){var rn=Rt.getTreeNodeRequiredProps(),ln=He.data.isLeaf===!1||!!(He.data[qe.children]||[]).length,un=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(Oe,rn)),{},{data:He.data,active:!0}));switch(Pe.which){case xt.Z.LEFT:{ln&&Ie.includes(Oe)?Rt.onNodeExpand({},un):He.parent&&Rt.onActiveChange(He.parent.key),Pe.preventDefault();break}case xt.Z.RIGHT:{ln&&!Ie.includes(Oe)?Rt.onNodeExpand({},un):He.children&&He.children.length&&Rt.onActiveChange(He.children[0].key),Pe.preventDefault();break}case xt.Z.ENTER:case xt.Z.SPACE:{Ue&&!un.disabled&&un.checkable!==!1&&!un.disableCheckbox?Rt.onNodeCheck({},un,!Qe.includes(Oe)):!Ue&&We&&!un.disabled&&un.selectable!==!1&&Rt.onNodeSelect({},un);break}}}Ke==null||Ke(Pe)}),(0,yt.Z)((0,gt.Z)(Rt),"setUncontrolledState",function(Pe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Rt.destroyed){var Ie=!1,Qe=!0,qe={};Object.keys(Pe).forEach(function(nn){if(Rt.props.hasOwnProperty(nn)){Qe=!1;return}Ie=!0,qe[nn]=Pe[nn]}),Ie&&(!Ae||Qe)&&Rt.setState((0,ot.Z)((0,ot.Z)({},qe),Oe))}}),(0,yt.Z)((0,gt.Z)(Rt),"scrollTo",function(Pe){Rt.listRef.current.scrollTo(Pe)}),Rt}return(0,vt.Z)(It,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ht=this.props,re=Ht.activeKey,ye=Ht.itemScrollOffset,Pe=ye===void 0?0:ye;re!==void 0&&re!==this.state.activeKey&&(this.setState({activeKey:re}),re!==null&&this.scrollTo({key:re,offset:Pe}))}},{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 Ht=this.state,re=Ht.focused,ye=Ht.flattenNodes,Pe=Ht.keyEntities,Ae=Ht.draggingNodeKey,Oe=Ht.activeKey,Ie=Ht.dropLevelOffset,Qe=Ht.dropContainerKey,qe=Ht.dropTargetKey,nn=Ht.dropPosition,Ke=Ht.dragOverNodeKey,Ue=Ht.indent,We=this.props,He=We.prefixCls,rn=We.className,ln=We.style,un=We.showLine,bn=We.focusable,In=We.tabIndex,jn=In===void 0?0:In,Kn=We.selectable,kr=We.showIcon,pr=We.icon,Er=We.switcherIcon,Or=We.draggable,jr=We.checkable,yr=We.checkStrictly,rr=We.disabled,Rr=We.motion,te=We.loadData,Qn=We.filterTreeNode,Vn=We.height,Rn=We.itemHeight,zn=We.scrollWidth,Wn=We.virtual,tr=We.titleRender,Ar=We.dropIndicatorRender,sn=We.onContextMenu,tn=We.onScroll,Ye=We.direction,hn=We.rootClassName,nr=We.rootStyle,Zn=(0,ft.Z)(this.props,{aria:!0,data:!0}),mr;Or&&((0,Re.Z)(Or)==="object"?mr=Or:typeof Or=="function"?mr={nodeDraggable:Or}:mr={});var an={prefixCls:He,selectable:Kn,showIcon:kr,icon:pr,switcherIcon:Er,draggable:mr,draggingNodeKey:Ae,checkable:jr,checkStrictly:yr,disabled:rr,keyEntities:Pe,dropLevelOffset:Ie,dropContainerKey:Qe,dropTargetKey:qe,dropPosition:nn,dragOverNodeKey:Ke,indent:Ue,direction:Ye,dropIndicatorRender:Ar,loadData:te,filterTreeNode:Qn,titleRender:tr,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 tt.createElement(at.k.Provider,{value:an},tt.createElement("div",{className:mt()(He,rn,hn,(0,yt.Z)((0,yt.Z)((0,yt.Z)({},"".concat(He,"-show-line"),un),"".concat(He,"-focused"),re),"".concat(He,"-active-focused"),Oe!==null)),style:nr},tt.createElement(fe,(0,ae.Z)({ref:this.listRef,prefixCls:He,style:ln,data:ye,disabled:rr,selectable:Kn,checkable:!!jr,motion:Rr,dragging:Ae!==null,height:Vn,itemHeight:Rn,virtual:Wn,focusable:bn,focused:re,tabIndex:jn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:sn,onScroll:tn,scrollWidth:zn},this.getTreeNodeRequiredProps(),Zn))))}}],[{key:"getDerivedStateFromProps",value:function(Ht,re){var ye=re.prevProps,Pe={prevProps:Ht};function Ae(jn){return!ye&&Ht.hasOwnProperty(jn)||ye&&ye[jn]!==Ht[jn]}var Oe,Ie=re.fieldNames;if(Ae("fieldNames")&&(Ie=(0,Wt.w$)(Ht.fieldNames),Pe.fieldNames=Ie),Ae("treeData")?Oe=Ht.treeData:Ae("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Oe=(0,Wt.zn)(Ht.children)),Oe){Pe.treeData=Oe;var Qe=(0,Wt.I8)(Oe,{fieldNames:Ie});Pe.keyEntities=(0,ot.Z)((0,yt.Z)({},ne,Se),Qe.keyEntities)}var qe=Pe.keyEntities||re.keyEntities;if(Ae("expandedKeys")||ye&&Ae("autoExpandParent"))Pe.expandedKeys=Ht.autoExpandParent||!ye&&Ht.defaultExpandParent?(0,me.r7)(Ht.expandedKeys,qe):Ht.expandedKeys;else if(!ye&&Ht.defaultExpandAll){var nn=(0,ot.Z)({},qe);delete nn[ne];var Ke=[];Object.keys(nn).forEach(function(jn){var Kn=nn[jn];Kn.children&&Kn.children.length&&Ke.push(Kn.key)}),Pe.expandedKeys=Ke}else!ye&&Ht.defaultExpandedKeys&&(Pe.expandedKeys=Ht.autoExpandParent||Ht.defaultExpandParent?(0,me.r7)(Ht.defaultExpandedKeys,qe):Ht.defaultExpandedKeys);if(Pe.expandedKeys||delete Pe.expandedKeys,Oe||Pe.expandedKeys){var Ue=(0,Wt.oH)(Oe||re.treeData,Pe.expandedKeys||re.expandedKeys,Ie);Pe.flattenNodes=Ue}if(Ht.selectable&&(Ae("selectedKeys")?Pe.selectedKeys=(0,me.BT)(Ht.selectedKeys,Ht):!ye&&Ht.defaultSelectedKeys&&(Pe.selectedKeys=(0,me.BT)(Ht.defaultSelectedKeys,Ht))),Ht.checkable){var We;if(Ae("checkedKeys")?We=(0,me.E6)(Ht.checkedKeys)||{}:!ye&&Ht.defaultCheckedKeys?We=(0,me.E6)(Ht.defaultCheckedKeys)||{}:Oe&&(We=(0,me.E6)(Ht.checkedKeys)||{checkedKeys:re.checkedKeys,halfCheckedKeys:re.halfCheckedKeys}),We){var He=We,rn=He.checkedKeys,ln=rn===void 0?[]:rn,un=He.halfCheckedKeys,bn=un===void 0?[]:un;if(!Ht.checkStrictly){var In=(0,ke.S)(ln,!0,qe);ln=In.checkedKeys,bn=In.halfCheckedKeys}Pe.checkedKeys=ln,Pe.halfCheckedKeys=bn}}return Ae("loadedKeys")&&(Pe.loadedKeys=Ht.loadedKeys),Pe}}]),It}(tt.Component);(0,yt.Z)(Kt,"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:lt,allowDrop:function(){return!0},expandAction:!1}),(0,yt.Z)(Kt,"TreeNode",jt.Z);var wt=Kt,Lt=wt},82661:function(pn,dn,ue){"use strict";ue.d(dn,{BT:function(){return tt},E6:function(){return lt},L0:function(){return yt},OM:function(){return z},_5:function(){return Ct},r7:function(){return ut},wA:function(){return mt},yx:function(){return Tt}});var ae=ue(15142),Re=ue(26420),ot=ue(48736),zt=ue(59301),Bt=ue(639),vt=ue(65065),gt=ue(34061),kt=null;function Ct(dt,bt){if(!dt)return[];var At=dt.slice(),Dt=At.indexOf(bt);return Dt>=0&&At.splice(Dt,1),At}function yt(dt,bt){var At=(dt||[]).slice();return At.indexOf(bt)===-1&&At.push(bt),At}function Tt(dt){return dt.split("-")}function mt(dt,bt){var At=[],Dt=(0,vt.Z)(bt,dt);function Ft(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];jt.forEach(function(Nt){var _t=Nt.key,Wt=Nt.children;At.push(_t),Ft(Wt)})}return Ft(Dt.children),At}function xt(dt){if(dt.parent){var bt=Tt(dt.pos);return Number(bt[bt.length-1])===dt.parent.children.length-1}return!1}function ft(dt){var bt=Tt(dt.pos);return Number(bt[bt.length-1])===0}function z(dt,bt,At,Dt,Ft,jt,Nt,_t,Wt,Jt){var Ut,Vt=dt.clientX,oe=dt.clientY,se=dt.target.getBoundingClientRect(),he=se.top,be=se.height,Yt=(Jt==="rtl"?-1:1)*(((Ft==null?void 0:Ft.x)||0)-Vt),ne=(Yt-12)/Dt,ve=Wt.filter(function(Lt){var Zt;return(Zt=_t[Lt])===null||Zt===void 0||(Zt=Zt.children)===null||Zt===void 0?void 0:Zt.length}),Se=(0,vt.Z)(_t,At.eventKey);if(oe<he+be/2){var we=Nt.findIndex(function(Lt){return Lt.key===Se.key}),ce=we<=0?0:we-1,de=Nt[ce].key;Se=(0,vt.Z)(_t,de)}var le=Se.key,Ce=Se,fe=Se.key,me=0,ke=0;if(!ve.includes(le))for(var pe=0;pe<ne&&xt(Se);pe+=1)Se=Se.parent,ke+=1;var qt=bt.data,Kt=Se.node,wt=!0;return ft(Se)&&Se.level===0&&oe<he+be/2&&jt({dragNode:qt,dropNode:Kt,dropPosition:-1})&&Se.key===At.eventKey?me=-1:(Ce.children||[]).length&&ve.includes(fe)?jt({dragNode:qt,dropNode:Kt,dropPosition:0})?me=0:wt=!1:ke===0?ne>-1.5?jt({dragNode:qt,dropNode:Kt,dropPosition:1})?me=1:wt=!1:jt({dragNode:qt,dropNode:Kt,dropPosition:0})?me=0:jt({dragNode:qt,dropNode:Kt,dropPosition:1})?me=1:wt=!1:jt({dragNode:qt,dropNode:Kt,dropPosition:1})?me=1:wt=!1,{dropPosition:me,dropLevelOffset:ke,dropTargetKey:Se.key,dropTargetPos:Se.pos,dragOverNodeKey:fe,dropContainerKey:me===0?null:((Ut=Se.parent)===null||Ut===void 0?void 0:Ut.key)||null,dropAllowed:wt}}function tt(dt,bt){if(dt){var At=bt.multiple;return At?dt.slice():dt.length?[dt[0]]:dt}}var at=function(bt){return bt};function it(dt,bt){if(!dt)return[];var At=bt||{},Dt=At.processProps,Ft=Dt===void 0?at:Dt,jt=Array.isArray(dt)?dt:[dt];return jt.map(function(Nt){var _t=Nt.children,Wt=_objectWithoutProperties(Nt,kt),Jt=it(_t,bt);return React.createElement(TreeNode,_extends({key:Wt.key},Ft(Wt)),Jt)})}function lt(dt){if(!dt)return null;var bt;if(Array.isArray(dt))bt={checkedKeys:dt,halfCheckedKeys:void 0};else if((0,Re.Z)(dt)==="object")bt={checkedKeys:dt.checked||void 0,halfCheckedKeys:dt.halfChecked||void 0};else return(0,ot.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return bt}function ut(dt,bt){var At=new Set;function Dt(Ft){if(!At.has(Ft)){var jt=(0,vt.Z)(bt,Ft);if(jt){At.add(Ft);var Nt=jt.parent,_t=jt.node;_t.disabled||Nt&&Dt(Nt.key)}}}return(dt||[]).forEach(function(Ft){Dt(Ft)}),(0,ae.Z)(At)}},34643:function(pn,dn,ue){"use strict";ue.d(dn,{S:function(){return gt}});var ae=ue(48736),Re=ue(65065);function ot(kt,Ct){var yt=new Set;return kt.forEach(function(Tt){Ct.has(Tt)||yt.add(Tt)}),yt}function zt(kt){var Ct=kt||{},yt=Ct.disabled,Tt=Ct.disableCheckbox,mt=Ct.checkable;return!!(yt||Tt)||mt===!1}function Bt(kt,Ct,yt,Tt){for(var mt=new Set(kt),xt=new Set,ft=0;ft<=yt;ft+=1){var z=Ct.get(ft)||new Set;z.forEach(function(lt){var ut=lt.key,dt=lt.node,bt=lt.children,At=bt===void 0?[]:bt;mt.has(ut)&&!Tt(dt)&&At.filter(function(Dt){return!Tt(Dt.node)}).forEach(function(Dt){mt.add(Dt.key)})})}for(var tt=new Set,at=yt;at>=0;at-=1){var it=Ct.get(at)||new Set;it.forEach(function(lt){var ut=lt.parent,dt=lt.node;if(!(Tt(dt)||!lt.parent||tt.has(lt.parent.key))){if(Tt(lt.parent.node)){tt.add(ut.key);return}var bt=!0,At=!1;(ut.children||[]).filter(function(Dt){return!Tt(Dt.node)}).forEach(function(Dt){var Ft=Dt.key,jt=mt.has(Ft);bt&&!jt&&(bt=!1),!At&&(jt||xt.has(Ft))&&(At=!0)}),bt&&mt.add(ut.key),At&&xt.add(ut.key),tt.add(ut.key)}})}return{checkedKeys:Array.from(mt),halfCheckedKeys:Array.from(ot(xt,mt))}}function vt(kt,Ct,yt,Tt,mt){for(var xt=new Set(kt),ft=new Set(Ct),z=0;z<=Tt;z+=1){var tt=yt.get(z)||new Set;tt.forEach(function(ut){var dt=ut.key,bt=ut.node,At=ut.children,Dt=At===void 0?[]:At;!xt.has(dt)&&!ft.has(dt)&&!mt(bt)&&Dt.filter(function(Ft){return!mt(Ft.node)}).forEach(function(Ft){xt.delete(Ft.key)})})}ft=new Set;for(var at=new Set,it=Tt;it>=0;it-=1){var lt=yt.get(it)||new Set;lt.forEach(function(ut){var dt=ut.parent,bt=ut.node;if(!(mt(bt)||!ut.parent||at.has(ut.parent.key))){if(mt(ut.parent.node)){at.add(dt.key);return}var At=!0,Dt=!1;(dt.children||[]).filter(function(Ft){return!mt(Ft.node)}).forEach(function(Ft){var jt=Ft.key,Nt=xt.has(jt);At&&!Nt&&(At=!1),!Dt&&(Nt||ft.has(jt))&&(Dt=!0)}),At||xt.delete(dt.key),Dt&&ft.add(dt.key),at.add(dt.key)}})}return{checkedKeys:Array.from(xt),halfCheckedKeys:Array.from(ot(ft,xt))}}function gt(kt,Ct,yt,Tt){var mt=[],xt;Tt?xt=Tt:xt=zt;var ft=new Set(kt.filter(function(it){var lt=!!(0,Re.Z)(yt,it);return lt||mt.push(it),lt})),z=new Map,tt=0;Object.keys(yt).forEach(function(it){var lt=yt[it],ut=lt.level,dt=z.get(ut);dt||(dt=new Set,z.set(ut,dt)),dt.add(lt),tt=Math.max(tt,ut)}),(0,ae.ZP)(!mt.length,"Tree missing follow keys: ".concat(mt.slice(0,100).map(function(it){return"'".concat(it,"'")}).join(", ")));var at;return Ct===!0?at=Bt(ft,z,tt,xt):at=vt(ft,Ct.halfCheckedKeys,z,tt,xt),at}},65065:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return ae}});function ae(Re,ot){return Re[ot]}},34061:function(pn,dn,ue){"use strict";ue.d(dn,{F:function(){return ut},H8:function(){return lt},I8:function(){return it},km:function(){return mt},oH:function(){return tt},w$:function(){return xt},zn:function(){return z}});var ae=ue(26420),Re=ue(15142),ot=ue(98506),zt=ue(33346),Bt=ue(11592),vt=ue(2738),gt=ue(48736),kt=ue(65065),Ct=["children"];function yt(dt,bt){return"".concat(dt,"-").concat(bt)}function Tt(dt){return dt&&dt.type&&dt.type.isTreeNode}function mt(dt,bt){return dt!=null?dt:bt}function xt(dt){var bt=dt||{},At=bt.title,Dt=bt._title,Ft=bt.key,jt=bt.children,Nt=At||"title";return{title:Nt,_title:Dt||[Nt],key:Ft||"key",children:jt||"children"}}function ft(dt,bt){var At=new Map;function Dt(Ft){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ft||[]).forEach(function(Nt){var _t=Nt[bt.key],Wt=Nt[bt.children];warning(_t!=null,"Tree node must have a certain key: [".concat(jt).concat(_t,"]"));var Jt=String(_t);warning(!At.has(Jt)||_t===null||_t===void 0,"Same 'key' exist in the Tree: ".concat(Jt)),At.set(Jt,!0),Dt(Wt,"".concat(jt).concat(Jt," > "))})}Dt(dt)}function z(dt){function bt(At){var Dt=(0,Bt.Z)(At);return Dt.map(function(Ft){if(!Tt(Ft))return(0,gt.ZP)(!Ft,"Tree/TreeNode can only accept TreeNode as children."),null;var jt=Ft.key,Nt=Ft.props,_t=Nt.children,Wt=(0,zt.Z)(Nt,Ct),Jt=(0,ot.Z)({key:jt},Wt),Ut=bt(_t);return Ut.length&&(Jt.children=Ut),Jt}).filter(function(Ft){return Ft})}return bt(dt)}function tt(dt,bt,At){var Dt=xt(At),Ft=Dt._title,jt=Dt.key,Nt=Dt.children,_t=new Set(bt===!0?[]:bt),Wt=[];function Jt(Ut){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ut.map(function(oe,se){for(var he=yt(Vt?Vt.pos:"0",se),be=mt(oe[jt],he),Yt,ne=0;ne<Ft.length;ne+=1){var ve=Ft[ne];if(oe[ve]!==void 0){Yt=oe[ve];break}}var Se=Object.assign((0,vt.Z)(oe,[].concat((0,Re.Z)(Ft),[jt,Nt])),{title:Yt,key:be,parent:Vt,pos:he,children:null,data:oe,isStart:[].concat((0,Re.Z)(Vt?Vt.isStart:[]),[se===0]),isEnd:[].concat((0,Re.Z)(Vt?Vt.isEnd:[]),[se===Ut.length-1])});return Wt.push(Se),bt===!0||_t.has(be)?Se.children=Jt(oe[Nt]||[],Se):Se.children=[],Se})}return Jt(dt),Wt}function at(dt,bt,At){var Dt={};(0,ae.Z)(At)==="object"?Dt=At:Dt={externalGetKey:At},Dt=Dt||{};var Ft=Dt,jt=Ft.childrenPropName,Nt=Ft.externalGetKey,_t=Ft.fieldNames,Wt=xt(_t),Jt=Wt.key,Ut=Wt.children,Vt=jt||Ut,oe;Nt?typeof Nt=="string"?oe=function(be){return be[Nt]}:typeof Nt=="function"&&(oe=function(be){return Nt(be)}):oe=function(be,Yt){return mt(be[Jt],Yt)};function se(he,be,Yt,ne){var ve=he?he[Vt]:dt,Se=he?yt(Yt.pos,be):"0",we=he?[].concat((0,Re.Z)(ne),[he]):[];if(he){var ce=oe(he,Se),de={node:he,index:be,pos:Se,key:ce,parentPos:Yt.node?Yt.pos:null,level:Yt.level+1,nodes:we};bt(de)}ve&&ve.forEach(function(le,Ce){se(le,Ce,{node:he,pos:Se,level:Yt?Yt.level+1:-1},we)})}se(null)}function it(dt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=bt.initWrapper,Dt=bt.processEntity,Ft=bt.onProcessFinished,jt=bt.externalGetKey,Nt=bt.childrenPropName,_t=bt.fieldNames,Wt=arguments.length>2?arguments[2]:void 0,Jt=jt||Wt,Ut={},Vt={},oe={posEntities:Ut,keyEntities:Vt};return At&&(oe=At(oe)||oe),at(dt,function(se){var he=se.node,be=se.index,Yt=se.pos,ne=se.key,ve=se.parentPos,Se=se.level,we=se.nodes,ce={node:he,nodes:we,index:be,key:ne,pos:Yt,level:Se},de=mt(ne,Yt);Ut[Yt]=ce,Vt[de]=ce,ce.parent=Ut[ve],ce.parent&&(ce.parent.children=ce.parent.children||[],ce.parent.children.push(ce)),Dt&&Dt(ce,oe)},{externalGetKey:Jt,childrenPropName:Nt,fieldNames:_t}),Ft&&Ft(oe),oe}function lt(dt,bt){var At=bt.expandedKeys,Dt=bt.selectedKeys,Ft=bt.loadedKeys,jt=bt.loadingKeys,Nt=bt.checkedKeys,_t=bt.halfCheckedKeys,Wt=bt.dragOverNodeKey,Jt=bt.dropPosition,Ut=bt.keyEntities,Vt=(0,kt.Z)(Ut,dt),oe={eventKey:dt,expanded:At.indexOf(dt)!==-1,selected:Dt.indexOf(dt)!==-1,loaded:Ft.indexOf(dt)!==-1,loading:jt.indexOf(dt)!==-1,checked:Nt.indexOf(dt)!==-1,halfChecked:_t.indexOf(dt)!==-1,pos:String(Vt?Vt.pos:""),dragOver:Wt===dt&&Jt===0,dragOverGapTop:Wt===dt&&Jt===-1,dragOverGapBottom:Wt===dt&&Jt===1};return oe}function ut(dt){var bt=dt.data,At=dt.expanded,Dt=dt.selected,Ft=dt.checked,jt=dt.loaded,Nt=dt.loading,_t=dt.halfChecked,Wt=dt.dragOver,Jt=dt.dragOverGapTop,Ut=dt.dragOverGapBottom,Vt=dt.pos,oe=dt.active,se=dt.eventKey,he=(0,ot.Z)((0,ot.Z)({},bt),{},{expanded:At,selected:Dt,checked:Ft,loaded:jt,loading:Nt,halfChecked:_t,dragOver:Wt,dragOverGapTop:Jt,dragOverGapBottom:Ut,pos:Vt,active:oe,key:se});return"props"in he||Object.defineProperty(he,"props",{get:function(){return(0,gt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),dt}}),he}},90472:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return se}});var ae=ue(67711),Re=ue(42573),ot=ue(58698),zt=ue(62437),Bt=ue(74700),vt=ue(45080),gt=ue(52873),kt=ue(59301),Ct=ue(98506),yt=ue(33346),Tt=ue(26420),mt=ue(77910),xt=ue(51343),ft=ue(15142),z=ue(92310),tt=ue.n(z),at=ue(26112),it=ue(48736),lt=function(he,be){if(he&&be){var Yt=Array.isArray(be)?be:be.split(","),ne=he.name||"",ve=he.type||"",Se=ve.replace(/\/.*$/,"");return Yt.some(function(we){var ce=we.trim();if(/^\*(\/\*)?$/.test(we))return!0;if(ce.charAt(0)==="."){var de=ne.toLowerCase(),le=ce.toLowerCase(),Ce=[le];return(le===".jpg"||le===".jpeg")&&(Ce=[".jpg",".jpeg"]),Ce.some(function(fe){return de.endsWith(fe)})}return/\/\*$/.test(ce)?Se===ce.replace(/\/.*$/,""):ve===ce?!0:/^\w+$/.test(ce)?((0,it.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ce,"'.Skip for check.")),!0):!1})}return!0};function ut(he,be){var Yt="cannot ".concat(he.method," ").concat(he.action," ").concat(be.status,"'"),ne=new Error(Yt);return ne.status=be.status,ne.method=he.method,ne.url=he.action,ne}function dt(he){var be=he.responseText||he.response;if(!be)return be;try{return JSON.parse(be)}catch(Yt){return be}}function bt(he){var be=new XMLHttpRequest;he.onProgress&&be.upload&&(be.upload.onprogress=function(Se){Se.total>0&&(Se.percent=Se.loaded/Se.total*100),he.onProgress(Se)});var Yt=new FormData;he.data&&Object.keys(he.data).forEach(function(ve){var Se=he.data[ve];if(Array.isArray(Se)){Se.forEach(function(we){Yt.append("".concat(ve,"[]"),we)});return}Yt.append(ve,Se)}),he.file instanceof Blob?Yt.append(he.filename,he.file,he.file.name):Yt.append(he.filename,he.file),be.onerror=function(Se){he.onError(Se)},be.onload=function(){return be.status<200||be.status>=300?he.onError(ut(he,be),dt(be)):he.onSuccess(dt(be),be)},be.open(he.method,he.action,!0),he.withCredentials&&"withCredentials"in be&&(be.withCredentials=!0);var ne=he.headers||{};return ne["X-Requested-With"]!==null&&be.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ne).forEach(function(ve){ne[ve]!==null&&be.setRequestHeader(ve,ne[ve])}),be.send(Yt),{abort:function(){be.abort()}}}var At=function(){var he=(0,xt.Z)((0,mt.Z)().mark(function be(Yt,ne){var ve,Se,we,ce,de,le,Ce,fe;return(0,mt.Z)().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:le=function(){return le=(0,xt.Z)((0,mt.Z)().mark(function qt(Kt){return(0,mt.Z)().wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.abrupt("return",new Promise(function(Zt){Kt.file(function(ee){ne(ee)?(Kt.fullPath&&!ee.webkitRelativePath&&(Object.defineProperties(ee,{webkitRelativePath:{writable:!0}}),ee.webkitRelativePath=Kt.fullPath.replace(/^\//,""),Object.defineProperties(ee,{webkitRelativePath:{writable:!1}})),Zt(ee)):Zt(null)})}));case 1:case"end":return Lt.stop()}},qt)})),le.apply(this,arguments)},de=function(qt){return le.apply(this,arguments)},ce=function(){return ce=(0,xt.Z)((0,mt.Z)().mark(function qt(Kt){var wt,Lt,Zt,ee,It;return(0,mt.Z)().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:wt=Kt.createReader(),Lt=[];case 2:return Ht.next=5,new Promise(function(re){wt.readEntries(re,function(){return re([])})});case 5:if(Zt=Ht.sent,ee=Zt.length,ee){Ht.next=9;break}return Ht.abrupt("break",12);case 9:for(It=0;It<ee;It++)Lt.push(Zt[It]);Ht.next=2;break;case 12:return Ht.abrupt("return",Lt);case 13:case"end":return Ht.stop()}},qt)})),ce.apply(this,arguments)},we=function(qt){return ce.apply(this,arguments)},ve=[],Se=[],Yt.forEach(function(pe){return Se.push(pe.webkitGetAsEntry())}),Ce=function(){var pe=(0,xt.Z)((0,mt.Z)().mark(function qt(Kt,wt){var Lt,Zt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(Kt){It.next=2;break}return It.abrupt("return");case 2:if(Kt.path=wt||"",!Kt.isFile){It.next=10;break}return It.next=6,de(Kt);case 6:Lt=It.sent,Lt&&ve.push(Lt),It.next=15;break;case 10:if(!Kt.isDirectory){It.next=15;break}return It.next=13,we(Kt);case 13:Zt=It.sent,Se.push.apply(Se,(0,ft.Z)(Zt));case 15:case"end":return It.stop()}},qt)}));return function(Kt,wt){return pe.apply(this,arguments)}}(),fe=0;case 9:if(!(fe<Se.length)){ke.next=15;break}return ke.next=12,Ce(Se[fe]);case 12:fe++,ke.next=9;break;case 15:return ke.abrupt("return",ve);case 16:case"end":return ke.stop()}},be)}));return function(Yt,ne){return he.apply(this,arguments)}}(),Dt=At,Ft=+new Date,jt=0;function Nt(){return"rc-upload-".concat(Ft,"-").concat(++jt)}var _t=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Wt=function(he){(0,Bt.Z)(Yt,he);var be=(0,vt.Z)(Yt);function Yt(){var ne;(0,Re.Z)(this,Yt);for(var ve=arguments.length,Se=new Array(ve),we=0;we<ve;we++)Se[we]=arguments[we];return ne=be.call.apply(be,[this].concat(Se)),(0,gt.Z)((0,zt.Z)(ne),"state",{uid:Nt()}),(0,gt.Z)((0,zt.Z)(ne),"reqs",{}),(0,gt.Z)((0,zt.Z)(ne),"fileInput",void 0),(0,gt.Z)((0,zt.Z)(ne),"_isMounted",void 0),(0,gt.Z)((0,zt.Z)(ne),"onChange",function(ce){var de=ne.props,le=de.accept,Ce=de.directory,fe=ce.target.files,me=(0,ft.Z)(fe).filter(function(ke){return!Ce||lt(ke,le)});ne.uploadFiles(me),ne.reset()}),(0,gt.Z)((0,zt.Z)(ne),"onClick",function(ce){var de=ne.fileInput;if(de){var le=ce.target,Ce=ne.props.onClick;if(le&&le.tagName==="BUTTON"){var fe=de.parentNode;fe.focus(),le.blur()}de.click(),Ce&&Ce(ce)}}),(0,gt.Z)((0,zt.Z)(ne),"onKeyDown",function(ce){ce.key==="Enter"&&ne.onClick(ce)}),(0,gt.Z)((0,zt.Z)(ne),"onFileDrop",function(){var ce=(0,xt.Z)((0,mt.Z)().mark(function de(le){var Ce,fe,me;return(0,mt.Z)().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(Ce=ne.props.multiple,le.preventDefault(),le.type!=="dragover"){pe.next=4;break}return pe.abrupt("return");case 4:if(!ne.props.directory){pe.next=11;break}return pe.next=7,Dt(Array.prototype.slice.call(le.dataTransfer.items),function(qt){return lt(qt,ne.props.accept)});case 7:fe=pe.sent,ne.uploadFiles(fe),pe.next=14;break;case 11:me=(0,ft.Z)(le.dataTransfer.files).filter(function(qt){return lt(qt,ne.props.accept)}),Ce===!1&&(me=me.slice(0,1)),ne.uploadFiles(me);case 14:case"end":return pe.stop()}},de)}));return function(de){return ce.apply(this,arguments)}}()),(0,gt.Z)((0,zt.Z)(ne),"uploadFiles",function(ce){var de=(0,ft.Z)(ce),le=de.map(function(Ce){return Ce.uid=Nt(),ne.processFile(Ce,de)});Promise.all(le).then(function(Ce){var fe=ne.props.onBatchStart;fe==null||fe(Ce.map(function(me){var ke=me.origin,pe=me.parsedFile;return{file:ke,parsedFile:pe}})),Ce.filter(function(me){return me.parsedFile!==null}).forEach(function(me){ne.post(me)})})}),(0,gt.Z)((0,zt.Z)(ne),"processFile",function(){var ce=(0,xt.Z)((0,mt.Z)().mark(function de(le,Ce){var fe,me,ke,pe,qt,Kt,wt,Lt,Zt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(fe=ne.props.beforeUpload,me=le,!fe){It.next=14;break}return It.prev=3,It.next=6,fe(le,Ce);case 6:me=It.sent,It.next=12;break;case 9:It.prev=9,It.t0=It.catch(3),me=!1;case 12:if(me!==!1){It.next=14;break}return It.abrupt("return",{origin:le,parsedFile:null,action:null,data:null});case 14:if(ke=ne.props.action,typeof ke!="function"){It.next=21;break}return It.next=18,ke(le);case 18:pe=It.sent,It.next=22;break;case 21:pe=ke;case 22:if(qt=ne.props.data,typeof qt!="function"){It.next=29;break}return It.next=26,qt(le);case 26:Kt=It.sent,It.next=30;break;case 29:Kt=qt;case 30:return wt=((0,Tt.Z)(me)==="object"||typeof me=="string")&&me?me:le,wt instanceof File?Lt=wt:Lt=new File([wt],le.name,{type:le.type}),Zt=Lt,Zt.uid=le.uid,It.abrupt("return",{origin:le,data:Kt,parsedFile:Zt,action:pe});case 35:case"end":return It.stop()}},de,null,[[3,9]])}));return function(de,le){return ce.apply(this,arguments)}}()),(0,gt.Z)((0,zt.Z)(ne),"saveFileInput",function(ce){ne.fileInput=ce}),ne}return(0,ot.Z)(Yt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(ve){var Se=this,we=ve.data,ce=ve.origin,de=ve.action,le=ve.parsedFile;if(this._isMounted){var Ce=this.props,fe=Ce.onStart,me=Ce.customRequest,ke=Ce.name,pe=Ce.headers,qt=Ce.withCredentials,Kt=Ce.method,wt=ce.uid,Lt=me||bt,Zt={action:de,filename:ke,data:we,file:le,headers:pe,withCredentials:qt,method:Kt||"post",onProgress:function(It){var Rt=Se.props.onProgress;Rt==null||Rt(It,le)},onSuccess:function(It,Rt){var Ht=Se.props.onSuccess;Ht==null||Ht(It,le,Rt),delete Se.reqs[wt]},onError:function(It,Rt){var Ht=Se.props.onError;Ht==null||Ht(It,Rt,le),delete Se.reqs[wt]}};fe(ce),this.reqs[wt]=Lt(Zt)}}},{key:"reset",value:function(){this.setState({uid:Nt()})}},{key:"abort",value:function(ve){var Se=this.reqs;if(ve){var we=ve.uid?ve.uid:ve;Se[we]&&Se[we].abort&&Se[we].abort(),delete Se[we]}else Object.keys(Se).forEach(function(ce){Se[ce]&&Se[ce].abort&&Se[ce].abort(),delete Se[ce]})}},{key:"render",value:function(){var ve=this.props,Se=ve.component,we=ve.prefixCls,ce=ve.className,de=ve.classNames,le=de===void 0?{}:de,Ce=ve.disabled,fe=ve.id,me=ve.name,ke=ve.style,pe=ve.styles,qt=pe===void 0?{}:pe,Kt=ve.multiple,wt=ve.accept,Lt=ve.capture,Zt=ve.children,ee=ve.directory,It=ve.openFileDialogOnClick,Rt=ve.onMouseEnter,Ht=ve.onMouseLeave,re=ve.hasControlInside,ye=(0,yt.Z)(ve,_t),Pe=tt()((0,gt.Z)((0,gt.Z)((0,gt.Z)({},we,!0),"".concat(we,"-disabled"),Ce),ce,ce)),Ae=ee?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Oe=Ce?{}:{onClick:It?this.onClick:function(){},onKeyDown:It?this.onKeyDown:function(){},onMouseEnter:Rt,onMouseLeave:Ht,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:re?void 0:"0"};return kt.createElement(Se,(0,ae.Z)({},Oe,{className:Pe,role:re?void 0:"button",style:ke}),kt.createElement("input",(0,ae.Z)({},(0,at.Z)(ye,{aria:!0,data:!0}),{id:fe,name:me,disabled:Ce,type:"file",ref:this.saveFileInput,onClick:function(Qe){return Qe.stopPropagation()},key:this.state.uid,style:(0,Ct.Z)({display:"none"},qt.input),className:le.input,accept:wt},Ae,{multiple:Kt,onChange:this.onChange},Lt!=null?{capture:Lt}:{})),Zt)}}]),Yt}(kt.Component),Jt=Wt;function Ut(){}var Vt=function(he){(0,Bt.Z)(Yt,he);var be=(0,vt.Z)(Yt);function Yt(){var ne;(0,Re.Z)(this,Yt);for(var ve=arguments.length,Se=new Array(ve),we=0;we<ve;we++)Se[we]=arguments[we];return ne=be.call.apply(be,[this].concat(Se)),(0,gt.Z)((0,zt.Z)(ne),"uploader",void 0),(0,gt.Z)((0,zt.Z)(ne),"saveUploader",function(ce){ne.uploader=ce}),ne}return(0,ot.Z)(Yt,[{key:"abort",value:function(ve){this.uploader.abort(ve)}},{key:"render",value:function(){return kt.createElement(Jt,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),Yt}(kt.Component);(0,gt.Z)(Vt,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ut,onError:Ut,onSuccess:Ut,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var oe=Vt,se=oe},6790:function(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return qt}});var ae=ue(67711),Re=ue(26420),ot=ue(98506),zt=ue(52873),Bt=ue(16886),vt=ue(33346),gt=ue(92310),kt=ue.n(gt),Ct=ue(29301),yt=ue(70425),Tt=ue(34280),mt=ue(59301),xt=ue(4676),ft=mt.forwardRef(function(Kt,wt){var Lt=Kt.height,Zt=Kt.offsetY,ee=Kt.offsetX,It=Kt.children,Rt=Kt.prefixCls,Ht=Kt.onInnerResize,re=Kt.innerProps,ye=Kt.rtl,Pe=Kt.extra,Ae={},Oe={display:"flex",flexDirection:"column"};return Zt!==void 0&&(Ae={height:Lt,position:"relative",overflow:"hidden"},Oe=(0,ot.Z)((0,ot.Z)({},Oe),{},(0,zt.Z)((0,zt.Z)((0,zt.Z)((0,zt.Z)((0,zt.Z)({transform:"translateY(".concat(Zt,"px)")},ye?"marginRight":"marginLeft",-ee),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:Ae},mt.createElement(Ct.Z,{onResize:function(Qe){var qe=Qe.offsetHeight;qe&&Ht&&Ht()}},mt.createElement("div",(0,ae.Z)({style:Oe,className:kt()((0,zt.Z)({},"".concat(Rt,"-holder-inner"),Rt)),ref:wt},re),It,Pe)))});ft.displayName="Filler";var z=ft;function tt(Kt){var wt=Kt.children,Lt=Kt.setRef,Zt=mt.useCallback(function(ee){Lt(ee)},[]);return mt.cloneElement(wt,{ref:Zt})}function at(Kt,wt,Lt,Zt,ee,It,Rt,Ht){var re=Ht.getKey;return Kt.slice(wt,Lt+1).map(function(ye,Pe){var Ae=wt+Pe,Oe=Rt(ye,Ae,{style:{width:Zt},offsetX:ee}),Ie=re(ye);return mt.createElement(tt,{key:Ie,setRef:function(qe){return It(ye,qe)}},Oe)})}function it(Kt,wt,Lt,Zt){var ee=Lt-Kt,It=wt-Lt,Rt=Math.min(ee,It)*2;if(Zt<=Rt){var Ht=Math.floor(Zt/2);return Zt%2?Lt+Ht+1:Lt-Ht}return ee>It?Lt-(Zt-It):Lt+(Zt-ee)}function lt(Kt,wt,Lt){var Zt=Kt.length,ee=wt.length,It,Rt;if(Zt===0&&ee===0)return null;Zt<ee?(It=Kt,Rt=wt):(It=wt,Rt=Kt);var Ht={__EMPTY_ITEM__:!0};function re(Qe){return Qe!==void 0?Lt(Qe):Ht}for(var ye=null,Pe=Math.abs(Zt-ee)!==1,Ae=0;Ae<Rt.length;Ae+=1){var Oe=re(It[Ae]),Ie=re(Rt[Ae]);if(Oe!==Ie){ye=Ae,Pe=Pe||Oe!==re(Rt[Ae+1]);break}}return ye===null?null:{index:ye,multiple:Pe}}function ut(Kt,wt,Lt){var Zt=mt.useState(Kt),ee=(0,Bt.Z)(Zt,2),It=ee[0],Rt=ee[1],Ht=mt.useState(null),re=(0,Bt.Z)(Ht,2),ye=re[0],Pe=re[1];return mt.useEffect(function(){var Ae=lt(It||[],Kt||[],wt);(Ae==null?void 0:Ae.index)!==void 0&&(Lt==null||Lt(Ae.index),Pe(Kt[Ae.index])),Rt(Kt)},[Kt]),[ye]}var dt=ue(16089),bt=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),At=bt,Dt=function(Kt,wt,Lt,Zt){var ee=(0,mt.useRef)(!1),It=(0,mt.useRef)(null);function Rt(){clearTimeout(It.current),ee.current=!0,It.current=setTimeout(function(){ee.current=!1},50)}var Ht=(0,mt.useRef)({top:Kt,bottom:wt,left:Lt,right:Zt});return Ht.current.top=Kt,Ht.current.bottom=wt,Ht.current.left=Lt,Ht.current.right=Zt,function(re,ye){var Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ae=re?ye<0&&Ht.current.left||ye>0&&Ht.current.right:ye<0&&Ht.current.top||ye>0&&Ht.current.bottom;return Pe&&Ae?(clearTimeout(It.current),ee.current=!1):(!Ae||ee.current)&&Rt(),!ee.current&&Ae}};function Ft(Kt,wt,Lt,Zt,ee,It,Rt){var Ht=(0,mt.useRef)(0),re=(0,mt.useRef)(null),ye=(0,mt.useRef)(null),Pe=(0,mt.useRef)(!1),Ae=Dt(wt,Lt,Zt,ee);function Oe(Ue,We){if(dt.Z.cancel(re.current),!Ae(!1,We)){var He=Ue;if(!He._virtualHandled)He._virtualHandled=!0;else return;Ht.current+=We,ye.current=We,At||He.preventDefault(),re.current=(0,dt.Z)(function(){var rn=Pe.current?10:1;Rt(Ht.current*rn,!1),Ht.current=0})}}function Ie(Ue,We){Rt(We,!0),At||Ue.preventDefault()}var Qe=(0,mt.useRef)(null),qe=(0,mt.useRef)(null);function nn(Ue){if(Kt){dt.Z.cancel(qe.current),qe.current=(0,dt.Z)(function(){Qe.current=null},2);var We=Ue.deltaX,He=Ue.deltaY,rn=Ue.shiftKey,ln=We,un=He;(Qe.current==="sx"||!Qe.current&&rn&&He&&!We)&&(ln=He,un=0,Qe.current="sx");var bn=Math.abs(ln),In=Math.abs(un);Qe.current===null&&(Qe.current=It&&bn>In?"x":"y"),Qe.current==="y"?Oe(Ue,un):Ie(Ue,ln)}}function Ke(Ue){Kt&&(Pe.current=Ue.detail===ye.current)}return[nn,Ke]}function jt(Kt,wt,Lt,Zt){var ee=mt.useMemo(function(){return[new Map,[]]},[Kt,Lt.id,Zt]),It=(0,Bt.Z)(ee,2),Rt=It[0],Ht=It[1],re=function(Pe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe,Oe=Rt.get(Pe),Ie=Rt.get(Ae);if(Oe===void 0||Ie===void 0)for(var Qe=Kt.length,qe=Ht.length;qe<Qe;qe+=1){var nn,Ke=Kt[qe],Ue=wt(Ke);Rt.set(Ue,qe);var We=(nn=Lt.get(Ue))!==null&&nn!==void 0?nn:Zt;if(Ht[qe]=(Ht[qe-1]||0)+We,Ue===Pe&&(Oe=qe),Ue===Ae&&(Ie=qe),Oe!==void 0&&Ie!==void 0)break}return{top:Ht[Oe-1]||0,bottom:Ht[Ie]}};return re}var Nt=ue(42573),_t=ue(58698),Wt=function(){function Kt(){(0,Nt.Z)(this,Kt),(0,zt.Z)(this,"maps",void 0),(0,zt.Z)(this,"id",0),(0,zt.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,_t.Z)(Kt,[{key:"set",value:function(Lt,Zt){this.diffRecords.set(Lt,this.maps[Lt]),this.maps[Lt]=Zt,this.id+=1}},{key:"get",value:function(Lt){return this.maps[Lt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Kt}(),Jt=Wt;function Ut(Kt){var wt=parseFloat(Kt);return isNaN(wt)?0:wt}function Vt(Kt,wt,Lt){var Zt=mt.useState(0),ee=(0,Bt.Z)(Zt,2),It=ee[0],Rt=ee[1],Ht=(0,mt.useRef)(new Map),re=(0,mt.useRef)(new Jt),ye=(0,mt.useRef)(0);function Pe(){ye.current+=1}function Ae(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Pe();var Qe=function(){var Ke=!1;Ht.current.forEach(function(Ue,We){if(Ue&&Ue.offsetParent){var He=Ue.offsetHeight,rn=getComputedStyle(Ue),ln=rn.marginTop,un=rn.marginBottom,bn=Ut(ln),In=Ut(un),jn=He+bn+In;re.current.get(We)!==jn&&(re.current.set(We,jn),Ke=!0)}}),Ke&&Rt(function(Ue){return Ue+1})};if(Ie)Qe();else{ye.current+=1;var qe=ye.current;Promise.resolve().then(function(){qe===ye.current&&Qe()})}}function Oe(Ie,Qe){var qe=Kt(Ie),nn=Ht.current.get(qe);Qe?(Ht.current.set(qe,Qe),Ae()):Ht.current.delete(qe),!nn!=!Qe&&(Qe?wt==null||wt(Ie):Lt==null||Lt(Ie))}return(0,mt.useEffect)(function(){return Pe},[]),[Oe,Ae,re.current,It]}var oe=14/15;function se(Kt,wt,Lt){var Zt=(0,mt.useRef)(!1),ee=(0,mt.useRef)(0),It=(0,mt.useRef)(0),Rt=(0,mt.useRef)(null),Ht=(0,mt.useRef)(null),re,ye=function(Ie){if(Zt.current){var Qe=Math.ceil(Ie.touches[0].pageX),qe=Math.ceil(Ie.touches[0].pageY),nn=ee.current-Qe,Ke=It.current-qe,Ue=Math.abs(nn)>Math.abs(Ke);Ue?ee.current=Qe:It.current=qe;var We=Lt(Ue,Ue?nn:Ke,!1,Ie);We&&Ie.preventDefault(),clearInterval(Ht.current),We&&(Ht.current=setInterval(function(){Ue?nn*=oe:Ke*=oe;var He=Math.floor(Ue?nn:Ke);(!Lt(Ue,He,!0)||Math.abs(He)<=.1)&&clearInterval(Ht.current)},16))}},Pe=function(){Zt.current=!1,re()},Ae=function(Ie){re(),Ie.touches.length===1&&!Zt.current&&(Zt.current=!0,ee.current=Math.ceil(Ie.touches[0].pageX),It.current=Math.ceil(Ie.touches[0].pageY),Rt.current=Ie.target,Rt.current.addEventListener("touchmove",ye,{passive:!1}),Rt.current.addEventListener("touchend",Pe,{passive:!0}))};re=function(){Rt.current&&(Rt.current.removeEventListener("touchmove",ye),Rt.current.removeEventListener("touchend",Pe))},(0,Tt.Z)(function(){return Kt&&wt.current.addEventListener("touchstart",Ae,{passive:!0}),function(){var Oe;(Oe=wt.current)===null||Oe===void 0||Oe.removeEventListener("touchstart",Ae),re(),clearInterval(Ht.current)}},[Kt])}function he(Kt){return Math.floor(Math.pow(Kt,.5))}function be(Kt,wt){var Lt="touches"in Kt?Kt.touches[0]:Kt;return Lt[wt?"pageX":"pageY"]-window[wt?"scrollX":"scrollY"]}function Yt(Kt,wt,Lt){mt.useEffect(function(){var Zt=wt.current;if(Kt&&Zt){var ee=!1,It,Rt,Ht=function(){dt.Z.cancel(It)},re=function Oe(){Ht(),It=(0,dt.Z)(function(){Lt(Rt),Oe()})},ye=function(Ie){if(!(Ie.target.draggable||Ie.button!==0)){var Qe=Ie;Qe._virtualHandled||(Qe._virtualHandled=!0,ee=!0)}},Pe=function(){ee=!1,Ht()},Ae=function(Ie){if(ee){var Qe=be(Ie,!1),qe=Zt.getBoundingClientRect(),nn=qe.top,Ke=qe.bottom;if(Qe<=nn){var Ue=nn-Qe;Rt=-he(Ue),re()}else if(Qe>=Ke){var We=Qe-Ke;Rt=he(We),re()}else Ht()}};return Zt.addEventListener("mousedown",ye),Zt.ownerDocument.addEventListener("mouseup",Pe),Zt.ownerDocument.addEventListener("mousemove",Ae),function(){Zt.removeEventListener("mousedown",ye),Zt.ownerDocument.removeEventListener("mouseup",Pe),Zt.ownerDocument.removeEventListener("mousemove",Ae),Ht()}}},[Kt])}var ne=10;function ve(Kt,wt,Lt,Zt,ee,It,Rt,Ht){var re=mt.useRef(),ye=mt.useState(null),Pe=(0,Bt.Z)(ye,2),Ae=Pe[0],Oe=Pe[1];return(0,Tt.Z)(function(){if(Ae&&Ae.times<ne){if(!Kt.current){Oe(function(Rr){return(0,ot.Z)({},Rr)});return}It();var Ie=Ae.targetAlign,Qe=Ae.originAlign,qe=Ae.index,nn=Ae.offset,Ke=Kt.current.clientHeight,Ue=!1,We=Ie,He=null;if(Ke){for(var rn=Ie||Qe,ln=0,un=0,bn=0,In=Math.min(wt.length-1,qe),jn=0;jn<=In;jn+=1){var Kn=ee(wt[jn]);un=ln;var kr=Lt.get(Kn);bn=un+(kr===void 0?Zt:kr),ln=bn}for(var pr=rn==="top"?nn:Ke-nn,Er=In;Er>=0;Er-=1){var Or=ee(wt[Er]),jr=Lt.get(Or);if(jr===void 0){Ue=!0;break}if(pr-=jr,pr<=0)break}switch(rn){case"top":He=un-nn;break;case"bottom":He=bn-Ke+nn;break;default:{var yr=Kt.current.scrollTop,rr=yr+Ke;un<yr?We="top":bn>rr&&(We="bottom")}}He!==null&&Rt(He),He!==Ae.lastTop&&(Ue=!0)}Ue&&Oe((0,ot.Z)((0,ot.Z)({},Ae),{},{times:Ae.times+1,targetAlign:We,lastTop:He}))}},[Ae,Kt.current]),function(Ie){if(Ie==null){Ht();return}if(dt.Z.cancel(re.current),typeof Ie=="number")Rt(Ie);else if(Ie&&(0,Re.Z)(Ie)==="object"){var Qe,qe=Ie.align;"index"in Ie?Qe=Ie.index:Qe=wt.findIndex(function(Ue){return ee(Ue)===Ie.key});var nn=Ie.offset,Ke=nn===void 0?0:nn;Oe({times:0,index:Qe,offset:Ke,originAlign:qe})}}}var Se=mt.forwardRef(function(Kt,wt){var Lt=Kt.prefixCls,Zt=Kt.rtl,ee=Kt.scrollOffset,It=Kt.scrollRange,Rt=Kt.onStartMove,Ht=Kt.onStopMove,re=Kt.onScroll,ye=Kt.horizontal,Pe=Kt.spinSize,Ae=Kt.containerSize,Oe=Kt.style,Ie=Kt.thumbStyle,Qe=Kt.showScrollBar,qe=mt.useState(!1),nn=(0,Bt.Z)(qe,2),Ke=nn[0],Ue=nn[1],We=mt.useState(null),He=(0,Bt.Z)(We,2),rn=He[0],ln=He[1],un=mt.useState(null),bn=(0,Bt.Z)(un,2),In=bn[0],jn=bn[1],Kn=!Zt,kr=mt.useRef(),pr=mt.useRef(),Er=mt.useState(Qe),Or=(0,Bt.Z)(Er,2),jr=Or[0],yr=Or[1],rr=mt.useRef(),Rr=function(){Qe===!0||Qe===!1||(clearTimeout(rr.current),yr(!0),rr.current=setTimeout(function(){yr(!1)},3e3))},te=It-Ae||0,Qn=Ae-Pe||0,Vn=mt.useMemo(function(){if(ee===0||te===0)return 0;var hn=ee/te;return hn*Qn},[ee,te,Qn]),Rn=function(nr){nr.stopPropagation(),nr.preventDefault()},zn=mt.useRef({top:Vn,dragging:Ke,pageY:rn,startTop:In});zn.current={top:Vn,dragging:Ke,pageY:rn,startTop:In};var Wn=function(nr){Ue(!0),ln(be(nr,ye)),jn(zn.current.top),Rt(),nr.stopPropagation(),nr.preventDefault()};mt.useEffect(function(){var hn=function(an){an.preventDefault()},nr=kr.current,Zn=pr.current;return nr.addEventListener("touchstart",hn,{passive:!1}),Zn.addEventListener("touchstart",Wn,{passive:!1}),function(){nr.removeEventListener("touchstart",hn),Zn.removeEventListener("touchstart",Wn)}},[]);var tr=mt.useRef();tr.current=te;var Ar=mt.useRef();Ar.current=Qn,mt.useEffect(function(){if(Ke){var hn,nr=function(an){var mn=zn.current,$n=mn.dragging,fr=mn.pageY,Mn=mn.startTop;dt.Z.cancel(hn);var je=kr.current.getBoundingClientRect(),Ve=Ae/(ye?je.width:je.height);if($n){var An=(be(an,ye)-fr)*Ve,En=Mn;!Kn&&ye?En-=An:En+=An;var $e=tr.current,Tn=Ar.current,Xn=Tn?En/Tn:0,hr=Math.ceil(Xn*$e);hr=Math.max(hr,0),hr=Math.min(hr,$e),hn=(0,dt.Z)(function(){re(hr,ye)})}},Zn=function(){Ue(!1),Ht()};return window.addEventListener("mousemove",nr,{passive:!0}),window.addEventListener("touchmove",nr,{passive:!0}),window.addEventListener("mouseup",Zn,{passive:!0}),window.addEventListener("touchend",Zn,{passive:!0}),function(){window.removeEventListener("mousemove",nr),window.removeEventListener("touchmove",nr),window.removeEventListener("mouseup",Zn),window.removeEventListener("touchend",Zn),dt.Z.cancel(hn)}}},[Ke]),mt.useEffect(function(){return Rr(),function(){clearTimeout(rr.current)}},[ee]),mt.useImperativeHandle(wt,function(){return{delayHidden:Rr}});var sn="".concat(Lt,"-scrollbar"),tn={position:"absolute",visibility:jr?null:"hidden"},Ye={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ye?(Object.assign(tn,{height:8,left:0,right:0,bottom:0}),Object.assign(Ye,(0,zt.Z)({height:"100%",width:Pe},Kn?"left":"right",Vn))):(Object.assign(tn,(0,zt.Z)({width:8,top:0,bottom:0},Kn?"right":"left",0)),Object.assign(Ye,{width:"100%",height:Pe,top:Vn})),mt.createElement("div",{ref:kr,className:kt()(sn,(0,zt.Z)((0,zt.Z)((0,zt.Z)({},"".concat(sn,"-horizontal"),ye),"".concat(sn,"-vertical"),!ye),"".concat(sn,"-visible"),jr)),style:(0,ot.Z)((0,ot.Z)({},tn),Oe),onMouseDown:Rn,onMouseMove:Rr},mt.createElement("div",{ref:pr,className:kt()("".concat(sn,"-thumb"),(0,zt.Z)({},"".concat(sn,"-thumb-moving"),Ke)),style:(0,ot.Z)((0,ot.Z)({},Ye),Ie),onMouseDown:Wn}))}),we=Se,ce=20;function de(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Lt=Kt/wt*Kt;return isNaN(Lt)&&(Lt=0),Lt=Math.max(Lt,ce),Math.floor(Lt)}var le=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ce=[],fe={overflowY:"auto",overflowAnchor:"none"};function me(Kt,wt){var Lt=Kt.prefixCls,Zt=Lt===void 0?"rc-virtual-list":Lt,ee=Kt.className,It=Kt.height,Rt=Kt.itemHeight,Ht=Kt.fullHeight,re=Ht===void 0?!0:Ht,ye=Kt.style,Pe=Kt.data,Ae=Kt.children,Oe=Kt.itemKey,Ie=Kt.virtual,Qe=Kt.direction,qe=Kt.scrollWidth,nn=Kt.component,Ke=nn===void 0?"div":nn,Ue=Kt.onScroll,We=Kt.onVirtualScroll,He=Kt.onVisibleChange,rn=Kt.innerProps,ln=Kt.extraRender,un=Kt.styles,bn=Kt.showScrollBar,In=bn===void 0?"optional":bn,jn=(0,vt.Z)(Kt,le),Kn=mt.useCallback(function(lr){return typeof Oe=="function"?Oe(lr):lr==null?void 0:lr[Oe]},[Oe]),kr=Vt(Kn,null,null),pr=(0,Bt.Z)(kr,4),Er=pr[0],Or=pr[1],jr=pr[2],yr=pr[3],rr=!!(Ie!==!1&&It&&Rt),Rr=mt.useMemo(function(){return Object.values(jr.maps).reduce(function(lr,wr){return lr+wr},0)},[jr.id,jr.maps]),te=rr&&Pe&&(Math.max(Rt*Pe.length,Rr)>It||!!qe),Qn=Qe==="rtl",Vn=kt()(Zt,(0,zt.Z)({},"".concat(Zt,"-rtl"),Qn),ee),Rn=Pe||Ce,zn=(0,mt.useRef)(),Wn=(0,mt.useRef)(),tr=(0,mt.useRef)(),Ar=(0,mt.useState)(0),sn=(0,Bt.Z)(Ar,2),tn=sn[0],Ye=sn[1],hn=(0,mt.useState)(0),nr=(0,Bt.Z)(hn,2),Zn=nr[0],mr=nr[1],an=(0,mt.useState)(!1),mn=(0,Bt.Z)(an,2),$n=mn[0],fr=mn[1],Mn=function(){fr(!0)},je=function(){fr(!1)},Ve={getKey:Kn};function An(lr){Ye(function(wr){var Vr;typeof lr=="function"?Vr=lr(wr):Vr=lr;var gr=Jr(Vr);return zn.current.scrollTop=gr,gr})}var En=(0,mt.useRef)({start:0,end:Rn.length}),$e=(0,mt.useRef)(),Tn=ut(Rn,Kn),Xn=(0,Bt.Z)(Tn,1),hr=Xn[0];$e.current=hr;var xr=mt.useMemo(function(){if(!rr)return{scrollHeight:void 0,start:0,end:Rn.length-1,offset:void 0};if(!te){var lr;return{scrollHeight:((lr=Wn.current)===null||lr===void 0?void 0:lr.offsetHeight)||0,start:0,end:Rn.length-1,offset:void 0}}for(var wr=0,Vr,gr,Ur,vr=Rn.length,ur=0;ur<vr;ur+=1){var Mr=Rn[ur],kn=Kn(Mr),fi=jr.get(kn),Ci=wr+(fi===void 0?Rt:fi);Ci>=tn&&Vr===void 0&&(Vr=ur,gr=wr),Ci>tn+It&&Ur===void 0&&(Ur=ur),wr=Ci}return Vr===void 0&&(Vr=0,gr=0,Ur=Math.ceil(It/Rt)),Ur===void 0&&(Ur=Rn.length-1),Ur=Math.min(Ur+1,Rn.length-1),{scrollHeight:wr,start:Vr,end:Ur,offset:gr}},[te,rr,tn,Rn,yr,It]),On=xr.scrollHeight,Fn=xr.start,Dn=xr.end,sr=xr.offset;En.current.start=Fn,En.current.end=Dn,mt.useLayoutEffect(function(){var lr=jr.getRecord();if(lr.size===1){var wr=Array.from(lr.keys())[0],Vr=lr.get(wr),gr=Rn[Fn];if(gr&&Vr===void 0){var Ur=Kn(gr);if(Ur===wr){var vr=jr.get(wr),ur=vr-Rt;An(function(Mr){return Mr+ur})}}}jr.resetRecord()},[On]);var or=mt.useState({width:0,height:It}),xn=(0,Bt.Z)(or,2),Gn=xn[0],Yr=xn[1],ei=function(wr){Yr({width:wr.offsetWidth,height:wr.offsetHeight})},xi=(0,mt.useRef)(),Je=(0,mt.useRef)(),cr=mt.useMemo(function(){return de(Gn.width,qe)},[Gn.width,qe]),_r=mt.useMemo(function(){return de(Gn.height,On)},[Gn.height,On]),ir=On-It,oi=(0,mt.useRef)(ir);oi.current=ir;function Jr(lr){var wr=lr;return Number.isNaN(oi.current)||(wr=Math.min(wr,oi.current)),wr=Math.max(wr,0),wr}var ni=tn<=0,Kr=tn>=ir,$r=Zn<=0,hi=Zn>=qe,yn=Dt(ni,Kr,$r,hi),mi=function(){return{x:Qn?-Zn:Zn,y:tn}},vn=(0,mt.useRef)(mi()),ii=(0,yt.zX)(function(lr){if(We){var wr=(0,ot.Z)((0,ot.Z)({},mi()),lr);(vn.current.x!==wr.x||vn.current.y!==wr.y)&&(We(wr),vn.current=wr)}});function Gi(lr,wr){var Vr=lr;wr?((0,xt.flushSync)(function(){mr(Vr)}),ii()):An(Vr)}function gi(lr){var wr=lr.currentTarget.scrollTop;wr!==tn&&An(wr),Ue==null||Ue(lr),ii()}var Bi=function(wr){var Vr=wr,gr=qe?qe-Gn.width:0;return Vr=Math.max(Vr,0),Vr=Math.min(Vr,gr),Vr},ri=(0,yt.zX)(function(lr,wr){wr?((0,xt.flushSync)(function(){mr(function(Vr){var gr=Vr+(Qn?-lr:lr);return Bi(gr)})}),ii()):An(function(Vr){var gr=Vr+lr;return gr})}),Br=Ft(rr,ni,Kr,$r,hi,!!qe,ri),wi=(0,Bt.Z)(Br,2),Eo=wi[0],Oi=wi[1];se(rr,zn,function(lr,wr,Vr,gr){var Ur=gr;return yn(lr,wr,Vr)?!1:!Ur||!Ur._virtualHandled?(Ur&&(Ur._virtualHandled=!0),Eo({preventDefault:function(){},deltaX:lr?wr:0,deltaY:lr?0:wr}),!0):!1}),Yt(te,zn,function(lr){An(function(wr){return wr+lr})}),(0,Tt.Z)(function(){function lr(Vr){var gr=ni&&Vr.detail<0,Ur=Kr&&Vr.detail>0;rr&&!gr&&!Ur&&Vr.preventDefault()}var wr=zn.current;return wr.addEventListener("wheel",Eo,{passive:!1}),wr.addEventListener("DOMMouseScroll",Oi,{passive:!0}),wr.addEventListener("MozMousePixelScroll",lr,{passive:!1}),function(){wr.removeEventListener("wheel",Eo),wr.removeEventListener("DOMMouseScroll",Oi),wr.removeEventListener("MozMousePixelScroll",lr)}},[rr,ni,Kr]),(0,Tt.Z)(function(){if(qe){var lr=Bi(Zn);mr(lr),ii({x:lr})}},[Gn.width,qe]);var Yn=function(){var wr,Vr;(wr=xi.current)===null||wr===void 0||wr.delayHidden(),(Vr=Je.current)===null||Vr===void 0||Vr.delayHidden()},Le=ve(zn,Rn,jr,Rt,Kn,function(){return Or(!0)},An,Yn);mt.useImperativeHandle(wt,function(){return{nativeElement:tr.current,getScrollInfo:mi,scrollTo:function(wr){function Vr(gr){return gr&&(0,Re.Z)(gr)==="object"&&("left"in gr||"top"in gr)}Vr(wr)?(wr.left!==void 0&&mr(Bi(wr.left)),Le(wr.top)):Le(wr)}}}),(0,Tt.Z)(function(){if(He){var lr=Rn.slice(Fn,Dn+1);He(lr,Rn)}},[Fn,Dn,Rn]);var Ti=jt(Rn,Kn,jr,Rt),so=ln==null?void 0:ln({start:Fn,end:Dn,virtual:te,offsetX:Zn,offsetY:sr,rtl:Qn,getSize:Ti}),Ji=at(Rn,Fn,Dn,qe,Zn,Er,Ae,Ve),Zi=null;It&&(Zi=(0,ot.Z)((0,zt.Z)({},re?"height":"maxHeight",It),fe),rr&&(Zi.overflowY="hidden",qe&&(Zi.overflowX="hidden"),$n&&(Zi.pointerEvents="none")));var di={};return Qn&&(di.dir="rtl"),mt.createElement("div",(0,ae.Z)({ref:tr,style:(0,ot.Z)((0,ot.Z)({},ye),{},{position:"relative"}),className:Vn},di,jn),mt.createElement(Ct.Z,{onResize:ei},mt.createElement(Ke,{className:"".concat(Zt,"-holder"),style:Zi,ref:zn,onScroll:gi,onMouseEnter:Yn},mt.createElement(z,{prefixCls:Zt,height:On,offsetX:Zn,offsetY:sr,scrollWidth:qe,onInnerResize:Or,ref:Wn,innerProps:rn,rtl:Qn,extra:so},Ji))),te&&On>It&&mt.createElement(we,{ref:xi,prefixCls:Zt,scrollOffset:tn,scrollRange:On,rtl:Qn,onScroll:Gi,onStartMove:Mn,onStopMove:je,spinSize:_r,containerSize:Gn.height,style:un==null?void 0:un.verticalScrollBar,thumbStyle:un==null?void 0:un.verticalScrollBarThumb,showScrollBar:In}),te&&qe>Gn.width&&mt.createElement(we,{ref:Je,prefixCls:Zt,scrollOffset:Zn,scrollRange:qe,rtl:Qn,onScroll:Gi,onStartMove:Mn,onStopMove:je,spinSize:cr,containerSize:Gn.width,horizontal:!0,style:un==null?void 0:un.horizontalScrollBar,thumbStyle:un==null?void 0:un.horizontalScrollBarThumb,showScrollBar:In}))}var ke=mt.forwardRef(me);ke.displayName="List";var pe=ke,qt=pe},7062:function(pn,dn,ue){var ae=ue(19637),Re=ue(97573),ot=[ue(96627)];pn.exports=ae.createStore(Re,ot)},96627:function(pn,dn,ue){pn.exports=ae;function ae(){return ue(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(pn){return pn<10?"0"+pn:pn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(pn){return rx_escapable.lastIndex=0,rx_escapable.test(pn)?'"'+pn.replace(rx_escapable,function(dn){var ue=meta[dn];return typeof ue=="string"?ue:"\\u"+("0000"+dn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+pn+'"'}function str(pn,dn){var ue,ae,Re,ot,zt=gap,Bt,vt=dn[pn];switch(vt&&typeof vt=="object"&&typeof vt.toJSON=="function"&&(vt=vt.toJSON(pn)),typeof rep=="function"&&(vt=rep.call(dn,pn,vt)),typeof vt){case"string":return quote(vt);case"number":return isFinite(vt)?String(vt):"null";case"boolean":case"null":return String(vt);case"object":if(!vt)return"null";if(gap+=indent,Bt=[],Object.prototype.toString.apply(vt)==="[object Array]"){for(ot=vt.length,ue=0;ue<ot;ue+=1)Bt[ue]=str(ue,vt)||"null";return Re=Bt.length===0?"[]":gap?`[
`+gap+Bt.join(`,
`+gap)+`
`+zt+"]":"["+Bt.join(",")+"]",gap=zt,Re}if(rep&&typeof rep=="object")for(ot=rep.length,ue=0;ue<ot;ue+=1)typeof rep[ue]=="string"&&(ae=rep[ue],Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));else for(ae in vt)Object.prototype.hasOwnProperty.call(vt,ae)&&(Re=str(ae,vt),Re&&Bt.push(quote(ae)+(gap?": ":":")+Re));return Re=Bt.length===0?"{}":gap?`{
`+gap+Bt.join(`,
`+gap)+`
`+zt+"}":"{"+Bt.join(",")+"}",gap=zt,Re}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(pn,dn,ue){var ae;if(gap="",indent="",typeof ue=="number")for(ae=0;ae<ue;ae+=1)indent+=" ";else typeof ue=="string"&&(indent=ue);if(rep=dn,dn&&typeof dn!="function"&&(typeof dn!="object"||typeof dn.length!="number"))throw new Error("JSON.stringify");return str("",{"":pn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(pn,dn){var ue,ae,Re=pn[dn];if(Re&&typeof Re=="object")for(ue in Re)Object.prototype.hasOwnProperty.call(Re,ue)&&(ae=walk(Re,ue),ae!==void 0?Re[ue]=ae:delete Re[ue]);return reviver.call(pn,dn,Re)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(pn){return"\\u"+("0000"+pn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(pn,dn,ue){var ae=ue(67039),Re=ae.slice,ot=ae.pluck,zt=ae.each,Bt=ae.bind,vt=ae.create,gt=ae.isList,kt=ae.isFunction,Ct=ae.isObject;pn.exports={createStore:mt};var yt={version:"2.0.12",enabled:!1,get:function(xt,ft){var z=this.storage.read(this._namespacePrefix+xt);return this._deserialize(z,ft)},set:function(xt,ft){return ft===void 0?this.remove(xt):(this.storage.write(this._namespacePrefix+xt,this._serialize(ft)),ft)},remove:function(xt){this.storage.remove(this._namespacePrefix+xt)},each:function(xt){var ft=this;this.storage.each(function(z,tt){xt.call(ft,ft._deserialize(z),(tt||"").replace(ft._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(xt){return this._namespacePrefix=="__storejs_"+xt+"_"},createStore:function(){return mt.apply(this,arguments)},addPlugin:function(xt){this._addPlugin(xt)},namespace:function(xt){return mt(this.storage,this.plugins,xt)}};function Tt(){var xt=typeof console=="undefined"?null:console;if(xt){var ft=xt.warn?xt.warn:xt.log;ft.apply(xt,arguments)}}function mt(xt,ft,z){z||(z=""),xt&&!gt(xt)&&(xt=[xt]),ft&&!gt(ft)&&(ft=[ft]);var tt=z?"__storejs_"+z+"_":"",at=z?new RegExp("^"+tt):null,it=/^[a-zA-Z0-9_\-]*$/;if(!it.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var lt={_namespacePrefix:tt,_namespaceRegexp:at,_testStorage:function(dt){try{var bt="__storejs__test__";dt.write(bt,bt);var At=dt.read(bt)===bt;return dt.remove(bt),At}catch(Dt){return!1}},_assignPluginFnProp:function(dt,bt){var At=this[bt];this[bt]=function(){var Ft=Re(arguments,0),jt=this;function Nt(){if(At)return zt(arguments,function(Wt,Jt){Ft[Jt]=Wt}),At.apply(jt,Ft)}var _t=[Nt].concat(Ft);return dt.apply(jt,_t)}},_serialize:function(dt){return JSON.stringify(dt)},_deserialize:function(dt,bt){if(!dt)return bt;var At="";try{At=JSON.parse(dt)}catch(Dt){At=dt}return At!==void 0?At:bt},_addStorage:function(dt){this.enabled||this._testStorage(dt)&&(this.storage=dt,this.enabled=!0)},_addPlugin:function(dt){var bt=this;if(gt(dt)){zt(dt,function(Ft){bt._addPlugin(Ft)});return}var At=ot(this.plugins,function(Ft){return dt===Ft});if(!At){if(this.plugins.push(dt),!kt(dt))throw new Error("Plugins must be function values that return objects");var Dt=dt.call(this);if(!Ct(Dt))throw new Error("Plugins must return an object of function properties");zt(Dt,function(Ft,jt){if(!kt(Ft))throw new Error("Bad plugin property: "+jt+" from plugin "+dt.name+". Plugins should only return functions.");bt._assignPluginFnProp(Ft,jt)})}},addStorage:function(dt){Tt("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(dt)}},ut=vt(lt,yt,{plugins:[]});return ut.raw={},zt(ut,function(dt,bt){kt(dt)&&(ut.raw[bt]=Bt(ut,dt))}),zt(xt,function(dt){ut._addStorage(dt)}),zt(ft,function(dt){ut._addPlugin(dt)}),ut}},67039:function(pn,dn,ue){var ae=Bt(),Re=vt(),ot=gt(),zt=typeof window!="undefined"?window:ue.g;pn.exports={assign:ae,create:Re,trim:ot,bind:kt,slice:Ct,each:yt,map:Tt,pluck:mt,isList:xt,isFunction:ft,isObject:z,Global:zt};function Bt(){return Object.assign?Object.assign:function(at,it,lt,ut){for(var dt=1;dt<arguments.length;dt++)yt(Object(arguments[dt]),function(bt,At){at[At]=bt});return at}}function vt(){if(Object.create)return function(it,lt,ut,dt){var bt=Ct(arguments,1);return ae.apply(this,[Object.create(it)].concat(bt))};{let at=function(){};var tt=at;return function(lt,ut,dt,bt){var At=Ct(arguments,1);return at.prototype=lt,ae.apply(this,[new at].concat(At))}}}function gt(){return String.prototype.trim?function(at){return String.prototype.trim.call(at)}:function(at){return at.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function kt(tt,at){return function(){return at.apply(tt,Array.prototype.slice.call(arguments,0))}}function Ct(tt,at){return Array.prototype.slice.call(tt,at||0)}function yt(tt,at){mt(tt,function(it,lt){return at(it,lt),!1})}function Tt(tt,at){var it=xt(tt)?[]:{};return mt(tt,function(lt,ut){return it[ut]=at(lt,ut),!1}),it}function mt(tt,at){if(xt(tt)){for(var it=0;it<tt.length;it++)if(at(tt[it],it))return tt[it]}else for(var lt in tt)if(tt.hasOwnProperty(lt)&&at(tt[lt],lt))return tt[lt]}function xt(tt){return tt!=null&&typeof tt!="function"&&typeof tt.length=="number"}function ft(tt){return tt&&{}.toString.call(tt)==="[object Function]"}function z(tt){return tt&&{}.toString.call(tt)==="[object Object]"}},97573:function(pn,dn,ue){pn.exports=[ue(52496),ue(16436),ue(76673),ue(35701),ue(65578),ue(65300)]},35701:function(pn,dn,ue){var ae=ue(67039),Re=ae.Global,ot=ae.trim;pn.exports={name:"cookieStorage",read:Bt,write:gt,each:vt,remove:kt,clearAll:Ct};var zt=Re.document;function Bt(Tt){if(!Tt||!yt(Tt))return null;var mt="(?:^|.*;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(zt.cookie.replace(new RegExp(mt),"$1"))}function vt(Tt){for(var mt=zt.cookie.split(/; ?/g),xt=mt.length-1;xt>=0;xt--)if(ot(mt[xt])){var ft=mt[xt].split("="),z=unescape(ft[0]),tt=unescape(ft[1]);Tt(tt,z)}}function gt(Tt,mt){Tt&&(zt.cookie=escape(Tt)+"="+escape(mt)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function kt(Tt){!Tt||!yt(Tt)||(zt.cookie=escape(Tt)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ct(){vt(function(Tt,mt){kt(mt)})}function yt(Tt){return new RegExp("(?:^|;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(zt.cookie)}},52496:function(pn,dn,ue){var ae=ue(67039),Re=ae.Global;pn.exports={name:"localStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.localStorage}function zt(Ct){return ot().getItem(Ct)}function Bt(Ct,yt){return ot().setItem(Ct,yt)}function vt(Ct){for(var yt=ot().length-1;yt>=0;yt--){var Tt=ot().key(yt);Ct(zt(Tt),Tt)}}function gt(Ct){return ot().removeItem(Ct)}function kt(){return ot().clear()}},65300:function(pn){pn.exports={name:"memoryStorage",read:ue,write:ae,each:Re,remove:ot,clearAll:zt};var dn={};function ue(Bt){return dn[Bt]}function ae(Bt,vt){dn[Bt]=vt}function Re(Bt){for(var vt in dn)dn.hasOwnProperty(vt)&&Bt(dn[vt],vt)}function ot(Bt){delete dn[Bt]}function zt(Bt){dn={}}},16436:function(pn,dn,ue){var ae=ue(67039),Re=ae.Global;pn.exports={name:"oldFF-globalStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:kt};var ot=Re.globalStorage;function zt(Ct){return ot[Ct]}function Bt(Ct,yt){ot[Ct]=yt}function vt(Ct){for(var yt=ot.length-1;yt>=0;yt--){var Tt=ot.key(yt);Ct(ot[Tt],Tt)}}function gt(Ct){return ot.removeItem(Ct)}function kt(){vt(function(Ct,yt){delete ot[Ct]})}},76673:function(pn,dn,ue){var ae=ue(67039),Re=ae.Global;pn.exports={name:"oldIE-userDataStorage",write:gt,read:kt,each:Ct,remove:yt,clearAll:Tt};var ot="storejs",zt=Re.document,Bt=ft(),vt=(Re.navigator?Re.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function gt(z,tt){if(!vt){var at=xt(z);Bt(function(it){it.setAttribute(at,tt),it.save(ot)})}}function kt(z){if(!vt){var tt=xt(z),at=null;return Bt(function(it){at=it.getAttribute(tt)}),at}}function Ct(z){Bt(function(tt){for(var at=tt.XMLDocument.documentElement.attributes,it=at.length-1;it>=0;it--){var lt=at[it];z(tt.getAttribute(lt.name),lt.name)}})}function yt(z){var tt=xt(z);Bt(function(at){at.removeAttribute(tt),at.save(ot)})}function Tt(){Bt(function(z){var tt=z.XMLDocument.documentElement.attributes;z.load(ot);for(var at=tt.length-1;at>=0;at--)z.removeAttribute(tt[at].name);z.save(ot)})}var mt=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function xt(z){return z.replace(/^\d/,"___$&").replace(mt,"___")}function ft(){if(!zt||!zt.documentElement||!zt.documentElement.addBehavior)return null;var z="script",tt,at,it;try{at=new ActiveXObject("htmlfile"),at.open(),at.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),at.close(),tt=at.w.frames[0].document,it=tt.createElement("div")}catch(lt){it=zt.createElement("div"),tt=zt.body}return function(lt){var ut=[].slice.call(arguments,0);ut.unshift(it),tt.appendChild(it),it.addBehavior("#default#userData"),it.load(ot),lt.apply(this,ut),tt.removeChild(it)}}},65578:function(pn,dn,ue){var ae=ue(67039),Re=ae.Global;pn.exports={name:"sessionStorage",read:zt,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.sessionStorage}function zt(Ct){return ot().getItem(Ct)}function Bt(Ct,yt){return ot().setItem(Ct,yt)}function vt(Ct){for(var yt=ot().length-1;yt>=0;yt--){var Tt=ot().key(yt);Ct(zt(Tt),Tt)}}function gt(Ct){return ot().removeItem(Ct)}function kt(){return ot().clear()}},93314:function(pn){"use strict";pn.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(pn){"use strict";pn.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(pn){"use strict";pn.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(pn){"use strict";pn.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(pn,dn,ue){"use strict";ue.d(dn,{Z:function(){return kt}});const ae=Ct=>typeof Ct=="object"&&Ct!=null&&Ct.nodeType===1,Re=(Ct,yt)=>(!yt||Ct!=="hidden")&&Ct!=="visible"&&Ct!=="clip",ot=(Ct,yt)=>{if(Ct.clientHeight<Ct.scrollHeight||Ct.clientWidth<Ct.scrollWidth){const Tt=getComputedStyle(Ct,null);return Re(Tt.overflowY,yt)||Re(Tt.overflowX,yt)||(mt=>{const xt=(ft=>{if(!ft.ownerDocument||!ft.ownerDocument.defaultView)return null;try{return ft.ownerDocument.defaultView.frameElement}catch(z){return null}})(mt);return!!xt&&(xt.clientHeight<mt.scrollHeight||xt.clientWidth<mt.scrollWidth)})(Ct)}return!1},zt=(Ct,yt,Tt,mt,xt,ft,z,tt)=>ft<Ct&&z>yt||ft>Ct&&z<yt?0:ft<=Ct&&tt<=Tt||z>=yt&&tt>=Tt?ft-Ct-mt:z>yt&&tt<Tt||ft<Ct&&tt>Tt?z-yt+xt:0,Bt=Ct=>{const yt=Ct.parentElement;return yt==null?Ct.getRootNode().host||null:yt},vt=(Ct,yt)=>{var Tt,mt,xt,ft;if(typeof document=="undefined")return[];const{scrollMode:z,block:tt,inline:at,boundary:it,skipOverflowHiddenElements:lt}=yt,ut=typeof it=="function"?it:we=>we!==it;if(!ae(Ct))throw new TypeError("Invalid target");const dt=document.scrollingElement||document.documentElement,bt=[];let At=Ct;for(;ae(At)&&ut(At);){if(At=Bt(At),At===dt){bt.push(At);break}At!=null&&At===document.body&&ot(At)&&!ot(document.documentElement)||At!=null&&ot(At,lt)&&bt.push(At)}const Dt=(mt=(Tt=window.visualViewport)==null?void 0:Tt.width)!=null?mt:innerWidth,Ft=(ft=(xt=window.visualViewport)==null?void 0:xt.height)!=null?ft:innerHeight,{scrollX:jt,scrollY:Nt}=window,{height:_t,width:Wt,top:Jt,right:Ut,bottom:Vt,left:oe}=Ct.getBoundingClientRect(),{top:se,right:he,bottom:be,left:Yt}=(we=>{const ce=window.getComputedStyle(we);return{top:parseFloat(ce.scrollMarginTop)||0,right:parseFloat(ce.scrollMarginRight)||0,bottom:parseFloat(ce.scrollMarginBottom)||0,left:parseFloat(ce.scrollMarginLeft)||0}})(Ct);let ne=tt==="start"||tt==="nearest"?Jt-se:tt==="end"?Vt+be:Jt+_t/2-se+be,ve=at==="center"?oe+Wt/2-Yt+he:at==="end"?Ut+he:oe-Yt;const Se=[];for(let we=0;we<bt.length;we++){const ce=bt[we],{height:de,width:le,top:Ce,right:fe,bottom:me,left:ke}=ce.getBoundingClientRect();if(z==="if-needed"&&Jt>=0&&oe>=0&&Vt<=Ft&&Ut<=Dt&&(ce===dt&&!ot(ce)||Jt>=Ce&&Vt<=me&&oe>=ke&&Ut<=fe))return Se;const pe=getComputedStyle(ce),qt=parseInt(pe.borderLeftWidth,10),Kt=parseInt(pe.borderTopWidth,10),wt=parseInt(pe.borderRightWidth,10),Lt=parseInt(pe.borderBottomWidth,10);let Zt=0,ee=0;const It="offsetWidth"in ce?ce.offsetWidth-ce.clientWidth-qt-wt:0,Rt="offsetHeight"in ce?ce.offsetHeight-ce.clientHeight-Kt-Lt:0,Ht="offsetWidth"in ce?ce.offsetWidth===0?0:le/ce.offsetWidth:0,re="offsetHeight"in ce?ce.offsetHeight===0?0:de/ce.offsetHeight:0;if(dt===ce)Zt=tt==="start"?ne:tt==="end"?ne-Ft:tt==="nearest"?zt(Nt,Nt+Ft,Ft,Kt,Lt,Nt+ne,Nt+ne+_t,_t):ne-Ft/2,ee=at==="start"?ve:at==="center"?ve-Dt/2:at==="end"?ve-Dt:zt(jt,jt+Dt,Dt,qt,wt,jt+ve,jt+ve+Wt,Wt),Zt=Math.max(0,Zt+Nt),ee=Math.max(0,ee+jt);else{Zt=tt==="start"?ne-Ce-Kt:tt==="end"?ne-me+Lt+Rt:tt==="nearest"?zt(Ce,me,de,Kt,Lt+Rt,ne,ne+_t,_t):ne-(Ce+de/2)+Rt/2,ee=at==="start"?ve-ke-qt:at==="center"?ve-(ke+le/2)+It/2:at==="end"?ve-fe+wt+It:zt(ke,fe,le,qt,wt+It,ve,ve+Wt,Wt);const{scrollLeft:ye,scrollTop:Pe}=ce;Zt=re===0?0:Math.max(0,Math.min(Pe+Zt/re,ce.scrollHeight-de/re+Rt)),ee=Ht===0?0:Math.max(0,Math.min(ye+ee/Ht,ce.scrollWidth-le/Ht+It)),ne+=Pe-Zt,ve+=ye-ee}Se.push({el:ce,top:Zt,left:ee})}return Se},gt=Ct=>Ct===!1?{block:"end",inline:"nearest"}:(yt=>yt===Object(yt)&&Object.keys(yt).length!==0)(Ct)?Ct:{block:"start",inline:"nearest"};function kt(Ct,yt){if(!Ct.isConnected||!(xt=>{let ft=xt;for(;ft&&ft.parentNode;){if(ft.parentNode===document)return!0;ft=ft.parentNode instanceof ShadowRoot?ft.parentNode.host:ft.parentNode}return!1})(Ct))return;const Tt=(xt=>{const ft=window.getComputedStyle(xt);return{top:parseFloat(ft.scrollMarginTop)||0,right:parseFloat(ft.scrollMarginRight)||0,bottom:parseFloat(ft.scrollMarginBottom)||0,left:parseFloat(ft.scrollMarginLeft)||0}})(Ct);if((xt=>typeof xt=="object"&&typeof xt.behavior=="function")(yt))return yt.behavior(vt(Ct,yt));const mt=typeof yt=="boolean"||yt==null?void 0:yt.behavior;for(const{el:xt,top:ft,left:z}of vt(Ct,gt(yt))){const tt=ft-Tt.top+Tt.bottom,at=z-Tt.left+Tt.right;xt.scroll({top:tt,left:at,behavior:mt})}}}}]);