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.
1245 lines
2.6 MiB
1245 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[5942],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(fn,cn){"use strict";cn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},8423:function(fn,cn){"use strict";cn.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 fn(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(fn.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(fn.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(fn.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(fn.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 fn))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 cn=[];function le(ft,z){var tt=cn.pop();return tt===void 0?new go.Point(ft,z):(tt.x=ft,tt.y=z,tt)}function ae(){var ft=cn.pop();return ft===void 0?new go.Point:ft}function Re(ft){cn.push(ft)}function ot(ft,z,tt,at,it,lt,ut,dt,Pt){Pt||(Pt=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,Gt=lt-Nt*it;Ft=ft,jt=Nt*Ft+Gt}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,Gt=lt-Nt*it;Ft=(Gt-Jt)/(Wt-Nt),jt=Wt*Ft+Jt}return Pt.x=Ft,Pt.y=jt,Pt}function _t(ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt){var Gt=1-Pt,Wt=Pt,Jt=ft*Gt+tt*Wt,Ut=z*Gt+at*Wt,Ht=tt*Gt+it*Wt,oe=at*Gt+lt*Wt,se=it*Gt+ut*Wt,fe=lt*Gt+dt*Wt,Pe=Jt*Gt+Ht*Wt,Yt=Ut*Gt+oe*Wt,ee=Ht*Gt+se*Wt,ye=oe*Gt+fe*Wt,xe=Pe*Gt+ee*Wt,be=Yt*Gt+ye*Wt;At.x=Jt,At.y=Ut,Dt.x=Pe,Dt.y=Yt,Ft.x=xe,Ft.y=be,jt.x=ee,jt.y=ye,Nt.x=se,Nt.y=fe}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 fn("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 fn("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&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new fn("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&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("Trapezoid1",0,new fn("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&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new fn("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&<.setSpots(it/z,0,(z-it)/z,1),lt}}),go.Shape.setFigureParameter("ManualOperation",0,new fn("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&<.setSpots(it/z,0,(z-it)/z,1),lt}});var kt=[];function bt(){var ft=kt.pop();return ft===void 0?[]:ft}function St(ft){ft.length=0,kt.push(ft)}function Tt(ft){for(var z=bt(),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=bt();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 St(z),tt}function xt(ft){for(var z=Tt(ft),tt=bt(),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],Pt=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,Pt.x,Pt.y,Dt.x,Dt.y,new go.Point)}return tt[tt.length]=tt[0],St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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()),St(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(),St(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(),St(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(),St(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(),St(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(),St(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(),St(at),it.spot1=new go.Spot(.222,.222),it.spot2=new go.Spot(.777,.777),it}),go.Shape.setFigureParameter("FramedRectangle",0,new fn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new fn("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 fn("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 fn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new fn("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 fn("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 fn("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 fn("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),Pt=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(Pt,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-Pt,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-Pt,tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,lt,.8*tt)),Dt.add(new go.PathSegment(go.PathSegment.Line,Pt,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 fn("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 fn("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 fn("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,Pt=lt*gt;return it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-Pt+dt)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut+.05)*z,(.5-Pt+dt-.02)*tt)),lt=.2,ut=0,dt=-.3,Pt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+ut)*z,(.5+dt)*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut)*z,(.5-Pt+dt)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pt+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),lt=.2,ut=-.3,dt=0,Pt=lt*gt,it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5-lt+dt)*tt,(1-.5+lt+ut-.05)*z,(.5-Pt+dt-.02)*tt,(.5+Pt+ut)*z,(.5-lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+ut)*z,(.5+dt)*tt,(.5-Pt+ut)*z,(.5-lt+dt)*tt,(.5-lt+ut)*z,(.5-Pt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ut)*z,(.5+lt+dt)*tt,(.5-lt+ut)*z,(.5+Pt+dt)*tt,(.5-Pt+ut)*z,(.5+lt+dt)*tt)),it.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*tt,(.5+Pt+ut)*z,(.5+lt+dt)*tt,(.5+lt+ut)*z,(.5+Pt+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,Pt=new go.PathFigure(ut*z,(dt-lt)*tt);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt,(ut-it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.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();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.42,At,Dt,Ft,jt,jt);var Nt=ae(),Gt=ae(),Wt=ae();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.58,jt,jt,Wt,Nt,Gt);var Jt=ae(),Ut=ae(),Ht=ae();_t(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.42,Jt,Ut,Ht,jt,jt);var oe=ae(),se=ae(),fe=ae();return _t(ut,dt+lt,ut-it,dt+lt,ut-lt,dt+it,ut-lt,dt,.58,jt,jt,fe,oe,se),Pt.add(new go.PathSegment(go.PathSegment.Move,fe.x*z,fe.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,oe.x*z,oe.y*tt,se.x*z,se.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),Pt.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)),Pt.add(new go.PathSegment(go.PathSegment.Line,fe.x*z,fe.y*tt).close()),Pt.add(new go.PathSegment(go.PathSegment.Move,Ht.x*z,Ht.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,Wt.x*z,Wt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,Nt.x*z,Nt.y*tt,Gt.x*z,Gt.y*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*z,Ht.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(Gt),Re(Wt),Re(Jt),Re(Ut),Re(Ht),Re(oe),Re(se),Re(fe),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 fn("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,Pt=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)),_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.44,Dt,Ft,At,Pt,Pt),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=le(At.x,At.y);_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.56,Pt,Pt,At,Dt,Ft);var Gt=le(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,(Gt.x*.1+.9)*z,.15*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,(Gt.x*.1+.9)*z,(Gt.y*.1+.05*.9)*tt)),jt.add(new go.PathSegment(go.PathSegment.Line,Gt.x*z,Gt.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(Pt),Re(At),Re(Dt),Re(Ft),Re(Nt),Re(Gt),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,Pt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);at.add(Pt),Pt.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)),Pt.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)),Pt.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)),Pt.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)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.475*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*tt).close()),it=.325,lt=0,ut=-.125,dt=it*gt;var Pt=new go.PathFigure((1-.5+it+lt)*z,(.5+ut)*tt,!1);at.add(Pt),Pt.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)),Pt.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)),Pt.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)),Pt.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 Pt=new go.PathFigure((.525+lt)*z,(.5+it+ut)*tt,!1);return at.add(Pt),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 fn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new fn("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,Pt=new go.Geometry,At=new go.PathFigure(0,ut,!0);Pt.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()),Pt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return Pt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),Pt}),go.Shape.setFigureParameter("Arrow2",0,new fn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new fn("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,Pt=new go.Geometry,At=new go.PathFigure(0,ut,!0);Pt.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()),Pt.spot1=new go.Spot(0,ut/tt);var Dt=ot(0,dt/tt,1,dt/tt,lt/z,1,1,.5,ae());return Pt.spot2=new go.Spot(Dt.x,Dt.y),Re(Dt),Pt}),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 fn("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 Pt=ot(0,.5,.3,0,0,it/tt,.1,it/tt,ae());return ut.spot1=new go.Spot(Pt.x,Pt.y),Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,Pt),ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new fn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new fn("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,Pt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,Pt=tt):(lt=0,ut=tt,dt=0,Pt=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,Pt)),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,Pt)),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,Pt/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 fn("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 Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("IBeamArrow2",0,new fn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new fn("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,Pt=dt+it;(at>tt||it>tt)&&(it>at?(at=at*tt/it,lt=(tt-at)/2,ut=lt+at,dt=0,Pt=tt):(lt=0,ut=tt,dt=0,Pt=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,Pt)),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,Pt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,Pt)),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,Pt/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 fn("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 fn("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 fn("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 Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("SplitEndArrow2",0,new fn("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 Pt=ot(.7,1,1,.5,0,lt/tt,1,lt/tt,ae());return ut.spot2=new go.Spot(Pt.x,Pt.y),Re(Pt),ut}),go.Shape.setFigureParameter("SquareArrow",0,new fn("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,Pt=.5,At=.1,Dt=new go.PathFigure(Pt*z,(At+lt)*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-it)*z,At*tt,(Pt-ut)*z,(At+lt)*tt,(Pt-it)*z,(At+dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-lt)*tt,(Pt-it)*z,(At-dt)*tt,(Pt-ut)*z,(At-lt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+it)*z,At*tt,(Pt+ut)*z,(At-lt)*tt,(Pt+it)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+lt)*tt,(Pt+it)*z,(At+dt)*tt,(Pt+ut)*z,(At+lt)*tt));var Ft=.05,jt=gt*Ft;Pt=.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)),Pt=.95,At=.25,Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+Ft)*z,At*tt,(Pt+jt)*z,(At-Ft)*tt,(Pt+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,Pt=.825,At=.35,Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-jt)*tt,(Pt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-jt)*z,(At-Ft)*tt,(Pt-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,Pt=.5,At=.7,Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-jt)*tt,(Pt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-jt)*z,(At-Ft)*tt,(Pt-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,Pt=.175,At=.35,Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt+Ft)*z,(At-jt)*tt,(Pt+jt)*z,(At-Ft)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-Ft)*z,At*tt,(Pt-jt)*z,(At-Ft)*tt,(Pt-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,Pt=.05,At=.25,Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-Ft)*tt,(Pt-Ft)*z,(At-jt)*tt,(Pt-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 fn("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,Pt=new go.PathFigure(z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,tt,z,(dt+ut)*tt,(dt+ut)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*tt,(dt-ut)*z,tt,0,(dt+ut)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,0,0,(dt-ut)*tt,(dt-ut)*z,0)),Pt.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 Pt=new go.PathFigure(.8*z,.75*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*tt)),Pt.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,Pt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,0,tt)),Pt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pt.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,Pt=.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((Pt+dt)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z,At*tt,(Pt-ut)*z,(At+dt)*tt,(Pt-dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z,At*tt,(Pt+ut)*z,(At-dt)*tt,(Pt+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,Pt=new go.PathFigure(.8*z,.5*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.7*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*tt,.25*z,.25*tt)),Pt.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,Pt=new go.PathFigure(0,0,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*tt,(ut+lt+lt)*z,(dt-it)*tt,.8*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,0,tt,.8*z,(dt+lt)*tt,(ut+lt+lt)*z,(dt+it)*tt)),Pt.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,Pt=new go.PathFigure(.1*z,0,!1);at.add(Pt),Pt.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,Pt=new go.PathFigure(.1*z,0,!1);at.add(Pt),Pt.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,Pt=new go.PathFigure((ut-it*.5)*z,tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.3,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.5,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.7,Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,tt,(ut+lt)*z,0,(ut+it)*z,tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,0,(ut-it)*z,tt,(ut-lt)*z,0)),ut=.9,Pt.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,Pt=new go.PathFigure((ut-lt)*z,dt*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+lt)*z,dt*tt,(ut+it)*z,(dt-lt)*tt,(ut+lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut-lt)*z,dt*tt,(ut-it)*z,(dt+lt)*tt,(ut-lt)*z,(dt+it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Move,(ut-lt+.1)*z,dt*tt)),Pt.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,Pt=0,At=.5,Dt=(it-z)/2,Ft=(lt-tt)/2,jt=new go.PathFigure(Pt*z+Dt,(At+dt)*tt+Ft,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt+ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.4,dt=.4,Pt=.2,At=.5;var Nt=new go.PathFigure(Pt*z+Dt,(At+dt)*tt+Ft,!0);at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt+ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At-ut)*tt+Ft)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt-dt+ut*.5)*z+Dt,(At+ut)*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft).close()),ut=gt*.2,dt=.2,Pt=.5,At=.5;var Gt=new go.PathFigure((Pt-dt)*z+Dt,At*tt+Ft,!0);at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt-dt)*z+Dt,(At-ut)*tt+Ft,(Pt-ut)*z+Dt,(At-dt)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-dt)*z+Dt,At*tt+Ft,(Pt-ut)*z+Dt,(At+dt)*tt+Ft,(Pt-dt)*z+Dt,(At+ut)*tt+Ft)),ut=gt*.4,dt=.4,Pt=.8,At=.5;var Wt=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);at.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt-ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,Pt*z+Dt,(At-dt)*tt+Ft).close()),ut=gt*.8,dt=.8,Pt=1,At=.5;var Jt=new go.PathFigure(Pt*z+Dt,(At-dt)*tt+Ft,!0);return at.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt)*z+Dt,At*tt+Ft,(Pt+ut)*z+Dt,(At-dt)*tt+Ft,(Pt+dt)*z+Dt,(At-ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt)*z+Dt,(At+ut)*tt+Ft,(Pt+ut)*z+Dt,(At+dt)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+dt-ut*.5)*z+Dt,At*tt+Ft,Pt*z+Dt,(At+dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At+ut)*tt+Ft)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z+Dt,(At-dt)*tt+Ft,(Pt+dt-ut*.5)*z+Dt,(At-ut)*tt+Ft,Pt*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,Pt=ae(),At=ae(),Dt=ae(),Ft=ae();_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,Pt,Pt,At,Dt,Ft);var jt=le(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)),_t(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,Pt,Pt),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,_t(ut-lt,dt,ut-lt,dt-it,ut-it,dt-lt,ut,dt-lt,.5,Dt,Ft,At,Pt,Pt),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)),_t(ut,dt-lt,ut+it,dt-lt,ut+lt,dt-it,ut+lt,dt,.5,Pt,Pt,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(Pt),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,Pt){ut.add(new go.PathSegment(go.PathSegment.Move,(.3+dt)*z,(.8+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.5+dt)*z,(.5+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.1+dt)*z,(.5+Pt)*tt)),ut.add(new go.PathSegment(go.PathSegment.Line,(.3+dt)*z,(.8+Pt)*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,Pt=.4*Math.SQRT2/2+.5,At=.5-.5*Math.SQRT2/2,Dt=1,Ft=.5,jt=.5,Nt=0,Gt=new go.PathFigure(Pt*z,(1-At)*tt,!1);return at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,Ft*tt,Dt*z,.7*tt,Dt*z,Ft*tt)),Gt.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)),Gt.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)),Gt.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)),Gt.add(new go.PathSegment(go.PathSegment.Move,(.25+lt)*z,.8*tt)),Gt.add(new go.PathSegment(go.PathSegment.Line,(.35+lt)*z,.9*tt)),Gt.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,Pt=ut,At=Math.PI/4,Dt=4*(1-Math.cos(At))/(3*Math.sin(At)),Ft=Dt*.5,jt=ut,Nt=ut,Gt=Dt*jt,Wt=Dt*Nt;lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt-jt)*z,Pt*tt,(dt-(Gt+jt)/2)*z,(Pt+(Nt+Wt)/2)*tt,(dt-jt)*z,(Pt+Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,dt*z,(Pt-Nt)*tt,(dt-jt)*z,(Pt-Wt)*tt,(dt-Gt)*z,(Pt-Nt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(dt+jt)*z,Pt*tt,(dt+Gt)*z,(Pt-Nt)*tt,(dt+jt)*z,(Pt-Wt)*tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*tt,(dt+jt)*z,(Pt+Wt)*tt,(dt+(Gt+jt)/2)*z,(Pt+(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,Pt=.2,At=.9,Dt=new go.PathFigure((Pt-ut)*z,At*tt,!0);at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+ut)*z,At*tt,(Pt+dt)*z,(At-ut)*tt,(Pt+ut)*z,(At-dt)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-ut)*z,At*tt,(Pt-dt)*z,(At+ut)*tt,(Pt-ut)*z,(At+dt)*tt).close()),ut=.1,dt=gt*.1,Pt=.8,At=.9;var Ft=new go.PathFigure((Pt-ut)*z,At*tt,!0);return at.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At-ut)*tt,(Pt-ut)*z,(At-dt)*tt,(Pt-dt)*z,(At-ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt+ut)*z,At*tt,(Pt+dt)*z,(At-ut)*tt,(Pt+ut)*z,(At-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Pt*z,(At+ut)*tt,(Pt+ut)*z,(At+dt)*tt,(Pt+dt)*z,(At+ut)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pt-ut)*z,At*tt,(Pt-dt)*z,(At+ut)*tt,(Pt-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 Pt=.1,At=gt*.1,Dt=.1,Ft=.9,jt=new go.PathFigure((Dt-Pt)*z,Ft*tt,!0);at.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-Pt)*tt,(Dt-Pt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-Pt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Pt)*z,Ft*tt,(Dt+At)*z,(Ft-Pt)*tt,(Dt+Pt)*z,(Ft-At)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+Pt)*tt,(Dt+Pt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+Pt)*tt)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Pt)*z,Ft*tt,(Dt-At)*z,(Ft+Pt)*tt,(Dt-Pt)*z,(Ft+At)*tt)),Pt=.1,At=gt*.1,Dt=.4,Ft=.9;var Nt=new go.PathFigure((Dt-Pt)*z,Ft*tt,!0);return at.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft-Pt)*tt,(Dt-Pt)*z,(Ft-At)*tt,(Dt-At)*z,(Ft-Pt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Pt)*z,Ft*tt,(Dt+At)*z,(Ft-Pt)*tt,(Dt+Pt)*z,(Ft-At)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*z,(Ft+Pt)*tt,(Dt+Pt)*z,(Ft+At)*tt,(Dt+At)*z,(Ft+Pt)*tt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Pt)*z,Ft*tt,(Dt-At)*z,(Ft+Pt)*tt,(Dt-Pt)*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,Pt=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),Pt.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,Gt=new go.PathFigure((jt-Dt)*z,Nt*tt,!0);at.add(Gt),Gt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt-Dt)*tt,(jt-Dt)*z,(Nt-Ft)*tt,(jt-Ft)*z,(Nt-Dt)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,(jt+Dt)*z,Nt*tt,(jt+Ft)*z,(Nt-Dt)*tt,(jt+Dt)*z,(Nt-Ft)*tt)),Gt.add(new go.PathSegment(go.PathSegment.Bezier,jt*z,(Nt+Dt)*tt,(jt+Dt)*z,(Nt+Ft)*tt,(jt+Ft)*z,(Nt+Dt)*tt)),Gt.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,Pt=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-Pt)*tt,(At-Pt)*z,(Dt-dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At+dt)*z,Dt*tt,(At+Pt)*z,(Dt-dt)*tt,(At+dt)*z,(Dt-Pt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,At*z,(Dt+dt)*tt,(At+dt)*z,(Dt+Pt)*tt,(At+Pt)*z,(Dt+dt)*tt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(At-dt)*z,Dt*tt,(At-Pt)*z,(Dt+dt)*tt,(At-dt)*z,(Dt+Pt)*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,Pt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.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,Pt=new go.PathFigure((ut-it)*z,dt*tt,!0);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.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,Pt=new go.PathFigure((ut-it)*z,dt*tt,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt-it)*tt,(ut-it)*z,(dt-lt)*tt,(ut-lt)*z,(dt-it)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(ut+it)*z,dt*tt,(ut+lt)*z,(dt-it)*tt,(ut+it)*z,(dt-lt)*tt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,ut*z,(dt+it)*tt,(ut+it)*z,(dt+lt)*tt,(ut+lt)*z,(dt+it)*tt)),Pt.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 Pt=new go.PathFigure(.5*z,.1*tt,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*tt)),Pt.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 Pt=new go.PathFigure(z*.816,tt,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.816,tt*(1-.184*4))),Pt.add(new go.PathSegment(go.PathSegment.Line,z*1,tt*(1-.184*5))),Pt.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 Pt=new go.PathFigure(z*1,0,!0);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.4,tt*.65)),Pt.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 Pt=new go.PathFigure(z*(.11+.24133333*2+.028*2),tt*.1,!1);return at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.1)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),tt*.8)),Pt.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 Pt=new go.PathFigure(z*.83,tt*1,!1);at.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.83,tt*.5)),Pt.add(new go.PathSegment(go.PathSegment.Line,z*.17,tt*.5)),Pt.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 fn={},cn="5.0",le={},ae=null,Re=!1,ot=!1,_t=null,Bt=!1,vt=null,gt=null,kt=0;kt<arguments.length;kt++){var bt=arguments[kt];if(bt!==null)switch(typeof bt){case"number":cn=bt.toFixed(1);break;case"string":bt.match(new RegExp("^[0-9]\\.[0-9]+$"))?cn=bt:_t=bt;break;case"object":typeof bt.is3D!="undefined"?ae=bt:le=bt;break;case"boolean":Re=bt,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},le.material_id!==void 0&&!ot&&(Re=!0)),_t!==null&&le.id===void 0&&(le.id=_t);var St="",Tt="",mt=!1,xt=null,ft=null,z=null,tt=!1,at=null,it=null,lt=null,ut=null,dt=null;le.height!==void 0&&(le.height=Math.round(le.height)),le.width!==void 0&&(le.width=Math.round(le.width));var Pt=function(ce){return parseFloat(ce)>4?parseFloat(ce):5};fn.setHTML5Codebase=function(ce,pe){gt=ce,ye(ce,pe)},fn.setJavaCodebase=fn.setJavaCodebaseVersion=fn.isCompiledInstalled=fn.setPreCompiledScriptPath=fn.setPreCompiledResourcePath=function(){},fn.setHTML5CodebaseVersion=function(ce,pe){var he=parseFloat(ce);if(he!==NaN&&he<5){console.log("The GeoGebra HTML5 codebase version "+he+" is deprecated. Using version latest instead.");return}vt=ce,ee(ce,pe)},fn.getHTML5CodebaseVersion=function(){return ft},fn.getParameters=function(){return le},fn.setFontsCSSURL=function(ce){ut=ce},fn.setGiacJSURL=function(ce){},fn.setJNLPFile=function(ce){St=ce},fn.setJNLPBaseDir=function(ce){},fn.inject=function(){function ce(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pe="auto",he=le.id,Ce,de=!1,Fe=0;Fe<arguments.length;Fe++){var ge=arguments[Fe];typeof ge=="string"?(ge=ge.toLowerCase(),ge.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pe=ge:he=arguments[Fe]):typeof ge=="boolean"?de=ge:ge instanceof HTMLElement&&(Ce=ge)}Se();function Se(){if(!Bt){setTimeout(Se,200);return}pe=Pe(pe);var re=Ce||document.getElementById(he);if(!re){console.log("possibly bug on ajax loading? ");return}if(fn.removeExistingApplet(re,!1),le.width===void 0&&re.clientWidth&&(le.width=re.clientWidth),le.height===void 0&&re.clientHeight&&(le.height=re.clientHeight),!(le.width&&le.height)&&pe==="html5"&&(delete le.width,delete le.height),xt=pe,pe==="screenshot")Ut(re,le);else{var Kt=!1;le.hasOwnProperty("playButton")&&le.playButton||le.hasOwnProperty("clickToLoad")&&le.clickToLoad?Kt=!0:le.hasOwnProperty("playButtonAutoDecide")&&le.playButtonAutoDecide&&(Kt=(!At()||ce())&&Dt()),Kt?(xt="screenshot",oe(re,le,de,pe)):Jt(re,le,de)}}};function At(){try{return window.self!==window.top}catch(ce){return!0}}function Dt(){return le.hasOwnProperty("screenshotGenerator")&&le.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}fn.getViews=function(){return ae},fn.isJavaInstalled=function(){return!1};var Ft=function(ce){var pe=function(Fe){var ge=JSON.parse(Fe),Se=function(wt){return wt.type=="G"||wt.type=="E"},re=ge.elements?ge.elements.filter(Se)[0]:ge;if(!re||!re.url){he();return}le.fileName=re.url,jt(re.settings||{}),ae.is3D=!0;var Kt="https://www.geogebra.org/images/";fn.setPreviewImage(at||re.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),ce()},he=function(){le.onError&&le.onError(),xe("Error: Fetching material (id "+le.material_id+") failed.",le)},Ce=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",de="/materials/"+le.material_id+"?scope=basic";Nt("https://"+Ce+"/api/proxy.php?path="+encodeURIComponent(de),pe,he)};function jt(ce){var pe=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(he){ce[he]=!!ce[he]}),pe.forEach(function(he){le[he]===void 0&&ce[he]!==void 0&&(le[he]=ce[he])}),le.showToolBarHelp===void 0&&(le.showToolBarHelp=le.showToolBar)}function Nt(ce,pe,he){var Ce=new XMLHttpRequest;Ce.open("GET",ce),Ce.onload=function(){pe(Ce.responseText)},Ce.onerror=he,Ce.send()}fn.isHTML5Installed=function(){return!0},fn.getLoadedAppletType=function(){return xt},fn.setPreviewImage=function(ce,pe,he){at=ce,it=pe,lt=he},fn.removeExistingApplet=function(ce,pe){var he;typeof ce=="string"&&(ce=document.getElementById(ce)),xt=null;var Ce=null;for(he=0;he<ce.childNodes.length;he++){var de=ce.childNodes[he],Fe=de.className;Fe==="applet_screenshot"?pe?(de.style.display="block",xt="screenshot"):de.style.display="none":Fe!=="applet_scaler prerender"&&(ce.removeChild(de),Ce=Fe&&Fe.indexOf("appletParameters")!=-1?de.id:null,he--)}var ge=le.id!==void 0?le.id:Ce,Se=window[ge];Se&&typeof Se.getBase64=="function"&&(Se.remove(),window[ge]=null)},fn.refreshHitPoints=function(){if(Pt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ce=fn.getAppletObject();return ce&&typeof ce.recalculateEnvironments=="function"?(ce.recalculateEnvironments(),!0):!1},fn.startAnimation=function(){var ce=fn.getAppletObject();return ce&&typeof ce.startAnimation=="function"?(ce.startAnimation(),!0):!1},fn.stopAnimation=function(){var ce=fn.getAppletObject();return ce&&typeof ce.stopAnimation=="function"?(ce.stopAnimation(),!0):!1},fn.getAppletObject=function(){var ce=le.id!==void 0?le.id:"ggbApplet";return window[ce]},fn.resize=function(){};var Gt=function(ce,pe,he){var Ce=document.createElement("param");Ce.setAttribute("name",pe),Ce.setAttribute("value",he),ce.appendChild(Ce)},Wt=function(ce){return ce&&ce!=="false"},Jt=function(ce,pe,he){Pt(ft)<=4.2&&(he=!0);var Ce=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ft||ggbHTML5LoadedCodebaseIsWebSimple&&!tt)&&(Ce=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var de=document.createElement("div");de.classList.add("appletParameters","notranslate");var Fe=pe.width,ge=pe.height;if(pe.disableAutoScale=pe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pe.disableAutoScale,pe.width!==void 0)if(Pt(ft)<=4.4)Wt(pe.showToolBar)&&(pe.height-=7),Wt(pe.showAlgebraInput)&&(pe.height-=37),pe.width<605&&Wt(pe.showToolBar)&&(pe.width=605,Fe=605);else{var Se=100;(Wt(pe.showToolBar)||Wt(pe.showMenuBar))&&(pe.hasOwnProperty("customToolBar")&&(pe.customToolbar=pe.customToolBar),Se=Wt(pe.showMenuBar)?245:155),Fe<Se&&(pe.width=Se,Fe=Se)}de.style.border="none",de.style.display="inline-block";for(var re in pe)pe.hasOwnProperty(re)&&re!=="appletOnLoad"&&de.setAttribute("data-param-"+re,pe[re]);ut&&de.setAttribute("data-param-fontscssurl",ut),fn.resize=function(){GGBAppletUtils.responsiveResize(ce,pe)},window.addEventListener("resize",function(Ne){fn.resize()});var Kt=typeof pe.appletOnLoad=="function"?pe.appletOnLoad:function(){};if(!he&&pe.width!==void 0){pe.hasOwnProperty("showSplash")||de.setAttribute("data-param-showSplash","false");var wt=ce.querySelector(".applet_scaler.prerender"),Lt=wt!==null;if(Lt)var Xt=wt.querySelector(".ggb_preview");else{var Xt=fe(Fe,ge,pe.borderColor,!1);wt=document.createElement("div"),wt.className="applet_scaler",wt.style.position="relative",wt.style.display="block",wt.style.width=Fe+"px",wt.style.height=ge+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(wt,"66%"),Pt(ft)>=5?(pe.appletOnLoad=function(Ne){var Be=ce.querySelector(".ggb_preview");Be&&Be.parentNode.removeChild(Be),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wt),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(Ne)},Lt||wt.appendChild(Xt)):de.appendChild(Xt),wt.appendChild(de),Lt||ce.appendChild(wt),setTimeout(function(){fn.resize()},1)}else{var ne=document.createElement("div");ne.className="applet_scaler",ne.style.position="relative",ne.style.display="block",ne.appendChild(de),ce.appendChild(ne),pe.appletOnLoad=function(Ne){fn.resize(),Kt(Ne)}}function It(Ne,Be){Be&&typeof Be.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ne,Be.appletOnLoad):renderGGBElement(Ne),xe("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Be)}function Rt(Ne,Be){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ne,params:Be}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Xe){It(Xe.article,Xe.params)}),html5AppletsToProcess=null)},Pt(ft)<5&&(Ne.className+=" geogebraweb")):It(Ne,Be)}if(Ce){scriptLoadStarted=!0;for(var Vt=0;Vt<de.childNodes.length;Vt++){var $t=de.childNodes[Vt].tagName;$t==="TABLE"&&(de.removeChild(de.childNodes[Vt]),Vt--)}if(ggbHTML5LoadedScript!==null){var ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ue!=null&&ue.parentNode.removeChild(ue)}var me=document.createElement("script"),Le=function(){Rt(de,pe)};me.src=Tt+z,ggbHTML5LoadedCodebaseIsWebSimple=tt,ggbHTML5LoadedCodebaseVersion=ft,ggbHTML5LoadedScript=me.src,xe("GeoGebra HTML5 codebase loaded: '"+Tt+"'.",pe),!gt&&(!vt||vt=="5.0")?(tt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Le()):Tt.requirejs?__webpack_require__.e(7963).then(function(){var Ne=[__webpack_require__(87963)];Le.apply(null,Ne)}.bind(this)).catch(__webpack_require__.oe):(me.onload=Le,ce.appendChild(me))}else Rt(de,pe);pe.height=ge,pe.width=Fe},Ut=function(ce,pe,he){var Ce=fe(pe.width,pe.height,pe.borderColor,he),de=document.createElement("div");de.style.position="relative",de.style.display="block",de.style.width=pe.width+"px",de.style.height=pe.height+"px",de.className="applet_screenshot applet_scaler"+(he?" applet_screenshot_play":""),de.appendChild(Ce);var Fe=GGBAppletUtils.getScale(pe,ce,he);he?(ce.appendChild(se()),window.GGBT_wsf_view||(ce.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(de,"66%"),ce.appendChild(de),Fe!==1&&!isNaN(Fe)&&(GGBAppletUtils.scaleElement(de,Fe),de.style.width=pe.width+"px",de.style.height=pe.height+"px",de.parentNode.style.width=pe.width*Fe+"px",de.parentNode.style.height=pe.height*Fe+"px"),fn.resize=function(){Ht(ce,Ce,de,he)},window.addEventListener("resize",function(ge){fn.resize()}),fn.resize()};function Ht(ce,pe,he,Ce){if(ce.contains(pe)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ce.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ce)}var de=GGBAppletUtils.getScale(le,ce,Ce);he.parentNode!==null&&(!isNaN(de)&&de!==1?(GGBAppletUtils.scaleElement(he,de),he.parentNode.style.width=le.width*de+"px",he.parentNode.style.height=le.height*de+"px"):(GGBAppletUtils.scaleElement(he,1),he.parentNode.style.width=le.width+"px",he.parentNode.style.height=le.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()}}fn.onExitFullscreen=function(ce,pe){pe.appendChild(ce)};var oe=function(ce,pe,he,Ce){Ut(ce,pe,!0);for(var de=function(){var Se=[];for(ge=0;ge<ce.childNodes.length;ge++)Se.push(ce.childNodes[ge]);if(window.GGBT_wsf_view){var re=window.GGBT_wsf_view.renderFullScreen(ce,pe.id),Kt=document.getElementById("fullscreencontainer"),wt=jQuery(ce).find(".fullscreencontent");wt.length>0?(re.remove(),wt.attr("id","fullscreencontent").show(),jQuery(Kt).append(wt),window.dispatchEvent(new Event("resize"))):Jt(re,pe,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else xt=Ce,Jt(ce,pe,!1);if(!window.GGBT_wsf_view)for(ge=0;ge<Se.length;ge++)ce.removeChild(Se[ge])},Fe=ce.getElementsByClassName("ggb_preview_play"),ge=0;ge<Fe.length;ge++)Fe[ge].addEventListener("click",de,!1),Fe[ge].addEventListener("ontouchstart",de,!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 pe='.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");}',he=document.createElement("style");he.styleSheet?he.styleSheet.cssText=pe:he.appendChild(document.createTextNode(pe)),document.getElementsByTagName("head")[0].appendChild(he)}return ce},fe=function(ce,pe,he,Ce){var de=document.createElement("div");de.className="ggb_preview",de.style.position="absolute",de.style.zIndex="90",de.style.width=ce-2+"px",de.style.height=pe-2+"px",de.style.top="0px",de.style.left="0px",de.style.overflow="hidden",de.style.backgroundColor="white";var Fe="lightgrey";he!==void 0&&(he==="none"?Fe="transparent":Fe=he),de.style.border="1px solid "+Fe;var ge=document.createElement("img");if(ge.style.position="relative",ge.style.zIndex="1000",ge.style.top="-1px",ge.style.left="-1px",at!==null&&ge.setAttribute("src",at),ge.style.opacity=.7,it!==null){var Se,re,Kt;if(!Ce){Se=document.createElement("img"),Se.style.position="absolute",Se.style.zIndex="1001",Se.style.opacity=1,ge.style.opacity=.3,re=360,re>ce/4*3&&(re=ce/4*3),Kt=re/5.8,Se.setAttribute("src",it),Se.setAttribute("width",re),Se.setAttribute("height",Kt);var wt=(ce-re)/2,Lt=(pe-Kt)/2;Se.style.left=wt+"px",Se.style.top=Lt+"px",de.appendChild(Se)}}return de.appendChild(ge),de},Pe=function(ce){return ce=ce.toLowerCase(),ce==="html5"||ce==="screenshot"?ce:"html5"},Yt=["web","webSimple","web3d","tablet","tablet3d","phone"],ee=function(ce,pe){if(ft=ce,pe){ye(ft,!0);return}var he=!Re;if(he){var Ce=Pt(ft);!isNaN(Ce)&&Ce<4.4&&(he=!1)}var de,Fe;window.location.protocol.substr(0,4)==="http"?de=window.location.protocol:de="http:";var ge=ft.indexOf("//");ge>0?Fe=ft:ge===0?Fe=de+ft:Fe="https://www.geogebra.org/apps/5.2.814.0/";for(var Se in Yt)if(ft.slice(Yt[Se].length*-1)===Yt[Se]||ft.slice((Yt[Se].length+1)*-1)===Yt[Se]+"/"){ye(Fe,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&he&&!ae.is3D&&!ae.AV&&!ae.SV&&!ae.CV&&!ae.EV2&&!ae.CP&&!ae.PC&&!ae.DA&&!ae.FI&&!ae.PV&&!Wt(le.showToolBar)&&!Wt(le.showMenuBar)&&!Wt(le.showAlgebraInput)&&!Wt(le.enableRightClick)&&(!le.appName||le.appName=="classic")?Fe+="webSimple/":Fe+="web3d/",ye(Fe,!1)},ye=function(ce,pe){if(ce.requirejs){Tt=ce;return}ce.slice(-1)!=="/"&&(ce+="/"),Tt=ce,pe===null&&(pe=ce.indexOf("http")===-1),mt=pe,z="web.nocache.js",tt=!1;var he=Tt.split("/");he.length>1&&(!pe&&he[he.length-2]==="webSimple"?(z="webSimple.nocache.js",tt=!0):Yt.indexOf(he[he.length-2])>=0&&(z=he[he.length-2]+".nocache.js")),he=ce.split("/"),ft=he[he.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."),ee("5.0",pe))},xe=function(ce,pe){window.console&&window.console.log&&(!pe||typeof pe.showLogging=="undefined"||pe.showLogging&&pe.showLogging!=="false")&&console.log(ce)};le.material_id!==void 0?Ft(be):be();function be(){var ce=cn;vt!==null?ce=vt:parseFloat(ce)<5&&(ce="5.0"),ee(ce,!1),gt!==null&&ye(gt,mt),Bt=!0}return fn},GGBAppletUtils=function(){"use strict";function fn(){return window.GGBT_wsf_edit!==void 0}function cn(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 le(Bt,vt,gt,kt,bt,St){var Tt=null;if(St!=null&&St!="")for(var mt=Bt.parentNode;mt!=null;)if((" "+mt.className+" ").indexOf(" "+St+" ")>-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&&(bt===void 0||!bt)&&(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,bt){if(Bt.isScreenshoGenerator)return 1;var St=kt!==void 0&&kt,Tt=Bt.noScaleMargin!=null&&Bt.noScaleMargin,mt=function(dt){return dt&&dt!=="false"},xt=mt(Bt.autoHeight),ft=le(vt,Bt.width,gt,xt,St&&window.GGBT_wsf_view||Tt,bt),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=St?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,bt,St=!1;if(Bt.hasOwnProperty("allowUpscale")&&(St=Bt.allowUpscale),Bt.hasOwnProperty("scale")&&(kt=parseFloat(Bt.scale),(isNaN(kt)||kt===null||kt===0)&&(kt=1),kt>1&&(St=!0)),vt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(St=!0),!(Bt.hasOwnProperty("disableAutoScale")&&Bt.disableAutoScale))bt=ae(Bt,vt,St,gt,Bt.scaleContainerClass);else return kt;return St&&(!Bt.hasOwnProperty("scale")||kt===1)?bt:Math.min(kt,bt)}function ot(Bt){var vt=Math.min(window.innerWidth,document.documentElement.clientWidth),gt=Math.min(window.innerHeight,document.documentElement.clientHeight),kt=Bt.getBoundingClientRect(),bt=(vt-kt.width)/2,St=(gt-kt.height)/2;St<0&&(St=0),Bt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(bt<40?Bt.style.left="40px":Bt.style.left=bt+"px",Bt.style.top=St+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(St<40?Bt.style.top="40px":Bt.style.top=St+"px",Bt.style.left=bt+"px")}function _t(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);fn()&>.setAttribute("data-param-scale",kt);for(var bt=null,St=0;St<Bt.childNodes.length;St++)if(Bt.childNodes[St].className!==void 0&&Bt.childNodes[St].className.match(/^applet_scaler/)){bt=Bt.childNodes[St];break}if(bt!==null&&bt.querySelector(".noscale")!==null)return;var Tt=vt.id!==void 0?vt.id:"ggbApplet",mt=window[Tt];(mt==null||!mt.recalculateEnvironments)&&bt!==null&&!bt.className.match(/fullscreen/)&&(bt.parentNode.style.transform="",!isNaN(kt)&&kt!==1?(bt.parentNode.style.width=vt.width*kt+"px",bt.parentNode.style.height=vt.height*kt+"px",cn(bt,kt)):(cn(bt,1),bt.parentNode.style.width=vt.width+"px",bt.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:_t,isFlexibleWorksheetEditor:fn,positionCenter:ot,getScale:Re,scaleElement:cn}}();__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 fn=n.location.search;return fn.indexOf(J)!=-1||fn.indexOf(K)!=-1}function q(fn,cn){}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(fn){var cn=s[L].bindings;s[L].bindings=function(){for(var le=cn?cn():{},ae=fn[webModule.__softPermutationId],Re=O;Re<ae.length;Re++){var ot=ae[Re];le[ot[O]]=ot[P]}return le}};var t;function u(){return v(),t}function v(){if(!t){var fn=o.createElement(Q);if(fn.id=L,fn.style.cssText=R+S,fn.tabIndex=-1,o.body.appendChild(fn),t=fn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var cn=document.compatMode==U?V:W;t.write(cn+X),t.close()}}}function w(fn){function cn(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 _t(){if(!ot){if(!Re())return;ot=!0,ae(),o.removeEventListener&&o.removeEventListener(Z,_t,!1),Bt&&clearInterval(Bt)}}o.addEventListener&&o.addEventListener(Z,_t,!1);var Bt=setInterval(function(){_t()},$)}function le(ae){var Re=u(),ot=Re.body,_t=Re.createElement(_);_t.language=ab,_t.crossOrigin=W,_t.src=ae,webModule.__errFn&&(_t.onerror=function(){webModule.__errFn(L,new Error(bb+ae))}),ot.appendChild(_t)}cn(function(){le(fn)})}webModule.__startLoadingFragment=function(fn){return C(fn)},webModule.__installRunAsyncCode=function(fn){var cn=u(),le=cn.body,ae=cn.createElement(_);ae.language=ab,ae.text=fn,le.appendChild(ae),le.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(fn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(fn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(fn){var cn=c[fn];return cn==null?null:cn},r=d,webModule.__errFn=e}function B(){function fn(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 cn(Bt){if(!Bt.match(/^\w+:\/\//)){var vt=o.createElement(ub);vt.src=Bt+vb,Bt=fn(vt.src)}return Bt}function le(){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 fn(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 _t=le();return _t==W&&(_t=ae()),_t==W&&(_t=Re()),_t==W&&ot()&&(_t=fn(o.location.href)),_t=cn(_t),_t}function C(fn){return fn.match(/^\//)||fn.match(/^[a-zA-Z]+:\/\//)?fn:webModule.__moduleBase+fn}function D(){var fn=[],cn=O,le=[],ae=[];function Re(Bt){var vt=ae[Bt](),gt=le[Bt];if(vt in gt)return vt;var kt=[];for(var bt in gt)kt[gt[bt]]=bt;throw r&&r(Bt,kt,vt),null}if(__gwt_isKnownPropertyValue=function(Bt,vt){return vt in le[Bt]},webModule.__getPropMap=function(){var Bt={};for(var vt in le)le.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 _t=ot.indexOf(Db);_t!=-1&&(cn=parseInt(ot.substring(_t+P),$),ot=ot.substring(O,_t))}catch(Bt){}return webModule.__softPermutationId=cn,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(fn,cn,le){"use strict";le.d(cn,{Ax:function(){return _t},Ds:function(){return Bt},KI:function(){return gt},SI:function(){return ot},f1:function(){return Re}});var ae=le(346);function Re(kt){let bt=!0;if(kt.length>0){for(let St=0;St<kt.length;St++)if(kt[St].compile_success==0||!kt[St].compile_success){bt=!1;break}}else bt=!1;return bt}function ot(kt,bt=""){let St=[];for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt],xt=bt?`${bt}/${mt.name}`:`${mt.name}`;St.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:xt})}return St}function _t(kt,bt,St){for(let Tt=0;Tt<kt.length;Tt++){let mt=kt[Tt];if(mt.key===bt){mt.children=St;break}mt.children&&_t(mt.children,bt,St)}return kt}function Bt(kt,bt,St){let Tt;return function(){let mt=this,xt=arguments,ft=function(){Tt=null,St||kt.apply(mt,xt)},z=St&&!Tt;clearTimeout(Tt),Tt=setTimeout(ft,bt),z&&kt.apply(mt,xt)}}const vt=!0,gt=ae.Z.API_SERVER},9507:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Tt}});var ae=le(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ot=le(92310),_t=le.n(ot),Bt=le(29787),vt=le(2859),gt=le(38986),kt=le(51257),bt=(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),Pt=(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)(()=>(Pt.current||(Pt.current=document.createElement("style"),document.head.appendChild(Pt.current)),mt!=null&&mt.visible?(document.body.setAttribute("data-custom","y-hidden"),Pt.current.innerHTML=" html { overflow-y: hidden; }",mt!=null&&mt.src&&Gt()):(document.body.removeAttribute("data-custom"),Pt.current&&(document.head.removeChild(Pt.current),Pt.current=null)),()=>{document.body.removeAttribute("data-custom"),Pt.current&&(document.head.removeChild(Pt.current),Pt.current=null)}),[mt==null?void 0:mt.visible]);const Gt=()=>bt(void 0,null,function*(){Ft(!0),Nt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ht=yield(0,kt.ZJ)(mt==null?void 0:mt.src);ut.current.src="",ut.current.src=Ht,ut.current.onload=function(){Ut()},Ft(!1),Nt("")}),Wt=Ht=>bt(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:Ht.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(Ht.state)}})).status===0&&at():oe!=null&&oe.id&&at(oe),Ft(!1),Nt("")}),Jt=()=>{const Ht=document.querySelector('a[href="https://markerjs.com/"]');Ht&&Ht.parentNode&&(Ht.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 fe=document.querySelector(se.name);fe&&fe.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:_t()(Re.imageDimensions,xt,ft?Re.fullWidth:""),style:z},ae.createElement("img",{className:Re.img,ref:ut}))))}},1041:function(fn,cn,le){"use strict";le.d(cn,{N:function(){return tt}});var ae=le(59301),Re=le(82326),ot=le(62957),_t=le(37568),Bt=le(6767),vt=le(77019),gt=le(5269),kt=le(38986),bt={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"},St=le(92310),Tt=le.n(St),mt=le(87169),xt=le(59301),ft=(at,it,lt)=>new Promise((ut,dt)=>{var Pt=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(Pt,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:Pt,height:At,onChange:Dt=()=>{},onAddKnowledgeFinish:Ft=()=>{},zIndex:jt=1e3})=>{const Nt=(0,ae.useRef)(),[Gt,Wt]=(0,ae.useState)([]);it=it||[];const Jt=(Ht,oe)=>{Ht?(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=Ht=>{Ht.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:bt.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:bt.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),xt.createElement(_t.default,{className:bt.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 fe=yield(0,kt.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Nt.current,sub_discipline_id:at}});if((fe==null?void 0:fe.status)===0){Ft({id:fe.tag_discipline_id,name:Nt.current,type:"personal"});let Pe=lt||[];Pe.push(fe.tag_discipline_id),Dt([...Pe]),Wt([...Pe]),Dt([...Pe])}return oe()}))})};return xt.createElement(vt.Z,{wrap:!1,align:"middle",className:Tt()(bt.wrap,Pt)},xt.createElement(gt.Z,null,xt.createElement(Re.default,{mode:"multiple",disabled:!at||ut,className:bt.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:Gt,filterOption:(Ht,oe)=>oe.label.indexOf(Ht.toLowerCase())>=0},dt==null?void 0:dt.map(Ht=>xt.createElement(z,{key:Ht.id,value:Ht.id,label:Ht.name},xt.createElement("div",{style:{display:"flex",alignItems:"center"}},xt.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Ht.name),(Ht==null?void 0:Ht.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&&bt.add_style}`},xt.createElement("span",{className:bt.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),xt.createElement("span",{className:bt.linkBtn,onClick:Ut},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},76562:function(fn,cn,le){"use strict";var ae=le(59301),Re=le(77019),ot=le(5269),_t=le(20554),Bt=le(99571),vt=le(76902),gt=le(99587),kt=le(48136),bt=le(59301);const St=(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:bt.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},tt.map((dt,Pt)=>bt.createElement(ot.Z,{flex:"110px",className:gt.Z.item},bt.createElement("div",null,bt.createElement(vt.Z,{value:`$$${dt.value}$$`}),dt.name),bt.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>bt.createElement("div",{key:Dt},bt.createElement("h1",null,At.name),bt.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>bt.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},bt.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:bt.createElement(Re.Z,{className:gt.Z.lists,gutter:[10,10]},at.map((dt,Pt)=>bt.createElement(ot.Z,{flex:"110px",className:gt.Z.item},bt.createElement("div",null,bt.createElement(vt.Z,{value:"`$$"+dt.value+"$$`"}),dt.name),bt.createElement("div",{className:gt.Z.children},dt.children.map((At,Dt)=>bt.createElement("div",{key:Dt},At.name&&bt.createElement("h1",null,At.name),bt.createElement(Re.Z,{gutter:[10,10]},At.data.map((Ft,jt)=>bt.createElement(ot.Z,{key:jt,onClick:()=>it(Ft),className:gt.Z.diamond},bt.createElement(vt.Z,{value:"`$$"+Ft.value+"$$`"}))))))))))}],ut=()=>{var dt=document.createElement("div");dt.innerHTML=z.current.getValue();var Pt=dt.innerText;return Tt&&Tt(Pt),Pt};return(0,ae.useImperativeHandle)(ft,()=>({getData:ut})),bt.createElement("div",{className:gt.Z.mathWrap},bt.createElement(_t.default,{defaultActiveKey:"1",items:lt}),bt.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&&bt.createElement("div",{className:gt.Z.button},bt.createElement(Bt.ZP,{size:"large",onClick:ut,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});cn.Z=St},28426:function(fn,cn,le){"use strict";var ae=le(59301),Re=le(93314),ot=le(99571),_t=Object.defineProperty,Bt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,St=(ft,z,tt)=>z in ft?_t(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)&&St(ft,tt,z[tt]);if(gt)for(var tt of gt(z))bt.call(z,tt)&&St(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:Pt,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({},Pt),{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);cn.Z=xt},45677:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return ut}});var ae=le(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ot=le(99571),_t=le(70557),Bt=le(75975),vt=le(25399),gt=le(51257),kt=le(81722),bt=le(28426),St=le(346),Tt=le(44203),mt=le(59301),xt=Object.defineProperty,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(dt,Pt,At)=>Pt in dt?xt(dt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:At}):dt[Pt]=At,it=(dt,Pt)=>{for(var At in Pt||(Pt={}))z.call(Pt,At)&&at(dt,At,Pt[At]);if(ft)for(var At of ft(Pt))tt.call(Pt,At)&&at(dt,At,Pt[At]);return dt},lt=(dt,Pt,At)=>new Promise((Dt,Ft)=>{var jt=Wt=>{try{Gt(At.next(Wt))}catch(Jt){Ft(Jt)}},Nt=Wt=>{try{Gt(At.throw(Wt))}catch(Jt){Ft(Jt)}},Gt=Wt=>Wt.done?Dt(Wt.value):Promise.resolve(Wt.value).then(jt,Nt);Gt((At=At.apply(dt,Pt)).next())}),ut=({editOffice:dt="view",data:Pt,issaver:At,onSaver:Dt,theme:Ft,type:jt,filename:Nt,monacoEditor:Gt,className:Wt,style:Jt,close:Ut,onClose:Ht,hasMask:oe,disabledDownload:se,onImgDimensions:fe,showNodata:Pe,recordInfo:Yt})=>{const[ee,ye]=(0,ae.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[xe,be]=(0,ae.useState)(""),[ce,pe]=(0,ae.useState)(),he=window.ENV==="build"?"/react/build":"",Ce=location.host.startsWith("localhost")?St.Z.PROXY_SERVER:St.Z.API_SERVER,Fe=10*(1024*1024),ge=(0,ae.useRef)();Pt!=null&&Pt.startsWith("/api")&&jt!=="txt"&&(Pt=St.Z.API_SERVER+Pt);const Se=Xt=>Xt.substring(Xt.lastIndexOf("/")+1).split(".").pop();Nt&&Gt&&(Gt.filename=Nt),(0,ae.useEffect)(()=>{var Xt,ne;const It=(ne=(Xt=document.cookie)==null?void 0:Xt.replace(/\s/g,""))==null?void 0:ne.split(";");It==null||It.map(Rt=>{let Vt=Rt.split("=");Vt[0]==="_educoder_session"&&be(Vt[1])})},[]),(0,ae.useEffect)(()=>{jt==="office"&&(Pt.indexOf("bigfilescdn.")>-1||Pt.indexOf("bigfiles1")>-1?pe({url:Pt,fileType:Se(Pt),model:Pt.indexOf("model=edit")?"edit":"view"}):Kt())},[jt,Pt]);function re(Xt){return lt(this,null,function*(){Xt.data.type==="pdfdata"&&(Dt(Xt.data.data),window.removeEventListener("message",re,!1)),console.log("mess---:",Xt.data)})}const Kt=()=>lt(void 0,null,function*(){console.log("data:",Pt);let Xt=Pt;Pt.startsWith("http")||(Xt=location.origin+Xt);let ne=new URL(Xt).pathname.split("/").pop();const It=yield(0,kt.gJ)({attachment_id:ne});It.url=Ce+It.url,pe(It)}),wt=()=>{if(Pt.startsWith("http")||Pt.startsWith("blob:")){Lt();return}(0,gt.Sv)(Nt||"educoder",Pt,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(Pt))};return mt.createElement("div",{style:it({},Jt||{}),className:`${oe&&Re.bgBlack} ${jt?Re.wrp:"hide"}`},Ut&&mt.createElement("div",{className:Re.close,ref:ge},!!fe&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ge.current},mt.createElement("span",{onClick:()=>{Ht(),fe()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!se&&mt.createElement(vt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ge.current},mt.createElement("span",{onClick:Lt},mt.createElement("i",{className:"icon-quxiaozhiding"}))),At&&mt.createElement(vt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ge.current},mt.createElement("span",{className:"",onClick:()=>{const Xt=document.getElementById("pdfiframe");window.addEventListener("message",re,!1),setTimeout(()=>{Xt.contentWindow.postMessage("getData","*")},300)}},mt.createElement("i",{className:"icon-baocun"}))),mt.createElement(vt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ge.current},mt.createElement("span",{className:"",onClick:()=>{Ht()}},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({},Gt)))),jt==="audio"&&mt.createElement("audio",{src:`${(Pt==null?void 0:Pt.indexOf("http://"))>-1||(Pt==null?void 0:Pt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pt}`,autoPlay:!0}),jt==="video"&&mt.createElement(mt.Fragment,null,(Pt==null?void 0:Pt.indexOf("http"))>-1?mt.createElement("video",{controls:!0,src:`${Pt}`,autoPlay:!0}):mt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pt}`,autoPlay:!0})),jt==="office"&&ce&&mt.createElement("iframe",{src:`${he}/office.html?key=${ce.key}&url=${btoa(ce.url)}&callbackUrl=${Ce+(ce.callbackUrl||"")}&fileType=${ce.fileType}&title=${ce.title||""}&model=${dt}&officeServer=${St.Z.ONLYOFFICE}&disabledDownload=${!!se}`}),jt==="html"&&mt.createElement("iframe",{src:Pt+"&disposition=inline"}),jt==="pdf"&&mt.createElement("iframe",{id:"pdfiframe",src:`${he}/js/pdfview/index.html?filename=${Nt||"educoder.pdf"}&url=${encodeURIComponent(Pt)}&disabledDownload=${!!se}&model=${dt}`}),jt==="image"&&mt.createElement("img",{src:`${(Pt==null?void 0:Pt.indexOf("http://"))>-1||(Pt==null?void 0:Pt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pt}`}),(jt==="other"||jt==="download")&&mt.createElement(mt.Fragment,null,Pe?mt.createElement(bt.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(_t.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},31457:function(fn,cn,le){"use strict";le.d(cn,{h:function(){return z},x:function(){return tt}});var ae=le(39793),Re=le(8423),ot=le(76902),_t=le(59301),Bt=Object.defineProperty,vt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,St=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={}))bt.call(it,lt)&&Tt(at,lt,it[lt]);if(kt)for(var lt of kt(it))St.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)bt.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&&St.call(at,ut)&&(lt[ut]=at[ut]);return lt};const z=at=>{var it=at,{value:lt,onChange:ut,scrollId:dt}=it,Pt=ft(it,["value","onChange","scrollId"]);return _t.createElement("div",{id:dt||""},_t.createElement(ae.Z,xt(mt({},Pt),{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:Pt,watch:At=!0})=>dt?_t.createElement(ae.Z,{watch:At,isFocus:!0,height:ut||void 0,placeholder:lt,defaultValue:at,onChange:it,miniToolbar:Pt}):_t.createElement("div",{style:{cursor:"pointer"}},at?_t.createElement(ot.Z,{className:Re.Z.inputBorder,value:at}):_t.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},lt))},76902:function(fn,cn,le){"use strict";le.d(cn,{z:function(){return Ft},Z:function(){return jt}});var ae=le(59301),Re=le(8944),ot=le(81428),_t=le(64018),Bt=le(79710),vt=le(346),gt=le(51257),kt=le(15342),bt=le(1012),St=le(45677),Tt=le(59301),xt=({html:Nt})=>{const Gt=(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=Gt.current.attachShadow({mode:"open"});Wt.current=document.createElement("div"),Wt.current.className="markdown-body",Wt.current.innerHTML=Nt,Ut.appendChild(Wt.current);const Ht=document.createElement("style");return Ht.textContent=Jt,Ut.appendChild(Ht),()=>{Ut.innerHTML=""}},[]),(0,ae.useEffect)(()=>{Wt.current&&(Wt.current.innerHTML=Nt)},[Nt]),Tt.createElement("div",{ref:Gt})};function ft(Nt){const Gt=["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(${Gt.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,Gt,Wt)=>Gt in Nt?z(Nt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Nt[Gt]=Wt,ut=(Nt,Gt)=>{for(var Wt in Gt||(Gt={}))at.call(Gt,Wt)&<(Nt,Wt,Gt[Wt]);if(tt)for(var Wt of tt(Gt))it.call(Gt,Wt)&<(Nt,Wt,Gt[Wt]);return Nt};const dt="@\u2581\u2581@",Pt="@\u2581@",At=/<pre[^>]*>/g;function Dt(Nt){let Gt=document.createElement("div");return Gt.innerHTML=Nt,Gt.childNodes.length===0?"":Gt.childNodes[0].nodeValue}const Ft=(Nt,Gt)=>{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,Ht=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Gt?Nt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Wt,(oe,se,fe,Pe,Yt,ee,ye)=>{const xe=se||Pe||ee,be=fe||Yt||ye||"?";return vt.Z.API_SERVER+"/api/attachments/"+xe+be+"&t="+(0,gt.Jn)(xe,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Nt=Nt.replace(Ht,(oe,se,fe,Pe,Yt,ee,ye)=>{const xe=se||Pe||ee,be=fe||Yt||ye||"?";return vt.Z.API_SERVER+"/attachments/download/"+xe+be+"&t="+(0,gt.Jn)(xe,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Wt,(oe,se,fe,Pe,Yt,ee,ye)=>{const xe=se||Pe||ee,be=fe||Yt||ye||"?";return vt.Z.API_SERVER+"/api/attachments/"+xe+be+"&t="+(0,gt.Jn)(xe,Date.now())+(oe.indexOf(")")>-1?")":"&")}).replace(Jt,(oe,se,fe,Pe,Yt)=>{const ee=se||Pe,ye=fe||Yt||"";return'"'+vt.Z.API_SERVER+"/api/attachments/"+ee+ye+ee+ye+"&t="+(0,gt.Jn)(ee,Date.now())}).replace(Ut,(oe,se,fe,Pe,Yt)=>{const ee=se||Pe,ye=fe||Yt||"";return"("+vt.Z.API_SERVER+"/files/uploads/"+ee+ye+ee+ye+"&t="+(0,gt.Jn)(ee,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:Gt,showTextOnly:Wt,showLines:Jt,style:Ut={},stylesPrev:Ht={},highlightKeywords:oe,showProgramFill:se,isProgramFill:fe,disabledFill:Pe=!1,programFillValue:Yt,onFillChange:ee=be=>{},onFillBlur:ye=()=>{},onFillFocus:xe=()=>{}})=>{let be=ft(String(Nt||""));const[ce,pe]=(0,ae.useState)(""),[he,Ce]=(0,ae.useState)("office"),[de,Fe]=(0,ae.useState)([]),ge=(0,ae.useRef)("a"+(0,bt.Z)()),Se={},re=Le=>/<style[\s\S]*?>/i.test(Le||""),Kt=(Le,Ne,Be)=>{const Xe=document.createElement(Le===Pt?"input":"textarea");Xe.style.width="100%",Xe.style.height=Le===Pt?"40px":"151px",Xe.rows=5,Xe.spellcheck=!1,Xe.name="edu-program-fill",Xe.placeholder="\u8BF7\u8F93\u5165",Xe.dataset.id=Ne;const Qe=Object.keys(Se).length;return Se[Qe]=Xe,`<span class="edu-program-fill-wrap ${Le===Pt?"":"show"}" style="width:${Le===Pt?"400px":"100%"}" title=${Be||""}><span>${Xe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function wt(Le){return Le=Le.replace(/!\[.*?\]\(.*?\)/g,""),Le=Le.replace(/\[.*?\]\(.*?\)/g,""),Le=Le.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Le=Le.replace(/<embed.*?>/g,""),Le=Le.replace(/<img.*?>/g,""),Le=Le.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Le=Le.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Le=Le.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Le=Le.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Le}const Lt=Le=>!Wt&&re(be)?Le:Le.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ne,Be){let Xe=Be.replace(/(\n|\r)/g,"").split("}"),Qe=[];return Xe.map(qe=>{qe!=""&&Qe.push(`.${ge.current} ${qe}`)}),`<style>${Qe.join("}")}</style>`}),Xt=(0,ae.useMemo)(()=>{try{const Xe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Qe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,qe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,He=/\(\/attachments\/download\//g;be=be.replace(He,"("+vt.Z.API_SERVER+"/attachments/download/").replace(Xe,"("+vt.Z.API_SERVER+"/api/attachments/").replace(Qe,'"'+vt.Z.API_SERVER+"/api/attachments/").replace(qe,'"'+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(Xe){}if(se){let Xe=-1;return be=be.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Qe,qe,He){var Ue;return++Xe,Kt(Qe,Xe,(Ue=Yt==null?void 0:Yt[Xe])==null?void 0:Ue.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Lt(be||"")}</pre>`}let Le=Lt(be);Le=(0,ot.ZP)(Le);const Ne=(0,ot.ez)();be.match(/\[TOC\]/)&&(Le=Le.replace("<p>[TOC]</p>",(0,ot.Qv)()),(0,ot.Iy)()),Le=Le.replace(/(__special_katext_id_\d+__)/g,(Xe,Qe)=>{const{type:qe,expression:He}=Ne[Qe];return(0,kt.renderToString)(Dt(He)||"",{displayMode:qe==="block",throwOnError:!1,output:"html"})}),Le=Le.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ot.AL)();const Be=document.createElement("div");if(Be.innerHTML=Le,Wt)return Be.innerText;if(oe){const Xe=oe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Vt(Be,Xe),Be.innerHTML}return setTimeout(()=>me(),500),Be.innerHTML},[be,oe]);(0,ae.useEffect)(()=>{$t.current&&$t.current.querySelectorAll(["input","textarea"]).forEach(Ne=>{Ne.oninput=ne,Ne.onblur=It,Ne.onfocus=Rt})},[de]),(0,ae.useEffect)(()=>{var Le,Ne,Be,Xe,Qe;if(Yt!=null&&Yt.length)try{const qe=$t.current.querySelectorAll(".edu-program-fill-score"),He=$t.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ue,We]of He.entries())We.value=((Le=Yt==null?void 0:Yt[Ue])==null?void 0:Le.value)||"",((Ne=Yt==null?void 0:Yt[Ue])==null?void 0:Ne.type)==="warning"?We.className="program-fill-warning":((Be=Yt==null?void 0:Yt[Ue])==null?void 0:Be.type)==="success"?We.className="program-fill-success":We.className="";for(const[Ue,We]of qe.entries())We.innerHTML=(Xe=Yt==null?void 0:Yt[Ue])!=null&&Xe.score?`${(Qe=Yt==null?void 0:Yt[Ue])==null?void 0:Qe.score}\u5206`:"";Fe(Yt)}catch(qe){console.log(qe,"error")}},[Yt]);const ne=Le=>{de[Le.target.dataset.id]=de[Le.target.dataset.id]||{},de[Le.target.dataset.id].value=Le.target.value,Fe([...de]),ee(de,Le.target.dataset.id)},It=Le=>{de[Le.target.dataset.id]=de[Le.target.dataset.id]||{},de[Le.target.dataset.id].value=Le.target.value,Fe([...de]),ye(de,Le.target.dataset.id)},Rt=Le=>{de[Le.target.dataset.id]=de[Le.target.dataset.id]||{},de[Le.target.dataset.id].value=Le.target.value,Fe([...de]),xe(de,Le.target.dataset.id)};function Vt(Le,Ne){return Le.childNodes.forEach(Be=>{var Xe;if(Be.childNodes.length>0)Vt(Be,Ne);else if(Be.nodeName!=="IMG")if(Be.innerHTML)Be.innerHTML=(Xe=Be.innerHTML)==null?void 0:Xe.replace(new RegExp(Ne,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Qe=document.createElement("span");Qe.innerHTML=Be.textContent.replace(new RegExp(Ne,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Be.replaceWith(Qe)}})}const $t=(0,ae.useRef)();ot.jb.WebkitLineClamp=Jt,Jt&&(Ut=ut(ut({},Ut),ot.jb));function ue(Le){let Ne=Le.target;if(Ne.tagName.toUpperCase()==="A"){let Be=Ne.getAttribute("href");if(Be.indexOf("office")>-1)Le.preventDefault(),pe(Be),Ce("office");else if(Be.indexOf("application/pdf")>-1)Le.preventDefault(),pe(Be),Ce("pdf");else if(Be.indexOf("text/html")>-1)Le.preventDefault(),pe(Be),Ce("html");else if(Be.startsWith("#")){Le.preventDefault();let Xe=document.getElementById(Be.replace("#",""));Xe&&Xe.scrollIntoView(!0)}}}const me=()=>{var Le;const Ne=(Le=$t.current)==null?void 0:Le.querySelectorAll("video");Ne==null||Ne.forEach(Be=>{if(Be.oncontextmenu=()=>!1,Be.src.indexOf(".m3u8")>-1&&!Be.canPlayType("application/vnd.apple.mpegurl")){if(Bt.ZP.isSupported()){var Xe=new Bt.ZP;Xe.loadSource(Be.src),Xe.attachMedia(Be)}}})};return(0,ae.useEffect)(()=>{if($t.current&&Xt&&Xt.match(At)&&window.PR.prettyPrint(),$t.current)return $t.current.addEventListener("click",ue),()=>{var Le;(Le=$t.current)==null||Le.removeEventListener("click",ue),(0,ot.AL)(),(0,ot.Iy)()}},[Xt,$t.current,ue]),(0,ae.useEffect)(()=>{var Le;const Ne=Be=>{Be.preventDefault(),Be.clipboardData.setData("text",window.getSelection().toString())};return(Le=$t.current)==null||Le.addEventListener("copy",Ne),()=>{var Be;(Be=$t.current)==null||Be.removeEventListener("copy",Ne)}},[$t.current]),ae.createElement(ae.Fragment,null,Wt&&ae.createElement("div",{ref:$t},Xt),!Wt&&!re(Xt)&&ae.createElement("div",{ref:$t,style:ut({},Ut),className:`${Gt||""} ${Pe?"disabled-fill":""} markdown-body ${ge.current}`,dangerouslySetInnerHTML:{__html:Xt}}),!Wt&&re(Xt)&&ae.createElement(xt,{html:Xt}),ae.createElement(St.Z,{close:!0,data:ce,type:ce!=null&&ce.length?he:"",style:ut({},Ht),onClose:()=>pe("")}))}},16253:function(fn,cn,le){"use strict";le.d(cn,{cT:function(){return jt},pe:function(){return At}});var ae=le(59301),Re=le(14566),ot=le(6767),_t=le(38986),Bt=le(28209),vt=le.n(Bt),gt=le(1012),kt=le(25690),bt=le(47257),St=le.n(bt),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(Gt,Wt,Jt)=>Wt in Gt?Tt(Gt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Gt[Wt]=Jt,it=(Gt,Wt)=>{for(var Jt in Wt||(Wt={}))z.call(Wt,Jt)&&at(Gt,Jt,Wt[Jt]);if(ft)for(var Jt of ft(Wt))tt.call(Wt,Jt)&&at(Gt,Jt,Wt[Jt]);return Gt},lt=(Gt,Wt)=>mt(Gt,xt(Wt)),ut=(Gt,Wt)=>{var Jt={};for(var Ut in Gt)z.call(Gt,Ut)&&Wt.indexOf(Ut)<0&&(Jt[Ut]=Gt[Ut]);if(Gt!=null&&ft)for(var Ut of ft(Gt))Wt.indexOf(Ut)<0&&tt.call(Gt,Ut)&&(Jt[Ut]=Gt[Ut]);return Jt},dt=(Gt,Wt,Jt)=>new Promise((Ut,Ht)=>{var oe=Pe=>{try{fe(Jt.next(Pe))}catch(Yt){Ht(Yt)}},se=Pe=>{try{fe(Jt.throw(Pe))}catch(Yt){Ht(Yt)}},fe=Pe=>Pe.done?Ut(Pe.value):Promise.resolve(Pe.value).then(oe,se);fe((Jt=Jt.apply(Gt,Wt)).next())});const{Dragger:Pt}=Re.default,At=Gt=>{const Wt="bf3c199c2470cb477d907b1e0917c17b",Jt="5183666c72eec9e4";var Ut=vt().enc.Utf8.parse(Wt);let Ht=vt().enc.Utf8.parse(Jt);var oe=vt().AES.decrypt(Gt,Ut,{iv:Ht,mode:vt().mode.CBC});return oe.toString(vt().enc.Utf8)};let Dt;const Ft=Gt=>dt(void 0,[Gt],function*({identifier:Wt,oldFilename:Jt,newFilename:Ut}){var Ht,oe,se,fe,Pe,Yt;const ee=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});ee.data=JSON.parse(At(ee.data));const ye=new OSS({endpoint:(Ht=ee==null?void 0:ee.data)==null?void 0:Ht.end_point,region:(oe=ee==null?void 0:ee.data)==null?void 0:oe.region,accessKeyId:(se=ee==null?void 0:ee.data)==null?void 0:se.access_key_id,accessKeySecret:(fe=ee==null?void 0:ee.data)==null?void 0:fe.access_key_secret,bucket:(Pe=ee==null?void 0:ee.data)==null?void 0:Pe.bucket,stsToken:(Yt=ee==null?void 0:ee.data)==null?void 0:Yt.security_token});return new Promise((xe,be)=>{console.log(11111,`${Wt}/${Jt}`,`${Wt}/${Ut}`,ee.data),ye.copy(`/${Wt}/${Jt}`,`/${Wt}/${Ut}`).then(ce=>{console.log("\u62F7\u8D1D\u6210\u529F",ce)}).catch(ce=>{console.log(ce)})})}),jt=(Gt,Wt,Jt)=>dt(void 0,null,function*(){var Ut,Ht,oe,se,fe,Pe;Wt.file_name=Gt.name;const Yt=yield(0,_t.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 ee=Gt.name.split(".");ee.pop();const ye=Wt.realFileName?ee.join(""):(0,gt.Z)(),xe=new(St())({endpoint:(Ut=Yt==null?void 0:Yt.data)==null?void 0:Ut.end_point,region:(Ht=Yt==null?void 0:Yt.data)==null?void 0:Ht.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:(fe=Yt==null?void 0:Yt.data)==null?void 0:fe.bucket,stsToken:(Pe=Yt==null?void 0:Yt.data)==null?void 0:Pe.security_token});return new Promise((be,ce)=>{var pe;xe.multipartUpload(`${ye}`,new Blob([Gt],{type:Gt.type}),lt(it({timeout:200*1e3,partSize:102400},Jt),{callback:{url:(pe=Yt==null?void 0:Yt.data)==null?void 0:pe.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,_t.rz)(Wt)}})).then(function(he){var Ce;Gt.response=(Ce=he.data)==null?void 0:Ce.data,be(he==null?void 0:he.data)}).catch(function(he){ce(he),console.log("err:",he)})})}),Nt=Gt=>{var Wt=Gt,{user:Jt,cancelUpload:Ut}=Wt,Ht=ut(Wt,["user","cancelUpload"]);const[oe,se]=(0,ae.useState)([]);let[fe,Pe]=(0,ae.useState)();const Yt={onRemove:ye=>{se([...oe.filter(xe=>xe.name!==ye.name)]),Ht.onChange(oe.filter(xe=>xe.name!==ye.name))},disabled:Ht.disabled,multiple:!0,fileList:oe==null?void 0:oe.map(ye=>ye.file),customRequest:()=>{},beforeUpload:ye=>dt(void 0,null,function*(){let xe=Ht.maxSize||1073741824;if(oe.filter(be=>be.name===ye.name).length){ot.ZP.info(`${ye.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(ye==null?void 0:ye.size)>xe?(ot.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${xe/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(oe.push({name:ye.name,file:ye}),se([...oe]),Ht.onChange(oe),!1)})},ee=(ye,xe)=>dt(void 0,null,function*(){var be,ce,pe,he,Ce,de;xe.file_name=ye.name;const Fe=ye.name,ge=yield(0,_t.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(ge.data=JSON.parse(At(ge.data)),(ge==null?void 0:ge.status)!==0){oe[oe.findIndex(Kt=>Kt.name===Fe)].status="error",oe[oe.findIndex(Kt=>Kt.name===Fe)].file.status="error",Ht.onChange(oe),ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}fe=new(St())({endpoint:(be=ge==null?void 0:ge.data)==null?void 0:be.end_point,region:(ce=ge==null?void 0:ge.data)==null?void 0:ce.region,accessKeyId:(pe=ge==null?void 0:ge.data)==null?void 0:pe.access_key_id,accessKeySecret:(he=ge==null?void 0:ge.data)==null?void 0:he.access_key_secret,bucket:(Ce=ge==null?void 0:ge.data)==null?void 0:Ce.bucket,stsToken:(de=ge==null?void 0:ge.data)==null?void 0:de.security_token}),console.log(ye,"file"),Pe(fe);const Se=ye.name.split(".");Se.pop();const re=Fe.indexOf(".")>-1?xe.realFileName?Se.join("."):(0,gt.Z)():Fe;return new Promise((Kt,wt)=>{var Lt;try{fe.multipartUpload(`${Ht.identifier}/${re}${Fe.indexOf(".")>-1?"."+Fe.split(".").pop():""}`,new Blob([ye.file],{type:ye.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xt,ne,It)=>{try{console.log("\u8FDB\u5EA6",Xt,ne,It);const Rt=oe.findIndex(Vt=>Vt.name===Fe);oe[Rt].file.percent=Xt*100,oe[Rt].tempCheckpoint=ne,se([...oe])}catch(Rt){}},checkpoint:oe[oe.findIndex(Xt=>Xt.name===Fe)].tempCheckpoint,callback:{customValue:{id:Fe+""},url:(Lt=ge==null?void 0:ge.data)==null?void 0:Lt.callback_url,host:ge==null?void 0:ge.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_t.rz)(xe)}}).then(function(Xt){var ne,It,Rt;const Vt=oe.findIndex(ue=>ue.name===Fe);let $t="done";if(((ne=Xt.data)==null?void 0:ne.status)===0){ye.response=(It=Xt.data)==null?void 0:It.data;const ue=oe.findIndex(me=>me.name===Fe);oe[ue].status="done",oe[ue].file.status="done"}else ot.ZP.warning((Rt=Xt.data)==null?void 0:Rt.message),$t="error";oe[Vt].status=$t,oe[Vt].file.status=$t,Ht.onChange(oe),Kt(Xt==null?void 0:Xt.data)}).catch(function(Xt){oe[oe.findIndex(ne=>ne.name===Fe)].status="error",oe[oe.findIndex(ne=>ne.name===Fe)].file.status="error",ot.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),se([...oe]),Ht.onChange(oe),wt(Xt),console.log("err:",Xt)})}catch(Xt){}})});return(0,ae.useEffect)(()=>{oe.every(ye=>ye==="done"||ye==="error")&&Ht.onComplete(oe)},[oe]),(0,ae.useEffect)(()=>{Ut&&(fe==null||fe.cancel())},[Ut]),(0,ae.useEffect)(()=>{Ht.uploading&&oe.map(ye=>dt(void 0,null,function*(){var xe;if((!ye.status||ye.status==="error")&&!Ut){ye.status="uploading",ye.file.status="uploading";const be=yield ee(ye,{login:(xe=Jt==null?void 0:Jt.userInfo)==null?void 0:xe.login,container_type:Ht.container_type,container_id:Ht.container_id,description:Ht.description,realFileName:Ht.realFileName})}}))},[Ht.uploading]),ae.createElement(Pt,lt(it({},Yt),{height:Ht.height,className:Ht.className}),ae.createElement("p",{className:"ant-upload-hint"},Ht.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};cn.ZP=(0,kt.connect)(({loading:Gt,globalSetting:Wt,user:Jt})=>({globalSetting:Wt,loading:Gt.models.competitions,user:Jt}))(Nt)},69720:function(fn,cn,le){"use strict";le.d(cn,{h:function(){return dt}});var ae=le(59301),Re=le(82326),ot=le(28284),_t=le(99571),Bt=le(89780),vt=le.n(Bt),gt=le(8336),kt=le(12469),bt=Object.defineProperty,St=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,z=(Pt,At,Dt)=>At in Pt?bt(Pt,At,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Pt[At]=Dt,tt=(Pt,At)=>{for(var Dt in At||(At={}))xt.call(At,Dt)&&z(Pt,Dt,At[Dt]);if(mt)for(var Dt of mt(At))ft.call(At,Dt)&&z(Pt,Dt,At[Dt]);return Pt},at=(Pt,At)=>St(Pt,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"]};cn.Z=({callback:Pt,onCancel:At})=>{const[Dt,Ft]=(0,ae.useState)("python");function jt(Gt){Ft(ut[Gt][1])}function Nt(Gt){Pt(Gt)}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:Gt=>Gt.parentNode,onChange:jt},Object.keys(ut).map(Gt=>ae.createElement(it,{key:Gt,value:Gt},ut[Gt][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(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(_t.ZP,{type:"ghost",onClick:At},"\u53D6\u6D88")))};function dt({value:Pt,onChange:At,mode:Dt,options:Ft={}}){const jt=(0,ae.useRef)(),[Nt,Gt]=(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&&(Pt!==Nt.getValue()||Pt==="")&&setTimeout(()=>{Nt.setValue(Pt||"")},300)},[Nt,Pt]),(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));Gt(Wt)}},[jt.current,Nt]),ae.createElement("div",{className:"my-codemirror-container"},ae.createElement("textarea",{ref:jt}))}},39793:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Rr}});var ae=le(59301),Re=le(89780),ot=le.n(Re),_t=le(76374),Bt=le(8336),vt=le(6313),gt=le(25717),kt=le(99498),bt=le(25419),St=le(67549),Tt=le(76902),mt=({value:Ye="",className:tn,showTextOnly:Ze,showLines:zn,style:Qn={}})=>{const Jn=(0,ae.useMemo)(()=>"",[Ye]);return ae.createElement(ae.Fragment,null,ae.createElement("div",{dangerouslySetInnerHTML:{__html:Jn}}))},xt=le(59301),ft=Object.defineProperty,z=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ut=(Ye,tn,Ze)=>tn in Ye?ft(Ye,tn,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ye[tn]=Ze,dt=(Ye,tn)=>{for(var Ze in tn||(tn={}))it.call(tn,Ze)&&ut(Ye,Ze,tn[Ze]);if(at)for(var Ze of at(tn))lt.call(tn,Ze)&&ut(Ye,Ze,tn[Ze]);return Ye},Pt=(Ye,tn)=>z(Ye,tt(tn));let At=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Dt({onActionCallback:Ye,title:tn,icon:Ze,actionName:zn,className:Qn="",children:Jn}){function bn(){Ye(zn)}return xt.createElement("a",{title:tn,className:Qn,onClick:bn},xt.createElement("i",{className:`${Ze}`}),Jn)}var Ft=({watch:Ye,showNullButton:tn,showNullProgramButton:Ze,onActionCallback:zn,fullScreen:Qn,insertTemp:Jn,hidetoolBar:bn,extraUse:Fn})=>{const cr=[...At,{title:`${Ye?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ye?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return xt.createElement("ul",{className:"markdown-toolbar-container"},!bn&&cr.map((wr,Or)=>xt.createElement("li",{key:Or},wr.actionName?xt.createElement(Dt,Pt(dt({},wr),{onActionCallback:zn})):xt.createElement("span",{className:"v-line"}))),tn?xt.createElement("li",null,xt.createElement(Dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:zn},xt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ze?xt.createElement(xt.Fragment,null,xt.createElement("li",null,xt.createElement(Dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:zn},xt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),xt.createElement("li",null,xt.createElement(Dt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:zn},xt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Jn&&xt.createElement("li",null,xt.createElement(Dt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Jn}`,onActionCallback:zn},xt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Fn&&xt.createElement("li",null,Fn),xt.createElement("li",{className:"btn-full-screen"},xt.createElement(Dt,{icon:`${Qn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Qn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:zn})))},jt=le(91558),Nt=le(28284),Gt=le(37568),Wt=le(99571),Jt=Object.defineProperty,Ut=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,Pe=(Ye,tn,Ze)=>tn in Ye?Jt(Ye,tn,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):Ye[tn]=Ze,Yt=(Ye,tn)=>{for(var Ze in tn||(tn={}))se.call(tn,Ze)&&Pe(Ye,Ze,tn[Ze]);if(oe)for(var Ze of oe(tn))fe.call(tn,Ze)&&Pe(Ye,Ze,tn[Ze]);return Ye},ee=(Ye,tn)=>Ut(Ye,Ht(tn));const ye={labelCol:{span:4},wrapperCol:{span:20}};var xe=({callback:Ye,onCancel:tn})=>{function Ze(zn){Ye(zn)}return ae.createElement(Nt.default,ee(Yt({},ye),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ze,style:{width:500}}),ae.createElement(Nt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ae.createElement(Gt.default,null)),ae.createElement(Nt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ae.createElement(Gt.default,null)),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Wt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Wt.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},be=le(69720),ce=le(17077),pe=le(62957),he=le(77019),Ce=le(9507),de=le(59301),Fe=({callback:Ye,onCancel:tn})=>{const Ze=document.createElement("canvas"),zn=Ze.getContext("2d");Ze.width=1e3,Ze.height=800,zn.fillStyle="#ffffff",zn.fillRect(0,0,Ze.width,Ze.height);const Qn=Ze.toDataURL("image/png");return de.createElement(pe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},de.createElement(he.Z,{style:{height:"100vh"}},de.createElement(Ce.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Qn,visible:!0,title:String(Date.now())},onOk:Jn=>{Ye({src:Jn.url})},onClose:tn})))},ge=le(12378);function Se(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Se,go.CommandHandler),Se.prototype.canAlignSelection=function(){var Ye=this.diagram;return!(Ye===null||Ye.isReadOnly||Ye.isModelReadOnly||Ye.selection.count<2)},Se.prototype.alignLeft=function(){var Ye=this.diagram;Ye.startTransaction("aligning left");var tn=1/0;Ye.selection.each(function(Ze){Ze instanceof go.Link||(tn=Math.min(Ze.position.x,tn))}),Ye.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(tn,Ze.position.y))}),Ye.commitTransaction("aligning left")},Se.prototype.alignRight=function(){var Ye=this.diagram;Ye.startTransaction("aligning right");var tn=-1/0;Ye.selection.each(function(Ze){if(!(Ze instanceof go.Link)){var zn=Ze.actualBounds.x+Ze.actualBounds.width;tn=Math.max(zn,tn)}}),Ye.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(tn-Ze.actualBounds.width,Ze.position.y))}),Ye.commitTransaction("aligning right")},Se.prototype.alignTop=function(){var Ye=this.diagram;Ye.startTransaction("alignTop");var tn=1/0;Ye.selection.each(function(Ze){Ze instanceof go.Link||(tn=Math.min(Ze.position.y,tn))}),Ye.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(Ze.position.x,tn))}),Ye.commitTransaction("alignTop")},Se.prototype.alignBottom=function(){var Ye=this.diagram;Ye.startTransaction("aligning bottom");var tn=-1/0;Ye.selection.each(function(Ze){if(!(Ze instanceof go.Link)){var zn=Ze.actualBounds.y+Ze.actualBounds.height;tn=Math.max(zn,tn)}}),Ye.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(Ze.actualBounds.x,tn-Ze.actualBounds.height))}),Ye.commitTransaction("aligning bottom")},Se.prototype.alignCenterX=function(){var Ye=this.diagram,tn=Ye.selection.first();if(tn){Ye.startTransaction("aligning Center X");var Ze=tn.actualBounds.x+tn.actualBounds.width/2;Ye.selection.each(function(zn){zn instanceof go.Link||zn.move(new go.Point(Ze-zn.actualBounds.width/2,zn.actualBounds.y))}),Ye.commitTransaction("aligning Center X")}},Se.prototype.alignCenterY=function(){var Ye=this.diagram,tn=Ye.selection.first();if(tn){Ye.startTransaction("aligning Center Y");var Ze=tn.actualBounds.y+tn.actualBounds.height/2;Ye.selection.each(function(zn){zn instanceof go.Link||zn.move(new go.Point(zn.actualBounds.x,Ze-zn.actualBounds.height/2))}),Ye.commitTransaction("aligning Center Y")}},Se.prototype.alignColumn=function(Ye){var tn=this.diagram;tn.startTransaction("align Column"),Ye===void 0&&(Ye=0),Ye=parseFloat(Ye);var Ze=new Array;tn.selection.each(function(Fn){Fn instanceof go.Link||Ze.push(Fn)});for(var zn=0;zn<Ze.length-1;zn++){var Qn=Ze[zn],Jn=Qn.actualBounds.y+Qn.actualBounds.height+Ye,bn=Ze[zn+1];bn.move(new go.Point(Qn.actualBounds.x,Jn))}tn.commitTransaction("align Column")},Se.prototype.alignRow=function(Ye){Ye===void 0&&(Ye=0),Ye=parseFloat(Ye);var tn=this.diagram;tn.startTransaction("align Row");var Ze=new Array;tn.selection.each(function(Fn){Fn instanceof go.Link||Ze.push(Fn)});for(var zn=0;zn<Ze.length-1;zn++){var Qn=Ze[zn],Jn=Qn.actualBounds.x+Qn.actualBounds.width+Ye,bn=Ze[zn+1];bn.move(new go.Point(Jn,Qn.actualBounds.y))}tn.commitTransaction("align Row")},Se.prototype.canRotate=function(Ye){var tn=this.diagram;return!(tn===null||tn.isReadOnly||tn.isModelReadOnly||tn.selection.count<1)},Se.prototype.rotate=function(Ye){Ye===void 0&&(Ye=90);var tn=this.diagram;tn.startTransaction("rotate "+Ye.toString());var tn=this.diagram;tn.selection.each(function(Ze){Ze instanceof go.Link||Ze instanceof go.Group||(Ze.angle+=Ye)}),tn.commitTransaction("rotate "+Ye.toString())},Se.prototype.pullToFront=function(){var Ye=this.diagram;Ye.startTransaction("pullToFront");var tn=new go.Map;Ye.selection.each(function(Ze){tn.set(Ze.layer,0)}),tn.iteratorKeys.each(function(Ze){var zn=0;Ze.parts.each(function(Qn){if(!Qn.isSelected){var Jn=Qn.zOrder;isNaN(Jn)?Qn.zOrder=0:zn=Math.max(zn,Jn)}}),tn.set(Ze,zn)}),Ye.selection.each(function(Ze){Se._assignZOrder(Ze,tn.get(Ze.layer)+1)}),Ye.commitTransaction("pullToFront")},Se.prototype.pushToBack=function(){var Ye=this.diagram;Ye.startTransaction("pushToBack");var tn=new go.Map;Ye.selection.each(function(Ze){tn.set(Ze.layer,0)}),tn.iteratorKeys.each(function(Ze){var zn=0;Ze.parts.each(function(Qn){if(!Qn.isSelected){var Jn=Qn.zOrder;isNaN(Jn)?Qn.zOrder=0:zn=Math.min(zn,Jn)}}),tn.set(Ze,zn)}),Ye.selection.each(function(Ze){Se._assignZOrder(Ze,tn.get(Ze.layer)-1-Se._findGroupDepth(Ze))}),Ye.commitTransaction("pushToBack")},Se._assignZOrder=function(Ye,tn,Ze){Ze===void 0&&(Ze=Ye),Ye.layer===Ze.layer&&(Ye.zOrder=tn),Ye instanceof go.Group&&Ye.memberParts.each(function(zn){Se._assignZOrder(zn,tn+1,Ze)})},Se._findGroupDepth=function(Ye){if(Ye instanceof go.Group){var tn=0;return Ye.memberParts.each(function(Ze){tn=Math.max(tn,Se._findGroupDepth(Ze))}),tn+1}else return 0},Se.prototype.doKeyDown=function(){var Ye=this.diagram;if(Ye!==null){var tn=Ye.lastInput;if(tn.key==="Up"||tn.key==="Down"||tn.key==="Left"||tn.key==="Right"){var Ze=this.arrowKeyBehavior;if(Ze==="none")return;if(Ze==="select"){this._arrowKeySelect();return}else if(Ze==="move"){this._arrowKeyMove();return}else if(Ze==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Se.prototype._getAllParts=function(){var Ye=new Array;return this.diagram.nodes.each(function(tn){Ye.push(tn)}),this.diagram.parts.each(function(tn){Ye.push(tn)}),Ye},Se.prototype._arrowKeyMove=function(){var Ye=this.diagram,tn=Ye.lastInput,Ze=0,zn=0;if(tn.control||tn.meta)Ze=1,zn=1;else if(Ye.grid!==null){var Qn=Ye.grid.gridCellSize;zn=Qn.width,Ze=Qn.height}Ye.startTransaction("arrowKeyMove"),Ye.selection.each(function(Jn){tn.key==="Up"?Jn.move(new go.Point(Jn.actualBounds.x,Jn.actualBounds.y-Ze)):tn.key==="Down"?Jn.move(new go.Point(Jn.actualBounds.x,Jn.actualBounds.y+Ze)):tn.key==="Left"?Jn.move(new go.Point(Jn.actualBounds.x-zn,Jn.actualBounds.y)):tn.key==="Right"&&Jn.move(new go.Point(Jn.actualBounds.x+zn,Jn.actualBounds.y))}),Ye.commitTransaction("arrowKeyMove")},Se.prototype._arrowKeySelect=function(){var Ye=this.diagram,tn=Ye.lastInput,Ze=null;tn.key==="Up"?Ze=this._findNearestPartTowards(270):tn.key==="Down"?Ze=this._findNearestPartTowards(90):tn.key==="Left"?Ze=this._findNearestPartTowards(180):tn.key==="Right"&&(Ze=this._findNearestPartTowards(0)),Ze!==null&&(tn.shift?Ze.isSelected=!0:tn.control||tn.meta?Ze.isSelected=!Ze.isSelected:Ye.select(Ze))},Se.prototype._findNearestPartTowards=function(Ye){var tn=this.diagram.selection.first();if(tn===null)return null;for(var Ze=tn.actualBounds.center,zn=this._getAllParts(),Qn=1/0,Jn=tn,bn=0;bn<zn.length;bn++){var Fn=zn[bn];if(Fn!==tn&&Fn.canSelect()){var cr=Fn.actualBounds.center,wr=Ze.directionPoint(cr),Or=this._angleCloseness(wr,Ye);if(Or<=45){var Ae=Ze.distanceSquaredPoint(cr);Ae*=1+Math.sin(Or*Math.PI/180),Ae<Qn&&(Qn=Ae,Jn=Fn)}}}return Jn},Se.prototype._angleCloseness=function(Ye,tn){return Math.min(Math.abs(tn-Ye),Math.min(Math.abs(tn+360-Ye),Math.abs(tn-360-Ye)))},Se.prototype._arrowKeyTree=function(){var Ye=this.diagram,tn=Ye.selection.first();if(tn instanceof go.Node){var Ze=Ye.lastInput;if(Ze.key==="Right"){if(!tn.isTreeLeaf)if(!tn.isTreeExpanded)Ye.commandHandler.canExpandTree(tn)&&Ye.commandHandler.expandTree(tn);else{var zn=this._sortTreeChildrenByY(tn).first();zn!==null&&Ye.select(zn)}}else if(Ze.key==="Left")if(!tn.isTreeLeaf&&tn.isTreeExpanded)Ye.commandHandler.canCollapseTree(tn)&&Ye.commandHandler.collapseTree(tn);else{var Qn=tn.findTreeParentNode();Qn!==null&&Ye.select(Qn)}else if(Ze.key==="Up"){var Qn=tn.findTreeParentNode();if(Qn!==null){var Jn=this._sortTreeChildrenByY(Qn),bn=Jn.indexOf(tn);if(bn>0){for(var Fn=Jn.elt(bn-1);Fn!==null&&Fn.isTreeExpanded&&!Fn.isTreeLeaf;){var cr=this._sortTreeChildrenByY(Fn);Fn=cr.last()}Fn!==null&&Ye.select(Fn)}else Ye.select(Qn)}}else if(Ze.key==="Down")if(tn.isTreeExpanded&&!tn.isTreeLeaf){var zn=this._sortTreeChildrenByY(tn).first();zn!==null&&Ye.select(zn)}else for(;tn!==null;){var Qn=tn.findTreeParentNode();if(Qn===null)break;var Jn=this._sortTreeChildrenByY(Qn),bn=Jn.indexOf(tn);if(bn<Jn.length-1){Ye.select(Jn.elt(bn+1));break}else tn=Qn}var wr=Ye.selection.first();wr!==null&&Ye.scrollToRect(wr.actualBounds)}},Se.prototype._sortTreeChildrenByY=function(Ye){var tn=new go.List().addAll(Ye.findTreeChildrenNodes());return tn.sort(function(Ze,zn){var Qn=Ze.location,Jn=zn.location;return Qn.y<Jn.y?-1:Qn.y>Jn.y?1:Qn.x<Jn.x?-1:Qn.x>Jn.x?1:0}),tn},Se.prototype.copyToClipboard=function(Ye){go.CommandHandler.prototype.copyToClipboard.call(this,Ye),this._lastPasteOffset.set(this.pasteOffset)},Se.prototype.pasteFromClipboard=function(){var Ye=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ye,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ye},Object.defineProperty(Se.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ye){if(Ye!=="move"&&Ye!=="select"&&Ye!=="scroll"&&Ye!=="tree"&&Ye!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ye);this._arrowKeyBehavior=Ye}}),Object.defineProperty(Se.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ye){if(!(Ye instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ye);this._pasteOffset.set(Ye)}});var re=Se,Kt=le(63720),wt=le(5269),Lt=le(38986),Xt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ne=le(48790),It=le(59301),Rt=(Ye,tn,Ze)=>new Promise((zn,Qn)=>{var Jn=cr=>{try{Fn(Ze.next(cr))}catch(wr){Qn(wr)}},bn=cr=>{try{Fn(Ze.throw(cr))}catch(wr){Qn(wr)}},Fn=cr=>cr.done?zn(cr.value):Promise.resolve(cr.value).then(Jn,bn);Fn((Ze=Ze.apply(Ye,tn)).next())});function Vt({onCancel:Ye,callback:tn}){let Ze=(0,ae.useRef)(),zn=(0,ae.useRef)(),Qn=(0,ae.useRef)(),Jn=(0,ae.useRef)(!1);const bn=(0,ae.useRef)(!1),[Fn,cr]=(0,ae.useState)(0);function wr(){const Ae=ge.bx.make,Ve={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"};Ze.current=new ge.S0(zn.current,{padding:20,grid:Ae(ge.s_,"Grid",Ae(ge.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ae(ge.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:On=>{var rr=On.diagram.commandHandler.addTopLevelParts(On.diagram.selection,!0);rr||On.diagram.currentTool.doCancel()},commandHandler:Ae(re),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:On=>{var rr=On.subject;rr.location=rr.location.copy().snapToGridPoint(On.diagram.grid.gridOrigin,On.diagram.grid.gridCellSize),setTimeout(()=>{On.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:On=>{var rr=On.subject;setTimeout(()=>{On.diagram.commandHandler.editTextBlock()})},LinkRelinked:On=>{var rr=On.parameter.part;rr.invalidateConnectedLinks();var er=On.subject;On.diagram.toolManager.linkingTool.isForwards?er.toNode.invalidateConnectedLinks():er.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ze.current.nodeTemplate=Ae(ge.NB,"Auto",{locationSpot:ge.z6.Center,locationObjectName:"SHAPE",desiredSize:new ge.$u(120,60),minSize:new ge.$u(40,40),resizable:!0,resizeCellSize:new ge.$u(10,10),rotatable:!0},new ge.KX("location","loc",ge.E9.parse).makeTwoWay(ge.E9.stringify),new ge.KX("desiredSize","size",ge.$u.parse).makeTwoWay(ge.$u.stringify),Ae(ge.bn,{name:"SHAPE",fill:Ve.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ge.z6.AllSides,toSpot:ge.z6.AllSides},new ge.KX("figure"),new ge.KX("fill"),new ge.KX("stroke","borderColor"),new ge.KX("strokeWidth","thickness"),new ge.KX("strokeDashArray","dash")),Ae(ge.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Ae(ge.al,{margin:1,textAlign:"center",overflow:ge.al.OverflowEllipsis,editable:!0},new ge.KX("text").makeTwoWay(),new ge.KX("stroke","color"))),Ze.current.nodeTemplate.toolTip=Ae("ToolTip",Ae(ge.s_,"Vertical",{maxSize:new ge.$u(200,NaN)},Ae(ge.al,{font:"bold 10pt sans-serif",textAlign:"center"},new ge.KX("text")),Ae(ge.al,{font:"10pt sans-serif",textAlign:"center"},new ge.KX("text","details"))));function Mn(On,rr){var er=(hr,Dr)=>{hr.handled=!0,hr.diagram.model.commit(Gr=>{var Jr=Dr.part.adornedPart,$r=new ge.E9().setRectSpot(Jr.actualBounds,On);$r.subtract(Jr.location),$r.scale(2,2),$r.x+=Math.sign($r.x)*130,$r.y+=Math.sign($r.y)*130,$r.add(Jr.location),$r.snapToGridPoint(hr.diagram.grid.gridOrigin,hr.diagram.grid.gridCellSize);var ii=Gr.copyNodeData(Jr.data);Gr.setGroupKeyForNodeData(ii,Gr.getGroupKeyForNodeData(Jr.data)),Gr.addNodeData(ii);var yn={from:Jr.key,to:Gr.getKeyForNodeData(ii)};Gr.addLinkData(yn);var di=hr.diagram.findNodeForData(ii);di.location=$r,hr.diagram.select(di),setTimeout(()=>{hr.diagram.commandHandler.editTextBlock()},20)})};return Ae(ge.bn,{figure:rr,alignment:On,alignmentFocus:On.opposite(),width:On.equals(ge.z6.Top)||On.equals(ge.z6.Bottom)?25:18,height:On.equals(ge.z6.Top)||On.equals(ge.z6.Bottom)?18:25,fill:"orange",stroke:Ve.white,strokeWidth:4,mouseEnter:(hr,Dr)=>Dr.fill="dodgerblue",mouseLeave:(hr,Dr)=>Dr.fill="orange",isActionable:!0,click:er,contextClick:er})}function jn(On){return Ae(ge.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(rr,er)=>er.fill="dodgerblue",mouseLeave:(rr,er)=>er.fill="orange",click:(rr,er)=>{rr.diagram.commandHandler.showContextMenu(er.part.adornedPart)}},On||{})}Ze.current.nodeTemplate.selectionAdornmentTemplate=Ae(ge.uz,"Spot",Ae(ge.Vm,{padding:10}),Mn(ge.z6.Top,"TriangleUp"),Mn(ge.z6.Left,"TriangleLeft"),Mn(ge.z6.Right,"TriangleRight"),Mn(ge.z6.Bottom,"TriangleDown"),jn({alignment:new ge.z6(.75,0)}));function en(On,rr){return(er,hr)=>{er.handled=!0,er.diagram.model.commit(Dr=>{Dr.set(hr.part.adornedPart.data,On,rr)})}}function kn(On,rr){return rr||(rr="color"),Ae(ge.bn,{width:16,height:16,stroke:"lightgray",fill:On,margin:1,background:"transparent",mouseEnter:(er,hr)=>hr.stroke="dodgerblue",mouseLeave:(er,hr)=>hr.stroke="lightgray",click:en(rr,On),contextClick:en(rr,On)})}function Pn(){return[Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",kn(Ve.white,"fill"),kn(Ve.beige,"fill"),kn(Ve.extralightblue,"fill"),kn(Ve.extralightred,"fill"))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",kn(Ve.lightgray,"fill"),kn(Ve.lightgreen,"fill"),kn(Ve.lightblue,"fill"),kn(Ve.lightred,"fill")))]}function Ln(){return[Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",kn(Ve.black),kn(Ve.green),kn(Ve.blue),kn(Ve.red))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",kn(Ve.white),kn(Ve.magenta),kn(Ve.purple),kn(Ve.orange)))]}function $n(On,rr){return rr||(rr="thickness"),Ae(ge.bn,"LineH",{width:16,height:16,strokeWidth:On,margin:1,background:"transparent",mouseEnter:(er,hr)=>hr.background="dodgerblue",mouseLeave:(er,hr)=>hr.background="transparent",click:en(rr,On),contextClick:en(rr,On)})}function Nn(On,rr){return rr||(rr="dash"),Ae(ge.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:On,margin:1,background:"transparent",mouseEnter:(er,hr)=>hr.background="dodgerblue",mouseLeave:(er,hr)=>hr.background="transparent",click:en(rr,On),contextClick:en(rr,On)})}function Rn(){return[Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",$n(1),$n(2),$n(3),$n(4))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",Nn(null),Nn([2,4]),Nn([4,4])))]}function Bn(On,rr){return rr||(rr="figure"),Ae(ge.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:On,margin:1,background:"transparent",mouseEnter:(er,hr)=>hr.fill="dodgerblue",mouseLeave:(er,hr)=>hr.fill="lightgray",click:en(rr,On),contextClick:en(rr,On)})}Ze.current.nodeTemplate.contextMenu=Ae("ContextMenu",Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",Bn("Rectangle"),Bn("RoundedRectangle"),Bn("Ellipse"),Bn("Diamond"))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",Bn("Parallelogram2"),Bn("ManualOperation"),Bn("Procedure"),Bn("Cylinder1"))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",Bn("Terminator"),Bn("CreateRequest"),Bn("Document"),Bn("TriangleDown"))),Pn(),Ln(),Rn()),Ze.current.groupTemplate=Ae(ge.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:ge.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(On,rr)=>{var er=rr.addMembers(rr.diagram.selection,!0);er||rr.diagram.currentTool.doCancel()},avoidable:!1},new ge.KX("location","loc",ge.E9.parse).makeTwoWay(ge.E9.stringify),Ae(ge.s_,"Auto",{name:"BODY"},Ae(ge.bn,{parameter1:10,fill:Ve.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:ge.z6.AllSides,toSpot:ge.z6.AllSides},new ge.KX("fill"),new ge.KX("stroke","color"),new ge.KX("strokeWidth","thickness"),new ge.KX("strokeDashArray","dash")),Ae(ge.Vm,{background:"transparent",margin:20})),Ae(ge.al,{alignment:ge.z6.Top,alignmentFocus:ge.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new ge.KX("text"),new ge.KX("stroke","color"))),Ze.current.groupTemplate.selectionAdornmentTemplate=Ae(ge.uz,"Spot",Ae(ge.s_,"Auto",Ae(ge.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Ae(ge.Vm,{margin:1.5})),jn({alignment:ge.z6.TopRight,alignmentFocus:ge.z6.BottomRight})),Ze.current.groupTemplate.contextMenu=Ae("ContextMenu",Pn(),Ln(),Rn()),Ze.current.linkTemplate=Ae(ge.rU,{layerName:"Foreground",routing:ge.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new ge.KX("fromSpot","fromSpot",ge.z6.parse),new ge.KX("toSpot","toSpot",ge.z6.parse),new ge.KX("fromShortLength","dir",On=>On>=1?10:0),new ge.KX("toShortLength","dir",On=>On>=1?10:0),new ge.KX("points").makeTwoWay(),Ae(ge.bn,{strokeWidth:2},new ge.KX("stroke","color"),new ge.KX("strokeWidth","thickness"),new ge.KX("strokeDashArray","dash")),Ae(ge.bn,{segmentIndex:0,segmentOffset:new ge.E9(15,0),segmentOrientation:ge.rU.OrientAlong,alignmentFocus:ge.z6.Right,figure:"circle",width:10,strokeWidth:0},new ge.KX("fill","color"),new ge.KX("visible","dir",On=>On===1)),Ae(ge.bn,{segmentIndex:-1,segmentOffset:new ge.E9(-10,6),segmentOrientation:ge.rU.OrientPlus90,alignmentFocus:ge.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ge.KX("fill","color"),new ge.KX("visible","dir",On=>On>=1),new ge.KX("width","thickness",On=>7+3*On),new ge.KX("height","thickness",On=>7+3*On),new ge.KX("segmentOffset","thickness",On=>new ge.E9(-15,4+1.5*On))),Ae(ge.bn,{segmentIndex:0,segmentOffset:new ge.E9(15,-6),segmentOrientation:ge.rU.OrientMinus90,alignmentFocus:ge.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new ge.KX("fill","color"),new ge.KX("visible","dir",On=>On===2),new ge.KX("width","thickness",On=>7+3*On),new ge.KX("height","thickness",On=>7+3*On),new ge.KX("segmentOffset","thickness",On=>new ge.E9(-15,4+1.5*On))),Ae(ge.al,{alignmentFocus:new ge.z6(0,1,-4,0),editable:!0},new ge.KX("text").makeTwoWay(),new ge.KX("stroke","color"))),Ze.current.linkTemplate.selectionAdornmentTemplate=Ae(ge.uz,Ae(ge.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:gr(2)},new ge.KX("pathPattern","thickness",gr)),jn({alignmentFocus:new ge.z6(0,0,-6,-4)}));function gr(On){return Ae(ge.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(On+4).toString()+" H3"})}function ar(On){var rr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return On===0?rr="M0 0 M16 16 M0 8 L16 8":On===2&&(rr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Ae(ge.bn,{geometryString:rr,margin:2,background:"transparent",mouseEnter:(er,hr)=>hr.background="dodgerblue",mouseLeave:(er,hr)=>hr.background="transparent",click:en("dir",On),contextClick:en("dir",On)})}function lr(On){var rr=(er,hr)=>{er.handled=!0,er.diagram.model.commit(Dr=>{var Gr=hr.part.adornedPart;Dr.set(Gr.data,On?"toSpot":"fromSpot",ge.z6.stringify(ge.z6.AllSides)),(On?Gr.toNode:Gr.fromNode).invalidateConnectedLinks()})};return Ae(ge.bn,{width:12,height:12,fill:"transparent",mouseEnter:(er,hr)=>hr.background="dodgerblue",mouseLeave:(er,hr)=>hr.background="transparent",click:rr,contextClick:rr})}function sn(On,rr){var er=0,hr=ge.z6.RightSide;On.equals(ge.z6.Top)?(er=270,hr=ge.z6.TopSide):On.equals(ge.z6.Left)?(er=180,hr=ge.z6.LeftSide):On.equals(ge.z6.Bottom)&&(er=90,hr=ge.z6.BottomSide),rr||(er-=180);var Dr=(Gr,Jr)=>{Gr.handled=!0,Gr.diagram.model.commit($r=>{var ii=Jr.part.adornedPart;$r.set(ii.data,rr?"toSpot":"fromSpot",ge.z6.stringify(hr)),(rr?ii.toNode:ii.fromNode).invalidateConnectedLinks()})};return Ae(ge.bn,{alignment:On,alignmentFocus:On.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:er,background:"transparent",mouseEnter:(Gr,Jr)=>Jr.background="dodgerblue",mouseLeave:(Gr,Jr)=>Jr.background="transparent",click:Dr,contextClick:Dr})}Ze.current.linkTemplate.contextMenu=Ae("ContextMenu",Ln(),Rn(),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",ar(0),ar(1),ar(2))),Ae("ContextMenuButton",Ae(ge.s_,"Horizontal",Ae(ge.s_,"Spot",lr(!1),sn(ge.z6.Top,!1),sn(ge.z6.Left,!1),sn(ge.z6.Right,!1),sn(ge.z6.Bottom,!1)),Ae(ge.s_,"Spot",{margin:new ge.Zt(0,0,0,2)},lr(!0),sn(ge.z6.Top,!0),sn(ge.z6.Left,!0),sn(ge.z6.Right,!0),sn(ge.z6.Bottom,!0)))));const Kr=`{ "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 Xr=["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 mi(On){return console.log("shapeName:",On),Xr.indexOf(On)>=0}var dn=new ge.YI(Qn.current,{maxSelectionCount:1,linkTemplate:Ae(ge.rU,{locationSpot:ge.z6.Center,selectionAdornmentTemplate:Ae(ge.uz,"Link",{locationSpot:ge.z6.Center},Ae(ge.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Ae(ge.bn,{toArrow:"Standard",stroke:null}))},{routing:ge.rU.AvoidsNodes,curve:ge.rU.JumpOver,corner:5,toShortLength:4},new ge.KX("points"),Ae(ge.bn,{isPanelMain:!0,strokeWidth:2}),Ae(ge.bn,{toArrow:"Standard",stroke:null})),model:new ge.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...ge.bn.getFigureGenerators().toArray().map(On=>({text:"\u672A\u547D\u540D",size:"100 100",figure:On.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ze.current.addDiagramListener("TextEdited",function(On){var rr;const er=On.subject.part;var hr=(rr=document.activeElement)==null?void 0:rr.value;typeof hr=="string"&&hr.trim()===""&&Ze.current.model.commit(function(Dr){Dr.set(er.data,"text","\u672A\u547D\u540D"),Ze.current.commandHandler.stopCommand()},"increment")}),dn.nodeTemplate=Ae(ge.NB,"Auto",{locationSpot:ge.z6.Center},new ge.KX("location","location",ge.E9.parse).makeTwoWay(ge.E9.stringify),Ae(ge.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 ge.KX("stroke").makeTwoWay(),new ge.KX("fill").makeTwoWay(),new ge.KX("figure")),Ae(ge.al,{margin:new ge.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new ge.$u(16,16),maxSize:new ge.$u(10,NaN),textAlign:"center",editable:!0},new ge.KX("key").makeTwoWay())),setTimeout(()=>{Ze.current.grid=Ae(ge.s_,"Grid",Ae(ge.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ae(ge.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ze.current.grid.visible=!0,Ze.current.grid.gridCellStroke="darkgray",Ze.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ze.current,Ze.current}const Or=()=>Rt(this,null,function*(){var Ae,Ve=Ze.current.makeImage();const Mn=yield(0,Lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ve.src,file_data:JSON.stringify({login:(Ae=(0,ne.eY)())==null?void 0:Ae.login,data:JSON.parse(Ze.current.model.toJson())})}});tn({src:Mn.url})});return(0,ae.useEffect)(()=>(setTimeout(()=>{wr()},500),cr(Fn+1),()=>{Ze.current=null}),[]),It.createElement("div",{ref:bn,className:"body-overflow-initial"},It.createElement(pe.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Fn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:It.createElement(he.Z,null,It.createElement(wt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),It.createElement(wt.Z,{onClick:()=>{var Ae,Ve,Mn=Ze.current.selection.first();if(Jn.current=!Jn.current,document.activeElement&&Mn){let jn=(Ve=(Ae=document.activeElement)==null?void 0:Ae.value)==null?void 0:Ve.trim();typeof jn=="string"&&Ze.current.model.commit(function(en){en.set(Mn.data,"text",jn||"\u672A\u547D\u540D"),Ze.current.commandHandler.stopCommand()},"increment")}cr(Fn+1)}},It.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ye},It.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Jn.current?"none":"block"},className:Xt.flowChartWrp},It.createElement("div",{style:{display:"flex",height:"100%"}},It.createElement("div",{style:{width:"300px",height:"100%"}},It.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),It.createElement("div",{style:{height:"calc(100% - 50px)"},className:Xt.myPaletteDiv,ref:Qn})),It.createElement("div",{style:{flex:1,position:"relative"}},It.createElement("div",{ref:zn,style:{height:"80vh"}}))),It.createElement("div",{className:"tr"},It.createElement(Wt.ZP,{size:"large",onClick:Or,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var $t=Vt,ue=le(47889),me=le(71051);const Le=ue.ZP.Group,Ne={margin:"0 8px"};var Be=({callback:Ye,onCancel:tn})=>{function Ze(zn){Ye(zn)}return ae.createElement(Nt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ze},ae.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ae.createElement("span",{style:Ne},"\u5355\u5143\u683C\u6570\uFF1A"),ae.createElement("span",{style:Ne},"\u884C\u6570"),ae.createElement(Nt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ae.createElement(me.Z,null)),ae.createElement("span",{style:Ne},"\u5217\u6570"),ae.createElement(Nt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ae.createElement(me.Z,null))),ae.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ae.createElement("span",{style:Ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ae.createElement(Nt.default.Item,{name:"align"},ae.createElement(Le,null,ae.createElement(ue.ZP,{value:"default"},ae.createElement("i",{className:"fa fa-align-justify"})),ae.createElement(ue.ZP,{value:"left"},ae.createElement("i",{className:"fa fa-align-left"})),ae.createElement(ue.ZP,{value:"center"},ae.createElement("i",{className:"fa fa-align-center"})),ae.createElement(ue.ZP,{value:"right"},ae.createElement("i",{className:"fa fa-align-right"}))))),ae.createElement("div",{className:"flex-container flex-end"},ae.createElement(Wt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ae.createElement(Wt.ZP,{type:"ghost",onClick:tn},"\u53D6\u6D88")))},Xe=le(71411),Qe=le(43001),qe=le.n(Qe),Ue=(0,ae.forwardRef)(({use3d:Ye,width:tn,height:Ze,callback:zn,showSaveButton:Qn},Jn)=>{const bn=(0,ae.useRef)(),Fn=(0,ae.useRef)(),[cr,wr]=(0,ae.useState)(!1),Or=(0,ae.useRef)({id:bn,appName:"graphing",width:tn||1e3,height:Ze||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)(()=>{Fn.current=new(qe())(Or.current,!0),window.onload=function(){Fn.current.inject("applet_container")}},[]);const Ae=()=>{var Ve=window.ggbApplet.getPNGBase64(1,!0,72);return zn&&zn(Ve),Ve};return(0,ae.useEffect)(()=>{Or.current.appName=cr?"3D":"graphing",Fn.current.inject("applet_container")},[cr]),(0,ae.useEffect)(()=>{wr(Ye)},[Ye]),(0,ae.useImperativeHandle)(Jn,()=>({getImgData:Ae})),ae.createElement(ae.Fragment,null,ae.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:bn}),ae.createElement(he.Z,{align:"middle"},ae.createElement(wt.Z,{flex:1},ae.createElement(Xe.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:cr,onChange:Ve=>wr(Ve)})),ae.createElement(wt.Z,null,ae.createElement(Wt.ZP,{size:"large",onClick:Ae,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),We=le(76562),Ke=le(6767);const rn="link",an="upload-image",ln="add-flowchart",gn="draw-image",Gn="add-flowchart",Zn="code-block",Kn="add-table",Pr="------------",pr={default:Pr,left:`:${Pr}`,center:`:${Pr}:`,right:`${Pr}:`};var Er=le(37808);function Mr(){}let Fr=0;const vr=1e4,dr="\u2581",Ur="@\u2581\u2581@",qt="@\u2581@",An=`
|
|
**\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`,Xn=["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 In(Ye){return/^\d+$/.test(Ye)?`${Ye}px`:Ye}const Wn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ir={[Wn+"-B"]:"bold",[Wn+"-I"]:"italic"},Lr={[rn]:"\u6DFB\u52A0\u94FE\u63A5",[Zn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[an]:"\u6DFB\u52A0\u56FE\u7247",[gn]:"\u6DFB\u52A0\u753B\u56FE",[ln]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Kn]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Rr=({defaultValue:Ye="",onChange:tn,width:Ze="100%",height:zn=400,miniToolbar:Qn=!1,isFocus:Jn=!1,watch:bn,insertTemp:Fn,mode:cr="markdown",id:wr="markdown-editor-id",showResizeBar:Or=!1,noStorage:Ae=!1,showNullButton:Ve=!1,showNullProgramButton:Mn=!1,hidetoolBar:jn=!1,fullScreen:en=!1,onBlur:kn,onCMBeforeChange:Pn,onFullScreen:Ln,className:$n="",disablePaste:Nn=!1,disabled:Rn=!1,disabledFill:Bn=!1,placeholder:gr="",values:ar="",extraUse:lr})=>{const[sn,Kr]=(0,ae.useState)(null),[Xr,mi]=(0,ae.useState)(Ye),[dn,On]=(0,ae.useState)(bn),[rr,er]=(0,ae.useState)(en),[hr,Dr]=(0,ae.useState)(""),[Gr,Jr]=(0,ae.useState)(0),[$r,ii]=(0,ae.useState)(zn),[yn,di]=(0,ae.useState)(!1),[mn,oi]=(0,ae.useState)(0),[Gi,bi]=(0,ae.useState)(0),Ai=(0,ae.useRef)(),ai=(0,ae.useRef)(),_r=(0,ae.useRef)(),vi=(0,ae.useRef)();(0,ae.useEffect)(()=>{const kr=window.scrollY||window.pageYOffset;mi(ar),sn==null||sn.setValue(ar),window.scrollTo(0,kr)},[ar]),(0,ae.useEffect)(()=>{Ln==null||Ln(rr)},[rr]),(0,ae.useEffect)(()=>{if(Ai.current){let kr=function(Cn,Ar){var ci;if(Nn){Ar.preventDefault();return}const Wi=Ar.clipboardData;if(Wi){const Ei=Wi.types.toString(),qi=Wi.items;if(Ei==="Files"||Wi.types.indexOf("Files")>-1){if(Ar.preventDefault(),cr=="stex")return;try{let wo=qi[1];((ci=qi[0])==null?void 0:ci.kind)==="file"&&(wo=qi[0]);const to=wo.getAsFile(),To=to.name.split(".").pop();(0,ce.I)(to,bo=>{var jo,on,Wo;bo.id?((jo=to==null?void 0:to.type)==null?void 0:jo.indexOf("image"))>-1?ur.replaceSelection(`<img width="100%" src="/api/attachments/${bo.id}?type=${bo.content_type})" alt="" />`):((on=to==null?void 0:to.type)==null?void 0:on.indexOf("video"))>-1?ur.replaceSelection(`<video width="100%" controls src="/api/attachments/${bo.id}"></video>`):((Wo=to==null?void 0:to.type)==null?void 0:Wo.indexOf("pdf"))>-1?ur.replaceSelection(`<a href="/api/attachments/${bo.id}?type=${to.type}&disposition=inline" target="_blank">${to.name}</a>`):Xn.includes(To)?ur.replaceSelection(`<a href="/api/attachments/${bo.id}?type=office&disposition=inline" target="_blank">${to.name}</a>`):ur.replaceSelection(`[${to.name}](/api/attachments/${bo.id}?type=${bo.content_type})`):(bo==null?void 0:bo.status)===401&&(document.location.href="/user/login")})}catch(wo){Ke.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ur=ot().fromTextArea(Ai.current,{mode:cr,lineNumbers:!Qn,lineWrapping:!0,value:Ye,autoCloseTags:!0,autoCloseBrackets:!0});return ur.on("keyup",function(Cn,Ar){Ar.keyCode===8&&(Cn.getValue()==""?ur.setOption("placeholder",gr):ur.setOption("placeholder",null))}),ur.on("keydown",function(Cn,Ar){if(Ar.keyCode===8){var ci=Fi(Cn);ci&&Ar.preventDefault()}}),Jn&&ur.focus(),ur.on("paste",kr),Rn&&ur.on("beforeChange",function(Cn,Ar){(Ar.origin==="paste"||Ar.origin==="+input")&&Ar.cancel()}),Kr(ur),()=>{ur.off("paste",kr)}}},[]);const xo=(0,ae.useCallback)(()=>{if(ai.current)try{}catch(kr){console.log(kr,"---- to set md editor body height")}},[$r,ai,rr]);(0,ae.useEffect)(()=>{function kr(){let ur=new _t.Z(Cn=>{for(let Ar of Cn)(Ar.target.offsetHeight>0||Ar.target.offsetWidth>0)&&(xo(),sn.setSize("100%","100%"),sn.refresh())});return ur.observe(Ai.current.parentElement),ur}if(sn){const ur=kr();return()=>{var Cn,Ar;(Cn=Ai.current)!=null&&Cn.parentElement&&ur.unobserve((Ar=Ai.current)==null?void 0:Ar.parentElement)}}},[sn,xo]),(0,ae.useEffect)(()=>{if(sn){let kr=[];for(const[ur,Cn]of Object.entries(ir)){let Ar={[ur]:()=>{qn(Cn)}};kr.push(Ar),sn.addKeyMap(Ar)}return()=>{for(let ur of kr)sn.removeKeyMap(ur)}}},[sn]),(0,ae.useEffect)(()=>{en!==rr&&er(en)},[en]),(0,Er.Z)(()=>{if(!Ae&&Gr>0){let kr=new Date().getTime(),ur=window.sessionStorage.getItem(wr);kr>=Gr+vr&&(!ur||ur!==Xr)&&(window.sessionStorage.setItem(wr,Xr),di(!0))}},vr),(0,ae.useEffect)(()=>{On(bn)},[sn,bn]),(0,ae.useEffect)(()=>{sn&&Jn&&sn.focus()},[sn,Jn]),(0,ae.useEffect)(()=>{if(dn&&sn){let kr=function(Cn){let Ar=Cn.target;if(vi.current){let ci=Ar.scrollTop/Ar.scrollHeight;vi.current.scrollTop=vi.current.scrollHeight*ci}};const ur=sn.getScrollerElement();return ur.addEventListener("scroll",kr),()=>{ur.removeEventListener("scroll",kr)}}},[sn,dn]),(0,ae.useEffect)(()=>{if(sn&&Pn){let kr=function(ur,Cn){Pn(ur,Cn)};return sn.on("beforeChange",kr),()=>{sn.off("beforeChange",kr)}}},[sn,Pn]),(0,ae.useEffect)(()=>{if(sn&&kn){let kr=function(){kn(sn.getValue())};return sn.on("blur",kr),()=>{sn.off("blur",kr)}}},[sn,kn]);function Fi(kr,ur){var Cn=kr.getDoc(),Ar=Cn.getCursor(),ci=Cn.getLine(Ar.line),Wi=ci.charAt(Ar.ch-1),Ei=ci.lastIndexOf("@\u2581@",Ar.ch),qi=ci.lastIndexOf("@\u2581\u2581@",Ar.ch),wo=Ei>qi?Ei:qi,to=Ei>qi?3:4;if(Ur.indexOf(Wi)===-1)return null;if(console.log("change1:",ur,kr,ci,Ar,wo,Ei,qi,Wi),wo>=0&&Ar.ch-wo<5){var To=wo+to;return Cn.replaceRange("",{line:Ar.line,ch:wo},{line:Ar.line,ch:To}),{line:Ar.line,ch:To}}return null}(0,ae.useEffect)(()=>{if(sn){let kr=function(ur,Cn){const Ar=ur.getValue();mi(Ar),Jr(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),tn&&(Mn?tn(Ar,yr(Ar)):tn(Ar))};return sn.on("change",kr),()=>{sn.off("change",kr)}}},[sn,tn]),(0,ae.useEffect)(()=>{if(sn)if(Ye==null)sn.setValue(""),mi("");else{const kr=window.scrollY||window.pageYOffset;Ye!==sn.getValue()&&(sn.setValue(Ye),mi(Ye),sn.setCursor(Rn?1:sn.lineCount(),0),window.scrollTo(0,kr))}},[sn,Ye]);const qn=(0,ae.useCallback)(kr=>{const ur=sn.getCursor(),Cn=sn.getSelection();let Ar=Cn.split(`
|
|
`);switch(kr){case"bold":return sn.replaceSelection("**"+Cn+"**"),Cn===""&&sn.setCursor(ur.line,ur.ch+2),sn.focus();case"italic":return sn.replaceSelection("*"+Cn+"*"),Cn===""&&sn.setCursor(ur.line,ur.ch+1),sn.focus();case"code":return sn.replaceSelection("`"+Cn+"`"),Cn===""&&sn.setCursor(ur.line,ur.ch+1),sn.focus();case"inline-latex":return Dr("inline-latex"),sn.focus();case"latex":return sn.replaceSelection("```latex\n"+Cn+"\n```"),sn.setCursor(ur.line+1,Cn.length+1),sn.focus();case"line-break":return sn.replaceSelection(`<br/>
|
|
`),sn.focus();case"list-ul":return Cn===""?sn.replaceSelection("- "+Cn):sn.replaceSelection(Ar.map(ci=>ci===""?"":`- ${ci}`).join(`
|
|
`)),sn.focus();case"list-ol":return Cn===""?sn.replaceSelection("1. "+Cn):sn.replaceSelection(Ar.map((ci,Wi)=>ci===""?"":`${Wi+1}. ${ci}`).join(`
|
|
`)),sn.focus();case"add-null-ch":return Cn===""&&sn.setCursor(ur.line,ur.ch),sn.replaceSelection(dr),sn.focus();case"add-signal":return Cn===""&&sn.setCursor(ur.line,ur.ch),sn.replaceSelection(qt),sn.focus();case"add-multiple":return Cn===""&&sn.setCursor(ur.line,ur.ch),sn.replaceSelection(Ur),sn.focus();case"inster-template-1":return Cn===""&&sn.setCursor(ur.line,ur.ch),sn.replaceSelection(An),sn.focus();case"eraser":return sn.setValue(""),sn.focus();case"trigger-watch":return On(!dn),sn.focus();case"trigger-full-screen":return er(!rr),sn.focus();case rn:Dr(rn);return;case Zn:Dr(Zn);return;case an:Dr(an);return;case gn:Dr(gn);return;case"maths-latex":Dr("maths-latex");return;case ln:Dr(ln);return;case Kn:Dr(Kn);return;default:throw new Error}},[sn,dn,rr]),Me=(0,ae.useCallback)((kr,ur)=>{var Cn,Ar,ci,Wi,Ei,qi;switch(Dr(""),hr){case rn:const{title:jo,link:on}=kr;return sn.replaceSelection(`[${jo}](${on})`),sn.focus();case Zn:const{language:Wo,content:Js}=kr;return sn.replaceSelection(["```"+Wo,Js,"```"].join(`
|
|
`)),sn.focus();case"maths-latex":for(var wo=atob(kr),to=new Uint8Array(wo.length),To=0;To<wo.length;To++)to[To]=wo.charCodeAt(To);var bo=new Blob([to],{type:"image/png"});(0,ce.I)(bo,pa=>{pa.id?sn.replaceSelection(``):(pa==null?void 0:pa.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":sn.replaceSelection("`$$"+kr+"$$`");break;case an:case gn:case Gn:const{src:ia,alt:ja}=kr,so=ur,ls=(ci=(Ar=(Cn=so==null?void 0:so.name)==null?void 0:Cn.split("."))==null?void 0:Ar.pop)==null?void 0:ci.call(Ar);return((Wi=so==null?void 0:so.type)==null?void 0:Wi.indexOf("image"))>-1||!(so!=null&&so.type)?so!=null&&so.align||so!=null&&so.width?sn.replaceSelection(`<p style="text-align:${so.align||"initial"}"><img width="${so.width?so.width+"%":"initial"}" src="${ia}" alt="${ja||""}" /></p>`):sn.replaceSelection(`<img width="100%" src="${ia}" alt="${ja||""}" />`):((Ei=so==null?void 0:so.type)==null?void 0:Ei.indexOf("video"))>-1?sn.replaceSelection(`<video width="100%" controls src="${ia}"></video>`):((qi=so==null?void 0:so.type)==null?void 0:qi.indexOf("pdf"))>-1?sn.replaceSelection(`<a href="${ia}?type=${so.type}&disposition=inline" target="_blank">${so.name}</a>`):Xn.includes(ls)?sn.replaceSelection(`<a href="${ia}?type=office&disposition=inline" target="_blank">${so.name}</a>`):sn.replaceSelection(`[${so.name}](${ia})`),sn.focus();case Kn:const{row:zl,col:Ti,align:Go}=kr;let El=`
|
|
`;for(let pa=0;pa<zl;pa++){let uu=[],xs=[];for(let Br=0;Br<Ti;Br++)pa===1&&xs.push(pr[Go]),uu.push(" ");pa===1&&(El+=`| ${xs.join(" | ")} |
|
|
`),El+=`| ${uu.join(Ti===1?"":" | ")} |
|
|
`}return sn.replaceSelection(El+`
|
|
`),sn.focus();default:throw new Error}},[sn,hr]),zi=(0,ae.useMemo)(()=>{switch(hr){case rn:return ae.createElement(xe,{callback:Me,onCancel:Ui});case Zn:return ae.createElement(be.Z,{callback:Me,onCancel:Ui});case an:return ae.createElement(ce.Z,{callback:Me,onCancel:Ui});case ln:return ae.createElement($t,{callback:Me,onCancel:Ui});case Kn:return ae.createElement(Be,{callback:Me,onCancel:Ui});case"maths-latex":return ae.createElement(Ue,{showSaveButton:!0,callback:Me});case"inline-latex":return ae.createElement(We.Z,{showSaveButton:!0,callback:Me});default:return null}},[hr]);function Ui(){Dr("")}(0,ae.useEffect)(()=>{if(_r.current){let kr=function(Ei){ci=!0,Wi=Ei.pageY},ur=function(){ci=!1},Cn=function(Ei){if(ci){let qi=Ei.pageY-Wi;qi<0&&(qi=0),qi>300&&(qi=300);let wo=zn+qi+"px";ii(wo)}},Ar=_r.current,ci=!1,Wi=0;return Ar.addEventListener("mousedown",kr),document.addEventListener("mousemove",Cn),document.addEventListener("mouseup",ur),()=>{Ar.removeEventListener("mousedown",kr),document.removeEventListener("mousemove",Cn),document.removeEventListener("mouseup",ur)}}},[sn,_r]),(0,ae.useEffect)(()=>{ii(zn)},[zn]);const Qi=In(Ze),Xi=In($r),pi={width:Qi,height:Xi},sr=(0,ae.useMemo)(()=>{if(Gr){let kr=new Date(Gr),ur=kr.getHours(),Cn=kr.getMinutes(),Ar=kr.getSeconds();return ur=ur<10?"0"+ur:ur,Cn=Cn<10?"0"+Cn:Cn,Ar=Ar<10?"0"+Ar:Ar,`${ur}:${Cn}:${Ar}`}return 0},[Gr]),yr=kr=>{const ur=[];if(Mn){let Cn=-1;kr=kr.replace(/(@▁▁@|@▁@)/g,function(Ar,ci,Wi){ur.push({multiLine:Ar!==qt})})}return ur};function Qr(){window.sessionStorage.removeItem(wr),di(!1),Jr(0)}function mr(){di(!1),Jr(0),sn.setValue(window.sessionStorage.getItem(wr))}(0,ae.useEffect)(()=>{Lr[hr]&&hr!==gn&&hr!==ln&&setTimeout(()=>{const kr=document.getElementsByClassName("markdown-popup-form")[0],ur=window.innerWidth/2-kr.offsetWidth/2,Cn=window.innerHeight/2-kr.offsetHeight/2;oi(ur),bi(Cn)},0)},[hr]);const Vr=kr=>{kr.preventDefault();const ur=kr.clientX-mn,Cn=kr.clientY-Gi;document.body.onmousemove=Ar=>{let ci=Ar.clientX-ur,Wi=Ar.clientY-Cn;const Ei=document.getElementsByClassName("markdown-popup-form")[0],qi=window.innerWidth-Ei.offsetWidth,wo=window.innerHeight-Ei.offsetHeight;ci=Math.max(0,Math.min(ci,qi)),Wi=Math.max(0,Math.min(Wi,wo)),Mi(Ar.clientX,Ar.clientY,ur,Cn)&&(oi(ci),bi(Wi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Mi=(kr,ur,Cn,Ar)=>{const ci=document.body.clientHeight,Wi=document.body.clientWidth;return kr<20&&Cn>kr||kr>Wi-20&&Cn<kr||ur<20&&Ar>ur||ur>ci-20&&Ar<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:ai},ae.createElement("div",{className:`markdown-editor-container ${$n} ${dn?"on-preview":""} ${Qn?"mini":""} ${rr?"full-screen":""}`,style:pi},ae.createElement(Ft,{insertTemp:Fn,watch:dn,fullScreen:rr,showNullButton:Ve,showNullProgramButton:Mn,onActionCallback:qn,hidetoolBar:jn,extraUse:lr}),ae.createElement("div",{className:"markdown-editor-body"},ae.createElement("div",{className:"codemirror-container"},ae.createElement("textarea",{ref:Ai,placeholder:gr})),dn?ae.createElement("div",{ref:vi,className:"preview-container"},cr==="stex"&&ae.createElement(mt,{value:Xr}),cr!=="stex"&&ae.createElement(Tt.Z,{disabledFill:Bn,showProgramFill:Mn,value:Xr})):null))),Or?ae.createElement("a",{ref:_r,className:"editor-resize"}):null,hr===gn&&ae.createElement(Fe,{callback:Me,onCancel:Ui}),hr===ln&&ae.createElement($t,{callback:Me,onCancel:Ui}),ae.createElement(jt.Z,null,Lr[hr]&&hr!==gn&&hr!==ln?ae.createElement(pe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:mn,top:Gi},title:ae.createElement("div",{style:{cursor:"move"},onMouseDown:Vr},Lr[hr]),open:!0,onCancel:Ui,footer:null,destroyOnClose:!0,width:hr===ln?"1200px":null,height:hr===ln?"80vh":null,className:"markdown-popup-form"},zi):null))}},17077:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return At},I:function(){return Ft}});var ae=le(28284),Re=le(6767),ot=le(37568),_t=le(77736),Bt=le(71051),vt=le(47889),gt=le(99571),kt=le(46699),bt=le(59301),St=le(59301),Tt=Object.defineProperty,mt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,at=(jt,Nt,Gt)=>Nt in jt?Tt(jt,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):jt[Nt]=Gt,it=(jt,Nt)=>{for(var Gt in Nt||(Nt={}))z.call(Nt,Gt)&&at(jt,Gt,Nt[Gt]);if(ft)for(var Gt of ft(Nt))tt.call(Nt,Gt)&&at(jt,Gt,Nt[Gt]);return jt},lt=(jt,Nt)=>mt(jt,xt(Nt));const{useForm:ut}=ae.default,dt={width:280,marginRight:10},Pt={labelCol:{span:5},wrapperCol:{span:19}};var At=({callback:jt,onCancel:Nt})=>{const[Gt]=ut();let Wt=(0,bt.useRef)();function Jt(oe){Wt.current.width=Gt.getFieldValue("width"),Wt.current.align=Gt.getFieldValue("align"),jt(oe,Wt.current)}function Ut(oe,se){if(oe.status===-1){Re.ZP.error(oe.message);return}Gt.setFieldsValue({src:`/api/attachments/${oe.id}`,type:se.type})}function Ht(oe){let se=oe.target.files[0];Wt.current=se,Ft(se,Ut)}return St.createElement(ae.default,lt(it({form:Gt},Pt),{className:"upload-image-panel",onFinish:Jt,style:{width:470,overflow:"hidden"}}),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},St.createElement("div",{className:"flex-container"},St.createElement(ae.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},St.createElement(ot.default,{style:dt})),St.createElement(Dt,{onFileChange:Ht}))),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},St.createElement(ot.default,{style:{width:264}})),St.createElement(ae.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},St.createElement(_t.Z,null,St.createElement(ae.default.Item,{name:"width",style:{margin:0}},St.createElement(Bt.Z,{style:{width:264}})),St.createElement("span",{className:"ml8"},"%"))),St.createElement(ae.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},St.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"}]})),St.createElement("aside",null,St.createElement(ae.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},St.createElement(gt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(gt.ZP,{type:"default",onClick:Nt},"\u53D6\u6D88"))))};function Dt({onFileChange:jt}){return St.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",St.createElement("input",{type:"file",onChange:jt}))}function Ft(jt,Nt){if(!jt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Gt=new FormData;Gt.append("editormd-image-file",jt),Gt.append("file_param_name","editormd-image-file"),Gt.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(Gt)}},91558:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return ot}});var ae=le(59301),Re=le(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(fn,cn,le){"use strict";le.d(cn,{SV:function(){return Vt},ZP:function(){return Rt}});var ae=le(59301),Re=le(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"]},_t={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=le(53184),bt=le.n(kt),St=Object.defineProperty,Tt=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,tt=($t,ue,me)=>ue in $t?St($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:me}):$t[ue]=me,at=($t,ue)=>{for(var me in ue||(ue={}))ft.call(ue,me)&&tt($t,me,ue[me]);if(xt)for(var me of xt(ue))z.call(ue,me)&&tt($t,me,ue[me]);return $t},it=($t,ue)=>Tt($t,mt(ue)),lt=($t,ue,me)=>new Promise((Le,Ne)=>{var Be=qe=>{try{Qe(me.next(qe))}catch(He){Ne(He)}},Xe=qe=>{try{Qe(me.throw(qe))}catch(He){Ne(He)}},Qe=qe=>qe.done?Le(qe.value):Promise.resolve(qe.value).then(Be,Xe);Qe((me=me.apply($t,ue)).next())});const ut={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"]}},dt=($t,ue)=>ue.map(me=>({label:me,kind:$t.languages.CompletionItemKind.Keyword,insertText:me})),Pt=$t=>Object.keys(ut.tables).map(ue=>({label:ue,kind:$t.languages.CompletionItemKind.Variable,insertText:ue})),At=($t,ue)=>{const me=ut.tables[$t];return me?me.map(Le=>({label:Le,kind:ue.languages.CompletionItemKind.Field,insertText:Le})):[]};function Dt($t,ue,me,Le,Ne){let Be=ue.getWordUntilPosition(me),Xe={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Qe=Le.map(qe=>({label:qe,kind:$t.languages.CompletionItemKind.Keyword,insertText:qe,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xe}));return Ne.map(qe=>{Qe.push(it(at({},qe),{range:Xe}))}),Qe}var Ft=$t=>{ut.languages.map(Ne=>($t.languages.registerDocumentFormattingEditProvider(Ne,{provideDocumentFormattingEdits(Be,Xe,Qe){return lt(this,null,function*(){const qe=bt()(Be.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Be.getFullModelRange(),text:qe}]})}}),Ne));const ue=Bt.quickKey.map(Ne=>({label:Ne.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ne.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet})),me=vt.quickKey.map(Ne=>({label:Ne.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ne.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Le=_t.quickKey.map(Ne=>({label:Ne.label,kind:$t.languages.CompletionItemKind.Method,insertText:Ne.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet}));$t.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ne,Be){var Xe=Ne.getWordUntilPosition(Be),Qe={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},qe=Ne.getLineContent(Be.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...Bt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe})),...Bt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}))]}}}),$t.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ne,Be){var Xe=Ne.getWordUntilPosition(Be),Qe={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn};return{suggestions:[...ot.keywords.map(qe=>({label:qe,kind:$t.languages.CompletionItemKind.Function,documentation:qe,insertText:qe,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}))]}}}),$t.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ne,Be){var Xe=Ne.getWordUntilPosition(Be),Qe={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},qe=Ne.getLineContent(Be.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[..._t.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe})),..._t.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}))]}}}),$t.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ne,Be){var Xe=Ne.getWordUntilPosition(Be),Qe={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},qe=Ne.getLineContent(Be.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...gt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe})),...gt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}))]}}}),$t.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ne,Be){var Xe=Ne.getWordUntilPosition(Be),Qe={startLineNumber:Be.lineNumber,endLineNumber:Be.lineNumber,startColumn:Xe.startColumn,endColumn:Xe.endColumn},qe=Ne.getLineContent(Be.lineNumber).substring(Xe.startColumn-2,Xe.endColumn);return{suggestions:[...vt.keywords.map(He=>({label:He,kind:$t.languages.CompletionItemKind.Function,documentation:He,insertText:He,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe})),...vt.quickKey.map(He=>({label:He.label,kind:$t.languages.CompletionItemKind.Function,documentation:He.content,insertText:qe.startsWith("#")?He.content.replace(/#/,""):He.content,insertTextRules:$t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}))]}}})};const jt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Nt=Object.defineProperty,Gt=($t,ue,me)=>ue in $t?Nt($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:me}):$t[ue]=me,Wt=($t,ue,me)=>Gt($t,typeof ue!="symbol"?ue+"":ue,me);const Jt=class mx{constructor(ue,me,Le){this.placeholder=ue,this.editor=me,this.monaco=Le,me.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)}};Wt(Jt,"ID","editor.widget.placeholderHint");var Ht=Jt,oe=le(96236),se=le(6767),fe=le(25399),Pe=le(89392),Yt=le(49535),ee=le(56102),ye=Object.defineProperty,xe=Object.defineProperties,be=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,Ce=($t,ue,me)=>ue in $t?ye($t,ue,{enumerable:!0,configurable:!0,writable:!0,value:me}):$t[ue]=me,de=($t,ue)=>{for(var me in ue||(ue={}))pe.call(ue,me)&&Ce($t,me,ue[me]);if(ce)for(var me of ce(ue))he.call(ue,me)&&Ce($t,me,ue[me]);return $t},Fe=($t,ue)=>xe($t,be(ue)),ge=($t,ue)=>{var me={};for(var Le in $t)pe.call($t,Le)&&ue.indexOf(Le)<0&&(me[Le]=$t[Le]);if($t!=null&&ce)for(var Le of ce($t))ue.indexOf(Le)<0&&he.call($t,Le)&&(me[Le]=$t[Le]);return me},Se=($t,ue,me)=>new Promise((Le,Ne)=>{var Be=qe=>{try{Qe(me.next(qe))}catch(He){Ne(He)}},Xe=qe=>{try{Qe(me.throw(qe))}catch(He){Ne(He)}},Qe=qe=>qe.done?Le(qe.value):Promise.resolve(qe.value).then(Be,Xe);Qe((me=me.apply($t,ue)).next())});function re($t){return/^\d+$/.test($t)?`${$t}px`:$t}function Kt(){}let wt=!1;const Lt={"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 Xt($t=[]){let ue=$t;if(Array.isArray($t)){for(let me=0;me<$t.length;me++){let Le=Lt[$t[me]];if(Le)return Le}return ue[0]}return Lt[ue]||ue}let ne=null;const It=()=>Se(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch($t){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",$t)}});var Rt=$t=>{var ue=$t,{width:me="100%",height:Le="100%",value:Ne,language:Be="javascript",style:Xe={},options:Qe={},overrideServices:qe={},theme:He="vs-dark",onEditBlur:Ue,isCopy:We=!1,onSave:Ke,autoHeight:rn=!1,forbidCopy:an=!1,onChange:ln=Kt,editorDidMount:gn=Kt,onFocus:Gn=Kt,onBreakPoint:Zn=Kt,breakPointValue:Kn=[],filename:Pr="educoder.txt",errorLine:pr,errorContent:Er="",highlightLine:Mr,openBreakPoint:Fr=!1,placeholder:vr="",showMiniMap:dr=!0}=ue,Ur=ge(ue,["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 qt=(0,ae.useRef)(),An=(0,ae.useRef)({}),Xn=(0,ae.useRef)(),In=(0,ae.useRef)(),Un=(0,ae.useRef)([]),Wn=(0,ae.useRef)(!1),ir=(0,ae.useRef)(),Lr=(0,ae.useRef)(),Rr=(0,ae.useRef)(!1),[Ye,tn]=(0,ae.useState)(!1);function Ze(){let Pn;return qt.current&&(Pn=new Re.Z(Ln=>{for(let $n of Ln)($n.target.offsetHeight>0||$n.target.offsetWidth>0)&&An.current.instance.layout()}),Pn.observe(qt.current)),Pn}function zn(){se.ZP.warning({content:decodeURIComponent(jt),key:"monaco-editor-tip"})}const Qn=()=>{let Pn=An.current.instance;if(Ne!=null&&Pn&&Ye){const Ln=Pn.getModel();Ln&&Ne!==Ln.getValue()&&(wt=!0,Ln.setValue(Ne),Pn.layout(),wt=!1)}};(0,ae.useEffect)(()=>{const Pn=Yt.Z.subscribe("formatDocument",Ln=>{var $n;let Nn=An.current.instance;($n=Nn==null?void 0:Nn.getAction)==null||$n.call(Nn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ln=>{ln(Ln)},Pn},[]),(0,ae.useEffect)(()=>{var Pn;let Ln=An.current.instance;In.current&&clearTimeout(In.current),In.current=setTimeout(()=>{Qn()},500),Ne&&(Ne!=null&&Ne.length)&&((Pn=Ln==null?void 0:Ln.updateOptions)==null||Pn.call(Ln,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ne,Ye,An.current]),(0,ae.useEffect)(()=>{if(pr&&An.current&&An.current.instance){let Ln=An.current.instance;Ln.changeViewZones(function($n){var Nn=document.createElement("div");Nn.style.padding="10px 20px",Nn.style.width="calc(100% - 20px)",Nn.className="my-error-line-wrp",Nn.innerHTML=Er,$n.addZone({afterLineNumber:pr||11,heightInLines:3,domNode:Nn})});var Pn={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}};Ln.addOverlayWidget(Pn),Ln.revealPositionInCenter({lineNumber:20,column:1})}},[pr,An.current,Ye]);const Jn=(Pn="",Ln)=>{if(!Pn||Pn.trim()==="")return!0;const Nn=An.current.instance.getModel().getLineTokens(Ln);let Rn=!1;for(let Bn=0;Bn<2;Bn++)Nn.getStandardTokenType(Bn)===1&&(Rn=!0);return Rn};(0,ae.useEffect)(()=>{var Pn;const Ln=(Pn=An.current)==null?void 0:Pn.instance;if(Ln&&Ye&&an){const $n=Ln.onDidBlurEditorWidget(()=>{Rr.current=!1}),Nn=Ln.onDidFocusEditorText(()=>{Rr.current=!0});return()=>{$n.dispose(),Nn.dispose()}}},[An.current,Ye,an]),(0,ae.useEffect)(()=>{var Pn;if((Pn=An.current)!=null&&Pn.instance&&Ye&&Fr){let Ln=An.current.instance,$n=Ln.getModel();if(!$n)return;(()=>{var On;let rr=[],er=[];const hr=$n.getAllDecorations();for(let Gr of hr)Gr.options.className==="highlighted-line"&&(rr.push((On=Gr==null?void 0:Gr.range)==null?void 0:On.startLineNumber),er.push(Gr==null?void 0:Gr.id));if(Mr===rr[0])return;$n.deltaDecorations(er,[]);const Dr=$n.getLineCount();Mr&&Mr<=Dr&&(Ln.deltaDecorations([],[{range:new ne.Range(Mr,1,Mr,$n.getLineMaxColumn(Mr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ln.revealLineInCenter(Mr))})();const Rn=(On=!1)=>{var rr;let er=[],hr=[];const Dr=$n.getAllDecorations();for(let Gr of Dr)Gr.options.linesDecorationsClassName==="breakpoints-select"&&(er.push((rr=Gr==null?void 0:Gr.range)==null?void 0:rr.startLineNumber),hr.push(Gr==null?void 0:Gr.id));if(On)return{lines:er,ids:hr};Zn(er)},Bn=On=>Se(void 0,null,function*(){let rr={range:new ne.Range(On,1,On,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield $n.deltaDecorations([],[rr]),Rn()}),gr=On=>Se(void 0,null,function*(){let rr=[];const er=Ln.getLineDecorations(On);for(let hr of er)hr.options.linesDecorationsClassName==="breakpoints-select"&&rr.push(hr.id);yield $n.deltaDecorations(rr,[]),Rn()}),ar=On=>{let rr=Ln.getLineDecorations(On);for(let er of rr)if(er.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Pe.isEqual)(Kn,Rn(!0).lines)){$n.deltaDecorations(Rn(!0).ids,[]);const On=Kn.map(rr=>({range:new ne.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));$n.deltaDecorations([],On)}const lr=Ln.onDidChangeModelContent(On=>{let rr=Ln.getPosition();if(rr){let er=rr.lineNumber;clearTimeout(Lr.current),Lr.current=setTimeout(()=>{Jn($n.getLineContent(er),er)?gr(er):ar(er)?(gr(er),Bn(er)):Rn()},100)}}),sn=Ln.onMouseDown(On=>{var rr,er,hr;if(On.target.detail&&((hr=(er=(rr=On.target)==null?void 0:rr.element)==null?void 0:er.className)!=null&&hr.includes("line-numbers"))){let Dr=On.target.position.lineNumber;if(Jn($n.getLineContent(Dr),Dr))return;ar(Dr)?gr(Dr):Bn(Dr)}}),Kr=On=>{let rr={range:new ne.Range(On,1,On,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Un.current=Ln.deltaDecorations(Un.current,[rr])},Xr=()=>{Un.current=Ln.deltaDecorations(Un.current,[])},mi=Ln.onMouseMove(On=>{var rr,er,hr;if(Xr(),On.target.detail&&((hr=(er=(rr=On.target)==null?void 0:rr.element)==null?void 0:er.className)!=null&&hr.includes("line-numbers"))){let Dr=On.target.position.lineNumber;if(Jn($n.getLineContent(Dr),Dr))return;Kr(Dr)}}),dn=Ln.onMouseLeave(()=>{Xr()});return()=>{lr.dispose(),sn.dispose(),mi.dispose(),dn.dispose()}}},[An.current,Ye,Kn,Mr,Fr,Be]),(0,ae.useEffect)(()=>{var Pn;(Pn=An.current)!=null&&Pn.instance&&Fr&&An.current.instance.setPosition({lineNumber:0,column:0})},[Mr]);function bn(){let Pn=An.current.instance;if(Pn){const Ln=Pn.getSelection(),$n=An.current.pastePos||{},Nn=new ne.Range($n.startLineNumber||Ln.endLineNumber,$n.startColumn||Ln.endColumn,$n.endLineNumber||Ln.endLineNumber,$n.endColumn||Ln.endColumn);setTimeout(()=>{Pn.executeEdits("",[{range:Nn,text:""}])},300)}}function Fn(Pn){(window.navigator.platform.match("Mac")?Pn.metaKey:Pn.ctrlKey)&&Pn.keyCode==83&&(Pn.preventDefault(),Ke())}const cr=()=>{if(rn&&An.current.instance){const Pn=An.current.instance.getContentHeight();en(Pn<Le?Le:Pn)}else en(Le)};function wr(Pn){var Ln=document.createEvent("MouseEvents");Ln.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Pn.dispatchEvent(Ln)}const Or=Pn=>{if(!Rr.current)return;const{keyCode:Ln,ctrlKey:$n,metaKey:Nn,target:Rn,type:Bn}=Pn;return(Bn==="paste"||(Ln===67||Ln===86)&&(Nn||$n))&&Rn.nodeName==="TEXTAREA"&&(zn(),Pn.preventDefault()),!1};function Ae(Pn,Ln){var $n=window.URL||window.webkitURL||window,Nn=new Blob([Ln]),Rn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Rn.href=$n.createObjectURL(Nn),Rn.download=Pn,wr(Rn)}(0,ae.useEffect)(()=>{cr()},[cr]),(0,ae.useEffect)(()=>{qt.current&&!Ye&&Promise.all([le.e(8909),le.e(6656)]).then(le.bind(le,71448)).then(Pn=>{try{ne=Pn,An.current.instance=ne.editor.create(qt.current,{value:Ne,language:Xt(Be),theme:He,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:dr||!1}},qe);const Ln=An.current.instance;let Rn=[...oe.BH._menuItems].find(lr=>lr[0]._debugName=="EditorContext")[1],Bn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],gr=(lr,sn)=>{var Kr,Xr;let mi=lr._first;do sn.includes((Xr=(Kr=mi.element)==null?void 0:Kr.command)==null?void 0:Xr.id)&&lr._remove(mi);while(mi=mi.next)};if(gn(Ln,ne),setTimeout(()=>{cr(),An.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ae(Pr||"educoder.txt",Ln.getValue())}})},500),An.current.subscription=Ln.onDidChangeModelContent(lr=>{Wn.current?clearTimeout(ir.current):(cr(),ln(Ln.getValue(),lr)),ir.current=setTimeout(()=>{Wn.current=!1},500)}),window.Monaco||Ft(ne,Xt(Be)),an&&(gr(Rn,Bn),qt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Or),window.removeEventListener("paste",Or),window.addEventListener("keydown",Or),window.addEventListener("paste",Or)),window.Monaco=ne,Ue&&Ln.onDidBlurEditorWidget(()=>{Ue(Ln.getValue())}),Gn&&Ln.onDidFocusEditorText(()=>{an&&It(),Gn(Ln.getValue())}),an){It();try{Ln.onDidPaste(lr=>{const sn=Ln.getSelection(),Kr=An.current.pastePos||{},Xr=new ne.Range(Kr.startLineNumber||sn.endLineNumber,Kr.startColumn||sn.endColumn,Kr.endLineNumber||sn.endLineNumber,Kr.endColumn||sn.endColumn);Ln.executeEdits("",[{range:lr.range,text:""}])})}catch(lr){}}let ar=Ze();return vr&&typeof vr=="string"&&new Ht(vr,Ln,ne),tn(!0),()=>{const lr=An.current.instance;lr.dispose();const sn=lr.getModel();sn&&sn.dispose(),An.current.subscription&&An.current.subscription.dispose(),ar.unobserve(qt.current)}}catch(Ln){}})},[]),(0,ae.useEffect)(()=>{if(An.current.instance&&Ye)return document.addEventListener("keydown",Fn,!1),()=>{document.removeEventListener("keydown",Fn)}},[Ke,Ye]),(0,ae.useEffect)(()=>{let Pn=An.current.instance;if(Pn&&Ye){let Ln=Xt(Be);ne.editor.setModelLanguage(Pn.getModel(),Ln)}},[Be,Ye]),(0,ae.useEffect)(()=>{An.current.instance&&Ye&&ne.editor.setTheme(He)},[He,Ye]),(0,ae.useEffect)(()=>{let Pn=An.current.instance;Xn.current=Qe,Pn&&Ye&&(Pn.updateOptions(de({},Qe)),setTimeout(()=>{Pn.getModel().updateOptions(de({},Qe))},200))},[JSON.stringify(Qe),Ye]),(0,ae.useEffect)(()=>{let Pn=An.current.instance;Pn&&Ye&&Pn.layout()},[me,Le,Ye]);const[Ve,Mn]=(0,ae.useState)(re(me)),[jn,en]=(0,ae.useState)(re(Le)),kn=Fe(de({},Xe),{width:Ve,height:jn,position:"relative"});return ae.createElement("div",{className:"my-monaco-editor",ref:qt,style:kn},We&&ae.createElement(ee.CopyToClipboard,{text:Ne,onCopy:()=>se.ZP.success("\u590D\u5236\u6210\u529F")},ae.createElement(fe.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 Vt({width:$t="100%",height:ue="100%",original:me,modified:Le,language:Ne,options:Be={}}){const Xe=(0,ae.useRef)(),[Qe,qe]=(0,ae.useState)(null);function He(rn){let an;return Xe.current&&(an=new Re.Z(ln=>{for(let gn of ln)(gn.target.offsetHeight>0||gn.target.offsetWidth>0)&&rn.layout()}),an.observe(Xe.current)),an}(0,ae.useEffect)(()=>(Xe.current&&Promise.all([le.e(8909),le.e(9404)]).then(le.bind(le,2550)).then(rn=>{ne=rn;const an=ne.editor.createDiffEditor(Xe.current,Fe(de({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Be),{wordWrap:!0}));qe(an);let ln=He(an);return()=>{an.dispose();const gn=an.getModel();gn&&gn.dispose(),ln.unobserve(Xe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ae.useEffect)(()=>{Qe&&Qe.setModel({original:ne.editor.createModel(me,Ne),modified:ne.editor.createModel(Le,Ne)})},[me,Le,Ne,Qe]);const Ue=re($t),We=re(ue),Ke={width:Ue,height:We};return ae.createElement("div",{className:"my-diff-editor",ref:Xe,style:Ke})}},58397:function(fn,cn,le){"use strict";var ae=le(39744),Re=le(82326),ot=le(71411),_t=le(59301);const Bt=Re.default.Option;cn.Z=({isTheoretical:vt,onFontSizeChange:gt,cmFontSize:kt,cmCodeMode:bt,autoFormat:St,onCodeModeChange:Tt,onTabToSpace:mt,onAutoFormat:xt,formatDocument:ft,className:z="",tabToSpace:tt,children:at,code_editor:it,challenge:lt})=>{const ut={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return _t.createElement("div",{className:`tpi-code-setting ${z}`},_t.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),_t.createElement(Re.default,{bordered:!1,size:"small",value:bt,onChange:Tt},_t.createElement(Bt,{value:"vs"},"\u767D\u8272\u80CC\u666F"),_t.createElement(Bt,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),_t.createElement(Re.default,{bordered:!1,size:"small",value:kt,onChange:gt},_t.createElement(Bt,{value:12},"12px"),_t.createElement(Bt,{value:14},"14px"),_t.createElement(Bt,{value:16},"16px"),_t.createElement(Bt,{value:18},"18px"),_t.createElement(Bt,{value:20},"20px"),_t.createElement(Bt,{value:22},"22px"))),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"Tab\u8F6C\u6362"),_t.createElement(ot.Z,{checked:tt,onChange:mt})),_t.createElement("div",{className:"file-item",onClick:ft},_t.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("h3",null,"\u5FEB\u6377\u952E"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),_t.createElement("span",null,"Ctrl + S")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),_t.createElement("span",null,"F1 / Alt + F1")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),_t.createElement("span",null,"Ctrl + ]/[")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),_t.createElement("span",null,"Ctrl + Shift + \\")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),_t.createElement("span",null,"Home")),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),_t.createElement("span",null,"End"))),at),!vt&&_t.createElement(_t.Fragment,null,_t.createElement("h3",null,"\u5FEB\u6377\u952E"),_t.createElement("section",null,_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),_t.createElement("span",null,ut[lt==null?void 0:lt.difficulty])),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),_t.createElement("span",null,it==null?void 0:it.name)),_t.createElement("div",{className:"file-item"},_t.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),_t.createElement("span",null,it!=null&&it.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},10661:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Tt}});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"},Re=le(29787),ot=le(25399),_t=le(92310),Bt=le.n(_t),vt=le(51257),gt=le(28426),kt=le(48790),bt=le(59301),Tt=({className:mt,dataSource:xt=[],col:ft=4,right:z,bottom:tt=23,precision:at=0,wrapWidth:it=1200,trackEventItems:lt,loading:ut,onRemove:dt=()=>{},isCurrent:Pt=!0,showAlias:At=!1})=>{const Dt=Math.floor((it-(ft-1)*z)/ft),Ft=[{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 bt.createElement(Re.Z,{spinning:ut},bt.createElement("div",{className:Bt()(ae.list,mt)},!!(xt!=null&&xt.length)&&(xt==null?void 0:xt.map((jt,Nt)=>{var Gt;const{name:Wt,id:Jt,identifier:Ut,featured:Ht,school_name:oe,image_url:se,excellent:fe,is_plan:Pe}=jt;return bt.createElement("div",{key:Jt,className:ae.wrap,style:{width:Dt,marginRight:(1+Nt)%ft===0?0:z+at,marginBottom:tt}},bt.createElement("a",{className:ae.li,onClick:Yt=>{Yt.preventDefault(),Yt.stopPropagation(),lt&&(0,vt.L9)([lt]),(0,vt.xg)(`/paths/${Ut}`)}},bt.createElement("div",{className:ae.img},bt.createElement("img",{className:ae.cover,src:`${se}`}),Pt&&(0,kt.bg)()&&(jt==null?void 0:jt.studying)&&bt.createElement("div",{className:`${ae.movebq} user-path-items`,onClick:Yt=>{Yt.stopPropagation(),dt(jt)}},bt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),bt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Gt=jt==null?void 0:jt.subject_tags)==null?void 0:Gt.map((Yt,ee)=>{var ye,xe;if(ee===0){const ce=(ye=Ft.find(pe=>pe.name==Yt))==null?void 0:ye.swimg;return bt.createElement("img",{className:ae.sign,src:ce,style:{left:"-4px"}})}const be=(xe=Ft.find(ce=>ce.name==Yt))==null?void 0:xe.ptimg;return bt.createElement("img",{className:ae.sign,src:be,style:{left:`${48+52*(ee-1)+2*ee}px`}})}),bt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(jt==null?void 0:jt.excellent)&&bt.createElement("div",{className:ae.bq},"\u5F00\u653E\u8BFE\u7A0B"))),bt.createElement("div",{className:ae.name},bt.createElement(ot.Z,{title:At&&(jt!=null&&jt.excellent_alias_name)?bt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Wt}`,bt.createElement("br",null),bt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${jt==null?void 0:jt.excellent_alias_name}`)):Wt},bt.createElement("span",{className:ae.e},At&&(jt==null?void 0:jt.excellent_alias_name)||Wt))),bt.createElement(ot.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${oe}`},bt.createElement("div",{className:ae.unit},bt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),oe)),bt.createElement("div",{className:ae.tags},bt.createElement("div",null,bt.createElement(ot.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),bt.createElement("span",null,jt.stages_count))),bt.createElement(ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),bt.createElement("span",null,jt.members_count)))))))})),!xt.length&&bt.createElement(gt.Z,null)))}},9148:function(fn,cn,le){"use strict";le.d(cn,{jL:function(){return Bt},w9:function(){return ye},QD:function(){return Ue},cQ:function(){return se.Z},op:function(){return Ne},O5:function(){return Xn},_b:function(){return gn},t7:function(){return it},Gi:function(){return Ce},YG:function(){return pe},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=le(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:In=[],img:Un,imgWidth:Wn=346,title:ir,sunTitle:Lr,bannerExtraContent:Rr})=>ae.createElement("div",{className:Re.banner},ae.createElement("div",{className:Re.content},ae.createElement("aside",null,ae.createElement("p",null,ae.createElement("b",null,ir),ae.createElement("span",null,Lr)),In.length>0&&ae.createElement("div",{className:Re.btns},In.map((Ye,tn)=>ae.createElement("div",{key:tn,onClick:Ye.click},Ye.name,Ye.sign?ae.createElement("img",{src:ot,width:39}):null))),Rr),Un&&ae.createElement("img",{style:{marginTop:33,marginRight:38},src:Un,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=le(92310),kt=le.n(gt),bt=le(89392),Tt=({dataSource:In=[],value:Un,onChange:Wn,onTitleChange:ir,className:Lr,title:Rr,titleWidth:Ye=41,style:tn={},fontColor:Ze="#6A7283",showCount:zn})=>{const[Qn,Jn]=(0,ae.useState)(0),[bn,Fn]=(0,ae.useState)(!1),cr=(0,ae.useRef)(null),wr=(0,ae.useRef)(null);return(0,ae.useEffect)(()=>{var Or;In.length!==0&&(((Or=cr==null?void 0:cr.current)==null?void 0:Or.clientHeight)>97?Jn(1):Jn(0)),In.length===0&&Jn(0),Fn(!1)},[In]),ae.createElement("div",{className:kt()(vt.row,Lr),style:tn},ae.createElement("div",{onClick:(0,bt.throttle)(()=>ir==null?void 0:ir(),2e3),style:{width:Ye,marginTop:bn?12:4},className:`${vt.title} ${ir?"current":""}`},Rr),ae.createElement("div",{className:bn?`${vt.tagsWrap} ${vt.tagsBorderWrap}`:vt.tagsWrap},ae.createElement("div",{className:vt.bar,ref:wr,style:Qn>0?{height:Qn===1?97:"auto",overflow:Qn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ae.createElement("div",{className:vt.tag,ref:cr},In==null?void 0:In.map(Or=>ae.createElement("span",{onClick:()=>Wn(Or.id),key:Or.id,style:{color:Ze},className:Un===Or.id?vt.active:""},ae.createElement("span",{title:Or.name,className:vt.name},Or.name),!!zn&&ae.createElement("span",{className:vt.num},Or.count))))),!!Qn&&ae.createElement(ae.Fragment,null,Qn===1?ae.createElement("div",{onClick:()=>{var Or;Jn(2),((Or=cr==null?void 0:cr.current)==null?void 0:Or.clientHeight)>245?Fn(!0):Fn(!1)},className:vt.action},"\u5C55\u5F00",ae.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ae.createElement("div",{onClick:()=>{wr.current.scrollTop=0,Jn(1),Fn(!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:In=[],value:Un,onChange:Wn,className:ir,style:Lr={}})=>ae.createElement("div",{style:Lr,className:kt()(mt.tabs,ir)},In.map(Rr=>ae.createElement("span",{onClick:()=>Wn(Rr.id),className:Un===Rr.id?mt.active:"",key:Rr.id},Rr.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=le(37568),it=({dataSource:In=[],value:Un="",onChange:Wn,onInputChange:ir=()=>{},className:Lr,style:Rr={},placeholder:Ye,allowClear:tn=!1})=>{var Ze;const[zn,Qn]=(0,ae.useState)(""),[Jn,bn]=(0,ae.useState)("");(0,ae.useEffect)(()=>{var wr;let Or=Un;(wr=JSON.stringify(Un))!=null&&wr.includes("{")&&(Qn(Un.id),Or=Un.value||"");try{bn(decodeURIComponent(Or||""))}catch(Ae){bn(decodeURIComponent(Or||""))}},[Un]);const Fn=()=>{Wn(encodeURIComponent(Jn),zn||null)},cr=wr=>{wr!==zn&&(Qn(wr),Wn(encodeURIComponent(Jn),wr))};return ae.createElement("div",{className:kt()(z.input,Lr),style:Rr},!!In.length&&ae.createElement("div",{className:z.dropdown},ae.createElement("div",{className:z.text},(Ze=In.find(wr=>wr.id===zn))==null?void 0:Ze.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},In.map((wr,Or)=>ae.createElement("div",{key:Or,onClick:()=>cr(wr.id)},wr.name)))),ae.createElement(tt.default,{onPressEnter:Fn,value:Jn,onChange:wr=>{bn(wr.target.value),ir(encodeURIComponent(wr.target.value),zn||null)},bordered:!1,placeholder:Ye}),ae.createElement("i",{onClick:Fn,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:In,onChange:Un,className:Wn,total:ir,pageSize:Lr,style:Rr={}})=>{const Ye=In<2,tn=In>=Math.ceil(ir/Lr);return ir<=Lr?ae.createElement(ae.Fragment,null):ae.createElement("div",{className:kt()(lt.quickPager,Wn),style:Rr},ae.createElement("div",{onClick:()=>{Ye||Un(In-1,"prev")},className:Ye?lt.disabled:""},"\u4E0A\u4E00\u9875"),ae.createElement("div",{onClick:()=>{tn||Un(In+1,"next")},className:tn?lt.disabled:""},"\u4E0B\u4E00\u9875"))},Pt={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=le(29787),Dt=le(25399),Ft=le(58018),jt=le(346),Nt=le(51257),Gt=le(96908),Wt=le(57177),Jt=le(81378),Ut=le(28426),oe=({className:In,dataSource:Un=[],col:Wn=4,right:ir,bottom:Lr=23,precision:Rr=0,wrapWidth:Ye=1200,trackEventItems:tn,loading:Ze})=>{const zn=Math.floor((Ye-(Wn-1)*ir)/Wn);return ae.createElement(At.Z,{spinning:Ze},ae.createElement("div",{className:kt()(Pt.list,In)},!!Un.length&&Un.map((Qn,Jn)=>{const{name:bn,id:Fn,identifier:cr,power:wr,cover_image_id:Or,pic:Ae}=Qn;return ae.createElement("div",{className:Pt.wrap,key:Fn,style:{width:zn,marginRight:(1+Jn)%Wn===0?0:ir+Rr,marginBottom:Lr}},ae.createElement("a",{target:"_blank",href:`/shixuns/${cr}/challenges`,className:Pt.li,onClick:Ve=>{Ve.preventDefault(),tn&&(0,Nt.L9)([tn]),wr&&(0,Nt.xg)(`/shixuns/${cr}/challenges`)}},ae.createElement("div",{className:Pt.img},ae.createElement("img",{className:Pt.cover,src:`${Ae}`}),Qn.is_jupyter&&ae.createElement("img",{className:Pt.sign,src:Gt}),Qn.is_jupyter_lab&&ae.createElement("img",{className:Pt.sign,src:Wt}),Qn.is_unity_3d&&ae.createElement("img",{className:Pt.sign,src:Jt})),ae.createElement("div",{className:Pt.name},ae.createElement(Dt.Z,{title:bn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ae.createElement("span",{className:Pt.e},bn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ae.createElement("div",{className:Pt.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,Qn.challenges_count))),!!Qn.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,Qn.myshixuns_count))),ae.createElement(Dt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ae.createElement("span",null,ae.createElement("span",null,Qn.level))),ae.createElement("div",{className:Pt.rate},ae.createElement(Ft.Z,{allowHalf:!0,disabled:!0,defaultValue:Qn.score_info}),ae.createElement("span",null,"\xA0",Qn.score_info?`${Qn.score_info}\u5206`:"5\u5206")))),!wr&&ae.createElement("div",{className:Pt.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")))}),!Un.length&&ae.createElement(Ut.Z,null)))},se=le(10661),fe={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"},Pe="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=le(59301),ye=({className:In,dataSource:Un=[],col:Wn=4,right:ir,bottom:Lr=23,precision:Rr=0,wrapWidth:Ye=1200,trackEventItems:tn,loading:Ze,handleVery:zn=()=>!0})=>{const Qn=Math.floor((Ye-(Wn-1)*ir)/Wn);return Yt.createElement(At.Z,{spinning:Ze},Yt.createElement("div",{className:kt()(fe.list,In)},!!Un.length&&Un.map((Jn,bn)=>{const{subject_identifier:Fn,id:cr,identifier:wr,power:Or}=Jn,Ae=Jn.is_public!=0&&Jn.is_public;return Yt.createElement("div",{className:fe.wrap,key:cr,style:{width:Qn,marginRight:(1+bn)%Wn===0?0:ir+Rr,marginBottom:Lr}},Yt.createElement("a",{className:fe.li,onClick:Ve=>{Ve.preventDefault(),zn(Jn==null?void 0:Jn.first_category_url)&&(tn&&(0,Nt.L9)([tn]),(0,Nt.xg)(Jn.first_category_url))}},Yt.createElement("div",{className:fe.top},Yt.createElement(Dt.Z,{title:Jn.name},Yt.createElement("div",{className:fe.name},Jn.name)),Yt.createElement("img",{className:fe.img,src:jt.Z.IMG_SERVER+"/images/"+Jn.avatar_url}),Yt.createElement("div",{className:fe.text,title:Jn.creator},Jn.creator),Fn&&Yt.createElement("div",{className:fe.btns},Yt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Yt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ae&&Yt.createElement("div",{className:fe.sign},"\u516C\u5F00")),Yt.createElement("div",{className:fe.bottom},Jn.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,Jn.visits))),Jn.course_members_count>0&&Yt.createElement(Dt.Z,{title:"\u6210\u5458",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-chengyuan"}),Jn.course_members_count)),Jn.tasks_count>0&&Yt.createElement(Dt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Yt.createElement("span",null,Yt.createElement("i",{className:"iconfont icon-zuoye"}),Jn.tasks_count)),Jn.is_end?Yt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Yt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Jn.is_accessible&&Yt.createElement("div",{className:fe.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")))}),!Un.length&&Yt.createElement(Ut.Z,null)))},xe={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"},be=le(25690),pe=({dataSource:In=[],value:Un,onChange:Wn,className:ir,style:Lr={},tabBarExtraContent:Rr})=>ae.createElement("div",{className:kt()(xe.tabs,ir),style:Lr},ae.createElement("div",{className:xe.tabsWrap},In.map((Ye,tn)=>!(Ye!=null&&Ye.hide)&&ae.createElement("aside",{className:xe.tab,onClick:()=>{Wn(Ye.id),Ye.link&&be.history.push(Ye.link)},key:tn},ae.createElement("div",{className:Un===Ye.id?xe.active:""},Ye.name),(Ye==null?void 0:Ye.resetCount)==null&&(Ye==null?void 0:Ye.total)!==void 0&&ae.createElement("span",null,"\uFF08",Ye==null?void 0:Ye.total,"\uFF09"),(Ye==null?void 0:Ye.resetCount)!==void 0&&(Ye==null?void 0:Ye.total)!==void 0&&ae.createElement(Dt.Z,{title:(Ye==null?void 0:Ye.tip)!=null?Ye==null?void 0:Ye.tip:""},ae.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ae.createElement("span",{style:{color:"#000"}},Ye==null?void 0:Ye.resetCount),"/",ae.createElement("span",null,Ye==null?void 0:Ye.total),"\uFF09"))))),ae.createElement("div",{className:xe.tabBar},Rr)),Ce=({className:In,style:Un={},children:Wn})=>ae.createElement("div",{className:kt()(In),style:Un},Wn),de={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"},Fe=le(75727),ge=le(93041);const Se=[{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:In,dropValue:Un,className:Wn,onSort:ir,onDrop:Lr,dataSource:Rr=Se})=>{var Ye;return ae.createElement("div",{className:kt()(de.orderWrap,Wn)},ae.createElement(Fe.Z,{dropdownRender:()=>ae.createElement(ge.default,null,Rr.map((tn,Ze)=>ae.createElement(ge.default.Item,{key:Ze,onClick:()=>Lr(tn.id)},tn.name)))},ae.createElement("span",{className:de.orderTextWrap},(Ye=Rr.find(tn=>Un===tn.id))==null?void 0:Ye.name)),ae.createElement("span",{className:de.orderIconWrap},ae.createElement("span",{className:de.orderAsc},ae.createElement("i",{className:In==="asc"?`iconfont icon-sanjiaoxing-up font12 ${de.cursorPointer} ${de.active}`:`iconfont icon-sanjiaoxing-up font12 ${de.cursorPointer}`,onClick:()=>ir(In==="asc"?"desc":"asc")})),ae.createElement("span",{className:de.orderDesc},ae.createElement("i",{className:In==="desc"?`iconfont icon-sanjiaoxing-down font12 ${de.cursorPointer} ${de.active}`:`iconfont icon-sanjiaoxing-down font12 ${de.cursorPointer}`,onClick:()=>ir(In==="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=le(99571),Xt=Object.defineProperty,ne=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Vt=(In,Un,Wn)=>Un in In?Xt(In,Un,{enumerable:!0,configurable:!0,writable:!0,value:Wn}):In[Un]=Wn,$t=(In,Un)=>{for(var Wn in Un||(Un={}))It.call(Un,Wn)&&Vt(In,Wn,Un[Wn]);if(ne)for(var Wn of ne(Un))Rt.call(Un,Wn)&&Vt(In,Wn,Un[Wn]);return In},ue=(In,Un)=>{var Wn={};for(var ir in In)It.call(In,ir)&&Un.indexOf(ir)<0&&(Wn[ir]=In[ir]);if(In!=null&&ne)for(var ir of ne(In))Un.indexOf(ir)<0&&Rt.call(In,ir)&&(Wn[ir]=In[ir]);return Wn},me=(In,Un,Wn)=>new Promise((ir,Lr)=>{var Rr=Ze=>{try{tn(Wn.next(Ze))}catch(zn){Lr(zn)}},Ye=Ze=>{try{tn(Wn.throw(Ze))}catch(zn){Lr(zn)}},tn=Ze=>Ze.done?ir(Ze.value):Promise.resolve(Ze.value).then(Rr,Ye);tn((Wn=Wn.apply(In,Un)).next())}),Ne=In=>{var Un=In,{className:Wn,style:ir,children:Lr,loading:Rr=!1,openLoading:Ye,onClick:tn=()=>{},size:Ze="middle",shape:zn="round"}=Un,Qn=ue(Un,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Jn,bn]=(0,ae.useState)(!1);return ae.createElement(Lt.ZP,$t({onClick:(0,bt.throttle)(Fn=>me(void 0,null,function*(){Ye&&bn(!0);try{yield tn(Fn)}catch(cr){console.log("error",cr)}Ye&&bn(!1)}),2e3,{leading:!0,trailing:!1}),className:kt()(wt.btn,wt[`${Ze}-${zn}`],Wn),style:ir,size:Ze,shape:zn,loading:Jn||Rr},Qn),Lr)},Be={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Qe=({className:In,style:Un,children:Wn=null,onClick:ir,title:Lr})=>ae.createElement("div",{className:kt()(Be.head,In),style:Un},ae.createElement("span",{className:"primary-hover",onClick:ir},ae.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ae.createElement("b",{title:Lr},Lr),ae.createElement("div",{className:Be.node},Wn)),qe={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:In=!0,confirmTitle:Un,confirmClick:Wn,cancelShow:ir=!0,cancelTitle:Lr,cancelClick:Rr,className:Ye,style:tn,confirmLoading:Ze=!1})=>ae.createElement("div",{className:kt()(qe.btns,Ye),style:tn},In&&ae.createElement(Lt.ZP,{loading:Ze,onClick:Wn,type:"primary",className:qe.confirm},Un),ir&&ae.createElement(Lt.ZP,{onClick:Rr,className:qe.cancel},Lr)),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:In,style:Un={},LeftContent:Wn,children:ir,RightContent:Lr})=>ae.createElement("div",{className:kt()(We.fixedBottom,In),style:Un},ae.createElement("div",{className:We.wrap},ae.createElement("div",{className:We.left},Wn),ae.createElement("div",{className:We.center},ir),ae.createElement("div",{className:We.right},Lr))),an={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"},gn=({className:In,style:Un={},dataSource:Wn=[]})=>ae.createElement("div",{className:kt()(an.crumbs,In),style:Un},Wn.map((ir,Lr)=>Lr<Wn.length-1?ae.createElement(ae.Fragment,{key:Lr},ir.path||ir.onClick?ae.createElement("span",{className:an.hover,onClick:ir!=null&&ir.onClick?ir.onClick:()=>be.history.push(ir.path)},ir.name):ae.createElement("span",null,ir.name),ae.createElement("span",null,"\xA0",">","\xA0")):ae.createElement("span",{key:Lr,style:{color:"#5F6368"}},ir.name))),Gn=le(11938),Zn=Object.defineProperty,Kn=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,Fr=(In,Un,Wn)=>Un in In?Zn(In,Un,{enumerable:!0,configurable:!0,writable:!0,value:Wn}):In[Un]=Wn,vr=(In,Un)=>{for(var Wn in Un||(Un={}))Er.call(Un,Wn)&&Fr(In,Wn,Un[Wn]);if(pr)for(var Wn of pr(Un))Mr.call(Un,Wn)&&Fr(In,Wn,Un[Wn]);return In},dr=(In,Un)=>Kn(In,Pr(Un)),Ur=(In,Un)=>{var Wn={};for(var ir in In)Er.call(In,ir)&&Un.indexOf(ir)<0&&(Wn[ir]=In[ir]);if(In!=null&&pr)for(var ir of pr(In))Un.indexOf(ir)<0&&Mr.call(In,ir)&&(Wn[ir]=In[ir]);return Wn};const{Countdown:qt}=Gn.default;var Xn=In=>{var Un=In,{onChange:Wn}=Un,ir=Ur(Un,["onChange"]);const[Lr,Rr]=(0,ae.useState)(null);(0,ae.useEffect)(()=>{typeof Lr=="number"&&Lr>=0&&Wn(Lr)},[Lr]);const Ye=tn=>{const Ze=Math.floor(tn/1e3);Rr(Ze)};return ae.createElement(qt,dr(vr({},ir),{onChange:Ye}))}},37808:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Re}});var ae=le(59301);function Re(ot,_t){const Bt=(0,ae.useRef)();(0,ae.useEffect)(()=>{Bt.current=ot}),(0,ae.useEffect)(()=>{function vt(){Bt.current()}if(_t!==null){let gt=setInterval(vt,_t);return()=>clearInterval(gt)}},[_t])}},96662:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Gt}});var ae=le(59301),Re=le(28284),ot=le(30641),_t=le(62957),Bt=le(6767),vt=le(62673),gt=le(75975),kt=le(58397),bt=le(91558),St=le(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=le(89392),ft=le(9148),z=le(59301),tt=Object.defineProperty,at=Object.defineProperties,it=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Pt=(Jt,Ut,Ht)=>Ut in Jt?tt(Jt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):Jt[Ut]=Ht,At=(Jt,Ut)=>{for(var Ht in Ut||(Ut={}))ut.call(Ut,Ht)&&Pt(Jt,Ht,Ut[Ht]);if(lt)for(var Ht of lt(Ut))dt.call(Ut,Ht)&&Pt(Jt,Ht,Ut[Ht]);return Jt},Dt=(Jt,Ut)=>at(Jt,it(Ut));const Ft={theme:(0,St.G)("cmCodeMode","vs-dark"),fontSize:(0,St.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,St.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 Gt=({isLoading:Jt,value:Ut=[],onChange:Ht,form:oe})=>{var se;const[fe,Pe]=(0,ae.useReducer)(Nt,Ft),{theme:Yt,fontSize:ee,showEditorSetting:ye,tabToSpace:xe}=fe,[be,ce]=(0,ae.useState)("C"),[pe,he]=(0,ae.useState)(!1),[Ce,de]=(0,ae.useState)([]),Fe=(0,ae.useRef)([]),ge=Re.default.useWatch(["hack","languages"],oe);(0,ae.useEffect)(()=>{Ut!=null&&Ut.length&&(Fe.current=(0,xt.cloneDeep)(Ut))},[Ut]),(0,ae.useEffect)(()=>{pe&&de(ge)},[pe]),(0,ae.useEffect)(()=>{ce(ge==null?void 0:ge[0])},[ge]);const Se={onFontSizeChange:ne=>{Pe({type:0,payload:ne}),(0,St.t)("cmFontSize",ne)},tabToSpace:xe,cmFontSize:ee,className:"oj",cmCodeMode:Yt,onTabToSpace:ne=>{Pe({type:2,payload:ne}),(0,St.t)("cmTabToSpace",ne)},onCodeModeChange:ne=>{Pe({type:1,payload:ne}),(0,St.t)("cmCodeMode",ne)}};function re(){Pe({type:3,payload:!1})}function Kt(){Pe({type:3,payload:!0})}function wt(ne){var It;const Rt=(It=Fe.current)==null?void 0:It.map(Vt=>(Vt.language===be&&(Vt.code=ne),Vt));Fe.current=(0,xt.cloneDeep)(Rt),Ht(Rt)}const Lt={key:be,value:(se=Ut==null?void 0:Ut.find(ne=>ne.language===be))==null?void 0:se.code,language:be,onChange:wt,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:ee,insertSpaces:xe}};console.log(888,Ut,ge);const Xt=Ut.filter(ne=>ge==null?void 0:ge.includes(ne.language));return z.createElement(ae.Fragment,null,z.createElement("div",{className:Tt["code-panel-container"]},z.createElement(Wt,{setVisible:he,languageItems:Xt,onLanguage:ne=>ce(ne),language:be,onShowCodeSetting:Kt}),!Jt&&z.createElement(gt.ZP,At({},Lt))),z.createElement(bt.Z,null,z.createElement(ot.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ye,onClose:re},z.createElement(kt.Z,At({},Se)))),z.createElement(_t.default,{centered:!0,open:pe,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),he(!1)},onCancel:()=>he(!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:ne=>{de(ne)}}))))};function Wt({languageItems:Jt,language:Ut,onShowCodeSetting:Ht,onLanguage:oe,setVisible:se}){return z.createElement("div",{className:Tt["action-oj-bar"]},Jt==null?void 0:Jt.map(fe=>z.createElement("aside",{className:Ut===(fe==null?void 0:fe.language)?Tt.active:"",onClick:()=>oe(fe==null?void 0:fe.language),key:fe==null?void 0:fe.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,fe==null?void 0:fe.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(fn,cn,le){"use strict";le.d(cn,{GM:function(){return kt},MK:function(){return gt},PR:function(){return Re},ZS:function(){return St},d1:function(){return ot},fu:function(){return _t},j2:function(){return bt},l_:function(){return Bt},uE:function(){return Tt},zQ:function(){return vt}});var ae=le(38986);function Re(){return(0,ae.U2)("problems/new.json")}function ot(xt="question"){return(0,ae.U2)("disciplines.json",{source:xt})}function _t(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 bt(xt){return(0,ae.v_)(`problems/${xt}/publish.json`)}function St(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(fn,cn,le){"use strict";le.d(cn,{D0:function(){return gt},R8:function(){return _t},jw:function(){return vt},y3:function(){return kt}});var ae=le(82326),Re=le(59301);const{Option:ot}=ae.default;var _t=(bt=>(bt[bt.language=0]="language",bt[bt.difficult=1]="difficult",bt[bt.category=2]="category",bt[bt.openOrNot=3]="openOrNot",bt))(_t||{});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(bt){return Bt[bt].map(St=>Re.createElement(ot,{key:St.title,value:St.key}," ",St.title," "))}function gt(bt,St){bt.map(Tt=>{const{id:mt,name:xt,sub_disciplines:ft}=Tt;let z={value:mt,label:xt};St.push(z),ft&&ft.length>0&&(z.children=[],gt(ft,z.children))})}function kt(bt,St){var Tt;let mt=[];for(let xt=0;xt<bt.length;xt++){const ft=bt[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===St)return mt[1]=tt.id,[mt,tt.tag_disciplines||tt.sub_disciplines||[]]}}}return[mt,[]]}},3532:function(fn,cn,le){"use strict";le.d(cn,{Y2:function(){return se},ZP:function(){return fe}});var ae=le(59301),Re=le(14566),ot=le(6767),_t=le(62957),Bt=le(77019),vt=le(47889),gt=le(99571),kt=le(62673),bt=le(25399),St=le(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=le(47257),ft=le.n(xt),z=le(16253),tt=le(38986),at=le(1012),it=le(51257),lt=le(45677),ut=le(59301),dt=Object.defineProperty,Pt=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Nt=(Pe,Yt,ee)=>Yt in Pe?dt(Pe,Yt,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Pe[Yt]=ee,Gt=(Pe,Yt)=>{for(var ee in Yt||(Yt={}))Ft.call(Yt,ee)&&Nt(Pe,ee,Yt[ee]);if(Dt)for(var ee of Dt(Yt))jt.call(Yt,ee)&&Nt(Pe,ee,Yt[ee]);return Pe},Wt=(Pe,Yt)=>Pt(Pe,At(Yt)),Jt=(Pe,Yt,ee)=>new Promise((ye,xe)=>{var be=he=>{try{pe(ee.next(he))}catch(Ce){xe(Ce)}},ce=he=>{try{pe(ee.throw(he))}catch(Ce){xe(Ce)}},pe=he=>he.done?ye(he.value):Promise.resolve(he.value).then(be,ce);pe((ee=ee.apply(Pe,Yt)).next())});const{Dragger:Ut}=Re.default,Ht=Pe=>{const Yt=Ce=>Ce&&Ce.substring(0,Ce.lastIndexOf("."));for(var ee=[...Pe],ye=0,xe=[],be=0;be<ee.length;be++){for(var ce="",pe=0;pe<xe.length;pe++)if(Yt(xe[pe][0].name)==Yt(ee[be].name)){ye=1,ce=pe;break}if(ye==1)xe[ce].push(ee[be]),ye=0;else if(ye==0){let Ce=new Array;Ce.push(ee[be]),xe.push(Ce)}}return xe.map(Ce=>{if(Ce.forEach(de=>{let Fe=de.name.split(/\.(?=[^\.]+$)/);de.name=`${Fe[0]}.${Fe[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:Pe,onOK:Yt,visible:ee,wrapClassName:ye,rootIdentifier:xe,multiple:be=!1,defaultMultipleValue:ce=!0})=>{const[pe,he]=(0,ae.useState)([]),[Ce,de]=(0,ae.useState)({}),[Fe,ge]=(0,ae.useState)(!1),[Se,re]=(0,ae.useState)(!0),Kt=(0,ae.useRef)([]),wt=(0,ae.useRef)(0),Lt=()=>{Pe()};(0,ae.useEffect)(()=>{Xt()},[]),(0,ae.useEffect)(()=>{ee&&(Kt.current=[],wt.current=0,he([]),re(ce))},[ee]);const Xt=()=>Jt(void 0,null,function*(){try{const Le=yield(0,tt.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Ne=JSON.parse((0,z.pe)(Le.data));de(Ne)}catch(Le){}}),ne=Le=>Le&&Le.substring(0,Le.lastIndexOf(".")),It=Le=>{var Ne,Be;const Xe=ne((Ne=Le[0])==null?void 0:Ne.name)||ne((Be=Le[1])==null?void 0:Be.name),Qe=pe.filter(qe=>ne(qe.name)!==Xe);Kt.current=[...Qe],he([...Qe])},Rt=Le=>{if(!Se){const He=new FormData;He.append("file",Le.file),(0,tt.ZP)("/api/attachments/get_file_content.json",{method:"post",body:He},!0).then(We=>{if(We.status===0){wt.current=wt.current+1;const Ke=Kt.current.map(rn=>{var an;if(rn.name===Le.name){const ln=Gt({},rn);return(an=Le==null?void 0:Le.name)!=null&&an.includes(".in")?ln.input=We==null?void 0:We.content:ln.output=We==null?void 0:We.content,ln}return rn});if(Kt.current=[...Ke],he([...Ke]),wt.current>0&&wt.current===pe.length){ge(!1);let rn=Ht(Ke);rn=rn.filter(an=>{var ln,gn;return!!((ln=an[0])!=null&&ln.name&&((gn=an[1])!=null&&gn.name))}),rn=rn.map(an=>Wt(Gt(Gt({},an[0]),an[1]),{is_file:!1})),Yt(rn),Pe()}}else ge(!1),Pe()});return}const Ne=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}),Be=Le.name,Xe={container_type:"TestSet",file_name:Be},Qe=(0,at.Z)();let qe=`testsets/${xe}/${Qe}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`;xe===null&&(qe=`testsets/${Qe}${Be.indexOf(".")>-1?"."+Be.split(".").pop():""}`),Ne.multipartUpload(qe,new Blob([Le.file],{type:Le.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Be+""},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)(Xe)}}).then(function(He){if(He.data.status===0){wt.current=wt.current+1;const Ue=Kt.current.map(We=>{var Ke,rn,an,ln,gn,Gn,Zn,Kn,Pr,pr,Er,Mr,Fr,vr,dr,Ur,qt;if(We.name===((rn=(Ke=He.data)==null?void 0:Ke.data)==null?void 0:rn.file_name)){const An=Gt({},We);return(gn=(ln=(an=He.data)==null?void 0:an.data)==null?void 0:ln.file_name)!=null&&gn.includes(".in")?(An.in_object_key=(Zn=(Gn=He.data)==null?void 0:Gn.data)==null?void 0:Zn.object,An.in_object_size=(Pr=(Kn=He.data)==null?void 0:Kn.data)==null?void 0:Pr.size,An.input=(Er=(pr=He.data)==null?void 0:pr.data)==null?void 0:Er.file_name,An.in_file=Le):(An.out_object_key=(Fr=(Mr=He.data)==null?void 0:Mr.data)==null?void 0:Fr.object,An.out_object_size=(dr=(vr=He.data)==null?void 0:vr.data)==null?void 0:dr.size,An.output=(qt=(Ur=He.data)==null?void 0:Ur.data)==null?void 0:qt.file_name,An.out_file=Le),An}return We});if(Kt.current=[...Ue],he([...Ue]),wt.current>0&&wt.current===pe.length){ge(!1);let We=Ht(Ue);We=We.filter(Ke=>{var rn,an;return!!((rn=Ke[0])!=null&&rn.name&&((an=Ke[1])!=null&&an.name))}),We=We.map(Ke=>Wt(Gt(Gt({},Ke[0]),Ke[1]),{is_file:!0})),Yt(We),Pe()}}})},Vt=Le=>new Promise((Ne,Be)=>{let Xe=0,Qe=[];for(let qe=0;qe<Le.length;qe++)Le[qe].file.slice(0,1).arrayBuffer().then(()=>{Xe++,Xe===Le.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`),Be()):Ne(Le))}).catch(He=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",He),Xe++,Qe.push(Le[qe].name),Xe===Le.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`),Be()):Ne(Le))})}),$t=()=>Jt(void 0,null,function*(){if(pe.length===0){ot.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Vt(pe),ge(!0),Ht(pe).some(Ne=>{var Be,Xe;return!((Be=Ne[0])!=null&&Be.name&&((Xe=Ne[1])!=null&&Xe.name))})){_t.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*(){pe.map(Ne=>Jt(void 0,null,function*(){Rt(Ne)}))}),onCancel:()=>{ge(!1)}});return}pe.map(Ne=>Jt(void 0,null,function*(){Rt(Ne)}))}),ue={name:"file",fileList:pe,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Le=>{if(pe!=null&&pe.some(Be=>Be.name===Le.name))return ot.ZP.info(`${Le.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Le.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(Le.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 Ne={name:Le.name,uid:Le.uid,file:Le,percent:0};return pe.push(Ne),Kt.current=[...pe],he([...pe]),!1}},me=Ht(pe);return console.log(pe,me,"fileList"),ut.createElement(_t.default,{open:ee,wrapClassName:ye,onOk:$t,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Fe},onCancel:Lt,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ut.createElement("div",{className:Tt.wrap},pe.length?ut.createElement("div",null,ut.createElement(Bt.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ut.createElement("div",{style:{visibility:be?"visible":"hidden"}},ut.createElement("span",{className:Tt.greyText},"\u7528\u4F8B\u7C7B\u578B"),ut.createElement(vt.ZP.Group,{className:`ml20 ${Tt.testCaseRadio}`,optionType:"button",value:Se,onChange:Le=>re(Le.target.value)},ut.createElement(vt.ZP,{value:!1},"\u6587\u672C"),ut.createElement(vt.ZP,{value:!0},"\u6587\u4EF6"))),ut.createElement(Re.default,Gt({},ue),ut.createElement(gt.ZP,{type:"primary",className:Tt.btnS},ut.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ut.createElement(se,{data:me,onRemove:It})):ut.createElement("div",{className:`${Tt.noData} mb30`},ut.createElement(Re.default.Dragger,Wt(Gt({},ue),{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:Pe=[],onRemove:Yt,width:ee="auto",showScore:ye=!1,disabled:xe=!1,inputChange:be,onEvaluatingChange:ce,onSelectAll:pe,checkAll1:he,checkAll2:Ce,checkAll3:de,checkAll4:Fe,checkAll5:ge,showEvaluatingSetting:Se=!1,className:re="",isProgramHomework:Kt=!1})=>{const wt={value:"",filename:"",dataUrl:""},[Lt,Xt]=(0,ae.useState)(Gt({},wt)),ne=Vt=>{let $t=document.createElement("a");document.body.appendChild($t);let ue=URL.createObjectURL(Vt.file);$t.href=ue,$t.download=Vt.name,$t.click(),URL.revokeObjectURL(ue),document.body.removeChild($t)},It=(Vt,$t)=>{(0,it.LR)(Vt,$t)},Rt=(Vt,$t)=>{_t.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(Vt,$t)},onCancel:()=>{}})};return Pe.length?ut.createElement("div",{className:re,style:{width:ee}},ut.createElement("div",{className:`${Kt?Tt.headProgram:Tt.head}`},Se&&ut.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:he,onChange:Vt=>{pe(Vt.target.checked,"hidden")}}),ut.createElement(bt.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:ye?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ut.createElement("div",{style:{width:ye?Kt?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),ye&&ut.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Se&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:Fe,onChange:Vt=>{pe(Vt.target.checked,"input_visible")}}),ut.createElement(bt.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"}))),Se&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:Ce,onChange:Vt=>{pe(Vt.target.checked,"is_invisible")}}),ut.createElement(bt.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"}))),Se&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:ge,onChange:Vt=>{pe(Vt.target.checked,"actual_output_visible")}}),ut.createElement(bt.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"}))),Se&&ut.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ut.createElement(kt.default,{checked:de,onChange:Vt=>{pe(Vt.target.checked,"last_match_rule")}}),ut.createElement(bt.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"}},Pe.map((Vt,$t)=>{var ue,me,Le,Ne;return ut.createElement("div",{key:$t,className:Tt.list,style:Kt?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},Se&&ut.createElement("div",{style:{width:"15%"}},ut.createElement(kt.default,{checked:!!Vt.hidden,onChange:Be=>{ce(Be.target.checked,$t,"hidden")}})),ut.createElement("div",{style:{width:Kt?"25%":"15%",paddingLeft:Kt?"5px":"0px",paddingRight:Kt?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",$t+1),ut.createElement("div",{className:Tt.info,style:{width:ye?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Vt.input||((ue=Vt[0])==null?void 0:ue.name),onClick:()=>Jt(void 0,null,function*(){let Be;Vt.input?Vt.input_file_url?Be=Vt.input_file_url:Be=Vt.in_file:Be=Vt[0];let Xe;typeof Be=="string"?(Xe=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield Xe.text(),filename:"",dataUrl:Be})):(Xe=yield(0,it.db)(Be.file),Xt({value:Xe.text,filename:Be.name,dataUrl:Xe.link}))})},Vt.input||((me=Vt[0])==null?void 0:me.name))),ut.createElement("div",{className:Tt.info,style:{width:ye?Kt?"20%":"15%":"25%"}},ut.createElement("span",{title:Vt.output||((Le=Vt[1])==null?void 0:Le.name),onClick:()=>Jt(void 0,null,function*(){let Be;Vt.input?Vt.output_file_url?Be=Vt.output_file_url:Be=Vt.out_file:Be=Vt[1];let Xe;typeof Be=="string"?(Xe=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xt({value:yield Xe.text(),filename:"",dataUrl:Be})):(Xe=yield(0,it.db)(Be.file),Xt({value:Xe.text,filename:Be.name,dataUrl:Xe.link}))})},Vt.output||((Ne=Vt[1])==null?void 0:Ne.name))),ye&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(St.default,{size:"large",addonAfter:Kt?"%":null,disabled:xe,style:{width:"80%"},onChange:Be=>be(Be,$t),value:Vt.score}),!Kt&&ut.createElement("span",null,"\xA0%")),Se&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.input_visible||!1,onChange:Be=>{ce(Be.target.checked,$t,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Se&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.is_invisible||!1,onChange:Be=>{ce(Be.target.checked,$t,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Se&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.actual_output_visible||!1,onChange:Be=>{ce(Be.target.checked,$t,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Se&&ut.createElement("div",{style:{width:"20%"}},ut.createElement(kt.default,{checked:Vt.last_match_rule||!1,onChange:Be=>{ce(Be.target.checked,$t,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ut.createElement("div",{onClick:()=>Rt(Vt,$t),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:()=>Xt(Gt({},wt)),monacoEditor:{value:Lt.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ut.createElement(ut.Fragment,null)};var fe=oe},34269:function(fn,cn,le){"use strict";le.d(cn,{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(fn,cn,le){"use strict";le.d(cn,{AL:function(){return dt},Iy:function(){return Tt},Qv:function(){return ft},ez:function(){return ut},jb:function(){return mt}});var ae=le(32834),Re=le.n(ae),ot=le(11690),_t=le.n(ot);let Bt=1;function vt(jt,Nt){const Gt=jt.match(/^(\s+)(?:```)/);if(Gt===null)return Nt;const Wt=Gt[1];return Nt.split(`
|
|
`).map(Jt=>{const Ut=Jt.match(/^\s+/);if(Ut===null)return Jt;const[Ht]=Ut;return Ht.length>=Wt.length?Jt.slice(Wt.length):Jt}).join(`
|
|
`)}let gt=[],kt=["<ul>"];const bt=new(Re()).Renderer,St=/^ *(#{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,Gt,Wt){if(Nt>=jt.length||jt[Nt].level<=Gt)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(Ht){Wt.push(Ht)}),Wt.push("</ul>")),Wt.push("</li>"),Nt=xt(jt,Nt,Gt,Wt),Nt}function ft(){return xt(gt,0,0,kt),kt.push("</ul>"),kt.join("")}const z={heading(jt){const Nt=St.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 Gt=Nt[0];let Wt=vt(Gt,Nt[3]||"");const Jt=Nt[2]?Nt[2].trim():Nt[2];if(["latex","katex","math"].indexOf(Jt)>=0){const Ut=it(),Ht=Wt;Wt=Ut,lt[Ut]={type:"block",expression:Ht}}return{type:"code",raw:Gt,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 Pt(jt){return jt=jt.replace(tt,(Nt,Gt)=>{const Wt=it();return lt[Wt]={type:"inline",expression:Gt},Wt}),jt}const At=bt.listitem;bt.listitem=function(jt){return At(Pt(jt))};const Dt=bt.paragraph;bt.paragraph=function(jt){return Dt(Pt(jt))};const Ft=bt.tablecell;bt.tablecell=function(jt,Nt){return Ft(Pt(jt),Nt)},bt.code=function(jt,Nt,Gt){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}">${Gt?jt:(0,ot.escape)(jt,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Gt?jt:(0,ot.escape)(jt,!0))+"</code></pre>"},bt.heading=function(jt,Nt,Gt){let Wt=this.options.headerPrefix+Gt.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:bt}),cn.ZP=Re()},23992:function(fn,cn,le){"use strict";le.d(cn,{G:function(){return Bt},t:function(){return _t}});var ae=le(7062),Re=le.n(ae);const ot=null;function _t(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(fn){(function(cn){(function(le){if(1)fn.exports=le();else var ae})(function(){var le,ae,Re;return function(){function ot(_t,Bt,vt){function gt(St,Tt){if(!Bt[St]){if(!_t[St]){var mt=void 0;if(!Tt&&mt)return require(St,!0);if(kt)return kt(St,!0);var xt=new Error("Cannot find module '"+St+"'");throw xt.code="MODULE_NOT_FOUND",xt}var ft=Bt[St]={exports:{}};_t[St][0].call(ft.exports,function(z){var tt=_t[St][1][z];return gt(tt||z)},ft,ft.exports,ot,_t,Bt,vt)}return Bt[St].exports}for(var kt=void 0,bt=0;bt<vt.length;bt++)gt(vt[bt]);return gt}return ot}()({1:[function(ot,_t,Bt){"use strict";var vt=ot("./browser/client");vt.Buffer=ot("buffer").Buffer,vt.urllib=ot("../shims/xhr"),vt.version=ot("./browser/version").version,_t.exports=vt},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ot,_t,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 bt=ot("assert"),St=ot("../common/utils/checkBucketName"),Tt=St.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,Pt;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 Pt=Dt.sent,Dt.abrupt("return",{bucket:Pt.headers.location&&Pt.headers.location.substring(1)||null,res:Pt.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,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return dt=this._bucketRequestParams("PUT",it,"logging",ut),Pt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(it,`</TargetBucket>
|
|
`),lt&&(Pt+="<TargetPrefix>".concat(lt,`</TargetPrefix>
|
|
`)),Pt+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,dt.content=Pt,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,Pt;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,Pt=dt.data.LoggingEnabled,Dt.abrupt("return",{enable:!!Pt,prefix:Pt&&Pt.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,Pt,At,Dt,Ft,jt,Nt,Gt,Wt,Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:for(lt=lt||[],bt(lt.length,"rules is required"),lt.forEach(function(oe){bt(oe.allowedOrigin,"allowedOrigin is required"),bt(oe.allowedMethod,"allowedMethod is required")}),dt=this._bucketRequestParams("PUT",it,"cors",ut),Pt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,At=function(se){Pt+="<AllowedOrigin>".concat(se,"</AllowedOrigin>")},Dt=function(se){Pt+="<AllowedMethod>".concat(se,"</AllowedMethod>")},Ft=function(se){Pt+="<AllowedHeader>".concat(se,"</AllowedHeader>")},jt=function(se){Pt+="<ExposeHeader>".concat(se,"</ExposeHeader>")},Nt=0,Gt=lt.length;Nt<Gt;Nt++)Wt=lt[Nt],Pt+="<CORSRule>",ft(Wt.allowedOrigin).forEach(At),ft(Wt.allowedMethod).forEach(Dt),ft(Wt.allowedHeader).forEach(Ft),ft(Wt.exposeHeader).forEach(jt),Wt.maxAgeSeconds&&(Pt+="<MaxAgeSeconds>".concat(Wt.maxAgeSeconds,"</MaxAgeSeconds>")),Pt+="</CORSRule>";return Pt+="</CORSConfiguration>",dt.content=Pt,dt.mime="xml",dt.successStatuses=[200],Ht.next=16,this.request(dt);case 16:return Jt=Ht.sent,Ht.abrupt("return",{res:Jt.res});case 18:case"end":return Ht.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,Pt,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,Pt=[],dt.data&&dt.data.CORSRule&&(At=dt.data.CORSRule,xt(At)||(At=[At]),At.forEach(function(jt){var Nt={};Object.keys(jt).forEach(function(Gt){Nt[Gt.slice(0,1).toLowerCase()+Gt.slice(1,Gt.length)]=jt[Gt]}),Pt.push(Nt)})),Ft.abrupt("return",{rules:Pt,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 Pt,At,Dt,Ft;return gt.default.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:if(Pt=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>",Pt.content=At,Pt.mime="xml",Pt.successStatuses=[200],Nt.next=10,this.request(Pt);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,Pt;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,Pt=dt.data.RefererList.Referer||null,Pt&&(xt(Pt)||(Pt=[Pt])),Dt.abrupt("return",{allowEmpty:dt.data.AllowEmptyReferer==="true",referers:Pt,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&<.timeout,ctx: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,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),bt=kt(ot("@babel/runtime/regenerator")),St=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"),Pt=ot("../common/utils/createRequest"),At=Pt.createRequest,Dt=ot("../common/utils/encoder"),Ft=Dt.encoder,jt=ot("../common/client/getReqUrl"),Nt=jt.getReqUrl,Gt=ot("../common/utils/setSTSToken"),Wt=Gt.setSTSToken,Jt=ot("../common/utils/retry"),Ut=Jt.retry,Ht=ot("../common/utils/isFunction"),oe=Ht.isFunction,se=new xt;function fe(){var be=z.name,ce=z.version;be&&be.toLowerCase&&be.toLowerCase()==="ie"&&ce.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Pe(){return location&&location.protocol==="https:"}function Yt(be,ce){if(fe(),!(this instanceof Yt))return new Yt(be,ce);be&&be.inited?this.options=be:this.options=Yt.initOptions(be),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}_t.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 pe=Object.assign({secure:Pe(),useFetch:!1},ce);return dt(pe)};var ee=Yt.prototype;ee.debug=Tt,ft(ee,ot("./object")),ft(ee,ot("./bucket")),ft(ee,ot("../common/bucket/getBucketWebsite")),ft(ee,ot("../common/bucket/putBucketWebsite")),ft(ee,ot("../common/bucket/deleteBucketWebsite")),ft(ee,ot("../common/bucket/getBucketLifecycle")),ft(ee,ot("../common/bucket/putBucketLifecycle")),ft(ee,ot("../common/bucket/deleteBucketLifecycle")),ft(ee,ot("../common/bucket/putBucketVersioning")),ft(ee,ot("../common/bucket/getBucketVersioning")),ft(ee,ot("../common/bucket/getBucketInventory")),ft(ee,ot("../common/bucket/deleteBucketInventory")),ft(ee,ot("../common/bucket/listBucketInventory")),ft(ee,ot("../common/bucket/putBucketInventory")),ft(ee,ot("../common/bucket/abortBucketWorm")),ft(ee,ot("../common/bucket/completeBucketWorm")),ft(ee,ot("../common/bucket/extendBucketWorm")),ft(ee,ot("../common/bucket/getBucketWorm")),ft(ee,ot("../common/bucket/initiateBucketWorm")),ft(ee,ot("./managed-upload")),ft(ee,ot("../common/multipart-copy")),ft(ee,ot("../common/multipart")),ft(ee,ot("../common/parallel")),ee.signature=function(ce){return this.debug("authorization stringToSign: %s",ce,"info"),ut.computeSignature(this.options.accessKeySecret,ce,this.options.headerEncoding)},ee._getReqUrl=Nt,ee.authorization=function(ce,pe,he,Ce){var de=ut.buildCanonicalString(ce.toUpperCase(),pe,{headers:Ce,parameters:he});return ut.authorization(this.options.accessKeyId,this.options.accessKeySecret,de,this.options.headerEncoding)},ee.request=function(){var be=(0,St.default)(bt.default.mark(function ce(pe){var he=this;return bt.default.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(!this.options.retryMax){de.next=6;break}return de.next=3,Ut(ye.bind(this),this.options.retryMax,{errorHandler:function(ge){var Se=function(Kt){if(pe.stream)return!1;var wt=[-1,-2].includes(Kt.status),Lt=he.options.requestErrorRetryHandle||function(){return!0};return wt&&Lt(Kt)};return!!Se(ge)}})(pe);case 3:return de.abrupt("return",de.sent);case 6:return de.abrupt("return",ye.call(this,pe));case 7:case"end":return de.stop()}},ce,this)}));return function(ce){return be.apply(this,arguments)}}();function ye(be){return xe.apply(this,arguments)}function xe(){return xe=(0,St.default)(bt.default.mark(function be(ce){var pe,he,Ce,de,Fe,ge;return bt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(this.options.stsToken&&oe(this.options.refreshSTSToken))){re.next=3;break}return re.next=3,Wt.call(this);case 3:return pe=At.call(this,ce),this.options.useFetch||(pe.params.mode="disable-fetch"),de=!!ce.stream,re.prev=6,re.next=9,this.urllib.request(pe.url,pe.params);case 9:he=re.sent,this.debug("response %s %s, got %s, headers: %j",ce.method,pe.url,he.status,he.headers,"info"),re.next=16;break;case 13:re.prev=13,re.t0=re.catch(6),Ce=re.t0;case 16:if(!(he&&ce.successStatuses&&ce.successStatuses.indexOf(he.status)===-1)){re.next=28;break}return re.next=19,this.requestError(he);case 19:if(Fe=re.sent,!(Fe.code==="RequestTimeTooSkewed"&&!de)){re.next=25;break}return this.options.amendTimeSkewed=+new Date(Fe.serverTime)-new Date,re.next=24,this.request(ce);case 24:return re.abrupt("return",re.sent);case 25:Fe.params=ce,re.next=32;break;case 28:if(!Ce){re.next=32;break}return re.next=31,this.requestError(Ce);case 31:Fe=re.sent;case 32:if(!Fe){re.next=34;break}throw Fe;case 34:if(!ce.xmlResponse){re.next=39;break}return re.next=37,this.parseXML(he.data);case 37:ge=re.sent,he.data=ge;case 39:return re.abrupt("return",he);case 40:case"end":return re.stop()}},be,this,[[6,13]])})),xe.apply(this,arguments)}ee._getResource=function(ce){var pe="/";return ce.bucket&&(pe+="".concat(ce.bucket,"/")),ce.object&&(pe+=Ft(ce.object,this.options.headerEncoding)),pe},ee._escape=function(ce){return tt.encodeURIComponent(ce).replace(/%2F/g,"/")},ee._getUserAgent=function(){var ce=gt&>.browser?"js":"nodejs",pe="aliyun-sdk-".concat(ce,"/").concat(it.version),he=z.description;return!he&>&&(he="Node.js ".concat(gt.version.slice(1)," on ").concat(gt.platform," ").concat(gt.arch)),this._checkUserAgent("".concat(pe," ").concat(he))},ee._checkUserAgent=function(ce){var pe=ce.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return pe},ee.checkBrowserAndVersion=function(ce,pe){return lt.name===ce&<.version.split(".")[0]===pe},ee.parseXML=function(ce){return new Promise(function(pe,he){vt.isBuffer(ce)&&(ce=ce.toString()),mt.parseString(ce,{explicitRoot:!1,explicitArray:!1},function(Ce,de){Ce?he(Ce):pe(de)})})},ee.requestError=function(){var be=(0,St.default)(bt.default.mark(function pe(he){var Ce,de,Fe,ge;return bt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Ce=null,!(!he.data||!he.data.length)){re.next=5;break}he.status===-1||he.status===-2?(Ce=new Error(he.message),Ce.name=he.name,Ce.status=he.status,Ce.code=he.name):(he.status===404?(Ce=new Error("Object not exists"),Ce.name="NoSuchKeyError",Ce.status=404,Ce.code="NoSuchKey"):he.status===412?(Ce=new Error("Pre condition failed"),Ce.name="PreconditionFailedError",Ce.status=412,Ce.code="PreconditionFailed"):(Ce=new Error("Unknow error, status: ".concat(he.status)),Ce.name="UnknownError",Ce.status=he.status),Ce.requestId=he.headers["x-oss-request-id"],Ce.host=""),re.next=32;break;case 5:return de=String(he.data),this.debug("request response error data: %s",de,"error"),re.prev=7,re.next=10,this.parseXML(de);case 10:if(re.t0=re.sent,re.t0){re.next=13;break}re.t0={};case 13:Fe=re.t0,re.next=23;break;case 16:return re.prev=16,re.t1=re.catch(7),this.debug(de,"error"),re.t1.message+=`
|
|
raw xml: `.concat(de),re.t1.status=he.status,re.t1.requestId=he.headers["x-oss-request-id"],re.abrupt("return",re.t1);case 23:ge=Fe.Message||"unknow request error, status: ".concat(he.status),Fe.Condition&&(ge+=" (condition: ".concat(Fe.Condition,")")),Ce=new Error(ge),Ce.name=Fe.Code?"".concat(Fe.Code,"Error"):"UnknownError",Ce.status=he.status,Ce.code=Fe.Code,Ce.requestId=Fe.RequestId,Ce.hostId=Fe.HostId,Ce.serverTime=Fe.ServerTime;case 32:return this.debug("generate error %j",Ce,"error"),re.abrupt("return",Ce);case 34:case"end":return re.stop()}},pe,this,[[7,16]])}));function ce(pe){return be.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,_t,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 bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=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,bt.default)(kt.default.mark(function Nt(Gt,Wt){var Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee,ye=arguments;return kt.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Jt=ye.length>2&&ye[2]!==void 0?ye[2]:{},this.resetCancelFlag(),Jt.disabledMD5=Jt.disabledMD5===void 0?!0:!!Jt.disabledMD5,!(Jt.checkpoint&&Jt.checkpoint.uploadId)){be.next=8;break}return Wt&&at(Wt)&&(Jt.checkpoint.file=Wt),be.next=7,this._resumeMultipart(Jt.checkpoint,Jt);case 7:return be.abrupt("return",be.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),be.next=14,this._getFileSize(Wt);case 14:if(Ht=be.sent,!(Ht<Ut)){be.next=26;break}return Jt.contentLength=Ht,be.next=19,this.put(Gt,Wt,Jt);case 19:if(oe=be.sent,!(Jt&&Jt.progress)){be.next=23;break}return be.next=23,Jt.progress(1);case 23:return se={res:oe.res,bucket:this.options.bucket,name:Gt,etag:oe.res.headers.etag},(Jt.headers&&Jt.headers["x-oss-callback"]||Jt.callback)&&(se.data=oe.data),be.abrupt("return",se);case 26:if(!(Jt.partSize&&parseInt(Jt.partSize,10)!==Jt.partSize)){be.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Jt.partSize&&Jt.partSize<Ut)){be.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ut));case 30:return be.next=32,this.initMultipartUpload(Gt,Jt);case 32:if(fe=be.sent,Pe=fe.uploadId,Yt=this._getPartSize(Ht,Jt.partSize),ee={file:Wt,name:Gt,fileSize:Ht,partSize:Yt,uploadId:Pe,doneParts:[]},!(Jt&&Jt.progress)){be.next=39;break}return be.next=39,Jt.progress(0,ee,fe.res);case 39:return be.next=41,this._resumeMultipart(ee,Jt);case 41:return be.abrupt("return",be.sent);case 42:case"end":return be.stop()}},Nt,this)}));function jt(Nt,Gt){return Ft.apply(this,arguments)}return jt}(),ut._resumeMultipart=function(){var Ft=(0,bt.default)(kt.default.mark(function Nt(Gt,Wt){var Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee,ye,xe,be,ce,pe,he,Ce,de,Fe,ge;return kt.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(Jt=this,!this.isCancel()){re.next=3;break}throw this._makeCancelEvent();case 3:return Ut=Gt.file,Ht=Gt.fileSize,oe=Gt.partSize,se=Gt.uploadId,fe=Gt.doneParts,Pe=Gt.name,Yt=[],fe.length>0&&xt(fe).to(Yt),ee=this._divideParts(Ht,oe),ye=ee.length,xe=!1,be=function(wt,Lt){return new Promise(function(){var Xt=(0,bt.default)(kt.default.mark(function ne(It,Rt){var Vt,$t,ue,me,Le;return kt.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:if(Be.prev=0,wt.isCancel()){Be.next=29;break}return Vt=ee[Lt-1],Be.next=5,wt._createBuffer(Ut,Vt.start,Vt.end);case 5:return $t=Be.sent,ue={content:$t,size:Vt.end-Vt.start},Be.prev=7,Be.next=10,wt._uploadPart(Pe,se,Lt,ue,Wt);case 10:me=Be.sent,Be.next=18;break;case 13:if(Be.prev=13,Be.t0=Be.catch(7),Be.t0.status!==404){Be.next=17;break}throw wt._makeAbortEvent();case 17:throw Be.t0;case 18:if(!(!wt.isCancel()&&!xe)){Be.next=26;break}if(Gt.doneParts.push({number:Lt,etag:me.res.headers.etag}),!Wt.progress){Be.next=23;break}return Be.next=23,Wt.progress(fe.length/(ye+1),Gt,me.res);case 23:It({number:Lt,etag:me.res.headers.etag}),Be.next=27;break;case 26:It();case 27:Be.next=30;break;case 29:It();case 30:Be.next=41;break;case 32:Be.prev=32,Be.t1=Be.catch(0),Le=new Error,Le.name=Be.t1.name,Le.message=Be.t1.message,Le.stack=Be.t1.stack,Le.partNum=Lt,xt(Be.t1).to(Le),Rt(Le);case 41:case"end":return Be.stop()}},ne,null,[[0,32],[7,13]])}));return function(ne,It){return Xt.apply(this,arguments)}}())},ce=Array.from(new Array(ye),function(Kt,wt){return wt+1}),pe=Yt.map(function(Kt){return Kt.number}),he=ce.filter(function(Kt){return pe.indexOf(Kt)<0}),Ce=5,de=Wt.parallel||Ce,re.next=17,this._parallel(he,de,function(Kt){return new Promise(function(wt,Lt){be(Jt,Kt).then(function(Xt){Xt&&Yt.push(Xt),wt()}).catch(function(Xt){Lt(Xt)})})});case 17:if(Fe=re.sent,xe=!0,ge=Fe.find(function(Kt){return Kt.name==="abort"}),!ge){re.next=22;break}throw ge;case 22:if(!this.isCancel()){re.next=25;break}throw be=null,this._makeCancelEvent();case 25:if(!(Fe&&Fe.length>0)){re.next=28;break}throw Fe[0].message="Failed to upload some parts with error: ".concat(Fe[0].toString()," part_num: ").concat(Fe[0].partNum),Fe[0];case 28:return re.next=30,this.completeMultipartUpload(Pe,se,Yt,Wt);case 30:return re.abrupt("return",re.sent);case 31:case"end":return re.stop()}},Nt,this)}));function jt(Nt,Gt){return Ft.apply(this,arguments)}return jt}(),ut._getFileSize=function(){var Ft=(0,bt.default)(kt.default.mark(function Nt(Gt){return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!lt(Gt)){Jt.next=4;break}return Jt.abrupt("return",Gt.length);case 4:if(!(z(Gt)||at(Gt))){Jt.next=6;break}return Jt.abrupt("return",Gt.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"),Pt=dt.Readable;function At(Ft,jt){if(!(this instanceof At))return new At(Ft,jt);Pt.call(this,jt),this.file=Ft,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}St.inherits(At,Pt),At.prototype.readFileAndPush=function(jt){if(this.fileBuffer)for(var Nt=!0;Nt&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Gt=this.start,Wt=Gt+jt;Wt=Wt>this.fileBuffer.length?this.fileBuffer.length:Wt,this.start=Wt,Nt=this.push(this.fileBuffer.slice(Gt,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 Gt=this;this.reader.onload=function(Jt){Gt.fileBuffer=vt.from(new Uint8Array(Jt.target.result)),Gt.file=null,Gt.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 Gt=new FileReader;Gt.onload=function(Wt){jt(Wt.target.result)},Gt.onerror=function(Wt){Nt(Wt)},Gt.readAsArrayBuffer(Ft)})}ut._createBuffer=function(){var Ft=(0,bt.default)(kt.default.mark(function Nt(Gt,Wt,Jt){var Ut,Ht;return kt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!(z(Gt)||at(Gt))){se.next=8;break}return Ut=Gt.slice(Wt,Jt),se.next=4,Dt(Ut);case 4:return Ht=se.sent,se.abrupt("return",vt.from(Ht));case 8:if(!lt(Gt)){se.next=12;break}return se.abrupt("return",Gt.subarray(Wt,Jt));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return se.stop()}},Nt)}));function jt(Nt,Gt,Wt){return Ft.apply(this,arguments)}return jt}(),ut._getPartSize=function(jt,Nt){var Gt=1e4,Wt=1*1024*1024;Nt||(Nt=Wt);var Jt=Math.ceil(jt/Gt);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 Gt=Math.ceil(jt/Nt),Wt=[],Jt=0;Jt<Gt;Jt++){var Ut=Nt*Jt,Ht=Math.min(Ut+Nt,jt);Wt.push({start:Ut,end:Ht})}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,_t,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")),bt=ot("fs"),St=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"),Pt=dt.obj2xml,At=Bt;At.append=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,Gt,Wt){var Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Wt=Wt||{},Wt.position===void 0&&(Wt.position="0"),Wt.subres={append:"",position:Wt.position},Wt.method="POST",Ht.next=6,this.put(Nt,Gt,Wt);case 6:return Jt=Ht.sent,Jt.nextAppendPosition=Jt.res.headers["x-oss-next-append-position"],Ht.abrupt("return",Jt);case 9:case"end":return Ht.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.put=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,Gt,Wt){var Jt,Ut,Ht,oe,se;return gt.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(Wt=Wt||{},Wt.disabledMD5=Wt.disabledMD5===void 0?!0:!!Wt.disabledMD5,Wt.headers=Wt.headers||{},Nt=this._objectName(Nt),!ut(Gt)){Pe.next=8;break}Jt=Gt,Pe.next=19;break;case 8:if(!(tt(Gt)||it(Gt))){Pe.next=18;break}return Wt.mime||(it(Gt)?Wt.mime=mt.getType(Tt.extname(Gt.name)):Wt.mime=Gt.type),Pe.next=12,this._createBuffer(Gt,0,Gt.size);case 12:return Jt=Pe.sent,Pe.next=15,this._getFileSize(Gt);case 15:Wt.contentLength=Pe.sent,Pe.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",Ht=this._objectRequestParams(Ut,Nt,Wt),xt.encodeCallback(Ht,Wt),Ht.mime=Wt.mime,Ht.disabledMD5=Wt.disabledMD5,Ht.content=Jt,Ht.successStatuses=[200],Pe.next=29,this.request(Ht);case 29:return oe=Pe.sent,se={name:Nt,url:this._objectUrl(Nt),res:oe.res},Ht.headers&&Ht.headers["x-oss-callback"]&&(se.data=JSON.parse(oe.data.toString())),Pe.abrupt("return",se);case 33:case"end":return Pe.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.putStream=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,Gt,Wt){var Jt,Ut,Ht,oe;return gt.default.wrap(function(fe){for(;;)switch(fe.prev=fe.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=Gt,Ut.successStatuses=[200],fe.next=13,this.request(Ut);case 13:return Ht=fe.sent,oe={name:Nt,url:this._objectUrl(Nt),res:Ht.res},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Ht.data.toString())),fe.abrupt("return",oe);case 17:case"end":return fe.stop()}},jt,this)}));function Ft(jt,Nt,Gt){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,Gt,Wt){var Jt;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,this.copy(Nt,Nt,{meta:Gt||{},timeout:Wt&&Wt.timeout,ctx:Wt&&Wt.ctx});case 2:return Jt=Ht.sent,Ht.abrupt("return",Jt);case 4:case"end":return Ht.stop()}},jt,this)}));function Ft(jt,Nt,Gt){return Dt.apply(this,arguments)}return Ft}(),At.list=function(){var Dt=(0,kt.default)(gt.default.mark(function jt(Nt,Gt){var Wt,Jt,Ut,Ht,oe;return gt.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return Wt=this._objectRequestParams("GET","",Gt),Wt.query=Nt,Wt.xmlResponse=!0,Wt.successStatuses=[200],fe.next=6,this.request(Wt);case 6:return Jt=fe.sent,Ut=Jt.data.Contents||[],Ht=this,Ut&&(Array.isArray(Ut)||(Ut=[Ut]),Ut=Ut.map(function(Pe){return{name:Pe.Key,url:Ht._objectUrl(Pe.Key),lastModified:Pe.LastModified,etag:Pe.ETag,type:Pe.Type,size:Number(Pe.Size),storageClass:Pe.StorageClass,owner:{id:Pe.Owner.ID,displayName:Pe.Owner.DisplayName}}})),oe=Jt.data.CommonPrefixes||null,oe&&(Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(Pe){return Pe.Prefix})),fe.abrupt("return",{res:Jt.res,objects:Ut,prefixes:oe,nextMarker:Jt.data.NextMarker||null,isTruncated:Jt.data.IsTruncated==="true"});case 13:case"end":return fe.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 Gt,Wt,Jt,Ut,Ht,oe,se,fe=arguments;return gt.default.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Gt=fe.length>1&&fe[1]!==void 0?fe[1]:{},Wt=Nt["continuation-token"]||Nt.continuationToken,Wt&&(Gt.subres=Object.assign({"continuation-token":Wt},Gt.subres)),Jt=this._objectRequestParams("GET","",Gt),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,Ht=Ut.data.Contents||[],oe=this,Ht&&(Array.isArray(Ht)||(Ht=[Ht]),Ht=Ht.map(function(ee){var ye=null;return ee.Owner&&(ye={id:ee.Owner.ID,displayName:ee.Owner.DisplayName}),{name:ee.Key,url:oe._objectUrl(ee.Key),lastModified:ee.LastModified,etag:ee.ETag,type:ee.Type,size:Number(ee.Size),storageClass:ee.StorageClass,owner:ye}})),se=Ut.data.CommonPrefixes||null,se&&(Array.isArray(se)||(se=[se]),se=se.map(function(ee){return ee.Prefix})),Yt.abrupt("return",{res:Ut.res,objects:Ht,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 Gt,Wt,Jt,Ut,Ht=arguments;return gt.default.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return Gt=Ht.length>1&&Ht[1]!==void 0?Ht[1]:{type:"Archive"},Gt=Gt||{},Gt.subres=Object.assign({restore:""},Gt.subres),Gt.versionId&&(Gt.subres.versionId=Gt.versionId),Wt=this._objectRequestParams("POST",Nt,Gt),Gt.type==="ColdArchive"&&(Jt={RestoreRequest:{Days:Gt.Days?Gt.Days:2,JobParameters:{Tier:Gt.JobParameters?Gt.JobParameters:"Standard"}}},Wt.content=Pt(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 Gt={object:jt,bucket:this.options.bucket,method:Ft,subres:Nt&&Nt.subres,timeout:Nt&&Nt.timeout,ctx:Nt&&Nt.ctx};return Nt.headers&&(Gt.headers={},St(Nt.headers).to(Gt.headers)),Gt},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){bt.exists(Ft,function(Gt){Gt?bt.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,_t,Bt){"use strict";Bt.version="6.18.1"},{}],7:[function(ot,_t,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 bt=ot("../utils/checkBucketName");function St(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 bt.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=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ot,_t,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 bt=ot("../utils/checkBucketName");function St(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 bt.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=St},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ot,_t,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 bt=ot("../utils/checkBucketName");function St(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&<[2]!==void 0?lt[2]:{},tt=Object.assign({inventory:"",inventoryId:ft},z.subres),bt.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=St},{"../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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.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 St(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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.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 St(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,_t,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 bt=ot("../utils/checkBucketName"),St=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(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return bt.checkBucketName(ft),it=this._bucketRequestParams("POST",ft,{wormExtend:"",wormId:z},at),lt={ExtendWormConfiguration:{RetentionPeriodInDays:tt}},it.mime="xml",it.content=St.obj2xml(lt,{headers:!0}),it.successStatuses=[200],Pt.next=8,this.request(it);case 8:return ut=Pt.sent,Pt.abrupt("return",{res:ut.res,status:ut.status});case 10:case"end":return Pt.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,_t,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 bt=ot("../utils/checkBucketName"),St=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(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return tt=ut.length>2&&ut[2]!==void 0?ut[2]:{},at=Object.assign({inventory:"",inventoryId:z},tt.subres),bt.checkBucketName(ft),it=this._bucketRequestParams("GET",ft,at,tt),it.successStatuses=[200],it.xmlResponse=!0,Pt.next=8,this.request(it);case 8:return lt=Pt.sent,Pt.abrupt("return",{status:lt.status,res:lt.res,inventory:St.formatInventoryConfig(lt.data)});case 10:case"end":return Pt.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,_t,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")),bt=ot("../utils/checkBucketName"),St=bt.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,Pt,At;return gt.default.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return St(lt),dt=this._bucketRequestParams("GET",lt,"lifecycle",ut),dt.successStatuses=[200],dt.xmlResponse=!0,Ft.next=6,this.request(dt);case 6:return Pt=Ft.sent,At=Pt.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:Pt.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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.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 St(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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.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 St(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,_t,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 bt=ot("../utils/checkBucketName"),St=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 bt.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,St.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,_t,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 bt=ot("../utils/obj2xml"),St=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 St.checkBucketName(ft),at=this._bucketRequestParams("POST",ft,"worm",tt),it={InitiateWormConfiguration:{RetentionPeriodInDays:z}},at.mime="xml",at.content=bt.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,_t,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 bt=ot("../utils/checkBucketName"),St=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,Pt,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),bt.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,Pt=lt.status,Ft.abrupt("return",{isTruncated:ut.IsTruncated==="true",nextContinuationToken:ut.NextContinuationToken,inventoryList:St.formatInventoryConfig(ut.InventoryConfiguration,!0),status:Pt,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,_t,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 bt=ot("../utils/checkBucketName"),St=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,Pt,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),bt.checkBucketName(ft),it=z.OSSBucketDestination,lt=z.optionalFields,ut=z.includedObjectVersions,dt="acs:oss:::",Pt="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(Pt).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=St.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,_t,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")),bt=ot("../utils/checkBucketName"),St=bt.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"),Pt=dt.getStrBytesCount,At=Bt;At.putBucketLifecycle=function(){var Gt=(0,kt.default)(gt.default.mark(function Jt(Ut,Ht,oe){var se,fe,Pe,Yt,ee;return gt.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(St(Ut),mt(Ht)){xe.next=3;break}throw new Error("rules must be Array");case 3:return se=this._bucketRequestParams("PUT",Ut,"lifecycle",oe),fe=[],Pe={LifecycleConfiguration:{Rule:fe}},Ht.forEach(function(be){Dt(be),Nt(be),be.id&&(be.ID=be.id,delete be.id),fe.push(be)}),Yt=it(Pe,{headers:!0,firstUpperCase:!0}),se.content=Yt,se.mime="xml",se.successStatuses=[200],xe.next=13,this.request(se);case 13:return ee=xe.sent,xe.abrupt("return",{res:ee.res});case 15:case"end":return xe.stop()}},Jt,this)}));function Wt(Jt,Ut,Ht){return Gt.apply(this,arguments)}return Wt}();function Dt(Gt){Gt.days&&(Gt.expiration={days:Gt.days}),Gt.date&&(Gt.expiration={createdBeforeDate:Gt.date})}function Ft(Gt,Wt){var Jt=Gt.days,Ut=Gt.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(Gt){if(!mt(Gt)&&!tt(Gt))throw new Error("tag must be Object or Array");Gt=tt(Gt)?[Gt]:Gt;var Wt={},Jt=ft(Gt);Jt.forEach(function(Ut){Wt[Ut.key]=Ut.value}),ut(Wt)}function Nt(Gt){if(Gt.id&&Pt(Gt.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Gt.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Gt.status))throw new Error("Status must be Enabled or Disabled");if(Gt.transition){if(!["IA","Archive"].includes(Gt.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Ft(Gt.transition,"Transition")}if(Gt.expiration){if(!Gt.expiration.expiredObjectDeleteMarker)Ft(Gt.expiration,"Expiration");else if(Gt.expiration.days||Gt.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Gt.abortMultipartUpload&&Ft(Gt.abortMultipartUpload,"AbortMultipartUpload"),!Gt.expiration&&!Gt.abortMultipartUpload&&!Gt.transition&&!Gt.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Gt.tag){if(Gt.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");jt(Gt.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,_t,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")),bt=ot("../utils/checkBucketName"),St=bt.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,Pt,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]:{},St(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 Pt=Ft.sent,Ft.abrupt("return",{res:Pt.res,status:Pt.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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("../utils/checkBucketName"),St=bt.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,Pt,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,St(lt),Pt=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),Pt.content=Ft,Pt.mime="xml",Pt.successStatuses=[200],Wt.next=20,this.request(Pt);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,_t,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,bt){if(kt.headers=kt.headers||{},!Object.prototype.hasOwnProperty.call(kt.headers,"x-oss-callback")&&bt.callback){var St={callbackUrl:encodeURI(bt.callback.url),callbackBody:bt.callback.body};bt.callback.host&&(St.callbackHost=bt.callback.host),bt.callback.contentType&&(St.callbackBodyType=bt.callback.contentType);var Tt=vt.from(JSON.stringify(St)).toString("base64");if(kt.headers["x-oss-callback"]=Tt,bt.callback.customValue){var mt={};Object.keys(bt.callback.customValue).forEach(function(xt){mt["x:".concat(xt)]=bt.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,_t,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")),bt=vt(ot("merge-descriptors")),St=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&&bt.default(it,ft.query),ft.subres){var lt={};St.default.string(ft.subres)?lt[ft.subres]="":St.default.array(ft.subres)?ft.subres.forEach(function(ut){lt[ut]=""}):lt=ft.subres,bt.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,_t,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"),bt=kt.checkBucketName,St=ot("../utils/setRegion"),Tt=St.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}_t.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&&bt(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,_t,Bt){"use strict";var vt=ot("merge-descriptors"),gt=Bt;vt(gt,ot("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ot,_t,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")),bt=ot("../utils/checkBucketName"),St=bt.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,Pt){var At,Dt,Ft,jt;return gt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return z(lt,"sourceObject"),z(ut,"targetObject"),z(dt,"process"),ut=this._objectName(ut),Pt&&St(Pt),At=this._objectRequestParams("POST",lt,{subres:"x-oss-process"}),Dt=Pt?",b_".concat(xt(Pt)):"",ut=xt(ut),Ft={"x-oss-process":"".concat(dt,"|sys/saveas,o_").concat(ut).concat(Dt)},At.content=Tt.stringify(Ft),Gt.next=12,this.request(At);case 12:return jt=Gt.sent,Gt.abrupt("return",{res:jt.res,status:jt.res.status});case 14:case"end":return Gt.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,_t,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")),bt=ot("debug")("ali-oss:multipart-copy"),St=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,Pt,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?Pt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey),"?versionId=").concat(dt):Pt="/".concat(lt.sourceBucketName,"/").concat(encodeURIComponent(lt.sourceKey)),ut.headers["x-oss-copy-source"]=Pt,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,Pt,At,Dt,Ft,jt,Nt,Gt,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,Pt=dt.res.headers["content-length"],tt.startOffset=tt.startOffset||0,tt.endOffset=tt.endOffset||Pt,!(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),Gt={name:z,copySize:Dt,partSize:Nt,uploadId:jt,doneParts:[]},!(at&&at.progress)){Ut.next=29;break}return Ut.next=29,at.progress(0,Gt,Ft.res);case 29:return Ut.next=31,this._resumeMultipartCopy(Gt,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,Pt,At,Dt,Ft,jt,Nt,Gt,Wt,Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee;return gt.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(!this.isCancel()){xe.next=2;break}throw this._makeCancelEvent();case 2:if(it=at.versionId,lt=it===void 0?null:it,ut={versionId:lt},dt=z.copySize,Pt=z.partSize,At=z.uploadId,Dt=z.doneParts,Ft=z.name,jt=this._divideMultipartCopyParts(dt,Pt,tt.startOffset),Nt=jt.length,Gt={headers:{}},at.copyheaders&&St(at.copyheaders).to(Gt.headers),lt&&St(ut).to(Gt),Wt=function(ce,pe,he){return new Promise(function(){var Ce=(0,kt.default)(gt.default.mark(function de(Fe,ge){var Se,re,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 Se=jt[pe-1],re="".concat(Se.start,"-").concat(Se.end-1),Lt.prev=4,Lt.next=7,ce.uploadPartCopy(Ft,At,pe,re,he,Gt);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(bt("content-range ".concat(Kt.res.headers["content-range"])),Dt.push({number:pe,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:Fe(),Lt.next=29;break;case 25:Lt.prev=25,Lt.t1=Lt.catch(0),Lt.t1.partNum=pe,ge(Lt.t1);case 29:case"end":return Lt.stop()}},de,null,[[0,25],[4,10]])}));return function(de,Fe){return Ce.apply(this,arguments)}}())},Jt=Array.from(new Array(Nt),function(be,ce){return ce+1}),Ut=Dt.map(function(be){return be.number}),Ht=Jt.filter(function(be){return Ut.indexOf(be)<0}),oe=5,se=at.parallel||oe,!(this.checkBrowserAndVersion("Internet Explorer","10")||se===1)){xe.next=28;break}fe=0;case 18:if(!(fe<Ht.length)){xe.next=26;break}if(!this.isCancel()){xe.next=21;break}throw this._makeCancelEvent();case 21:return xe.next=23,Wt(this,Ht[fe],tt);case 23:fe++,xe.next=18;break;case 26:xe.next=40;break;case 28:return xe.next=30,this._parallelNode(Ht,se,Wt,tt);case 30:if(Pe=xe.sent,Yt=Pe.find(function(be){return be.name==="abort"}),!Yt){xe.next=34;break}throw Yt;case 34:if(!this.isCancel()){xe.next=36;break}throw this._makeCancelEvent();case 36:if(!(Pe&&Pe.length>0)){xe.next=40;break}throw ee=Pe[0],ee.message="Failed to copy some parts with error: ".concat(ee.toString()," part_num: ").concat(ee.partNum),ee;case 40:return xe.next=42,this.completeMultipartUpload(Ft,At,Dt,at);case 42:return xe.abrupt("return",xe.sent);case 43:case"end":return xe.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,_t,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 bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=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,bt.default)(kt.default.mark(function dt(Pt,At){var Dt,Ft,jt,Nt;return kt.default.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return At=At||{},Dt={},St(At).to(Dt),Dt.subres="uploads",Ft=this._objectRequestParams("GET","",Dt),Ft.query=Pt,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,Pt){return lt.apply(this,arguments)}return ut}(),it.listParts=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft){var jt,Nt,Gt;return kt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Ft=Ft||{},jt={},St(Ft).to(jt),jt.subres={uploadId:At},Nt=this._objectRequestParams("GET",Pt,jt),Nt.query=Dt,Nt.xmlResponse=!0,Nt.successStatuses=[200],Jt.next=10,this.request(Nt);case 10:return Gt=Jt.sent,Jt.abrupt("return",{res:Gt.res,uploadId:Gt.data.UploadId,bucket:Gt.data.Bucket,name:Gt.data.Key,partNumberMarker:Gt.data.PartNumberMarker,nextPartNumberMarker:Gt.data.NextPartNumberMarker,maxParts:Gt.data.MaxParts,isTruncated:Gt.data.IsTruncated,parts:Gt.data.Part||[]});case 12:case"end":return Jt.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it.abortMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,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={},St(Dt).to(Ft),Ft.subres={uploadId:At},jt=this._objectRequestParams("DELETE",Pt,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,Pt,At){return lt.apply(this,arguments)}return ut}(),it.initMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At){var Dt,Ft,jt;return kt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return At=At||{},Dt={},St(At).to(Dt),Dt.headers=Dt.headers||{},this._convertMetaToHeaders(At.meta,Dt.headers),Dt.subres="uploads",Ft=this._objectRequestParams("POST",Pt,Dt),Ft.mime=At.mime,Ft.xmlResponse=!0,Ft.successStatuses=[200],Gt.next=12,this.request(Ft);case 12:return jt=Gt.sent,Gt.abrupt("return",{res:jt.res,bucket:jt.data.Bucket,name:jt.data.Key,uploadId:jt.data.UploadId});case 14:case"end":return Gt.stop()}},dt,this)}));function ut(dt,Pt){return lt.apply(this,arguments)}return ut}(),it.uploadPart=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft,jt,Nt,Gt){var Wt,Jt;return kt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Wt={size:Nt-jt},Jt=vt&&vt.browser,!Jt){Ht.next=8;break}return Ht.next=5,this._createBuffer(Ft,jt,Nt);case 5:Wt.content=Ht.sent,Ht.next=11;break;case 8:return Ht.next=10,this._createStream(Ft,jt,Nt);case 10:Wt.stream=Ht.sent;case 11:return Ht.next=13,this._uploadPart(Pt,At,Dt,Wt,Gt);case 13:return Ht.abrupt("return",Ht.sent);case 14:case"end":return Ht.stop()}},dt,this)}));function ut(dt,Pt,At,Dt,Ft,jt,Nt){return lt.apply(this,arguments)}return ut}(),it.completeMultipartUpload=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft){var jt,Nt,Gt,Wt,Jt,Ut,Ht,oe;return kt.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:for(jt=Dt.concat().sort(function(Pe,Yt){return Pe.number-Yt.number}).filter(function(Pe,Yt,ee){return!Yt||Pe.number!==ee[Yt-1].number}),Nt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Gt=0;Gt<jt.length;Gt++)Wt=jt[Gt],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(Pe){if(z(Pe))return null}),Jt.subres={uploadId:At},Jt.headers=at(Jt.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ut=this._objectRequestParams("POST",Pt,Jt),Tt.encodeCallback(Ut,Jt),Ut.mime="xml",Ut.content=Nt,Ut.headers&&Ut.headers["x-oss-callback"]||(Ut.xmlResponse=!0),Ut.successStatuses=[200],fe.next=17,this.request(Ut);case 17:if(Ht=fe.sent,!Ft.progress){fe.next=21;break}return fe.next=21,Ft.progress(1,null,Ht.res);case 21:return oe={res:Ht.res,bucket:Ut.bucket,name:Pt,etag:Ht.res.headers.etag},Ut.headers&&Ut.headers["x-oss-callback"]&&(oe.data=JSON.parse(Ht.data.toString())),fe.abrupt("return",oe);case 24:case"end":return fe.stop()}},dt,this)}));function ut(dt,Pt,At,Dt){return lt.apply(this,arguments)}return ut}(),it._uploadPart=function(){var lt=(0,bt.default)(kt.default.mark(function dt(Pt,At,Dt,Ft,jt){var Nt,Gt,Wt,Jt;return kt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return jt=jt||{},Nt={},St(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},Gt=this._objectRequestParams("PUT",Pt,Nt),Gt.mime=Nt.mime,Wt=vt&&vt.browser,Wt?Gt.content=Ft.content:Gt.stream=Ft.stream,Gt.successStatuses=[200],Gt.disabledMD5=jt.disabledMD5,Ht.next=15,this.request(Gt);case 15:if(Jt=Ht.sent,Jt.res.headers.etag){Ht.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,Gt.stream=null),Ht.abrupt("return",{name:Pt,etag:Jt.res.headers.etag,res:Jt.res});case 20:case"end":return Ht.stop()}},dt,this)}));function ut(dt,Pt,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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/regenerator")),kt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),bt=ot("url"),St=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 Pt(At,Dt){var Ft,jt,Nt,Gt,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=St.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),Gt=mt._signatureForURL(this.options.accessKeySecret,Dt,Nt,Ft),Wt=bt.parse(this._getReqUrl(jt)),Wt.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Ft,Signature:Gt.Signature},Tt(Gt.subResource).to(Wt.query),Ut.abrupt("return",Wt.format());case 17:case"end":return Ut.stop()}},Pt,this)}));function dt(Pt,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,_t,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")),bt=vt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("../utils/checkBucketName"),Tt=St.checkBucketName,mt=Bt,xt=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];mt.copy=function(){var ft=(0,bt.default)(gt.default.mark(function tt(at,it,lt,ut){var dt,Pt,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 Pt=Ft.sent,At=Pt.data,At&&(At={etag:At.ETag,lastModified:At.LastModified}),Ft.abrupt("return",{data:At,res:Pt.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,_t,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")),bt=Bt;bt.delete=function(){var St=(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 St.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,_t,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")),bt=ot("utility"),St=ot("../utils/obj2xml"),Tt=St.obj2xml,mt=Bt;mt.deleteMulti=function(){var xt=(0,kt.default)(gt.default.mark(function z(tt){var at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Wt,Jt=arguments;return gt.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(at=Jt.length>1&&Jt[1]!==void 0?Jt[1]:{},it=[],!(!tt||!tt.length)){Ht.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=bt.escape(this._objectName(tt[lt])):(dt=tt[lt],Pt=dt.key,At=dt.versionId,ut.Key=bt.escape(this._objectName(Pt)),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],Ht.next=16,this.request(jt);case 16:return Nt=Ht.sent,Gt=Nt.data,Wt=Gt&&Gt.Deleted||null,Wt&&(Array.isArray(Wt)||(Wt=[Wt])),Ht.abrupt("return",{res:Nt.res,deleted:Wt||[]});case 21:case"end":return Ht.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,_t,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")),bt=Bt;bt.deleteObjectTagging=function(){var St=(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 St.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,_t,Bt){"use strict";ot("core-js/modules/es.array.concat.js");var vt=ot("url"),gt=ot("../utils/isIP"),kt=gt.isIP,bt=Bt;bt.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,_t,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 bt=gt(ot("@babel/runtime/helpers/asyncToGenerator")),St=ot("fs"),Tt=ot("is-type-of"),mt=Bt;mt.get=function(){var xt=(0,bt.default)(kt.default.mark(function z(tt,at){var it,lt,ut,dt,Pt,At,Dt,Ft,jt=arguments;return kt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.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=St.createWriteStream(at),ut=!0):it=at,it=it||{},dt=vt&&vt.browser,Pt=it.responseCacheControl===null?"":"no-cache",At=dt&&Pt?{"response-cache-control":Pt}:{},it.subres=Object.assign(At,it.subres),it.versionId&&(it.subres.versionId=it.versionId),it.process&&(it.subres["x-oss-process"]=it.process),Gt.prev=11,Ft=this._objectRequestParams("GET",tt,it),Ft.writeStream=lt,Ft.successStatuses=[200,206,304],Gt.next=17,this.request(Ft);case 17:Dt=Gt.sent,ut&<.destroy(),Gt.next=28;break;case 21:if(Gt.prev=21,Gt.t0=Gt.catch(11),!ut){Gt.next=27;break}return lt.destroy(),Gt.next=27,this._deleteFileSafe(at);case 27:throw Gt.t0;case 28:return Gt.abrupt("return",{res:Dt.res,content:Dt.data});case 29:case"end":return Gt.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,_t,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")),bt=Bt;bt.getACL=function(){var St=(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 St.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,_t,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")),bt=Bt,St=ot("../utils/isObject"),Tt=St.isObject,mt=ot("../utils/isArray"),xt=mt.isArray;bt.getBucketVersions=ft,bt.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,Pt,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&<.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 Pt=Wt.sent,At=Pt.data.Version||[],Dt=Pt.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=Pt.data.CommonPrefixes||null,jt&&(xt(jt)||(jt=[jt]),jt=jt.map(function(Jt){return Jt.Prefix})),Wt.abrupt("return",{res:Pt.res,objects:At,deleteMarker:Dt,prefixes:jt,nextMarker:Pt.data.NextKeyMarker||null,NextVersionIdMarker:Pt.data.NextVersionIdMarker||null,nextKeyMarker:Pt.data.NextKeyMarker||null,nextVersionIdMarker:Pt.data.NextVersionIdMarker||null,isTruncated:Pt.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,_t,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")),bt=Bt;bt.getObjectMeta=function(){var St=(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 St.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,_t,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")),bt=Bt,St=ot("../utils/isObject"),Tt=St.isObject;bt.getObjectTagging=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z){var tt,at,it,lt,ut,dt,Pt=arguments;return gt.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return tt=Pt.length>1&&Pt[1]!==void 0?Pt[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,_t,Bt){"use strict";var vt=ot("../utils/isIP"),gt=vt.isIP,kt=Bt;kt.getObjectUrl=function(St,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(St))}},{"../utils/isIP":69}],43:[function(ot,_t,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")),bt=Bt;bt.getSymlink=function(){var St=(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 St.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,_t,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")),bt=ot("../utils/checkEnv"),St=bt.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(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:return tt=ut.length>1&&ut[1]!==void 0?ut[1]:{},St("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],Pt.next=8,this.request(at);case 8:return it=Pt.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])}),Pt.abrupt("return",lt);case 12:case"end":return Pt.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,_t,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")),bt=Bt;bt.putACL=function(){var St=(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 St.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,_t,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")),bt=ot("../utils/obj2xml"),St=bt.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,Pt,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=St(dt),Ft.next=13,this.request(ut);case 13:return Pt=Ft.sent,Ft.abrupt("return",{res:Pt.res,status:Pt.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,_t,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")),bt=Bt;bt.putSymlink=function(){var St=(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 St.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,_t,Bt){"use strict";var vt=ot("url"),gt=ot("utility"),kt=ot("copy-to"),bt=ot("../../common/signUtils"),St=ot("../utils/isIP"),Tt=St.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=bt._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,_t,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")),bt=ot("./utils/isArray"),St=bt.isArray,Tt=Bt;Tt._parallelNode=function(){var mt=(0,kt.default)(gt.default.mark(function ft(z,tt,at,it){var lt,ut,dt,Pt,At,Dt,Ft,jt;return gt.default.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:lt=this,ut=[],dt=[],Pt=z.length/tt,At=z.length%tt,Dt=At===0?Pt:(z.length-At)/tt+1,Ft=1,jt=0;case 8:if(!(jt<z.length)){Gt.next=26;break}if(!lt.isCancel()){Gt.next=11;break}return Gt.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)){Gt.next=23;break}return Gt.prev=13,Ft+=1,Gt.next=17,Promise.all(dt);case 17:Gt.next=22;break;case 19:Gt.prev=19,Gt.t0=Gt.catch(13),ut.push(Gt.t0);case 22:dt=[];case 23:jt++,Gt.next=8;break;case 26:return Gt.abrupt("return",ut);case 27:case"end":return Gt.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(Gt){return function(){if(Gt===null)throw new Error("Callback was already called.");var Wt=Gt;Gt=null;for(var Jt=arguments.length,Ut=new Array(Jt),Ht=0;Ht<Jt;Ht++)Ut[Ht]=arguments[Ht];Wt.apply(this,Ut)}}function ut(Gt){var Wt=-1,Jt=Gt.length;return function(){return++Wt<Jt&&!tt.isCancel()?{value:Gt[Wt],key:Wt}:null}}var dt=ut(xt),Pt=!1,At=0,Dt=!1;function Ft(Gt){At-=1,Gt?(Pt=!0,it.push(Gt),at(it)):Pt&&At<=0?(Pt=!0,at(it)):Dt||(tt.isCancel()?at(it):Nt())}function jt(Gt,Wt){z(Gt).then(function(Jt){Wt(null,Jt)}).catch(function(Jt){Wt(Jt)})}function Nt(){for(Dt=!0;At<ft&&!Pt&&!tt.isCancel();){var Gt=dt();if(Gt===null||it.length>0){Pt=!0,At<=0&&at(it);return}At+=1,jt(Gt.value,lt(Ft))}Dt=!1}Nt()})},Tt.cancel=function(xt){this.options.cancelFlag=!0,St(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,_t,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"),bt=ot("./utils/lowercaseKeyHeader"),St=bt.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=St(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 Pt=dt.toLowerCase();Pt.indexOf(at)===0&&(lt[Pt]=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 Pt={callbackUrl:encodeURI(xt.callback.url),callbackBody:xt.callback.body};if(xt.callback.host&&(Pt.callbackHost=xt.callback.host),xt.callback.contentType&&(Pt.callbackBodyType=xt.callback.contentType),lt.callback=vt.from(JSON.stringify(Pt)).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,_t,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,_t,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,bt){if(vt[bt]){var St=!0;if(vt[bt]instanceof Function?St=vt[bt](kt):St=vt[bt].test(kt),!St)throw new Error("The ".concat(bt," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ot,_t,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,_t,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"),bt=kt.isObject,St=[{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(St,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(St,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function mt(xt){if(!bt(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,_t,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(bt){if(bt.validator)bt.validator(gt);else if(bt.pattern&&!bt.pattern.test(gt))throw new Error(bt.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,_t,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"),bt=ot("mime"),St=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"),Pt=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 Gt={"x-oss-date":St(Nt,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Gt["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Gt["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Gt,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Gt["x-oss-security-token"]=this.options.stsToken),Tt(jt.headers).to(Gt),At(Gt,"Content-Type")||(jt.mime&&jt.mime.indexOf("/")>0?Gt["Content-Type"]=jt.mime:Pt()?Gt["Content-Type"]="application/octet-stream":Gt["Content-Type"]=bt.getType(jt.mime||mt.extname(jt.object||""))),At(Gt,"Content-Type")||Dt(Gt,"Content-Type"),jt.content&&(jt.disabledMD5||(!jt.headers||!jt.headers["Content-MD5"]?Gt["Content-MD5"]=gt.createHash("md5").update(vt.from(jt.content,"utf8")).digest("base64"):Gt["Content-MD5"]=jt.headers["Content-MD5"]),Gt["Content-Length"]||(Gt["Content-Length"]=jt.content.length));var Wt=Object.prototype.hasOwnProperty;for(var Jt in Gt)Gt[Jt]&&Wt.call(Gt,Jt)&&(Gt[Jt]=ft(String(Gt[Jt]),this.options.headerEncoding));var Ut=this._getResource(jt);if(Gt.authorization=this.authorization(jt.method,Ut,jt.subres,Gt,this.options.headerEncoding),tt(this.options.endpoint.hostname)){var Ht=this.options,oe=Ht.region,se=Ht.internal,fe=Ht.secure,Pe=it(oe,se,fe);Gt.host="".concat(jt.bucket,".").concat(Pe.host)}var Yt=ut.bind(this)(jt);kt("request %s %s, with headers %j, !!stream: %s",jt.method,Yt,Gt,!!jt.stream);var ee=jt.timeout||this.options.timeout,ye={method:jt.method,content:jt.content,stream:jt.stream,headers:Gt,timeout:ee,writeStream:jt.writeStream,customResponse:jt.customResponse,ctx:jt.ctx||this.ctx};return this.agent&&(ye.agent=this.agent),this.httpsAgent&&(ye.httpsAgent=this.httpsAgent),ye.enableProxy=!!this.options.enableProxy,ye.proxy=this.options.proxy?this.options.proxy:null,{url:Yt,params:ye}}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,_t,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 bt(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,Pt=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,Gt){return Gt.toUpperCase()});mt[jt]||(mt[jt]=mt[Ft])}}),Pt.forEach(function(Ft){mt[Ft]=St(mt[Ft])}),typeof ft=="function"&&ft(mt),Tt(mt,Dt),bt}}Bt.dataFix=bt;function St(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,_t,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(bt){if(bt===null||(0,gt.default)(bt)!=="object")return bt;if(kt.isBuffer(bt))return bt.slice();var St=Array.isArray(bt)?[]:{};return Object.keys(bt).forEach(function(Tt){St[Tt]=Bt.deepCopy(bt[Tt])}),St},Bt.deepCopyWith=function(bt,St){function Tt(mt,xt,ft){var z=St(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 St?Tt(bt,"",null):Bt.deepCopy(bt)}},{"./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,_t,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 bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return bt==="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,_t,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"),bt=ot("../utils/formatObjKey");function St(mt){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xt&>.isObject(mt)&&(mt=[mt]),kt.isArray(mt)?mt=mt.map(Tt):mt=Tt(mt),mt}Bt.formatInventoryConfig=St;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=bt.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,_t,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(St,Tt,mt){if(St===null||(0,gt.default)(St)!=="object")return St;var xt;if(Array.isArray(St)){xt=[];for(var ft=0;ft<St.length;ft++)xt.push(kt(St[ft],Tt,mt))}else xt={},Object.keys(St).forEach(function(z){xt[bt(z,Tt,mt)]=kt(St[z],Tt,mt)});return xt}Bt.formatObjKey=kt;function bt(St,Tt,mt){return mt&&mt.exclude&&mt.exclude.includes(St)||(Tt==="firstUpperCase"?St=St.replace(/^./,function(xt){return xt.toUpperCase()}):Tt==="firstLowerCase"&&(St=St.replace(/^./,function(xt){return xt.toLowerCase()}))),St}},{"@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,_t,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,bt=0;bt<gt.length;bt++){var St=gt.charAt(bt);/^[\u00-\uff]$/.test(St)?kt+=1:kt+=2}return kt}Bt.getStrBytesCount=vt},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ot,_t,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,_t,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isBlob=void 0;function vt(gt){return typeof Blob!="undefined"&> instanceof Blob}Bt.isBlob=vt},{}],65:[function(ot,_t,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,_t,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,_t,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,_t,Bt){"use strict";Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.isFunction=void 0,Bt.isFunction=function(vt){return typeof vt=="function"}},{}],69:[function(ot,_t,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,_t,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,_t,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 bt={};return vt.isObject(kt)&&Object.keys(kt).forEach(function(St){bt[St.toLowerCase()]=kt[St]}),bt}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,_t,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(bt){return Object.prototype.toString.call(bt).replace(/(.*? |])/g,"").toLowerCase()}function kt(bt,St){var Tt="";return St&&St.headers&&(Tt=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),St&&St.firstUpperCase&&(bt=vt.formatObjKey(bt,"firstUpperCase")),gt(bt)==="object"?Object.keys(bt).forEach(function(mt){gt(bt[mt])!=="undefined"&>(bt[mt])!=="null"&&(gt(bt[mt])==="string"||gt(bt[mt])==="number"?Tt+="<".concat(mt,">").concat(bt[mt],"</").concat(mt,">"):gt(bt[mt])==="object"?Tt+="<".concat(mt,">").concat(kt(bt[mt]),"</").concat(mt,">"):gt(bt[mt])==="array"?Tt+=bt[mt].map(function(xt){return"<".concat(mt,">").concat(kt(xt),"</").concat(mt,">")}).join(""):Tt+="<".concat(mt,">").concat(bt[mt].toString(),"</").concat(mt,">"))}):Tt+=bt.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,_t,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(St,Tt){var mt=typeof Symbol!="undefined"&&St[Symbol.iterator]||St["@@iterator"];if(!mt){if(Array.isArray(St)||(mt=gt(St))||Tt&&St&&typeof St.length=="number"){mt&&(St=mt);var xt=0,ft=function(){};return{s:ft,n:function(){return xt>=St.length?{done:!0}:{done:!1,value:St[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(St)},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(St,Tt){if(St){if(typeof St=="string")return kt(St,Tt);var mt=Object.prototype.toString.call(St).slice(8,-1);if(mt==="Object"&&St.constructor&&(mt=St.constructor.name),mt==="Map"||mt==="Set")return Array.from(St);if(mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt))return kt(St,Tt)}}function kt(St,Tt){(Tt==null||Tt>St.length)&&(Tt=St.length);for(var mt=0,xt=new Array(Tt);mt<Tt;mt++)xt[mt]=St[mt];return xt}Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.omit=void 0;function bt(St,Tt){var mt=Object.assign({},St),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=bt},{"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,_t,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 bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},St=0,Tt=bt.retryDelay,mt=Tt===void 0?500:Tt,xt=bt.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(Pt){St=0,ut(Pt)}).catch(function(Pt){St<kt&&ft(Pt)?(St++,setTimeout(function(){ut(tt.apply(void 0,it))},mt)):(St=0,dt(Pt))})})};return z}Bt.retry=vt},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ot,_t,Bt){"use strict";var vt=function(St){return St&&St.__esModule?St:{default:St}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.setRegion=void 0;var gt=vt(ot("url")),kt=ot("./checkConfigValid");function bt(St){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(St,"region");var xt=mt?"https://":"http://",ft=Tt?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return St.substr(0,z.length)===z&&(ft=".aliyuncs.com"),gt.default.parse(xt+St+ft)}Bt.setRegion=bt},{"./checkConfigValid":52,url:472}],76:[function(ot,_t,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 bt=ot("./formatObjKey");function St(){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=bt.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=St;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,_t,Bt){function vt(kt,bt,St,Tt,mt,xt,ft){try{var z=kt[xt](ft),tt=z.value}catch(at){St(at);return}z.done?bt(tt):Promise.resolve(tt).then(Tt,mt)}function gt(kt){return function(){var bt=this,St=arguments;return new Promise(function(Tt,mt){var xt=kt.apply(bt,St);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)})}}_t.exports=gt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],78:[function(ot,_t,Bt){function vt(gt){return gt&>.__esModule?gt:{default:gt}}_t.exports=vt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],79:[function(ot,_t,Bt){function vt(gt){"@babel/helpers - typeof";return _t.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},_t.exports.__esModule=!0,_t.exports.default=_t.exports,vt(gt)}_t.exports=vt,_t.exports.__esModule=!0,_t.exports.default=_t.exports},{}],80:[function(ot,_t,Bt){_t.exports=ot("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ot,_t,Bt){_t.exports=vt,_t.exports.HttpsAgent=vt;function vt(){}},{}],82:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("object-assign");function kt(oe,se){if(oe===se)return 0;for(var fe=oe.length,Pe=se.length,Yt=0,ee=Math.min(fe,Pe);Yt<ee;++Yt)if(oe[Yt]!==se[Yt]){fe=oe[Yt],Pe=se[Yt];break}return fe<Pe?-1:Pe<fe?1:0}function bt(oe){return vt.Buffer&&typeof vt.Buffer.isBuffer=="function"?vt.Buffer.isBuffer(oe):!!(oe!=null&&oe._isBuffer)}var St=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 bt(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=_t.exports=At,at=/\s*function\s+([^\(\s]*)\s*/;function it(oe){if(St.isFunction(oe)){if(xt)return oe.name;var se=oe.toString(),fe=se.match(at);return fe&&fe[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 fe=se.stackStartFunction||Pt;if(Error.captureStackTrace)Error.captureStackTrace(this,fe);else{var Pe=new Error;if(Pe.stack){var Yt=Pe.stack,ee=it(fe),ye=Yt.indexOf(`
|
|
`+ee);if(ye>=0){var xe=Yt.indexOf(`
|
|
`,ye+1);Yt=Yt.substring(xe+1)}this.stack=Yt}}},St.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||!St.isFunction(oe))return St.inspect(oe);var se=it(oe),fe=se?": "+se:"";return"[Function"+fe+"]"}function dt(oe){return lt(ut(oe.actual),128)+" "+oe.operator+" "+lt(ut(oe.expected),128)}function Pt(oe,se,fe,Pe,Yt){throw new tt.AssertionError({message:fe,actual:oe,expected:se,operator:Pe,stackStartFunction:Yt})}tt.fail=Pt;function At(oe,se){oe||Pt(oe,!0,se,"==",tt.ok)}tt.ok=At,tt.equal=function(se,fe,Pe){se!=fe&&Pt(se,fe,Pe,"==",tt.equal)},tt.notEqual=function(se,fe,Pe){se==fe&&Pt(se,fe,Pe,"!=",tt.notEqual)},tt.deepEqual=function(se,fe,Pe){Dt(se,fe,!1)||Pt(se,fe,Pe,"deepEqual",tt.deepEqual)},tt.deepStrictEqual=function(se,fe,Pe){Dt(se,fe,!0)||Pt(se,fe,Pe,"deepStrictEqual",tt.deepStrictEqual)};function Dt(oe,se,fe,Pe){if(oe===se)return!0;if(bt(oe)&&bt(se))return kt(oe,se)===0;if(St.isDate(oe)&&St.isDate(se))return oe.getTime()===se.getTime();if(St.isRegExp(oe)&&St.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 fe?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(bt(oe)!==bt(se))return!1;Pe=Pe||{actual:[],expected:[]};var Yt=Pe.actual.indexOf(oe);return Yt!==-1&&Yt===Pe.expected.indexOf(se)?!0:(Pe.actual.push(oe),Pe.expected.push(se),jt(oe,se,fe,Pe))}function Ft(oe){return Object.prototype.toString.call(oe)=="[object Arguments]"}function jt(oe,se,fe,Pe){if(oe==null||se===null||se===void 0)return!1;if(St.isPrimitive(oe)||St.isPrimitive(se))return oe===se;if(fe&&Object.getPrototypeOf(oe)!==Object.getPrototypeOf(se))return!1;var Yt=Ft(oe),ee=Ft(se);if(Yt&&!ee||!Yt&&ee)return!1;if(Yt)return oe=mt.call(oe),se=mt.call(se),Dt(oe,se,fe);var ye=Ht(oe),xe=Ht(se),be,ce;if(ye.length!==xe.length)return!1;for(ye.sort(),xe.sort(),ce=ye.length-1;ce>=0;ce--)if(ye[ce]!==xe[ce])return!1;for(ce=ye.length-1;ce>=0;ce--)if(be=ye[ce],!Dt(oe[be],se[be],fe,Pe))return!1;return!0}tt.notDeepEqual=function(se,fe,Pe){Dt(se,fe,!1)&&Pt(se,fe,Pe,"notDeepEqual",tt.notDeepEqual)},tt.notDeepStrictEqual=Nt;function Nt(oe,se,fe){Dt(oe,se,!0)&&Pt(oe,se,fe,"notDeepStrictEqual",Nt)}tt.strictEqual=function(se,fe,Pe){se!==fe&&Pt(se,fe,Pe,"===",tt.strictEqual)},tt.notStrictEqual=function(se,fe,Pe){se===fe&&Pt(se,fe,Pe,"!==",tt.notStrictEqual)};function Gt(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(fe){}return Error.isPrototypeOf(se)?!1:se.call({},oe)===!0}function Wt(oe){var se;try{oe()}catch(fe){se=fe}return se}function Jt(oe,se,fe,Pe){var Yt;if(typeof se!="function")throw new TypeError('"block" argument must be a function');typeof fe=="string"&&(Pe=fe,fe=null),Yt=Wt(se),Pe=(fe&&fe.name?" ("+fe.name+").":".")+(Pe?" "+Pe:"."),oe&&!Yt&&Pt(Yt,fe,"Missing expected exception"+Pe);var ee=typeof Pe=="string",ye=!oe&&St.isError(Yt),xe=!oe&&Yt&&!fe;if((ye&&ee&&Gt(Yt,fe)||xe)&&Pt(Yt,fe,"Got unwanted exception"+Pe),oe&&Yt&&fe&&!Gt(Yt,fe)||!oe&&Yt)throw Yt}tt.throws=function(oe,se,fe){Jt(!0,oe,se,fe)},tt.doesNotThrow=function(oe,se,fe){Jt(!1,oe,se,fe)},tt.ifError=function(oe){if(oe)throw oe};function Ut(oe,se){oe||Pt(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 Ht=Object.keys||function(oe){var se=[];for(var fe in oe)Tt.call(oe,fe)&&se.push(fe);return se}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ot,_t,Bt){typeof Object.create=="function"?_t.exports=function(gt,kt){gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}})}:_t.exports=function(gt,kt){gt.super_=kt;var bt=function(){};bt.prototype=kt.prototype,gt.prototype=new bt,gt.prototype.constructor=gt}},{}],84:[function(ot,_t,Bt){_t.exports=function(gt){return gt&&typeof gt=="object"&&typeof gt.copy=="function"&&typeof gt.fill=="function"&&typeof gt.readUInt8=="function"}},{}],85:[function(ot,_t,Bt){(function(vt,gt){(function(){var kt=/%[sdj%]/g;Bt.format=function(xe){if(!jt(xe)){for(var be=[],ce=0;ce<arguments.length;ce++)be.push(Tt(arguments[ce]));return be.join(" ")}for(var ce=1,pe=arguments,he=pe.length,Ce=String(xe).replace(kt,function(Fe){if(Fe==="%%")return"%";if(ce>=he)return Fe;switch(Fe){case"%s":return String(pe[ce++]);case"%d":return Number(pe[ce++]);case"%j":try{return JSON.stringify(pe[ce++])}catch(ge){return"[Circular]"}default:return Fe}}),de=pe[ce];ce<he;de=pe[++ce])At(de)||!Jt(de)?Ce+=" "+de:Ce+=" "+Tt(de);return Ce},Bt.deprecate=function(xe,be){if(Gt(gt.process))return function(){return Bt.deprecate(xe,be).apply(this,arguments)};if(vt.noDeprecation===!0)return xe;var ce=!1;function pe(){if(!ce){if(vt.throwDeprecation)throw new Error(be);vt.traceDeprecation?console.trace(be):console.error(be),ce=!0}return xe.apply(this,arguments)}return pe};var bt={},St;Bt.debuglog=function(xe){if(Gt(St)&&(St=vt.env.NODE_DEBUG||""),xe=xe.toUpperCase(),!bt[xe])if(new RegExp("\\b"+xe+"\\b","i").test(St)){var be=vt.pid;bt[xe]=function(){var ce=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",xe,be,ce)}}else bt[xe]=function(){};return bt[xe]};function Tt(xe,be){var ce={seen:[],stylize:xt};return arguments.length>=3&&(ce.depth=arguments[2]),arguments.length>=4&&(ce.colors=arguments[3]),Pt(be)?ce.showHidden=be:be&&Bt._extend(ce,be),Gt(ce.showHidden)&&(ce.showHidden=!1),Gt(ce.depth)&&(ce.depth=2),Gt(ce.colors)&&(ce.colors=!1),Gt(ce.customInspect)&&(ce.customInspect=!0),ce.colors&&(ce.stylize=mt),z(ce,xe,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(xe,be){var ce=Tt.styles[be];return ce?"\x1B["+Tt.colors[ce][0]+"m"+xe+"\x1B["+Tt.colors[ce][1]+"m":xe}function xt(xe,be){return xe}function ft(xe){var be={};return xe.forEach(function(ce,pe){be[ce]=!0}),be}function z(xe,be,ce){if(xe.customInspect&&be&&oe(be.inspect)&&be.inspect!==Bt.inspect&&!(be.constructor&&be.constructor.prototype===be)){var pe=be.inspect(ce,xe);return jt(pe)||(pe=z(xe,pe,ce)),pe}var he=tt(xe,be);if(he)return he;var Ce=Object.keys(be),de=ft(Ce);if(xe.showHidden&&(Ce=Object.getOwnPropertyNames(be)),Ht(be)&&(Ce.indexOf("message")>=0||Ce.indexOf("description")>=0))return at(be);if(Ce.length===0){if(oe(be)){var Fe=be.name?": "+be.name:"";return xe.stylize("[Function"+Fe+"]","special")}if(Wt(be))return xe.stylize(RegExp.prototype.toString.call(be),"regexp");if(Ut(be))return xe.stylize(Date.prototype.toString.call(be),"date");if(Ht(be))return at(be)}var ge="",Se=!1,re=["{","}"];if(dt(be)&&(Se=!0,re=["[","]"]),oe(be)){var Kt=be.name?": "+be.name:"";ge=" [Function"+Kt+"]"}if(Wt(be)&&(ge=" "+RegExp.prototype.toString.call(be)),Ut(be)&&(ge=" "+Date.prototype.toUTCString.call(be)),Ht(be)&&(ge=" "+at(be)),Ce.length===0&&(!Se||be.length==0))return re[0]+ge+re[1];if(ce<0)return Wt(be)?xe.stylize(RegExp.prototype.toString.call(be),"regexp"):xe.stylize("[Object]","special");xe.seen.push(be);var wt;return Se?wt=it(xe,be,ce,de,Ce):wt=Ce.map(function(Lt){return lt(xe,be,ce,de,Lt,Se)}),xe.seen.pop(),ut(wt,ge,re)}function tt(xe,be){if(Gt(be))return xe.stylize("undefined","undefined");if(jt(be)){var ce="'"+JSON.stringify(be).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return xe.stylize(ce,"string")}if(Ft(be))return xe.stylize(""+be,"number");if(Pt(be))return xe.stylize(""+be,"boolean");if(At(be))return xe.stylize("null","null")}function at(xe){return"["+Error.prototype.toString.call(xe)+"]"}function it(xe,be,ce,pe,he){for(var Ce=[],de=0,Fe=be.length;de<Fe;++de)ye(be,String(de))?Ce.push(lt(xe,be,ce,pe,String(de),!0)):Ce.push("");return he.forEach(function(ge){ge.match(/^\d+$/)||Ce.push(lt(xe,be,ce,pe,ge,!0))}),Ce}function lt(xe,be,ce,pe,he,Ce){var de,Fe,ge;if(ge=Object.getOwnPropertyDescriptor(be,he)||{value:be[he]},ge.get?ge.set?Fe=xe.stylize("[Getter/Setter]","special"):Fe=xe.stylize("[Getter]","special"):ge.set&&(Fe=xe.stylize("[Setter]","special")),ye(pe,he)||(de="["+he+"]"),Fe||(xe.seen.indexOf(ge.value)<0?(At(ce)?Fe=z(xe,ge.value,null):Fe=z(xe,ge.value,ce-1),Fe.indexOf(`
|
|
`)>-1&&(Ce?Fe=Fe.split(`
|
|
`).map(function(Se){return" "+Se}).join(`
|
|
`).substr(2):Fe=`
|
|
`+Fe.split(`
|
|
`).map(function(Se){return" "+Se}).join(`
|
|
`))):Fe=xe.stylize("[Circular]","special")),Gt(de)){if(Ce&&he.match(/^\d+$/))return Fe;de=JSON.stringify(""+he),de.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(de=de.substr(1,de.length-2),de=xe.stylize(de,"name")):(de=de.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),de=xe.stylize(de,"string"))}return de+": "+Fe}function ut(xe,be,ce){var pe=0,he=xe.reduce(function(Ce,de){return pe++,de.indexOf(`
|
|
`)>=0&&pe++,Ce+de.replace(/\u001b\[\d\d?m/g,"").length+1},0);return he>60?ce[0]+(be===""?"":be+`
|
|
`)+" "+xe.join(`,
|
|
`)+" "+ce[1]:ce[0]+be+" "+xe.join(", ")+" "+ce[1]}function dt(xe){return Array.isArray(xe)}Bt.isArray=dt;function Pt(xe){return typeof xe=="boolean"}Bt.isBoolean=Pt;function At(xe){return xe===null}Bt.isNull=At;function Dt(xe){return xe==null}Bt.isNullOrUndefined=Dt;function Ft(xe){return typeof xe=="number"}Bt.isNumber=Ft;function jt(xe){return typeof xe=="string"}Bt.isString=jt;function Nt(xe){return typeof xe=="symbol"}Bt.isSymbol=Nt;function Gt(xe){return xe===void 0}Bt.isUndefined=Gt;function Wt(xe){return Jt(xe)&&fe(xe)==="[object RegExp]"}Bt.isRegExp=Wt;function Jt(xe){return typeof xe=="object"&&xe!==null}Bt.isObject=Jt;function Ut(xe){return Jt(xe)&&fe(xe)==="[object Date]"}Bt.isDate=Ut;function Ht(xe){return Jt(xe)&&(fe(xe)==="[object Error]"||xe instanceof Error)}Bt.isError=Ht;function oe(xe){return typeof xe=="function"}Bt.isFunction=oe;function se(xe){return xe===null||typeof xe=="boolean"||typeof xe=="number"||typeof xe=="string"||typeof xe=="symbol"||typeof xe=="undefined"}Bt.isPrimitive=se,Bt.isBuffer=ot("./support/isBuffer");function fe(xe){return Object.prototype.toString.call(xe)}function Pe(xe){return xe<10?"0"+xe.toString(10):xe.toString(10)}var Yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ee(){var xe=new Date,be=[Pe(xe.getHours()),Pe(xe.getMinutes()),Pe(xe.getSeconds())].join(":");return[xe.getDate(),Yt[xe.getMonth()],be].join(" ")}Bt.log=function(){console.log("%s - %s",ee(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(xe,be){if(!be||!Jt(be))return xe;for(var ce=Object.keys(be),pe=ce.length;pe--;)xe[ce[pe]]=be[ce[pe]];return xe};function ye(xe,be){return Object.prototype.hasOwnProperty.call(xe,be)}}).call(this)}).call(this,ot("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ot,_t,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;_t.exports=function(){for(var St=[],Tt=0;Tt<gt.length;Tt++)typeof kt[gt[Tt]]=="function"&&(St[St.length]=gt[Tt]);return St}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ot,_t,Bt){"use strict";Bt.byteLength=xt,Bt.toByteArray=z,Bt.fromByteArray=it;for(var vt=[],gt=[],kt=typeof Uint8Array!="undefined"?Uint8Array:Array,bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",St=0,Tt=bt.length;St<Tt;++St)vt[St]=bt[St],gt[bt.charCodeAt(St)]=St;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 Pt=dt===ut?0:4-dt%4;return[dt,Pt]}function xt(lt){var ut=mt(lt),dt=ut[0],Pt=ut[1];return(dt+Pt)*3/4-Pt}function ft(lt,ut,dt){return(ut+dt)*3/4-dt}function z(lt){var ut,dt=mt(lt),Pt=dt[0],At=dt[1],Dt=new kt(ft(lt,Pt,At)),Ft=0,jt=At>0?Pt-4:Pt,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 Pt,At=[],Dt=ut;Dt<dt;Dt+=3)Pt=(lt[Dt]<<16&16711680)+(lt[Dt+1]<<8&65280)+(lt[Dt+2]&255),At.push(tt(Pt));return At.join("")}function it(lt){for(var ut,dt=lt.length,Pt=dt%3,At=[],Dt=16383,Ft=0,jt=dt-Pt;Ft<jt;Ft+=Dt)At.push(at(lt,Ft,Ft+Dt>jt?jt:Ft+Dt));return Pt===1?(ut=lt[dt-1],At.push(vt[ut>>2]+vt[ut<<4&63]+"==")):Pt===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,_t,Bt){(function(vt,gt,kt){typeof _t!="undefined"&&_t.exports?_t.exports=kt():typeof le=="function"&&le.amd?le(gt,kt):vt[gt]=kt()})(this,"bowser",function(){var vt=!0;function gt(ft){function z(be){var ce=ft.match(be);return ce&&ce.length>1&&ce[1]||""}function tt(be){var ce=ft.match(be);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),Pt=/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),Gt=/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),Ht=tt(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),oe=z(/version\/(\d+(\.\d+)?)/i),se=/tablet/i.test(ft)&&!/tablet pc/i.test(ft),fe=!se&&/[^-]mobi/i.test(ft),Pe=/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},Ht?(Yt.msedge=vt,Yt.version=Ht):(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)}:Pt?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:Ht}:/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"):Pe?(Yt.xbox=vt,Yt.osname="Xbox"):Wt?(Yt.windows=vt,Yt.osname="Windows"):Ut&&(Yt.linux=vt,Yt.osname="Linux");function ee(be){switch(be){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 ye="";Yt.windows?ye=ee(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Yt.windowsphone?ye=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Yt.mac?(ye=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),ye=ye.replace(/[_\s]/g,".")):at?(ye=z(/os (\d+([_\s]\d+)*) like mac os x/i),ye=ye.replace(/[_\s]/g,".")):lt?ye=z(/android[ \/-](\d+(\.\d+)*)/i):Yt.webos?ye=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Yt.blackberry?ye=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Yt.bada?ye=z(/bada\/(\d+(\.\d+)*)/i):Yt.tizen&&(ye=z(/tizen[\/\s](\d+(\.\d+)*)/i)),ye&&(Yt.osversion=ye);var xe=!Yt.windows&&ye.split(".")[0];return se||dt||at=="ipad"||lt&&(xe==3||xe>=4&&!fe)||Yt.silk?Yt.tablet=vt:(fe||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 bt(ft){return ft.split(".").length}function St(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(bt(ft[0]),bt(ft[1])),tt=St(ft,function(at){var it=z-bt(at);return at=at+new Array(it+1).join(".0"),St(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,_t,Bt){},{}],90:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("base64-js"),kt=ot("ieee754");Bt.Buffer=mt,Bt.SlowBuffer=Pt,Bt.INSPECT_MAX_BYTES=50;var bt=2147483647;Bt.kMaxLength=bt,mt.TYPED_ARRAY_SUPPORT=St(),!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 St(){try{var Rt=new Uint8Array(1);return Rt.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Rt.foo()===42}catch(Vt){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>bt)throw new RangeError('The value "'+Rt+'" is invalid for option "size"');var Vt=new Uint8Array(Rt);return Vt.__proto__=mt.prototype,Vt}function mt(Rt,Vt,$t){if(typeof Rt=="number"){if(typeof Vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tt(Rt)}return xt(Rt,Vt,$t)}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,Vt,$t){if(typeof Rt=="string")return at(Rt,Vt);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(ne(Rt,ArrayBuffer)||Rt&&ne(Rt.buffer,ArrayBuffer))return lt(Rt,Vt,$t);if(typeof Rt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ue=Rt.valueOf&&Rt.valueOf();if(ue!=null&&ue!==Rt)return mt.from(ue,Vt,$t);var me=ut(Rt);if(me)return me;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Rt[Symbol.toPrimitive]=="function")return mt.from(Rt[Symbol.toPrimitive]("string"),Vt,$t);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,Vt,$t){return xt(Rt,Vt,$t)},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,Vt,$t){return ft(Rt),Rt<=0?Tt(Rt):Vt!==void 0?typeof $t=="string"?Tt(Rt).fill(Vt,$t):Tt(Rt).fill(Vt):Tt(Rt)}mt.alloc=function(Rt,Vt,$t){return z(Rt,Vt,$t)};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,Vt){if((typeof Vt!="string"||Vt==="")&&(Vt="utf8"),!mt.isEncoding(Vt))throw new TypeError("Unknown encoding: "+Vt);var $t=At(Rt,Vt)|0,ue=Tt($t),me=ue.write(Rt,Vt);return me!==$t&&(ue=ue.slice(0,me)),ue}function it(Rt){for(var Vt=Rt.length<0?0:dt(Rt.length)|0,$t=Tt(Vt),ue=0;ue<Vt;ue+=1)$t[ue]=Rt[ue]&255;return $t}function lt(Rt,Vt,$t){if(Vt<0||Rt.byteLength<Vt)throw new RangeError('"offset" is outside of buffer bounds');if(Rt.byteLength<Vt+($t||0))throw new RangeError('"length" is outside of buffer bounds');var ue;return Vt===void 0&&$t===void 0?ue=new Uint8Array(Rt):$t===void 0?ue=new Uint8Array(Rt,Vt):ue=new Uint8Array(Rt,Vt,$t),ue.__proto__=mt.prototype,ue}function ut(Rt){if(mt.isBuffer(Rt)){var Vt=dt(Rt.length)|0,$t=Tt(Vt);return $t.length===0||Rt.copy($t,0,0,Vt),$t}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>=bt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bt.toString(16)+" bytes");return Rt|0}function Pt(Rt){return+Rt!=Rt&&(Rt=0),mt.alloc(+Rt)}mt.isBuffer=function(Vt){return Vt!=null&&Vt._isBuffer===!0&&Vt!==mt.prototype},mt.compare=function(Vt,$t){if(ne(Vt,Uint8Array)&&(Vt=mt.from(Vt,Vt.offset,Vt.byteLength)),ne($t,Uint8Array)&&($t=mt.from($t,$t.offset,$t.byteLength)),!mt.isBuffer(Vt)||!mt.isBuffer($t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Vt===$t)return 0;for(var ue=Vt.length,me=$t.length,Le=0,Ne=Math.min(ue,me);Le<Ne;++Le)if(Vt[Le]!==$t[Le]){ue=Vt[Le],me=$t[Le];break}return ue<me?-1:me<ue?1:0},mt.isEncoding=function(Vt){switch(String(Vt).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(Vt,$t){if(!Array.isArray(Vt))throw new TypeError('"list" argument must be an Array of Buffers');if(Vt.length===0)return mt.alloc(0);var ue;if($t===void 0)for($t=0,ue=0;ue<Vt.length;++ue)$t+=Vt[ue].length;var me=mt.allocUnsafe($t),Le=0;for(ue=0;ue<Vt.length;++ue){var Ne=Vt[ue];if(ne(Ne,Uint8Array)&&(Ne=mt.from(Ne)),!mt.isBuffer(Ne))throw new TypeError('"list" argument must be an Array of Buffers');Ne.copy(me,Le),Le+=Ne.length}return me};function At(Rt,Vt){if(mt.isBuffer(Rt))return Rt.length;if(ArrayBuffer.isView(Rt)||ne(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 $t=Rt.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&$t===0)return 0;for(var me=!1;;)switch(Vt){case"ascii":case"latin1":case"binary":return $t;case"utf8":case"utf-8":return re(Rt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t*2;case"hex":return $t>>>1;case"base64":return Lt(Rt).length;default:if(me)return ue?-1:re(Rt).length;Vt=(""+Vt).toLowerCase(),me=!0}}mt.byteLength=At;function Dt(Rt,Vt,$t){var ue=!1;if((Vt===void 0||Vt<0)&&(Vt=0),Vt>this.length||(($t===void 0||$t>this.length)&&($t=this.length),$t<=0)||($t>>>=0,Vt>>>=0,$t<=Vt))return"";for(Rt||(Rt="utf8");;)switch(Rt){case"hex":return xe(this,Vt,$t);case"utf8":case"utf-8":return fe(this,Vt,$t);case"ascii":return ee(this,Vt,$t);case"latin1":case"binary":return ye(this,Vt,$t);case"base64":return se(this,Vt,$t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,Vt,$t);default:if(ue)throw new TypeError("Unknown encoding: "+Rt);Rt=(Rt+"").toLowerCase(),ue=!0}}mt.prototype._isBuffer=!0;function Ft(Rt,Vt,$t){var ue=Rt[Vt];Rt[Vt]=Rt[$t],Rt[$t]=ue}mt.prototype.swap16=function(){var Vt=this.length;if(Vt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $t=0;$t<Vt;$t+=2)Ft(this,$t,$t+1);return this},mt.prototype.swap32=function(){var Vt=this.length;if(Vt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $t=0;$t<Vt;$t+=4)Ft(this,$t,$t+3),Ft(this,$t+1,$t+2);return this},mt.prototype.swap64=function(){var Vt=this.length;if(Vt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $t=0;$t<Vt;$t+=8)Ft(this,$t,$t+7),Ft(this,$t+1,$t+6),Ft(this,$t+2,$t+5),Ft(this,$t+3,$t+4);return this},mt.prototype.toString=function(){var Vt=this.length;return Vt===0?"":arguments.length===0?fe(this,0,Vt):Dt.apply(this,arguments)},mt.prototype.toLocaleString=mt.prototype.toString,mt.prototype.equals=function(Vt){if(!mt.isBuffer(Vt))throw new TypeError("Argument must be a Buffer");return this===Vt?!0:mt.compare(this,Vt)===0},mt.prototype.inspect=function(){var Vt="",$t=Bt.INSPECT_MAX_BYTES;return Vt=this.toString("hex",0,$t).replace(/(.{2})/g,"$1 ").trim(),this.length>$t&&(Vt+=" ... "),"<Buffer "+Vt+">"},mt.prototype.compare=function(Vt,$t,ue,me,Le){if(ne(Vt,Uint8Array)&&(Vt=mt.from(Vt,Vt.offset,Vt.byteLength)),!mt.isBuffer(Vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Vt);if($t===void 0&&($t=0),ue===void 0&&(ue=Vt?Vt.length:0),me===void 0&&(me=0),Le===void 0&&(Le=this.length),$t<0||ue>Vt.length||me<0||Le>this.length)throw new RangeError("out of range index");if(me>=Le&&$t>=ue)return 0;if(me>=Le)return-1;if($t>=ue)return 1;if($t>>>=0,ue>>>=0,me>>>=0,Le>>>=0,this===Vt)return 0;for(var Ne=Le-me,Be=ue-$t,Xe=Math.min(Ne,Be),Qe=this.slice(me,Le),qe=Vt.slice($t,ue),He=0;He<Xe;++He)if(Qe[He]!==qe[He]){Ne=Qe[He],Be=qe[He];break}return Ne<Be?-1:Be<Ne?1:0};function jt(Rt,Vt,$t,ue,me){if(Rt.length===0)return-1;if(typeof $t=="string"?(ue=$t,$t=0):$t>2147483647?$t=2147483647:$t<-2147483648&&($t=-2147483648),$t=+$t,It($t)&&($t=me?0:Rt.length-1),$t<0&&($t=Rt.length+$t),$t>=Rt.length){if(me)return-1;$t=Rt.length-1}else if($t<0)if(me)$t=0;else return-1;if(typeof Vt=="string"&&(Vt=mt.from(Vt,ue)),mt.isBuffer(Vt))return Vt.length===0?-1:Nt(Rt,Vt,$t,ue,me);if(typeof Vt=="number")return Vt=Vt&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(Rt,Vt,$t):Uint8Array.prototype.lastIndexOf.call(Rt,Vt,$t):Nt(Rt,[Vt],$t,ue,me);throw new TypeError("val must be string, number or Buffer")}function Nt(Rt,Vt,$t,ue,me){var Le=1,Ne=Rt.length,Be=Vt.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(Rt.length<2||Vt.length<2)return-1;Le=2,Ne/=2,Be/=2,$t/=2}function Xe(We,Ke){return Le===1?We[Ke]:We.readUInt16BE(Ke*Le)}var Qe;if(me){var qe=-1;for(Qe=$t;Qe<Ne;Qe++)if(Xe(Rt,Qe)===Xe(Vt,qe===-1?0:Qe-qe)){if(qe===-1&&(qe=Qe),Qe-qe+1===Be)return qe*Le}else qe!==-1&&(Qe-=Qe-qe),qe=-1}else for($t+Be>Ne&&($t=Ne-Be),Qe=$t;Qe>=0;Qe--){for(var He=!0,Ue=0;Ue<Be;Ue++)if(Xe(Rt,Qe+Ue)!==Xe(Vt,Ue)){He=!1;break}if(He)return Qe}return-1}mt.prototype.includes=function(Vt,$t,ue){return this.indexOf(Vt,$t,ue)!==-1},mt.prototype.indexOf=function(Vt,$t,ue){return jt(this,Vt,$t,ue,!0)},mt.prototype.lastIndexOf=function(Vt,$t,ue){return jt(this,Vt,$t,ue,!1)};function Gt(Rt,Vt,$t,ue){$t=Number($t)||0;var me=Rt.length-$t;ue?(ue=Number(ue),ue>me&&(ue=me)):ue=me;var Le=Vt.length;ue>Le/2&&(ue=Le/2);for(var Ne=0;Ne<ue;++Ne){var Be=parseInt(Vt.substr(Ne*2,2),16);if(It(Be))return Ne;Rt[$t+Ne]=Be}return Ne}function Wt(Rt,Vt,$t,ue){return Xt(re(Vt,Rt.length-$t),Rt,$t,ue)}function Jt(Rt,Vt,$t,ue){return Xt(Kt(Vt),Rt,$t,ue)}function Ut(Rt,Vt,$t,ue){return Jt(Rt,Vt,$t,ue)}function Ht(Rt,Vt,$t,ue){return Xt(Lt(Vt),Rt,$t,ue)}function oe(Rt,Vt,$t,ue){return Xt(wt(Vt,Rt.length-$t),Rt,$t,ue)}mt.prototype.write=function(Vt,$t,ue,me){if($t===void 0)me="utf8",ue=this.length,$t=0;else if(ue===void 0&&typeof $t=="string")me=$t,ue=this.length,$t=0;else if(isFinite($t))$t=$t>>>0,isFinite(ue)?(ue=ue>>>0,me===void 0&&(me="utf8")):(me=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Le=this.length-$t;if((ue===void 0||ue>Le)&&(ue=Le),Vt.length>0&&(ue<0||$t<0)||$t>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var Ne=!1;;)switch(me){case"hex":return Gt(this,Vt,$t,ue);case"utf8":case"utf-8":return Wt(this,Vt,$t,ue);case"ascii":return Jt(this,Vt,$t,ue);case"latin1":case"binary":return Ut(this,Vt,$t,ue);case"base64":return Ht(this,Vt,$t,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,Vt,$t,ue);default:if(Ne)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),Ne=!0}},mt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(Rt,Vt,$t){return Vt===0&&$t===Rt.length?gt.fromByteArray(Rt):gt.fromByteArray(Rt.slice(Vt,$t))}function fe(Rt,Vt,$t){$t=Math.min(Rt.length,$t);for(var ue=[],me=Vt;me<$t;){var Le=Rt[me],Ne=null,Be=Le>239?4:Le>223?3:Le>191?2:1;if(me+Be<=$t){var Xe,Qe,qe,He;switch(Be){case 1:Le<128&&(Ne=Le);break;case 2:Xe=Rt[me+1],(Xe&192)===128&&(He=(Le&31)<<6|Xe&63,He>127&&(Ne=He));break;case 3:Xe=Rt[me+1],Qe=Rt[me+2],(Xe&192)===128&&(Qe&192)===128&&(He=(Le&15)<<12|(Xe&63)<<6|Qe&63,He>2047&&(He<55296||He>57343)&&(Ne=He));break;case 4:Xe=Rt[me+1],Qe=Rt[me+2],qe=Rt[me+3],(Xe&192)===128&&(Qe&192)===128&&(qe&192)===128&&(He=(Le&15)<<18|(Xe&63)<<12|(Qe&63)<<6|qe&63,He>65535&&He<1114112&&(Ne=He))}}Ne===null?(Ne=65533,Be=1):Ne>65535&&(Ne-=65536,ue.push(Ne>>>10&1023|55296),Ne=56320|Ne&1023),ue.push(Ne),me+=Be}return Yt(ue)}var Pe=4096;function Yt(Rt){var Vt=Rt.length;if(Vt<=Pe)return String.fromCharCode.apply(String,Rt);for(var $t="",ue=0;ue<Vt;)$t+=String.fromCharCode.apply(String,Rt.slice(ue,ue+=Pe));return $t}function ee(Rt,Vt,$t){var ue="";$t=Math.min(Rt.length,$t);for(var me=Vt;me<$t;++me)ue+=String.fromCharCode(Rt[me]&127);return ue}function ye(Rt,Vt,$t){var ue="";$t=Math.min(Rt.length,$t);for(var me=Vt;me<$t;++me)ue+=String.fromCharCode(Rt[me]);return ue}function xe(Rt,Vt,$t){var ue=Rt.length;(!Vt||Vt<0)&&(Vt=0),(!$t||$t<0||$t>ue)&&($t=ue);for(var me="",Le=Vt;Le<$t;++Le)me+=Se(Rt[Le]);return me}function be(Rt,Vt,$t){for(var ue=Rt.slice(Vt,$t),me="",Le=0;Le<ue.length;Le+=2)me+=String.fromCharCode(ue[Le]+ue[Le+1]*256);return me}mt.prototype.slice=function(Vt,$t){var ue=this.length;Vt=~~Vt,$t=$t===void 0?ue:~~$t,Vt<0?(Vt+=ue,Vt<0&&(Vt=0)):Vt>ue&&(Vt=ue),$t<0?($t+=ue,$t<0&&($t=0)):$t>ue&&($t=ue),$t<Vt&&($t=Vt);var me=this.subarray(Vt,$t);return me.__proto__=mt.prototype,me};function ce(Rt,Vt,$t){if(Rt%1!==0||Rt<0)throw new RangeError("offset is not uint");if(Rt+Vt>$t)throw new RangeError("Trying to access beyond buffer length")}mt.prototype.readUIntLE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||ce(Vt,$t,this.length);for(var me=this[Vt],Le=1,Ne=0;++Ne<$t&&(Le*=256);)me+=this[Vt+Ne]*Le;return me},mt.prototype.readUIntBE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||ce(Vt,$t,this.length);for(var me=this[Vt+--$t],Le=1;$t>0&&(Le*=256);)me+=this[Vt+--$t]*Le;return me},mt.prototype.readUInt8=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,1,this.length),this[Vt]},mt.prototype.readUInt16LE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,2,this.length),this[Vt]|this[Vt+1]<<8},mt.prototype.readUInt16BE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,2,this.length),this[Vt]<<8|this[Vt+1]},mt.prototype.readUInt32LE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),(this[Vt]|this[Vt+1]<<8|this[Vt+2]<<16)+this[Vt+3]*16777216},mt.prototype.readUInt32BE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),this[Vt]*16777216+(this[Vt+1]<<16|this[Vt+2]<<8|this[Vt+3])},mt.prototype.readIntLE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||ce(Vt,$t,this.length);for(var me=this[Vt],Le=1,Ne=0;++Ne<$t&&(Le*=256);)me+=this[Vt+Ne]*Le;return Le*=128,me>=Le&&(me-=Math.pow(2,8*$t)),me},mt.prototype.readIntBE=function(Vt,$t,ue){Vt=Vt>>>0,$t=$t>>>0,ue||ce(Vt,$t,this.length);for(var me=$t,Le=1,Ne=this[Vt+--me];me>0&&(Le*=256);)Ne+=this[Vt+--me]*Le;return Le*=128,Ne>=Le&&(Ne-=Math.pow(2,8*$t)),Ne},mt.prototype.readInt8=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,1,this.length),this[Vt]&128?(255-this[Vt]+1)*-1:this[Vt]},mt.prototype.readInt16LE=function(Vt,$t){Vt=Vt>>>0,$t||ce(Vt,2,this.length);var ue=this[Vt]|this[Vt+1]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt16BE=function(Vt,$t){Vt=Vt>>>0,$t||ce(Vt,2,this.length);var ue=this[Vt+1]|this[Vt]<<8;return ue&32768?ue|4294901760:ue},mt.prototype.readInt32LE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),this[Vt]|this[Vt+1]<<8|this[Vt+2]<<16|this[Vt+3]<<24},mt.prototype.readInt32BE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),this[Vt]<<24|this[Vt+1]<<16|this[Vt+2]<<8|this[Vt+3]},mt.prototype.readFloatLE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),kt.read(this,Vt,!0,23,4)},mt.prototype.readFloatBE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,4,this.length),kt.read(this,Vt,!1,23,4)},mt.prototype.readDoubleLE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,8,this.length),kt.read(this,Vt,!0,52,8)},mt.prototype.readDoubleBE=function(Vt,$t){return Vt=Vt>>>0,$t||ce(Vt,8,this.length),kt.read(this,Vt,!1,52,8)};function pe(Rt,Vt,$t,ue,me,Le){if(!mt.isBuffer(Rt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Vt>me||Vt<Le)throw new RangeError('"value" argument is out of bounds');if($t+ue>Rt.length)throw new RangeError("Index out of range")}mt.prototype.writeUIntLE=function(Vt,$t,ue,me){if(Vt=+Vt,$t=$t>>>0,ue=ue>>>0,!me){var Le=Math.pow(2,8*ue)-1;pe(this,Vt,$t,ue,Le,0)}var Ne=1,Be=0;for(this[$t]=Vt&255;++Be<ue&&(Ne*=256);)this[$t+Be]=Vt/Ne&255;return $t+ue},mt.prototype.writeUIntBE=function(Vt,$t,ue,me){if(Vt=+Vt,$t=$t>>>0,ue=ue>>>0,!me){var Le=Math.pow(2,8*ue)-1;pe(this,Vt,$t,ue,Le,0)}var Ne=ue-1,Be=1;for(this[$t+Ne]=Vt&255;--Ne>=0&&(Be*=256);)this[$t+Ne]=Vt/Be&255;return $t+ue},mt.prototype.writeUInt8=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,1,255,0),this[$t]=Vt&255,$t+1},mt.prototype.writeUInt16LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,65535,0),this[$t]=Vt&255,this[$t+1]=Vt>>>8,$t+2},mt.prototype.writeUInt16BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,65535,0),this[$t]=Vt>>>8,this[$t+1]=Vt&255,$t+2},mt.prototype.writeUInt32LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,4294967295,0),this[$t+3]=Vt>>>24,this[$t+2]=Vt>>>16,this[$t+1]=Vt>>>8,this[$t]=Vt&255,$t+4},mt.prototype.writeUInt32BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,4294967295,0),this[$t]=Vt>>>24,this[$t+1]=Vt>>>16,this[$t+2]=Vt>>>8,this[$t+3]=Vt&255,$t+4},mt.prototype.writeIntLE=function(Vt,$t,ue,me){if(Vt=+Vt,$t=$t>>>0,!me){var Le=Math.pow(2,8*ue-1);pe(this,Vt,$t,ue,Le-1,-Le)}var Ne=0,Be=1,Xe=0;for(this[$t]=Vt&255;++Ne<ue&&(Be*=256);)Vt<0&&Xe===0&&this[$t+Ne-1]!==0&&(Xe=1),this[$t+Ne]=(Vt/Be>>0)-Xe&255;return $t+ue},mt.prototype.writeIntBE=function(Vt,$t,ue,me){if(Vt=+Vt,$t=$t>>>0,!me){var Le=Math.pow(2,8*ue-1);pe(this,Vt,$t,ue,Le-1,-Le)}var Ne=ue-1,Be=1,Xe=0;for(this[$t+Ne]=Vt&255;--Ne>=0&&(Be*=256);)Vt<0&&Xe===0&&this[$t+Ne+1]!==0&&(Xe=1),this[$t+Ne]=(Vt/Be>>0)-Xe&255;return $t+ue},mt.prototype.writeInt8=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,1,127,-128),Vt<0&&(Vt=255+Vt+1),this[$t]=Vt&255,$t+1},mt.prototype.writeInt16LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,32767,-32768),this[$t]=Vt&255,this[$t+1]=Vt>>>8,$t+2},mt.prototype.writeInt16BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,2,32767,-32768),this[$t]=Vt>>>8,this[$t+1]=Vt&255,$t+2},mt.prototype.writeInt32LE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,2147483647,-2147483648),this[$t]=Vt&255,this[$t+1]=Vt>>>8,this[$t+2]=Vt>>>16,this[$t+3]=Vt>>>24,$t+4},mt.prototype.writeInt32BE=function(Vt,$t,ue){return Vt=+Vt,$t=$t>>>0,ue||pe(this,Vt,$t,4,2147483647,-2147483648),Vt<0&&(Vt=4294967295+Vt+1),this[$t]=Vt>>>24,this[$t+1]=Vt>>>16,this[$t+2]=Vt>>>8,this[$t+3]=Vt&255,$t+4};function he(Rt,Vt,$t,ue,me,Le){if($t+ue>Rt.length)throw new RangeError("Index out of range");if($t<0)throw new RangeError("Index out of range")}function Ce(Rt,Vt,$t,ue,me){return Vt=+Vt,$t=$t>>>0,me||he(Rt,Vt,$t,4,34028234663852886e22,-34028234663852886e22),kt.write(Rt,Vt,$t,ue,23,4),$t+4}mt.prototype.writeFloatLE=function(Vt,$t,ue){return Ce(this,Vt,$t,!0,ue)},mt.prototype.writeFloatBE=function(Vt,$t,ue){return Ce(this,Vt,$t,!1,ue)};function de(Rt,Vt,$t,ue,me){return Vt=+Vt,$t=$t>>>0,me||he(Rt,Vt,$t,8,17976931348623157e292,-17976931348623157e292),kt.write(Rt,Vt,$t,ue,52,8),$t+8}mt.prototype.writeDoubleLE=function(Vt,$t,ue){return de(this,Vt,$t,!0,ue)},mt.prototype.writeDoubleBE=function(Vt,$t,ue){return de(this,Vt,$t,!1,ue)},mt.prototype.copy=function(Vt,$t,ue,me){if(!mt.isBuffer(Vt))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!me&&me!==0&&(me=this.length),$t>=Vt.length&&($t=Vt.length),$t||($t=0),me>0&&me<ue&&(me=ue),me===ue||Vt.length===0||this.length===0)return 0;if($t<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),Vt.length-$t<me-ue&&(me=Vt.length-$t+ue);var Le=me-ue;if(this===Vt&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin($t,ue,me);else if(this===Vt&&ue<$t&&$t<me)for(var Ne=Le-1;Ne>=0;--Ne)Vt[Ne+$t]=this[Ne+ue];else Uint8Array.prototype.set.call(Vt,this.subarray(ue,me),$t);return Le},mt.prototype.fill=function(Vt,$t,ue,me){if(typeof Vt=="string"){if(typeof $t=="string"?(me=$t,$t=0,ue=this.length):typeof ue=="string"&&(me=ue,ue=this.length),me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!mt.isEncoding(me))throw new TypeError("Unknown encoding: "+me);if(Vt.length===1){var Le=Vt.charCodeAt(0);(me==="utf8"&&Le<128||me==="latin1")&&(Vt=Le)}}else typeof Vt=="number"&&(Vt=Vt&255);if($t<0||this.length<$t||this.length<ue)throw new RangeError("Out of range index");if(ue<=$t)return this;$t=$t>>>0,ue=ue===void 0?this.length:ue>>>0,Vt||(Vt=0);var Ne;if(typeof Vt=="number")for(Ne=$t;Ne<ue;++Ne)this[Ne]=Vt;else{var Be=mt.isBuffer(Vt)?Vt:mt.from(Vt,me),Xe=Be.length;if(Xe===0)throw new TypeError('The value "'+Vt+'" is invalid for argument "value"');for(Ne=0;Ne<ue-$t;++Ne)this[Ne+$t]=Be[Ne%Xe]}return this};var Fe=/[^+/0-9A-Za-z-_]/g;function ge(Rt){if(Rt=Rt.split("=")[0],Rt=Rt.trim().replace(Fe,""),Rt.length<2)return"";for(;Rt.length%4!==0;)Rt=Rt+"=";return Rt}function Se(Rt){return Rt<16?"0"+Rt.toString(16):Rt.toString(16)}function re(Rt,Vt){Vt=Vt||1/0;for(var $t,ue=Rt.length,me=null,Le=[],Ne=0;Ne<ue;++Ne){if($t=Rt.charCodeAt(Ne),$t>55295&&$t<57344){if(!me){if($t>56319){(Vt-=3)>-1&&Le.push(239,191,189);continue}else if(Ne+1===ue){(Vt-=3)>-1&&Le.push(239,191,189);continue}me=$t;continue}if($t<56320){(Vt-=3)>-1&&Le.push(239,191,189),me=$t;continue}$t=(me-55296<<10|$t-56320)+65536}else me&&(Vt-=3)>-1&&Le.push(239,191,189);if(me=null,$t<128){if((Vt-=1)<0)break;Le.push($t)}else if($t<2048){if((Vt-=2)<0)break;Le.push($t>>6|192,$t&63|128)}else if($t<65536){if((Vt-=3)<0)break;Le.push($t>>12|224,$t>>6&63|128,$t&63|128)}else if($t<1114112){if((Vt-=4)<0)break;Le.push($t>>18|240,$t>>12&63|128,$t>>6&63|128,$t&63|128)}else throw new Error("Invalid code point")}return Le}function Kt(Rt){for(var Vt=[],$t=0;$t<Rt.length;++$t)Vt.push(Rt.charCodeAt($t)&255);return Vt}function wt(Rt,Vt){for(var $t,ue,me,Le=[],Ne=0;Ne<Rt.length&&!((Vt-=2)<0);++Ne)$t=Rt.charCodeAt(Ne),ue=$t>>8,me=$t%256,Le.push(me),Le.push(ue);return Le}function Lt(Rt){return gt.toByteArray(ge(Rt))}function Xt(Rt,Vt,$t,ue){for(var me=0;me<ue&&!(me+$t>=Vt.length||me>=Rt.length);++me)Vt[me+$t]=Rt[me];return me}function ne(Rt,Vt){return Rt instanceof Vt||Rt!=null&&Rt.constructor!=null&&Rt.constructor.name!=null&&Rt.constructor.name===Vt.name}function It(Rt){return Rt!==Rt}}).call(this)}).call(this,ot("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ot,_t,Bt){_t.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,_t,Bt){"use strict";var vt=ot("get-intrinsic"),gt=ot("./"),kt=gt(vt("String.prototype.indexOf"));_t.exports=function(St,Tt){var mt=vt(St,!!Tt);return typeof mt=="function"&&kt(St,".prototype.")>-1?gt(mt):mt}},{"./":93,"get-intrinsic":348}],93:[function(ot,_t,Bt){"use strict";var vt=ot("function-bind"),gt=ot("get-intrinsic"),kt=gt("%Function.prototype.apply%"),bt=gt("%Function.prototype.call%"),St=gt("%Reflect.apply%",!0)||vt.call(bt,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}_t.exports=function(tt){var at=St(vt,bt,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 St(vt,kt,arguments)};mt?mt(_t.exports,"apply",{value:ft}):_t.exports.apply=ft},{"function-bind":347,"get-intrinsic":348}],94:[function(ot,_t,Bt){"use strict";var vt=Array.prototype.slice;_t.exports=gt;function gt(bt,St){if(!(this instanceof gt))return new gt(bt,St);this.src=bt,this._withAccess=St}gt.prototype.withAccess=function(bt){return this._withAccess=bt!==!1,this},gt.prototype.pick=function(bt){return Array.isArray(bt)||(bt=vt.call(arguments)),bt.length&&(this.keys=bt),this},gt.prototype.to=function(bt){if(bt=bt||{},!this.src)return bt;var St=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Tt=0;Tt<St.length;Tt++)mt=St[Tt],bt[mt]===void 0&&(bt[mt]=this.src[mt]);return bt}for(var Tt=0;Tt<St.length;Tt++){var mt=St[Tt];if(kt(bt,mt)){var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&bt.__defineGetter__(mt,xt),ft&&bt.__defineSetter__(mt,ft),!xt&&!ft&&(bt[mt]=this.src[mt])}}return bt},gt.prototype.toCover=function(bt){for(var St=this.keys||Object.keys(this.src),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];delete bt[mt];var xt=this.src.__lookupGetter__(mt),ft=this.src.__lookupSetter__(mt);xt&&bt.__defineGetter__(mt,xt),ft&&bt.__defineSetter__(mt,ft),!xt&&!ft&&(bt[mt]=this.src[mt])}},gt.prototype.override=gt.prototype.toCover,gt.prototype.and=function(bt){var St={};return this.to(St),this.src=bt,this.to(St),this.src=St,this};function kt(bt,St){return bt[St]===void 0&&bt.__lookupGetter__(St)===void 0&&bt.__lookupSetter__(St)===void 0}},{}],95:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/try-to-string"),bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-constructor"),kt=ot("../internals/try-to-string"),bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=vt.String,bt=vt.TypeError;_t.exports=function(St){if(typeof St=="object"||gt(St))return St;throw bt("Can't set "+kt(St)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/object-create"),kt=ot("../internals/object-define-property"),bt=vt("unscopables"),St=Array.prototype;St[bt]==null&&kt.f(St,bt,{configurable:!0,value:gt(null)}),_t.exports=function(Tt){St[bt][Tt]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt;_t.exports=function(gt,kt,bt){return kt+(bt?vt(gt,kt).length:1)}},{"../internals/string-multibyte":239}],100:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-is-prototype-of"),kt=vt.TypeError;_t.exports=function(bt,St){if(gt(St,bt))return bt;throw kt("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.String,bt=vt.TypeError;_t.exports=function(St){if(gt(St))return St;throw bt(kt(St)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ot,_t,Bt){_t.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-native"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),bt=ot("../internals/is-callable"),St=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"),Pt=kt.Int8Array,At=Pt&&Pt.prototype,Dt=kt.Uint8ClampedArray,Ft=Dt&&Dt.prototype,jt=Pt&&it(Pt),Nt=At&&it(At),Gt=Object.prototype,Wt=kt.TypeError,Jt=ut("toStringTag"),Ut=dt("TYPED_ARRAY_TAG"),Ht=dt("TYPED_ARRAY_CONSTRUCTOR"),oe=vt&&!!lt&&mt(kt.opera)!=="Opera",se=!1,fe,Pe,Yt,ee={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ye={BigInt64Array:8,BigUint64Array:8},xe=function(Fe){if(!St(Fe))return!1;var ge=mt(Fe);return ge==="DataView"||Tt(ee,ge)||Tt(ye,ge)},be=function(de){if(!St(de))return!1;var Fe=mt(de);return Tt(ee,Fe)||Tt(ye,Fe)},ce=function(de){if(be(de))return de;throw Wt("Target is not a typed array")},pe=function(de){if(bt(de)&&(!lt||at(jt,de)))return de;throw Wt(xt(de)+" is not a typed array constructor")},he=function(de,Fe,ge,Se){if(gt){if(ge)for(var re in ee){var Kt=kt[re];if(Kt&&Tt(Kt.prototype,de))try{delete Kt.prototype[de]}catch(wt){try{Kt.prototype[de]=Fe}catch(Lt){}}}(!Nt[de]||ge)&&z(Nt,de,ge?Fe:oe&&At[de]||Fe,Se)}},Ce=function(de,Fe,ge){var Se,re;if(gt){if(lt){if(ge){for(Se in ee)if(re=kt[Se],re&&Tt(re,de))try{delete re[de]}catch(Kt){}}if(!jt[de]||ge)try{return z(jt,de,ge?Fe:oe&&jt[de]||Fe)}catch(Kt){}else return}for(Se in ee)re=kt[Se],re&&(!re[de]||ge)&&z(re,de,Fe)}};for(fe in ee)Pe=kt[fe],Yt=Pe&&Pe.prototype,Yt?ft(Yt,Ht,Pe):oe=!1;for(fe in ye)Pe=kt[fe],Yt=Pe&&Pe.prototype,Yt&&ft(Yt,Ht,Pe);if((!oe||!bt(jt)||jt===Function.prototype)&&(jt=function(){throw Wt("Incorrect invocation")},oe))for(fe in ee)kt[fe]&<(kt[fe],jt);if((!oe||!Nt||Nt===Gt)&&(Nt=jt.prototype,oe))for(fe in ee)kt[fe]&<(kt[fe].prototype,Nt);if(oe&&it(Ft)!==Nt&<(Ft,Nt),gt&&!Tt(Nt,Jt)){se=!0,tt(Nt,Jt,{get:function(){return St(this)?this[Ut]:void 0}});for(fe in ee)kt[fe]&&ft(kt[fe],Ut,fe)}_t.exports={NATIVE_ARRAY_BUFFER_VIEWS:oe,TYPED_ARRAY_CONSTRUCTOR:Ht,TYPED_ARRAY_TAG:se&&Ut,aTypedArray:ce,aTypedArrayConstructor:pe,exportTypedArrayMethod:he,exportTypedArrayStaticMethod:Ce,isView:xe,isTypedArray:be,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,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/descriptors"),bt=ot("../internals/array-buffer-native"),St=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,Pt=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=St.PROPER,Gt=St.CONFIGURABLE,Wt=jt.get,Jt=jt.set,Ut="ArrayBuffer",Ht="DataView",oe="prototype",se="Wrong length",fe="Wrong index",Pe=vt[Ut],Yt=Pe,ee=Yt&&Yt[oe],ye=vt[Ht],xe=ye&&ye[oe],be=Object.prototype,ce=vt.Array,pe=vt.RangeError,he=gt(At),Ce=gt([].reverse),de=it.pack,Fe=it.unpack,ge=function(Ne){return[Ne&255]},Se=function(Ne){return[Ne&255,Ne>>8&255]},re=function(Ne){return[Ne&255,Ne>>8&255,Ne>>16&255,Ne>>24&255]},Kt=function(Ne){return Ne[3]<<24|Ne[2]<<16|Ne[1]<<8|Ne[0]},wt=function(Ne){return de(Ne,23,4)},Lt=function(Ne){return de(Ne,52,8)},Xt=function(Ne,Be){Pt(Ne[oe],Be,{get:function(){return Wt(this)[Be]}})},ne=function(Ne,Be,Xe,Qe){var qe=at(Xe),He=Wt(Ne);if(qe+Be>He.byteLength)throw pe(fe);var Ue=Wt(He.buffer).bytes,We=qe+He.byteOffset,Ke=Dt(Ue,We,We+Be);return Qe?Ke:Ce(Ke)},It=function(Ne,Be,Xe,Qe,qe,He){var Ue=at(Xe),We=Wt(Ne);if(Ue+Be>We.byteLength)throw pe(fe);for(var Ke=Wt(We.buffer).bytes,rn=Ue+We.byteOffset,an=Qe(+qe),ln=0;ln<Be;ln++)Ke[rn+ln]=an[He?ln:Be-ln-1]};if(!bt)Yt=function(Be){ft(this,ee);var Xe=at(Be);Jt(this,{bytes:he(ce(Xe),0),byteLength:Xe}),kt||(this.byteLength=Xe)},ee=Yt[oe],ye=function(Be,Xe,Qe){ft(this,xe),ft(Be,ee);var qe=Wt(Be).byteLength,He=z(Xe);if(He<0||He>qe)throw pe("Wrong offset");if(Qe=Qe===void 0?qe-He:tt(Qe),He+Qe>qe)throw pe(se);Jt(this,{buffer:Be,byteLength:Qe,byteOffset:He}),kt||(this.buffer=Be,this.byteLength=Qe,this.byteOffset=He)},xe=ye[oe],kt&&(Xt(Yt,"byteLength"),Xt(ye,"buffer"),Xt(ye,"byteLength"),Xt(ye,"byteOffset")),mt(xe,{getInt8:function(Be){return ne(this,1,Be)[0]<<24>>24},getUint8:function(Be){return ne(this,1,Be)[0]},getInt16:function(Be){var Xe=ne(this,2,Be,arguments.length>1?arguments[1]:void 0);return(Xe[1]<<8|Xe[0])<<16>>16},getUint16:function(Be){var Xe=ne(this,2,Be,arguments.length>1?arguments[1]:void 0);return Xe[1]<<8|Xe[0]},getInt32:function(Be){return Kt(ne(this,4,Be,arguments.length>1?arguments[1]:void 0))},getUint32:function(Be){return Kt(ne(this,4,Be,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Be){return Fe(ne(this,4,Be,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Be){return Fe(ne(this,8,Be,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Be,Xe){It(this,1,Be,ge,Xe)},setUint8:function(Be,Xe){It(this,1,Be,ge,Xe)},setInt16:function(Be,Xe){It(this,2,Be,Se,Xe,arguments.length>2?arguments[2]:void 0)},setUint16:function(Be,Xe){It(this,2,Be,Se,Xe,arguments.length>2?arguments[2]:void 0)},setInt32:function(Be,Xe){It(this,4,Be,re,Xe,arguments.length>2?arguments[2]:void 0)},setUint32:function(Be,Xe){It(this,4,Be,re,Xe,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Be,Xe){It(this,4,Be,wt,Xe,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Be,Xe){It(this,8,Be,Lt,Xe,arguments.length>2?arguments[2]:void 0)}});else{var Rt=Nt&&Pe.name!==Ut;if(!xt(function(){Pe(1)})||!xt(function(){new Pe(-1)})||xt(function(){return new Pe,new Pe(1.5),new Pe(NaN),Rt&&!Gt})){Yt=function(Be){return ft(this,ee),new Pe(at(Be))},Yt[oe]=ee;for(var Vt=dt(Pe),$t=0,ue;Vt.length>$t;)(ue=Vt[$t++])in Yt||Tt(Yt,ue,Pe[ue]);ee.constructor=Yt}else Rt&&Gt&&Tt(Pe,"name",Ut);ut&<(xe)!==be&&ut(xe,be);var me=new ye(new Yt(2)),Le=gt(xe.setInt8);me.setInt8(0,2147483648),me.setInt8(1,2147483649),(me.getInt8(0)||!me.getInt8(1))&&mt(xe,{setInt8:function(Be,Xe){Le(this,Be,Xe<<24>>24)},setUint8:function(Be,Xe){Le(this,Be,Xe<<24>>24)}},{unsafe:!0})}Ft(Yt,Ut),Ft(ye,Ht),_t.exports={ArrayBuffer:Yt,DataView:ye}},{"../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,_t,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=Math.min;_t.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=bt((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,_t,Bt){"use strict";var vt=ot("../internals/to-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like");_t.exports=function(St){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++]=St;return Tt}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-iteration").forEach,gt=ot("../internals/array-method-is-strict"),kt=gt("forEach");_t.exports=kt?[].forEach:function(St){return vt(this,St,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ot,_t,Bt){var vt=ot("../internals/length-of-array-like");_t.exports=function(gt,kt){for(var bt=0,St=vt(kt),Tt=new gt(St);St>bt;)Tt[bt]=kt[bt++];return Tt}},{"../internals/length-of-array-like":188}],109:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),bt=ot("../internals/to-object"),St=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;_t.exports=function(lt){var ut=bt(lt),dt=mt(this),Pt=arguments.length,At=Pt>1?arguments[1]:void 0,Dt=At!==void 0;Dt&&(At=gt(At,Pt>2?arguments[2]:void 0));var Ft=tt(ut),jt=0,Nt,Gt,Wt,Jt,Ut,Ht;if(Ft&&!(this==at&&Tt(Ft)))for(Jt=z(ut,Ft),Ut=Jt.next,Gt=dt?new this:[];!(Wt=kt(Ut,Jt)).done;jt++)Ht=Dt?St(Jt,At,[Wt.value,jt],!0):Wt.value,ft(Gt,jt,Ht);else for(Nt=xt(ut),Gt=dt?new this(Nt):at(Nt);Nt>jt;jt++)Ht=Dt?At(ut[jt],jt):ut[jt],ft(Gt,jt,Ht);return Gt.length=jt,Gt}},{"../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,_t,Bt){var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=function(St){return function(Tt,mt,xt){var ft=vt(Tt),z=kt(ft),tt=gt(xt,z),at;if(St&&mt!=mt){for(;z>tt;)if(at=ft[tt++],at!=at)return!0}else for(;z>tt;tt++)if((St||tt in ft)&&ft[tt]===mt)return St||tt||0;return!St&&-1}};_t.exports={includes:bt(!0),indexOf:bt(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),bt=ot("../internals/to-object"),St=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(Pt,At,Dt,Ft){for(var jt=bt(Pt),Nt=kt(jt),Gt=vt(At,Dt),Wt=St(Nt),Jt=0,Ut=Ft||Tt,Ht=z?Ut(Pt,Wt):tt||ut?Ut(Pt,0):void 0,oe,se;Wt>Jt;Jt++)if((dt||Jt in Nt)&&(oe=Nt[Jt],se=Gt(oe,Jt,jt),ft))if(z)Ht[Jt]=se;else if(se)switch(ft){case 3:return!0;case 5:return oe;case 6:return Jt;case 2:mt(Ht,oe)}else switch(ft){case 4:return!1;case 7:mt(Ht,oe)}return lt?-1:at||it?it:Ht}};_t.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,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/to-integer-or-infinity"),bt=ot("../internals/length-of-array-like"),St=ot("../internals/array-method-is-strict"),Tt=Math.min,mt=[].lastIndexOf,xt=!!mt&&1/[1].lastIndexOf(1,-0)<0,ft=St("lastIndexOf"),z=xt||!ft;_t.exports=z?function(at){if(xt)return vt(mt,this,arguments)||0;var it=gt(this),lt=bt(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,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/well-known-symbol"),kt=ot("../internals/engine-v8-version"),bt=gt("species");_t.exports=function(St){return kt>=51||!vt(function(){var Tt=[],mt=Tt.constructor={};return mt[bt]=function(){return{foo:1}},Tt[St](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/fails");_t.exports=function(gt,kt){var bt=[][gt];return!!bt&&vt(function(){bt.call(null,kt||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/a-callable"),kt=ot("../internals/to-object"),bt=ot("../internals/indexed-object"),St=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=bt(it),ut=St(it),dt=xt?ut-1:0,Pt=xt?-1:1;if(tt<2)for(;;){if(dt in lt){at=lt[dt],dt+=Pt;break}if(dt+=Pt,xt?dt<0:ut<=dt)throw Tt("Reduce of empty array with no initial value")}for(;xt?dt>=0:ut>dt;dt+=Pt)dt in lt&&(at=z(at,lt[dt],dt,it));return at}};_t.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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-absolute-index"),kt=ot("../internals/length-of-array-like"),bt=ot("../internals/create-property"),St=vt.Array,Tt=Math.max;_t.exports=function(mt,xt,ft){for(var z=kt(mt),tt=gt(xt,z),at=gt(ft===void 0?z:ft,z),it=St(Tt(at-tt,0)),lt=0;tt<at;tt++,lt++)bt(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,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ot,_t,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?bt(Tt,mt):St(Tt,kt(vt(Tt,0,ft),mt),kt(vt(Tt,ft),mt),mt)},bt=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},St=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};_t.exports=kt},{"../internals/array-slice-simple":116}],119:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-array"),kt=ot("../internals/is-constructor"),bt=ot("../internals/is-object"),St=ot("../internals/well-known-symbol"),Tt=St("species"),mt=vt.Array;_t.exports=function(xt){var ft;return gt(xt)&&(ft=xt.constructor,kt(ft)&&(ft===mt||gt(ft.prototype))?ft=void 0:bt(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,_t,Bt){var vt=ot("../internals/array-species-constructor");_t.exports=function(gt,kt){return new(vt(gt))(kt===0?0:kt)}},{"../internals/array-species-constructor":119}],121:[function(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/iterator-close");_t.exports=function(kt,bt,St,Tt){try{return Tt?bt(vt(St)[0],St[1]):bt(St)}catch(mt){gt(kt,"throw",mt)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("iterator"),kt=!1;try{var bt=0,St={next:function(){return{done:!!bt++}},return:function(){kt=!0}};St[gt]=function(){return this},Array.from(St,function(){throw 2})}catch(Tt){}_t.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,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=vt({}.toString),kt=vt("".slice);_t.exports=function(bt){return kt(gt(bt),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-string-tag-support"),kt=ot("../internals/is-callable"),bt=ot("../internals/classof-raw"),St=ot("../internals/well-known-symbol"),Tt=St("toStringTag"),mt=vt.Object,xt=bt(function(){return arguments}())=="Arguments",ft=function(z,tt){try{return z[tt]}catch(at){}};_t.exports=gt?bt:function(z){var tt,at,it;return z===void 0?"Undefined":z===null?"Null":typeof(at=ft(tt=mt(z),Tt))=="string"?at:xt?bt(tt):(it=bt(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,_t,Bt){var vt=ot("../internals/has-own-property"),gt=ot("../internals/own-keys"),kt=ot("../internals/object-get-own-property-descriptor"),bt=ot("../internals/object-define-property");_t.exports=function(St,Tt,mt){for(var xt=gt(Tt),ft=bt.f,z=kt.f,tt=0;tt<xt.length;tt++){var at=xt[tt];!vt(St,at)&&!(mt&&vt(mt,at))&&ft(St,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,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("match");_t.exports=function(kt){var bt=/./;try{"/./"[kt](bt)}catch(St){try{return bt[gt]=!1,"/./"[kt](bt)}catch(Tt){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){function gt(){}return gt.prototype.constructor=null,Object.getPrototypeOf(new gt)!==gt.prototype})},{"../internals/fails":150}],128:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/iterators-core").IteratorPrototype,gt=ot("../internals/object-create"),kt=ot("../internals/create-property-descriptor"),bt=ot("../internals/set-to-string-tag"),St=ot("../internals/iterators"),Tt=function(){return this};_t.exports=function(mt,xt,ft,z){var tt=xt+" Iterator";return mt.prototype=gt(vt,{next:kt(+!z,ft)}),bt(mt,tt,!1,!0),St[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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");_t.exports=vt?function(bt,St,Tt){return gt.f(bt,St,kt(1,Tt))}:function(bt,St,Tt){return bt[St]=Tt,bt}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ot,_t,Bt){_t.exports=function(vt,gt){return{enumerable:!(vt&1),configurable:!(vt&2),writable:!(vt&4),value:gt}}},{}],131:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/to-property-key"),gt=ot("../internals/object-define-property"),kt=ot("../internals/create-property-descriptor");_t.exports=function(bt,St,Tt){var mt=vt(St);mt in bt?gt.f(bt,mt,kt(0,Tt)):bt[mt]=Tt}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/is-pure"),bt=ot("../internals/function-name"),St=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=bt.PROPER,dt=bt.CONFIGURABLE,Pt=lt.IteratorPrototype,At=lt.BUGGY_SAFARI_ITERATORS,Dt=at("iterator"),Ft="keys",jt="values",Nt="entries",Gt=function(){return this};_t.exports=function(Wt,Jt,Ut,Ht,oe,se,fe){Tt(Ut,Jt,Ht);var Pe=function(de){if(de===oe&&be)return be;if(!At&&de in ye)return ye[de];switch(de){case Ft:return function(){return new Ut(this,de)};case jt:return function(){return new Ut(this,de)};case Nt:return function(){return new Ut(this,de)}}return function(){return new Ut(this)}},Yt=Jt+" Iterator",ee=!1,ye=Wt.prototype,xe=ye[Dt]||ye["@@iterator"]||oe&&ye[oe],be=!At&&xe||Pe(oe),ce=Jt=="Array"&&ye.entries||xe,pe,he,Ce;if(ce&&(pe=mt(ce.call(new Wt)),pe!==Object.prototype&&pe.next&&(!kt&&mt(pe)!==Pt&&(xt?xt(pe,Pt):St(pe[Dt])||tt(pe,Dt,Gt)),ft(pe,Yt,!0,!0),kt&&(it[Yt]=Gt))),ut&&oe==jt&&xe&&xe.name!==jt&&(!kt&&dt?z(ye,"name",jt):(ee=!0,be=function(){return gt(xe,this)})),oe)if(he={values:Pe(jt),keys:se?be:Pe(Ft),entries:Pe(Nt)},fe)for(Ce in he)(At||ee||!(Ce in ye))&&tt(ye,Ce,he[Ce]);else vt({target:Jt,proto:!0,forced:At||ee},he);return(!kt||fe)&&ye[Dt]!==be&&tt(ye,Dt,be,{name:oe}),it[Jt]=be,he}},{"../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,_t,Bt){var vt=ot("../internals/path"),gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol-wrapped"),bt=ot("../internals/object-define-property").f;_t.exports=function(St){var Tt=vt.Symbol||(vt.Symbol={});gt(Tt,St)||bt(Tt,St,{value:kt.f(St)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-object"),kt=vt.document,bt=gt(kt)&>(kt.createElement);_t.exports=function(St){return bt?kt.createElement(St):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ot,_t,Bt){_t.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,_t,Bt){var vt=ot("../internals/document-create-element"),gt=vt("span").classList,kt=gt&>.constructor&>.constructor.prototype;_t.exports=kt===Object.prototype?void 0:kt},{"../internals/document-create-element":135}],138:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/firefox\/(\d+)/i);_t.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],139:[function(ot,_t,Bt){_t.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/MSIE|Trident/.test(vt)},{"../internals/engine-user-agent":145}],141:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=ot("../internals/global");_t.exports=/ipad|iphone|ipod/i.test(vt)&>.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(vt)},{"../internals/engine-user-agent":145}],143:[function(ot,_t,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/global");_t.exports=vt(gt.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent");_t.exports=/web0s(?!.*chrome)/i.test(vt)},{"../internals/engine-user-agent":145}],145:[function(ot,_t,Bt){var vt=ot("../internals/get-built-in");_t.exports=vt("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/engine-user-agent"),kt=vt.process,bt=vt.Deno,St=kt&&kt.versions||bt&&bt.version,Tt=St&&St.v8,mt,xt;Tt&&(mt=Tt.split("."),xt=mt[0]>0&&mt[0]<4?1:+(mt[0]+mt[1])),!xt&>&&(mt=gt.match(/Edge\/(\d+)/),(!mt||mt[1]>=74)&&(mt=gt.match(/Chrome\/(\d+)/),mt&&(xt=+mt[1]))),_t.exports=xt},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ot,_t,Bt){var vt=ot("../internals/engine-user-agent"),gt=vt.match(/AppleWebKit\/(\d+)\./);_t.exports=!!gt&&+gt[1]},{"../internals/engine-user-agent":145}],148:[function(ot,_t,Bt){_t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/object-get-own-property-descriptor").f,kt=ot("../internals/create-non-enumerable-property"),bt=ot("../internals/redefine"),St=ot("../internals/set-global"),Tt=ot("../internals/copy-constructor-properties"),mt=ot("../internals/is-forced");_t.exports=function(xt,ft){var z=xt.target,tt=xt.global,at=xt.stat,it,lt,ut,dt,Pt,At;if(tt?lt=vt:at?lt=vt[z]||St(z,{}):lt=(vt[z]||{}).prototype,lt)for(ut in ft){if(Pt=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 Pt==typeof dt)continue;Tt(Pt,dt)}(xt.sham||dt&&dt.sham)&&kt(Pt,"sham",!0),bt(lt,ut,Pt,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,_t,Bt){_t.exports=function(vt){try{return!!vt()}catch(gt){return!0}}},{}],151:[function(ot,_t,Bt){"use strict";ot("../modules/es.regexp.exec");var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/redefine"),kt=ot("../internals/regexp-exec"),bt=ot("../internals/fails"),St=ot("../internals/well-known-symbol"),Tt=ot("../internals/create-non-enumerable-property"),mt=St("species"),xt=RegExp.prototype;_t.exports=function(ft,z,tt,at){var it=St(ft),lt=!bt(function(){var At={};return At[it]=function(){return 7},""[ft](At)!=7}),ut=lt&&!bt(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]),Pt=z(it,""[ft],function(At,Dt,Ft,jt,Nt){var Gt=vt(At),Wt=Dt.exec;return Wt===kt||Wt===xt.exec?lt&&!Nt?{done:!0,value:dt(Dt,Ft,jt)}:{done:!0,value:Gt(Ft,Dt,jt)}:{done:!1}});gt(String.prototype,ft,Pt[0]),gt(xt,it,Pt[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,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.apply,bt=gt.call;_t.exports=typeof Reflect=="object"&&Reflect.apply||(vt?bt.bind(kt):function(){return bt.apply(kt,arguments)})},{"../internals/function-bind-native":154}],153:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/a-callable"),kt=ot("../internals/function-bind-native"),bt=vt(vt.bind);_t.exports=function(St,Tt){return gt(St),Tt===void 0?St:kt?bt(St,Tt):function(){return St.apply(Tt,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ot,_t,Bt){var vt=ot("../internals/fails");_t.exports=!vt(function(){var gt=function(){}.bind();return typeof gt!="function"||gt.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype.call;_t.exports=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)}},{"../internals/function-bind-native":154}],156:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/has-own-property"),kt=Function.prototype,bt=vt&&Object.getOwnPropertyDescriptor,St=gt(kt,"name"),Tt=St&&function(){}.name==="something",mt=St&&(!vt||vt&&bt(kt,"name").configurable);_t.exports={EXISTS:St,PROPER:Tt,CONFIGURABLE:mt}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-native"),gt=Function.prototype,kt=gt.bind,bt=gt.call,St=vt&&kt.bind(bt,bt);_t.exports=vt?function(Tt){return Tt&&St(Tt)}:function(Tt){return Tt&&function(){return bt.apply(Tt,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=function(bt){return gt(bt)?bt:void 0};_t.exports=function(bt,St){return arguments.length<2?kt(vt[bt]):vt[bt]&&vt[bt][St]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ot,_t,Bt){var vt=ot("../internals/classof"),gt=ot("../internals/get-method"),kt=ot("../internals/iterators"),bt=ot("../internals/well-known-symbol"),St=bt("iterator");_t.exports=function(Tt){if(Tt!=null)return gt(Tt,St)||gt(Tt,"@@iterator")||kt[vt(Tt)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/an-object"),St=ot("../internals/try-to-string"),Tt=ot("../internals/get-iterator-method"),mt=vt.TypeError;_t.exports=function(xt,ft){var z=arguments.length<2?Tt(xt):ft;if(kt(z))return bt(gt(z,xt));throw mt(St(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,_t,Bt){var vt=ot("../internals/a-callable");_t.exports=function(gt,kt){var bt=gt[kt];return bt==null?void 0:vt(bt)}},{"../internals/a-callable":95}],162:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=Math.floor,bt=vt("".charAt),St=vt("".replace),Tt=vt("".slice),mt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xt=/\$([$&'`]|\d{1,2})/g;_t.exports=function(ft,z,tt,at,it,lt){var ut=tt+ft.length,dt=at.length,Pt=xt;return it!==void 0&&(it=gt(it),Pt=mt),St(lt,Pt,function(At,Dt){var Ft;switch(bt(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?bt(Dt,1):at[Nt-1]+bt(Dt,1):At}Ft=at[jt-1]}return Ft===void 0?"":Ft})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ot,_t,Bt){(function(vt){(function(){var gt=function(kt){return kt&&kt.Math==Math&&kt};_t.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 cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-object"),kt=vt({}.hasOwnProperty);_t.exports=Object.hasOwn||function(St,Tt){return kt(gt(St),Tt)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ot,_t,Bt){_t.exports={}},{}],166:[function(ot,_t,Bt){var vt=ot("../internals/global");_t.exports=function(gt,kt){var bt=vt.console;bt&&bt.error&&(arguments.length==1?bt.error(gt):bt.error(gt,kt))}},{"../internals/global":163}],167:[function(ot,_t,Bt){var vt=ot("../internals/get-built-in");_t.exports=vt("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails"),kt=ot("../internals/document-create-element");_t.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,_t,Bt){var vt=ot("../internals/global"),gt=vt.Array,kt=Math.abs,bt=Math.pow,St=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,Pt=tt===23?bt(2,-24)-bt(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=St(Tt(z)/mt),Nt=bt(2,-Ft),z*Nt<1&&(Ft--,Nt*=2),Ft+dt>=1?z+=Pt/Nt:z+=Pt*bt(2,1-dt),z*Nt>=2&&(Ft++,Nt/=2),Ft+dt>=ut?(jt=0,Ft=ut):Ft+dt>=1?(jt=(z*Nt-1)*bt(2,tt),Ft=Ft+dt):(jt=z*bt(2,dt-1)*bt(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,Pt=at-1,At=z[Pt--],Dt=At&127,Ft;for(At>>=7;dt>0;)Dt=Dt*256+z[Pt--],dt-=8;for(Ft=Dt&(1<<-dt)-1,Dt>>=-dt,dt+=tt;dt>0;)Ft=Ft*256+z[Pt--],dt-=8;if(Dt===0)Dt=1-ut;else{if(Dt===lt)return Ft?NaN:At?-1/0:1/0;Ft=Ft+bt(2,tt),Dt=Dt-ut}return(At?-1:1)*Ft*bt(2,Dt-tt)};_t.exports={pack:xt,unpack:ft}},{"../internals/global":163}],170:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/classof-raw"),St=vt.Object,Tt=gt("".split);_t.exports=kt(function(){return!St("z").propertyIsEnumerable(0)})?function(mt){return bt(mt)=="String"?Tt(mt,""):St(mt)}:St},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ot,_t,Bt){var vt=ot("../internals/is-callable"),gt=ot("../internals/is-object"),kt=ot("../internals/object-set-prototype-of");_t.exports=function(bt,St,Tt){var mt,xt;return kt&&vt(mt=St.constructor)&&mt!==Tt&>(xt=mt.prototype)&&xt!==Tt.prototype&&kt(bt,xt),bt}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/is-callable"),kt=ot("../internals/shared-store"),bt=vt(Function.toString);gt(kt.inspectSource)||(kt.inspectSource=function(St){return bt(St)}),_t.exports=kt.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ot,_t,Bt){var vt=ot("../internals/native-weak-map"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-object"),St=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(Gt){return ut(Gt)?lt(Gt):it(Gt,{})},Pt=function(Gt){return function(Wt){var Jt;if(!bt(Wt)||(Jt=lt(Wt)).type!==Gt)throw tt("Incompatible receiver, "+Gt+" 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(Gt,Wt){if(Ft(At,Gt))throw new tt(z);return Wt.facade=Gt,jt(At,Gt,Wt),Wt},lt=function(Gt){return Dt(At,Gt)||{}},ut=function(Gt){return Ft(At,Gt)}}else{var Nt=xt("state");ft[Nt]=!0,it=function(Gt,Wt){if(Tt(Gt,Nt))throw new tt(z);return Wt.facade=Gt,St(Gt,Nt,Wt),Wt},lt=function(Gt){return Tt(Gt,Nt)?Gt[Nt]:{}},ut=function(Gt){return Tt(Gt,Nt)}}_t.exports={set:it,get:lt,has:ut,enforce:dt,getterFor:Pt}},{"../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,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=ot("../internals/iterators"),kt=vt("iterator"),bt=Array.prototype;_t.exports=function(St){return St!==void 0&&(gt.Array===St||bt[kt]===St)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ot,_t,Bt){var vt=ot("../internals/classof-raw");_t.exports=Array.isArray||function(kt){return vt(kt)=="Array"}},{"../internals/classof-raw":123}],176:[function(ot,_t,Bt){_t.exports=function(vt){return typeof vt=="function"}},{}],177:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/fails"),kt=ot("../internals/is-callable"),bt=ot("../internals/classof"),St=ot("../internals/get-built-in"),Tt=ot("../internals/inspect-source"),mt=function(){},xt=[],ft=St("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(Pt){return!1}},lt=function(dt){if(!kt(dt))return!1;switch(bt(dt)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return at||!!tt(z,Tt(dt))}catch(Pt){return!0}};lt.sham=!0,_t.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,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=/#|\.prototype\./,bt=function(ft,z){var tt=Tt[St(ft)];return tt==xt?!0:tt==mt?!1:gt(z)?vt(z):!!z},St=bt.normalize=function(ft){return String(ft).replace(kt,".").toLowerCase()},Tt=bt.data={},mt=bt.NATIVE="N",xt=bt.POLYFILL="P";_t.exports=bt},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ot,_t,Bt){var vt=ot("../internals/is-object"),gt=Math.floor;_t.exports=Number.isInteger||function(bt){return!vt(bt)&&isFinite(bt)&>(bt)===bt}},{"../internals/is-object":180}],180:[function(ot,_t,Bt){var vt=ot("../internals/is-callable");_t.exports=function(gt){return typeof gt=="object"?gt!==null:vt(gt)}},{"../internals/is-callable":176}],181:[function(ot,_t,Bt){_t.exports=!1},{}],182:[function(ot,_t,Bt){var vt=ot("../internals/is-object"),gt=ot("../internals/classof-raw"),kt=ot("../internals/well-known-symbol"),bt=kt("match");_t.exports=function(St){var Tt;return vt(St)&&((Tt=St[bt])!==void 0?!!Tt:gt(St)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-callable"),bt=ot("../internals/object-is-prototype-of"),St=ot("../internals/use-symbol-as-uid"),Tt=vt.Object;_t.exports=St?function(mt){return typeof mt=="symbol"}:function(mt){var xt=gt("Symbol");return kt(xt)&&bt(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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/function-call"),bt=ot("../internals/an-object"),St=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;_t.exports=function(ut,dt,Pt){var At=Pt&&Pt.that,Dt=!!(Pt&&Pt.AS_ENTRIES),Ft=!!(Pt&&Pt.IS_ITERATOR),jt=!!(Pt&&Pt.INTERRUPTED),Nt=gt(dt,At),Gt,Wt,Jt,Ut,Ht,oe,se,fe=function(Yt){return Gt&&tt(Gt,"normal",Yt),new it(!0,Yt)},Pe=function(Yt){return Dt?(bt(Yt),jt?Nt(Yt[0],Yt[1],fe):Nt(Yt[0],Yt[1])):jt?Nt(Yt,fe):Nt(Yt)};if(Ft)Gt=ut;else{if(Wt=z(ut),!Wt)throw at(St(ut)+" is not iterable");if(Tt(Wt)){for(Jt=0,Ut=mt(ut);Ut>Jt;Jt++)if(Ht=Pe(ut[Jt]),Ht&&xt(lt,Ht))return Ht;return new it(!1)}Gt=ft(ut,Wt)}for(oe=Gt.next;!(se=kt(oe,Gt)).done;){try{Ht=Pe(se.value)}catch(Yt){tt(Gt,"throw",Yt)}if(typeof Ht=="object"&&Ht&&xt(lt,Ht))return Ht}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,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/an-object"),kt=ot("../internals/get-method");_t.exports=function(bt,St,Tt){var mt,xt;gt(bt);try{if(mt=kt(bt,"return"),!mt){if(St==="throw")throw Tt;return Tt}mt=vt(mt,bt)}catch(ft){xt=!0,mt=ft}if(St==="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,_t,Bt){"use strict";var vt=ot("../internals/fails"),gt=ot("../internals/is-callable"),kt=ot("../internals/object-create"),bt=ot("../internals/object-get-prototype-of"),St=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=bt(bt(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])||St(z,xt,function(){return this}),_t.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,_t,Bt){arguments[4][165][0].apply(Bt,arguments)},{dup:165}],188:[function(ot,_t,Bt){var vt=ot("../internals/to-length");_t.exports=function(gt){return vt(gt.length)}},{"../internals/to-length":249}],189:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-bind-context"),kt=ot("../internals/object-get-own-property-descriptor").f,bt=ot("../internals/task").set,St=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,Pt,At,Dt,Ft,jt,Nt;lt||(ut=function(){var Gt,Wt;for(xt&&(Gt=tt.domain)&&Gt.exit();dt;){Wt=dt.fn,dt=dt.next;try{Wt()}catch(Jt){throw dt?At():Pt=void 0,Jt}}Pt=void 0,Gt&&Gt.enter()},!St&&!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)}:(bt=gt(bt,vt),At=function(){bt(ut)})),_t.exports=lt||function(Gt){var Wt={fn:Gt,next:void 0};Pt&&(Pt.next=Wt),dt||(dt=Wt,At()),Pt=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,_t,Bt){var vt=ot("../internals/native-symbol");_t.exports=vt&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ot,_t,Bt){var vt=ot("../internals/engine-v8-version"),gt=ot("../internals/fails");_t.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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/inspect-source"),bt=vt.WeakMap;_t.exports=gt(bt)&&/native code/.test(kt(bt))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/a-callable"),gt=function(kt){var bt,St;this.promise=new kt(function(Tt,mt){if(bt!==void 0||St!==void 0)throw TypeError("Bad Promise constructor");bt=Tt,St=mt}),this.resolve=vt(bt),this.reject=vt(St)};_t.exports.f=function(kt){return new gt(kt)}},{"../internals/a-callable":95}],194:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-regexp"),kt=vt.TypeError;_t.exports=function(bt){if(gt(bt))throw kt("The method doesn't accept regular expressions");return bt}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/function-call"),bt=ot("../internals/fails"),St=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);_t.exports=!z||bt(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(Pt){lt[Pt]=Pt}),z({},it)[ut]!=7||St(z({},lt)).join("")!=dt})?function(lt,ut){for(var dt=xt(lt),Pt=arguments.length,At=1,Dt=Tt.f,Ft=mt.f;Pt>At;)for(var jt=ft(arguments[At++]),Nt=Dt?at(St(jt),Dt(jt)):St(jt),Gt=Nt.length,Wt=0,Jt;Gt>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,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/object-define-properties"),kt=ot("../internals/enum-bug-keys"),bt=ot("../internals/hidden-keys"),St=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",St.appendChild(Dt),Dt.src=String(Ft),jt=Dt.contentWindow.document,jt.open(),jt.write(lt("document.F=Object")),jt.close(),jt.F},Pt,At=function(){try{Pt=new ActiveXObject("htmlfile")}catch(Ft){}At=typeof document!="undefined"?document.domain&&Pt?ut(Pt):dt():ut(Pt);for(var Dt=kt.length;Dt--;)delete At[z][kt[Dt]];return At()};bt[at]=!0,_t.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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/v8-prototype-define-bug"),kt=ot("../internals/object-define-property"),bt=ot("../internals/an-object"),St=ot("../internals/to-indexed-object"),Tt=ot("../internals/object-keys");Bt.f=vt&&!gt?Object.defineProperties:function(xt,ft){bt(xt);for(var z=St(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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/descriptors"),kt=ot("../internals/ie8-dom-define"),bt=ot("../internals/v8-prototype-define-bug"),St=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?bt?function(lt,ut,dt){if(St(lt),ut=Tt(ut),St(dt),typeof lt=="function"&&ut==="prototype"&&"value"in dt&&at in dt&&!dt[at]){var Pt=ft(lt,ut);Pt&&Pt[at]&&(lt[ut]=dt.value,dt={configurable:tt in dt?dt[tt]:Pt[tt],enumerable:z in dt?dt[z]:Pt[z],writable:!1})}return xt(lt,ut,dt)}:xt:function(lt,ut,dt){if(St(lt),ut=Tt(ut),St(dt),kt)try{return xt(lt,ut,dt)}catch(Pt){}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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-call"),kt=ot("../internals/object-property-is-enumerable"),bt=ot("../internals/create-property-descriptor"),St=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=St(tt),at=Tt(at),xt)try{return ft(tt,at)}catch(it){}if(mt(tt,at))return bt(!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,_t,Bt){var vt=ot("../internals/classof-raw"),gt=ot("../internals/to-indexed-object"),kt=ot("../internals/object-get-own-property-names").f,bt=ot("../internals/array-slice-simple"),St=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tt=function(mt){try{return kt(mt)}catch(xt){return bt(St)}};_t.exports.f=function(xt){return St&&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,_t,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys"),kt=gt.concat("length","prototype");Bt.f=Object.getOwnPropertyNames||function(St){return vt(St,kt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ot,_t,Bt){Bt.f=Object.getOwnPropertySymbols},{}],203:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-callable"),bt=ot("../internals/to-object"),St=ot("../internals/shared-key"),Tt=ot("../internals/correct-prototype-getter"),mt=St("IE_PROTO"),xt=vt.Object,ft=xt.prototype;_t.exports=Tt?xt.getPrototypeOf:function(z){var tt=bt(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,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/has-own-property"),kt=ot("../internals/to-indexed-object"),bt=ot("../internals/array-includes").indexOf,St=ot("../internals/hidden-keys"),Tt=vt([].push);_t.exports=function(mt,xt){var ft=kt(mt),z=0,tt=[],at;for(at in ft)!gt(St,at)&>(ft,at)&&Tt(tt,at);for(;xt.length>z;)gt(ft,at=xt[z++])&&(~bt(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,_t,Bt){var vt=ot("../internals/object-keys-internal"),gt=ot("../internals/enum-bug-keys");_t.exports=Object.keys||function(bt){return vt(bt,gt)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ot,_t,Bt){"use strict";var vt={}.propertyIsEnumerable,gt=Object.getOwnPropertyDescriptor,kt=gt&&!vt.call({1:2},1);Bt.f=kt?function(St){var Tt=gt(this,St);return!!Tt&&Tt.enumerable}:vt},{}],208:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/an-object"),kt=ot("../internals/a-possible-prototype");_t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var bt=!1,St={},Tt;try{Tt=vt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Tt(St,[]),bt=St instanceof Array}catch(mt){}return function(xt,ft){return gt(xt),kt(ft),bt?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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-keys"),bt=ot("../internals/to-indexed-object"),St=ot("../internals/object-property-is-enumerable").f,Tt=gt(St),mt=gt([].push),xt=function(ft){return function(z){for(var tt=bt(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}};_t.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,_t,Bt){"use strict";var vt=ot("../internals/to-string-tag-support"),gt=ot("../internals/classof");_t.exports=vt?{}.toString:function(){return"[object "+gt(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-callable"),bt=ot("../internals/is-object"),St=vt.TypeError;_t.exports=function(Tt,mt){var xt,ft;if(mt==="string"&&kt(xt=Tt.toString)&&!bt(ft=gt(xt,Tt))||kt(xt=Tt.valueOf)&&!bt(ft=gt(xt,Tt))||mt!=="string"&&kt(xt=Tt.toString)&&!bt(ft=gt(xt,Tt)))return ft;throw St("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,_t,Bt){var vt=ot("../internals/get-built-in"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/object-get-own-property-names"),bt=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/an-object"),Tt=gt([].concat);_t.exports=vt("Reflect","ownKeys")||function(xt){var ft=kt.f(St(xt)),z=bt.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,_t,Bt){var vt=ot("../internals/global");_t.exports=vt},{"../internals/global":163}],214:[function(ot,_t,Bt){_t.exports=function(vt){try{return{error:!1,value:vt()}}catch(gt){return{error:!0,value:gt}}}},{}],215:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/promise-native-constructor"),kt=ot("../internals/is-callable"),bt=ot("../internals/is-forced"),St=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&>.prototype,tt=Tt("species"),at=!1,it=kt(vt.PromiseRejectionEvent),lt=bt("Promise",function(){var ut=St(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 Pt=new gt(function(Ft){Ft(1)}),At=function(Ft){Ft(function(){},function(){})},Dt=Pt.constructor={};return Dt[tt]=At,at=Pt.then(function(){})instanceof At,at?!dt&&mt&&!it:!0});_t.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,_t,Bt){var vt=ot("../internals/global");_t.exports=vt.Promise},{"../internals/global":163}],217:[function(ot,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/is-object"),kt=ot("../internals/new-promise-capability");_t.exports=function(bt,St){if(vt(bt),gt(St)&&St.constructor===bt)return St;var Tt=kt.f(bt),mt=Tt.resolve;return mt(St),Tt.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ot,_t,Bt){var vt=ot("../internals/promise-native-constructor"),gt=ot("../internals/check-correctness-of-iteration"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR;_t.exports=kt||!gt(function(bt){vt.all(bt).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ot,_t,Bt){var vt=ot("../internals/object-define-property").f;_t.exports=function(gt,kt,bt){bt in gt||vt(gt,bt,{configurable:!0,get:function(){return kt[bt]},set:function(St){kt[bt]=St}})}},{"../internals/object-define-property":198}],220:[function(ot,_t,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}},_t.exports=vt},{}],221:[function(ot,_t,Bt){var vt=ot("../internals/redefine");_t.exports=function(gt,kt,bt){for(var St in kt)vt(gt,St,kt[St],bt);return gt}},{"../internals/redefine":222}],222:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/is-callable"),kt=ot("../internals/has-own-property"),bt=ot("../internals/create-non-enumerable-property"),St=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");(_t.exports=function(at,it,lt,ut){var dt=ut?!!ut.unsafe:!1,Pt=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&<.name!==Dt)&&bt(lt,"name",Dt),Ft=z(lt),Ft.source||(Ft.source=tt.join(typeof Dt=="string"?Dt:""))),at===vt){Pt?at[it]=lt:St(it,lt);return}else dt?!At&&at[it]&&(Pt=!0):delete at[it];Pt?at[it]=lt:bt(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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/an-object"),bt=ot("../internals/is-callable"),St=ot("../internals/classof-raw"),Tt=ot("../internals/regexp-exec"),mt=vt.TypeError;_t.exports=function(xt,ft){var z=xt.exec;if(bt(z)){var tt=gt(z,xt,ft);return tt!==null&&kt(tt),tt}if(St(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,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/to-string"),bt=ot("../internals/regexp-flags"),St=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),Pt=gt("".slice),At=function(){var Nt=/a/,Gt=/b*/g;return vt(at,Nt,"a"),vt(at,Gt,"a"),Nt.lastIndex!==0||Gt.lastIndex!==0}(),Dt=St.BROKEN_CARET,Ft=/()??/.exec("")[1]!==void 0,jt=At||Ft||Dt||ft||z;jt&&(it=function(Gt){var Wt=this,Jt=xt(Wt),Ut=kt(Gt),Ht=Jt.raw,oe,se,fe,Pe,Yt,ee,ye;if(Ht)return Ht.lastIndex=Wt.lastIndex,oe=vt(it,Ht,Ut),Wt.lastIndex=Ht.lastIndex,oe;var xe=Jt.groups,be=Dt&&Wt.sticky,ce=vt(bt,Wt),pe=Wt.source,he=0,Ce=Ut;if(be&&(ce=dt(ce,"y",""),ut(ce,"g")===-1&&(ce+="g"),Ce=Pt(Ut,Wt.lastIndex),Wt.lastIndex>0&&(!Wt.multiline||Wt.multiline&<(Ut,Wt.lastIndex-1)!==`
|
|
`)&&(pe="(?: "+pe+")",Ce=" "+Ce,he++),se=new RegExp("^(?:"+pe+")",ce)),Ft&&(se=new RegExp("^"+pe+"$(?!\\s)",ce)),At&&(fe=Wt.lastIndex),Pe=vt(at,be?se:Wt,Ce),be?Pe?(Pe.input=Pt(Pe.input,he),Pe[0]=Pt(Pe[0],he),Pe.index=Wt.lastIndex,Wt.lastIndex+=Pe[0].length):Wt.lastIndex=0:At&&Pe&&(Wt.lastIndex=Wt.global?Pe.index+Pe[0].length:fe),Ft&&Pe&&Pe.length>1&&vt(tt,Pe[0],se,function(){for(Yt=1;Yt<arguments.length-2;Yt++)arguments[Yt]===void 0&&(Pe[Yt]=void 0)}),Pe&&xe)for(Pe.groups=ee=mt(null),Yt=0;Yt<xe.length;Yt++)ye=xe[Yt],ee[ye[0]]=Pe[ye[1]];return Pe}),_t.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,_t,Bt){"use strict";var vt=ot("../internals/an-object");_t.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,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/has-own-property"),kt=ot("../internals/object-is-prototype-of"),bt=ot("../internals/regexp-flags"),St=RegExp.prototype;_t.exports=function(Tt){var mt=Tt.flags;return mt===void 0&&!("flags"in St)&&!gt(Tt,"flags")&&kt(St,Tt)?vt(bt,Tt):mt}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp,bt=vt(function(){var mt=kt("a","y");return mt.lastIndex=2,mt.exec("abcd")!=null}),St=bt||vt(function(){return!kt("a","y").sticky}),Tt=bt||vt(function(){var mt=kt("^r","gy");return mt.lastIndex=2,mt.exec("str")!=null});_t.exports={BROKEN_CARET:Tt,MISSED_STICKY:St,UNSUPPORTED_Y:bt}},{"../internals/fails":150,"../internals/global":163}],228:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;_t.exports=vt(function(){var bt=kt(".","s");return!(bt.dotAll&&bt.exec(`
|
|
`)&&bt.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ot,_t,Bt){var vt=ot("../internals/fails"),gt=ot("../internals/global"),kt=gt.RegExp;_t.exports=vt(function(){var bt=kt("(?<a>b)","g");return bt.exec("b").groups.a!=="b"||"b".replace(bt,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;_t.exports=function(kt){if(kt==null)throw gt("Can't call method on "+kt);return kt}},{"../internals/global":163}],231:[function(ot,_t,Bt){_t.exports=Object.is||function(gt,kt){return gt===kt?gt!==0||1/gt===1/kt:gt!=gt&&kt!=kt}},{}],232:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=Object.defineProperty;_t.exports=function(kt,bt){try{gt(vt,kt,{value:bt,configurable:!0,writable:!0})}catch(St){vt[kt]=bt}return bt}},{"../internals/global":163}],233:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/get-built-in"),gt=ot("../internals/object-define-property"),kt=ot("../internals/well-known-symbol"),bt=ot("../internals/descriptors"),St=kt("species");_t.exports=function(Tt){var mt=vt(Tt),xt=gt.f;bt&&mt&&!mt[St]&&xt(mt,St,{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,_t,Bt){var vt=ot("../internals/object-define-property").f,gt=ot("../internals/has-own-property"),kt=ot("../internals/well-known-symbol"),bt=kt("toStringTag");_t.exports=function(St,Tt,mt){St&&!mt&&(St=St.prototype),St&&!gt(St,bt)&&vt(St,bt,{configurable:!0,value:Tt})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ot,_t,Bt){var vt=ot("../internals/shared"),gt=ot("../internals/uid"),kt=vt("keys");_t.exports=function(bt){return kt[bt]||(kt[bt]=gt(bt))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/set-global"),kt="__core-js_shared__",bt=vt[kt]||gt(kt,{});_t.exports=bt},{"../internals/global":163,"../internals/set-global":232}],237:[function(ot,_t,Bt){var vt=ot("../internals/is-pure"),gt=ot("../internals/shared-store");(_t.exports=function(kt,bt){return gt[kt]||(gt[kt]=bt!==void 0?bt:{})})("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,_t,Bt){var vt=ot("../internals/an-object"),gt=ot("../internals/a-constructor"),kt=ot("../internals/well-known-symbol"),bt=kt("species");_t.exports=function(St,Tt){var mt=vt(St).constructor,xt;return mt===void 0||(xt=vt(mt)[bt])==null?Tt:gt(xt)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-string"),bt=ot("../internals/require-object-coercible"),St=vt("".charAt),Tt=vt("".charCodeAt),mt=vt("".slice),xt=function(ft){return function(z,tt){var at=kt(bt(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?St(at,it):ut:ft?mt(at,it,it+2):(ut-55296<<10)+(dt-56320)+65536)}};_t.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,_t,Bt){var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/fails"),kt=ot("../internals/whitespaces"),bt="\u200B\x85\u180E";_t.exports=function(St){return gt(function(){return!!kt[St]()||bt[St]()!==bt||vt&&kt[St].name!==St})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/require-object-coercible"),kt=ot("../internals/to-string"),bt=ot("../internals/whitespaces"),St=vt("".replace),Tt="["+bt+"]",mt=RegExp("^"+Tt+Tt+"*"),xt=RegExp(Tt+Tt+"*$"),ft=function(z){return function(tt){var at=kt(gt(tt));return z&1&&(at=St(at,mt,"")),z&2&&(at=St(at,xt,"")),at}};_t.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,_t,Bt){var vt=ot("../internals/function-call"),gt=ot("../internals/get-built-in"),kt=ot("../internals/well-known-symbol"),bt=ot("../internals/redefine");_t.exports=function(){var St=gt("Symbol"),Tt=St&&St.prototype,mt=Tt&&Tt.valueOf,xt=kt("toPrimitive");Tt&&!Tt[xt]&&bt(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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/function-bind-context"),bt=ot("../internals/is-callable"),St=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,Pt=vt.Function,At=vt.MessageChannel,Dt=vt.String,Ft=0,jt={},Nt="onreadystatechange",Gt,Wt,Jt,Ut;try{Gt=vt.location}catch(Pe){}var Ht=function(Pe){if(St(jt,Pe)){var Yt=jt[Pe];delete jt[Pe],Yt()}},oe=function(Pe){return function(){Ht(Pe)}},se=function(Pe){Ht(Pe.data)},fe=function(Pe){vt.postMessage(Dt(Pe),Gt.protocol+"//"+Gt.host)};(!it||!lt)&&(it=function(Yt){z(arguments.length,1);var ee=bt(Yt)?Yt:Pt(Yt),ye=xt(arguments,1);return jt[++Ft]=function(){gt(ee,void 0,ye)},Wt(Ft),Ft},lt=function(Yt){delete jt[Yt]},at?Wt=function(Pe){ut.nextTick(oe(Pe))}:dt&&dt.now?Wt=function(Pe){dt.now(oe(Pe))}:At&&!tt?(Jt=new At,Ut=Jt.port2,Jt.port1.onmessage=se,Wt=kt(Ut.postMessage,Ut)):vt.addEventListener&&bt(vt.postMessage)&&!vt.importScripts&&Gt&&Gt.protocol!=="file:"&&!Tt(fe)?(Wt=fe,vt.addEventListener("message",se,!1)):Nt in ft("script")?Wt=function(Pe){mt.appendChild(ft("script"))[Nt]=function(){mt.removeChild(this),Ht(Pe)}}:Wt=function(Pe){setTimeout(oe(Pe),0)}),_t.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,_t,Bt){var vt=ot("../internals/function-uncurry-this");_t.exports=vt(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ot,_t,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.max,kt=Math.min;_t.exports=function(bt,St){var Tt=vt(bt);return Tt<0?gt(Tt+St,0):kt(Tt,St)}},{"../internals/to-integer-or-infinity":248}],246:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=ot("../internals/to-length"),bt=vt.RangeError;_t.exports=function(St){if(St===void 0)return 0;var Tt=gt(St),mt=kt(Tt);if(Tt!==mt)throw bt("Wrong length or index");return mt}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ot,_t,Bt){var vt=ot("../internals/indexed-object"),gt=ot("../internals/require-object-coercible");_t.exports=function(kt){return vt(gt(kt))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ot,_t,Bt){var vt=Math.ceil,gt=Math.floor;_t.exports=function(kt){var bt=+kt;return bt!==bt||bt===0?0:(bt>0?gt:vt)(bt)}},{}],249:[function(ot,_t,Bt){var vt=ot("../internals/to-integer-or-infinity"),gt=Math.min;_t.exports=function(kt){return kt>0?gt(vt(kt),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/require-object-coercible"),kt=vt.Object;_t.exports=function(bt){return kt(gt(bt))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-positive-integer"),kt=vt.RangeError;_t.exports=function(bt,St){var Tt=gt(bt);if(Tt%St)throw kt("Wrong offset");return Tt}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/to-integer-or-infinity"),kt=vt.RangeError;_t.exports=function(bt){var St=gt(bt);if(St<0)throw kt("The argument can't be less than 0");return St}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/is-object"),bt=ot("../internals/is-symbol"),St=ot("../internals/get-method"),Tt=ot("../internals/ordinary-to-primitive"),mt=ot("../internals/well-known-symbol"),xt=vt.TypeError,ft=mt("toPrimitive");_t.exports=function(z,tt){if(!kt(z)||bt(z))return z;var at=St(z,ft),it;if(at){if(tt===void 0&&(tt="default"),it=gt(at,z,tt),!kt(it)||bt(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,_t,Bt){var vt=ot("../internals/to-primitive"),gt=ot("../internals/is-symbol");_t.exports=function(kt){var bt=vt(kt,"string");return gt(bt)?bt:bt+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol"),gt=vt("toStringTag"),kt={};kt[gt]="z",_t.exports=String(kt)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/classof"),kt=vt.String;_t.exports=function(bt){if(gt(bt)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return kt(bt)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.String;_t.exports=function(kt){try{return gt(kt)}catch(bt){return"Object"}}},{"../internals/global":163}],258:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),bt=ot("../internals/descriptors"),St=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"),Pt=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"),Gt=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"),Ht=ot("../internals/object-define-property"),oe=ot("../internals/object-get-own-property-descriptor"),se=ot("../internals/internal-state"),fe=ot("../internals/inherit-if-required"),Pe=se.get,Yt=se.set,ee=Ht.f,ye=oe.f,xe=Math.round,be=gt.RangeError,ce=mt.ArrayBuffer,pe=ce.prototype,he=mt.DataView,Ce=Tt.NATIVE_ARRAY_BUFFER_VIEWS,de=Tt.TYPED_ARRAY_CONSTRUCTOR,Fe=Tt.TYPED_ARRAY_TAG,ge=Tt.TypedArray,Se=Tt.TypedArrayPrototype,re=Tt.aTypedArrayConstructor,Kt=Tt.isTypedArray,wt="BYTES_PER_ELEMENT",Lt="Wrong length",Xt=function(ue,me){re(ue);for(var Le=0,Ne=me.length,Be=new ue(Ne);Ne>Le;)Be[Le]=me[Le++];return Be},ne=function(ue,me){ee(ue,me,{get:function(){return Pe(this)[me]}})},It=function(ue){var me;return jt(pe,ue)||(me=Pt(ue))=="ArrayBuffer"||me=="SharedArrayBuffer"},Rt=function(ue,me){return Kt(ue)&&!Dt(me)&&me in ue&&tt(+me)&&me>=0},Vt=function(me,Le){return Le=ut(Le),Rt(me,Le)?ft(2,me[Le]):ye(me,Le)},$t=function(me,Le,Ne){return Le=ut(Le),Rt(me,Le)&&At(Ne)&&dt(Ne,"value")&&!dt(Ne,"get")&&!dt(Ne,"set")&&!Ne.configurable&&(!dt(Ne,"writable")||Ne.writable)&&(!dt(Ne,"enumerable")||Ne.enumerable)?(me[Le]=Ne.value,me):ee(me,Le,Ne)};bt?(Ce||(oe.f=Vt,Ht.f=$t,ne(Se,"buffer"),ne(Se,"byteOffset"),ne(Se,"byteLength"),ne(Se,"length")),vt({target:"Object",stat:!0,forced:!Ce},{getOwnPropertyDescriptor:Vt,defineProperty:$t}),_t.exports=function(ue,me,Le){var Ne=ue.match(/\d+$/)[0]/8,Be=ue+(Le?"Clamped":"")+"Array",Xe="get"+ue,Qe="set"+ue,qe=gt[Be],He=qe,Ue=He&&He.prototype,We={},Ke=function(ln,gn){var Gn=Pe(ln);return Gn.view[Xe](gn*Ne+Gn.byteOffset,!0)},rn=function(ln,gn,Gn){var Zn=Pe(ln);Le&&(Gn=(Gn=xe(Gn))<0?0:Gn>255?255:Gn&255),Zn.view[Qe](gn*Ne+Zn.byteOffset,Gn,!0)},an=function(ln,gn){ee(ln,gn,{get:function(){return Ke(this,gn)},set:function(Gn){return rn(this,gn,Gn)},enumerable:!0})};Ce?St&&(He=me(function(ln,gn,Gn,Zn){return xt(ln,Ue),fe(function(){return At(gn)?It(gn)?Zn!==void 0?new qe(gn,lt(Gn,Ne),Zn):Gn!==void 0?new qe(gn,lt(Gn,Ne)):new qe(gn):Kt(gn)?Xt(He,gn):kt(Wt,He,gn):new qe(it(gn))}(),ln,He)}),Nt&&Nt(He,ge),Jt(Gt(qe),function(ln){ln in He||z(He,ln,qe[ln])}),He.prototype=Ue):(He=me(function(ln,gn,Gn,Zn){xt(ln,Ue);var Kn=0,Pr=0,pr,Er,Mr;if(!At(gn))Mr=it(gn),Er=Mr*Ne,pr=new ce(Er);else if(It(gn)){pr=gn,Pr=lt(Gn,Ne);var Fr=gn.byteLength;if(Zn===void 0){if(Fr%Ne||(Er=Fr-Pr,Er<0))throw be(Lt)}else if(Er=at(Zn)*Ne,Er+Pr>Fr)throw be(Lt);Mr=Er/Ne}else return Kt(gn)?Xt(He,gn):kt(Wt,He,gn);for(Yt(ln,{buffer:pr,byteOffset:Pr,byteLength:Er,length:Mr,view:new he(pr)});Kn<Mr;)an(ln,Kn++)}),Nt&&Nt(He,ge),Ue=He.prototype=Ft(Se)),Ue.constructor!==He&&z(Ue,"constructor",He),z(Ue,de,He),Fe&&z(Ue,Fe,Be),We[Be]=He,vt({global:!0,forced:He!=qe,sham:!Ce},We),wt in He||z(He,wt,Ne),wt in Ue||z(Ue,wt,Ne),Ut(Be)}):_t.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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/check-correctness-of-iteration"),bt=ot("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,St=vt.ArrayBuffer,Tt=vt.Int8Array;_t.exports=!bt||!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 St(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,_t,Bt){var vt=ot("../internals/array-from-constructor-and-list"),gt=ot("../internals/typed-array-species-constructor");_t.exports=function(kt,bt){return vt(gt(kt),bt)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ot,_t,Bt){var vt=ot("../internals/function-bind-context"),gt=ot("../internals/function-call"),kt=ot("../internals/a-constructor"),bt=ot("../internals/to-object"),St=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;_t.exports=function(tt){var at=kt(this),it=bt(tt),lt=arguments.length,ut=lt>1?arguments[1]:void 0,dt=ut!==void 0,Pt=mt(it),At,Dt,Ft,jt,Nt,Gt;if(Pt&&!xt(Pt))for(Nt=Tt(it,Pt),Gt=Nt.next,it=[];!(jt=gt(Gt,Nt)).done;)it.push(jt.value);for(dt&<>2&&(ut=vt(ut,arguments[2])),Dt=St(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,_t,Bt){var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/species-constructor"),kt=vt.TYPED_ARRAY_CONSTRUCTOR,bt=vt.aTypedArrayConstructor;_t.exports=function(St){return bt(gt(St,St[kt]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ot,_t,Bt){var vt=ot("../internals/function-uncurry-this"),gt=0,kt=Math.random(),bt=vt(1 .toString);_t.exports=function(St){return"Symbol("+(St===void 0?"":St)+")_"+bt(++gt+kt,36)}},{"../internals/function-uncurry-this":157}],264:[function(ot,_t,Bt){var vt=ot("../internals/native-symbol");_t.exports=vt&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ot,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/fails");_t.exports=vt&>(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=vt.TypeError;_t.exports=function(kt,bt){if(kt<bt)throw gt("Not enough arguments");return kt}},{"../internals/global":163}],267:[function(ot,_t,Bt){var vt=ot("../internals/well-known-symbol");Bt.f=vt},{"../internals/well-known-symbol":268}],268:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/shared"),kt=ot("../internals/has-own-property"),bt=ot("../internals/uid"),St=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||bt;_t.exports=function(tt){if(!kt(mt,tt)||!(St||typeof mt[tt]=="string")){var at="Symbol."+tt;St&&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,_t,Bt){_t.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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/array-buffer"),bt=ot("../internals/set-species"),St="ArrayBuffer",Tt=kt[St],mt=gt[St];vt({global:!0,forced:mt!==Tt},{ArrayBuffer:Tt}),bt(St)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/array-buffer"),St=ot("../internals/an-object"),Tt=ot("../internals/to-absolute-index"),mt=ot("../internals/to-length"),xt=ot("../internals/species-constructor"),ft=bt.ArrayBuffer,z=bt.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(Pt,At){if(at&&At===void 0)return at(St(this),Pt);for(var Dt=St(this).byteLength,Ft=Tt(Pt,Dt),jt=Tt(At===void 0?Dt:At,Dt),Nt=new(xt(this,ft))(mt(jt-Ft)),Gt=new z(this),Wt=new z(Nt),Jt=0;Ft<jt;)lt(Wt,Jt++,it(Gt,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/fails"),bt=ot("../internals/is-array"),St=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,Pt=at>=51||!kt(function(){var jt=[];return jt[it]=!1,jt.concat()[0]!==jt}),At=z("concat"),Dt=function(jt){if(!St(jt))return!1;var Nt=jt[it];return Nt!==void 0?!!Nt:bt(jt)},Ft=!Pt||!At;vt({target:"Array",proto:!0,forced:Ft},{concat:function(Nt){var Gt=Tt(this),Wt=ft(Gt,0),Jt=0,Ut,Ht,oe,se,fe;for(Ut=-1,oe=arguments.length;Ut<oe;Ut++)if(fe=Ut===-1?Gt:arguments[Ut],Dt(fe)){if(se=mt(fe),Jt+se>lt)throw dt(ut);for(Ht=0;Ht<se;Ht++,Jt++)Ht in fe&&xt(Wt,Jt,fe[Ht])}else{if(Jt>=lt)throw dt(ut);xt(Wt,Jt++,fe)}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,_t,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").filter,kt=ot("../internals/array-method-has-species-support"),bt=kt("filter");vt({target:"Array",proto:!0,forced:!bt},{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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").find,kt=ot("../internals/add-to-unscopables"),bt="find",St=!0;bt in[]&&Array(1)[bt](function(){St=!1}),vt({target:"Array",proto:!0,forced:St},{find:function(mt){return gt(this,mt,arguments.length>1?arguments[1]:void 0)}}),kt(bt)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/array-from"),kt=ot("../internals/check-correctness-of-iteration"),bt=!kt(function(St){Array.from(St)});vt({target:"Array",stat:!0,forced:bt},{from:gt})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ot,_t,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(St){return gt(this,St,arguments.length>1?arguments[1]:void 0)}}),kt("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/to-indexed-object"),gt=ot("../internals/add-to-unscopables"),kt=ot("../internals/iterators"),bt=ot("../internals/internal-state"),St=ot("../internals/object-define-property").f,Tt=ot("../internals/define-iterator"),mt=ot("../internals/is-pure"),xt=ot("../internals/descriptors"),ft="Array Iterator",z=bt.set,tt=bt.getterFor(ft);_t.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{St(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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/indexed-object"),bt=ot("../internals/to-indexed-object"),St=ot("../internals/array-method-is-strict"),Tt=gt([].join),mt=kt!=Object,xt=St("join",",");vt({target:"Array",proto:!0,forced:mt||!xt},{join:function(z){return Tt(bt(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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/array-method-has-species-support"),bt=kt("map");vt({target:"Array",proto:!0,forced:!bt},{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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/is-array"),bt=ot("../internals/is-constructor"),St=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),Gt=Tt(Dt===void 0?jt:Dt,jt),Wt,Jt,Ut;if(kt(Ft)&&(Wt=Ft.constructor,bt(Wt)&&(Wt===ut||kt(Wt.prototype))?Wt=void 0:St(Wt)&&(Wt=Wt[lt],Wt===null&&(Wt=void 0)),Wt===ut||Wt===void 0))return at(Ft,Nt,Gt);for(Jt=new(Wt===void 0?ut:Wt)(dt(Gt-Nt,0)),Ut=0;Nt<Gt;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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/a-callable"),bt=ot("../internals/to-object"),St=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),Pt=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 Gt="",Wt,Jt,Ut,Ht;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(Ht=0;Ht<47;Ht++)lt.push({k:Jt+Ht,v:Ut})}for(lt.sort(function(oe,se){return se.v-oe.v}),Ht=0;Ht<lt.length;Ht++)Jt=lt[Ht].k.charAt(0),Gt.charAt(Gt.length-1)!==Jt&&(Gt+=Jt);return Gt!=="DGBEFHACIJK"}}),jt=Pt||!At||!Dt||!Ft,Nt=function(Gt){return function(Wt,Jt){return Jt===void 0?-1:Wt===void 0?1:Gt!==void 0?+Gt(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=bt(this);if(Ft)return Wt===void 0?ut(Jt):ut(Jt,Wt);var Ut=[],Ht=St(Jt),oe,se;for(se=0;se<Ht;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<Ht;)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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/to-absolute-index"),bt=ot("../internals/to-integer-or-infinity"),St=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(Pt,At){var Dt=Tt(this),Ft=St(Dt),jt=kt(Pt,Ft),Nt=arguments.length,Gt,Wt,Jt,Ut,Ht,oe;if(Nt===0?Gt=Wt=0:Nt===1?(Gt=0,Wt=Ft-jt):(Gt=Nt-2,Wt=it(at(bt(At),0),Ft-jt)),Ft+Gt-Wt>lt)throw tt(ut);for(Jt=mt(Dt,Wt),Ut=0;Ut<Wt;Ut++)Ht=jt+Ut,Ht in Dt&&xt(Jt,Ut,Dt[Ht]);if(Jt.length=Wt,Gt<Wt){for(Ut=jt;Ut<Ft-Wt;Ut++)Ht=Ut+Wt,oe=Ut+Gt,Ht in Dt?Dt[oe]=Dt[Ht]:delete Dt[oe];for(Ut=Ft;Ut>Ft-Wt+Gt;Ut--)delete Dt[Ut-1]}else if(Gt>Wt)for(Ut=Ft-Wt;Ut>jt;Ut--)Ht=Ut+Wt-1,oe=Ut+Gt-1,Ht in Dt?Dt[oe]=Dt[Ht]:delete Dt[oe];for(Ut=0;Ut<Gt;Ut++)Dt[Ut+jt]=arguments[Ut+2];return Dt.length=Ft-Wt+Gt,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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/function-name").EXISTS,kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/object-define-property").f,St=Function.prototype,Tt=kt(St.toString),mt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xt=kt(mt.exec),ft="name";vt&&!gt&&bt(St,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,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/function-apply"),bt=ot("../internals/function-call"),St=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=St(/./.exec),ut=St("".charAt),dt=St("".charCodeAt),Pt=St("".replace),At=St(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))!="{}"}),Gt=Tt(function(){return it("\uDF06\uD834")!=='"\\udf06\\ud834"'||it("\uDEAD")!=='"\\udead"'}),Wt=function(Ut,Ht){var oe=tt(arguments),se=Ht;if(!(!ft(Ht)&&Ut===void 0||z(Ut)))return mt(Ht)||(Ht=function(fe,Pe){if(xt(se)&&(Pe=bt(se,this,fe,Pe)),!z(Pe))return Pe}),oe[1]=Ht,kt(it,null,oe)},Jt=function(Ut,Ht,oe){var se=ut(oe,Ht-1),fe=ut(oe,Ht+1);return lt(Ft,Ut)&&!lt(jt,fe)||lt(jt,Ut)&&!lt(Ft,se)?"\\u"+At(dt(Ut,0),16):Ut};it&&vt({target:"JSON",stat:!0,forced:Nt||Gt},{stringify:function(Ht,oe,se){var fe=tt(arguments),Pe=kt(Nt?Wt:it,null,fe);return Gt&&typeof Pe=="string"?Pt(Pe,Dt,Jt):Pe}})},{"../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,_t,Bt){"use strict";var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-forced"),St=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,Pt="Number",At=gt[Pt],Dt=At.prototype,Ft=gt.TypeError,jt=kt("".slice),Nt=kt("".charCodeAt),Gt=function(se){var fe=z(se,"number");return typeof fe=="bigint"?fe:Wt(fe)},Wt=function(se){var fe=z(se,"number"),Pe,Yt,ee,ye,xe,be,ce,pe;if(ft(fe))throw Ft("Cannot convert a Symbol value to a number");if(typeof fe=="string"&&fe.length>2){if(fe=dt(fe),Pe=Nt(fe,0),Pe===43||Pe===45){if(Yt=Nt(fe,2),Yt===88||Yt===120)return NaN}else if(Pe===48){switch(Nt(fe,1)){case 66:case 98:ee=2,ye=49;break;case 79:case 111:ee=8,ye=55;break;default:return+fe}for(xe=jt(fe,2),be=xe.length,ce=0;ce<be;ce++)if(pe=Nt(xe,ce),pe<48||pe>ye)return NaN;return parseInt(xe,ee)}}return+fe};if(bt(Pt,!At(" 0o1")||!At("0b1")||At("+0x1"))){for(var Jt=function(fe){var Pe=arguments.length<1?0:At(Gt(fe)),Yt=this;return xt(Dt,Yt)&&tt(function(){ut(Yt)})?mt(Object(Pe),Yt,Jt):Pe},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(","),Ht=0,oe;Ut.length>Ht;Ht++)Tt(At,oe=Ut[Ht])&&!Tt(Jt,oe)&<(Jt,oe,it(At,oe));Jt.prototype=Dt,Dt.constructor=Jt,St(gt,Pt,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,_t,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,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/object-to-array").entries;vt({target:"Object",stat:!0},{entries:function(bt){return gt(bt)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ot,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/native-symbol"),kt=ot("../internals/fails"),bt=ot("../internals/object-get-own-property-symbols"),St=ot("../internals/to-object"),Tt=!gt||kt(function(){bt.f(1)});vt({target:"Object",stat:!0,forced:Tt},{getOwnPropertySymbols:function(xt){var ft=bt.f;return ft?ft(St(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,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/to-object"),kt=ot("../internals/object-keys"),bt=ot("../internals/fails"),St=bt(function(){kt(1)});vt({target:"Object",stat:!0,forced:St},{keys:function(mt){return kt(gt(mt))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ot,_t,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/new-promise-capability"),St=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=bt.f(z),at=tt.resolve,it=tt.reject,lt=St(function(){var ut=kt(z.resolve),dt=[],Pt=0,At=1;Tt(ft,function(Dt){var Ft=Pt++,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/promise-constructor-detection").CONSTRUCTOR,bt=ot("../internals/promise-native-constructor"),St=ot("../internals/get-built-in"),Tt=ot("../internals/is-callable"),mt=ot("../internals/redefine"),xt=bt&&bt.prototype;if(vt({target:"Promise",proto:!0,forced:kt,real:!0},{catch:function(z){return this.then(void 0,z)}}),!gt&&Tt(bt)){var ft=St("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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/is-pure"),kt=ot("../internals/engine-is-node"),bt=ot("../internals/global"),St=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,Pt=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"),Gt=ot("../internals/promise-constructor-detection"),Wt=ot("../internals/new-promise-capability"),Jt="Promise",Ut=Gt.CONSTRUCTOR,Ht=Gt.REJECTION_EVENT,oe=Gt.SUBCLASSING,se=jt.getterFor(Jt),fe=jt.set,Pe=Nt&&Nt.prototype,Yt=Nt,ee=Pe,ye=bt.TypeError,xe=bt.document,be=bt.process,ce=Wt.f,pe=ce,he=!!(xe&&xe.createEvent&&bt.dispatchEvent),Ce="unhandledrejection",de="rejectionhandled",Fe=0,ge=1,Se=2,re=1,Kt=2,wt,Lt,Xt,ne,It=function(Qe){var qe;return it(Qe)&&at(qe=Qe.then)?qe:!1},Rt=function(Qe,qe){var He=qe.value,Ue=qe.state==ge,We=Ue?Qe.ok:Qe.fail,Ke=Qe.resolve,rn=Qe.reject,an=Qe.domain,ln,gn,Gn;try{We?(Ue||(qe.rejection===Kt&&Le(qe),qe.rejection=re),We===!0?ln=He:(an&&an.enter(),ln=We(He),an&&(an.exit(),Gn=!0)),ln===Qe.promise?rn(ye("Promise-chain cycle")):(gn=It(ln))?St(gn,ln,Ke,rn):Ke(ln)):rn(He)}catch(Zn){an&&!Gn&&an.exit(),rn(Zn)}},Vt=function(Qe,qe){Qe.notified||(Qe.notified=!0,Pt(function(){for(var He=Qe.reactions,Ue;Ue=He.get();)Rt(Ue,Qe);Qe.notified=!1,qe&&!Qe.rejection&&ue(Qe)}))},$t=function(Qe,qe,He){var Ue,We;he?(Ue=xe.createEvent("Event"),Ue.promise=qe,Ue.reason=He,Ue.initEvent(Qe,!1,!0),bt.dispatchEvent(Ue)):Ue={promise:qe,reason:He},!Ht&&(We=bt["on"+Qe])?We(Ue):Qe===Ce&&At("Unhandled promise rejection",He)},ue=function(Qe){St(dt,bt,function(){var qe=Qe.facade,He=Qe.value,Ue=me(Qe),We;if(Ue&&(We=Dt(function(){kt?be.emit("unhandledRejection",He,qe):$t(Ce,qe,He)}),Qe.rejection=kt||me(Qe)?Kt:re,We.error))throw We.value})},me=function(Qe){return Qe.rejection!==re&&!Qe.parent},Le=function(Qe){St(dt,bt,function(){var qe=Qe.facade;kt?be.emit("rejectionHandled",qe):$t(de,qe,Qe.value)})},Ne=function(Qe,qe,He){return function(Ue){Qe(qe,Ue,He)}},Be=function(Qe,qe,He){Qe.done||(Qe.done=!0,He&&(Qe=He),Qe.value=qe,Qe.state=Se,Vt(Qe,!0))},Xe=function(Qe,qe,He){if(!Qe.done){Qe.done=!0,He&&(Qe=He);try{if(Qe.facade===qe)throw ye("Promise can't be resolved itself");var Ue=It(qe);Ue?Pt(function(){var We={done:!1};try{St(Ue,qe,Ne(Xe,We,Qe),Ne(Be,We,Qe))}catch(Ke){Be(We,Ke,Qe)}}):(Qe.value=qe,Qe.state=ge,Vt(Qe,!1))}catch(We){Be({done:!1},We,Qe)}}};if(Ut&&(Yt=function(qe){lt(this,ee),tt(qe),St(wt,this);var He=se(this);try{qe(Ne(Xe,He),Ne(Be,He))}catch(Ue){Be(He,Ue)}},ee=Yt.prototype,wt=function(qe){fe(this,{type:Jt,done:!1,notified:!1,parent:!1,reactions:new Ft,rejection:!1,state:Fe,value:void 0})},wt.prototype=mt(ee,{then:function(qe,He){var Ue=se(this),We=ce(ut(this,Yt));return Ue.parent=!0,We.ok=at(qe)?qe:!0,We.fail=at(He)&&He,We.domain=kt?be.domain:void 0,Ue.state==Fe?Ue.reactions.add(We):Pt(function(){Rt(We,Ue)}),We.promise}}),Lt=function(){var Qe=new wt,qe=se(Qe);this.promise=Qe,this.resolve=Ne(Xe,qe),this.reject=Ne(Be,qe)},Wt.f=ce=function(Qe){return Qe===Yt||Qe===Xt?new Lt(Qe):pe(Qe)},!gt&&at(Nt)&&Pe!==Object.prototype)){ne=Pe.then,oe||Tt(Pe,"then",function(qe,He){var Ue=this;return new Yt(function(We,Ke){St(ne,Ue,We,Ke)}).then(qe,He)},{unsafe:!0});try{delete Pe.constructor}catch(Qe){}xt&&xt(Pe,ee)}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,_t,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/a-callable"),bt=ot("../internals/new-promise-capability"),St=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=bt.f(z),at=tt.reject,it=St(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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-call"),kt=ot("../internals/new-promise-capability"),bt=ot("../internals/promise-constructor-detection").CONSTRUCTOR;vt({target:"Promise",stat:!0,forced:bt},{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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/is-pure"),bt=ot("../internals/promise-native-constructor"),St=ot("../internals/promise-constructor-detection").CONSTRUCTOR,Tt=ot("../internals/promise-resolve"),mt=gt("Promise"),xt=kt&&!St;vt({target:"Promise",stat:!0,forced:kt||St},{resolve:function(z){return Tt(xt&&this===mt?bt: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,_t,Bt){var vt=ot("../internals/descriptors"),gt=ot("../internals/global"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/is-forced"),St=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"),Pt=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"),Gt=gt.RegExp,Wt=Gt.prototype,Jt=gt.SyntaxError,Ut=kt(Wt.exec),Ht=kt("".charAt),oe=kt("".replace),se=kt("".indexOf),fe=kt("".slice),Pe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Yt=/a/g,ee=/a/g,ye=new Gt(Yt)!==Yt,xe=at.MISSED_STICKY,be=at.UNSUPPORTED_Y,ce=vt&&(!ye||xe||Ft||jt||ut(function(){return ee[Nt]=!1,Gt(Yt)!=Yt||Gt(ee)==ee||Gt(Yt,"i")!="/a/i"})),pe=function(ge){for(var Se=ge.length,re=0,Kt="",wt=!1,Lt;re<=Se;re++){if(Lt=Ht(ge,re),Lt==="\\"){Kt+=Lt+Ht(ge,++re);continue}!wt&&Lt==="."?Kt+="[\\s\\S]":(Lt==="["?wt=!0:Lt==="]"&&(wt=!1),Kt+=Lt)}return Kt},he=function(ge){for(var Se=ge.length,re=0,Kt="",wt=[],Lt={},Xt=!1,ne=!1,It=0,Rt="",Vt;re<=Se;re++){if(Vt=Ht(ge,re),Vt==="\\")Vt=Vt+Ht(ge,++re);else if(Vt==="]")Xt=!1;else if(!Xt)switch(!0){case Vt==="[":Xt=!0;break;case Vt==="(":Ut(Pe,fe(ge,re+1))&&(re+=2,ne=!0),Kt+=Vt,It++;continue;case(Vt===">"&&ne):if(Rt===""||dt(Lt,Rt))throw new Jt("Invalid capture group name");Lt[Rt]=!0,wt[wt.length]=[Rt,It],ne=!1,Rt="";continue}ne?Rt+=Vt:Kt+=Vt}return[Kt,wt]};if(bt("RegExp",ce)){for(var Ce=function(Se,re){var Kt=xt(Wt,this),wt=ft(Se),Lt=re===void 0,Xt=[],ne=Se,It,Rt,Vt,$t,ue,me;if(!Kt&&wt&&Lt&&Se.constructor===Ce)return Se;if((wt||xt(Wt,Se))&&(Se=Se.source,Lt&&(re=tt(ne))),Se=Se===void 0?"":z(Se),re=re===void 0?"":z(re),ne=Se,Ft&&"dotAll"in Yt&&(Rt=!!re&&se(re,"s")>-1,Rt&&(re=oe(re,/s/g,""))),It=re,xe&&"sticky"in Yt&&(Vt=!!re&&se(re,"y")>-1,Vt&&be&&(re=oe(re,/y/g,""))),jt&&($t=he(Se),Se=$t[0],Xt=$t[1]),ue=St(Gt(Se,re),Kt?this:Wt,Ce),(Rt||Vt||Xt.length)&&(me=Pt(ue),Rt&&(me.dotAll=!0,me.raw=Ce(pe(Se),It)),Vt&&(me.sticky=!0),Xt.length&&(me.groups=Xt)),Se!==ne)try{Tt(ue,"source",ne===""?"(?:)":ne)}catch(Le){}return ue},de=mt(Gt),Fe=0;de.length>Fe;)it(Ce,Gt,de[Fe++]);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,_t,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,_t,Bt){"use strict";var vt=ot("../internals/function-name").PROPER,gt=ot("../internals/redefine"),kt=ot("../internals/an-object"),bt=ot("../internals/to-string"),St=ot("../internals/fails"),Tt=ot("../internals/regexp-get-flags"),mt="toString",xt=RegExp.prototype,ft=xt[mt],z=St(function(){return ft.call({source:"a",flags:"b"})!="/a/b"}),tt=vt&&ft.name!=mt;(z||tt)&>(RegExp.prototype,mt,function(){var it=kt(this),lt=bt(it.source),ut=bt(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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/not-a-regexp"),bt=ot("../internals/require-object-coercible"),St=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(St(bt(this)),St(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,_t,Bt){"use strict";var vt=ot("../internals/string-multibyte").charAt,gt=ot("../internals/to-string"),kt=ot("../internals/internal-state"),bt=ot("../internals/define-iterator"),St="String Iterator",Tt=kt.set,mt=kt.getterFor(St);bt(String,"String",function(xt){Tt(this,{type:St,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,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),bt=ot("../internals/to-length"),St=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](St(ut))},function(it){var lt=kt(this),ut=St(it),dt=at(tt,lt,ut);if(dt.done)return dt.value;if(!lt.global)return ft(lt,ut);var Pt=lt.unicode;lt.lastIndex=0;for(var At=[],Dt=0,Ft;(Ft=ft(lt,ut))!==null;){var jt=St(Ft[0]);At[Dt]=jt,jt===""&&(lt.lastIndex=xt(ut,bt(lt.lastIndex),Pt)),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,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/fix-regexp-well-known-symbol-logic"),St=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"),Pt=dt("replace"),At=Math.max,Dt=Math.min,Ft=kt([].concat),jt=kt([].push),Nt=kt("".indexOf),Gt=kt("".slice),Wt=function(oe){return oe===void 0?oe:String(oe)},Jt=function(){return"a".replace(/./,"$0")==="$0"}(),Ut=function(){return/./[Pt]?/./[Pt]("a","$0")==="":!1}(),Ht=!St(function(){var oe=/./;return oe.exec=function(){var se=[];return se.groups={a:"7"},se},"".replace(oe,"$<a>")!=="7"});bt("replace",function(oe,se,fe){var Pe=Ut?"$":"$0";return[function(ee,ye){var xe=tt(this),be=ee==null?void 0:it(ee,Pt);return be?gt(be,ee,xe,ye):gt(se,z(xe),ee,ye)},function(Yt,ee){var ye=Tt(this),xe=z(Yt);if(typeof ee=="string"&&Nt(ee,Pe)===-1&&Nt(ee,"$<")===-1){var be=fe(se,ye,xe,ee);if(be.done)return be.value}var ce=mt(ee);ce||(ee=z(ee));var pe=ye.global;if(pe){var he=ye.unicode;ye.lastIndex=0}for(var Ce=[];;){var de=ut(ye,xe);if(de===null||(jt(Ce,de),!pe))break;var Fe=z(de[0]);Fe===""&&(ye.lastIndex=at(xe,ft(ye.lastIndex),he))}for(var ge="",Se=0,re=0;re<Ce.length;re++){de=Ce[re];for(var Kt=z(de[0]),wt=At(Dt(xt(de.index),xe.length),0),Lt=[],Xt=1;Xt<de.length;Xt++)jt(Lt,Wt(de[Xt]));var ne=de.groups;if(ce){var It=Ft([Kt],Lt,wt,xe);ne!==void 0&&jt(It,ne);var Rt=z(vt(ee,void 0,It))}else Rt=lt(Kt,xe,wt,Lt,ne,ee);wt>=Se&&(ge+=Gt(xe,Se,wt)+Rt,Se=wt+Kt.length)}return ge+Gt(xe,Se)}]},!Ht||!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,_t,Bt){"use strict";var vt=ot("../internals/function-call"),gt=ot("../internals/fix-regexp-well-known-symbol-logic"),kt=ot("../internals/an-object"),bt=ot("../internals/require-object-coercible"),St=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=bt(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;St(dt,0)||(it.lastIndex=0);var Pt=xt(it,lt);return St(it.lastIndex,dt)||(it.lastIndex=dt),Pt===null?-1:Pt.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,_t,Bt){"use strict";var vt=ot("../internals/function-apply"),gt=ot("../internals/function-call"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/fix-regexp-well-known-symbol-logic"),St=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"),Pt=ot("../internals/fails"),At=dt.UNSUPPORTED_Y,Dt=4294967295,Ft=Math.min,jt=[].push,Nt=kt(/./.exec),Gt=kt(jt),Wt=kt("".slice),Jt=!Pt(function(){var Ut=/(?:)/,Ht=Ut.exec;Ut.exec=function(){return Ht.apply(this,arguments)};var oe="ab".split(Ut);return oe.length!==2||oe[0]!=="a"||oe[1]!=="b"});bt("split",function(Ut,Ht,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(fe,Pe){var Yt=tt(mt(this)),ee=Pe===void 0?Dt:Pe>>>0;if(ee===0)return[];if(fe===void 0)return[Yt];if(!St(fe))return gt(Ht,Yt,fe,ee);for(var ye=[],xe=(fe.ignoreCase?"i":"")+(fe.multiline?"m":"")+(fe.unicode?"u":"")+(fe.sticky?"y":""),be=0,ce=new RegExp(fe.source,xe+"g"),pe,he,Ce;(pe=gt(ut,ce,Yt))&&(he=ce.lastIndex,!(he>be&&(Gt(ye,Wt(Yt,be,pe.index)),pe.length>1&&pe.index<Yt.length&&vt(jt,ye,it(pe,1)),Ce=pe[0].length,be=he,ye.length>=ee)));)ce.lastIndex===pe.index&&ce.lastIndex++;return be===Yt.length?(Ce||!Nt(ce,""))&&Gt(ye,""):Gt(ye,Wt(Yt,be)),ye.length>ee?it(ye,0,ee):ye}:"0".split(void 0,0).length?se=function(fe,Pe){return fe===void 0&&Pe===0?[]:gt(Ht,this,fe,Pe)}:se=Ht,[function(Pe,Yt){var ee=mt(this),ye=Pe==null?void 0:at(Pe,Ut);return ye?gt(ye,Pe,ee,Yt):gt(se,tt(ee),Pe,Yt)},function(fe,Pe){var Yt=Tt(this),ee=tt(fe),ye=oe(se,Yt,ee,Pe,se!==Ht);if(ye.done)return ye.value;var xe=xt(Yt,RegExp),be=Yt.unicode,ce=(Yt.ignoreCase?"i":"")+(Yt.multiline?"m":"")+(Yt.unicode?"u":"")+(At?"g":"y"),pe=new xe(At?"^(?:"+Yt.source+")":Yt,ce),he=Pe===void 0?Dt:Pe>>>0;if(he===0)return[];if(ee.length===0)return lt(pe,ee)===null?[ee]:[];for(var Ce=0,de=0,Fe=[];de<ee.length;){pe.lastIndex=At?0:de;var ge=lt(pe,At?Wt(ee,de):ee),Se;if(ge===null||(Se=Ft(z(pe.lastIndex+(At?de:0)),ee.length))===Ce)de=ft(ee,de,be);else{if(Gt(Fe,Wt(ee,Ce,de)),Fe.length===he)return Fe;for(var re=1;re<=ge.length-1;re++)if(Gt(Fe,ge[re]),Fe.length===he)return Fe;de=Ce=Se}}return Gt(Fe,Wt(ee,Ce)),Fe}]},!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,_t,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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/global"),kt=ot("../internals/function-call"),bt=ot("../internals/function-uncurry-this"),St=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"),Pt=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"),Gt=ot("../internals/object-define-properties"),Wt=ot("../internals/object-property-is-enumerable"),Jt=ot("../internals/redefine"),Ut=ot("../internals/shared"),Ht=ot("../internals/shared-key"),oe=ot("../internals/hidden-keys"),se=ot("../internals/uid"),fe=ot("../internals/well-known-symbol"),Pe=ot("../internals/well-known-symbol-wrapped"),Yt=ot("../internals/define-well-known-symbol"),ee=ot("../internals/symbol-define-to-primitive"),ye=ot("../internals/set-to-string-tag"),xe=ot("../internals/internal-state"),be=ot("../internals/array-iteration").forEach,ce=Ht("hidden"),pe="Symbol",he="prototype",Ce=xe.set,de=xe.getterFor(pe),Fe=Object[he],ge=gt.Symbol,Se=ge&&ge[he],re=gt.TypeError,Kt=gt.QObject,wt=jt.f,Lt=Nt.f,Xt=Dt.f,ne=Wt.f,It=bt([].push),Rt=Ut("symbols"),Vt=Ut("op-symbols"),$t=Ut("wks"),ue=!Kt||!Kt[he]||!Kt[he].findChild,me=Tt&&xt(function(){return dt(Lt({},"a",{get:function(){return Lt(this,"a",{value:7}).a}})).a!=7})?function(We,Ke,rn){var an=wt(Fe,Ke);an&&delete Fe[Ke],Lt(We,Ke,rn),an&&We!==Fe&&Lt(Fe,Ke,an)}:Lt,Le=function(We,Ke){var rn=Rt[We]=dt(Se);return Ce(rn,{type:pe,tag:We,description:Ke}),Tt||(rn.description=Ke),rn},Ne=function(Ke,rn,an){Ke===Fe&&Ne(Vt,rn,an),tt(Ke);var ln=it(rn);return tt(an),ft(Rt,ln)?(an.enumerable?(ft(Ke,ce)&&Ke[ce][ln]&&(Ke[ce][ln]=!1),an=dt(an,{enumerable:ut(0,!1)})):(ft(Ke,ce)||Lt(Ke,ce,ut(1,{})),Ke[ce][ln]=!0),me(Ke,ln,an)):Lt(Ke,ln,an)},Be=function(Ke,rn){tt(Ke);var an=at(rn),ln=Pt(an).concat(Ue(an));return be(ln,function(gn){(!Tt||kt(Qe,an,gn))&&Ne(Ke,gn,an[gn])}),Ke},Xe=function(Ke,rn){return rn===void 0?dt(Ke):Be(dt(Ke),rn)},Qe=function(Ke){var rn=it(Ke),an=kt(ne,this,rn);return this===Fe&&ft(Rt,rn)&&!ft(Vt,rn)?!1:an||!ft(this,rn)||!ft(Rt,rn)||ft(this,ce)&&this[ce][rn]?an:!0},qe=function(Ke,rn){var an=at(Ke),ln=it(rn);if(!(an===Fe&&ft(Rt,ln)&&!ft(Vt,ln))){var gn=wt(an,ln);return gn&&ft(Rt,ln)&&!(ft(an,ce)&&an[ce][ln])&&(gn.enumerable=!0),gn}},He=function(Ke){var rn=Xt(at(Ke)),an=[];return be(rn,function(ln){!ft(Rt,ln)&&!ft(oe,ln)&&It(an,ln)}),an},Ue=function(We){var Ke=We===Fe,rn=Xt(Ke?Vt:at(We)),an=[];return be(rn,function(ln){ft(Rt,ln)&&(!Ke||ft(Fe,ln))&&It(an,Rt[ln])}),an};mt||(ge=function(){if(z(Se,this))throw re("Symbol is not a constructor");var Ke=!arguments.length||arguments[0]===void 0?void 0:lt(arguments[0]),rn=se(Ke),an=function(ln){this===Fe&&kt(an,Vt,ln),ft(this,ce)&&ft(this[ce],rn)&&(this[ce][rn]=!1),me(this,rn,ut(1,ln))};return Tt&&ue&&me(Fe,rn,{configurable:!0,set:an}),Le(rn,Ke)},Se=ge[he],Jt(Se,"toString",function(){return de(this).tag}),Jt(ge,"withoutSetter",function(We){return Le(se(We),We)}),Wt.f=Qe,Nt.f=Ne,Gt.f=Be,jt.f=qe,At.f=Dt.f=He,Ft.f=Ue,Pe.f=function(We){return Le(fe(We),We)},Tt&&(Lt(Se,"description",{configurable:!0,get:function(){return de(this).description}}),St||Jt(Fe,"propertyIsEnumerable",Qe,{unsafe:!0}))),vt({global:!0,wrap:!0,forced:!mt,sham:!mt},{Symbol:ge}),be(Pt($t),function(We){Yt(We)}),vt({target:pe,stat:!0,forced:!mt},{useSetter:function(){ue=!0},useSimple:function(){ue=!1}}),vt({target:"Object",stat:!0,forced:!mt,sham:!Tt},{create:Xe,defineProperty:Ne,defineProperties:Be,getOwnPropertyDescriptor:qe}),vt({target:"Object",stat:!0,forced:!mt},{getOwnPropertyNames:He}),ee(),ye(ge,pe),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,_t,Bt){"use strict";var vt=ot("../internals/export"),gt=ot("../internals/descriptors"),kt=ot("../internals/global"),bt=ot("../internals/function-uncurry-this"),St=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]),Gt=mt(at,this)?new tt(Nt):Nt===void 0?tt():tt(Nt);return Nt===""&&(it[Gt]=!0),Gt};z(lt,tt),lt.prototype=at,at.constructor=lt;var ut=String(tt("test"))=="Symbol(test)",dt=bt(at.toString),Pt=bt(at.valueOf),At=/^Symbol\((.*)\)[^)]+$/,Dt=bt("".replace),Ft=bt("".slice);ft(at,"description",{configurable:!0,get:function(){var Nt=Pt(this),Gt=dt(Nt);if(St(it,Nt))return"";var Wt=ut?Ft(Gt,7,-1):Dt(Gt,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,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/get-built-in"),kt=ot("../internals/has-own-property"),bt=ot("../internals/to-string"),St=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=St("string-to-symbol-registry"),xt=St("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{for:function(ft){var z=bt(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,_t,Bt){var vt=ot("../internals/define-well-known-symbol");vt("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ot,_t,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,_t,Bt){var vt=ot("../internals/export"),gt=ot("../internals/has-own-property"),kt=ot("../internals/is-symbol"),bt=ot("../internals/try-to-string"),St=ot("../internals/shared"),Tt=ot("../internals/native-symbol-registry"),mt=St("symbol-to-string-registry");vt({target:"Symbol",stat:!0,forced:!Tt},{keyFor:function(ft){if(!kt(ft))throw TypeError(bt(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,_t,Bt){"use strict";var vt=ot("../internals/function-uncurry-this"),gt=ot("../internals/array-buffer-view-core"),kt=ot("../internals/array-copy-within"),bt=vt(kt),St=gt.aTypedArray,Tt=gt.exportTypedArrayMethod;Tt("copyWithin",function(xt,ft){return bt(St(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").every,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-call"),kt=ot("../internals/array-fill"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("fill",function(mt){var xt=arguments.length;return gt(kt,bt(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,_t,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"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("filter",function(mt){var xt=gt(bt(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").findIndex,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").find,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").forEach,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").includes,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-includes").indexOf,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/fails"),kt=ot("../internals/function-uncurry-this"),bt=ot("../internals/array-buffer-view-core"),St=ot("../modules/es.array.iterator"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=vt.Uint8Array,ft=kt(St.values),z=kt(St.keys),tt=kt(St.entries),at=bt.aTypedArray,it=bt.exportTypedArrayMethod,lt=xt&&xt.prototype,ut=!gt(function(){lt[mt].call([1])}),dt=!!lt&<.values&<[mt]===lt.values&<.values.name==="values",Pt=function(){return ft(at(this))};it("entries",function(){return tt(at(this))},ut),it("keys",function(){return z(at(this))},ut),it("values",Pt,ut||!dt,{name:"values"}),it(mt,Pt,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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-uncurry-this"),kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod,St=gt([].join);bt("join",function(mt){return St(kt(this),mt)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ot,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-last-index-of"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("lastIndexOf",function(mt){var xt=arguments.length;return gt(kt,bt(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").map,kt=ot("../internals/typed-array-species-constructor"),bt=vt.aTypedArray,St=vt.exportTypedArrayMethod;St("map",function(mt){return gt(bt(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").right,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-reduce").left,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=vt.aTypedArray,kt=vt.exportTypedArrayMethod,bt=Math.floor;kt("reverse",function(){for(var Tt=this,mt=gt(Tt).length,xt=bt(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,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-call"),kt=ot("../internals/array-buffer-view-core"),bt=ot("../internals/length-of-array-like"),St=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(Pt){at(this);var At=St(arguments.length>1?arguments[1]:void 0,1),Dt=Tt(Pt);if(lt)return gt(tt,this,Dt,At);var Ft=this.length,jt=bt(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/typed-array-species-constructor"),kt=ot("../internals/fails"),bt=ot("../internals/array-slice"),St=vt.aTypedArray,Tt=vt.exportTypedArrayMethod,mt=kt(function(){new Int8Array(1).slice()});Tt("slice",function(ft,z){for(var tt=bt(St(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/array-iteration").some,kt=vt.aTypedArray,bt=vt.exportTypedArrayMethod;bt("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,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-uncurry-this"),kt=ot("../internals/fails"),bt=ot("../internals/a-callable"),St=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&>(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,Gt){return(Nt/4|0)-(Gt/4|0)}),Ft=0;Ft<516;Ft++)if(At[Ft]!==Dt[Ft])return!0}),Pt=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&&bt(Dt),dt?lt(this,Dt):St(tt(this),Pt(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core"),gt=ot("../internals/to-length"),kt=ot("../internals/to-absolute-index"),bt=ot("../internals/typed-array-species-constructor"),St=vt.aTypedArray,Tt=vt.exportTypedArrayMethod;Tt("subarray",function(xt,ft){var z=St(this),tt=z.length,at=kt(xt,tt),it=bt(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,_t,Bt){"use strict";var vt=ot("../internals/global"),gt=ot("../internals/function-apply"),kt=ot("../internals/array-buffer-view-core"),bt=ot("../internals/fails"),St=ot("../internals/array-slice"),Tt=vt.Int8Array,mt=kt.aTypedArray,xt=kt.exportTypedArrayMethod,ft=[].toLocaleString,z=!!Tt&&bt(function(){ft.call(new Tt(1))}),tt=bt(function(){return[1,2].toLocaleString()!=new Tt([1,2]).toLocaleString()})||!bt(function(){Tt.prototype.toLocaleString.call([1,2])});xt("toLocaleString",function(){return gt(ft,z?St(mt(this)):mt(this),St(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,_t,Bt){"use strict";var vt=ot("../internals/array-buffer-view-core").exportTypedArrayMethod,gt=ot("../internals/fails"),kt=ot("../internals/global"),bt=ot("../internals/function-uncurry-this"),St=kt.Uint8Array,Tt=St&&St.prototype||{},mt=[].toString,xt=bt([].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,_t,Bt){var vt=ot("../internals/typed-array-constructor");vt("Uint8",function(gt){return function(bt,St,Tt){return gt(this,bt,St,Tt)}})},{"../internals/typed-array-constructor":258}],339:[function(ot,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),bt=ot("../internals/array-for-each"),St=ot("../internals/create-non-enumerable-property"),Tt=function(xt){if(xt&&xt.forEach!==bt)try{St(xt,"forEach",bt)}catch(ft){xt.forEach=bt}};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,_t,Bt){var vt=ot("../internals/global"),gt=ot("../internals/dom-iterables"),kt=ot("../internals/dom-token-list-prototype"),bt=ot("../modules/es.array.iterator"),St=ot("../internals/create-non-enumerable-property"),Tt=ot("../internals/well-known-symbol"),mt=Tt("iterator"),xt=Tt("toStringTag"),ft=bt.values,z=function(at,it){if(at){if(at[mt]!==ft)try{St(at,mt,ft)}catch(ut){at[mt]=ft}if(at[xt]||St(at,xt,it),gt[it]){for(var lt in bt)if(at[lt]!==bt[lt])try{St(at,lt,bt[lt])}catch(ut){at[lt]=bt[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,_t,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 bt(dt){return dt==null}Bt.isNullOrUndefined=bt;function St(dt){return typeof dt=="number"}Bt.isNumber=St;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,_t,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"](),Pt=z[ut+"Day"](),At=z[ut+"Month"](),Dt=z[ut+"FullYear"](),Ft=z[ut+"Hours"](),jt=z[ut+"Minutes"](),Nt=z[ut+"Seconds"](),Gt=z[ut+"Milliseconds"](),Wt=at?0:z.getTimezoneOffset(),Jt=bt(z),Ut=St(z),Ht={d:dt,dd:kt(dt),ddd:gt.i18n.dayNames[Pt],dddd:gt.i18n.dayNames[Pt+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(Gt,3),L:kt(Math.round(Gt/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 Ht?Ht[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 bt(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 St(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 le=="function"&&le.amd?le(function(){return gt}):typeof Bt=="object"?_t.exports=gt:vt.dateFormat=gt})(this)},{}],343:[function(ot,_t,Bt){"use strict";var vt=/["'&<>]/;_t.exports=gt;function gt(kt){var bt=""+kt,St=vt.exec(bt);if(!St)return bt;var Tt,mt="",xt=0,ft=0;for(xt=St.index;xt<bt.length;xt++){switch(bt.charCodeAt(xt)){case 34:Tt=""";break;case 38:Tt="&";break;case 39:Tt="'";break;case 60:Tt="<";break;case 62:Tt=">";break;default:continue}ft!==xt&&(mt+=bt.substring(ft,xt)),ft=xt+1,mt+=Tt}return ft!==xt?mt+bt.substring(ft,xt):mt}},{}],344:[function(ot,_t,Bt){"use strict";var vt=typeof Reflect=="object"?Reflect:null,gt=vt&&typeof vt.apply=="function"?vt.apply:function(Nt,Gt,Wt){return Function.prototype.apply.call(Nt,Gt,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 bt(jt){console&&console.warn&&console.warn(jt)}var St=Number.isNaN||function(Nt){return Nt!==Nt};function Tt(){Tt.init.call(this)}_t.exports=Tt,_t.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||St(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||St(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 Gt=[],Wt=1;Wt<arguments.length;Wt++)Gt.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 Ht;if(Gt.length>0&&(Ht=Gt[0]),Ht instanceof Error)throw Ht;var oe=new Error("Unhandled error."+(Ht?" ("+Ht.message+")":""));throw oe.context=Ht,oe}var se=Ut[Nt];if(se===void 0)return!1;if(typeof se=="function")gt(se,this,Gt);else for(var fe=se.length,Pe=ut(se,fe),Wt=0;Wt<fe;++Wt)gt(Pe[Wt],this,Gt);return!0};function z(jt,Nt,Gt,Wt){var Jt,Ut,Ht;if(xt(Gt),Ut=jt._events,Ut===void 0?(Ut=jt._events=Object.create(null),jt._eventsCount=0):(Ut.newListener!==void 0&&(jt.emit("newListener",Nt,Gt.listener?Gt.listener:Gt),Ut=jt._events),Ht=Ut[Nt]),Ht===void 0)Ht=Ut[Nt]=Gt,++jt._eventsCount;else if(typeof Ht=="function"?Ht=Ut[Nt]=Wt?[Gt,Ht]:[Ht,Gt]:Wt?Ht.unshift(Gt):Ht.push(Gt),Jt=ft(jt),Jt>0&&Ht.length>Jt&&!Ht.warned){Ht.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+Ht.length+" "+String(Nt)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=jt,oe.type=Nt,oe.count=Ht.length,bt(oe)}return jt}Tt.prototype.addListener=function(Nt,Gt){return z(this,Nt,Gt,!1)},Tt.prototype.on=Tt.prototype.addListener,Tt.prototype.prependListener=function(Nt,Gt){return z(this,Nt,Gt,!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,Gt){var Wt={fired:!1,wrapFn:void 0,target:jt,type:Nt,listener:Gt},Jt=tt.bind(Wt);return Jt.listener=Gt,Wt.wrapFn=Jt,Jt}Tt.prototype.once=function(Nt,Gt){return xt(Gt),this.on(Nt,at(this,Nt,Gt)),this},Tt.prototype.prependOnceListener=function(Nt,Gt){return xt(Gt),this.prependListener(Nt,at(this,Nt,Gt)),this},Tt.prototype.removeListener=function(Nt,Gt){var Wt,Jt,Ut,Ht,oe;if(xt(Gt),Jt=this._events,Jt===void 0)return this;if(Wt=Jt[Nt],Wt===void 0)return this;if(Wt===Gt||Wt.listener===Gt)--this._eventsCount===0?this._events=Object.create(null):(delete Jt[Nt],Jt.removeListener&&this.emit("removeListener",Nt,Wt.listener||Gt));else if(typeof Wt!="function"){for(Ut=-1,Ht=Wt.length-1;Ht>=0;Ht--)if(Wt[Ht]===Gt||Wt[Ht].listener===Gt){oe=Wt[Ht].listener,Ut=Ht;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||Gt)}return this},Tt.prototype.off=Tt.prototype.removeListener,Tt.prototype.removeAllListeners=function(Nt){var Gt,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),Ht;for(Jt=0;Jt<Ut.length;++Jt)Ht=Ut[Jt],Ht!=="removeListener"&&this.removeAllListeners(Ht);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Gt=Wt[Nt],typeof Gt=="function")this.removeListener(Nt,Gt);else if(Gt!==void 0)for(Jt=Gt.length-1;Jt>=0;Jt--)this.removeListener(Nt,Gt[Jt]);return this};function it(jt,Nt,Gt){var Wt=jt._events;if(Wt===void 0)return[];var Jt=Wt[Nt];return Jt===void 0?[]:typeof Jt=="function"?Gt?[Jt.listener||Jt]:[Jt]:Gt?Pt(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 Gt=Nt[jt];if(typeof Gt=="function")return 1;if(Gt!==void 0)return Gt.length}return 0}Tt.prototype.eventNames=function(){return this._eventsCount>0?kt(this._events):[]};function ut(jt,Nt){for(var Gt=new Array(Nt),Wt=0;Wt<Nt;++Wt)Gt[Wt]=jt[Wt];return Gt}function dt(jt,Nt){for(;Nt+1<jt.length;Nt++)jt[Nt]=jt[Nt+1];jt.pop()}function Pt(jt){for(var Nt=new Array(jt.length),Gt=0;Gt<Nt.length;++Gt)Nt[Gt]=jt[Gt].listener||jt[Gt];return Nt}function At(jt,Nt){return new Promise(function(Gt,Wt){function Jt(Ht){jt.removeListener(Nt,Ut),Wt(Ht)}function Ut(){typeof jt.removeListener=="function"&&jt.removeListener("error",Jt),Gt([].slice.call(arguments))}Ft(jt,Nt,Ut,{once:!0}),Nt!=="error"&&Dt(jt,Jt,{once:!0})})}function Dt(jt,Nt,Gt){typeof jt.on=="function"&&Ft(jt,"error",Nt,Gt)}function Ft(jt,Nt,Gt,Wt){if(typeof jt.on=="function")Wt.once?jt.once(Nt,Gt):jt.on(Nt,Gt);else if(typeof jt.addEventListener=="function")jt.addEventListener(Nt,function Jt(Ut){Wt.once&&jt.removeEventListener(Nt,Jt),Gt(Ut)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof jt)}},{}],345:[function(ot,_t,Bt){"use strict";var vt=ot("is-callable"),gt=Object.prototype.toString,kt=Object.prototype.hasOwnProperty,bt=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))},St=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]"?bt(ft,z,at):typeof ft=="string"?St(ft,z,at):Tt(ft,z,at)};_t.exports=mt},{"is-callable":367}],346:[function(ot,_t,Bt){"use strict";var vt="Function.prototype.bind called on incompatible ",gt=Array.prototype.slice,kt=Object.prototype.toString,bt="[object Function]";_t.exports=function(Tt){var mt=this;if(typeof mt!="function"||kt.call(mt)!==bt)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,_t,Bt){"use strict";var vt=ot("./implementation");_t.exports=Function.prototype.bind||vt},{"./implementation":346}],348:[function(ot,_t,Bt){"use strict";var vt,gt=SyntaxError,kt=Function,bt=TypeError,St=function(se){try{return kt('"use strict"; return ('+se+").constructor;")()}catch(fe){}},Tt=Object.getOwnPropertyDescriptor;if(Tt)try{Tt({},"")}catch(se){Tt=null}var mt=function(){throw new bt},xt=Tt?function(){try{return arguments.callee,mt}catch(se){try{return Tt(arguments,"callee").get}catch(fe){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%":bt,"%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(fe){var Pe;if(fe==="%AsyncFunction%")Pe=St("async function () {}");else if(fe==="%GeneratorFunction%")Pe=St("function* () {}");else if(fe==="%AsyncGeneratorFunction%")Pe=St("async function* () {}");else if(fe==="%AsyncGenerator%"){var Yt=se("%AsyncGeneratorFunction%");Yt&&(Pe=Yt.prototype)}else if(fe==="%AsyncIteratorPrototype%"){var ee=se("%AsyncGenerator%");ee&&tt&&(Pe=tt(ee.prototype))}return lt[fe]=Pe,Pe},Pt={"%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),Gt=At.call(Function.call,String.prototype.slice),Wt=At.call(Function.call,RegExp.prototype.exec),Jt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ut=/\\(\\)?/g,Ht=function(fe){var Pe=Gt(fe,0,1),Yt=Gt(fe,-1);if(Pe==="%"&&Yt!=="%")throw new gt("invalid intrinsic syntax, expected closing `%`");if(Yt==="%"&&Pe!=="%")throw new gt("invalid intrinsic syntax, expected opening `%`");var ee=[];return Nt(fe,Jt,function(ye,xe,be,ce){ee[ee.length]=be?Nt(ce,Ut,"$1"):xe||ye}),ee},oe=function(fe,Pe){var Yt=fe,ee;if(Dt(Pt,Yt)&&(ee=Pt[Yt],Yt="%"+ee[0]+"%"),Dt(lt,Yt)){var ye=lt[Yt];if(ye===at&&(ye=dt(Yt)),typeof ye=="undefined"&&!Pe)throw new bt("intrinsic "+fe+" exists, but is not available. Please file an issue!");return{alias:ee,name:Yt,value:ye}}throw new gt("intrinsic "+fe+" does not exist!")};_t.exports=function(fe,Pe){if(typeof fe!="string"||fe.length===0)throw new bt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Pe!="boolean")throw new bt('"allowMissing" argument must be a boolean');if(Wt(/^%?[^%]*%?$/,fe)===null)throw new gt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Yt=Ht(fe),ee=Yt.length>0?Yt[0]:"",ye=oe("%"+ee+"%",Pe),xe=ye.name,be=ye.value,ce=!1,pe=ye.alias;pe&&(ee=pe[0],jt(Yt,Ft([0,1],pe)));for(var he=1,Ce=!0;he<Yt.length;he+=1){var de=Yt[he],Fe=Gt(de,0,1),ge=Gt(de,-1);if((Fe==='"'||Fe==="'"||Fe==="`"||ge==='"'||ge==="'"||ge==="`")&&Fe!==ge)throw new gt("property names with quotes must have matching quotes");if((de==="constructor"||!Ce)&&(ce=!0),ee+="."+de,xe="%"+ee+"%",Dt(lt,xe))be=lt[xe];else if(be!=null){if(!(de in be)){if(!Pe)throw new bt("base intrinsic for "+fe+" exists, but the property is not available.");return}if(Tt&&he+1>=Yt.length){var Se=Tt(be,de);Ce=!!Se,Ce&&"get"in Se&&!("originalValue"in Se.get)?be=Se.get:be=be[de]}else Ce=Dt(be,de),be=be[de];Ce&&!ce&&(lt[xe]=be)}}return be}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ot,_t,Bt){"use strict";var vt=ot("get-intrinsic"),gt=vt("%Object.getOwnPropertyDescriptor%",!0);if(gt)try{gt([],"length")}catch(kt){gt=null}_t.exports=gt},{"get-intrinsic":348}],350:[function(ot,_t,Bt){"use strict";var vt={foo:{}},gt=Object;_t.exports=function(){return{__proto__:vt}.foo===vt.foo&&!({__proto__:null}instanceof gt)}},{}],351:[function(ot,_t,Bt){"use strict";var vt=typeof Symbol!="undefined"&&Symbol,gt=ot("./shams");_t.exports=function(){return typeof vt!="function"||typeof Symbol!="function"||typeof vt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:gt()}},{"./shams":352}],352:[function(ot,_t,Bt){"use strict";_t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var gt={},kt=Symbol("test"),bt=Object(kt);if(typeof kt=="string"||Object.prototype.toString.call(kt)!=="[object Symbol]"||Object.prototype.toString.call(bt)!=="[object Symbol]")return!1;var St=42;gt[kt]=St;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!==St||mt.enumerable!==!0)return!1}return!0}},{}],353:[function(ot,_t,Bt){"use strict";var vt=ot("has-symbols/shams");_t.exports=function(){return vt()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ot,_t,Bt){"use strict";var vt=ot("function-bind");_t.exports=vt.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ot,_t,Bt){var vt=ot("http"),gt=ot("url"),kt=_t.exports;for(var bt in vt)vt.hasOwnProperty(bt)&&(kt[bt]=vt[bt]);kt.request=function(Tt,mt){return Tt=St(Tt),vt.request.call(this,Tt,mt)},kt.get=function(Tt,mt){return Tt=St(Tt),vt.get.call(this,Tt,mt)};function St(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,_t,Bt){"use strict";var vt=ot("util"),gt=ot("ms");_t.exports=function(kt){if(typeof kt=="number")return kt;var bt=gt(kt);if(bt===void 0){var St=new Error(vt.format("humanize-ms(%j) result undefined",kt));console.warn(St.stack)}return bt}},{ms:376,util:419}],357:[function(ot,_t,Bt){Bt.read=function(vt,gt,kt,bt,St){var Tt,mt,xt=St*8-bt-1,ft=(1<<xt)-1,z=ft>>1,tt=-7,at=kt?St-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+=bt;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,bt),Tt=Tt-z}return(lt?-1:1)*mt*Math.pow(2,Tt-bt)},Bt.write=function(vt,gt,kt,bt,St,Tt){var mt,xt,ft,z=Tt*8-St-1,tt=(1<<z)-1,at=tt>>1,it=St===23?Math.pow(2,-24)-Math.pow(2,-77):0,lt=bt?0:Tt-1,ut=bt?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,St),mt=mt+at):(xt=gt*Math.pow(2,at-1)*Math.pow(2,St),mt=0));St>=8;vt[kt+lt]=xt&255,lt+=ut,xt/=256,St-=8);for(mt=mt<<St|xt,z+=St;z>0;vt[kt+lt]=mt&255,lt+=ut,mt/=256,z-=8);vt[kt+lt-ut]|=dt*128}},{}],358:[function(ot,_t,Bt){"use strict";var vt=[ot("./nextTick"),ot("./queueMicrotask"),ot("./mutation.js"),ot("./messageChannel"),ot("./stateChange"),ot("./timeout")],gt,kt,bt=-1,St=[],Tt=!1;function mt(){!gt||!kt||(gt=!1,kt.length?St=kt.concat(St):bt=-1,St.length&&xt())}function xt(){if(!gt){Tt=!1,gt=!0;for(var lt=St.length,ut=setTimeout(mt);lt;){for(kt=St,St=[];kt&&++bt<lt;)kt[bt].run();bt=-1,lt=St.length}kt=null,bt=-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)}},_t.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];St.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,_t,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 cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=vt.MutationObserver||vt.WebKitMutationObserver;Bt.test=function(){return gt},Bt.install=function(kt){var bt=0,St=new gt(kt),Tt=vt.document.createTextNode("");return St.observe(Tt,{characterData:!0}),function(){Tt.data=bt=++bt%2}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ot,_t,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 cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ot,_t,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 cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ot,_t,Bt){"use strict";Bt.test=function(){return!0},Bt.install=function(vt){return function(){setTimeout(vt,0)}}},{}],364:[function(ot,_t,Bt){typeof Object.create=="function"?_t.exports=function(gt,kt){kt&&(gt.super_=kt,gt.prototype=Object.create(kt.prototype,{constructor:{value:gt,enumerable:!1,writable:!0,configurable:!0}}))}:_t.exports=function(gt,kt){if(kt){gt.super_=kt;var bt=function(){};bt.prototype=kt.prototype,gt.prototype=new bt,gt.prototype.constructor=gt}}},{}],365:[function(ot,_t,Bt){"use strict";var vt=ot("has-tostringtag/shams")(),gt=ot("call-bind/callBound"),kt=gt("Object.prototype.toString"),bt=function(xt){return vt&&xt&&typeof xt=="object"&&Symbol.toStringTag in xt?!1:kt(xt)==="[object Arguments]"},St=function(xt){return bt(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 bt(arguments)}();bt.isLegacyArguments=St,_t.exports=Tt?bt:St},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ot,_t,Bt){_t.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,_t,Bt){"use strict";var vt=Function.prototype.toString,gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kt,bt;if(typeof gt=="function"&&typeof Object.defineProperty=="function")try{kt=Object.defineProperty({},"length",{get:function(){throw bt}}),bt={},gt(function(){throw 42},null,kt)}catch(Dt){Dt!==bt&&(gt=null)}else gt=null;var St=/^\s*class\b/,Tt=function(Ft){try{var jt=vt.call(Ft);return St.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[,]),Pt=function(){return!1};if(typeof document=="object"){var At=document.all;xt.call(At)===xt.call(document.all)&&(Pt=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})}_t.exports=gt?function(Ft){if(Pt(Ft))return!0;if(!Ft||typeof Ft!="function"&&typeof Ft!="object")return!1;try{gt(Ft,null,kt)}catch(jt){if(jt!==bt)return!1}return!Tt(Ft)&&mt(Ft)}:function(Ft){if(Pt(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,_t,Bt){"use strict";var vt=Object.prototype.toString,gt=Function.prototype.toString,kt=/^\s*(?:function)?\*/,bt=ot("has-tostringtag/shams")(),St=Object.getPrototypeOf,Tt=function(){if(!bt)return!1;try{return Function("return function*() {}")()}catch(xt){}},mt;_t.exports=function(ft){if(typeof ft!="function")return!1;if(kt.test(gt.call(ft)))return!0;if(!bt){var z=vt.call(ft);return z==="[object GeneratorFunction]"}if(!St)return!1;if(typeof mt=="undefined"){var tt=Tt();mt=tt?St(tt):!1}return St(ft)===mt}},{"has-tostringtag/shams":353}],369:[function(ot,_t,Bt){"use strict";var vt=ot("which-typed-array");_t.exports=function(kt){return!!vt(kt)}},{"which-typed-array":420}],370:[function(ot,_t,Bt){var vt={}.toString;_t.exports=Array.isArray||function(gt){return vt.call(gt)=="[object Array]"}},{}],371:[function(ot,_t,Bt){(function(vt){(function(){(function(gt,kt){typeof Bt=="object"&&typeof _t!="undefined"?_t.exports=kt(gt):typeof le=="function"&&le.amd?le(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,bt="2.6.4",St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Tt=function(fe){for(var Pe={},Yt=0,ee=fe.length;Yt<ee;Yt++)Pe[fe.charAt(Yt)]=Yt;return Pe}(St),mt=String.fromCharCode,xt=function(fe){if(fe.length<2){var Pe=fe.charCodeAt(0);return Pe<128?fe:Pe<2048?mt(192|Pe>>>6)+mt(128|Pe&63):mt(224|Pe>>>12&15)+mt(128|Pe>>>6&63)+mt(128|Pe&63)}else{var Pe=65536+(fe.charCodeAt(0)-55296)*1024+(fe.charCodeAt(1)-56320);return mt(240|Pe>>>18&7)+mt(128|Pe>>>12&63)+mt(128|Pe>>>6&63)+mt(128|Pe&63)}},ft=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(fe){return fe.replace(ft,xt)},tt=function(fe){var Pe=[0,2,1][fe.length%3],Yt=fe.charCodeAt(0)<<16|(fe.length>1?fe.charCodeAt(1):0)<<8|(fe.length>2?fe.charCodeAt(2):0),ee=[St.charAt(Yt>>>18),St.charAt(Yt>>>12&63),Pe>=2?"=":St.charAt(Yt>>>6&63),Pe>=1?"=":St.charAt(Yt&63)];return ee.join("")},at=gt.btoa&&typeof gt.btoa=="function"?function(fe){return gt.btoa(fe)}:function(fe){if(fe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return fe.replace(/[\s\S]{1,3}/g,tt)},it=function(fe){return at(z(String(fe)))},lt=function(fe){return fe.replace(/[+\/]/g,function(Pe){return Pe=="+"?"-":"_"}).replace(/=/g,"")},ut=function(fe,Pe){return Pe?lt(it(fe)):it(fe)},dt=function(fe){return ut(fe,!0)},Pt;gt.Uint8Array&&(Pt=function(fe,Pe){for(var Yt="",ee=0,ye=fe.length;ee<ye;ee+=3){var xe=fe[ee],be=fe[ee+1],ce=fe[ee+2],pe=xe<<16|be<<8|ce;Yt+=St.charAt(pe>>>18)+St.charAt(pe>>>12&63)+(typeof be!="undefined"?St.charAt(pe>>>6&63):"=")+(typeof ce!="undefined"?St.charAt(pe&63):"=")}return Pe?lt(Yt):Yt});var At=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Dt=function(fe){switch(fe.length){case 4:var Pe=(7&fe.charCodeAt(0))<<18|(63&fe.charCodeAt(1))<<12|(63&fe.charCodeAt(2))<<6|63&fe.charCodeAt(3),Yt=Pe-65536;return mt((Yt>>>10)+55296)+mt((Yt&1023)+56320);case 3:return mt((15&fe.charCodeAt(0))<<12|(63&fe.charCodeAt(1))<<6|63&fe.charCodeAt(2));default:return mt((31&fe.charCodeAt(0))<<6|63&fe.charCodeAt(1))}},Ft=function(fe){return fe.replace(At,Dt)},jt=function(fe){var Pe=fe.length,Yt=Pe%4,ee=(Pe>0?Tt[fe.charAt(0)]<<18:0)|(Pe>1?Tt[fe.charAt(1)]<<12:0)|(Pe>2?Tt[fe.charAt(2)]<<6:0)|(Pe>3?Tt[fe.charAt(3)]:0),ye=[mt(ee>>>16),mt(ee>>>8&255),mt(ee&255)];return ye.length-=[0,0,2,1][Yt],ye.join("")},Nt=gt.atob&&typeof gt.atob=="function"?function(fe){return gt.atob(fe)}:function(fe){return fe.replace(/\S{1,4}/g,jt)},Gt=function(fe){return Nt(String(fe).replace(/[^A-Za-z0-9\+\/]/g,""))},Wt=function(fe){return Ft(Nt(fe))},Jt=function(fe){return String(fe).replace(/[-_]/g,function(Pe){return Pe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ut=function(fe){return Wt(Jt(fe))},Ht;gt.Uint8Array&&(Ht=function(fe){return Uint8Array.from(Gt(Jt(fe)),function(Pe){return Pe.charCodeAt(0)})});var oe=function(){var fe=gt.Base64;return gt.Base64=kt,fe};if(gt.Base64={VERSION:bt,atob:Gt,btoa:at,fromBase64:Ut,toBase64:ut,utob:z,encode:ut,encodeURI:dt,btou:Ft,decode:Ut,noConflict:oe,fromUint8Array:Pt,toUint8Array:Ht},typeof Object.defineProperty=="function"){var se=function(fe){return{value:fe,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(fe){return ut(this,fe)})),Object.defineProperty(String.prototype,"toBase64URI",se(function(){return ut(this,!0)}))}}return gt.Meteor&&(Base64=gt.Base64),typeof _t!="undefined"&&_t.exports?_t.exports.Base64=gt.Base64:typeof le=="function"&&le.amd&&le([],function(){return gt.Base64}),{Base64:gt.Base64}})}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ot,_t,Bt){"use strict";_t.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(kt,bt,St){if(!kt)throw new TypeError("argument dest is required");if(!bt)throw new TypeError("argument src is required");return St===void 0&&(St=!0),Object.getOwnPropertyNames(bt).forEach(function(mt){if(!(!St&&vt.call(kt,mt))){var xt=Object.getOwnPropertyDescriptor(bt,mt);Object.defineProperty(kt,mt,xt)}}),kt}},{}],373:[function(ot,_t,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 bt in gt){var St=gt[bt].map(function(ft){return ft.toLowerCase()});bt=bt.toLowerCase();for(var Tt=0;Tt<St.length;Tt++){var mt=St[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 "'+bt+'". Pass `force=true` to allow this, otherwise remove "'+mt+'" from the list of extensions for "'+bt+'".');this._types[mt]=bt}}if(kt||!this._extensions[bt]){var xt=St[0];this._extensions[bt]=xt[0]!=="*"?xt:xt.substr(1)}}},vt.prototype.getType=function(gt){gt=String(gt);var kt=gt.replace(/^.*[/\\]/,"").toLowerCase(),bt=kt.replace(/^.*\./,"").toLowerCase(),St=kt.length<gt.length,Tt=bt.length<kt.length-1;return(Tt||!St)&&this._types[bt]||null},vt.prototype.getExtension=function(gt){return gt=/^\s*([^;\s]*)/.test(gt)&&RegExp.$1,gt&&this._extensions[gt.toLowerCase()]||null},_t.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,_t,Bt){"use strict";var vt=ot("./Mime");_t.exports=new vt(ot("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ot,_t,Bt){"use strict";_t.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,_t,Bt){var vt=1e3,gt=vt*60,kt=gt*60,bt=kt*24,St=bt*7,Tt=bt*365.25;_t.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*St;case"days":case"day":case"d":return it*bt;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>=bt?Math.round(tt/bt)+"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>=bt?z(tt,at,bt,"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,_t,Bt){"use strict";var vt=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;function bt(Tt){if(Tt==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Tt)}function St(){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}}_t.exports=St()?Object.assign:function(Tt,mt){for(var xt,ft=bt(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,_t,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 bt(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 St={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?".":St.normalize(mt)},relative:function(mt,xt){if(gt(mt),gt(xt),mt===xt||(mt=St.resolve(mt),xt=St.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,Pt=0;Pt<=ut;++Pt){if(Pt===ut){if(lt>ut){if(xt.charCodeAt(at+Pt)===47)return xt.slice(at+Pt+1);if(Pt===0)return xt.slice(at+Pt)}else tt>ut&&(mt.charCodeAt(ft+Pt)===47?dt=Pt:Pt===0&&(dt=0));break}var At=mt.charCodeAt(ft+Pt),Dt=xt.charCodeAt(at+Pt);if(At!==Dt)break;At===47&&(dt=Pt)}var Ft="";for(Pt=ft+dt+1;Pt<=z;++Pt)(Pt===z||mt.charCodeAt(Pt)===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 bt("/",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,Pt=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:Pt!==1&&(Pt=1):at!==-1&&(Pt=-1)}return at===-1||lt===-1||Pt===0||Pt===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};St.posix=St,_t.exports=St}).call(this)}).call(this,ot("_process"))},{_process:467}],379:[function(ot,_t,Bt){(function(vt){(function(){(function(){"use strict";var gt={function:!0,object:!0},kt=gt[typeof window]&&window||this,bt=kt,St=gt[typeof Bt]&&Bt,Tt=gt[typeof _t]&&_t&&!_t.nodeType&&_t,mt=St&&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,Ht,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 Ht&&oe&&/^Win/i.test(Ut)&&!/^Windows Phone /i.test(Ut)&&(se=se[/[\d.]+$/.exec(Ut)])&&(Ut="Windows "+se),Ut=String(Ut),Ht&&oe&&(Ut=Ut.replace(RegExp(Ht,"i"),oe)),Ut=Pt(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,Ht){var oe=-1,se=Ut?Ut.length:0;if(typeof se=="number"&&se>-1&&se<=xt)for(;++oe<se;)Ht(Ut[oe],oe,Ut);else At(Ut,Ht)}function Pt(Ut){return Ut=Gt(Ut),/^(?:webOS|i(?:OS|P))/.test(Ut)?Ut:lt(Ut)}function At(Ut,Ht){for(var oe in Ut)at.call(Ut,oe)&&Ht(Ut[oe],oe,Ut)}function Dt(Ut){return Ut==null?lt(Ut):it.call(Ut).slice(8,-1)}function Ft(Ut,Ht){var oe=Ut!=null?typeof Ut[Ht]:"number";return!/^(?:boolean|number|string|undefined)$/.test(oe)&&(oe=="object"?!!Ut[Ht]:!0)}function jt(Ut){return String(Ut).replace(/([ -])(?!$)/g,"$1?")}function Nt(Ut,Ht){var oe=null;return dt(Ut,function(se,fe){oe=Ht(oe,se,fe,Ut)}),oe}function Gt(Ut){return String(Ut).replace(/^ +| +$/g,"")}function Wt(Ut){var Ht=kt,oe=Ut&&typeof Ut=="object"&&Dt(Ut)!="String";oe&&(Ht=Ut,Ut=null);var se=Ht.navigator||{},fe=se.userAgent||"";Ut||(Ut=fe);var Pe=oe||z==bt,Yt=oe?!!se.likeChrome:/\bChrome\b/.test(Ut)&&!/internal|\n/i.test(it.toString()),ee="Object",ye=oe?ee:"ScriptBridgingProxyObject",xe=oe?ee:"Environment",be=oe&&Ht.java?"JavaPackage":Dt(Ht.java),ce=oe?ee:"RuntimeObject",pe=/\bJava/.test(be)&&Ht.java,he=pe&&Dt(Ht.environment)==xe,Ce=pe?"a":"\u03B1",de=pe?"b":"\u03B2",Fe=Ht.document||{},ge=Ht.operamini||Ht.opera,Se=ft.test(Se=oe&&ge?ge["[[Class]]"]:Dt(ge))?Se:ge=null,re,Kt=Ut,wt=[],Lt=null,Xt=Ut==fe,ne=Xt&&ge&&typeof ge.version=="function"&&ge.version(),It,Rt=Le([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Vt=Be(["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"]),$t=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"]),ue=Ne({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}}),me=Xe(["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 Le(We){return Nt(We,function(Ke,rn){return Ke||RegExp("\\b"+(rn.pattern||jt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Ne(We){return Nt(We,function(Ke,rn,an){return Ke||(rn[$t]||rn[/^[a-z]+(?: +[a-z]+\b)*/i.exec($t)]||RegExp("\\b"+jt(an)+"(?:\\b|\\w*\\d)","i").exec(Ut))&&an})}function Be(We){return Nt(We,function(Ke,rn){return Ke||RegExp("\\b"+(rn.pattern||jt(rn))+"\\b","i").exec(Ut)&&(rn.label||rn)})}function Xe(We){return Nt(We,function(Ke,rn){var an=rn.pattern||jt(rn);return!Ke&&(Ke=RegExp("\\b"+an+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ut))&&(Ke=ut(Ke,an,rn.label||rn)),Ke})}function Qe(We){return Nt(We,function(Ke,rn){var an=rn.pattern||jt(rn);return!Ke&&(Ke=RegExp("\\b"+an+" *\\d+[.\\w_]*","i").exec(Ut)||RegExp("\\b"+an+" *\\w+-[\\w]*","i").exec(Ut)||RegExp("\\b"+an+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ut))&&((Ke=String(rn.label&&!RegExp(an,"i").test(rn.label)?rn.label:Ke).split("/"))[1]&&!/[\d.]+/.test(Ke[0])&&(Ke[0]+=" "+Ke[1]),rn=rn.label||rn,Ke=Pt(Ke[0].replace(RegExp(an,"i"),rn).replace(RegExp("; *(?:"+rn+"[_-])?","i")," ").replace(RegExp("("+rn+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function qe(We){return Nt(We,function(Ke,rn){return Ke||(RegExp(rn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ut)||0)[1]||null})}function He(){return this.description||""}if(Rt&&(Rt=[Rt]),/\bAndroid\b/.test(me)&&!$t&&(re=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ut))&&($t=Gt(re[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ue&&!$t?$t=Qe([ue]):ue&&$t&&($t=$t.replace(RegExp("^("+jt(ue)+")[-_.\\s]","i"),ue+" ").replace(RegExp("^("+jt(ue)+")[-_.]?(\\w)","i"),ue+" $2")),(re=/\bGoogle TV\b/.exec($t))&&($t=re[0]),/\bSimulator\b/i.test(Ut)&&($t=($t?$t+" ":"")+"Simulator"),Vt=="Opera Mini"&&/\bOPiOS\b/.test(Ut)&&wt.push("running in Turbo/Uncompressed mode"),Vt=="IE"&&/\blike iPhone OS\b/.test(Ut)?(re=Wt(Ut.replace(/like iPhone OS/,"")),ue=re.manufacturer,$t=re.product):/^iP/.test($t)?(Vt||(Vt="Safari"),me="iOS"+((re=/ OS ([\d_]+)/i.exec(Ut))?" "+re[1].replace(/_/g,"."):"")):Vt=="Konqueror"&&/^Linux\b/i.test(me)?me="Kubuntu":ue&&ue!="Google"&&(/Chrome/.test(Vt)&&!/\bMobile Safari\b/i.test(Ut)||/\bVita\b/.test($t))||/\bAndroid\b/.test(me)&&/^Chrome/.test(Vt)&&/\bVersion\//i.test(Ut)?(Vt="Android Browser",me=/\bAndroid\b/.test(me)?me:"Android"):Vt=="Silk"?(/\bMobi/i.test(Ut)||(me="Android",wt.unshift("desktop mode")),/Accelerated *= *true/i.test(Ut)&&wt.unshift("accelerated")):Vt=="UC Browser"&&/\bUCWEB\b/.test(Ut)?wt.push("speed mode"):Vt=="PaleMoon"&&(re=/\bFirefox\/([\d.]+)\b/.exec(Ut))?wt.push("identifying as Firefox "+re[1]):Vt=="Firefox"&&(re=/\b(Mobile|Tablet|TV)\b/i.exec(Ut))?(me||(me="Firefox OS"),$t||($t=re[1])):!Vt||(re=!/\bMinefield\b/i.test(Ut)&&/\b(?:Firefox|Safari)\b/.exec(Vt))?(Vt&&!$t&&/[\/,]|^[^(]+?\)/.test(Ut.slice(Ut.indexOf(re+"/")+8))&&(Vt=null),(re=$t||ue||me)&&($t||ue||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(me))&&(Vt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(me)?me:re)+" Browser")):Vt=="Electron"&&(re=(/\bChrome\/([\d.]+)\b/.exec(Ut)||0)[1])&&wt.push("Chromium "+re),ne||(ne=qe(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",jt(Vt),"(?:Firefox|Minefield|NetFront)"])),(re=Rt=="iCab"&&parseFloat(ne)>3&&"WebKit"||/\bOpera\b/.test(Vt)&&(/\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)&&(me=="Mac OS"?"Tasman":"Trident")||Rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Vt)&&"NetFront")&&(Rt=[re]),Vt=="IE"&&(re=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ut)||0)[1])?(Vt+=" Mobile",me="Windows Phone "+(/\+$/.test(re)?re:re+".x"),wt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ut)?(Vt="IE Mobile",me="Windows Phone 8.x",wt.unshift("desktop mode"),ne||(ne=(/\brv:([\d.]+)/.exec(Ut)||0)[1])):Vt!="IE"&&Rt=="Trident"&&(re=/\brv:([\d.]+)/.exec(Ut))&&(Vt&&wt.push("identifying as "+Vt+(ne?" "+ne:"")),Vt="IE",ne=re[1]),Xt){if(Ft(Ht,"global"))if(pe&&(re=pe.lang.System,Kt=re.getProperty("os.arch"),me=me||re.getProperty("os.name")+" "+re.getProperty("os.version")),he){try{ne=Ht.require("ringo/engine").version.join("."),Vt="RingoJS"}catch(We){(re=Ht.system)&&re.global.system==Ht.system&&(Vt="Narwhal",me||(me=re[0].os||null))}Vt||(Vt="Rhino")}else typeof Ht.process=="object"&&!Ht.process.browser&&(re=Ht.process)&&(typeof re.versions=="object"&&(typeof re.versions.electron=="string"?(wt.push("Node "+re.versions.node),Vt="Electron",ne=re.versions.electron):typeof re.versions.nw=="string"&&(wt.push("Chromium "+ne,"Node "+re.versions.node),Vt="NW.js",ne=re.versions.nw)),Vt||(Vt="Node.js",Kt=re.arch,me=re.platform,ne=/[\d.]+/.exec(re.version),ne=ne?ne[0]:null));else Dt(re=Ht.runtime)==ye?(Vt="Adobe AIR",me=re.flash.system.Capabilities.os):Dt(re=Ht.phantom)==ce?(Vt="PhantomJS",ne=(re=re.version||null)&&re.major+"."+re.minor+"."+re.patch):typeof Fe.documentMode=="number"&&(re=/\bTrident\/(\d+)/i.exec(Ut))?(ne=[ne,Fe.documentMode],(re=+re[1]+4)!=ne[1]&&(wt.push("IE "+ne[1]+" mode"),Rt&&(Rt[1]=""),ne[1]=re),ne=Vt=="IE"?String(ne[1].toFixed(1)):ne[0]):typeof Fe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Vt)&&(wt.push("masking as "+Vt+" "+ne),Vt="IE",ne="11.0",Rt=["Trident"],me="Windows");me=me&&Pt(me)}if(ne&&(re=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ne)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ut+";"+(Xt&&se.appMinorVersion))||/\bMinefield\b/i.test(Ut)&&"a")&&(Lt=/b/i.test(re)?"beta":"alpha",ne=ne.replace(RegExp(re+"\\+?$"),"")+(Lt=="beta"?de:Ce)+(/\d+\+?/.exec(re)||"")),Vt=="Fennec"||Vt=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(me))Vt="Firefox Mobile";else if(Vt=="Maxthon"&&ne)ne=ne.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test($t))$t=="Xbox 360"&&(me=null),$t=="Xbox 360"&&/\bIEMobile\b/.test(Ut)&&wt.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Vt)||Vt&&!$t&&!/Browser|Mobi/.test(Vt))&&(me=="Windows CE"||/Mobi/i.test(Ut)))Vt+=" Mobile";else if(Vt=="IE"&&Xt)try{Ht.external===null&&wt.unshift("platform preview")}catch(We){wt.unshift("embedded")}else(/\bBlackBerry\b/.test($t)||/\bBB10\b/.test(Ut))&&(re=(RegExp($t.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ut)||0)[1]||ne)?(re=[re,/BB10/.test(Ut)],me=(re[1]?($t=null,ue="BlackBerry"):"Device Software")+" "+re[0],ne=null):this!=At&&$t!="Wii"&&(Xt&&ge||/Opera/.test(Vt)&&/\b(?:MSIE|Firefox)\b/i.test(Ut)||Vt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(me)||Vt=="IE"&&(me&&!/^Win/.test(me)&&ne>5.5||/\bWindows XP\b/.test(me)&&ne>8||ne==8&&!/\bTrident\b/.test(Ut)))&&!ft.test(re=Wt.call(At,Ut.replace(ft,"")+";"))&&re.name&&(re="ing as "+re.name+((re=re.version)?" "+re:""),ft.test(Vt)?(/\bIE\b/.test(re)&&me=="Mac OS"&&(me=null),re="identify"+re):(re="mask"+re,Se?Vt=Pt(Se.replace(/([a-z])([A-Z])/g,"$1 $2")):Vt="Opera",/\bIE\b/.test(re)&&(me=null),Xt||(ne=null)),Rt=["Presto"],wt.push(re));(re=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ut)||0)[1])&&(re=[parseFloat(re.replace(/\.(\d)$/,".0$1")),re],Vt=="Safari"&&re[1].slice(-1)=="+"?(Vt="WebKit Nightly",Lt="alpha",ne=re[1].slice(0,-1)):(ne==re[1]||ne==(re[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ut)||0)[1]))&&(ne=null),re[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ut)||0)[1],re[0]==537.36&&re[2]==537.36&&parseFloat(re[1])>=28&&Rt=="WebKit"&&(Rt=["Blink"]),!Xt||!Yt&&!re[1]?(Rt&&(Rt[1]="like Safari"),re=(re=re[0],re<400?1:re<500?2:re<526?3:re<533?4:re<534?"4+":re<535?5:re<537?6:re<538?7:re<601?8:re<602?9:re<604?10:re<606?11:re<608?12:"12")):(Rt&&(Rt[1]="like Chrome"),re=re[1]||(re=re[0],re<530?1:re<532?2:re<532.05?3:re<533?4:re<534.03?5:re<534.07?6:re<534.1?7:re<534.13?8:re<534.16?9:re<534.24?10:re<534.3?11:re<535.01?12:re<535.02?"13+":re<535.07?15:re<535.11?16:re<535.19?17:re<536.05?18:re<536.1?19:re<537.01?20:re<537.11?"21+":re<537.13?23:re<537.18?24:re<537.24?25:re<537.36?26:Rt!="Blink"?"27":"28")),Rt&&(Rt[1]+=" "+(re+=typeof re=="number"?".x":/[.+]/.test(re)?"":"+")),Vt=="Safari"&&(!ne||parseInt(ne)>45)?ne=re:Vt=="Chrome"&&/\bHeadlessChrome/i.test(Ut)&&wt.unshift("headless")),Vt=="Opera"&&(re=/\bzbov|zvav$/.exec(me))?(Vt+=" ",wt.unshift("desktop mode"),re=="zvav"?(Vt+="Mini",ne=null):Vt+="Mobile",me=me.replace(RegExp(" *"+re+"$"),"")):Vt=="Safari"&&/\bChrome\b/.exec(Rt&&Rt[1])?(wt.unshift("desktop mode"),Vt="Chrome Mobile",ne=null,/\bOS X\b/.test(me)?(ue="Apple",me="iOS 4.3+"):me=null):/\bSRWare Iron\b/.test(Vt)&&!ne&&(ne=qe("Chrome")),ne&&ne.indexOf(re=/[\d.]+$/.exec(me))==0&&Ut.indexOf("/"+re+"-")>-1&&(me=Gt(me.replace(re,""))),me&&me.indexOf(Vt)!=-1&&!RegExp(Vt+" OS").test(me)&&(me=me.replace(RegExp(" *"+jt(Vt)+" *"),"")),Rt&&!/\b(?:Avant|Nook)\b/.test(Vt)&&(/Browser|Lunascape|Maxthon/.test(Vt)||Vt!="Safari"&&/^iOS/.test(me)&&/\bSafari\b/.test(Rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Vt)&&Rt[1])&&(re=Rt[Rt.length-1])&&wt.push(re),wt.length&&(wt=["("+wt.join("; ")+")"]),ue&&$t&&$t.indexOf(ue)<0&&wt.push("on "+ue),$t&&wt.push((/^on /.test(wt[wt.length-1])?"":"on ")+$t),me&&(re=/ ([\d.+]+)$/.exec(me),It=re&&me.charAt(me.length-re[0].length-1)=="/",me={architecture:32,family:re&&!It?me.replace(re[0],""):me,version:re?re[1]:null,toString:function(){var We=this.version;return this.family+(We&&!It?" "+We:"")+(this.architecture==64?" 64-bit":"")}}),(re=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Kt))&&!/\bi686\b/i.test(Kt)?(me&&(me.architecture=64,me.family=me.family.replace(RegExp(" *"+re),"")),Vt&&(/\bWOW64\b/i.test(Ut)||Xt&&/\w(?:86|32)$/.test(se.cpuClass||se.platform)&&!/\bWin64; x64\b/i.test(Ut))&&wt.unshift("32-bit")):me&&/^OS X/.test(me.family)&&Vt=="Chrome"&&parseFloat(ne)>=39&&(me.architecture=64),Ut||(Ut=null);var Ue={};return Ue.description=Ut,Ue.layout=Rt&&Rt[0],Ue.manufacturer=ue,Ue.name=Vt,Ue.prerelease=Lt,Ue.product=$t,Ue.ua=Ut,Ue.version=Vt&&ne,Ue.os=me||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=Wt,Ue.toString=He,Ue.version&&wt.unshift(ne),Ue.name&&wt.unshift(Vt),me&&Vt&&!(me==String(me).split(" ")[0]&&(me==Vt.split(" ")[0]||$t))&&wt.push($t?"("+me+")":"on "+me),wt.length&&(Ue.description=wt.join(" ")),Ue}var Jt=Wt();typeof le=="function"&&typeof le.amd=="object"&&le.amd?(kt.platform=Jt,le(function(){return Jt})):St&&Tt?At(Jt,function(Ut,Ht){St[Ht]=Ut}):kt.platform=Jt}).call(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ot,_t,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?_t.exports={nextTick:gt}:_t.exports=vt;function gt(kt,bt,St,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,bt)});case 3:return vt.nextTick(function(){kt.call(null,bt,St)});case 4:return vt.nextTick(function(){kt.call(null,bt,St,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,_t,Bt){var vt=_t.exports={},gt,kt;function bt(){throw new Error("setTimeout has not been defined")}function St(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?gt=setTimeout:gt=bt}catch(dt){gt=bt}try{typeof clearTimeout=="function"?kt=clearTimeout:kt=St}catch(dt){kt=St}})();function Tt(dt){if(gt===setTimeout)return setTimeout(dt,0);if((gt===bt||!gt)&&setTimeout)return gt=setTimeout,setTimeout(dt,0);try{return gt(dt,0)}catch(Pt){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===St||!kt)&&clearTimeout)return kt=clearTimeout,clearTimeout(dt);try{return kt(dt)}catch(Pt){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 Pt=xt.length;Pt;){for(z=xt,xt=[];++tt<Pt;)z&&z[tt].run();tt=-1,Pt=xt.length}z=null,ft=!1,mt(dt)}}vt.nextTick=function(dt){var Pt=new Array(arguments.length-1);if(arguments.length>1)for(var At=1;At<arguments.length;At++)Pt[At-1]=arguments[At];xt.push(new lt(dt,Pt)),xt.length===1&&!ft&&Tt(it)};function lt(dt,Pt){this.fun=dt,this.array=Pt}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,_t,Bt){(function(vt){(function(){(function(gt){var kt=typeof Bt=="object"&&Bt&&!Bt.nodeType&&Bt,bt=typeof _t=="object"&&_t&&!_t.nodeType&&_t,St=typeof vt=="object"&&vt;(St.global===St||St.window===St||St.self===St)&&(gt=St);var Tt,mt=2147483647,xt=36,ft=1,z=26,tt=38,at=700,it=72,lt=128,ut="-",dt=/^xn--/,Pt=/[^\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,Gt;function Wt(be){throw new RangeError(Dt[be])}function Jt(be,ce){for(var pe=be.length,he=[];pe--;)he[pe]=ce(be[pe]);return he}function Ut(be,ce){var pe=be.split("@"),he="";pe.length>1&&(he=pe[0]+"@",be=pe[1]),be=be.replace(At,".");var Ce=be.split("."),de=Jt(Ce,ce).join(".");return he+de}function Ht(be){for(var ce=[],pe=0,he=be.length,Ce,de;pe<he;)Ce=be.charCodeAt(pe++),Ce>=55296&&Ce<=56319&&pe<he?(de=be.charCodeAt(pe++),(de&64512)==56320?ce.push(((Ce&1023)<<10)+(de&1023)+65536):(ce.push(Ce),pe--)):ce.push(Ce);return ce}function oe(be){return Jt(be,function(ce){var pe="";return ce>65535&&(ce-=65536,pe+=Nt(ce>>>10&1023|55296),ce=56320|ce&1023),pe+=Nt(ce),pe}).join("")}function se(be){return be-48<10?be-22:be-65<26?be-65:be-97<26?be-97:xt}function fe(be,ce){return be+22+75*(be<26)-((ce!=0)<<5)}function Pe(be,ce,pe){var he=0;for(be=pe?jt(be/at):be>>1,be+=jt(be/ce);be>Ft*z>>1;he+=xt)be=jt(be/Ft);return jt(he+(Ft+1)*be/(be+tt))}function Yt(be){var ce=[],pe=be.length,he,Ce=0,de=lt,Fe=it,ge,Se,re,Kt,wt,Lt,Xt,ne,It;for(ge=be.lastIndexOf(ut),ge<0&&(ge=0),Se=0;Se<ge;++Se)be.charCodeAt(Se)>=128&&Wt("not-basic"),ce.push(be.charCodeAt(Se));for(re=ge>0?ge+1:0;re<pe;){for(Kt=Ce,wt=1,Lt=xt;re>=pe&&Wt("invalid-input"),Xt=se(be.charCodeAt(re++)),(Xt>=xt||Xt>jt((mt-Ce)/wt))&&Wt("overflow"),Ce+=Xt*wt,ne=Lt<=Fe?ft:Lt>=Fe+z?z:Lt-Fe,!(Xt<ne);Lt+=xt)It=xt-ne,wt>jt(mt/It)&&Wt("overflow"),wt*=It;he=ce.length+1,Fe=Pe(Ce-Kt,he,Kt==0),jt(Ce/he)>mt-de&&Wt("overflow"),de+=jt(Ce/he),Ce%=he,ce.splice(Ce++,0,de)}return oe(ce)}function ee(be){var ce,pe,he,Ce,de,Fe,ge,Se,re,Kt,wt,Lt=[],Xt,ne,It,Rt;for(be=Ht(be),Xt=be.length,ce=lt,pe=0,de=it,Fe=0;Fe<Xt;++Fe)wt=be[Fe],wt<128&&Lt.push(Nt(wt));for(he=Ce=Lt.length,Ce&&Lt.push(ut);he<Xt;){for(ge=mt,Fe=0;Fe<Xt;++Fe)wt=be[Fe],wt>=ce&&wt<ge&&(ge=wt);for(ne=he+1,ge-ce>jt((mt-pe)/ne)&&Wt("overflow"),pe+=(ge-ce)*ne,ce=ge,Fe=0;Fe<Xt;++Fe)if(wt=be[Fe],wt<ce&&++pe>mt&&Wt("overflow"),wt==ce){for(Se=pe,re=xt;Kt=re<=de?ft:re>=de+z?z:re-de,!(Se<Kt);re+=xt)Rt=Se-Kt,It=xt-Kt,Lt.push(Nt(fe(Kt+Rt%It,0))),Se=jt(Rt/It);Lt.push(Nt(fe(Se,0))),de=Pe(pe,ne,he==Ce),pe=0,++he}++pe,++ce}return Lt.join("")}function ye(be){return Ut(be,function(ce){return dt.test(ce)?Yt(ce.slice(4).toLowerCase()):ce})}function xe(be){return Ut(be,function(ce){return Pt.test(ce)?"xn--"+ee(ce):ce})}if(Tt={version:"1.4.1",ucs2:{decode:Ht,encode:oe},decode:Yt,encode:ee,toASCII:xe,toUnicode:ye},typeof le=="function"&&typeof le.amd=="object"&&le.amd)le("punycode",function(){return Tt});else if(kt&&bt)if(_t.exports==kt)bt.exports=Tt;else for(Gt in Tt)Tt.hasOwnProperty(Gt)&&(kt[Gt]=Tt[Gt]);else gt.punycode=Tt})(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ot,_t,Bt){"use strict";function vt(kt,bt){return Object.prototype.hasOwnProperty.call(kt,bt)}_t.exports=function(kt,bt,St,Tt){bt=bt||"&",St=St||"=";var mt={};if(typeof kt!="string"||kt.length===0)return mt;var xt=/\+/g;kt=kt.split(bt);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(St),lt,ut,dt,Pt;it>=0?(lt=at.substr(0,it),ut=at.substr(it+1)):(lt=at,ut=""),dt=decodeURIComponent(lt),Pt=decodeURIComponent(ut),vt(mt,dt)?gt(mt[dt])?mt[dt].push(Pt):mt[dt]=[mt[dt],Pt]:mt[dt]=Pt}return mt};var gt=Array.isArray||function(kt){return Object.prototype.toString.call(kt)==="[object Array]"}},{}],384:[function(ot,_t,Bt){"use strict";var vt=function(St){switch(typeof St){case"string":return St;case"boolean":return St?"true":"false";case"number":return isFinite(St)?St:"";default:return""}};_t.exports=function(St,Tt,mt,xt){return Tt=Tt||"&",mt=mt||"=",St===null&&(St=void 0),typeof St=="object"?kt(bt(St),function(ft){var z=encodeURIComponent(vt(ft))+mt;return gt(St[ft])?kt(St[ft],function(tt){return z+encodeURIComponent(vt(tt))}).join(Tt):z+encodeURIComponent(vt(St[ft]))}).join(Tt):xt?encodeURIComponent(vt(xt))+mt+encodeURIComponent(vt(St)):""};var gt=Array.isArray||function(St){return Object.prototype.toString.call(St)==="[object Array]"};function kt(St,Tt){if(St.map)return St.map(Tt);for(var mt=[],xt=0;xt<St.length;xt++)mt.push(Tt(St[xt],xt));return mt}var bt=Object.keys||function(St){var Tt=[];for(var mt in St)Object.prototype.hasOwnProperty.call(St,mt)&&Tt.push(mt);return Tt}},{}],385:[function(ot,_t,Bt){"use strict";Bt.decode=Bt.parse=ot("./decode"),Bt.encode=Bt.stringify=ot("./encode")},{"./decode":383,"./encode":384}],386:[function(ot,_t,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};_t.exports=ft;var kt=Object.create(ot("core-util-is"));kt.inherits=ot("inherits");var bt=ot("./_stream_readable"),St=ot("./_stream_writable");kt.inherits(ft,bt);for(var Tt=gt(St.prototype),mt=0;mt<Tt.length;mt++){var xt=Tt[mt];ft.prototype[xt]||(ft.prototype[xt]=St.prototype[xt])}function ft(at){if(!(this instanceof ft))return new ft(at);bt.call(this,at),St.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,_t,Bt){"use strict";_t.exports=kt;var vt=ot("./_stream_transform"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(kt,vt);function kt(bt){if(!(this instanceof kt))return new kt(bt);vt.call(this,bt)}kt.prototype._transform=function(bt,St,Tt){Tt(null,bt)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("process-nextick-args");_t.exports=Nt;var bt=ot("isarray"),St;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&<.debuglog?ut=lt.debuglog("stream"):ut=function(){};var dt=ot("./internal/streams/BufferList"),Pt=ot("./internal/streams/destroy"),At;it.inherits(Nt,xt);var Dt=["error","close","destroy","pause","resume"];function Ft(wt,Lt,Xt){if(typeof wt.prependListener=="function")return wt.prependListener(Lt,Xt);!wt._events||!wt._events[Lt]?wt.on(Lt,Xt):bt(wt._events[Lt])?wt._events[Lt].unshift(Xt):wt._events[Lt]=[Xt,wt._events[Lt]]}function jt(wt,Lt){St=St||ot("./_stream_duplex"),wt=wt||{};var Xt=Lt instanceof St;this.objectMode=!!wt.objectMode,Xt&&(this.objectMode=this.objectMode||!!wt.readableObjectMode);var ne=wt.highWaterMark,It=wt.readableHighWaterMark,Rt=this.objectMode?16:16*1024;ne||ne===0?this.highWaterMark=ne:Xt&&(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(St=St||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=Pt.destroy,Nt.prototype._undestroy=Pt.undestroy,Nt.prototype._destroy=function(wt,Lt){this.push(null),Lt(wt)},Nt.prototype.push=function(wt,Lt){var Xt=this._readableState,ne;return Xt.objectMode?ne=!0:typeof wt=="string"&&(Lt=Lt||Xt.defaultEncoding,Lt!==Xt.encoding&&(wt=ft.from(wt,Lt),Lt=""),ne=!0),Gt(this,wt,Lt,!1,ne)},Nt.prototype.unshift=function(wt){return Gt(this,wt,null,!0,!1)};function Gt(wt,Lt,Xt,ne,It){var Rt=wt._readableState;if(Lt===null)Rt.reading=!1,fe(wt,Rt);else{var Vt;It||(Vt=Jt(Rt,Lt)),Vt?wt.emit("error",Vt):Rt.objectMode||Lt&&Lt.length>0?(typeof Lt!="string"&&!Rt.objectMode&&Object.getPrototypeOf(Lt)!==ft.prototype&&(Lt=tt(Lt)),ne?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&&!Xt?(Lt=Rt.decoder.write(Lt),Rt.objectMode||Lt.length!==0?Wt(wt,Rt,Lt,!1):ee(wt,Rt)):Wt(wt,Rt,Lt,!1))):ne||(Rt.reading=!1)}return Ut(Rt)}function Wt(wt,Lt,Xt,ne){Lt.flowing&&Lt.length===0&&!Lt.sync?(wt.emit("data",Xt),wt.read(0)):(Lt.length+=Lt.objectMode?1:Xt.length,ne?Lt.buffer.unshift(Xt):Lt.buffer.push(Xt),Lt.needReadable&&Pe(wt)),ee(wt,Lt)}function Jt(wt,Lt){var Xt;return!at(Lt)&&typeof Lt!="string"&&Lt!==void 0&&!wt.objectMode&&(Xt=new TypeError("Invalid non-string/buffer chunk")),Xt}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 Ht=8388608;function oe(wt){return wt>=Ht?wt=Ht:(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,Xt=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?Se(this):Pe(this),null;if(wt=se(wt,Lt),wt===0&&Lt.ended)return Lt.length===0&&Se(this),null;var ne=Lt.needReadable;ut("need readable",ne),(Lt.length===0||Lt.length-wt<Lt.highWaterMark)&&(ne=!0,ut("length less than watermark",ne)),Lt.ended||Lt.reading?(ne=!1,ut("reading or ended",ne)):ne&&(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(Xt,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),Xt!==wt&&Lt.ended&&Se(this)),It!==null&&this.emit("data",It),It};function fe(wt,Lt){if(!Lt.ended){if(Lt.decoder){var Xt=Lt.decoder.end();Xt&&Xt.length&&(Lt.buffer.push(Xt),Lt.length+=Lt.objectMode?1:Xt.length)}Lt.ended=!0,Pe(wt)}}function Pe(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"),he(wt)}function ee(wt,Lt){Lt.readingMore||(Lt.readingMore=!0,kt.nextTick(ye,wt,Lt))}function ye(wt,Lt){for(var Xt=Lt.length;!Lt.reading&&!Lt.flowing&&!Lt.ended&&Lt.length<Lt.highWaterMark&&(ut("maybeReadMore read 0"),wt.read(0),Xt!==Lt.length);)Xt=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 Xt=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=wt;break;case 1:ne.pipes=[ne.pipes,wt];break;default:ne.pipes.push(wt);break}ne.pipesCount+=1,ut("pipe count=%d opts=%j",ne.pipesCount,Lt);var It=(!Lt||Lt.end!==!1)&&wt!==vt.stdout&&wt!==vt.stderr,Rt=It?$t:He;ne.endEmitted?kt.nextTick(Rt):Xt.once("end",Rt),wt.on("unpipe",Vt);function Vt(Ue,We){ut("onunpipe"),Ue===Xt&&We&&We.hasUnpiped===!1&&(We.hasUnpiped=!0,Le())}function $t(){ut("onend"),wt.end()}var ue=xe(Xt);wt.on("drain",ue);var me=!1;function Le(){ut("cleanup"),wt.removeListener("close",Qe),wt.removeListener("finish",qe),wt.removeListener("drain",ue),wt.removeListener("error",Xe),wt.removeListener("unpipe",Vt),Xt.removeListener("end",$t),Xt.removeListener("end",He),Xt.removeListener("data",Be),me=!0,ne.awaitDrain&&(!wt._writableState||wt._writableState.needDrain)&&ue()}var Ne=!1;Xt.on("data",Be);function Be(Ue){ut("ondata"),Ne=!1;var We=wt.write(Ue);We===!1&&!Ne&&((ne.pipesCount===1&&ne.pipes===wt||ne.pipesCount>1&&Kt(ne.pipes,wt)!==-1)&&!me&&(ut("false write response, pause",Xt._readableState.awaitDrain),Xt._readableState.awaitDrain++,Ne=!0),Xt.pause())}function Xe(Ue){ut("onerror",Ue),He(),wt.removeListener("error",Xe),mt(wt,"error")===0&&wt.emit("error",Ue)}Ft(wt,"error",Xe);function Qe(){wt.removeListener("finish",qe),He()}wt.once("close",Qe);function qe(){ut("onfinish"),wt.removeListener("close",Qe),He()}wt.once("finish",qe);function He(){ut("unpipe"),Xt.unpipe(wt)}return wt.emit("pipe",Xt),ne.flowing||(ut("pipe resume"),Xt.resume()),wt};function xe(wt){return function(){var Lt=wt._readableState;ut("pipeOnDrain",Lt.awaitDrain),Lt.awaitDrain&&Lt.awaitDrain--,Lt.awaitDrain===0&&mt(wt,"data")&&(Lt.flowing=!0,he(wt))}}Nt.prototype.unpipe=function(wt){var Lt=this._readableState,Xt={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,Xt),this);if(!wt){var ne=Lt.pipes,It=Lt.pipesCount;Lt.pipes=null,Lt.pipesCount=0,Lt.flowing=!1;for(var Rt=0;Rt<It;Rt++)ne[Rt].emit("unpipe",this,Xt);return this}var Vt=Kt(Lt.pipes,wt);return Vt===-1?this:(Lt.pipes.splice(Vt,1),Lt.pipesCount-=1,Lt.pipesCount===1&&(Lt.pipes=Lt.pipes[0]),wt.emit("unpipe",this,Xt),this)},Nt.prototype.on=function(wt,Lt){var Xt=xt.prototype.on.call(this,wt,Lt);if(wt==="data")this._readableState.flowing!==!1&&this.resume();else if(wt==="readable"){var ne=this._readableState;!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.emittedReadable=!1,ne.reading?ne.length&&Pe(this):kt.nextTick(be,this))}return Xt},Nt.prototype.addListener=Nt.prototype.on;function be(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(pe,wt,Lt))}function pe(wt,Lt){Lt.reading||(ut("resume read 0"),wt.read(0)),Lt.resumeScheduled=!1,Lt.awaitDrain=0,wt.emit("resume"),he(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 he(wt){var Lt=wt._readableState;for(ut("flow",Lt.flowing);Lt.flowing&&wt.read()!==null;);}Nt.prototype.wrap=function(wt){var Lt=this,Xt=this._readableState,ne=!1;wt.on("end",function(){if(ut("wrapped end"),Xt.decoder&&!Xt.ended){var Vt=Xt.decoder.end();Vt&&Vt.length&&Lt.push(Vt)}Lt.push(null)}),wt.on("data",function(Vt){if(ut("wrapped data"),Xt.decoder&&(Vt=Xt.decoder.write(Vt)),!(Xt.objectMode&&Vt==null)&&!(!Xt.objectMode&&(!Vt||!Vt.length))){var $t=Lt.push(Vt);$t||(ne=!0,wt.pause())}});for(var It in wt)this[It]===void 0&&typeof wt[It]=="function"&&(this[It]=function(Vt){return function(){return wt[Vt].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(Vt){ut("wrapped _read",Vt),ne&&(ne=!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 Xt;return Lt.objectMode?Xt=Lt.buffer.shift():!wt||wt>=Lt.length?(Lt.decoder?Xt=Lt.buffer.join(""):Lt.buffer.length===1?Xt=Lt.buffer.head.data:Xt=Lt.buffer.concat(Lt.length),Lt.buffer.clear()):Xt=de(wt,Lt.buffer,Lt.decoder),Xt}function de(wt,Lt,Xt){var ne;return wt<Lt.head.data.length?(ne=Lt.head.data.slice(0,wt),Lt.head.data=Lt.head.data.slice(wt)):wt===Lt.head.data.length?ne=Lt.shift():ne=Xt?Fe(wt,Lt):ge(wt,Lt),ne}function Fe(wt,Lt){var Xt=Lt.head,ne=1,It=Xt.data;for(wt-=It.length;Xt=Xt.next;){var Rt=Xt.data,Vt=wt>Rt.length?Rt.length:wt;if(Vt===Rt.length?It+=Rt:It+=Rt.slice(0,wt),wt-=Vt,wt===0){Vt===Rt.length?(++ne,Xt.next?Lt.head=Xt.next:Lt.head=Lt.tail=null):(Lt.head=Xt,Xt.data=Rt.slice(Vt));break}++ne}return Lt.length-=ne,It}function ge(wt,Lt){var Xt=ft.allocUnsafe(wt),ne=Lt.head,It=1;for(ne.data.copy(Xt),wt-=ne.data.length;ne=ne.next;){var Rt=ne.data,Vt=wt>Rt.length?Rt.length:wt;if(Rt.copy(Xt,Xt.length-wt,0,Vt),wt-=Vt,wt===0){Vt===Rt.length?(++It,ne.next?Lt.head=ne.next:Lt.head=Lt.tail=null):(Lt.head=ne,ne.data=Rt.slice(Vt));break}++It}return Lt.length-=It,Xt}function Se(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(re,Lt,wt))}function re(wt,Lt){!wt.endEmitted&&wt.length===0&&(wt.endEmitted=!0,Lt.readable=!1,Lt.emit("end"))}function Kt(wt,Lt){for(var Xt=0,ne=wt.length;Xt<ne;Xt++)if(wt[Xt]===Lt)return Xt;return-1}}).call(this)}).call(this,ot("_process"),typeof cn!="undefined"?cn: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,_t,Bt){"use strict";_t.exports=bt;var vt=ot("./_stream_duplex"),gt=Object.create(ot("core-util-is"));gt.inherits=ot("inherits"),gt.inherits(bt,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 bt(mt){if(!(this instanceof bt))return new bt(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",St)}function St(){var mt=this;typeof this._flush=="function"?this._flush(function(xt,ft){Tt(mt,xt,ft)}):Tt(this,null,null)}bt.prototype.push=function(mt,xt){return this._transformState.needTransform=!1,vt.prototype.push.call(this,mt,xt)},bt.prototype._transform=function(mt,xt,ft){throw new Error("_transform() is not implemented")},bt.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)}},bt.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},bt.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,_t,Bt){(function(vt,gt,kt){(function(){"use strict";var bt=ot("process-nextick-args");_t.exports=Ft;function St(pe,he,Ce){this.chunk=pe,this.encoding=he,this.callback=Ce,this.next=null}function Tt(pe){var he=this;this.next=null,this.entry=null,this.finish=function(){ce(he,pe)}}var mt=!vt.browser&&["v0.10","v0.9."].indexOf(vt.version.slice(0,5))>-1?kt:bt.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(pe){return at.from(pe)}function ut(pe){return at.isBuffer(pe)||pe instanceof it}var dt=ot("./internal/streams/destroy");ft.inherits(Ft,tt);function Pt(){}function At(pe,he){xt=xt||ot("./_stream_duplex"),pe=pe||{};var Ce=he instanceof xt;this.objectMode=!!pe.objectMode,Ce&&(this.objectMode=this.objectMode||!!pe.writableObjectMode);var de=pe.highWaterMark,Fe=pe.writableHighWaterMark,ge=this.objectMode?16:16*1024;de||de===0?this.highWaterMark=de:Ce&&(Fe||Fe===0)?this.highWaterMark=Fe:this.highWaterMark=ge,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 Se=pe.decodeStrings===!1;this.decodeStrings=!Se,this.defaultEncoding=pe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){oe(he,re)},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 he=this.bufferedRequest,Ce=[];he;)Ce.push(he),he=he.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(pe){}}();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(pe){return Dt.call(this,pe)?!0:this!==Ft?!1:pe&&pe._writableState instanceof At}})):Dt=function(pe){return pe instanceof this};function Ft(pe){if(xt=xt||ot("./_stream_duplex"),!Dt.call(Ft,this)&&!(this instanceof xt))return new Ft(pe);this._writableState=new At(pe,this),this.writable=!0,pe&&(typeof pe.write=="function"&&(this._write=pe.write),typeof pe.writev=="function"&&(this._writev=pe.writev),typeof pe.destroy=="function"&&(this._destroy=pe.destroy),typeof pe.final=="function"&&(this._final=pe.final)),tt.call(this)}Ft.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function jt(pe,he){var Ce=new Error("write after end");pe.emit("error",Ce),bt.nextTick(he,Ce)}function Nt(pe,he,Ce,de){var Fe=!0,ge=!1;return Ce===null?ge=new TypeError("May not write null values to stream"):typeof Ce!="string"&&Ce!==void 0&&!he.objectMode&&(ge=new TypeError("Invalid non-string/buffer chunk")),ge&&(pe.emit("error",ge),bt.nextTick(de,ge),Fe=!1),Fe}Ft.prototype.write=function(pe,he,Ce){var de=this._writableState,Fe=!1,ge=!de.objectMode&&ut(pe);return ge&&!at.isBuffer(pe)&&(pe=lt(pe)),typeof he=="function"&&(Ce=he,he=null),ge?he="buffer":he||(he=de.defaultEncoding),typeof Ce!="function"&&(Ce=Pt),de.ended?jt(this,Ce):(ge||Nt(this,de,pe,Ce))&&(de.pendingcb++,Fe=Wt(this,de,ge,pe,he,Ce)),Fe},Ft.prototype.cork=function(){var pe=this._writableState;pe.corked++},Ft.prototype.uncork=function(){var pe=this._writableState;pe.corked&&(pe.corked--,!pe.writing&&!pe.corked&&!pe.finished&&!pe.bufferProcessing&&pe.bufferedRequest&&Pe(this,pe))},Ft.prototype.setDefaultEncoding=function(he){if(typeof he=="string"&&(he=he.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((he+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+he);return this._writableState.defaultEncoding=he,this};function Gt(pe,he,Ce){return!pe.objectMode&&pe.decodeStrings!==!1&&typeof he=="string"&&(he=at.from(he,Ce)),he}Object.defineProperty(Ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wt(pe,he,Ce,de,Fe,ge){if(!Ce){var Se=Gt(he,de,Fe);de!==Se&&(Ce=!0,Fe="buffer",de=Se)}var re=he.objectMode?1:de.length;he.length+=re;var Kt=he.length<he.highWaterMark;if(Kt||(he.needDrain=!0),he.writing||he.corked){var wt=he.lastBufferedRequest;he.lastBufferedRequest={chunk:de,encoding:Fe,isBuf:Ce,callback:ge,next:null},wt?wt.next=he.lastBufferedRequest:he.bufferedRequest=he.lastBufferedRequest,he.bufferedRequestCount+=1}else Jt(pe,he,!1,re,de,Fe,ge);return Kt}function Jt(pe,he,Ce,de,Fe,ge,Se){he.writelen=de,he.writecb=Se,he.writing=!0,he.sync=!0,Ce?pe._writev(Fe,he.onwrite):pe._write(Fe,ge,he.onwrite),he.sync=!1}function Ut(pe,he,Ce,de,Fe){--he.pendingcb,Ce?(bt.nextTick(Fe,de),bt.nextTick(xe,pe,he),pe._writableState.errorEmitted=!0,pe.emit("error",de)):(Fe(de),pe._writableState.errorEmitted=!0,pe.emit("error",de),xe(pe,he))}function Ht(pe){pe.writing=!1,pe.writecb=null,pe.length-=pe.writelen,pe.writelen=0}function oe(pe,he){var Ce=pe._writableState,de=Ce.sync,Fe=Ce.writecb;if(Ht(Ce),he)Ut(pe,Ce,de,he,Fe);else{var ge=Yt(Ce);!ge&&!Ce.corked&&!Ce.bufferProcessing&&Ce.bufferedRequest&&Pe(pe,Ce),de?mt(se,pe,Ce,ge,Fe):se(pe,Ce,ge,Fe)}}function se(pe,he,Ce,de){Ce||fe(pe,he),he.pendingcb--,de(),xe(pe,he)}function fe(pe,he){he.length===0&&he.needDrain&&(he.needDrain=!1,pe.emit("drain"))}function Pe(pe,he){he.bufferProcessing=!0;var Ce=he.bufferedRequest;if(pe._writev&&Ce&&Ce.next){var de=he.bufferedRequestCount,Fe=new Array(de),ge=he.corkedRequestsFree;ge.entry=Ce;for(var Se=0,re=!0;Ce;)Fe[Se]=Ce,Ce.isBuf||(re=!1),Ce=Ce.next,Se+=1;Fe.allBuffers=re,Jt(pe,he,!0,he.length,Fe,"",ge.finish),he.pendingcb++,he.lastBufferedRequest=null,ge.next?(he.corkedRequestsFree=ge.next,ge.next=null):he.corkedRequestsFree=new Tt(he),he.bufferedRequestCount=0}else{for(;Ce;){var Kt=Ce.chunk,wt=Ce.encoding,Lt=Ce.callback,Xt=he.objectMode?1:Kt.length;if(Jt(pe,he,!1,Xt,Kt,wt,Lt),Ce=Ce.next,he.bufferedRequestCount--,he.writing)break}Ce===null&&(he.lastBufferedRequest=null)}he.bufferedRequest=Ce,he.bufferProcessing=!1}Ft.prototype._write=function(pe,he,Ce){Ce(new Error("_write() is not implemented"))},Ft.prototype._writev=null,Ft.prototype.end=function(pe,he,Ce){var de=this._writableState;typeof pe=="function"?(Ce=pe,pe=null,he=null):typeof he=="function"&&(Ce=he,he=null),pe!=null&&this.write(pe,he),de.corked&&(de.corked=1,this.uncork()),!de.ending&&!de.finished&&be(this,de,Ce)};function Yt(pe){return pe.ending&&pe.length===0&&pe.bufferedRequest===null&&!pe.finished&&!pe.writing}function ee(pe,he){pe._final(function(Ce){he.pendingcb--,Ce&&pe.emit("error",Ce),he.prefinished=!0,pe.emit("prefinish"),xe(pe,he)})}function ye(pe,he){!he.prefinished&&!he.finalCalled&&(typeof pe._final=="function"?(he.pendingcb++,he.finalCalled=!0,bt.nextTick(ee,pe,he)):(he.prefinished=!0,pe.emit("prefinish")))}function xe(pe,he){var Ce=Yt(he);return Ce&&(ye(pe,he),he.pendingcb===0&&(he.finished=!0,pe.emit("finish"))),Ce}function be(pe,he,Ce){he.ending=!0,xe(pe,he),Ce&&(he.finished?bt.nextTick(Ce):pe.once("finish",Ce)),he.ended=!0,pe.writable=!1}function ce(pe,he,Ce){var de=pe.entry;for(pe.entry=null;de;){var Fe=de.callback;he.pendingcb--,Fe(Ce),de=de.next}he.corkedRequestsFree?he.corkedRequestsFree.next=pe:he.corkedRequestsFree=pe}Object.defineProperty(Ft.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(pe){this._writableState&&(this._writableState.destroyed=pe)}}),Ft.prototype.destroy=dt.destroy,Ft.prototype._undestroy=dt.undestroy,Ft.prototype._destroy=function(pe,he){this.end(),he(pe)}}).call(this)}).call(this,ot("_process"),typeof cn!="undefined"?cn: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,_t,Bt){"use strict";function vt(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}var gt=ot("safe-buffer").Buffer,kt=ot("util");function bt(St,Tt,mt){St.copy(Tt,mt)}_t.exports=function(){function St(){vt(this,St),this.head=null,this.tail=null,this.length=0}return St.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},St.prototype.unshift=function(mt){var xt={data:mt,next:this.head};this.length===0&&(this.tail=xt),this.head=xt,++this.length},St.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}},St.prototype.clear=function(){this.head=this.tail=null,this.length=0},St.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},St.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;)bt(ft.data,xt,z),z+=ft.data.length,ft=ft.next;return xt},St}(),kt&&kt.inspect&&kt.inspect.custom&&(_t.exports.prototype[kt.inspect.custom]=function(){var St=kt.inspect({length:this.length});return this.constructor.name+" "+St})},{"safe-buffer":396,util:89}],392:[function(ot,_t,Bt){"use strict";var vt=ot("process-nextick-args");function gt(St,Tt){var mt=this,xt=this._readableState&&this._readableState.destroyed,ft=this._writableState&&this._writableState.destroyed;return xt||ft?(Tt?Tt(St):St&&(!this._writableState||!this._writableState.errorEmitted)&&vt.nextTick(bt,this,St),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(St||null,function(z){!Tt&&z?(vt.nextTick(bt,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 bt(St,Tt){St.emit("error",Tt)}_t.exports={destroy:gt,undestroy:kt}},{"process-nextick-args":380}],393:[function(ot,_t,Bt){_t.exports=ot("events").EventEmitter},{events:344}],394:[function(ot,_t,Bt){Bt=_t.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,_t,Bt){var vt=function(gt){"use strict";var kt=Object.prototype,bt=kt.hasOwnProperty,St,Tt=typeof Symbol=="function"?Symbol:{},mt=Tt.iterator||"@@iterator",xt=Tt.asyncIterator||"@@asyncIterator",ft=Tt.toStringTag||"@@toStringTag";function z(ye,xe,be){return Object.defineProperty(ye,xe,{value:be,enumerable:!0,configurable:!0,writable:!0}),ye[xe]}try{z({},"")}catch(ye){z=function(xe,be,ce){return xe[be]=ce}}function tt(ye,xe,be,ce){var pe=xe&&xe.prototype instanceof At?xe:At,he=Object.create(pe.prototype),Ce=new Pe(ce||[]);return he._invoke=Ht(ye,be,Ce),he}gt.wrap=tt;function at(ye,xe,be){try{return{type:"normal",arg:ye.call(xe,be)}}catch(ce){return{type:"throw",arg:ce}}}var it="suspendedStart",lt="suspendedYield",ut="executing",dt="completed",Pt={};function At(){}function Dt(){}function Ft(){}var jt={};z(jt,mt,function(){return this});var Nt=Object.getPrototypeOf,Gt=Nt&&Nt(Nt(Yt([])));Gt&&Gt!==kt&&bt.call(Gt,mt)&&(jt=Gt);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(ye){["next","throw","return"].forEach(function(xe){z(ye,xe,function(be){return this._invoke(xe,be)})})}gt.isGeneratorFunction=function(ye){var xe=typeof ye=="function"&&ye.constructor;return xe?xe===Dt||(xe.displayName||xe.name)==="GeneratorFunction":!1},gt.mark=function(ye){return Object.setPrototypeOf?Object.setPrototypeOf(ye,Ft):(ye.__proto__=Ft,z(ye,ft,"GeneratorFunction")),ye.prototype=Object.create(Wt),ye},gt.awrap=function(ye){return{__await:ye}};function Ut(ye,xe){function be(he,Ce,de,Fe){var ge=at(ye[he],ye,Ce);if(ge.type==="throw")Fe(ge.arg);else{var Se=ge.arg,re=Se.value;return re&&typeof re=="object"&&bt.call(re,"__await")?xe.resolve(re.__await).then(function(Kt){be("next",Kt,de,Fe)},function(Kt){be("throw",Kt,de,Fe)}):xe.resolve(re).then(function(Kt){Se.value=Kt,de(Se)},function(Kt){return be("throw",Kt,de,Fe)})}}var ce;function pe(he,Ce){function de(){return new xe(function(Fe,ge){be(he,Ce,Fe,ge)})}return ce=ce?ce.then(de,de):de()}this._invoke=pe}Jt(Ut.prototype),z(Ut.prototype,xt,function(){return this}),gt.AsyncIterator=Ut,gt.async=function(ye,xe,be,ce,pe){pe===void 0&&(pe=Promise);var he=new Ut(tt(ye,xe,be,ce),pe);return gt.isGeneratorFunction(xe)?he:he.next().then(function(Ce){return Ce.done?Ce.value:he.next()})};function Ht(ye,xe,be){var ce=it;return function(he,Ce){if(ce===ut)throw new Error("Generator is already running");if(ce===dt){if(he==="throw")throw Ce;return ee()}for(be.method=he,be.arg=Ce;;){var de=be.delegate;if(de){var Fe=oe(de,be);if(Fe){if(Fe===Pt)continue;return Fe}}if(be.method==="next")be.sent=be._sent=be.arg;else if(be.method==="throw"){if(ce===it)throw ce=dt,be.arg;be.dispatchException(be.arg)}else be.method==="return"&&be.abrupt("return",be.arg);ce=ut;var ge=at(ye,xe,be);if(ge.type==="normal"){if(ce=be.done?dt:lt,ge.arg===Pt)continue;return{value:ge.arg,done:be.done}}else ge.type==="throw"&&(ce=dt,be.method="throw",be.arg=ge.arg)}}}function oe(ye,xe){var be=ye.iterator[xe.method];if(be===St){if(xe.delegate=null,xe.method==="throw"){if(ye.iterator.return&&(xe.method="return",xe.arg=St,oe(ye,xe),xe.method==="throw"))return Pt;xe.method="throw",xe.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pt}var ce=at(be,ye.iterator,xe.arg);if(ce.type==="throw")return xe.method="throw",xe.arg=ce.arg,xe.delegate=null,Pt;var pe=ce.arg;if(!pe)return xe.method="throw",xe.arg=new TypeError("iterator result is not an object"),xe.delegate=null,Pt;if(pe.done)xe[ye.resultName]=pe.value,xe.next=ye.nextLoc,xe.method!=="return"&&(xe.method="next",xe.arg=St);else return pe;return xe.delegate=null,Pt}Jt(Wt),z(Wt,ft,"Generator"),z(Wt,mt,function(){return this}),z(Wt,"toString",function(){return"[object Generator]"});function se(ye){var xe={tryLoc:ye[0]};1 in ye&&(xe.catchLoc=ye[1]),2 in ye&&(xe.finallyLoc=ye[2],xe.afterLoc=ye[3]),this.tryEntries.push(xe)}function fe(ye){var xe=ye.completion||{};xe.type="normal",delete xe.arg,ye.completion=xe}function Pe(ye){this.tryEntries=[{tryLoc:"root"}],ye.forEach(se,this),this.reset(!0)}gt.keys=function(ye){var xe=[];for(var be in ye)xe.push(be);return xe.reverse(),function ce(){for(;xe.length;){var pe=xe.pop();if(pe in ye)return ce.value=pe,ce.done=!1,ce}return ce.done=!0,ce}};function Yt(ye){if(ye){var xe=ye[mt];if(xe)return xe.call(ye);if(typeof ye.next=="function")return ye;if(!isNaN(ye.length)){var be=-1,ce=function pe(){for(;++be<ye.length;)if(bt.call(ye,be))return pe.value=ye[be],pe.done=!1,pe;return pe.value=St,pe.done=!0,pe};return ce.next=ce}}return{next:ee}}gt.values=Yt;function ee(){return{value:St,done:!0}}return Pe.prototype={constructor:Pe,reset:function(ye){if(this.prev=0,this.next=0,this.sent=this._sent=St,this.done=!1,this.delegate=null,this.method="next",this.arg=St,this.tryEntries.forEach(fe),!ye)for(var xe in this)xe.charAt(0)==="t"&&bt.call(this,xe)&&!isNaN(+xe.slice(1))&&(this[xe]=St)},stop:function(){this.done=!0;var ye=this.tryEntries[0],xe=ye.completion;if(xe.type==="throw")throw xe.arg;return this.rval},dispatchException:function(ye){if(this.done)throw ye;var xe=this;function be(Fe,ge){return he.type="throw",he.arg=ye,xe.next=Fe,ge&&(xe.method="next",xe.arg=St),!!ge}for(var ce=this.tryEntries.length-1;ce>=0;--ce){var pe=this.tryEntries[ce],he=pe.completion;if(pe.tryLoc==="root")return be("end");if(pe.tryLoc<=this.prev){var Ce=bt.call(pe,"catchLoc"),de=bt.call(pe,"finallyLoc");if(Ce&&de){if(this.prev<pe.catchLoc)return be(pe.catchLoc,!0);if(this.prev<pe.finallyLoc)return be(pe.finallyLoc)}else if(Ce){if(this.prev<pe.catchLoc)return be(pe.catchLoc,!0)}else if(de){if(this.prev<pe.finallyLoc)return be(pe.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(ye,xe){for(var be=this.tryEntries.length-1;be>=0;--be){var ce=this.tryEntries[be];if(ce.tryLoc<=this.prev&&bt.call(ce,"finallyLoc")&&this.prev<ce.finallyLoc){var pe=ce;break}}pe&&(ye==="break"||ye==="continue")&&pe.tryLoc<=xe&&xe<=pe.finallyLoc&&(pe=null);var he=pe?pe.completion:{};return he.type=ye,he.arg=xe,pe?(this.method="next",this.next=pe.finallyLoc,Pt):this.complete(he)},complete:function(ye,xe){if(ye.type==="throw")throw ye.arg;return ye.type==="break"||ye.type==="continue"?this.next=ye.arg:ye.type==="return"?(this.rval=this.arg=ye.arg,this.method="return",this.next="end"):ye.type==="normal"&&xe&&(this.next=xe),Pt},finish:function(ye){for(var xe=this.tryEntries.length-1;xe>=0;--xe){var be=this.tryEntries[xe];if(be.finallyLoc===ye)return this.complete(be.completion,be.afterLoc),fe(be),Pt}},catch:function(ye){for(var xe=this.tryEntries.length-1;xe>=0;--xe){var be=this.tryEntries[xe];if(be.tryLoc===ye){var ce=be.completion;if(ce.type==="throw"){var pe=ce.arg;fe(be)}return pe}}throw new Error("illegal catch attempt")},delegateYield:function(ye,xe,be){return this.delegate={iterator:Yt(ye),resultName:xe,nextLoc:be},this.method==="next"&&(this.arg=St),Pt}},gt}(typeof _t=="object"?_t.exports:{});try{regeneratorRuntime=vt}catch(gt){typeof globalThis=="object"?globalThis.regeneratorRuntime=vt:Function("r","regeneratorRuntime = r")(vt)}},{}],396:[function(ot,_t,Bt){var vt=ot("buffer"),gt=vt.Buffer;function kt(St,Tt){for(var mt in St)Tt[mt]=St[mt]}gt.from&>.alloc&>.allocUnsafe&>.allocUnsafeSlow?_t.exports=vt:(kt(vt,Bt),Bt.Buffer=bt);function bt(St,Tt,mt){return gt(St,Tt,mt)}kt(gt,bt),bt.from=function(St,Tt,mt){if(typeof St=="number")throw new TypeError("Argument must not be a number");return gt(St,Tt,mt)},bt.alloc=function(St,Tt,mt){if(typeof St!="number")throw new TypeError("Argument must be a number");var xt=gt(St);return Tt!==void 0?typeof mt=="string"?xt.fill(Tt,mt):xt.fill(Tt):xt.fill(0),xt},bt.allocUnsafe=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return gt(St)},bt.allocUnsafeSlow=function(St){if(typeof St!="number")throw new TypeError("Argument must be a number");return vt.SlowBuffer(St)}},{buffer:90}],397:[function(ot,_t,Bt){(function(vt){(function(){(function(gt){gt.parser=function(Se,re){return new bt(Se,re)},gt.SAXParser=bt,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 bt(Se,re){if(!(this instanceof bt))return new bt(Se,re);var Kt=this;Tt(Kt),Kt.q=Kt.c="",Kt.bufferCheckPosition=gt.MAX_BUFFER_LENGTH,Kt.opt=re||{},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=!!Se,Kt.noscript=!!(Se||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(Se){function re(){}re.prototype=Se;var Kt=new re;return Kt}),Object.keys||(Object.keys=function(Se){var re=[];for(var Kt in Se)Se.hasOwnProperty(Kt)&&re.push(Kt);return re});function St(Se){for(var re=Math.max(gt.MAX_BUFFER_LENGTH,10),Kt=0,wt=0,Lt=kt.length;wt<Lt;wt++){var Xt=Se[kt[wt]].length;if(Xt>re)switch(kt[wt]){case"textNode":fe(Se);break;case"cdata":se(Se,"oncdata",Se.cdata),Se.cdata="";break;case"script":se(Se,"onscript",Se.script),Se.script="";break;default:Yt(Se,"Max buffer length exceeded: "+kt[wt])}Kt=Math.max(Kt,Xt)}var ne=gt.MAX_BUFFER_LENGTH-Kt;Se.bufferCheckPosition=ne+Se.position}function Tt(Se){for(var re=0,Kt=kt.length;re<Kt;re++)Se[kt[re]]=""}function mt(Se){fe(Se),Se.cdata!==""&&(se(Se,"oncdata",Se.cdata),Se.cdata=""),Se.script!==""&&(se(Se,"onscript",Se.script),Se.script="")}bt.prototype={end:function(){ee(this)},write:ge,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(Se){xt=function(){}}var ft=gt.EVENTS.filter(function(Se){return Se!=="error"&&Se!=="end"});function z(Se,re){return new tt(Se,re)}function tt(Se,re){if(!(this instanceof tt))return new tt(Se,re);xt.apply(this),this._parser=new bt(Se,re),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(Se){if(typeof vt=="function"&&typeof vt.isBuffer=="function"&&vt.isBuffer(Se)){if(!this._decoder){var re=ot("string_decoder").StringDecoder;this._decoder=new re("utf8")}Se=this._decoder.write(Se)}return this._parser.write(Se.toString()),this.emit("data",Se),!0},tt.prototype.end=function(Se){return Se&&Se.length&&this.write(Se),this._parser.end(),!0},tt.prototype.on=function(Se,re){var Kt=this;return!Kt._parser["on"+Se]&&ft.indexOf(Se)!==-1&&(Kt._parser["on"+Se]=function(){var wt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);wt.splice(0,0,Se),Kt.emit.apply(Kt,wt)}),xt.prototype.on.call(Kt,Se,re)};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},Pt=/[:_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(Se){return Se===" "||Se===`
|
|
`||Se==="\r"||Se===" "}function Nt(Se){return Se==='"'||Se==="'"}function Gt(Se){return Se===">"||jt(Se)}function Wt(Se,re){return Se.test(re)}function Jt(Se,re){return!Wt(Se,re)}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(Se){var re=gt.ENTITIES[Se],Kt=typeof re=="number"?String.fromCharCode(re):re;gt.ENTITIES[Se]=Kt});for(var Ht in gt.STATE)gt.STATE[gt.STATE[Ht]]=Ht;Ut=gt.STATE;function oe(Se,re,Kt){Se[re]&&Se[re](Kt)}function se(Se,re,Kt){Se.textNode&&fe(Se),oe(Se,re,Kt)}function fe(Se){Se.textNode=Pe(Se.opt,Se.textNode),Se.textNode&&oe(Se,"ontext",Se.textNode),Se.textNode=""}function Pe(Se,re){return Se.trim&&(re=re.trim()),Se.normalize&&(re=re.replace(/\s+/g," ")),re}function Yt(Se,re){return fe(Se),Se.trackPosition&&(re+=`
|
|
Line: `+Se.line+`
|
|
Column: `+Se.column+`
|
|
Char: `+Se.c),re=new Error(re),Se.error=re,oe(Se,"onerror",re),Se}function ee(Se){return Se.sawRoot&&!Se.closedRoot&&ye(Se,"Unclosed root tag"),Se.state!==Ut.BEGIN&&Se.state!==Ut.BEGIN_WHITESPACE&&Se.state!==Ut.TEXT&&Yt(Se,"Unexpected end"),fe(Se),Se.c="",Se.closed=!0,oe(Se,"onend"),bt.call(Se,Se.strict,Se.opt),Se}function ye(Se,re){if(typeof Se!="object"||!(Se instanceof bt))throw new Error("bad call to strictFail");Se.strict&&Yt(Se,re)}function xe(Se){Se.strict||(Se.tagName=Se.tagName[Se.looseCase]());var re=Se.tags[Se.tags.length-1]||Se,Kt=Se.tag={name:Se.tagName,attributes:{}};Se.opt.xmlns&&(Kt.ns=re.ns),Se.attribList.length=0,se(Se,"onopentagstart",Kt)}function be(Se,re){var Kt=Se.indexOf(":"),wt=Kt<0?["",Se]:Se.split(":"),Lt=wt[0],Xt=wt[1];return re&&Se==="xmlns"&&(Lt="xmlns",Xt=""),{prefix:Lt,local:Xt}}function ce(Se){if(Se.strict||(Se.attribName=Se.attribName[Se.looseCase]()),Se.attribList.indexOf(Se.attribName)!==-1||Se.tag.attributes.hasOwnProperty(Se.attribName)){Se.attribName=Se.attribValue="";return}if(Se.opt.xmlns){var re=be(Se.attribName,!0),Kt=re.prefix,wt=re.local;if(Kt==="xmlns")if(wt==="xml"&&Se.attribValue!==lt)ye(Se,"xml: prefix must be bound to "+lt+`
|
|
Actual: `+Se.attribValue);else if(wt==="xmlns"&&Se.attribValue!==ut)ye(Se,"xmlns: prefix must be bound to "+ut+`
|
|
Actual: `+Se.attribValue);else{var Lt=Se.tag,Xt=Se.tags[Se.tags.length-1]||Se;Lt.ns===Xt.ns&&(Lt.ns=Object.create(Xt.ns)),Lt.ns[wt]=Se.attribValue}Se.attribList.push([Se.attribName,Se.attribValue])}else Se.tag.attributes[Se.attribName]=Se.attribValue,se(Se,"onattribute",{name:Se.attribName,value:Se.attribValue});Se.attribName=Se.attribValue=""}function pe(Se,re){if(Se.opt.xmlns){var Kt=Se.tag,wt=be(Se.tagName);Kt.prefix=wt.prefix,Kt.local=wt.local,Kt.uri=Kt.ns[wt.prefix]||"",Kt.prefix&&!Kt.uri&&(ye(Se,"Unbound namespace prefix: "+JSON.stringify(Se.tagName)),Kt.uri=wt.prefix);var Lt=Se.tags[Se.tags.length-1]||Se;Kt.ns&&Lt.ns!==Kt.ns&&Object.keys(Kt.ns).forEach(function(Be){se(Se,"onopennamespace",{prefix:Be,uri:Kt.ns[Be]})});for(var Xt=0,ne=Se.attribList.length;Xt<ne;Xt++){var It=Se.attribList[Xt],Rt=It[0],Vt=It[1],$t=be(Rt,!0),ue=$t.prefix,me=$t.local,Le=ue===""?"":Kt.ns[ue]||"",Ne={name:Rt,value:Vt,prefix:ue,local:me,uri:Le};ue&&ue!=="xmlns"&&!Le&&(ye(Se,"Unbound namespace prefix: "+JSON.stringify(ue)),Ne.uri=ue),Se.tag.attributes[Rt]=Ne,se(Se,"onattribute",Ne)}Se.attribList.length=0}Se.tag.isSelfClosing=!!re,Se.sawRoot=!0,Se.tags.push(Se.tag),se(Se,"onopentag",Se.tag),re||(!Se.noscript&&Se.tagName.toLowerCase()==="script"?Se.state=Ut.SCRIPT:Se.state=Ut.TEXT,Se.tag=null,Se.tagName=""),Se.attribName=Se.attribValue="",Se.attribList.length=0}function he(Se){if(!Se.tagName){ye(Se,"Weird empty close tag."),Se.textNode+="</>",Se.state=Ut.TEXT;return}if(Se.script){if(Se.tagName!=="script"){Se.script+="</"+Se.tagName+">",Se.tagName="",Se.state=Ut.SCRIPT;return}se(Se,"onscript",Se.script),Se.script=""}var re=Se.tags.length,Kt=Se.tagName;Se.strict||(Kt=Kt[Se.looseCase]());for(var wt=Kt;re--;){var Lt=Se.tags[re];if(Lt.name!==wt)ye(Se,"Unexpected close tag");else break}if(re<0){ye(Se,"Unmatched closing tag: "+Se.tagName),Se.textNode+="</"+Se.tagName+">",Se.state=Ut.TEXT;return}Se.tagName=Kt;for(var Xt=Se.tags.length;Xt-- >re;){var ne=Se.tag=Se.tags.pop();Se.tagName=Se.tag.name,se(Se,"onclosetag",Se.tagName);var It={};for(var Rt in ne.ns)It[Rt]=ne.ns[Rt];var Vt=Se.tags[Se.tags.length-1]||Se;Se.opt.xmlns&&ne.ns!==Vt.ns&&Object.keys(ne.ns).forEach(function($t){var ue=ne.ns[$t];se(Se,"onclosenamespace",{prefix:$t,uri:ue})})}re===0&&(Se.closedRoot=!0),Se.tagName=Se.attribValue=Se.attribName="",Se.attribList.length=0,Se.state=Ut.TEXT}function Ce(Se){var re=Se.entity,Kt=re.toLowerCase(),wt,Lt="";return Se.ENTITIES[re]?Se.ENTITIES[re]:Se.ENTITIES[Kt]?Se.ENTITIES[Kt]:(re=Kt,re.charAt(0)==="#"&&(re.charAt(1)==="x"?(re=re.slice(2),wt=parseInt(re,16),Lt=wt.toString(16)):(re=re.slice(1),wt=parseInt(re,10),Lt=wt.toString(10))),re=re.replace(/^0+/,""),isNaN(wt)||Lt.toLowerCase()!==re?(ye(Se,"Invalid character entity"),"&"+Se.entity+";"):String.fromCodePoint(wt))}function de(Se,re){re==="<"?(Se.state=Ut.OPEN_WAKA,Se.startTagPosition=Se.position):jt(re)||(ye(Se,"Non-whitespace before first tag."),Se.textNode=re,Se.state=Ut.TEXT)}function Fe(Se,re){var Kt="";return re<Se.length&&(Kt=Se.charAt(re)),Kt}function ge(Se){var re=this;if(this.error)throw this.error;if(re.closed)return Yt(re,"Cannot write after close. Assign an onready handler.");if(Se===null)return ee(re);typeof Se=="object"&&(Se=Se.toString());for(var Kt=0,wt="";wt=Fe(Se,Kt++),re.c=wt,!!wt;)switch(re.trackPosition&&(re.position++,wt===`
|
|
`?(re.line++,re.column=0):re.column++),re.state){case Ut.BEGIN:if(re.state=Ut.BEGIN_WHITESPACE,wt==="\uFEFF")continue;de(re,wt);continue;case Ut.BEGIN_WHITESPACE:de(re,wt);continue;case Ut.TEXT:if(re.sawRoot&&!re.closedRoot){for(var Lt=Kt-1;wt&&wt!=="<"&&wt!=="&";)wt=Fe(Se,Kt++),wt&&re.trackPosition&&(re.position++,wt===`
|
|
`?(re.line++,re.column=0):re.column++);re.textNode+=Se.substring(Lt,Kt-1)}wt==="<"&&!(re.sawRoot&&re.closedRoot&&!re.strict)?(re.state=Ut.OPEN_WAKA,re.startTagPosition=re.position):(!jt(wt)&&(!re.sawRoot||re.closedRoot)&&ye(re,"Text data outside of root node."),wt==="&"?re.state=Ut.TEXT_ENTITY:re.textNode+=wt);continue;case Ut.SCRIPT:wt==="<"?re.state=Ut.SCRIPT_ENDING:re.script+=wt;continue;case Ut.SCRIPT_ENDING:wt==="/"?re.state=Ut.CLOSE_TAG:(re.script+="<"+wt,re.state=Ut.SCRIPT);continue;case Ut.OPEN_WAKA:if(wt==="!")re.state=Ut.SGML_DECL,re.sgmlDecl="";else if(!jt(wt))if(Wt(Pt,wt))re.state=Ut.OPEN_TAG,re.tagName=wt;else if(wt==="/")re.state=Ut.CLOSE_TAG,re.tagName="";else if(wt==="?")re.state=Ut.PROC_INST,re.procInstName=re.procInstBody="";else{if(ye(re,"Unencoded <"),re.startTagPosition+1<re.position){var Xt=re.position-re.startTagPosition;wt=new Array(Xt).join(" ")+wt}re.textNode+="<"+wt,re.state=Ut.TEXT}continue;case Ut.SGML_DECL:(re.sgmlDecl+wt).toUpperCase()===at?(se(re,"onopencdata"),re.state=Ut.CDATA,re.sgmlDecl="",re.cdata=""):re.sgmlDecl+wt==="--"?(re.state=Ut.COMMENT,re.comment="",re.sgmlDecl=""):(re.sgmlDecl+wt).toUpperCase()===it?(re.state=Ut.DOCTYPE,(re.doctype||re.sawRoot)&&ye(re,"Inappropriately located doctype declaration"),re.doctype="",re.sgmlDecl=""):wt===">"?(se(re,"onsgmldeclaration",re.sgmlDecl),re.sgmlDecl="",re.state=Ut.TEXT):(Nt(wt)&&(re.state=Ut.SGML_DECL_QUOTED),re.sgmlDecl+=wt);continue;case Ut.SGML_DECL_QUOTED:wt===re.q&&(re.state=Ut.SGML_DECL,re.q=""),re.sgmlDecl+=wt;continue;case Ut.DOCTYPE:wt===">"?(re.state=Ut.TEXT,se(re,"ondoctype",re.doctype),re.doctype=!0):(re.doctype+=wt,wt==="["?re.state=Ut.DOCTYPE_DTD:Nt(wt)&&(re.state=Ut.DOCTYPE_QUOTED,re.q=wt));continue;case Ut.DOCTYPE_QUOTED:re.doctype+=wt,wt===re.q&&(re.q="",re.state=Ut.DOCTYPE);continue;case Ut.DOCTYPE_DTD:re.doctype+=wt,wt==="]"?re.state=Ut.DOCTYPE:Nt(wt)&&(re.state=Ut.DOCTYPE_DTD_QUOTED,re.q=wt);continue;case Ut.DOCTYPE_DTD_QUOTED:re.doctype+=wt,wt===re.q&&(re.state=Ut.DOCTYPE_DTD,re.q="");continue;case Ut.COMMENT:wt==="-"?re.state=Ut.COMMENT_ENDING:re.comment+=wt;continue;case Ut.COMMENT_ENDING:wt==="-"?(re.state=Ut.COMMENT_ENDED,re.comment=Pe(re.opt,re.comment),re.comment&&se(re,"oncomment",re.comment),re.comment=""):(re.comment+="-"+wt,re.state=Ut.COMMENT);continue;case Ut.COMMENT_ENDED:wt!==">"?(ye(re,"Malformed comment"),re.comment+="--"+wt,re.state=Ut.COMMENT):re.state=Ut.TEXT;continue;case Ut.CDATA:wt==="]"?re.state=Ut.CDATA_ENDING:re.cdata+=wt;continue;case Ut.CDATA_ENDING:wt==="]"?re.state=Ut.CDATA_ENDING_2:(re.cdata+="]"+wt,re.state=Ut.CDATA);continue;case Ut.CDATA_ENDING_2:wt===">"?(re.cdata&&se(re,"oncdata",re.cdata),se(re,"onclosecdata"),re.cdata="",re.state=Ut.TEXT):wt==="]"?re.cdata+="]":(re.cdata+="]]"+wt,re.state=Ut.CDATA);continue;case Ut.PROC_INST:wt==="?"?re.state=Ut.PROC_INST_ENDING:jt(wt)?re.state=Ut.PROC_INST_BODY:re.procInstName+=wt;continue;case Ut.PROC_INST_BODY:if(!re.procInstBody&&jt(wt))continue;wt==="?"?re.state=Ut.PROC_INST_ENDING:re.procInstBody+=wt;continue;case Ut.PROC_INST_ENDING:wt===">"?(se(re,"onprocessinginstruction",{name:re.procInstName,body:re.procInstBody}),re.procInstName=re.procInstBody="",re.state=Ut.TEXT):(re.procInstBody+="?"+wt,re.state=Ut.PROC_INST_BODY);continue;case Ut.OPEN_TAG:Wt(At,wt)?re.tagName+=wt:(xe(re),wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:(jt(wt)||ye(re,"Invalid character in tag name"),re.state=Ut.ATTRIB));continue;case Ut.OPEN_TAG_SLASH:wt===">"?(pe(re,!0),he(re)):(ye(re,"Forward-slash in opening tag not followed by >"),re.state=Ut.ATTRIB);continue;case Ut.ATTRIB:if(jt(wt))continue;wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:Wt(Pt,wt)?(re.attribName=wt,re.attribValue="",re.state=Ut.ATTRIB_NAME):ye(re,"Invalid attribute name");continue;case Ut.ATTRIB_NAME:wt==="="?re.state=Ut.ATTRIB_VALUE:wt===">"?(ye(re,"Attribute without value"),re.attribValue=re.attribName,ce(re),pe(re)):jt(wt)?re.state=Ut.ATTRIB_NAME_SAW_WHITE:Wt(At,wt)?re.attribName+=wt:ye(re,"Invalid attribute name");continue;case Ut.ATTRIB_NAME_SAW_WHITE:if(wt==="=")re.state=Ut.ATTRIB_VALUE;else{if(jt(wt))continue;ye(re,"Attribute without value"),re.tag.attributes[re.attribName]="",re.attribValue="",se(re,"onattribute",{name:re.attribName,value:""}),re.attribName="",wt===">"?pe(re):Wt(Pt,wt)?(re.attribName=wt,re.state=Ut.ATTRIB_NAME):(ye(re,"Invalid attribute name"),re.state=Ut.ATTRIB)}continue;case Ut.ATTRIB_VALUE:if(jt(wt))continue;Nt(wt)?(re.q=wt,re.state=Ut.ATTRIB_VALUE_QUOTED):(ye(re,"Unquoted attribute value"),re.state=Ut.ATTRIB_VALUE_UNQUOTED,re.attribValue=wt);continue;case Ut.ATTRIB_VALUE_QUOTED:if(wt!==re.q){wt==="&"?re.state=Ut.ATTRIB_VALUE_ENTITY_Q:re.attribValue+=wt;continue}ce(re),re.q="",re.state=Ut.ATTRIB_VALUE_CLOSED;continue;case Ut.ATTRIB_VALUE_CLOSED:jt(wt)?re.state=Ut.ATTRIB:wt===">"?pe(re):wt==="/"?re.state=Ut.OPEN_TAG_SLASH:Wt(Pt,wt)?(ye(re,"No whitespace between attributes"),re.attribName=wt,re.attribValue="",re.state=Ut.ATTRIB_NAME):ye(re,"Invalid attribute name");continue;case Ut.ATTRIB_VALUE_UNQUOTED:if(!Gt(wt)){wt==="&"?re.state=Ut.ATTRIB_VALUE_ENTITY_U:re.attribValue+=wt;continue}ce(re),wt===">"?pe(re):re.state=Ut.ATTRIB;continue;case Ut.CLOSE_TAG:if(re.tagName)wt===">"?he(re):Wt(At,wt)?re.tagName+=wt:re.script?(re.script+="</"+re.tagName,re.tagName="",re.state=Ut.SCRIPT):(jt(wt)||ye(re,"Invalid tagname in closing tag"),re.state=Ut.CLOSE_TAG_SAW_WHITE);else{if(jt(wt))continue;Jt(Pt,wt)?re.script?(re.script+="</"+wt,re.state=Ut.SCRIPT):ye(re,"Invalid tagname in closing tag."):re.tagName=wt}continue;case Ut.CLOSE_TAG_SAW_WHITE:if(jt(wt))continue;wt===">"?he(re):ye(re,"Invalid characters in closing tag");continue;case Ut.TEXT_ENTITY:case Ut.ATTRIB_VALUE_ENTITY_Q:case Ut.ATTRIB_VALUE_ENTITY_U:var ne,It;switch(re.state){case Ut.TEXT_ENTITY:ne=Ut.TEXT,It="textNode";break;case Ut.ATTRIB_VALUE_ENTITY_Q:ne=Ut.ATTRIB_VALUE_QUOTED,It="attribValue";break;case Ut.ATTRIB_VALUE_ENTITY_U:ne=Ut.ATTRIB_VALUE_UNQUOTED,It="attribValue";break}wt===";"?(re[It]+=Ce(re),re.entity="",re.state=ne):Wt(re.entity.length?Ft:Dt,wt)?re.entity+=wt:(ye(re,"Invalid character in entity name"),re[It]+="&"+re.entity+wt,re.entity="",re.state=ne);continue;default:throw new Error(re,"Unknown state: "+re.state)}return re.position>=re.bufferCheckPosition&&St(re),re}String.fromCodePoint||function(){var Se=String.fromCharCode,re=Math.floor,Kt=function(){var wt=16384,Lt=[],Xt,ne,It=-1,Rt=arguments.length;if(!Rt)return"";for(var Vt="";++It<Rt;){var $t=Number(arguments[It]);if(!isFinite($t)||$t<0||$t>1114111||re($t)!==$t)throw RangeError("Invalid code point: "+$t);$t<=65535?Lt.push($t):($t-=65536,Xt=($t>>10)+55296,ne=$t%1024+56320,Lt.push(Xt,ne)),(It+1===Rt||Lt.length>wt)&&(Vt+=Se.apply(null,Lt),Lt.length=0)}return Vt};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,_t,Bt){_t.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(bt,St){var Tt=this;function mt(lt){bt.writable&&bt.write(lt)===!1&&Tt.pause&&Tt.pause()}Tt.on("data",mt);function xt(){Tt.readable&&Tt.resume&&Tt.resume()}bt.on("drain",xt),!bt._isStdio&&(!St||St.end!==!1)&&(Tt.on("end",z),Tt.on("close",tt));var ft=!1;function z(){ft||(ft=!0,bt.end())}function tt(){ft||(ft=!0,typeof bt.destroy=="function"&&bt.destroy())}function at(lt){if(it(),vt.listenerCount(this,"error")===0)throw lt}Tt.on("error",at),bt.on("error",at);function it(){Tt.removeListener("data",mt),bt.removeListener("drain",xt),Tt.removeListener("end",z),Tt.removeListener("close",tt),Tt.removeListener("error",at),bt.removeListener("error",at),Tt.removeListener("end",it),Tt.removeListener("close",it),bt.removeListener("close",it)}return Tt.on("end",it),Tt.on("close",it),bt.on("close",it),bt.emit("pipe",Tt),bt}},{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,_t,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,Pt){return it.call(this,tt(ut,dt,Pt))||this}return lt}(z);at.prototype.name=z.name,at.prototype.code=xt,gt[xt]=at}function bt(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 St(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"&&St(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(bt(ft,"type"));else{var it=mt(xt,".")?"property":"argument";at='The "'.concat(xt,'" ').concat(it," ").concat(tt," ").concat(bt(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"),_t.exports.codes=gt},{}],400:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=Object.keys||function(tt){var at=[];for(var it in tt)at.push(it);return at};_t.exports=xt;var kt=ot("./_stream_readable"),bt=ot("./_stream_writable");ot("inherits")(xt,kt);for(var St=gt(bt.prototype),Tt=0;Tt<St.length;Tt++){var mt=St[Tt];xt.prototype[mt]||(xt.prototype[mt]=bt.prototype[mt])}function xt(tt){if(!(this instanceof xt))return new xt(tt);kt.call(this,tt),bt.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,_t,Bt){"use strict";_t.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,bt,St){St(null,kt)}},{"./_stream_transform":403,inherits:364}],402:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";_t.exports=se;var kt;se.ReadableState=oe;var bt=ot("events").EventEmitter,St=function(Rt,Vt){return Rt.listeners(Vt).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,Pt=ot("../errors").codes,At=Pt.ERR_INVALID_ARG_TYPE,Dt=Pt.ERR_STREAM_PUSH_AFTER_EOF,Ft=Pt.ERR_METHOD_NOT_IMPLEMENTED,jt=Pt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Nt,Gt,Wt;ot("inherits")(se,Tt);var Jt=lt.errorOrDestroy,Ut=["error","close","destroy","pause","resume"];function Ht(It,Rt,Vt){if(typeof It.prependListener=="function")return It.prependListener(Rt,Vt);!It._events||!It._events[Rt]?It.on(Rt,Vt):Array.isArray(It._events[Rt])?It._events[Rt].unshift(Vt):It._events[Rt]=[Vt,It._events[Rt]]}function oe(It,Rt,Vt){kt=kt||ot("./_stream_duplex"),It=It||{},typeof Vt!="boolean"&&(Vt=Rt instanceof kt),this.objectMode=!!It.objectMode,Vt&&(this.objectMode=this.objectMode||!!It.readableObjectMode),this.highWaterMark=dt(this,It,"readableHighWaterMark",Vt),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 Vt=this._readableState,$t;return Vt.objectMode?$t=!0:typeof It=="string"&&(Rt=Rt||Vt.defaultEncoding,Rt!==Vt.encoding&&(It=mt.from(It,Rt),Rt=""),$t=!0),fe(this,It,Rt,!1,$t)},se.prototype.unshift=function(It){return fe(this,It,null,!0,!1)};function fe(It,Rt,Vt,$t,ue){at("readableAddChunk",Rt);var me=It._readableState;if(Rt===null)me.reading=!1,be(It,me);else{var Le;if(ue||(Le=Yt(me,Rt)),Le)Jt(It,Le);else if(me.objectMode||Rt&&Rt.length>0)if(typeof Rt!="string"&&!me.objectMode&&Object.getPrototypeOf(Rt)!==mt.prototype&&(Rt=ft(Rt)),$t)me.endEmitted?Jt(It,new jt):Pe(It,me,Rt,!0);else if(me.ended)Jt(It,new Dt);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Vt?(Rt=me.decoder.write(Rt),me.objectMode||Rt.length!==0?Pe(It,me,Rt,!1):he(It,me)):Pe(It,me,Rt,!1)}else $t||(me.reading=!1,he(It,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function Pe(It,Rt,Vt,$t){Rt.flowing&&Rt.length===0&&!Rt.sync?(Rt.awaitDrain=0,It.emit("data",Vt)):(Rt.length+=Rt.objectMode?1:Vt.length,$t?Rt.buffer.unshift(Vt):Rt.buffer.push(Vt),Rt.needReadable&&ce(It)),he(It,Rt)}function Yt(It,Rt){var Vt;return!z(Rt)&&typeof Rt!="string"&&Rt!==void 0&&!It.objectMode&&(Vt=new At("chunk",["string","Buffer","Uint8Array"],Rt)),Vt}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 Vt=this._readableState.buffer.head,$t="";Vt!==null;)$t+=Rt.write(Vt.data),Vt=Vt.next;return this._readableState.buffer.clear(),$t!==""&&this._readableState.buffer.push($t),this._readableState.length=$t.length,this};var ee=1073741824;function ye(It){return It>=ee?It=ee:(It--,It|=It>>>1,It|=It>>>2,It|=It>>>4,It|=It>>>8,It|=It>>>16,It++),It}function xe(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=ye(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,Vt=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=xe(It,Rt),It===0&&Rt.ended)return Rt.length===0&&Lt(this),null;var $t=Rt.needReadable;at("need readable",$t),(Rt.length===0||Rt.length-It<Rt.highWaterMark)&&($t=!0,at("length less than watermark",$t)),Rt.ended||Rt.reading?($t=!1,at("reading or ended",$t)):$t&&(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=xe(Vt,Rt)));var ue;return It>0?ue=wt(It,Rt):ue=null,ue===null?(Rt.needReadable=Rt.length<=Rt.highWaterMark,It=0):(Rt.length-=It,Rt.awaitDrain=0),Rt.length===0&&(Rt.ended||(Rt.needReadable=!0),Vt!==It&&Rt.ended&&Lt(this)),ue!==null&&this.emit("data",ue),ue};function be(It,Rt){if(at("onEofChunk"),!Rt.ended){if(Rt.decoder){var Vt=Rt.decoder.end();Vt&&Vt.length&&(Rt.buffer.push(Vt),Rt.length+=Rt.objectMode?1:Vt.length)}Rt.ended=!0,Rt.sync?ce(It):(Rt.needReadable=!1,Rt.emittedReadable||(Rt.emittedReadable=!0,pe(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(pe,It))}function pe(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 he(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 Vt=Rt.length;if(at("maybeReadMore read 0"),It.read(0),Vt===Rt.length)break}Rt.readingMore=!1}se.prototype._read=function(It){Jt(this,new Ft("_read()"))},se.prototype.pipe=function(It,Rt){var Vt=this,$t=this._readableState;switch($t.pipesCount){case 0:$t.pipes=It;break;case 1:$t.pipes=[$t.pipes,It];break;default:$t.pipes.push(It);break}$t.pipesCount+=1,at("pipe count=%d opts=%j",$t.pipesCount,Rt);var ue=(!Rt||Rt.end!==!1)&&It!==vt.stdout&&It!==vt.stderr,me=ue?Ne:Ke;$t.endEmitted?vt.nextTick(me):Vt.once("end",me),It.on("unpipe",Le);function Le(rn,an){at("onunpipe"),rn===Vt&&an&&an.hasUnpiped===!1&&(an.hasUnpiped=!0,Qe())}function Ne(){at("onend"),It.end()}var Be=de(Vt);It.on("drain",Be);var Xe=!1;function Qe(){at("cleanup"),It.removeListener("close",Ue),It.removeListener("finish",We),It.removeListener("drain",Be),It.removeListener("error",He),It.removeListener("unpipe",Le),Vt.removeListener("end",Ne),Vt.removeListener("end",Ke),Vt.removeListener("data",qe),Xe=!0,$t.awaitDrain&&(!It._writableState||It._writableState.needDrain)&&Be()}Vt.on("data",qe);function qe(rn){at("ondata");var an=It.write(rn);at("dest.write",an),an===!1&&(($t.pipesCount===1&&$t.pipes===It||$t.pipesCount>1&&ne($t.pipes,It)!==-1)&&!Xe&&(at("false write response, pause",$t.awaitDrain),$t.awaitDrain++),Vt.pause())}function He(rn){at("onerror",rn),Ke(),It.removeListener("error",He),St(It,"error")===0&&Jt(It,rn)}Ht(It,"error",He);function Ue(){It.removeListener("finish",We),Ke()}It.once("close",Ue);function We(){at("onfinish"),It.removeListener("close",Ue),Ke()}It.once("finish",We);function Ke(){at("unpipe"),Vt.unpipe(It)}return It.emit("pipe",Vt),$t.flowing||(at("pipe resume"),Vt.resume()),It};function de(It){return function(){var Vt=It._readableState;at("pipeOnDrain",Vt.awaitDrain),Vt.awaitDrain&&Vt.awaitDrain--,Vt.awaitDrain===0&&St(It,"data")&&(Vt.flowing=!0,Kt(It))}}se.prototype.unpipe=function(It){var Rt=this._readableState,Vt={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,Vt),this);if(!It){var $t=Rt.pipes,ue=Rt.pipesCount;Rt.pipes=null,Rt.pipesCount=0,Rt.flowing=!1;for(var me=0;me<ue;me++)$t[me].emit("unpipe",this,{hasUnpiped:!1});return this}var Le=ne(Rt.pipes,It);return Le===-1?this:(Rt.pipes.splice(Le,1),Rt.pipesCount-=1,Rt.pipesCount===1&&(Rt.pipes=Rt.pipes[0]),It.emit("unpipe",this,Vt),this)},se.prototype.on=function(It,Rt){var Vt=Tt.prototype.on.call(this,It,Rt),$t=this._readableState;return It==="data"?($t.readableListening=this.listenerCount("readable")>0,$t.flowing!==!1&&this.resume()):It==="readable"&&!$t.endEmitted&&!$t.readableListening&&($t.readableListening=$t.needReadable=!0,$t.flowing=!1,$t.emittedReadable=!1,at("on readable",$t.length,$t.reading),$t.length?ce(this):$t.reading||vt.nextTick(ge,this)),Vt},se.prototype.addListener=se.prototype.on,se.prototype.removeListener=function(It,Rt){var Vt=Tt.prototype.removeListener.call(this,It,Rt);return It==="readable"&&vt.nextTick(Fe,this),Vt},se.prototype.removeAllListeners=function(It){var Rt=Tt.prototype.removeAllListeners.apply(this,arguments);return(It==="readable"||It===void 0)&&vt.nextTick(Fe,this),Rt};function Fe(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 ge(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,Se(this,It)),It.paused=!1,this};function Se(It,Rt){Rt.resumeScheduled||(Rt.resumeScheduled=!0,vt.nextTick(re,It,Rt))}function re(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,Vt=this._readableState,$t=!1;It.on("end",function(){if(at("wrapped end"),Vt.decoder&&!Vt.ended){var Le=Vt.decoder.end();Le&&Le.length&&Rt.push(Le)}Rt.push(null)}),It.on("data",function(Le){if(at("wrapped data"),Vt.decoder&&(Le=Vt.decoder.write(Le)),!(Vt.objectMode&&Le==null)&&!(!Vt.objectMode&&(!Le||!Le.length))){var Ne=Rt.push(Le);Ne||($t=!0,It.pause())}});for(var ue in It)this[ue]===void 0&&typeof It[ue]=="function"&&(this[ue]=function(Ne){return function(){return It[Ne].apply(It,arguments)}}(ue));for(var me=0;me<Ut.length;me++)It.on(Ut[me],this.emit.bind(this,Ut[me]));return this._read=function(Le){at("wrapped _read",Le),$t&&($t=!1,It.resume())},this},typeof Symbol=="function"&&(se.prototype[Symbol.asyncIterator]=function(){return Gt===void 0&&(Gt=ot("./internal/streams/async_iterator")),Gt(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 Vt;return Rt.objectMode?Vt=Rt.buffer.shift():!It||It>=Rt.length?(Rt.decoder?Vt=Rt.buffer.join(""):Rt.buffer.length===1?Vt=Rt.buffer.first():Vt=Rt.buffer.concat(Rt.length),Rt.buffer.clear()):Vt=Rt.buffer.consume(It,Rt.decoder),Vt}function Lt(It){var Rt=It._readableState;at("endReadable",Rt.endEmitted),Rt.endEmitted||(Rt.ended=!0,vt.nextTick(Xt,Rt,It))}function Xt(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 Vt=Rt._writableState;(!Vt||Vt.autoDestroy&&Vt.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 ne(It,Rt){for(var Vt=0,$t=It.length;Vt<$t;Vt++)if(It[Vt]===Rt)return Vt;return-1}}).call(this)}).call(this,ot("_process"),typeof cn!="undefined"?cn: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,_t,Bt){"use strict";_t.exports=xt;var vt=ot("../errors").codes,gt=vt.ERR_METHOD_NOT_IMPLEMENTED,kt=vt.ERR_MULTIPLE_CALLBACK,bt=vt.ERR_TRANSFORM_ALREADY_TRANSFORMING,St=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 St;if(tt._transformState.transforming)throw new bt;return tt.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ot,_t,Bt){(function(vt,gt){(function(){"use strict";_t.exports=oe;function kt(Kt,wt,Lt){this.chunk=Kt,this.encoding=wt,this.callback=Lt,this.next=null}function bt(Kt){var wt=this;this.next=null,this.entry=null,this.finish=function(){re(wt,Kt)}}var St;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,Pt=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,Gt=ut.ERR_UNKNOWN_ENCODING,Wt=at.errorOrDestroy;ot("inherits")(oe,mt);function Jt(){}function Ut(Kt,wt,Lt){St=St||ot("./_stream_duplex"),Kt=Kt||{},typeof Lt!="boolean"&&(Lt=wt instanceof St),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 Xt=Kt.decodeStrings===!1;this.decodeStrings=!Xt,this.defaultEncoding=Kt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){be(wt,ne)},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 bt(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 Ht;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ht=Function.prototype[Symbol.hasInstance],Object.defineProperty(oe,Symbol.hasInstance,{value:function(wt){return Ht.call(this,wt)?!0:this!==oe?!1:wt&&wt._writableState instanceof Ut}})):Ht=function(wt){return wt instanceof this};function oe(Kt){St=St||ot("./_stream_duplex");var wt=this instanceof St;if(!wt&&!Ht.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 fe(Kt,wt,Lt,Xt){var ne;return Lt===null?ne=new jt:typeof Lt!="string"&&!wt.objectMode&&(ne=new dt("chunk",["string","Buffer"],Lt)),ne?(Wt(Kt,ne),vt.nextTick(Xt,ne),!1):!0}oe.prototype.write=function(Kt,wt,Lt){var Xt=this._writableState,ne=!1,It=!Xt.objectMode&&tt(Kt);return It&&!xt.isBuffer(Kt)&&(Kt=z(Kt)),typeof wt=="function"&&(Lt=wt,wt=null),It?wt="buffer":wt||(wt=Xt.defaultEncoding),typeof Lt!="function"&&(Lt=Jt),Xt.ending?se(this,Lt):(It||fe(this,Xt,Kt,Lt))&&(Xt.pendingcb++,ne=Yt(this,Xt,It,Kt,wt,Lt)),ne},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&&he(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 Gt(wt);return this._writableState.defaultEncoding=wt,this},Object.defineProperty(oe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Pe(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,Xt,ne,It){if(!Lt){var Rt=Pe(wt,Xt,ne);Xt!==Rt&&(Lt=!0,ne="buffer",Xt=Rt)}var Vt=wt.objectMode?1:Xt.length;wt.length+=Vt;var $t=wt.length<wt.highWaterMark;if($t||(wt.needDrain=!0),wt.writing||wt.corked){var ue=wt.lastBufferedRequest;wt.lastBufferedRequest={chunk:Xt,encoding:ne,isBuf:Lt,callback:It,next:null},ue?ue.next=wt.lastBufferedRequest:wt.bufferedRequest=wt.lastBufferedRequest,wt.bufferedRequestCount+=1}else ee(Kt,wt,!1,Vt,Xt,ne,It);return $t}function ee(Kt,wt,Lt,Xt,ne,It,Rt){wt.writelen=Xt,wt.writecb=Rt,wt.writing=!0,wt.sync=!0,wt.destroyed?wt.onwrite(new Ft("write")):Lt?Kt._writev(ne,wt.onwrite):Kt._write(ne,It,wt.onwrite),wt.sync=!1}function ye(Kt,wt,Lt,Xt,ne){--wt.pendingcb,Lt?(vt.nextTick(ne,Xt),vt.nextTick(ge,Kt,wt),Kt._writableState.errorEmitted=!0,Wt(Kt,Xt)):(ne(Xt),Kt._writableState.errorEmitted=!0,Wt(Kt,Xt),ge(Kt,wt))}function xe(Kt){Kt.writing=!1,Kt.writecb=null,Kt.length-=Kt.writelen,Kt.writelen=0}function be(Kt,wt){var Lt=Kt._writableState,Xt=Lt.sync,ne=Lt.writecb;if(typeof ne!="function")throw new At;if(xe(Lt),wt)ye(Kt,Lt,Xt,wt,ne);else{var It=Ce(Lt)||Kt.destroyed;!It&&!Lt.corked&&!Lt.bufferProcessing&&Lt.bufferedRequest&&he(Kt,Lt),Xt?vt.nextTick(ce,Kt,Lt,It,ne):ce(Kt,Lt,It,ne)}}function ce(Kt,wt,Lt,Xt){Lt||pe(Kt,wt),wt.pendingcb--,Xt(),ge(Kt,wt)}function pe(Kt,wt){wt.length===0&&wt.needDrain&&(wt.needDrain=!1,Kt.emit("drain"))}function he(Kt,wt){wt.bufferProcessing=!0;var Lt=wt.bufferedRequest;if(Kt._writev&&Lt&&Lt.next){var Xt=wt.bufferedRequestCount,ne=new Array(Xt),It=wt.corkedRequestsFree;It.entry=Lt;for(var Rt=0,Vt=!0;Lt;)ne[Rt]=Lt,Lt.isBuf||(Vt=!1),Lt=Lt.next,Rt+=1;ne.allBuffers=Vt,ee(Kt,wt,!0,wt.length,ne,"",It.finish),wt.pendingcb++,wt.lastBufferedRequest=null,It.next?(wt.corkedRequestsFree=It.next,It.next=null):wt.corkedRequestsFree=new bt(wt),wt.bufferedRequestCount=0}else{for(;Lt;){var $t=Lt.chunk,ue=Lt.encoding,me=Lt.callback,Le=wt.objectMode?1:$t.length;if(ee(Kt,wt,!1,Le,$t,ue,me),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 Pt("_write()"))},oe.prototype._writev=null,oe.prototype.end=function(Kt,wt,Lt){var Xt=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),Xt.corked&&(Xt.corked=1,this.uncork()),Xt.ending||Se(this,Xt,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 de(Kt,wt){Kt._final(function(Lt){wt.pendingcb--,Lt&&Wt(Kt,Lt),wt.prefinished=!0,Kt.emit("prefinish"),ge(Kt,wt)})}function Fe(Kt,wt){!wt.prefinished&&!wt.finalCalled&&(typeof Kt._final=="function"&&!wt.destroyed?(wt.pendingcb++,wt.finalCalled=!0,vt.nextTick(de,Kt,wt)):(wt.prefinished=!0,Kt.emit("prefinish")))}function ge(Kt,wt){var Lt=Ce(wt);if(Lt&&(Fe(Kt,wt),wt.pendingcb===0&&(wt.finished=!0,Kt.emit("finish"),wt.autoDestroy))){var Xt=Kt._readableState;(!Xt||Xt.autoDestroy&&Xt.endEmitted)&&Kt.destroy()}return Lt}function Se(Kt,wt,Lt){wt.ending=!0,ge(Kt,wt),Lt&&(wt.finished?vt.nextTick(Lt):Kt.once("finish",Lt)),wt.ended=!0,Kt.writable=!1}function re(Kt,wt,Lt){var Xt=Kt.entry;for(Kt.entry=null;Xt;){var ne=Xt.callback;wt.pendingcb--,ne(Lt),Xt=Xt.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 cn!="undefined"?cn: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,_t,Bt){(function(vt){(function(){"use strict";var gt;function kt(jt,Nt,Gt){return Nt=bt(Nt),Nt in jt?Object.defineProperty(jt,Nt,{value:Gt,enumerable:!0,configurable:!0,writable:!0}):jt[Nt]=Gt,jt}function bt(jt){var Nt=St(jt,"string");return typeof Nt=="symbol"?Nt:String(Nt)}function St(jt,Nt){if(typeof jt!="object"||jt===null)return jt;var Gt=jt[Symbol.toPrimitive];if(Gt!==void 0){var Wt=Gt.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 Gt=jt[it].read();Gt!==null&&(jt[tt]=null,jt[mt]=null,jt[xt]=null,Nt(lt(Gt,!1)))}}function dt(jt){vt.nextTick(ut,jt)}function Pt(jt,Nt){return function(Gt,Wt){jt.then(function(){if(Nt[z]){Gt(lt(void 0,!0));return}Nt[at](Gt,Wt)},Wt)}}var At=Object.getPrototypeOf(function(){}),Dt=Object.setPrototypeOf((gt={get stream(){return this[it]},next:function(){var Nt=this,Gt=this[ft];if(Gt!==null)return Promise.reject(Gt);if(this[z])return Promise.resolve(lt(void 0,!0));if(this[it].destroyed)return new Promise(function(Ht,oe){vt.nextTick(function(){Nt[ft]?oe(Nt[ft]):Ht(lt(void 0,!0))})});var Wt=this[tt],Jt;if(Wt)Jt=new Promise(Pt(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(Gt,Wt){Nt[it].destroy(null,function(Jt){if(Jt){Wt(Jt);return}Gt(lt(void 0,!0))})})}),gt),At),Ft=function(Nt){var Gt,Wt=Object.create(Dt,(Gt={},kt(Gt,it,{value:Nt,writable:!0}),kt(Gt,mt,{value:null,writable:!0}),kt(Gt,xt,{value:null,writable:!0}),kt(Gt,ft,{value:null,writable:!0}),kt(Gt,z,{value:Nt._readableState.endEmitted,writable:!0}),kt(Gt,at,{value:function(Ut,Ht){var oe=Wt[it].read();oe?(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ut(lt(oe,!1))):(Wt[mt]=Ut,Wt[xt]=Ht)},writable:!0}),Gt));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 Ht=Wt[mt];Ht!==null&&(Wt[tt]=null,Wt[mt]=null,Wt[xt]=null,Ht(lt(void 0,!0))),Wt[z]=!0}),Nt.on("readable",dt.bind(null,Wt)),Wt};_t.exports=Ft}).call(this)}).call(this,ot("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ot,_t,Bt){"use strict";function vt(ut,dt){var Pt=Object.keys(ut);if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(ut);dt&&(At=At.filter(function(Dt){return Object.getOwnPropertyDescriptor(ut,Dt).enumerable})),Pt.push.apply(Pt,At)}return Pt}function gt(ut){for(var dt=1;dt<arguments.length;dt++){var Pt=arguments[dt]!=null?arguments[dt]:{};dt%2?vt(Object(Pt),!0).forEach(function(At){kt(ut,At,Pt[At])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(Pt)):vt(Object(Pt)).forEach(function(At){Object.defineProperty(ut,At,Object.getOwnPropertyDescriptor(Pt,At))})}return ut}function kt(ut,dt,Pt){return dt=mt(dt),dt in ut?Object.defineProperty(ut,dt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}):ut[dt]=Pt,ut}function bt(ut,dt){if(!(ut instanceof dt))throw new TypeError("Cannot call a class as a function")}function St(ut,dt){for(var Pt=0;Pt<dt.length;Pt++){var At=dt[Pt];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,Pt){return dt&&St(ut.prototype,dt),Pt&&St(ut,Pt),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 Pt=ut[Symbol.toPrimitive];if(Pt!==void 0){var At=Pt.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,Pt){z.prototype.copy.call(ut,dt,Pt)}_t.exports=function(){function ut(){bt(this,ut),this.head=null,this.tail=null,this.length=0}return Tt(ut,[{key:"push",value:function(Pt){var At={data:Pt,next:null};this.length>0?this.tail.next=At:this.head=At,this.tail=At,++this.length}},{key:"unshift",value:function(Pt){var At={data:Pt,next:this.head};this.length===0&&(this.tail=At),this.head=At,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Pt=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Pt}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Pt){if(this.length===0)return"";for(var At=this.head,Dt=""+At.data;At=At.next;)Dt+=Pt+At.data;return Dt}},{key:"concat",value:function(Pt){if(this.length===0)return z.alloc(0);for(var At=z.allocUnsafe(Pt>>>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(Pt,At){var Dt;return Pt<this.head.data.length?(Dt=this.head.data.slice(0,Pt),this.head.data=this.head.data.slice(Pt)):Pt===this.head.data.length?Dt=this.shift():Dt=At?this._getString(Pt):this._getBuffer(Pt),Dt}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Pt){var At=this.head,Dt=1,Ft=At.data;for(Pt-=Ft.length;At=At.next;){var jt=At.data,Nt=Pt>jt.length?jt.length:Pt;if(Nt===jt.length?Ft+=jt:Ft+=jt.slice(0,Pt),Pt-=Nt,Pt===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(Pt){var At=z.allocUnsafe(Pt),Dt=this.head,Ft=1;for(Dt.data.copy(At),Pt-=Dt.data.length;Dt=Dt.next;){var jt=Dt.data,Nt=Pt>jt.length?jt.length:Pt;if(jt.copy(At,At.length-Pt,0,Nt),Pt-=Nt,Pt===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(Pt,At){return at(this,gt(gt({},At),{},{depth:0,customInspect:!1}))}}]),ut}()},{buffer:90,util:89}],407:[function(ot,_t,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(bt,z):(z._writableState.errorEmitted=!0,vt.nextTick(kt,z,it)):vt.nextTick(kt,z,it):ft?(vt.nextTick(bt,z),ft(it)):vt.nextTick(bt,z)}),this)}function kt(xt,ft){Tt(xt,ft),bt(xt)}function bt(xt){xt._writableState&&!xt._writableState.emitClose||xt._readableState&&!xt._readableState.emitClose||xt.emit("close")}function St(){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)}_t.exports={destroy:gt,undestroy:St,errorOrDestroy:mt}}).call(this)}).call(this,ot("_process"))},{_process:467}],408:[function(ot,_t,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 bt(Tt){return Tt.setHeader&&typeof Tt.abort=="function"}function St(Tt,mt,xt){if(typeof mt=="function")return St(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)},Pt=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 bt(Tt)?(Tt.on("complete",it),Tt.on("abort",Pt),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",Pt),function(){Tt.removeListener("complete",it),Tt.removeListener("abort",Pt),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",Pt)}}_t.exports=St},{"../../../errors":399}],409:[function(ot,_t,Bt){_t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ot,_t,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,bt=kt.ERR_MISSING_ARGS,St=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 Pt=!1;it.on("close",function(){Pt=!0}),vt===void 0&&(vt=ot("./end-of-stream")),vt(it,{readable:lt,writable:ut},function(Dt){if(Dt)return dt(Dt);Pt=!0,dt()});var At=!1;return function(Dt){if(!Pt&&!At){if(At=!0,mt(it))return it.abort();if(typeof it.destroy=="function")return it.destroy();dt(Dt||new St("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 bt("streams");var Pt,At=lt.map(function(Dt,Ft){var jt=Ft<lt.length-1,Nt=Ft>0;return xt(Dt,jt,Nt,function(Gt){Pt||(Pt=Gt),Gt&&At.forEach(ft),!jt&&(At.forEach(ft),dt(Pt))})});return lt.reduce(z)}_t.exports=at},{"../../../errors":399,"./end-of-stream":408}],411:[function(ot,_t,Bt){"use strict";var vt=ot("../../../errors").codes.ERR_INVALID_OPT_VALUE;function gt(bt,St,Tt){return bt.highWaterMark!=null?bt.highWaterMark:St?bt[Tt]:null}function kt(bt,St,Tt,mt){var xt=gt(St,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 bt.objectMode?16:16*1024}_t.exports={getHighWaterMark:kt}},{"../../../errors":399}],412:[function(ot,_t,Bt){arguments[4][393][0].apply(Bt,arguments)},{dup:393,events:344}],413:[function(ot,_t,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 bt(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=St;function St(At){this.encoding=bt(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=Pt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vt.allocUnsafe(Dt)}St.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||""},St.prototype.end=tt,St.prototype.text=z,St.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 Pt(At){return At&&At.length?this.write(At):""}},{"safe-buffer":396}],414:[function(ot,_t,Bt){(function(vt,gt){(function(){var kt=ot("process/browser.js").nextTick,bt=Function.prototype.apply,St=Array.prototype.slice,Tt={},mt=0;Bt.setTimeout=function(){return new xt(bt.call(setTimeout,window,arguments),clearTimeout)},Bt.setInterval=function(){return new xt(bt.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:St.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,_t,Bt){var vt=ot("buffer").Buffer;_t.exports=function(gt){if(gt instanceof Uint8Array){if(gt.byteOffset===0&>.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),bt=gt.length,St=0;St<bt;St++)kt[St]=gt[St];return kt.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ot,_t,Bt){(function(vt){(function(){_t.exports=gt;function gt(bt,St){if(kt("noDeprecation"))return bt;var Tt=!1;function mt(){if(!Tt){if(kt("throwDeprecation"))throw new Error(St);kt("traceDeprecation")?console.trace(St):console.warn(St),Tt=!0}return bt.apply(this,arguments)}return mt}function kt(bt){try{if(!vt.localStorage)return!1}catch(Tt){return!1}var St=vt.localStorage[bt];return St==null?!1:String(St).toLowerCase()==="true"}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ot,_t,Bt){arguments[4][84][0].apply(Bt,arguments)},{dup:84}],418:[function(ot,_t,Bt){"use strict";var vt=ot("is-arguments"),gt=ot("is-generator-function"),kt=ot("which-typed-array"),bt=ot("is-typed-array");function St(ue){return ue.call.bind(ue)}var Tt=typeof BigInt!="undefined",mt=typeof Symbol!="undefined",xt=St(Object.prototype.toString),ft=St(Number.prototype.valueOf),z=St(String.prototype.valueOf),tt=St(Boolean.prototype.valueOf);if(Tt)var at=St(BigInt.prototype.valueOf);if(mt)var it=St(Symbol.prototype.valueOf);function lt(ue,me){if(typeof ue!="object")return!1;try{return me(ue),!0}catch(Le){return!1}}Bt.isArgumentsObject=vt,Bt.isGeneratorFunction=gt,Bt.isTypedArray=bt;function ut(ue){return typeof Promise!="undefined"&&ue instanceof Promise||ue!==null&&typeof ue=="object"&&typeof ue.then=="function"&&typeof ue.catch=="function"}Bt.isPromise=ut;function dt(ue){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ue):bt(ue)||he(ue)}Bt.isArrayBufferView=dt;function Pt(ue){return kt(ue)==="Uint8Array"}Bt.isUint8Array=Pt;function At(ue){return kt(ue)==="Uint8ClampedArray"}Bt.isUint8ClampedArray=At;function Dt(ue){return kt(ue)==="Uint16Array"}Bt.isUint16Array=Dt;function Ft(ue){return kt(ue)==="Uint32Array"}Bt.isUint32Array=Ft;function jt(ue){return kt(ue)==="Int8Array"}Bt.isInt8Array=jt;function Nt(ue){return kt(ue)==="Int16Array"}Bt.isInt16Array=Nt;function Gt(ue){return kt(ue)==="Int32Array"}Bt.isInt32Array=Gt;function Wt(ue){return kt(ue)==="Float32Array"}Bt.isFloat32Array=Wt;function Jt(ue){return kt(ue)==="Float64Array"}Bt.isFloat64Array=Jt;function Ut(ue){return kt(ue)==="BigInt64Array"}Bt.isBigInt64Array=Ut;function Ht(ue){return kt(ue)==="BigUint64Array"}Bt.isBigUint64Array=Ht;function oe(ue){return xt(ue)==="[object Map]"}oe.working=typeof Map!="undefined"&&oe(new Map);function se(ue){return typeof Map=="undefined"?!1:oe.working?oe(ue):ue instanceof Map}Bt.isMap=se;function fe(ue){return xt(ue)==="[object Set]"}fe.working=typeof Set!="undefined"&&fe(new Set);function Pe(ue){return typeof Set=="undefined"?!1:fe.working?fe(ue):ue instanceof Set}Bt.isSet=Pe;function Yt(ue){return xt(ue)==="[object WeakMap]"}Yt.working=typeof WeakMap!="undefined"&&Yt(new WeakMap);function ee(ue){return typeof WeakMap=="undefined"?!1:Yt.working?Yt(ue):ue instanceof WeakMap}Bt.isWeakMap=ee;function ye(ue){return xt(ue)==="[object WeakSet]"}ye.working=typeof WeakSet!="undefined"&&ye(new WeakSet);function xe(ue){return ye(ue)}Bt.isWeakSet=xe;function be(ue){return xt(ue)==="[object ArrayBuffer]"}be.working=typeof ArrayBuffer!="undefined"&&be(new ArrayBuffer);function ce(ue){return typeof ArrayBuffer=="undefined"?!1:be.working?be(ue):ue instanceof ArrayBuffer}Bt.isArrayBuffer=ce;function pe(ue){return xt(ue)==="[object DataView]"}pe.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pe(new DataView(new ArrayBuffer(1),0,1));function he(ue){return typeof DataView=="undefined"?!1:pe.working?pe(ue):ue instanceof DataView}Bt.isDataView=he;var Ce=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function de(ue){return xt(ue)==="[object SharedArrayBuffer]"}function Fe(ue){return typeof Ce=="undefined"?!1:(typeof de.working=="undefined"&&(de.working=de(new Ce)),de.working?de(ue):ue instanceof Ce)}Bt.isSharedArrayBuffer=Fe;function ge(ue){return xt(ue)==="[object AsyncFunction]"}Bt.isAsyncFunction=ge;function Se(ue){return xt(ue)==="[object Map Iterator]"}Bt.isMapIterator=Se;function re(ue){return xt(ue)==="[object Set Iterator]"}Bt.isSetIterator=re;function Kt(ue){return xt(ue)==="[object Generator]"}Bt.isGeneratorObject=Kt;function wt(ue){return xt(ue)==="[object WebAssembly.Module]"}Bt.isWebAssemblyCompiledModule=wt;function Lt(ue){return lt(ue,ft)}Bt.isNumberObject=Lt;function Xt(ue){return lt(ue,z)}Bt.isStringObject=Xt;function ne(ue){return lt(ue,tt)}Bt.isBooleanObject=ne;function It(ue){return Tt&<(ue,at)}Bt.isBigIntObject=It;function Rt(ue){return mt&<(ue,it)}Bt.isSymbolObject=Rt;function Vt(ue){return Lt(ue)||Xt(ue)||ne(ue)||It(ue)||Rt(ue)}Bt.isBoxedPrimitive=Vt;function $t(ue){return typeof Uint8Array!="undefined"&&(ce(ue)||Fe(ue))}Bt.isAnyArrayBuffer=$t,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ue){Object.defineProperty(Bt,ue,{enumerable:!1,value:function(){throw new Error(ue+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ot,_t,Bt){(function(vt){(function(){var gt=Object.getOwnPropertyDescriptors||function(Ce){for(var de=Object.keys(Ce),Fe={},ge=0;ge<de.length;ge++)Fe[de[ge]]=Object.getOwnPropertyDescriptor(Ce,de[ge]);return Fe},kt=/%[sdj%]/g;Bt.format=function(he){if(!Nt(he)){for(var Ce=[],de=0;de<arguments.length;de++)Ce.push(mt(arguments[de]));return Ce.join(" ")}for(var de=1,Fe=arguments,ge=Fe.length,Se=String(he).replace(kt,function(Kt){if(Kt==="%%")return"%";if(de>=ge)return Kt;switch(Kt){case"%s":return String(Fe[de++]);case"%d":return Number(Fe[de++]);case"%j":try{return JSON.stringify(Fe[de++])}catch(wt){return"[Circular]"}default:return Kt}}),re=Fe[de];de<ge;re=Fe[++de])Dt(re)||!Ut(re)?Se+=" "+re:Se+=" "+mt(re);return Se},Bt.deprecate=function(he,Ce){if(typeof vt!="undefined"&&vt.noDeprecation===!0)return he;if(typeof vt=="undefined")return function(){return Bt.deprecate(he,Ce).apply(this,arguments)};var de=!1;function Fe(){if(!de){if(vt.throwDeprecation)throw new Error(Ce);vt.traceDeprecation?console.trace(Ce):console.error(Ce),de=!0}return he.apply(this,arguments)}return Fe};var bt={},St=/^$/;if(vt.env.NODE_DEBUG){var Tt=vt.env.NODE_DEBUG;Tt=Tt.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),St=new RegExp("^"+Tt+"$","i")}Bt.debuglog=function(he){if(he=he.toUpperCase(),!bt[he])if(St.test(he)){var Ce=vt.pid;bt[he]=function(){var de=Bt.format.apply(Bt,arguments);console.error("%s %d: %s",he,Ce,de)}}else bt[he]=function(){};return bt[he]};function mt(he,Ce){var de={seen:[],stylize:ft};return arguments.length>=3&&(de.depth=arguments[2]),arguments.length>=4&&(de.colors=arguments[3]),At(Ce)?de.showHidden=Ce:Ce&&Bt._extend(de,Ce),Wt(de.showHidden)&&(de.showHidden=!1),Wt(de.depth)&&(de.depth=2),Wt(de.colors)&&(de.colors=!1),Wt(de.customInspect)&&(de.customInspect=!0),de.colors&&(de.stylize=xt),tt(de,he,de.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(he,Ce){var de=mt.styles[Ce];return de?"\x1B["+mt.colors[de][0]+"m"+he+"\x1B["+mt.colors[de][1]+"m":he}function ft(he,Ce){return he}function z(he){var Ce={};return he.forEach(function(de,Fe){Ce[de]=!0}),Ce}function tt(he,Ce,de){if(he.customInspect&&Ce&&se(Ce.inspect)&&Ce.inspect!==Bt.inspect&&!(Ce.constructor&&Ce.constructor.prototype===Ce)){var Fe=Ce.inspect(de,he);return Nt(Fe)||(Fe=tt(he,Fe,de)),Fe}var ge=at(he,Ce);if(ge)return ge;var Se=Object.keys(Ce),re=z(Se);if(he.showHidden&&(Se=Object.getOwnPropertyNames(Ce)),oe(Ce)&&(Se.indexOf("message")>=0||Se.indexOf("description")>=0))return it(Ce);if(Se.length===0){if(se(Ce)){var Kt=Ce.name?": "+Ce.name:"";return he.stylize("[Function"+Kt+"]","special")}if(Jt(Ce))return he.stylize(RegExp.prototype.toString.call(Ce),"regexp");if(Ht(Ce))return he.stylize(Date.prototype.toString.call(Ce),"date");if(oe(Ce))return it(Ce)}var wt="",Lt=!1,Xt=["{","}"];if(Pt(Ce)&&(Lt=!0,Xt=["[","]"]),se(Ce)){var ne=Ce.name?": "+Ce.name:"";wt=" [Function"+ne+"]"}if(Jt(Ce)&&(wt=" "+RegExp.prototype.toString.call(Ce)),Ht(Ce)&&(wt=" "+Date.prototype.toUTCString.call(Ce)),oe(Ce)&&(wt=" "+it(Ce)),Se.length===0&&(!Lt||Ce.length==0))return Xt[0]+wt+Xt[1];if(de<0)return Jt(Ce)?he.stylize(RegExp.prototype.toString.call(Ce),"regexp"):he.stylize("[Object]","special");he.seen.push(Ce);var It;return Lt?It=lt(he,Ce,de,re,Se):It=Se.map(function(Rt){return ut(he,Ce,de,re,Rt,Lt)}),he.seen.pop(),dt(It,wt,Xt)}function at(he,Ce){if(Wt(Ce))return he.stylize("undefined","undefined");if(Nt(Ce)){var de="'"+JSON.stringify(Ce).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return he.stylize(de,"string")}if(jt(Ce))return he.stylize(""+Ce,"number");if(At(Ce))return he.stylize(""+Ce,"boolean");if(Dt(Ce))return he.stylize("null","null")}function it(he){return"["+Error.prototype.toString.call(he)+"]"}function lt(he,Ce,de,Fe,ge){for(var Se=[],re=0,Kt=Ce.length;re<Kt;++re)xe(Ce,String(re))?Se.push(ut(he,Ce,de,Fe,String(re),!0)):Se.push("");return ge.forEach(function(wt){wt.match(/^\d+$/)||Se.push(ut(he,Ce,de,Fe,wt,!0))}),Se}function ut(he,Ce,de,Fe,ge,Se){var re,Kt,wt;if(wt=Object.getOwnPropertyDescriptor(Ce,ge)||{value:Ce[ge]},wt.get?wt.set?Kt=he.stylize("[Getter/Setter]","special"):Kt=he.stylize("[Getter]","special"):wt.set&&(Kt=he.stylize("[Setter]","special")),xe(Fe,ge)||(re="["+ge+"]"),Kt||(he.seen.indexOf(wt.value)<0?(Dt(de)?Kt=tt(he,wt.value,null):Kt=tt(he,wt.value,de-1),Kt.indexOf(`
|
|
`)>-1&&(Se?Kt=Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`).slice(2):Kt=`
|
|
`+Kt.split(`
|
|
`).map(function(Lt){return" "+Lt}).join(`
|
|
`))):Kt=he.stylize("[Circular]","special")),Wt(re)){if(Se&&ge.match(/^\d+$/))return Kt;re=JSON.stringify(""+ge),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.slice(1,-1),re=he.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=he.stylize(re,"string"))}return re+": "+Kt}function dt(he,Ce,de){var Fe=0,ge=he.reduce(function(Se,re){return Fe++,re.indexOf(`
|
|
`)>=0&&Fe++,Se+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?de[0]+(Ce===""?"":Ce+`
|
|
`)+" "+he.join(`,
|
|
`)+" "+de[1]:de[0]+Ce+" "+he.join(", ")+" "+de[1]}Bt.types=ot("./support/types");function Pt(he){return Array.isArray(he)}Bt.isArray=Pt;function At(he){return typeof he=="boolean"}Bt.isBoolean=At;function Dt(he){return he===null}Bt.isNull=Dt;function Ft(he){return he==null}Bt.isNullOrUndefined=Ft;function jt(he){return typeof he=="number"}Bt.isNumber=jt;function Nt(he){return typeof he=="string"}Bt.isString=Nt;function Gt(he){return typeof he=="symbol"}Bt.isSymbol=Gt;function Wt(he){return he===void 0}Bt.isUndefined=Wt;function Jt(he){return Ut(he)&&Pe(he)==="[object RegExp]"}Bt.isRegExp=Jt,Bt.types.isRegExp=Jt;function Ut(he){return typeof he=="object"&&he!==null}Bt.isObject=Ut;function Ht(he){return Ut(he)&&Pe(he)==="[object Date]"}Bt.isDate=Ht,Bt.types.isDate=Ht;function oe(he){return Ut(he)&&(Pe(he)==="[object Error]"||he instanceof Error)}Bt.isError=oe,Bt.types.isNativeError=oe;function se(he){return typeof he=="function"}Bt.isFunction=se;function fe(he){return he===null||typeof he=="boolean"||typeof he=="number"||typeof he=="string"||typeof he=="symbol"||typeof he=="undefined"}Bt.isPrimitive=fe,Bt.isBuffer=ot("./support/isBuffer");function Pe(he){return Object.prototype.toString.call(he)}function Yt(he){return he<10?"0"+he.toString(10):he.toString(10)}var ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ye(){var he=new Date,Ce=[Yt(he.getHours()),Yt(he.getMinutes()),Yt(he.getSeconds())].join(":");return[he.getDate(),ee[he.getMonth()],Ce].join(" ")}Bt.log=function(){console.log("%s - %s",ye(),Bt.format.apply(Bt,arguments))},Bt.inherits=ot("inherits"),Bt._extend=function(he,Ce){if(!Ce||!Ut(Ce))return he;for(var de=Object.keys(Ce),Fe=de.length;Fe--;)he[de[Fe]]=Ce[de[Fe]];return he};function xe(he,Ce){return Object.prototype.hasOwnProperty.call(he,Ce)}var be=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(be&&Ce[be]){var de=Ce[be];if(typeof de!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(de,be,{value:de,enumerable:!1,writable:!1,configurable:!0}),de}function de(){for(var Fe,ge,Se=new Promise(function(wt,Lt){Fe=wt,ge=Lt}),re=[],Kt=0;Kt<arguments.length;Kt++)re.push(arguments[Kt]);re.push(function(wt,Lt){wt?ge(wt):Fe(Lt)});try{Ce.apply(this,re)}catch(wt){ge(wt)}return Se}return Object.setPrototypeOf(de,Object.getPrototypeOf(Ce)),be&&Object.defineProperty(de,be,{value:de,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(de,gt(Ce))},Bt.promisify.custom=be;function ce(he,Ce){if(!he){var de=new Error("Promise was rejected with a falsy value");de.reason=he,he=de}return Ce(he)}function pe(he){if(typeof he!="function")throw new TypeError('The "original" argument must be of type Function');function Ce(){for(var de=[],Fe=0;Fe<arguments.length;Fe++)de.push(arguments[Fe]);var ge=de.pop();if(typeof ge!="function")throw new TypeError("The last argument must be of type Function");var Se=this,re=function(){return ge.apply(Se,arguments)};he.apply(this,de).then(function(Kt){vt.nextTick(re.bind(null,null,Kt))},function(Kt){vt.nextTick(ce.bind(null,Kt,re))})}return Object.setPrototypeOf(Ce,Object.getPrototypeOf(he)),Object.defineProperties(Ce,gt(he)),Ce}Bt.callbackify=pe}).call(this)}).call(this,ot("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("for-each"),kt=ot("available-typed-arrays"),bt=ot("call-bind"),St=ot("call-bind/callBound"),Tt=ot("gopd"),mt=St("Object.prototype.toString"),xt=ot("has-tostringtag/shams")(),ft=typeof globalThis=="undefined"?vt:globalThis,z=kt(),tt=St("String.prototype.slice"),at=Object.getPrototypeOf,it=St("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(Pt){var At=new ft[Pt];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["$"+Pt]=bt(Ft.get)}}):gt(z,function(Pt){var At=new ft[Pt];lt["$"+Pt]=bt(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};_t.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 cn!="undefined"?cn: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,_t,Bt){(function(){"use strict";Bt.stripBOM=function(vt){return vt[0]==="\uFEFF"?vt.substring(1):vt}}).call(this)},{}],422:[function(ot,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St,Tt={}.hasOwnProperty;vt=ot("xmlbuilder"),gt=ot("./defaults").defaults,bt=function(mt){return typeof mt=="string"&&(mt.indexOf("&")>=0||mt.indexOf(">")>=0||mt.indexOf("<")>=0)},St=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 Pt,At,Dt,Ft,jt,Nt;if(typeof dt!="object")lt.options.cdata&&bt(dt)?ut.raw(St(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(Pt in At)Nt=At[Pt],ut=ut.att(Pt,Nt)}else if(jt===z)lt.options.cdata&&bt(At)?ut=ut.raw(St(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&&bt(Dt)?ut=ut.ele(jt).raw(St(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"&<.options.cdata&&bt(At)?ut=ut.ele(jt).raw(St(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,_t,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,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St,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"),bt=ot("events"),vt=ot("./bom"),mt=ot("./processors"),ft=ot("timers").setImmediate,gt=ot("./defaults").defaults,St=function(it){return typeof it=="object"&&it!=null&&Object.keys(it).length===0},Tt=function(it,lt,ut){var dt,Pt,At;for(dt=0,Pt=it.length;dt<Pt;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,Pt,At;if(!(this instanceof Bt.Parser))return new Bt.Parser(ut);this.options={},Pt=gt["0.2"];for(dt in Pt)at.call(Pt,dt)&&(At=Pt[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(Pt){if(dt=Pt,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(dt)}},lt.prototype.assignOrPush=function(ut,dt,Pt){return dt in ut?(ut[dt]instanceof Array||kt(ut,dt,[ut[dt]]),ut[dt].push(Pt)):this.options.explicitArray?kt(ut,dt,[Pt]):kt(ut,dt,Pt)},lt.prototype.reset=function(){var ut,dt,Pt,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,Gt,Wt,Jt;if(Gt={},Gt[dt]="",!Dt.options.ignoreAttrs){Jt=Ft.attributes;for(jt in Jt)at.call(Jt,jt)&&(!(ut in Gt)&&!Dt.options.mergeAttrs&&(Gt[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(Gt,Wt,Nt):kt(Gt[ut],Wt,Nt))}return Gt["#name"]=Dt.options.tagNameProcessors?Tt(Dt.options.tagNameProcessors,Ft.name):Ft.name,Dt.options.xmlns&&(Gt[Dt.options.xmlnskey]={uri:Ft.uri,local:Ft.local}),At.push(Gt)}}(this),this.saxParser.onclosetag=function(Dt){return function(){var Ft,jt,Nt,Gt,Wt,Jt,Ut,Ht,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])),St(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 fe,Pe,Yt;for(Yt=[],fe=0,Pe=At.length;fe<Pe;fe++)Gt=At[fe],Yt.push(Gt["#name"]);return Yt}().concat(Wt).join("/"),function(){var fe;try{return Jt=Dt.options.validator(se,oe&&oe[Wt],Jt)}catch(Pe){return fe=Pe,Dt.emit("error",fe)}}()),Dt.options.explicitChildren&&!Dt.options.mergeAttrs&&typeof Jt=="object"){if(!Dt.options.preserveChildrenOrder)Gt={},Dt.options.attrkey in Jt&&(Gt[Dt.options.attrkey]=Jt[Dt.options.attrkey],delete Jt[Dt.options.attrkey]),!Dt.options.charsAsChildren&&Dt.options.charkey in Jt&&(Gt[Dt.options.charkey]=Jt[Dt.options.charkey],delete Jt[Dt.options.charkey]),Object.getOwnPropertyNames(Jt).length>0&&(Gt[Dt.options.childkey]=Jt),Jt=Gt;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&&(Ht=Jt,Jt={},kt(Jt,Wt,Ht)),Dt.resultObject=Jt,Dt.saxParser.ended=!0,Dt.emit("end",Dt.resultObject))}}(this),Pt=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=Pt,this.saxParser.oncdata=function(Dt){return function(Ft){var jt;if(jt=Pt(Ft),jt)return jt.cdata=!0}}(this)},lt.prototype.parseString=function(ut,dt){var Pt;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(Pt=At,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Pt}else return this.emit("error",Pt),this.saxParser.errThrown=!0}},lt.prototype.parseStringPromise=function(ut){return new Promise(function(dt){return function(Pt,At){return dt.parseString(ut,function(Dt,Ft){return Dt?At(Dt):Pt(Ft)})}}(this))},lt}(bt),Bt.parseString=function(it,lt,ut){var dt,Pt,At;return ut!=null?(typeof ut=="function"&&(dt=ut),typeof lt=="object"&&(Pt=lt)):(typeof lt=="function"&&(dt=lt),Pt={}),At=new Bt.Parser(Pt),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,_t,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,_t,Bt){(function(){"use strict";var vt,gt,kt,bt,St=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"),bt=ot("./processors"),Bt.defaults=gt.defaults,Bt.processors=bt,Bt.ValidationError=function(mt){St(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,_t,Bt){(function(){_t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ot,_t,Bt){(function(){_t.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,_t,Bt){(function(){var vt,gt,kt,bt,St,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):[],St(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},St=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 St(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},bt=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 St(z.valueOf)?z.valueOf():z},_t.exports.assign=vt,_t.exports.isFunction=St,_t.exports.isObject=Tt,_t.exports.isArray=kt,_t.exports.isEmpty=bt,_t.exports.isPlainObject=mt,_t.exports.getValue=gt}).call(this)},{}],430:[function(ot,_t,Bt){(function(){_t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ot,_t,Bt){(function(){var vt,gt,kt;vt=ot("./NodeType"),kt=ot("./XMLNode"),_t.exports=gt=function(){function bt(St,Tt,mt){if(this.parent=St,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(bt.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(bt.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(bt.prototype,"textContent",{get:function(){return this.value},set:function(St){return this.value=St||""}}),Object.defineProperty(bt.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(bt.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(bt.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(bt.prototype,"specified",{get:function(){return!0}}),bt.prototype.clone=function(){return Object.create(this)},bt.prototype.toString=function(St){return this.options.writer.attribute(this,this.options.writer.filterOptions(St))},bt.prototype.debugInfo=function(St){return St=St||this.name,St==null?"parent: <"+this.parent.name+">":"attribute: {"+St+"}, parent: <"+this.parent.name+">"},bt.prototype.isEqualNode=function(St){return!(St.namespaceURI!==this.namespaceURI||St.prefix!==this.prefix||St.localName!==this.localName||St.value!==this.value)},bt}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;vt=ot("./NodeType"),kt=ot("./XMLCharacterData"),_t.exports=gt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt=function(St,Tt){for(var mt in Tt)bt.call(Tt,mt)&&(St[mt]=Tt[mt]);function xt(){this.constructor=St}return xt.prototype=Tt.prototype,St.prototype=new xt,St.__super__=Tt.prototype,St},bt={}.hasOwnProperty;gt=ot("./XMLNode"),_t.exports=vt=function(St){kt(Tt,St);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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt;gt=ot("./XMLDOMErrorHandler"),kt=ot("./XMLDOMStringList"),_t.exports=vt=function(){function bt(){var St;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=St=Object.create(this.defaultParams)}return Object.defineProperty(bt.prototype,"parameterNames",{get:function(){return new kt(Object.keys(this.defaultParams))}}),bt.prototype.getParameter=function(St){return this.params.hasOwnProperty(St)?this.params[St]:null},bt.prototype.canSetParameter=function(St,Tt){return!0},bt.prototype.setParameter=function(St,Tt){return Tt!=null?this.params[St]=Tt:delete this.params[St]},bt}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(){}return gt.prototype.handleError=function(kt){throw new Error(kt)},gt}()}).call(this)},{}],437:[function(ot,_t,Bt){(function(){var vt;_t.exports=vt=function(){function gt(){}return gt.prototype.hasFeature=function(kt,bt){return!0},gt.prototype.createDocumentType=function(kt,bt,St){throw new Error("This DOM method is not implemented.")},gt.prototype.createDocument=function(kt,bt,St){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,bt){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],438:[function(ot,_t,Bt){(function(){var vt;_t.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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St=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;bt=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(mt){St(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,!bt(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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St=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;bt=ot("./Utility").isObject,kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(mt){St(xt,mt);function xt(ft,z,tt,at){var it;xt.__super__.constructor.call(this,ft),bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St,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"),bt=ot("./XMLDTDEntity"),kt=ot("./XMLDTDElement"),St=ot("./XMLDTDNotation"),mt=ot("./XMLNamedNodeMap"),_t.exports=Tt=function(at){z(it,at);function it(lt,ut,dt){var Pt,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(Pt=Ft[At],Pt.type===vt.Element){this.name=Pt.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,Pt,At;for(Pt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.EntityDeclaration&&!lt.pe&&(Pt[lt.name]=lt);return new mt(Pt)}}),Object.defineProperty(it.prototype,"notations",{get:function(){var lt,ut,dt,Pt,At;for(Pt={},At=this.children,ut=0,dt=At.length;ut<dt;ut++)lt=At[ut],lt.type===vt.NotationDeclaration&&(Pt[lt.name]=lt);return new mt(Pt)}}),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,Pt,At){var Dt;return Dt=new gt(this,lt,ut,dt,Pt,At),this.children.push(Dt),this},it.prototype.entity=function(lt,ut){var dt;return dt=new bt(this,!1,lt,ut),this.children.push(dt),this},it.prototype.pEntity=function(lt,ut){var dt;return dt=new bt(this,!0,lt,ut),this.children.push(dt),this},it.prototype.notation=function(lt,ut){var dt;return dt=new St(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,Pt,At){return this.attList(lt,ut,dt,Pt,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,_t,Bt){(function(){var vt,gt,kt,bt,St,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"),St=ot("./XMLNode"),vt=ot("./NodeType"),mt=ot("./XMLStringifier"),Tt=ot("./XMLStringWriter"),_t.exports=bt=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}(St)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft,jt,Nt,Gt,Wt,Jt={}.hasOwnProperty;Wt=ot("./Utility"),Nt=Wt.isObject,jt=Wt.isFunction,Gt=Wt.isPlainObject,Ft=Wt.getValue,vt=ot("./NodeType"),at=ot("./XMLDocument"),lt=ot("./XMLElement"),bt=ot("./XMLCData"),St=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"),Pt=ot("./XMLStringWriter"),gt=ot("./WriterState"),_t.exports=it=function(){function Ut(Ht,oe,se){var fe;this.name="?xml",this.type=vt.Document,Ht||(Ht={}),fe={},Ht.writer?Gt(Ht.writer)&&(fe=Ht.writer,Ht.writer=new Pt):Ht.writer=new Pt,this.options=Ht,this.writer=Ht.writer,this.writerOptions=this.writer.filterOptions(fe),this.stringify=new At(Ht),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(Ht){var oe,se,fe,Pe,Yt,ee,ye,xe;switch(Ht.type){case vt.CData:this.cdata(Ht.value);break;case vt.Comment:this.comment(Ht.value);break;case vt.Element:fe={},ye=Ht.attribs;for(se in ye)Jt.call(ye,se)&&(oe=ye[se],fe[se]=oe.value);this.node(Ht.name,fe);break;case vt.Dummy:this.dummy();break;case vt.Raw:this.raw(Ht.value);break;case vt.Text:this.text(Ht.value);break;case vt.ProcessingInstruction:this.instruction(Ht.target,Ht.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ht.constructor.name)}for(xe=Ht.children,Yt=0,ee=xe.length;Yt<ee;Yt++)Pe=xe[Yt],this.createChildNode(Pe),Pe.type===vt.Element&&this.up();return this},Ut.prototype.dummy=function(){return this},Ut.prototype.node=function(Ht,oe,se){var fe;if(Ht==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(Ht));return this.openCurrent(),Ht=Ft(Ht),oe==null&&(oe={}),oe=Ft(oe),Nt(oe)||(fe=[oe,se],se=fe[0],oe=fe[1]),this.currentNode=new lt(this,Ht,oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,se!=null&&this.text(se),this},Ut.prototype.element=function(Ht,oe,se){var fe,Pe,Yt,ee,ye,xe;if(this.currentNode&&this.currentNode.type===vt.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ht)||Nt(Ht)||jt(Ht))for(ee=this.options.noValidation,this.options.noValidation=!0,xe=new at(this.options).element("TEMP_ROOT"),xe.element(Ht),this.options.noValidation=ee,ye=xe.children,Pe=0,Yt=ye.length;Pe<Yt;Pe++)fe=ye[Pe],this.createChildNode(fe),fe.type===vt.Element&&this.up();else this.node(Ht,oe,se);return this},Ut.prototype.attribute=function(Ht,oe){var se,fe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ht));if(Ht!=null&&(Ht=Ft(Ht)),Nt(Ht))for(se in Ht)Jt.call(Ht,se)&&(fe=Ht[se],this.attribute(se,fe));else jt(oe)&&(oe=oe.apply()),this.options.keepNullAttributes&&oe==null?this.currentNode.attribs[Ht]=new kt(this,Ht,""):oe!=null&&(this.currentNode.attribs[Ht]=new kt(this,Ht,oe));return this},Ut.prototype.text=function(Ht){var oe;return this.openCurrent(),oe=new Dt(this,Ht),this.onData(this.writer.text(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.cdata=function(Ht){var oe;return this.openCurrent(),oe=new bt(this,Ht),this.onData(this.writer.cdata(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.comment=function(Ht){var oe;return this.openCurrent(),oe=new St(this,Ht),this.onData(this.writer.comment(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.raw=function(Ht){var oe;return this.openCurrent(),oe=new dt(this,Ht),this.onData(this.writer.raw(oe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.instruction=function(Ht,oe){var se,fe,Pe,Yt,ee;if(this.openCurrent(),Ht!=null&&(Ht=Ft(Ht)),oe!=null&&(oe=Ft(oe)),Array.isArray(Ht))for(se=0,Yt=Ht.length;se<Yt;se++)fe=Ht[se],this.instruction(fe);else if(Nt(Ht))for(fe in Ht)Jt.call(Ht,fe)&&(Pe=Ht[fe],this.instruction(fe,Pe));else jt(oe)&&(oe=oe.apply()),ee=new ut(this,Ht,oe),this.onData(this.writer.processingInstruction(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ut.prototype.declaration=function(Ht,oe,se){var fe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return fe=new z(this,Ht,oe,se),this.onData(this.writer.declaration(fe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.doctype=function(Ht,oe,se){if(this.openCurrent(),Ht==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=Ht,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ut.prototype.dtdElement=function(Ht,oe){var se;return this.openCurrent(),se=new mt(this,Ht,oe),this.onData(this.writer.dtdElement(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.attList=function(Ht,oe,se,fe,Pe){var Yt;return this.openCurrent(),Yt=new Tt(this,Ht,oe,se,fe,Pe),this.onData(this.writer.dtdAttList(Yt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.entity=function(Ht,oe){var se;return this.openCurrent(),se=new xt(this,!1,Ht,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.pEntity=function(Ht,oe){var se;return this.openCurrent(),se=new xt(this,!0,Ht,oe),this.onData(this.writer.dtdEntity(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ut.prototype.notation=function(Ht,oe){var se;return this.openCurrent(),se=new ft(this,Ht,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(Ht){var oe,se,fe,Pe;if(!Ht.isOpen){if(!this.root&&this.currentLevel===0&&Ht.type===vt.Element&&(this.root=Ht),se="",Ht.type===vt.Element){this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"<"+Ht.name,Pe=Ht.attribs;for(fe in Pe)Jt.call(Pe,fe)&&(oe=Pe[fe],se+=this.writer.attribute(oe,this.writerOptions,this.currentLevel));se+=(Ht.children?">":"/>")+this.writer.endline(Ht,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.InsideTag}else this.writerOptions.state=gt.OpenTag,se=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ht.rootNodeName,Ht.pubID&&Ht.sysID?se+=' PUBLIC "'+Ht.pubID+'" "'+Ht.sysID+'"':Ht.sysID&&(se+=' SYSTEM "'+Ht.sysID+'"'),Ht.children?(se+=" [",this.writerOptions.state=gt.InsideTag):(this.writerOptions.state=gt.CloseTag,se+=">"),se+=this.writer.endline(Ht,this.writerOptions,this.currentLevel);return this.onData(se,this.currentLevel),Ht.isOpen=!0}},Ut.prototype.closeNode=function(Ht){var oe;if(!Ht.isClosed)return oe="",this.writerOptions.state=gt.CloseTag,Ht.type===vt.Element?oe=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"</"+Ht.name+">"+this.writer.endline(Ht,this.writerOptions,this.currentLevel):oe=this.writer.indent(Ht,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ht,this.writerOptions,this.currentLevel),this.writerOptions.state=gt.None,this.onData(oe,this.currentLevel),Ht.isClosed=!0},Ut.prototype.onData=function(Ht,oe){return this.documentStarted=!0,this.onDataCallback(Ht,oe+1)},Ut.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ut.prototype.debugInfo=function(Ht){return Ht==null?"":"node: <"+Ht+">"},Ut.prototype.ele=function(){return this.element.apply(this,arguments)},Ut.prototype.nod=function(Ht,oe,se){return this.node(Ht,oe,se)},Ut.prototype.txt=function(Ht){return this.text(Ht)},Ut.prototype.dat=function(Ht){return this.cdata(Ht)},Ut.prototype.com=function(Ht){return this.comment(Ht)},Ut.prototype.ins=function(Ht,oe){return this.instruction(Ht,oe)},Ut.prototype.dec=function(Ht,oe,se){return this.declaration(Ht,oe,se)},Ut.prototype.dtd=function(Ht,oe,se){return this.doctype(Ht,oe,se)},Ut.prototype.e=function(Ht,oe,se){return this.element(Ht,oe,se)},Ut.prototype.n=function(Ht,oe,se){return this.node(Ht,oe,se)},Ut.prototype.t=function(Ht){return this.text(Ht)},Ut.prototype.d=function(Ht){return this.cdata(Ht)},Ut.prototype.c=function(Ht){return this.comment(Ht)},Ut.prototype.r=function(Ht){return this.raw(Ht)},Ut.prototype.i=function(Ht,oe){return this.instruction(Ht,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(Ht,oe){return this.entity(Ht,oe)},Ut.prototype.pent=function(Ht,oe){return this.pEntity(Ht,oe)},Ut.prototype.not=function(Ht,oe){return this.notation(Ht,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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;kt=ot("./XMLNode"),vt=ot("./NodeType"),_t.exports=gt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St,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,St=ot("./XMLNode"),vt=ot("./NodeType"),gt=ot("./XMLAttribute"),bt=ot("./XMLNamedNodeMap"),_t.exports=kt=function(at){z(it,at);function it(lt,ut,dt){var Pt,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(Pt=Ft[At],Pt.type===vt.DocType){Pt.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 bt(this.attribs)),this.attributeMap}}),it.prototype.clone=function(){var lt,ut,dt,Pt;dt=Object.create(this),dt.isRoot&&(dt.documentObject=null),dt.attribs={},Pt=this.attribs;for(ut in Pt)tt.call(Pt,ut)&&(lt=Pt[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,Pt;if(lt!=null&&(lt=Tt(lt)),xt(lt))for(dt in lt)tt.call(lt,dt)&&(Pt=lt[dt],this.attribute(dt,Pt));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,Pt;if(lt==null)throw new Error("Missing attribute name. "+this.debugInfo());if(lt=Tt(lt),Array.isArray(lt))for(dt=0,Pt=lt.length;dt<Pt;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,Pt;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,Pt=this.attribs.length-1;0<=Pt?dt<=Pt:dt>=Pt;ut=0<=Pt?++dt:--dt)if(!this.attribs[ut].isEqualNode(lt.attribs[ut]))return!1;return!0},it}(St)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ot,_t,Bt){(function(){var vt;_t.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 bt;return bt=this.nodes[kt.nodeName],this.nodes[kt.nodeName]=kt,bt||null},gt.prototype.removeNamedItem=function(kt){var bt;return bt=this.nodes[kt],delete this.nodes[kt],bt||null},gt.prototype.item=function(kt){return this.nodes[Object.keys(this.nodes)[kt]]||null},gt.prototype.getNamedItemNS=function(kt,bt){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,bt){throw new Error("This DOM method is not implemented.")},gt}()}).call(this)},{}],450:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At,Dt,Ft={}.hasOwnProperty;Dt=ot("./Utility"),At=Dt.isObject,Pt=Dt.isFunction,dt=Dt.isEmpty,ut=Dt.getValue,xt=null,kt=null,bt=null,St=null,Tt=null,it=null,lt=null,at=null,mt=null,gt=null,tt=null,ft=null,vt=null,_t.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"),bt=ot("./XMLComment"),St=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,Gt,Wt,Jt,Ut;if(this.nodeType===gt.Element||this.nodeType===gt.DocumentFragment){for(Ut="",Jt=this.children,Gt=0,Wt=Jt.length;Gt<Wt;Gt++)Nt=Jt[Gt],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 Gt,Wt,Jt,Ut,Ht;for(this.parent=Nt,Nt&&(this.options=Nt.options,this.stringify=Nt.stringify),Ut=this.children,Ht=[],Wt=0,Jt=Ut.length;Wt<Jt;Wt++)Gt=Ut[Wt],Ht.push(Gt.setParent(this));return Ht},jt.prototype.element=function(Nt,Gt,Wt){var Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee,ye,xe;if(fe=null,Gt===null&&Wt==null&&(ee=[{},null],Gt=ee[0],Wt=ee[1]),Gt==null&&(Gt={}),Gt=ut(Gt),At(Gt)||(ye=[Gt,Wt],Wt=ye[0],Gt=ye[1]),Nt!=null&&(Nt=ut(Nt)),Array.isArray(Nt))for(Ht=0,Pe=Nt.length;Ht<Pe;Ht++)Ut=Nt[Ht],fe=this.element(Ut);else if(Pt(Nt))fe=this.element(Nt.apply());else if(At(Nt)){for(se in Nt)if(Ft.call(Nt,se))if(xe=Nt[se],Pt(xe)&&(xe=xe.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&se.indexOf(this.stringify.convertAttKey)===0)fe=this.attribute(se.substr(this.stringify.convertAttKey.length),xe);else if(!this.options.separateArrayItems&&Array.isArray(xe)&&dt(xe))fe=this.dummy();else if(At(xe)&&dt(xe))fe=this.element(se);else if(!this.options.keepNullNodes&&xe==null)fe=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(xe))for(oe=0,Yt=xe.length;oe<Yt;oe++)Ut=xe[oe],Jt={},Jt[se]=Ut,fe=this.element(Jt);else At(xe)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&se.indexOf(this.stringify.convertTextKey)===0?fe=this.element(xe):(fe=this.element(se),fe.element(xe)):fe=this.element(se,xe)}else!this.options.keepNullNodes&&Wt===null?fe=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Nt.indexOf(this.stringify.convertTextKey)===0?fe=this.text(Wt):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Nt.indexOf(this.stringify.convertCDataKey)===0?fe=this.cdata(Wt):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Nt.indexOf(this.stringify.convertCommentKey)===0?fe=this.comment(Wt):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Nt.indexOf(this.stringify.convertRawKey)===0?fe=this.raw(Wt):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Nt.indexOf(this.stringify.convertPIKey)===0?fe=this.instruction(Nt.substr(this.stringify.convertPIKey.length),Wt):fe=this.node(Nt,Gt,Wt);if(fe==null)throw new Error("Could not create any elements with: "+Nt+". "+this.debugInfo());return fe},jt.prototype.insertBefore=function(Nt,Gt,Wt){var Jt,Ut,Ht,oe,se;if(Nt!=null&&Nt.type)return Ht=Nt,oe=Gt,Ht.setParent(this),oe?(Ut=children.indexOf(oe),se=children.splice(Ut),children.push(Ht),Array.prototype.push.apply(children,se)):children.push(Ht),Ht;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,Gt,Wt),Array.prototype.push.apply(this.parent.children,se),Jt},jt.prototype.insertAfter=function(Nt,Gt,Wt){var Jt,Ut,Ht;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Nt));return Ut=this.parent.children.indexOf(this),Ht=this.parent.children.splice(Ut+1),Jt=this.parent.element(Nt,Gt,Wt),Array.prototype.push.apply(this.parent.children,Ht),Jt},jt.prototype.remove=function(){var Nt,Gt;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(Gt=[])),this.parent},jt.prototype.node=function(Nt,Gt,Wt){var Jt,Ut;return Nt!=null&&(Nt=ut(Nt)),Gt||(Gt={}),Gt=ut(Gt),At(Gt)||(Ut=[Gt,Wt],Wt=Ut[0],Gt=Ut[1]),Jt=new xt(this,Nt,Gt),Wt!=null&&Jt.text(Wt),this.children.push(Jt),Jt},jt.prototype.text=function(Nt){var Gt;return At(Nt)&&this.element(Nt),Gt=new lt(this,Nt),this.children.push(Gt),this},jt.prototype.cdata=function(Nt){var Gt;return Gt=new kt(this,Nt),this.children.push(Gt),this},jt.prototype.comment=function(Nt){var Gt;return Gt=new bt(this,Nt),this.children.push(Gt),this},jt.prototype.commentBefore=function(Nt){var Gt,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt),Gt=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Jt),this},jt.prototype.commentAfter=function(Nt){var Gt,Wt,Jt;return Wt=this.parent.children.indexOf(this),Jt=this.parent.children.splice(Wt+1),Gt=this.parent.comment(Nt),Array.prototype.push.apply(this.parent.children,Jt),this},jt.prototype.raw=function(Nt){var Gt;return Gt=new it(this,Nt),this.children.push(Gt),this},jt.prototype.dummy=function(){var Nt;return Nt=new mt(this),Nt},jt.prototype.instruction=function(Nt,Gt){var Wt,Jt,Ut,Ht,oe;if(Nt!=null&&(Nt=ut(Nt)),Gt!=null&&(Gt=ut(Gt)),Array.isArray(Nt))for(Ht=0,oe=Nt.length;Ht<oe;Ht++)Wt=Nt[Ht],this.instruction(Wt);else if(At(Nt))for(Wt in Nt)Ft.call(Nt,Wt)&&(Jt=Nt[Wt],this.instruction(Wt,Jt));else Pt(Gt)&&(Gt=Gt.apply()),Ut=new at(this,Nt,Gt),this.children.push(Ut);return this},jt.prototype.instructionBefore=function(Nt,Gt){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt),Wt=this.parent.instruction(Nt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.instructionAfter=function(Nt,Gt){var Wt,Jt,Ut;return Jt=this.parent.children.indexOf(this),Ut=this.parent.children.splice(Jt+1),Wt=this.parent.instruction(Nt,Gt),Array.prototype.push.apply(this.parent.children,Ut),this},jt.prototype.declaration=function(Nt,Gt,Wt){var Jt,Ut;return Jt=this.document(),Ut=new St(Jt,Nt,Gt,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,Gt){var Wt,Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee;for(Jt=this.document(),Ut=new Tt(Jt,Nt,Gt),Yt=Jt.children,Ht=oe=0,fe=Yt.length;oe<fe;Ht=++oe)if(Wt=Yt[Ht],Wt.type===gt.DocType)return Jt.children[Ht]=Ut,Ut;for(ee=Jt.children,Ht=se=0,Pe=ee.length;se<Pe;Ht=++se)if(Wt=ee[Ht],Wt.isRoot)return Jt.children.splice(Ht,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 Gt;return Gt=Nt.root().clone(),Gt.parent=this,Gt.isRoot=!1,this.children.push(Gt),this},jt.prototype.debugInfo=function(Nt){var Gt,Wt;return Nt=Nt||this.name,Nt==null&&!((Gt=this.parent)!=null&&Gt.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,Gt,Wt){return this.element(Nt,Gt,Wt)},jt.prototype.nod=function(Nt,Gt,Wt){return this.node(Nt,Gt,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,Gt){return this.instruction(Nt,Gt)},jt.prototype.doc=function(){return this.document()},jt.prototype.dec=function(Nt,Gt,Wt){return this.declaration(Nt,Gt,Wt)},jt.prototype.e=function(Nt,Gt,Wt){return this.element(Nt,Gt,Wt)},jt.prototype.n=function(Nt,Gt,Wt){return this.node(Nt,Gt,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,Gt){return this.instruction(Nt,Gt)},jt.prototype.u=function(){return this.up()},jt.prototype.importXMLBuilder=function(Nt){return this.importDocument(Nt)},jt.prototype.replaceChild=function(Nt,Gt){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,Gt){return!0},jt.prototype.hasAttributes=function(){return this.attribs.length!==0},jt.prototype.compareDocumentPosition=function(Nt){var Gt,Wt;return Gt=this,Gt===Nt?0:this.document()!==Nt.document()?(Wt=vt.Disconnected|vt.ImplementationSpecific,Math.random()<.5?Wt|=vt.Preceding:Wt|=vt.Following,Wt):Gt.isAncestor(Nt)?vt.Contains|vt.Preceding:Gt.isDescendant(Nt)?vt.Contains|vt.Following:Gt.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 Gt,Wt,Jt;if(Nt.nodeType!==this.nodeType||Nt.children.length!==this.children.length)return!1;for(Gt=Wt=0,Jt=this.children.length-1;0<=Jt?Wt<=Jt:Wt>=Jt;Gt=0<=Jt?++Wt:--Wt)if(!this.children[Gt].isEqualNode(Nt.children[Gt]))return!1;return!0},jt.prototype.getFeature=function(Nt,Gt){throw new Error("This DOM method is not implemented."+this.debugInfo())},jt.prototype.setUserData=function(Nt,Gt,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 Gt,Wt,Jt,Ut,Ht;for(Ht=this.children,Jt=0,Ut=Ht.length;Jt<Ut;Jt++)if(Gt=Ht[Jt],Nt===Gt||(Wt=Gt.isDescendant(Nt),Wt))return!0;return!1},jt.prototype.isAncestor=function(Nt){return Nt.isDescendant(this)},jt.prototype.isPreceding=function(Nt){var Gt,Wt;return Gt=this.treePosition(Nt),Wt=this.treePosition(this),Gt===-1||Wt===-1?!1:Gt<Wt},jt.prototype.isFollowing=function(Nt){var Gt,Wt;return Gt=this.treePosition(Nt),Wt=this.treePosition(this),Gt===-1||Wt===-1?!1:Gt>Wt},jt.prototype.treePosition=function(Nt){var Gt,Wt;return Wt=0,Gt=!1,this.foreachTreeNode(this.document(),function(Jt){if(Wt++,!Gt&&Jt===Nt)return Gt=!0}),Gt?Wt:-1},jt.prototype.foreachTreeNode=function(Nt,Gt){var Wt,Jt,Ut,Ht,oe;for(Nt||(Nt=this.document()),Ht=Nt.children,Jt=0,Ut=Ht.length;Jt<Ut;Jt++){if(Wt=Ht[Jt],oe=Gt(Wt))return oe;if(oe=this.foreachTreeNode(Wt,Gt),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,_t,Bt){(function(){var vt;_t.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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLNode"),_t.exports=kt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St=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"),bt=ot("./XMLWriterBase"),gt=ot("./WriterState"),_t.exports=kt=function(mt){St(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,Pt,At,Dt;for(Pt=ft.children,at=it=0,ut=Pt.length;it<ut;at=++it)tt=Pt[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,Pt,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&<===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,Pt=jt.length;dt<Pt;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}(bt)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ot,_t,Bt){(function(){var vt,gt,kt=function(St,Tt){for(var mt in Tt)bt.call(Tt,mt)&&(St[mt]=Tt[mt]);function xt(){this.constructor=St}return xt.prototype=Tt.prototype,St.prototype=new xt,St.__super__=Tt.prototype,St},bt={}.hasOwnProperty;gt=ot("./XMLWriterBase"),_t.exports=vt=function(St){kt(Tt,St);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,_t,Bt){(function(){var vt,gt=function(bt,St){return function(){return bt.apply(St,arguments)}},kt={}.hasOwnProperty;_t.exports=vt=function(){function bt(St){this.assertLegalName=gt(this.assertLegalName,this),this.assertLegalChar=gt(this.assertLegalChar,this);var Tt,mt,xt;St||(St={}),this.options=St,this.options.version||(this.options.version="1.0"),mt=St.stringify||{};for(Tt in mt)kt.call(mt,Tt)&&(xt=mt[Tt],this[Tt]=xt)}return bt.prototype.name=function(St){return this.options.noValidation?St:this.assertLegalName(""+St||"")},bt.prototype.text=function(St){return this.options.noValidation?St:this.assertLegalChar(this.textEscape(""+St||""))},bt.prototype.cdata=function(St){return this.options.noValidation?St:(St=""+St||"",St=St.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(St))},bt.prototype.comment=function(St){if(this.options.noValidation)return St;if(St=""+St||"",St.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+St);return this.assertLegalChar(St)},bt.prototype.raw=function(St){return this.options.noValidation?St:""+St||""},bt.prototype.attValue=function(St){return this.options.noValidation?St:this.assertLegalChar(this.attEscape(St=""+St||""))},bt.prototype.insTarget=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.insValue=function(St){if(this.options.noValidation)return St;if(St=""+St||"",St.match(/\?>/))throw new Error("Invalid processing instruction value: "+St);return this.assertLegalChar(St)},bt.prototype.xmlVersion=function(St){if(this.options.noValidation)return St;if(St=""+St||"",!St.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+St);return St},bt.prototype.xmlEncoding=function(St){if(this.options.noValidation)return St;if(St=""+St||"",!St.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+St);return this.assertLegalChar(St)},bt.prototype.xmlStandalone=function(St){return this.options.noValidation?St:St?"yes":"no"},bt.prototype.dtdPubID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdSysID=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdElementValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdAttType=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdAttDefault=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdEntityValue=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.dtdNData=function(St){return this.options.noValidation?St:this.assertLegalChar(""+St||"")},bt.prototype.convertAttKey="@",bt.prototype.convertPIKey="?",bt.prototype.convertTextKey="#text",bt.prototype.convertCDataKey="#cdata",bt.prototype.convertCommentKey="#comment",bt.prototype.convertRawKey="#raw",bt.prototype.assertLegalChar=function(St){var Tt,mt;if(this.options.noValidation)return St;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=St.match(Tt))throw new Error("Invalid character in string: "+St+" at index "+mt.index)}else if(this.options.version==="1.1"&&(Tt=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mt=St.match(Tt)))throw new Error("Invalid character in string: "+St+" at index "+mt.index);return St},bt.prototype.assertLegalName=function(St){var Tt;if(this.options.noValidation)return St;if(this.assertLegalChar(St),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])*$/,!St.match(Tt))throw new Error("Invalid character in name");return St},bt.prototype.textEscape=function(St){var Tt;return this.options.noValidation?St:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,St.replace(Tt,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},bt.prototype.attEscape=function(St){var Tt;return this.options.noValidation?St:(Tt=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,St.replace(Tt,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},bt}()}).call(this)},{}],457:[function(ot,_t,Bt){(function(){var vt,gt,kt,bt=function(Tt,mt){for(var xt in mt)St.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},St={}.hasOwnProperty;vt=ot("./NodeType"),gt=ot("./XMLCharacterData"),_t.exports=kt=function(Tt){bt(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,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z,tt,at,it,lt,ut,dt,Pt,At={}.hasOwnProperty;Pt=ot("./Utility").assign,vt=ot("./NodeType"),ft=ot("./XMLDeclaration"),z=ot("./XMLDocType"),kt=ot("./XMLCData"),bt=ot("./XMLComment"),at=ot("./XMLElement"),lt=ot("./XMLRaw"),ut=ot("./XMLText"),it=ot("./XMLProcessingInstruction"),tt=ot("./XMLDummy"),St=ot("./XMLDTDAttList"),Tt=ot("./XMLDTDElement"),mt=ot("./XMLDTDEntity"),xt=ot("./XMLDTDNotation"),gt=ot("./WriterState"),_t.exports=dt=function(){function Dt(Ft){var jt,Nt,Gt;Ft||(Ft={}),this.options=Ft,Nt=Ft.writer||{};for(jt in Nt)At.call(Nt,jt)&&(Gt=Nt[jt],this["_"+jt]=this[jt],this[jt]=Gt)}return Dt.prototype.filterOptions=function(Ft){var jt,Nt,Gt,Wt,Jt,Ut,Ht,oe;return Ft||(Ft={}),Ft=Pt({},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=(Gt=Ft.newline)!=null?Gt:`
|
|
`,jt.offset=(Wt=Ft.offset)!=null?Wt:0,jt.dontPrettyTextNodes=(Jt=(Ut=Ft.dontPrettyTextNodes)!=null?Ut:Ft.dontprettytextnodes)!=null?Jt:0,jt.spaceBeforeSlash=(Ht=(oe=Ft.spaceBeforeSlash)!=null?oe:Ft.spacebeforeslash)!=null?Ht:"",jt.spaceBeforeSlash===!0&&(jt.spaceBeforeSlash=" "),jt.suppressPrettyCount=0,jt.user={},jt.state=gt.None,jt},Dt.prototype.indent=function(Ft,jt,Nt){var Gt;return!jt.pretty||jt.suppressPrettyCount?"":jt.pretty&&(Gt=(Nt||0)+jt.offset+1,Gt>0)?new Array(Gt).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 Gt;return this.openAttribute(Ft,jt,Nt),Gt=" "+Ft.name+'="'+Ft.value+'"',this.closeAttribute(Ft,jt,Nt),Gt},Dt.prototype.cdata=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<![CDATA[",jt.state=gt.InsideTag,Gt+=Ft.value,jt.state=gt.CloseTag,Gt+="]]>"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.comment=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<!-- ",jt.state=gt.InsideTag,Gt+=Ft.value,jt.state=gt.CloseTag,Gt+=" -->"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.declaration=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<?xml",jt.state=gt.InsideTag,Gt+=' version="'+Ft.version+'"',Ft.encoding!=null&&(Gt+=' encoding="'+Ft.encoding+'"'),Ft.standalone!=null&&(Gt+=' standalone="'+Ft.standalone+'"'),jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+"?>",Gt+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.docType=function(Ft,jt,Nt){var Gt,Wt,Jt,Ut,Ht;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,Ht=Ft.children,Wt=0,Jt=Ht.length;Wt<Jt;Wt++)Gt=Ht[Wt],Ut+=this.writeChildNode(Gt,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 Gt,Wt,Jt,Ut,Ht,oe,se,fe,Pe,Yt,ee,ye,xe,be;Nt||(Nt=0),Yt=!1,ee="",this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,ee+=this.indent(Ft,jt,Nt)+"<"+Ft.name,ye=Ft.attribs;for(Pe in ye)At.call(ye,Pe)&&(Gt=ye[Pe],ee+=this.attribute(Gt,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?(ee+=">",jt.state=gt.CloseTag,ee+="</"+Ft.name+">"+this.endline(Ft,jt,Nt)):(jt.state=gt.CloseTag,ee+=jt.spaceBeforeSlash+"/>"+this.endline(Ft,jt,Nt));else if(jt.pretty&&Jt===1&&(Ut.type===vt.Text||Ut.type===vt.Raw)&&Ut.value!=null)ee+=">",jt.state=gt.InsideTag,jt.suppressPrettyCount++,Yt=!0,ee+=this.writeChildNode(Ut,jt,Nt+1),jt.suppressPrettyCount--,Yt=!1,jt.state=gt.CloseTag,ee+="</"+Ft.name+">"+this.endline(Ft,jt,Nt);else{if(jt.dontPrettyTextNodes){for(xe=Ft.children,Ht=0,se=xe.length;Ht<se;Ht++)if(Wt=xe[Ht],(Wt.type===vt.Text||Wt.type===vt.Raw)&&Wt.value!=null){jt.suppressPrettyCount++,Yt=!0;break}}for(ee+=">"+this.endline(Ft,jt,Nt),jt.state=gt.InsideTag,be=Ft.children,oe=0,fe=be.length;oe<fe;oe++)Wt=be[oe],ee+=this.writeChildNode(Wt,jt,Nt+1);jt.state=gt.CloseTag,ee+=this.indent(Ft,jt,Nt)+"</"+Ft.name+">",Yt&&jt.suppressPrettyCount--,ee+=this.endline(Ft,jt,Nt),jt.state=gt.None}return this.closeNode(Ft,jt,Nt),ee},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 Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<?",jt.state=gt.InsideTag,Gt+=Ft.target,Ft.value&&(Gt+=" "+Ft.value),jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+"?>",Gt+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.raw=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt),jt.state=gt.InsideTag,Gt+=Ft.value,jt.state=gt.CloseTag,Gt+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.text=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt),jt.state=gt.InsideTag,Gt+=Ft.value,jt.state=gt.CloseTag,Gt+=this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.dtdAttList=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<!ATTLIST",jt.state=gt.InsideTag,Gt+=" "+Ft.elementName+" "+Ft.attributeName+" "+Ft.attributeType,Ft.defaultValueType!=="#DEFAULT"&&(Gt+=" "+Ft.defaultValueType),Ft.defaultValue&&(Gt+=' "'+Ft.defaultValue+'"'),jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.dtdElement=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<!ELEMENT",jt.state=gt.InsideTag,Gt+=" "+Ft.name+" "+Ft.value,jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.dtdEntity=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<!ENTITY",jt.state=gt.InsideTag,Ft.pe&&(Gt+=" %"),Gt+=" "+Ft.name,Ft.value?Gt+=' "'+Ft.value+'"':(Ft.pubID&&Ft.sysID?Gt+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.sysID&&(Gt+=' SYSTEM "'+Ft.sysID+'"'),Ft.nData&&(Gt+=" NDATA "+Ft.nData)),jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},Dt.prototype.dtdNotation=function(Ft,jt,Nt){var Gt;return this.openNode(Ft,jt,Nt),jt.state=gt.OpenTag,Gt=this.indent(Ft,jt,Nt)+"<!NOTATION",jt.state=gt.InsideTag,Gt+=" "+Ft.name,Ft.pubID&&Ft.sysID?Gt+=' PUBLIC "'+Ft.pubID+'" "'+Ft.sysID+'"':Ft.pubID?Gt+=' PUBLIC "'+Ft.pubID+'"':Ft.sysID&&(Gt+=' SYSTEM "'+Ft.sysID+'"'),jt.state=gt.CloseTag,Gt+=jt.spaceBeforeSlash+">"+this.endline(Ft,jt,Nt),jt.state=gt.None,this.closeNode(Ft,jt,Nt),Gt},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,_t,Bt){(function(){var vt,gt,kt,bt,St,Tt,mt,xt,ft,z;z=ot("./Utility"),xt=z.assign,ft=z.isFunction,kt=ot("./XMLDOMImplementation"),bt=ot("./XMLDocument"),St=ot("./XMLDocumentCB"),mt=ot("./XMLStringWriter"),Tt=ot("./XMLStreamWriter"),vt=ot("./NodeType"),gt=ot("./WriterState"),_t.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 bt(lt),dt=ut.element(tt),lt.headless||(ut.declaration(lt),(lt.pubID!=null||lt.sysID!=null)&&ut.dtd(lt)),dt},_t.exports.begin=function(tt,at,it){var lt;return ft(tt)&&(lt=[tt,at],at=lt[0],it=lt[1],tt={}),at?new St(tt,at,it):new bt(tt)},_t.exports.stringWriter=function(tt){return new mt(tt)},_t.exports.streamWriter=function(tt,at){return new Tt(tt,at)},_t.exports.implementation=new kt,_t.exports.nodeType=vt,_t.exports.writerState=gt}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ot,_t,Bt){_t.exports=gt;var vt=Object.prototype.hasOwnProperty;function gt(){for(var kt={},bt=0;bt<arguments.length;bt++){var St=arguments[bt];for(var Tt in St)vt.call(St,Tt)&&(kt[Tt]=St[Tt])}return kt}},{}],461:[function(ot,_t,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"),bt={sha1:gt,md5:kt},St=64,Tt=vt.alloc(St);Tt.fill(0);function mt(z,tt,at){vt.isBuffer(tt)||(tt=vt.from(tt)),vt.isBuffer(at)||(at=vt.from(at)),tt.length>St?tt=z(tt):tt.length<St&&(tt=vt.concat([tt,Tt],St));for(var it=vt.alloc(St),lt=vt.alloc(St),ut=0;ut<St;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=bt[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 Pt=vt.concat(it),At=tt?mt(at,tt,Pt):at(Pt);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,_t,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 bt=8;function St(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(St(xt,tt),xt.length*bt);return Tt(at,z,tt)}_t.exports={hash:mt}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ot,_t,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,Pt=0;Pt<tt.length;Pt+=16){var At=it,Dt=lt,Ft=ut,jt=dt;it=St(it,lt,ut,dt,tt[Pt+0],7,-680876936),dt=St(dt,it,lt,ut,tt[Pt+1],12,-389564586),ut=St(ut,dt,it,lt,tt[Pt+2],17,606105819),lt=St(lt,ut,dt,it,tt[Pt+3],22,-1044525330),it=St(it,lt,ut,dt,tt[Pt+4],7,-176418897),dt=St(dt,it,lt,ut,tt[Pt+5],12,1200080426),ut=St(ut,dt,it,lt,tt[Pt+6],17,-1473231341),lt=St(lt,ut,dt,it,tt[Pt+7],22,-45705983),it=St(it,lt,ut,dt,tt[Pt+8],7,1770035416),dt=St(dt,it,lt,ut,tt[Pt+9],12,-1958414417),ut=St(ut,dt,it,lt,tt[Pt+10],17,-42063),lt=St(lt,ut,dt,it,tt[Pt+11],22,-1990404162),it=St(it,lt,ut,dt,tt[Pt+12],7,1804603682),dt=St(dt,it,lt,ut,tt[Pt+13],12,-40341101),ut=St(ut,dt,it,lt,tt[Pt+14],17,-1502002290),lt=St(lt,ut,dt,it,tt[Pt+15],22,1236535329),it=Tt(it,lt,ut,dt,tt[Pt+1],5,-165796510),dt=Tt(dt,it,lt,ut,tt[Pt+6],9,-1069501632),ut=Tt(ut,dt,it,lt,tt[Pt+11],14,643717713),lt=Tt(lt,ut,dt,it,tt[Pt+0],20,-373897302),it=Tt(it,lt,ut,dt,tt[Pt+5],5,-701558691),dt=Tt(dt,it,lt,ut,tt[Pt+10],9,38016083),ut=Tt(ut,dt,it,lt,tt[Pt+15],14,-660478335),lt=Tt(lt,ut,dt,it,tt[Pt+4],20,-405537848),it=Tt(it,lt,ut,dt,tt[Pt+9],5,568446438),dt=Tt(dt,it,lt,ut,tt[Pt+14],9,-1019803690),ut=Tt(ut,dt,it,lt,tt[Pt+3],14,-187363961),lt=Tt(lt,ut,dt,it,tt[Pt+8],20,1163531501),it=Tt(it,lt,ut,dt,tt[Pt+13],5,-1444681467),dt=Tt(dt,it,lt,ut,tt[Pt+2],9,-51403784),ut=Tt(ut,dt,it,lt,tt[Pt+7],14,1735328473),lt=Tt(lt,ut,dt,it,tt[Pt+12],20,-1926607734),it=mt(it,lt,ut,dt,tt[Pt+5],4,-378558),dt=mt(dt,it,lt,ut,tt[Pt+8],11,-2022574463),ut=mt(ut,dt,it,lt,tt[Pt+11],16,1839030562),lt=mt(lt,ut,dt,it,tt[Pt+14],23,-35309556),it=mt(it,lt,ut,dt,tt[Pt+1],4,-1530992060),dt=mt(dt,it,lt,ut,tt[Pt+4],11,1272893353),ut=mt(ut,dt,it,lt,tt[Pt+7],16,-155497632),lt=mt(lt,ut,dt,it,tt[Pt+10],23,-1094730640),it=mt(it,lt,ut,dt,tt[Pt+13],4,681279174),dt=mt(dt,it,lt,ut,tt[Pt+0],11,-358537222),ut=mt(ut,dt,it,lt,tt[Pt+3],16,-722521979),lt=mt(lt,ut,dt,it,tt[Pt+6],23,76029189),it=mt(it,lt,ut,dt,tt[Pt+9],4,-640364487),dt=mt(dt,it,lt,ut,tt[Pt+12],11,-421815835),ut=mt(ut,dt,it,lt,tt[Pt+15],16,530742520),lt=mt(lt,ut,dt,it,tt[Pt+2],23,-995338651),it=xt(it,lt,ut,dt,tt[Pt+0],6,-198630844),dt=xt(dt,it,lt,ut,tt[Pt+7],10,1126891415),ut=xt(ut,dt,it,lt,tt[Pt+14],15,-1416354905),lt=xt(lt,ut,dt,it,tt[Pt+5],21,-57434055),it=xt(it,lt,ut,dt,tt[Pt+12],6,1700485571),dt=xt(dt,it,lt,ut,tt[Pt+3],10,-1894986606),ut=xt(ut,dt,it,lt,tt[Pt+10],15,-1051523),lt=xt(lt,ut,dt,it,tt[Pt+1],21,-2054922799),it=xt(it,lt,ut,dt,tt[Pt+8],6,1873313359),dt=xt(dt,it,lt,ut,tt[Pt+15],10,-30611744),ut=xt(ut,dt,it,lt,tt[Pt+6],15,-1560198380),lt=xt(lt,ut,dt,it,tt[Pt+13],21,1309151649),it=xt(it,lt,ut,dt,tt[Pt+4],6,-145523070),dt=xt(dt,it,lt,ut,tt[Pt+11],10,-1120210379),ut=xt(ut,dt,it,lt,tt[Pt+2],15,718787259),lt=xt(lt,ut,dt,it,tt[Pt+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 bt(tt,at,it,lt,ut,dt){return ft(z(ft(ft(at,tt),ft(lt,dt)),ut),it)}function St(tt,at,it,lt,ut,dt,Pt){return bt(at&it|~at<,tt,at,ut,dt,Pt)}function Tt(tt,at,it,lt,ut,dt,Pt){return bt(at<|it&~lt,tt,at,ut,dt,Pt)}function mt(tt,at,it,lt,ut,dt,Pt){return bt(at^it^lt,tt,at,ut,dt,Pt)}function xt(tt,at,it,lt,ut,dt,Pt){return bt(it^(at|~lt),tt,at,ut,dt,Pt)}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}_t.exports=function(at){return vt.hash(at,kt,16)}},{"./helpers":462}],464:[function(ot,_t,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,Pt=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=St(St(Tt(z,5),kt(jt,tt,at,it)),St(St(lt,ft[jt]),bt(jt)));lt=it,it=at,at=Tt(tt,30),tt=z,z=Nt}z=St(z,dt),tt=St(tt,Pt),at=St(at,At),it=St(it,Dt),lt=St(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 bt(mt){return mt<20?1518500249:mt<40?1859775393:mt<60?-1894007588:-899497514}function St(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}_t.exports=function(xt){return vt.hash(xt,gt,20,!0)}},{"./helpers":462}],465:[function(ot,_t,Bt){"use strict";_t.exports=function(){return function(){}}},{}],466:[function(ot,_t,Bt){(function(vt){(function(){"use strict";var gt=ot("@babel/runtime/helpers/interopRequireDefault"),kt=gt(ot("@babel/runtime/helpers/typeof")),bt=ot("stream"),St=bt.Stream,Tt=ot("../lib/common/utils/isArray"),mt=Tt.isArray;_t.exports.string=function(z){return typeof z=="string"},_t.exports.array=mt,_t.exports.buffer=vt.isBuffer;function xt(ft){return ft instanceof St}_t.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,_t,Bt){"use strict";var vt=ot("immediate"),gt=_t.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(bt){return[]},gt.binding=function(bt){throw new Error("process.binding is not supported")},gt.cwd=function(){return"/"},gt.chdir=function(bt){throw new Error("process.chdir is not supported")},gt.umask=function(){return 0}},{immediate:358}],468:[function(ot,_t,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"),bt=ot("xtend"),St=ot("builtin-status-codes"),Tt=ot("url"),mt=Bt;mt.request=function(xt,ft){typeof xt=="string"?xt=Tt.parse(xt):xt=bt(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=St,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 cn!="undefined"?cn: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,_t,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 bt(xt){var ft=kt();if(!ft)return!1;try{return ft.responseType=xt,ft.responseType===xt}catch(z){}return!1}var St=typeof vt.ArrayBuffer!="undefined",Tt=St&&mt(vt.ArrayBuffer.prototype.slice);Bt.arraybuffer=Bt.fetch||St&&bt("arraybuffer"),Bt.msstream=!Bt.fetch&&Tt&&bt("ms-stream"),Bt.mozchunkedarraybuffer=!Bt.fetch&&St&&bt("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 cn!="undefined"?cn: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,_t,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 bt=ot("./capability"),St=ot("inherits"),Tt=ot("./response"),mt=ot("readable-stream"),xt=ot("to-arraybuffer"),ft=Tt.IncomingMessage,z=Tt.readyStates;function tt(ut,dt){return bt.fetch&&dt?"fetch":bt.mozchunkedarraybuffer?"moz-chunked-arraybuffer":bt.msstream?"ms-stream":bt.arraybuffer&&ut?"arraybuffer":bt.vbArray&&ut?"text:vbarray":"text"}var at=_t.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 Pt,At=!0;if(ut.mode==="disable-fetch"||"requestTimeout"in ut&&!bt.abortController)At=!1,Pt=!0;else if(ut.mode==="prefer-streaming")Pt=!1;else if(ut.mode==="allow-wrong-content-type")Pt=!bt.overrideMimeType;else if(!ut.mode||ut.mode==="default"||ut.mode==="prefer-fast")Pt=!0;else throw new Error("Invalid value for opts.mode");dt._mode=tt(Pt,At),dt._fetchTimer=null,dt.on("finish",function(){dt._onFinish()})};St(at,mt.Writable),at.prototype.setHeader=function(ut,dt){var Pt=this,At=ut.toLowerCase();lt.indexOf(At)===-1&&(Pt._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,Pt=ut._headers,At=null;dt.method!=="GET"&&dt.method!=="HEAD"&&(bt.arraybuffer?At=xt(kt.concat(ut._body)):bt.blobConstructor?At=new gt.Blob(ut._body.map(function(Wt){return xt(Wt)}),{type:(Pt["content-type"]||{}).value||""}):At=kt.concat(ut._body).toString());var Dt=[];if(Object.keys(Pt).forEach(function(Wt){var Jt=Pt[Wt].name,Ut=Pt[Wt].value;Array.isArray(Ut)?Ut.forEach(function(Ht){Dt.push([Jt,Ht])}):Dt.push([Jt,Ut])}),ut._mode==="fetch"){var Ft=null,jt=null;if(bt.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 Gt=ut._xhr=new gt.XMLHttpRequest;try{Gt.open(ut._opts.method,ut._opts.url,!0)}catch(Wt){vt.nextTick(function(){ut.emit("error",Wt)});return}"responseType"in Gt&&(Gt.responseType=ut._mode.split(":")[0]),"withCredentials"in Gt&&(Gt.withCredentials=!!dt.withCredentials),ut._mode==="text"&&"overrideMimeType"in Gt&&Gt.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in dt&&(Gt.timeout=dt.requestTimeout,Gt.ontimeout=function(){ut.emit("requestTimeout")}),Dt.forEach(function(Wt){Gt.setRequestHeader(Wt[0],Wt[1])}),ut._response=null,Gt.onreadystatechange=function(){switch(Gt.readyState){case z.LOADING:case z.DONE:ut._onXHRProgress();break}},ut._mode==="moz-chunked-arraybuffer"&&(Gt.onprogress=function(){ut._onXHRProgress()}),Gt.onerror=function(){ut._destroyed||ut.emit("error",new Error("XHR error"))};try{Gt.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(Pt){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,Pt){var At=this;At._body.push(ut),Pt()},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,Pt){var At=this;typeof ut=="function"&&(Pt=ut,ut=void 0),mt.Writable.prototype.end.call(At,ut,dt,Pt)},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 cn!="undefined"?cn: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,_t,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 bt=ot("./capability"),St=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)}),bt.writableStream){var ut=new WritableStream({write:function(jt){return new Promise(function(Nt,Gt){it._destroyed?Gt():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 Pt=ft.getAllResponseHeaders().split(/\r?\n/);if(Pt.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",!bt.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")}}};St(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 cn!="undefined"?cn: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,_t,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"),bt=ot("./util");Bt.parse=jt,Bt.resolve=Gt,Bt.resolveObject=Wt,Bt.format=Nt,Bt.Url=St;function St(){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})(.*)$/,Pt={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,Ht){if(Jt&&bt.isObject(Jt)&&Jt instanceof St)return Jt;var oe=new St;return oe.parse(Jt,Ut,Ht),oe}St.prototype.parse=function(Jt,Ut,Ht){if(!bt.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("#")?"?":"#",fe=Jt.split(se),Pe=/\\/g;fe[0]=fe[0].replace(Pe,"/"),Jt=fe.join(se);var Yt=Jt;if(Yt=Yt.trim(),!Ht&&Jt.split("#").length===1){var ee=xt.exec(Yt);if(ee)return this.path=Yt,this.href=Yt,this.pathname=ee[1],ee[2]?(this.search=ee[2],Ut?this.query=Ft.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ut&&(this.search="",this.query={}),this}var ye=Tt.exec(Yt);if(ye){ye=ye[0];var xe=ye.toLowerCase();this.protocol=xe,Yt=Yt.substr(ye.length)}if(Ht||ye||Yt.match(/^\/\/[^@\/]+@[^@\/]+/)){var be=Yt.substr(0,2)==="//";be&&!(ye&&At[ye])&&(Yt=Yt.substr(2),this.slashes=!0)}if(!At[ye]&&(be||ye&&!Dt[ye])){for(var ce=-1,pe=0;pe<it.length;pe++){var he=Yt.indexOf(it[pe]);he!==-1&&(ce===-1||he<ce)&&(ce=he)}var Ce,de;ce===-1?de=Yt.lastIndexOf("@"):de=Yt.lastIndexOf("@",ce),de!==-1&&(Ce=Yt.slice(0,de),Yt=Yt.slice(de+1),this.auth=decodeURIComponent(Ce)),ce=-1;for(var pe=0;pe<at.length;pe++){var he=Yt.indexOf(at[pe]);he!==-1&&(ce===-1||he<ce)&&(ce=he)}ce===-1&&(ce=Yt.length),this.host=Yt.slice(0,ce),Yt=Yt.slice(ce),this.parseHost(),this.hostname=this.hostname||"";var Fe=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Fe)for(var ge=this.hostname.split("."),pe=0,Se=ge.length;pe<Se;pe++){var re=ge[pe];if(re&&!re.match(ut)){for(var Kt="",wt=0,Lt=re.length;wt<Lt;wt++)re.charCodeAt(wt)>127?Kt+="x":Kt+=re[wt];if(!Kt.match(ut)){var Xt=ge.slice(0,pe),ne=ge.slice(pe+1),It=re.match(dt);It&&(Xt.push(It[1]),ne.unshift(It[2])),ne.length&&(Yt="/"+ne.join(".")+Yt),this.hostname=Xt.join(".");break}}}this.hostname.length>lt?this.hostname="":this.hostname=this.hostname.toLowerCase(),Fe||(this.hostname=kt.toASCII(this.hostname));var Rt=this.port?":"+this.port:"",Vt=this.hostname||"";this.host=Vt+Rt,this.href+=this.host,Fe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Yt[0]!=="/"&&(Yt="/"+Yt))}if(!Pt[xe])for(var pe=0,Se=tt.length;pe<Se;pe++){var $t=tt[pe];if(Yt.indexOf($t)!==-1){var ue=encodeURIComponent($t);ue===$t&&(ue=escape($t)),Yt=Yt.split($t).join(ue)}}var me=Yt.indexOf("#");me!==-1&&(this.hash=Yt.substr(me),Yt=Yt.slice(0,me));var Le=Yt.indexOf("?");if(Le!==-1?(this.search=Yt.substr(Le),this.query=Yt.substr(Le+1),Ut&&(this.query=Ft.parse(this.query)),Yt=Yt.slice(0,Le)):Ut&&(this.search="",this.query={}),Yt&&(this.pathname=Yt),Dt[xe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Rt=this.pathname||"",Ne=this.search||"";this.path=Rt+Ne}return this.href=this.format(),this};function Nt(Jt){return bt.isString(Jt)&&(Jt=jt(Jt)),Jt instanceof St?Jt.format():St.prototype.format.call(Jt)}St.prototype.format=function(){var Jt=this.auth||"";Jt&&(Jt=encodeURIComponent(Jt),Jt=Jt.replace(/%3A/i,":"),Jt+="@");var Ut=this.protocol||"",Ht=this.pathname||"",oe=this.hash||"",se=!1,fe="";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&&bt.isObject(this.query)&&Object.keys(this.query).length&&(fe=Ft.stringify(this.query));var Pe=this.search||fe&&"?"+fe||"";return Ut&&Ut.substr(-1)!==":"&&(Ut+=":"),this.slashes||(!Ut||Dt[Ut])&&se!==!1?(se="//"+(se||""),Ht&&Ht.charAt(0)!=="/"&&(Ht="/"+Ht)):se||(se=""),oe&&oe.charAt(0)!=="#"&&(oe="#"+oe),Pe&&Pe.charAt(0)!=="?"&&(Pe="?"+Pe),Ht=Ht.replace(/[?#]/g,function(Yt){return encodeURIComponent(Yt)}),Pe=Pe.replace("#","%23"),Ut+se+Ht+Pe+oe};function Gt(Jt,Ut){return jt(Jt,!1,!0).resolve(Ut)}St.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}St.prototype.resolveObject=function(Jt){if(bt.isString(Jt)){var Ut=new St;Ut.parse(Jt,!1,!0),Jt=Ut}for(var Ht=new St,oe=Object.keys(this),se=0;se<oe.length;se++){var fe=oe[se];Ht[fe]=this[fe]}if(Ht.hash=Jt.hash,Jt.href==="")return Ht.href=Ht.format(),Ht;if(Jt.slashes&&!Jt.protocol){for(var Pe=Object.keys(Jt),Yt=0;Yt<Pe.length;Yt++){var ee=Pe[Yt];ee!=="protocol"&&(Ht[ee]=Jt[ee])}return Dt[Ht.protocol]&&Ht.hostname&&!Ht.pathname&&(Ht.path=Ht.pathname="/"),Ht.href=Ht.format(),Ht}if(Jt.protocol&&Jt.protocol!==Ht.protocol){if(!Dt[Jt.protocol]){for(var ye=Object.keys(Jt),xe=0;xe<ye.length;xe++){var be=ye[xe];Ht[be]=Jt[be]}return Ht.href=Ht.format(),Ht}if(Ht.protocol=Jt.protocol,!Jt.host&&!At[Jt.protocol]){for(var Se=(Jt.pathname||"").split("/");Se.length&&!(Jt.host=Se.shift()););Jt.host||(Jt.host=""),Jt.hostname||(Jt.hostname=""),Se[0]!==""&&Se.unshift(""),Se.length<2&&Se.unshift(""),Ht.pathname=Se.join("/")}else Ht.pathname=Jt.pathname;if(Ht.search=Jt.search,Ht.query=Jt.query,Ht.host=Jt.host||"",Ht.auth=Jt.auth,Ht.hostname=Jt.hostname||Jt.host,Ht.port=Jt.port,Ht.pathname||Ht.search){var ce=Ht.pathname||"",pe=Ht.search||"";Ht.path=ce+pe}return Ht.slashes=Ht.slashes||Jt.slashes,Ht.href=Ht.format(),Ht}var he=Ht.pathname&&Ht.pathname.charAt(0)==="/",Ce=Jt.host||Jt.pathname&&Jt.pathname.charAt(0)==="/",de=Ce||he||Ht.host&&Jt.pathname,Fe=de,ge=Ht.pathname&&Ht.pathname.split("/")||[],Se=Jt.pathname&&Jt.pathname.split("/")||[],re=Ht.protocol&&!Dt[Ht.protocol];if(re&&(Ht.hostname="",Ht.port=null,Ht.host&&(ge[0]===""?ge[0]=Ht.host:ge.unshift(Ht.host)),Ht.host="",Jt.protocol&&(Jt.hostname=null,Jt.port=null,Jt.host&&(Se[0]===""?Se[0]=Jt.host:Se.unshift(Jt.host)),Jt.host=null),de=de&&(Se[0]===""||ge[0]==="")),Ce)Ht.host=Jt.host||Jt.host===""?Jt.host:Ht.host,Ht.hostname=Jt.hostname||Jt.hostname===""?Jt.hostname:Ht.hostname,Ht.search=Jt.search,Ht.query=Jt.query,ge=Se;else if(Se.length)ge||(ge=[]),ge.pop(),ge=ge.concat(Se),Ht.search=Jt.search,Ht.query=Jt.query;else if(!bt.isNullOrUndefined(Jt.search)){if(re){Ht.hostname=Ht.host=ge.shift();var Kt=Ht.host&&Ht.host.indexOf("@")>0?Ht.host.split("@"):!1;Kt&&(Ht.auth=Kt.shift(),Ht.host=Ht.hostname=Kt.shift())}return Ht.search=Jt.search,Ht.query=Jt.query,(!bt.isNull(Ht.pathname)||!bt.isNull(Ht.search))&&(Ht.path=(Ht.pathname?Ht.pathname:"")+(Ht.search?Ht.search:"")),Ht.href=Ht.format(),Ht}if(!ge.length)return Ht.pathname=null,Ht.search?Ht.path="/"+Ht.search:Ht.path=null,Ht.href=Ht.format(),Ht;for(var wt=ge.slice(-1)[0],Lt=(Ht.host||Jt.host||ge.length>1)&&(wt==="."||wt==="..")||wt==="",Xt=0,ne=ge.length;ne>=0;ne--)wt=ge[ne],wt==="."?ge.splice(ne,1):wt===".."?(ge.splice(ne,1),Xt++):Xt&&(ge.splice(ne,1),Xt--);if(!de&&!Fe)for(;Xt--;Xt)ge.unshift("..");de&&ge[0]!==""&&(!ge[0]||ge[0].charAt(0)!=="/")&&ge.unshift(""),Lt&&ge.join("/").substr(-1)!=="/"&&ge.push("");var It=ge[0]===""||ge[0]&&ge[0].charAt(0)==="/";if(re){Ht.hostname=Ht.host=It?"":ge.length?ge.shift():"";var Kt=Ht.host&&Ht.host.indexOf("@")>0?Ht.host.split("@"):!1;Kt&&(Ht.auth=Kt.shift(),Ht.host=Ht.hostname=Kt.shift())}return de=de||Ht.host&&ge.length,de&&!It&&ge.unshift(""),ge.length?Ht.pathname=ge.join("/"):(Ht.pathname=null,Ht.path=null),(!bt.isNull(Ht.pathname)||!bt.isNull(Ht.search))&&(Ht.path=(Ht.pathname?Ht.pathname:"")+(Ht.search?Ht.search:"")),Ht.auth=Jt.auth||Ht.auth,Ht.slashes=Ht.slashes||Jt.slashes,Ht.href=Ht.format(),Ht},St.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,_t,Bt){"use strict";var vt=ot("@babel/runtime/helpers/interopRequireDefault"),gt=vt(ot("@babel/runtime/helpers/typeof"));_t.exports={isString:function(bt){return typeof bt=="string"},isObject:function(bt){return(0,gt.default)(bt)==="object"&&bt!==null},isNull:function(bt){return bt===null},isNullOrUndefined:function(bt){return bt==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ot,_t,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,_t,Bt){(function(vt,gt){(function(){"use strict";var kt=ot("@babel/runtime/helpers/interopRequireDefault"),bt=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 St=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 Pt=["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,Gt){Bt.requestWithCallback(Dt,Ft,dt(Nt,Gt))})},Bt.requestWithCallback=function(Dt,Ft,jt){if(!Dt||typeof Dt!="string"&&(0,bt.default)(Dt)!=="object"){var Nt=St.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 Gt=++tt;Ft.requestUrls=Ft.requestUrls||[];var Wt={requestId:Gt,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 Ht=(Ft.type||Ft.method||Ut.method||"GET").toUpperCase(),oe=Ut.port||80,se=mt,fe=lt(Ft.agent,Bt.agent),Pe=Ft.fixJSONCtlChars;Ut.protocol==="https:"&&(se=xt,fe=lt(Ft.httpsAgent,Bt.httpsAgent),Ut.port||(oe=443));var Yt={host:Ut.hostname||Ut.host||"localhost",path:Ut.path||"/",method:Ht,port:oe,agent:fe,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 ee=Ft.auth||Ut.auth;ee&&(Yt.auth=ee);var ye=Ft.content||Ft.data,xe=Ht==="GET"||Ht==="HEAD"||Ft.dataAsQueryString;if(!Ft.content&&ye&&!(typeof ye=="string"||gt.isBuffer(ye)))if(xe)ye=Ft.nestedQuerystring?qs.stringify(ye):querystring.stringify(ye);else{var be=Yt.headers["Content-Type"]||Yt.headers["content-type"];be||(Ft.contentType==="json"?be="application/json":be="application/x-www-form-urlencoded",Yt.headers["Content-Type"]=be),ut(be)==="application/json"?ye=JSON.stringify(ye):ye=Ft.nestedQuerystring?qs.stringify(ye):querystring.stringify(ye)}xe&&ye&&(Yt.path+=(Ut.query?"&":"?")+ye,ye=null);var ce=0;if(ye){var pe=ye.length;gt.isBuffer(ye)||(pe=gt.byteLength(ye)),ce=Yt.headers["Content-Length"]=pe}Ft.dataType==="json"&&(Yt.headers.Accept="application/json"),typeof Ft.beforeRequest=="function"&&Ft.beforeRequest(Yt);var he=null,Ce=null,de=null,Fe=!1,ge=!1,Se=0,re=-1,Kt=!1,wt="",Lt="",Xt=null;Ft.timing&&(Xt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function ne(){he&&(clearTimeout(he),he=null)}function It(){Ce&&(clearTimeout(Ce),Ce=null)}function Rt(He,Ue,We){if(It(),!jt){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Gt,vt.pid,Yt.method,Dt),He&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Gt,vt.pid,He.name,He.message,He.stack);return}var Ke=jt;jt=null;var rn={};We&&(re=We.statusCode,rn=We.headers);var an=Date.now()-Jt;Xt&&(Xt.contentDownload=an),ft("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",an,Se,re,Yt.method,Yt.host,Yt.path,ge,Xt);var ln={status:re,statusCode:re,headers:rn,size:Se,aborted:Kt,rt:an,keepAliveSocket:ge,data:Ue,requestUrls:Ft.requestUrls,timing:Xt,remoteAddress:wt,remotePort:Lt};if(He){var gn="";fe&&typeof fe.getCurrentStatus=="function"&&(gn=", agent status: "+JSON.stringify(fe.getCurrentStatus())),He.message+=", "+Yt.method+" "+Dt+" "+re+" (connected: "+Fe+", keepalive socket: "+ge+gn+`)
|
|
headers: `+JSON.stringify(rn),He.data=Ue,He.path=Yt.path,He.status=re,He.headers=rn,He.res=ln}Ke(He,Ue,Ft.streaming?We:ln),Ft.emitter&&(Wt.url=Dt,Wt.socket=Qe&&Qe.connection,Wt.options=Yt,Wt.size=ce,Ft.emitter.emit("response",{requestId:Gt,error:He,ctx:Ft.ctx,req:Wt,res:ln}))}function Vt(He){var Ue=null;if(Ft.followRedirect&&statuses.redirect[He.statusCode]){Ft._followRedirectCount=(Ft._followRedirectCount||0)+1;var We=He.headers.location;if(!We)Ue=new Error("Got statusCode "+He.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 Ke=Ft.formatRedirectUrl?Ft.formatRedirectUrl(Dt,We):Tt.resolve(Dt,We);ft("Request#%d %s: `redirected` from %s to %s",Gt,Yt.path,Dt,Ke),It(),Ft.headers&&Ft.headers.Host&&it.test(We)&&(Ft.headers.Host=null);var rn=jt;return jt=null,Bt.requestWithCallback(Ke,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 $t(He,Ue,We){var Ke=He.headers["content-encoding"];return We(null,Ue,Ke)}var ue=Ft.writeStream;ft("Request#%d %s %s with headers %j, options.path: %s",Gt,Ht,Dt,Yt.headers,Yt.path),Ft.requestUrls.push(Dt);function me(He){if(Xt&&(Xt.waiting=Date.now()-Jt),ft("Request#%d %s `req response` event emit: status %d, headers: %j",Gt,Dt,He.statusCode,He.headers),Ft.streaming){var Ue=Vt(He);if(Ue.redirect){He.resume();return}return Ue.error?(He.resume(),Rt(Ue.error,null,He)):Rt(null,null,He)}if(He.on("close",function(){ft("Request#%d %s: `res close` event emit, total size %d",Gt,Dt,Se)}),He.on("error",function(){ft("Request#%d %s: `res error` event emit, total size %d",Gt,Dt,Se)}),He.on("aborted",function(){Kt=!0,ft("Request#%d %s: `res aborted` event emit, total size %d",Gt,Dt,Se)}),ue){var We=Vt(He);if(We.redirect){He.resume();return}return We.error?(He.resume(),ue.end(),Rt(We.error,null,He)):(Ft.consumeWriteStream===!1?He.on("end",Rt.bind(null,null,null,He)):ue.on("close",function(){ft("Request#%d %s: writeStream close event emitted",Gt,Dt),Rt(de||null,null,He)}),He.pipe(ue))}var Ke=[];He.on("data",function(rn){ft("Request#%d %s: `res data` event emit, size %d",Gt,Dt,rn.length),Se+=rn.length,Ke.push(rn)}),He.on("end",function(){var rn=gt.concat(Ke,Se);if(ft("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Gt,Dt,Se,He._dumped),de)return Rt(de,rn,He);var an=Vt(He);if(an.error)return Rt(an.error,rn,He);an.redirect||$t(He,rn,function(ln,gn,Gn){if(ln)return Rt(ln,rn,He);if(!Gn&&Pt.indexOf(Ft.dataType)>=0){try{gn=decodeBodyByCharset(gn,He)}catch(Kn){return ft("decodeBodyByCharset error: %s",Kn),Rt(null,gn,He)}if(Ft.dataType==="json")if(Se===0)gn=null;else{var Zn=parseJSON(gn,Pe);Zn.error?ln=Zn.error:gn=Zn.data}}Kt&&ft("Request#%d %s: Remote socket was terminated before `response.end()` was called",Gt,Dt),Rt(ln,gn,He)})})}var Le,Ne;Array.isArray(Ft.timeout)?(Le=z(Ft.timeout[0]),Ne=z(Ft.timeout[1])):Le=Ne=z(Ft.timeout),ft("ConnectTimeout: %d, ResponseTimeout: %d",Le,Ne);function Be(){ft("Connect timer ticking, timeout: %d",Le),he=setTimeout(function(){he=null,re===-1&&(re=-2);var He="Connect timeout for "+Le+"ms",Ue="ConnectionTimeoutError";Qe.socket||(Ue="SocketAssignTimeoutError",He+=", working sockets is full"),de=new Error(He),de.name=Ue,de.requestId=Gt,ft("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,de.name,He,Fe),qe()},Le)}function Xe(){ft("Response timer ticking, timeout: %d",Ne),Ce=setTimeout(function(){Ce=null;var He="Response timeout for "+Ne+"ms",Ue="ResponseTimeoutError";de=new Error(He),de.name=Ue,de.requestId=Gt,ft("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Gt,Dt,de.name,He,Fe),qe()},Ne)}var Qe;Yt.mode=Ft.mode?Ft.mode:"";try{Qe=se.request(Yt,me)}catch(He){return Rt(He)}typeof window=="undefined"?Be():Qe.on("requestTimeout",function(){re===-1&&(re=-2);var He="Connect timeout for "+Le+"ms",Ue="ConnectionTimeoutError";de=new Error(He),de.name=Ue,de.requestId=Gt,qe()});function qe(){ft("Request#%d %s abort, connected: %s",Gt,Dt,Fe),Qe.socket||(de.noSocket=!0,Rt(de)),Qe.abort()}return Xt&&Qe.on("finish",function(){Xt.requestSent=Date.now()-Jt}),Qe.once("socket",function(He){Xt&&(Xt.queuing=Date.now()-Jt);var Ue=He.readyState;if(Ue==="opening"){He.once("lookup",function(We,Ke,rn){ft("Request#%d %s lookup: %s, %s, %s",Gt,Dt,We,Ke,rn),Xt&&(Xt.dnslookup=Date.now()-Jt),Ke&&(wt=Ke)}),He.once("connect",function(){Xt&&(Xt.connected=Date.now()-Jt),ne(),Xe(),ft("Request#%d %s new socket connected",Gt,Dt),Fe=!0,wt||(wt=He.remoteAddress),Lt=He.remotePort});return}ft("Request#%d %s reuse socket connected, readyState: %s",Gt,Dt,Ue),Fe=!0,ge=!0,wt||(wt=He.remoteAddress),Lt=He.remotePort,ne(),Xe()}),Qe.on("error",function(He){(He.name==="Error"||He.name==="TypeError")&&(He.name=Fe?"ResponseError":"RequestError"),He.message+=' (req "error")',ft("Request#%d %s `req error` event emit, %s: %s",Gt,Dt,He.name,He.message),Rt(de||He)}),ue&&ue.once("error",function(He){He.message+=' (writeStream "error")',de=He,ft("Request#%d %s `writeStream error` event emit, %s: %s",Gt,Dt,He.name,He.message),qe()}),Ft.stream?(Ft.stream.pipe(Qe),Ft.stream.once("error",function(He){He.message+=' (stream "error")',de=He,ft("Request#%d %s `readStream error` event emit, %s: %s",Gt,Dt,He.name,He.message),qe()})):Qe.end(ye),Qe.requestId=Gt,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(fn,cn,le){(function(ae){ae(le(89780))})(function(ae){ae.defineOption("placeholder","",function(kt,bt,St){var Tt=St&&St!=ae.Init;if(bt&&!Tt)kt.on("blur",Bt),kt.on("change",vt),kt.on("swapDoc",vt),ae.on(kt.getInputField(),"compositionupdate",kt.state.placeholderCompose=function(){_t(kt)}),vt(kt);else if(!bt&&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","")}bt&&!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 bt=kt.state.placeholder=document.createElement("pre");bt.style.cssText="height: 0; overflow: visible",bt.style.direction=kt.getOption("direction"),bt.className="CodeMirror-placeholder CodeMirror-line-like";var St=kt.getOption("placeholder");typeof St=="string"&&(St=document.createTextNode(St)),bt.appendChild(St),kt.display.lineSpace.insertBefore(bt,kt.display.lineSpace.firstChild)}function _t(kt){setTimeout(function(){var bt=!1,St=kt.getInputField();St.nodeName=="TEXTAREA"?bt=!St.value:kt.lineCount()==1&&(bt=!/[^\u200b]/.test(St.querySelector(".CodeMirror-line").textContent)),bt?ot(kt):Re(kt)},20)}function Bt(kt){gt(kt)&&ot(kt)}function vt(kt){var bt=kt.getWrapperElement(),St=gt(kt);bt.className=bt.className.replace(" CodeMirror-empty","")+(St?" CodeMirror-empty":""),St?ot(kt):Re(kt)}function gt(kt){return kt.lineCount()===1&&kt.getLine(0)===""}})},25717:function(fn,cn,le){(function(ae){ae(le(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(_t(tt,"pairs")),z.state.closeBrackets=tt,z.addKeyMap(Bt))});function _t(z,tt){return tt=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[tt]!=null?z[tt]:Re[tt]}var Bt={Backspace:bt,Enter:St};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 bt(z){var tt=kt(z);if(!tt||z.getOption("disableInput"))return ae.Pass;for(var at=_t(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 St(z){var tt=kt(z),at=tt&&_t(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 Pt=0;Pt<it.length;Pt++){var At=it[Pt].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=_t(at,"pairs"),lt=it.indexOf(tt);if(lt==-1)return ae.Pass;for(var ut=_t(at,"closeBefore"),dt=_t(at,"triples"),Pt=it.charAt(lt+1)==tt,At=z.listSelections(),Dt=lt%2==0,Ft,jt=0;jt<At.length;jt++){var Nt=At[jt],Gt=Nt.head,Wt,Jt=z.getRange(Gt,ot(Gt.line,Gt.ch+1));if(Dt&&!Nt.empty())Wt="surround";else if((Pt||!Dt)&&Jt==tt)Pt&&ft(z,Gt)?Wt="both":dt.indexOf(tt)>=0&&z.getRange(Gt,ot(Gt.line,Gt.ch+3))==tt+tt+tt?Wt="skipThree":Wt="skip";else if(Pt&&Gt.ch>1&&dt.indexOf(tt)>=0&&z.getRange(ot(Gt.line,Gt.ch-2),Gt)==tt+tt){if(Gt.ch>2&&/\bstring/.test(z.getTokenTypeAt(ot(Gt.line,Gt.ch-2))))return ae.Pass;Wt="addFour"}else if(Pt){var Ut=Gt.ch==0?" ":z.getRange(ot(Gt.line,Gt.ch-1),Gt);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 Ht=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 fe=z.getSelections(),se=0;se<fe.length;se++)fe[se]=Ht+fe[se]+oe;z.replaceSelections(fe,"around"),fe=z.listSelections().slice();for(var se=0;se<fe.length;se++)fe[se]=Tt(fe[se]);z.setSelections(fe)}else Ft=="both"?(z.replaceSelection(Ht+oe,null),z.triggerElectric(Ht+oe),z.execCommand("goCharLeft")):Ft=="addFour"&&(z.replaceSelection(Ht+Ht+Ht+Ht,"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(fn,cn,le){(function(ae){ae(le(89780),le(32855))})(function(ae){ae.defineOption("autoCloseTags",!1,function(bt,St,Tt){if(Tt!=ae.Init&&Tt&&bt.removeKeyMap("autoCloseTags"),!!St){var mt={name:"autoCloseTags"};(typeof St!="object"||St.whenClosing!==!1)&&(mt["'/'"]=function(xt){return vt(xt)}),(typeof St!="object"||St.whenOpening!==!1)&&(mt["'>'"]=function(xt){return _t(xt)}),bt.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 _t(bt){if(bt.getOption("disableInput"))return ae.Pass;for(var St=bt.listSelections(),Tt=[],mt=bt.getOption("autoCloseTags"),xt=0;xt<St.length;xt++){if(!St[xt].empty())return ae.Pass;var ft=St[xt].head,z=bt.getTokenAt(ft),tt=ae.innerMode(bt.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,Pt=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&>(dt,At)>-1||kt(bt,tt.mode.xmlCurrentContext&&tt.mode.xmlCurrentContext(at)||[],lt,ft,!0))return ae.Pass;var Dt=typeof mt=="object"&&mt.emptyTags;if(Dt&>(Dt,lt)>-1){Tt[xt]={text:"/>",newPos:ae.Pos(ft.line,ft.ch+2)};continue}var Ft=Pt&>(Pt,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=St.length-1;xt>=0;xt--){var Nt=Tt[xt];bt.replaceRange(Nt.text,St[xt].head,St[xt].anchor,"+insert");var Gt=bt.listSelections().slice(0);Gt[xt]={head:Nt.newPos,anchor:Nt.newPos},bt.setSelections(Gt),!jt&&Nt.indent&&(bt.indentLine(Nt.newPos.line,null,!0),bt.indentLine(Nt.newPos.line+1,null,!0))}}function Bt(bt,St){for(var Tt=bt.listSelections(),mt=[],xt=St?"/":"</",ft=bt.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=bt.getTokenAt(at),lt=ae.innerMode(bt.getMode(),it.state),ut=lt.state;if(St&&(it.type=="string"||it.string.charAt(0)!="<"||it.start!=at.ch-1))return ae.Pass;var dt,Pt=lt.mode.name!="xml"&&bt.getMode().name=="htmlmixed";if(Pt&<.mode.name=="javascript")dt=xt+"script";else if(Pt&<.mode.name=="css")dt=xt+"style";else{var At=lt.mode.xmlCurrentContext&<.mode.xmlCurrentContext(ut);if(!At||At.length&&kt(bt,At,At[At.length-1],at))return ae.Pass;dt=xt+At[At.length-1]}bt.getLine(at.line).charAt(it.end)!=">"&&(dt+=">"),mt[tt]=dt}if(bt.replaceSelections(mt),Tt=bt.listSelections(),!z)for(var tt=0;tt<Tt.length;tt++)(tt==Tt.length-1||Tt[tt].head.line<Tt[tt+1].head.line)&&bt.indentLine(Tt[tt].head.line)}function vt(bt){return bt.getOption("disableInput")?ae.Pass:Bt(bt,!0)}ae.commands.closeTag=function(bt){return Bt(bt)};function gt(bt,St){if(bt.indexOf)return bt.indexOf(St);for(var Tt=0,mt=bt.length;Tt<mt;++Tt)if(bt[Tt]==St)return Tt;return-1}function kt(bt,St,Tt,mt,xt){if(!ae.scanForClosingTag)return!1;var ft=Math.min(bt.lastLine()+1,mt.line+500),z=ae.scanForClosingTag(bt,mt,null,ft);if(!z||z.tag!=Tt)return!1;for(var tt=xt?1:0,at=St.length-1;at>=0&&St[at]==Tt;at--)++tt;mt=z.to;for(var at=1;at<tt;at++){var it=ae.scanForClosingTag(bt,mt,null,ft);if(!it||it.tag!=Tt)return!1;mt=it.to}return!0}})},32855:function(fn,cn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";var Re=ae.Pos;function ot(at,it){return at.line-it.line||at.ch-it.ch}var _t="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=_t+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",vt=new RegExp("<(/?)(["+_t+"]["+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 bt(at){if(!(at.line>=at.max))return at.ch=0,at.text=at.cm.getLine(++at.line),!0}function St(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(bt(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(St(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&<.index==it)return lt}}function xt(at){for(;;){vt.lastIndex=at.ch;var it=vt.exec(at.text);if(!it){if(bt(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(St(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,Pt=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(Pt,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,Pt=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,Pt)}}}}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 Pt=Re(lt.line,lt.ch),At=z(lt,ut[2]);return At&&ot(At.from,Pt)>0?{from:Pt,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),Pt=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:Pt,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,Pt.line,Pt.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 Pt=tt(dt,ut);if(!Pt)break;var At=new gt(at,it.line,it.ch,lt),Dt=z(At,Pt.tag);if(Dt)return{open:Pt,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(fn){(function(cn,le){fn.exports=le()})(this,function(){"use strict";var cn=navigator.userAgent,le=navigator.platform,ae=/gecko\/\d/i.test(cn),Re=/MSIE \d/.test(cn),ot=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn),_t=/Edge\/(\d+)/.exec(cn),Bt=Re||ot||_t,vt=Bt&&(Re?document.documentMode||6:+(_t||ot)[1]),gt=!_t&&/WebKit\//.test(cn),kt=gt&&/Qt\/\d+\.\d+/.test(cn),bt=!_t&&/Chrome\//.test(cn),St=/Opera\//.test(cn),Tt=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(cn),xt=/PhantomJS/.test(cn),ft=!_t&&/AppleWebKit/.test(cn)&&/Mobile\/\w+/.test(cn),z=/Android/.test(cn),tt=ft||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(cn),at=ft||/Mac/.test(le),it=/\bCrOS\b/.test(cn),lt=/win/i.test(le),ut=St&&cn.match(/Version\/(\d*\.\d*)/);ut&&(ut=Number(ut[1])),ut&&ut>=15&&(St=!1,gt=!0);var dt=at&&(kt||St&&(ut==null||ut<12.11)),Pt=ae||Bt&&vt>=9;function At(rt){return new RegExp("(^|\\s)"+rt+"(?:$|\\s)\\s*")}var Dt=function(rt,ct){var Et=rt.className,Ct=At(ct).exec(Et);if(Ct){var Ot=Et.slice(Ct.index+Ct[0].length);rt.className=Et.slice(0,Ct.index)+(Ot?Ct[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,Ct){var Ot=document.createElement(rt);if(Et&&(Ot.className=Et),Ct&&(Ot.style.cssText=Ct),typeof ct=="string")Ot.appendChild(document.createTextNode(ct));else if(ct)for(var te=0;te<ct.length;++te)Ot.appendChild(ct[te]);return Ot}function Gt(rt,ct,Et,Ct){var Ot=Nt(rt,ct,Et,Ct);return Ot.setAttribute("role","presentation"),Ot}var Wt;document.createRange?Wt=function(rt,ct,Et,Ct){var Ot=document.createRange();return Ot.setEnd(Ct||rt,Et),Ot.setStart(rt,ct),Ot}:Wt=function(rt,ct,Et){var Ct=document.body.createTextRange();try{Ct.moveToElementText(rt.parentNode)}catch(Ot){return Ct}return Ct.collapse(!0),Ct.moveEnd("character",Et),Ct.moveStart("character",ct),Ct};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 Ht(rt,ct){var Et=rt.className;At(ct).test(Et)||(rt.className+=(Et?" ":"")+ct)}function oe(rt,ct){for(var Et=rt.split(" "),Ct=0;Ct<Et.length;Ct++)Et[Ct]&&!At(Et[Ct]).test(ct)&&(ct+=" "+Et[Ct]);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 fe(rt){var ct=Array.prototype.slice.call(arguments,1);return function(){return rt.apply(null,ct)}}function Pe(rt,ct,Et){ct||(ct={});for(var Ct in rt)rt.hasOwnProperty(Ct)&&(Et!==!1||!ct.hasOwnProperty(Ct))&&(ct[Ct]=rt[Ct]);return ct}function Yt(rt,ct,Et,Ct,Ot){ct==null&&(ct=rt.search(/[^\s\u00a0]/),ct==-1&&(ct=rt.length));for(var te=Ct||0,ve=Ot||0;;){var Te=rt.indexOf(" ",te);if(Te<0||Te>=ct)return ve+(ct-te);ve+=Te-te,ve+=Et-ve%Et,te=Te+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=fe(this.onTimeout,this)};ee.prototype.onTimeout=function(rt){rt.id=0,rt.time<=+new Date?rt.f():setTimeout(rt.handler,rt.time-+new Date)},ee.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 ye(rt,ct){for(var Et=0;Et<rt.length;++Et)if(rt[Et]==ct)return Et;return-1}var xe=50,be={toString:function(){return"CodeMirror.Pass"}},ce={scroll:!1},pe={origin:"*mouse"},he={origin:"+move"};function Ce(rt,ct,Et){for(var Ct=0,Ot=0;;){var te=rt.indexOf(" ",Ct);te==-1&&(te=rt.length);var ve=te-Ct;if(te==rt.length||Ot+ve>=ct)return Ct+Math.min(ve,ct-Ot);if(Ot+=te-Ct,Ot+=Et-Ot%Et,Ct=te+1,Ot>=ct)return Ct}}var de=[""];function Fe(rt){for(;de.length<=rt;)de.push(ge(de)+" ");return de[rt]}function ge(rt){return rt[rt.length-1]}function Se(rt,ct){for(var Et=[],Ct=0;Ct<rt.length;Ct++)Et[Ct]=ct(rt[Ct],Ct);return Et}function re(rt,ct,Et){for(var Ct=0,Ot=Et(ct);Ct<rt.length&&Et(rt[Ct])<=Ot;)Ct++;rt.splice(Ct,0,ct)}function Kt(){}function wt(rt,ct){var Et;return Object.create?Et=Object.create(rt):(Kt.prototype=rt,Et=new Kt),ct&&Pe(ct,Et),Et}var Lt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xt(rt){return/\w/.test(rt)||rt>"\x80"&&(rt.toUpperCase()!=rt.toLowerCase()||Lt.test(rt))}function ne(rt,ct){return ct?ct.source.indexOf("\\w")>-1&&Xt(rt)?!0:ct.test(rt):Xt(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 Vt(rt){return rt.charCodeAt(0)>=768&&Rt.test(rt)}function $t(rt,ct,Et){for(;(Et<0?ct>0:ct<rt.length)&&Vt(rt.charAt(ct));)ct+=Et;return ct}function ue(rt,ct,Et){for(var Ct=ct>Et?-1:1;;){if(ct==Et)return ct;var Ot=(ct+Et)/2,te=Ct<0?Math.ceil(Ot):Math.floor(Ot);if(te==ct)return rt(te)?ct:Et;rt(te)?Et=te:ct=te+Ct}}function me(rt,ct,Et,Ct){if(!rt)return Ct(ct,Et,"ltr",0);for(var Ot=!1,te=0;te<rt.length;++te){var ve=rt[te];(ve.from<Et&&ve.to>ct||ct==Et&&ve.to==ct)&&(Ct(Math.max(ve.from,ct),Math.min(ve.to,Et),ve.level==1?"rtl":"ltr",te),Ot=!0)}Ot||Ct(ct,Et,"ltr")}var Le=null;function Ne(rt,ct,Et){var Ct;Le=null;for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot];if(te.from<ct&&te.to>ct)return Ot;te.to==ct&&(te.from!=te.to&&Et=="before"?Ct=Ot:Le=Ot),te.from==ct&&(te.from!=te.to&&Et!="before"?Ct=Ot:Le=Ot)}return Ct!=null?Ct:Le}var Be=function(){var rt="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ct="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Et(Ie){return Ie<=247?rt.charAt(Ie):1424<=Ie&&Ie<=1524?"R":1536<=Ie&&Ie<=1785?ct.charAt(Ie-1536):1774<=Ie&&Ie<=2220?"r":8192<=Ie&&Ie<=8203?"w":Ie==8204?"b":"L"}var Ct=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ot=/[stwN]/,te=/[LRr]/,ve=/[Lb1n]/,Te=/[1n]/;function ke(Ie,nn,ze){this.level=Ie,this.from=nn,this.to=ze}return function(Ie,nn){var ze=nn=="ltr"?"L":"R";if(Ie.length==0||nn=="ltr"&&!Ct.test(Ie))return!1;for(var pn=Ie.length,hn=[],Hn=0;Hn<pn;++Hn)hn.push(Et(Ie.charCodeAt(Hn)));for(var Yn=0,or=ze;Yn<pn;++Yn){var Cr=hn[Yn];Cr=="m"?hn[Yn]=or:or=Cr}for(var Hr=0,jr=ze;Hr<pn;++Hr){var Yr=hn[Hr];Yr=="1"&&jr=="r"?hn[Hr]="n":te.test(Yr)&&(jr=Yr,Yr=="r"&&(hn[Hr]="R"))}for(var fi=1,Nr=hn[0];fi<pn-1;++fi){var ki=hn[fi];ki=="+"&&Nr=="1"&&hn[fi+1]=="1"?hn[fi]="1":ki==","&&Nr==hn[fi+1]&&(Nr=="1"||Nr=="n")&&(hn[fi]=Nr),Nr=ki}for(var ko=0;ko<pn;++ko){var ha=hn[ko];if(ha==",")hn[ko]="N";else if(ha=="%"){var Do=void 0;for(Do=ko+1;Do<pn&&hn[Do]=="%";++Do);for(var ps=ko&&hn[ko-1]=="!"||Do<pn&&hn[Do]=="1"?"1":"N",Ha=ko;Ha<Do;++Ha)hn[Ha]=ps;ko=Do-1}}for(var ea=0,Ts=ze;ea<pn;++ea){var Ia=hn[ea];Ts=="L"&&Ia=="1"?hn[ea]="L":te.test(Ia)&&(Ts=Ia)}for(var na=0;na<pn;++na)if(Ot.test(hn[na])){var Zi=void 0;for(Zi=na+1;Zi<pn&&Ot.test(hn[Zi]);++Zi);for(var Ro=(na?hn[na-1]:ze)=="L",wa=(Zi<pn?hn[Zi]:ze)=="L",Ra=Ro==wa?Ro?"L":"R":ze,ml=na;ml<Zi;++ml)hn[ml]=Ra;na=Zi-1}for(var Bo=[],il,Uo=0;Uo<pn;)if(ve.test(hn[Uo])){var xf=Uo;for(++Uo;Uo<pn&&ve.test(hn[Uo]);++Uo);Bo.push(new ke(0,xf,Uo))}else{var Us=Uo,Ls=Bo.length,gs=nn=="rtl"?1:0;for(++Uo;Uo<pn&&hn[Uo]!="L";++Uo);for(var co=Us;co<Uo;)if(Te.test(hn[co])){Us<co&&(Bo.splice(Ls,0,new ke(1,Us,co)),Ls+=gs);var ba=co;for(++co;co<Uo&&Te.test(hn[co]);++co);Bo.splice(Ls,0,new ke(2,ba,co)),Ls+=gs,Us=co}else++co;Us<Uo&&Bo.splice(Ls,0,new ke(1,Us,Uo))}return nn=="ltr"&&(Bo[0].level==1&&(il=Ie.match(/^\s+/))&&(Bo[0].from=il[0].length,Bo.unshift(new ke(0,0,il[0].length))),ge(Bo).level==1&&(il=Ie.match(/\s+$/))&&(ge(Bo).to-=il[0].length,Bo.push(new ke(0,pn-il[0].length,pn)))),nn=="rtl"?Bo.reverse():Bo}}();function Xe(rt,ct){var Et=rt.order;return Et==null&&(Et=rt.order=Be(rt.text,ct)),Et}var Qe=[],qe=function(rt,ct,Et){if(rt.addEventListener)rt.addEventListener(ct,Et,!1);else if(rt.attachEvent)rt.attachEvent("on"+ct,Et);else{var Ct=rt._handlers||(rt._handlers={});Ct[ct]=(Ct[ct]||Qe).concat(Et)}};function He(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 Ct=rt._handlers,Ot=Ct&&Ct[ct];if(Ot){var te=ye(Ot,Et);te>-1&&(Ct[ct]=Ot.slice(0,te).concat(Ot.slice(te+1)))}}}function We(rt,ct){var Et=He(rt,ct);if(Et.length)for(var Ct=Array.prototype.slice.call(arguments,2),Ot=0;Ot<Et.length;++Ot)Et[Ot].apply(null,Ct)}function Ke(rt,ct,Et){return typeof ct=="string"&&(ct={type:ct,preventDefault:function(){this.defaultPrevented=!0}}),We(rt,Et||ct.type,rt,ct),Zn(ct)||ct.codemirrorIgnore}function rn(rt){var ct=rt._handlers&&rt._handlers.cursorActivity;if(ct)for(var Et=rt.curOp.cursorActivityHandlers||(rt.curOp.cursorActivityHandlers=[]),Ct=0;Ct<ct.length;++Ct)ye(Et,ct[Ct])==-1&&Et.push(ct[Ct])}function an(rt,ct){return He(rt,ct).length>0}function ln(rt){rt.prototype.on=function(ct,Et){qe(this,ct,Et)},rt.prototype.off=function(ct,Et){Ue(this,ct,Et)}}function gn(rt){rt.preventDefault?rt.preventDefault():rt.returnValue=!1}function Gn(rt){rt.stopPropagation?rt.stopPropagation():rt.cancelBubble=!0}function Zn(rt){return rt.defaultPrevented!=null?rt.defaultPrevented:rt.returnValue==!1}function Kn(rt){gn(rt),Gn(rt)}function Pr(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}(),Mr;function Fr(rt){if(Mr==null){var ct=Nt("span","\u200B");jt(rt,Nt("span",[ct,document.createTextNode("x")])),rt.firstChild.offsetHeight!=0&&(Mr=ct.offsetWidth<=1&&ct.offsetHeight>2&&!(Bt&&vt<8))}var Et=Mr?Nt("span","\u200B"):Nt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Et.setAttribute("cm-text",""),Et}var vr;function dr(rt){if(vr!=null)return vr;var ct=jt(rt,document.createTextNode("A\u062EA")),Et=Wt(ct,0,1).getBoundingClientRect(),Ct=Wt(ct,1,2).getBoundingClientRect();return Ft(rt),!Et||Et.left==Et.right?!1:vr=Ct.right-Et.right<3}var Ur=`
|
|
|
|
b`.split(/\n/).length!=3?function(rt){for(var ct=0,Et=[],Ct=rt.length;ct<=Ct;){var Ot=rt.indexOf(`
|
|
`,ct);Ot==-1&&(Ot=rt.length);var te=rt.slice(ct,rt.charAt(Ot-1)=="\r"?Ot-1:Ot),ve=te.indexOf("\r");ve!=-1?(Et.push(te.slice(0,ve)),ct+=ve+1):(Et.push(te),ct=Ot+1)}return Et}:function(rt){return rt.split(/\r\n?|\n/)},qt=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},An=function(){var rt=Nt("div");return"oncopy"in rt?!0:(rt.setAttribute("oncopy","return;"),typeof rt.oncopy=="function")}(),Xn=null;function In(rt){if(Xn!=null)return Xn;var ct=jt(rt,Nt("span","x")),Et=ct.getBoundingClientRect(),Ct=Wt(ct,0,1).getBoundingClientRect();return Xn=Math.abs(Et.left-Ct.left)>1}var Un={},Wn={};function ir(rt,ct){arguments.length>2&&(ct.dependencies=Array.prototype.slice.call(arguments,2)),Un[rt]=ct}function Lr(rt,ct){Wn[rt]=ct}function Rr(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 Rr("application/xml");if(typeof rt=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(rt))return Rr("application/json")}return typeof rt=="string"?{name:rt}:rt||{name:"null"}}function Ye(rt,ct){ct=Rr(ct);var Et=Un[ct.name];if(!Et)return Ye(rt,"text/plain");var Ct=Et(rt,ct);if(tn.hasOwnProperty(ct.name)){var Ot=tn[ct.name];for(var te in Ot)Ot.hasOwnProperty(te)&&(Ct.hasOwnProperty(te)&&(Ct["_"+te]=Ct[te]),Ct[te]=Ot[te])}if(Ct.name=ct.name,ct.helperType&&(Ct.helperType=ct.helperType),ct.modeProps)for(var ve in ct.modeProps)Ct[ve]=ct.modeProps[ve];return Ct}var tn={};function Ze(rt,ct){var Et=tn.hasOwnProperty(rt)?tn[rt]:tn[rt]={};Pe(ct,Et)}function zn(rt,ct){if(ct===!0)return ct;if(rt.copyState)return rt.copyState(ct);var Et={};for(var Ct in ct){var Ot=ct[Ct];Ot instanceof Array&&(Ot=Ot.concat([])),Et[Ct]=Ot}return Et}function Qn(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 Jn(rt,ct,Et){return rt.startState?rt.startState(ct,Et):!0}var bn=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};bn.prototype.eol=function(){return this.pos>=this.string.length},bn.prototype.sol=function(){return this.pos==this.lineStart},bn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},bn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},bn.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},bn.prototype.eatWhile=function(rt){for(var ct=this.pos;this.eat(rt););return this.pos>ct},bn.prototype.eatSpace=function(){for(var rt=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>rt},bn.prototype.skipToEnd=function(){this.pos=this.string.length},bn.prototype.skipTo=function(rt){var ct=this.string.indexOf(rt,this.pos);if(ct>-1)return this.pos=ct,!0},bn.prototype.backUp=function(rt){this.pos-=rt},bn.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)},bn.prototype.indentation=function(){return Yt(this.string,null,this.tabSize)-(this.lineStart?Yt(this.string,this.lineStart,this.tabSize):0)},bn.prototype.match=function(rt,ct,Et){if(typeof rt=="string"){var Ct=function(ve){return Et?ve.toLowerCase():ve},Ot=this.string.substr(this.pos,rt.length);if(Ct(Ot)==Ct(rt))return ct!==!1&&(this.pos+=rt.length),!0}else{var te=this.string.slice(this.pos).match(rt);return te&&te.index>0?null:(te&&ct!==!1&&(this.pos+=te[0].length),te)}},bn.prototype.current=function(){return this.string.slice(this.start,this.pos)},bn.prototype.hideFirstChars=function(rt,ct){this.lineStart+=rt;try{return ct()}finally{this.lineStart-=rt}},bn.prototype.lookAhead=function(rt){var ct=this.lineOracle;return ct&&ct.lookAhead(rt)},bn.prototype.baseToken=function(){var rt=this.lineOracle;return rt&&rt.baseToken(this.pos)};function Fn(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 Ct=0;;++Ct){var Ot=Et.children[Ct],te=Ot.chunkSize();if(ct<te){Et=Ot;break}ct-=te}return Et.lines[ct]}function cr(rt,ct,Et){var Ct=[],Ot=ct.line;return rt.iter(ct.line,Et.line+1,function(te){var ve=te.text;Ot==Et.line&&(ve=ve.slice(0,Et.ch)),Ot==ct.line&&(ve=ve.slice(ct.ch)),Ct.push(ve),++Ot}),Ct}function wr(rt,ct,Et){var Ct=[];return rt.iter(ct,Et,function(Ot){Ct.push(Ot.text)}),Ct}function Or(rt,ct){var Et=ct-rt.height;if(Et)for(var Ct=rt;Ct;Ct=Ct.parent)Ct.height+=Et}function Ae(rt){if(rt.parent==null)return null;for(var ct=rt.parent,Et=ye(ct.lines,rt),Ct=ct.parent;Ct;ct=Ct,Ct=Ct.parent)for(var Ot=0;Ct.children[Ot]!=ct;++Ot)Et+=Ct.children[Ot].chunkSize();return Et+ct.first}function Ve(rt,ct){var Et=rt.first;t:do{for(var Ct=0;Ct<rt.children.length;++Ct){var Ot=rt.children[Ct],te=Ot.height;if(ct<te){rt=Ot;continue t}ct-=te,Et+=Ot.chunkSize()}return Et}while(!rt.lines);for(var ve=0;ve<rt.lines.length;++ve){var Te=rt.lines[ve],ke=Te.height;if(ct<ke)break;ct-=ke}return Et+ve}function Mn(rt,ct){return ct>=rt.first&&ct<rt.first+rt.size}function jn(rt,ct){return String(rt.lineNumberFormatter(ct+rt.firstLineNumber))}function en(rt,ct,Et){if(Et===void 0&&(Et=null),!(this instanceof en))return new en(rt,ct,Et);this.line=rt,this.ch=ct,this.sticky=Et}function kn(rt,ct){return rt.line-ct.line||rt.ch-ct.ch}function Pn(rt,ct){return rt.sticky==ct.sticky&&kn(rt,ct)==0}function Ln(rt){return en(rt.line,rt.ch)}function $n(rt,ct){return kn(rt,ct)<0?ct:rt}function Nn(rt,ct){return kn(rt,ct)<0?rt:ct}function Rn(rt,ct){return Math.max(rt.first,Math.min(ct,rt.first+rt.size-1))}function Bn(rt,ct){if(ct.line<rt.first)return en(rt.first,0);var Et=rt.first+rt.size-1;return ct.line>Et?en(Et,Fn(rt,Et).text.length):gr(ct,Fn(rt,ct.line).text.length)}function gr(rt,ct){var Et=rt.ch;return Et==null||Et>ct?en(rt.line,ct):Et<0?en(rt.line,0):rt}function ar(rt,ct){for(var Et=[],Ct=0;Ct<ct.length;Ct++)Et[Ct]=Bn(rt,ct[Ct]);return Et}var lr=function(rt,ct){this.state=rt,this.lookAhead=ct},sn=function(rt,ct,Et,Ct){this.state=ct,this.doc=rt,this.line=Et,this.maxLookAhead=Ct||0,this.baseTokens=null,this.baseTokenPos=1};sn.prototype.lookAhead=function(rt){var ct=this.doc.getLine(this.line+rt);return ct!=null&&rt>this.maxLookAhead&&(this.maxLookAhead=rt),ct},sn.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}},sn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sn.fromSaved=function(rt,ct,Et){return ct instanceof lr?new sn(rt,zn(rt.mode,ct.state),Et,ct.lookAhead):new sn(rt,zn(rt.mode,ct),Et)},sn.prototype.save=function(rt){var ct=rt!==!1?zn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new lr(ct,this.maxLookAhead):ct};function Kr(rt,ct,Et,Ct){var Ot=[rt.state.modeGen],te={};Gr(rt,ct.text,rt.doc.mode,Et,function(Ie,nn){return Ot.push(Ie,nn)},te,Ct);for(var ve=Et.state,Te=function(Ie){Et.baseTokens=Ot;var nn=rt.state.overlays[Ie],ze=1,pn=0;Et.state=!0,Gr(rt,ct.text,nn.mode,Et,function(hn,Hn){for(var Yn=ze;pn<hn;){var or=Ot[ze];or>hn&&Ot.splice(ze,1,hn,Ot[ze+1],or),ze+=2,pn=Math.min(hn,or)}if(Hn)if(nn.opaque)Ot.splice(Yn,ze-Yn,hn,"overlay "+Hn),ze=Yn+2;else for(;Yn<ze;Yn+=2){var Cr=Ot[Yn+1];Ot[Yn+1]=(Cr?Cr+" ":"")+"overlay "+Hn}},te),Et.state=ve,Et.baseTokens=null,Et.baseTokenPos=1},ke=0;ke<rt.state.overlays.length;++ke)Te(ke);return{styles:Ot,classes:te.bgClass||te.textClass?te:null}}function Xr(rt,ct,Et){if(!ct.styles||ct.styles[0]!=rt.state.modeGen){var Ct=mi(rt,Ae(ct)),Ot=ct.text.length>rt.options.maxHighlightLength&&zn(rt.doc.mode,Ct.state),te=Kr(rt,ct,Ct);Ot&&(Ct.state=Ot),ct.stateAfter=Ct.save(!Ot),ct.styles=te.styles,te.classes?ct.styleClasses=te.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 mi(rt,ct,Et){var Ct=rt.doc,Ot=rt.display;if(!Ct.mode.startState)return new sn(Ct,!0,ct);var te=Jr(rt,ct,Et),ve=te>Ct.first&&Fn(Ct,te-1).stateAfter,Te=ve?sn.fromSaved(Ct,ve,te):new sn(Ct,Jn(Ct.mode),te);return Ct.iter(te,ct,function(ke){dn(rt,ke.text,Te);var Ie=Te.line;ke.stateAfter=Ie==ct-1||Ie%5==0||Ie>=Ot.viewFrom&&Ie<Ot.viewTo?Te.save():null,Te.nextLine()}),Et&&(Ct.modeFrontier=Te.line),Te}function dn(rt,ct,Et,Ct){var Ot=rt.doc.mode,te=new bn(ct,rt.options.tabSize,Et);for(te.start=te.pos=Ct||0,ct==""&&On(Ot,Et.state);!te.eol();)rr(Ot,te,Et.state),te.start=te.pos}function On(rt,ct){if(rt.blankLine)return rt.blankLine(ct);if(rt.innerMode){var Et=Qn(rt,ct);if(Et.mode.blankLine)return Et.mode.blankLine(Et.state)}}function rr(rt,ct,Et,Ct){for(var Ot=0;Ot<10;Ot++){Ct&&(Ct[0]=Qn(rt,Et).mode);var te=rt.token(ct,Et);if(ct.pos>ct.start)return te}throw new Error("Mode "+rt.name+" failed to advance stream.")}var er=function(rt,ct,Et){this.start=rt.start,this.end=rt.pos,this.string=rt.current(),this.type=ct||null,this.state=Et};function hr(rt,ct,Et,Ct){var Ot=rt.doc,te=Ot.mode,ve;ct=Bn(Ot,ct);var Te=Fn(Ot,ct.line),ke=mi(rt,ct.line,Et),Ie=new bn(Te.text,rt.options.tabSize,ke),nn;for(Ct&&(nn=[]);(Ct||Ie.pos<ct.ch)&&!Ie.eol();)Ie.start=Ie.pos,ve=rr(te,Ie,ke.state),Ct&&nn.push(new er(Ie,ve,zn(Ot.mode,ke.state)));return Ct?nn:new er(Ie,ve,ke.state)}function Dr(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 Ct=Et[1]?"bgClass":"textClass";ct[Ct]==null?ct[Ct]=Et[2]:new RegExp("(?:^|\\s)"+Et[2]+"(?:$|\\s)").test(ct[Ct])||(ct[Ct]+=" "+Et[2])}return rt}function Gr(rt,ct,Et,Ct,Ot,te,ve){var Te=Et.flattenSpans;Te==null&&(Te=rt.options.flattenSpans);var ke=0,Ie=null,nn=new bn(ct,rt.options.tabSize,Ct),ze,pn=rt.options.addModeClass&&[null];for(ct==""&&Dr(On(Et,Ct.state),te);!nn.eol();){if(nn.pos>rt.options.maxHighlightLength?(Te=!1,ve&&dn(rt,ct,Ct,nn.pos),nn.pos=ct.length,ze=null):ze=Dr(rr(Et,nn,Ct.state,pn),te),pn){var hn=pn[0].name;hn&&(ze="m-"+(ze?hn+" "+ze:hn))}if(!Te||Ie!=ze){for(;ke<nn.start;)ke=Math.min(nn.start,ke+5e3),Ot(ke,Ie);Ie=ze}nn.start=nn.pos}for(;ke<nn.pos;){var Hn=Math.min(nn.pos,ke+5e3);Ot(Hn,Ie),ke=Hn}}function Jr(rt,ct,Et){for(var Ct,Ot,te=rt.doc,ve=Et?-1:ct-(rt.doc.mode.innerMode?1e3:100),Te=ct;Te>ve;--Te){if(Te<=te.first)return te.first;var ke=Fn(te,Te-1),Ie=ke.stateAfter;if(Ie&&(!Et||Te+(Ie instanceof lr?Ie.lookAhead:0)<=te.modeFrontier))return Te;var nn=Yt(ke.text,null,rt.options.tabSize);(Ot==null||Ct>nn)&&(Ot=Te-1,Ct=nn)}return Ot}function $r(rt,ct){if(rt.modeFrontier=Math.min(rt.modeFrontier,ct),!(rt.highlightFrontier<ct-10)){for(var Et=rt.first,Ct=ct-1;Ct>Et;Ct--){var Ot=Fn(rt,Ct).stateAfter;if(Ot&&(!(Ot instanceof lr)||Ct+Ot.lookAhead<ct)){Et=Ct+1;break}}rt.highlightFrontier=Math.min(rt.highlightFrontier,Et)}}var ii=!1,yn=!1;function di(){ii=!0}function mn(){yn=!0}function oi(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 Ct=rt[Et];if(Ct.marker==ct)return Ct}}function bi(rt,ct){for(var Et,Ct=0;Ct<rt.length;++Ct)rt[Ct]!=ct&&(Et||(Et=[])).push(rt[Ct]);return Et}function Ai(rt,ct){rt.markedSpans=rt.markedSpans?rt.markedSpans.concat([ct]):[ct],ct.marker.attachLine(rt)}function ai(rt,ct,Et){var Ct;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],ve=te.marker,Te=te.from==null||(ve.inclusiveLeft?te.from<=ct:te.from<ct);if(Te||te.from==ct&&ve.type=="bookmark"&&(!Et||!te.marker.insertLeft)){var ke=te.to==null||(ve.inclusiveRight?te.to>=ct:te.to>ct);(Ct||(Ct=[])).push(new oi(ve,te.from,ke?null:te.to))}}return Ct}function _r(rt,ct,Et){var Ct;if(rt)for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],ve=te.marker,Te=te.to==null||(ve.inclusiveRight?te.to>=ct:te.to>ct);if(Te||te.from==ct&&ve.type=="bookmark"&&(!Et||te.marker.insertLeft)){var ke=te.from==null||(ve.inclusiveLeft?te.from<=ct:te.from<ct);(Ct||(Ct=[])).push(new oi(ve,ke?null:te.from-ct,te.to==null?null:te.to-ct))}}return Ct}function vi(rt,ct){if(ct.full)return null;var Et=Mn(rt,ct.from.line)&&Fn(rt,ct.from.line).markedSpans,Ct=Mn(rt,ct.to.line)&&Fn(rt,ct.to.line).markedSpans;if(!Et&&!Ct)return null;var Ot=ct.from.ch,te=ct.to.ch,ve=kn(ct.from,ct.to)==0,Te=ai(Et,Ot,ve),ke=_r(Ct,te,ve),Ie=ct.text.length==1,nn=ge(ct.text).length+(Ie?Ot:0);if(Te)for(var ze=0;ze<Te.length;++ze){var pn=Te[ze];if(pn.to==null){var hn=Gi(ke,pn.marker);hn?Ie&&(pn.to=hn.to==null?null:hn.to+nn):pn.to=Ot}}if(ke)for(var Hn=0;Hn<ke.length;++Hn){var Yn=ke[Hn];if(Yn.to!=null&&(Yn.to+=nn),Yn.from==null){var or=Gi(Te,Yn.marker);or||(Yn.from=nn,Ie&&(Te||(Te=[])).push(Yn))}else Yn.from+=nn,Ie&&(Te||(Te=[])).push(Yn)}Te&&(Te=xo(Te)),ke&&ke!=Te&&(ke=xo(ke));var Cr=[Te];if(!Ie){var Hr=ct.text.length-2,jr;if(Hr>0&&Te)for(var Yr=0;Yr<Te.length;++Yr)Te[Yr].to==null&&(jr||(jr=[])).push(new oi(Te[Yr].marker,null,null));for(var fi=0;fi<Hr;++fi)Cr.push(jr);Cr.push(ke)}return Cr}function xo(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 Fi(rt,ct,Et){var Ct=null;if(rt.iter(ct.line,Et.line+1,function(hn){if(hn.markedSpans)for(var Hn=0;Hn<hn.markedSpans.length;++Hn){var Yn=hn.markedSpans[Hn].marker;Yn.readOnly&&(!Ct||ye(Ct,Yn)==-1)&&(Ct||(Ct=[])).push(Yn)}}),!Ct)return null;for(var Ot=[{from:ct,to:Et}],te=0;te<Ct.length;++te)for(var ve=Ct[te],Te=ve.find(0),ke=0;ke<Ot.length;++ke){var Ie=Ot[ke];if(!(kn(Ie.to,Te.from)<0||kn(Ie.from,Te.to)>0)){var nn=[ke,1],ze=kn(Ie.from,Te.from),pn=kn(Ie.to,Te.to);(ze<0||!ve.inclusiveLeft&&!ze)&&nn.push({from:Ie.from,to:Te.from}),(pn>0||!ve.inclusiveRight&&!pn)&&nn.push({from:Te.to,to:Ie.to}),Ot.splice.apply(Ot,nn),ke+=nn.length-3}}return Ot}function qn(rt){var ct=rt.markedSpans;if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.detachLine(rt);rt.markedSpans=null}}function Me(rt,ct){if(ct){for(var Et=0;Et<ct.length;++Et)ct[Et].marker.attachLine(rt);rt.markedSpans=ct}}function zi(rt){return rt.inclusiveLeft?-1:0}function Ui(rt){return rt.inclusiveRight?1:0}function Qi(rt,ct){var Et=rt.lines.length-ct.lines.length;if(Et!=0)return Et;var Ct=rt.find(),Ot=ct.find(),te=kn(Ct.from,Ot.from)||zi(rt)-zi(ct);if(te)return-te;var ve=kn(Ct.to,Ot.to)||Ui(rt)-Ui(ct);return ve||ct.id-rt.id}function Xi(rt,ct){var Et=yn&&rt.markedSpans,Ct;if(Et)for(var Ot=void 0,te=0;te<Et.length;++te)Ot=Et[te],Ot.marker.collapsed&&(ct?Ot.from:Ot.to)==null&&(!Ct||Qi(Ct,Ot.marker)<0)&&(Ct=Ot.marker);return Ct}function pi(rt){return Xi(rt,!0)}function sr(rt){return Xi(rt,!1)}function yr(rt,ct){var Et=yn&&rt.markedSpans,Ct;if(Et)for(var Ot=0;Ot<Et.length;++Ot){var te=Et[Ot];te.marker.collapsed&&(te.from==null||te.from<ct)&&(te.to==null||te.to>ct)&&(!Ct||Qi(Ct,te.marker)<0)&&(Ct=te.marker)}return Ct}function Qr(rt,ct,Et,Ct,Ot){var te=Fn(rt,ct),ve=yn&&te.markedSpans;if(ve)for(var Te=0;Te<ve.length;++Te){var ke=ve[Te];if(ke.marker.collapsed){var Ie=ke.marker.find(0),nn=kn(Ie.from,Et)||zi(ke.marker)-zi(Ot),ze=kn(Ie.to,Ct)||Ui(ke.marker)-Ui(Ot);if(!(nn>=0&&ze<=0||nn<=0&&ze>=0)&&(nn<=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?kn(Ie.to,Et)>=0:kn(Ie.to,Et)>0)||nn>=0&&(ke.marker.inclusiveRight&&Ot.inclusiveLeft?kn(Ie.from,Ct)<=0:kn(Ie.from,Ct)<0)))return!0}}}function mr(rt){for(var ct;ct=pi(rt);)rt=ct.find(-1,!0).line;return rt}function Vr(rt){for(var ct;ct=sr(rt);)rt=ct.find(1,!0).line;return rt}function Mi(rt){for(var ct,Et;ct=sr(rt);)rt=ct.find(1,!0).line,(Et||(Et=[])).push(rt);return Et}function kr(rt,ct){var Et=Fn(rt,ct),Ct=mr(Et);return Et==Ct?ct:Ae(Ct)}function ur(rt,ct){if(ct>rt.lastLine())return ct;var Et=Fn(rt,ct),Ct;if(!Cn(rt,Et))return ct;for(;Ct=sr(Et);)Et=Ct.find(1,!0).line;return Ae(Et)+1}function Cn(rt,ct){var Et=yn&&ct.markedSpans;if(Et){for(var Ct=void 0,Ot=0;Ot<Et.length;++Ot)if(Ct=Et[Ot],!!Ct.marker.collapsed){if(Ct.from==null)return!0;if(!Ct.marker.widgetNode&&Ct.from==0&&Ct.marker.inclusiveLeft&&Ar(rt,ct,Ct))return!0}}}function Ar(rt,ct,Et){if(Et.to==null){var Ct=Et.marker.find(1,!0);return Ar(rt,Ct.line,Gi(Ct.line.markedSpans,Et.marker))}if(Et.marker.inclusiveRight&&Et.to==ct.text.length)return!0;for(var Ot=void 0,te=0;te<ct.markedSpans.length;++te)if(Ot=ct.markedSpans[te],Ot.marker.collapsed&&!Ot.marker.widgetNode&&Ot.from==Et.to&&(Ot.to==null||Ot.to!=Et.from)&&(Ot.marker.inclusiveLeft||Et.marker.inclusiveRight)&&Ar(rt,ct,Ot))return!0}function ci(rt){rt=mr(rt);for(var ct=0,Et=rt.parent,Ct=0;Ct<Et.lines.length;++Ct){var Ot=Et.lines[Ct];if(Ot==rt)break;ct+=Ot.height}for(var te=Et.parent;te;Et=te,te=Et.parent)for(var ve=0;ve<te.children.length;++ve){var Te=te.children[ve];if(Te==Et)break;ct+=Te.height}return ct}function Wi(rt){if(rt.height==0)return 0;for(var ct=rt.text.length,Et,Ct=rt;Et=pi(Ct);){var Ot=Et.find(0,!0);Ct=Ot.from.line,ct+=Ot.from.ch-Ot.to.ch}for(Ct=rt;Et=sr(Ct);){var te=Et.find(0,!0);ct-=Ct.text.length-te.from.ch,Ct=te.to.line,ct+=Ct.text.length-te.to.ch}return ct}function Ei(rt){var ct=rt.display,Et=rt.doc;ct.maxLine=Fn(Et,Et.first),ct.maxLineLength=Wi(ct.maxLine),ct.maxLineChanged=!0,Et.iter(function(Ct){var Ot=Wi(Ct);Ot>ct.maxLineLength&&(ct.maxLineLength=Ot,ct.maxLine=Ct)})}var qi=function(rt,ct,Et){this.text=rt,Me(this,ct),this.height=Et?Et(this):1};qi.prototype.lineNo=function(){return Ae(this)},ln(qi);function wo(rt,ct,Et,Ct){rt.text=ct,rt.stateAfter&&(rt.stateAfter=null),rt.styles&&(rt.styles=null),rt.order!=null&&(rt.order=null),qn(rt),Me(rt,Et);var Ot=Ct?Ct(rt):1;Ot!=rt.height&&Or(rt,Ot)}function to(rt){rt.parent=null,qn(rt)}var To={},bo={};function jo(rt,ct){if(!rt||/^\s*$/.test(rt))return null;var Et=ct.addModeClass?bo:To;return Et[rt]||(Et[rt]=rt.replace(/\S+/g,"cm-$&"))}function on(rt,ct){var Et=Gt("span",null,null,gt?"padding-right: .1px":null),Ct={pre:Gt("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 te=Ot?ct.rest[Ot-1]:ct.line,ve=void 0;Ct.pos=0,Ct.addToken=Js,dr(rt.display.measure)&&(ve=Xe(te,rt.doc.direction))&&(Ct.addToken=ja(Ct.addToken,ve)),Ct.map=[];var Te=ct!=rt.display.externalMeasured&&Ae(te);ls(te,Ct,Xr(rt,te,Te)),te.styleClasses&&(te.styleClasses.bgClass&&(Ct.bgClass=oe(te.styleClasses.bgClass,Ct.bgClass||"")),te.styleClasses.textClass&&(Ct.textClass=oe(te.styleClasses.textClass,Ct.textClass||""))),Ct.map.length==0&&Ct.map.push(0,0,Ct.content.appendChild(Fr(rt.display.measure))),Ot==0?(ct.measure.map=Ct.map,ct.measure.cache={}):((ct.measure.maps||(ct.measure.maps=[])).push(Ct.map),(ct.measure.caches||(ct.measure.caches=[])).push({}))}if(gt){var ke=Ct.content.lastChild;(/\bcm-tab\b/.test(ke.className)||ke.querySelector&&ke.querySelector(".cm-tab"))&&(Ct.content.className="cm-tab-wrap-hack")}return We(rt,"renderLine",rt,ct.line,Ct.pre),Ct.pre.className&&(Ct.textClass=oe(Ct.pre.className,Ct.textClass||"")),Ct}function Wo(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 Js(rt,ct,Et,Ct,Ot,te,ve){if(ct){var Te=rt.splitSpaces?ia(ct,rt.trailingSpace):ct,ke=rt.cm.state.specialChars,Ie=!1,nn;if(!ke.test(ct))rt.col+=ct.length,nn=document.createTextNode(Te),rt.map.push(rt.pos,rt.pos+ct.length,nn),Bt&&vt<9&&(Ie=!0),rt.pos+=ct.length;else{nn=document.createDocumentFragment();for(var ze=0;;){ke.lastIndex=ze;var pn=ke.exec(ct),hn=pn?pn.index-ze:ct.length-ze;if(hn){var Hn=document.createTextNode(Te.slice(ze,ze+hn));Bt&&vt<9?nn.appendChild(Nt("span",[Hn])):nn.appendChild(Hn),rt.map.push(rt.pos,rt.pos+hn,Hn),rt.col+=hn,rt.pos+=hn}if(!pn)break;ze+=hn+1;var Yn=void 0;if(pn[0]==" "){var or=rt.cm.options.tabSize,Cr=or-rt.col%or;Yn=nn.appendChild(Nt("span",Fe(Cr),"cm-tab")),Yn.setAttribute("role","presentation"),Yn.setAttribute("cm-text"," "),rt.col+=Cr}else pn[0]=="\r"||pn[0]==`
|
|
`?(Yn=nn.appendChild(Nt("span",pn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Yn.setAttribute("cm-text",pn[0]),rt.col+=1):(Yn=rt.cm.options.specialCharPlaceholder(pn[0]),Yn.setAttribute("cm-text",pn[0]),Bt&&vt<9?nn.appendChild(Nt("span",[Yn])):nn.appendChild(Yn),rt.col+=1);rt.map.push(rt.pos,rt.pos+1,Yn),rt.pos++}}if(rt.trailingSpace=Te.charCodeAt(ct.length-1)==32,Et||Ct||Ot||Ie||te||ve){var Hr=Et||"";Ct&&(Hr+=Ct),Ot&&(Hr+=Ot);var jr=Nt("span",[nn],Hr,te);if(ve)for(var Yr in ve)ve.hasOwnProperty(Yr)&&Yr!="style"&&Yr!="class"&&jr.setAttribute(Yr,ve[Yr]);return rt.content.appendChild(jr)}rt.content.appendChild(nn)}}function ia(rt,ct){if(rt.length>1&&!/ /.test(rt))return rt;for(var Et=ct,Ct="",Ot=0;Ot<rt.length;Ot++){var te=rt.charAt(Ot);te==" "&&Et&&(Ot==rt.length-1||rt.charCodeAt(Ot+1)==32)&&(te="\xA0"),Ct+=te,Et=te==" "}return Ct}function ja(rt,ct){return function(Et,Ct,Ot,te,ve,Te,ke){Ot=Ot?Ot+" cm-force-border":"cm-force-border";for(var Ie=Et.pos,nn=Ie+Ct.length;;){for(var ze=void 0,pn=0;pn<ct.length&&(ze=ct[pn],!(ze.to>Ie&&ze.from<=Ie));pn++);if(ze.to>=nn)return rt(Et,Ct,Ot,te,ve,Te,ke);rt(Et,Ct.slice(0,ze.to-Ie),Ot,te,null,Te,ke),te=null,Ct=Ct.slice(ze.to-Ie),Ie=ze.to}}}function so(rt,ct,Et,Ct){var Ot=!Ct&&Et.widgetNode;Ot&&rt.map.push(rt.pos,rt.pos+ct,Ot),!Ct&&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 Ct=rt.markedSpans,Ot=rt.text,te=0;if(!Ct){for(var ve=1;ve<Et.length;ve+=2)ct.addToken(ct,Ot.slice(te,te=Et[ve]),jo(Et[ve+1],ct.cm.options));return}for(var Te=Ot.length,ke=0,Ie=1,nn="",ze,pn,hn=0,Hn,Yn,or,Cr,Hr;;){if(hn==ke){Hn=Yn=or=pn="",Hr=null,Cr=null,hn=1/0;for(var jr=[],Yr=void 0,fi=0;fi<Ct.length;++fi){var Nr=Ct[fi],ki=Nr.marker;if(ki.type=="bookmark"&&Nr.from==ke&&ki.widgetNode)jr.push(ki);else if(Nr.from<=ke&&(Nr.to==null||Nr.to>ke||ki.collapsed&&Nr.to==ke&&Nr.from==ke)){if(Nr.to!=null&&Nr.to!=ke&&hn>Nr.to&&(hn=Nr.to,Yn=""),ki.className&&(Hn+=" "+ki.className),ki.css&&(pn=(pn?pn+";":"")+ki.css),ki.startStyle&&Nr.from==ke&&(or+=" "+ki.startStyle),ki.endStyle&&Nr.to==hn&&(Yr||(Yr=[])).push(ki.endStyle,Nr.to),ki.title&&((Hr||(Hr={})).title=ki.title),ki.attributes)for(var ko in ki.attributes)(Hr||(Hr={}))[ko]=ki.attributes[ko];ki.collapsed&&(!Cr||Qi(Cr.marker,ki)<0)&&(Cr=Nr)}else Nr.from>ke&&hn>Nr.from&&(hn=Nr.from)}if(Yr)for(var ha=0;ha<Yr.length;ha+=2)Yr[ha+1]==hn&&(Yn+=" "+Yr[ha]);if(!Cr||Cr.from==ke)for(var Do=0;Do<jr.length;++Do)so(ct,0,jr[Do]);if(Cr&&(Cr.from||0)==ke){if(so(ct,(Cr.to==null?Te+1:Cr.to)-ke,Cr.marker,Cr.from==null),Cr.to==null)return;Cr.to==ke&&(Cr=!1)}}if(ke>=Te)break;for(var ps=Math.min(Te,hn);;){if(nn){var Ha=ke+nn.length;if(!Cr){var ea=Ha>ps?nn.slice(0,ps-ke):nn;ct.addToken(ct,ea,ze?ze+Hn:Hn,or,ke+ea.length==hn?Yn:"",pn,Hr)}if(Ha>=ps){nn=nn.slice(ps-ke),ke=ps;break}ke=Ha,or=""}nn=Ot.slice(te,te=Et[Ie++]),ze=jo(Et[Ie++],ct.cm.options)}}}function zl(rt,ct,Et){this.line=ct,this.rest=Mi(ct),this.size=this.rest?Ae(ge(this.rest))-Et+1:1,this.node=this.text=null,this.hidden=Cn(rt,ct)}function Ti(rt,ct,Et){for(var Ct=[],Ot,te=ct;te<Et;te=Ot){var ve=new zl(rt.doc,Fn(rt.doc,te),te);Ot=te+ve.size,Ct.push(ve)}return Ct}var Go=null;function El(rt){Go?Go.ops.push(rt):rt.ownsGroup=Go={ops:[rt],delayedCallbacks:[]}}function pa(rt){var ct=rt.delayedCallbacks,Et=0;do{for(;Et<ct.length;Et++)ct[Et].call(null);for(var Ct=0;Ct<rt.ops.length;Ct++){var Ot=rt.ops[Ct];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{pa(Et)}finally{Go=null,ct(Et)}}var xs=null;function Br(rt,ct){var Et=He(rt,ct);if(Et.length){var Ct=Array.prototype.slice.call(arguments,2),Ot;Go?Ot=Go.delayedCallbacks:xs?Ot=xs:(Ot=xs=[],setTimeout(Gl,0));for(var te=function(Te){Ot.push(function(){return Et[Te].apply(null,Ct)})},ve=0;ve<Et.length;++ve)te(ve)}}function Gl(){var rt=xs;xs=null;for(var ct=0;ct<rt.length;++ct)rt[ct]()}function hu(rt,ct,Et,Ct){for(var Ot=0;Ot<ct.changes.length;Ot++){var te=ct.changes[Ot];te=="text"?nr(rt,ct):te=="gutter"?ni(rt,ct,Et,Ct):te=="class"?Wr(rt,ct):te=="widget"&&si(rt,ct,Ct)}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 Jo(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 Ct=us(ct);ct.background=Ct.insertBefore(Nt("div",null,Et),Ct.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 nr(rt,ct){var Et=ct.text.className,Ct=Nu(rt,ct);ct.text==ct.node&&(ct.node=Ct.pre),ct.text.parentNode.replaceChild(Ct.pre,ct.text),ct.text=Ct.pre,Ct.bgClass!=ct.bgClass||Ct.textClass!=ct.textClass?(ct.bgClass=Ct.bgClass,ct.textClass=Ct.textClass,Wr(rt,ct)):Et&&(ct.text.className=Et)}function Wr(rt,ct){Jo(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 ni(rt,ct,Et,Ct){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?Ct.fixedPos:-Ct.gutterTotalWidth)+"px; width: "+Ct.gutterTotalWidth+"px"),rt.display.input.setUneditable(ct.gutterBackground),Ot.insertBefore(ct.gutterBackground,ct.text)}var te=ct.line.gutterMarkers;if(rt.options.lineNumbers||te){var ve=us(ct),Te=ct.gutter=Nt("div",null,"CodeMirror-gutter-wrapper","left: "+(rt.options.fixedGutter?Ct.fixedPos:-Ct.gutterTotalWidth)+"px");if(rt.display.input.setUneditable(Te),ve.insertBefore(Te,ct.text),ct.line.gutterClass&&(Te.className+=" "+ct.line.gutterClass),rt.options.lineNumbers&&(!te||!te["CodeMirror-linenumbers"])&&(ct.lineNumber=Te.appendChild(Nt("div",jn(rt.options,Et),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Ct.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+rt.display.lineNumInnerWidth+"px"))),te)for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=rt.display.gutterSpecs[ke].className,nn=te.hasOwnProperty(Ie)&&te[Ie];nn&&Te.appendChild(Nt("div",[nn],"CodeMirror-gutter-elt","left: "+Ct.gutterLeft[Ie]+"px; width: "+Ct.gutterWidth[Ie]+"px"))}}}function si(rt,ct,Et){ct.alignable&&(ct.alignable=null);for(var Ct=At("CodeMirror-linewidget"),Ot=ct.node.firstChild,te=void 0;Ot;Ot=te)te=Ot.nextSibling,Ct.test(Ot.className)&&ct.node.removeChild(Ot);Ki(rt,ct,Et)}function gi(rt,ct,Et,Ct){var Ot=Nu(rt,ct);return ct.text=ct.node=Ot.pre,Ot.bgClass&&(ct.bgClass=Ot.bgClass),Ot.textClass&&(ct.textClass=Ot.textClass),Wr(rt,ct),ni(rt,ct,Et,Ct),Ki(rt,ct,Ct),ct.node}function Ki(rt,ct,Et){if(Ir(rt,ct.line,ct,Et,!0),ct.rest)for(var Ct=0;Ct<ct.rest.length;Ct++)Ir(rt,ct.rest[Ct],ct,Et,!1)}function Ir(rt,ct,Et,Ct,Ot){if(ct.widgets)for(var te=us(Et),ve=0,Te=ct.widgets;ve<Te.length;++ve){var ke=Te[ve],Ie=Nt("div",[ke.node],"CodeMirror-linewidget"+(ke.className?" "+ke.className:""));ke.handleMouseEvents||Ie.setAttribute("cm-ignore-events","true"),ws(ke,Ie,Et,Ct),rt.display.input.setUneditable(Ie),Ot&&ke.above?te.insertBefore(Ie,Et.gutter||Et.text):te.appendChild(Ie),Br(ke,"redraw")}}function ws(rt,ct,Et,Ct){if(rt.noHScroll){(Et.alignable||(Et.alignable=[])).push(ct);var Ot=Ct.wrapperWidth;ct.style.left=Ct.fixedPos+"px",rt.coverGutter||(Ot-=Ct.gutterTotalWidth,ct.style.paddingLeft=Ct.gutterTotalWidth+"px"),ct.style.width=Ot+"px"}rt.coverGutter&&(ct.style.zIndex=5,ct.style.position="relative",rt.noHScroll||(ct.style.marginLeft=-Ct.gutterTotalWidth+"px"))}function oa(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 Ho(rt,ct){for(var Et=Pr(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 lo(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,Ct={left:parseInt(Et.paddingLeft),right:parseInt(Et.paddingRight)};return!isNaN(Ct.left)&&!isNaN(Ct.right)&&(rt.cachedPaddingH=Ct),Ct}function Oa(rt){return xe-rt.display.nativeBarWidth}function Ps(rt){return rt.display.scroller.clientWidth-Oa(rt)-rt.display.barWidth}function Ml(rt){return rt.display.scroller.clientHeight-Oa(rt)-rt.display.barHeight}function Qs(rt,ct,Et){var Ct=rt.options.lineWrapping,Ot=Ct&&Ps(rt);if(!ct.measure.heights||Ct&&ct.measure.width!=Ot){var te=ct.measure.heights=[];if(Ct){ct.measure.width=Ot;for(var ve=ct.text.firstChild.getClientRects(),Te=0;Te<ve.length-1;Te++){var ke=ve[Te],Ie=ve[Te+1];Math.abs(ke.bottom-Ie.bottom)>2&&te.push((ke.bottom+Ie.top)/2-Et.top)}}te.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 Ct=0;Ct<rt.rest.length;Ct++)if(rt.rest[Ct]==ct)return{map:rt.measure.maps[Ct],cache:rt.measure.caches[Ct]};for(var Ot=0;Ot<rt.rest.length;Ot++)if(Ae(rt.rest[Ot])>Et)return{map:rt.measure.maps[Ot],cache:rt.measure.caches[Ot],before:!0}}function Xc(rt,ct){ct=mr(ct);var Et=Ae(ct),Ct=rt.display.externalMeasured=new zl(rt.doc,ct,Et);Ct.lineN=Et;var Ot=Ct.built=on(rt,Ct);return Ct.text=Ot.pre,jt(rt.display.lineMeasure,Ot.pre),Ct}function sc(rt,ct,Et,Ct){return Is(rt,Ul(rt,ct),Et,Ct)}function dl(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=Ae(ct),Ct=dl(rt,Et);Ct&&!Ct.text?Ct=null:Ct&&Ct.changes&&(hu(rt,Ct,Et,cu(rt)),rt.curOp.forceUpdate=!0),Ct||(Ct=Xc(rt,ct));var Ot=ju(Ct,ct,Et);return{line:ct,view:Ct,rect:null,map:Ot.map,cache:Ot.cache,before:Ot.before,hasHeights:!1}}function Is(rt,ct,Et,Ct,Ot){ct.before&&(Et=-1);var te=Et+(Ct||""),ve;return ct.cache.hasOwnProperty(te)?ve=ct.cache[te]:(ct.rect||(ct.rect=ct.view.text.getBoundingClientRect()),ct.hasHeights||(Qs(rt,ct.view,ct.rect),ct.hasHeights=!0),ve=Oo(rt,ct,Et,Ct),ve.bogus||(ct.cache[te]=ve)),{left:ve.left,right:ve.right,top:Ot?ve.rtop:ve.top,bottom:Ot?ve.rbottom:ve.bottom}}var lc={left:0,right:0,top:0,bottom:0};function uc(rt,ct,Et){for(var Ct,Ot,te,ve,Te,ke,Ie=0;Ie<rt.length;Ie+=3)if(Te=rt[Ie],ke=rt[Ie+1],ct<Te?(Ot=0,te=1,ve="left"):ct<ke?(Ot=ct-Te,te=Ot+1):(Ie==rt.length-3||ct==ke&&rt[Ie+3]>ct)&&(te=ke-Te,Ot=te-1,ct>=ke&&(ve="right")),Ot!=null){if(Ct=rt[Ie+2],Te==ke&&Et==(Ct.insertLeft?"left":"right")&&(ve=Et),Et=="left"&&Ot==0)for(;Ie&&rt[Ie-2]==rt[Ie-3]&&rt[Ie-1].insertLeft;)Ct=rt[(Ie-=3)+2],ve="left";if(Et=="right"&&Ot==ke-Te)for(;Ie<rt.length-3&&rt[Ie+3]==rt[Ie+4]&&!rt[Ie+5].insertLeft;)Ct=rt[(Ie+=3)+2],ve="right";break}return{node:Ct,start:Ot,end:te,collapse:ve,coverStart:Te,coverEnd:ke}}function Yc(rt,ct){var Et=lc;if(ct=="left")for(var Ct=0;Ct<rt.length&&(Et=rt[Ct]).left==Et.right;Ct++);else for(var Ot=rt.length-1;Ot>=0&&(Et=rt[Ot]).left==Et.right;Ot--);return Et}function Oo(rt,ct,Et,Ct){var Ot=uc(ct.map,Et,Ct),te=Ot.node,ve=Ot.start,Te=Ot.end,ke=Ot.collapse,Ie;if(te.nodeType==3){for(var nn=0;nn<4;nn++){for(;ve&&Vt(ct.line.text.charAt(Ot.coverStart+ve));)--ve;for(;Ot.coverStart+Te<Ot.coverEnd&&Vt(ct.line.text.charAt(Ot.coverStart+Te));)++Te;if(Bt&&vt<9&&ve==0&&Te==Ot.coverEnd-Ot.coverStart?Ie=te.parentNode.getBoundingClientRect():Ie=Yc(Wt(te,ve,Te).getClientRects(),Ct),Ie.left||Ie.right||ve==0)break;Te=ve,ve=ve-1,ke="right"}Bt&&vt<11&&(Ie=Wf(rt.display.measure,Ie))}else{ve>0&&(ke=Ct="right");var ze;rt.options.lineWrapping&&(ze=te.getClientRects()).length>1?Ie=ze[Ct=="right"?ze.length-1:0]:Ie=te.getBoundingClientRect()}if(Bt&&vt<9&&!ve&&(!Ie||!Ie.left&&!Ie.right)){var pn=te.parentNode.getClientRects()[0];pn?Ie={left:pn.left,right:pn.left+pl(rt.display),top:pn.top,bottom:pn.bottom}:Ie=lc}for(var hn=Ie.top-ct.rect.top,Hn=Ie.bottom-ct.rect.top,Yn=(hn+Hn)/2,or=ct.view.measure.heights,Cr=0;Cr<or.length-1&&!(Yn<or[Cr]);Cr++);var Hr=Cr?or[Cr-1]:0,jr=or[Cr],Yr={left:(ke=="right"?Ie.right:Ie.left)-ct.rect.left,right:(ke=="left"?Ie.left:Ie.right)-ct.rect.left,top:Hr,bottom:jr};return!Ie.left&&!Ie.right&&(Yr.bogus=!0),rt.options.singleCursorHeightPerLine||(Yr.rtop=hn,Yr.rbottom=Hn),Yr}function Wf(rt,ct){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!In(rt))return ct;var Et=screen.logicalXDPI/screen.deviceXDPI,Ct=screen.logicalYDPI/screen.deviceYDPI;return{left:ct.left*Et,right:ct.right*Et,top:ct.top*Ct,bottom:ct.bottom*Ct}}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 ga(){return bt&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Fa(){return bt&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Qo(rt){var ct=0;if(rt.widgets)for(var Et=0;Et<rt.widgets.length;++Et)rt.widgets[Et].above&&(ct+=oa(rt.widgets[Et]));return ct}function aa(rt,ct,Et,Ct,Ot){if(!Ot){var te=Qo(ct);Et.top+=te,Et.bottom+=te}if(Ct=="line")return Et;Ct||(Ct="local");var ve=ci(ct);if(Ct=="local"?ve+=lo(rt.display):ve-=rt.display.viewOffset,Ct=="page"||Ct=="window"){var Te=rt.display.lineSpace.getBoundingClientRect();ve+=Te.top+(Ct=="window"?0:Fa());var ke=Te.left+(Ct=="window"?0:ga());Et.left+=ke,Et.right+=ke}return Et.top+=ve,Et.bottom+=ve,Et}function cc(rt,ct,Et){if(Et=="div")return ct;var Ct=ct.left,Ot=ct.top;if(Et=="page")Ct-=ga(),Ot-=Fa();else if(Et=="local"||!Et){var te=rt.display.sizer.getBoundingClientRect();Ct+=te.left,Ot+=te.top}var ve=rt.display.lineSpace.getBoundingClientRect();return{left:Ct-ve.left,top:Ot-ve.top}}function Du(rt,ct,Et,Ct,Ot){return Ct||(Ct=Fn(rt.doc,ct.line)),aa(rt,Ct,sc(rt,Ct,ct.ch,Ot),Et)}function mo(rt,ct,Et,Ct,Ot,te){Ct=Ct||Fn(rt.doc,ct.line),Ot||(Ot=Ul(rt,Ct));function ve(Hn,Yn){var or=Is(rt,Ot,Hn,Yn?"right":"left",te);return Yn?or.left=or.right:or.right=or.left,aa(rt,Ct,or,Et)}var Te=Xe(Ct,rt.doc.direction),ke=ct.ch,Ie=ct.sticky;if(ke>=Ct.text.length?(ke=Ct.text.length,Ie="before"):ke<=0&&(ke=0,Ie="after"),!Te)return ve(Ie=="before"?ke-1:ke,Ie=="before");function nn(Hn,Yn,or){var Cr=Te[Yn],Hr=Cr.level==1;return ve(or?Hn-1:Hn,Hr!=or)}var ze=Ne(Te,ke,Ie),pn=Le,hn=nn(ke,ze,Ie=="before");return pn!=null&&(hn.other=nn(ke,pn,Ie!="before")),hn}function Hi(rt,ct){var Et=0;ct=Bn(rt.doc,ct),rt.options.lineWrapping||(Et=pl(rt.display)*ct.ch);var Ct=Fn(rt.doc,ct.line),Ot=ci(Ct)+lo(rt.display);return{left:Et,right:Et,top:Ot,bottom:Ot+Ct.height}}function Ni(rt,ct,Et,Ct,Ot){var te=en(rt,ct,Et);return te.xRel=Ot,Ct&&(te.outside=Ct),te}function Da(rt,ct,Et){var Ct=rt.doc;if(Et+=rt.display.viewOffset,Et<0)return Ni(Ct.first,0,null,-1,-1);var Ot=Ve(Ct,Et),te=Ct.first+Ct.size-1;if(Ot>te)return Ni(Ct.first+Ct.size-1,Fn(Ct,te).text.length,null,1,1);ct<0&&(ct=0);for(var ve=Fn(Ct,Ot);;){var Te=xn(rt,ve,Ot,ct,Et),ke=yr(ve,Te.ch+(Te.xRel>0||Te.outside>0?1:0));if(!ke)return Te;var Ie=ke.find(1);if(Ie.line==Ot)return Ie;ve=Fn(Ct,Ot=Ie.line)}}function Sr(rt,ct,Et,Ct){Ct-=Qo(ct);var Ot=ct.text.length,te=ue(function(ve){return Is(rt,Et,ve-1).bottom<=Ct},Ot,0);return Ot=ue(function(ve){return Is(rt,Et,ve).top>Ct},te,Ot),{begin:te,end:Ot}}function $o(rt,ct,Et,Ct){Et||(Et=Ul(rt,ct));var Ot=aa(rt,ct,Is(rt,Et,Ct),"line").top;return Sr(rt,ct,Et,Ot)}function Ge(rt,ct,Et,Ct){return rt.bottom<=Et?!1:rt.top>Et?!0:(Ct?rt.left:rt.right)>ct}function xn(rt,ct,Et,Ct,Ot){Ot-=ci(ct);var te=Ul(rt,ct),ve=Qo(ct),Te=0,ke=ct.text.length,Ie=!0,nn=Xe(ct,rt.doc.direction);if(nn){var ze=(rt.options.lineWrapping?Wl:$s)(rt,ct,Et,te,nn,Ct,Ot);Ie=ze.level!=1,Te=Ie?ze.from:ze.to-1,ke=Ie?ze.to:ze.from-1}var pn=null,hn=null,Hn=ue(function(fi){var Nr=Is(rt,te,fi);return Nr.top+=ve,Nr.bottom+=ve,Ge(Nr,Ct,Ot,!1)?(Nr.top<=Ot&&Nr.left<=Ct&&(pn=fi,hn=Nr),!0):!1},Te,ke),Yn,or,Cr=!1;if(hn){var Hr=Ct-hn.left<hn.right-Ct,jr=Hr==Ie;Hn=pn+(jr?0:1),or=jr?"after":"before",Yn=Hr?hn.left:hn.right}else{!Ie&&(Hn==ke||Hn==Te)&&Hn++,or=Hn==0?"after":Hn==ct.text.length?"before":Is(rt,te,Hn-(Ie?1:0)).bottom+ve<=Ot==Ie?"after":"before";var Yr=mo(rt,en(Et,Hn,or),"line",ct,te);Yn=Yr.left,Cr=Ot<Yr.top?-1:Ot>=Yr.bottom?1:0}return Hn=$t(ct.text,Hn,1),Ni(Et,Hn,or,Cr,Ct-Yn)}function $s(rt,ct,Et,Ct,Ot,te,ve){var Te=ue(function(ze){var pn=Ot[ze],hn=pn.level!=1;return Ge(mo(rt,en(Et,hn?pn.to:pn.from,hn?"before":"after"),"line",ct,Ct),te,ve,!0)},0,Ot.length-1),ke=Ot[Te];if(Te>0){var Ie=ke.level!=1,nn=mo(rt,en(Et,Ie?ke.from:ke.to,Ie?"after":"before"),"line",ct,Ct);Ge(nn,te,ve,!0)&&nn.top>ve&&(ke=Ot[Te-1])}return ke}function Wl(rt,ct,Et,Ct,Ot,te,ve){var Te=Sr(rt,ct,Ct,ve),ke=Te.begin,Ie=Te.end;/\s/.test(ct.text.charAt(Ie-1))&&Ie--;for(var nn=null,ze=null,pn=0;pn<Ot.length;pn++){var hn=Ot[pn];if(!(hn.from>=Ie||hn.to<=ke)){var Hn=hn.level!=1,Yn=Is(rt,Ct,Hn?Math.min(Ie,hn.to)-1:Math.max(ke,hn.from)).right,or=Yn<te?te-Yn+1e9:Yn-te;(!nn||ze>or)&&(nn=hn,ze=or)}}return nn||(nn=Ot[Ot.length-1]),nn.from<ke&&(nn={from:ke,to:nn.to,level:nn.level}),nn.to>Ie&&(nn={from:nn.from,to:Ie,level:nn.level}),nn}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 pl(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 Ct=ct.getBoundingClientRect(),Ot=(Ct.right-Ct.left)/10;return Ot>2&&(rt.cachedCharWidth=Ot),Ot||10}function cu(rt){for(var ct=rt.display,Et={},Ct={},Ot=ct.gutters.clientLeft,te=ct.gutters.firstChild,ve=0;te;te=te.nextSibling,++ve){var Te=rt.display.gutterSpecs[ve].className;Et[Te]=te.offsetLeft+te.clientLeft+Ot,Ct[Te]=te.clientWidth}return{fixedPos:Jc(ct),gutterTotalWidth:ct.gutters.offsetWidth,gutterLeft:Et,gutterWidth:Ct,wrapperWidth:ct.wrapper.clientWidth}}function Jc(rt){return rt.scroller.getBoundingClientRect().left-rt.sizer.getBoundingClientRect().left}function Po(rt){var ct=Qa(rt.display),Et=rt.options.lineWrapping,Ct=Et&&Math.max(5,rt.display.scroller.clientWidth/pl(rt.display)-3);return function(Ot){if(Cn(rt.doc,Ot))return 0;var te=0;if(Ot.widgets)for(var ve=0;ve<Ot.widgets.length;ve++)Ot.widgets[ve].height&&(te+=Ot.widgets[ve].height);return Et?te+(Math.ceil(Ot.text.length/Ct)||1)*ct:te+ct}}function ei(rt){var ct=rt.doc,Et=Po(rt);ct.iter(function(Ct){var Ot=Et(Ct);Ot!=Ct.height&&Or(Ct,Ot)})}function $a(rt,ct,Et,Ct){var Ot=rt.display;if(!Et&&Pr(ct).getAttribute("cm-not-content")=="true")return null;var te,ve,Te=Ot.lineSpace.getBoundingClientRect();try{te=ct.clientX-Te.left,ve=ct.clientY-Te.top}catch(ze){return null}var ke=Da(rt,te,ve),Ie;if(Ct&&ke.xRel>0&&(Ie=Fn(rt.doc,ke.line).text).length==ke.ch){var nn=Yt(Ie,Ie.length,rt.options.tabSize)-Ie.length;ke=en(ke.line,Math.max(0,Math.round((te-bs(rt.display).left)/pl(rt.display))-nn))}return ke}function Rs(rt,ct){if(ct>=rt.display.viewTo||(ct-=rt.display.viewFrom,ct<0))return null;for(var Et=rt.display.view,Ct=0;Ct<Et.length;Ct++)if(ct-=Et[Ct].size,ct<0)return Ct}function Co(rt,ct,Et,Ct){ct==null&&(ct=rt.doc.first),Et==null&&(Et=rt.doc.first+rt.doc.size),Ct||(Ct=0);var Ot=rt.display;if(Ct&&Et<Ot.viewTo&&(Ot.updateLineNumbers==null||Ot.updateLineNumbers>ct)&&(Ot.updateLineNumbers=ct),rt.curOp.viewChanged=!0,ct>=Ot.viewTo)yn&&kr(rt.doc,ct)<Ot.viewTo&&Vo(rt);else if(Et<=Ot.viewFrom)yn&&ur(rt.doc,Et+Ct)>Ot.viewFrom?Vo(rt):(Ot.viewFrom+=Ct,Ot.viewTo+=Ct);else if(ct<=Ot.viewFrom&&Et>=Ot.viewTo)Vo(rt);else if(ct<=Ot.viewFrom){var te=cs(rt,Et,Et+Ct,1);te?(Ot.view=Ot.view.slice(te.index),Ot.viewFrom=te.lineN,Ot.viewTo+=Ct):Vo(rt)}else if(Et>=Ot.viewTo){var ve=cs(rt,ct,ct,-1);ve?(Ot.view=Ot.view.slice(0,ve.index),Ot.viewTo=ve.lineN):Vo(rt)}else{var Te=cs(rt,ct,ct,-1),ke=cs(rt,Et,Et+Ct,1);Te&&ke?(Ot.view=Ot.view.slice(0,Te.index).concat(Ti(rt,Te.lineN,ke.lineN)).concat(Ot.view.slice(ke.index)),Ot.viewTo+=Ct):Vo(rt)}var Ie=Ot.externalMeasured;Ie&&(Et<Ie.lineN?Ie.lineN+=Ct:ct<Ie.lineN+Ie.size&&(Ot.externalMeasured=null))}function Pi(rt,ct,Et){rt.curOp.viewChanged=!0;var Ct=rt.display,Ot=rt.display.externalMeasured;if(Ot&&ct>=Ot.lineN&&ct<Ot.lineN+Ot.size&&(Ct.externalMeasured=null),!(ct<Ct.viewFrom||ct>=Ct.viewTo)){var te=Ct.view[Rs(rt,ct)];if(te.node!=null){var ve=te.changes||(te.changes=[]);ye(ve,Et)==-1&&ve.push(Et)}}}function Vo(rt){rt.display.viewFrom=rt.display.viewTo=rt.doc.first,rt.display.view=[],rt.display.viewOffset=0}function cs(rt,ct,Et,Ct){var Ot=Rs(rt,ct),te,ve=rt.display.view;if(!yn||Et==rt.doc.first+rt.doc.size)return{index:Ot,lineN:Et};for(var Te=rt.display.viewFrom,ke=0;ke<Ot;ke++)Te+=ve[ke].size;if(Te!=ct){if(Ct>0){if(Ot==ve.length-1)return null;te=Te+ve[Ot].size-ct,Ot++}else te=Te-ct;ct+=te,Et+=te}for(;kr(rt.doc,Et)!=Et;){if(Ot==(Ct<0?0:ve.length-1))return null;Et+=Ct*ve[Ot-(Ct<0?1:0)].size,Ot+=Ct}return{index:Ot,lineN:Et}}function uo(rt,ct,Et){var Ct=rt.display,Ot=Ct.view;Ot.length==0||ct>=Ct.viewTo||Et<=Ct.viewFrom?(Ct.view=Ti(rt,ct,Et),Ct.viewFrom=ct):(Ct.viewFrom>ct?Ct.view=Ti(rt,ct,Ct.viewFrom).concat(Ct.view):Ct.viewFrom<ct&&(Ct.view=Ct.view.slice(Rs(rt,ct))),Ct.viewFrom=ct,Ct.viewTo<Et?Ct.view=Ct.view.concat(Ti(rt,Ct.viewTo,Et)):Ct.viewTo>Et&&(Ct.view=Ct.view.slice(0,Rs(rt,Et)))),Ct.viewTo=Et}function Cs(rt){for(var ct=rt.display.view,Et=0,Ct=0;Ct<ct.length;Ct++){var Ot=ct[Ct];!Ot.hidden&&(!Ot.node||Ot.changes)&&++Et}return Et}function sa(rt){rt.display.input.showSelection(rt.display.input.prepareSelection())}function Bu(rt,ct){ct===void 0&&(ct=!0);for(var Et=rt.doc,Ct={},Ot=Ct.cursors=document.createDocumentFragment(),te=Ct.selection=document.createDocumentFragment(),ve=0;ve<Et.sel.ranges.length;ve++)if(!(!ct&&ve==Et.sel.primIndex)){var Te=Et.sel.ranges[ve];if(!(Te.from().line>=rt.display.viewTo||Te.to().line<rt.display.viewFrom)){var ke=Te.empty();(ke||rt.options.showCursorWhenSelecting)&&Bi(rt,Te.head,Ot),ke||Di(rt,Te,te)}}return Ct}function Bi(rt,ct,Et){var Ct=mo(rt,ct,"div",null,null,!rt.options.singleCursorHeightPerLine),Ot=Et.appendChild(Nt("div","\xA0","CodeMirror-cursor"));if(Ot.style.left=Ct.left+"px",Ot.style.top=Ct.top+"px",Ot.style.height=Math.max(0,Ct.bottom-Ct.top)*rt.options.cursorHeight+"px",Ct.other){var te=Et.appendChild(Nt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));te.style.display="",te.style.left=Ct.other.left+"px",te.style.top=Ct.other.top+"px",te.style.height=(Ct.other.bottom-Ct.other.top)*.85+"px"}}function qa(rt,ct){return rt.top-ct.top||rt.left-ct.left}function Di(rt,ct,Et){var Ct=rt.display,Ot=rt.doc,te=document.createDocumentFragment(),ve=bs(rt.display),Te=ve.left,ke=Math.max(Ct.sizerWidth,Ps(rt)-Ct.sizer.offsetLeft)-ve.right,Ie=Ot.direction=="ltr";function nn(jr,Yr,fi,Nr){Yr<0&&(Yr=0),Yr=Math.round(Yr),Nr=Math.round(Nr),te.appendChild(Nt("div",null,"CodeMirror-selected","position: absolute; left: "+jr+`px;
|
|
top: `+Yr+"px; width: "+(fi==null?ke-jr:fi)+`px;
|
|
height: `+(Nr-Yr)+"px"))}function ze(jr,Yr,fi){var Nr=Fn(Ot,jr),ki=Nr.text.length,ko,ha;function Do(ea,Ts){return Du(rt,en(jr,ea),"div",Nr,Ts)}function ps(ea,Ts,Ia){var na=$o(rt,Nr,null,ea),Zi=Ts=="ltr"==(Ia=="after")?"left":"right",Ro=Ia=="after"?na.begin:na.end-(/\s/.test(Nr.text.charAt(na.end-1))?2:1);return Do(Ro,Zi)[Zi]}var Ha=Xe(Nr,Ot.direction);return me(Ha,Yr||0,fi==null?ki:fi,function(ea,Ts,Ia,na){var Zi=Ia=="ltr",Ro=Do(ea,Zi?"left":"right"),wa=Do(Ts-1,Zi?"right":"left"),Ra=Yr==null&&ea==0,ml=fi==null&&Ts==ki,Bo=na==0,il=!Ha||na==Ha.length-1;if(wa.top-Ro.top<=3){var Uo=(Ie?Ra:ml)&&Bo,xf=(Ie?ml:Ra)&&il,Us=Uo?Te:(Zi?Ro:wa).left,Ls=xf?ke:(Zi?wa:Ro).right;nn(Us,Ro.top,Ls-Us,Ro.bottom)}else{var gs,co,ba,Yl;Zi?(gs=Ie&&Ra&&Bo?Te:Ro.left,co=Ie?ke:ps(ea,Ia,"before"),ba=Ie?Te:ps(Ts,Ia,"after"),Yl=Ie&&ml&&il?ke:wa.right):(gs=Ie?ps(ea,Ia,"before"):Te,co=!Ie&&Ra&&Bo?ke:Ro.right,ba=!Ie&&ml&&il?Te:wa.left,Yl=Ie?ps(Ts,Ia,"after"):ke),nn(gs,Ro.top,co-gs,Ro.bottom),Ro.bottom<wa.top&&nn(Te,Ro.bottom,null,wa.top),nn(ba,wa.top,Yl-ba,wa.bottom)}(!ko||qa(Ro,ko)<0)&&(ko=Ro),qa(wa,ko)<0&&(ko=wa),(!ha||qa(Ro,ha)<0)&&(ha=Ro),qa(wa,ha)<0&&(ha=wa)}),{start:ko,end:ha}}var pn=ct.from(),hn=ct.to();if(pn.line==hn.line)ze(pn.line,pn.ch,hn.ch);else{var Hn=Fn(Ot,pn.line),Yn=Fn(Ot,hn.line),or=mr(Hn)==mr(Yn),Cr=ze(pn.line,pn.ch,or?Hn.text.length+1:null).end,Hr=ze(hn.line,or?0:null,hn.ch).start;or&&(Cr.top<Hr.top-2?(nn(Cr.right,Cr.top,null,Cr.bottom),nn(Te,Hr.top,Hr.left,Hr.bottom)):nn(Cr.right,Cr.top,Hr.left-Cr.right,Cr.bottom)),Cr.bottom<Hr.top&&nn(Te,Cr.bottom,null,Hr.top)}Et.appendChild(te)}function eo(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(),Ii(rt))}function Lo(rt){rt.state.delayingBlurEvent=!0,setTimeout(function(){rt.state.delayingBlurEvent&&(rt.state.delayingBlurEvent=!1,wh(rt))},100)}function Ii(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,Ht(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()),eo(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 qr(rt){for(var ct=rt.display,Et=ct.lineDiv.offsetTop,Ct=0;Ct<ct.view.length;Ct++){var Ot=ct.view[Ct],te=rt.options.lineWrapping,ve=void 0,Te=0;if(!Ot.hidden){if(Bt&&vt<8){var ke=Ot.node.offsetTop+Ot.node.offsetHeight;ve=ke-Et,Et=ke}else{var Ie=Ot.node.getBoundingClientRect();ve=Ie.bottom-Ie.top,!te&&Ot.text.firstChild&&(Te=Ot.text.firstChild.getBoundingClientRect().right-Ie.left-1)}var nn=Ot.line.height-ve;if((nn>.005||nn<-.005)&&(Or(Ot.line,ve),Dg(Ot.line),Ot.rest))for(var ze=0;ze<Ot.rest.length;ze++)Dg(Ot.rest[ze]);if(Te>rt.display.sizerWidth){var pn=Math.ceil(Te/pl(rt.display));pn>rt.display.maxLineLength&&(rt.display.maxLineLength=pn,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],Ct=Et.node.parentNode;Ct&&(Et.height=Ct.offsetHeight)}}function Oi(rt,ct,Et){var Ct=Et&&Et.top!=null?Math.max(0,Et.top):rt.scroller.scrollTop;Ct=Math.floor(Ct-lo(rt));var Ot=Et&&Et.bottom!=null?Et.bottom:Ct+rt.wrapper.clientHeight,te=Ve(ct,Ct),ve=Ve(ct,Ot);if(Et&&Et.ensure){var Te=Et.ensure.from.line,ke=Et.ensure.to.line;Te<te?(te=Te,ve=Ve(ct,ci(Fn(ct,Te))+rt.wrapper.clientHeight)):Math.min(ke,ct.lastLine())>=ve&&(te=Ve(ct,ci(Fn(ct,ke))-rt.wrapper.clientHeight),ve=ke)}return{from:te,to:Math.max(ve,te+1)}}function Bg(rt,ct){if(!Ke(rt,"scrollCursorIntoView")){var Et=rt.display,Ct=Et.sizer.getBoundingClientRect(),Ot=null;if(ct.top+Ct.top<0?Ot=!0:ct.bottom+Ct.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ot=!1),Ot!=null&&!xt){var te=Nt("div","\u200B",null,`position: absolute;
|
|
top: `+(ct.top-Et.viewOffset-lo(rt.display))+`px;
|
|
height: `+(ct.bottom-ct.top+Oa(rt)+Et.barHeight)+`px;
|
|
left: `+ct.left+"px; width: "+Math.max(2,ct.right-ct.left)+"px;");rt.display.lineSpace.appendChild(te),te.scrollIntoView(Ot),rt.display.lineSpace.removeChild(te)}}}function fc(rt,ct,Et,Ct){Ct==null&&(Ct=0);var Ot;!rt.options.lineWrapping&&ct==Et&&(ct=ct.ch?en(ct.line,ct.sticky=="before"?ct.ch-1:ct.ch,"after"):ct,Et=ct.sticky=="before"?en(ct.line,ct.ch+1,"before"):ct);for(var te=0;te<5;te++){var ve=!1,Te=mo(rt,ct),ke=!Et||Et==ct?Te:mo(rt,Et);Ot={left:Math.min(Te.left,ke.left),top:Math.min(Te.top,ke.top)-Ct,right:Math.max(Te.left,ke.left),bottom:Math.max(Te.bottom,ke.bottom)+Ct};var Ie=ep(rt,Ot),nn=rt.doc.scrollTop,ze=rt.doc.scrollLeft;if(Ie.scrollTop!=null&&(Ph(rt,Ie.scrollTop),Math.abs(rt.doc.scrollTop-nn)>1&&(ve=!0)),Ie.scrollLeft!=null&&(du(rt,Ie.scrollLeft),Math.abs(rt.doc.scrollLeft-ze)>1&&(ve=!0)),!ve)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,Ct=Qa(rt.display);ct.top<0&&(ct.top=0);var Ot=rt.curOp&&rt.curOp.scrollTop!=null?rt.curOp.scrollTop:Et.scroller.scrollTop,te=Ml(rt),ve={};ct.bottom-ct.top>te&&(ct.bottom=ct.top+te);var Te=rt.doc.height+Ja(Et),ke=ct.top<Ct,Ie=ct.bottom>Te-Ct;if(ct.top<Ot)ve.scrollTop=ke?0:ct.top;else if(ct.bottom>Ot+te){var nn=Math.min(ct.top,(Ie?Te:ct.bottom)-te);nn!=Ot&&(ve.scrollTop=nn)}var ze=rt.options.fixedGutter?0:Et.gutters.offsetWidth,pn=rt.curOp&&rt.curOp.scrollLeft!=null?rt.curOp.scrollLeft:Et.scroller.scrollLeft-ze,hn=Ps(rt)-Et.gutters.offsetWidth,Hn=ct.right-ct.left>hn;return Hn&&(ct.right=ct.left+hn),ct.left<10?ve.scrollLeft=0:ct.left<pn?ve.scrollLeft=Math.max(0,ct.left+ze-(Hn?0:10)):ct.right>hn+pn-3&&(ve.scrollLeft=ct.right+(Hn?0:10)-hn),ve}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 Ri(rt,ct){Hl(rt),rt.curOp.scrollToPos=ct}function Hl(rt){var ct=rt.curOp.scrollToPos;if(ct){rt.curOp.scrollToPos=null;var Et=Hi(rt,ct.from),Ct=Hi(rt,ct.to);Vf(rt,Et,Ct,ct.margin)}}function Vf(rt,ct,Et,Ct){var Ot=ep(rt,{left:Math.min(ct.left,Et.left),top:Math.min(ct.top,Et.top)-Ct,right:Math.max(ct.right,Et.right),bottom:Math.max(ct.bottom,Et.bottom)+Ct});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,Ct){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)&&!Ct)&&(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,Ct=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:Ct,scrollHeight:Ct+Oa(rt)+ct.barHeight,nativeBarWidth:ct.nativeBarWidth,gutterWidth:Et}}var Iu=function(rt,ct,Et){this.cm=Et;var Ct=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");Ct.tabIndex=Ot.tabIndex=-1,rt(Ct),rt(Ot),qe(Ct,"scroll",function(){Ct.clientHeight&&ct(Ct.scrollTop,"vertical")}),qe(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,Ct=rt.nativeBarWidth;if(Et){this.vert.style.display="block",this.vert.style.bottom=ct?Ct+"px":"0";var Ot=rt.viewHeight-(ct?Ct: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?Ct+"px":"0",this.horiz.style.left=rt.barLeft+"px";var te=rt.viewWidth-rt.barLeft-(Et?Ct:0);this.horiz.firstChild.style.width=Math.max(0,rt.scrollWidth-rt.clientWidth+te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&rt.clientHeight>0&&(Ct==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Et?Ct:0,bottom:ct?Ct: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 ee,this.disableVert=new ee},Iu.prototype.enableZeroWidthBar=function(rt,ct,Et){rt.style.pointerEvents="auto";function Ct(){var Ot=rt.getBoundingClientRect(),te=Et=="vert"?document.elementFromPoint(Ot.right-1,(Ot.top+Ot.bottom)/2):document.elementFromPoint((Ot.right+Ot.left)/2,Ot.bottom-1);te!=rt?rt.style.pointerEvents="none":ct.set(1e3,Ct)}ct.set(1e3,Ct)},Iu.prototype.clear=function(){var rt=this.horiz.parentNode;rt.removeChild(this.horiz),rt.removeChild(this.vert)};var Tl=function(){};Tl.prototype.update=function(){return{bottom:0,right:0}},Tl.prototype.setScrollLeft=function(){},Tl.prototype.setScrollTop=function(){},Tl.prototype.clear=function(){};function Ru(rt,ct){ct||(ct=tl(rt));var Et=rt.display.barWidth,Ct=rt.display.barHeight;Kf(rt,ct);for(var Ot=0;Ot<4&&Et!=rt.display.barWidth||Ct!=rt.display.barHeight;Ot++)Et!=rt.display.barWidth&&rt.options.lineWrapping&&qr(rt),Kf(rt,tl(rt)),Et=rt.display.barWidth,Ct=rt.display.barHeight}function Kf(rt,ct){var Et=rt.display,Ct=Et.scrollbars.update(ct);Et.sizer.style.paddingRight=(Et.barWidth=Ct.right)+"px",Et.sizer.style.paddingBottom=(Et.barHeight=Ct.bottom)+"px",Et.heightForcer.style.borderBottom=Ct.bottom+"px solid transparent",Ct.right&&Ct.bottom?(Et.scrollbarFiller.style.display="block",Et.scrollbarFiller.style.height=Ct.bottom+"px",Et.scrollbarFiller.style.width=Ct.right+"px"):Et.scrollbarFiller.style.display="",Ct.bottom&&rt.options.coverGutterNextToScrollbar&&rt.options.fixedGutter?(Et.gutterFiller.style.display="block",Et.gutterFiller.style.height=Ct.bottom+"px",Et.gutterFiller.style.width=ct.gutterWidth+"px"):Et.gutterFiller.style.display=""}var rp={native:Iu,null:Tl};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),qe(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&&Ht(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},El(rt.curOp)}function zu(rt){var ct=rt.curOp;ct&&uu(ct,function(Et){for(var Ct=0;Ct<Et.ops.length;Ct++)Et.ops[Ct].cm.curOp=null;Qv(Et)})}function Qv(rt){for(var ct=rt.ops,Et=0;Et<ct.length;Et++)$v(ct[Et]);for(var Ct=0;Ct<ct.length;Ct++)qv(ct[Ct]);for(var Ot=0;Ot<ct.length;Ot++)Rg(ct[Ot]);for(var te=0;te<ct.length;te++)Io(ct[te]);for(var ve=0;ve<ct.length;ve++)Gu(ct[ve])}function $v(rt){var ct=rt.cm,Et=ct.display;_g(ct),rt.updateMaxLine&&Ei(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&&qr(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+Oa(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&&eo(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,Ct=ct.doc;if(rt.updatedDisplay&&no(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,Bn(Ct,rt.scrollToPos.from),Bn(Ct,rt.scrollToPos.to),rt.scrollToPos.margin);Bg(ct,Ot)}var te=rt.maybeHiddenMarkers,ve=rt.maybeUnhiddenMarkers;if(te)for(var Te=0;Te<te.length;++Te)te[Te].lines.length||We(te[Te],"hide");if(ve)for(var ke=0;ke<ve.length;++ke)ve[ke].lines.length&&We(ve[ke],"unhide");Et.wrapper.offsetHeight&&(Ct.scrollTop=ct.display.scroller.scrollTop),rt.changeObjs&&We(ct,"changes",ct,rt.changeObjs),rt.update&&rt.update.finish()}function Yi(rt,ct){if(rt.curOp)return ct();_u(rt);try{return ct()}finally{zu(rt)}}function la(rt,ct){return function(){if(rt.curOp)return ct.apply(rt,arguments);_u(rt);try{return ct.apply(rt,arguments)}finally{zu(rt)}}}function ma(rt){return function(){if(this.curOp)return rt.apply(this,arguments);_u(this);try{return rt.apply(this,arguments)}finally{zu(this)}}}function va(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,fe(ya,rt))}function ya(rt){var ct=rt.doc;if(!(ct.highlightFrontier>=rt.display.viewTo)){var Et=+new Date+rt.options.workTime,Ct=mi(rt,ct.highlightFrontier),Ot=[];ct.iter(Ct.line,Math.min(ct.first+ct.size,rt.display.viewTo+500),function(te){if(Ct.line>=rt.display.viewFrom){var ve=te.styles,Te=te.text.length>rt.options.maxHighlightLength?zn(ct.mode,Ct.state):null,ke=Kr(rt,te,Ct,!0);Te&&(Ct.state=Te),te.styles=ke.styles;var Ie=te.styleClasses,nn=ke.classes;nn?te.styleClasses=nn:Ie&&(te.styleClasses=null);for(var ze=!ve||ve.length!=te.styles.length||Ie!=nn&&(!Ie||!nn||Ie.bgClass!=nn.bgClass||Ie.textClass!=nn.textClass),pn=0;!ze&&pn<ve.length;++pn)ze=ve[pn]!=te.styles[pn];ze&&Ot.push(Ct.line),te.stateAfter=Ct.save(),Ct.nextLine()}else te.text.length<=rt.options.maxHighlightLength&&dn(rt,te.text,Ct),te.stateAfter=Ct.line%5==0?Ct.save():null,Ct.nextLine();if(+new Date>Et)return dc(rt,rt.options.workDelay),!0}),ct.highlightFrontier=Ct.line,ct.modeFrontier=Math.max(ct.modeFrontier,Ct.line),Ot.length&&Yi(rt,function(){for(var te=0;te<Ot.length;te++)Pi(rt,Ot[te],"text")})}}var Ch=function(rt,ct,Et){var Ct=rt.display;this.viewport=ct,this.visible=Oi(Ct,rt.doc,ct),this.editorIsHidden=!Ct.wrapper.offsetWidth,this.wrapperHeight=Ct.wrapper.clientHeight,this.wrapperWidth=Ct.wrapper.clientWidth,this.oldDisplayWidth=Ps(rt),this.force=Et,this.dims=cu(rt),this.events=[]};Ch.prototype.signal=function(rt,ct){an(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=Oa(rt)+"px",ct.sizer.style.marginBottom=-ct.nativeBarWidth+"px",ct.sizer.style.borderRightWidth=Oa(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 Ct=window.getSelection();Ct.anchorNode&&Ct.extend&&Jt(rt.display.lineDiv,Ct.anchorNode)&&(Et.anchorNode=Ct.anchorNode,Et.anchorOffset=Ct.anchorOffset,Et.focusNode=Ct.focusNode,Et.focusOffset=Ct.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,Ct=rt.doc;if(ct.editorIsHidden)return Vo(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)&&(Vo(rt),ct.dims=cu(rt));var Ot=Ct.first+Ct.size,te=Math.max(ct.visible.from-rt.options.viewportMargin,Ct.first),ve=Math.min(Ot,ct.visible.to+rt.options.viewportMargin);Et.viewFrom<te&&te-Et.viewFrom<20&&(te=Math.max(Ct.first,Et.viewFrom)),Et.viewTo>ve&&Et.viewTo-ve<20&&(ve=Math.min(Ot,Et.viewTo)),yn&&(te=kr(rt.doc,te),ve=ur(rt.doc,ve));var Te=te!=Et.viewFrom||ve!=Et.viewTo||Et.lastWrapHeight!=ct.wrapperHeight||Et.lastWrapWidth!=ct.wrapperWidth;uo(rt,te,ve),Et.viewOffset=ci(Fn(rt.doc,Et.viewFrom)),rt.display.mover.style.top=Et.viewOffset+"px";var ke=Cs(rt);if(!Te&&ke==0&&!ct.force&&Et.renderedView==Et.view&&(Et.updateLineNumbers==null||Et.updateLineNumbers>=Et.viewTo))return!1;var Ie=zg(rt);return ke>4&&(Et.lineDiv.style.display="none"),op(rt,Et.updateLineNumbers,ct.dims),ke>4&&(Et.lineDiv.style.display=""),Et.renderedView=Et.view,fs(Ie),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 no(rt,ct){for(var Et=ct.viewport,Ct=!0;;Ct=!1){if(!Ct||!rt.options.lineWrapping||ct.oldDisplayWidth==Ps(rt)){if(Et&&Et.top!=null&&(Et={top:Math.min(rt.doc.height+Ja(rt.display)-Ml(rt),Et.top)}),ct.visible=Oi(rt.display,rt.doc,Et),ct.visible.from>=rt.display.viewFrom&&ct.visible.to<=rt.display.viewTo)break}else Ct&&(ct.visible=Oi(rt.display,rt.doc,Et));if(!Zf(rt,ct))break;qr(rt);var Ot=tl(rt);sa(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)){qr(rt),no(rt,Et);var Ct=tl(rt);sa(rt),Ru(rt,Ct),Hu(rt,Ct),Et.finish()}}function op(rt,ct,Et){var Ct=rt.display,Ot=rt.options.lineNumbers,te=Ct.lineDiv,ve=te.firstChild;function Te(Hn){var Yn=Hn.nextSibling;return gt&&at&&rt.display.currentWheelTarget==Hn?Hn.style.display="none":Hn.parentNode.removeChild(Hn),Yn}for(var ke=Ct.view,Ie=Ct.viewFrom,nn=0;nn<ke.length;nn++){var ze=ke[nn];if(!ze.hidden)if(!ze.node||ze.node.parentNode!=te){var pn=gi(rt,ze,Ie,Et);te.insertBefore(pn,ve)}else{for(;ve!=ze.node;)ve=Te(ve);var hn=Ot&&ct!=null&&ct<=Ie&&ze.lineNumber;ze.changes&&(ye(ze.changes,"gutter")>-1&&(hn=!1),hu(rt,ze,Ie,Et)),hn&&(Ft(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(jn(rt.options,Ie)))),ve=ze.node.nextSibling}Ie+=ze.size}for(;ve;)ve=Te(ve)}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+Oa(rt)+"px"}function Xf(rt){var ct=rt.display,Et=ct.view;if(!(!ct.alignWidgets&&(!ct.gutters.firstChild||!rt.options.fixedGutter))){for(var Ct=Jc(ct)-ct.scroller.scrollLeft+rt.doc.scrollLeft,Ot=ct.gutters.offsetWidth,te=Ct+"px",ve=0;ve<Et.length;ve++)if(!Et[ve].hidden){rt.options.fixedGutter&&(Et[ve].gutter&&(Et[ve].gutter.style.left=te),Et[ve].gutterBackground&&(Et[ve].gutterBackground.style.left=te));var Te=Et[ve].alignable;if(Te)for(var ke=0;ke<Te.length;ke++)Te[ke].style.left=te}rt.options.fixedGutter&&(ct.gutters.style.left=Ct+Ot+"px")}}function qo(rt){if(!rt.options.lineNumbers)return!1;var ct=rt.doc,Et=jn(rt.options,ct.first+ct.size-1),Ct=rt.display;if(Et.length!=Ct.lineNumChars){var Ot=Ct.measure.appendChild(Nt("div",[Nt("div",Et)],"CodeMirror-linenumber CodeMirror-gutter-elt")),te=Ot.firstChild.offsetWidth,ve=Ot.offsetWidth-te;return Ct.lineGutter.style.width="",Ct.lineNumInnerWidth=Math.max(te,Ct.lineGutter.offsetWidth-ve)+1,Ct.lineNumWidth=Ct.lineNumInnerWidth+ve,Ct.lineNumChars=Ct.lineNumInnerWidth?Et.length:-1,Ct.lineGutter.style.width=Ct.lineNumWidth+"px",Wu(rt.display),!0}return!1}function Sa(rt,ct){for(var Et=[],Ct=!1,Ot=0;Ot<rt.length;Ot++){var te=rt[Ot],ve=null;if(typeof te!="string"&&(ve=te.style,te=te.className),te=="CodeMirror-linenumbers")if(ct)Ct=!0;else continue;Et.push({className:te,style:ve})}return ct&&!Ct&&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 Ct=0;Ct<Et.length;++Ct){var Ot=Et[Ct],te=Ot.className,ve=Ot.style,Te=ct.appendChild(Nt("div",null,"CodeMirror-gutter "+te));ve&&(Te.style.cssText=ve),te=="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),Co(rt),Xf(rt)}function Vu(rt,ct,Et,Ct){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=Gt("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=Gt("div",[Ot.measure,Ot.lineMeasure,Ot.selectionDiv,Ot.cursorDiv,Ot.lineDiv],null,"position: relative; outline: none");var te=Gt("div",[Ot.lineSpace],"CodeMirror-lines");Ot.mover=Nt("div",[te],null,"position: relative"),Ot.sizer=Nt("div",[Ot.mover],"CodeMirror-sizer"),Ot.sizerWidth=null,Ot.heightForcer=Nt("div",null,null,"position: absolute; height: "+xe+"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=Sa(Ct.gutters,Ct.lineNumbers),kh(Ot),Et.init(Ot)}var ks=0,Ko=null;Bt?Ko=-.53:ae?Ko=15:bt?Ko=-.7:Tt&&(Ko=-1/3);function Ll(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=Ll(rt);return ct.x*=Ko,ct.y*=Ko,ct}function xa(rt,ct){var Et=Ll(ct),Ct=Et.x,Ot=Et.y,te=rt.display,ve=te.scroller,Te=ve.scrollWidth>ve.clientWidth,ke=ve.scrollHeight>ve.clientHeight;if(Ct&&Te||Ot&&ke){if(Ot&&at&>){t:for(var Ie=ct.target,nn=te.view;Ie!=ve;Ie=Ie.parentNode)for(var ze=0;ze<nn.length;ze++)if(nn[ze].node==Ie){rt.display.currentWheelTarget=Ie;break t}}if(Ct&&!ae&&!St&&Ko!=null){Ot&&ke&&Ph(rt,Math.max(0,ve.scrollTop+Ot*Ko)),du(rt,Math.max(0,ve.scrollLeft+Ct*Ko)),(!Ot||Ot&&ke)&&gn(ct),te.wheelStartX=null;return}if(Ot&&Ko!=null){var pn=Ot*Ko,hn=rt.doc.scrollTop,Hn=hn+te.wrapper.clientHeight;pn<0?hn=Math.max(0,hn+pn-50):Hn=Math.min(rt.doc.height,Hn+pn+50),Uu(rt,{top:hn,bottom:Hn})}ks<20&&(te.wheelStartX==null?(te.wheelStartX=ve.scrollLeft,te.wheelStartY=ve.scrollTop,te.wheelDX=Ct,te.wheelDY=Ot,setTimeout(function(){if(te.wheelStartX!=null){var Yn=ve.scrollLeft-te.wheelStartX,or=ve.scrollTop-te.wheelStartY,Cr=or&&te.wheelDY&&or/te.wheelDY||Yn&&te.wheelDX&&Yn/te.wheelDX;te.wheelStartX=te.wheelStartY=null,Cr&&(Ko=(Ko*ks+Cr)/(ks+1),++ks)}},200)):(te.wheelDX+=Ct,te.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],Ct=rt.ranges[ct];if(!Pn(Et.anchor,Ct.anchor)||!Pn(Et.head,Ct.head))return!1}return!0},el.prototype.deepCopy=function(){for(var rt=[],ct=0;ct<this.ranges.length;ct++)rt[ct]=new ro(Ln(this.ranges[ct].anchor),Ln(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 Ct=this.ranges[Et];if(kn(ct,Ct.from())>=0&&kn(rt,Ct.to())<=0)return Et}return-1};var ro=function(rt,ct){this.anchor=rt,this.head=ct};ro.prototype.from=function(){return Nn(this.anchor,this.head)},ro.prototype.to=function(){return $n(this.anchor,this.head)},ro.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function gl(rt,ct,Et){var Ct=rt&&rt.options.selectionsMayTouch,Ot=ct[Et];ct.sort(function(pn,hn){return kn(pn.from(),hn.from())}),Et=ye(ct,Ot);for(var te=1;te<ct.length;te++){var ve=ct[te],Te=ct[te-1],ke=kn(Te.to(),ve.from());if(Ct&&!ve.empty()?ke>0:ke>=0){var Ie=Nn(Te.from(),ve.from()),nn=$n(Te.to(),ve.to()),ze=Te.empty()?ve.from()==ve.head:Te.from()==Te.head;te<=Et&&--Et,ct.splice(--te,2,new ro(ze?nn:Ie,ze?Ie:nn))}}return new el(ct,Et)}function pu(rt,ct){return new el([new ro(rt,ct||rt)],0)}function Ku(rt){return rt.text?en(rt.from.line+rt.text.length-1,ge(rt.text).length+(rt.text.length==1?rt.from.ch:0)):rt.to}function Eh(rt,ct){if(kn(rt,ct.from)<0)return rt;if(kn(rt,ct.to)<=0)return Ku(ct);var Et=rt.line+ct.text.length-(ct.to.line-ct.from.line)-1,Ct=rt.ch;return rt.line==ct.to.line&&(Ct+=Ku(ct).ch-ct.to.ch),en(Et,Ct)}function $c(rt,ct){for(var Et=[],Ct=0;Ct<rt.sel.ranges.length;Ct++){var Ot=rt.sel.ranges[Ct];Et.push(new ro(Eh(Ot.anchor,ct),Eh(Ot.head,ct)))}return gl(rt.cm,Et,rt.sel.primIndex)}function pc(rt,ct,Et){return rt.line==ct.line?en(Et.line,rt.ch-ct.ch+Et.ch):en(Et.line+(rt.line-ct.line),rt.ch)}function qc(rt,ct,Et){for(var Ct=[],Ot=en(rt.first,0),te=Ot,ve=0;ve<ct.length;ve++){var Te=ct[ve],ke=pc(Te.from,Ot,te),Ie=pc(Ku(Te),Ot,te);if(Ot=Te.to,te=Ie,Et=="around"){var nn=rt.sel.ranges[ve],ze=kn(nn.head,nn.anchor)<0;Ct[ve]=new ro(ze?Ie:ke,ze?ke:Ie)}else Ct[ve]=new ro(ke,ke)}return new el(Ct,rt.sel.primIndex)}function Ci(rt){rt.doc.mode=Ye(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&&Co(rt)}function ap(rt,ct){return ct.from.ch==0&&ct.to.ch==0&&ge(ct.text)==""&&(!rt.cm||rt.cm.options.wholeLineUpdateBefore)}function Yf(rt,ct,Et,Ct){function Ot(Hr){return Et?Et[Hr]:null}function te(Hr,jr,Yr){wo(Hr,jr,Yr,Ct),Br(Hr,"change",Hr,ct)}function ve(Hr,jr){for(var Yr=[],fi=Hr;fi<jr;++fi)Yr.push(new qi(Ie[fi],Ot(fi),Ct));return Yr}var Te=ct.from,ke=ct.to,Ie=ct.text,nn=Fn(rt,Te.line),ze=Fn(rt,ke.line),pn=ge(Ie),hn=Ot(Ie.length-1),Hn=ke.line-Te.line;if(ct.full)rt.insert(0,ve(0,Ie.length)),rt.remove(Ie.length,rt.size-Ie.length);else if(ap(rt,ct)){var Yn=ve(0,Ie.length-1);te(ze,ze.text,hn),Hn&&rt.remove(Te.line,Hn),Yn.length&&rt.insert(Te.line,Yn)}else if(nn==ze)if(Ie.length==1)te(nn,nn.text.slice(0,Te.ch)+pn+nn.text.slice(ke.ch),hn);else{var or=ve(1,Ie.length-1);or.push(new qi(pn+nn.text.slice(ke.ch),hn,Ct)),te(nn,nn.text.slice(0,Te.ch)+Ie[0],Ot(0)),rt.insert(Te.line+1,or)}else if(Ie.length==1)te(nn,nn.text.slice(0,Te.ch)+Ie[0]+ze.text.slice(ke.ch),Ot(0)),rt.remove(Te.line+1,Hn);else{te(nn,nn.text.slice(0,Te.ch)+Ie[0],Ot(0)),te(ze,pn+ze.text.slice(ke.ch),hn);var Cr=ve(1,Ie.length-1);Hn>1&&rt.remove(Te.line+1,Hn-1),rt.insert(Te.line+1,Cr)}Br(rt,"change",rt,ct)}function Al(rt,ct,Et){function Ct(Ot,te,ve){if(Ot.linked)for(var Te=0;Te<Ot.linked.length;++Te){var ke=Ot.linked[Te];if(ke.doc!=te){var Ie=ve&&ke.sharedHist;Et&&!Ie||(ct(ke.doc,Ie),Ct(ke.doc,Ot,Ie))}}}Ct(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,ei(rt),Ci(rt),ef(rt),rt.options.lineWrapping||Ei(rt),rt.options.mode=ct.modeOption,Co(rt)}function ef(rt){(rt.doc.direction=="rtl"?Ht:Dt)(rt.display.lineDiv,"CodeMirror-rtl")}function t0(rt){Yi(rt,function(){ef(rt),Co(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:Ln(ct.from),to:Ku(ct),text:cr(rt,ct.from,ct.to)};return Zu(rt,Et,ct.from.line,ct.to.line+1),Al(rt,function(Ct){return Zu(Ct,Et,ct.from.line,ct.to.line+1)},!0),Et}function mc(rt){for(;rt.length;){var ct=ge(rt);if(ct.ranges)rt.pop();else break}}function nf(rt,ct){if(ct)return mc(rt.done),ge(rt.done);if(rt.done.length&&!ge(rt.done).ranges)return ge(rt.done);if(rt.done.length>1&&!rt.done[rt.done.length-2].ranges)return rt.done.pop(),ge(rt.done)}function rf(rt,ct,Et,Ct){var Ot=rt.history;Ot.undone.length=0;var te=+new Date,ve,Te;if((Ot.lastOp==Ct||Ot.lastOrigin==ct.origin&&ct.origin&&(ct.origin.charAt(0)=="+"&&Ot.lastModTime>te-(rt.cm?rt.cm.options.historyEventDelay:500)||ct.origin.charAt(0)=="*"))&&(ve=nf(Ot,Ot.lastOp==Ct)))Te=ge(ve.changes),kn(ct.from,ct.to)==0&&kn(ct.from,Te.to)==0?Te.to=Ku(ct):ve.changes.push(Qf(rt,ct));else{var ke=ge(Ot.done);for((!ke||!ke.ranges)&&vc(rt.sel,Ot.done),ve={changes:[Qf(rt,ct)],generation:Ot.generation},Ot.done.push(ve);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=te,Ot.lastOp=Ot.lastSelOp=Ct,Ot.lastOrigin=Ot.lastSelOrigin=ct.origin,Te||We(rt,"historyAdded")}function sp(rt,ct,Et,Ct){var Ot=ct.charAt(0);return Ot=="*"||Ot=="+"&&Et.ranges.length==Ct.ranges.length&&Et.somethingSelected()==Ct.somethingSelected()&&new Date-rt.history.lastSelTime<=(rt.cm?rt.cm.options.historyEventDelay:500)}function of(rt,ct,Et,Ct){var Ot=rt.history,te=Ct&&Ct.origin;Et==Ot.lastSelOp||te&&Ot.lastSelOrigin==te&&(Ot.lastModTime==Ot.lastSelTime&&Ot.lastOrigin==te||sp(rt,te,ge(Ot.done),ct))?Ot.done[Ot.done.length-1]=ct:vc(ct,Ot.done),Ot.lastSelTime=+new Date,Ot.lastSelOrigin=te,Ot.lastSelOp=Et,Ct&&Ct.clearRedo!==!1&&mc(Ot.undone)}function vc(rt,ct){var Et=ge(ct);Et&&Et.ranges&&Et.equals(rt)||ct.push(rt)}function Zu(rt,ct,Et,Ct){var Ot=ct["spans_"+rt.id],te=0;rt.iter(Math.max(rt.first,Et),Math.min(rt.first+rt.size,Ct),function(ve){ve.markedSpans&&((Ot||(Ot=ct["spans_"+rt.id]={}))[te]=ve.markedSpans),++te})}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 Ct=[],Ot=0;Ot<ct.text.length;++Ot)Ct.push(ts(Et[Ot]));return Ct}function $f(rt,ct){var Et=Vl(rt,ct),Ct=vi(rt,ct);if(!Et)return Ct;if(!Ct)return Et;for(var Ot=0;Ot<Et.length;++Ot){var te=Et[Ot],ve=Ct[Ot];if(te&&ve)t:for(var Te=0;Te<ve.length;++Te){for(var ke=ve[Te],Ie=0;Ie<te.length;++Ie)if(te[Ie].marker==ke.marker)continue t;te.push(ke)}else ve&&(Et[Ot]=ve)}return Et}function gu(rt,ct,Et){for(var Ct=[],Ot=0;Ot<rt.length;++Ot){var te=rt[Ot];if(te.ranges){Ct.push(Et?el.prototype.deepCopy.call(te):te);continue}var ve=te.changes,Te=[];Ct.push({changes:Te});for(var ke=0;ke<ve.length;++ke){var Ie=ve[ke],nn=void 0;if(Te.push({from:Ie.from,to:Ie.to,text:Ie.text}),ct)for(var ze in Ie)(nn=ze.match(/^spans_(\d+)$/))&&ye(ct,Number(nn[1]))>-1&&(ge(Te)[ze]=Ie[ze],delete Ie[ze])}}return Ct}function qf(rt,ct,Et,Ct){if(Ct){var Ot=rt.anchor;if(Et){var te=kn(ct,Ot)<0;te!=kn(Et,Ot)<0?(Ot=ct,ct=Et):te!=kn(ct,Et)<0&&(ct=Et)}return new ro(Ot,ct)}else return new ro(Et||ct,ct)}function td(rt,ct,Et,Ct,Ot){Ot==null&&(Ot=rt.cm&&(rt.cm.display.shift||rt.extend)),Wa(rt,new el([qf(rt.sel.primary(),ct,Et,Ot)],0),Ct)}function Gg(rt,ct,Et){for(var Ct=[],Ot=rt.cm&&(rt.cm.display.shift||rt.extend),te=0;te<rt.sel.ranges.length;te++)Ct[te]=qf(rt.sel.ranges[te],ct[te],null,Ot);var ve=gl(rt.cm,Ct,rt.sel.primIndex);Wa(rt,ve,Et)}function Xu(rt,ct,Et,Ct){var Ot=rt.sel.ranges.slice(0);Ot[ct]=Et,Wa(rt,gl(rt.cm,Ot,rt.sel.primIndex),Ct)}function Mh(rt,ct,Et,Ct){Wa(rt,pu(ct,Et),Ct)}function Ug(rt,ct,Et){var Ct={ranges:ct.ranges,update:function(Ot){this.ranges=[];for(var te=0;te<Ot.length;te++)this.ranges[te]=new ro(Bn(rt,Ot[te].anchor),Bn(rt,Ot[te].head))},origin:Et&&Et.origin};return We(rt,"beforeSelectionChange",rt,Ct),rt.cm&&We(rt.cm,"beforeSelectionChange",rt.cm,Ct),Ct.ranges!=ct.ranges?gl(rt.cm,Ct.ranges,Ct.ranges.length-1):ct}function ed(rt,ct,Et){var Ct=rt.history.done,Ot=ge(Ct);Ot&&Ot.ranges?(Ct[Ct.length-1]=ct,Th(rt,ct,Et)):Wa(rt,ct,Et)}function Wa(rt,ct,Et){Th(rt,ct,Et),of(rt,rt.sel,rt.cm?rt.cm.curOp.id:NaN,Et)}function Th(rt,ct,Et){(an(rt,"beforeSelectionChange")||rt.cm&&an(rt.cm,"beforeSelectionChange"))&&(ct=Ug(rt,ct,Et));var Ct=Et&&Et.bias||(kn(ct.primary().head,rt.sel.primary().head)<0?-1:1);lp(rt,sf(rt,ct,Ct,!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)),Br(rt,"cursorActivity",rt))}function af(rt){lp(rt,sf(rt,rt.sel,null,!1))}function sf(rt,ct,Et,Ct){for(var Ot,te=0;te<ct.ranges.length;te++){var ve=ct.ranges[te],Te=ct.ranges.length==rt.sel.ranges.length&&rt.sel.ranges[te],ke=lf(rt,ve.anchor,Te&&Te.anchor,Et,Ct),Ie=lf(rt,ve.head,Te&&Te.head,Et,Ct);(Ot||ke!=ve.anchor||Ie!=ve.head)&&(Ot||(Ot=ct.ranges.slice(0,te)),Ot[te]=new ro(ke,Ie))}return Ot?gl(rt.cm,Ot,ct.primIndex):ct}function mu(rt,ct,Et,Ct,Ot){var te=Fn(rt,ct.line);if(te.markedSpans)for(var ve=0;ve<te.markedSpans.length;++ve){var Te=te.markedSpans[ve],ke=Te.marker,Ie="selectLeft"in ke?!ke.selectLeft:ke.inclusiveLeft,nn="selectRight"in ke?!ke.selectRight:ke.inclusiveRight;if((Te.from==null||(Ie?Te.from<=ct.ch:Te.from<ct.ch))&&(Te.to==null||(nn?Te.to>=ct.ch:Te.to>ct.ch))){if(Ot&&(We(ke,"beforeCursorEnter"),ke.explicitlyCleared))if(te.markedSpans){--ve;continue}else break;if(!ke.atomic)continue;if(Et){var ze=ke.find(Ct<0?1:-1),pn=void 0;if((Ct<0?nn:Ie)&&(ze=up(rt,ze,-Ct,ze&&ze.line==ct.line?te:null)),ze&&ze.line==ct.line&&(pn=kn(ze,Et))&&(Ct<0?pn<0:pn>0))return mu(rt,ze,ct,Ct,Ot)}var hn=ke.find(Ct<0?-1:1);return(Ct<0?Ie:nn)&&(hn=up(rt,hn,Ct,hn.line==ct.line?te:null)),hn?mu(rt,hn,ct,Ct,Ot):null}}return ct}function lf(rt,ct,Et,Ct,Ot){var te=Ct||1,ve=mu(rt,ct,Et,te,Ot)||!Ot&&mu(rt,ct,Et,te,!0)||mu(rt,ct,Et,-te,Ot)||!Ot&&mu(rt,ct,Et,-te,!0);return ve||(rt.cantEdit=!0,en(rt.first,0))}function up(rt,ct,Et,Ct){return Et<0&&ct.ch==0?ct.line>rt.first?Bn(rt,en(ct.line-1)):null:Et>0&&ct.ch==(Ct||Fn(rt,ct.line)).text.length?ct.line<rt.first+rt.size-1?en(ct.line+1,0):null:new en(ct.line,ct.ch+Et)}function Zo(rt){rt.setSelection(en(rt.firstLine(),0),en(rt.lastLine()),ce)}function uf(rt,ct,Et){var Ct={canceled:!1,from:ct.from,to:ct.to,text:ct.text,origin:ct.origin,cancel:function(){return Ct.canceled=!0}};return Et&&(Ct.update=function(Ot,te,ve,Te){Ot&&(Ct.from=Bn(rt,Ot)),te&&(Ct.to=Bn(rt,te)),ve&&(Ct.text=ve),Te!==void 0&&(Ct.origin=Te)}),We(rt,"beforeChange",rt,Ct),rt.cm&&We(rt.cm,"beforeChange",rt.cm,Ct),Ct.canceled?(rt.cm&&(rt.cm.curOp.updateInput=2),null):{from:Ct.from,to:Ct.to,text:Ct.text,origin:Ct.origin}}function Yu(rt,ct,Et){if(rt.cm){if(!rt.cm.curOp)return la(rt.cm,Yu)(rt,ct,Et);if(rt.cm.state.suppressEdits)return}if(!((an(rt,"beforeChange")||rt.cm&&an(rt.cm,"beforeChange"))&&(ct=uf(rt,ct,!0),!ct))){var Ct=ii&&!Et&&Fi(rt,ct.from,ct.to);if(Ct)for(var Ot=Ct.length-1;Ot>=0;--Ot)Lh(rt,{from:Ct[Ot].from,to:Ct[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]==""&&kn(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,vi(rt,ct));var Ct=[];Al(rt,function(Ot,te){!te&&ye(Ct,Ot.history)==-1&&(cp(Ot.history,ct),Ct.push(Ot.history)),yc(Ot,ct,null,vi(Ot,ct))})}}function hf(rt,ct,Et){var Ct=rt.cm&&rt.cm.state.suppressEdits;if(!(Ct&&!Et)){for(var Ot=rt.history,te,ve=rt.sel,Te=ct=="undo"?Ot.done:Ot.undone,ke=ct=="undo"?Ot.undone:Ot.done,Ie=0;Ie<Te.length&&(te=Te[Ie],!(Et?te.ranges&&!te.equals(rt.sel):!te.ranges));Ie++);if(Ie!=Te.length){for(Ot.lastOrigin=Ot.lastSelOrigin=null;;)if(te=Te.pop(),te.ranges){if(vc(te,ke),Et&&!te.equals(rt.sel)){Wa(rt,te,{clearRedo:!1});return}ve=te}else if(Ct){Te.push(te);return}else break;var nn=[];vc(ve,ke),ke.push({changes:nn,generation:Ot.generation}),Ot.generation=te.generation||++Ot.maxGeneration;for(var ze=an(rt,"beforeChange")||rt.cm&&an(rt.cm,"beforeChange"),pn=function(Yn){var or=te.changes[Yn];if(or.origin=ct,ze&&!uf(rt,or,!1))return Te.length=0,{};nn.push(Qf(rt,or));var Cr=Yn?$c(rt,or):ge(Te);yc(rt,or,Cr,$f(rt,or)),!Yn&&rt.cm&&rt.cm.scrollIntoView({from:or.from,to:Ku(or)});var Hr=[];Al(rt,function(jr,Yr){!Yr&&ye(Hr,jr.history)==-1&&(cp(jr.history,or),Hr.push(jr.history)),yc(jr,or,null,$f(jr,or))})},hn=te.changes.length-1;hn>=0;--hn){var Hn=pn(hn);if(Hn)return Hn.v}}}}function hp(rt,ct){if(ct!=0&&(rt.first+=ct,rt.sel=new el(Se(rt.sel.ranges,function(Ot){return new ro(en(Ot.anchor.line+ct,Ot.anchor.ch),en(Ot.head.line+ct,Ot.head.ch))}),rt.sel.primIndex),rt.cm)){Co(rt.cm,rt.first,rt.first-ct,ct);for(var Et=rt.cm.display,Ct=Et.viewFrom;Ct<Et.viewTo;Ct++)Pi(rt.cm,Ct,"gutter")}}function yc(rt,ct,Et,Ct){if(rt.cm&&!rt.cm.curOp)return la(rt.cm,yc)(rt,ct,Et,Ct);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:en(rt.first,0),to:en(ct.to.line+Ot,ct.to.ch),text:[ge(ct.text)],origin:ct.origin}}var te=rt.lastLine();ct.to.line>te&&(ct={from:ct.from,to:en(te,Fn(rt,te).text.length),text:[ct.text[0]],origin:ct.origin}),ct.removed=cr(rt,ct.from,ct.to),Et||(Et=$c(rt,ct)),rt.cm?Wg(rt.cm,ct,Ct):Yf(rt,ct,Ct),Th(rt,Et,ce),rt.cantEdit&&lf(rt,en(rt.firstLine(),0))&&(rt.cantEdit=!1)}}function Wg(rt,ct,Et){var Ct=rt.doc,Ot=rt.display,te=ct.from,ve=ct.to,Te=!1,ke=te.line;rt.options.lineWrapping||(ke=Ae(mr(Fn(Ct,te.line))),Ct.iter(ke,ve.line+1,function(hn){if(hn==Ot.maxLine)return Te=!0,!0})),Ct.sel.contains(ct.from,ct.to)>-1&&rn(rt),Yf(Ct,ct,Et,Po(rt)),rt.options.lineWrapping||(Ct.iter(ke,te.line+ct.text.length,function(hn){var Hn=Wi(hn);Hn>Ot.maxLineLength&&(Ot.maxLine=hn,Ot.maxLineLength=Hn,Ot.maxLineChanged=!0,Te=!1)}),Te&&(rt.curOp.updateMaxLine=!0)),$r(Ct,te.line),dc(rt,400);var Ie=ct.text.length-(ve.line-te.line)-1;ct.full?Co(rt):te.line==ve.line&&ct.text.length==1&&!ap(rt.doc,ct)?Pi(rt,te.line,"text"):Co(rt,te.line,ve.line+1,Ie);var nn=an(rt,"changes"),ze=an(rt,"change");if(ze||nn){var pn={from:te,to:ve,text:ct.text,removed:ct.removed,origin:ct.origin};ze&&Br(rt,"change",rt,pn),nn&&(rt.curOp.changeObjs||(rt.curOp.changeObjs=[])).push(pn)}rt.display.selForContextMenu=null}function Ah(rt,ct,Et,Ct,Ot){var te;Ct||(Ct=Et),kn(Ct,Et)<0&&(te=[Ct,Et],Et=te[0],Ct=te[1]),typeof ct=="string"&&(ct=rt.splitLines(ct)),Yu(rt,{from:Et,to:Ct,text:ct,origin:Ot})}function nl(rt,ct,Et,Ct){Et<rt.line?rt.line+=Ct:ct<rt.line&&(rt.line=ct,rt.ch=0)}function Hg(rt,ct,Et,Ct){for(var Ot=0;Ot<rt.length;++Ot){var te=rt[Ot],ve=!0;if(te.ranges){te.copied||(te=rt[Ot]=te.deepCopy(),te.copied=!0);for(var Te=0;Te<te.ranges.length;Te++)nl(te.ranges[Te].anchor,ct,Et,Ct),nl(te.ranges[Te].head,ct,Et,Ct);continue}for(var ke=0;ke<te.changes.length;++ke){var Ie=te.changes[ke];if(Et<Ie.from.line)Ie.from=en(Ie.from.line+Ct,Ie.from.ch),Ie.to=en(Ie.to.line+Ct,Ie.to.ch);else if(ct<=Ie.to.line){ve=!1;break}}ve||(rt.splice(0,Ot+1),Ot=0)}}function cp(rt,ct){var Et=ct.from.line,Ct=ct.to.line,Ot=ct.text.length-(Ct-Et)-1;Hg(rt.done,Et,Ct,Ot),Hg(rt.undone,Et,Ct,Ot)}function Nh(rt,ct,Et,Ct){var Ot=ct,te=ct;return typeof ct=="number"?te=Fn(rt,Rn(rt,ct)):Ot=Ae(ct),Ot==null?null:(Ct(te,Ot)&&rt.cm&&Pi(rt.cm,Ot,Et),te)}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,Ct=rt+ct;Et<Ct;++Et){var Ot=this.lines[Et];this.height-=Ot.height,to(Ot),Br(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 Ct=0;Ct<ct.length;++Ct)ct[Ct].parent=this},iterN:function(rt,ct,Et){for(var Ct=rt+ct;rt<Ct;++rt)if(Et(this.lines[rt]))return!0}};function Fo(rt){this.children=rt;for(var ct=0,Et=0,Ct=0;Ct<rt.length;++Ct){var Ot=rt[Ct];ct+=Ot.chunkSize(),Et+=Ot.height,Ot.parent=this}this.size=ct,this.height=Et,this.parent=null}Fo.prototype={chunkSize:function(){return this.size},removeInner:function(rt,ct){this.size-=ct;for(var Et=0;Et<this.children.length;++Et){var Ct=this.children[Et],Ot=Ct.chunkSize();if(rt<Ot){var te=Math.min(ct,Ot-rt),ve=Ct.height;if(Ct.removeInner(rt,te),this.height-=ve-Ct.height,Ot==te&&(this.children.splice(Et--,1),Ct.parent=null),(ct-=te)==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 Ct=0;Ct<this.children.length;++Ct){var Ot=this.children[Ct],te=Ot.chunkSize();if(rt<=te){if(Ot.insertInner(rt,ct,Et),Ot.lines&&Ot.lines.length>50){for(var ve=Ot.lines.length%25+25,Te=ve;Te<Ot.lines.length;){var ke=new Sc(Ot.lines.slice(Te,Te+=25));Ot.height-=ke.height,this.children.splice(++Ct,0,ke),ke.parent=this}Ot.lines=Ot.lines.slice(0,ve),this.maybeSpill()}break}rt-=te}},maybeSpill:function(){if(!(this.children.length<=10)){var rt=this;do{var ct=rt.children.splice(rt.children.length-5,5),Et=new Fo(ct);if(rt.parent){rt.size-=Et.size,rt.height-=Et.height;var Ot=ye(rt.parent.children,rt);rt.parent.children.splice(Ot+1,0,Et)}else{var Ct=new Fo(rt.children);Ct.parent=rt,rt.children=[Ct,Et],rt=Ct}Et.parent=rt.parent}while(rt.children.length>10);rt.parent.maybeSpill()}},iterN:function(rt,ct,Et){for(var Ct=0;Ct<this.children.length;++Ct){var Ot=this.children[Ct],te=Ot.chunkSize();if(rt<te){var ve=Math.min(ct,te-rt);if(Ot.iterN(rt,ve,Et))return!0;if((ct-=ve)==0)break;rt=0}else rt-=te}}};var vu=function(rt,ct,Et){if(Et)for(var Ct in Et)Et.hasOwnProperty(Ct)&&(this[Ct]=Et[Ct]);this.doc=rt,this.node=ct};vu.prototype.clear=function(){var rt=this.doc.cm,ct=this.line.widgets,Et=this.line,Ct=Ae(Et);if(!(Ct==null||!ct)){for(var Ot=0;Ot<ct.length;++Ot)ct[Ot]==this&&ct.splice(Ot--,1);ct.length||(Et.widgets=null);var te=oa(this);Or(Et,Math.max(0,Et.height-te)),rt&&(Yi(rt,function(){Vg(rt,Et,-te),Pi(rt,Ct,"widget")}),Br(rt,"lineWidgetCleared",rt,this,Ct))}},vu.prototype.changed=function(){var rt=this,ct=this.height,Et=this.doc.cm,Ct=this.line;this.height=null;var Ot=oa(this)-ct;Ot&&(Cn(this.doc,Ct)||Or(Ct,Ct.height+Ot),Et&&Yi(Et,function(){Et.curOp.forceUpdate=!0,Vg(Et,Ct,Ot),Br(Et,"lineWidgetChanged",Et,rt,Ae(Ct))}))},ln(vu);function Vg(rt,ct,Et){ci(ct)<(rt.curOp&&rt.curOp.scrollTop||rt.doc.scrollTop)&&Hf(rt,Et)}function nd(rt,ct,Et,Ct){var Ot=new vu(rt,Et,Ct),te=rt.cm;return te&&Ot.noHScroll&&(te.display.alignWidgets=!0),Nh(rt,ct,"widget",function(ve){var Te=ve.widgets||(ve.widgets=[]);if(Ot.insertAt==null?Te.push(Ot):Te.splice(Math.min(Te.length-1,Math.max(0,Ot.insertAt)),0,Ot),Ot.line=ve,te&&!Cn(rt,ve)){var ke=ci(ve)<rt.scrollTop;Or(ve,ve.height+oa(Ot)),ke&&Hf(te,Ot.height),te.curOp.forceUpdate=!0}return!0}),te&&Br(te,"lineWidgetAdded",te,Ot,typeof ct=="number"?ct:Ae(ct)),Ot}var Kg=0,$e=function(rt,ct){this.lines=[],this.type=ct,this.doc=rt,this.id=++Kg};$e.prototype.clear=function(){if(!this.explicitlyCleared){var rt=this.doc.cm,ct=rt&&!rt.curOp;if(ct&&_u(rt),an(this,"clear")){var Et=this.find();Et&&Br(this,"clear",Et.from,Et.to)}for(var Ct=null,Ot=null,te=0;te<this.lines.length;++te){var ve=this.lines[te],Te=Gi(ve.markedSpans,this);rt&&!this.collapsed?Pi(rt,Ae(ve),"text"):rt&&(Te.to!=null&&(Ot=Ae(ve)),Te.from!=null&&(Ct=Ae(ve))),ve.markedSpans=bi(ve.markedSpans,Te),Te.from==null&&this.collapsed&&!Cn(this.doc,ve)&&rt&&Or(ve,Qa(rt.display))}if(rt&&this.collapsed&&!rt.options.lineWrapping)for(var ke=0;ke<this.lines.length;++ke){var Ie=mr(this.lines[ke]),nn=Wi(Ie);nn>rt.display.maxLineLength&&(rt.display.maxLine=Ie,rt.display.maxLineLength=nn,rt.display.maxLineChanged=!0)}Ct!=null&&rt&&this.collapsed&&Co(rt,Ct,Ot+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,rt&&af(rt.doc)),rt&&Br(rt,"markerCleared",rt,this,Ct,Ot),ct&&zu(rt),this.parent&&this.parent.clear()}},$e.prototype.find=function(rt,ct){rt==null&&this.type=="bookmark"&&(rt=1);for(var Et,Ct,Ot=0;Ot<this.lines.length;++Ot){var te=this.lines[Ot],ve=Gi(te.markedSpans,this);if(ve.from!=null&&(Et=en(ct?te:Ae(te),ve.from),rt==-1))return Et;if(ve.to!=null&&(Ct=en(ct?te:Ae(te),ve.to),rt==1))return Ct}return Et&&{from:Et,to:Ct}},$e.prototype.changed=function(){var rt=this,ct=this.find(-1,!0),Et=this,Ct=this.doc.cm;!ct||!Ct||Yi(Ct,function(){var Ot=ct.line,te=Ae(ct.line),ve=dl(Ct,te);if(ve&&(hc(ve),Ct.curOp.selectionChanged=Ct.curOp.forceUpdate=!0),Ct.curOp.updateMaxLine=!0,!Cn(Et.doc,Ot)&&Et.height!=null){var Te=Et.height;Et.height=null;var ke=oa(Et)-Te;ke&&Or(Ot,Ot.height+ke)}Br(Ct,"markerChanged",Ct,rt)})},$e.prototype.attachLine=function(rt){if(!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(!ct.maybeHiddenMarkers||ye(ct.maybeHiddenMarkers,this)==-1)&&(ct.maybeUnhiddenMarkers||(ct.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(rt)},$e.prototype.detachLine=function(rt){if(this.lines.splice(ye(this.lines,rt),1),!this.lines.length&&this.doc.cm){var ct=this.doc.cm.curOp;(ct.maybeHiddenMarkers||(ct.maybeHiddenMarkers=[])).push(this)}},ln($e);function jh(rt,ct,Et,Ct,Ot){if(Ct&&Ct.shared)return Zg(rt,ct,Et,Ct,Ot);if(rt.cm&&!rt.cm.curOp)return la(rt.cm,jh)(rt,ct,Et,Ct,Ot);var te=new $e(rt,Ot),ve=kn(ct,Et);if(Ct&&Pe(Ct,te,!1),ve>0||ve==0&&te.clearWhenEmpty!==!1)return te;if(te.replacedWith&&(te.collapsed=!0,te.widgetNode=Gt("span",[te.replacedWith],"CodeMirror-widget"),Ct.handleMouseEvents||te.widgetNode.setAttribute("cm-ignore-events","true"),Ct.insertLeft&&(te.widgetNode.insertLeft=!0)),te.collapsed){if(Qr(rt,ct.line,ct,Et,te)||ct.line!=Et.line&&Qr(rt,Et.line,ct,Et,te))throw new Error("Inserting collapsed marker partially overlapping an existing one");mn()}te.addToHistory&&rf(rt,{from:ct,to:Et,origin:"markText"},rt.sel,NaN);var Te=ct.line,ke=rt.cm,Ie;if(rt.iter(Te,Et.line+1,function(ze){ke&&te.collapsed&&!ke.options.lineWrapping&&mr(ze)==ke.display.maxLine&&(Ie=!0),te.collapsed&&Te!=ct.line&&Or(ze,0),Ai(ze,new oi(te,Te==ct.line?ct.ch:null,Te==Et.line?Et.ch:null)),++Te}),te.collapsed&&rt.iter(ct.line,Et.line+1,function(ze){Cn(rt,ze)&&Or(ze,0)}),te.clearOnEnter&&qe(te,"beforeCursorEnter",function(){return te.clear()}),te.readOnly&&(di(),(rt.history.done.length||rt.history.undone.length)&&rt.clearHistory()),te.collapsed&&(te.id=++Kg,te.atomic=!0),ke){if(Ie&&(ke.curOp.updateMaxLine=!0),te.collapsed)Co(ke,ct.line,Et.line+1);else if(te.className||te.startStyle||te.endStyle||te.css||te.attributes||te.title)for(var nn=ct.line;nn<=Et.line;nn++)Pi(ke,nn,"text");te.atomic&&af(ke.doc),Br(ke,"markerAdded",ke,te)}return te}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();Br(this,"clear")}},Kl.prototype.find=function(rt,ct){return this.primary.find(rt,ct)},ln(Kl);function Zg(rt,ct,Et,Ct,Ot){Ct=Pe(Ct),Ct.shared=!1;var te=[jh(rt,ct,Et,Ct,Ot)],ve=te[0],Te=Ct.widgetNode;return Al(rt,function(ke){Te&&(Ct.widgetNode=Te.cloneNode(!0)),te.push(jh(ke,Bn(ke,ct),Bn(ke,Et),Ct,Ot));for(var Ie=0;Ie<ke.linked.length;++Ie)if(ke.linked[Ie].isParent)return;ve=ge(te)}),new Kl(te,ve)}function fp(rt){return rt.findMarks(en(rt.first,0),rt.clipPos(en(rt.lastLine())),function(ct){return ct.parent})}function Xg(rt,ct){for(var Et=0;Et<ct.length;Et++){var Ct=ct[Et],Ot=Ct.find(),te=rt.clipPos(Ot.from),ve=rt.clipPos(Ot.to);if(kn(te,ve)){var Te=jh(rt,te,ve,Ct.primary,Ct.primary.type);Ct.markers.push(Te),Te.parent=Ct}}}function dp(rt){for(var ct=function(Ct){var Ot=rt[Ct],te=[Ot.primary.doc];Al(Ot.primary.doc,function(ke){return te.push(ke)});for(var ve=0;ve<Ot.markers.length;ve++){var Te=Ot.markers[ve];ye(te,Te.doc)==-1&&(Te.parent=null,Ot.markers.splice(ve--,1))}},Et=0;Et<rt.length;Et++)ct(Et)}var e0=0,Ba=function(rt,ct,Et,Ct,Ot){if(!(this instanceof Ba))return new Ba(rt,ct,Et,Ct,Ot);Et==null&&(Et=0),Fo.call(this,[new Sc([new qi("",null)])]),this.first=Et,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Et;var te=en(Et,0);this.sel=pu(te),this.history=new gc(null),this.id=++e0,this.modeOption=ct,this.lineSep=Ct,this.direction=Ot=="rtl"?"rtl":"ltr",this.extend=!1,typeof rt=="string"&&(rt=this.splitLines(rt)),Yf(this,{from:te,to:te,text:rt}),Wa(this,pu(te),ce)};Ba.prototype=wt(Fo.prototype,{constructor:Ba,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,Ct=0;Ct<ct.length;++Ct)Et+=ct[Ct].height;this.insertInner(rt-this.first,ct,Et)},remove:function(rt,ct){this.removeInner(rt-this.first,ct)},getValue:function(rt){var ct=wr(this,this.first,this.first+this.size);return rt===!1?ct:ct.join(rt||this.lineSeparator())},setValue:va(function(rt){var ct=en(this.first,0),Et=this.first+this.size-1;Yu(this,{from:ct,to:en(Et,Fn(this,Et).text.length),text:this.splitLines(rt),origin:"setValue",full:!0},!0),this.cm&&bh(this.cm,0,0),Wa(this,pu(ct),ce)}),replaceRange:function(rt,ct,Et,Ct){ct=Bn(this,ct),Et=Et?Bn(this,Et):ct,Ah(this,rt,ct,Et,Ct)},getRange:function(rt,ct,Et){var Ct=cr(this,Bn(this,rt),Bn(this,ct));return Et===!1?Ct:Ct.join(Et||this.lineSeparator())},getLine:function(rt){var ct=this.getLineHandle(rt);return ct&&ct.text},getLineHandle:function(rt){if(Mn(this,rt))return Fn(this,rt)},getLineNumber:function(rt){return Ae(rt)},getLineHandleVisualStart:function(rt){return typeof rt=="number"&&(rt=Fn(this,rt)),mr(rt)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(rt){return Bn(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:va(function(rt,ct,Et){Mh(this,Bn(this,typeof rt=="number"?en(rt,ct||0):rt),null,Et)}),setSelection:va(function(rt,ct,Et){Mh(this,Bn(this,rt),Bn(this,ct||rt),Et)}),extendSelection:va(function(rt,ct,Et){td(this,Bn(this,rt),ct&&Bn(this,ct),Et)}),extendSelections:va(function(rt,ct){Gg(this,ar(this,rt),ct)}),extendSelectionsBy:va(function(rt,ct){var Et=Se(this.sel.ranges,rt);Gg(this,ar(this,Et),ct)}),setSelections:va(function(rt,ct,Et){if(rt.length){for(var Ct=[],Ot=0;Ot<rt.length;Ot++)Ct[Ot]=new ro(Bn(this,rt[Ot].anchor),Bn(this,rt[Ot].head));ct==null&&(ct=Math.min(rt.length-1,this.sel.primIndex)),Wa(this,gl(this.cm,Ct,ct),Et)}}),addSelection:va(function(rt,ct,Et){var Ct=this.sel.ranges.slice(0);Ct.push(new ro(Bn(this,rt),Bn(this,ct||rt))),Wa(this,gl(this.cm,Ct,Ct.length-1),Et)}),getSelection:function(rt){for(var ct=this.sel.ranges,Et,Ct=0;Ct<ct.length;Ct++){var Ot=cr(this,ct[Ct].from(),ct[Ct].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,Ct=0;Ct<Et.length;Ct++){var Ot=cr(this,Et[Ct].from(),Et[Ct].to());rt!==!1&&(Ot=Ot.join(rt||this.lineSeparator())),ct[Ct]=Ot}return ct},replaceSelection:function(rt,ct,Et){for(var Ct=[],Ot=0;Ot<this.sel.ranges.length;Ot++)Ct[Ot]=rt;this.replaceSelections(Ct,ct,Et||"+input")},replaceSelections:va(function(rt,ct,Et){for(var Ct=[],Ot=this.sel,te=0;te<Ot.ranges.length;te++){var ve=Ot.ranges[te];Ct[te]={from:ve.from(),to:ve.to(),text:this.splitLines(rt[te]),origin:Et}}for(var Te=ct&&ct!="end"&&qc(this,Ct,ct),ke=Ct.length-1;ke>=0;ke--)Yu(this,Ct[ke]);Te?ed(this,Te):this.cm&&fu(this.cm)}),undo:va(function(){hf(this,"undo")}),redo:va(function(){hf(this,"redo")}),undoSelection:va(function(){hf(this,"undo",!0)}),redoSelection:va(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,Ct=0;Ct<rt.done.length;Ct++)rt.done[Ct].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),Al(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:va(function(rt,ct,Et){return Nh(this,rt,"gutter",function(Ct){var Ot=Ct.gutterMarkers||(Ct.gutterMarkers={});return Ot[ct]=Et,!Et&&It(Ot)&&(Ct.gutterMarkers=null),!0})}),clearGutter:va(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(!Mn(this,rt)||(ct=rt,rt=Fn(this,rt),!rt))return null}else if(ct=Ae(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:va(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Ct){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass";if(!Ct[Ot])Ct[Ot]=Et;else{if(At(Et).test(Ct[Ot]))return!1;Ct[Ot]+=" "+Et}return!0})}),removeLineClass:va(function(rt,ct,Et){return Nh(this,rt,ct=="gutter"?"gutter":"class",function(Ct){var Ot=ct=="text"?"textClass":ct=="background"?"bgClass":ct=="gutter"?"gutterClass":"wrapClass",te=Ct[Ot];if(te)if(Et==null)Ct[Ot]=null;else{var ve=te.match(At(Et));if(!ve)return!1;var Te=ve.index+ve[0].length;Ct[Ot]=te.slice(0,ve.index)+(!ve.index||Te==te.length?"":" ")+te.slice(Te)||null}else return!1;return!0})}),addLineWidget:va(function(rt,ct,Et){return nd(this,rt,ct,Et)}),removeLineWidget:function(rt){rt.clear()},markText:function(rt,ct,Et){return jh(this,Bn(this,rt),Bn(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=Bn(this,rt),jh(this,rt,rt,Et,"bookmark")},findMarksAt:function(rt){rt=Bn(this,rt);var ct=[],Et=Fn(this,rt.line).markedSpans;if(Et)for(var Ct=0;Ct<Et.length;++Ct){var Ot=Et[Ct];(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=Bn(this,rt),ct=Bn(this,ct);var Ct=[],Ot=rt.line;return this.iter(rt.line,ct.line+1,function(te){var ve=te.markedSpans;if(ve)for(var Te=0;Te<ve.length;Te++){var ke=ve[Te];!(ke.to!=null&&Ot==rt.line&&rt.ch>=ke.to||ke.from==null&&Ot!=rt.line||ke.from!=null&&Ot==ct.line&&ke.from>=ct.ch)&&(!Et||Et(ke.marker))&&Ct.push(ke.marker.parent||ke.marker)}++Ot}),Ct},getAllMarks:function(){var rt=[];return this.iter(function(ct){var Et=ct.markedSpans;if(Et)for(var Ct=0;Ct<Et.length;++Ct)Et[Ct].from!=null&&rt.push(Et[Ct].marker)}),rt},posFromIndex:function(rt){var ct,Et=this.first,Ct=this.lineSeparator().length;return this.iter(function(Ot){var te=Ot.text.length+Ct;if(te>rt)return ct=rt,!0;rt-=te,++Et}),Bn(this,en(Et,ct))},indexFromPos:function(rt){rt=Bn(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(Ct){ct+=Ct.text.length+Et}),ct},copy:function(rt){var ct=new Ba(wr(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 Ct=new Ba(wr(this,ct,Et),rt.mode||this.modeOption,ct,this.lineSep,this.direction);return rt.sharedHist&&(Ct.history=this.history),(this.linked||(this.linked=[])).push({doc:Ct,sharedHist:rt.sharedHist}),Ct.linked=[{doc:this,isParent:!0,sharedHist:rt.sharedHist}],Xg(Ct,fp(this)),Ct},unlinkDoc:function(rt){if(rt instanceof Vi&&(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 Ct=[rt.id];Al(rt,function(Ot){return Ct.push(Ot.id)},!0),rt.history=new gc(null),rt.history.done=gu(this.history.done,Ct),rt.history.undone=gu(this.history.undone,Ct)}},iterLinkedDocs:function(rt){Al(this,rt)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(rt){return this.lineSep?rt.split(this.lineSep):Ur(rt)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:va(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))})}),Ba.prototype.eachLine=Ba.prototype.iter;var cf=0;function pp(rt){var ct=this;if(Qg(ct),!(Ke(ct,rt)||Ho(ct.display,rt))){gn(rt),Bt&&(cf=+new Date);var Et=$a(ct,rt,!0),Ct=rt.dataTransfer.files;if(!(!Et||ct.isReadOnly()))if(Ct&&Ct.length&&window.FileReader&&window.File)for(var Ot=Ct.length,te=Array(Ot),ve=0,Te=function(){++ve==Ot&&la(ct,function(){Et=Bn(ct.doc,Et);var hn={from:Et,to:Et,text:ct.doc.splitLines(te.filter(function(Hn){return Hn!=null}).join(ct.doc.lineSeparator())),origin:"paste"};Yu(ct.doc,hn),ed(ct.doc,pu(Bn(ct.doc,Et),Bn(ct.doc,Ku(hn))))})()},ke=function(hn,Hn){if(ct.options.allowDropFileTypes&&ye(ct.options.allowDropFileTypes,hn.type)==-1){Te();return}var Yn=new FileReader;Yn.onerror=function(){return Te()},Yn.onload=function(){var or=Yn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(or)){Te();return}te[Hn]=or,Te()},Yn.readAsText(hn)},Ie=0;Ie<Ct.length;Ie++)ke(Ct[Ie],Ie);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 nn=rt.dataTransfer.getData("Text");if(nn){var ze;if(ct.state.draggingText&&!ct.state.draggingText.copy&&(ze=ct.listSelections()),Th(ct.doc,pu(Et,Et)),ze)for(var pn=0;pn<ze.length;++pn)Ah(ct.doc,"",ze[pn].anchor,ze[pn].head,"drag");ct.replaceSelection(nn,"around","paste"),ct.display.input.focus()}}catch(hn){}}}}function Yg(rt,ct){if(Bt&&(!rt.state.draggingText||+new Date-cf<100)){Kn(ct);return}if(!(Ke(rt,ct)||Ho(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==",St&&(Et.width=Et.height=1,rt.display.wrapper.appendChild(Et),Et._top=Et.offsetTop),ct.dataTransfer.setDragImage(Et,0,0),St&&Et.parentNode.removeChild(Et)}}function Jg(rt,ct){var Et=$a(rt,ct);if(Et){var Ct=document.createDocumentFragment();Bi(rt,Et,Ct),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,Ct)}}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=[],Ct=0;Ct<ct.length;Ct++){var Ot=ct[Ct].CodeMirror;Ot&&Et.push(Ot)}Et.length&&Et[0].operation(function(){for(var te=0;te<Et.length;te++)rt(Et[te])})}}var gp=!1;function Gs(){gp||(xc(),gp=!0)}function xc(){var rt;qe(window,"resize",function(){rt==null&&(rt=setTimeout(function(){rt=null,$g(mp)},100))}),qe(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,Ct,Ot,te,ve=0;ve<ct.length-1;ve++){var Te=ct[ve];if(/^(cmd|meta|m)$/i.test(Te))te=!0;else if(/^a(lt)?$/i.test(Te))Et=!0;else if(/^(c|ctrl|control)$/i.test(Te))Ct=!0;else if(/^s(hift)?$/i.test(Te))Ot=!0;else throw new Error("Unrecognized modifier name: "+Te)}return Et&&(rt="Alt-"+rt),Ct&&(rt="Ctrl-"+rt),te&&(rt="Cmd-"+rt),Ot&&(rt="Shift-"+rt),rt}function yp(rt){var ct={};for(var Et in rt)if(rt.hasOwnProperty(Et)){var Ct=rt[Et];if(/^(name|fallthrough|(de|at)tach)$/.test(Et))continue;if(Ct=="..."){delete rt[Et];continue}for(var Ot=Se(Et.split(" "),vp),te=0;te<Ot.length;te++){var ve=void 0,Te=void 0;te==Ot.length-1?(Te=Ot.join(" "),ve=Ct):(Te=Ot.slice(0,te+1).join(" "),ve="...");var ke=ct[Te];if(!ke)ct[Te]=ve;else if(ke!=ve)throw new Error("Inconsistent bindings for "+Te)}delete rt[Et]}for(var Ie in ct)rt[Ie]=ct[Ie];return rt}function rl(rt,ct,Et,Ct){ct=Oh(ct);var Ot=ct.call?ct.call(rt,Ct):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,Ct);for(var te=0;te<ct.fallthrough.length;te++){var ve=rl(rt,ct.fallthrough[te],Et,Ct);if(ve)return ve}}}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 Ct=rt;return ct.altKey&&Ct!="Alt"&&(rt="Alt-"+rt),(dt?ct.metaKey:ct.ctrlKey)&&Ct!="Ctrl"&&(rt="Ctrl-"+rt),(dt?ct.ctrlKey:ct.metaKey)&&Ct!="Mod"&&(rt="Cmd-"+rt),!Et&&ct.shiftKey&&Ct!="Shift"&&(rt="Shift-"+rt),rt}function qg(rt,ct){if(St&&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,Ct=[],Ot=0;Ot<Et.length;Ot++){for(var te=ct(Et[Ot]);Ct.length&&kn(te.from,ge(Ct).to)<=0;){var ve=Ct.pop();if(kn(ve.from,te.from)<0){te.from=ve.from;break}}Ct.push(te)}Yi(rt,function(){for(var Te=Ct.length-1;Te>=0;Te--)Ah(rt.doc,"",Ct[Te].from,Ct[Te].to,"+delete");fu(rt)})}function xp(rt,ct,Et){var Ct=$t(rt.text,ct+Et,Et);return Ct<0||Ct>rt.text.length?null:Ct}function Xo(rt,ct,Et){var Ct=xp(rt,ct.ch,Et);return Ct==null?null:new en(ct.line,Ct,Et<0?"after":"before")}function pf(rt,ct,Et,Ct,Ot){if(rt){ct.doc.direction=="rtl"&&(Ot=-Ot);var te=Xe(Et,ct.doc.direction);if(te){var ve=Ot<0?ge(te):te[0],Te=Ot<0==(ve.level==1),ke=Te?"after":"before",Ie;if(ve.level>0||ct.doc.direction=="rtl"){var nn=Ul(ct,Et);Ie=Ot<0?Et.text.length-1:0;var ze=Is(ct,nn,Ie).top;Ie=ue(function(pn){return Is(ct,nn,pn).top==ze},Ot<0==(ve.level==1)?ve.from:ve.to-1,Ie),ke=="before"&&(Ie=xp(Et,Ie,1))}else Ie=Ot<0?ve.to:ve.from;return new en(Ct,Ie,ke)}}return new en(Ct,Ot<0?Et.text.length:0,Ot<0?"before":"after")}function id(rt,ct,Et,Ct){var Ot=Xe(ct,rt.doc.direction);if(!Ot)return Xo(ct,Et,Ct);Et.ch>=ct.text.length?(Et.ch=ct.text.length,Et.sticky="before"):Et.ch<=0&&(Et.ch=0,Et.sticky="after");var te=Ne(Ot,Et.ch,Et.sticky),ve=Ot[te];if(rt.doc.direction=="ltr"&&ve.level%2==0&&(Ct>0?ve.to>Et.ch:ve.from<Et.ch))return Xo(ct,Et,Ct);var Te=function(Cr,Hr){return xp(ct,Cr instanceof en?Cr.ch:Cr,Hr)},ke,Ie=function(Cr){return rt.options.lineWrapping?(ke=ke||Ul(rt,ct),$o(rt,ct,ke,Cr)):{begin:0,end:ct.text.length}},nn=Ie(Et.sticky=="before"?Te(Et,-1):Et.ch);if(rt.doc.direction=="rtl"||ve.level==1){var ze=ve.level==1==Ct<0,pn=Te(Et,ze?1:-1);if(pn!=null&&(ze?pn<=ve.to&&pn<=nn.end:pn>=ve.from&&pn>=nn.begin)){var hn=ze?"before":"after";return new en(Et.line,pn,hn)}}var Hn=function(Cr,Hr,jr){for(var Yr=function(ko,ha){return ha?new en(Et.line,Te(ko,1),"before"):new en(Et.line,ko,"after")};Cr>=0&&Cr<Ot.length;Cr+=Hr){var fi=Ot[Cr],Nr=Hr>0==(fi.level!=1),ki=Nr?jr.begin:Te(jr.end,-1);if(fi.from<=ki&&ki<fi.to||(ki=Nr?fi.from:Te(fi.to,-1),jr.begin<=ki&&ki<jr.end))return Yr(ki,Nr)}},Yn=Hn(te+Ct,Ct,nn);if(Yn)return Yn;var or=Ct>0?nn.end:Te(nn.begin,-1);return or!=null&&!(Ct>0&&or==ct.text.length)&&(Yn=Hn(Ct>0?0:Ot.length-1,Ct,Ie(or)),Yn)?Yn:null}var Ju={selectAll:Zo,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=Fn(rt.doc,ct.head.line).text.length;return ct.head.ch==Et&&ct.head.line<rt.lastLine()?{from:ct.head,to:en(ct.head.line+1,0)}:{from:ct.head,to:en(ct.head.line,Et)}}else return{from:ct.from(),to:ct.to()}})},deleteLine:function(rt){return Ms(rt,function(ct){return{from:en(ct.from().line,0),to:Bn(rt.doc,en(ct.to().line+1,0))}})},delLineLeft:function(rt){return Ms(rt,function(ct){return{from:en(ct.from().line,0),to:ct.from()}})},delWrappedLineLeft:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:0,top:Et},"div");return{from:Ct,to:ct.from()}})},delWrappedLineRight:function(rt){return Ms(rt,function(ct){var Et=rt.charCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:rt.display.lineDiv.offsetWidth+100,top:Et},"div");return{from:ct.from(),to:Ct}})},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(en(rt.firstLine(),0))},goDocEnd:function(rt){return rt.extendSelection(en(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")},he)},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")},he)},goLineLeftSmart:function(rt){return rt.extendSelectionsBy(function(ct){var Et=rt.cursorCoords(ct.head,"div").top+5,Ct=rt.coordsChar({left:0,top:Et},"div");return Ct.ch<rt.getLine(Ct.line).search(/\S/)?wp(rt,ct.head):Ct},he)},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(),Ct=rt.options.tabSize,Ot=0;Ot<Et.length;Ot++){var te=Et[Ot].from(),ve=Yt(rt.getLine(te.line),te.ch,Ct);ct.push(Fe(Ct-ve%Ct))}rt.replaceSelections(ct)},defaultTab:function(rt){rt.somethingSelected()?rt.indentSelection("add"):rt.execCommand("insertTab")},transposeChars:function(rt){return Yi(rt,function(){for(var ct=rt.listSelections(),Et=[],Ct=0;Ct<ct.length;Ct++)if(ct[Ct].empty()){var Ot=ct[Ct].head,te=Fn(rt.doc,Ot.line).text;if(te){if(Ot.ch==te.length&&(Ot=new en(Ot.line,Ot.ch-1)),Ot.ch>0)Ot=new en(Ot.line,Ot.ch+1),rt.replaceRange(te.charAt(Ot.ch-1)+te.charAt(Ot.ch-2),en(Ot.line,Ot.ch-2),Ot,"+transpose");else if(Ot.line>rt.doc.first){var ve=Fn(rt.doc,Ot.line-1).text;ve&&(Ot=new en(Ot.line,1),rt.replaceRange(te.charAt(0)+rt.doc.lineSeparator()+ve.charAt(ve.length-1),en(Ot.line-1,ve.length-1),Ot,"+transpose"))}}Et.push(new ro(Ot,Ot))}rt.setSelections(Et)})},newlineAndIndent:function(rt){return Yi(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 Ct=0;Ct<ct.length;Ct++)rt.indentLine(ct[Ct].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=Fn(rt.doc,ct),Ct=mr(Et);return Ct!=Et&&(ct=Ae(Ct)),pf(!0,rt,Ct,ct,1)}function Pc(rt,ct){var Et=Fn(rt.doc,ct),Ct=Vr(Et);return Ct!=Et&&(ct=Ae(Ct)),pf(!0,rt,Et,ct,-1)}function wp(rt,ct){var Et=bc(rt,ct.line),Ct=Fn(rt.doc,Et.line),Ot=Xe(Ct,rt.doc.direction);if(!Ot||Ot[0].level==0){var te=Math.max(Et.ch,Ct.text.search(/\S/)),ve=ct.line==Et.line&&ct.ch<=te&&ct.ch;return en(Et.line,ve?0:te,Et.sticky)}return Et}function Cc(rt,ct,Et){if(typeof ct=="string"&&(ct=Ju[ct],!ct))return!1;rt.display.input.ensurePolled();var Ct=rt.display.shift,Ot=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Et&&(rt.display.shift=!1),Ot=ct(rt)!=be}finally{rt.display.shift=Ct,rt.state.suppressEdits=!1}return Ot}function bp(rt,ct,Et){for(var Ct=0;Ct<rt.state.keyMaps.length;Ct++){var Ot=rl(ct,rt.state.keyMaps[Ct],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 ee;function Fh(rt,ct,Et,Ct){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,Ct))return!0}return od(rt,ct,Et,Ct)}function od(rt,ct,Et,Ct){var Ot=bp(rt,ct,Ct);return Ot=="multi"&&(rt.state.keySeq=ct),Ot=="handled"&&Br(rt,"keyHandled",rt,ct,Et),(Ot=="handled"||Ot=="multi")&&(gn(Et),eo(rt)),!!Ot}function ad(rt,ct){var Et=qg(ct,!0);return Et?ct.shiftKey&&!rt.state.keySeq?Fh(rt,"Shift-"+Et,ct,function(Ct){return Cc(rt,Ct,!0)})||Fh(rt,Et,ct,function(Ct){if(typeof Ct=="string"?/^go[A-Z]/.test(Ct):Ct.motion)return Cc(rt,Ct)}):Fh(rt,Et,ct,function(Ct){return Cc(rt,Ct)}):!1}function sd(rt,ct,Et){return Fh(rt,"'"+Et+"'",ct,function(Ct){return Cc(rt,Ct,!0)})}var Dh=null;function Pp(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&(ct.curOp.focus=Ut(),!Ke(ct,rt))){Bt&&vt<11&&rt.keyCode==27&&(rt.returnValue=!1);var Et=rt.keyCode;ct.display.shift=Et==16||rt.shiftKey;var Ct=ad(ct,rt);St&&(Dh=Ct?Et:null,!Ct&&Et==88&&!An&&(at?rt.metaKey:rt.ctrlKey)&&ct.replaceSelection("",null,"cut")),ae&&!at&&!Ct&&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;Ht(ct,"CodeMirror-crosshair");function Et(Ct){(Ct.keyCode==18||!Ct.altKey)&&(Dt(ct,"CodeMirror-crosshair"),Ue(document,"keyup",Et),Ue(document,"mouseover",Et))}qe(document,"keyup",Et),qe(document,"mouseover",Et)}function kp(rt){rt.keyCode==16&&(this.doc.sel.shift=!1),Ke(this,rt)}function Nl(rt){var ct=this;if(!(rt.target&&rt.target!=ct.display.input.getField())&&!(Ho(ct.display,rt)||Ke(ct,rt)||rt.ctrlKey&&!rt.altKey||at&&rt.metaKey)){var Et=rt.keyCode,Ct=rt.charCode;if(St&&Et==Dh){Dh=null,gn(rt);return}if(!(St&&(!rt.which||rt.which<10)&&ad(ct,rt))){var Ot=String.fromCharCode(Ct==null?Et:Ct);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&&kn(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 jl(rt){var ct=this,Et=ct.display;if(!(Ke(ct,rt)||Et.activeTouch&&Et.input.supportsTouch())){if(Et.input.ensurePolled(),Et.shift=rt.shiftKey,Ho(Et,rt)){gt||(Et.scroller.draggable=!1,setTimeout(function(){return Et.scroller.draggable=!0},100));return}if(!hd(ct,rt)){var Ct=$a(ct,rt),Ot=pr(rt),te=Ct?Mp(Ct,Ot):"single";window.focus(),Ot==1&&ct.state.selectingText&&ct.state.selectingText(rt),!(Ct&&Tp(ct,Ot,Ct,te,rt))&&(Ot==1?Ct?em(ct,Ct,te,rt):Pr(rt)==Et.scroller&&gn(rt):Ot==2?(Ct&&td(ct.doc,Ct),setTimeout(function(){return Et.input.focus()},20)):Ot==3&&(Pt?ct.display.input.onContextMenu(rt):Lo(ct)))}}}function Tp(rt,ct,Et,Ct,Ot){var te="Click";return Ct=="double"?te="Double"+te:Ct=="triple"&&(te="Triple"+te),te=(ct==1?"Left":ct==2?"Middle":"Right")+te,Fh(rt,Sp(te,Ot),Ot,function(ve){if(typeof ve=="string"&&(ve=Ju[ve]),!ve)return!1;var Te=!1;try{rt.isReadOnly()&&(rt.state.suppressEdits=!0),Te=ve(rt,Et)!=be}finally{rt.state.suppressEdits=!1}return Te})}function ld(rt,ct,Et){var Ct=rt.getOption("configureMouse"),Ot=Ct?Ct(rt,ct,Et):{};if(Ot.unit==null){var te=it?Et.shiftKey&&Et.metaKey:Et.altKey;Ot.unit=te?"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,Ct){Bt?setTimeout(fe(vo,rt),0):rt.curOp.focus=Ut();var Ot=ld(rt,Et,Ct),te=rt.doc.sel,ve;rt.options.dragDrop&&Er&&!rt.isReadOnly()&&Et=="single"&&(ve=te.contains(ct))>-1&&(kn((ve=te.ranges[ve]).from(),ct)<0||ct.xRel>0)&&(kn(ve.to(),ct)>0||ct.xRel<0)?Lp(rt,Ct,ct,Ot):n0(rt,Ct,ct,Ot)}function Lp(rt,ct,Et,Ct){var Ot=rt.display,te=!1,ve=la(rt,function(Ie){gt&&(Ot.scroller.draggable=!1),rt.state.draggingText=!1,Ue(Ot.wrapper.ownerDocument,"mouseup",ve),Ue(Ot.wrapper.ownerDocument,"mousemove",Te),Ue(Ot.scroller,"dragstart",ke),Ue(Ot.scroller,"drop",ve),te||(gn(Ie),Ct.addNew||td(rt.doc,Et,null,null,Ct.extend),gt&&!Tt||Bt&&vt==9?setTimeout(function(){Ot.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ot.input.focus()},20):Ot.input.focus())}),Te=function(Ie){te=te||Math.abs(ct.clientX-Ie.clientX)+Math.abs(ct.clientY-Ie.clientY)>=10},ke=function(){return te=!0};gt&&(Ot.scroller.draggable=!0),rt.state.draggingText=ve,ve.copy=!Ct.moveOnDrag,Ot.scroller.dragDrop&&Ot.scroller.dragDrop(),qe(Ot.wrapper.ownerDocument,"mouseup",ve),qe(Ot.wrapper.ownerDocument,"mousemove",Te),qe(Ot.scroller,"dragstart",ke),qe(Ot.scroller,"drop",ve),Lo(rt),setTimeout(function(){return Ot.input.focus()},20)}function Ap(rt,ct,Et){if(Et=="char")return new ro(ct,ct);if(Et=="word")return rt.findWordAt(ct);if(Et=="line")return new ro(en(ct.line,0),Bn(rt.doc,en(ct.line+1,0)));var Ct=Et(rt,ct);return new ro(Ct.from,Ct.to)}function n0(rt,ct,Et,Ct){var Ot=rt.display,te=rt.doc;gn(ct);var ve,Te,ke=te.sel,Ie=ke.ranges;if(Ct.addNew&&!Ct.extend?(Te=te.sel.contains(Et),Te>-1?ve=Ie[Te]:ve=new ro(Et,Et)):(ve=te.sel.primary(),Te=te.sel.primIndex),Ct.unit=="rectangle")Ct.addNew||(ve=new ro(Et,Et)),Et=$a(rt,ct,!0,!0),Te=-1;else{var nn=Ap(rt,Et,Ct.unit);Ct.extend?ve=qf(ve,nn.anchor,nn.head,Ct.extend):ve=nn}Ct.addNew?Te==-1?(Te=Ie.length,Wa(te,gl(rt,Ie.concat([ve]),Te),{scroll:!1,origin:"*mouse"})):Ie.length>1&&Ie[Te].empty()&&Ct.unit=="char"&&!Ct.extend?(Wa(te,gl(rt,Ie.slice(0,Te).concat(Ie.slice(Te+1)),0),{scroll:!1,origin:"*mouse"}),ke=te.sel):Xu(te,Te,ve,pe):(Te=0,Wa(te,new el([ve],0),pe),ke=te.sel);var ze=Et;function pn(jr){if(kn(ze,jr)!=0)if(ze=jr,Ct.unit=="rectangle"){for(var Yr=[],fi=rt.options.tabSize,Nr=Yt(Fn(te,Et.line).text,Et.ch,fi),ki=Yt(Fn(te,jr.line).text,jr.ch,fi),ko=Math.min(Nr,ki),ha=Math.max(Nr,ki),Do=Math.min(Et.line,jr.line),ps=Math.min(rt.lastLine(),Math.max(Et.line,jr.line));Do<=ps;Do++){var Ha=Fn(te,Do).text,ea=Ce(Ha,ko,fi);ko==ha?Yr.push(new ro(en(Do,ea),en(Do,ea))):Ha.length>ea&&Yr.push(new ro(en(Do,ea),en(Do,Ce(Ha,ha,fi))))}Yr.length||Yr.push(new ro(Et,Et)),Wa(te,gl(rt,ke.ranges.slice(0,Te).concat(Yr),Te),{origin:"*mouse",scroll:!1}),rt.scrollIntoView(jr)}else{var Ts=ve,Ia=Ap(rt,jr,Ct.unit),na=Ts.anchor,Zi;kn(Ia.anchor,na)>0?(Zi=Ia.head,na=Nn(Ts.from(),Ia.anchor)):(Zi=Ia.anchor,na=$n(Ts.to(),Ia.head));var Ro=ke.ranges.slice(0);Ro[Te]=nm(rt,new ro(Bn(te,na),Zi)),Wa(te,gl(rt,Ro,Te),pe)}}var hn=Ot.wrapper.getBoundingClientRect(),Hn=0;function Yn(jr){var Yr=++Hn,fi=$a(rt,jr,!0,Ct.unit=="rectangle");if(fi)if(kn(fi,ze)!=0){rt.curOp.focus=Ut(),pn(fi);var Nr=Oi(Ot,te);(fi.line>=Nr.to||fi.line<Nr.from)&&setTimeout(la(rt,function(){Hn==Yr&&Yn(jr)}),150)}else{var ki=jr.clientY<hn.top?-20:jr.clientY>hn.bottom?20:0;ki&&setTimeout(la(rt,function(){Hn==Yr&&(Ot.scroller.scrollTop+=ki,Yn(jr))}),50)}}function or(jr){rt.state.selectingText=!1,Hn=1/0,jr&&(gn(jr),Ot.input.focus()),Ue(Ot.wrapper.ownerDocument,"mousemove",Cr),Ue(Ot.wrapper.ownerDocument,"mouseup",Hr),te.history.lastSelOrigin=null}var Cr=la(rt,function(jr){jr.buttons===0||!pr(jr)?or(jr):Yn(jr)}),Hr=la(rt,or);rt.state.selectingText=Hr,qe(Ot.wrapper.ownerDocument,"mousemove",Cr),qe(Ot.wrapper.ownerDocument,"mouseup",Hr)}function nm(rt,ct){var Et=ct.anchor,Ct=ct.head,Ot=Fn(rt.doc,Et.line);if(kn(Et,Ct)==0&&Et.sticky==Ct.sticky)return ct;var te=Xe(Ot);if(!te)return ct;var ve=Ne(te,Et.ch,Et.sticky),Te=te[ve];if(Te.from!=Et.ch&&Te.to!=Et.ch)return ct;var ke=ve+(Te.from==Et.ch==(Te.level!=1)?0:1);if(ke==0||ke==te.length)return ct;var Ie;if(Ct.line!=Et.line)Ie=(Ct.line-Et.line)*(rt.doc.direction=="ltr"?1:-1)>0;else{var nn=Ne(te,Ct.ch,Ct.sticky),ze=nn-ve||(Ct.ch-Et.ch)*(Te.level==1?-1:1);nn==ke-1||nn==ke?Ie=ze<0:Ie=ze>0}var pn=te[ke+(Ie?-1:0)],hn=Ie==(pn.level==1),Hn=hn?pn.from:pn.to,Yn=hn?"after":"before";return Et.ch==Hn&&Et.sticky==Yn?ct:new ro(new en(Et.line,Hn,Yn),Ct)}function ud(rt,ct,Et,Ct){var Ot,te;if(ct.touches)Ot=ct.touches[0].clientX,te=ct.touches[0].clientY;else try{Ot=ct.clientX,te=ct.clientY}catch(pn){return!1}if(Ot>=Math.floor(rt.display.gutters.getBoundingClientRect().right))return!1;Ct&&gn(ct);var ve=rt.display,Te=ve.lineDiv.getBoundingClientRect();if(te>Te.bottom||!an(rt,Et))return Zn(ct);te-=Te.top-ve.viewOffset;for(var ke=0;ke<rt.display.gutterSpecs.length;++ke){var Ie=ve.gutters.childNodes[ke];if(Ie&&Ie.getBoundingClientRect().right>=Ot){var nn=Ve(rt.doc,te),ze=rt.display.gutterSpecs[ke];return We(rt,Et,rt,nn,ze.className,ct),Zn(ct)}}}function hd(rt,ct){return ud(rt,ct,"gutterClick",!0)}function cd(rt,ct){Ho(rt.display,ct)||rm(rt,ct)||Ke(rt,ct,"contextmenu")||Pt||rt.display.input.onContextMenu(ct)}function rm(rt,ct){return an(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(Ct,Ot,te,ve){rt.defaults[Ct]=Ot,te&&(ct[Ct]=ve?function(Te,ke,Ie){Ie!=Qu&&te(Te,ke,Ie)}:te)}rt.defineOption=Et,rt.Init=Qu,Et("value","",function(Ct,Ot){return Ct.setValue(Ot)},!0),Et("mode",null,function(Ct,Ot){Ct.doc.modeOption=Ot,Ci(Ct)},!0),Et("indentUnit",2,Ci,!0),Et("indentWithTabs",!1),Et("smartIndent",!0),Et("tabSize",4,function(Ct){tf(Ct),Fu(Ct),Co(Ct)},!0),Et("lineSeparator",null,function(Ct,Ot){if(Ct.doc.lineSep=Ot,!!Ot){var te=[],ve=Ct.doc.first;Ct.doc.iter(function(ke){for(var Ie=0;;){var nn=ke.text.indexOf(Ot,Ie);if(nn==-1)break;Ie=nn+Ot.length,te.push(en(ve,nn))}ve++});for(var Te=te.length-1;Te>=0;Te--)Ah(Ct.doc,Ot,te[Te],en(te[Te].line,te[Te].ch+Ot.length))}}),Et("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Ct,Ot,te){Ct.state.specialChars=new RegExp(Ot.source+(Ot.test(" ")?"":"| "),"g"),te!=Qu&&Ct.refresh()}),Et("specialCharPlaceholder",Wo,function(Ct){return Ct.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(Ct,Ot){return Ct.getInputField().spellcheck=Ot},!0),Et("autocorrect",!1,function(Ct,Ot){return Ct.getInputField().autocorrect=Ot},!0),Et("autocapitalize",!1,function(Ct,Ot){return Ct.getInputField().autocapitalize=Ot},!0),Et("rtlMoveVisually",!lt),Et("wholeLineUpdateBefore",!0),Et("theme","default",function(Ct){fd(Ct),_s(Ct)},!0),Et("keyMap","default",function(Ct,Ot,te){var ve=Oh(Ot),Te=te!=Qu&&Oh(te);Te&&Te.detach&&Te.detach(Ct,ve),ve.attach&&ve.attach(Ct,Te||null)}),Et("extraKeys",null),Et("configureMouse",null),Et("lineWrapping",!1,om,!0),Et("gutters",[],function(Ct,Ot){Ct.display.gutterSpecs=Sa(Ot,Ct.options.lineNumbers),_s(Ct)},!0),Et("fixedGutter",!0,function(Ct,Ot){Ct.display.gutters.style.left=Ot?Jc(Ct.display)+"px":"0",Ct.refresh()},!0),Et("coverGutterNextToScrollbar",!1,function(Ct){return Ru(Ct)},!0),Et("scrollbarStyle","native",function(Ct){ip(Ct),Ru(Ct),Ct.display.scrollbars.setScrollTop(Ct.doc.scrollTop),Ct.display.scrollbars.setScrollLeft(Ct.doc.scrollLeft)},!0),Et("lineNumbers",!1,function(Ct,Ot){Ct.display.gutterSpecs=Sa(Ct.options.gutters,Ot),_s(Ct)},!0),Et("firstLineNumber",1,_s,!0),Et("lineNumberFormatter",function(Ct){return Ct},_s,!0),Et("showCursorWhenSelecting",!1,sa,!0),Et("resetSelectionOnContextMenu",!0),Et("lineWiseCopyCut",!0),Et("pasteLinesPerSelection",!0),Et("selectionsMayTouch",!1),Et("readOnly",!1,function(Ct,Ot){Ot=="nocursor"&&(wh(Ct),Ct.display.input.blur()),Ct.display.input.readOnlyChanged(Ot)}),Et("screenReaderLabel",null,function(Ct,Ot){Ot=Ot===""?null:Ot,Ct.display.input.screenReaderLabelChanged(Ot)}),Et("disableInput",!1,function(Ct,Ot){Ot||Ct.display.input.reset()},!0),Et("dragDrop",!0,dd),Et("allowDropFileTypes",null),Et("cursorBlinkRate",530),Et("cursorScrollMargin",0),Et("cursorHeight",1,sa,!0),Et("singleCursorHeightPerLine",!0,sa,!0),Et("workTime",100),Et("workDelay",100),Et("flattenSpans",!0,tf,!0),Et("addModeClass",!1,tf,!0),Et("pollInterval",100),Et("undoDepth",200,function(Ct,Ot){return Ct.doc.history.undoDepth=Ot}),Et("historyEventDelay",1250),Et("viewportMargin",10,function(Ct){return Ct.refresh()},!0),Et("maxHighlightLength",1e4,tf,!0),Et("moveInputWithCursor",!0,function(Ct,Ot){Ot||Ct.display.input.resetPosition()}),Et("tabindex",null,function(Ct,Ot){return Ct.display.input.getField().tabIndex=Ot||""}),Et("autofocus",null),Et("direction","ltr",function(Ct,Ot){return Ct.doc.setDirection(Ot)},!0),Et("phrases",null)}function dd(rt,ct,Et){var Ct=Et&&Et!=Qu;if(!ct!=!Ct){var Ot=rt.display.dragFunctions,te=ct?qe:Ue;te(rt.display.scroller,"dragstart",Ot.start),te(rt.display.scroller,"dragenter",Ot.enter),te(rt.display.scroller,"dragover",Ot.over),te(rt.display.scroller,"dragleave",Ot.leave),te(rt.display.scroller,"drop",Ot.drop)}}function om(rt){rt.options.lineWrapping?(Ht(rt.display.wrapper,"CodeMirror-wrap"),rt.display.sizer.style.minWidth="",rt.display.sizerWidth=null):(Dt(rt.display.wrapper,"CodeMirror-wrap"),Ei(rt)),ei(rt),Co(rt),Fu(rt),setTimeout(function(){return Ru(rt)},100)}function Vi(rt,ct){var Et=this;if(!(this instanceof Vi))return new Vi(rt,ct);this.options=ct=ct?Pe(ct):{},Pe(Np,ct,!1);var Ct=ct.value;typeof Ct=="string"?Ct=new Ba(Ct,ct.mode,null,ct.lineSeparator,ct.direction):ct.mode&&(Ct.modeOption=ct.mode),this.doc=Ct;var Ot=new Vi.inputStyles[ct.inputStyle](this),te=this.display=new Vu(rt,Ct,Ot,ct);te.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 ee,keySeq:null,specialChars:null},ct.autofocus&&!tt&&te.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,Ct),ct.autofocus&&!tt||this.hasFocus()?setTimeout(function(){Et.hasFocus()&&!Et.state.focused&&Ii(Et)},20):wh(this);for(var ve in gf)gf.hasOwnProperty(ve)&&gf[ve](this,ct[ve],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(te.lineDiv).textRendering=="optimizelegibility"&&(te.lineDiv.style.textRendering="auto")}Vi.defaults=Np,Vi.optionHandlers=gf;function Ec(rt){var ct=rt.display;qe(ct.scroller,"mousedown",la(rt,jl)),Bt&&vt<11?qe(ct.scroller,"dblclick",la(rt,function(ke){if(!Ke(rt,ke)){var Ie=$a(rt,ke);if(!(!Ie||hd(rt,ke)||Ho(rt.display,ke))){gn(ke);var nn=rt.findWordAt(Ie);td(rt.doc,nn.anchor,nn.head)}}})):qe(ct.scroller,"dblclick",function(ke){return Ke(rt,ke)||gn(ke)}),qe(ct.scroller,"contextmenu",function(ke){return cd(rt,ke)}),qe(ct.input.getField(),"contextmenu",function(ke){ct.scroller.contains(ke.target)||cd(rt,ke)});var Et,Ct={end:0};function Ot(){ct.activeTouch&&(Et=setTimeout(function(){return ct.activeTouch=null},1e3),Ct=ct.activeTouch,Ct.end=+new Date)}function te(ke){if(ke.touches.length!=1)return!1;var Ie=ke.touches[0];return Ie.radiusX<=1&&Ie.radiusY<=1}function ve(ke,Ie){if(Ie.left==null)return!0;var nn=Ie.left-ke.left,ze=Ie.top-ke.top;return nn*nn+ze*ze>20*20}qe(ct.scroller,"touchstart",function(ke){if(!Ke(rt,ke)&&!te(ke)&&!hd(rt,ke)){ct.input.ensurePolled(),clearTimeout(Et);var Ie=+new Date;ct.activeTouch={start:Ie,moved:!1,prev:Ie-Ct.end<=300?Ct:null},ke.touches.length==1&&(ct.activeTouch.left=ke.touches[0].pageX,ct.activeTouch.top=ke.touches[0].pageY)}}),qe(ct.scroller,"touchmove",function(){ct.activeTouch&&(ct.activeTouch.moved=!0)}),qe(ct.scroller,"touchend",function(ke){var Ie=ct.activeTouch;if(Ie&&!Ho(ct,ke)&&Ie.left!=null&&!Ie.moved&&new Date-Ie.start<300){var nn=rt.coordsChar(ct.activeTouch,"page"),ze;!Ie.prev||ve(Ie,Ie.prev)?ze=new ro(nn,nn):!Ie.prev.prev||ve(Ie,Ie.prev.prev)?ze=rt.findWordAt(nn):ze=new ro(en(nn.line,0),Bn(rt.doc,en(nn.line+1,0))),rt.setSelection(ze.anchor,ze.head),rt.focus(),gn(ke)}Ot()}),qe(ct.scroller,"touchcancel",Ot),qe(ct.scroller,"scroll",function(){ct.scroller.clientHeight&&(Ph(rt,ct.scroller.scrollTop),du(rt,ct.scroller.scrollLeft,!0),We(rt,"scroll",rt))}),qe(ct.scroller,"mousewheel",function(ke){return xa(rt,ke)}),qe(ct.scroller,"DOMMouseScroll",function(ke){return xa(rt,ke)}),qe(ct.wrapper,"scroll",function(){return ct.wrapper.scrollTop=ct.wrapper.scrollLeft=0}),ct.dragFunctions={enter:function(ke){Ke(rt,ke)||Kn(ke)},over:function(ke){Ke(rt,ke)||(Jg(rt,ke),Kn(ke))},start:function(ke){return Yg(rt,ke)},drop:la(rt,pp),leave:function(ke){Ke(rt,ke)||Qg(rt)}};var Te=ct.input.getField();qe(Te,"keyup",function(ke){return kp.call(rt,ke)}),qe(Te,"keydown",la(rt,Pp)),qe(Te,"keypress",la(rt,Nl)),qe(Te,"focus",function(ke){return Ii(rt,ke)}),qe(Te,"blur",function(ke){return wh(rt,ke)})}var Ih=[];Vi.defineInitHook=function(rt){return Ih.push(rt)};function ua(rt,ct,Et,Ct){var Ot=rt.doc,te;Et==null&&(Et="add"),Et=="smart"&&(Ot.mode.indent?te=mi(rt,ct).state:Et="prev");var ve=rt.options.tabSize,Te=Fn(Ot,ct),ke=Yt(Te.text,null,ve);Te.stateAfter&&(Te.stateAfter=null);var Ie=Te.text.match(/^\s*/)[0],nn;if(!Ct&&!/\S/.test(Te.text))nn=0,Et="not";else if(Et=="smart"&&(nn=Ot.mode.indent(te,Te.text.slice(Ie.length),Te.text),nn==be||nn>150)){if(!Ct)return;Et="prev"}Et=="prev"?ct>Ot.first?nn=Yt(Fn(Ot,ct-1).text,null,ve):nn=0:Et=="add"?nn=ke+rt.options.indentUnit:Et=="subtract"?nn=ke-rt.options.indentUnit:typeof Et=="number"&&(nn=ke+Et),nn=Math.max(0,nn);var ze="",pn=0;if(rt.options.indentWithTabs)for(var hn=Math.floor(nn/ve);hn;--hn)pn+=ve,ze+=" ";if(pn<nn&&(ze+=Fe(nn-pn)),ze!=Ie)return Ah(Ot,ze,en(ct,0),en(ct,Ie.length),"+input"),Te.stateAfter=null,!0;for(var Hn=0;Hn<Ot.sel.ranges.length;Hn++){var Yn=Ot.sel.ranges[Hn];if(Yn.head.line==ct&&Yn.head.ch<Ie.length){var or=en(ct,Ie.length);Xu(Ot,Hn,new ro(or,or));break}}}var ds=null;function Rh(rt){ds=rt}function mf(rt,ct,Et,Ct,Ot){var te=rt.doc;rt.display.shift=!1,Ct||(Ct=te.sel);var ve=+new Date-200,Te=Ot=="paste"||rt.state.pasteIncoming>ve,ke=Ur(ct),Ie=null;if(Te&&Ct.ranges.length>1)if(ds&&ds.text.join(`
|
|
`)==ct){if(Ct.ranges.length%ds.text.length==0){Ie=[];for(var nn=0;nn<ds.text.length;nn++)Ie.push(te.splitLines(ds.text[nn]))}}else ke.length==Ct.ranges.length&&rt.options.pasteLinesPerSelection&&(Ie=Se(ke,function(Cr){return[Cr]}));for(var ze=rt.curOp.updateInput,pn=Ct.ranges.length-1;pn>=0;pn--){var hn=Ct.ranges[pn],Hn=hn.from(),Yn=hn.to();hn.empty()&&(Et&&Et>0?Hn=en(Hn.line,Hn.ch-Et):rt.state.overwrite&&!Te?Yn=en(Yn.line,Math.min(Fn(te,Yn.line).text.length,Yn.ch+ge(ke).length)):Te&&ds&&ds.lineWise&&ds.text.join(`
|
|
`)==ke.join(`
|
|
`)&&(Hn=Yn=en(Hn.line,0)));var or={from:Hn,to:Yn,text:Ie?Ie[pn%Ie.length]:ke,origin:Ot||(Te?"paste":rt.state.cutIncoming>ve?"cut":"+input")};Yu(rt.doc,or),Br(rt,"inputRead",rt,or)}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&&Yi(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,Ct=Et.ranges.length-1;Ct>=0;Ct--){var Ot=Et.ranges[Ct];if(!(Ot.head.ch>100||Ct&&Et.ranges[Ct-1].head.line==Ot.head.line)){var te=rt.getModeAt(Ot.head),ve=!1;if(te.electricChars){for(var Te=0;Te<te.electricChars.length;Te++)if(ct.indexOf(te.electricChars.charAt(Te))>-1){ve=ua(rt,Ot.head.line,"smart");break}}else te.electricInput&&te.electricInput.test(Fn(rt.doc,Ot.head.line).text.slice(0,Ot.head.ch))&&(ve=ua(rt,Ot.head.line,"smart"));ve&&Br(rt,"electricInput",rt,Ot.head.line)}}}function Fp(rt){for(var ct=[],Et=[],Ct=0;Ct<rt.doc.sel.ranges.length;Ct++){var Ot=rt.doc.sel.ranges[Ct].head.line,te={anchor:en(Ot,0),head:en(Ot+1,0)};Et.push(te),ct.push(rt.getRange(te.anchor,te.head))}return{text:ct,ranges:Et}}function Dp(rt,ct,Et,Ct){rt.setAttribute("autocorrect",Et?"":"off"),rt.setAttribute("autocapitalize",Ct?"":"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(Ct,Ot){var te=this.options,ve=te[Ct];te[Ct]==Ot&&Ct!="mode"||(te[Ct]=Ot,ct.hasOwnProperty(Ct)&&la(this,ct[Ct])(this,Ot,ve),We(this,"optionChange",this,Ct))},getOption:function(Ct){return this.options[Ct]},getDoc:function(){return this.doc},addKeyMap:function(Ct,Ot){this.state.keyMaps[Ot?"push":"unshift"](Oh(Ct))},removeKeyMap:function(Ct){for(var Ot=this.state.keyMaps,te=0;te<Ot.length;++te)if(Ot[te]==Ct||Ot[te].name==Ct)return Ot.splice(te,1),!0},addOverlay:ma(function(Ct,Ot){var te=Ct.token?Ct:rt.getMode(this.options,Ct);if(te.startState)throw new Error("Overlays may not be stateful.");re(this.state.overlays,{mode:te,modeSpec:Ct,opaque:Ot&&Ot.opaque,priority:Ot&&Ot.priority||0},function(ve){return ve.priority}),this.state.modeGen++,Co(this)}),removeOverlay:ma(function(Ct){for(var Ot=this.state.overlays,te=0;te<Ot.length;++te){var ve=Ot[te].modeSpec;if(ve==Ct||typeof Ct=="string"&&ve.name==Ct){Ot.splice(te,1),this.state.modeGen++,Co(this);return}}}),indentLine:ma(function(Ct,Ot,te){typeof Ot!="string"&&typeof Ot!="number"&&(Ot==null?Ot=this.options.smartIndent?"smart":"prev":Ot=Ot?"add":"subtract"),Mn(this.doc,Ct)&&ua(this,Ct,Ot,te)}),indentSelection:ma(function(Ct){for(var Ot=this.doc.sel.ranges,te=-1,ve=0;ve<Ot.length;ve++){var Te=Ot[ve];if(Te.empty())Te.head.line>te&&(ua(this,Te.head.line,Ct,!0),te=Te.head.line,ve==this.doc.sel.primIndex&&fu(this));else{var ke=Te.from(),Ie=Te.to(),nn=Math.max(te,ke.line);te=Math.min(this.lastLine(),Ie.line-(Ie.ch?0:1))+1;for(var ze=nn;ze<te;++ze)ua(this,ze,Ct);var pn=this.doc.sel.ranges;ke.ch==0&&Ot.length==pn.length&&pn[ve].from().ch>0&&Xu(this.doc,ve,new ro(ke,pn[ve].to()),ce)}}}),getTokenAt:function(Ct,Ot){return hr(this,Ct,Ot)},getLineTokens:function(Ct,Ot){return hr(this,en(Ct),Ot,!0)},getTokenTypeAt:function(Ct){Ct=Bn(this.doc,Ct);var Ot=Xr(this,Fn(this.doc,Ct.line)),te=0,ve=(Ot.length-1)/2,Te=Ct.ch,ke;if(Te==0)ke=Ot[2];else for(;;){var Ie=te+ve>>1;if((Ie?Ot[Ie*2-1]:0)>=Te)ve=Ie;else if(Ot[Ie*2+1]<Te)te=Ie+1;else{ke=Ot[Ie*2+2];break}}var nn=ke?ke.indexOf("overlay "):-1;return nn<0?ke:nn==0?null:ke.slice(0,nn-1)},getModeAt:function(Ct){var Ot=this.doc.mode;return Ot.innerMode?rt.innerMode(Ot,this.getTokenAt(Ct).state).mode:Ot},getHelper:function(Ct,Ot){return this.getHelpers(Ct,Ot)[0]},getHelpers:function(Ct,Ot){var te=[];if(!Et.hasOwnProperty(Ot))return te;var ve=Et[Ot],Te=this.getModeAt(Ct);if(typeof Te[Ot]=="string")ve[Te[Ot]]&&te.push(ve[Te[Ot]]);else if(Te[Ot])for(var ke=0;ke<Te[Ot].length;ke++){var Ie=ve[Te[Ot][ke]];Ie&&te.push(Ie)}else Te.helperType&&ve[Te.helperType]?te.push(ve[Te.helperType]):ve[Te.name]&&te.push(ve[Te.name]);for(var nn=0;nn<ve._global.length;nn++){var ze=ve._global[nn];ze.pred(Te,this)&&ye(te,ze.val)==-1&&te.push(ze.val)}return te},getStateAfter:function(Ct,Ot){var te=this.doc;return Ct=Rn(te,Ct==null?te.first+te.size-1:Ct),mi(this,Ct+1,Ot).state},cursorCoords:function(Ct,Ot){var te,ve=this.doc.sel.primary();return Ct==null?te=ve.head:typeof Ct=="object"?te=Bn(this.doc,Ct):te=Ct?ve.from():ve.to(),mo(this,te,Ot||"page")},charCoords:function(Ct,Ot){return Du(this,Bn(this.doc,Ct),Ot||"page")},coordsChar:function(Ct,Ot){return Ct=cc(this,Ct,Ot||"page"),Da(this,Ct.left,Ct.top)},lineAtHeight:function(Ct,Ot){return Ct=cc(this,{top:Ct,left:0},Ot||"page").top,Ve(this.doc,Ct+this.display.viewOffset)},heightAtLine:function(Ct,Ot,te){var ve=!1,Te;if(typeof Ct=="number"){var ke=this.doc.first+this.doc.size-1;Ct<this.doc.first?Ct=this.doc.first:Ct>ke&&(Ct=ke,ve=!0),Te=Fn(this.doc,Ct)}else Te=Ct;return aa(this,Te,{top:0,left:0},Ot||"page",te||ve).top+(ve?this.doc.height-ci(Te):0)},defaultTextHeight:function(){return Qa(this.display)},defaultCharWidth:function(){return pl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Ct,Ot,te,ve,Te){var ke=this.display;Ct=mo(this,Bn(this.doc,Ct));var Ie=Ct.bottom,nn=Ct.left;if(Ot.style.position="absolute",Ot.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ot),ke.sizer.appendChild(Ot),ve=="over")Ie=Ct.top;else if(ve=="above"||ve=="near"){var ze=Math.max(ke.wrapper.clientHeight,this.doc.height),pn=Math.max(ke.sizer.clientWidth,ke.lineSpace.clientWidth);(ve=="above"||Ct.bottom+Ot.offsetHeight>ze)&&Ct.top>Ot.offsetHeight?Ie=Ct.top-Ot.offsetHeight:Ct.bottom+Ot.offsetHeight<=ze&&(Ie=Ct.bottom),nn+Ot.offsetWidth>pn&&(nn=pn-Ot.offsetWidth)}Ot.style.top=Ie+"px",Ot.style.left=Ot.style.right="",Te=="right"?(nn=ke.sizer.clientWidth-Ot.offsetWidth,Ot.style.right="0px"):(Te=="left"?nn=0:Te=="middle"&&(nn=(ke.sizer.clientWidth-Ot.offsetWidth)/2),Ot.style.left=nn+"px"),te&&Qc(this,{left:nn,top:Ie,right:nn+Ot.offsetWidth,bottom:Ie+Ot.offsetHeight})},triggerOnKeyDown:ma(Pp),triggerOnKeyPress:ma(Nl),triggerOnKeyUp:kp,triggerOnMouseDown:ma(jl),execCommand:function(Ct){if(Ju.hasOwnProperty(Ct))return Ju[Ct].call(null,this)},triggerElectric:ma(function(Ct){Op(this,Ct)}),findPosH:function(Ct,Ot,te,ve){var Te=1;Ot<0&&(Te=-1,Ot=-Ot);for(var ke=Bn(this.doc,Ct),Ie=0;Ie<Ot&&(ke=vf(this.doc,ke,Te,te,ve),!ke.hitSide);++Ie);return ke},moveH:ma(function(Ct,Ot){var te=this;this.extendSelectionsBy(function(ve){return te.display.shift||te.doc.extend||ve.empty()?vf(te.doc,ve.head,Ct,Ot,te.options.rtlMoveVisually):Ct<0?ve.from():ve.to()},he)}),deleteH:ma(function(Ct,Ot){var te=this.doc.sel,ve=this.doc;te.somethingSelected()?ve.replaceSelection("",null,"+delete"):Ms(this,function(Te){var ke=vf(ve,Te.head,Ct,Ot,!1);return Ct<0?{from:ke,to:Te.head}:{from:Te.head,to:ke}})}),findPosV:function(Ct,Ot,te,ve){var Te=1,ke=ve;Ot<0&&(Te=-1,Ot=-Ot);for(var Ie=Bn(this.doc,Ct),nn=0;nn<Ot;++nn){var ze=mo(this,Ie,"div");if(ke==null?ke=ze.left:ze.left=ke,Ie=qu(this,ze,Te,te),Ie.hitSide)break}return Ie},moveV:ma(function(Ct,Ot){var te=this,ve=this.doc,Te=[],ke=!this.display.shift&&!ve.extend&&ve.sel.somethingSelected();if(ve.extendSelectionsBy(function(nn){if(ke)return Ct<0?nn.from():nn.to();var ze=mo(te,nn.head,"div");nn.goalColumn!=null&&(ze.left=nn.goalColumn),Te.push(ze.left);var pn=qu(te,ze,Ct,Ot);return Ot=="page"&&nn==ve.sel.primary()&&Hf(te,Du(te,pn,"div").top-ze.top),pn},he),Te.length)for(var Ie=0;Ie<ve.sel.ranges.length;Ie++)ve.sel.ranges[Ie].goalColumn=Te[Ie]}),findWordAt:function(Ct){var Ot=this.doc,te=Fn(Ot,Ct.line).text,ve=Ct.ch,Te=Ct.ch;if(te){var ke=this.getHelper(Ct,"wordChars");(Ct.sticky=="before"||Te==te.length)&&ve?--ve:++Te;for(var Ie=te.charAt(ve),nn=ne(Ie,ke)?function(ze){return ne(ze,ke)}:/\s/.test(Ie)?function(ze){return/\s/.test(ze)}:function(ze){return!/\s/.test(ze)&&!ne(ze)};ve>0&&nn(te.charAt(ve-1));)--ve;for(;Te<te.length&&nn(te.charAt(Te));)++Te}return new ro(en(Ct.line,ve),en(Ct.line,Te))},toggleOverwrite:function(Ct){Ct!=null&&Ct==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ht(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:ma(function(Ct,Ot){bh(this,Ct,Ot)}),getScrollInfo:function(){var Ct=this.display.scroller;return{left:Ct.scrollLeft,top:Ct.scrollTop,height:Ct.scrollHeight-Oa(this)-this.display.barHeight,width:Ct.scrollWidth-Oa(this)-this.display.barWidth,clientHeight:Ml(this),clientWidth:Ps(this)}},scrollIntoView:ma(function(Ct,Ot){Ct==null?(Ct={from:this.doc.sel.primary().head,to:null},Ot==null&&(Ot=this.options.cursorScrollMargin)):typeof Ct=="number"?Ct={from:en(Ct,0),to:null}:Ct.from==null&&(Ct={from:Ct,to:null}),Ct.to||(Ct.to=Ct.from),Ct.margin=Ot||0,Ct.from.line!=null?Ri(this,Ct):Vf(this,Ct.from,Ct.to,Ct.margin)}),setSize:ma(function(Ct,Ot){var te=this,ve=function(ke){return typeof ke=="number"||/^\d+$/.test(String(ke))?ke+"px":ke};Ct!=null&&(this.display.wrapper.style.width=ve(Ct)),Ot!=null&&(this.display.wrapper.style.height=ve(Ot)),this.options.lineWrapping&&Ou(this);var Te=this.display.viewFrom;this.doc.iter(Te,this.display.viewTo,function(ke){if(ke.widgets){for(var Ie=0;Ie<ke.widgets.length;Ie++)if(ke.widgets[Ie].noHScroll){Pi(te,Te,"widget");break}}++Te}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(Ct){return Yi(this,Ct)},startOperation:function(){return _u(this)},endOperation:function(){return zu(this)},refresh:ma(function(){var Ct=this.display.cachedTextHeight;Co(this),this.curOp.forceUpdate=!0,Fu(this),bh(this,this.doc.scrollLeft,this.doc.scrollTop),Wu(this.display),(Ct==null||Math.abs(Ct-Qa(this.display))>.5||this.options.lineWrapping)&&ei(this),We(this,"refresh",this)}),swapDoc:ma(function(Ct){var Ot=this.doc;return Ot.cm=null,this.state.selectingText&&this.state.selectingText(),Jf(this,Ct),Fu(this),this.display.input.reset(),bh(this,Ct.scrollLeft,Ct.scrollTop),this.curOp.forceScroll=!0,Br(this,"swapDoc",this,Ot),Ot}),phrase:function(Ct){var Ot=this.options.phrases;return Ot&&Object.prototype.hasOwnProperty.call(Ot,Ct)?Ot[Ct]:Ct},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}},ln(rt),rt.registerHelper=function(Ct,Ot,te){Et.hasOwnProperty(Ct)||(Et[Ct]=rt[Ct]={_global:[]}),Et[Ct][Ot]=te},rt.registerGlobalHelper=function(Ct,Ot,te,ve){rt.registerHelper(Ct,Ot,ve),Et[Ct]._global.push({pred:te,val:ve})}}function vf(rt,ct,Et,Ct,Ot){var te=ct,ve=Et,Te=Fn(rt,ct.line),ke=Ot&&rt.direction=="rtl"?-Et:Et;function Ie(){var Hr=ct.line+ke;return Hr<rt.first||Hr>=rt.first+rt.size?!1:(ct=new en(Hr,ct.ch,ct.sticky),Te=Fn(rt,Hr))}function nn(Hr){var jr;if(Ct=="codepoint"){var Yr=Te.text.charCodeAt(ct.ch+(Ct>0?0:-1));isNaN(Yr)?jr=null:jr=new en(ct.line,Math.max(0,Math.min(Te.text.length,ct.ch+Et*(Yr>=55296&&Yr<56320?2:1))),-Et)}else Ot?jr=id(rt.cm,Te,ct,Et):jr=Xo(Te,ct,Et);if(jr==null)if(!Hr&&Ie())ct=pf(Ot,rt.cm,Te,ct.line,ke);else return!1;else ct=jr;return!0}if(Ct=="char"||Ct=="codepoint")nn();else if(Ct=="column")nn(!0);else if(Ct=="word"||Ct=="group")for(var ze=null,pn=Ct=="group",hn=rt.cm&&rt.cm.getHelper(ct,"wordChars"),Hn=!0;!(Et<0&&!nn(!Hn));Hn=!1){var Yn=Te.text.charAt(ct.ch)||`
|
|
`,or=ne(Yn,hn)?"w":pn&&Yn==`
|
|
`?"n":!pn||/\s/.test(Yn)?null:"p";if(pn&&!Hn&&!or&&(or="s"),ze&&ze!=or){Et<0&&(Et=1,nn(),ct.sticky="after");break}if(or&&(ze=or),Et>0&&!nn(!Hn))break}var Cr=lf(rt,ct,te,ve,!0);return Pn(te,Cr)&&(Cr.hitSide=!0),Cr}function qu(rt,ct,Et,Ct){var Ot=rt.doc,te=ct.left,ve;if(Ct=="page"){var Te=Math.min(rt.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ke=Math.max(Te-.5*Qa(rt.display),3);ve=(Et>0?ct.bottom:ct.top)+Et*ke}else Ct=="line"&&(ve=Et>0?ct.bottom+3:ct.top-3);for(var Ie;Ie=Da(rt,te,ve),!!Ie.outside;){if(Et<0?ve<=0:ve>=Ot.height){Ie.hitSide=!0;break}ve+=Et*5}return Ie}var ho=function(rt){this.cm=rt,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ho.prototype.init=function(rt){var ct=this,Et=this,Ct=Et.cm,Ot=Et.div=rt.lineDiv;Dp(Ot,Ct.options.spellcheck,Ct.options.autocorrect,Ct.options.autocapitalize);function te(Te){for(var ke=Te.target;ke;ke=ke.parentNode){if(ke==Ot)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ke.className))break}return!1}qe(Ot,"paste",function(Te){!te(Te)||Ke(Ct,Te)||jp(Te,Ct)||vt<=11&&setTimeout(la(Ct,function(){return ct.updateFromDOM()}),20)}),qe(Ot,"compositionstart",function(Te){ct.composing={data:Te.data,done:!1}}),qe(Ot,"compositionupdate",function(Te){ct.composing||(ct.composing={data:Te.data,done:!1})}),qe(Ot,"compositionend",function(Te){ct.composing&&(Te.data!=ct.composing.data&&ct.readFromDOMSoon(),ct.composing.done=!0)}),qe(Ot,"touchstart",function(){return Et.forceCompositionEnd()}),qe(Ot,"input",function(){ct.composing||ct.readFromDOMSoon()});function ve(Te){if(!(!te(Te)||Ke(Ct,Te))){if(Ct.somethingSelected())Rh({lineWise:!1,text:Ct.getSelections()}),Te.type=="cut"&&Ct.replaceSelection("",null,"cut");else if(Ct.options.lineWiseCopyCut){var ke=Fp(Ct);Rh({lineWise:!0,text:ke.text}),Te.type=="cut"&&Ct.operation(function(){Ct.setSelections(ke.ranges,0,ce),Ct.replaceSelection("",null,"cut")})}else return;if(Te.clipboardData){Te.clipboardData.clearData();var Ie=ds.text.join(`
|
|
`);if(Te.clipboardData.setData("Text",Ie),Te.clipboardData.getData("Text")==Ie){Te.preventDefault();return}}var nn=Bp(),ze=nn.firstChild;Ct.display.lineSpace.insertBefore(nn,Ct.display.lineSpace.firstChild),ze.value=ds.text.join(`
|
|
`);var pn=document.activeElement;se(ze),setTimeout(function(){Ct.display.lineSpace.removeChild(nn),pn.focus(),pn==Ot&&Et.showPrimarySelection()},50)}}qe(Ot,"copy",ve),qe(Ot,"cut",ve)},ho.prototype.screenReaderLabelChanged=function(rt){rt?this.div.setAttribute("aria-label",rt):this.div.removeAttribute("aria-label")},ho.prototype.prepareSelection=function(){var rt=Bu(this.cm,!1);return rt.focus=document.activeElement==this.div,rt},ho.prototype.showSelection=function(rt,ct){!rt||!this.cm.display.view.length||((rt.focus||ct)&&this.showPrimarySelection(),this.showMultipleSelections(rt))},ho.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ho.prototype.showPrimarySelection=function(){var rt=this.getSelection(),ct=this.cm,Et=ct.doc.sel.primary(),Ct=Et.from(),Ot=Et.to();if(ct.display.viewTo==ct.display.viewFrom||Ct.line>=ct.display.viewTo||Ot.line<ct.display.viewFrom){rt.removeAllRanges();return}var te=yf(ct,rt.anchorNode,rt.anchorOffset),ve=yf(ct,rt.focusNode,rt.focusOffset);if(!(te&&!te.bad&&ve&&!ve.bad&&kn(Nn(te,ve),Ct)==0&&kn($n(te,ve),Ot)==0)){var Te=ct.display.view,ke=Ct.line>=ct.display.viewFrom&&pd(ct,Ct)||{node:Te[0].measure.map[2],offset:0},Ie=Ot.line<ct.display.viewTo&&pd(ct,Ot);if(!Ie){var nn=Te[Te.length-1].measure,ze=nn.maps?nn.maps[nn.maps.length-1]:nn.map;Ie={node:ze[ze.length-1],offset:ze[ze.length-2]-ze[ze.length-3]}}if(!ke||!Ie){rt.removeAllRanges();return}var pn=rt.rangeCount&&rt.getRangeAt(0),hn;try{hn=Wt(ke.node,ke.offset,Ie.offset,Ie.node)}catch(Hn){}hn&&(!ae&&ct.state.focused?(rt.collapse(ke.node,ke.offset),hn.collapsed||(rt.removeAllRanges(),rt.addRange(hn))):(rt.removeAllRanges(),rt.addRange(hn)),pn&&rt.anchorNode==null?rt.addRange(pn):ae&&this.startGracePeriod()),this.rememberSelection()}},ho.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)},ho.prototype.showMultipleSelections=function(rt){jt(this.cm.display.cursorDiv,rt.cursors),jt(this.cm.display.selectionDiv,rt.selection)},ho.prototype.rememberSelection=function(){var rt=this.getSelection();this.lastAnchorNode=rt.anchorNode,this.lastAnchorOffset=rt.anchorOffset,this.lastFocusNode=rt.focusNode,this.lastFocusOffset=rt.focusOffset},ho.prototype.selectionInEditor=function(){var rt=this.getSelection();if(!rt.rangeCount)return!1;var ct=rt.getRangeAt(0).commonAncestorContainer;return Jt(this.div,ct)},ho.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ho.prototype.blur=function(){this.div.blur()},ho.prototype.getField=function(){return this.div},ho.prototype.supportsTouch=function(){return!0},ho.prototype.receivedFocus=function(){var rt=this;this.selectionInEditor()?this.pollSelection():Yi(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)},ho.prototype.selectionChanged=function(){var rt=this.getSelection();return rt.anchorNode!=this.lastAnchorNode||rt.anchorOffset!=this.lastAnchorOffset||rt.focusNode!=this.lastFocusNode||rt.focusOffset!=this.lastFocusOffset},ho.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var rt=this.getSelection(),ct=this.cm;if(z&&bt&&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),Ct=yf(ct,rt.focusNode,rt.focusOffset);Et&&Ct&&Yi(ct,function(){Wa(ct.doc,pu(Et,Ct),ce),(Et.bad||Ct.bad)&&(ct.curOp.selectionChanged=!0)})}}},ho.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var rt=this.cm,ct=rt.display,Et=rt.doc.sel.primary(),Ct=Et.from(),Ot=Et.to();if(Ct.ch==0&&Ct.line>rt.firstLine()&&(Ct=en(Ct.line-1,Fn(rt.doc,Ct.line-1).length)),Ot.ch==Fn(rt.doc,Ot.line).text.length&&Ot.line<rt.lastLine()&&(Ot=en(Ot.line+1,0)),Ct.line<ct.viewFrom||Ot.line>ct.viewTo-1)return!1;var te,ve,Te;Ct.line==ct.viewFrom||(te=Rs(rt,Ct.line))==0?(ve=Ae(ct.view[0].line),Te=ct.view[0].node):(ve=Ae(ct.view[te].line),Te=ct.view[te-1].node.nextSibling);var ke=Rs(rt,Ot.line),Ie,nn;if(ke==ct.view.length-1?(Ie=ct.viewTo-1,nn=ct.lineDiv.lastChild):(Ie=Ae(ct.view[ke+1].line)-1,nn=ct.view[ke+1].node.previousSibling),!Te)return!1;for(var ze=rt.doc.splitLines(Tc(rt,Te,nn,ve,Ie)),pn=cr(rt.doc,en(ve,0),en(Ie,Fn(rt.doc,Ie).text.length));ze.length>1&&pn.length>1;)if(ge(ze)==ge(pn))ze.pop(),pn.pop(),Ie--;else if(ze[0]==pn[0])ze.shift(),pn.shift(),ve++;else break;for(var hn=0,Hn=0,Yn=ze[0],or=pn[0],Cr=Math.min(Yn.length,or.length);hn<Cr&&Yn.charCodeAt(hn)==or.charCodeAt(hn);)++hn;for(var Hr=ge(ze),jr=ge(pn),Yr=Math.min(Hr.length-(ze.length==1?hn:0),jr.length-(pn.length==1?hn:0));Hn<Yr&&Hr.charCodeAt(Hr.length-Hn-1)==jr.charCodeAt(jr.length-Hn-1);)++Hn;if(ze.length==1&&pn.length==1&&ve==Ct.line)for(;hn&&hn>Ct.ch&&Hr.charCodeAt(Hr.length-Hn-1)==jr.charCodeAt(jr.length-Hn-1);)hn--,Hn++;ze[ze.length-1]=Hr.slice(0,Hr.length-Hn).replace(/^\u200b+/,""),ze[0]=ze[0].slice(hn).replace(/\u200b+$/,"");var fi=en(ve,hn),Nr=en(Ie,pn.length?ge(pn).length-Hn:0);if(ze.length>1||ze[0]||kn(fi,Nr))return Ah(rt.doc,ze,fi,Nr,"+input"),!0},ho.prototype.ensurePolled=function(){this.forceCompositionEnd()},ho.prototype.reset=function(){this.forceCompositionEnd()},ho.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ho.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))},ho.prototype.updateFromDOM=function(){var rt=this;(this.cm.isReadOnly()||!this.pollContent())&&Yi(this.cm,function(){return Co(rt.cm)})},ho.prototype.setUneditable=function(rt){rt.contentEditable="false"},ho.prototype.onKeyPress=function(rt){rt.charCode==0||this.composing||(rt.preventDefault(),this.cm.isReadOnly()||la(this.cm,mf)(this.cm,String.fromCharCode(rt.charCode==null?rt.keyCode:rt.charCode),0))},ho.prototype.readOnlyChanged=function(rt){this.div.contentEditable=String(rt!="nocursor")},ho.prototype.onContextMenu=function(){},ho.prototype.resetPosition=function(){},ho.prototype.needsContentAttribute=!0;function pd(rt,ct){var Et=dl(rt,ct.line);if(!Et||Et.hidden)return null;var Ct=Fn(rt.doc,ct.line),Ot=ju(Et,Ct,ct.line),te=Xe(Ct,rt.doc.direction),ve="left";if(te){var Te=Ne(te,ct.ch);ve=Te%2?"right":"left"}var ke=uc(Ot.map,ct.ch,ve);return ke.offset=ke.collapse=="right"?ke.end:ke.start,ke}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,Ct,Ot){var te="",ve=!1,Te=rt.doc.lineSeparator(),ke=!1;function Ie(hn){return function(Hn){return Hn.id==hn}}function nn(){ve&&(te+=Te,ke&&(te+=Te),ve=ke=!1)}function ze(hn){hn&&(nn(),te+=hn)}function pn(hn){if(hn.nodeType==1){var Hn=hn.getAttribute("cm-text");if(Hn){ze(Hn);return}var Yn=hn.getAttribute("cm-marker"),or;if(Yn){var Cr=rt.findMarks(en(Ct,0),en(Ot+1,0),Ie(+Yn));Cr.length&&(or=Cr[0].find(0))&&ze(cr(rt.doc,or.from,or.to).join(Te));return}if(hn.getAttribute("contenteditable")=="false")return;var Hr=/^(pre|div|p|li|table|br)$/i.test(hn.nodeName);if(!/^br$/i.test(hn.nodeName)&&hn.textContent.length==0)return;Hr&&nn();for(var jr=0;jr<hn.childNodes.length;jr++)pn(hn.childNodes[jr]);/^(pre|p)$/i.test(hn.nodeName)&&(ke=!0),Hr&&(ve=!0)}else hn.nodeType==3&&ze(hn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;pn(ct),ct!=Et;)ct=ct.nextSibling,ke=!1;return te}function yf(rt,ct,Et){var Ct;if(ct==rt.display.lineDiv){if(Ct=rt.display.lineDiv.childNodes[Et],!Ct)return Mc(rt.clipPos(en(rt.display.viewTo-1)),!0);ct=null,Et=0}else for(Ct=ct;;Ct=Ct.parentNode){if(!Ct||Ct==rt.display.lineDiv)return null;if(Ct.parentNode&&Ct.parentNode==rt.display.lineDiv)break}for(var Ot=0;Ot<rt.display.view.length;Ot++){var te=rt.display.view[Ot];if(te.node==Ct)return am(te,ct,Et)}}function am(rt,ct,Et){var Ct=rt.text.firstChild,Ot=!1;if(!ct||!Jt(Ct,ct))return Mc(en(Ae(rt.line),0),!0);if(ct==Ct&&(Ot=!0,ct=Ct.childNodes[Et],Et=0,!ct)){var te=rt.rest?ge(rt.rest):rt.line;return Mc(en(Ae(te),te.text.length),Ot)}var ve=ct.nodeType==3?ct:null,Te=ct;for(!ve&&ct.childNodes.length==1&&ct.firstChild.nodeType==3&&(ve=ct.firstChild,Et&&(Et=ve.nodeValue.length));Te.parentNode!=Ct;)Te=Te.parentNode;var ke=rt.measure,Ie=ke.maps;function nn(or,Cr,Hr){for(var jr=-1;jr<(Ie?Ie.length:0);jr++)for(var Yr=jr<0?ke.map:Ie[jr],fi=0;fi<Yr.length;fi+=3){var Nr=Yr[fi+2];if(Nr==or||Nr==Cr){var ki=Ae(jr<0?rt.line:rt.rest[jr]),ko=Yr[fi]+Hr;return(Hr<0||Nr!=or)&&(ko=Yr[fi+(Hr?1:0)]),en(ki,ko)}}}var ze=nn(ve,Te,Et);if(ze)return Mc(ze,Ot);for(var pn=Te.nextSibling,hn=ve?ve.nodeValue.length-Et:0;pn;pn=pn.nextSibling){if(ze=nn(pn,pn.firstChild,0),ze)return Mc(en(ze.line,ze.ch-hn),Ot);hn+=pn.textContent.length}for(var Hn=Te.previousSibling,Yn=Et;Hn;Hn=Hn.previousSibling){if(ze=nn(Hn,Hn.firstChild,-1),ze)return Mc(en(ze.line,ze.ch+Yn),Ot);Yn+=Hn.textContent.length}}var ta=function(rt){this.cm=rt,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};ta.prototype.init=function(rt){var ct=this,Et=this,Ct=this.cm;this.createField(rt);var Ot=this.textarea;rt.wrapper.insertBefore(this.wrapper,rt.wrapper.firstChild),ft&&(Ot.style.width="0px"),qe(Ot,"input",function(){Bt&&vt>=9&&ct.hasSelection&&(ct.hasSelection=null),Et.poll()}),qe(Ot,"paste",function(ve){Ke(Ct,ve)||jp(ve,Ct)||(Ct.state.pasteIncoming=+new Date,Et.fastPoll())});function te(ve){if(!Ke(Ct,ve)){if(Ct.somethingSelected())Rh({lineWise:!1,text:Ct.getSelections()});else if(Ct.options.lineWiseCopyCut){var Te=Fp(Ct);Rh({lineWise:!0,text:Te.text}),ve.type=="cut"?Ct.setSelections(Te.ranges,null,ce):(Et.prevInput="",Ot.value=Te.text.join(`
|
|
`),se(Ot))}else return;ve.type=="cut"&&(Ct.state.cutIncoming=+new Date)}}qe(Ot,"cut",te),qe(Ot,"copy",te),qe(rt.scroller,"paste",function(ve){if(!(Ho(rt,ve)||Ke(Ct,ve))){if(!Ot.dispatchEvent){Ct.state.pasteIncoming=+new Date,Et.focus();return}var Te=new Event("paste");Te.clipboardData=ve.clipboardData,Ot.dispatchEvent(Te)}}),qe(rt.lineSpace,"selectstart",function(ve){Ho(rt,ve)||gn(ve)}),qe(Ot,"compositionstart",function(){var ve=Ct.getCursor("from");Et.composing&&Et.composing.range.clear(),Et.composing={start:ve,range:Ct.markText(ve,Ct.getCursor("to"),{className:"CodeMirror-composing"})}}),qe(Ot,"compositionend",function(){Et.composing&&(Et.poll(),Et.composing.range.clear(),Et.composing=null)})},ta.prototype.createField=function(rt){this.wrapper=Bp(),this.textarea=this.wrapper.firstChild},ta.prototype.screenReaderLabelChanged=function(rt){rt?this.textarea.setAttribute("aria-label",rt):this.textarea.removeAttribute("aria-label")},ta.prototype.prepareSelection=function(){var rt=this.cm,ct=rt.display,Et=rt.doc,Ct=Bu(rt);if(rt.options.moveInputWithCursor){var Ot=mo(rt,Et.sel.primary().head,"div"),te=ct.wrapper.getBoundingClientRect(),ve=ct.lineDiv.getBoundingClientRect();Ct.teTop=Math.max(0,Math.min(ct.wrapper.clientHeight-10,Ot.top+ve.top-te.top)),Ct.teLeft=Math.max(0,Math.min(ct.wrapper.clientWidth-10,Ot.left+ve.left-te.left))}return Ct},ta.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")},ta.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))}},ta.prototype.getField=function(){return this.textarea},ta.prototype.supportsTouch=function(){return!1},ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!tt||Ut()!=this.textarea))try{this.textarea.focus()}catch(rt){}},ta.prototype.blur=function(){this.textarea.blur()},ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ta.prototype.receivedFocus=function(){this.slowPoll()},ta.prototype.slowPoll=function(){var rt=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){rt.poll(),rt.cm.state.focused&&rt.slowPoll()})},ta.prototype.fastPoll=function(){var rt=!1,ct=this;ct.pollingFast=!0;function Et(){var Ct=ct.poll();!Ct&&!rt?(rt=!0,ct.polling.set(60,Et)):(ct.pollingFast=!1,ct.slowPoll())}ct.polling.set(20,Et)},ta.prototype.poll=function(){var rt=this,ct=this.cm,Et=this.textarea,Ct=this.prevInput;if(this.contextMenuPending||!ct.state.focused||qt(Et)&&!Ct&&!this.composing||ct.isReadOnly()||ct.options.disableInput||ct.state.keySeq)return!1;var Ot=Et.value;if(Ot==Ct&&!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 te=Ot.charCodeAt(0);if(te==8203&&!Ct&&(Ct="\u200B"),te==8666)return this.reset(),this.cm.execCommand("undo")}for(var ve=0,Te=Math.min(Ct.length,Ot.length);ve<Te&&Ct.charCodeAt(ve)==Ot.charCodeAt(ve);)++ve;return Yi(ct,function(){mf(ct,Ot.slice(ve),Ct.length-ve,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},ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ta.prototype.onKeyPress=function(){Bt&&vt>=9&&(this.hasSelection=null),this.fastPoll()},ta.prototype.onContextMenu=function(rt){var ct=this,Et=ct.cm,Ct=Et.display,Ot=ct.textarea;ct.contextMenuPending&&ct.contextMenuPending();var te=$a(Et,rt),ve=Ct.scroller.scrollTop;if(!te||St)return;var Te=Et.options.resetSelectionOnContextMenu;Te&&Et.doc.sel.contains(te)==-1&&la(Et,Wa)(Et.doc,pu(te),ce);var ke=Ot.style.cssText,Ie=ct.wrapper.style.cssText,nn=ct.wrapper.offsetParent.getBoundingClientRect();ct.wrapper.style.cssText="position: static",Ot.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(rt.clientY-nn.top-5)+"px; left: "+(rt.clientX-nn.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),Ct.input.focus(),gt&&window.scrollTo(null,ze),Ct.input.reset(),Et.somethingSelected()||(Ot.value=ct.prevInput=" "),ct.contextMenuPending=hn,Ct.selForContextMenu=Et.doc.sel,clearTimeout(Ct.detectingSelectAll);function pn(){if(Ot.selectionStart!=null){var Yn=Et.somethingSelected(),or="\u200B"+(Yn?Ot.value:"");Ot.value="\u21DA",Ot.value=or,ct.prevInput=Yn?"":"\u200B",Ot.selectionStart=1,Ot.selectionEnd=or.length,Ct.selForContextMenu=Et.doc.sel}}function hn(){if(ct.contextMenuPending==hn&&(ct.contextMenuPending=!1,ct.wrapper.style.cssText=Ie,Ot.style.cssText=ke,Bt&&vt<9&&Ct.scrollbars.setScrollTop(Ct.scroller.scrollTop=ve),Ot.selectionStart!=null)){(!Bt||Bt&&vt<9)&&pn();var Yn=0,or=function(){Ct.selForContextMenu==Et.doc.sel&&Ot.selectionStart==0&&Ot.selectionEnd>0&&ct.prevInput=="\u200B"?la(Et,Zo)(Et):Yn++<10?Ct.detectingSelectAll=setTimeout(or,500):(Ct.selForContextMenu=null,Ct.input.reset())};Ct.detectingSelectAll=setTimeout(or,200)}}if(Bt&&vt>=9&&pn(),Pt){Kn(rt);var Hn=function(){Ue(window,"mouseup",Hn),setTimeout(hn,20)};qe(window,"mouseup",Hn)}else setTimeout(hn,50)},ta.prototype.readOnlyChanged=function(rt){rt||this.reset(),this.textarea.disabled=rt=="nocursor",this.textarea.readOnly=!!rt},ta.prototype.setUneditable=function(){},ta.prototype.needsContentAttribute=!1;function sm(rt,ct){if(ct=ct?Pe(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 Ct(){rt.value=Te.getValue()}var Ot;if(rt.form&&(qe(rt.form,"submit",Ct),!ct.leaveSubmitMethodAlone)){var te=rt.form;Ot=te.submit;try{var ve=te.submit=function(){Ct(),te.submit=Ot,te.submit(),te.submit=ve}}catch(ke){}}ct.finishInit=function(ke){ke.save=Ct,ke.getTextArea=function(){return rt},ke.toTextArea=function(){ke.toTextArea=isNaN,Ct(),rt.parentNode.removeChild(ke.getWrapperElement()),rt.style.display="",rt.form&&(Ue(rt.form,"submit",Ct),!ct.leaveSubmitMethodAlone&&typeof rt.form.submit=="function"&&(rt.form.submit=Ot))}},rt.style.display="none";var Te=Vi(function(ke){return rt.parentNode.insertBefore(ke,rt.nextSibling)},ct);return Te}function Lc(rt){rt.off=Ue,rt.on=qe,rt.wheelEventPixels=zs,rt.Doc=Ba,rt.splitLines=Ur,rt.countColumn=Yt,rt.findColumn=Ce,rt.isWordChar=Xt,rt.Pass=be,rt.signal=We,rt.Line=qi,rt.changeEnd=Ku,rt.scrollbarModel=rp,rt.Pos=en,rt.cmpPos=kn,rt.modes=Un,rt.mimeModes=Wn,rt.resolveMode=Rr,rt.getMode=Ye,rt.modeExtensions=tn,rt.extendMode=Ze,rt.copyState=zn,rt.startState=Jn,rt.innerMode=Qn,rt.commands=Ju,rt.keyMap=Es,rt.keyName=qg,rt.isModifierKey=wc,rt.lookupKey=rl,rt.normalizeKeyMap=yp,rt.StringStream=bn,rt.SharedTextMarker=Kl,rt.TextMarker=$e,rt.LineWidget=vu,rt.e_preventDefault=gn,rt.e_stopPropagation=Gn,rt.e_stop=Kn,rt.addClass=Ht,rt.contains=Jt,rt.rmClass=Dt,rt.keyNames=Zl}im(Vi),$u(Vi);var yu="iter insert remove copy getEditor constructor".split(" ");for(var Sf in Ba.prototype)Ba.prototype.hasOwnProperty(Sf)&&ye(yu,Sf)<0&&(Vi.prototype[Sf]=function(rt){return function(){return rt.apply(this.doc,arguments)}}(Ba.prototype[Sf]));return ln(Ba),Vi.inputStyles={textarea:ta,contenteditable:ho},Vi.defineMode=function(rt){!Vi.defaults.mode&&rt!="null"&&(Vi.defaults.mode=rt),ir.apply(this,arguments)},Vi.defineMIME=Lr,Vi.defineMode("null",function(){return{token:function(rt){return rt.skipToEnd()}}}),Vi.defineMIME("text/plain","null"),Vi.defineExtension=function(rt,ct){Vi.prototype[rt]=ct},Vi.defineDocExtension=function(rt,ct){Ba.prototype[rt]=ct},Vi.fromTextArea=sm,Lc(Vi),Vi.version="5.58.2",Vi})},25419:function(fn,cn,le){(function(ae){ae(le(89780),le(15525),le(98101))})(function(ae){"use strict";ae.defineMode("markdown",function(Re,ot){var _t=ae.getMode(Re,"text/html"),Bt=_t.name=="null";function vt(Yt){if(ae.findModeByName){var ee=ae.findModeByName(Yt);ee&&(Yt=ee.mime||ee.mimes[0])}var ye=ae.getMode(Re,Yt);return ye.name=="null"?null:ye}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 bt=/^([*\-_])(?:\s*\1){2,}\s*$/,St=/^(?:[*\-+]|^[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,ee,ye){return ee.f=ee.inline=ye,ye(Yt,ee)}function ut(Yt,ee,ye){return ee.f=ee.block=ye,ye(Yt,ee)}function dt(Yt){return!Yt||!/\S/.test(Yt.string)}function Pt(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 ee=Bt;if(!ee){var ye=ae.innerMode(_t,Yt.htmlState);ee=ye.mode.name=="xml"&&ye.state.tagStart===null&&!ye.state.context&&ye.state.tokenize.isInText}ee&&(Yt.f=Gt,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,ee){var ye=Yt.column()===ee.indentation,xe=dt(ee.prevLine.stream),be=ee.indentedCode,ce=ee.prevLine.hr,pe=ee.list!==!1,he=(ee.listStack[ee.listStack.length-1]||0)+3;ee.indentedCode=!1;var Ce=ee.indentation;if(ee.indentationDiff===null&&(ee.indentationDiff=ee.indentation,pe)){for(ee.list=null;Ce<ee.listStack[ee.listStack.length-1];)ee.listStack.pop(),ee.listStack.length?ee.indentation=ee.listStack[ee.listStack.length-1]:ee.list=!1;ee.list!==!1&&(ee.indentationDiff=Ce-ee.listStack[ee.listStack.length-1])}var de=!xe&&!ce&&!ee.prevLine.header&&(!pe||!be)&&!ee.prevLine.fencedCodeEnd,Fe=(ee.list===!1||ce||xe)&&ee.indentation<=he&&Yt.match(bt),ge=null;if(ee.indentationDiff>=4&&(be||ee.prevLine.fencedCodeEnd||ee.prevLine.header||xe))return Yt.skipToEnd(),ee.indentedCode=!0,gt.code;if(Yt.eatSpace())return null;if(ye&&ee.indentation<=he&&(ge=Yt.match(mt))&&ge[1].length<=6)return ee.quote=0,ee.header=ge[1].length,ee.thisLine.header=!0,ot.highlightFormatting&&(ee.formatting="header"),ee.f=ee.inline,jt(ee);if(ee.indentation<=he&&Yt.eat(">"))return ee.quote=ye?1:ee.quote+1,ot.highlightFormatting&&(ee.formatting="quote"),Yt.eatSpace(),jt(ee);if(!Fe&&!ee.setext&&ye&&ee.indentation<=he&&(ge=Yt.match(St))){var Se=ge[1]?"ol":"ul";return ee.indentation=Ce+Yt.current().length,ee.list=!0,ee.quote=0,ee.listStack.push(ee.indentation),ee.em=!1,ee.strong=!1,ee.code=!1,ee.strikethrough=!1,ot.taskLists&&Yt.match(Tt,!1)&&(ee.taskList=!0),ee.f=ee.inline,ot.highlightFormatting&&(ee.formatting=["list","list-"+Se]),jt(ee)}else{if(ye&&ee.indentation<=he&&(ge=Yt.match(z,!0)))return ee.quote=0,ee.fencedEndRE=new RegExp(ge[1]+"+ *$"),ee.localMode=ot.fencedCodeBlockHighlighting&&vt(ge[2]||ot.fencedCodeBlockDefaultMode),ee.localMode&&(ee.localState=ae.startState(ee.localMode)),ee.f=ee.block=Ft,ot.highlightFormatting&&(ee.formatting="code-block"),ee.code=-1,jt(ee);if(ee.setext||(!de||!pe)&&!ee.quote&&ee.list===!1&&!ee.code&&!Fe&&!tt.test(Yt.string)&&(ge=Yt.lookAhead(1))&&(ge=ge.match(xt)))return ee.setext?(ee.header=ee.setext,ee.setext=0,Yt.skipToEnd(),ot.highlightFormatting&&(ee.formatting="header")):(ee.header=ge[0].charAt(0)=="="?1:2,ee.setext=ee.header),ee.thisLine.header=!0,ee.f=ee.inline,jt(ee);if(Fe)return Yt.skipToEnd(),ee.hr=!0,ee.thisLine.hr=!0,gt.hr;if(Yt.peek()==="[")return lt(Yt,ee,oe)}return lt(Yt,ee,ee.inline)}function Dt(Yt,ee){var ye=_t.token(Yt,ee.htmlState);if(!Bt){var xe=ae.innerMode(_t,ee.htmlState);(xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText||ee.md_inside&&Yt.current().indexOf(">")>-1)&&(ee.f=Gt,ee.block=At,ee.htmlState=null)}return ye}function Ft(Yt,ee){var ye=ee.listStack[ee.listStack.length-1]||0,xe=ee.indentation<ye,be=ye+3;if(ee.fencedEndRE&&ee.indentation<=be&&(xe||Yt.match(ee.fencedEndRE))){ot.highlightFormatting&&(ee.formatting="code-block");var ce;return xe||(ce=jt(ee)),ee.localMode=ee.localState=null,ee.block=At,ee.f=Gt,ee.fencedEndRE=null,ee.code=0,ee.thisLine.fencedCodeEnd=!0,xe?ut(Yt,ee,ee.block):ce}else return ee.localMode?ee.localMode.token(Yt,ee.localState):(Yt.skipToEnd(),gt.code)}function jt(Yt){var ee=[];if(Yt.formatting){ee.push(gt.formatting),typeof Yt.formatting=="string"&&(Yt.formatting=[Yt.formatting]);for(var ye=0;ye<Yt.formatting.length;ye++)ee.push(gt.formatting+"-"+Yt.formatting[ye]),Yt.formatting[ye]==="header"&&ee.push(gt.formatting+"-"+Yt.formatting[ye]+"-"+Yt.header),Yt.formatting[ye]==="quote"&&(!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ee.push(gt.formatting+"-"+Yt.formatting[ye]+"-"+Yt.quote):ee.push("error"))}if(Yt.taskOpen)return ee.push("meta"),ee.length?ee.join(" "):null;if(Yt.taskClosed)return ee.push("property"),ee.length?ee.join(" "):null;if(Yt.linkHref?ee.push(gt.linkHref,"url"):(Yt.strong&&ee.push(gt.strong),Yt.em&&ee.push(gt.em),Yt.strikethrough&&ee.push(gt.strikethrough),Yt.emoji&&ee.push(gt.emoji),Yt.linkText&&ee.push(gt.linkText),Yt.code&&ee.push(gt.code),Yt.image&&ee.push(gt.image),Yt.imageAltText&&ee.push(gt.imageAltText,"link"),Yt.imageMarker&&ee.push(gt.imageMarker)),Yt.header&&ee.push(gt.header,gt.header+"-"+Yt.header),Yt.quote&&(ee.push(gt.quote),!ot.maxBlockquoteDepth||ot.maxBlockquoteDepth>=Yt.quote?ee.push(gt.quote+"-"+Yt.quote):ee.push(gt.quote+"-"+ot.maxBlockquoteDepth)),Yt.list!==!1){var xe=(Yt.listStack.length-1)%3;xe?xe===1?ee.push(gt.list2):ee.push(gt.list3):ee.push(gt.list1)}return Yt.trailingSpaceNewLine?ee.push("trailing-space-new-line"):Yt.trailingSpace&&ee.push("trailing-space-"+(Yt.trailingSpace%2?"a":"b")),ee.length?ee.join(" "):null}function Nt(Yt,ee){if(Yt.match(ft,!0))return jt(ee)}function Gt(Yt,ee){var ye=ee.text(Yt,ee);if(typeof ye!="undefined")return ye;if(ee.list)return ee.list=null,jt(ee);if(ee.taskList){var xe=Yt.match(Tt,!0)[1]===" ";return xe?ee.taskOpen=!0:ee.taskClosed=!0,ot.highlightFormatting&&(ee.formatting="task"),ee.taskList=!1,jt(ee)}if(ee.taskOpen=!1,ee.taskClosed=!1,ee.header&&Yt.match(/^#+$/,!0))return ot.highlightFormatting&&(ee.formatting="header"),jt(ee);var be=Yt.next();if(ee.linkTitle){ee.linkTitle=!1;var ce=be;be==="("&&(ce=")"),ce=(ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pe="^\\s*(?:[^"+ce+"\\\\]+|\\\\\\\\|\\\\.)"+ce;if(Yt.match(new RegExp(pe),!0))return gt.linkHref}if(be==="`"){var he=ee.formatting;ot.highlightFormatting&&(ee.formatting="code"),Yt.eatWhile("`");var Ce=Yt.current().length;if(ee.code==0&&(!ee.quote||Ce==1))return ee.code=Ce,jt(ee);if(Ce==ee.code){var de=jt(ee);return ee.code=0,de}else return ee.formatting=he,jt(ee)}else if(ee.code)return jt(ee);if(be==="\\"&&(Yt.next(),ot.highlightFormatting)){var Fe=jt(ee),ge=gt.formatting+"-escape";return Fe?Fe+" "+ge:ge}if(be==="!"&&Yt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ee.imageMarker=!0,ee.image=!0,ot.highlightFormatting&&(ee.formatting="image"),jt(ee);if(be==="["&&ee.imageMarker&&Yt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ee.imageMarker=!1,ee.imageAltText=!0,ot.highlightFormatting&&(ee.formatting="image"),jt(ee);if(be==="]"&&ee.imageAltText){ot.highlightFormatting&&(ee.formatting="image");var Fe=jt(ee);return ee.imageAltText=!1,ee.image=!1,ee.inline=ee.f=Jt,Fe}if(be==="["&&!ee.image)return ee.linkText&&Yt.match(/^.*?\]/)||(ee.linkText=!0,ot.highlightFormatting&&(ee.formatting="link")),jt(ee);if(be==="]"&&ee.linkText){ot.highlightFormatting&&(ee.formatting="link");var Fe=jt(ee);return ee.linkText=!1,ee.inline=ee.f=Yt.match(/\(.*?\)| ?\[.*?\]/,!1)?Jt:Gt,Fe}if(be==="<"&&Yt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ee.f=ee.inline=Wt,ot.highlightFormatting&&(ee.formatting="link");var Fe=jt(ee);return Fe?Fe+=" ":Fe="",Fe+gt.linkInline}if(be==="<"&&Yt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ee.f=ee.inline=Wt,ot.highlightFormatting&&(ee.formatting="link");var Fe=jt(ee);return Fe?Fe+=" ":Fe="",Fe+gt.linkEmail}if(ot.xml&&be==="<"&&Yt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Se=Yt.string.indexOf(">",Yt.pos);if(Se!=-1){var re=Yt.string.substring(Yt.start,Se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(ee.md_inside=!0)}return Yt.backUp(1),ee.htmlState=ae.startState(_t),ut(Yt,ee,Dt)}if(ot.xml&&be==="<"&&Yt.match(/^\/\w*?>/))return ee.md_inside=!1,"tag";if(be==="*"||be==="_"){for(var Kt=1,wt=Yt.pos==1?" ":Yt.string.charAt(Yt.pos-2);Kt<3&&Yt.eat(be);)Kt++;var Lt=Yt.peek()||" ",Xt=!/\s/.test(Lt)&&(!at.test(Lt)||/\s/.test(wt)||at.test(wt)),ne=!/\s/.test(wt)&&(!at.test(wt)||/\s/.test(Lt)||at.test(Lt)),It=null,Rt=null;if(Kt%2&&(!ee.em&&Xt&&(be==="*"||!ne||at.test(wt))?It=!0:ee.em==be&&ne&&(be==="*"||!Xt||at.test(Lt))&&(It=!1)),Kt>1&&(!ee.strong&&Xt&&(be==="*"||!ne||at.test(wt))?Rt=!0:ee.strong==be&&ne&&(be==="*"||!Xt||at.test(Lt))&&(Rt=!1)),Rt!=null||It!=null){ot.highlightFormatting&&(ee.formatting=It==null?"strong":Rt==null?"em":"strong em"),It===!0&&(ee.em=be),Rt===!0&&(ee.strong=be);var de=jt(ee);return It===!1&&(ee.em=!1),Rt===!1&&(ee.strong=!1),de}}else if(be===" "&&(Yt.eat("*")||Yt.eat("_"))){if(Yt.peek()===" ")return jt(ee);Yt.backUp(1)}if(ot.strikethrough){if(be==="~"&&Yt.eatWhile(be)){if(ee.strikethrough){ot.highlightFormatting&&(ee.formatting="strikethrough");var de=jt(ee);return ee.strikethrough=!1,de}else if(Yt.match(/^[^\s]/,!1))return ee.strikethrough=!0,ot.highlightFormatting&&(ee.formatting="strikethrough"),jt(ee)}else if(be===" "&&Yt.match(/^~~/,!0)){if(Yt.peek()===" ")return jt(ee);Yt.backUp(2)}}if(ot.emoji&&be===":"&&Yt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ee.emoji=!0,ot.highlightFormatting&&(ee.formatting="emoji");var Vt=jt(ee);return ee.emoji=!1,Vt}return be===" "&&(Yt.match(/^ +$/,!1)?ee.trailingSpace++:ee.trailingSpace&&(ee.trailingSpaceNewLine=!0)),jt(ee)}function Wt(Yt,ee){var ye=Yt.next();if(ye===">"){ee.f=ee.inline=Gt,ot.highlightFormatting&&(ee.formatting="link");var xe=jt(ee);return xe?xe+=" ":xe="",xe+gt.linkInline}return Yt.match(/^[^>]+/,!0),gt.linkInline}function Jt(Yt,ee){if(Yt.eatSpace())return null;var ye=Yt.next();return ye==="("||ye==="["?(ee.f=ee.inline=Ht(ye==="("?")":"]"),ot.highlightFormatting&&(ee.formatting="link-string"),ee.linkHref=!0,jt(ee)):"error"}var Ut={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ht(Yt){return function(ee,ye){var xe=ee.next();if(xe===Yt){ye.f=ye.inline=Gt,ot.highlightFormatting&&(ye.formatting="link-string");var be=jt(ye);return ye.linkHref=!1,be}return ee.match(Ut[Yt]),ye.linkHref=!0,jt(ye)}}function oe(Yt,ee){return Yt.match(/^([^\]\\]|\\.)*\]:/,!1)?(ee.f=se,Yt.next(),ot.highlightFormatting&&(ee.formatting="link"),ee.linkText=!0,jt(ee)):lt(Yt,ee,Gt)}function se(Yt,ee){if(Yt.match(/^\]:/,!0)){ee.f=ee.inline=fe,ot.highlightFormatting&&(ee.formatting="link");var ye=jt(ee);return ee.linkText=!1,ye}return Yt.match(/^([^\]\\]|\\.)+/,!0),gt.linkText}function fe(Yt,ee){return Yt.eatSpace()?null:(Yt.match(/^[^\s]+/,!0),Yt.peek()===void 0?ee.linkTitle=!0:Yt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ee.f=ee.inline=Gt,gt.linkHref+" url")}var Pe={startState:function(){return{f:At,prevLine:{stream:null},thisLine:{stream:null},block:At,htmlState:null,indentation:0,inline:Gt,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(_t,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,ee){if(ee.formatting=!1,Yt!=ee.thisLine.stream){if(ee.header=0,ee.hr=!1,Yt.match(/^\s*$/,!0))return Pt(ee),null;if(ee.prevLine=ee.thisLine,ee.thisLine={stream:Yt},ee.taskList=!1,ee.trailingSpace=0,ee.trailingSpaceNewLine=!1,!ee.localState&&(ee.f=ee.block,ee.f!=Dt)){var ye=Yt.match(/^\s*/,!0)[0].replace(/\t/g,it).length;if(ee.indentation=ye,ee.indentationDiff=null,ye>0)return null}}return ee.f(Yt,ee)},innerMode:function(Yt){return Yt.block==Dt?{state:Yt.htmlState,mode:_t}:Yt.localState?{state:Yt.localState,mode:Yt.localMode}:{state:Yt,mode:Pe}},indent:function(Yt,ee,ye){return Yt.block==Dt&&_t.indent?_t.indent(Yt.htmlState,ee,ye):Yt.localState&&Yt.localMode.indent?Yt.localMode.indent(Yt.localState,ee,ye):ae.Pass},blankLine:Pt,getType:jt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Pe},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},98101:function(fn,cn,le){(function(ae){ae(le(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(_t){_t=_t.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.mime==_t)return vt;if(vt.mimes){for(var gt=0;gt<vt.mimes.length;gt++)if(vt.mimes[gt]==_t)return vt}}if(/\+xml$/.test(_t))return ae.findModeByMIME("application/xml");if(/\+json$/.test(_t))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(_t){_t=_t.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]==_t)return vt}}},ae.findModeByFileName=function(_t){for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.file&&vt.file.test(_t))return vt}var gt=_t.lastIndexOf("."),kt=gt>-1&&_t.substring(gt+1,_t.length);if(kt)return ae.findModeByExtension(kt)},ae.findModeByName=function(_t){_t=_t.toLowerCase();for(var Bt=0;Bt<ae.modeInfo.length;Bt++){var vt=ae.modeInfo[Bt];if(vt.name.toLowerCase()==_t)return vt;if(vt.alias){for(var gt=0;gt<vt.alias.length;gt++)if(vt.alias[gt].toLowerCase()==_t)return vt}}}})},67549:function(fn,cn,le){(function(ae){ae(le(89780))})(function(ae){"use strict";ae.defineMode("stex",function(Re,ot){"use strict";function _t(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 bt={};bt.importmodule=kt("importmodule","tag",["string","builtin"]),bt.documentclass=kt("documentclass","tag",["","atom"]),bt.usepackage=kt("usepackage","tag",["atom"]),bt.begin=kt("begin","tag",["atom"]),bt.end=kt("end","tag",["atom"]),bt.label=kt("label","tag",["atom"]),bt.ref=kt("ref","tag",["atom"]),bt.eqref=kt("eqref","tag",["atom"]),bt.cite=kt("cite","tag",["atom"]),bt.bibitem=kt("bibitem","tag",["atom"]),bt.Bibitem=kt("Bibitem","tag",["atom"]),bt.RBibitem=kt("RBibitem","tag",["atom"]),bt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function St(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=bt.hasOwnProperty(at)?bt[at]:bt.DEFAULT,tt=new tt,_t(z,tt),St(z,xt),tt.style}if(ft.match(/^\\[$&%#{}_]/)||ft.match(/^\\[,;!\/\\]/))return"tag";if(ft.match("\\["))return St(z,function(lt,ut){return mt(lt,ut,"\\]")}),"keyword";if(ft.match("\\("))return St(z,function(lt,ut){return mt(lt,ut,"\\)")}),"keyword";if(ft.match("$$"))return St(z,function(lt,ut){return mt(lt,ut,"$$")}),"keyword";if(ft.match("$"))return St(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),St(z,xt);else return"error";return"bracket"}else return it=="{"||it=="["?(tt=bt.DEFAULT,tt=new tt,_t(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 St(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),St(z,Tt),"bracket"):/[ \t\r]/.test(tt)?(ft.eat(tt),null):(St(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(fn,cn,le){(function(ae){ae(le(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(_t,Bt){var vt=_t.indentUnit,gt={},kt=Bt.htmlMode?Re:ot;for(var bt in kt)gt[bt]=kt[bt];for(var bt in Bt)gt[bt]=Bt[bt];var St,Tt;function mt(Wt,Jt){function Ut(se){return Jt.tokenize=se,se(Wt,Jt)}var Ht=Wt.next();if(Ht=="<")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"):(St=Wt.eat("/")?"closeTag":"openTag",Jt.tokenize=xt,"tag bracket");if(Ht=="&"){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,St=Ut==">"?"endTag":"selfcloseTag","tag bracket";if(Ut=="=")return St="equals",null;if(Ut=="<"){Jt.tokenize=mt,Jt.state=ut,Jt.tagName=Jt.tagStart=null;var Ht=Jt.tokenize(Wt,Jt);return Ht?Ht+" 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,Ht){for(;!Ut.eol();)if(Ut.next()==Wt){Ht.tokenize=xt;break}return"string"};return Jt.isInAttribute=!0,Jt}function z(Wt,Jt){return function(Ut,Ht){for(;!Ut.eol();){if(Ut.match(Jt)){Ht.tokenize=mt;break}Ut.next()}return Wt}}function tt(Wt){return function(Jt,Ut){for(var Ht;(Ht=Jt.next())!=null;){if(Ht=="<")return Ut.tokenize=tt(Wt+1),Ut.tokenize(Jt,Ut);if(Ht==">")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"?Pt: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 Pt(Wt,Jt,Ut){if(Wt=="word"){var Ht=Jt.current();return Ut.context&&Ut.context.tagName!=Ht&>.implicitlyClosed.hasOwnProperty(Ut.context.tagName)&&it(Ut),Ut.context&&Ut.context.tagName==Ht||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 Ht=Ut.tagName,oe=Ut.tagStart;return Ut.tagName=Ut.tagStart=null,Wt=="selfcloseTag"||gt.autoSelfClosers.hasOwnProperty(Ht)?lt(Ut,Ht):(lt(Ut,Ht),Ut.context=new at(Ut,Ht,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"?Gt:Wt=="word"&>.allowUnquoted?(Tt="string",Ft):(Tt="error",Ft(Wt,Jt,Ut))}function Gt(Wt,Jt,Ut){return Wt=="string"?Gt: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;St=null;var Ut=Jt.tokenize(Wt,Jt);return(Ut||St)&&Ut!="comment"&&(Tt=null,Jt.state=Jt.state(St||Ut,Wt,Jt),Tt&&(Ut=Tt=="error"?Ut+" error":Tt)),Ut},indent:function(Wt,Jt,Ut){var Ht=Wt.context;if(Wt.tokenize.isInAttribute)return Wt.tagStart==Wt.indented?Wt.stringStartCol+1:Wt.indented+vt;if(Ht&&Ht.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(;Ht;)if(Ht.tagName==oe[2]){Ht=Ht.prev;break}else if(gt.implicitlyClosed.hasOwnProperty(Ht.tagName))Ht=Ht.prev;else break;else if(oe)for(;Ht;){var se=gt.contextGrabbers[Ht.tagName];if(se&&se.hasOwnProperty(oe[2]))Ht=Ht.prev;else break}for(;Ht&&Ht.prev&&!Ht.startOfLine;)Ht=Ht.prev;return Ht?Ht.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(fn,cn,le){"use strict";le.d(cn,{$u:function(){return bt},BD:function(){return Kt},E9:function(){return kt},FF:function(){return Mr},FJ:function(){return ut},Hn:function(){return lt},KX:function(){return Pt},NB:function(){return me},S0:function(){return ge},UL:function(){return St},Vk:function(){return it},Vm:function(){return Ne},YI:function(){return Se},ZA:function(){return ot},Zt:function(){return Tt},al:function(){return It},bn:function(){return ne},bx:function(){return wt},g2:function(){return re},h1:function(){return Nt},hD:function(){return ln},l4:function(){return vt},rU:function(){return Le},s_:function(){return Lt},uz:function(){return ue},z6:function(){return mt}}),fn=le.hmd(fn),function(){var qt;function An(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Xn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:An(a)}}function In(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Un=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 ir;t:{var Lr={a:!0},Rr={};try{Rr.__proto__=Lr,ir=Rr.a;break t}catch(a){}ir=!1}Wn=ir?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ye=Wn;function tn(a,y){if(a.prototype=Un(y.prototype),a.prototype.constructor=a,Ye)Ye(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 Ze=typeof le.g!="undefined"&&le.g!=null?le.g:self,zn=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},Qn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Jn(a,y){if(y){var x=Ze;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&&Qn(x,a,{writable:!0,value:y})}}Jn("Object.assign",function(a){return a||zn}),Jn("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 bn=typeof globalThis=="object"&&globalThis||typeof le.g=="object"&&le.g.global===le.g&&le.g||typeof self=="object"&&self.self===self&&self||{};bn.requestAnimationFrame===void 0&&(bn.setImmediate===void 0?bn.requestAnimationFrame=function(a){bn.setTimeout(a,0)}:bn.requestAnimationFrame=bn.setImmediate);function Fn(){}function cr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&bn.clearTimeout(x),x=wr(function(){x=-1,a.apply(b,E)},y)}}function wr(a,y){return bn.setTimeout(a,y)}function Or(a){return bn.document.createElement(a)}function Ae(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),Ae(a)}function Mn(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),Ae(x+" is not in the range "+y+": "+a)}function jn(a){bn.console&&bn.console.log(a)}function en(a){return typeof a=="object"&&a!==null}function kn(a){return Array.isArray(a)||bn.NodeList&&a instanceof bn.NodeList||bn.HTMLCollection&&a instanceof bn.HTMLCollection}function Pn(a){return Array.prototype.slice.call(a)}function Ln(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ae("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function $n(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ae("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Nn(){var a=mi.pop();return a===void 0?[]:a}function Rn(a){a.length=0,mi.push(a)}function Bn(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(en(a)&&a.constructor)return Bn(a.constructor);return typeof a}function gr(a){var y=a;return en(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 ar(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 lr(a,y,x){Object.defineProperty(Oi.prototype,a,{get:y,set:x})}function sn(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 Kr=bn.navigator!==void 0&&0<bn.navigator.userAgent.indexOf("Trident/7"),Xr=bn.navigator!==void 0&&bn.navigator.platform!==void 0&&bn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,mi=[];Object.freeze([]),Fn.className="Util",Fn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Fn.adym="gojs.net",Fn.vfo="28e645fdb266",Fn.className="Util";function dn(a,y,x){oi(this),this.j=a,this.xa=y,this.o=x}dn.prototype.toString=function(){return"EnumValue."+this.xa};function On(a,y){return y==null||y===""?null:a[y]}Ze.Object.defineProperties(dn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),dn.className="EnumValue";function rr(){this.ew=[]}rr.prototype.toString=function(){return this.ew.join("")},rr.prototype.add=function(a){a!==""&&this.ew.push(a)},rr.className="StringBuilder";function er(){}er.className="PropertyCollection";var hr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){bn.console&&bn.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 Dr(){}Dr.prototype.reset=function(){},Dr.prototype.next=function(){return!1},Dr.prototype.Ad=function(){return!1},Dr.prototype.first=function(){return null},Dr.prototype.any=function(){return!1},Dr.prototype.all=function(){return!0},Dr.prototype.each=function(){return this},Dr.prototype.map=function(){return this},Dr.prototype.filter=function(){return this},Dr.prototype.de=function(){},Dr.prototype.toString=function(){return"EmptyIterator"},Ze.Object.defineProperties(Dr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Dr.prototype.first=Dr.prototype.first,Dr.prototype.hasNext=Dr.prototype.Ad,Dr.prototype.next=Dr.prototype.next,Dr.prototype.reset=Dr.prototype.reset;var Gr=null;Dr.className="EmptyIterator",Gr=new Dr;function Jr(a){this.key=-1,this.value=a}Jr.prototype.reset=function(){this.key=-1},Jr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Jr.prototype.Ad=function(){return this.next()},Jr.prototype.first=function(){return this.key=0,this.value},Jr.prototype.any=function(a){return this.key=-1,a(this.value)},Jr.prototype.all=function(a){return this.key=-1,a(this.value)},Jr.prototype.each=function(a){return this.key=-1,a(this.value),this},Jr.prototype.map=function(a){return new Jr(a(this.value))},Jr.prototype.filter=function(a){return a(this.value)?new Jr(this.value):Gr},Jr.prototype.de=function(){this.value=null},Jr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ze.Object.defineProperties(Jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Jr.prototype.first=Jr.prototype.first,Jr.prototype.hasNext=Jr.prototype.Ad,Jr.prototype.next=Jr.prototype.next,Jr.prototype.reset=Jr.prototype.reset,Jr.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},Ze.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 ii(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}ii.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},ii.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)},ii.prototype.Ad=function(){return this.next()},ii.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},ii.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},ii.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},ii.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},ii.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},ii.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},ii.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},ii.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ze.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="ListIteratorBackwards";function yn(a){oi(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ae("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=yn.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"List()#"+bi(this)},qt.add=function(a){return a===null?this:(this._isFrozen&&Ve(this,a),this.s.push(a),this.xb(),this)},qt.push=function(a){this.add(a)},qt.addAll=function(a){if(a===null)return this;this._isFrozen&&Ve(this);var y=this.s;if(kn(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},qt.clear=function(){this._isFrozen&&Ve(this),this.s.length=0,this.xb()},qt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},qt.has=function(a){return this.contains(a)},qt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},qt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Mn(a,"0 <= i < length",yn,"elt:i"),y[a]},qt.get=function(a){return this.M(a)},qt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Mn(a,"0 <= i < length",yn,"setElt:i"),this._isFrozen&&Ve(this,a),x[a]=y},qt.set=function(a,y){this.cd(a,y)},qt.first=function(){var a=this.s;return a.length===0?null:a[0]},qt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},qt.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},qt=yn.prototype,qt.Gb=function(a,y){0>a&&Mn(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()},qt.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)},qt.delete=function(a){return this.remove(a)},qt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Mn(a,"0 <= i < length",yn,"removeAt:i"),this._isFrozen&&Ve(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},qt.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},qt=yn.prototype,qt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},qt.Iv=function(){for(var a=new mn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},qt.sort=function(a){return this._isFrozen&&Ve(this),this.s.sort(a),this.xb(),this},qt.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)&&Mn(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},qt.reverse=function(){return this._isFrozen&&Ve(this),this.s.reverse(),this.xb(),this},Ze.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 Gr;var a=this.Sa;return a!==null?(a.reset(),a):new $r(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Gr;var a=this.Hg;return a!==null?(a.reset(),a):new ii(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 di(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}di.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},di.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)},di.prototype.Ad=function(){return this.next()},di.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},di.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},di.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},di.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},di.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},di.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},di.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},di.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ze.Object.defineProperties(di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),di.prototype.first=di.prototype.first,di.prototype.hasNext=di.prototype.Ad,di.prototype.next=di.prototype.next,di.prototype.reset=di.prototype.reset,di.className="SetIterator";function mn(a){oi(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ae("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=mn.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"Set()#"+bi(this)},qt.add=function(a){if(a===null)return this;this._isFrozen&&Ve(this,a);var y=a;return en(a)&&(y=Gi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new xo(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},qt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Ve(this),kn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},qt.contains=function(a){if(a===null)return!1;var y=a;return en(a)&&(y=bi(a),y===void 0)?!1:this.Tb[y]!==void 0},qt.has=function(a){return this.contains(a)},qt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},qt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},qt.first=function(){var a=this.ea;return a===null?null:a.value},mn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},mn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},mn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},mn.prototype.map=function(a){for(var y=new mn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},mn.prototype.filter=function(a){for(var y=new mn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},qt=mn.prototype,qt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ve(this,a);var y=a;if(en(a)&&(y=bi(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},qt.delete=function(a){return this.remove(a)},qt.hp=function(a){if(a===null)return this;if(this._isFrozen&&Ve(this),kn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},qt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Ve(this);var y=new mn;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},qt.clear=function(){this._isFrozen&&Ve(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},mn.prototype.copy=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},mn.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},mn.prototype.Hv=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function oi(a){a.__gohashid=Ai++}function Gi(a){var y=a.__gohashid;return y===void 0&&(y=Ai++,a.__gohashid=y),y}function bi(a){return a.__gohashid}Ze.Object.defineProperties(mn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Gr;var a=this.Sa;return a!==null?(a.reset(),a):new di(this)}}}),mn.prototype.toList=mn.prototype.Hv,mn.prototype.toArray=mn.prototype.Fa,mn.prototype.clear=mn.prototype.clear,mn.prototype.retainAll=mn.prototype.pA,mn.prototype.removeAll=mn.prototype.hp,mn.prototype.delete=mn.prototype.delete,mn.prototype.remove=mn.prototype.remove,mn.prototype.first=mn.prototype.first,mn.prototype.containsAny=mn.prototype.Ty,mn.prototype.containsAll=mn.prototype.Sy,mn.prototype.has=mn.prototype.has,mn.prototype.contains=mn.prototype.contains,mn.prototype.addAll=mn.prototype.addAll,mn.prototype.add=mn.prototype.add,mn.prototype.thaw=mn.prototype.ka,mn.prototype.freeze=mn.prototype.freeze;var Ai=1;mn.className="Set",mn.uniqueHash=oi,mn.hashIdUnique=Gi,mn.hashId=bi;function ai(a){this.ma=a,this.qa=a.Ja,this.sa=null}ai.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ai.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)},ai.prototype.Ad=function(){return this.next()},ai.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},ai.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},ai.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},ai.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},ai.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},ai.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},ai.prototype.de=function(){this.value=this.key=null,this.qa=-1},ai.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ze.Object.defineProperties(ai.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ai.prototype.first=ai.prototype.first,ai.prototype.hasNext=ai.prototype.Ad,ai.prototype.next=ai.prototype.next,ai.prototype.reset=ai.prototype.reset,ai.className="MapKeySetIterator";function _r(a){mn.call(this),oi(this),this._isFrozen=!0,this.ma=a}tn(_r,mn),qt=_r.prototype,qt.freeze=function(){return this},qt.ka=function(){return this},qt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},qt.add=function(){Ae("This Set is read-only: "+this.toString())},qt.contains=function(a){return this.ma.contains(a)},qt.has=function(a){return this.contains(a)},qt.remove=function(){Ae("This Set is read-only: "+this.toString())},qt.delete=function(a){return this.remove(a)},qt.clear=function(){Ae("This Set is read-only: "+this.toString())},qt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},_r.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},_r.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},_r.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},_r.prototype.map=function(a){for(var y=new mn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},_r.prototype.filter=function(a){for(var y=new mn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},_r.prototype.copy=function(){return new _r(this.ma)},_r.prototype.Iv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},_r.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},_r.prototype.Hv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ze.Object.defineProperties(_r.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Gr:new ai(this.ma)}}}),_r.prototype.toList=_r.prototype.Hv,_r.prototype.toArray=_r.prototype.Fa,_r.prototype.toSet=_r.prototype.Iv,_r.prototype.first=_r.prototype.first,_r.prototype.clear=_r.prototype.clear,_r.prototype.delete=_r.prototype.delete,_r.prototype.remove=_r.prototype.remove,_r.prototype.has=_r.prototype.has,_r.prototype.contains=_r.prototype.contains,_r.prototype.add=_r.prototype.add,_r.prototype.thaw=_r.prototype.ka,_r.prototype.freeze=_r.prototype.freeze,_r.className="MapKeySet";function vi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}vi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},vi.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)},vi.prototype.Ad=function(){return this.next()},vi.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},vi.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},vi.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},vi.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},vi.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},vi.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},vi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},vi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ze.Object.defineProperties(vi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),vi.prototype.first=vi.prototype.first,vi.prototype.hasNext=vi.prototype.Ad,vi.prototype.next=vi.prototype.next,vi.prototype.reset=vi.prototype.reset,vi.className="MapValueSetIterator";function xo(a,y){this.key=a,this.value=y,this.ll=this.va=null}xo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},xo.className="KeyValuePair";function Fi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Fi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Fi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Fi.prototype.Ad=function(){return this.next()},Fi.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Fi.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},Fi.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},Fi.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},Fi.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},Fi.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},Fi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Fi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ze.Object.defineProperties(Fi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Fi.prototype.first=Fi.prototype.first,Fi.prototype.hasNext=Fi.prototype.Ad,Fi.prototype.next=Fi.prototype.next,Fi.prototype.reset=Fi.prototype.reset,Fi.className="MapIterator";function qn(a){oi(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"&&Ae("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}qt=qn.prototype,qt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.toString=function(){return"Map()#"+bi(this)},qt.add=function(a,y){this._isFrozen&&Ve(this,a);var x=a;en(a)&&(x=Gi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new xo(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},qt.set=function(a,y){return this.add(a,y)},qt.addAll=function(a){if(a===null)return this;if(kn(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 qn)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},qt.first=function(){return this.ea},qn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},qn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},qn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},qn.prototype.map=function(a){for(var y=new qn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},qn.prototype.filter=function(a){for(var y=new qn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},qt=qn.prototype,qt.contains=function(a){var y=a;return en(a)&&(y=bi(a),y===void 0)?!1:this.Tb[y]!==void 0},qt.has=function(a){return this.contains(a)},qt.I=function(a){var y=a;return en(a)&&(y=bi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},qt.get=function(a){return this.I(a)},qt.remove=function(a){if(a===null)return!1;this._isFrozen&&Ve(this,a);var y=a;if(en(a)&&(y=bi(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},qt.delete=function(a){return this.remove(a)},qt.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()},qn.prototype.copy=function(){var a=new qn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},qn.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 xo(E.key,E.value),x++}return y},qn.prototype.Lf=function(){return new _r(this)},Ze.Object.defineProperties(qn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Gr;var a=this.Sa;return a!==null?(a.reset(),a):new Fi(this)}},iteratorKeys:{get:function(){return 0>=this.count?Gr:new ai(this)}},iteratorValues:{get:function(){if(0>=this.count)return Gr;var a=this.jf;return a!==null?(a.reset(),a):new vi(this)}}}),qn.prototype.toKeySet=qn.prototype.Lf,qn.prototype.toArray=qn.prototype.Fa,qn.prototype.clear=qn.prototype.clear,qn.prototype.delete=qn.prototype.delete,qn.prototype.remove=qn.prototype.remove,qn.prototype.get=qn.prototype.get,qn.prototype.getValue=qn.prototype.I,qn.prototype.has=qn.prototype.has,qn.prototype.contains=qn.prototype.contains,qn.prototype.first=qn.prototype.first,qn.prototype.addAll=qn.prototype.addAll,qn.prototype.set=qn.prototype.set,qn.prototype.add=qn.prototype.add,qn.prototype.thaw=qn.prototype.ka,qn.prototype.freeze=qn.prototype.freeze,qn.className="Map";function Me(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ae("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var zi,Ui,Qi,Xi,pi;Me.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Me.prototype.h=function(a,y){return this.x=a,this.y=y,this},Me.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Me.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Me.prototype.copy=function(){var a=new Me;return a.x=this.x,a.y=this.y,a},qt=Me.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this};function sr(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 Me(x,E)}return new Me}function yr(a){return a.x.toString()+" "+a.y.toString()}qt.toString=function(){return"Point("+this.x+","+this.y+")"},qt.D=function(a){return a instanceof Me?this.x===a.x&&this.y===a.y:!1},qt.hi=function(a,y){return this.x===a&&this.y===y},qt.Xa=function(a){return Ge.B(this.x,a.x)&&Ge.B(this.y,a.y)},qt.add=function(a){return this.x+=a.x,this.y+=a.y,this},qt.re=function(a){return this.x-=a.x,this.y-=a.y,this},qt.offset=function(a,y){return this.x+=a,this.y+=y,this},Me.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},qt=Me.prototype,qt.scale=function(a,y){return this.x*=a,this.y*=y,this},qt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},qt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},qt.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},qt.ab=function(a){return Qr(a.x-this.x,a.y-this.y)},qt.direction=function(a,y){return Qr(a-this.x,y-this.y)};function Qr(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}qt.Ry=function(a,y){return Ge.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},qt.fA=function(a,y,x,b){return Ge.qh(a,y,x,b,this.x,this.y,this),this},qt.gA=function(a,y){return Ge.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},qt.uA=function(a,y,x,b){return Ge.No(this.x,this.y,a,y,x,b,this),this},qt.vA=function(a,y){return Ge.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},qt.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},qt.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},qt.transform=function(a){return a.Ga(this),this};function mr(a,y){return y.Cd(a),a}function Vr(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 Mi(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function kr(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)}qt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Me.alloc=function(){var a=ur.pop();return a===void 0?new Me:a},Me.allocAt=function(a,y){var x=ur.pop();return x===void 0?new Me(a,y):(x.x=a,x.y=y,x)},Me.free=function(a){ur.push(a)},Me.prototype.isReal=Me.prototype.w,Me.prototype.setSpot=Me.prototype.yi,Me.prototype.setRectSpot=Me.prototype.xi,Me.prototype.snapToGridPoint=Me.prototype.vA,Me.prototype.snapToGrid=Me.prototype.uA,Me.prototype.projectOntoLineSegmentPoint=Me.prototype.gA,Me.prototype.projectOntoLineSegment=Me.prototype.fA,Me.intersectingLineSegments=function(a,y,x,b,E,et,nt,st){return Ge.Rl(a,y,x,b,E,et,nt,st)},Me.prototype.compareWithLineSegmentPoint=Me.prototype.Ry,Me.compareWithLineSegment=function(a,y,x,b,E,et){return Ge.Fl(a,y,x,b,E,et)},Me.prototype.direction=Me.prototype.direction,Me.prototype.directionPoint=Me.prototype.ab,Me.prototype.normalize=Me.prototype.normalize,Me.prototype.distanceSquared=Me.prototype.zd,Me.prototype.distanceSquaredPoint=Me.prototype.Bf,Me.prototype.scale=Me.prototype.scale,Me.prototype.rotate=Me.prototype.rotate,Me.prototype.offset=Me.prototype.offset,Me.prototype.subtract=Me.prototype.re,Me.prototype.add=Me.prototype.add,Me.prototype.equalsApprox=Me.prototype.Xa,Me.prototype.equalTo=Me.prototype.hi,Me.prototype.equals=Me.prototype.D,Me.prototype.set=Me.prototype.set,Me.prototype.setTo=Me.prototype.sg;var ur=[];Me.className="Point",Me.parse=sr,Me.stringify=yr,Me.distanceLineSegmentSquared=Vr,Me.distanceSquared=Mi,Me.direction=kr,Me.Origin=zi=new Me(0,0).ja(),Me.InfiniteTopLeft=Ui=new Me(-1/0,-1/0).ja(),Me.InfiniteBottomRight=Qi=new Me(1/0,1/0).ja(),Me.SixPoint=Xi=new Me(6,6).ja(),Me.NoPoint=pi=new Me(NaN,NaN).ja(),Me.parse=sr,Me.stringify=yr,Me.distanceLineSegmentSquared=Vr,Me.distanceSquared=Mi,Me.direction=kr;function Cn(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):Ae("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ar,ci,Wi,Ei,qi,wo,to;Cn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Cn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Cn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Cn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Cn.prototype.copy=function(){var a=new Cn;return a.width=this.width,a.height=this.height,a},qt=Cn.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this};function To(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Cn(x,E)}return new Cn}function bo(a){return a.width.toString()+" "+a.height.toString()}qt.toString=function(){return"Size("+this.width+","+this.height+")"},qt.D=function(a){return a instanceof Cn?this.width===a.width&&this.height===a.height:!1},qt.hi=function(a,y){return this.width===a&&this.height===y},qt.Xa=function(a){return Ge.B(this.width,a.width)&&Ge.B(this.height,a.height)},qt.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},qt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Cn.alloc=function(){var a=jo.pop();return a===void 0?new Cn:a},Cn.free=function(a){jo.push(a)},Cn.prototype.isReal=Cn.prototype.w,Cn.prototype.inflate=Cn.prototype.Bc,Cn.prototype.equalsApprox=Cn.prototype.Xa,Cn.prototype.equalTo=Cn.prototype.hi,Cn.prototype.equals=Cn.prototype.D,Cn.prototype.set=Cn.prototype.set,Cn.prototype.setTo=Cn.prototype.sg;var jo=[];Cn.className="Size",Cn.parse=To,Cn.stringify=bo,Cn.ZeroSize=Ar=new Cn(0,0).ja(),Cn.OneSize=ci=new Cn(1,1).ja(),Cn.SixSize=Wi=new Cn(6,6).ja(),Cn.EightSize=Ei=new Cn(8,8).ja(),Cn.TenSize=qi=new Cn(10,10).ja(),Cn.InfiniteSize=wo=new Cn(1/0,1/0).ja(),Cn.NoSize=to=new Cn(NaN,NaN).ja(),Cn.parse=To,Cn.stringify=bo;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 Me?(x=a.x,a=a.y,y instanceof Me?(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 Cn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ae("Incorrect second argument supplied to Rect constructor "+y)):Ae("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}qt=on.prototype,qt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Wo(a,y,x){a.width=y,a.height=x}qt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},qt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},qt.dd=function(a){return this.x=a.x,this.y=a.y,this},qt.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},qt=on.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this};function Js(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var 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 ia(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}qt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},qt.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},qt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},qt.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 ja(a,y){return Ge.$(a.x,y.x)&&Ge.$(a.y,y.y)&&Ge.$(a.width,y.width)&&Ge.$(a.height,y.height)}qt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},qt.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},qt.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},qt.offset=function(a,y){return this.x+=a,this.y+=y,this},qt.Bc=function(a,y){return so(this,y,a,y,a)},qt.Co=function(a){return so(this,a.top,a.right,a.bottom,a.left)},qt.Fv=function(a){return so(this,-a.top,-a.right,-a.bottom,-a.left)},qt.Hz=function(a,y,x,b){return so(this,a,y,x,b)};function so(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}qt.Ex=function(a){return ls(this,a.x,a.y,a.width,a.height)},qt.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}qt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},qt.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 zl(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))}qt.Ye=function(a){return Ti(this,a.x,a.y,0,0)},qt.ed=function(a){return Ti(this,a.x,a.y,a.width,a.height)},qt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Ti(this,a,y,x,b)};function Ti(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}qt.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 Go(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 El(a,y,x,b,E,et,nt,st){return a>nt+E||E>x+a?!1:!(y>st+et||et>b+y)}qt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},qt.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)},Ze.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 Me(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Cn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Me(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 pa=null,uu=null,xs=[];on.className="Rect",on.parse=Js,on.stringify=ia,on.contains=Go,on.intersects=El,on.ZeroRect=pa=new on(0,0,0,0).ja(),on.NoRect=uu=new on(NaN,NaN,NaN,NaN).ja(),on.parse=Js,on.stringify=ia,on.contains=Go,on.intersects=El;function Br(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):Ae("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Br.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Br.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.copy=function(){var a=new Br;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},qt=Br.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Ae("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 Br;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Br(x);for(var et=NaN;a[y]==="";)y++;if((b=a[y++])&&(et=parseFloat(b)),isNaN(et))return new Br(x,E);for(var nt=NaN;a[y]==="";)y++;return(b=a[y++])&&(nt=parseFloat(b)),isNaN(nt)?new Br(x,E):new Br(x,E,et,nt)}return new Br}function hu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}qt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},qt.D=function(a){return a instanceof Br?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},qt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},qt.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)},qt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Br.alloc=function(){var a=Nu.pop();return a===void 0?new Br:a},Br.free=function(a){Nu.push(a)},Br.prototype.isReal=Br.prototype.w,Br.prototype.equalsApprox=Br.prototype.Xa,Br.prototype.equalTo=Br.prototype.hi,Br.prototype.equals=Br.prototype.D,Br.prototype.set=Br.prototype.set,Br.prototype.setTo=Br.prototype.sg;var us=null,Jo=null,Nu=[];Br.className="Margin",Br.parse=Gl,Br.stringify=hu,Br.ZeroMargin=us=new Br(0,0,0,0).ja(),Br.TwoMargin=Jo=new Br(2,2,2,2).ja(),Br.parse=Gl,Br.stringify=hu;function nr(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 Wr,ni,si,gi,Ki,Ir,ws,oa,Ho,lo,Ja,bs,Oa,Ps,Ml,Qs,ju,Xc,sc,dl,Ul,Is,lc,uc,Yc,Oo,Wf,hc,Ou,Fu,ga,Fa,Qo,aa,cc,Du;nr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},nr.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},nr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},nr.prototype.copy=function(){var a=new nr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},qt=nr.prototype,qt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},qt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this};function mo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Hi(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Wr;if(a==="TopLeft")return ni;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return si;if(a==="TopRight")return gi;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Ki;if(a==="Center")return Ir;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ws;if(a==="BottomLeft")return oa;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ho;if(a==="BottomRight")return lo;if(a==="TopSide")return Ja;if(a==="LeftSide")return bs;if(a==="RightSide")return Oa;if(a==="BottomSide")return Ps;if(a==="TopBottomSides")return Ml;if(a==="LeftRightSides")return Qs;if(a==="TopLeftSides")return ju;if(a==="TopRightSides")return Xc;if(a==="BottomLeftSides")return sc;if(a==="BottomRightSides")return dl;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 Oo;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 nr(x,E,et,nt)}return new nr}function Ni(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}qt.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(Wr)?"None":this.D(ni)?"TopLeft":this.D(si)?"Top":this.D(gi)?"TopRight":this.D(Ki)?"Left":this.D(Ir)?"Center":this.D(ws)?"Right":this.D(oa)?"BottomLeft":this.D(Ho)?"Bottom":this.D(lo)?"BottomRight":this.D(Ja)?"TopSide":this.D(bs)?"LeftSide":this.D(Oa)?"RightSide":this.D(Ps)?"BottomSide":this.D(Ml)?"TopBottomSides":this.D(Qs)?"LeftRightSides":this.D(ju)?"TopLeftSides":this.D(Xc)?"TopRightSides":this.D(sc)?"BottomLeftSides":this.D(dl)?"BottomRightSides":this.D(Ul)?"NotTopSide":this.D(Is)?"NotLeftSide":this.D(lc)?"NotRightSide":this.D(uc)?"NotBottomSide":this.D(Yc)?"AllSides":this.D(Oo)?"Default":"None"},qt.D=function(a){return a instanceof nr?(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},qt.gv=function(){return new nr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},qt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Wf))a=bs;else if(a.D(hc))a=Oa;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},qt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},qt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},qt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},qt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},qt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},nr.alloc=function(){var a=Da.pop();return a===void 0?new nr:a},nr.free=function(a){Da.push(a)},nr.prototype.isDefault=nr.prototype.Xb,nr.prototype.isNone=nr.prototype.ys,nr.prototype.isSide=nr.prototype.$c,nr.prototype.isNoSpot=nr.prototype.Mc,nr.prototype.isSpot=nr.prototype.sb,nr.prototype.includesSide=nr.prototype.Hf,nr.prototype.opposite=nr.prototype.gv,nr.prototype.equals=nr.prototype.D,nr.prototype.set=nr.prototype.set,nr.prototype.setTo=nr.prototype.sg;var Da=[];nr.className="Spot",nr.parse=Hi,nr.stringify=Ni,nr.None=Wr=mo(new nr(0,0,0,0),0).ja(),nr.Default=Oo=mo(new nr(0,0,-1,0),-1).ja(),nr.TopLeft=ni=new nr(0,0,0,0).ja(),nr.TopCenter=si=new nr(.5,0,0,0).ja(),nr.TopRight=gi=new nr(1,0,0,0).ja(),nr.LeftCenter=Ki=new nr(0,.5,0,0).ja(),nr.Center=Ir=new nr(.5,.5,0,0).ja(),nr.RightCenter=ws=new nr(1,.5,0,0).ja(),nr.BottomLeft=oa=new nr(0,1,0,0).ja(),nr.BottomCenter=Ho=new nr(.5,1,0,0).ja(),nr.BottomRight=lo=new nr(1,1,0,0).ja(),nr.MiddleTop=ga=si,nr.MiddleLeft=Fa=Ki,nr.MiddleRight=Qo=ws,nr.MiddleBottom=aa=Ho,nr.Top=Ou=si,nr.Left=Wf=Ki,nr.Right=hc=ws,nr.Bottom=Fu=Ho,nr.TopSide=Ja=mo(new nr(0,0,1,1),1).ja(),nr.LeftSide=bs=mo(new nr(0,0,1,2),1).ja(),nr.RightSide=Oa=mo(new nr(0,0,1,4),1).ja(),nr.BottomSide=Ps=mo(new nr(0,0,1,8),1).ja(),nr.TopBottomSides=Ml=mo(new nr(0,0,1,9),1).ja(),nr.LeftRightSides=Qs=mo(new nr(0,0,1,6),1).ja(),nr.TopLeftSides=ju=mo(new nr(0,0,1,3),1).ja(),nr.TopRightSides=Xc=mo(new nr(0,0,1,5),1).ja(),nr.BottomLeftSides=sc=mo(new nr(0,0,1,10),1).ja(),nr.BottomRightSides=dl=mo(new nr(0,0,1,12),1).ja(),nr.NotTopSide=Ul=mo(new nr(0,0,1,14),1).ja(),nr.NotLeftSide=Is=mo(new nr(0,0,1,13),1).ja(),nr.NotRightSide=lc=mo(new nr(0,0,1,11),1).ja(),nr.NotBottomSide=uc=mo(new nr(0,0,1,7),1).ja(),nr.AllSides=Yc=mo(new nr(0,0,1,15),1).ja(),cc=new nr(.156,.156).ja(),Du=new nr(.844,.844).ja(),nr.parse=Hi,nr.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},qt=Sr.prototype,qt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},qt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},qt.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)},qt.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))},qt.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))},qt.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,yt=this.dy,Mt=y*et+x*st+pt,zt=y*nt+x*ht+yt,Zt=b*et+x*st+pt,Qt=b*nt+x*ht+yt;return x=y*et+E*st+pt,y=y*nt+E*ht+yt,et=b*et+E*st+pt,b=b*nt+E*ht+yt,E=Math.min(Mt,Zt),Mt=Math.max(Mt,Zt),Zt=Math.min(zt,Qt),zt=Math.max(zt,Qt),E=Math.min(E,x),Mt=Math.max(Mt,x),Zt=Math.min(Zt,y),zt=Math.max(zt,y),E=Math.min(E,et),Mt=Math.max(Mt,et),Zt=Math.min(Zt,b),zt=Math.max(zt,b),a.h(E,Zt,Mt-E,zt-Zt),a},Sr.alloc=function(){var a=$o.pop();return a===void 0?new Sr:a},Sr.free=function(a){$o.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 $o=[];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,yt=b;else pt=b,yt=y;if(a===x)return pt<=nt&&nt<=yt&&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&&(yt+=E,pt-=E,pt<=nt&&nt<=yt))if(ht-st>yt-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,yt,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,yt);var zt=(a+x)/2,Zt=(y+b)/2,Qt=(x+E)/2,ie=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(zt+Qt)/2,x=(Zt+ie)/2,Qt=(Qt+E)/2,ie=(ie+et)/2;var Ee=(b+Qt)/2,we=(x+ie)/2;return Ge.cs(a,y,zt,Zt,b,x,Ee,we,ht,pt,yt,Mt)||Ge.cs(Ee,we,Qt,ie,E,et,nt,st,ht,pt,yt,Mt)},ax:function(a,y,x,b,E,et,nt,st,ht){var pt=(x+E)/2,yt=(b+et)/2;return ht.h((((a+x)/2+pt)/2+(pt+(E+nt)/2)/2)/2,(((y+b)/2+yt)/2+(yt+(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 kr(((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))Ti(pt,a,y,0,0),Ti(pt,nt,st,0,0);else{var yt=(a+x)/2,Mt=(y+b)/2,zt=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+zt)/2,x=(Mt+Zt)/2,zt=(zt+E)/2,Zt=(Zt+et)/2;var Qt=(b+zt)/2,ie=(x+Zt)/2;Ge.Dl(a,y,yt,Mt,b,x,Qt,ie,ht,pt),Ge.Dl(Qt,ie,zt,Zt,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 yt=(a+x)/2,Mt=(y+b)/2,zt=(x+E)/2,Zt=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(yt+zt)/2,x=(Mt+Zt)/2,zt=(zt+E)/2,Zt=(Zt+et)/2;var Qt=(b+zt)/2,ie=(x+Zt)/2;Ge.Qe(a,y,yt,Mt,b,x,Qt,ie,ht,pt),Ge.Qe(Qt,ie,zt,Zt,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 yt=(a+x)/2,Mt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var zt=(yt+x)/2,Zt=(Mt+b)/2;return Ge.jv(a,y,yt,Mt,zt,Zt,nt,st,ht,pt)||Ge.jv(zt,Zt,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))Ti(st,a,y,0,0),Ti(st,E,et,0,0);else{var ht=(a+x)/2,pt=(y+b)/2;x=(x+E)/2,b=(b+et)/2;var yt=(ht+x)/2,Mt=(pt+b)/2;Ge.iv(a,y,ht,pt,yt,Mt,nt,st),Ge.iv(yt,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 yt=(ht+x)/2,Mt=(pt+b)/2;Ge.ep(a,y,ht,pt,yt,Mt,nt,st),Ge.ep(yt,Mt,x,b,E,et,nt,st)}return st},Eo:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt,zt,Zt){if(Ge.Yb(a,y,nt,st,zt,x,b)&&Ge.Yb(a,y,nt,st,zt,E,et))return!Ge.Rl(a,y,nt,st,ht,pt,yt,Mt)||(zt=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),zt===0)?!1:(Zt.h(((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/zt,((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/zt),!0);var Qt=(a+x)/2,ie=(y+b)/2,Ee=(x+E)/2,we=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Ee)/2,x=(ie+we)/2,Ee=(Ee+E)/2,we=(we+et)/2;var je=(b+Ee)/2,Oe=(x+we)/2,De=1/0,_e=!1,Je=0,En=0;return Ge.Eo(a,y,Qt,ie,b,x,je,Oe,ht,pt,yt,Mt,zt,Zt)&&(a=(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt),a<De&&(De=a,_e=!0,Je=Zt.x,En=Zt.y)),Ge.Eo(je,Oe,Ee,we,E,et,nt,st,ht,pt,yt,Mt,zt,Zt)&&(Zt.x-ht)*(Zt.x-ht)+(Zt.y-pt)*(Zt.y-pt)<De&&(_e=!0,Je=Zt.x,En=Zt.y),_e&&(Zt.x=Je,Zt.y=En),_e},Fo:function(a,y,x,b,E,et,nt,st,ht,pt,yt,Mt,zt){var Zt=0;if(Ge.Yb(a,y,nt,st,zt,x,b)&&Ge.Yb(a,y,nt,st,zt,E,et)){if(zt=(a-nt)*(pt-Mt)-(y-st)*(ht-yt),zt===0)return Zt;var Qt=((a*st-y*nt)*(ht-yt)-(a-nt)*(ht*Mt-pt*yt))/zt,ie=((a*st-y*nt)*(pt-Mt)-(y-st)*(ht*Mt-pt*yt))/zt;if(Qt>=yt)return Zt;if((ht>yt?ht-yt:yt-ht)<(pt>Mt?pt-Mt:Mt-pt)){if(y<st?(ht=y,a=st):(ht=st,a=y),ie<ht||ie>a)return Zt}else if(a<nt?(ht=a,a=nt):ht=nt,Qt<ht||Qt>a)return Zt;0<zt?Zt++:0>zt&&Zt--}else{Qt=(a+x)/2,ie=(y+b)/2;var Ee=(x+E)/2,we=(b+et)/2;E=(E+nt)/2,et=(et+st)/2,b=(Qt+Ee)/2,x=(ie+we)/2,Ee=(Ee+E)/2,we=(we+et)/2;var je=(b+Ee)/2,Oe=(x+we)/2;Zt+=Ge.Fo(a,y,Qt,ie,b,x,je,Oe,ht,pt,yt,Mt,zt),Zt+=Ge.Fo(je,Oe,Ee,we,E,et,nt,st,ht,pt,yt,Mt,zt)}return Zt},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 yt(Ee,we){var je=(Ee-a)*(Ee-a)+(we-y)*(we-y);je<Mt&&(Mt=je,ht.h(Ee,we))}var Mt=1/0;yt(ht.x,ht.y);var zt=0,Zt=0,Qt=0,ie=0;if(E<nt?(zt=E,Zt=nt):(zt=nt,Zt=E),et<st?(Qt=E,ie=nt):(Qt=nt,ie=E),zt=(Zt-zt)/2+pt,pt=(ie-Qt)/2+pt,E=(E+nt)/2,et=(et+st)/2,zt===0||pt===0)return ht;if(.5>(x>a?x-a:a-x)){if(zt=1-(x-E)*(x-E)/(zt*zt),0>zt)return ht;zt=Math.sqrt(zt),b=-pt*zt+et,yt(x,pt*zt+et),yt(x,b)}else{if(x=(b-y)/(x-a),b=1/(zt*zt)+x*x/(pt*pt),st=2*x*(y-x*a)/(pt*pt)-2*x*et/(pt*pt)-2*E/(zt*zt),zt=st*st-4*b*(2*x*a*et/(pt*pt)-2*y*et/(pt*pt)+et*et/(pt*pt)+E*E/(zt*zt)-1+(y-x*a)*(y-x*a)/(pt*pt)),0>zt)return ht;zt=Math.sqrt(zt),pt=(-st+zt)/(2*b),yt(pt,x*pt-x*a+y),zt=(-st-zt)/(2*b),yt(zt,x*zt-x*a+y)}return ht},Ff:function(a,y,x,b,E,et,nt,st,ht){var pt=1e21,yt=a,Mt=y;if(Ge.Ve(a,y,a,b,E,et,nt,st,ht)){var zt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et);zt<pt&&(pt=zt,yt=ht.x,Mt=ht.y)}return Ge.Ve(x,y,x,b,E,et,nt,st,ht)&&(zt=(ht.x-E)*(ht.x-E)+(ht.y-et)*(ht.y-et),zt<pt&&(pt=zt,yt=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,yt=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,yt=ht.x,Mt=ht.y)),ht.h(yt,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):!!(Go(a,y,x,b,E,et)||Go(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,yt=pt+nt*nt+ht*st;return pt=4/3*(Math.sqrt(2*pt*yt)-yt)/(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 yt=a/(y+E),Mt=nt/(y+et);if(yt=yt*yt+Mt*Mt-1,0<yt)st=y;else if(0>yt)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 er,um:new er,Mf:new er,Nf:0,vm:100};Ge.za=Ge.AA;function xn(a){oi(this),this.l=2,a===void 0&&(a=xn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===xn.o?this.ee=new yn:(xn.V===null&&(xn.V=new yn().freeze()),this.ee=xn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=ni,this.gg=lo,this.Rk=this.Sk=NaN,this.Uf=pn}xn.prototype.copy=function(){var a=new xn;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===xn.o){for(var y=this.ee.s,x=a.ee,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},xn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},xn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==xn.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},xn.prototype.ka=function(){if(Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==xn.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},xn.prototype.Xa=function(a){if(!(a instanceof xn))return!1;if(this.type!==a.type)return this.type===xn.j&&a.type===xn.o?$s(this,a):a.type===xn.j&&this.type===xn.o?$s(a,this):!1;if(this.type===xn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var 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!==xn.j||y.type!==xn.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===Pi&&Ge.B(a.endX,y.endX)&&Ge.B(a.endY,y.endY))))}xn.ia=function(a){return a.toString()},xn.prototype.qb=function(a){a.classType===xn&&(this.type=a)},xn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case xn.j:return 0>a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case xn.u:var y=new 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 xn.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 xn.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()}},xn.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},xn.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(xr){var fr=parseFloat(b()),ri=parseFloat(b());Ee===Ee.toLowerCase()&&(fr=Oe.x+fr,ri=Oe.y+ri),xr.h(fr,ri)}function et(){return E(Oe),Oe}function nt(){return E(je),je}function st(){var xr=we.toLowerCase();return xr!=="c"&&xr!=="s"&&xr!=="q"&&xr!=="t"?Oe:new Me(2*Oe.x-je.x,2*Oe.y-je.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 yt=pt[a];if(yt.match(/(\.[0-9]*)(\.)/gm)!==null){ht=Nn();for(var Mt="",zt=!1,Zt=0;Zt<yt.length;Zt++){var Qt=yt[Zt];Qt!=="."||zt?Qt==="."?(ht.push(Mt),Mt="."):Mt+=Qt:(zt=!0,Mt+=Qt)}for(ht.push(Mt),pt.splice(a,1),yt=0;yt<ht.length;yt++)pt.splice(a+yt,0,ht[yt]);a+=ht.length-1,Rn(ht)}}var ie=-1,Ee="",we="";ht=new Me(0,0);var je=new Me(0,0),Oe=new Me(0,0),De=pt.length;a=N1(null),zt=Mt=yt=!1,Zt=!0,Qt=null;for(var _e=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ie>=De-1);)if(we=Ee,Ee=b(),Ee!=="")switch(Ee.toUpperCase()){case"X":Zt=!0,Mt=yt=!1;break;case"M":for(Qt=et(),a.mc===null||Zt===!0?(Td(a,Qt.x,Qt.y,yt,!Mt,zt),Zt=!1):a.moveTo(Qt.x,Qt.y),ht.assign(Oe);!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();)Oe=new Me((Ee===Ee.toLowerCase()?Oe.x:0)+parseFloat(b()),Oe.y),a.lineTo(Oe.x,Oe.y);break;case"V":for(;!x();)Oe=new Me(Oe.x,(Ee===Ee.toLowerCase()?Oe.y:0)+parseFloat(b())),a.lineTo(Oe.x,Oe.y);break;case"C":for(;!x();){Qt=new Me,E(Qt);var Je=nt(),En=et();rh(a,Qt.x,Qt.y,Je.x,Je.y,En.x,En.y)}break;case"S":for(;!x();)Qt=st(),Je=nt(),En=et(),rh(a,Qt.x,Qt.y,Je.x,Je.y,En.x,En.y);break;case"Q":for(;!x();)Qt=nt(),Je=et(),Im(a,Qt.x,Qt.y,Je.x,Je.y);break;case"T":for(;!x();)je=Qt=st(),Je=et(),Im(a,Qt.x,Qt.y,Je.x,Je.y);break;case"B":for(;!x();){Qt=parseFloat(b()),Je=parseFloat(b()),En=parseFloat(b());var _n=parseFloat(b()),Dn=parseFloat(b()),Sn=Dn,un=!1;x()||(Sn=parseFloat(b()),x()||(un=parseFloat(b())!==0)),Ee===Ee.toLowerCase()&&(En+=Oe.x,_n+=Oe.y),a.arcTo(Qt,Je,En,_n,Dn,Sn,un)}break;case"A":for(;!x();)Qt=Math.abs(parseFloat(b())),Je=Math.abs(parseFloat(b())),En=parseFloat(b()),Dn=_n=!1,un=Sn=0,Sn=b(),Sn.length===1?(_n=!!parseFloat(Sn),Dn=!!parseFloat(b()),Sn=parseFloat(b())):Sn.length===2?(_n=!!parseFloat(Sn[0]),Dn=!!parseFloat(Sn[1]),Sn=parseFloat(b())):(_n=!!parseFloat(Sn[0]),Dn=!!parseFloat(Sn[1]),Sn=parseFloat(Sn.slice(2))),un=parseFloat(b()),Ee===Ee.toLowerCase()&&(Sn=Oe.x+Sn,un=Oe.y+un),Oe.h(Sn,un),Px(a,Qt,Je,En,_n,Dn,Sn,un);break;case"Z":bx(a),Oe.assign(ht);break;case"F":for(Qt="",Je=1;pt[ie+Je];)if(pt[ie+Je]==="0")zt=!0,Je++;else if(pt[ie+Je].match(/[Uu]/)!==null)Je++;else if(pt[ie+Je].match(_e)===null)Je++;else{Qt=pt[ie+Je];break}Qt.match(/[Mm]/)?yt=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Qt="",Je=1;pt[ie+Je];)if(pt[ie+Je].match(/[Ff]/)!==null)Je++;else if(pt[ie+Je].match(_e)===null)Je++;else{Qt=pt[ie+Je];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},xn.Ha=function(a,y){for(var x=a.length,b=Me.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}Me.free(b)},xn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===xn.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},xn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===xn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var 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),Ti(a,0,0,0,0),a.freeze()},xn.prototype.ix=function(){var a=new on;return Wl(this,a,!0),a};function Wl(a,y,x){switch(a.type){case xn.j:case xn.u:case xn.F:x?y.h(a.od,a.pd,0,0):Ti(y,a.od,a.pd,0,0),Ti(y,a.Dc,a.Ec,0,0);break;case xn.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):Ti(y,et.startX,et.startY,0,0);for(var nt=et.segments.s,st=nt.length,ht=et.startX,pt=et.startY,yt=0;yt<st;yt++){var Mt=nt[yt];switch(Mt.type){case Pi:case Co:ht=Mt.endX,pt=Mt.endY,Ti(y,ht,pt,0,0);break;case Vo: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 uo:case Cs:var zt=Mt.type===uo?$a(Mt,et):Rs(Mt,et,ht,pt),Zt=zt.length;if(Zt===0){ht=Mt.type===uo?Mt.centerX:Mt.endX,pt=Mt.type===uo?Mt.centerY:Mt.endY,Ti(y,ht,pt,0,0);break}Mt=null;for(var Qt=0;Qt<Zt;Qt++)Mt=zt[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:Ae("Unknown Segment type: "+Mt.type)}}}break;default:Ae("Unknown Geometry type: "+a.type)}}xn.prototype.normalize=function(){this._isFrozen&&Ve(this);var a=this.ix();return this.offset(-a.x,-a.y),new Me(-a.x,-a.y)},xn.prototype.offset=function(a,y){return this._isFrozen&&Ve(this),this.transform(1,0,0,1,a,y),this},xn.prototype.scale=function(a,y){return this._isFrozen&&Ve(this),this.transform(a,0,0,y,0,0),this},xn.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},qt=xn.prototype,qt.transform=function(a,y,x,b,E,et){switch(this.type){case xn.j:case xn.u:case xn.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 xn.o:for(var ht=this.figures.s,pt=ht.length,yt=0;yt<pt;yt++){var Mt=ht[yt];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 zt=Mt.length,Zt=0;Zt<zt;Zt++){var Qt=Mt[Zt];switch(Qt.type){case Pi:case Co:nt=Qt.endX,st=Qt.endY,Qt.endX=nt*a+st*x+E,Qt.endY=nt*y+st*b+et;break;case Vo: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 uo: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:Ae("Unknown Segment type: "+Qt.type)}}}}return this._isInvalidBounds=!0,this},qt.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 xn.j:return Ge.Yb(x,b,E,et,y,a.x,a.y);case xn.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 xn.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 xn.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,yt,Mt,zt=a.figures.s,Zt=zt.length,Qt=0;Qt<Zt;Qt++){var ie=zt[Qt],Ee=!ie.isEvenOdd;if(ie.isFilled){if(b&&ie.ca(et,y,x))return!0;var we=ie.segments;ht=ie.startX,pt=ie.startY;for(var je=ht,Oe=pt,De=we.s,_e=0;_e<=we.length;_e++){var Je=void 0;if(_e!==we.length){Je=De[_e];var En=Je.type;a=Je.endX,Mt=Je.endY}else En=Pi,a=je,Mt=Oe;switch(En){case Co:if(je=Qa(et,y,nt,y,ht,pt,je,Oe),isNaN(je))return!0;st+=je,je=a,Oe=Mt;break;case Pi:if(ht=Qa(et,y,nt,y,ht,pt,a,Mt),isNaN(ht))return!0;st+=ht;break;case Vo:yt=Ge.Fo(ht,pt,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,a,Mt,nt,y,et,y,.5),st+=yt;break;case cs:yt=Ge.Fo(ht,pt,(ht+2*Je.point1X)/3,(pt+2*Je.point1Y)/3,(2*Je.point1X+a)/3,(2*Je.point1Y+Mt)/3,a,Mt,nt,y,et,y,.5),st+=yt;break;case uo:case Cs:En=Je.type===uo?$a(Je,ie):Rs(Je,ie,ht,pt);var _n=En.length;if(_n===0){if(ht=Qa(et,y,nt,y,ht,pt,Je.type===uo?Je.centerX:Je.endX,Je.type===uo?Je.centerY:Je.endY),isNaN(ht))return!0;st+=ht;break}Je=null;for(var Dn=0;Dn<_n;Dn++){if(Je=En[Dn],Dn===0){if(yt=Qa(et,y,nt,y,ht,pt,Je[0],Je[1]),isNaN(yt))return!0;st+=yt}yt=Ge.Fo(Je[0],Je[1],Je[2],Je[3],Je[4],Je[5],Je[6],Je[7],nt,y,et,y,.5),st+=yt}Je!==null&&(a=Je[6],Mt=Je[7]);break;default:Ae("Unknown Segment type: "+Je.type)}ht=a,pt=Mt}if(Ee){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 pl(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}qt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Me),this.type===xn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,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 yt=ht[a];if(nt+yt>=et)return b=et-nt,b=yt===0?0:b/yt,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+=yt}}return y},qt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===xn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,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},qt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===xn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,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 yt=ht[a];if(nt+yt>=et)return b=et-nt,b=yt===0?0:b/yt,yt=x[st],x=yt[2*a],st=yt[2*a+1],E=yt[2*a+2],a=yt[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+=yt}}return y},qt.xx=function(a){if(this.type===xn.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=Me.alloc();return Ge.qh(y,x,b,E,et,a,st),a=st.x,et=st.y,Me.free(st),Math.sqrt(((a-y)*(a-y)+(et-x)*(et-x))/nt)}}else if(this.type===xn.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=Me.alloc(),E=1/0,st=nt=0,ht=y.length;for(var yt=pt=0,Mt=0;Mt<ht;Mt++)for(var zt=y[Mt],Zt=x[Mt],Qt=zt.length,ie=0;ie<Qt;ie+=2){var Ee=zt[ie],we=zt[ie+1];if(ie!==0){Ge.qh(pt,yt,Ee,we,a.x,a.y,b);var je=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);je<E&&(E=je,nt=st,nt+=Math.sqrt((b.x-pt)*(b.x-pt)+(b.y-yt)*(b.y-yt))),st+=Zt[(ie-2)/2]}pt=Ee,yt=we}return Me.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===xn.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===xn.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===xn.F){var et=new Po;et.startX=a.endX,et.startY=(a.startY+a.endY)/2;var nt=new ei(uo);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,yt=pt.length,Mt=0;Mt<yt;Mt++){var zt=pt[Mt];switch(zt.type){case Co:4<=b.length&&(y.push(b),x.push(Jc(b))),b=[],b.push(zt.endX),b.push(zt.endY),nt=zt.endX,et=zt.endY,st=nt,ht=et;break;case Pi:b.push(zt.endX),b.push(zt.endY),nt=zt.endX,et=zt.endY;break;case Vo:Ge.Qe(nt,et,zt.point1X,zt.point1Y,zt.point2X,zt.point2Y,zt.endX,zt.endY,.5,b),nt=zt.endX,et=zt.endY;break;case cs:Ge.ep(nt,et,zt.point1X,zt.point1Y,zt.endX,zt.endY,.5,b),nt=zt.endX,et=zt.endY;break;case uo:var Zt=$a(zt,E),Qt=Zt.length;if(Qt===0){b.push(zt.centerX),b.push(zt.centerY),nt=zt.centerX,et=zt.centerY;break}for(var ie=0;ie<Qt;ie++){var Ee=Zt[ie];Ge.Qe(nt,et,Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,b),nt=Ee[6],et=Ee[7]}break;case Cs:if(Zt=Rs(zt,E,nt,et),Qt=Zt.length,ie=zt.endX,Ee=zt.endY,Qt===0){b.push(ie),b.push(Ee),nt=ie,et=Ee;break}for(ie=0;ie<Qt;ie++)Ee=Zt[ie],Ge.Qe(nt,et,Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,b),nt=Ee[6],et=Ee[7];break;default:Ae("Segment not of valid type: "+zt.type)}zt.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(Mi(x,b,nt,st))),x=nt,b=st}return y}qt.add=function(a){return this.ee.add(a),this},qt.pm=function(a,y,x,b,E,et,nt,st){return this._isFrozen&&Ve(this),this.fg=new nr(a,y,E,et).freeze(),this.gg=new nr(x,b,nt,st).freeze(),this},Ze.Object.defineProperties(xn.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return 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===xn.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===xn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,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===xn.o?this.ee=new yn:(xn.V===null&&(xn.V=new yn().freeze()),this.ee=xn.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}}}),xn.prototype.setSpots=xn.prototype.pm,xn.prototype.add=xn.prototype.add,xn.prototype.getFractionForPoint=xn.prototype.xx,xn.prototype.getPointAndAngleAlongPath=xn.prototype.Qu,xn.prototype.getAngleAlongPath=xn.prototype.wx,xn.prototype.getPointAlongPath=xn.prototype.Pu,xn.prototype.containsPoint=xn.prototype.ca,xn.prototype.transform=xn.prototype.transform,xn.prototype.rotate=xn.prototype.rotate,xn.prototype.scale=xn.prototype.scale,xn.prototype.offset=xn.prototype.offset,xn.prototype.normalize=xn.prototype.normalize,xn.prototype.computeBoundsWithoutOrigin=xn.prototype.ix,xn.prototype.equalsApprox=xn.prototype.Xa,xn.className="Geometry",xn.j=new dn(xn,"Line",0),xn.u=new dn(xn,"Rectangle",1),xn.F=new dn(xn,"Ellipse",2),xn.o=new dn(xn,"Path",3),xn.V=null,xn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",xn.className="Geometry",xn.stringify=xn.ia,xn.fillPath=xn.nb,xn.parse=xn.parse,xn.Line=xn.j,xn.Rectangle=xn.u,xn.Ellipse=xn.F,xn.Path=xn.o;function Po(a,y,x,b,E){oi(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}Po.prototype.copy=function(){var a=new Po;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},qt=Po.prototype,qt.Xa=function(a){if(!(a instanceof Po&&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},qt.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},qt.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},qt.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},qt.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},qt.add=function(a){return this.pl.add(a),this},qt.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 yt=st[pt];switch(yt.type){case Co:et=yt.endX,nt=yt.endY,b=yt.endX,E=yt.endY;break;case Pi:if(Ge.Yb(b,E,yt.endX,yt.endY,x,a,y))return!0;b=yt.endX,E=yt.endY;break;case Vo:if(Ge.cs(b,E,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,a,y,x))return!0;b=yt.endX,E=yt.endY;break;case cs:if(Ge.jv(b,E,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,a,y,x))return!0;b=yt.endX,E=yt.endY;break;case uo:case Cs:var Mt=yt.type===uo?$a(yt,this):Rs(yt,this,b,E),zt=Mt.length,Zt=yt.type===uo?yt.centerX:yt.endX,Qt=yt.type===uo?yt.centerY:yt.endY;if(zt===0){if(Ge.Yb(b,E,Zt,Qt,x,a,y))return!0;b=Zt,E=Qt;break}for(Zt=null,Qt=0;Qt<zt;Qt++)if(Zt=Mt[Qt],Qt===0&&Ge.Yb(b,E,Zt[0],Zt[1],x,a,y)||Ge.cs(Zt[0],Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6],Zt[7],.5,a,y,x))return!0;Zt!==null&&(b=Zt[6],E=Zt[7]);break;default:Ae("Unknown Segment type: "+yt.type)}if(yt.isClosed&&(b!==et||E!==nt)&&Ge.Yb(b,E,et,nt,x,a,y))return!0}return!1},Ze.Object.defineProperties(Po.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}}}),Po.prototype.add=Po.prototype.add,Po.prototype.equalsApprox=Po.prototype.Xa,Po.className="PathFigure";function ei(a,y,x,b,E,et,nt,st){oi(this),a===void 0&&(a=Pi),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===uo&&(et=Math.max(et,0)),this.Wh=et,typeof nt=="number"?(a===uo&&(nt=Math.max(nt,0)),this.Pg=nt):this.Pg=0),this.ae=null}ei.prototype.copy=function(){var a=new ei;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},qt=ei.prototype,qt.Xa=function(a){if(!(a instanceof ei)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Co:case Pi:return Ge.B(this.endX,a.endX)&&Ge.B(this.endY,a.endY);case Vo: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 uo: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}},qt.qb=function(a){a.classType===ei&&(this.type=a)},qt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Co:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Pi:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Vo: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 uo: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":"")},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.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),xn.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,Ee,we,je){return(ie*je<Ee*we?-1:1)*Math.acos((ie*we+Ee*je)/(Math.sqrt(ie*ie+Ee*Ee)*Math.sqrt(we*we+je*je)))}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,yt=a.Ec,Mt=Math.cos(nt),zt=Math.sin(nt),Zt=Mt*(x-pt)/2+zt*(b-yt)/2;nt=-zt*(x-pt)/2+Mt*(b-yt)/2;var Qt=Zt*Zt/(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*Zt*Zt)/(y*y*nt*nt+et*et*Zt*Zt)),isNaN(Qt)&&(Qt=0),st=Qt*y*nt/et,Qt=Qt*-et*Zt/y,isNaN(st)&&(st=0),isNaN(Qt)&&(Qt=0),x=(x+pt)/2+Mt*st-zt*Qt,b=(b+yt)/2+zt*st+Mt*Qt,yt=E(1,0,(Zt-st)/y,(nt-Qt)/et),Mt=(Zt-st)/y,pt=(nt-Qt)/et,Zt=(-Zt-st)/y,st=(-nt-Qt)/et,nt=E(Mt,pt,Zt,st),Zt=(Mt*Zt+pt*st)/(Math.sqrt(Mt*Mt+pt*pt)*Math.sqrt(Zt*Zt+st*st)),-1>=Zt?nt=Math.PI:1<=Zt&&(nt=0),!ht&&0<nt&&(nt-=2*Math.PI),ht&&0>nt&&(nt+=2*Math.PI),ht=y>et?1:y/et,Zt=y>et?et/y:1,y=Ge.jx(0,0,y>et?y:et,yt,yt+nt,!0),et=Sr.alloc(),et.reset(),et.translate(x,b),et.rotate(a.Ne,0,0),et.scale(ht,Zt),xn.Ha(y,et),Sr.free(et),a.ae=y,a.ae}Ze.Object.defineProperties(ei.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&&Mn(a,">= zero",ei,"radiusX"),this._isFrozen&&Ve(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",ei,"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}}}),ei.prototype.equalsApprox=ei.prototype.Xa;var Co=new dn(ei,"Move",0),Pi=new dn(ei,"Line",1),Vo=new dn(ei,"Bezier",2),cs=new dn(ei,"QuadraticBezier",3),uo=new dn(ei,"Arc",4),Cs=new dn(ei,"SvgArc",4);ei.className="PathSegment",ei.Move=Co,ei.Line=Pi,ei.Bezier=Vo,ei.QuadraticBezier=cs,ei.Arc=uo,ei.SvgArc=Cs;function sa(){this.H=null,this.xu=new Me(0,0).freeze(),this.mt=new Me(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}sa.prototype.copy=function(){var a=new sa;return this.clone(a)},sa.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},sa.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},sa.prototype.So=function(a,y){var x=this.diagram;return x===null||Sp(x,a,y),y},sa.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Sp(x,a,y),y.assign(x.Ps(y))),y},Ze.Object.defineProperties(sa.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}}}),sa.prototype.getMultiTouchDocumentPoint=sa.prototype.Bz,sa.prototype.getMultiTouchViewPoint=sa.prototype.So,sa.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},Ze.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 Bi(){this.Fm=Di,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Bi.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Bi.prototype.copy=function(){var a=new Bi;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=en(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=en(y)&&typeof y.J=="function"?y.J():y,a},Bi.prototype.qb=function(a){a.classType===Bi&&(this.change=a)},Bi.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+=gr(this.object)),this.oldValue!==null&&(a+=" old: "+gr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+gr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Bi.prototype.I=function(a){return a?this.oldValue:this.newValue},Bi.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Bi.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Bi.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Bi.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Bi.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ze.Object.defineProperties(Bi.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}}}),Bi.prototype.redo=Bi.prototype.redo,Bi.prototype.canRedo=Bi.prototype.canRedo,Bi.prototype.undo=Bi.prototype.undo,Bi.prototype.canUndo=Bi.prototype.canUndo,Bi.prototype.getParam=Bi.prototype.Dz,Bi.prototype.getValue=Bi.prototype.I,Bi.prototype.clear=Bi.prototype.clear;var qa=new dn(Bi,"Transaction",-1),Di=new dn(Bi,"Property",0),eo=new dn(Bi,"Insert",1),vo=new dn(Bi,"Remove",2);Bi.className="ChangedEvent",Bi.Transaction=qa,Bi.Property=Di,Bi.Insert=eo,Bi.Remove=vo;function Lo(){this.o=new yn().freeze(),this.xa="",this.j=!1}Lo.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},Lo.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()},Lo.prototype.canUndo=function(){return this.isComplete},Lo.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()}},Lo.prototype.canRedo=function(){return this.isComplete},Lo.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()}},Lo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new qn,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 qn,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()}},Ze.Object.defineProperties(Lo.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}}}),Lo.prototype.optimize=Lo.prototype.ak,Lo.prototype.redo=Lo.prototype.redo,Lo.prototype.canRedo=Lo.prototype.canRedo,Lo.prototype.undo=Lo.prototype.undo,Lo.prototype.canUndo=Lo.prototype.canUndo,Lo.prototype.clear=Lo.prototype.clear,Lo.className="Transaction";function Ii(){this.Pt=new mn,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}Ii.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},Ii.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},Ii.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},qt=Ii.prototype,qt.Xw=function(a){this.Pt.add(a)},qt.Rx=function(a){this.Pt.remove(a)},qt.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},qt.eb=function(a){return a===void 0&&(a=""),wh(this,!0,a)},qt.Kf=function(){return wh(this,!1,"")};function wh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&jn("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}qt.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()}},Ii.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ii.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){jn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ii.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ii.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){jn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ii.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Bi;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)},Ii.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Lo);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||jn("Change not within a transaction: "+x.toString()))}},Ii.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},Ze.Object.defineProperties(Ii.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}}}),Ii.prototype.handleChanged=Ii.prototype.Tu,Ii.prototype.redo=Ii.prototype.redo,Ii.prototype.undo=Ii.prototype.undo,Ii.prototype.canUndo=Ii.prototype.canUndo,Ii.prototype.discardHistoryAfterIndex=Ii.prototype.lx,Ii.prototype.rollbackTransaction=Ii.prototype.Kf,Ii.prototype.commitTransaction=Ii.prototype.eb,Ii.prototype.startTransaction=Ii.prototype.Ea,Ii.prototype.removeModel=Ii.prototype.Rx,Ii.prototype.addModel=Ii.prototype.Xw,Ii.prototype.clear=Ii.prototype.clear,Ii.className="UndoManager";function qr(){oi(this),this.H=Kl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new sa,this.Zr=-1}qr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Bn(this.constructor)},qr.prototype.updateAdornments=function(){},qr.prototype.canStart=function(){return this.isEnabled},qr.prototype.doStart=function(){},qr.prototype.doActivate=function(){this.isActive=!0},qr.prototype.doDeactivate=function(){this.isActive=!1},qr.prototype.doStop=function(){},qr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},qr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},qr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},qr.prototype.doMouseMove=function(){},qr.prototype.doMouseUp=function(){this.stopTool()},qr.prototype.doMouseWheel=function(){},qr.prototype.canStartMultiTouch=function(){return!0},qr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Me.allocAt(NaN,NaN)),b=y.So(1,Me.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}Me.free(x),Me.free(b)},qr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Me.allocAt(NaN,NaN)),b=y.So(1,Me.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 Me((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}Me.free(x),Me.free(b)},qr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},qr.prototype.doKeyUp=function(){},qr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},qr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},qr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Xr?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||(Xr?y.meta:y.control)||y.shift||a.clearSelection()}},qr.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)}}}qr.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}},qr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},qr.prototype.doCurrentObjectChanged=function(){},qr.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)}}},qr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},qr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=wr(function(){x.doWaitAfter(b)},a)},qr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&bn.clearTimeout(this.Zr),this.Zr=-1},qr.prototype.doWaitAfter=function(){},qr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof ti);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},qr.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},Ze.Object.defineProperties(qr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof $e&&(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}}}),qr.prototype.startTransaction=qr.prototype.Ea,qr.className="Tool";function Oi(){qr.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 Cn(2,2).ja(),this.Ha=5e3,this.ia=fc,this.u=Hf,this.Mp=this.j=null,this.zj=-1}tn(Oi,qr),Oi.prototype.initializeStandardTools=function(){},Oi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof ti&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Oi.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)},Oi.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)}Oi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof ti&&(y===a||y.rg(a))||this.hideToolTip()},Oi.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()))},Oi.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)},Oi.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 ti)||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()},Oi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof ti){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 Ll&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(bn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=wr(function(){E.hideToolTip()},a)}},Oi.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}},Oi.prototype.hideToolTip=function(){this.zj!==-1&&(bn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof ti?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ll&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Oi.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()},Oi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Oi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Oi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Oi.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},Oi.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},Oi.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)},Ze.Object.defineProperties(Oi.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 ti?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}}}),Oi.prototype.replaceStandardTool=Oi.prototype.gb;var fc=new dn(Oi,"WheelScroll",0),Qc=new dn(Oi,"WheelZoom",1),ep=new dn(Oi,"WheelNone",2),Hf=new dn(Oi,"GestureZoom",3),fu=new dn(Oi,"GestureCancel",4),bh=new dn(Oi,"GestureNone",5);Oi.className="ToolManager",Oi.WheelScroll=fc,Oi.WheelZoom=Qc,Oi.WheelNone=ep,Oi.GestureZoom=Hf,Oi.GestureCancel=fu,Oi.GestureNone=bh;function Ri(){qr.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 Me(NaN,NaN),this.Fr=new Me,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new mn().freeze(),this.ia=new ct,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Hl;tn(Ri,qr),Ri.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},Ri.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},Ri.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,(Xr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ri.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&&Ba(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 wn?(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))}}Ri.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ri.prototype.Pd=function(a){return a===void 0?new yu(zi):this.isGridSnapEnabled?new yu(new Me(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new yu(a.copy())},Ri.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)},Ri.prototype.stopTransaction=function(){var a=this.diagram,y=qr.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()}Ri.prototype.doCancel=function(){tl(this),Ru(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ri.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ri.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 qn,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 wn&&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 wn&&(x.value.point=new Me(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 Tl(a,y,x){var b=a.diagram,E=a.startPoint,et=Me.alloc();et.assign(b.lastInput.documentPoint),a.moveParts(y,et.re(E),x),Me.free(et),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ba(b),b.hk())}Ri.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 wn&&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 br)){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)}Ri.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 ti||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ri.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 tr&&!(a instanceof br)&&(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=Me.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(Ir,a);ht=y.Bf(ht),ht<et&&(nt=st,et=ht)}}return Me.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)}}}}Ri.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 Tn&&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 Tn&&$v(x,b,a);on.free(a)}}}function Qv(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof br||(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 wn},!0,function(E){return E instanceof wn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ri.prototype.doDropOnto=function(){},Ri.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),Tl(this,this.copiedParts,!1),Dh(a,this.copiedParts)):this.mayMove()?(tl(this),Tl(this,this.draggedParts,!0)):this.mayDragOut()?(du(this,!1),Tl(this,this.copiedParts,!1)):tl(this),Kf(this,a.lastInput.documentPoint))}},Ri.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),Tl(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()&&(Tl(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)}}},Ri.prototype.simulatedMouseMove=function(a,y,x){if(Io===null)return!1;var b=Io.diagram;x instanceof $e||(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)},Ri.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 Me),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 Tn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ri.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Xr?!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())},Ri.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())},Ri.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())},Ri.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ri.prototype.Az=function(){return Io},Ri.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)},Ri.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)}},Ri.prototype.doSimulatedDragLeave=function(){var a=Io;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ri.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),Tl(this,this.copiedParts,!1),Kf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ri.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),Tl(this,this.copiedParts,!1);var b=new mn;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 yt=pt.location;pt=yt.x,yt=yt.y,isNaN(pt)||isNaN(yt)||(pt<b&&(b=pt),yt<E&&(E=yt),pt>nt&&(nt=pt),yt>st&&(st=yt))}}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 qn,st=Me.alloc(),ht=y.iterator;ht.next();)pt=ht.value,pt instanceof wn&&pt.canCopy()&&(yt=x.I(pt),yt!==null&&(yt.points=pt.points,ah(yt,et.x-b,et.y-E),yt.suspendsRouting=!0,nt.add(yt,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))));Me.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)}}}Ri.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ri.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Me},Ze.Object.defineProperties(Ri.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}}}),Ri.prototype.getDraggingSource=Ri.prototype.Az;var Io=null,Gu=null;Ri.className="DraggingTool",Hl=new yn,lr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Oi.prototype.doCancel=function(){Io!==null&&Io.doCancel(),qr.prototype.doCancel.call(this)};function Yi(){qr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new wn,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 Tn,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 Tn,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 qn,this.Of=this.gj=this.Pf=null}tn(Yi,qr),Yi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Yi.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var et=y.Df(),nt=Cn.alloc();nt.width=y.naturalBounds.width*et,nt.height=y.naturalBounds.height*et,b.desiredSize=nt,Cn.free(nt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Ir,et=Me.alloc(),x.location=y.ga(Ir,et),Me.free(et),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Yi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=ci,y.fromSpot=Wr,y.toSpot=Wr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Yi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Yi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Tn){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)}},Yi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Tn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Tn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Yi.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 Tn){var ht=nt.ga(Ir,Me.alloc()),pt=x.x-ht.x,yt=x.y-ht.y;Me.free(ht),ht=pt*pt+yt*yt,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 Tn&&(x.layer===null||x.layer.allowLink))?y:null},Yi.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},Yi.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},Yi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Yi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Tn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Tn))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},Yi.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)},Yi.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 mn;return b.add(a),la(this,x,y,b)};function la(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),la(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),la(a,y.labeledLink,x,b))))}Yi.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!ma(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!ma(this,a,y,x,!0)}if(b===jp)return a===y?a=!0:(b=new mn,b.add(y),a=va(this,b,a,y,x)),!a;if(b===Op)return!ma(this,a,y,x,!1);if(b===Fp)return a===y?a=!0:(b=new mn,b.add(y),a=dc(this,b,a,y,x)),!a}return!0};function ma(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&&ma(a,nt,x,b,E)))return!0}return!1}function va(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&&va(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}Ze.Object.defineProperties(Yi.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}}}),Yi.className="LinkingBaseTool";function ya(){Yi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ch,this.Xd=null}tn(ya,Yi),ya.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},ya.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 Tn)))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},ya.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 Tn&&(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 Tn&&(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)},ya.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()},ya.prototype.doStop=function(){Yi.prototype.doStop.call(this),this.startObject=null},ya.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 Tn&&(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)}}},ya.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof wn)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)},ya.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ya.prototype.doNoLink=function(){},Ze.Object.defineProperties(ya.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 dn(ya,"Either",0),_g=new dn(ya,"ForwardsOnly",0),zg=new dn(ya,"BackwardsOnly",0);ya.className="LinkingTool",ya.Either=Ch,ya.ForwardsOnly=_g,ya.BackwardsOnly=zg;function fs(){Yi.call(this),this.name="Relinking";var a=new Tr;a.figure="Diamond",a.desiredSize=Ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Tr,a.figure="Diamond",a.desiredSize=Ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}tn(fs,Yi),fs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof wn){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 ti;return x.type=vn.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 ti&&x.adornedPart instanceof wn))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=Ar),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ar),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=ka),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},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(){Yi.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 Tn&&(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)}Ze.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 ti))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),fs.className="RelinkingTool",lr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),lr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function no(){qr.call(this),this.name="LinkReshaping";var a=new Tr;a.figure="Rectangle",a.desiredSize=Wi,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Tr,a.figure="Diamond",a.desiredSize=Ei,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Me,this.Yq=new yn}tn(no,qr),no.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:op},no.prototype.om=function(a,y){a.reshapingBehavior=y},no.prototype.updateAdornments=function(a){if(a!==null&&a instanceof wn){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)}},no.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new ti,E.type=vn.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},no.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},no.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},no.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},no.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 wn){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}}},no.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},no.prototype.stopTransaction=function(){var a=this.diagram,y=qr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},no.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},no.prototype.getResegmentingPoint=function(){return this.handle.ga(Ir)},no.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},no.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 Me(nt.x,(et.y+nt.y)/2)),st.cd(x+1,new Me(et.x,(et.y+nt.y)/2))):(st.cd(x-2,new Me((et.x+nt.x)/2,nt.y)),st.cd(x+1,new Me((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 Me(b.x,(b.y+nt.y)/2)),st.cd(x+2,new Me(nt.x,(b.y+nt.y)/2))):(st.cd(x-1,new Me((b.x+nt.x)/2,b.y)),st.cd(x+2,new Me((b.x+nt.x)/2,nt.y))),st.mb(x+1),st.mb(x),y.points=st,y.Wb())}}else nt=Me.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()),Me.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}no.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(Ir,Me.alloc()),b=y.getLinkPointFromPoint(b,E,et,a,!0,Me.alloc()),y.L(0,b.x,b.y),Me.free(et),Me.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(Ir,Me.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Me.alloc()),y.L(y.pointsCount-1,a.x,a.y),Me.free(x),Me.free(a));y.zf()},no.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 Me(y.i(x).x,a.y);case Wu:return new Me(a.x,y.i(x).y);default:case op:return y.i(x)}},Ze.Object.defineProperties(no.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 ti))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}}}),no.prototype.setReshapingBehavior=no.prototype.om,no.prototype.getReshapingBehavior=no.prototype.Ru;var op=new dn(no,"None",0),Wu=new dn(no,"Horizontal",1),Hu=new dn(no,"Vertical",2),Xf=new dn(no,"All",3);no.className="LinkReshapingTool",no.None=op,no.Horizontal=Wu,no.Vertical=Hu,no.All=Xf,lr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function qo(){qr.call(this),this.name="Resizing",this.o=new Cn(1,1).freeze(),this.j=new Cn(9999,9999).freeze(),this.yg=new Cn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Tr;a.alignmentFocus=Ir,a.figure="Rectangle",a.desiredSize=Wi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Me,this.Dw=new Cn,this.Tn=new Me,this.rt=new Cn(0,0),this.qt=new Cn(1/0,1/0),this.pt=new Cn(1,1)}tn(qo,qr),qo.prototype.updateAdornments=function(a){if(!(a===null||a instanceof wn)){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 ti,y.type=vn.Spot,y.locationSpot=Ir;var x=new Ca;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,ni)),y.add(this.makeHandle(a,gi)),y.add(this.makeHandle(a,lo)),y.add(this.makeHandle(a,oa)),y.add(this.makeHandle(a,ga)),y.add(this.makeHandle(a,Qo)),y.add(this.makeHandle(a,aa)),y.add(this.makeHandle(a,Fa))}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=Ir),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 vn)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=qr.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,Me.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),a.bd(),Me.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,Me.alloc()),et=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,et),this.resize(y),Me.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 br){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=Ir);var nt=this.adornedObject.naturalBounds,st=nt.x,ht=nt.y,pt=nt.x+nt.width,yt=nt.y+nt.height,Mt=1;if(!et){Mt=nt.width;var zt=nt.height;0>=Mt&&(Mt=1),0>=zt&&(zt=1),Mt=zt/Mt}return zt=Me.alloc(),Ge.No(a.x,a.y,st,ht,E.width,E.height,zt),a=nt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(zt.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(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=Math.max(yt-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=yt-a.height)):1<=y.y?(a.x=Math.max(zt.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(zt.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(zt.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*(yt-ht-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(zt.x-st,b.width),x.width),a.y=Math.max(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=Math.max(yt-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=yt-a.height)):1<=y.y?(a.width=Math.max(Math.min(zt.x-st,b.width),x.width),a.height=Math.max(Math.min(zt.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(zt.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*(yt-ht-a.height))):0>=y.y?(a.y=Math.max(zt.y,yt-b.height),a.y=Math.min(a.y,yt-x.height),a.height=yt-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(zt.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))),Me.free(zt),a},qo.prototype.computeReshape=function(){var a=hn;return this.adornedObject instanceof Tr&&(a=k0(this.adornedObject)),!(a===Hn||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 Cn(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},Ze.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 ti))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 ti)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",lr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Sa(){qr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Me,this.ue=null;var a=new Tr;a.figure="Ellipse",a.desiredSize=Ei,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Me(NaN,NaN),this.u=0,this.F=50}tn(Sa,qr),Sa.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},Sa.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new ti,y.type=vn.Position,y.locationSpot=Ir;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},Sa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Sa.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},Sa.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(Ir)},Sa.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var 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)},Sa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Me(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Sa.prototype.stopTransaction=function(){var a=this.diagram,y=qr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Sa.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Sa.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Sa.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Sa.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,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()}},Sa.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Ze.Object.defineProperties(Sa.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof ti))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 ti)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Sa.className="RotatingTool",lr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function kh(){qr.call(this),this.name="ClickSelecting"}tn(kh,qr),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(){qr.call(this),this.name="Action",this.pk=null}tn(_s,qr),_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(){qr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Me(0,0)}tn(Vu,qr),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 tr)x.Zc()&&(Hs(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);en(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var et=Me.allocAt(a.x,a.y);this.isGridSnapEnabled&&ad(this.diagram,b,a,et),b.location=et,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Me.free(et)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Ze.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(){qr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new tr;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}tn(ks,qr),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=Cn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Cn.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),Xr?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)}},Ze.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 Ko(){qr.call(this),this.name="Panning",this.Xt=new Me,this.xy=new Me,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(bn.document,"scroll",a.Kw,!1),a.stopTool()}}tn(Ko,qr),Ko.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())},Ko.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(bn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ko.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ko.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ko.prototype.doMouseMove=function(){this.move()},Ko.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ko.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)}},Ze.Object.defineProperties(Ko.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ko.className="PanningTool",lr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),lr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),lr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),lr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),lr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ll(){this.F=this.u=this.j=this.o=null}Ze.Object.defineProperties(Ll.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}}}),Ll.className="HTMLInfo";function zs(a,y,x){this.text=a,this.hx=y,this.visible=x}zs.className="ContextMenuButtonInfo";function xa(){qr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Me,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}tn(xa,qr);function el(a){var y=new Ll;y.show=function(E,et,nt){nt.showDefaultContextMenu()},y.hide=function(E,et){et.hideDefaultContextMenu()},Eh=y,a.tu=function(){a.stopTool()},y=Or("div");var x=Or("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=Or("style");bn.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",ro,!1),b.addEventListener(y,"selectstart",ro,!1),b.addEventListener(x,"contextmenu",ro,!1)),y.className="goCXforeground",x.className="goCXbackground",bn.document.body&&(bn.document.body.appendChild(y),bn.document.body.appendChild(x)),qc=y,pc=x,$c=!0}function ro(a){return a.preventDefault(),!1}xa.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)},xa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},xa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},xa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof $e||(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},xa.prototype.doActivate=function(){},xa.prototype.doMouseDown=function(){if(qr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof ti){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&gl(this)},xa.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof ti){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}gl(this)};function gl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ll||(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())}xa.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 ti&&!a.currentContextMenu.visible&&a.stopTool()}}xa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},xa.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof ti){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 Ll&&a.show(y,x,this);this.currentContextMenu=a},xa.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}},xa.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof ti?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ll&&(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}xa.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=Or("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=Or("li"),et.className="goCXli";var nt=Or("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"},xa.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}},Ze.Object.defineProperties(xa.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof ti?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return $c===!1&&Eh===null&&Vi&&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;xa.className="ContextMenuTool",lr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ci(){qr.call(this),this.name="TextEditing",this.Zh=new Si,this.ia=null,this.V=gc,this.vj=null,this.qa=mc,this.u=1,this.F=!0,this.o=null,this.j=new Ll,this.kt=null,tf(this,this.j)}tn(Ci,qr);function tf(a,y){if(Vi){var x=Or("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 Si&&et instanceof Ci)if(et.state===of)x.style.border="3px solid red",x.focus();else{var nt=b.ga(Ir),st=E.position,ht=E.scale,pt=b.Df()*ht;pt<et.minimumEditorScale&&(pt=et.minimumEditorScale);var yt=b.naturalBounds.width*pt+6,Mt=b.naturalBounds.height*pt+2,zt=(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=yt+"px",x.style.left=(zt-yt/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)}}}Ci.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Zu&&Zu!==this&&(Zu.acceptText(Al),Zu&&Zu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Si&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gc&&!y.isSelected||this.starting===Qf&&2>a.lastInput.clickCount)):!1},Ci.prototype.doStart=function(){Zu=this,this.textBlock!==null&&this.doActivate()},Ci.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 Si&&(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(ni),this.textBlock.ga(lo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ci.prototype.doCancel=function(){this.stopTool()},Ci.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ci.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Al)},Ci.prototype.acceptText=function(a){switch(a){case Al: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))}}Ci.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)},Ci.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ci.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)},Ci.prototype.doStop=function(){Zu=null},Ci.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)))},Ci.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ze.Object.defineProperties(Ci.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)}}}),Ci.prototype.measureTemporaryTextBlock=Ci.prototype.Lx;var Yf=new dn(Ci,"LostFocus",0),Al=new dn(Ci,"MouseDown",1),Jf=new dn(Ci,"Tab",2),ef=new dn(Ci,"Enter",3),t0=new dn(Ci,"SingleClick",0),gc=new dn(Ci,"SingleClickSelected",1),Qf=new dn(Ci,"DoubleClick",2),mc=new dn(Ci,"StateNone",0),nf=new dn(Ci,"StateActive",1),rf=new dn(Ci,"StateEditing",2),sp=new dn(Ci,"StateValidating",3),of=new dn(Ci,"StateInvalid",4),vc=new dn(Ci,"StateValidated",5),Zu=null;Ci.className="TextEditingTool",Ci.LostFocus=Yf,Ci.MouseDown=Al,Ci.Tab=Jf,Ci.Enter=ef,Ci.SingleClick=t0,Ci.SingleClickSelected=gc,Ci.DoubleClick=Qf,Ci.StateNone=mc,Ci.StateActive=nf,Ci.StateEditing=rf,Ci.StateValidating=sp,Ci.StateInvalid=of,Ci.StateValidated=vc,lr("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 mn,this.ce=new Zo,this.ce.Yd=this,this.Ei=new mn,this.pu=new mn,this.Sr=new mn,this.pr=new mn,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(),Xo(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!==ua&&b!==null&&(delete b.start.scale,delete b.end.scale),bn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(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 wn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}qt=ts.prototype,qt.fv=function(a){return this.ce.fv(a)},qt.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 $e){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)),bn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),bn.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}qt.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)},qt.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))},qt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Wa(this,a))},qt.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),Wa(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 Wa(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],yt=y[2];return y=y[3],st===0||st===100?(et=ht,nt=pt):(yt===0||yt===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,yt-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 Me(et(nt,b.x,E.x-b.x,st),et(nt,b.y,E.y-b.y,st))}var y=new qn;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 Me(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 Me(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 Me(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 Me(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}Ze.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&&Mn(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 dn(ts,"Default",1),lf=new dn(ts,"AnimateLocations",2),up=new dn(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 Zo(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=zi,this.vc=new qn,this.Tt=new qn,this.yl=new mn,this.Ut=new mn,this.dw=$u,a&&Object.assign(this,a)}Zo.prototype.suspend=function(){this.Xk=!0},Zo.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}qt=Zo.prototype,qt.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 $e?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)},qt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},qt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof $e?this.H=a:a instanceof ze&&a.diagram!==null&&(this.H=a.diagram)),a instanceof tr){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 $e&&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 Me&&!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 Me&&!nt.w()&&nt.assign(a.o),et&&x.indexOf("position:")===0&&y instanceof tr?st.Ku.location=Lh(y.location):et&&(st.Ku[x]=Lh(b))}function Lh(a){return a instanceof Me||a instanceof Cn?a.copy():a}qt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},qt.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)}}}qt.stop=function(){return this.bc?(this.Ml(!0),this):this},qt.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,yt=st.Ku,Mt;for(Mt in pt)if(et.get(Mt)!==null){var zt=Mt;!st.Hu||zt!=="position:nodeCollapse"&&zt!=="position:placeholder"||(zt="position"),et.get(zt)(nt,ht[Mt],yt[Mt]!==void 0?yt[Mt]:st.Hu?ht[Mt]:pt[Mt],this.Lp,this.Gd,this.Gd,this)}st.Hu&&yt.location!==void 0&&nt instanceof tr&&(nt.location=yt.location),st.nv&&nt instanceof tr&&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())}},qt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof br&&(b=y.placeholder),b!==null?(x=b.ga(ni),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Me(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof br)for(a=a.memberParts;a.next();)b=a.value,b instanceof Tn&&this.Cj(b,y)},qt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof br&&(x=y.placeholder),x!==null){var b=x.ga(ni);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 br)for(a=a.memberParts;a.next();)b=a.value,b instanceof Tn&&this.Aj(b,y)}},qt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ze.Object.defineProperties(Zo.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(a,">= 1",Zo,"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:Ae("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}}}),Zo.prototype.getTemporaryState=Zo.prototype.Ez,Zo.prototype.stop=Zo.prototype.stop,Zo.prototype.add=Zo.prototype.add,Zo.prototype.addTemporaryPart=Zo.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}Zo.className="Animation",Zo.EaseLinear=function(a,y,x,b){return x*a/b+y},Zo.EaseInOutQuad=yc,Zo.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Zo.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Zo.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Zo.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))}Ze.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 dn(nl,"Default",1),Nh=new dn(nl,"Immediate",2),Sc=new dn(nl,"Bundled",3);nl.className="AnimationTrigger",nl.Default=cp,nl.Immediate=Nh,nl.Bundled=Sc;function Fo(a){oi(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)}qt=Fo.prototype,qt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,na(x)}a.clear(),this.Zq.length=0},qt.Xe=function(a){this.H=a},qt.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 br?E++:ht instanceof Tn?b++:ht instanceof wn?et++:ht instanceof ti?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&&bi(b)&&(st+=" #"+bi(b)),x instanceof Tn?st+=" "+gr(b):x instanceof wn&&(st+=" "+gr(x.fromNode)+" "+gr(x.toNode));return y+" "+this.Pa.count+": "+st},qt.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=Me.alloc(),et=this.Pa.s,nt=et.length;nt--;){var st=et[nt];if((b!==!0||Gh(st)!==!1)&&st.isVisible()&&(E.assign(a),mr(E,st.oe),st=st.ic(E,y,x),st!==null&&(y!==null&&(st=y(st)),st!==null&&(x===null||x(st)))))return Me.free(E),st}return Me.free(E),null},qt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof mn||(b=new mn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var et=Me.alloc(),nt=this.Pa.s,st=nt.length;st--;){var ht=nt[st];if((E!==!0||Gh(ht)!==!1)&&ht.isVisible()){et.assign(a),mr(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 Me.free(et),b},qt.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 mn||(E=new mn),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},qt.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 yt=pt;pt.Cf(a,y,x,b,E)&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||E.add(yt))}}return E},qt.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 mn)&&(et=E),E=!0),et instanceof yn||et instanceof mn||(et=new mn),this.Uh===!1)return et;var nt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(nt=!0);for(var st=Me.alloc(),ht=Me.alloc(),pt=this.Pa.s,yt=pt.length;yt--;){var Mt=pt[yt];if((nt!==!0||Gh(Mt)!==!1)&&Mt.isVisible()){st.assign(a),mr(st,Mt.oe),ht.h(a.x+y,a.y),mr(ht,Mt.oe);var zt=Mt;Mt.og(st,ht,x,b,E,et)&&(x!==null&&(zt=x(zt)),zt===null||b!==null&&!b(zt)||et.add(zt))}}return Me.free(st),Me.free(ht),et},qt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Nn();for(var E=Nn(),et=0;et<b;et++){var nt=x[et];if(nt.vw=et,nt instanceof wn){if(nt.fd===!1)continue}else if(nt instanceof ti&&nt.adornedPart!==null)continue;var st=nt.actualBounds;nt.isVisible()&&zl(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]);Rn(a),Rn(E)}}};function vu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}qt.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(),yt=0;yt<et;yt++){var Mt=E[yt];b.contains(Mt)&&a.Oj(y,Mt,x,st,ht,pt,!1)}on.free(pt),y.globalAlpha=nt}}}qt.Oj=function(a,y,x,b,E,et,nt){if(nt&&!Gh(y))a.Hs(y);else{if(b!==null&&y instanceof wn&&(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&&(Zi(y,a,y.areaBackground,!0,!0,et,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Zi(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),Zi(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))}},qt.g=function(a,y,x,b,E){var et=this.diagram;et!==null&&et.cb(Di,a,this,y,x,b,E)},qt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&na(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},qt.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,na(y),a};function nd(a,y,x){if(y=Kg(a,y,x),x instanceof br&&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}Ze.Object.defineProperties(Fo.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===""&&Ae("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ae("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",Fo,"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))}}}),Fo.prototype.findObjectsNear=Fo.prototype.og,Fo.prototype.findObjectsIn=Fo.prototype.Cf,Fo.prototype.findObjectsAt=Fo.prototype.ji,Fo.prototype.findObjectAt=Fo.prototype.ic,Fo.className="Layer";function $e(a,y){if(am||(ta(),am=!0),oi(this),Kl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Vi){var x=this,b=function(){x.removeEventListener(bn.document,"DOMContentLoaded",b,!1),x.setRTL()};bn.document.body!==null?this.setRTL():x.addEventListener(bn.document,"DOMContentLoaded",b,!1)}this.ol=null,dd.add("Model",ui);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"||bn.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 qn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Me(NaN,NaN).freeze(),a.du=new Me(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Me(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Sr,a.zu=new Me(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new Br(0,0,0,0).freeze(),a.sj=$u,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ua,a.zk=Oo,a.Fg=ua,a.pq=Oo,a.yt=ni,a.Bt=ni,a.Fc=!0,a.pn=!1,a.De=new mn,a.Eh=new qn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Br(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new sa,a.bq.diagram=a,a.Qg=new sa,a.Qg.diagram=a,a.cj=new sa,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new mn,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 qn,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 Br(5).freeze(),a.Hw=new mn().freeze(),a.Nt=999999999,a.nw=new mn().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 mn,a.ow=new mn,a.Xh=null,a.aw=new Cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Me,bounds:new on,Py:new Cn,bA:new Cn,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 Cn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new qn;var y=new Tn,x=new Si;x.bind(new io("text","",gr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Tn,x=new Si,x.stroke="brown",x.bind(new io("text","",gr)),y.add(x),a.Lg.add("Comment",y),y=new Tn,y.selectable=!1,y.avoidable=!1,x=new Tr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Cn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new qn,y=new br,y.selectionObjectName="GROUPPANEL",y.type=vn.Vertical,x=new Si,x.font="bold 12pt sans-serif",x.bind(new io("text","",gr)),y.add(x),x=new vn(vn.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 Ca,b.padding=new Br(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new qn,y=new wn,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 wn,x=new Tr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new ti,y.type=vn.Auto,x=new Tr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ca,x.margin=new Br(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new ti,y.type=vn.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 ui,a.toolManager=new Oi,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=pi,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 Me,a.zy=500,a.wp=new Me,a.wq=!1}$e.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 mn().freeze(),a.nw=new mn().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(),mi=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),et}function Xg(){return null}$e.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),jl(this),this.Wg=!0,Yg(this),this.layout=new ji,this.Wg=!1,this.model=cy(),this.model.undoManager=new Ii,this.vb=this.rn=!1,this.N()},$e.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=bn.document.body);var y=Or("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},$e.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=bn.document.body);var y=0;if(Vi){var x=om;y=jh,x===null&&(x=om=Or("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=jh=Or("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||Xr||(y=11)}this.Db=y,this.Gw=!0},$e.prototype.qb=function(a){a.classType===$e&&(this.autoScale=a)},$e.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(Vi){if(y!=null||Ae("Diagram setup requires an argument DIV."),a.Ka!==null&&Ae("Diagram has already completed setup."),typeof y=="string"?a.Ka=bn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ae("No DIV or DIV id supplied: "+y),a.Ka===null&&Ae("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ae("Invalid div id; div already has a Diagram associated with it."),!a.ol&&bn.ResizeObserver){var x=cr(function(){a.$b()},250);a.ol=new bn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}bn.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=bn.go;var E=new Ws(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",bn.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,Vi){E=Or("div");var et=Or("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=cr(function(){a.Yh=null,a.N()},300),a.Ov=cr(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=bn.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,yt=nt;ht&&ht.H&&(yt=nt,pt=ht.H),st.targetDiagram=pt,wc(a,yt,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=bn.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 $e&&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)}}$e.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},$e.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(bn,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function cf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),hr&&hr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}$e.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:bn.devicePixelRatio||1},$e.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},$e.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},$e.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},$e.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},$e.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},$e.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},$e.prototype.doFocus=function(){this.focus()},$e.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=bn.scrollX||bn.pageXOffset,y=bn.scrollY||bn.pageYOffset;this.ta.focus(),bn.scrollTo(a,y)}},$e.prototype.Oy=function(){this.H.R("GainedFocus")},$e.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===ua&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new Fo;y.name="Background",a.Al(y),y=new Fo,y.name="",a.Al(y),y=new Fo,y.name="Foreground",a.Al(y),y=new Fo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Fo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Fo,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 vn(vn.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 tr,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)}$e.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,yt=b.right+et.right;et=b.bottom+et.bottom;var Mt=E.x;b=E.y;var zt=E.width,Zt=E.height,Qt=E.right,ie=E.bottom;E=this.scale;var Ee=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ee=Ee+a.scrollWidth-a.clientWidth;break;case"reverse":Ee=a.scrollWidth-Ee-a.clientWidth}var we=Ee;zt<ht||Zt<pt?(Ee=Me.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==we&&(Ee.x=we/E+nt,this.ju=we),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ee.y=a.scrollTop/E+st,this.lu=a.scrollTop),this.position=Ee,Me.free(Ee),this.Ee=this.qr=!1):(Ee=Me.alloc(),a.uy&&this.allowHorizontalScroll&&(nt<Mt&&(this.position=Ee.h(we+nt,this.position.y)),yt>Qt&&(this.position=Ee.h(-(y.scrollWidth-this.Aa)+we-this.Aa/E+yt,this.position.y))),a.vy&&this.allowVerticalScroll&&(st<b&&(this.position=Ee.h(this.position.x,a.scrollTop+st)),et>ie&&(this.position=Ee.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+et))),Me.free(Ee),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,yt=b.right,Qt=E.right,et=b.bottom,ie=E.bottom,nt=b.x,Mt=E.x,st=b.y,b=E.y,zt>=ht&&nt>=Mt&&yt<=Qt&&(x.style.width="1px"),Zt>=pt&&st>=b&&et<=ie&&(x.style.height="1px"))}},$e.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Xo(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}$e.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(kn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof wn||(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 wn||(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=Me.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=on.allocAt(0,0,b.width,b.height);var E=Me.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,on.free(b),Me.free(E),Me.free(x)}x=a.yh,y&&a.Fg!==ua&&(x=a.Fg);var et=x!==ua?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()?Ir: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}$e.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},qt=$e.prototype,qt.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 Me(a.x,a.y)}},qt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Me(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))},qt.zz=function(a){if(a instanceof ze){this.eq=a;var y=Me.alloc();this.fq=this.op(a.ga(ni,y)),Me.free(y)}else this.eq=null,this.fq=pi};function mp(a,y,x,b,E,et){var nt=Me.allocAt(a.pa.x,a.pa.y),st=nt.x,ht=nt.y;if(a.eq!==null){var pt=Me.alloc();pt=a.eq.ga(ni,pt),st=pt.x-a.fq.x/a.scale,ht=pt.y-a.fq.y/a.scale,E=Wr,Me.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),jl(a),Me.free(nt)}qt.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 tr)return a}else if(a=Zl(this,a,function(x){return x.part}),a instanceof tr)return a;return null},qt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Xo(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),Xo(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}qt.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 tr&&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 mn||(E=new mn),Xo(a),a=a.Wa.iteratorBackwards;a.next();){var et=a.value;et.visible&&!et.isTemporary&&et.ji(y,x,b,E)}return E}qt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof mn||(b=new mn),Xo(this);for(var E=this.Wa.iteratorBackwards;E.next();){var et=E.value;et.visible&&et.ji(a,y,x,b)}return b},qt.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 tr&&(!x||E.canSelect())},y,b)},qt.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 mn||(E=new mn),Xo(this);for(var et=this.Wa.iteratorBackwards;et.next();){var nt=et.value;nt.visible&&nt.Cf(a,y,x,b,E)}return E},qt.Nu=function(a,y,x,b,E,et){var nt=new mn;Xo(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 mn||(E=new mn),Xo(a),a=a.Wa.iteratorBackwards;a.next();){var nt=a.value;nt.visible&&!nt.isTemporary&&nt.Cf(y,et,x,b,E)}return E}qt.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 tr&&(!b||et.canSelect())},x,E)},qt.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 mn)&&(et=E),E=!0),et instanceof yn||et instanceof mn||(et=new mn),Xo(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 mn)&&(et=E),E=!0),et instanceof yn||et instanceof mn||(et=new mn),Xo(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}$e.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),Xr&&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,Xr&&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)}$e.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)},$e.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)},$e.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)},$e.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)},$e.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Me(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?mr(new Me(y,a),this.Ab):new Me(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=Me.allocAt(nt,st),a.Ab.Cd(y),x.documentPoint.assign(y),Me.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))}}$e.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Xo(a),a.Va()}$e.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},qt=$e.prototype,qt.Pz=function(){return this.kg},qt.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 Me(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&wr(function(){b.ld=!1,Vl(y,"Model"),a(b)},1)},qt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;bn.requestAnimationFrame(function(){y.kg&&y.bd()})}},qt.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&&Xo(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];co(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&&(Nl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Xo(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,Xo(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!==ua?a.scale=xc(a,a.Fg):a.yh!==ua?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"),Xo(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function xp(a){if(a.Fg!==ua)a.scale=xc(a,a.Fg);else if(a.yh!==ua)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),Nl(a)}function Xo(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 mn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof br&&b.U&65536&&(b.U=b.U^65536)})}}qt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof br||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof br&&x.isVisible()&&pf(this,x);for(a.reset();a.next();)x=a.value,x instanceof wn&&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 ti&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function pf(a,y){for(var x=Nn(),b=Nn(),E=y.memberParts;E.next();){var et=E.value;et.isVisible()&&(et instanceof br?(gs(et)||ba(et)||zh(et))&&pf(a,et):et instanceof wn?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(Rn(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();Rn(b)}qt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},qt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ae("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,yt=Math.round(st.y*ht)/ht;for(ht!==1&&et.scale(ht),st.x===0&&st.y===0||et.translate(-pt,-yt),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=hr&&hr.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&&Ae("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 yt=a.Ca;a.Ca=E;var Mt=a.Wa.s,zt=Mt.length;try{var Zt=new on(et.x,et.y,b.width/E,b.height/E),Qt=Zt.copy();Qt.Co(x),Nl(a,Qt),Xo(a),a.Fd(Mt,zt,a,Zt),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 Ee=Sr.alloc();Ee.reset(),Ee.translate(x.left,x.top),Ee.scale(E),et.x===0&&et.y===0||Ee.translate(-et.x,-et.y),y.setTransform(Ee.m11,Ee.m12,Ee.m21,Ee.m22,Ee.dx,Ee.dy),y.yc(),y instanceof es&&Yy(y,Ee.m11,Ee.m12,Ee.m21,Ee.m22,Ee.dx,Ee.dy),Sr.free(Ee),Ju(a,y),y.globalAlpha=a.pb;var we=a.Qj("Grid");if(nt){var je=new mn,Oe=nt.iterator;for(Oe.reset();Oe.next();){var De=Oe.value;De instanceof tr&&(pt||De.layer!==we)&&(De.Gj(),je.add(De))}for(pt=0;pt<zt;pt++)Vg(Mt[pt],y,a,je,ht);je.each(function(Je){return Je.Gj()})}else for(je=0;je<zt;je++){var _e=Mt[je];_e===we?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=yt,a.ib.Vc(!0),a.vd=!0,a.Fd(Mt,zt,a,a.viewportBounds),Nl(a),a.ib instanceof es&&(a.ib.Nj.PA(),a.redraw())}}}qt.Gf=function(a){return this.Rg[a]},qt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},qt.Tx=function(){this.Rg=new er,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Xr||Kr),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))}qt.Ql=function(a){return this.on[a]},qt.sA=function(a,y){this.on[a]=y},qt.Sx=function(){this.on=new er,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},qt.set=function(a){return Object.assign(this,a),this},qt.Du=function(a){return this.nm(a)},qt.nm=function(a){return bc(this,a),this};function bc(a,y){var x=a instanceof vn,b=a instanceof $e,E;for(E in y){E===""&&Ae("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])),en(et)?nt=E.substr(st+1):Ae("Unable to find object named: "+ht+" in "+a.toString()+" when trying to set property: "+E)}}if(nt[0]!=="_"&&!ar(et,nt))if(b&&nt==="ModelChanged"){a.Yw(y[nt]);continue}else if(b&&nt==="Changed"){a.Pe(y[nt]);continue}else if(b&&ar(a.toolManager,nt))et=a.toolManager;else if(b&&nm(a,nt)){a.Bj(nt,y[nt]);continue}else if(a instanceof Vn&&nt==="Changed"){a.Pe(y[nt]);continue}else Ae('Trying to set undefined property "'+nt+'" on object: '+et.toString());et[nt]=y[E],nt[0]==="_"&&et instanceof ze&&et.Vw(nt)}}qt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new qn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},qt.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")},$e.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 Ol)))){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,yt=Math.max(et,0),Mt=Math.max(y,0),zt=Math.floor(E-yt),Zt=Math.floor(st-Mt);a.drawImage(b.Oa,yt,Mt,zt,Zt,0,0,zt,Zt),Lc(this.Yf,this)&&a.clearRect(0,0,ht,pt),b=Nn(),a=Nn(),Zt=Math.abs(et),zt=Math.abs(y);var Qt=yt===0?0:E-Zt;yt=Me.allocAt(Qt,0),Zt=Me.allocAt(Zt+Qt,st),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.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),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),Qt=Mt===0?0:st-zt,yt.h(0,Qt),Zt.h(E,zt+Qt),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),Lc(this.Yf,this)&&(E=0<et?0:-et,st=0<y?0:-y,yt.h(E,st),Zt.h(ht+E,pt+st),a.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y))),mr(yt,ie),mr(Zt,ie),b.push(new on(Math.min(yt.x,Zt.x),Math.min(yt.y,Zt.y),Math.abs(yt.x-Zt.x),Math.abs(yt.y-Zt.y)))),Me.free(yt),Me.free(Zt),Oh(this,!1,!0),this.Ka===null&&Ae("No div specified"),this.ta===null&&Ae("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,yt=this.scale,zt=on.alloc(),Zt=nt.Pa.s,ie=Zt.length,Qt=ht.length;for(var Ee=0;Ee<ie;Ee++){var we=Zt[Ee],je=Bc(we,we.actualBounds);t:{for(var Oe=2/yt,De=4/yt,_e=0;_e<Qt;_e++){var Je=ht[_e];if(Je.width!==0&&Je.height!==0&&je.Vu(Je.x-Oe,Je.y-Oe,Je.width+De,Je.height+De)){je=!0;break t}}je=!1}je&&nt.Oj(E,we,this,Mt,yt,zt,!0)}on.free(zt),E.globalAlpha=pt}E.restore(),E.Vc(!0),this.Yf&&Lc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Rn(b),Rn(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),cf(this,!0))}else x?(Ba(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){jl(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,yt=a.viewportBounds;E=yt.x;var Mt=yt.y,zt=yt.width,Zt=yt.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,jl(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 Ee=a.documentBounds,we=0,je=0,Oe=0,De=0,_e=yt.width,Je=yt.height,En=a.rj;a.contentAlignment.sb()?(Ee.width>_e&&(we=En.left,je=En.right),Ee.height>Je&&(Oe=En.top,De=En.bottom)):(we=En.left,je=En.right,Oe=En.top,De=En.bottom);var _n=Ee.width+we+je,Dn=Ee.height+Oe+De;En=a.scale;var Sn=_n>ht/En,un=Dn>pt/En;if(!(et||a.gf||a.Be||Sn||un))return!0;we=Ee.x-we,ht=yt.x,je=Ee.right+je,pt=yt.right+nt,Oe=Ee.y-Oe;var xr=yt.y;Ee=Ee.bottom+De,yt=yt.bottom+st;var fr="1px";if(De="1px",a.scrollMode===$u&&(Sn||un)&&(Sn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Sn=1,we+1<ht&&(Sn=Math.max((ht-we)*En+a.Aa,Sn)),je>pt+1&&(Sn=Math.max((je-pt)*En+a.Aa,Sn)),_e+nt+1<_n&&(Sn=Math.max((_n-_e)*En+a.Aa,Sn)),fr=Sn.toString()+"px"),un&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Sn=1,Oe+1<xr&&(Sn=Math.max((xr-Oe)*En+a.ya,Sn)),Ee>yt+1&&(Sn=Math.max((Ee-yt)*En+a.ya,Sn)),Je+st+1<Dn&&(Sn=Math.max((Dn-Je)*En+a.ya,Sn)),De=Sn.toString()+"px")),Sn=fr!=="1px",un=De!=="1px",Sn&&un||!Sn&&!un||(un&&(pt-=a.Db),Sn&&(yt-=a.Db),_n<_e+nt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(nt=1,we+1<ht&&(nt=Math.max((ht-we)*En+a.Aa,nt)),je>pt+1&&(nt=Math.max((je-pt)*En+a.Aa,nt)),_e+1<_n&&(nt=Math.max((_n-_e)*En+a.Aa,nt)),fr=nt.toString()+"px"),Sn=fr!=="1px",nt=a.ya,Sn!==a.Be&&(nt=Sn?a.ya-a.Db:a.ya+a.Db),Dn<Je+st||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(st=1,Oe+1<xr&&(st=Math.max((xr-Oe)*En+nt,st)),Ee>yt+1&&(st=Math.max((Ee-yt)*En+nt,st)),Je+1<Dn&&(st=Math.max((Dn-Je)*En+nt,st)),De=st.toString()+"px"),un=De!=="1px"),a.qr&&Sn===a.Be&&un===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Sn!==a.Be&&(fr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),et=!0),a.Be=Sn,ie.style.width=fr,un!==a.gf&&(De==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),et=!0,a.tn&&(st=Me.alloc(),un?(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)),Me.free(st))),et&&jl(a),a.gf=un,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-we)*En:we+1<ht?y=Qt.scrollWidth-Qt.clientWidth:je>pt+1&&(y=a.position.x*En)),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&&(Je+1<Dn?Qt.scrollTop=(a.position.y-Oe)*En:Oe+1<xr?Qt.scrollTop=Qt.scrollHeight-Qt.clientHeight:Ee>yt+1&&(Qt.scrollTop=a.position.y*En)),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,zt,Zt),a.onViewportBoundsChanged(x,a.viewportBounds,En,et),on.free(x),!1):!0}qt=$e.prototype,qt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ae("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&&Ae('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(eo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},qt.oi=function(a){this.partManager.oi(a);var y=this;Oc(a,function(x){kc(y,x)}),(a instanceof ti||a instanceof br&&a.placeholder!==null)&&a.v(),a.data!==null&&Oc(a,function(x){ly(y.partManager,x)}),ba(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()},qt.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()},qt.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))}qt.Is=function(a,y){if(y===void 0&&(y=!1),kn(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 mn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},qt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},$e.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 qn;if(a!==null)if(kn(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 Tn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof br&&(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 wn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Xl(a,y,x.value,b,E);else x instanceof ti||y.add(x,a.Pd(E,x,x.location))}function Fh(a,y,x,b,E){if(y!==null&&y.count!==0){var et=Me.alloc(),nt=Me.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=Nn(),ht=Nn(),pt=y.iterator,yt=Me.alloc();pt.next();){var Mt=pt.key,zt=pt.value;if(Mt.Zc()){var Zt=Pp(a,Mt,y);Zt!==null?st.push(new rt(Mt,zt,Zt)):(!E||Mt.canMove())&&(Zt=zt.point,et.assign(Zt),a.computeMove(Mt,et.add(nt),b,yt),Mt.location=yt,zt.shifted===void 0&&(zt.shifted=new Me),zt.shifted.assign(yt.re(Zt)))}else pt.key instanceof wn&&ht.push(pt.sa)}for(Me.free(yt),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 Me),Mt.node.location=et.add(Mt.Su.shifted);for(E=Me.alloc(),pt=Me.alloc(),Mt=ht.length,zt=0;zt<Mt;zt++){var Qt=ht[zt];if(Zt=Qt.key,Zt instanceof wn)if(Zt.suspendsRouting){Zt.Tg=null,yt=Zt.fromNode;var ie=Zt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ie=Qt.value.point,Zt.dragComputation===null)y.add(Zt,a.Pd(b,Zt,nt)),ah(Zt,nt.x-ie.x,nt.y-ie.y);else{Qt=Me.allocAt(0,0),(yt=Zt.i(0))&&yt.w()&&Qt.assign(yt);var Ee=yt=Me.alloc().assign(Qt).add(nt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ee=Me.alloc(),ad(a,Zt,yt,Ee,b)),yt.assign(Zt.dragComputation(Zt,yt,Ee)).re(Qt),y.add(Zt,a.Pd(b,Zt,yt)),ah(Zt,yt.x-ie.x,yt.y-ie.y),Me.free(Qt),Me.free(yt),Ee!==yt&&Me.free(Ee)}else yt!==null&&(E.assign(yt.location),Ee=y.I(yt),Ee!==null&&E.re(Ee.point)),ie!==null&&(pt.assign(ie.location),Ee=y.I(ie),Ee!==null&&pt.re(Ee.point)),yt!==null&&ie!==null?E.Xa(pt)?(yt=Qt.value.point,ie=et,ie.assign(E),ie.re(yt),y.add(Zt,a.Pd(b,Zt,E)),ah(Zt,ie.x,ie.y)):(Zt.suspendsRouting=!1,Zt.bb()):(Qt=Qt.value.point,yt=yt!==null?E:ie!==null?pt:nt,y.add(Zt,a.Pd(b,Zt,yt)),ah(Zt,yt.x-Qt.x,yt.y-Qt.y))}else(Zt.fromNode===null||Zt.toNode===null)&&(yt=Qt.value.point,y.add(Zt,a.Pd(b,Zt,nt)),ah(Zt,nt.x-yt.x,nt.y-yt.y))}Me.free(et),Me.free(nt),Me.free(E),Me.free(pt),Rn(st),Rn(ht),x||(Xo(a),Dh(a,y))}}$e.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Me),b.assign(y),a===null)return b;var E=y,et=x.isGridSnapEnabled;et&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Me.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&&Me.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=Me.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),Me.free(et)}}function sd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof wn&&(y.suspendsRouting=!0)}function Dh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof wn&&(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}qt=$e.prototype,qt.Pd=function(a,y,x){if(x===void 0)return new yu(zi);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new yu(new Me(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&&Ae("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ae("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ae("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ae("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&&Ae("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}qt.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(eo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},qt.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(eo,"layers",this,null,a,null,et),this.N(),0>b&&this.Ya(),this},qt.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(eo,"layers",this,null,a,null,et+1),this.N(),0>b&&this.Ya(),this},qt.kA=function(a){if(a.diagram!==this&&Ae("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()}}},qt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},qt.Yw=function(a){return this.pf===null&&(this.pf=new yn),this.pf.add(a),this.model.Pe(a),this},qt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},qt.Pe=function(a){return this.zg===null&&(this.zg=new yn),this.zg.add(a),this},qt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},qt.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)},qt.cb=function(a,y,x,b,E,et,nt){et===void 0&&(et=null),nt===void 0&&(nt=null);var st=new Bi;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)},qt.g=function(a,y,x,b,E){this.cb(Di,a,this,y,x,b,E)},$e.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===eo){var nt=a.object,st=a.newParam,ht=a.newValue;if(nt instanceof vn)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 fo&&(ht.isRow?c1(nt,st,y?void 0:ht):f1(nt,st,y?void 0:ht));else if(nt instanceof Fo){var yt=a.oldParam===!0;typeof st=="number"&&ht instanceof tr&&(y?(ht.isSelected=!1,ht.isHighlighted=!1,ht.Wb(),nt.pc(yt?st:-1,ht,yt)):nt.oi(st,ht,yt))}else nt instanceof $e?typeof st=="number"&&ht instanceof Fo&&(y?this.Wa.mb(st):(ht.Xe(this),this.Wa.Gb(st,ht))):Ae("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===vo){var Mt=a.object,zt=a.oldParam,Zt=a.oldValue;if(Mt instanceof vn)typeof zt=="number"&&Zt instanceof ze?y?Mt.Gb(zt,Zt):Mt.pc(zt):typeof zt=="number"&&Zt instanceof fo&&(Zt.isRow?c1(Mt,zt,y?Zt:void 0):f1(Mt,zt,y?Zt:void 0));else if(Mt instanceof Fo){var Qt=a.newParam===!0;typeof zt=="number"&&Zt instanceof tr&&(y?0>Mt.Pa.indexOf(Zt)&&Mt.oi(zt,Zt,Qt):(Zt.isSelected=!1,Zt.isHighlighted=!1,Zt.Wb(),Mt.pc(Qt?zt:-1,Zt,Qt)))}else Mt instanceof $e?typeof zt=="number"&&Zt instanceof Fo&&(y?(Zt.Xe(this),this.Wa.Gb(zt,Zt)):this.Wa.mb(zt)):Ae("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==qa&&Ae("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},$e.prototype.Ea=function(a){return this.undoManager.Ea(a)},$e.prototype.eb=function(a){return this.undoManager.eb(a)},$e.prototype.Kf=function(){return this.undoManager.Kf()},$e.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}},$e.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},$e.prototype.rp=function(){this.partManager.rp()};function kp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,jl(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,jl(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(Oa)&&(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=Me.allocAt(a.pa.x+st/y-st/x,a.pa.y+ht/y-ht/x),a.position=et,Me.free(et),a.Ca=x,jl(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))}}$e.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!==ua||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Oi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Bg(E,this)),this.vb||this.invalidateViewport(a,y),Nl(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 Nl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Cn.alloc(),E=1,et=1,nt=x.O.s,st=nt.length,ht=0;ht<st;ht++){var pt=nt[ht],yt=Math.abs(pt.interval);2>yt||(m0(pt.figure)?et=et*yt/Ge.vx(et,yt):E=E*yt/Ge.vx(E,yt))}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=Me.alloc(),Ge.No(a,nt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Cn.free(b),x.part.location=y,Me.free(y)}}$e.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)}},$e.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))},$e.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),kn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof tr||Ae("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 tr||Ae("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},$e.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()}},qt=$e.prototype,qt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},qt.Jz=function(a){a=new mn().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 tr||Ae("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},qt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,et=Me.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)),Me.free(et);return}Ae("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):Ae("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Me.free(et)},qt.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)},qt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},qt.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)},qt.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,yt=y.dx,Mt=y.dy,zt=x*nt+b*ht+yt;y=x*st+b*pt+Mt;var Zt=E*nt+b*ht+yt;return a=E*st+b*pt+Mt,b=x*nt+et*ht+yt,x=x*st+et*pt+Mt,nt=E*nt+et*ht+yt,E=E*st+et*pt+Mt,et=Math.min(zt,Zt),zt=Math.max(zt,Zt),Zt=Math.min(y,a),y=Math.max(y,a),et=Math.min(et,b),zt=Math.max(zt,b),Zt=Math.min(Zt,x),y=Math.max(y,x),et=Math.min(et,nt),zt=Math.max(zt,nt),Zt=Math.min(Zt,E),y=Math.max(y,E),new on(et,Zt,zt-et,y-Zt)},qt.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),mr(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 ui}$e.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),Xo(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;wr(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 za){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof mn&&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 za){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 mn&&x.Bg.remove(a),Ed(b));break}}}}}$e.prototype.Wd=function(){this.partManager.Wd()},$e.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},$e.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},$e.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},$e.prototype.Vb=function(a){return this.partManager.Vb(a)},$e.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},qt=$e.prototype,qt.Lc=function(a){return this.partManager.Lc(a)},qt.ii=function(a){return this.partManager.ii(a)},qt.Kc=function(a){return this.partManager.Kc(a)},qt.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:In(Xn(y)))},qt.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:In(Xn(y)))};function jl(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function 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())}qt.Va=function(){if(this.Zi){var a=on.alloc();Tp(this,this.computeBounds(a)),on.free(a)}},qt.rz=function(){for(var a=new mn,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},qt.qz=function(){return this.ai.iterator},qt.Uz=function(a){Xo(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),Xo(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)}}qt.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 qn,b=new qn;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;Ae("Unknown DiagramEvent name: "+y)}qt.Bj=function(a,y){return a=ud(this,a),a!==null&&a.add(y),this},qt.am=function(a,y){a=ud(this,a),a!==null&&a.remove(y)},qt.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}qt.Yj=function(a,y){return cd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},$e.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 Tn&&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 br)for(y=y.memberParts;y.next();)E=y.value,E instanceof Tn&&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)}$e.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=wr(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))}$e.prototype.ug=function(){this.vk!==-1&&(bn.clearTimeout(this.vk),this.vk=-1)},$e.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=Me.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(zi)||(y=new Me(y.x+et.x/E,y.y+et.y/E)),on.free(b),Me.free(et),y},qt=$e.prototype,qt.Cs=function(){return null},qt.av=function(){return null},qt.bs=function(a,y){this.pj.add(a,y)},qt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof br&&(y.$p=null)})};function gf(a,y,x){function b(){var yt=+new Date;for(et=!0,nt.reset();nt.next();)if(!nt.value[0].al){et=!1;break}et||yt-pt>ht?y(x,E,st):bn.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 bn.requestAnimationFrame(function(){b()}),null}qt.Wz=function(a){return Vi?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},qt.Jx=function(a){return a===void 0&&(a={}),gf(this,this.Xz,a)},qt.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"&&Ae('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"&&Ae("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 Cn(1/0,1/0):new Cn(2e3,2e3));var st=y.position||null,ht=y.parts||null,pt=y.padding===void 0?1:y.padding,yt=y.background||null,Mt=y.omitTemporary;Mt===void 0&&(Mt=!0);var zt=y.document||document,Zt=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 Br(pt):pt instanceof Br||Ae("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,zt,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=zt,b.hs=Zt,id(a,b.context,pt,new Cn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Cn(Mt.width,Mt.height),a.Ca,a.pa,ht,yt,Qt,y),a.Xm=!0,Mt.context);var Ee=a.Pp,we=a.documentBounds.copy();if(we.Fv(a.yb),Qt)for(var je=a.Wa.s,Oe=je.length,De=0;De<Oe;De++){var _e=je[De];if(_e.visible&&_e.isTemporary){_e=_e.Pa.s;for(var Je=_e.length,En=0;En<Je;En++){var _n=_e[En];_n.isInDocumentBounds&&_n.isVisible()&&(_n=_n.actualBounds,_n.w()&&we.ed(_n))}}}if(je=new Me(we.x,we.y),ht!==null){for(Oe=new on(0,0,0,0),De=!0,_e=ht.iterator,_e.reset();_e.next();)Je=_e.value,Je instanceof tr&&(En=Je.layer,En!==null&&!En.visible||En!==null&&!Qt&&En.isTemporary||!Je.isVisible()||(Je=Je.actualBounds,Je.w()&&(De?(De=!1,Oe.assign(Je)):Oe.ed(Je))));we.width=Oe.width,we.height=Oe.height,je.x=Oe.x,je.y=Oe.y}return st!==null&&st.w()&&(je=st,et||(et=Ee)),Oe=st=0,pt!==null&&(st=pt.left+pt.right,Oe=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-Oe))),E!==null&&et!==null?(et==="NaN"&&(et=Ee),E.w()?(E=_e,we=De):isNaN(De)?(E=_e,we=we.height*et):(E=we.width*et,we=De)):E!==null?E.w()?(et=Math.min(_e/we.width,De/we.height),E=_e,we=De):isNaN(De)?(et=_e/we.width,E=_e,we=we.height*et):(et=De/we.height,E=we.width*et,we=De):et!==null?et==="NaN"&&nt.w()?(et=Math.min((nt.width-st)/we.width,(nt.height-Oe)/we.height),et>Ee?(et=Ee,E=we.width,we=we.height):(E=nt.width,we=nt.height)):(E=we.width*et,we=we.height*et):(et=Ee,E=we.width,we=we.height),pt!==null?(E+=st,we+=Oe):pt=new Br(0),nt!==null&&(Ee=nt.width,nt=nt.height,isNaN(Ee)&&(Ee=2e3),isNaN(nt)&&(nt=2e3),isFinite(Ee)&&(E=Math.min(E,Ee)),isFinite(nt)&&(we=Math.min(we,nt))),Mt.width=Math.ceil(E),Mt.height=Math.ceil(we),x==="SVG"?b===null?null:(b.resize(Mt.width,Mt.height,Mt.width,Mt.height),b.ownerDocument=zt,b.hs=Zt,id(a,b.context,pt,new Cn(Math.ceil(E),Math.ceil(we)),et,je,ht,yt,Qt,y),b.context):(a.Xm=!1,id(a,ie,pt,new Cn(Math.ceil(E),Math.ceil(we)),et,je,ht,yt,Qt,y),a.Xm=!0,Mt.context)}Ze.Object.defineProperties($e.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 Ol(this,bn.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 Ol(this,bn.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(bn,"resize",this.Ov,!1),this.removeEventListener(bn,"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)&&Mn(a,"0 <= value <= 1",$e,"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&&Mn(a,">= 0",$e,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Mn(a,">= 0",$e,"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 Mn(a,">= 0",$e,"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&&Ae("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(bn,"pointermove",this.dk,!0),this.addEventListener(bn,"pointerdown",this.ui,!0),this.addEventListener(bn,"pointerup",this.fk,!0),this.addEventListener(bn,"pointerout",this.ek,!0),this.addEventListener(bn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(bn,"wheel",this.$j,!0),this.addEventListener(bn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(bn,"pointermove",this.dk,!0),this.removeEventListener(bn,"pointerdown",this.ui,!0),this.removeEventListener(bn,"pointerup",this.fk,!0),this.removeEventListener(bn,"pointerout",this.ek,!0),this.removeEventListener(bn,"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(bn,"wheel",this.$j,!0),this.removeEventListener(bn,"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=Me.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?jl(this):(this.vb=!0,a=this.scale,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)}Me.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!==vn.Grid&&Ae("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),Nl(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),jl(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Ae("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 Br(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!==ua&&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()||Ae("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()||Ae("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Mn(a,"> 0",$e,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Mn(a,"> 0",$e,"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 Br(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&&Ae("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!==ho&&a!==pd&&Ae("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 Cn(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 Br(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ze.Object.defineProperties($e,{licenseKey:{get:function(){return Ip.jc()},set:function(a){Ip.add(a.replace(/\s/g,""))}},version:{get:function(){return Mc}}}),$e.prototype.makeImageData=$e.prototype.Jx,$e.prototype.makeImage=$e.prototype.Wz,$e.prototype.cacheGroupExternalLinks=$e.prototype.Fu,$e.prototype.addRenderer=$e.prototype.bs,$e.prototype.makeSVG=$e.prototype.av,$e.prototype.makeSvg=$e.prototype.Cs,$e.prototype.stopAutoScroll=$e.prototype.ug,$e.prototype.doAutoScroll=$e.prototype.gs,$e.prototype.isUnoccupied=$e.prototype.Yj,$e.prototype.raiseDiagramEvent=$e.prototype.R,$e.prototype.removeDiagramListener=$e.prototype.am,$e.prototype.addDiagramListener=$e.prototype.Bj,$e.prototype.findTreeRoots=$e.prototype.yz,$e.prototype.layoutDiagram=$e.prototype.Uz,$e.prototype.findTopLevelGroups=$e.prototype.qz,$e.prototype.findTopLevelNodesAndLinks=$e.prototype.rz,$e.prototype.ensureBounds=$e.prototype.Va,$e.prototype.findLinksByExample=$e.prototype.ls,$e.prototype.findNodesByExample=$e.prototype.ms,$e.prototype.findLinkForData=$e.prototype.Kc,$e.prototype.findNodeForData=$e.prototype.ii,$e.prototype.findPartForData=$e.prototype.Lc,$e.prototype.findLinkForKey=$e.prototype.findLinkForKey,$e.prototype.findNodeForKey=$e.prototype.Vb,$e.prototype.findPartForKey=$e.prototype.findPartForKey,$e.prototype.rebuildParts=$e.prototype.Wd,$e.prototype.transformViewToDoc=$e.prototype.Ps,$e.prototype.transformRectDocToView=$e.prototype.zA,$e.prototype.transformDocToView=$e.prototype.op,$e.prototype.centerRect=$e.prototype.es,$e.prototype.scrollToRect=$e.prototype.tv,$e.prototype.scroll=$e.prototype.scroll,$e.prototype.highlightCollection=$e.prototype.Jz,$e.prototype.highlight=$e.prototype.Iz,$e.prototype.selectCollection=$e.prototype.rA,$e.prototype.select=$e.prototype.select,$e.prototype.updateAllRelationshipsFromData=$e.prototype.rp,$e.prototype.updateAllTargetBindings=$e.prototype.updateAllTargetBindings,$e.prototype.commit=$e.prototype.commit,$e.prototype.rollbackTransaction=$e.prototype.Kf,$e.prototype.commitTransaction=$e.prototype.eb,$e.prototype.startTransaction=$e.prototype.Ea,$e.prototype.raiseChanged=$e.prototype.g,$e.prototype.raiseChangedEvent=$e.prototype.cb,$e.prototype.removeChangedListener=$e.prototype.ik,$e.prototype.addChangedListener=$e.prototype.Pe,$e.prototype.removeModelChangedListener=$e.prototype.mA,$e.prototype.addModelChangedListener=$e.prototype.Yw,$e.prototype.findLayer=$e.prototype.Qj,$e.prototype.removeLayer=$e.prototype.kA,$e.prototype.addLayerAfter=$e.prototype.Cy,$e.prototype.addLayerBefore=$e.prototype.Ww,$e.prototype.addLayer=$e.prototype.Al,$e.prototype.moveParts=$e.prototype.moveParts,$e.prototype.copyParts=$e.prototype.Kj,$e.prototype.removeParts=$e.prototype.Is,$e.prototype.remove=$e.prototype.remove,$e.prototype.add=$e.prototype.add,$e.prototype.clearDelayedGeometries=$e.prototype.bx,$e.prototype.setProperties=$e.prototype.nm,$e.prototype.attach=$e.prototype.Du,$e.prototype.set=$e.prototype.set,$e.prototype.resetInputOptions=$e.prototype.Sx,$e.prototype.setInputOption=$e.prototype.sA,$e.prototype.getInputOption=$e.prototype.Ql,$e.prototype.resetRenderingHints=$e.prototype.Tx,$e.prototype.setRenderingHint=$e.prototype.Xx,$e.prototype.getRenderingHint=$e.prototype.Gf,$e.prototype.maybeUpdate=$e.prototype.bd,$e.prototype.requestUpdate=$e.prototype.$b,$e.prototype.delayInitialization=$e.prototype.Xy,$e.prototype.isUpdateRequested=$e.prototype.Pz,$e.prototype.invalidateDocumentBounds=$e.prototype.Ya,$e.prototype.findObjectsNear=$e.prototype.og,$e.prototype.findPartsNear=$e.prototype.mz,$e.prototype.findObjectsIn=$e.prototype.Cf,$e.prototype.findPartsIn=$e.prototype.ux,$e.prototype.findObjectsAt=$e.prototype.ji,$e.prototype.findPartsAt=$e.prototype.lz,$e.prototype.findObjectAt=$e.prototype.ic,$e.prototype.findPartAt=$e.prototype.Ol,$e.prototype.focusObject=$e.prototype.zz,$e.prototype.alignDocument=$e.prototype.Jy,$e.prototype.zoomToRect=$e.prototype.BA,$e.prototype.zoomToFit=$e.prototype.zoomToFit,$e.prototype.diagramScroll=$e.prototype.kx,$e.prototype.focus=$e.prototype.focus;var dd=new qn,om=null,Vi=bn.document!==void 0,Ec=null,Ih="",ua=new dn($e,"None",0),ds=new dn($e,"Uniform",1),Rh=new dn($e,"UniformToFill",2),mf=new dn($e,"CycleAll",10),jp=new dn($e,"CycleNotDirected",11),Op=new dn($e,"CycleNotDirectedFast",12),Fp=new dn($e,"CycleNotUndirected",13),Dp=new dn($e,"CycleDestinationTree",14),Bp=new dn($e,"CycleSourceTree",15),$u=new dn($e,"DocumentScroll",1),vf=new dn($e,"InfiniteScroll",2),qu=new dn($e,"TreeParentCollapsed",21),ho=new dn($e,"AllParentsCollapsed",22),pd=new dn($e,"AnyParentsCollapsed",23),Ip=new yn,Mc="2.3.10",Tc="image",yf=null,am=!1;function ta(){if(Vi){var a=bn.document.createElement("canvas"),y=a.getContext("2d"),x=sn("7ca11abfd022028846");y[x]=sn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Fn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Sr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ge.za],E=1;5>E;E++)y[sn("7ca11abfd7330390")](sn(b[E-1]),10,15*E);for(y[x]=sn("39f046ebb36e4b"),x=1;5>x;x++)y[sn("7ca11abfd7330390")](sn(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}}$e.className="Diagram",$e.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=bn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof $e?y.H:null},$e.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},$e.useDOM=function(a){Vi=a?bn.document!==void 0:!1},$e.isUsingDOM=function(){return Vi},$e.None=ua,$e.Uniform=ds,$e.UniformToFill=Rh,$e.CycleAll=mf,$e.CycleNotDirected=jp,$e.CycleNotDirectedFast=Op,$e.CycleNotUndirected=Fp,$e.CycleDestinationTree=Dp,$e.CycleSourceTree=Bp,$e.DocumentScroll=$u,$e.InfiniteScroll=vf,$e.TreeParentCollapsed=qu,$e.AllParentsCollapsed=ho,$e.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=bn[sn("76a715b2f73f148a")][sn("72ba13b5")]||"";if(a.Rc=!0,Vi){var b=$e[sn("76a115b6ed251eaf4692")];if(b)for(var E=Ip.iterator;E.next()&&(b=E.value,b=sn(b).split(sn("39e9")),!(6>b.length));){var et=sn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var nt=sn(Fn[sn("6cae19")]).split(".");if(et[0]>nt[0]||et[0]===nt[0]&&et[1]>=nt[1]){var st=bn[sn("74a900bae4370f8b51")][sn("6fbb13a1c2311e8a57")].toLowerCase();if(nt=st[sn("73a612b6fb191d")](sn("3aad1ab6e022098b4dc4")),et=sn(b[2]),-1<nt&&(st=st[sn("73a612b6fb191d")](et.toLowerCase()+"/"),a.Rc=!(-1<st&&st<nt),!a.Rc))break;for(nt=x[sn("76ad18b4f73e")],st=x[sn("73a612b6fb191d")](sn("35e7"))+2;st<nt;st++)y+=x[st];if(nt=y[sn("73a612b6fb191d")](et),0>nt&&et!==sn("7da71ca0ad381e90")&&(nt=y[sn("73a612b6fb191d")](sn("76a715b2ef3e149757"))),0>nt&&(nt=y[sn("73a612b6fb191d")](sn("76a715b2ef3e149757"))),0>nt&&(nt=y[sn("73a612b6fb191d")](sn("2bfa41fdb3784bca12"))),0>nt&&(nt=x[sn("73a612b6fb191d")](sn("7baa19a6f76c1988428554"))),a.Rc=!(0<=nt&&nt<y[sn("73a612b6fb191d")](sn("35"))||y[sn("73a612b6fb191d")](sn("35"))===-1),!a.Rc||x[sn("73a612b6fb191d")](sn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[sn("73a612b6fb191d")](et)),!a.Rc)||(nt=bn[sn("76a715b2f73f148a")][sn("69ad17a1e03e")],st=nt[sn("73a612b6fb191d")](sn("7fb002b6ed25128b4da25b2e")),-1<st&&(a.Rc=!(nt[sn("73a612b6fb191d")](et)>st),!a.Rc)))break;if(et[0]==="#"){nt=bn.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[sn("79a417a0f0181a8946")]=b,bn.document[sn("78a712aa")]){bn.document[sn("78a712aa")][sn("7bb806b6ed32388c4a875b")](nt),ht=bn.getComputedStyle(nt).getPropertyValue(sn("78a704b7e62456904c9b12701b6532a8"));var pt=bn.getComputedStyle(nt).getPropertyValue(sn("75b817b0ea2202"));if(bn.document[sn("78a712aa")][sn("68ad1bbcf533388c4a875b")](nt),ht){if(nt=bn[sn("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(sn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,et=0;et<document.styleSheets.length;et++){nt=document.styleSheets[et].rules||document.styleSheets[et].cssRules;for(var yt in nt)if(b===nt[yt].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(yt=x[sn("76ad18b4f73e")],E=x[sn("73a612b6fb191d")](sn("35e7"))+2;E<yt;E++)y+=x[E];x=y[sn("73a612b6fb191d")](sn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[sn("73a612b6fb191d")](sn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function yu(a){this.j=a===void 0?new Me:a,this.o=new Me}Ze.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 Cn(NaN,NaN).freeze(),this.gridSnapCellSpot=ni,this.gridSnapOrigin=new Me(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"||bn.Element&&a instanceof Element)var x=$e.call(this,a)||this;else x=$e.call(this)||this,y=a;return Ct(x),y&&x.nm(y),x}tn(Et,$e);function Ct(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=si,a.layout=new _o}Et.prototype.reset=function(){$e.prototype.reset.call(this),Ct(this)},Et.className="Palette";function Ot(a,y){if(typeof a=="string"||bn.Element&&a instanceof Element)var x=$e.call(this,a)||this;else x=$e.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 tr;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 Br(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 Me(st.x-nt.width/2,st.y-nt.height/2)}},x.Pf=function(){b.Ya(),ve(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&&ve(b)},x.autoScale=ds,x.vb=!1,y&&Object.assign(x,y),x}tn(Ot,$e),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),te(this)}finally{this.ta=a,this.ib=y}}}$e.prototype.redraw.call(this)},Ot.prototype.gc=function(){if(this.Ka===null&&Ae("No div specified"),this.ta===null&&Ae("No canvas specified"),!(this.ta instanceof Ol)&&(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?te(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 te(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),Nl(y,E),on.free(E),Xo(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 yt=vu(st,E),Mt=ht.scale,zt=on.alloc(),Zt=st.Pa.s,Qt=Zt.length,ie=0;ie<Qt;ie++){var Ee=Zt[ie];(b||Ee!==pt)&&st.Oj(E,Ee,ht,null,Mt,zt,!1)}on.free(zt),E.globalAlpha=yt}}}}}function ve(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=Cn.alloc();E.h(x.width,x.height),b.desiredSize=E,Cn.free(E),a=2/a.scale,b instanceof Tr&&(b.strokeWidth=a),y.location=new Me(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Ot.prototype.computeBounds=function(){var a=this.observed;if(a===null)return pa;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(),ve(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))},Ze.Object.defineProperties(Ot.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Ot&&Ae("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),ve(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),ve(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(){Ri.call(this),this.j=null}tn(Te,Ri),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 Me(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Me(a.x-this.j.x,a.y-this.j.y)),!0)},Te.prototype.doActivate=function(){this.j=null,Ri.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 Me(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Me(a.x-this.j.x,a.y-this.j.y)}}},Te.className="OverviewDraggingTool";function ke(){oi(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=pa,this.hb=!0,this.cg=null,this.ob=200}ke.prototype.toString=function(){return"CommandHandler"},ke.prototype.Xe=function(a){this.H=a},ke.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Xr?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()},ke.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ke.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Oi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ke.prototype.canStopCommand=function(){return!0},ke.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=""}},ke.prototype.canSelectAll=function(){return this.diagram.allowSelect},ke.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 mn,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=""}},ke.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ke.prototype.copySelection=function(){var a=this.diagram,y=new mn;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)},ke.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ke.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ke.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ke.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)},ke.prototype.pasteFromClipboard=function(){var a=new mn,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},ke.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 Me(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=""}},ke.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)},ke.prototype.undo=function(){this.diagram.undoManager.undo()},ke.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ke.prototype.redo=function(){this.diagram.undoManager.redo()},ke.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ke.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ua&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ke.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ua?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ke.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ua&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ke.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ua?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ke.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ke.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ke.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=pa):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),$f(y)},ke.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ke.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=Ie(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 Tn&&ht.isTreeExpanded&&(!(ht instanceof br)||ht.isSubGraphExpanded);)ht=E.pop();0<E.length?(ht instanceof tr&&y.tv(ht.actualBounds),ht instanceof Tn&&!ht.isTreeExpanded&&(ht.isTreeExpanded=!0),ht instanceof br&&!ht.isSubGraphExpanded&&(ht.isSubGraphExpanded=!0)):(ht instanceof tr&&y.es(ht.actualBounds),y.am("LayoutCompleted",nt)),y.eb("Scroll To Part")},nt=function(){wr(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 Ie(a,y,x){if(y.isVisible())return x;if(y instanceof ti)Ie(a,y.adornedPart,x);else if(y instanceof wn){var b=y.fromNode;b!==null&&Ie(a,b,x),y=y.toNode,y!==null&&Ie(a,y,x)}else y instanceof Tn&&(b=y.labeledLink,b!==null&&Ie(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Ie(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Ie(a,y,x));return x}ke.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof tr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ke.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 Tn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ke.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Tn&&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 Tn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ke.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 Tn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ke.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Tn)||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 Tn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ke.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 yt=E.iterator;yt.next();)if(pt.Td(yt.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 zt=st.iterator;zt.next();)if(!zt.value.Td(Mt)){E=!0;break}if(E)Mt=Mt.containingGroup;else break}if(x instanceof br)Hs(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Zt=y.copyNodeData(x);en(Zt)&&(y.xf(Zt),b=a.ii(Zt))}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=""}}}},ke.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function nn(a){var y=Nn();for(a=a.iterator;a.next();){var x=a.value;x instanceof wn||y.push(x)}a=new mn,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 Rn(y),a}ke.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof wn)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},ke.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 br&&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,yt=pt!==null&&pt.data!==null?x.wa(pt.data):void 0;nt.addAll(ht.memberParts);for(var Mt=nt.iterator;Mt.next();){var zt=Mt.value;if(zt.isSelected=!0,!(zt instanceof wn)){var Zt=zt.data;Zt!==null?x.mp(Zt,yt):zt.containingGroup=pt}}y.remove(ht)}}y.R("SelectionUngrouped",b,nt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ke.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 br))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof br&&y.canUngroup())return!0;return!1},ke.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=nn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},ke.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 br&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ke.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof br&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof br&&y.isSubGraphExpanded)return!0;return!1},ke.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 br&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ke.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof br&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof br&&!y.isSubGraphExpanded)return!0;return!1},ke.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 Si&&et.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ke.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 Si))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 Si&&x.editable}),a!==null))return!0;return!1},ke.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(Ir):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Me(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)}},ke.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)},ke.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 qn,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 wn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Ze.Object.defineProperties(ke.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||Ae("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}}}),ke.className="CommandHandler",Xg=function(){return new ke};function ze(){oi(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Me(NaN,NaN).freeze(),this.jd=to,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=Oo,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 pn,hn,Hn,Yn,or,Cr,Hr,jr,Yr,fi;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=Pn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ze.prototype.Vw=function(a){var y=this.Dh;if(kn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},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()},qt=ze.prototype,qt.qb=function(a){a.classType===wn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ae("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ze&&(this.stretch=a)},qt.toString=function(){return Bn(this.constructor)+"#"+bi(this)},qt.th=function(){this.A!==null&&(this.A.nc=!0)};function Nr(a){a.A===null?a.A=new wf:a.A.nc&&(a.A=a.A.copy())}qt.Xc=function(){if(this.ba===null){var a=new Rp;a.Xi=Wr,a.yj=Wr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},qt.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&&Uo(this)&&ki(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 qn),nt=et.undoManager.transactionLevel===0,a.startCondition===Nh?nt=!0:a.startCondition===Sc&&(nt=!1),nt?(et=new Zo,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 vn&&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 vn&&Oc(st,function(ht){ht.data!==null&&ht.l&16777216&&ht.La(y)})};function ki(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))}}qt.ks=function(a){return this.bindingId===a?this:null},qt.g=function(a,y,x){this.cb(Di,a,this,y,x)},qt.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 ko(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}qt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Vr(a.x,a.y,0,0,0,b.height)<=y||Vr(a.x,a.y,0,b.height,b.width,b.height)<=y||Vr(a.x,a.y,b.width,b.height,b.width,0)<=y||Vr(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},qt.se=function(){return!0},qt.ca=function(a){var y=Me.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Me.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=Go(x.x-nt*ht,x.y-nt*ht,x.width+et*ht,x.height+et*ht,y.x,y.y),Me.free(y),a}return E=!1,(this instanceof ti||this instanceof Tr?Go(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)),Me.free(y),E},qt.gh=function(a){var y=this.naturalBounds;return Go(0,0,y.width,y.height,a.x,a.y)},qt.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=Me.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)))),Me.free(E),on.free(y),b},qt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Me.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)))),Me.free(E),b},qt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Me.allocAt(0,0),E=Me.allocAt(0,x.height),et=Me.allocAt(x.width,x.height),nt=Me.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=Me.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)))),Me.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 Me.free(b),Me.free(E),Me.free(et),Me.free(nt),st},qt.ga=function(a,y){if(y===void 0&&(y=new Me),a instanceof nr){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},qt.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe,b=Me.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Ti(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Ti(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Ti(a,b.x,b.y,0,0),Me.free(b),a},qt.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},qt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},qt.qs=function(a,y){return y===void 0&&(y=new Me),y.assign(a),this.oe.Cd(y),y},qt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qt.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,yt=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),zt=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*yt+zt,y=x*st+b*pt+Mt,x=x*ht+b*yt+zt,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 vn;switch(Ra(this,!0)){case hn:nt=E=0,st&&(y=a=1/0);break;case pn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(nt=y);break;case Yn:isFinite(a)&&a>x&&(E=a),nt=0,st&&(y=1/0);break;case or: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()||Ae("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),co(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(),ba(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 Si&&(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()||Ae("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(et,this.Ib),Yl(this,!1),on.free(et)},qt=ze.prototype,qt.eh=function(){};function ha(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=Ra(a,!0),x===b&&et===E&&(y=hn),y){case hn:(x>b||et>E)&&(co(a,!0),a.measure(x>b?b:x,et>E?E:et,0,0));break;case pn:co(a,!0),a.measure(b,E,0,0);break;case Yn:co(a,!0),a.measure(b,et,0,0);break;case or:co(a,!0),a.measure(x,E,0,0)}}}qt.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(),ja(a,y)||(x.oh(),this.Pn(x)))},qt.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Tn&&H1(a,this))},qt.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 vn&&nh(this),nt=this.Ib;if(et){var st=this.Ib,ht=this.dc,pt=this.areaBackground,yt=this.Ma;pt===null&&yt===null||a.yc(),pt!==null&&(Zi(this,a,pt,!0,!0,ht,st),pt instanceof li&&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)),yt!==null&&(Zi(this,a,yt,!0,!1,ht,st),yt instanceof li&&yt.type===Ns?(a.beginPath(),a.rect(st.x,st.y,st.width,st.height),a.ng(yt)):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)&&(yt=pt.shadowOffset,Mt=Math.max(yt.y,yt.x)*y.scale*y.Mb),yt=this.Dd();var zt;if(!(zt=y.$i||!yt)){var Zt=this.naturalBounds;zt=this.wh;var Qt=zt.m11,ie=zt.m21,Ee=zt.dx,we=zt.m12,je=zt.m22,Oe=zt.dy,De,_e=De=0;zt=De*Qt+_e*ie+Ee;var Je=De*we+_e*je+Oe;De=Zt.width+Mt,_e=0;var En=De*Qt+_e*ie+Ee;De=De*we+_e*je+Oe,_e=Math.min(zt,En);var _n=Math.min(Je,De),Dn=Math.max(zt+0,En)-_e,Sn=Math.max(Je+0,De)-_n;zt=_e,Je=_n,De=Zt.width+Mt,_e=Zt.height+Mt,En=De*Qt+_e*ie+Ee,De=De*we+_e*je+Oe,_e=Math.min(zt,En),_n=Math.min(Je,De),Dn=Math.max(zt+Dn,En)-_e,Sn=Math.max(Je+Sn,De)-_n,zt=_e,Je=_n,De=0,_e=Zt.height+Mt,En=De*Qt+_e*ie+Ee,De=De*we+_e*je+Oe,_e=Math.min(zt,En),_n=Math.min(Je,De),Dn=Math.max(zt+Dn,En)-_e,Sn=Math.max(Je+Sn,De)-_n,zt=_e,Je=_n,Mt=y.viewportBounds,Zt=Mt.x,Qt=Mt.y,zt=!(zt>Mt.width+Zt||Zt>Dn+zt||Je>Mt.height+Qt||Qt>Sn+Je)}if(zt){if(zt=(this.l&256)!==0,a.clipInsteadOfFill&&(zt=!1),this instanceof Si&&(a.font=this.font),zt){if(Je=st.se()?st.naturalBounds:st.actualBounds,Dn=Math.max(nt.x,Je.x),Sn=Math.max(nt.y,Je.y),Mt=Math.min(nt.right,Je.right)-Dn,Zt=Math.min(nt.bottom,Je.bottom)-Sn,Qt=this.tb,Qt!==null&&(Dn=Qt.x,Sn=Qt.y,Mt=Qt.width,Zt=Qt.height),Dn>nt.width+nt.x||nt.x>Je.width+Je.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Dn,Sn,Mt,Zt),a.clip()}if(yt){if(!pt.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}ht&&(Je=pt.shadowOffset,a.Ev(Je.x*y.scale*this.scale*y.Mb,Je.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&&Do(this,st)&&this.shadowVisible===null&&Jl(a),this.Ma!==null&&(a.yc(),Ha(this,a,pt,nt)),ht&&(this.Ma!==null||this.areaBackground!==null||Do(this,st))?(il(this,!0),this.shadowVisible===null&&Jl(a)):il(this,!1),this.hh(a,y),ht&&this.l&512&&Su(a),yt&&ht&&Jl(a),zt&&(a.restore(),a.Vc(this instanceof vn)),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 Do(a,y){return y===null?!1:(nh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===vn.Auto||y.type===vn.Spot)&&y.Pb()!==a)}qt.Dv=function(){};function ps(a,y,x,b){Zi(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof li&&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 Ha(a,y,x,b){var E=a.kq(),et=x.x,nt=x.y,st=x.width+E,ht=x.height+E;Zi(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof li&&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 ea(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===vn.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&&ea(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 Si&&(y.font=a.font),y.yd=null;var nt=a.transform;et=a instanceof vn;var st=a instanceof vn?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]),Ha(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],Ha(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&&Do(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||Do(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),Ia(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&&ea(a,b,st),nt!==null&&nt(a,st)),!0)}qt.$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"+Ai++,st=a.Ud("clipPath",{id:et}),y=a.Ud("rect",{x:y,y:E,width:nt,height:x}),this instanceof vn&&(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"),Ia(a,b)};function Ia(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function na(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Xn(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()}}qt.hh=function(){},qt.lv=function(){this.Uc=!0},qt.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 vn?nh(this):!1;if(!(this instanceof vn&&E))if(this instanceof za){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 vn)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 vn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Ha(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},qt.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 Zi(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 yt=x.xe;else{var Mt=0,zt=0,Zt=0,Qt=0,ie=0,Ee=0;if(Ee=ie=0,E?(ie=nt.x,Ee=nt.y):b||(ie-=pt/2,Ee-=pt/2),Mt=x.start.x*st+x.start.offsetX,zt=x.start.y*ht+x.start.offsetY,Zt=x.end.x*st+x.end.offsetX,Qt=x.end.y*ht+x.end.offsetY,Mt+=ie,Zt+=ie,zt+=Ee,Qt+=Ee,x.type===wu)yt=y.createLinearGradient(Mt,zt,Zt,Qt);else if(x.type===Ns)Ee=isNaN(x.endRadius)?Math.max(st,ht)/2:x.endRadius,isNaN(x.startRadius)?(ie=0,Ee=Math.max(st,ht)/2):ie=x.startRadius,yt=y.createRadialGradient(Mt,zt,ie,Zt,Qt,Ee);else if(x.type===wd)try{yt=y.createPattern(x.pattern,"repeat")}catch(je){yt=null}if(x.type!==wd&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)yt.addColorStop(E.key,E.value);if(et&&(x.xe=yt,yt!==null&&(x.yk=st,x.ft=ht),yt===null&&x.type===wd&&x.yk!==-1)){x.yk=-1;var we=a.diagram;we!==null&&x.yk===-1&&wr(function(){we.redraw()},600)}}b?y.fillStyle=yt:y.strokeStyle=yt}}}qt.rg=function(a){if(a instanceof vn)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},qt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},qt.If=function(){for(var a=this instanceof vn?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)))}qt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Me.alloc();et.yi(y,x,b,E,Ir),a.rotate(this.Kb,et.x,et.y),Me.free(et)}},qt.v=function(a){if(!gs(this)){a===void 0&&(a=!1),co(this,!0),Yl(this,!0);var y=this.panel;y===null||a||y.v()}},qt.Uj=function(){gs(this)||(co(this,!0),Yl(this,!0))};function wa(a){if(!ba(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Tn&&a.Bd(),y.$b())),Yl(a,!0)}}qt.Uk=function(){!(this.l&2048)&&(Us(this,!0),Ls(this,!0))},qt.Wu=function(){Ls(this,!0)},qt.N=function(){var a=this.part;a!==null&&a.N()};function Ra(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===vn.Table?ml(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===vn.Auto&&b.Pb()===a?Bo(a,pn,y):x===Cr?b!==null?b.type===vn.Spot&&b.Pb()===a?Bo(a,pn,y):(x=b.defaultStretch,x===Cr?Bo(a,hn,y):Bo(a,x,y)):Bo(a,hn,y):Bo(a,x,y)}function ml(a,y,x,b){var E=a.stretch;if(E!==Cr)return Bo(a,E,b);var et=E=null;switch(y.stretch){case or:et=!0;break;case pn:et=!0}switch(x.stretch){case Yn:E=!0;break;case pn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Yn||y===pn),et===null&&(et=y===or||y===pn),E===!0&&et===!0?Bo(a,pn,b):E===!0?Bo(a,Yn,b):et===!0?Bo(a,or,b):Bo(a,hn,b)}function Bo(a,y,x){if(x)return y;if(y===hn||(x=a.desiredSize,x.w()))return hn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Yn)return hn;if(y===pn)return or}else{if(y===or)return hn;if(y===pn)return Yn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===or)return hn;if(y===pn)return Yn}else{if(y===Yn)return hn;if(y===pn)return or}return y}function il(a,y){a.l=y?a.l|512:a.l&-513}function Uo(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 co(a,y){a.l=y?a.l|8192:a.l&-8193}function ba(a){return(a.l&16384)!==0}function Yl(a,y){a.l=y?a.l|16384:a.l&-16385}qt.Gj=function(){this.svg=null},qt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},qt.Av=function(){},qt.zv=function(a){return this.pa=a,wa(this),!0},qt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},qt.kq=function(){return 0};function Ac(a){var y=a.part;if(y instanceof Tn&&(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 vn?a instanceof Tn?a.Bd():a.qm(a,function(x){Ac(x)}):Ac(a))}qt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new io(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Ae("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},qt.set=function(a){return Object.assign(this,a),this},qt.Du=function(a){return r0(this,a),this},qt.apply=function(a){return a(this),this},qt.nm=function(a){return bc(this,a),this},qt.pz=function(){return this.ih()},qt.ih=function(){for(var a=this instanceof vn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},qt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new qn),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=Pn(arguments),b=et(x),en(b)||Ae('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=bn.go[a]}if(b===null&&(E!=null&&E.constructor||Ae("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 $e&&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?Ae("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 Si)a.text=y;else if(a instanceof Tr)a.figure=y;else if(a instanceof za)a.source=y;else if(a instanceof vn)y=ol.I(y),y!==null&&(a.type=y);else if(a instanceof li){var x=On(li,y);x!==null?a.type=x:Ae("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof xn?(y=On(xn,y),y!==null&&(a.type=y)):a instanceof ei&&(y=On(ei,y),y!==null&&(a.type=y));else if(y instanceof ze)a instanceof vn||Ae("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof fo){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 fo?Em(b,y):Ae("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof dn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof yo)a.type=y;else if(y instanceof io)a instanceof ze||a instanceof fo?a.bind(y):Ae("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):Ae("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Po)a instanceof xn&&a.type===xn.o?a.figures.add(y):Ae("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof ei)a instanceof Po?a.segments.add(y):Ae("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ji)a instanceof $e||a instanceof br?a.layout=y:Ae("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 li){x=new er;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 fo){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Ae("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)&&Ae("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new er;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);bc(a,E)}else bc(a,y);else Ae('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}Ze.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&&(Nr(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&&(Nr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ka},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new _h),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ka&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new _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:zi},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&&(Nr(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&&(Nr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Mn(a,"0 <= value <= 1",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 li&&a.freeze(),Nr(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 li&&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 tr)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 Me(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&&Ae("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),Uo(this)&&(a=this.part,a!==null&&(ki(this,a,"width"),ki(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 Cn(a,this.jd.height).freeze(),this.v(),this instanceof Tr&&this.qc(),this.g("desiredSize",y,a),Uo(this)&&(a=this.part,a!==null&&ki(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 Cn(this.jd.width,a).freeze(),this.v(),this instanceof Tr&&this.qc(),this.g("desiredSize",y,a),Uo(this)&&(a=this.part,a!==null&&ki(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ar},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(),Nr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:wo},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(),Nr(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 Br(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&&(Nr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:hn},set:function(a){this.reshapingBehavior!==a&&(Nr(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()&&Ae("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),wa(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Mn(a,">= 0",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&&Mn(a,">= 1",ze,"columnSpan"),Nr(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Mn(a,">= 0",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&&Mn(a,">= 1",ze,"rowSpan"),Nr(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&&(Nr(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 Tn||Ae("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:Wr},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&&Mn(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&&Mn(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:Wr},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&&Mn(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&&Mn(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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&&(Nr(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 qn,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(vn,vn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof vn){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 nr(0,0,2.76142374915397,2.761423749153969),spot2:new nr(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 vn&&(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 vn&&(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 vn&&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 vn&&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 vn&&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 vn&&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:Ei},new io("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new io("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof ti&&(x=x.adornedPart),x instanceof Tn){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:Ei},new io("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 ti&&(x=x.adornedPart),x instanceof br){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(ti,vn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Me(0,3),shadowBlur:5},As(Tr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new nr(0,0,4,6),spot2:new nr(1,1,-4,-4)}))}),th("ContextMenu",function(){return As(ti,vn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Me(0,3),shadowBlur:5},new io("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),th("ContextMenuButton",function(){var a=As("Button");a.stretch=Yn;var y=a.fb("ButtonBorder");return y instanceof Tr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new nr(0,0,2,3),y.spot2=new nr(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 io("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 Cn(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:pn,geometryStretch:Hn,visible:!1},y!==""?new io("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof vn){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 Br(0,1,0,0)});var y=As(vn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Br(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=hn=new dn(ze,"None",0),ze.Default=Cr=new dn(ze,"Default",0),ze.Vertical=or=new dn(ze,"Vertical",4),ze.Horizontal=Yn=new dn(ze,"Horizontal",5),ze.Fill=pn=new dn(ze,"Fill",3),ze.Uniform=Hn=new dn(ze,"Uniform",1),ze.UniformToFill=Hr=new dn(ze,"UniformToFill",2),ze.FlipVertical=jr=new dn(ze,"FlipVertical",1),ze.FlipHorizontal=Yr=new dn(ze,"FlipHorizontal",2),ze.FlipBoth=fi=new dn(ze,"FlipBoth",3),ze.make=As,ze.getBuilders=function(){var a=new qn,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;Ae('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=Ar,this.o=wo,this.hg=Cr,this.ob=this.Bi=1,this.Pf=hn,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=zi,this.rr=ka,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=Oo,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 Ol(a,y,x){this.ownerDocument=a=y===void 0?bn.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)}Ol.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},Ol.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),en(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},Ol.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ol.prototype.focus=function(){this.Oa.focus()},Ol.prototype.mx=function(){this.ownerDocument=null},Ze.Object.defineProperties(Ol.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}}}),Ol.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=Ai++,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+")")}qt=es.prototype,qt.arc=function(a,y,x,b,E,et,nt,st){var ht=2*Math.PI,pt=ht-1e-6,yt=x*Math.cos(b),Mt=x*Math.sin(b),zt=a+yt,Zt=y+Mt,Qt=et?0:1;b=et?b-E:E-b,(1e-6<Math.abs(nt-zt)||1e-6<Math.abs(st-Zt))&&this.path.push(["L",zt,+Zt]),0>b&&(b=b%ht+ht),b>pt?(this.path.push(["A",x,x,0,1,Qt,a-yt,y-Mt]),this.path.push(["A",x,x,0,1,Qt,zt,Zt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Qt,a+x*Math.cos(E),y+x*Math.sin(E)])},qt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},qt.Se=function(a){this.addPath(this.path,this.rb,a||0)},qt.bezierCurveTo=function(a,y,x,b,E,et){this.path.push(["C",a,y,x,b,E,et])},qt.clearRect=function(){},qt.clip=function(){this.Yl.clipPath=!0},qt.closePath=function(){this.path.push(["z"])},qt.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},qt.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"+Ai++,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+")"},qt.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)}qt.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 yt=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(et=y,nt=x,st=b=yt,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:yt||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!==yt||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)},qt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},qt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},qt.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)},qt.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))},qt.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])},qt.lineTo=function(a,y){this.path.push(["L",a,y])},qt.moveTo=function(a,y){this.path.push(["M",a,y])},qt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},qt.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"])},qt.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},qt.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())},qt.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]+")"}qt.scale=function(a,y){this.rb.scale(a,y)},qt.translate=function(a,y){this.rb.translate(a,y)},qt.transform=function(){},qt.yc=function(){},qt.stroke=function(){qy(this,this.Yl)},qt.jk=function(){this.clipInsteadOfFill||this.stroke()},qt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},qt.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"+Ai++,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,yt){return pt.offset>yt.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",et[E]));return a.svg.appendChild(x),"url(#"+b+")"}qt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var et=Pn(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}qt.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}qt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},qt.fs=function(){this.Ct=!1},qt.Vc=function(){},qt.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",$e.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ol(this,bn.document));var y=new Ol(this,bn.document,!0);a===void 0&&(a=new er);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)},$e.prototype.makeSvg=$e.prototype.Cs,$e.prototype.av=function(a){return this.Cs(a)},$e.prototype.makeSVG=$e.prototype.av;function Ws(a,y,x,b){this.ownerDocument=y=y===void 0?bn.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},Ze.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&&Ae("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}qt=jc.prototype,qt.Wx=function(a){this.Z.imageSmoothingEnabled=a},qt.arc=function(a,y,x,b,E,et){this.Z.arc(a,y,x,b,E,et)},qt.beginPath=function(){this.Z.beginPath()},qt.Se=function(){},qt.bezierCurveTo=function(a,y,x,b,E,et){this.Z.bezierCurveTo(a,y,x,b,E,et)},qt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},qt.clip=function(){this.Z.clip()},qt.closePath=function(){this.Z.closePath()},qt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},qt.createPattern=function(a,y){return this.Z.createPattern(a,y)},qt.createRadialGradient=function(a,y,x,b,E,et){return this.Z.createRadialGradient(a,y,x,b,E,et)},qt.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)},qt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},qt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},qt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},qt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},qt.lineTo=function(a,y){this.Z.lineTo(a,y)},qt.measureText=function(a){return this.Z.measureText(a)},qt.moveTo=function(a,y){this.Z.moveTo(a,y)},qt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},qt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},qt.restore=function(){this.Z.restore()},qt.save=function(){this.yc(),this.Z.save()},jc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},qt=jc.prototype,qt.setTransform=function(a,y,x,b,E,et){this.El.setTransform(a,y,x,b,E,et)},qt.scale=function(a,y){this.El.scale(a,y)},qt.translate=function(a,y){this.El.translate(a,y)},qt.stroke=function(){this.Z.stroke()},qt.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}},qt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},qt.ng=function(a,y){if(a instanceof li&&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)},qt.jk=function(){this.Hm||this.stroke()},qt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},qt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},qt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},qt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},qt.Hs=function(){},Ze.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 li(a,y){xd||(c0(),xd=!0),oi(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=si,this.Lk=Ho):this.Lk=a===Ns?this.Qd=Ir:this.Qd=Wr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}li.prototype.copy=function(){var a=new li;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},qt=li.prototype,qt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},qt.ka=function(){return Object.isFrozen(this)&&Ae("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},qt.qb=function(a){a.classType===li&&(this.type=a)},qt.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+")"},qt.addColorStop=function(a,y){return this._isFrozen&&Ve(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Mn(a,"0 <= loc <= 1",li,"addColorStop:loc"),this.we===null&&(this.we=new qn),this.we.add(a,y),this.na===eh&&(this.type=wu),this.xe=null,this},qt.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)}qt.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=wi.j;var b=wi.u,E=wi.o,et=wi.F;return xu(y),x===void 0&&(x=.5),"rgba("+Math.round((wi.j-a)*x+a)+", "+Math.round((wi.u-b)*x+b)+", "+Math.round((wi.o-E)*x+E)+", "+Math.round((wi.F-et)*x+et)+")"}qt.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 li?a.Gx():(xu(a),128>(299*wi.j+587*wi.u+114*wi.o)/1e3):!1}function yd(a,y){switch(y){case bd:y=100*l0(wi.j);var x=100*l0(wi.u),b=100*l0(wi.o);return Pa.j=.4124564*y+.3575761*x+.1804375*b,Pa.u=.2126729*y+.7151522*x+.072175*b,Pa.o=.0193339*y+.119192*x+.9503041*b,Pa.F=wi.F,y=h0(Pa.j/Sd[0]),x=h0(Pa.u/Sd[1]),b=h0(Pa.o/Sd[2]),Ql.j=116*x-16,Ql.u=500*(y-x),Ql.o=200*(x-b),Ql.F=Pa.F,Ql.j=Math.min(100,Math.max(0,Ql.j+100*a)),a=(Ql.j+16)/116,y=a-Ql.o/200,Pa.j=Sd[0]*n1(Ql.u/500+a),Pa.u=Sd[1]*(Ql.j>cm*f0?Math.pow(a,3):Ql.j/cm),Pa.o=Sd[2]*n1(y),Pa.F=Ql.F,a=-.969266*Pa.j+1.8760108*Pa.u+.041556*Pa.o,y=.0556434*Pa.j+-.2040259*Pa.u+1.0572252*Pa.o,wi.j=255*u0((3.2404542*Pa.j+-1.5371385*Pa.u+-.4985314*Pa.o)/100),wi.u=255*u0(a/100),wi.o=255*u0(y/100),wi.F=Pa.F,wi.j=Math.round(wi.j),255<wi.j?wi.j=255:0>wi.j&&(wi.j=0),wi.u=Math.round(wi.u),255<wi.u?wi.u=255:0>wi.u&&(wi.u=0),wi.o=Math.round(wi.o),255<wi.o?wi.o=255:0>wi.o&&(wi.o=0),"rgba("+wi.j+", "+wi.u+", "+wi.o+", "+wi.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:Ae("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,wi.j=a[0],wi.u=a[1],wi.o=a[2],wi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,wi.j=0,wi.u=0,wi.o=0,wi.F=1)}}function s0(){var a=wi.j/255,y=wi.u/255,x=wi.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=wi.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 li||Ae("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Vi?new Ws(null,void 0,{willReadFrequently:!0}).context:null}Ze.Object.defineProperties(li.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=si:a===Ns&&(this.start=Ir)),this.end.Mc()&&(a===wu?this.end=Ho:a===Ns&&(this.end=Ir)),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&&Mn(a,">= zero",li,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ve(this,a),0>a&&Mn(a,">= zero",li,"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}}}),li.prototype.isDark=li.prototype.Gx,li.prototype.darkenBy=li.prototype.Wy,li.prototype.lightenBy=li.prototype.Vz,li.prototype.addColorStop=li.prototype.addColorStop;var f0=216/24389,cm=24389/27,Sd=[95.047,100,108.883],d0=null,wi=new zp,ms=new zp,Pa=new zp,Ql=new zp,xd=!1;li.className="Brush";var eh;li.Solid=eh=new dn(li,"Solid",0);var wu;li.Linear=wu=new dn(li,"Linear",1);var Ns;li.Radial=Ns=new dn(li,"Radial",2);var wd;li.Pattern=wd=new dn(li,"Pattern",4);var bd;li.Lab=bd=new dn(li,"Lab",5);var r1;li.HSL=r1=new dn(li,"HSL",6),li.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},li.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)},li.lighten=function(a){return t1(a)},li.lightenBy=t1,li.darken=function(a){return e1(a)},li.darkenBy=e1,li.mix=a0,li.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(){},Ze.Object.defineProperties(yo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return vn}}}),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"}tn(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 yt=pt.margin,Mt=yt.right+yt.left;yt=yt.top+yt.bottom,pt.measure(y,x,et,nt);var zt=pt.measuredBounds;Mt=Math.max(zt.width+Mt,0),yt=Math.max(zt.height+yt,0),zt=pt.position.x;var Zt=pt.position.y;isFinite(zt)||(zt=0),isFinite(Zt)||(Zt=0),pt instanceof Tr&&pt.isGeometryPositioned&&(pt=pt.strokeWidth/2,zt-=pt,Zt-=pt),Ti(E,zt,Zt,Mt,yt)}}},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 yt=et.strokeWidth/2;ht-=yt,pt-=yt}et.visible&&et.arrange(ht+st.left,pt+st.top,nt.width,nt.height)}};function dm(){this.xa="Base"}tn(dm,yo),dm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length;y=Nn(),et=bu(a);for(var ht=0;ht<st;ht++){var pt=b[ht];if(pt.visible||pt===et){var yt=Ra(pt,!1);if(yt!==hn&&yt!==Yn)y.push(pt);else{pt.measure(1/0,x,0,nt),yt=pt.margin,pt=pt.measuredBounds;var Mt=Math.max(pt.height+yt.top+yt.bottom,0);E.width+=Math.max(pt.width+yt.right+yt.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)&&(yt=ht.margin,st=yt.right+yt.left,yt=yt.top+yt.bottom,ht.measure(1/0,x,0,nt),ht=ht.measuredBounds,yt=Math.max(ht.height+yt,0),E.width+=Math.max(ht.width+st,0),E.height=Math.max(E.height,yt));Rn(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,yt=y[ht];if(yt.visible){var Mt=yt.measuredBounds,zt=yt.margin,Zt=zt.top+zt.bottom,Qt=et+E.bottom,ie=Mt.height,Ee=Ra(yt,!1);(isNaN(yt.desiredSize.height)&&Ee===pn||Ee===or)&&(ie=Math.max(x.height-Zt-Qt,0)),Zt=ie+Zt+Qt,Qt=yt.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Ir),nt&&(st-=Mt.width+zt.left+zt.right),yt.arrange(st+Qt.offsetX+zt.left,pt+Qt.offsetY+zt.top+(x.height*Qt.y-Zt*Qt.y),Mt.width,ie),nt||(st+=Mt.width+zt.left+zt.right)}}};function pm(){this.xa="Base"}tn(pm,yo),pm.prototype.measure=function(a,y,x,b,E,et){var nt=b.length;x=Nn();for(var st=bu(a),ht=0;ht<nt;ht++){var pt=b[ht];if(pt.visible||pt===st){var yt=Ra(pt,!1);if(yt!==hn&&yt!==or)x.push(pt);else{var Mt=pt.margin;yt=Mt.right+Mt.left,Mt=Mt.top+Mt.bottom,pt.measure(y,1/0,et,0),pt=pt.measuredBounds,Wo(E,Math.max(E.width,Math.max(pt.width+yt,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);Rn(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,yt=y[ht];if(yt.visible){var Mt=yt.measuredBounds,zt=yt.margin,Zt=zt.left+zt.right,Qt=et+E.right,ie=Mt.width,Ee=Ra(yt,!1);(isNaN(yt.desiredSize.width)&&Ee===pn||Ee===Yn)&&(ie=Math.max(x.width-Zt-Qt,0)),Zt=ie+Zt+Qt,Qt=yt.alignment,Qt.Xb()&&(Qt=a.defaultAlignment),Qt.sb()||(Qt=Ir),nt&&(st-=Mt.height+zt.bottom+zt.top),yt.arrange(pt+Qt.offsetX+zt.left+(x.width*Qt.x-Zt*Qt.x),st+Qt.offsetY+zt.top,ie,Mt.height),nt||(st+=Mt.height+zt.bottom+zt.top)}}};function gm(){this.xa="Base"}tn(gm,yo),gm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,yt=pt.right+pt.left,Mt=pt.top+pt.bottom;ht.measure(y,x,et,nt);var zt=ht.measuredBounds;et=zt.width,nt=zt.height;var Zt=Math.max(et+yt,0),Qt=Math.max(nt+Mt,0),ie=a.isClipping,Ee=on.allocAt(-pt.left,-pt.top,Zt,Qt),we=on.allocAt(0,0,et,nt);p0(ht,we,!0),et=we.width,nt=we.height;for(var je=!0,Oe=bu(a),De=0;De<st;De++){var _e=b[De];zt=y;var Je=x;if(_e!==ht&&(_e.visible||_e===Oe)){pt=_e.margin;var En=pt.left,_n=pt.top;switch(Zt=pt.right+pt.left,Qt=pt.top+pt.bottom,pt=Ra(_e,!1),pt){case pn:zt=et,Je=nt,_n=En=Qt=Zt=0;break;case Yn:zt=et,En=Zt=0;break;case or:Je=nt,_n=Qt=0}_e.measure(zt,Je,0,0),zt=_e.measuredBounds,Zt=Math.max(zt.width+Zt,0),Qt=Math.max(zt.height+Qt,0),pt=_e.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Ir);var Dn=_e.alignmentFocus;if(Dn.Xb()&&(Dn=Ir),Je=null,_e instanceof vn&&_e.$e!==""&&(Je=_e.fb(_e.$e),Je===_e&&(Je=null)),En=we.x-En,_n=we.y-_n,Je!==null){for(_e.arrange(0,0,zt.width,zt.height),zt=Je.actualBounds,zt=Me.allocAt(zt.x+(Dn.x*zt.width-Dn.offsetX),zt.y+(Dn.y*zt.height-Dn.offsetY)),Je=Je.panel;Je!==_e;)Je.transform.Ga(zt),Je=Je.panel;En+=pt.x*et+pt.offsetX-zt.x,_n+=pt.y*nt+pt.offsetY-zt.y,Me.free(zt)}else En+=pt.x*et+pt.offsetX-(Dn.x*zt.width+Dn.offsetX),_n+=pt.y*nt+pt.offsetY-(Dn.y*zt.height+Dn.offsetY);je?(je=!1,E.h(En,_n,Zt,Qt)):Ti(E,En,_n,Zt,Qt)}}switch(je?E.assign(Ee):ie?E.Uu(we.x,we.y,we.width,we.height):Ti(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(Ee),on.free(we),pt=ht.stretch,pt===Cr&&(pt=Ra(ht,!1)),pt){case hn:return;case pn:if(!isFinite(y)&&!isFinite(x))return;break;case Yn:if(!isFinite(y))return;break;case or:if(!isFinite(x))return}for(zt=ht.measuredBounds,et=zt.width,nt=zt.height,Zt=Math.max(et+yt,0),Qt=Math.max(nt+Mt,0),pt=ht.margin,we=on.allocAt(-pt.left,-pt.top,Zt,Qt),p0(ht,we,!0),et=we.width,nt=we.height,y=0;y<st;y++)x=b[y],x===ht||!x.visible&&x!==Oe||(pt=x.margin,Zt=pt.right+pt.left,Qt=pt.top+pt.bottom,zt=x.measuredBounds,Zt=Math.max(zt.width+Zt,0),Qt=Math.max(zt.height+Qt,0),yt=x.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Ir),x=x.alignmentFocus,x.Xb()&&(x=Ir),je?(je=!1,E.h(yt.x*et+yt.offsetX-(x.x*zt.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*zt.height+x.offsetY)-pt.top,Zt,Qt)):Ti(E,yt.x*et+yt.offsetX-(x.x*zt.width+x.offsetX)-pt.left,yt.y*nt+yt.offsetY-(x.y*zt.height+x.offsetY)-pt.top,Zt,Qt));je?E.assign(Ee):ie?E.Uu(we.x,we.y,we.width,we.height):Ti(E,Ee.x,Ee.y,Ee.width,Ee.height),on.free(we)},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,yt=ht-x.y;for(E.arrange(pt,yt,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 zt=pt.width,Zt=pt.height;yt=Mt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=Ir);var Qt=Mt.alignmentFocus;if(Qt.Xb()&&(Qt=Ir),pt=null,Mt instanceof vn&&Mt.$e!==""&&(pt=Mt.fb(Mt.$e),pt===Mt&&(pt=null)),pt!==null){var ie=pt.actualBounds;for(Qt=Me.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=yt.x*nt.width+yt.offsetX-Qt.x,yt=yt.y*nt.height+yt.offsetY-Qt.y,Me.free(Qt)}else pt=yt.x*nt.width+yt.offsetX-(Qt.x*zt+Qt.offsetX),yt=yt.y*nt.height+yt.offsetY-(Qt.y*Zt+Qt.offsetY);pt+=nt.x-x.x,yt+=nt.y-x.y,Mt.visible&&Mt.arrange(et+pt,ht+yt,zt,Zt)}}on.free(nt)};function p0(a,y,x){var b=null;if(a instanceof vn&&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"}tn(mm,yo),mm.prototype.measure=function(a,y,x,b,E,et,nt){var st=b.length,ht=a.Pb(),pt=ht.margin,yt=y,Mt=x,zt=pt.right+pt.left,Zt=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 Ee=Math.max(pt.width+zt,0);pt=Math.max(pt.height+Zt,0);var we=y0(ht),je=we.x*Ee+we.offsetX;we=we.y*pt+we.offsetY;var Oe=S0(ht),De=Oe.x*Ee+Oe.offsetX;for(Oe=Oe.y*pt+Oe.offsetY,isFinite(y)&&(yt=Math.max(Math.abs(je-De)-Qt,0)),isFinite(x)&&(Mt=Math.max(Math.abs(we-Oe)-Qt,0)),Qt=Cn.alloc(),Qt.h(0,0),a=bu(a),Oe=0;Oe<st;Oe++)we=b[Oe],we===ht||!we.visible&&we!==a||(pt=we.margin,Ee=pt.right+pt.left,je=pt.top+pt.bottom,we.measure(yt,Mt,0,0),pt=we.measuredBounds,Ee=Math.max(pt.width+Ee,0),pt=Math.max(pt.height+je,0),Qt.h(Math.max(Ee,Qt.width),Math.max(pt,Qt.height)));if(st===1)E.width=Ee,E.height=pt,Cn.free(Qt);else{switch(we=y0(ht),Oe=S0(ht),st=b=0,Oe.x!==we.x&&Oe.y!==we.y&&(b=Qt.width/Math.abs(Oe.x-we.x),st=Qt.height/Math.abs(Oe.y-we.y)),Cn.free(Qt),Qt=0,ie!==null&&(Qt=ie.strokeWidth*ie.scale,k0(ie)===Hn&&(b=st=Math.max(b,st))),b+=Math.abs(we.offsetX)+Math.abs(Oe.offsetX)+Qt,st+=Math.abs(we.offsetY)+Math.abs(Oe.offsetY)+Qt,ie=ht.stretch,ie===Cr&&(ie=Ra(ht,!1)),ie){case hn:nt=et=0;break;case pn:isFinite(y)&&(b=y),isFinite(x)&&(st=x);break;case Yn:isFinite(y)&&(b=y),nt=0;break;case or:et=0,isFinite(x)&&(st=x)}ht.Uj(),ht.measure(b,st,et,nt),E.width=ht.measuredBounds.width+zt,E.height=ht.measuredBounds.height+Zt}},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 yt=y0(b),Mt=S0(b),zt=yt.y*E.height+yt.offsetY,Zt=Mt.x*E.width+Mt.offsetX;for(Mt=Mt.y*E.height+Mt.offsetY,et.x=yt.x*E.width+yt.offsetX,et.y=zt,Ti(et,Zt,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),yt=Math.max(pt.height+nt.top+nt.bottom,0),zt=st.alignment,zt.Xb()&&(zt=a.defaultAlignment),zt.sb()||(zt=Ir),ht=et.width*zt.x+zt.offsetX-ht*zt.x+nt.left+et.x,nt=et.height*zt.y+zt.offsetY-yt*zt.y+nt.top+et.y,st.visible&&(Go(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"}tn(vm,yo),vm.prototype.measure=function(a,y,x,b,E){for(var et=b.length,nt=Nn(),st=Nn(),ht=0;ht<et;ht++){var pt=b[ht],yt=pt instanceof vn?pt:null;if(yt!==null&&nh(yt)&&pt.visible){st.push(yt);for(var Mt=yt.O.s,zt=Mt.length,Zt=0;Zt<zt;Zt++){var Qt=Mt[Zt];yt.type===vn.TableRow?Qt.row=pt.row:yt.type===vn.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=[],Ee=0;Ee<et;Ee++){var we=nt[Ee];we.visible&&(co(we,!0),Yl(we,!0),ie[we.row]||(ie[we.row]=[]),ie[we.row][we.column]||(ie[we.row][we.column]=[]),ie[we.row][we.column].push(we))}Rn(nt);var je=Nn(),Oe=Nn(),De=Nn(),_e={count:0},Je={count:0},En=y,_n=x,Dn=a.rowDefs,Sn=a.colDefs,un=null;et=Dn.length;for(var xr=0;xr<et;xr++)un=Dn[xr],un!==void 0&&(un.actual=0);et=Sn.length;for(var fr=0;fr<et;fr++)un=Sn[fr],un!==void 0&&(un.actual=0);for(var ri=ie.length,yi=0,Eo=0;Eo<ri;Eo++)ie[Eo]&&(yi=Math.max(yi,ie[Eo].length));var No=Math.min(a.topIndex,ri-1),ca=Math.min(a.leftIndex,yi-1),Mo=0;ri=ie.length;for(var fh=bu(a),oo=0;oo<ri;oo++)if(ie[oo]){yi=ie[oo].length;var wl=a.Fb(oo);wl.actual=0;for(var fa=wl.oc=0;fa<yi;fa++)if(ie[oo][fa]){var dh=a.Eb(fa);je[fa]===void 0&&(dh.actual=0,dh.oc=0,je[fa]=!0);for(var Ss=ie[oo][fa],Zs=Ss.length,is=0;is<Zs;is++){var Ka=Ss[is];if(Ka.visible||Ka===fh){var qh=1<Ka.rowSpan||1<Ka.columnSpan;qh&&(oo<No||fa<ca||Oe.push(Ka));var bl=Ka.margin,Vd=bl.right+bl.left,os=bl.top+bl.bottom,da=ml(Ka,wl,dh,!1),Mg=Ka.desiredSize,Df=!isNaN(Mg.height),Bl=!isNaN(Mg.width)&&Df;if(qh||da===hn||Bl||oo<No||fa<ca||(_e[fa]!==void 0||da!==pn&&da!==Yn||(_e[fa]=-1,_e.count++),Je[oo]!==void 0||da!==pn&&da!==or||(Je[oo]=-1,Je.count++),De.push(Ka)),Ka.measure(1/0,1/0,0,0),!(oo<No||fa<ca)){var Za=Ka.measuredBounds,Gc=Math.max(Za.width+Vd,0),as=Math.max(Za.height+os,0);if(Ka.rowSpan===1&&(da===hn||da===Yn)){un=a.Fb(oo);var tc=un.Wc();Mo=Math.max(as-un.actual,0),Mo+tc>_n&&(Mo=Math.max(_n-tc,0));var zv=un.oa===0;un.oc=un.oc+Mo,un.actual=un.oa+Mo,_n=Math.max(_n-(Mo+(zv?tc:0)),0)}if(Ka.columnSpan===1&&(da===hn||da===or)){un=a.Eb(fa);var Tg=un.Wc();Mo=Math.max(Gc-un.actual,0),Mo+Tg>En&&(Mo=Math.max(En-Tg,0));var Gy=un.oa===0;un.oc=un.oc+Mo,un.actual=un.oa+Mo,En=Math.max(En-(Mo+(Gy?Tg:0)),0)}qh&&Ka.Uj()}}}}}Rn(je);var au=0,ku=0;et=a.columnCount;for(var Bf=0;Bf<et;Bf++){var ec=Sn[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=Dn[Kd];nc!==void 0&&(ku+=isNaN(nc.Hc)?nc.oc:nc.Hc,nc.oc!==0&&(ku+=nc.Wc()))}En=Math.max(y-au,0);var su=_n=Math.max(x-ku,0),ph=En;et=De.length;for(var Xa=0;Xa<et;Xa++){var Il=De[Xa],Gv=a.Fb(Il.row),Eu=a.Eb(Il.column),Zd=Il.measuredBounds,Pl=Il.margin,Uc=Pl.right+Pl.left,Rl=Pl.top+Pl.bottom;_e[Il.column]=Eu.oc===0&&_e[Il.column]!==void 0?Math.max(Zd.width+Uc,_e[Il.column]):null,Je[Il.row]=Gv.oc===0&&Je[Il.row]!==void 0?Math.max(Zd.height+Rl,Je[Il.row]):null}var If=0,Xd=0,cl;for(cl in Je)cl!=="count"&&(If+=Je[cl]);for(cl in _e)cl!=="count"&&(Xd+=_e[cl]);for(var zo=Cn.alloc(),Lg=0;Lg<et;Lg++){var Aa=De[Lg];if(Aa.visible||Aa===fh){var ao=a.Fb(Aa.row),Na=a.Eb(Aa.column),Mu=0;isFinite(Na.width)?Mu=Na.width:(isFinite(En)&&_e[Aa.column]!==null?Xd===0?Mu=Na.actual+En:Mu=_e[Aa.column]/Xd*ph:_e[Aa.column]!==null?Mu=En:Mu=Na.actual||En,Mu=Math.max(0,Mu-Na.Wc()));var gh=0;switch(isFinite(ao.height)?gh=ao.height:(isFinite(_n)&&Je[Aa.row]!==null?If===0?gh=ao.actual+_n:gh=Je[Aa.row]/If*su:Je[Aa.row]!==null?gh=_n:gh=ao.actual||_n,gh=Math.max(0,gh-ao.Wc())),zo.h(Math.max(Na.minimum,Math.min(Mu,Na.maximum)),Math.max(ao.minimum,Math.min(gh,ao.maximum))),da=ml(Aa,ao,Na,!1),da){case Yn:zo.height=Math.max(zo.height,ao.actual+_n);break;case or:zo.width=Math.max(zo.width,Na.actual+En)}var Wc=Aa.margin,Uy=Wc.right+Wc.left,Uv=Wc.top+Wc.bottom;Aa.Uj(),Aa.measure(zo.width,zo.height,Na.minimum,ao.minimum);var Yd=Aa.measuredBounds,Hc=Math.max(Yd.width+Uy,0),Rf=Math.max(Yd.height+Uv,0);isFinite(En)&&(Hc=Math.min(Hc,zo.width)),isFinite(_n)&&(Rf=Math.min(Rf,zo.height));var Ya=0;Ya=ao.actual,ao.actual=Math.max(ao.actual,Rf),ao.oc=Math.max(ao.oc,Rf),Mo=ao.actual-Ya,_n=Math.max(_n-Mo,0),Je[Aa.row]===null&&(su=Math.max(su-Mo,0)),Ya=Na.actual,Na.actual=Math.max(Na.actual,Hc),Na.oc=Math.max(Na.oc,Hc),Mo=Na.actual-Ya,En=Math.max(En-Mo,0),_e[Aa.column]===null&&(ph=Math.max(ph-Mo,0))}}Rn(De);var Tu=Cn.alloc(),Cl=Nn(),Bs=Nn();if(et=Oe.length,et!==0){for(var rc=0;rc<ri;rc++)if(ie[rc]){yi=ie[rc].length;var Jd=a.Fb(rc);Cl[rc]=Jd.actual;for(var ic=0;ic<yi;ic++)if(ie[rc][ic]){var Wv=a.Eb(ic);Bs[ic]=Wv.actual}}}for(var Qd=0;Qd<et;Qd++){var Ji=Oe[Qd];if(Ji.visible||Ji===fh){var fl=a.Fb(Ji.row),Xs=a.Eb(Ji.column);switch(zo.h(Math.max(Xs.minimum,Math.min(y,Xs.maximum)),Math.max(fl.minimum,Math.min(x,fl.maximum))),da=ml(Ji,fl,Xs,!1),da){case pn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index])),Cl[fl.index]!==0&&(zo.height=Math.min(zo.height,Cl[fl.index]));break;case Yn:Bs[Xs.index]!==0&&(zo.width=Math.min(zo.width,Bs[Xs.index]));break;case or:Cl[fl.index]!==0&&(zo.height=Math.min(zo.height,Cl[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<Ji.rowSpan&&!(Ji.row+mh>=a.rowCount);mh++)un=a.Fb(Ji.row+mh),Mo=0,Mo=da===pn||da===or?Math.max(un.minimum,Cl[Ji.row+mh]===0?un.maximum:Math.min(Cl[Ji.row+mh],un.maximum)):Math.max(un.minimum,isNaN(un.Hc)?un.maximum:Math.min(un.Hc,un.maximum)),Tu.height+=Mo,ss+=un.minimum;for(var Ys=1;Ys<Ji.columnSpan&&!(Ji.column+Ys>=a.columnCount);Ys++)un=a.Eb(Ji.column+Ys),Mo=0,Mo=da===pn||da===Yn?Math.max(un.minimum,Bs[Ji.column+Ys]===0?un.maximum:Math.min(Bs[Ji.column+Ys],un.maximum)):Math.max(un.minimum,isNaN(un.Hc)?un.maximum:Math.min(un.Hc,un.maximum)),Tu.width+=Mo,Hv+=un.minimum;zo.width+=Tu.width,zo.height+=Tu.height;var $d=Ji.margin,oc=$d.right+$d.left,Ag=$d.top+$d.bottom;Ji.measure(zo.width,zo.height,Hv,ss);for(var qd=Ji.measuredBounds,_l=Math.max(qd.width+oc,0),Vc=Math.max(qd.height+Ag,0),ac=0,tp=0;tp<Ji.rowSpan&&!(Ji.row+tp>=a.rowCount);tp++)un=a.Fb(Ji.row+tp),ac+=un.total||0;if(ac<Vc){var vh=Vc-ac,lu=Vc-ac;if(Ji.spanAllocation!==null)for(var yh=Ji.spanAllocation,Lu=0;Lu<Ji.rowSpan&&!(0>=vh)&&!(Ji.row+Lu>=a.rowCount);Lu++){un=a.Fb(Ji.row+Lu);var Sh=un.oa||0,Kc=yh(Ji,un,lu);un.actual=Math.min(un.maximum,Sh+Kc),un.oa!==Sh&&(vh-=un.oa-Sh)}for(;0<vh;){var kl=un.oa||0;if(isNaN(un.height)&&un.maximum>kl&&(un.actual=Math.min(un.maximum,kl+vh),un.oa!==kl&&(vh-=un.oa-kl)),un.index===0)break;un=a.Fb(un.index-1)}}for(var _f=0,xh=0;xh<Ji.columnSpan&&!(Ji.column+xh>=a.columnCount);xh++)un=a.Eb(Ji.column+xh),_f+=un.total||0;if(_f<_l){var zf=_l-_f,Wy=_l-_f;if(Ji.spanAllocation!==null)for(var Au=Ji.spanAllocation,Zc=0;Zc<Ji.columnSpan&&!(0>=zf)&&!(Ji.column+Zc>=a.columnCount);Zc++){un=a.Eb(Ji.column+Zc);var Ng=un.oa||0,Hy=Au(Ji,un,Wy);un.actual=Math.min(un.maximum,Ng+Hy),un.oa!==Ng&&(zf-=un.oa-Ng)}for(;0<zf;){var Vv=un.oa||0;if(isNaN(un.width)&&un.maximum>Vv&&(un.actual=Math.min(un.maximum,Vv+zf),un.oa!==Vv&&(zf-=un.oa-Vv)),un.index===0)break;un=a.Eb(un.index-1)}}}}Rn(Oe),Cn.free(Tu),Cn.free(zo),Cl!==void 0&&Rn(Cl),Bs!==void 0&&Rn(Bs);var Gf=0,Uf=0,Kv=a.desiredSize,gx=a.maxSize;da=Ra(a,!0);var jg=ku=au=0,Og=0;et=a.columnCount;for(var Zv=0;Zv<et;Zv++)Sn[Zv]!==void 0&&(un=a.Eb(Zv),isFinite(un.width)?(jg+=un.width,jg+=un.Wc()):Mm(un)===Hp?(jg+=un.oa,jg+=un.Wc()):un.oa!==0&&(au+=un.oa,au+=un.Wc()));isFinite(Kv.width)?Gf=Math.min(Kv.width,gx.width):Gf=da!==hn&&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++)Sn[Xv]!==void 0&&(un=a.Eb(Xv),isFinite(un.width)||Mm(un)===Hp||(un.actual=un.oa*$x),un.position=E.width,un.oa!==0&&(E.width+=un.oa,E.width+=un.Wc()));et=a.rowCount;for(var Yv=0;Yv<et;Yv++)Dn[Yv]!==void 0&&(un=a.Fb(Yv),isFinite(un.height)?(Og+=un.height,Og+=un.Wc()):Mm(un)===Hp?(Og+=un.oa,Og+=un.Wc()):un.oa!==0&&(ku+=un.oa,ku+=un.Wc()));isFinite(Kv.height)?Uf=Math.min(Kv.height,gx.height):Uf=da!==hn&&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++)Dn[Jv]!==void 0&&(un=a.Fb(Jv),isFinite(un.height)||Mm(un)===Hp||(un.actual=un.oa*qx),un.position=E.height,un.oa!==0&&(E.height+=un.oa,E.height+=un.Wc()));et=st.length;for(var Vy=0;Vy<et;Vy++){var Fg=st[Vy],Ky=0,Zy=0;Fg.type===vn.TableRow?(Ky=E.width,un=a.Fb(Fg.row),Zy=un.actual):(un=a.Eb(Fg.column),Ky=un.actual,Zy=E.height),Fg.measuredBounds.h(0,0,Ky,Zy),co(Fg,!1)}Rn(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,yt=0,Mt=0;Mt<pt;Mt++)nt[Mt]&&(yt=Math.max(yt,nt[Mt].length));ht=a.rowDefs,st=a.colDefs;var zt=Mt=0,Zt=Math.min(a.topIndex,pt-1);if(0<ht.length){for(;Zt!==pt&&(ht[Zt]===void 0||ht[Zt].oa===0);)Zt++;Zt=Math.max(Math.min(Zt,pt-1),0),Mt=-ht[Zt].position}var Qt=Math.min(a.leftIndex,yt-1);if(0<st.length){for(;Qt!==yt&&(st[Qt]===void 0||st[Qt].oa===0);)Qt++;Qt=Math.max(Math.min(Qt,yt-1),0),zt=-st[Qt].position}for(var ie=0,Ee=0;ie!==pt&&ht[ie]===void 0;)ie++;for(;Ee!==pt&&st[Ee]===void 0;)Ee++;yt=a.part,a.Fb(ie),a.Eb(Ee);for(var we=0;we<y.length;we++){var je=y[we];if(je instanceof vn&&je.visible&&nh(je)){if(je.type===vn.TableRow){st=a.Fb(je.row);var Oe=a.Eb(Ee)}else st=a.Fb(ie),Oe=a.Eb(je.column);ht=st.position+Mt+E,st.oa!==0&&(ht+=st.Io(Math.max(ie,Zt))),st=Oe.position+zt+et,Oe.oa!==0&&(st+=Oe.Io(Math.max(Ee,Qt))),Oe=je.measuredBounds,je.Uk(),je.actualBounds.ka();var De=je.actualBounds,_e=on.allocAt(De.x,De.y,De.width,De.height);De.x=je.type===vn.TableRow?et:st,De.y=je.type===vn.TableColumn?E:ht,De.width=Oe.width,De.height=Oe.height,je.actualBounds.freeze(),Yl(je,!1),ja(_e,De)||yt===null||(yt.oh(),je.Pn(yt)),on.free(_e)}}for(we=Cn.alloc(),je=0;je<pt;je++)if(nt[je]){for(yt=nt[je].length,Oe=a.Fb(je),ht=Oe.position+Mt+E,Oe.oa!==0&&(ht+=Oe.Io(Math.max(ie,Zt))),De=0;De<yt;De++)if(nt[je][De]){_e=a.Eb(De),st=_e.position+zt+et,_e.oa!==0&&(st+=_e.Io(Math.max(Ee,Qt)));for(var Je=nt[je][De],En=Je.length,_n=0;_n<En;_n++){var Dn=Je[_n],Sn=Dn.measuredBounds;we.h(0,0);for(var un=1;un<Dn.rowSpan&&!(je+un>=a.rowCount);un++){var xr=a.Fb(je+un);xr.oa!==0&&(we.height+=xr.total)}for(un=1;un<Dn.columnSpan&&!(De+un>=a.columnCount);un++)xr=a.Eb(De+un),xr.oa!==0&&(we.width+=xr.total);var fr=_e.oa+we.width,ri=Oe.oa+we.height;un=st,xr=ht;var yi=fr,Eo=ri,No=st,ca=ht,Mo=fr,fh=ri;st+fr>x.width&&(Mo=Math.max(x.width-st,0)),ht+ri>x.height&&(fh=Math.max(x.height-ht,0));var oo=Dn.alignment;if(oo.Xb()){oo=a.defaultAlignment,oo.sb()||(oo=Ir);var wl=oo.x,fa=oo.y,dh=oo.offsetX;oo=oo.offsetY;var Ss=_e.alignment,Zs=Oe.alignment;Ss.sb()&&(wl=Ss.x,dh=Ss.offsetX),Zs.sb()&&(fa=Zs.y,oo=Zs.offsetY)}else wl=oo.x,fa=oo.y,dh=oo.offsetX,oo=oo.offsetY;(isNaN(wl)||isNaN(fa))&&(fa=wl=.5,oo=dh=0),Ss=Sn.width,Zs=Sn.height;var is=Dn.margin,Ka=is.left+is.right,qh=is.top+is.bottom,bl=ml(Dn,Oe,_e,!1);!isNaN(Dn.desiredSize.width)||bl!==pn&&bl!==Yn||(Ss=Math.max(fr-Ka,0)),!isNaN(Dn.desiredSize.height)||bl!==pn&&bl!==or||(Zs=Math.max(ri-qh,0)),fr=Dn.maxSize,ri=Dn.minSize,Ss=Math.min(fr.width,Ss),Zs=Math.min(fr.height,Zs),Ss=Math.max(ri.width,Ss),Zs=Math.max(ri.height,Zs),fr=Zs+qh,un+=yi*wl-(Ss+Ka)*wl+dh+is.left,xr+=Eo*fa-fr*fa+oo+is.top,Dn.visible&&(Go(No,ca,Mo,fh,un,xr,Sn.width,Sn.height)?Dn.arrange(un,xr,Ss,Zs):Dn.arrange(un,xr,Ss,Zs,new on(No,ca,Mo,fh)))}}}for(Cn.free(we),a=0;a<b;a++)x=y[a],et=x instanceof vn?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"}tn(ym,yo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}tn(Sm,yo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}tn(xm,yo),xm.prototype.measure=function(a,y,x,b,E,et,nt){1<b.length&&Ae("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 yt=b.scale,Mt=st.width;st=st.height;var zt=Math.max(y-pt,0),Zt=Math.max(x-ht,0),Qt=1;a.viewboxStretch===Hn?Mt!==0&&st!==0&&(Qt=Math.min(zt/Mt,Zt/st)):Mt!==0&&st!==0&&(Qt=Math.max(zt/Mt,Zt/st)),Qt===0&&(Qt=1e-4),b.Ca*=Qt,yt!==b.scale&&(co(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=Ir),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"}tn(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),yt=Math.ceil(ht/b),Mt=a.gridOrigin,zt=Mt.x;Mt=Mt.y,y.save(),y.beginPath(),y.rect(0,0,st,ht),y.clip(),y.Se();for(var Zt=[],Qt=a.O.s,ie=Qt.length,Ee=0;Ee<ie;Ee++){var we=Qt[Ee],je=[];if(Zt.push(je),we.visible){var Oe=we.interval;if(!(0>Oe)){we=m0(we.figure);for(var De=0;De<ie;De++)if(De!==Ee){var _e=Qt[De];_e.visible&&m0(_e.figure)===we&&(_e=_e.interval,_e>Oe&&je.push(_e))}}}}for(Qt=a.O.s,ie=Qt.length,Ee=0;Ee<ie;Ee++){var Je=Qt[Ee];if(Je.visible&&(je=Je.interval||1,we=Math.abs(je),!(2>E*we*x))){if(Oe=Je.segmentIndex,(!isFinite(Oe)||isNaN(Oe))&&(Oe=0),0>Oe&&(Oe=we-Math.min(-Oe,we)),Oe=Math.round(Oe%we),we=Je.opacity,De=1,we!==1){if(we===0)continue;De=y.globalAlpha,y.globalAlpha=De*we}_e=Zt[Ee];var En=!1,_n=Je.strokeDashArray;if(_n!==null&&(En=!0,y.js(_n,Je.strokeDashOffset)),Je.figure==="LineV"&&Je.stroke!==null&&0<Je.strokeWidth){for(y.lineWidth=Je.strokeWidth,Zi(a,y,Je.stroke,!1,!1,et,nt),y.beginPath(),_n=Je=Math.floor((zt-E)/E);_n<=Je+pt;_n++){var Dn=_n*E+zt;0<=Dn&&Dn<=st&&wm(_n,je,Oe,_e)&&(y.moveTo(Dn,0),y.lineTo(Dn,ht))}y.stroke(),y.Se()}else if(Je.figure==="LineH"&&Je.stroke!==null&&0<Je.strokeWidth){for(y.lineWidth=Je.strokeWidth,Zi(a,y,Je.stroke,!1,!1,et,nt),y.beginPath(),_n=Je=Math.floor((Mt-b)/b);_n<=Je+yt;_n++)Dn=_n*b+Mt,0<=Dn&&Dn<=ht&&wm(_n,je,Oe,_e)&&(y.moveTo(0,Dn),y.lineTo(st,Dn));y.stroke(),y.Se()}else if(Je.figure==="BarV"&&Je.fill!==null)for(Zi(a,y,Je.fill,!0,!1,et,nt),Je=Je.width,isNaN(Je)&&(Je=E),Dn=_n=Math.floor((zt-E)/E);Dn<=_n+pt;Dn++){var Sn=Dn*E+zt;0<=Sn+Je&&Sn<=st&&wm(Dn,je,Oe,_e)&&y.fillRect(Sn,0,Je,ht)}else if(Je.figure==="BarH"&&Je.fill!==null)for(Zi(a,y,Je.fill,!0,!1,et,nt),Je=Je.height,isNaN(Je)&&(Je=b),Dn=_n=Math.floor((Mt-b)/b);Dn<=_n+yt;Dn++)Sn=Dn*b+Mt,0<=Sn+Je&&Sn<=ht&&wm(Dn,je,Oe,_e)&&y.fillRect(0,Sn,st,Je);En&&y.fs(),we!==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"}tn(bm,yo),bm.prototype.measure=function(a,y,x,b,E){var et=b.length;if(a instanceof ti||a instanceof wn){var nt=null,st=null;if(a instanceof wn&&(nt=a),a instanceof ti&&(st=a,nt=st.adornedPart,a.j===null&&(a.j=[])),nt instanceof wn){var ht=nt;if(et===0)Wo(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pt=a instanceof ti?null:nt.path;y=nt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var yt=ht.points,Mt=nt.pointsCount;st!==null?st.Ul(!1):nt!==null&&nt.Ul(!1),st=y.width;var zt=y.height,Zt=a.j;if(Zt.length=0,pt!==null){i1(a,st,zt,pt);var Qt=pt.measuredBounds;x.ed(Qt),Zt.push(Qt)}Qt=Sr.alloc();for(var ie=Me.alloc(),Ee=Me.alloc(),we=0;we<et;we++){var je=b[we];if(je!==pt)if(je.isPanelMain&&je instanceof Tr){i1(a,st,zt,je);var Oe=je.measuredBounds;x.ed(Oe),Zt.push(Oe)}else if(2>Mt)je.measure(1/0,1/0,0,0),Oe=je.measuredBounds,x.ed(Oe),Zt.push(Oe);else{var De=je.segmentIndex,_e=je.segmentFraction,Je=je.alignmentFocus;Je.Mc()&&(Je=Ir);var En=je.segmentOrientation,_n=je.segmentOffset;if(isNaN(De)){var Dn=ht.ua;Oe=Nn(),Dn.Qu(_e,Oe);var Sn=Me.allocAt(Oe[0],Oe[1]);if(Sn.add(ht.i(0)),Dn.type===xn.j?Sn.offset(-Dn.startX,-Dn.startY):(Dn=Dn.figures.first(),Dn!==null&&Sn.offset(-Dn.startX,-Dn.startY)),Dn=Oe[2],En!==ka){var un=ht.computeAngle(je,En,Dn);je.Kb=un}un=Sn.x-y.x;var xr=Sn.y-y.y;Me.free(Sn),Rn(Oe)}else if(De<-Mt||De>=Mt)Oe=Me.alloc(),ht.vg(),ht.computeMidPoint(Oe),Dn=ht.midAngle,En!==ka&&(un=ht.computeAngle(je,En,Dn),je.Kb=un),un=Oe.x-y.x,xr=Oe.y-y.y,Me.free(Oe);else{if(un=0,0<=De?(xr=yt.M(De),Oe=De<Mt-1?yt.M(De+1):xr):(un=Mt+De,xr=yt.M(un),Oe=0<un?yt.M(un-1):xr),xr.Xa(Oe)){0<=De?(Dn=0<De?yt.M(De-1):xr,un=De<Mt-2?yt.M(De+2):Oe):(Dn=un<Mt-1?yt.M(un+1):xr,un=1<un?yt.M(un-2):Oe),Sn=Dn.Bf(xr);var fr=Oe.Bf(un);Dn=Sn>fr+10?0<=De?Dn.ab(xr):xr.ab(Dn):fr>Sn+10?0<=De?Oe.ab(un):un.ab(Oe):0<=De?Dn.ab(un):un.ab(Dn)}else Dn=0<=De?xr.ab(Oe):Oe.ab(xr);En!==ka&&(un=ht.computeAngle(je,En,Dn),je.Kb=un),un=xr.x+(Oe.x-xr.x)*_e-y.x,xr=xr.y+(Oe.y-xr.y)*_e-y.y}je.measure(1/0,1/0,0,0),Oe=je.measuredBounds,Sn=je.naturalBounds;var ri=0;je instanceof Tr&&(ri=je.strokeWidth),fr=Sn.width+ri;var yi=Sn.height+ri;Qt.reset(),Qt.translate(-Oe.x,-Oe.y),Qt.scale(je.scale,je.scale),Qt.rotate(En===ka?je.angle:Dn,fr/2,yi/2),En!==tg&&En!==ng||Qt.rotate(90,fr/2,yi/2),En!==eg&&En!==rg||Qt.rotate(-90,fr/2,yi/2),En===$m&&(45<Dn&&135>Dn||225<Dn&&315>Dn)&&Qt.rotate(-Dn,fr/2,yi/2),Sn=new on(0,0,fr,yi),ie.xi(Sn,Je),Qt.Ga(ie),Je=-ie.x+ri/2*je.scale,je=-ie.y+ri/2*je.scale,Ee.assign(_n),ri=isNaN(_n.x);var Eo=isNaN(_n.y);if(ri||Eo){fr=fr/2+3,yi=yi/2+3;var No=45<=Dn&&135>=Dn,ca=225<=Dn&&315>=Dn;En===ka&&(No||ca)?(Ee.x=Eo?fr:_n.y,Ee.y=ri?yi:_n.x,No?0<=De||isNaN(De)&&.5>_e||!ri||(Ee.y=-yi):ca&&((0<=De||isNaN(De)&&.5>_e)&&ri&&(Ee.y=-yi),Eo&&(Ee.x=-fr))):(ri&&(Ee.x=0<=De||isNaN(De)&&.5>_e?fr:-fr),Eo&&(Ee.y=-yi),Ee.rotate(Dn))}else Ee.rotate(Dn);un+=Ee.x,xr+=Ee.y,Sn.set(Oe),Sn.h(un+Je,xr+je,Oe.width,Oe.height),Zt.push(Sn),x.ed(Sn)}}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),Wo(E,x.width||0,x.height||0),Sr.free(Qt),Me.free(ie),Me.free(Ee)}}}},bm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof ti||a instanceof wn){var b=a,E=null;a instanceof ti&&(E=a,b=E.adornedPart);var et=a instanceof ti?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 yt=nt[st];st++,pt.arrange(yt.x-a.jg.x,yt.y-a.jg.y,yt.width,yt.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof wn)for(et=a.labelNodes;et.next();){var Mt=a;nt=et.value,st=nt.segmentIndex,ht=nt.segmentFraction;var zt=nt.alignmentFocus;if(pt=nt.segmentOrientation,yt=nt.segmentOffset,isNaN(st)){var Zt=Mt.ua,Qt=Nn();Zt.Qu(ht,Qt);var ie=Me.allocAt(Qt[0],Qt[1]);ie.add(Mt.i(0)),Zt.type===xn.j||(Zt=Zt.figures.first()),ie.offset(-Zt.startX,-Zt.startY),Zt=Qt[2],pt!==ka&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=ie.x;var Ee=ie.y;Me.free(ie),Rn(Qt)}else if(st<-x||st>=x)Qt=Me.alloc(),Zt=Mt,Ee=Qt,Zt.vg(),Zt.computeMidPoint(Ee),Zt=Mt.midAngle,pt!==ka&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Qt.x,Ee=Qt.y,Me.free(Qt);else{if(ie=0,0<=st?(Qt=y.s[st],Ee=st<x-1?y.s[st+1]:Qt):(ie=x+st,Qt=y.s[ie],Ee=0<ie?y.s[ie-1]:Qt),Qt.Xa(Ee)){0<=st?(Zt=0<st?y.s[st-1]:Qt,ie=st<x-2?y.s[st+2]:Ee):(Zt=ie<x-1?y.s[ie+1]:Qt,ie=1<ie?y.s[ie-2]:Ee);var we=Zt.Bf(Qt),je=Ee.Bf(ie);Zt=we>je+10?0<=st?Zt.ab(Qt):Qt.ab(Zt):je>we+10?0<=st?Ee.ab(ie):ie.ab(Ee):0<=st?Zt.ab(ie):ie.ab(Zt)}else Zt=0<=st?Qt.ab(Ee):Ee.ab(Qt);pt!==ka&&(Mt=Mt.computeAngle(nt,pt,Zt),nt.angle=Mt),Mt=Qt.x+(Ee.x-Qt.x)*ht,Ee=Qt.y+(Ee.y-Qt.y)*ht}if(zt.ys())nt.location=new Me(Mt,Ee);else{zt.Mc()&&(zt=Ir),Qt=Sr.alloc(),Qt.reset(),Qt.scale(nt.scale,nt.scale),Qt.rotate(nt.angle,0,0);var Oe=nt.naturalBounds;ie=on.allocAt(0,0,Oe.width,Oe.height),we=Me.alloc(),we.xi(ie,zt),Qt.Ga(we),zt=-we.x,je=-we.y;var De=Oe.width,_e=Oe.height;Oe=Me.alloc(),Oe.assign(yt);var Je=isNaN(yt.x),En=isNaN(yt.y);if(Je||En){De=De/2+3,_e=_e/2+3;var _n=45<=Zt&&135>=Zt,Dn=225<=Zt&&315>=Zt;pt===ka&&(_n||Dn)?(Oe.x=En?De:yt.y,Oe.y=Je?_e:yt.x,_n?0<=st||isNaN(st)&&.5>ht||!Je||(Oe.y=-_e):Dn&&((0<=st||isNaN(st)&&.5>ht)&&Je&&(Oe.y=-_e),En&&(Oe.x=-De))):(Je&&(Oe.x=0<=st||isNaN(st)&&.5>ht?De:-De),En&&(Oe.y=-_e),Oe.rotate(Zt))}else Oe.rotate(Zt);Mt+=Oe.x,Ee+=Oe.y,Qt.pp(ie),zt+=ie.x,je+=ie.y,st=Me.allocAt(Mt+zt,Ee+je),nt.move(st),Me.free(st),Me.free(Oe),Me.free(we),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),Me.free(b)}};function i1(a,y,x,b){if(gs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof ti&&a.type===vn.Link&&a.adornedObject instanceof Tr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof wn&&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 ti&&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),co(b,!1)}}function Up(){this.xa="Base"}tn(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,yt=ht.top+ht.bottom;st.measure(y,x,et,nt);var Mt=st.measuredBounds,zt=new on(-ht.left,-ht.top,Math.max(Mt.width+pt,0),Math.max(Mt.height+yt,0));a.graduatedBounds.push(zt),E.assign(zt);for(var Zt=st.geometry,Qt=st.strokeWidth,ie=Zt.flattenedSegments,Ee=Zt.flattenedLengths,we=Zt.flattenedTotalLength,je=ie.length,Oe=0,De=0,_e=Nn(),Je=0;Je<je;Je++){var En=ie[Je],_n=[];De=Oe=0;for(var Dn=En.length,Sn=0;Sn<Dn;Sn+=2){var un=En[Sn],xr=En[Sn+1];if(Sn!==0){var fr=180*Math.atan2(xr-De,un-Oe)/Math.PI;0>fr&&(fr+=360),_n.push(fr)}Oe=un,De=xr}_e.push(_n)}if(a.graduatedIntervals===null){for(var ri=[],yi=a.O.s,Eo=yi.length,No=0;No<Eo;No++){var ca=yi[No],Mo=[];if(ri.push(Mo),ca.visible){var fh=ca.interval;if(!(0>fh)){for(var oo=0;oo<Eo;oo++)if(oo!==No){var wl=yi[oo];if(wl.visible&&ca.constructor===wl.constructor){var fa=wl.interval;fa>fh&&Mo.push(fa)}}}}}a.graduatedIntervals=ri}var dh=a.graduatedIntervals,Ss=a.O.s,Zs=Ss.length,is=0,Ka=0,qh=we;a.graduatedMarks=[];for(var bl,Vd=0;Vd<Zs;Vd++){var os=Ss[Vd];if(bl=[],os.visible&&os!==st){var da=Math.abs(os.interval),Mg=a.graduatedTickUnit;if(!(2>Mg*da*we/a.graduatedRange&&os.graduatedSkip===null)){var Df=Ee[0][0],Bl=0,Za=0;Ka=we*os.graduatedStart-1e-4,qh=we*os.graduatedEnd+1e-4;var Gc=Mg*da,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 Si&&!os.graduatedSkip(as,os)||os instanceof Tr&&!os.graduatedSkip(as,os))&&(is=(as-a.graduatedMin)*we/a.graduatedRange,is>we&&(is=we),Ka<=is&&is<=qh)){for(var su=_e[Bl][Za],ph=Ee[Bl][Za];Bl<Ee.length;){for(;is>Df&&Za<Ee[Bl].length-1;)Za++,su=_e[Bl][Za],ph=Ee[Bl][Za],Df+=ph;if(is<=Df)break;Bl++,Za=0,su=_e[Bl][Za],ph=Ee[Bl][Za],Df+=ph}var Xa=ie[Bl],Il=Xa[2*Za],Gv=Xa[2*Za+1],Eu=(is-(Df-ph))/ph,Zd=new Me(Il+(Xa[2*Za+2]-Il)*Eu+Qt/2-Zt.bounds.x,Gv+(Xa[2*Za+3]-Gv)*Eu+Qt/2-Zt.bounds.y);Zd.scale(st.scale,st.scale);t:{var Pl=su,Uc=_e[Bl];if(!(.5005>Eu&&.4995<Eu)){var Rl=Pl;if(.5>Eu?0<Za?Rl=Uc[Za-1]:Ge.$(Xa[0],Xa[Xa.length-2])&&Ge.$(Xa[1],Xa[Xa.length-1])&&(Rl=Uc[Uc.length-1]):.5<Eu&&(Za+1<Uc.length?Rl=Uc[Za+1]:Ge.$(Xa[0],Xa[Xa.length-2])&&Ge.$(Xa[1],Xa[Xa.length-1])&&(Rl=Uc[0])),Pl!==Rl){var If=Math.abs(Pl-Rl);if(180<If&&(Pl<Rl?Pl+=360:Rl+=360,If=Math.abs(Pl-Rl)),5e-4>Eu||.9995<Eu){su=(Pl+Rl)/2%360;break t}if(10>If){var Xd=1-Math.abs(.5-Eu);su=(Pl*Xd+Rl*(1-Xd))%360;break t}}}su=Pl}if(os instanceof Si){var cl="";os.graduatedFunction!==null?(cl=os.graduatedFunction(as,os),cl=cl!=null?cl.toString():""):cl=(+as.toFixed(2)).toString(),cl!==""&&bl.push({$l:Zd,angle:su,text:cl})}else bl.push({$l:Zd,angle:su})}as=Tg+au*Gc}}}a.graduatedMarks.push(bl)}Rn(_e);var zo=a.graduatedMarks;if(zo!==null)for(var Lg=b.length,Aa=0;Aa<Lg;Aa++){var ao=b[Aa],Na=zo[Aa];if(ao.visible&&ao!==st&&Na.length!==0){if(ao instanceof Tr){var Mu=a,gh=E,Wc=ao.alignmentFocus;Wc.Mc()&&(Wc=si);var Uy=ao.angle;ao.Kb=0,ao.measure(1/0,1/0,0,0),ao.Kb=Uy;var Uv=ao.measuredBounds,Yd=Uv.width,Hc=Uv.height,Rf=on.allocAt(0,0,Yd,Hc),Ya=Me.alloc();Ya.xi(Rf,Wc),on.free(Rf);for(var Tu=-Ya.x,Cl=-Ya.y,Bs=new on,rc=Na.length,Jd=0;Jd<rc;Jd++)for(var ic=Na[Jd],Wv=ic.$l.x,Qd=ic.$l.y,Ji=ic.angle,fl=0;4>fl;fl++){switch(fl){case 0:Ya.h(Tu,Cl);break;case 1:Ya.h(Tu+Yd,Cl);break;case 2:Ya.h(Tu,Cl+Hc);break;case 3:Ya.h(Tu+Yd,Cl+Hc)}Ya.rotate(Ji+ao.angle),Ya.offset(Wv,Qd),Jd===0&&fl===0?Bs.h(Ya.x,Ya.y,0,0):Bs.Ye(Ya),Ya.offset(-Wv,-Qd),Ya.rotate(-Ji-ao.angle)}Me.free(Ya),Mu.graduatedBounds!==null&&Mu.graduatedBounds.push(Bs),Ti(gh,Bs.x,Bs.y,Bs.width,Bs.height)}else if(ao instanceof Si){var Xs=a,Hv=E;Xs.temporaryTextBlock===null&&(Xs.temporaryTextBlock=new Si);var ss=Xs.temporaryTextBlock;S1(ss,ao);var mh=ao.alignmentFocus;mh.Mc()&&(mh=si);for(var Ys=ao.segmentOrientation,$d=ao.segmentOffset,oc=new on,Ag=0,qd=0,_l=0,Vc=0,ac=0,tp=Na.length,vh=0;vh<tp;vh++){var lu=Na[vh];Ag=lu.$l.x,qd=lu.$l.y,_l=lu.angle,ac=Vc=ao.angle,Ys!==ka&&(ac=Ys===qp||Ys===Qm?_l+ao.angle:_l,Vc=wn.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,kl=Sr.alloc();kl.reset(),kl.translate(-yh.x,-yh.y),kl.scale(ss.scale,ss.scale),kl.rotate(ac,Sh/2,Kc/2),Ys!==tg&&Ys!==ng||kl.rotate(90,Sh/2,Kc/2),Ys!==eg&&Ys!==rg||kl.rotate(-90,Sh/2,Kc/2),Ys===$m&&(45<_l&&135>_l||225<_l&&315>_l)&&kl.rotate(-_l,Sh/2,Kc/2);var _f=on.allocAt(0,0,Sh,Kc),xh=Me.alloc();xh.xi(_f,mh),kl.Ga(xh);var zf=-xh.x,Wy=-xh.y,Au=Me.alloc();Au.assign($d),isNaN(Au.x)&&(Au.x=Sh/2+3),isNaN(Au.y)&&(Au.y=-(Kc/2+3)),Au.rotate(_l),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),Me.free(Au),Me.free(xh),on.free(_f),Sr.free(kl)}Xs.graduatedBounds!==null&&Xs.graduatedBounds.push(oc),Ti(Hv,oc.x,oc.y,oc.width,oc.height)}co(ao,!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 yt=y[pt];st=E[pt],yt.visible&&yt!==b&&st.length!==0&&(st=et[nt],nt++,yt.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,yt=ht.length,Mt=0;Mt<yt;Mt++){var zt=ht[Mt],Zt=pt[Mt],Qt=Zt.length;if(zt.visible&&zt!==et&&Zt.length!==0){if(zt instanceof Tr){if(!(2>a.graduatedTickUnit*zt.interval*et.geometry.flattenedTotalLength/a.graduatedRange*nt&&zt.graduatedSkip===null)){var ie=zt.measuredBounds,Ee=zt.strokeWidth*zt.scale,we=zt.alignmentFocus;we.Mc()&&(we=si);for(var je=0;je<Qt;je++){var Oe=Zt[je].$l,De=Zt[je].angle,_e=we,Je=zt.Ab;Je.reset(),Je.translate(Oe.x+st.x,Oe.y+st.y),Je.rotate(De+zt.angle,0,0),Je.translate(-ie.width*_e.x+_e.offsetX+Ee/2,-ie.height*_e.y+_e.offsetY+Ee/2),Je.scale(zt.scale,zt.scale),Us(zt,!1),zt.wh.set(zt.Ab),zt.Kk=zt.scale,Ls(zt,!1),zt.gc(y,x),E&&(a.svg.appendChild(zt.svg),zt.svg=null),zt.Ab.reset()}}}else if(zt instanceof Si)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Si),ie=a.temporaryTextBlock,S1(ie,zt),Ee=0;Ee<Qt;Ee++)we=Zt[Ee],we.actualBounds&&we.measuredBounds&&we.naturalBounds&&(ie.ec=we.text||"",ie.Kb=we.Sz||0,ie.Gc=we.lineCount||0,je=we.lines,je!==void 0&&(ie.Cb=je[0],ie.Ih=je[1],ie.df=je[2],ie.Le=je[3],ie.Qc=je[4],ie.Qb=je[5],ie.ze=je[6]),we.naturalBounds&&(ie.dc=we.naturalBounds),we.actualBounds&&(je=we.actualBounds,ie.arrange(je.x,je.y,je.width,je.height)),je=we.actualBounds,ie.arrange(je.x,je.y,je.width,je.height),Oe=we.measuredBounds,we=we.naturalBounds,De=ie.Ab,De.reset(),De.translate(je.x+st.x,je.y+st.y),De.translate(-Oe.x,-Oe.y),ie.no(De,we.x,we.y,we.width,we.height),Us(ie,!1),ie.wh.set(ie.Ab),ie.Kk=ie.scale,Ls(ie,!1),ie.Ng=zt.part,ie.Me=zt.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 vn(a,y){if(ze.call(this),this.na=null,a===void 0)this.na=vn.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=vn.Position,y=a);this.na===null&&Ae("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===vn.Grid?1048576:0),this.O=new yn,this.yb=us,this.Tm=Oo,this.Uf=Cr,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Hn,this.jn=qi,this.kn=zi,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}tn(vn,ze),vn.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},vn.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},vn.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 Tn&&(et.Te=!0);var st=a.diagram;st!==null&&st.undoManager.isUndoingRedoing||et.cb(eo,"elements",a,null,E,null,nt)}}return a}return null},qt=vn.prototype,qt.toString=function(){return"Panel("+this.type.name+")#"+bi(this)},qt.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)},qt.hh=function(a,y){if(this.na===vn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===vn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===vn.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===vn.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 yt=pt.separatorStrokeWidth;isNaN(yt)&&(yt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=pt.separatorStroke;if(Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),yt!==0&&Mt!==null){Zi(a,y,Mt,!1,!1,nt,et),Mt=!1;var zt=pt.separatorDashArray;zt===null&&(zt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),zt!==null&&(Mt=!0,y.js(zt,0)),y.beginPath(),zt=pt.position+yt,x?zt>nt.height&&(yt-=zt-nt.height):zt>nt.width&&(yt-=zt-nt.width),pt=pt.position+yt/2,y.lineWidth=yt,yt=a.yb,x?(pt+=yt.top,zt=nt.width-yt.right,y.moveTo(yt.left,pt),y.lineTo(zt,pt)):(pt+=yt.left,zt=nt.height-yt.bottom,y.moveTo(pt,yt.top),y.lineTo(pt,zt)),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),yt=0;yt<et;yt++){var Mt=b[yt];if(Mt!==void 0&&Mt.background!==null&&Mt.coversSeparators!==E&&Mt.actual!==0){var zt=x?nt.height:nt.width;if(!(Mt.position>zt)){var Zt=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),Zt-=Qt,Qt=Mt.position+Qt,Zt+=Mt.actual,Qt+Zt>zt&&(Zt=zt-Qt),0>=Zt||(zt=a.yb,Zi(a,y,Mt.background,!0,!1,st,nt),x?y.fillRect(zt.left,Qt+zt.top,nt.width-(zt.left+zt.right),Zt):y.fillRect(Qt+zt.left,zt.top,Zt,nt.height-(zt.top+zt.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"}qt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},qt.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(this.type===vn.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===vn.Grid||this.na===vn.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},qt.nk=function(){return!0},qt.$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)},qt.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,yt=-nt.m21*st,Mt=nt.m11*st,zt=st*(nt.m21*nt.dy-nt.m22*nt.dx),Zt=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*yt+zt,st=a*pt+y*Mt+Zt,a=x*ht+b*yt+zt,ht=x*pt+b*Mt+Zt,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,yt=pt=0,Mt=1,Zt=zt=0),st=a*ht+y*yt+zt,a=a*pt+y*Mt+Zt,ht=x*ht+b*yt+zt,x=x*pt+b*Mt+Zt,E.h(ht,x),b=(ht-st)*(ht-st)+(x-a)*(x-a),pt=!1,Mt=this.O.s,Zt=Mt.length,yt=Me.alloc(),zt=null,y=1/0;var Qt=null,ie=this.isClipping&&this.na===vn.Spot;ie&&(Qt=Me.alloc(),zt=this.Pb(),(pt=zt.Sj(st,a,ht,x,Qt))&&(y=(st-Qt.x)*(st-Qt.x)+(a-Qt.y)*(a-Qt.y)));for(var Ee=0;Ee<Zt;Ee++){var we=Mt[Ee];we.visible&&we!==zt&&we.Sj(st,a,ht,x,yt)&&(pt=!0,we=(st-yt.x)*(st-yt.x)+(a-yt.y)*(a-yt.y),we<b&&(b=we,E.set(yt)))}return ie&&(y>b&&E.set(Qt),Me.free(Qt)),Me.free(yt),et&&E.transform(nt),pt},qt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ze.prototype.Gj.call(this)},qt.v=function(a){if(!gs(this)){ze.prototype.v.call(this,a),a=null,(this.na===vn.Auto||this.na===vn.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=Ra(E,!1);(E instanceof Ca||E instanceof vn||E instanceof Si||et!==hn)&&E.v(!0)}}}},qt.Uj=function(){if(!gs(this)){co(this,!0),Yl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},qt.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()}},qt.Wu=function(){Ls(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},qt.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),Wo(E,a,ht),Wo(this.naturalBounds,a,ht),this.Ge(0,0,a,ht)},qt.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}qt.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=Ra(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=hn),a){case hn:(y>x||et>b)&&(this.v(),this.measure(y>x?x:y,et>b?b:et,0,0));break;case pn:this.v(!0),this.measure(x+st,b+nt,0,0);break;case Yn:this.v(!0),this.measure(x+st,et+nt,0,0);break;case or:this.v(!0),this.measure(y+st,b+nt,0,0)}}this.na.arrange(this,E,this.jg)}},qt.gh=function(a){var y=this.naturalBounds,x=bu(this);if(Go(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Me.allocAt(0,0);b--;){var et=y[b];if((et.visible||et===x)&&(mr(E.set(a),et.transform),et.ca(E)))return Me.free(E),!0}return Me.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},qt.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},qt.qm=function(a,y){if(y(this,a),a instanceof vn){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 vn&&s1(a,et,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof vn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}qt.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof vn){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}qt.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 vn){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 vn?x=Math.max(x,h1(E)):E instanceof Tr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}qt.se=function(){return!(this.type===vn.TableRow||this.type===vn.TableColumn)};function nh(a){return a.type===vn.TableRow||a.type===vn.TableColumn}qt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),ba(this)))return null;var b=this.naturalBounds,E=1/this.Df(),et=this.se(),nt=et?a:mr(Me.allocAt(a.x,a.y),this.transform),st=this.diagram,ht=10,pt=5;if(st!==null&&(ht=st.Ql("extraTouchArea"),pt=ht/2),Go(-(pt*E),-(pt*E),b.width+ht*E,b.height+ht*E,nt.x,nt.y)){if(!this.isAtomic){E=this.O.s;var yt=E.length;if(st=Me.alloc(),pt=(ht=this.isClipping&&this.na===vn.Spot)?this.Pb():null,ht&&(pt.se()?mr(st.set(a),pt.transform):st.set(a),!pt.ca(st)))return Me.free(st),et||Me.free(nt),null;for(var Mt=bu(this);yt--;){var zt=E[yt];if((zt.visible||zt===Mt)&&(zt.se()?mr(st.set(a),zt.transform):st.set(a),!ht||zt!==pt)){var Zt=null;if(zt instanceof vn?Zt=zt.ic(st,y,x):zt.pickable===!0&&zt.ca(st)&&(Zt=zt),Zt!==null&&(y!==null&&(Zt=y(Zt)),Zt!==null&&(x===null||x(Zt))))return Me.free(st),et||Me.free(nt),Zt}}Me.free(st)}return this.background===null&&this.areaBackground===null?(et||Me.free(nt),null):(a=Go(0,0,b.width,b.height,nt.x,nt.y)?this:null,et||Me.free(nt),a)}return et||Me.free(nt),null},qt.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:mr(Me.allocAt(a.x,a.y),this.transform);if(E=Go(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=Me.alloc(),yt=bu(this);ht--;){var Mt=st[ht];if(Mt.visible||Mt===yt){Mt.se()?mr(pt.set(a),Mt.transform):pt.set(a);var zt=Mt;Mt=Mt instanceof vn?Mt:null,(Mt!==null?Mt.ji(pt,y,x,b):zt.ca(pt))&&zt.pickable!==!1&&(y!==null&&(zt=y(zt)),zt===null||x!==null&&!x(zt)||b.add(zt))}}Me.free(pt)}return et||Me.free(nt),E&&(this.background!==null||this.areaBackground!==null)}return et||Me.free(nt),!1},qt.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 yt=ht[pt];if(yt.visible||yt===st){var Mt=yt.actualBounds,zt=this.naturalBounds;Mt.x>zt.width||Mt.y>zt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height||(Mt=yt,yt=yt instanceof vn?yt:null,zt=Sr.alloc(),zt.set(nt),(yt!==null?yt.Cf(a,y,x,b,E,zt):ko(Mt,a,b,zt))&&(y!==null&&(Mt=y(Mt)),Mt===null||x!==null&&!x(Mt)||E.add(Mt)),Sr.free(zt))}}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 vn&&v0(nt,y,x,b),y!==null&&(nt=y(nt)),nt===null||x!==null&&!x(nt)||b.add(nt))}}}qt.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:mr(Me.allocAt(a.x,a.y),this.transform),pt=st?y:mr(Me.allocAt(y.x,y.y),this.transform),yt=ht.Bf(pt),Mt=0<ht.x&&ht.x<nt.width&&0<ht.y&&ht.y<nt.height||Vr(ht.x,ht.y,0,0,0,nt.height)<=yt||Vr(ht.x,ht.y,0,nt.height,nt.width,nt.height)<=yt||Vr(ht.x,ht.y,nt.width,nt.height,nt.width,0)<=yt||Vr(ht.x,ht.y,nt.width,0,0,0)<=yt;if(nt=ht.zd(0,0)<=yt&&ht.zd(0,nt.height)<=yt&&ht.zd(nt.width,0)<=yt&&ht.zd(nt.width,nt.height)<=yt,st||(Me.free(ht),Me.free(pt)),Mt){if(!this.isAtomic){ht=Me.alloc(),pt=Me.alloc(),yt=bu(this);for(var zt=this.O.s,Zt=zt.length;Zt--;){var Qt=zt[Zt];if(Qt.visible||Qt===yt){var ie=Qt.actualBounds,Ee=this.naturalBounds;(!st||!(ie.x>Ee.width||ie.y>Ee.height||0>ie.x+ie.width||0>ie.y+ie.height))&&(Qt.se()?(ie=Qt.transform,mr(ht.set(a),ie),mr(pt.set(y),ie)):(ht.set(a),pt.set(y)),ie=Qt,Qt=Qt instanceof vn?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)))}}Me.free(ht),Me.free(pt)}return E?Mt:nt}return!1};function y0(a){var y=null;return a instanceof Tr&&(y=a.spot1,y===Oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=ni),y}function S0(a){var y=null;return a instanceof Tr&&(y=a.spot2,y===Oo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=lo),y}qt.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},qt.M=function(a){return this.O.M(a)},qt.Gb=function(a,y){y instanceof tr&&Ae("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ae("Cannot make a Panel contain itself: "+this.toString()),Ae("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ae("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!==vn.Grid||y instanceof Tr||Ae("Can only add Shapes to a Grid Panel, not: "+y),this.na!==vn.Graduated||y instanceof Tr||y instanceof Si||Ae("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 qn),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 Ae("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 vn&&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 Tn&&(x.Te=!0),x.Te&&x instanceof Tn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(vo,"elements",this,y,null,b,null),x.cb(eo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}qt.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)},qt.mb=function(a){0<=a&&this.pc(a,!0)},qt.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),co(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 Tn&&(b instanceof vn?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))},qt.Fb=function(a){0>a&&Mn(a,">= 0",vn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new fo;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(eo,"rowdefs",this,null,x,null,a)}return y[a]},qt.oA=function(a){if(0>a&&Mn(a,">= 0",vn,"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 fo?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qt.Eb=function(a){0>a&&Mn(a,">= 0",vn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new fo;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(eo,"coldefs",this,null,x,null,a)}return y[a]},qt.jA=function(a){if(0>a&&Mn(a,">= 0",vn,"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 fo?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}qt.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},qt.Hy=function(a,y){return(a=this.Fb(a))&&Em(a,new fo(y)),this},qt.By=function(a,y){return(a=this.Eb(a))&&Em(a,new fo(y)),this},qt.nz=function(a){if(0>a||this.type!==vn.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},qt.fz=function(a){if(0>a||this.type!==vn.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},qt.Fz=function(a,y){if(y===void 0&&(y=new Me(NaN,NaN)),this.type!==vn.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)},qt.Gz=function(a){if(this.type!==vn.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&&Ae("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,yt){yt.th();var Mt=yt.localBindings;if(Mt!==null)for(xf(yt,!1),Mt=Mt.iterator;Mt.next();){var zt=Mt.value;zt.mode===cg&&xf(yt,!0);var Zt=zt.sourceName;Zt!==null&&(Zt==="/"&&x0(pt,!0),Zt=MS(zt,pt,yt),Zt!==null&&(x.add(Zt),Zt.srcBindings===null&&(Zt.srcBindings=new yn),Zt.srcBindings.add(zt))),y.add(zt)}if(yt instanceof vn&&yt.type===vn.Table){if(0<yt.rowCount){for(pt=yt.rowDefs,Mt=pt.length,zt=0;zt<Mt;zt++)if(Zt=pt[zt],Zt!==void 0&&Zt.be!==null)for(var Qt=Zt.be.iterator;Qt.next();){var ie=Qt.value;ie.xd=Zt,ie.to=2,ie.wl=Zt.index,y.add(ie)}}if(0<yt.columnCount){for(yt=yt.colDefs,pt=yt.length,Mt=0;Mt<pt;Mt++)if(zt=yt[Mt],zt!==void 0&&zt.be!==null)for(Zt=zt.be.iterator;Zt.next();)Qt=Zt.value,Qt.xd=zt,Qt.to=1,Qt.wl=zt.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 vn&&(nt=st.substring(0,ht),st=st.substr(ht+1),ht=et.fb(nt),ht!==null?(et=ht,E.targetProperty=st):jn('Warning: unable to find GraphObject named "'+nt+'" for Binding: '+E.toString())),et instanceof fo?(nt=bi(et.panel),E.Ai=nt===void 0?-1:nt,et.panel.bindingId=E.Ai):et instanceof ze?(nt=bi(et),E.Ai=nt===void 0?-1:nt,et.bindingId=E.Ai):Ae("Unknown type of binding target: "+et)}y.freeze(),a instanceof tr&&a.Zc()&&a.Va()}qt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof vn&&(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},qt.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 vn))continue;E===1?et=et.Eb(x.wl):E===2&&(et=et.Fb(x.wl))}et!==void 0&&x.Mv(et,b)}}},qt.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 vn&&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 vn)||et.data!==y[nt])return!0;E++,nt++}return!1}function Wp(a){if(a.type===vn.Spot||a.type===vn.Auto)return Math.min(a.O.length,1);if(a.type===vn.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===vn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof vn&&nh(a))?1:0}qt.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 vn){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 Tn&&(y.Te=!0),y.Te&&y instanceof Tn&&(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 qn),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 vn){var E=y,et=x;b.type===vn.TableRow?b.row=E:b.type===vn.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=$i(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ae("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,jn('No item template Panel found for category "'+y+'" on '+a),jn(" Using default item template."),a=new vn,y=new Si,y.bind(new io("text","",gr)),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 vn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var et=y[E];x&&et instanceof vn&&!et.isEnabled||km(a,et,x)}}}function Fl(a,y){y.name=a,ol.add(a,y)}Ze.Object.defineProperties(vn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===vn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Mn(a,">= 0",vn,"padding"),a=new Br(a)):(0>a.left&&Mn(a.left,">= 0",vn,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",vn,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",vn,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",vn,"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 Br(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 li)&&(a instanceof li&&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)||Ae("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 li)&&(a instanceof li&&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)||Ae("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||Ae("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Nl(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()||Ae("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Nl(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),Uo(this)&&(a=this.part,a!==null&&ki(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),Uo(this)&&(a=this.part,a!==null&&ki(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)&&Ae("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)&&Ae("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 tr&&!(this instanceof ti);Hs(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof wn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof tr&&(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 qn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof tr||a.isPanelMain)&&Ae("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(););Nr(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&&(Nr(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 br&&(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))}}}),Ze.Object.defineProperties(vn,{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")}}}),vn.prototype.rebuildItemElements=vn.prototype.mv,vn.prototype.findItemPanelForData=vn.prototype.sx,vn.prototype.updateTargetBindings=vn.prototype.La,vn.prototype.copyTemplate=vn.prototype.Uy,vn.prototype.graduatedValueForPoint=vn.prototype.Gz,vn.prototype.graduatedPointForValue=vn.prototype.Fz,vn.prototype.findColumnForLocalX=vn.prototype.fz,vn.prototype.findRowForLocalY=vn.prototype.nz,vn.prototype.addColumnDefinition=vn.prototype.By,vn.prototype.addRowDefinition=vn.prototype.Hy,vn.prototype.addRowColumnDefinition=vn.prototype.Gy,vn.prototype.removeColumnDefinition=vn.prototype.jA,vn.prototype.getColumnDefinition=vn.prototype.Eb,vn.prototype.removeRowDefinition=vn.prototype.oA,vn.prototype.getRowDefinition=vn.prototype.Fb,vn.prototype.removeAt=vn.prototype.mb,vn.prototype.remove=vn.prototype.remove,vn.prototype.insertAt=vn.prototype.Gb,vn.prototype.elt=vn.prototype.M,vn.prototype.add=vn.prototype.add,vn.prototype.findObject=vn.prototype.fb,vn.prototype.findInVisualTree=vn.prototype.Nl,vn.prototype.walkVisualTreeFrom=vn.prototype.qm,vn.prototype.findMainElement=vn.prototype.Pb;var g1=!1,m1=null,ol=new qn;vn.className="Panel",vn.definePanelLayout=Fl,Fl("Position",new fm),Fl("Vertical",new pm),Fl("Auto",new mm),Fl("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 fo(a){oi(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Oo,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))}fo.prototype.copy=function(){var a=new fo;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=Pn(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=Pn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}qt=fo.prototype,qt.qb=function(a){a.classType===fo&&(this.sizing=a)},qt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+bi(this)},qt.wi=function(a){this.Me=a},qt.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)},qt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===vn.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)},qt.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}qt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new io(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Ae("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},Ze.Object.defineProperties(fo.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",fo,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Mn(a,">= 0",fo,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Mn(a,">= 0",fo,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Mn(a,">= 0",fo,"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 Br(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 li&&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)||Ae("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 li&&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}}}),fo.prototype.computeEffectiveSpacing=fo.prototype.Wc,fo.prototype.computeEffectiveSpacingTop=fo.prototype.Io;var C0=new dn(fo,"Default",0),Hp=new dn(fo,"None",1),Tm=new dn(fo,"ProportionalExtra",2);fo.className="RowColumnDefinition",fo.Default=C0,fo.None=Hp,fo.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)}tn(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=Pn(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())}qt=Tr.prototype,qt.th=function(){ze.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},qt.qb=function(a){a===hn||a===Hn||a===Hr||a===Cr?this.geometryStretch=a:ze.prototype.qb.call(this,a)},qt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+bi(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,yt,Mt,zt,Zt,Qt,ie=0,Ee=Nn(),we=2;we<E;we+=2)pt=x[we],yt=x[we+1],Mt=pt-st,st=yt-ht,Mt===0&&(Mt=.001),zt=st/Mt,Zt=Math.atan2(st,Mt),Qt=Math.sqrt(Mt*Mt+st*st),Ee.push([Mt,Zt,zt,Qt]),ie+=Qt,st=pt,ht=yt;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,yt=pt!==0,we=0,Qt=Ee[we],Mt=Qt[0],Zt=Qt[1],zt=Qt[2],Qt=Qt[3];for(var je=0;.1<=ie;){if(je===0&&(yt?(E=x,E-=pt,ie-=pt,yt=!1):E=x,E===0&&(E=1)),E>ie){Rn(Ee);return}E>Qt?(je=E-Qt,E=Qt):je=0;var Oe=Math.sqrt(E*E/(1+zt*zt));if(0>Mt&&(Oe=-Oe),st+=Oe,ht+=zt*Oe,a.translate(st,ht),a.rotate(Zt),a.translate(-(nt/2),-(et/2)),je===0&&b.hh(a,y),a.translate(nt/2,et/2),a.rotate(-Zt),a.translate(-st,-ht),ie-=E,Qt-=E,je!==0){if(we++,we===Ee.length){Rn(Ee);return}Qt=Ee[we],Mt=Qt[0],Zt=Qt[1],zt=Qt[2],Qt=Qt[3],E=je}}Rn(Ee)}}qt.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&&Zi(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===vn.Link&&st instanceof ti&&st.category==="Selection"&&st.adornedObject instanceof Tr&&st.adornedPart.Pb()===st.adornedObject?st.adornedObject.strokeWidth:0),ht===0&&(x=null),x!==null&&ht!==0&&(Zi(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===xn.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===xn.u){var pt=E.startX;ht=E.startY;var yt=E.endX,Mt=E.endY;E=Math.min(pt,yt);var zt=Math.min(ht,Mt);pt=Math.abs(yt-pt),ht=Math.abs(Mt-ht),a.beginPath(),a.rect(E,zt,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===xn.F)pt=E.startX,ht=E.startY,yt=E.endX,Mt=E.endY,E=Math.abs(yt-pt)/2,zt=Math.abs(Mt-ht)/2,pt=Math.min(pt,yt)+E,ht=Math.min(ht,Mt)+zt,a.beginPath(),a.moveTo(pt,ht-zt),a.bezierCurveTo(pt+Ge.wg*E,ht-zt,pt+E,ht-Ge.wg*zt,pt+E,ht),a.bezierCurveTo(pt+E,ht+Ge.wg*zt,pt+Ge.wg*E,ht+zt,pt,ht+zt),a.bezierCurveTo(pt-Ge.wg*E,ht+zt,pt-E,ht+Ge.wg*zt,pt-E,ht),a.bezierCurveTo(pt-E,ht-Ge.wg*zt,pt-Ge.wg*E,ht-zt,pt,ht-zt),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===xn.o)for(E=E.figures,ht=E.length,zt=0;zt<ht;zt++){pt=E.s[zt],a.beginPath(),a.moveTo(pt.startX,pt.startY),yt=pt.segments.s,Mt=yt.length;for(var Zt=null,Qt=0;Qt<Mt;Qt++){var ie=yt[Qt];switch(ie.type){case Co:a.moveTo(ie.endX,ie.endY);break;case Pi:a.lineTo(ie.endX,ie.endY);break;case Vo: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 uo:if(ie.radiusX===ie.radiusY){var Ee=Math.PI/180;a.arc(ie.point1X,ie.point1Y,ie.radiusX,ie.startAngle*Ee,(ie.startAngle+ie.sweepAngle)*Ee,0>ie.sweepAngle,Zt!==null?Zt.endX:pt.startX,Zt!==null?Zt.endY:pt.startY)}else if(Zt=$a(ie,pt),Ee=Zt.length,Ee===0)a.lineTo(ie.centerX,ie.centerY);else for(var we=0;we<Ee;we++){var je=Zt[we];we===0&&a.lineTo(je[0],je[1]),a.bezierCurveTo(je[2],je[3],je[4],je[5],je[6],je[7])}break;case Cs:if(we=Ee=0,Zt!==null&&Zt.type===uo){if(Zt=$a(Zt,pt),je=Zt.length,je===0){a.lineTo(ie.endX,ie.endY);break}Zt=Zt[je-1]||null,Zt!==null&&(Ee=Zt[6],we=Zt[7])}else Ee=Zt!==null?Zt.endX:pt.startX,we=Zt!==null?Zt.endY:pt.startY;if(Zt=Rs(ie,pt,Ee,we),Ee=Zt.length,Ee===0){a.lineTo(ie.endX,ie.endY);break}for(we=0;we<Ee;we++)je=Zt[we],a.bezierCurveTo(je[2],je[3],je[4],je[5],je[6],je[7]);break;default:Ae("Segment not of valid type: "+ie.type)}ie.isClosed&&a.closePath(),Zt=ie}yt=pt.isFilled,et?pt.isShadowed?(yt===!0&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&(yt&&st&&Jl(a),a.jk(),yt&&st&&Su(a))):(Jl(a),yt&&b!=="transparent"&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk(),Su(a)):(yt&&b!==null&&a.ng(b,pt.isEvenOdd),x!==null&&a.jk()),a.Se(zt)}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=Nn(),et.type===xn.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===xn.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,zt=E,pt=st.segments.s,yt=pt.length,Mt=0;Mt<yt;Mt++){switch(Qt=pt[Mt],Qt.type){case Co:Pd(a,y,b,x),b.length=0,b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY,ht=nt,zt=E;break;case Pi:b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break;case Vo: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 uo:if(ie=$a(Qt,st),Zt=ie.length,Zt===0){b.push(Qt.centerX),b.push(Qt.centerY),nt=Qt.centerX,E=Qt.centerY;break}for(Ee=0;Ee<Zt;Ee++)we=ie[Ee],Ge.Qe(nt,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),nt=we[6],E=we[7];break;case Cs:if(ie=Rs(Qt,st,nt,E),Zt=ie.length,Zt===0){b.push(Qt.endX),b.push(Qt.endY),nt=Qt.endX,E=Qt.endY;break}for(Ee=0;Ee<Zt;Ee++)we=ie[Ee],Ge.Qe(nt,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),nt=we[6],E=we[7];break;default:Ae("Segment not of valid type: "+Qt.type)}Qt.isClosed&&(b.push(ht),b.push(zt),Pd(a,y,b,x))}Pd(a,y,b,x)}else if(et.type===xn.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===xn.F){if(E=new Po,E.startX=et.endX,E.startY=(et.startY+et.endY)/2,nt=new ei(uo),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++)zt=et[ht],Ge.Qe(nt,E,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,b),nt=zt[6],E=zt[7];Pd(a,y,b,x)}Rn(b),a.restore(),a.Vc(!1)}}}},qt.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)},qt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ze.prototype.nk.call(this,a)},qt.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)}},qt.ga=function(a,y){if(y===void 0&&(y=new Me),a instanceof nr){a.Mc()&&Ae("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},qt.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=Me.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Ti(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Ti(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Ti(a,b.x,b.y,0,0),on.free(y),Me.free(b),a},qt.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!==xn.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===xn.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===xn.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===xn.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===xn.o)return on.free(et),this.fill===null?pl(x,a.x,a.y,E):hs(x,a,E,1<this.strokeWidth,y);Ae("Unknown Geometry type: "+x.type)},qt.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):Ae("Unsupported Figure: "+st)}nt=ht.bounds}st=nt.width,ht=nt.height,pt=nt.width;var yt=nt.height;switch(Ra(this,!0)){case hn:b=x=0;break;case pn:pt=Math.max(a-et,0),yt=Math.max(y-et,0);break;case Yn:pt=Math.max(a-et,0),b=0;break;case or:x=0,yt=Math.max(y-et,0)}isFinite(E.width)&&(pt=E.width),isFinite(E.height)&&(yt=E.height);var Mt=this.maxSize,zt=this.minSize;switch(x=Math.max(x-et,zt.width),b=Math.max(b-et,zt.height),pt=Math.min(Mt.width,pt),yt=Math.min(Mt.height,yt),pt=isFinite(pt)?Math.max(x,pt):Math.max(st,x),yt=isFinite(yt)?Math.max(b,yt):Math.max(ht,b),x=k0(this),x){case hn:break;case pn:st=pt,ht=yt;break;case Hn:x=Math.min(pt/st,yt/ht),isFinite(x)||(x=1),st*=x,ht*=x;break;default:Ae(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,yt+et),E.w()?(pt=E.width,yt=E.height,pt=Math.min(Mt.width,pt),yt=Math.min(Mt.height,yt),pt=Math.max(zt.width,pt),yt=Math.max(zt.height,yt),this.dc.h(0,0,pt,yt)):this.dc.assign(nt)};function k0(a){var y=a.geometryStretch;return a.Rd!==null?y===Cr?pn:y:y===Cr?E0[a.figure].defaultStretch:y}qt.eh=function(a,y,x,b){ha(this,a,y,x,b)},qt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},qt.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,yt=et.m11*nt,Mt=nt*(et.m21*et.dy-et.m22*et.dx),zt=nt*(et.m12*et.dx-et.m11*et.dy);et=a*st+y*pt+Mt,nt=a*ht+y*yt+zt,st=x*st+b*pt+Mt,ht=x*ht+b*yt+zt,Mt=this.ig/2,pt=this.ua,pt===null&&(this.measure(1/0,1/0),pt=this.ua);var Zt=pt.bounds;if(yt=!1,pt.type===xn.j)if(1.5>=this.strokeWidth)yt=Ge.Ve(pt.startX,pt.startY,pt.endX,pt.endY,et,nt,st,ht,E);else{if(pt.startX===pt.endX?(b=Mt,yt=0):(y=(pt.endY-pt.startY)/(pt.endX-pt.startX),yt=Mt/Math.sqrt(1+y*y),b=yt*y),y=Nn(),a=new Me,Ge.Ve(pt.startX+b,pt.startY+yt,pt.endX+b,pt.endY+yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ge.Ve(pt.startX-b,pt.startY-yt,pt.endX-b,pt.endY-yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ge.Ve(pt.startX+b,pt.startY+yt,pt.startX-b,pt.startY-yt,et,nt,st,ht,a)&&y.push(a),a=new Me,Ge.Ve(pt.endX+b,pt.endY+yt,pt.endX-b,pt.endY-yt,et,nt,st,ht,a)&&y.push(a),st=y.length,st===0)return Rn(y),!1;for(yt=!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);Rn(y)}else if(pt.type===xn.u)yt=Ge.Ff(Zt.x-Mt,Zt.y-Mt,Zt.x+Zt.width+Mt,Zt.y+Zt.height+Mt,et,nt,st,ht,E);else if(pt.type===xn.F){y=on.allocAt(Zt.x,Zt.y,Zt.width,Zt.height).Bc(Mt,Mt);t:if(y.width===0)yt=Ge.Ve(y.x,y.y,y.x,y.y+y.height,et,nt,st,ht,E);else if(y.height===0)yt=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,yt=y.y+pt,x=9999,et!==st&&(x=(nt-ht)/(et-st)),9999>Math.abs(x)){if(ht=nt-yt-x*(et-b),0>a*a*x*x+pt*pt-ht*ht){E.x=NaN,E.y=NaN,yt=!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+yt,ht=x*(a-b)+ht+yt,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,yt=!1;break t}ht=Math.sqrt(st),st=yt+ht,ht=yt-ht,Math.abs(st-nt)<Math.abs(ht-nt)?(E.x=et,E.y=st):(E.x=et,E.y=ht)}yt=!0}on.free(y)}else if(pt.type===xn.o){zt=Me.alloc();var Qt=st-et,ie=ht-nt,Ee=Qt*Qt+ie*ie,we=et,je=nt;if(0<Ee&&Zt.contains(we,je)&&(zt.x=we,zt.y=je,this.ca(zt)))for(Qt!==0&&.5>Math.abs(Qt)?(ie*=.5/Qt,Qt=.5):ie!==0&&.5>Math.abs(ie)&&(Qt*=.5/ie,ie=.5),we-=Qt,je-=ie;Zt.contains(we,je);)we-=Qt,je-=ie;for(E.x=st,E.y=ht,ie=0;ie<pt.figures.count;ie++){var Oe=pt.figures.s[ie],De=Oe.isFilled?we:et,_e=Oe.isFilled?je:nt,Je=Oe.segments;Zt=Oe.startX,Qt=Oe.startY;for(var En=Zt,_n=Qt,Dn=0;Dn<Je.count;Dn++){var Sn=Je.s[Dn],un=Sn.type,xr=Sn.endX,fr=Sn.endY,ri=!1;switch(un){case Co:En=xr,_n=fr;break;case Pi:ri=Am(Zt,Qt,xr,fr,De,_e,st,ht,zt);break;case Vo:ri=Ge.Eo(Zt,Qt,Sn.point1X,Sn.point1Y,Sn.point2X,Sn.point2Y,xr,fr,De,_e,st,ht,.6,zt);break;case cs:ri=Ge.Eo(Zt,Qt,Zt+2/3*(Sn.point1X-Zt),Qt+2/3*(Sn.point1Y-Qt),xr+2/3*(Sn.point1X-xr),fr+2/3*(Sn.point1Y-fr),xr,fr,De,_e,st,ht,.6,zt);break;case uo:case Cs:un=Sn.type===uo?$a(Sn,Oe):Rs(Sn,Oe,Zt,Qt);var yi=un.length;if(yi===0){ri=Am(Zt,Qt,Sn.type===uo?Sn.centerX:Sn.endX,Sn.type===uo?Sn.centerY:Sn.endY,De,_e,st,ht,zt);break}for(fr=null,xr=0;xr<yi;xr++){if(fr=un[xr],xr===0&&Am(Zt,Qt,fr[0],fr[1],De,_e,st,ht,zt)){var Eo=Lm(De,_e,zt,Ee,E);Eo<Ee&&(Ee=Eo,yt=!0)}Ge.Eo(fr[0],fr[1],fr[2],fr[3],fr[4],fr[5],fr[6],fr[7],De,_e,st,ht,.6,zt)&&(Eo=Lm(De,_e,zt,Ee,E),Eo<Ee&&(Ee=Eo,yt=!0))}xr=fr[6],fr=fr[7];break;default:Ae("Unknown Segment type: "+un)}Zt=xr,Qt=fr,ri&&(ri=Lm(De,_e,zt,Ee,E),ri<Ee&&(Ee=ri,yt=!0)),Sn.isClosed&&(xr=En,fr=_n,Am(Zt,Qt,xr,fr,De,_e,st,ht,zt)&&(Sn=Lm(De,_e,zt,Ee,E),Sn<Ee&&(Ee=Sn,yt=!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,Me.free(zt)}else Ae("Unknown Geometry type: "+pt.type);return yt?(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,yt=(E-nt)*(y-b)-(et-st)*(a-x);return yt===0?!1:(ht.x=((E*st-et*nt)*(a-x)-(E-nt)*(a*b-y*x))/yt,ht.y=((E*st-et*nt)*(y-b)-(et-st)*(a*b-y*x))/yt,(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)}qt.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=Me.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)))),Me.free(et),E},qt.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=Me.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 Me.free(nt),!0;var st=Me.alloc(),ht=Me.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)))),Me.free(nt),Sr.free(x),Me.free(st),Me.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)}qt.tx=function(a,y,x){function b(Ee,we){for(var je=Ee.length,Oe=0;Oe<je;Oe+=2)if(we.zd(Ee[Oe],Ee[Oe+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,Mi(a.x,a.y,st,ht)<=E&&Mi(a.x,a.y,pt,ht)<=E&&Mi(a.x,a.y,st,nt)<=E&&Mi(a.x,a.y,pt,nt)<=E)return!0}if(st=y.startX,ht=y.startY,pt=y.endX,nt=y.endY,y.type===xn.j){if(x=(st-pt)*(a.x-pt)+(ht-nt)*(a.y-nt),Vr(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===xn.u)return y=!1,x&&(y=Vr(a.x,a.y,st,ht,st,nt)<=E||Vr(a.x,a.y,st,ht,pt,ht)<=E||Vr(a.x,a.y,pt,ht,pt,nt)<=E||Vr(a.x,a.y,st,nt,pt,nt)<=E),y;if(y.type===xn.F){y=a.x-(st+pt)/2,et=a.y-(ht+nt)/2;var yt=Math.abs(pt-st)/2,Mt=Math.abs(nt-ht)/2;if(yt===0||Mt===0)return Vr(a.x,a.y,st,ht,pt,nt)<=E;if(x){if(a=Ge.$y(yt,Mt,y,et),a*a<=E)return!0}else return!(Mi(y,et,-yt,0)>=E||Mi(y,et,0,-Mt)>=E||Mi(y,et,0,Mt)>=E||Mi(y,et,yt,0)>=E)}else if(y.type===xn.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&&Vr(a.x,a.y,et,st,et,pt)>E&&Vr(a.x,a.y,et,st,ht,st)>E&&Vr(a.x,a.y,ht,pt,et,pt)>E&&Vr(a.x,a.y,ht,pt,ht,st)>E)return!1;if(et=Math.sqrt(E),x){if(this.fill===null?pl(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,yt=et.startY,a.zd(nt,yt)>E)return!1;for(st=et.segments.s,ht=st.length,pt=0;pt<ht;pt++)switch(Mt=st[pt],Mt.type){case Co:case Pi:if(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E)return!1;break;case Vo:var zt=Nn();if(Ge.Qe(nt,yt,Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY,.8,zt),nt=b(zt,a),Rn(zt),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case cs:if(zt=Nn(),Ge.ep(nt,yt,Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY,.8,zt),nt=b(zt,a),Rn(zt),nt||(nt=Mt.endX,yt=Mt.endY,a.zd(nt,yt)>E))return!1;break;case uo:case Cs:zt=Mt.type===uo?$a(Mt,et):Rs(Mt,et,nt,yt);var Zt=zt.length;if(Zt===0){if(nt=Mt.type===uo?Mt.centerX:Mt.endX,yt=Mt.type===uo?Mt.centerY:Mt.endY,a.zd(nt,yt)>E)return!1;break}Mt=null;for(var Qt=Nn(),ie=0;ie<Zt;ie++)if(Mt=zt[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 Rn(Qt),!1;Rn(Qt),Mt!==null&&(nt=Mt[6],yt=Mt[7]);break;default:Ae("Unknown Segment type: "+Mt.type)}}return!0}}}return!1},qt.qc=function(){this.ua=null},qt.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=Qo):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new nr(1-Qo.x,Qo.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&&Ae("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=xn.parse(Ge.um[b],!1),$l[b]=a,x!==b&&($l[x]=b),b}}return typeof y=="string"?y:y instanceof xn?a:null}Ze.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),Uo(this)&&(a=this.part,a!==null&&ki(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=xn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Me.allocAt(-y.x,-y.y),Me.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 li&&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 li&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Mn(a,"value >= 0",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"?Mn(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"?Mn(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)||Ae("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()])||Ae("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?Ae("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?Ae("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:Oo},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:Oo},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&&Nl(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 er,E0=new er;Tr.className="Shape",Tr.getFigureGenerators=function(){var a=new qn,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 qn;for(b in Ge.um)if($l[b]===void 0){var y=xn.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 xn&&a.add(x,b)}return a.freeze(),a},Tr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=xn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ae("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=Oo}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 Si(a,y){return ze.call(this),Dm||(_a=Vi?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}tn(Si,ze),Si.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 Dl(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}qt=Si.prototype,qt.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}qt.qb=function(a){a.classType===Si?this.wrap=a:ze.prototype.qb.call(this,a)},qt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},qt.v=function(){ze.prototype.v.call(this)},qt.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;Zi(this,a,this.xc,!0,!1,x,b),(ht||pt)&&Zi(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var yt=this.oe,Mt=yt.dx-(nt*yt.m21+yt.dx);yt=yt.dy-(nt*yt.m22+yt.dy);var zt=y.scale;switch(8>(Mt*Mt+yt*yt)*zt*zt&&(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 Yr:a.translate(E,0),a.scale(-1,1);break;case jr:a.translate(0,et),a.scale(1,-1);break;case fi:a.translate(E,et),a.scale(-1,-1)}if(a.yc(),yt=this.Gc,zt=(y+nt+Mt)*yt,et>zt&&(b=this.verticalAlignment,b=b.y*et-b.y*zt+b.offsetY),yt===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(zt=0;zt<yt;zt++){var Zt=this.Qc[zt];Zt>E&&(Zt=E),b+=y,this.Oj(this.Qb[zt],a,0,b,E,nt,Zt,x,st,ht,pt),b+=nt+Mt}switch(this.flip){case Yr:a.scale(-1,1),a.translate(-E,0);break;case jr:a.scale(1,-1),a.translate(0,-et);break;case fi:a.scale(-1,-1),a.translate(-E,-et)}}},qt.Oj=function(a,y,x,b,E,et,nt,st,ht,pt,yt){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 zt=a;y.beginPath(),y.lineWidth=zt,y.moveTo(ht,pt),y.lineTo(E,st),y.stroke(),y.Se(),y instanceof es&&y.ad.classList.add("gojs-td")}yt&&(yt=b+et-et/2.2|0,a%2!==0&&(yt+=.5),b=x+Mt,et=yt,x=x+Mt+nt,nt=yt,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"))}},qt.kk=function(a,y,x){if(!ze.prototype.kk.call(this,a,y,x))return!1;if(Zi(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},qt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ze.prototype.nk.call(this,a)},qt.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)}},qt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var et=this.Ae;_a!==null&&E1!==et&&(E1=_a.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),Wo(this.dc,et,nt),this.Ge(0,0,et,nt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},qt.eh=function(a,y,x,b){ha(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 yt=al(et);a.Cb=yt,Vp(a,et,yt),b!==null&&b.h(yt,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)),yt=0;pt<=x;)Mt++,yt=pt,pt=al(y.substr(0,Mt));if(Mt===1){var zt=pt;et=Math.max(et,pt)}else zt=yt,et=Math.max(et,yt);if(Mt--,1>Mt&&(Mt=1),Vp(a,y.substr(0,Mt),zt),ht++,y=y.substr(Mt),a.Gc+ht>a.maxLines)break}for(yt=Cd(a,nt),pt=al(y+yt);0<yt.length&&pt<=x;)y+=yt,nt=nt.substr(yt.length),yt=Cd(a,nt),pt=y+yt,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"),yt.length===0?(Mt=pt,et=Math.max(et,pt)):(Mt=yt=al(y),et=Math.max(et,yt)),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 _a===null?8*a.length:_a.measureText(a).width}function Kp(a){if(a.df!==null)return a.df;var y=a.Ae;if(_a===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>k1?x=j0[y]:(x=1.3*_a.measureText("M").width,j0[y]=x,k1++),a.df=x}function x1(a){if(_a===null)return 6;if(Fm[a]!==void 0&&5e3>O0)var y=Fm[a];else y=_a.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=Cn.alloc();T0(a,et,y,ht),E+=ht.height,Cn.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}Ze.Object.defineProperties(Si.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"||(Dl(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:hn},set:function(a){var y=this.flip;y!==a&&(Dl(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(),Dl(this),this.da.Yr=a,wa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Cn.alloc();T0(this,this.ec,999999,a);var y=a.width;Cn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Wo(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&&(Dl(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&&(Dl(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 li&&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&&(Dl(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&&(Dl(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&&(Dl(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&&(Dl(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&&(Dl(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&&(Dl(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&&(Dl(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Mn(a,"> 0",Si,"maxLines"),Dl(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 dn(Si,"None",0),b1=new dn(Si,"WrapFit",1),A0=new dn(Si,"WrapDesiredSize",2),P1=new dn(Si,"WrapBreakAll",3),N0=new dn(Si,"OverflowClip",0),Om=new dn(Si,"OverflowEllipsis",1),Zp=new dn(Si,"FormatTrim",0),C1=new dn(Si,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new er,k1=0,Fm=new er,O0=0,Xp="...",E1="",_a=null,Dm=!1;Si.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=hn,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},Si.getEllipsis=function(){return Xp},Si.setEllipsis=function(a){Xp=a,Fm=new er,O0=0},Si.getBaseline=function(){return Nm},Si.setBaseline=function(a){Nm=a},Si.getUnderline=function(){return jm},Si.setUnderline=function(a){jm=a},Si.isValidFont=function(a){if(Dm||(_a=Vi?new Ws(null).context:null,Dm=!0),_a===null)return!0;var y=_a.font;if(a===y||a==="10px sans-serif")return!0;_a.font="10px sans-serif",_a.font=a;var x=_a.font;if(x!=="10px sans-serif")return _a.font=y,!0;_a.font="19px serif";var b=_a.font;return _a.font=a,x=_a.font,_a.font=y,x!==b},Si.FormatNone=C1,Si.FormatTrim=Zp,Si.None=L0,Si.OverflowClip=N0,Si.OverflowEllipsis=Om,Si.WrapBreakAll=P1,Si.WrapDesiredSize=A0,Si.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 za(a,y){ze.call(this),this.Eg=null,this.qo="",this.Xg=uu,this.Nk=pn,this.Zg=this.Hd=null,this.Mk=Ir,this.Xf=hn,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;tn(za,ze),za.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},za.prototype.qb=function(a){a===hn||a===Hn||a===Hr?this.imageStretch=a:ze.prototype.qb.call(this,a)},za.prototype.toString=function(){return"Picture("+this.source+")#"+bi(this)};function Ed(a){a===void 0&&(a=""),a!==""?kd[a]&&(delete kd[a],Bm--):(kd=new er,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()||(co(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=Nn();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);Rn(et)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}za.prototype.hA=function(){if(this.source!==""){Ed(this.source);var a=this.source;this.source="",this.source=a}},za.prototype.redraw=function(){this.N(),this.Uc=!0},za.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,yt=st;this.sourceRect.w()&&(et=this.Xg.x,nt=this.Xg.y,ht=this.Xg.width,st=this.Xg.height);var Mt=ht,zt=st,Zt=this.Nk,Qt=this.Mk;switch(Zt){case hn:if(this.sourceRect.w())break;Mt>=b.width&&(et=et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)),zt>=b.height&&(nt=nt+Qt.offsetY+(zt*Qt.y-b.height*Qt.y)),ht=Math.min(b.width,Mt),st=Math.min(b.height,zt);break;case pn:Mt=b.width,zt=b.height;break;case Hn:case Hr:Zt===Hn?(Zt=Math.min(b.height/zt,b.width/Mt),Mt*=Zt,zt*=Zt):Zt===Hr&&(Zt=Math.max(b.height/zt,b.width/Mt),Mt*=Zt,zt*=Zt,Mt>=b.width&&(et=(et+Qt.offsetX+(Mt*Qt.x-b.width*Qt.x)/Mt)*ht),zt>=b.height&&(nt=(nt+Qt.offsetY+(zt*Qt.y-b.height*Qt.y)/zt)*st),ht*=1/(Mt/b.width),st*=1/(zt/b.height),Mt=b.width,zt=b.height)}Zt=this.Df()*y.scale;var ie=Mt*Zt*zt*Zt,Ee=ht*st/ie,we=x.__goCache;Zt=null;var je=wx;if(!E){if(x.sq&&we!==void 0&&4<ie&&Ee>je*je)for(we.gi===null&&(L1(we,4,pt,yt,x),L1(we,16,pt,yt,x)),E=we.gi,pt=E.length,yt=0;yt<pt&&E[yt].ratio*E[yt].ratio<Ee;yt++)Zt=E[yt];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(Oe){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Oe){this.vl=!0}}if(this.vl)return}}switch(E=Mt<b.width?Qt.offsetX+(b.width*Qt.x-Mt*Qt.x):0,Qt=zt<b.height?Qt.offsetY+(b.height*Qt.y-zt*Qt.y):0,this.flip){case Yr:a.translate(Math.min(b.width,Mt),0),a.scale(-1,1);break;case jr:a.translate(0,Math.min(b.height,zt)),a.scale(1,-1);break;case fi:a.translate(Math.min(b.width,Mt),Math.min(b.height,zt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&we!==void 0&&Zt!==null&&Zt.ratio!==1){a.save(),y=Zt.ratio;try{a.drawImage(Zt.source,et/y,nt/y,Math.min(Zt.source.width,ht/y),Math.min(Zt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)),a instanceof es&&(this.bt=[et/y,nt/y,Math.min(Zt.source.width,ht/y),Math.min(Zt.source.height,st/y),E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)])}catch(Oe){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,zt)),a instanceof es&&(this.bt=[et,nt,ht,st,E,Qt,Math.min(b.width,Mt),Math.min(b.height,zt)])}catch(Oe){this.en=!1}switch(this.flip){case Yr:a.scale(-1,1),a.translate(-Math.min(b.width,Mt),0);break;case jr:a.scale(1,-1),a.translate(0,-Math.min(b.height,zt));break;case fi:a.scale(-1,-1),a.translate(-Math.min(b.width,Mt),-Math.min(b.height,zt))}}}}},za.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,et=Ra(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===pn||et===Yn?(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===pn||et===or?(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)),Wo(this.dc,a,y),this.Ge(0,0,a,y)},za.prototype.eh=function(a,y,x,b){ha(this,a,y,x,b)},Ze.Object.defineProperties(za.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||Ae("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 mn),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()||(co(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(Vi){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Ed(),x=kd),b=Or("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}}}),za.prototype.redraw=za.prototype.redraw,za.prototype.reloadSource=za.prototype.hA;var Bm=0,wx=4;za.className="Picture",kd=new er,za.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 xn,this.mc=null}Md.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new xn,this.mc=null};function Td(a,y,x,b,E,et){a.mc=new Po,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 ei(Co);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 ei(Pi);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 ei(Vo);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 ei(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 ei(uo);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 ei(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 ra(a,y){var x=a.toLowerCase(),b=Ge.Ze;b[a]=y,b[x]=a}ra("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new xn(xn.u),b.endX=y,b.endY=x,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ra("Square",function(a,y,x){a="s"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new xn(xn.u),b.endX=y,b.endY=x,b.defaultStretch=Hn,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ra("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 xn().add(new Po(a,0,!0).add(new ei(Pi,y-a,0)).add(new ei(Vo,y,a,y-et,0,y,et)).add(new ei(Pi,y,x-a)).add(new ei(Vo,y-a,x,y,x-et,y-et,x)).add(new ei(Pi,a,x)).add(new ei(Vo,0,x-a,et,x,0,x-et)).add(new ei(Pi,0,a)).add(new ei(Vo,a,0,0,et,et,0).close())),1<et&&(E.spot1=new nr(0,0,et,et),E.spot2=new nr(1,1,-et,-et)),Ge.Nf<Ge.vm&&(Ge.Mf[b]=E,Ge.Nf++),E}),ra("Border","RoundedRectangle"),ra("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new xn(xn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ra("Circle",function(a,y,x){a="c"+y+","+x;var b=Ge.Mf[a];return b!==void 0||(b=new xn(xn.F),b.endX=y,b.endY=x,b.spot1=cc,b.spot2=Du,b.defaultStretch=Hn,Ge.Nf<Ge.vm&&(Ge.Mf[a]=b,Ge.Nf++)),b}),ra("TriangleRight",function(a,y,x){return new xn().add(new Po(0,0).add(new ei(Pi,y,.5*x)).add(new ei(Pi,0,x).close())).pm(0,.25,.5,.75)}),ra("TriangleDown",function(a,y,x){return new xn().add(new Po(0,0).add(new ei(Pi,y,0)).add(new ei(Pi,.5*y,x).close())).pm(.25,0,.75,.5)}),ra("TriangleLeft",function(a,y,x){return new xn().add(new Po(y,x).add(new ei(Pi,0,.5*x)).add(new ei(Pi,y,0).close())).pm(.5,.25,1,.75)}),ra("TriangleUp",function(a,y,x){return new xn().add(new Po(y,x).add(new ei(Pi,0,x)).add(new ei(Pi,.5*y,0).close())).pm(.25,.5,.75,1)}),ra("Triangle","TriangleUp"),ra("Diamond",function(a,y,x){return new xn().add(new Po(.5*y,0).add(new ei(Pi,0,.5*x)).add(new ei(Pi,.5*y,x)).add(new ei(Pi,y,.5*x).close())).pm(.25,.25,.75,.75)}),ra("LineH",function(a,y,x){return a=new xn(xn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ra("LineV",function(a,y,x){return a=new xn(xn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ra("None","Rectangle"),ra("BarH","Rectangle"),ra("BarV","Rectangle"),ra("MinusLine","LineH"),ra("PlusLine",function(a,y,x){return new xn().add(new Po(0,x/2,!1).add(new ei(Pi,y,x/2)).add(new ei(Co,y/2,0)).add(new ei(Pi,y/2,x)))}),ra("XLine",function(a,y,x){return new xn().add(new Po(0,x,!1).add(new ei(Pi,y,0)).add(new ei(Co,0,0)).add(new ei(Pi,y,x)))}),ra("LineRight",function(a,y,x){return new xn().add(new Po(.25*y,0,!1).add(new ei(Pi,.75*y,.5*x)).add(new ei(Pi,.25*y,x)))}),ra("LineDown",function(a,y,x){return new xn().add(new Po(0,.25*x,!1).add(new ei(Pi,.5*y,.75*x)).add(new ei(Pi,y,.25*x)))}),ra("LineLeft",function(a,y,x){return new xn().add(new Po(.75*y,0,!1).add(new ei(Pi,.25*y,.5*x)).add(new ei(Pi,.75*y,x)))}),ra("LineUp",function(a,y,x){return new xn().add(new Po(0,.75*x,!1).add(new ei(Pi,.5*y,.25*x)).add(new ei(Pi,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=to,this.ir=null,this.jr="",this.lr=Oo,this.Gq="",this.Hq=ni,this.Pq=Ui,this.Kq=Qi,this.Up=null,this.Cq=127,this.zr=Xi,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 tr(a,y){a===void 0||a instanceof yo||typeof a=="string"?vn.call(this,a):(vn.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 Me(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)}tn(tr,vn),tr.prototype.cloneProtected=function(a){vn.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},qt=tr.prototype,qt.Af=function(a){vn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},qt.toString=function(){var a=Bn(this.constructor)+"#"+bi(this);return this.data!==null&&(a+="("+gr(this.data)+")"),a};function Ga(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}qt.th=function(){vn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},qt.gk=function(a,y,x,b,E,et,nt){var st=this.diagram;st!==null&&(a===eo&&y==="elements"?E instanceof vn?Oc(E,function(ht){ly(st.partManager,ht),kc(st,ht)}):Bh(st,E):a===vo&&y==="elements"&&(E instanceof vn?Oc(E,function(ht){uy(st.partManager,ht,st)}):Mp(st,E)),st.cb(a,y,x,b,E,et,nt))},qt.La=function(a){if(vn.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 vn&&Oc(E,function(et){et.data!==null&&et.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},tr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},tr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},tr.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 qn),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)))}}},tr.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)}},tr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Nn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Rn(y)}},tr.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 br?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof ti))break t;Hs(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=vn.Link),x.adornedObject=y)}if(x!==null){x.type===vn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},tr.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)}}tr.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)},tr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var et=Ir;this.locationSpot.sb()&&(et=this.locationSpot);var nt=Me.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),Me.free(nt)}},tr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},tr.prototype.moveTo=function(a,y,x){a=Me.allocAt(a,y),this.move(a,x),Me.free(a)},tr.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())},tr.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())},tr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new qn),y.I(a)!==null)return y.I(a);var x=vn.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 Me),x=x.Mc()?Ir: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}tr.prototype.mi=function(a){return a===void 0&&(a=new on),a.assign(this.actualBounds)},tr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Me.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}tr.prototype.arrange=function(){if(ba(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)}},qt=tr.prototype,qt.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()||ja(a,y)||(this instanceof Tn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},qt.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 Me(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),zh(this)===!1&&ba(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof ti||(y=y.animationManager,y.zb&&qf(y,a,new Me(b,E),x))}qt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;zh(this)||ba(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)},qt.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,Me.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 ti||qf(x,a,new Me(et,nt),y),b||y.x===et&&y.y===nt||a.g("position",new Me(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 Tn&&Qu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Gh(a)?(zl(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}qt.si=function(){return!0},qt.Zc=function(){return!0},qt.ph=function(){return!1},qt.Dd=function(){return!0};function I0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,jn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),jn(" Old class: "+Bn(a.constructor)+", new class: "+Bn(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 Tn&&(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 Tn&&(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)}tr.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},tr.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},tr.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},tr.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},tr.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},tr.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},tr.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},tr.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},tr.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}qt=tr.prototype,qt.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}qt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},qt.N=function(){var a=this.diagram;a!==null&&!ba(this)&&!zh(this)&&this.isVisible()&&this.Ib.w()&&a.N(Bc(this,this.Ib))},qt.v=function(){vn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Tn&&this.labeledLink!==null&&wa(this.labeledLink),a.$b(!0))},qt.Vo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},qt.Wo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},qt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},qt.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Tn&&(y=y.labeledLink,y!==null)?z0(a,y):0}qt.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Tn&&(x=y.labeledLink,x!==null)?_1(a,x):y}qt.Td=function(a){return a instanceof br?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 Tn&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}qt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof br&&zm(y,!0),y instanceof Tn){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 Tn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof br&&zm(y,!1),y instanceof Tn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},tr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Tn&&this.isLinkLabel)},tr.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 Tn&&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 ti)){if(a.add(y),y instanceof Tn){if(x&&y instanceof br)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 wn)for(y=y.labelNodes;y.next();)Uh(a,y.value,x,b,E,et)}}Ze.Object.defineProperties(tr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Gr: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(eo,"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&&(Ga(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 ti?this.type!==vn.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:Ui},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ga(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Qi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ga(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&&(Ga(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:ni},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ga(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,ba(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 ti)){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 ti?this instanceof ti&&(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 wn||(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&&(Ga(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&&(Ga(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&&(Ga(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 wn?(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&&(Ga(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&&(Ga(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&&(Ga(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:to},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ga(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&&(Ga(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&&(Ga(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:Oo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ga(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&&Ae("Cannot make a Group a member of itself: "+this.toString()),Ae("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 br&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?V0(a,this):this instanceof br&&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 br){for(x=new mn,Uh(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Tn)for(b=b.linksConnected;b.next();)Ld(b.value)}if(this instanceof Tn){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 Ae("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&&(Ga(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Tn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ga(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&&(Ga(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Xi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ga(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&&(Ga(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&&(Ga(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),tr.prototype.invalidateLayout=tr.prototype.C,tr.prototype.findCommonContainingGroup=tr.prototype.px,tr.prototype.isMemberOf=tr.prototype.Td,tr.prototype.findTopLevelPart=tr.prototype.sz,tr.prototype.findSubGraphLevel=tr.prototype.oz,tr.prototype.ensureBounds=tr.prototype.Va,tr.prototype.getDocumentBounds=tr.prototype.mi,tr.prototype.findObject=tr.prototype.fb,tr.prototype.moveTo=tr.prototype.moveTo,tr.prototype.invalidateAdornments=tr.prototype.Wb,tr.prototype.clearAdornments=tr.prototype.Ej,tr.prototype.removeAdornment=tr.prototype.Jf,tr.prototype.addAdornment=tr.prototype.bh,tr.prototype.findAdornment=tr.prototype.Pj,tr.prototype.updateTargetBindings=tr.prototype.La;var G1=!1;tr.className="Part",tr.LayoutNone=0,tr.LayoutAdded=1,tr.LayoutRemoved=2,tr.LayoutShown=4,tr.LayoutHidden=8,tr.LayoutNodeSized=16,tr.LayoutGroupLayout=32,tr.LayoutNodeReplaced=64,tr.LayoutStandard=127,tr.LayoutAll=16777215;function ti(a,y){a===void 0||a instanceof yo||typeof a=="string"?tr.call(this,a):(tr.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)}tn(ti,tr),ti.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},ti.prototype.updateRelationshipsFromData=function(){},ti.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof wn&&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)}}},ti.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ba(a))},ti.prototype.Zc=function(){return!1},ti.prototype.gk=function(a,y,x,b,E,et,nt){if(a===eo&&y==="elements"){if(E instanceof Ca)this.$a===null&&(this.$a=E);else if(E instanceof vn){var st=E.Nl(function(ht){return ht instanceof Ca});st instanceof Ca&&this.$a===null&&(this.$a=st)}}else a===vo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof vn&&this.$a.rg(b)&&(this.$a=null));tr.prototype.gk.call(this,a,y,x,b,E,et,nt)},ti.prototype.updateAdornments=function(){},ti.prototype.Lj=function(){},Ze.Object.defineProperties(ti.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}}}),ti.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Jo,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 Tn(a,y){a===void 0||a instanceof yo||typeof a=="string"?tr.call(this,a):(tr.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)}tn(Tn,tr),Tn.prototype.cloneProtected=function(a){tr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},qt=Tn.prototype,qt.Af=function(a){tr.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())}qt.th=function(){tr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new mn),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}qt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},qt.gk=function(a,y,x,b,E,et,nt){a===eo&&y==="elements"?this.wc=null:a===vo&&y==="elements"&&(this.wc=null),tr.prototype.gk.call(this,a,y,x,b,E,et,nt)},qt.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)}}qt.si=function(){return!0},Tn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Tn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Tn.prototype.isVisible=function(){if(!tr.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===ho){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},Tn.prototype.Zb=function(a){tr.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)}},Tn.prototype.qx=function(){var a=new mn,y=new mn;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)})}}Tn.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},qt=Tn.prototype,qt.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},qt.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},qt.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 mn,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 mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Jr(x):Gr},qt.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 mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Jr(x):Gr},qt.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 mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Jr(x):Gr},qt.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},qt.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}}}Tn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},qt=Tn.prototype,qt.Vo=function(a){tr.prototype.Vo.call(this,a),a||(Yp(this),a=this.Yk,a!==null&&tS(a,this))},qt.Wo=function(a){tr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},qt.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,tr.prototype.Lj.call(this)},qt.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 qn: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=Nn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Rn(x)}}}qt.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},qt.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}},qt.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},qt.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},qt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Tn)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},qt.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 mn;return a(this,y),y},qt.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}qt.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},qt.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 Jr(x):Gr},qt.wz=function(a){a===void 0&&(a=1/0);var y=new mn;return Uh(y,this,!1,a,!0),y},Tn.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 mn;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 yt=y.contains(pt);if(yt||y.add(pt),nt){var Mt=x?pt.Oo():pt.Po();ht.uv=a,Mt.all(function(zt){return function(Zt){return Zt===zt.uv||!Zt.isTreeExpanded}}(ht))&&b.Aj(pt,E),pt.oh(),pt.Zb(!1)}pt.isTreeExpanded&&(pt.wasTreeExpanded=pt.isTreeExpanded,yt||J1(pt,y,x,b,E,et))}ht={uv:ht.uv}}a.isTreeExpanded=!1}Tn.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 mn;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 yt=ht.value;if(yt.isTreeLink&&(st||yt.fd||yt.bb(),yt=yt.To(a),yt!==null&&yt!==a&&!y.contains(yt))){if(y.add(yt),!st){yt.Zb(!0),yt.oh();var Mt=x?yt.Oo():yt.Po();pt.vv=a,Mt.all(function(zt){return function(Zt){return Zt===zt.vv||!Zt.isTreeExpanded}}(pt))&&E.Cj(yt,et)}(2<b||yt.wasTreeExpanded)&&(yt.wasTreeExpanded=!1,Q1(yt,y,x,b-1,E,et,nt))}pt={vv:pt.vv}}a.isTreeExpanded=!0}Ze.Object.defineProperties(Tn.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:Jo},set:function(a){typeof a=="number"&&(a=new Br(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),wa(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))}}}),Tn.prototype.expandTree=Tn.prototype.expandTree,Tn.prototype.collapseTree=Tn.prototype.collapseTree,Tn.prototype.findTreeParts=Tn.prototype.wz,Tn.prototype.findTreeChildrenNodes=Tn.prototype.Ou,Tn.prototype.findTreeChildrenLinks=Tn.prototype.Qo,Tn.prototype.findTreeLevel=Tn.prototype.uz,Tn.prototype.findTreeParentChain=Tn.prototype.vz,Tn.prototype.findTreeParentNode=Tn.prototype.pg,Tn.prototype.findTreeParentLink=Tn.prototype.kh,Tn.prototype.findCommonTreeParent=Tn.prototype.gz,Tn.prototype.findTreeRoot=Tn.prototype.xz,Tn.prototype.isInTreeOf=Tn.prototype.Nz,Tn.prototype.findPort=Tn.prototype.ns,Tn.prototype.findLinksTo=Tn.prototype.kz,Tn.prototype.findLinksBetween=Tn.prototype.jz,Tn.prototype.findNodesInto=Tn.prototype.Oo,Tn.prototype.findNodesOutOf=Tn.prototype.Po,Tn.prototype.findNodesConnected=Tn.prototype.Mu,Tn.prototype.findLinksInto=Tn.prototype.Sd,Tn.prototype.findLinksOutOf=Tn.prototype.Mo,Tn.prototype.findExternalTreeLinksConnected=Tn.prototype.qx,Tn.prototype.invalidateConnectedLinks=Tn.prototype.Bd,Tn.prototype.invalidateLinkBundle=Tn.prototype.Lz;var kx=new dn(Tn,"SpreadingNone",10),Wm=new dn(Tn,"SpreadingEvenly",11),H0=new dn(Tn,"SpreadingPacked",12);Tn.className="Node",Tn.SpreadingNone=kx,Tn.SpreadingEvenly=Wm,Tn.SpreadingPacked=H0;function br(a,y){a===void 0||a instanceof yo||typeof a=="string"?Tn.call(this,a):(Tn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new mn,this.$a=null,this.Sc=new ji,this.Sc.group=this,this.gl=new mn,this.tb=this.$p=null,y&&Object.assign(this,y)}tn(br,Tn),br.prototype.cloneProtected=function(a){Tn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ca});y instanceof Ca?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())},qt=br.prototype,qt.Af=function(a){Tn.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 Tn)x.Bd(y);else if(x instanceof wn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},qt.gk=function(a,y,x,b,E,et,nt){if(a===eo&&y==="elements"){if(E instanceof Ca)this.$a===null?this.$a=E:this.$a!==E&&Ae("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof vn){var st=E.Nl(function(ht){return ht instanceof Ca});st instanceof Ca&&(this.$a===null?this.$a=st:this.$a!==st&&Ae("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 vn&&this.$a.rg(b)&&(this.$a=null));Tn.prototype.gk.call(this,a,y,x,b,E,et,nt)},qt.Xl=function(a,y){Tn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==vn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof vn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof Tr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},qt.eh=function(a,y,x,b){this.nf=this.$a,Tn.prototype.eh.call(this,a,y,x,b)},qt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof wn||y.Va()}),Tn.prototype.Va.call(this)},qt.si=function(){if(!Tn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Tn){if(y.isVisible()&&ba(y))return!1}else if(y instanceof wn&&y.isVisible()&&ba(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function V0(a,y){if(a.Gn.add(y)){y instanceof br&&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 wn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function K0(a,y){if(a.Gn.remove(y)){y instanceof br&&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 wn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}qt.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)}Tn.prototype.Lj.call(this)},br.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=nn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},br.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=nn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},br.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))},qt=br.prototype,qt.Bd=function(a){var y=(this.U&65536)!==0;if(Tn.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()))}}},qt.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 mn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Tn)for(E=E.linksConnected;E.next();){var et=E.value;y.contains(et)||x.add(et)}}return a&&(this.$p=x),x.iterator},qt.iz=function(){var a=this.Rj();a.add(this);for(var y=new mn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Tn)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},qt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new mn;return a(this,y),y},qt.Rj=function(){var a=new mn;return Uh(a,this,!0,0,!0),a.remove(this),a},qt.Zb=function(a){Tn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},br.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 br&&et.isSubGraphExpanded&&(et.wasSubGraphExpanded=et.isSubGraphExpanded,$1(et,y,x,b)),et instanceof Tn)et.Bd(y),x.Aj(et,b);else if(et instanceof wn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!1}br.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 br&&et.wasSubGraphExpanded&&(et.wasSubGraphExpanded=!1,q1(et,y,x,b)),et instanceof Tn)et.Bd(y),x.Cj(et,b);else if(et instanceof wn)for(et=et.labelNodes;et.next();)et.value.Bd(y)}a.isSubGraphExpanded=!0}br.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=Me.alloc(),Tn.prototype.move.call(this,a,y),a=new mn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof wn&&(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 Tn&&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 wn&&(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());Me.free(et)}},Ze.Object.defineProperties(br.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&&Ae("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)}}}),br.prototype.expandSubGraph=br.prototype.expandSubGraph,br.prototype.collapseSubGraph=br.prototype.collapseSubGraph,br.prototype.findSubGraphParts=br.prototype.Rj,br.prototype.findContainingGroupChain=br.prototype.hz,br.prototype.findExternalNodesConnected=br.prototype.iz,br.prototype.findExternalLinksConnected=br.prototype.Lu,br.prototype.ensureBounds=br.prototype.Va,br.className="Group";function Ca(a){ze.call(this),this.yb=us,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}tn(Ca,ze),Ca.prototype.cloneProtected=function(a){ze.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ca.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Go(0,0,y.width,y.height,a.x,a.y)},Ca.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof br||a instanceof ti)||Ae("Placeholder is not inside a Group or Adornment."),a instanceof br){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Wo(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=Me.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Me.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!==vn.Link&&(st=et.ga(a.category==="Selection"?ni:a.locationSpot,Me.alloc()),a.location=st,Me.free(st)),isNaN(pt)||isNaN(nt)?(a=et.ga(ni,Me.alloc()),pt=on.allocAt(a.x,a.y,0,0),pt.Ye(et.ga(lo,a)),pt.Ye(et.ga(gi,a)),pt.Ye(et.ga(oa,a)),Wo(y,pt.width+b||0,pt.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Me.free(a),on.free(pt)):(Wo(y,pt+b||0,nt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ca.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ca.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof br&&!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 br&&!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 br&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ca.prototype.computeMemberBounds=function(a){if(!(this.part instanceof br))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 wn&&(!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},Ze.Object.defineProperties(Ca.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ca.className="Placeholder";function wn(a){tr.call(this,vn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ka,this.Om=0,this.Qm=ka,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new yn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new xn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Me,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}tn(wn,tr),wn.prototype.cloneProtected=function(a){tr.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())},qt=wn.prototype,qt.Af=function(a){tr.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)},qt.qb=function(a){a.classType===wn?(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!==ka&&Ae("Unknown Link enum value for a Link property: "+a):tr.prototype.qb.call(this,a)},qt.Xc=function(){this.ba===null&&(this.ba=new Rp)},qt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ba(a)||zh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ba(a)||zh(a)))},qt.zv=function(){return!1},qt.Av=function(){},qt.Zc=function(){return!1},wn.prototype.computeAngle=function(a,y,x){return wn.computeAngle(y,x)},wn.computeAngle=function(a,y){switch(a){default:case ka: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}qt=wn.prototype,qt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&tr.prototype.oh.call(this)},qt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},qt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tS(a,y){a.wd===null&&(a.wd=new mn),a.wd.add(y),a.v()}qt.Vo=function(a){if(tr.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)}},qt.Wo=function(a){if(tr.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)}},qt.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))},wn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},wn.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?tr.prototype.move.call(this,a,!1):(a=Me.allocAt(x.x+b,x.y+E),tr.prototype.move.call(this,a,!1),Me.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)},wn.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},wn.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},wn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(pi),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},wn.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)},qt=wn.prototype,qt.i=function(a){return this.Nb.s[a]},qt.dd=function(a,y){this.Nb.cd(a,y)},qt.L=function(a,y,x){this.Nb.cd(a,new Me(y,x))},qt.Kz=function(a,y){this.Nb.Gb(a,y)},qt.m=function(a,y,x){this.Nb.Gb(a,new Me(y,x))},qt.ne=function(a){this.Nb.add(a)},qt.yf=function(a,y){this.Nb.add(new Me(a,y))},qt.pv=function(a){this.Nb.mb(a)},qt.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 Me(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),wa(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)}}qt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},qt.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,yt=0;yt<pt;yt++){var Mt=ht[yt];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(yt=E[et],Mt=ht[et],yt.x-x!==Mt.x-nt||yt.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)}},qt.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))}qt.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())}},qt.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()}}},wn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Ef||(Ef=new Tn,Ef.desiredSize=Ar,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 Tn,Mf.desiredSize=Ar,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,yt=this.isOrthogonal,Mt=this.curve===vs;this.Wf=pt&&!yt?Mt=!0:!1;var zt=this.computeAdjusting()===ka||pt;if(!yt&&!pt&&st&&ht){if(st=!1,!zt&&3<=et&&(zt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),st=this.adjustPoints(0,zt,et-1,ht))&&(zt=this.getLinkPoint(a,y,nt,!0,!1,b,E),ht=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,zt,et-1,ht)),!st)if(this.Fj(),Mt){et=this.getLinkPoint(a,y,nt,!0,!1,b,E),zt=this.getLinkPoint(b,E,x,!1,!1,a,y),st=zt.x-et.x,ht=zt.y-et.y,pt=this.computeCurviness(),Mt=yt=0;var Zt=et.x+st/3,Qt=et.y+ht/3,ie=Zt,Ee=Qt;Ge.B(ht,0)?Ee=0<st?Ee-pt:Ee+pt:(yt=-st/ht,Mt=Math.sqrt(pt*pt/(yt*yt+1)),0>pt&&(Mt=-Mt),ie=(0>ht?-1:1)*Mt+Zt,Ee=yt*(ie-Zt)+Qt),Zt=et.x+2*st/3,Qt=et.y+2*ht/3;var we=Zt,je=Qt;Ge.B(ht,0)?je=0<st?je-pt:je+pt:(we=(0>ht?-1:1)*Mt+Zt,je=yt*(we-Zt)+Qt),this.Fj(),this.ne(et),this.yf(ie,Ee),this.yf(we,je),this.ne(zt),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,zt=E,b=this.getLinkPoint(a,y,nt,!0,!1,et,zt),E=this.getLinkPoint(et,zt,x,!1,!1,a,y),this.hasCurviness()?(zt=E.x-b.x,x=E.y-b.y,nt=this.computeCurviness(),a=b.x+zt/2,y=b.y+x/2,et=a,st=y,Ge.B(x,0)?st=0<zt?st-nt:st+nt:(zt=-zt/x,et=Math.sqrt(nt*nt/(zt*zt+1)),0>nt&&(et=-et),et=(0>x?-1:1)*et+a,st=zt*(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),zt.mi(st),pt=st.ca(b),(ht||pt)&&(nt=y.ga(Km(nt),new Me),this.dd(0,this.getLinkPointFromPoint(a,y,nt,E,!0,nt)),x=zt.ga(Km(x),new Me),this.dd(1,this.getLinkPointFromPoint(et,zt,x,b,!1,x))),on.free(st))}else{Mt=this.isAvoiding,zt&&(yt&&Mt||pt)&&this.Fj();var Oe=pt?this.computeCurviness():0;Mt=this.getLinkPoint(a,y,nt,!0,yt,b,E),Zt=ie=Qt=0,(yt||!st||pt)&&(Ee=this.computeEndSegmentLength(a,y,nt,!0),Zt=this.getLinkDirection(a,y,Mt,nt,!0,yt,b,E),pt&&(st||nt.D(x)||!yt&&nt.x+x.x===1&&nt.y+x.y===1)&&(Zt-=yt?90:30,0>Oe&&(Zt-=180)),0>Zt?Zt+=360:360<=Zt&&(Zt-=360),pt&&(Ee+=Math.abs(Oe)*(yt?1:2)),Zt===0?Qt=Ee:Zt===90?ie=Ee:Zt===180?Qt=-Ee:Zt===270?ie=-Ee:(Qt=Ee*Math.cos(Zt*Math.PI/180),ie=Ee*Math.sin(Zt*Math.PI/180)),nt.Mc()&&pt&&(Ee=y.ga(Ir,Me.alloc()),we=Me.allocAt(Ee.x+1e3*Qt,Ee.y+1e3*ie),this.getLinkPointFromPoint(a,y,Ee,we,!0,Mt),Me.free(Ee),Me.free(we))),Ee=this.getLinkPoint(b,E,x,!1,yt,a,y);var De=je=we=0;if(yt||!ht||pt){var _e=this.computeEndSegmentLength(b,E,x,!1);De=this.getLinkDirection(b,E,Ee,x,!1,yt,a,y),pt&&(ht||nt.D(x)||!yt&&nt.x+x.x===1&&nt.y+x.y===1)&&(De+=yt?0:30,0>Oe&&(De+=180)),0>De?De+=360:360<=De&&(De-=360),pt&&(_e+=Math.abs(Oe)*(yt?1:2)),De===0?we=_e:De===90?je=_e:De===180?we=-_e:De===270?je=-_e:(we=_e*Math.cos(De*Math.PI/180),je=_e*Math.sin(De*Math.PI/180)),x.Mc()&&pt&&(x=E.ga(Ir,Me.alloc()),nt=Me.allocAt(x.x+1e3*we,x.y+1e3*je),this.getLinkPointFromPoint(b,E,x,nt,!1,Ee),Me.free(x),Me.free(nt))}x=Mt,(yt||!st||pt)&&(x=new Me(Mt.x+Qt,Mt.y+ie)),nt=Ee,(yt||!ht||pt)&&(nt=new Me(Ee.x+we,Ee.y+je)),!zt&&!yt&&st&&3<et&&this.adjustPoints(0,Mt,et-2,nt)?this.dd(et-1,Ee):!zt&&!yt&&ht&&3<et&&this.adjustPoints(1,x,et-1,Ee)?this.dd(0,Mt):!zt&&(yt?6<=et:4<et)&&this.adjustPoints(1,x,et-2,nt)?(this.dd(0,Mt),this.dd(et-1,Ee)):(this.Fj(),this.ne(Mt),(yt||!st||pt)&&this.ne(x),yt&&this.addOrthoPoints(x,Zt,nt,De,a,b),(yt||!ht||pt)&&this.ne(nt),this.ne(Ee))}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}wn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,et){if(et===void 0&&(et=new Me),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,yt=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+yt,b=b.x*st+b.y*pt+Mt,nt=x.x*nt+x.y*ht+yt,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)}wn.prototype.getLinkPoint=function(a,y,x,b,E,et,nt,st){if(st===void 0&&(st=new Me),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=Me.alloc(),pt=Me.alloc();var yt=new on(y.ga(ni,ht),y.ga(lo,pt)),Mt=this.computeSpot(!b,nt);a=this.getLinkPoint(et,nt,Mt,!b,E,a,y,pt),(x.Hf(bs)||x.Hf(Oa))&&a.y>=yt.y&&a.y<=yt.y+yt.height?st.y=a.y:(x.Hf(Ja)||x.Hf(Ps))&&a.x>=yt.x&&a.x<=yt.x+yt.width&&(st.x=a.x),Me.free(ht),Me.free(pt)}}return st}}return x=y.ga(Km(x),Me.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=Me.alloc(),nt=nt.ga(Km(ht),et),E&&(nt=Z0(x,nt)),Me.free(et)),this.getLinkPointFromPoint(a,y,x,nt,b,st),Me.free(x),st},wn.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(Ir,Me.alloc()),this.pointsCount>(et?6:2)?(st=E?this.i(1):this.i(this.pointsCount-2),st=et?Z0(ht,st.copy()):x):(x=Me.alloc(),st=st.ga(Ir,x),Me.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,Me.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},wn.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)},wn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Ir:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Oo?Wr:y)):(a=y||this.toPort,a===null?a=Ir:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Oo?Wr:y)),a};function Ad(a){return a===Wr||a.x===.5&&a.y===.5}function Km(a){return a.x===.5&&a.y===.5?a:Ir}wn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ka&&4<this.pointsCount?this.computeMidPoint(new Me):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Ir))},wn.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},wn.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 yt=ht[pt];if(yt.visible||yt===this.locationObject){var Mt=yt.actualBounds,zt=this.naturalBounds;if(!(Mt.x>zt.width||Mt.y>zt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height)){if(Mt=Sr.alloc(),Mt.set(nt),yt instanceof vn)st=yt.Cf(a,y,x,b,E,Mt);else if(this.path===yt){if(yt instanceof Tr)if(st=a,zt=b,yt.pickable===!1)st=!1;else if(Mt.multiply(yt.transform),zt)t:{var Zt=st,Qt=Mt;if(yt.fh(Zt,Qt))st=!0;else{if(Qt===void 0&&(Qt=yt.transform,Zt.Re(yt.actualBounds))){st=!0;break t}st=Zt.left,zt=Zt.right;var ie=Zt.top;Zt=Zt.bottom;var Ee=Me.alloc(),we=Me.alloc(),je=Me.alloc(),Oe=Sr.alloc();Oe.set(Qt),Oe.bv(yt.transform),Oe.Vj(),we.x=zt,we.y=ie,we.transform(Oe),Ee.x=st,Ee.y=ie,Ee.transform(Oe),Qt=!1,Dc(yt,Ee,we,je)?Qt=!0:(Ee.x=zt,Ee.y=Zt,Ee.transform(Oe),Dc(yt,Ee,we,je)?Qt=!0:(we.x=st,we.y=Zt,we.transform(Oe),Dc(yt,Ee,we,je)?Qt=!0:(Ee.x=st,Ee.y=ie,Ee.transform(Oe),Dc(yt,Ee,we,je)&&(Qt=!0)))),Sr.free(Oe),Me.free(Ee),Me.free(we),Me.free(je),st=Qt}}else st=yt.fh(st,Mt)}else st=ko(yt,a,b,Mt);st&&(zt=yt,y!==null&&(zt=y(yt)),zt&&(x===null||x(zt))&&E.add(zt)),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},wn.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},wn.prototype.computeCorner=function(){if(this.curve===vs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},wn.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},wn.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(Ir).ab(x.ga(Ir))/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},wn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ka&&x.bb()}},wn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=Nn(),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),Rn(x)}}return a},wn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},wn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},wn.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 yt=0>ht?-Math.PI/2:Math.PI/2;else yt=Math.atan(ht/Math.abs(st)),0>st&&(yt=Math.PI-yt);nt=y.x;var Mt=y.y;st=b.x-nt;var zt=b.y-Mt;for(ht=Math.sqrt(st*st+zt*zt),Ge.$(st,0)?zt=0>zt?-Math.PI/2:Math.PI/2:(zt=Math.atan(zt/Math.abs(st)),0>st&&(zt=Math.PI-zt)),pt=ht/pt,yt=zt-yt,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+yt,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,yt=y.y,ht=b.x,zt=b.y;var Zt=1;if(ht-st!==0){var Qt=(zt-yt)/(ht-st);Zt=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,Ee=y.y,we=.5;pt!==0&&(we=((E-ie)*(E-nt)+(et-Ee)*(et-Mt))/pt);var je=E+we*(nt-E),Oe=et+we*(Mt-et);y=Math.sqrt((ie-je)*(ie-je)+(Ee-Oe)*(Ee-Oe)),Ee<Qt*(ie-je)+Oe&&(y=-y),0<Qt&&(y=-y),ie=st+we*(ht-st),we=yt+we*(zt-yt),Qt!==0?(y=ie+y/Zt,this.L(a,y,we-(y-ie)/Qt)):this.L(a,ie,we+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,yt=et.y,Mt=st,pt=yt,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?yt=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)&&(yt=y.y)),this.L(a+1,st,yt),E=this.i(x),et=this.i(x-1),nt=this.i(x-2),st=et.x,yt=et.y,ht=st,zt=yt,Ge.B(E.y,et.y)?Ge.B(et.x,nt.x)?yt=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)&&(yt=b.y)),this.L(x-1,st,yt),X0(this))){this.L(a+1,Mt,pt),this.L(x-1,ht,zt),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},wn.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=Me.alloc(),yt=Me.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),yt.h(x.x,(a.y+x.y)/2),b===180?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),yt.x=pt.x,yt.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,yt.x=pt.x,yt.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),yt.y=pt.y)):(pt.h(a.x,x.y),yt.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)),yt.x=x.x,yt.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),yt.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)),yt.x=x.x,yt.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),yt.h(x.x,(a.y+x.y)/2),b===0?(pt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),yt.x=pt.x,yt.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,yt.x=pt.x,yt.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),yt.y=pt.y)):(pt.h(a.x,x.y),yt.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)),yt.x=x.x,yt.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),yt.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)),yt.x=x.x,yt.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),yt.h((a.x+x.x)/2,x.y),b===270?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),yt.x=x.x,yt.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,yt.x=x.x,yt.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,yt.x=pt.x)):(pt.h(x.x,a.y),yt.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)),yt.x=pt.x,yt.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)),yt.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)),yt.x=pt.x,yt.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),yt.h((a.x+x.x)/2,x.y),b===90?(pt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),yt.x=x.x,yt.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,yt.x=x.x,yt.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,yt.x=pt.x)):(pt.h(x.x,a.y),yt.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)),yt.x=pt.x,yt.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)),yt.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)),yt.x=pt.x,yt.y=x.y)));var Mt=x;if(this.isAvoiding){var zt=this.diagram;if(zt===null||E===et||this.layer.isTemporary||!hd(zt)||st.ca(Mt)&&!et.Td(E)||ht.ca(a)&&!E.Td(et))y=!1;else{var Zt=cd(zt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Zt.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))&&Zt.Yj(Math.min(pt.x,yt.x),Math.min(pt.y,yt.y),Math.abs(pt.x-yt.x),Math.abs(pt.y-yt.y))&&Zt.Yj(Math.min(yt.x,Mt.x),Math.min(yt.y,Mt.y),Math.abs(yt.x-Mt.x),Math.abs(yt.y-Mt.y)))y=!1;else{E=a,et=Mt;var Qt=x=null;if(zt.isVirtualized){zt=Zt.bounds.copy(),zt.Bc(-Zt.Ho,-Zt.Go);var ie=Me.alloc();jd(Zt,a.x,a.y)||(Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,a.x,a.y,pt.x,pt.y,ie)?(x=a=ie.copy(),y=ie.ab(pt)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,pt.x,pt.y,yt.x,yt.y,ie)?(x=a=ie.copy(),y=ie.ab(yt)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,yt.x,yt.y,Mt.x,Mt.y,ie)&&(x=a=ie.copy(),y=ie.ab(Mt))),jd(Zt,Mt.x,Mt.y)||(Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,Mt.x,Mt.y,yt.x,yt.y,ie)?(Qt=Mt=ie.copy(),b=yt.ab(ie)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,yt.x,yt.y,pt.x,pt.y,ie)?(Qt=Mt=ie.copy(),b=pt.ab(ie)):Ge.Ff(zt.x,zt.y,zt.x+zt.width,zt.y+zt.height,pt.x,pt.y,a.x,a.y,ie)&&(Qt=Mt=ie.copy(),b=a.ab(ie))),Me.free(ie)}st=st.copy().ed(ht),st.Bc(Zt.Ho*Zt.Os,Zt.Go*Zt.Os),aS(Zt,a,y,Mt,b,st,!0),ht=tu(Zt,Mt.x,Mt.y),!Zt.abort&&ht>=Od&&(oS(Zt),st.Bc(Zt.Ho*Zt.Hx,Zt.Go*Zt.Ix),aS(Zt,a,y,Mt,b,st,!1),ht=tu(Zt,Mt.x,Mt.y)),!Zt.abort&&ht<Od&&tu(Zt,Mt.x,Mt.y)!==lh?(Y0(this,Zt,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)<=Zt.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)<=Zt.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(yt.copy())),Me.free(pt),Me.free(yt)}},wn.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),yt=x,Mt=b;for(E===0?yt+=st:E===90?Mt+=ht:E===180?yt-=st:Mt-=ht,E!==nt&&pt>Rc&&tu(y,yt,Mt)!==pt-1&&(tu(y,x-st,b)===pt-1?(E=180,yt=x-st,Mt=b):tu(y,x+st,b)===pt-1?(E=0,yt=x+st,Mt=b):tu(y,x,b-ht)===pt-1?(E=270,yt=x,Mt=b-ht):tu(y,x,b+ht)===pt-1&&(E=90,yt=x,Mt=b+ht));pt>Rc&&tu(y,yt,Mt)===pt-1;)x=yt,b=Mt,E===0?yt+=st:E===90?Mt+=ht:E===180?yt-=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,yt=b,E===0?(et=90,yt+=ht):E===90?(et=180,nt-=st):E===180?(et=270,yt-=ht):E===270&&(et=0,nt+=st),tu(y,nt,yt)===pt-1?Y0(a,y,nt,yt,et,!1,et):(nt=x,yt=b,E===0?(et=270,yt-=ht):E===90?(et=0,nt+=st):E===180?(et=90,yt+=ht):E===270&&(et=180,nt-=st),tu(y,nt,yt)===pt-1&&Y0(a,y,nt,yt,et,!1,et))),a.yf(x,b)}wn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Vr(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=Vr(y,a,b.x,b.y,x.x,x.y);b=x,st<E&&(et=nt,E=st)}return et},wn.prototype.qc=function(){this.lk=!1,this.v()},wn.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)}}},wn.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=xn.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=Me.allocAt(b,ht),x=Me.alloc(),x.assign(this.i(1)),et=Me.allocAt(b,ht),E=Me.allocAt(b,ht),nt=this.i(0);for(var pt,yt=this.smoothness/3,Mt=1;Mt<this.pointsCount-1;Mt++){pt=this.i(Mt);var zt=nt,Zt=pt,Qt=this.i(J0(this,pt,Mt,!1));if((!Ge.$(zt.x,Zt.x)||!Ge.$(Zt.x,Qt.x))&&(!Ge.$(zt.y,Zt.y)||!Ge.$(Zt.y,Qt.y))){var ie=yt;isNaN(ie)&&(ie=this.smoothness/3);var Ee=zt.x;zt=zt.y;var we=Zt.x;Zt=Zt.y;var je=Qt.x;Qt=Qt.y;var Oe=ie*Zm(Ee,zt,we,Zt);ie*=Zm(we,Zt,je,Qt),Ge.$(zt,Zt)&&Ge.$(we,je)&&(we>Ee?Qt>Zt?(et.x=we-Oe,et.y=Zt-Oe,E.x=we+ie,E.y=Zt+ie):(et.x=we-Oe,et.y=Zt+Oe,E.x=we+ie,E.y=Zt-ie):Qt>Zt?(et.x=we+Oe,et.y=Zt-Oe,E.x=we-ie,E.y=Zt+ie):(et.x=we+Oe,et.y=Zt+Oe,E.x=we-ie,E.y=Zt-ie)),Ge.$(Ee,we)&&Ge.$(Zt,Qt)&&(Zt>zt?(je>we?(et.x=we-Oe,et.y=Zt-Oe,E.x=we+ie):(et.x=we+Oe,et.y=Zt-Oe,E.x=we-ie),E.y=Zt+ie):(je>we?(et.x=we-Oe,et.y=Zt+Oe,E.x=we+ie):(et.x=we+Oe,et.y=Zt+Oe,E.x=we-ie),E.y=Zt-ie)),(Ge.$(Ee,we)&&Ge.$(we,je)||Ge.$(zt,Zt)&&Ge.$(Zt,Qt))&&(Ee=.5*(Ee+je),zt=.5*(zt+Qt),et.x=Ee,et.y=zt,E.x=Ee,E.y=zt),(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,yt=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(yt=Cf(this,yt.copy(),!1,zi)),pt=.5*(pt+yt.x),nt=.5*(nt+yt.y),rh(st,E.x-b,E.y-ht,pt-b,nt-ht,yt.x-b,yt.y-ht),Me.free(y),Me.free(x),Me.free(et),Me.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,zi)),rh(st,et.x-b,et.y-ht,E.x-b,E.y-ht,nt.x-b,nt.y-ht);else{for(et=Me.alloc(),et.assign(this.i(0)),E=Me.alloc(),E.assign(et),nt=this.computeCorner(),Mt=1,pt=0;Mt<y;){if(Mt=J0(this,et,Mt,1<Mt),yt=this.i(Mt),Mt>=y-1){if(!et.D(yt))this.computeShortLength(!1)!==0&&(yt=Cf(this,yt.copy(),!1,zi)),kf(this,st,-b,-ht,et,yt,x);else if(pt===0)for(Mt=1;Mt<y;)E.assign(et),yt=this.i(Mt++),kf(this,st,-b,-ht,et,yt,x),et.assign(yt);break}if(pt=J0(this,yt,Mt+1,Mt<y-3),Mt=-b,Ee=-ht,zt=yt,we=this.i(pt),ie=x,Ge.B(et.y,zt.y)&&Ge.B(zt.x,we.x))if(Qt=Math.min(nt,Math.abs(zt.x-E.x)/2),Qt=Oe=Math.min(Qt,Math.abs(we.y-zt.y)/2),Ge.B(Qt,0))kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt);else{var De=zt.x,_e=zt.y;Zt=De,je=_e,zt.x>et.x?De=zt.x-Qt:De=zt.x+Qt,we.y>zt.y?je=zt.y+Oe:je=zt.y-Oe,we=Me.allocAt(De,_e),kf(this,st,Mt,Ee,et,we,ie),Me.free(we),Im(st,zt.x+Mt,zt.y+Ee,Zt+Mt,je+Ee),et.h(Zt,je)}else Ge.B(et.x,zt.x)&&Ge.B(zt.y,we.y)?(Qt=Math.min(nt,Math.abs(zt.y-E.y)/2),Qt=Oe=Math.min(Qt,Math.abs(we.x-zt.x)/2),Ge.B(Oe,0)?(kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt)):(De=zt.x,_e=zt.y,Zt=De,je=_e,zt.y>et.y?_e=zt.y-Qt:_e=zt.y+Qt,we.x>zt.x?Zt=zt.x+Oe:Zt=zt.x-Oe,we=Me.allocAt(De,_e),kf(this,st,Mt,Ee,et,we,ie),Me.free(we),Im(st,zt.x+Mt,zt.y+Ee,Zt+Mt,je+Ee),et.h(Zt,je))):(kf(this,st,Mt,Ee,et,zt,ie),et.assign(zt));E.assign(yt),Mt=pt}Me.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=xn.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}wn.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 yt=0;yt<pt;){var Mt=Math.max(E.x,Math.min(ht[yt++]-st,et.x-nt));y.lineTo(Mt+x,et.y+b);for(var zt=Mt+x,Zt=Math.min(Mt+nt,et.x);yt<pt&&(Mt=ht[yt],Mt<Zt+nt);)yt++,Zt=Math.min(Mt+st,et.x);Mt=et.y-nt+b,Zt+=x;var Qt=et.y+b;a.curve===sh?Td(y,Zt,Qt,!1):rh(y,zt,Mt,Zt,Mt,Zt,Qt)}else for(--pt;0<=pt;){for(yt=Math.min(E.x,Math.max(ht[pt--]+st,et.x+nt)),y.lineTo(yt+x,et.y+b),zt=yt+x,Mt=Math.max(yt-nt,et.x);0<=pt&&(yt=ht[pt],yt>Mt-nt);)pt--,Mt=Math.max(yt-st,et.x);yt=et.y-nt+b,Mt+=x,Zt=et.y+b,a.curve===sh?Td(y,Mt,Zt,!1):rh(y,zt,yt,Mt,yt,Mt,Zt)}else if(Ge.B(E.x,et.x))if(E.y<et.y)for(yt=0;yt<pt;){for(Mt=Math.max(E.y,Math.min(ht[yt++]-st,et.y-nt)),y.lineTo(et.x+x,Mt+b),zt=Mt+b,Mt=Math.min(Mt+nt,et.y);yt<pt&&(Zt=ht[yt],Zt<Mt+nt);)yt++,Mt=Math.min(Zt+st,et.y);Zt=et.x-nt+x,Qt=et.x+x,Mt+=b,a.curve===sh?Td(y,Qt,Mt,!1):rh(y,Zt,zt,Zt,Mt,Qt,Mt)}else for(--pt;0<=pt;){for(yt=Math.min(E.y,Math.max(ht[pt--]+st,et.y+nt)),y.lineTo(et.x+x,yt+b),zt=yt+b,yt=Math.max(yt-nt,et.y);0<=pt&&(Mt=ht[pt],Mt>yt-nt);)pt--,yt=Math.max(Mt-st,et.y);Mt=et.x-nt+x,Zt=et.x+x,yt+=b,a.curve===sh?Td(y,Zt,yt,!1):rh(y,Mt,zt,Mt,yt,Zt,yt)}}}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 wn){if(ht===a)return 0<b.length&&b.sort(function(yt,Mt){return yt-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(yt,Mt){return yt-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=Me.alloc(),ht=1;ht<et;ht++){var pt=b.i(ht);if(ht<et-1){var yt=b.i(ht+1);if(nt.y===pt.y&&pt.y===yt.y){if(pt.x>nt.x&&yt.x>=pt.x||pt.x<nt.x&&yt.x<=pt.x)continue}else if(nt.x===pt.x&&pt.x===yt.x&&(pt.y>nt.y&&yt.y>=pt.y||pt.y<nt.y&&yt.y<=pt.y))continue}t:{yt=a.x;var Mt=a.y,zt=y.x,Zt=y.y,Qt=nt.x;nt=nt.y;var ie=pt.x,Ee=pt.y;if(Ge.B(yt,zt)){if(!Ge.B(Mt,Zt)&&Ge.B(nt,Ee)&&Math.min(Mt,Zt)<nt&&Math.max(Mt,Zt)>nt&&Math.min(Qt,ie)<yt&&Math.max(Qt,ie)>yt&&!Ge.B(Qt,ie)){st.x=yt,st.y=nt,yt=!0;break t}}else if(Ge.B(Mt,Zt)&&Ge.B(Qt,ie)&&Math.min(yt,zt)<Qt&&Math.max(yt,zt)>Qt&&Math.min(nt,Ee)<Mt&&Math.max(nt,Ee)>Mt&&!Ge.B(nt,Ee)){st.x=Qt,st.y=Mt,yt=!0;break t}st.x=0,st.y=0,yt=!1}yt&&(E?x.push(st.x):x.push(st.y)),nt=pt}Me.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()))}wn.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 wn&&(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 wn&&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())}}wn.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},wn.prototype.isVisible=function(){if(!tr.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},wn.prototype.Zb=function(a){if(tr.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)},wn.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&&($n(y.links,a),y.Sl()))}wn.prototype.ph=function(){return!0},Ze.Object.defineProperties(wn.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:Oo},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&&Mn(a,">= 0",wn,"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:Oo},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&&Mn(a,">= 0",wn,"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?Gr: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 Me)}},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 Me(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(!en(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 Me(E.x,E.y).freeze())}}else if(a instanceof yn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ae("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)}}}),wn.prototype.invalidateOtherJumpOvers=wn.prototype.Xo,wn.prototype.findClosestSegment=wn.prototype.ez,wn.prototype.updateRoute=wn.prototype.vg,wn.prototype.invalidateRoute=wn.prototype.bb,wn.prototype.rollbackRoute=wn.prototype.rv,wn.prototype.commitRoute=wn.prototype.zf,wn.prototype.startRoute=wn.prototype.uh,wn.prototype.clearPoints=wn.prototype.Fj,wn.prototype.removePoint=wn.prototype.pv,wn.prototype.addPointAt=wn.prototype.yf,wn.prototype.addPoint=wn.prototype.ne,wn.prototype.insertPointAt=wn.prototype.m,wn.prototype.insertPoint=wn.prototype.Kz,wn.prototype.setPointAt=wn.prototype.L,wn.prototype.setPoint=wn.prototype.dd,wn.prototype.getPoint=wn.prototype.i,wn.prototype.getOtherPort=wn.prototype.Cz,wn.prototype.getOtherNode=wn.prototype.To;var Ef=null,Mf=null,Q0=new dn(wn,"Normal",1),Tx=new dn(wn,"Orthogonal",2),Lx=new dn(wn,"AvoidsNodes",6),nS=new dn(wn,"AvoidsNodesStraight",7),ka=new dn(wn,"None",0),vs=new dn(wn,"Bezier",9),sh=new dn(wn,"JumpGap",10),Nd=new dn(wn,"JumpOver",11),$p=new dn(wn,"End",17),Ym=new dn(wn,"Scale",18),Jm=new dn(wn,"Stretch",19),qp=new dn(wn,"OrientAlong",21),tg=new dn(wn,"OrientPlus90",22),eg=new dn(wn,"OrientMinus90",23),$0=new dn(wn,"OrientOpposite",24),Qm=new dn(wn,"OrientUpright",25),ng=new dn(wn,"OrientPlus90Upright",26),rg=new dn(wn,"OrientMinus90Upright",27),$m=new dn(wn,"OrientUpright45",28),rS=16,iS=14,ig=8;wn.className="Link",wn.Normal=Q0,wn.Orthogonal=Tx,wn.AvoidsNodes=Lx,wn.AvoidsNodesStraight=nS,wn.None=ka,wn.Bezier=vs,wn.JumpGap=sh,wn.JumpOver=Nd,wn.End=$p,wn.Scale=Ym,wn.Stretch=Jm,wn.OrientAlong=qp,wn.OrientPlus90=tg,wn.OrientMinus90=eg,wn.OrientOpposite=$0,wn.OrientUpright=Qm,wn.OrientPlus90Upright=ng,wn.OrientMinus90Upright=rg,wn.OrientUpright45=$m,wn.EndSegmentStep=8,wn.CurvinessStart=rS,wn.SpacingMin=iS,wn.OrthoShortCut=ig;function qm(a,y,x,b){oi(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){oi(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,yt=x|0,Mt=a.ac[pt][yt];if(Mt>=Rc&&Mt<Od)for(E?yt+=b:pt+=b,Mt+=1;et<=pt&&pt<=nt&&st<=yt&&yt<=ht&&!(Mt>=a.ac[pt][yt]);)a.ac[pt][yt]=Mt,Mt+=1,E?yt+=b:pt+=b;if(pt=E?yt: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,yt=Rc;for(a.ac[y][x]=yt;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)yt+=1,a.ac[y][x]=yt,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,yt=Od;for(a.ac[y][x]=yt;pt===lh&&y>et&&y<nt&&x>st&&x<ht;)a.ac[y][x]=yt,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,yt=b.y;if(jd(a,pt,yt))if(pt-=a.Nd,pt/=a.rc,yt-=a.Od,yt/=a.sc,1>=Math.abs(st-pt)&&1>=Math.abs(ht-yt))a.abort=!0;else{var Mt=et.x;b=et.y,y=et.x+et.width;var zt=et.y+et.height;Mt-=a.Nd,Mt/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,zt-=a.Od,zt/=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)),zt=Math.min(a.ei,Math.max(0,zt|0)),b=a.ac,st|=0,ht|=0,pt|=0,yt|=0;var Zt=x===0||x===90?1:-1;if(x=x===90||x===270,b[st][ht]===lh?(tv(a,st,ht,Zt,x,et,y,Mt,zt),tv(a,st,ht,1,!x,et,y,Mt,zt),tv(a,st,ht,-1,!x,et,y,Mt,zt)):tv(a,st,ht,Zt,x,st,ht,st,ht),b[pt][yt]===lh?(ev(a,pt,yt,E===0||E===90?1:-1,E===90||E===270,et,y,Mt,zt),ev(a,pt,yt,1,!(E===90||E===270),et,y,Mt,zt),ev(a,pt,yt,-1,!(E===90||E===270),et,y,Mt,zt)):ev(a,pt,yt,Zt,x,pt,yt,pt,yt),x=Nn(),nt&&sS(a,pt,yt,E,st,ht,x))for((x[0]!==pt||x[1]!==yt)&&(x.unshift(yt),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,zt),eu(a,st,ht,-1,!1,et,y,Mt,zt),eu(a,st,ht,1,!0,et,y,Mt,zt),eu(a,st,ht,-1,!0,et,y,Mt,zt);Rn(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 yt=ht,Mt=pt;if(b===0)if(yt<E)yt++;else break;else if(b===90)if(Mt<et)Mt++;else break;else if(b===180)if(yt>E)yt--;else break;else if(Mt>et)Mt--;else break;var zt=st[yt][Mt];if(zt===0||zt===ty)break;ht=yt,pt=Mt}for(;;){if(yt=b,Mt=ht,zt=pt,b===0?zt<et?(yt=90,zt++):zt>et&&(yt=270,zt--):b===90?Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--):b===180?zt<et?(yt=90,zt++):zt>et&&(yt=270,zt--):Mt<E?(yt=0,Mt++):Mt>E&&(yt=180,Mt--),Mt=st[Mt][zt],yt!==b&&Mt!==0&&Mt!==ty){if(nt.push(ht),nt.push(pt),sS(a,ht,pt,yt,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++}}}Ze.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(){oi(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 br?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(ni,Me.alloc()),ht=a.port.ga(lo,Me.alloc());for(E=on.allocAt(st.x,st.y,0,0),E.Ye(ht),Me.free(st),Me.free(ht),st=Me.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 yt=pt.fromPort===a.port||pt.fromNode!==null&&pt.fromNode.Td(b),Mt=pt.computeSpot(yt,a.port);if(Mt.$c()&&(yt=yt?pt.toPort:pt.fromPort,yt!==null)){var zt=yt.part;if(zt!==null){var Zt=zt.findVisibleNode();Zt!==null&&Zt!==zt&&(zt=Zt,yt=zt.port),yt=pt.computeOtherPoint(zt,yt),zt=st.ab(yt),zt-=ht,0>zt?zt+=360:360<=zt&&(zt-=360),Mt=Ax(E,Mt,zt,pt.isOrthogonal),Mt===0?(Mt=4,180<zt&&(zt-=360)):Mt===90?(Mt=8,270<zt&&(zt-=360)):Mt===180?Mt=2:(Mt=1,90>zt&&(zt+=360)),Zt=a.pe[et],Zt===void 0?(Zt=new ey(pt,zt,Mt),a.pe[et]=Zt):(Zt.link=pt,Zt.angle=zt,Zt.Nc=Mt),Zt.hv.set(yt),et++}}}}for(Me.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=Me.alloc(),ht=Me.alloc(),nt=Me.alloc(),pt=Me.alloc(),Mt.ga(ni,st),Mt.ga(gi,ht),Mt.ga(lo,nt),Mt.ga(oa,pt),Zt=zt=yt=Mt=0,b===H0)for(var Qt=0;Qt<et.length;Qt++){var ie=et[Qt];if(ie!==null){var Ee=ie.link.computeThickness();switch(ie.Nc){case 8:zt+=Ee;break;case 2:Zt+=Ee;break;case 1:Mt+=Ee;break;default:case 4:yt+=Ee}}}var we=Qt=0,je=1,Oe=ie=0;for(Ee=0;Ee<et.length;Ee++){var De=et[Ee];if(De!==null){if(Qt!==De.Nc){switch(Qt=De.Nc,Qt){case 8:var _e=nt;we=pt;break;case 2:_e=pt,we=st;break;case 1:_e=st,we=ht;break;default:case 4:_e=ht,we=nt}switch(ie=we.x-_e.x,Oe=we.y-_e.y,Qt){case 8:zt>Math.abs(ie)?(je=Math.abs(ie)/zt,zt=Math.abs(ie)):je=1;break;case 2:Zt>Math.abs(Oe)?(je=Math.abs(Oe)/Zt,Zt=Math.abs(Oe)):je=1;break;case 1:Mt>Math.abs(ie)?(je=Math.abs(ie)/Mt,Mt=Math.abs(ie)):je=1;break;default:case 4:yt>Math.abs(Oe)?(je=Math.abs(Oe)/yt,yt=Math.abs(Oe)):je=1}we=0}var Je=De.Zo;if(b===H0){switch(De=De.link.computeThickness(),De*=je,Je.set(_e),Qt){case 8:Je.x=_e.x+ie/2+zt/2-we-De/2;break;case 2:Je.y=_e.y+Oe/2+Zt/2-we-De/2;break;case 1:Je.x=_e.x+ie/2-Mt/2+we+De/2;break;default:case 4:Je.y=_e.y+Oe/2-yt/2+we+De/2}we+=De}else{var En=.5;b===Wm&&(En=(De.Uo+1)/(De.Gl+1)),Je.x=_e.x+ie*En,Je.y=_e.y+Oe*En}}}for(Me.free(st),Me.free(ht),Me.free(nt),Me.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,Wr,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 Me,this.Gl=this.Uo=0,this.Zo=new Me,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){oi(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Me(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=Bn(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 xi(this)},ji.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof $e?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof br?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 mn;a instanceof $e?(Wh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Wh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof br?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 br&&(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 wn)&&(ag(st),this.rh(st))){var ht=st.measuredBounds,pt=ht.width;ht=ht.height,st.moveTo(x,b),st instanceof br&&(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 br&&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 Tn?ht.isLinkLabel||(ht instanceof br&&ht.layout===null?Wh(a,y,ht.memberParts,!1,E,et,nt,st):(ag(ht),y.add(ht))):nt&&ht instanceof wn?y.add(ht):!st||!ht.Zc()||ht instanceof Tn||(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 mn;return a instanceof $e?(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 br?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(ni),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ze.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 xi(a){oi(this),this.Sc=a,this.wf=new mn,this.ye=new mn,this.Es=new qn,this.zs=new qn}xi.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new mn,this.ye=new mn,this.Es=new qn,this.zs=new qn},xi.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1)}return y},xi.prototype.createVertex=function(){return new So(this)},xi.prototype.createEdge=function(){return new rs(this)},xi.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(nt){if(nt instanceof Tn)return!nt.isLinkLabel;if(nt instanceof wn){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 Tn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof br&&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 wn&&(!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))}}},xi.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},qt=xi.prototype,qt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},qt.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},qt.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}qt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},qt.ki=function(a){return a===null?null:this.Es.I(a)},qt.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}}qt.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},qt.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))}qt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},qt.Lo=function(a){return a===null?null:this.zs.I(a)},qt.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},qt.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))}},qt.Ko=function(){for(var a=Nn(),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]);Rn(a)},xi.prototype.deleteArtificialVertexes=function(){for(var a=Nn(),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=Nn(),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]);Rn(a),Rn(y)};function Nx(a){for(var y=Nn(),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]);Rn(y)}xi.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))}}xi.prototype.dz=function(){for(var a=new mn,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},Ze.Object.defineProperties(xi.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),xi.prototype.findAllParts=xi.prototype.dz,xi.prototype.splitIntoSubNetworks=xi.prototype.Zx,xi.prototype.deleteSelfEdges=xi.prototype.Ko,xi.prototype.reverseEdge=xi.prototype.gm,xi.prototype.linkVertexes=xi.prototype.Zj,xi.prototype.findEdge=xi.prototype.Lo,xi.prototype.deleteLink=xi.prototype.Yy,xi.prototype.deleteEdge=xi.prototype.Mj,xi.prototype.addLink=xi.prototype.Dy,xi.prototype.addEdge=xi.prototype.Bo,xi.prototype.findVertex=xi.prototype.ki,xi.prototype.deleteNode=xi.prototype.Zy,xi.prototype.deleteVertex=xi.prototype.Iu,xi.prototype.addNode=xi.prototype.Bl,xi.prototype.addVertex=xi.prototype.dh,xi.prototype.addParts=xi.prototype.lg,xi.className="LayoutNetwork";function So(a){oi(this),this.ob=a,this.j=new on(0,0,10,10).freeze(),this.o=new Me(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#"+bi(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;en(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 br)){x=on.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Ir);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}Ze.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 br)&&(a=a.locationObject.ga(Ir),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 mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new mn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new mn,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){oi(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#"+bi(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},Ze.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 Cn(NaN,NaN).freeze(),this.tf=new Cn(10,10).freeze(),this.Jb=sg,this.Rb=rv,this.nd=lg,this.hd=hS,a&&Object.assign(this,a)}tn(_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===vl?this.arrangement=a:a===sg||a===nv?this.alignment=a:Ae("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 br)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(),yt=Math.max(this.cellSize.width,1);if(!isFinite(yt))for(var Mt=yt=0;Mt<E.length;Mt++){var zt=this.ni(E[Mt],pt);yt=Math.max(yt,zt.width)}if(yt=Math.max(yt+st,1),Mt=Math.max(this.cellSize.height,1),!isFinite(Mt))for(zt=Mt=0;zt<E.length;zt++){var Zt=this.ni(E[zt],pt);Mt=Math.max(Mt,Zt.height)}Mt=Math.max(Mt+ht,1),zt=this.arrangement;for(var Qt=Zt=this.arrangementOrigin.x,ie=this.arrangementOrigin.y,Ee=0,we=0,je=0;je<E.length;je++){var Oe=E[je],De=this.ni(Oe,pt),_e=Math.ceil((De.width+st)/yt)*yt,Je=Math.ceil((De.height+ht)/Mt)*Mt;switch(zt){case vl:var En=Math.abs(Qt-De.width);break;default:En=Qt+De.width}switch((0<et&&Ee>et-1||0<nt&&0<Ee&&En-Zt>nt)&&(b.push(new on(0,ie,nt+st,we)),Ee=0,Qt=Zt,ie+=we,we=0),we=Math.max(we,Je),zt){case vl:De=-De.width;break;default:De=0}switch(Oe.moveTo(Qt+De,ie),zt){case vl:Qt-=_e;break;default:Qt+=_e}Ee++}b.push(new on(0,ie,nt+st,we)),on.free(pt);break;case sg:for(ht=nt,yt=et,Mt=y,zt=x,nt=on.alloc(),Zt=Math.max(this.cellSize.width,1),et=ie=pt=0,st=Me.alloc(),Qt=0;Qt<E.length;Qt++)we=E[Qt],Ee=this.ni(we,nt),we=ih(we,we.locationObject,we.locationSpot,st),pt=Math.max(pt,we.x),ie=Math.max(ie,Ee.width-we.x),et=Math.max(et,we.y);switch(Qt=this.arrangement,Qt){case vl:pt+=Mt;break;default:ie+=Mt}Zt=isFinite(Zt)?Math.max(Zt+Mt,1):Math.max(pt+ie,1);var _n=we=this.arrangementOrigin.x;for(je=this.arrangementOrigin.y,ie=0,ht>=pt&&(ht-=pt),pt=Oe=0,_e=Math.max(this.cellSize.height,1),De=et=0,Je=!0,Ee=Me.alloc(),En=0;En<E.length;En++){var Dn=E[En],Sn=this.ni(Dn,nt),un=ih(Dn,Dn.locationObject,Dn.locationSpot,st);if(0<ie)switch(Qt){case vl:_n=(_n-we-(Sn.width-un.x))/Zt,_n=Ge.$(Math.round(_n),_n)?Math.round(_n):Math.floor(_n),_n=_n*Zt+we;break;default:_n=(_n-we+un.x)/Zt,_n=Ge.$(Math.round(_n),_n)?Math.round(_n):Math.ceil(_n),_n=_n*Zt+we}else switch(Qt){case vl:Oe=_n+un.x+Sn.width;break;default:Oe=_n-un.x}switch(Qt){case vl:var xr=-(_n+un.x)+Oe;break;default:xr=_n+Sn.width-un.x-Oe}if(0<yt&&ie>yt-1||0<ht&&0<ie&&xr>ht){for(b.push(new on(0,Je?je-et:je,ht+Mt,De+et+zt)),_n=0;_n<ie&&En!==ie;_n++){xr=E[En-ie+_n];var fr=ih(xr,xr.locationObject,xr.locationSpot,Ee);xr.moveTo(xr.position.x,xr.position.y+et-fr.y)}De+=zt,je=Je?je+De:je+(De+et),ie=De=et=0,_n=we,Je=!1}switch(_n===we&&(pt=Qt===vl?Math.max(pt,Sn.width-un.x):Math.min(pt,-un.x)),et=Math.max(et,un.y),De=Math.max(De,Sn.height-un.y),isFinite(_e)&&(De=Math.max(De,Math.max(Sn.height,_e)-un.y)),Je?Dn.moveTo(_n-un.x,je-un.y):Dn.moveTo(_n-un.x,je),Qt){case vl:_n-=un.x+Mt;break;default:_n+=Sn.width-un.x+Mt}ie++}if(b.push(new on(0,je,ht+Mt,(Je?De:De+et)+zt)),E.length!==ie)for(ht=0;ht<ie;ht++)yt=E[E.length-ie+ht],Mt=ih(yt,yt.locationObject,yt.locationSpot,st),yt.moveTo(yt.position.x,yt.position.y+et-Mt.y);if(Me.free(st),Me.free(Ee),Qt===vl)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===vl?this.commitLayers(b,new Me(E+y/2-(et+E),nt-x/2)):this.commitLayers(b,new Me(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}Ze.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!==vl||(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 dn(_o,"Position",0),sg=new dn(_o,"Location",1),rv=new dn(_o,"LeftToRight",2),vl=new dn(_o,"RightToLeft",3),ay=new dn(_o,"Forward",4),iv=new dn(_o,"Reverse",5),lg=new dn(_o,"Ascending",6),ov=new dn(_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=vl,_o.Forward=ay,_o.Reverse=iv,_o.Ascending=lg,_o.Descending=ov;function ui(){this.On=new mn,this.Dn=new mn,this.Pa=new mn,this.cf=new qn,this.bf=new qn,this.aj=new qn,this.H=null,this.tp=!1}qt=ui.prototype,qt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},qt.Xe=function(a){this.H=a},qt.oi=function(a){if(a instanceof Tn){if(this.On.add(a),a instanceof br){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 wn?this.Dn.add(a):a instanceof ti||this.Pa.add(a);y=a.data,y===null||a instanceof ti||(a instanceof wn?this.bf.add(y,a):this.cf.add(y,a))},qt.pc=function(a){if(a.Ej(),a instanceof Tn){if(this.On.remove(a),a instanceof br){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 wn?this.Dn.remove(a):a instanceof ti||this.Pa.remove(a);y=a.data,y===null||a instanceof ti||(a instanceof wn?this.bf.remove(y):this.cf.remove(y))},qt.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 br)&&Ae('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 br||Ae('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 wn||Ae('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Nn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Nn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Nn(),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]);Rn(y),Rn(x),Rn(a)}},ui.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ui.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)}}ui.prototype.insertLink=function(){return null},ui.prototype.resolveReferencesForData=function(){},ui.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,jn('No Group template found for category "'+x+'"'),jn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,jn('No Node template found for category "'+x+'"'),jn(" Using default node template")),y=a.ny))),y}ui.prototype.getLinkCategoryForData=function(){return""},ui.prototype.setLinkCategoryForData=function(){},ui.prototype.setFromNodeForLink=function(){},ui.prototype.setToNodeForLink=function(){},ui.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,jn('No Link template found for category "'+a+'"'),jn(" Using default link template")),x=y.my)),x},ui.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ui.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ui.prototype.ip=function(a){a=this.Lc(a),a!==null&&(bp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ui.prototype.unresolveReferencesForPart=function(){},ui.prototype.removeDataForLink=function(){},ui.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ui.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Tn?a:null)},ui.prototype.findLinkForKey=function(){return null},qt=ui.prototype,qt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},qt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Tn?a:null)},qt.Kc=function(a){return a===null?null:this.bf.I(a)},qt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new mn;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(en(nt)&&sy(this,E,nt)){y.add(b);break}}}return y.iterator},qt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new mn;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(en(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(kn(et)){if(!kn(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(en(y)&&en(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}ui.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===eo){var nt=a.newValue;b==="nodeDataArray"&&en(nt)&&cS(this,nt),y.isModified=!0}else if(x===vo){var st=a.oldValue;b==="nodeDataArray"&&en(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===eo||x===vo){var yt=a.change===eo,Mt=yt?a.newParam:a.oldParam,zt=yt?a.newValue:a.oldValue,Zt=this.aj.I(a.object);if(Array.isArray(Zt))for(a=0;a<Zt.length;a++){var Qt=Zt[a];if(yt)Cm(Qt,zt,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}}}}},ui.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)},ui.prototype.rp=function(){for(var a=this.H.model,y=new mn,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()},ui.prototype.refreshDataBoundLinks=function(){},ui.prototype.updateRelationshipsFromData=function(){},ui.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=Nn()),x.push(nt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Rn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(kn(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(kn(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}}}}ui.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new qn;if(kn(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 mn;for(var et=new qn,nt=b.iterator;nt.next();){var st=nt.value;if(st instanceof wn)a||st.fromNode!==null&&st.toNode!==null||E.add(st);else if(st instanceof Tn&&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 yt=new qn;b.each(function(Mt){Mt.key.data!==null&&yt.add(Mt.key.data,Mt.value.data)}),x(yt,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 tr))return null;if(et.isSelected=!1,et.isHighlighted=!1,b.add(y,et),y instanceof Tn){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 br&&et instanceof br)for(y=y.memberParts;y.next();)nt=av(a,y.value,x,b,E),nt instanceof wn||nt===null||(nt.containingGroup=et)}else if(y instanceof wn&&et instanceof wn)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 Tn&&(nt.labeledLink=et);return et}ui.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof wn||(b=E.copyNodeData(b),en(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 wn||(E=y.copyNodeData(b)),en(E)&&(x.data=E)));return x},Ze.Object.defineProperties(ui.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}}}),ui.prototype.updateAllRelationshipsFromData=ui.prototype.rp,ui.prototype.findLinksByExample=ui.prototype.ls,ui.prototype.findNodesByExample=ui.prototype.ms,ui.prototype.findLinkForData=ui.prototype.Kc,ui.prototype.findNodeForData=ui.prototype.ii,ui.prototype.findPartForData=ui.prototype.Lc,ui.prototype.findNodeForKey=ui.prototype.Vb,ui.prototype.removeModeledPart=ui.prototype.ip,ui.prototype.removeModeledParts=ui.prototype.Gs,ui.prototype.rebuildParts=ui.prototype.Wd;var pS=!1,gS=!1,mS=!1;ui.className="PartManager";function Ao(a){ui.apply(this,arguments)}tn(Ao,ui),Ao.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},Ao.prototype.addModeledParts=function(a){for(ui.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 Tn&&(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 Tn&&(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}}}}Ao.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)})}Ao.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ao.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ao.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ao.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ao.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ao.prototype.findPartForKey=function(a){var y=ui.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ao.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ao.prototype.doModelChanged=function(a){var y=this;if(ui.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 yt=a.newValue;typeof yt=="string"&&(pt.fromPortId=yt)}}else if(E==="linkToPortId"){var Mt=this.Kc(a.object);if(Mt!==null){var zt=a.newValue;typeof zt=="string"&&(Mt.toPortId=zt)}}else if(E==="nodeGroupKey"){var Zt=this.Lc(a.object);if(Zt!==null){var Qt=a.newValue;if(Qt!==void 0){var ie=this.Vb(Qt);ie instanceof br?Zt.containingGroup=ie:Zt.containingGroup=null}else Zt.containingGroup=null}}else if(E==="linkLabelKeys"){var Ee=this.Kc(a.object);if(Ee!==null){var we=a.oldValue,je=a.newValue;Array.isArray(we)&&we.forEach(function(un){0<=je.indexOf(un)||(un=y.Vb(un),un!==null&&(un.labeledLink=null))}),Array.isArray(je)&&je.forEach(function(un){un=y.Vb(un),un!==null&&(un.labeledLink=Ee)})}}else if(E==="linkCategory"){var Oe=this.Kc(a.object),De=a.newValue;Oe!==null&&typeof De=="string"&&(Oe.category=De)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===eo){var _e=a.newValue;if(E==="linkDataArray"&&typeof _e=="object"&&_e!==null)yS(this,_e);else if(E==="linkLabelKeys"&&Vh(_e)){var Je=this.Kc(a.object),En=this.Vb(_e);Je!==null&&En!==null&&(En.labeledLink=Je)}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 Dn=this.Vb(_n);Dn!==null&&(Dn.labeledLink=null)}x.isModified=!0}}else if(b===Di){var Sn=a.propertyName;a.object!==x.model||Sn!=="linkFromKeyProperty"&&Sn!=="linkToKeyProperty"&&Sn!=="linkFromPortIdProperty"&&Sn!=="linkToPortIdProperty"&&Sn!=="linkLabelKeysProperty"&&Sn!=="nodeIsGroupProperty"&&Sn!=="nodeGroupKeyProperty"&&Sn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ao.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new mn,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)})},Ao.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 wn){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 mn().addAll(y);var nt=new mn;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 ti)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof br)&&(a.containingGroup=y)}}},Ao.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 br&&y.lh(nt)===x&&(nt=this.Lc(nt),nt!==null&&(nt.containingGroup=E)):(et.link=this.Kc(nt),et.link!==null&&E instanceof Tn&&(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}}Sl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof br&&(E.containingGroup=a))}},Ao.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Tn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)yl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&yl(y,x,b.data)),a instanceof br)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&yl(y,x,b)}}},Ao.prototype.copyPartData=function(a,y){var x=ui.prototype.copyPartData.call(this,a,y);if(a instanceof wn)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},Ao.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 wn){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 Tn&&(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 Tn||(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},Ao.prototype.findLinkForKey=Ao.prototype.findLinkForKey,Ao.prototype.findPartForKey=Ao.prototype.findPartForKey,Ao.prototype.removeAllModeledParts=Ao.prototype.removeAllModeledParts,Ao.prototype.addModeledParts=Ao.prototype.addModeledParts,Ao.prototype.addAllModeledParts=Ao.prototype.addAllModeledParts,Ao.className="GraphLinksPartManager";function Os(){ui.apply(this,arguments),this.Sg=null}tn(Os,ui);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||!ma(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(ui.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 yt=ht.kh();yt!==null&&(yt.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 Tn&&(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){ui.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 Tn&&y.mh(et)===x&&sv(this,E,this.ii(et))}Sl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Tn&&(a=this.Vb(a),sv(this,a,E))}},Os.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Tn){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)&&yl(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 Vn(a,y){this.kl=new mn,this.il=new mn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,oi(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new qn,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 qn,this.Lt=new yn,this.Wg=!1,this.o=null,this.undoManager=new Ii,a!==void 0&&(kn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Vn.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},Vn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Vn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Vn.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)+":"+gr(E)}}return y},Vn.prototype.xA=function(a){a.change!==qa&&Ae("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Lo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Vn.prototype.Qv=function(a,y){var x=this,b=!1,E=new mn,et=new mn,nt=new mn,st=this.vh;a.changes.each(function(Mt){Mt.model===x&&(Mt.modelChange==="nodeDataArray"?Mt.change===eo?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(zt){x.lb(zt)&&et.add(zt)}):Mt.object instanceof Vn||x.ri()&&x.Jc(Mt.object)||bS(x,Mt.object).each(function(zt){et.add(zt)})):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 yt=null;return b&&(yt===null&&(yt={}),yt.modelData=this.cloneDeep(this.modelData)),0<ht.count&&(yt===null&&(yt={}),y?yt.removedNodeKeys=ht.Fa():yt.insertedNodeKeys=ht.Fa()),0<a.length&&(yt===null&&(yt={}),yt.modifiedNodeData=a),0<pt.count&&(yt===null&&(yt={}),y?yt.insertedNodeKeys=pt.Fa():yt.removedNodeKeys=pt.Fa()),pt.clear(),ht.clear(),yt},Vn.prototype.cloneDeep=function(a){return Fd(this,a,!0)};function Fd(a,y,x,b,E,et){function nt(Mt,zt){st?(Mt.__gohashid===void 0&&et.push(Mt),b.set(Mt,zt)):(Mt=Ai++,b.set(Mt,zt),E.set(Mt,y))}if(!en(y))return y;et||(et=[]);var st=Object.isExtensible(y);if(b||(b=new qn),st){var ht=b.get(y);if(ht)return ht}else for(E||(E=new qn),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 yt=0;yt<y.length;yt++)ht.push(Fd(a,y[yt],!1,b,E,et))}else if(y instanceof Me||y instanceof Cn||y instanceof on||y instanceof Br||y instanceof nr)ht=y.copy(),nt(y,ht);else{if(y instanceof li||y instanceof xn||y instanceof dn)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 mn)ht=new mn().addAll(Fd(a,y.Fa(),!1,b,E,et)),nt(y,ht);else if(y instanceof qn)ht=new qn().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(yt in ht={},nt(y,ht),y)yt!=="__gohashid"&&(ht[yt]=Fd(a,y[yt],!1,b,E,et))}return x&&et.forEach(function(Mt){delete Mt.__gohashid}),ht}qt=Vn.prototype,qt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},qt.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},qt.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,en(y)&&(a.dm(y),a.modelData=y)}qt.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)},qt.kv=function(a){xS(this,a),a=a.nodeDataArray,kn(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 mn,nt.add(et),b.add(E,nt)):nt.add(et)}}var b=a.vh;b===null&&(b=new qn,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===eo||et===vo)&&(E=E.object,(et=E.itemArray)&&x(et,E))}}),a.vh=b)}function bS(a,y){for(var x=new mn,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(en(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}qt.Pv=function(a,y){var x=this,b=!1,E=new mn,et=new mn,nt=new mn,st=this.vh;a.changes.each(function(yt){yt.model===x&&(yt.modelChange==="nodeDataArray"?yt.change===eo?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):x.lb(yt.object)?et.add(yt.object):yt.change!==Di||x.modelData!==yt.object&&yt.propertyName!=="modelData"?yt.object!==null&&(st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){x.lb(Mt)&&et.add(Mt)}):yt.object instanceof Vn||x.ri()&&x.Jc(yt.object)||bS(x,yt.object).each(function(Mt){et.add(Mt)})):b=!0)});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(x.wa(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(x.wa(yt)),y&&et.add(yt)}),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},qt.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)&&Ae("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new qn;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)},qt.$x=function(a,y){a.change!==qa&&Ae("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Lo?(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 }'},qt.yA=function(a,y){return this.$x(a,y)},qt.np=function(a){return a===void 0&&(a=hg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},qt.toJSON=function(a){return this.np(a)},qt.Zw=function(a){var y=null;if(typeof a=="string")try{y=bn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Ae("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ae("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},qt.Ky=function(a){return this.Zw(a)},Vn.constructGraphLinksModel=function(){return new Vn},qt=Vn.prototype,qt.dm=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(en(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Ae("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(en(a)){for(y in a)if(x=a[y],en(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 Me(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},qt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):kn(a)?Hh(this,a):en(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 rr;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 Ea(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Me)y={class:"go.Point",x:Ea(x.x),y:Ea(x.y)};else if(x instanceof Cn)y={class:"go.Size",width:Ea(x.width),height:Ea(x.height)};else if(x instanceof on)y={class:"go.Rect",x:Ea(x.x),y:Ea(x.y),width:Ea(x.width),height:Ea(x.height)};else if(x instanceof Br)y={class:"go.Margin",top:Ea(x.top),right:Ea(x.right),bottom:Ea(x.bottom),left:Ea(x.left)};else if(x instanceof nr)x.sb()?y={class:"go.Spot",x:Ea(x.x),y:Ea(x.y),offsetX:Ea(x.offsetX),offsetY:Ea(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof li){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=Ea(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ea(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 xn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ea(x.startX)),x.startY!==0&&(y.startY=Ea(x.startY)),x.endX!==0&&(y.endX=Ea(x.endX)),x.endY!==0&&(y.endY=Ea(x.endY)),x.spot1.D(ni)||(y.spot1=x.spot1),x.spot2.D(lo)||(y.spot2=x.spot2),x.type===xn.o&&(y.path=xn.ia(x))):x instanceof dn&&(y={class:"go.EnumValue",classType:hg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var et=$i(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 Ma(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 Me(Ma(a.x),Ma(a.y));else if(y==="Size")x=new Cn(Ma(a.width),Ma(a.height));else if(y==="Rect")x=new on(Ma(a.x),Ma(a.y),Ma(a.width),Ma(a.height));else if(y==="Margin")x=new Br(Ma(a.top),Ma(a.right),Ma(a.bottom),Ma(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Hi(a.enum):x=new nr(Ma(a.x),Ma(a.y),Ma(a.offsetX),Ma(a.offsetY));else if(y==="Brush"){if(x=new li,x.type=On(li,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof nr&&(x.start=a.start),a.end instanceof nr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ma(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ma(a.endRadius)),a=a.colorStops,en(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=xn.parse(a.path):x=new xn,x.type=On(xn,a.type),typeof a.startX=="number"&&(x.startX=Ma(a.startX)),typeof a.startY=="number"&&(x.startY=Ma(a.startY)),typeof a.endX=="number"&&(x.endX=Ma(a.endX)),typeof a.endY=="number"&&(x.endY=Ma(a.endY)),a.spot1 instanceof nr&&(x.spot1=a.spot1),a.spot2 instanceof nr&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=On(b,a.name)));return x}qt.Pe=function(a){return this.Lt.add(a),this},qt.ik=function(a){this.Lt.remove(a)},qt.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)},qt.cb=function(a,y,x,b,E,et,nt){po(this,"",a,y,x,b,E,et,nt)},qt.g=function(a,y,x,b,E){po(this,"",Di,a,this,y,x,b,E)},qt.Fs=function(a,y,x,b,E,et){po(this,"",Di,y,a,x,b,E,et)};function po(a,y,x,b,E,et,nt,st,ht){st===void 0&&(st=null),ht===void 0&&(ht=null);var pt=new Bi;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)}Vn.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===eo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&$n(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!kn(b)&&a.propertyName&&(b=$i(a.object,a.propertyName)),kn(b)&&typeof x=="number"&&(a=a.newValue,y?$n(b,x):Ln(b,x,a))):Ae("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===vo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&$n(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!kn(b)&&a.propertyName&&(b=$i(a.object,a.propertyName)),kn(b)&&typeof x=="number"&&(a=a.oldValue,y?Ln(b,x,a):$n(b,x))):Ae("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==qa&&Ae("unknown ChangedEvent: "+a.toString())},Vn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Vn.prototype.eb=function(a){return this.undoManager.eb(a)},Vn.prototype.Kf=function(){return this.undoManager.Kf()},Vn.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}},qt=Vn.prototype,qt.La=function(a,y){y===void 0&&(y=""),po(this,"SourceChanged",qa,y,a,null,null)},qt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=$i(a,y),y!==void 0)){if(Vh(y))return y;Ae("Key value for node data "+a+" is not a number or a string: "+y)}}},qt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=$i(a,x);b!==y&&this.hc(y)===null&&(Li(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),po(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"}qt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},qt.hc=function(a){return a===null&&Ae("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.kb.I(a):null},qt.$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)}}}}},qt.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&&Ae("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Ln(a.Tc,b,y)),po(a,"nodeDataArray",eo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}qt.Fy=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},qt.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;$n(a.Tc,b)}po(a,"nodeDataArray",vo,"nodeDataArray",a,y,null,b,null),a.qp(y)}qt.nA=function(a){if(kn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},qt.$z=function(a){if(a!==this.nodeDataArray&&kn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var 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()}},qt.jp=function(a,y){y!==void 0&&(a=ug(this,a),a instanceof mn&&this.Vf.add(y,a))},qt.Lv=function(){},qt.fm=function(){},qt.em=function(){},qt.qp=function(){};function yl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new mn,a.Vf.add(y,b)),b.add(x)}}function Sl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof mn&&(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 mn?a:null)}qt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Vn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):uv(this,a,!0),en(a)&&oi(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 oi(b),b}if(x&&en(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=$i(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 Vn||et instanceof Ii||et instanceof Lo||et instanceof Bi||(et=uv(a,et,!1)),Li(x,b,et)}return oi(x),x}return y instanceof Me||y instanceof Cn||y instanceof on||y instanceof nr||y instanceof Br?y.copy():y}Vn.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,jn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),jn(" Is that really your intent?"));var b=$i(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Vn.prototype,qt.set=function(a,y,x){this.setDataProperty(a,y,x)},qt.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])}},qt.Ay=function(a,y){this.ts(a,-1,y)},qt.ts=function(a,y,x){0>y&&(y=a.length),Ln(a,y,x),po(this,"",eo,"",a,null,x,null,y)},qt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ae("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];$n(a,y),po(this,"",vo,"",a,x,null,y,null)},qt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=$i(a,y),y===void 0))return"";if(typeof y=="string")return y;Ae("getCategoryForNodeData found a non-string category for "+a+": "+y)},qt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=$i(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),po(this,"nodeCategory",Di,x,a,b,y))}else Li(a,x,y)}},qt.lm=function(a,y){this.jm(y,this.Ro(a))},qt.Tl=function(){return!1},qt.Wj=function(){return!1},qt.ri=function(){return!1},qt.xs=function(){return!1},qt.Xj=function(){return!1};function cy(){return new Vn}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]:bn.go!==void 0&&bn.go[a]?bn.go[a]:null}function $i(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){}}Ze.Object.defineProperties(Vn.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===""&&Ae("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ae("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];en(E)||Ae("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(po(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"}}}),Vn.prototype.setCategoryForNodeData=Vn.prototype.jm,Vn.prototype.getCategoryForNodeData=Vn.prototype.Ro,Vn.prototype.removeArrayItem=Vn.prototype.ov,Vn.prototype.insertArrayItem=Vn.prototype.ts,Vn.prototype.addArrayItem=Vn.prototype.Ay,Vn.prototype.assignAllDataProperties=Vn.prototype.Do,Vn.prototype.set=Vn.prototype.set,Vn.prototype.clearUnresolvedReferences=Vn.prototype.Qy,Vn.prototype.mergeNodeDataArray=Vn.prototype.$z,Vn.prototype.removeNodeDataCollection=Vn.prototype.nA,Vn.prototype.removeNodeData=Vn.prototype.cm,Vn.prototype.addNodeDataCollection=Vn.prototype.Fy,Vn.prototype.addNodeData=Vn.prototype.xf,Vn.prototype.makeNodeDataKeyUnique=Vn.prototype.$u,Vn.prototype.findNodeDataForKey=Vn.prototype.hc,Vn.prototype.containsNodeData=Vn.prototype.lb,Vn.prototype.setKeyForNodeData=Vn.prototype.km,Vn.prototype.getKeyForNodeData=Vn.prototype.wa,Vn.prototype.updateTargetBindings=Vn.prototype.La,Vn.prototype.commit=Vn.prototype.commit,Vn.prototype.rollbackTransaction=Vn.prototype.Kf,Vn.prototype.commitTransaction=Vn.prototype.eb,Vn.prototype.startTransaction=Vn.prototype.Ea,Vn.prototype.raiseDataChanged=Vn.prototype.Fs,Vn.prototype.raiseChanged=Vn.prototype.g,Vn.prototype.raiseChangedEvent=Vn.prototype.cb,Vn.prototype.removeChangedListener=Vn.prototype.ik,Vn.prototype.addChangedListener=Vn.prototype.Pe,Vn.prototype.writeJsonValue=Vn.prototype.sm,Vn.prototype.replaceJsonObjects=Vn.prototype.dm,Vn.prototype.applyIncrementalJSON=Vn.prototype.Ky,Vn.prototype.applyIncrementalJson=Vn.prototype.Zw,Vn.prototype.toJSON=Vn.prototype.toJSON,Vn.prototype.toJson=Vn.prototype.np,Vn.prototype.toIncrementalJSON=Vn.prototype.yA,Vn.prototype.toIncrementalJson=Vn.prototype.$x,Vn.prototype.toIncrementalData=Vn.prototype.xA,Vn.prototype.clear=Vn.prototype.clear;var ES=!1,sl={};Vn.className="Model",Vn.fromJSON=Vn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=bn.JSON.parse(a)}catch(et){}else typeof a=="object"?x=a:Ae("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=bn[b])),typeof E=="function"&&(a=new E)}catch(et){}a===null||a instanceof Vn?y=a:Ae("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Vn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Vn.safePropertyValue=$i,Vn.safePropertySet=Li,sl.Brush=li,sl.ChangedEvent=Bi,sl.Geometry=xn,sl.Margin=Br,sl.Panel=vn,sl.Point=Me,sl.Rect=on,sl.Size=Cn,sl.Spot=nr,sl.Transaction=Lo,sl.UndoManager=Ii;function io(a,y,x,b){oi(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 mn}io.prototype.copy=function(){var a=new io;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},qt=io.prototype,qt.qb=function(a){a.classType===io&&(this.mode=a)},qt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},qt.freeze=function(){return this._isFrozen=!0,this},qt.ka=function(){return this._isFrozen=!1,this},qt.Kx=function(a){return a===void 0&&(a=null),this.mode=cg,this.backConverter=a,this},qt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},qt.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)}qt.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==="")jn("Binding error: target property is the empty string: "+this.toString());else{var et=y;if(b!==""&&(et=$i(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){}}}},qt.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=$i(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,yt=b.panel.itemArray;ht.ov(yt,pt),ht.ts(yt,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 zt=et(nt,y,ht);if(zt!==void 0&&ht!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Zt=b.itemIndex,Qt=b.panel.itemArray;ht.ov(Qt,Zt),ht.ts(Qt,Zt,zt)}}}catch(ie){}}finally{this.st.remove(a)}}}},Ze.Object.defineProperties(io.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}}}),io.prototype.updateSource=io.prototype.sp,io.prototype.updateTarget=io.prototype.Mv,io.prototype.ofModel=io.prototype.dA,io.prototype.ofObject=io.prototype.cp,io.prototype.makeTwoWay=io.prototype.Kx;var Ox="Binding",TS=new dn(io,"OneWay",1),cg=new dn(io,"TwoWay",2);io.className="Binding",io.parseEnum=function(a,y){return function(x){return x=On(a,x),x===null?y:x}},io.toString=gr,io.OneWay=TS,io.TwoWay=cg;function Zr(a,y,x){Vn.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new mn,this.wb=new qn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(kn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}tn(Zr,Vn),Zr.constructGraphLinksModel=Vn.constructGraphLinksModel,Zr.prototype.cloneProtected=function(a){Vn.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},qt=Zr.prototype,qt.clear=function(){Vn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},qt.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)+":"+gr(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},qt.Qv=function(a,y){this.linkKeyProperty===""&&Ae("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Vn.prototype.Qv.call(this,a,y),b=this,E=new mn,et=new mn,nt=new mn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===eo?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):b.Jc(yt.object)?et.add(yt.object):yt.object!==null&&(yt.object!==null&&st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):yt.object instanceof Vn||b.lb(yt.object)||LS(b,yt.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(b.Ac(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(b.Ac(yt)),y&&et.add(yt)}),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},qt.rm=function(){var a=Vn.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},qt.gp=function(a){Vn.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)},qt.Rv=function(){var a=Vn.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+Hh(this,this.linkDataArray,!0);return a+y},qt.kv=function(a){Vn.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 mn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];lv(a,y,E,E,x)}return x}qt.Pv=function(a,y){this.linkKeyProperty===""&&Ae("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Vn.prototype.Pv.call(this,a,y),b=this,E=new mn,et=new mn,nt=new mn,st=this.vh;a.changes.each(function(yt){yt.model===b&&(yt.modelChange==="linkDataArray"?yt.change===eo?E.add(yt.newValue):yt.change===vo&&nt.add(yt.oldValue):b.Jc(yt.object)?et.add(yt.object):yt.object!==null&&(yt.object!==null&&st&&st.contains(yt.object)?st.get(yt.object).each(function(Mt){b.Jc(Mt)&&et.add(Mt)}):yt.object instanceof Vn||b.lb(yt.object)||LS(b,yt.object).each(function(Mt){et.add(Mt)})))});var ht=this.il;ht.clear(),E.each(function(yt){ht.add(b.Ac(yt)),y||et.add(yt)});var pt=this.kl;return pt.clear(),nt.each(function(yt){pt.add(b.Ac(yt)),y&&et.add(yt)}),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},qt.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)&&Ae("applyIncrementalJson cannot change Model properties"),Vn.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)},Zr.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===eo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,en(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,en(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}}Vn.prototype.changeState.call(this,a,y)}},qt=Zr.prototype,qt.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}},qt.yx=function(a){return ys(this,a,!0)},qt.wv=function(a,y){Dd(this,a,y,!0)},qt.Bx=function(a){return ys(this,a,!1)},qt.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=$i(y,a),a!==void 0))){if(Vh(a))return a;Ae((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=$i(y,E);et!==x&&(Sl(a,et,y),Li(y,E,x),a.hc(x)===null&&yl(a,x,y),po(a,b?"linkFromKey":"linkToKey",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}qt.zx=function(a){return hv(this,a,!0)},qt.xv=function(a,y){Bd(this,a,y,!0)},qt.Cx=function(a){return hv(this,a,!1)},qt.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=$i(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=$i(y,E);et===void 0&&(et=""),et!==x&&(Li(y,E,x),po(a,b?"linkFromPortId":"linkToPortId",Di,E,y,et,x),typeof E=="string"&&a.La(y,E))}else Li(y,E,x)}}qt.Ef=function(a){if(a===null)return cv;var y=this.je;return y===""?cv:(a=$i(a,y),a===void 0?cv:a)},qt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=$i(a,x);if(b===void 0&&(b=cv),b!==y){if(Array.isArray(b))for(var E=b.length,et=0;et<E;et++)Sl(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&&yl(this,nt,a)}po(this,"linkLabelKeys",Di,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Li(a,x,y)}},qt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=$i(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&&yl(this,y,a),po(this,"linkLabelKeys",eo,x,a,null,y,null,E)))}else Ae(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},qt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=$i(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Sl(this,y,a),po(this,"linkLabelKeys",vo,x,a,y,null,E,null)))}else b!==void 0&&Ae(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},qt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=$i(a,y),y!==void 0)){if(Vh(y))return y;Ae("Key value for link data "+a+" is not a number or a string: "+y)}}},qt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=$i(a,x);b!==y&&this.jh(y)===null&&(Li(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),po(this,"linkKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},qt.jh=function(a){return a===null&&Ae("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.wb.I(a):null},qt.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)}}}}},qt.Jc=function(a){return a===null?!1:this.$f.contains(a)},qt.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&&Ae("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)),po(a,"linkDataArray",eo,"linkDataArray",a,null,y,null,b),dy(a,y)}qt.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)},qt.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(po(a,"linkDataArray",vo,"linkDataArray",a,y,null,b,null),x=ys(a,y,!0),Sl(a,x,y),x=ys(a,y,!1),Sl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,et=0;et<E;et++)x=b[et],Sl(a,x,y)}qt.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)},qt.Zz=function(a){if(this.linkKeyProperty===""&&Ae("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&kn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var 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&&yl(a,x,y),x=ys(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yl(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&&yl(a,x,y)}qt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):uv(this,a,!0),en(a)&&(oi(a),this.lf!==""&&Li(a,this.lf,void 0),this.mf!==""&&Li(a,this.mf,void 0),this.je!==""&&Li(a,this.je,[])),a},qt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!$i(a,y)},qt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=$i(a,y),y!==void 0)){if(Vh(y))return y;Ae("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},qt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=$i(a,x);b!==y&&(Sl(this,b,a),Li(a,x,y),this.hc(y)===null&&yl(this,y,a),po(this,"nodeGroupKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Zr.prototype.copyNodeData=function(a){return a===null?null:(a=Vn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||$i(a,this.Je)===void 0||Li(a,this.Je,void 0),a)},Zr.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=$i(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Zr.prototype,qt.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&&$i(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},qt.jp=function(a,y){Vn.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),po(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),po(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,po(this,"linkLabelKeys",eo,ht,b,E,et,pt,pt))}},qt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Li(a,b,x),po(this,"nodeGroupKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qt.Lv=function(){Vn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},qt.fm=function(a){Vn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Nn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;po(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,po(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,po(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&&(po(this,"linkLabelKeys",eo,nt,b,a,a,st,st),x.push(b))}for(y=0;y<x.length;y++)Sl(this,a,x[y]);Rn(x)}},qt.em=function(a){Vn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yl(this,y,a)},qt.qp=function(a){Vn.prototype.qp.call(this,a);var y=this.lh(a);Sl(this,y,a)},qt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=$i(a,y),y===void 0))return"";if(typeof y=="string")return y;Ae("getCategoryForLinkData found a non-string category for "+a+": "+y)},Zr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Zr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=$i(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),po(this,"linkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Zr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},qt=Zr.prototype,qt.lm=function(a,y){Vn.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))}qt.Wj=function(){return!0},qt.ri=function(){return!0},qt.xs=function(){return!0},qt.Xj=function(){return!0},Ze.Object.defineProperties(Zr.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];en(E)||Ae("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 mn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,po(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"}}}),Zr.prototype.setCategoryForLinkData=Zr.prototype.lp,Zr.prototype.getCategoryForLinkData=Zr.prototype.ps,Zr.prototype.assignAllDataProperties=Zr.prototype.Do,Zr.prototype.setGroupKeyForNodeData=Zr.prototype.mp,Zr.prototype.getGroupKeyForNodeData=Zr.prototype.lh,Zr.prototype.isGroupForNodeData=Zr.prototype.Yu,Zr.prototype.copyLinkData=Zr.prototype.Jo,Zr.prototype.mergeLinkDataArray=Zr.prototype.Zz,Zr.prototype.removeLinkDataCollection=Zr.prototype.lA,Zr.prototype.removeLinkData=Zr.prototype.bm,Zr.prototype.addLinkDataCollection=Zr.prototype.Ey,Zr.prototype.addLinkData=Zr.prototype.fi,Zr.prototype.containsLinkData=Zr.prototype.Jc,Zr.prototype.makeLinkDataKeyUnique=Zr.prototype.Bs,Zr.prototype.findLinkDataForKey=Zr.prototype.jh,Zr.prototype.setKeyForLinkData=Zr.prototype.Ks,Zr.prototype.getKeyForLinkData=Zr.prototype.Ac,Zr.prototype.removeLabelKeyForLinkData=Zr.prototype.Qx,Zr.prototype.addLabelKeyForLinkData=Zr.prototype.Bu,Zr.prototype.setLabelKeysForLinkData=Zr.prototype.Ls,Zr.prototype.getLabelKeysForLinkData=Zr.prototype.Ef,Zr.prototype.setToPortIdForLinkData=Zr.prototype.Cv,Zr.prototype.getToPortIdForLinkData=Zr.prototype.Cx,Zr.prototype.setFromPortIdForLinkData=Zr.prototype.xv,Zr.prototype.getFromPortIdForLinkData=Zr.prototype.zx,Zr.prototype.setToKeyForLinkData=Zr.prototype.Bv,Zr.prototype.getToKeyForLinkData=Zr.prototype.Bx,Zr.prototype.setFromKeyForLinkData=Zr.prototype.wv,Zr.prototype.getFromKeyForLinkData=Zr.prototype.yx,Zr.prototype.clear=Zr.prototype.clear;var cv=Object.freeze([]);Zr.className="GraphLinksModel",sl.GraphLinksModel=Zr,Vn.constructGraphLinksModel=Vn.constructGraphLinksModel=function(){return new Zr},Vn.initDiagramModel=cy=function(){return new Zr};function Ta(a,y){Vn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(kn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}tn(Ta,Vn),Ta.constructGraphLinksModel=Vn.constructGraphLinksModel,Ta.prototype.cloneProtected=function(a){Vn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},qt=Ta.prototype,qt.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)+":"+gr(E)}}return y},qt.rm=function(){var a=Vn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},qt.gp=function(a){Vn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},qt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ae("applyIncrementalJson cannot change Model properties"),Vn.prototype.fp.call(this,a)},qt.Vl=function(a){return a},qt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=$i(a,y),y!==void 0)){if(Vh(y))return y;Ae("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},qt.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=$i(a,x);b!==y&&(Sl(this,b,a),Li(a,x,y),this.hc(y)===null&&yl(this,y,a),po(this,"nodeParentKey",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},qt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=$i(a,y),y===void 0)?"":typeof y=="string"?y:(Ae("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ta.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ta.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=$i(a,x);b===void 0&&(b=""),b!==y&&(Li(a,x,y),po(this,"parentLinkCategory",Di,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Li(a,x,y)}},Ta.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ta.prototype.copyNodeData=function(a){return a===null?null:(a=Vn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||$i(a,this.Ke)===void 0||Li(a,this.Ke,void 0),a)},Ta.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=$i(a,y);b!==x&&(Li(a,y,x),this.Fs(a,y,b,x))},qt=Ta.prototype,qt.jp=function(a,y){Vn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},qt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Li(a,b,x),po(this,"nodeParentKey",Di,b,a,y,x),typeof b=="string"&&this.La(a,b)}},qt.fm=function(a){Vn.prototype.fm.call(this,a),a=this.wa(a);var y=ug(this,a);if(y!==null){var x=Nn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;po(this,"nodeParentKey",Di,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Sl(this,a,x[y]);Rn(x)}},qt.em=function(a){Vn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yl(this,y,a)},qt.qp=function(a){Vn.prototype.qp.call(this,a);var y=this.mh(a);Sl(this,y,a)},qt.lm=function(a,y){Vn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},qt.Tl=function(){return!0},qt.xs=function(){return!0},Ze.Object.defineProperties(Ta.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),Ta.prototype.setParentLinkCategoryForNodeData=Ta.prototype.Ms,Ta.prototype.getParentLinkCategoryForNodeData=Ta.prototype.ss,Ta.prototype.setParentKeyForNodeData=Ta.prototype.qe,Ta.prototype.getParentKeyForNodeData=Ta.prototype.mh,Ta.className="TreeModel",sl.TreeModel=Ta;function _i(a){ji.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=ll,this.Ti=0,this.Zv=new Me,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=La,this.nd=Rd,this.hd=oy,this.tf=6,this.Nn=yv,a&&Object.assign(this,a)}tn(_i,ji),_i.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},_i.prototype.qb=function(a){a.classType===_i?a===mv||a===vv||a===pv||a===gv||a===Rd?this.sorting=a:a===_c||a===Id||a===La||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)},_i.prototype.createNetwork=function(){return new _d(this)},_i.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 yt=this.aspectRatio;(!isFinite(yt)||0>=yt)&&(yt=1);var Mt=this.startAngle;isFinite(Mt)||(Mt=0);var zt=this.sweepAngle;if((!isFinite(zt)||360<zt||1>zt)&&(zt=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 Zt=et=E=0;Zt<b.length;Zt++){var Qt=Mt+zt*et*(this.direction===La?1:-1)/ht,ie=b.M(Zt).diameter;isNaN(ie)&&(ie=Xh(b.M(Zt),Qt)),360>zt&&(Zt===0||Zt===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++)Zt=b.M(nt),E=b.M(nt===ht-1?0:nt+1),isNaN(Zt.diameter)&&Xh(Zt,0),isNaN(E.diameter)&&Xh(E,0),et=Math.max(et,(Zt.diameter+E.diameter)/2);nt=et+y,st===uh?pt=(et+y)/(2*Math.PI/ht):pt=fv(this,nt*(360<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180)}else pt=fv(this,E+(360<=zt?ht:ht-1)*(st!==ul?y:1.6*y),yt,Mt*Math.PI/180,zt*Math.PI/180);et=pt*yt}else if(et=pt*yt,Zt=py(this,pt,et,Mt*Math.PI/180,zt*Math.PI/180),isNaN(y))(st===ll||st===ul)&&(y=(Zt-E)/(360<=zt?ht:ht-1));else if(st===ll||st===ul)Zt=(Zt-E)/(360<=zt?ht:ht-1),Zt<y?(pt=fv(this,E+y*(360<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180),et=pt*yt):y=Zt;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<=zt?ht:ht-1),yt,Mt*Math.PI/180,zt*Math.PI/180),E>pt?(pt=E,et=pt*yt):nt=Zt/(360<=zt?ht:ht-1)}if(this.kw=st,this.lc=pt,this.Zm=yt,this.lw=Mt,this.Wp=zt,this.Ti=y,this.me=et,this.Jp=nt,y=b,b=this.kw,st=this.lc,pt=this.lw,yt=this.Wp,Mt=this.Ti,zt=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,zt,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,zt,pt,Mt+(y+ht)/2)/Math.PI;break;case uh:nt=yt/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,yt/2,pt,Zh)}switch(b){case Kh:pg(this,x,pt+nt,La);break;case ll:dg(this,x,pt+nt,La);break;case uh:fg(this,x,yt/2,pt+nt,La)}}else{switch(b){case Kh:pg(this,x,pt,Zh);break;case ll:dg(this,x,pt,Zh);break;case uh:fg(this,x,yt/2,pt,Zh)}switch(b){case Kh:pg(this,a,pt+nt,La);break;case ll:dg(this,a,pt+nt,La);break;case uh:fg(this,a,yt/2,pt+nt,La)}}}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,yt,pt,this.direction);break;case ul:OS(this,y,yt,pt,this.direction)}else OS(this,y,yt,pt-yt/2,La)}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===La?ht*x/(360<=et?st:st-1):-(ht*x)/st),yt=y.M(ht),Mt=nt*Math.tan(pt)/a;Mt=Math.sqrt((nt*nt+a*a*Mt*Mt)/(1+Mt*Mt)),yt.centerX=Mt*Math.cos(pt),yt.centerY=Mt*Math.sin(pt),yt.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),yt=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(yt.diameter)&&Xh(yt,0),pt=dv(a,E,et,b===La?x:-x,(pt.diameter+yt.diameter)/2+nt),x+=b===La?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===La?x:-x,nt),x+=b===La?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===La?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),yt=y.Fa();if(yt.length===3)yt[0].centerX=et,yt[0].centerY=0,yt[1].centerX=yt[0].centerX-yt[0].width/2-yt[1].width/2-nt,yt[1].y=yt[0].y,yt[2].centerX=(yt[0].centerX+yt[1].centerX)/2,yt[2].y=yt[0].y-yt[2].height-nt;else if(yt.length===4)yt[0].centerX=et,yt[0].centerY=0,yt[2].centerX=-yt[0].centerX,yt[2].centerY=yt[0].centerY,yt[1].centerX=0,yt[1].y=Math.min(yt[0].y,yt[2].y)-yt[1].height-nt,yt[3].centerX=0,yt[3].y=Math.max(yt[0].y+yt[0].height+nt,yt[2].y+yt[2].height+nt);else{et=Me.alloc();for(var Mt=0;Mt<yt.length&&(yt[Mt].centerX=ht,yt[Mt].centerY=pt,!(Mt>=yt.length-1));Mt++)BS(a,ht,pt,yt,Mt,E,et)||IS(a,ht,pt,yt,Mt,E,et),ht=et.x,pt=et.y;if(Me.free(et),a.mj++,!(23<a.mj)){ht=yt[0].centerX,pt=yt[0].centerY,et=yt[yt.length-1].centerX,Mt=yt[yt.length-1].centerY;var zt=Math.abs(ht-et)-((yt[0].width+yt[yt.length-1].width)/2+nt),Zt=Math.abs(pt-Mt)-((yt[0].height+yt[yt.length-1].height)/2+nt);nt=0,1>Math.abs(Zt)?Math.abs(ht-et)<(yt[0].width+yt[yt.length-1].width)/2&&(nt=0):nt=0<Zt?Zt:1>Math.abs(zt)?0:zt,ht=Math.abs(et)>Math.abs(Mt)?0<et!=pt>Mt:0<Mt!=ht<et,(ht=E===La?ht:!ht)&&(nt=-Math.abs(nt),nt=Math.min(nt,-yt[yt.length-1].width),nt=Math.min(nt,-yt[yt.length-1].height)),a.Xr.compare(nt,yt),1<Math.abs(nt)&&(a.lc=8>a.mj?a.lc-nt/(2*Math.PI):5>yt.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),yt=Me.alloc(),Mt=y.Fa(),zt=0;zt<Mt.length&&(Mt[zt].centerX=ht,Mt[zt].centerY=pt,!(zt>=Mt.length-1));zt++)BS(a,ht,pt,Mt,zt,E,yt)||IS(a,ht,pt,Mt,zt,E,yt),ht=yt.x,pt=yt.y;if(Me.free(yt),a.mj++,!(23<a.mj)){if(ht=Math.atan2(pt,ht),ht=E===La?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 yt=!1;if(0<=x!=(et===La)){if(et=y+a,et>st){if(et=y-a,et<-st)return nt.x=et,nt.y=pt,!1;yt=!0}}else if(et=y-a,et<-st){if(et=y+a,et>st)return nt.x=et,nt.y=pt,!1;yt=!0}return pt=Math.sqrt(1-Math.min(1,et*et/(st*st)))*ht,0>x!==yt&&(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===La)){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}_i.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},_i.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 Me(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))},_i.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 yt=Math.sin(ht);nt+=Math.sqrt(1-a*a*yt*yt)*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}}_i.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:Ae("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}_i.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 yt=y[pt].length;if(yt===1)b.push(pt);else if(yt===0)E.add(a.M(pt));else{if(ht===0)x.push(pt);else{for(var Mt=yt=1/0,zt=-1,Zt=[],Qt=0;Qt<x.length;Qt++)0>y[x[Qt]].indexOf(x[Qt===x.length-1?0:Qt+1])&&Zt.push(Qt===x.length-1?0:Qt+1);if(Zt.length===0)for(Qt=0;Qt<x.length;Qt++)Zt.push(Qt);for(Qt=0;Qt<Zt.length;Qt++){for(var ie=Zt[Qt],Ee=y[pt],we=0,je=0;je<nt.length;je++){var Oe=et[nt[je]],De=et[st[je]];if(Oe<De){var _e=Oe;Oe=De}else _e=De;if(_e<ie&&ie<=Oe)for(De=0;De<Ee.length;De++){var Je=Ee[De];0>x.indexOf(Je)||_e<et[Je]&&et[Je]<Oe||_e===et[Je]||Oe===et[Je]||we++}else for(De=0;De<Ee.length;De++)Je=Ee[De],0>x.indexOf(Je)||_e<et[Je]&&et[Je]<Oe&&_e!==et[Je]&&Oe!==et[Je]&&we++}for(Ee=we,je=we=0;je<y[pt].length;je++)_e=x.indexOf(y[pt][je]),0<=_e&&(_e=Math.abs(ie-(_e>=ie?_e+1:_e)),we+=_e<x.length+1-_e?_e:x.length+1-_e);for(je=0;je<nt.length;je++)_e=et[nt[je]],Oe=et[st[je]],_e>=ie&&_e++,Oe>=ie&&Oe++,_e>Oe&&(De=Oe,Oe=_e,_e=De),Oe-_e<(x.length+2)/2==(_e<ie&&ie<=Oe)&&we++;(Ee<yt||Ee===yt&&we<Mt)&&(yt=Ee,Mt=we,zt=ie)}for(x.splice(zt,0,pt),yt=0;yt<x.length;yt++)et[x[yt]]=yt;for(yt=0;yt<y[pt].length;yt++)Mt=y[pt][yt],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],yt=x.indexOf(pt),0<=yt){for(zt=Mt=0;zt<y[pt].length;zt++)Zt=x.indexOf(y[pt][zt]),0>Zt||Zt===yt||(Qt=Zt>yt?Zt-yt:yt-Zt,Mt+=Zt<yt!=Qt>nt-Qt?1:-1);x.splice(0>Mt?yt:yt+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},Ze.Object.defineProperties(_i.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!==La&&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 dn(_i,"ConstantSpacing",0),Kh=new dn(_i,"ConstantDistance",1),uh=new dn(_i,"ConstantAngle",2),ul=new dn(_i,"Packed",3),La=new dn(_i,"Clockwise",4),Zh=new dn(_i,"Counterclockwise",5),_c=new dn(_i,"BidirectionalLeft",6),Id=new dn(_i,"BidirectionalRight",7),pv=new dn(_i,"Forwards",8),gv=new dn(_i,"Reverse",9),mv=new dn(_i,"Ascending",10),vv=new dn(_i,"Descending",11),Rd=new dn(_i,"Optimized",12),yv=new dn(_i,"Pythagorean",13),Lf=new dn(_i,"Circular",14);_i.className="CircularLayout",_i.ConstantSpacing=ll,_i.ConstantDistance=Kh,_i.ConstantAngle=uh,_i.Packed=ul,_i.Clockwise=La,_i.Counterclockwise=Zh,_i.BidirectionalLeft=_c,_i.BidirectionalRight=Id,_i.Forwards=pv,_i.Reverse=gv,_i.Ascending=mv,_i.Descending=vv,_i.Optimized=Rd,_i.Pythagorean=yv,_i.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){xi.call(this,a)}tn(_d,xi),_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}tn(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}Ze.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)}tn(Sv,rs),Sv.className="CircularEdge";function Yo(a){ji.call(this),this.ah=null,this.An=0,this.$d=new Cn(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)}tn(Yo,ji),Yo.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},Yo.prototype.createNetwork=function(){return new Af(this)},Yo.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=Nn(),yt=0;yt<st+y.vertexes.count+2;yt++)pt[yt]=null;st=0,nt.reset();for(var Mt=on.alloc();nt.next();)if(yt=nt.value,this.computeBounds(yt,Mt),ht)ht=!1,E=Mt.x+Mt.width/2,et=Mt.y+Mt.height/2,pt[0]=new Me(Mt.x+Mt.width+b.width,Mt.y),pt[1]=new Me(Mt.x,Mt.y+Mt.height+b.height),st=2;else{var zt=_S(pt,st,E,et,Mt.width,Mt.height,b),Zt=pt[zt],Qt=new Me(Zt.x+Mt.width+b.width,Zt.y),ie=new Me(Zt.x,Zt.y+Mt.height+b.height);for(zt+1<st&&pt.splice(zt+1,0,null),pt[zt]=Qt,pt[zt+1]=ie,st++,zt=Zt.x-Mt.x,Zt=Zt.y-Mt.y,yt=yt.vertexes.iterator;yt.next();)Qt=yt.value,Qt.centerX+=zt,Qt.centerY+=Zt}for(on.free(Mt),yt=y.vertexes.iterator;yt.next();)nt=yt.value,zt=nt.bounds,2>st?(E=zt.x+zt.width/2,et=zt.y+zt.height/2,pt[0]=new Me(zt.x+zt.width+b.width,zt.y),pt[1]=new Me(zt.x,zt.y+zt.height+b.height),st=2):(ht=_S(pt,st,E,et,zt.width,zt.height,b),Mt=pt[ht],Zt=new Me(Mt.x+zt.width+b.width,Mt.y),zt=new Me(Mt.x,Mt.y+zt.height+b.height),ht+1<st&&pt.splice(ht+1,0,null),pt[ht]=Zt,pt[ht+1]=zt,st++,nt.centerX=Mt.x+nt.width/2,nt.centerY=Mt.y+nt.height/2);for(Rn(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},Yo.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},Yo.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,yt=ht.count-nt;yt<ht.count;yt++){var Mt=ht.M(yt),zt=null;for(et=Mt.edges.iterator;et.next();){var Zt=et.value;if(Zt.Ax(Mt)===E){zt=Zt;break}}zt!==null&&(pt+=zt.length,st+=Mt.width*Mt.height)}et=E.centerX,ht=E.centerY,yt=E.width,Mt=E.height,zt=E.focus,Zt=yt*Mt,1>Zt&&(Zt=1),st=Ge.sqrt((st+Zt+pt*pt*4/(nt*nt))/Zt),nt=(st-1)*yt/2,st=(st-1)*Mt/2,E.bounds=new on(et-zt.x-nt,ht-zt.y-st,yt+2*nt,Mt+2*st),E.focus=new Me(zt.x+nt,zt.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 Me(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,yt=y.vertexes.iterator;yt.next();){var Mt=yt.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(Zt,Qt){return Zt===null||Qt===null||Zt===Qt?0:Qt.width*Qt.height-Zt.width*Zt.height}),st=ht%2===0?0:1,x=x.iterator;x.next();)if(ht=x.value,!(1<ht.Vd||a.isFixed(ht))){for(yt=null,Mt=ht.edges.iterator;Mt.next();){yt=Mt.value;break}Mt=ht.width;var zt=ht.height;Mt=Ge.sqrt(Mt*Mt+zt*zt)/2,yt=et+yt.length+Mt,Mt=nt+(y*(st/2>>1)+pt)*(st%2===0?1:-1),ht.centerX=b+yt*Math.cos(Mt),ht.centerY=E+yt*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 yt=a[pt],Mt=yt.x-x,zt=yt.y-b;if(Mt=Mt*Mt+zt*zt,Mt<st){for(zt=pt-1;0<=zt;zt--)if(a[zt].y>yt.y&&a[zt].x-yt.x<E+nt.width)continue t;for(zt=pt+1;zt<y;zt++)if(a[zt].x>yt.x&&a[zt].y-yt.y<et+nt.height)continue t;ht=pt,st=Mt}}return ht}Yo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Yo.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,Ee){return ie===null||Ee===null||ie===Ee?0:ie.centerX-Ee.centerX}):y.sort(function(ie,Ee){return ie===null||Ee===null||ie===Ee?0:ie.centerY-Ee.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 yt=b.y+st.y;b=nt.charge*a.electricalFieldX(ht,yt),pt=nt.charge*a.electricalFieldY(ht,yt),b+=nt.mass*a.gravitationalFieldX(ht,yt),pt+=nt.mass*a.gravitationalFieldY(ht,yt),nt.forceX+=b,nt.forceY+=pt;for(var Mt=et+1;Mt<y.length;Mt++){var zt=y[Mt];if(zt!==nt){b=zt.bounds,st=zt.focus,pt=b.x+st.x;var Zt=b.y+st.y;if(ht-pt>x||pt-ht>x){if(E)break}else if(yt-Zt>x||Zt-yt>x){if(!E)break}else{var Qt=zS(nt,zt);1>Qt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new xv),Qt=b.random(),st=b.random(),ht>pt?(b=Math.abs(zt.bounds.right-nt.bounds.x),b=(1+b)*Qt):ht<pt?(b=Math.abs(zt.bounds.x-nt.bounds.right),b=-(1+b)*Qt):(b=Math.max(zt.width,nt.width),b=(1+b)*Qt-b/2),yt>Zt?(pt=Math.abs(zt.bounds.bottom-nt.bounds.y),pt=(1+pt)*st):ht<pt?(pt=Math.abs(zt.bounds.y-nt.bounds.bottom),pt=-(1+pt)*st):(pt=Math.max(zt.height,nt.height),pt=(1+pt)*st-pt/2)):(st=-(nt.charge*zt.charge)/(Qt*Qt),b=(pt-ht)/Qt*st,pt=(Zt-yt)/Qt*st),nt.forceX+=b,nt.forceY+=pt,zt.forceX-=b,zt.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,yt=et.bounds,Mt=et.focus,ht=yt.x+Mt.x,yt=yt.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>yt?1:-1)*(1+(et.height>x.height?et.height:x.height))*Mt):(st=st.stiffness*(Mt-st.length),b=(ht-b)/Mt*st,pt=(yt-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}Yo.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},Yo.prototype.moveFixedVertex=function(){},Yo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Yo.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Oo,y.toSpot=Oo)}},Yo.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)},Yo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Yo.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Yo.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Yo.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Yo.prototype.electricalFieldX=function(){return 0},Yo.prototype.electricalFieldY=function(){return 0},Yo.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Yo.prototype.gravitationalFieldX=function(){return 0},Yo.prototype.gravitationalFieldY=function(){return 0},Yo.prototype.isFixed=function(a){return a.isFixed},Ze.Object.defineProperties(Yo.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"&&Ae('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())}}}),Yo.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Af(a){xi.call(this,a)}tn(Af,xi),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}tn(vg,So),Ze.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}tn(yg,rs),Ze.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 hi(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 Me,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}tn(hi,ji),hi.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},hi.prototype.qb=function(a){a.classType===hi?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:Ae("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},hi.prototype.createNetwork=function(){return new Gd(this)},hi.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 yt=E.node;if(nt=et.node,yt===null||nt===null)continue;var Mt=st.fromNode;ht=st.toNode;for(var zt=st.fromPort;zt!==null&&!zt.Ed();)zt=zt.panel;for(st=st.toPort;st!==null&&!st.Ed();)st=st.panel;if(b.rev){pt=Mt;var Zt=zt;Mt=ht,zt=st,ht=pt,st=Zt}var Qt=E.focus;pt=et.focus;var ie=b.rev?et.bounds:E.bounds;Zt=Me.alloc(),yt!==Mt?ie.w()&&Mt.isVisible()?Mt.actualBounds.w()?(ih(Mt,zt,Ir,Zt),Zt.x+=Mt.actualBounds.x-ie.x,Zt.y+=Mt.actualBounds.y-ie.y):(ih(Mt,zt,Ir,Zt),Zt.w()||Zt.assign(Qt)):Zt.assign(Qt):ie.w()?(ih(Mt,zt,Ir,Zt),Zt.w()||Zt.assign(Qt)):Zt.assign(Qt),Mt=b.rev?E.bounds:et.bounds,yt=Me.alloc(),nt!==ht?Mt.w()&&ht.isVisible()?ht.actualBounds.w()?(ih(ht,st,Ir,yt),yt.x+=ht.actualBounds.x-Mt.x,yt.y+=ht.actualBounds.y-Mt.y):(ih(ht,st,Ir,yt),yt.w()||yt.assign(pt)):yt.assign(pt):Mt.w()?(ih(ht,st,Ir,yt),yt.w()||yt.assign(pt)):yt.assign(pt),this.K===90||this.K===270?(nt=Math.round((Zt.x-Qt.x)/this.kc),ht=Zt.x,st=Math.round((yt.x-pt.x)/this.kc),pt=yt.x):(nt=Math.round((Zt.y-Qt.y)/this.kc),ht=Zt.y,st=Math.round((yt.y-pt.y)/this.kc),pt=yt.y),Me.free(Zt),Me.free(yt),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(Zt=E.layer,yt=et.layer,Mt=0,ie=b.link,ie!==null){var Ee=ie.fromPort,we=ie.toPort;if(Ee!==null&&we!==null){var je=ie.fromNode;if(zt=ie.toNode,je!==null&&zt!==null){var Oe=Cv(this,!0),De=Cv(this,!1),_e=this.setsPortSpots?Oe:ie.computeSpot(!0,Ee);Qt=this.setsPortSpots?De:ie.computeSpot(!1,we);var Je=ie.isOrthogonal;_e.$c()&&_e.Hf(De)&&Qt.$c()&&Qt.Hf(Oe)?Mt=0:(Oe=ie.getLinkPoint(je,Ee,_e,!0,Je,zt,we,Me.alloc()),De=ie.getLinkDirection(je,Ee,Oe,_e,!0,Je,zt,we),Me.free(Oe),_e.ys()||De!==QS(this,b,!0)?this.setsPortSpots&&je!==null&&je.ports.count===1&&b.rev&&(Mt+=1):Mt+=1,_e=ie.getLinkPoint(zt,we,Qt,!1,Je,je,Ee,Me.alloc()),ie=ie.getLinkDirection(zt,we,_e,Qt,!1,Je,je,Ee),Me.free(_e),Qt.ys()||ie!==QS(this,b,!1)?this.setsPortSpots&&zt!==null&&zt.ports.count===1&&b.rev&&(Mt+=2):Mt+=2)}}}if(zt=Mt,Mt=zt===1||zt===3,(zt=zt===2||zt===3)&&(Qt=a.createVertex(),Qt.node=null,Qt.Dj=1,Qt.layer=Zt,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--,Zt-yt>ie&&0<Zt){for(b.valid=!1,Qt=a.createVertex(),Qt.node=null,Qt.Dj=2,Qt.layer=Zt-1,a.dh(Qt),E=a.Zj(E,Qt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=zt?0:nt,E.portToColOffset=0,E.portFromPos=zt?0:ht,E.portToPos=0,E=Qt,Zt--;Zt-yt>ie&&0<Zt;)Qt=a.createVertex(),Qt.node=null,Qt.Dj=3,Qt.layer=Zt-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,Zt--;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},hi.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}hi.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},hi.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 Ua(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 yt=nt+1;yt<ht;yt++){var Mt=b[yt];Mt.near===pt&&Mt.Dj===pt.Dj||st++}else for(yt=nt-1;yt>ht;yt--)Mt=b[yt],Mt.near===pt&&Mt.Dj===pt.Dj||st++;var zt;if(0<=x)for(ht=b[nt].sourceEdgesArrayAccess,pt=0;pt<ht.length;pt++){var Zt=ht[pt];if(Zt.valid&&Zt.fromVertex.layer!==y)for(Mt=Zt.fromVertex.index,yt=Zt.portToPos,Zt=Zt.portFromPos,zt=pt+1;zt<ht.length;zt++){var Qt=ht[zt];if(Qt.valid&&Qt.fromVertex.layer!==y){var ie=Qt.fromVertex.index,Ee=Qt.portToPos;Qt=Qt.portFromPos,yt<Ee&&(Mt>ie||Mt===ie&&Zt>Qt)&&st++,Ee<yt&&(ie>Mt||ie===Mt&&Qt>Zt)&&st++}}}if(0>=x){for(ht=b[nt].destinationEdgesArrayAccess,pt=0;pt<ht.length;pt++)if(Zt=ht[pt],Zt.valid&&Zt.toVertex.layer!==y)for(Mt=Zt.toVertex.index,yt=Zt.portToPos,Zt=Zt.portFromPos,zt=pt+1;zt<ht.length;zt++)Qt=ht[zt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Ee=Qt.portToPos,Qt=Qt.portFromPos,Zt<Qt&&(Mt>ie||Mt===ie&&yt>Ee)&&st++,Qt<Zt&&(ie>Mt||ie===Mt&&Ee>yt)&&st++)}for(et[nt*E+nt]=st,ht=nt+1;ht<E;ht++){var we=0,je=0;if(0<=x){st=b[nt].sourceEdgesArrayAccess;var Oe=b[ht].sourceEdgesArrayAccess;for(pt=0;pt<st.length;pt++)if(Zt=st[pt],Zt.valid&&Zt.fromVertex.layer!==y)for(Mt=Zt.fromVertex.index,Zt=Zt.portFromPos,zt=0;zt<Oe.length;zt++)Qt=Oe[zt],Qt.valid&&Qt.fromVertex.layer!==y&&(ie=Qt.fromVertex.index,Qt=Qt.portFromPos,(Mt<ie||Mt===ie&&Zt<Qt)&&je++,(ie<Mt||ie===Mt&&Qt<Zt)&&we++)}if(0>=x){for(st=b[nt].destinationEdgesArrayAccess,Oe=b[ht].destinationEdgesArrayAccess,pt=0;pt<st.length;pt++)if(Zt=st[pt],Zt.valid&&Zt.toVertex.layer!==y)for(Mt=Zt.toVertex.index,yt=Zt.portToPos,zt=0;zt<Oe.length;zt++)Qt=Oe[zt],Qt.valid&&Qt.toVertex.layer!==y&&(ie=Qt.toVertex.index,Ee=Qt.portToPos,(Mt<ie||Mt===ie&&yt<Ee)&&je++,(ie<Mt||ie===Mt&&Ee<yt)&&we++)}et[nt*E+ht]=we,et[ht*E+nt]=je}}return Jh(a,y,b),et}hi.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 yt=0;yt<pt.length;yt++){var Mt=pt[yt];if(Mt.valid&&Mt.toVertex.layer!==E){var zt=Mt.fromVertex.column+Mt.portFromColOffset,Zt=Mt.toVertex.column+Mt.portToColOffset;st+=(Math.abs(zt-Zt)+1)*gy(Mt)}}}Jh(b,E,et),y+=st}return y}hi.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 yt=0,Mt=0,zt=st.near;if(zt!==null&&zt.layer===st.layer&&(yt+=zt.column-1,Mt++),ht!==null)for(zt=0;zt<ht.length;zt++){st=ht[zt];var Zt=st.fromVertex;st.valid&&!st.rev&&Zt.layer!==y&&(yt+=Zt.column,Mt++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],zt=st.toVertex,st.valid&&!st.rev&&zt.layer!==y&&(yt+=zt.column,Mt++);et[nt]=Mt===0?-1:yt/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 yt=0,Mt=[],zt=st.near;if(zt!==null&&zt.layer===st.layer&&(Mt[yt]=zt.column-1,yt++),st=void 0,ht!==null)for(zt=0;zt<ht.length;zt++){st=ht[zt];var Zt=st.fromVertex;st.valid&&!st.rev&&Zt.layer!==y&&(Mt[yt]=Zt.column+st.portFromColOffset,yt++)}if(pt!==null)for(ht=0;ht<pt.length;ht++)st=pt[ht],zt=st.toVertex,st.valid&&!st.rev&&zt.layer!==y&&(Mt[yt]=zt.column+st.portToColOffset,yt++);yt===0?et[nt]=-1:(Mt.sort(function(Qt,ie){return Qt-ie}),pt=yt>>1,et[nt]=yt&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)}}hi.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 yt=st.sourceEdges;yt.next();)yt.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++}hi.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 yt=0,Mt=!1,zt=pt.sourceEdgesArrayAccess;E=zt.length;for(var Zt=0;Zt<E;Zt++){var Qt=zt[Zt],ie=Qt.fromVertex;yt+=1,ie.component!==1&&(et+=1,ie=ie.layer-pt.layer,Qt=a.linkMinLength(Qt),b=Math.min(b,ie-Qt))}for(zt=pt.destinationEdgesArrayAccess,E=zt.length,Zt=0;Zt<E;Zt++)Qt=zt[Zt].toVertex,--yt,Qt.component!==1?--et:Mt=!0;(ht===null||yt<st)&&!Mt&&(ht=pt,st=yt)}}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,yt=!1,zt=nt.sourceEdgesArrayAccess,Mt=zt.length,Zt=0;Zt<Mt;Zt++)Qt=zt[Zt].fromVertex,pt+=1,Qt.component!==1?b+=1:yt=!0;for(zt=nt.destinationEdgesArrayAccess,Mt=zt.length,Zt=0;Zt<Mt;Zt++)Qt=zt[Zt],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)&&!yt&&(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}hi.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))}hi.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Ua(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=Ua(this)),b=this.Ia;0<=b;b--)bv(this,b,-1),Vs(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Ua(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=Ua(this)),b=this.Ia;0<=b;b--)bv(this,b,0),Vs(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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=Ua(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 yt=x[b[et].index*E+b[et+1].index],Mt=x[b[et+1].index*E+b[et].index],zt=0,Zt=0,Qt=b[et].column,ie=b[et+1].column,Ee=a.nodeMinColumnSpace(b[et],!0),we=a.nodeMinColumnSpace(b[et],!1),je=a.nodeMinColumnSpace(b[et+1],!0),Oe=a.nodeMinColumnSpace(b[et+1],!1);Ee=Qt-Ee+je,we=ie-we+Oe;var De=b[et].sourceEdges.iterator;for(De.reset();De.next();)if(je=De.value,Oe=je.fromVertex,je.valid&&Oe.layer===y){for(je=0;b[je]!==Oe;)je++;je<et&&(zt+=2*(et-je),Zt+=2*(et+1-je)),je===et+1&&(zt+=1),je>et+1&&(zt+=4*(je-et),Zt+=4*(je-(et+1)))}for(De=b[et].destinationEdges.iterator,De.reset();De.next();)if(je=De.value,Oe=je.toVertex,je.valid&&Oe.layer===y){for(je=0;b[je]!==Oe;)je++;je===et+1&&(Zt+=1)}for(De=b[et+1].sourceEdges.iterator,De.reset();De.next();)if(je=De.value,Oe=je.fromVertex,je.valid&&Oe.layer===y){for(je=0;b[je]!==Oe;)je++;je<et&&(zt+=2*(et+1-je),Zt+=2*(et-je)),je===et&&(Zt+=1),je>et+1&&(zt+=4*(je-(et+1)),Zt+=4*(je-et))}for(De=b[et+1].destinationEdges.iterator,De.reset();De.next();)if(je=De.value,Oe=je.toVertex,je.valid&&Oe.layer===y){for(je=0;b[je]!==Oe;)je++;je===et&&(zt+=1)}je=Oe=0,De=nt[b[et].index];var _e=st[b[et].index],Je=nt[b[et+1].index],En=st[b[et+1].index];De!==-1&&(Oe+=Math.abs(De-Qt),je+=Math.abs(De-we)),_e!==-1&&(Oe+=Math.abs(_e-Qt),je+=Math.abs(_e-we)),Je!==-1&&(Oe+=Math.abs(Je-ie),je+=Math.abs(Je-Ee)),En!==-1&&(Oe+=Math.abs(En-ie),je+=Math.abs(En-Ee)),(Zt<zt-.5||Zt===zt&&Mt<yt-.5||Zt===zt&&Mt===yt&&je<Oe-.5)&&(pt=ht=!0,b[et].column=we,b[et+1].column=Ee,yt=b[et],b[et]=b[et+1],b[et+1]=yt)}for(et=0;et<E;et++)b[et].index=et;return Jh(a,y,b),ht}hi.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 yt=E[b].column,Mt=a.nodeMinColumnSpace(E[b],!0),zt=a.nodeMinColumnSpace(E[b],!1),Zt=0;0>b-1||yt-E[b-1].column-1>Mt+a.nodeMinColumnSpace(E[b-1],!1)?Zt=yt-1:Zt=yt,Mt=b+1>=et||E[b+1].column-yt-1>zt+a.nodeMinColumnSpace(E[b+1],!0)?yt+1:yt;var Qt=zt=0,ie=0;if(0>=x)for(var Ee=E[b].sourceEdges.iterator;Ee.next();){var we=Ee.value,je=we.fromVertex;if(we.valid&&je.layer!==y){var Oe=gy(we),De=we.portFromColOffset;we=we.portToColOffset,je=je.column,zt+=(Math.abs(yt+we-(je+De))+1)*Oe,Qt+=(Math.abs(Zt+we-(je+De))+1)*Oe,ie+=(Math.abs(Mt+we-(je+De))+1)*Oe}}if(0<=x)for(Ee=E[b].destinationEdges.iterator;Ee.next();)we=Ee.value,je=we.toVertex,we.valid&&je.layer!==y&&(Oe=gy(we),De=we.portFromColOffset,we=we.portToColOffset,je=je.column,zt+=(Math.abs(yt+De-(je+we))+1)*Oe,Qt+=(Math.abs(Zt+De-(je+we))+1)*Oe,ie+=(Math.abs(Mt+De-(je+we))+1)*Oe);we=De=Oe=0,Ee=nt[E[b].index],je=st[E[b].index],Ee!==-1&&(Oe+=Math.abs(Ee-yt),De+=Math.abs(Ee-Zt),we+=Math.abs(Ee-Mt)),je!==-1&&(Oe+=Math.abs(je-yt),De+=Math.abs(je-Zt),we+=Math.abs(je-Mt)),Qt<zt||Qt===zt&&De<Oe?(pt=ht=!0,E[b].column=Zt):(ie<zt||ie===zt&&we<Oe)&&(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),yt=0;if(nt[x]===-1)if(x===0&&x===E-1)yt=st;else if(x===0){var Mt=b[x+1].column;Mt-st===pt+a.nodeMinColumnSpace(b[x+1],!0)?yt=st-1:yt=st}else x===E-1?(Mt=b[x-1].column,yt=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,yt=(ht+pt)/2|0);else x===0&&x===E-1?yt=nt[x]:x===0?(Mt=b[x+1].column,pt=Mt-a.nodeMinColumnSpace(b[x+1],!0)-pt-1,yt=Math.min(nt[x],pt)):x===E-1?(Mt=b[x-1].column,ht=Mt+a.nodeMinColumnSpace(b[x-1],!1)+ht+1,yt=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?yt=nt[x]:ht>=nt[x]?yt=ht:pt<=nt[x]&&(yt=pt));yt!==st&&(et=!0,b[x].column=yt)}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=Ua(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=Ua(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Ua(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=Ua(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=Nn(),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 mn,Vx(y,x);var et=null,nt=null,st=null,ht=null,pt=(a.ve&1)!==0,yt=(a.ve&2)!==0,Mt=(a.ve&4)!==0,zt=(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=Xn(y),E=b.next();!E.done;E=b.next())E.value.reverse();zt&&(a.verticalAlignment(y,x,!1),ht=Pv(a,y,!1,!0)),y.reverse(),yt&&(a.verticalAlignment(y,x,!0),nt=Pv(a,y,!0,!0)),Rn(y),a.u(et,nt,st,ht),a.network.vertexes.each(function(Zt){var Qt=Nn();pt&&Qt.push(et.get(Zt)),yt&&Qt.push(nt.get(Zt)),Mt&&Qt.push(st.get(Zt)),zt&&Qt.push(ht.get(Zt)),Qt.sort(function(Ee,we){return Ee-we});var ie=Qt.length;ie=(Qt[Math.floor((ie-1)/2)]+Qt[Math.ceil((ie-1)/2)])/2,Rn(Qt),Zt.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 yt=My(pt);if(0<yt.length){yt=yt[0].node===null;break t}}yt=!1}var Mt=yt;if(ht===st.length-1||Mt){for(yt=nt.length-1,Mt&&(yt=My(pt)[0].index);et<=ht;){if(pt=st[et],!pt.bo){Mt=[];for(var zt=Xn(pt.sourceEdgesArrayAccess),Zt=zt.next();!Zt.done;Zt=zt.next())Zt=Zt.value,Zt.valid&&Mt.push(Zt);pt.bo=Mt}for(pt=Xn(pt.bo),Mt=pt.next();!Mt.done;Mt=pt.next())Mt=Mt.value,zt=Mt.fromVertex.index,(zt<E||zt>yt)&&y.add(Mt);et++}E=yt}}}hi.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Xn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Xn(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,zt){return Mt.vi-zt.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],yt=void 0;yt=x?Lv(pt,et):Lv(et,pt),!y.contains(yt)&&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=Xn(y),nt=et.next();!nt.done;nt=et.next()){var st=Xn(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=Xn(y),st=et.next();!st.done;st=et.next()){st=Xn(st.value);for(var ht=st.next();!ht.done;ht=st.next())if(ht=ht.value,ht.root===ht){for(var pt=0,yt=ht;yt.align!==ht;){var Mt=yt.align,zt=nt?yt.width:yt.height,Zt=nt?Mt.width:Mt.height;if(x){var Qt=Lv(yt,Mt),ie=Qt.portFromPos,Ee=Qt.portToPos;Qt.link!==null&&(yt.node&&yt.node!==Qt.link.fromNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Qt.link.toNode&&(Ee=nt?Mt.focusX:Mt.focusY))}else Qt=Lv(Mt,yt),ie=Qt.portToPos,Ee=Qt.portFromPos,Qt.link!==null&&(yt.node&&yt.node!==Qt.link.toNode&&(ie=nt?yt.focusX:yt.focusY),Mt.node&&Mt.node!==Qt.link.fromNode&&(Ee=nt?Mt.focusX:Mt.focusY));zt=b?yt.qg+(zt-ie)-(Zt-Ee):yt.qg+ie-Ee,Mt.qg=zt,pt=Math.min(pt,zt),yt=yt.align}yt=ht;do yt.qg=yt.qg-pt,yt=yt.align;while(yt!==ht)}}for(x=Xn(y),nt=x.next();!nt.done;nt=x.next())for(et=Xn(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 qn,y=Xn(y),nt=y.next();!nt.done;nt=y.next())for(x=Xn(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&&Ae("Could not determine previous vertex in layer"),y[x][a-1]}hi.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Nn(),E=Nn(),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)));Rn(b),Rn(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}hi.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?ga:aa:a.K===90?y?aa:ga:a.K===180?y?Fa:Qo:y?Qo:Fa}hi.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,yt=ht.column|0;b?(nt=y.x+this.kc*yt,pt=this.Kd[pt]):(nt=this.Kd[pt],pt=y.y+this.kc*yt),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 Me(x&&b?0:et,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=et,x.y+=y,x.commit()},hi.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)},hi.prototype.commitLayers=function(){},hi.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 yt=x.fromVertex,Mt=x.toVertex;if(x.valid)y.curve===vs&&y.pointsCount===4&&(yt.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===Wr&&(b=!0),st!==null&&ht===Wr&&(x=!0),(b||x)&&(ht=null,b&&(ht=y.getLinkPointFromPoint(E,nt,nt.ga(Ir),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(Ir),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(yt.layer===Mt.layer)y.zf();else{var zt=!1,Zt=!1,Qt=this.ie,ie=y.firstPickIndex+1;if(y.isOrthogonal){Zt=!0;var Ee=y.pointsCount;4<Ee&&y.points.removeRange(2,Ee-3)}else if(y.curve===vs)zt=!0,Ee=y.pointsCount,4<Ee&&y.points.removeRange(2,Ee-3),Ee===4&&(ie=2);else{Ee=y.pointsCount;var we=pt===Wr,je=ht===Wr;2<Ee&&we&&je?y.points.removeRange(1,Ee-2):3<Ee&&we&&!je?y.points.removeRange(1,Ee-3):3<Ee&&!we&&je?y.points.removeRange(2,Ee-2):4<Ee&&!we&&!je&&y.points.removeRange(2,Ee-3)}if(x.rev){for(;Mt!==null&&yt!==Mt;){var Oe=Ee=null;for(we=Mt.sourceEdges.iterator;we.next()&&(je=we.value,je.link!==x.link||(Ee=je.fromVertex,Oe=je.toVertex,Ee.node!==null)););if(Ee===null)break;if(Ee!==yt){we=y.i(ie-1).x,je=y.i(ie-1).y;var De=Ee.centerX,_e=Ee.centerY;if(Zt)this.K===180||this.K===0?ie===y.firstPickIndex+1?(y.m(ie++,we,je),y.m(ie++,we,_e)):(Oe!==null?Oe.centerY:je)!==_e&&(Oe=this.Ta[Ee.layer-1]+this.Rf.x,y.m(ie++,Oe,je),y.m(ie++,Oe,_e)):ie===y.firstPickIndex+1?(y.m(ie++,we,je),y.m(ie++,De,je)):(Oe!==null?Oe.centerX:we)!==De&&(Oe=this.Ta[Ee.layer-1]+this.Rf.y,y.m(ie++,we,Oe),y.m(ie++,De,Oe));else if(ie===y.firstPickIndex+1){Oe=Math.max(10,this.he[Mt.layer]);var Je=Math.max(10,this.Ld[Mt.layer]);if(zt)this.K===180?De<=Mt.bounds.x?(Mt=Mt.bounds.x,y.m(ie++,Mt-Oe,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt+Je,_e)):(y.m(ie++,De-Oe,_e),y.m(ie++,De,_e),y.m(ie++,De+Je,_e)):this.K===90?_e>=Mt.bounds.bottom?(Mt=Mt.bounds.y+Mt.bounds.height,y.m(ie++,De,Mt+Je),y.m(ie++,De,Mt),y.m(ie++,De,Mt-Oe)):(y.m(ie++,De,_e+Je),y.m(ie++,De,_e),y.m(ie++,De,_e-Oe)):this.K===270?_e<=Mt.bounds.y?(Mt=Mt.bounds.y,y.m(ie++,De,Mt-Oe),y.m(ie++,De,Mt),y.m(ie++,De,Mt+Je)):(y.m(ie++,De,_e-Oe),y.m(ie++,De,_e),y.m(ie++,De,_e+Je)):this.K===0&&(De>=Mt.bounds.right?(Mt=Mt.bounds.x+Mt.bounds.width,y.m(ie++,Mt+Je,_e),y.m(ie++,Mt,_e),y.m(ie++,Mt-Oe,_e)):(y.m(ie++,De+Je,_e),y.m(ie++,De,_e),y.m(ie++,De-Oe,_e)));else{y.m(ie++,we,je);var En=0;this.K===180||this.K===0?((this.K===180?De>=Mt.bounds.right:De<=Mt.bounds.x)&&(En=(this.K===0?-Oe:Je)/2),y.m(ie++,we+En,_e)):((this.K===270?_e>=Mt.bounds.bottom:_e<=Mt.bounds.y)&&(En=(this.K===90?-Oe:Je)/2),y.m(ie++,De,je+En)),y.m(ie++,De,_e)}}else Oe=Math.max(10,this.he[Ee.layer]),Je=Math.max(10,this.Ld[Ee.layer]),zt?this.K===180?(y.m(ie++,De-Oe-Qt,_e),y.m(ie++,Math.min(De-Oe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Je-Qt/2,De),_e),y.m(ie++,De+Je+Qt,_e)):this.K===90?(y.m(ie++,De,_e+Je+Qt),y.m(ie++,De,Math.max(_e+Je-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Oe+Qt/2,_e)),y.m(ie++,De,_e-Oe-Qt)):this.K===270?(y.m(ie++,De,_e-Oe-Qt),y.m(ie++,De,Math.min(_e-Oe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Je-Qt/2,_e)),y.m(ie++,De,_e+Je+Qt)):(y.m(ie++,De+Je+Qt,_e),y.m(ie++,Math.max(De+Je-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Oe+Qt/2,De),_e),y.m(ie++,De-Oe-Qt,_e)):y.m(ie++,De,_e)}Mt=Ee}(st===null||pt!==Wr||Zt)&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,Zt?(Qt=this.Ld[yt.layer],this.K===180||this.K===0?(Zt=je,Zt>=yt.bounds.y&&Zt<=yt.bounds.bottom&&(this.K===180?De>=yt.bounds.x:De<=yt.bounds.right)&&(Mt=yt.centerX+(this.K===180?-Qt:Qt),Zt<yt.bounds.y+yt.bounds.height/2?Zt=yt.bounds.y-this.kc/2:Zt=yt.bounds.bottom+this.kc/2,y.m(ie++,Mt,je),y.m(ie++,Mt,Zt)),y.m(ie++,De,Zt)):(Zt=we,Zt>=yt.bounds.x&&Zt<=yt.bounds.right&&(this.K===270?_e>=yt.bounds.y:_e<=yt.bounds.bottom)&&(Mt=yt.centerY+(this.K===270?-Qt:Qt),Zt<yt.bounds.x+yt.bounds.width/2?Zt=yt.bounds.x-this.kc/2:Zt=yt.bounds.right+this.kc/2,y.m(ie++,we,Mt),y.m(ie++,Zt,Mt)),y.m(ie++,Zt,_e)),y.m(ie++,De,_e)):zt?(Oe=Math.max(10,this.he[yt.layer]),Je=Math.max(10,this.Ld[yt.layer]),this.K===180&&De>=yt.bounds.x?(Mt=yt.bounds.x+yt.bounds.width,y.L(ie-2,Mt,je),y.L(ie-1,Mt+Je,je)):this.K===90&&_e<=yt.bounds.bottom?(Mt=yt.bounds.y,y.L(ie-2,we,Mt),y.L(ie-1,we,Mt-Oe)):this.K===270&&_e>=yt.bounds.y?(Mt=yt.bounds.y+yt.bounds.height,y.L(ie-2,we,Mt),y.L(ie-1,we,Mt+Je)):this.K===0&&De<=yt.bounds.right&&(Mt=yt.bounds.x,y.L(ie-2,Mt,je),y.L(ie-1,Mt-Oe,je))):(Oe=Math.max(10,this.he[yt.layer]),Je=Math.max(10,this.Ld[yt.layer]),Zt=0,this.K===180||this.K===0?((this.K===180?De<=yt.bounds.x:De>=yt.bounds.right)&&(Zt=(this.K===0?Je:-Oe)/2),y.m(ie++,De+Zt,je)):((this.K===270?_e<=yt.bounds.y:_e>=yt.bounds.bottom)&&(Zt=(this.K===90?Je:-Oe)/2),y.m(ie++,we,_e+Zt)),y.m(ie++,De,_e)))}else{for(;yt!==null&&yt!==Mt;){for(Oe=Ee=null,yt=yt.destinationEdges.iterator;yt.next()&&(we=yt.value,we.link!==x.link||(Ee=we.toVertex,Oe=we.fromVertex,Oe.node!==null&&(Oe=null),Ee.node!==null)););if(Ee===null)break;Ee!==Mt&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=Ee.centerX,_e=Ee.centerY,Zt?this.K===180||this.K===0?(Oe!==null?Oe.centerY:je)!==_e&&(Oe=this.Ta[Ee.layer]+this.Rf.x,ie===y.firstPickIndex+1&&(Oe=this.K===0?Math.max(Oe,we):Math.min(Oe,we)),y.m(ie++,Oe,je),y.m(ie++,Oe,_e)):(Oe!==null?Oe.centerX:we)!==De&&(Oe=this.Ta[Ee.layer]+this.Rf.y,ie===y.firstPickIndex+1&&(Oe=this.K===90?Math.max(Oe,je):Math.min(Oe,je)),y.m(ie++,we,Oe),y.m(ie++,De,Oe)):(Oe=Math.max(10,this.he[Ee.layer]),Je=Math.max(10,this.Ld[Ee.layer]),zt?this.K===180?(y.m(ie++,De+Je+Qt,_e),y.m(ie++,Math.max(De+Je-Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.min(De-Oe+Qt/2,De),_e),y.m(ie++,De-Oe-Qt,_e)):this.K===90?(y.m(ie++,De,_e-Oe-Qt),y.m(ie++,De,Math.min(_e-Oe+Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.max(_e+Je-Qt/2,_e)),y.m(ie++,De,_e+Je+Qt)):this.K===270?(y.m(ie++,De,_e+Je+Qt),y.m(ie++,De,Math.max(_e+Je-Qt/2,_e)),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,De,Math.min(_e-Oe+Qt/2,_e)),y.m(ie++,De,_e-Oe-Qt)):(y.m(ie++,De-Oe-Qt,_e),y.m(ie++,Math.min(De-Oe+Qt/2,De),_e),y.m(ie++,De,_e),y.m(ie++,De,_e),y.m(ie++,Math.max(De+Je-Qt/2,De),_e),y.m(ie++,De+Je+Qt,_e)):this.K===180?(y.m(ie++,De+Je,_e),y.m(ie++,De-Oe,_e)):this.K===90?(y.m(ie++,De,_e-Oe),y.m(ie++,De,_e+Je)):this.K===270?(y.m(ie++,De,_e+Je),y.m(ie++,De,_e-Oe)):(y.m(ie++,De-Oe,_e),y.m(ie++,De+Je,_e)))),yt=Ee}Zt&&(we=y.i(ie-1).x,je=y.i(ie-1).y,De=y.i(ie).x,_e=y.i(ie).y,this.K===180||this.K===0?je!==_e&&(Oe=this.K===0?Math.min(Math.max((De+we)/2,this.Ta[Mt.layer]+this.Rf.x),De):Math.max(Math.min((De+we)/2,this.Ta[Mt.layer]+this.Rf.x),De),y.m(ie++,Oe,je),y.m(ie++,Oe,_e)):we!==De&&(Oe=this.K===90?Math.min(Math.max((_e+je)/2,this.Ta[Mt.layer]+this.Rf.y),_e):Math.max(Math.min((_e+je)/2,this.Ta[Mt.layer]+this.Rf.y),_e),y.m(ie++,we,Oe),y.m(ie++,De,Oe)))}b!==null&&zt&&4<=y.pointsCount&&(nt!==null&&(nt=pt===Wr?y.getLinkPointFromPoint(E,nt,nt.ga(Ir),y.i(3),!0):y.i(0),pt===Wr&&(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===Wr?y.getLinkPointFromPoint(et,st,st.ga(Ir),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ht===Wr&&(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()},hi.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 yt=0;ht.y<et.y?yt=pt.y<et.y?3:et.x<nt.x?2:1:ht.y>et.y&&(yt=pt.y>et.y?0:nt.x<et.x?2:1),st.j=yt}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),yt=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(yt++,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,yt<Mt?(ht=!1,pt=yt,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,yt=0,Mt=et;Mt<E;Mt++){var zt=x[Mt];(ht?zt.first:zt.jc)!==st&&(yt++,st=ht?zt.first:zt.jc);var Zt=zt.link;et=Zt.i(zt.index),nt=Zt.i(zt.index+1);var Qt=this.linkSpacing*(yt-(pt-1)/2);y++,Zt.uh(),Zt.L(zt.index,et.x,et.y+Qt),Zt.L(zt.index+1,nt.x,nt.y+Qt),Zt.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),yt=0,ht.x<et.x?yt=pt.x<et.x?3:et.y<nt.y?2:1:ht.x>et.x&&(yt=pt.x>et.x?0:nt.y<et.y?2:1),st.j=yt),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),yt=1,st=x[et].jc,ht=et;ht<E;ht++)pt=x[ht],pt.jc!==st&&(yt++,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,yt<Mt?(ht=!1,pt=yt,st=x[et].jc,this.zi(x,this.Js,et,et+nt)):st=x[et].first,yt=0,Mt=et;Mt<E;Mt++)zt=x[Mt],(ht?zt.first:zt.jc)!==st&&(yt++,st=ht?zt.first:zt.jc),Zt=zt.link,et=Zt.i(zt.index),nt=Zt.i(zt.index+1),Qt=this.linkSpacing*(yt-(pt-1)/2),y++,Zt.uh(),Zt.L(zt.index,et.x+Qt,et.y),Zt.L(zt.index+1,nt.x+Qt,nt.y),Zt.zf()}et=E}a=b}}}},qt=hi.prototype,qt.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},qt.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},qt.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},qt.B=function(a,y){return a-=y,-1<a&&1>a},qt.zi=function(a,y,x,b){var E=a.length,et=b-x;if(!(1>=et))if((0>x||x>=E-1)&&Ae("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}Ze.Object.defineProperties(hi.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()):Ae("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 dn(hi,"CycleDepthFirst",0),xy=new dn(hi,"CycleGreedy",1),xg=new dn(hi,"CycleFromLayers",2),Ev=new dn(hi,"LayerOptimalLinkLength",0),wy=new dn(hi,"LayerLongestPathSink",1),by=new dn(hi,"LayerLongestPathSource",2),Mv=new dn(hi,"InitDepthFirstOut",0),Py=new dn(hi,"InitDepthFirstIn",1),Cy=new dn(hi,"InitNaive",2),ky=new dn(hi,"AggressiveNone",0),Tv=new dn(hi,"AggressiveLess",1),Ey=new dn(hi,"AggressiveMore",2),Xx=8;hi.className="LayeredDigraphLayout",hi.CycleDepthFirst=kv,hi.CycleGreedy=xy,hi.CycleFromLayers=xg,hi.LayerOptimalLinkLength=Ev,hi.LayerLongestPathSink=wy,hi.LayerLongestPathSource=by,hi.InitDepthFirstOut=Mv,hi.InitDepthFirstIn=Py,hi.InitNaive=Cy,hi.AggressiveNone=ky,hi.AggressiveLess=Tv,hi.AggressiveMore=Ey,hi.PackNone=0,hi.PackExpand=1,hi.PackStraighten=2,hi.PackMedian=4,hi.PackAll=15,hi.AlignNone=0,hi.AlignUpperLeft=1,hi.AlignUpperRight=2,hi.AlignLowerLeft=4,hi.AlignLowerRight=8,hi.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){xi.call(this,a)}tn(Gd,xi),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}tn(Ds,So);function ix(a,y){return a.index-y.index}function Lv(a,y){if(!a.$n){for(var x=[],b=Xn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Xn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ae("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Xn(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=Xn(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},Ze.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}tn(wg,rs),Ze.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 zr(a){ji.call(this),this.Ub=new mn,this.Wn=Ov,this.ud=nu,this.vo=Dv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=Bv,this.$d=new Cn(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)}tn(zr,ji),zr.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)},zr.prototype.qb=function(a){a.classType===zr?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:Ae("Unknown enum value: "+a):ji.prototype.qb.call(this,a)},zr.prototype.createNetwork=function(){return new Ff(this)},zr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Tn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof wn){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 $e?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof br?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},zr.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 $e&&(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 mn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Tn?(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 mn,this.isValidLayout=!0};function Jx(a){var y=new mn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}zr.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:Ae("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:Ae("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:Ae("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}zr.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}}zr.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])}}zr.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])}}zr.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:Ae("Unhandled sorting value "+a.sorting.toString())}},zr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},zr.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 yt=pt.value;yt.category==="Comment"&&yt.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(yt),yt.Va(),yt=yt.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(et=Math.max(et,yt.width),nt+=yt.height+Math.abs(st)):(et+=yt.width+Math.abs(st),nt=Math.max(nt,yt.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}zr.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,yt=pt.length,Mt=Me.alloc(),zt=0;zt<yt;zt++){var Zt=pt[zt],Qt=Zt.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),Zt.move(Mt),Zt=Zt.Sd();Zt.next();){var ie=Zt.value;ie.fromSpot=Fa,ie.toSpot=Qo}else for(Mt.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Qo,ie.toSpot=Fa;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Qo,ie.toSpot=Fa;else for(Mt.h(a.bounds.x+a.commentMargin-Qt.width,a.bounds.y+ht),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=Fa,ie.toSpot=Qo;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),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=ga,ie.toSpot=aa;else for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y-a.commentMargin),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=aa,ie.toSpot=ga;else if(0<=a.commentMargin)for(Mt.h(a.bounds.x+ht,a.bounds.y+2*a.focus.y+a.commentMargin),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=aa,ie.toSpot=ga;else for(Mt.h(a.bounds.x+ht,a.bounds.y+a.commentMargin-Qt.height),Zt.move(Mt),Zt=Zt.Sd();Zt.next();)ie=Zt.value,ie.fromSpot=ga,ie.toSpot=aa;ht=0<=a.commentSpacing?ht+(Qt.width+a.commentSpacing):ht+(a.commentSpacing-Qt.width)}}if(Me.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)}},zr.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,yt=$h(ht),Mt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var zt=a.nodeSpacing,Zt=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 Ee=a.height,we=0,je=0,Oe=0,De=null,_e=null,Je=0,En=0,_n=0,Dn=0,Sn=0,un=0,xr=0,fr=0;if(yt&&!bg(ht)&&135<E&&nt.reverse(),bg(ht))if(1<st)for(var ri=0;ri<st;ri++)ri%2===0&&ri!==st-1&&(fr=Math.max(fr,y?nt[ri].Da.width:nt[ri].Da.height));else st===1&&(fr=y?nt[0].Da.width:nt[0].Da.height);if(yt){switch(ht){case hh:je=135>E?cx(this,a,nt,fr,we,je):fx(this,a,nt,fr,we,je),fr=je.x,we=je.width,je=je.height;break;case ch:for(De=0;De<st;De++)_e=nt[De],Mt=_e.Da,Oe=un===0?0:Qt,y?(_e.S.h(et-Mt.width,Dn+Oe),we=Math.max(we,Mt.width),je=Math.max(je,Dn+Oe+Mt.height),Dn+=Oe+Mt.height):(_e.S.h(_n+Oe,et-Mt.height),we=Math.max(we,_n+Oe+Mt.width),je=Math.max(je,Mt.height),_n+=Oe+Mt.width),un++;break;case Cu:for(De=0;De<st;De++)_e=nt[De],et=_e.Da,Mt=un===0?0:Qt,y?(_e.S.h(zt/2+a.focus.x,Dn+Mt),we=Math.max(we,et.width),je=Math.max(je,Dn+Mt+et.height),Dn+=Mt+et.height):(_e.S.h(_n+Mt,zt/2+a.focus.y),we=Math.max(we,_n+Mt+et.width),je=Math.max(je,et.height),_n+=Mt+et.width),un++}De=Va(this,2),_e=Va(this,2),y?(De[0].h(0,0),De[1].h(0,je),_e[0].h(we,0)):(De[0].h(0,0),De[1].h(we,0),_e[0].h(0,je)),_e[1].h(we,je)}else for(ri=0;ri<st;ri++){var yi=nt[ri],Eo=yi.Da;if(y){0<Mt&&0<un&&_n+zt+Eo.width>Mt&&(_n<et&&zc(a,ht,et-_n,0,xr,ri-1),Sn++,un=0,xr=ri,Oe=je,_n=0,Dn=135<E?-je-Qt:je+Qt),Nv(this,yi,0,Dn);var No=0;if(un===0)De=yi.Yo,_e=yi.kp,Je=Eo.width,En=Eo.height,(De===null||_e===null||E!==hl(yi))&&(De=Va(this,2),_e=Va(this,2),De[0].h(0,0),De[1].h(0,En),_e[0].h(Je,0),_e[1].h(Je,En));else{var ca=Nn();En=dx(this,a,yi,De,_e,Je,En,ca),No=En.x,De=ca[0],_e=ca[1],Je=En.width,En=En.height,Rn(ca),_n<Eo.width&&0>No&&(Nf(a,-No,0,xr,ri-1),jv(De,-No,0),jv(_e,-No,0),No=0)}yi.S.h(No,Dn),we=Math.max(we,Je),je=Math.max(je,Oe+(Sn===0?0:Qt)+Eo.height),_n=Je}else 0<Mt&&0<un&&Dn+zt+Eo.height>Mt&&(Dn<et&&zc(a,ht,0,et-Dn,xr,ri-1),Sn++,un=0,xr=ri,Oe=we,Dn=0,_n=135<E?-we-Qt:we+Qt),Nv(this,yi,_n,0),No=0,un===0?(De=yi.Yo,_e=yi.kp,Je=Eo.width,En=Eo.height,(De===null||_e===null||E!==hl(yi))&&(De=Va(this,2),_e=Va(this,2),De[0].h(0,0),De[1].h(Je,0),_e[0].h(0,En),_e[1].h(Je,En))):(ca=Nn(),En=dx(this,a,yi,De,_e,Je,En,ca),No=En.x,De=ca[0],_e=ca[1],Je=En.width,En=En.height,Rn(ca),Dn<Eo.height&&0>No&&(Nf(a,0,-No,xr,ri-1),jv(De,0,-No),jv(_e,0,-No),No=0)),yi.S.h(_n,No),je=Math.max(je,En),we=Math.max(we,Oe+(Sn===0?0:Qt)+Eo.width),Dn=En;un++}switch(0<Sn&&(y?(je+=Math.max(0,x),_n<we&&zc(a,ht,we-_n,0,xr,st-1),0<ie&&(pt||Nf(a,ie,0,0,st-1),we+=ie)):(we+=Math.max(0,x),Dn<je&&zc(a,ht,0,je-Dn,xr,st-1),0<ie&&(pt||Nf(a,0,ie,0,st-1),je+=ie))),ie=pt=0,ht){case Wd:y?pt+=we/2-a.focus.x-Zt/2:ie+=je/2-a.focus.y-Zt/2;break;case Of:0<Sn?y?pt+=we/2-a.focus.x-Zt/2:ie+=je/2-a.focus.y-Zt/2:y?(fr=nt[0].S.x+nt[0].la.x,pt+=fr+(nt[st-1].S.x+nt[st-1].la.x+2*nt[st-1].focus.x-fr)/2-a.focus.x-Zt/2):(fr=nt[0].S.y+nt[0].la.y,ie+=fr+(nt[st-1].S.y+nt[st-1].la.y+2*nt[st-1].focus.y-fr)/2-a.focus.y-Zt/2);break;case ru:y?(pt-=Zt,we+=Zt):(ie-=Zt,je+=Zt);break;case iu:y?(pt+=we-a.width+Zt,we+=Zt):(ie+=je-a.height+Zt,je+=Zt);break;case hh:y?1<st?pt+=fr+zt/2-a.focus.x:pt+=nt[0].focus.x-a.focus.x+nt[0].la.x:1<st?ie+=fr+zt/2-a.focus.y:ie+=nt[0].focus.y-a.focus.y+nt[0].la.y;break;case ch:y?pt+=we+zt/2-a.focus.x:ie+=je+zt/2-a.focus.y;break;case Cu:break;default:je=this.customAlignment(a,pt,ie,we,je),pt=je[0],ie=je[1],we=je[2],je=je[3]}for(Zt=0;Zt<st;Zt++)fr=nt[Zt],y?fr.S.h(fr.S.x+fr.la.x-pt,fr.S.y+(135<E?(yt?-je:-fr.Da.height)+fr.la.y-x:Ee+x+fr.la.y)):fr.S.h(fr.S.x+(135<E?(yt?-we:-fr.Da.width)+fr.la.x-x:b+x+fr.la.x),fr.S.y+fr.la.y-ie);if(st=nt=0,yt?y?(we=Ay(a,we,pt),0>pt&&(pt=0),135<E&&(ie+=je+x),je+=Ee+x,ht===Cu&&(nt+=zt/2+a.focus.x),st+=Ee+x):(135<E&&(pt+=we+x),we+=b+x,je=Ny(a,je,ie),0>ie&&(ie=0),ht===Cu&&(st+=zt/2+a.focus.y),nt+=b+x):y?(a.comments===null?b>we&&(we=jy(ht,b-we,0),nt=we.x,st=we.y,we=b,pt=0):we=Ay(a,we,pt),0>pt&&(nt-=pt,pt=0),135<E&&(ie+=je+x),je=Math.max(Math.max(je,Ee),je+Ee+x),st+=Ee+x):(135<E&&(pt+=we+x),we=Math.max(Math.max(we,b),we+b+x),a.comments===null?Ee>je&&(je=jy(ht,0,Ee-je),nt=je.x,st=je.y,je=Ee,ie=0):je=Ny(a,je,ie),0>ie&&(st-=ie,ie=0),nt+=b+x),0<Sn)E=Va(this,4),Sn=Va(this,4),y?(E[2].h(0,Ee+x),E[3].h(E[2].x,je),Sn[2].h(we,E[2].y),Sn[3].h(Sn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(we,E[2].y),Sn[2].h(E[2].x,je),Sn[3].h(E[3].x,Sn[2].y));else{for(E=Va(this,De.length+2),Sn=Va(this,_e.length+2),ht=0;ht<De.length;ht++)yt=De[ht],E[ht+2].h(yt.x+nt,yt.y+st);for(ht=0;ht<_e.length;ht++)yt=_e[ht],Sn[ht+2].h(yt.x+nt,yt.y+st)}y?(E[0].h(pt,0),E[1].h(E[0].x,Ee),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])),Sn[0].h(pt+b,0),Sn[1].h(Sn[0].x,Ee),Sn[2].y<Sn[1].y&&(Sn[2].x<Sn[0].x?Sn[2].assign(Sn[1]):Sn[1].assign(Sn[2])),Sn[3].y<Sn[2].y&&(Sn[3].x<Sn[0].x?Sn[3].assign(Sn[2]):Sn[2].assign(Sn[3])),E[2].y-=x/2,Sn[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])),Sn[0].h(0,ie+Ee),Sn[1].h(b,Sn[0].y),Sn[2].x<Sn[1].x&&(Sn[2].y<Sn[0].y?Sn[2].assign(Sn[1]):Sn[1].assign(Sn[2])),Sn[3].x<Sn[2].x&&(Sn[3].y<Sn[0].y?Sn[3].assign(Sn[2]):Sn[2].assign(Sn[3])),E[2].x-=x/2,Sn[2].x-=x/2),xl(this,De),xl(this,_e),a.Yo=E,a.kp=Sn,a.la.h(pt,ie),a.Da.h(we,je)}break;default:Ae("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,yt=pt===ru,Mt=pt===iu;st=$h(pt);var zt=Math.max(0,y.breadthLimit);ht=a.computeLayerSpacing(y);var Zt=y.nodeSpacing,Qt=a.computeNodeIndent(y),ie=yt||Mt?0:Qt/2,Ee=y.rowSpacing,we=0;(yt||Mt||y.hm||y.im&&y.maxGenerationCount===1)&&(we=Math.max(0,y.rowIndent)),yt=y.width;var je=y.height,Oe=0,De=0,_e=0,Je=0,En=0,_n=0,Dn=0,Sn=0,un=0,xr=0;if(st&&!bg(pt)&&135<b&&E.reverse(),bg(pt))if(1<nt)for(var fr=0;fr<nt;fr++){var ri=E[fr],yi=ri.Da;fr%2===0&&fr!==nt-1?un=Math.max(un,(x?yi.width:yi.height)+a.computeBusNodeSpacing(ri)-Zt):fr%2!==0&&(xr=Math.max(xr,(x?yi.width:yi.height)+a.computeBusNodeSpacing(ri)-Zt))}else nt===1&&(un=x?E[0].Da.width:E[0].Da.height);if(st)switch(pt){case hh:case ou:De=135>b?cx(a,y,E,un,Oe,De):fx(a,y,E,un,Oe,De),un=De.x,Oe=De.width,De=De.height;break;case ch:for(zt=0;zt<nt;zt++)ie=E[zt],_e=ie.Da,xr=Dn===0?0:Ee,x?(ie.S.h(et-_e.width,En+xr),Oe=Math.max(Oe,_e.width),De=Math.max(De,En+xr+_e.height),En+=xr+_e.height):(ie.S.h(Je+xr,et-_e.height),Oe=Math.max(Oe,Je+xr+_e.width),De=Math.max(De,_e.height),Je+=xr+_e.width),Dn++;break;case Cu:for(et=0;et<nt;et++)zt=E[et],ie=zt.Da,_e=Dn===0?0:Ee,x?(zt.S.h(Zt/2+y.focus.x,En+_e),Oe=Math.max(Oe,ie.width),De=Math.max(De,En+_e+ie.height),En+=_e+ie.height):(zt.S.h(Je+_e,Zt/2+y.focus.y),Oe=Math.max(Oe,Je+_e+ie.width),De=Math.max(De,ie.height),Je+=_e+ie.width),Dn++}else for(xr=0;xr<nt;xr++)fr=E[xr],ri=fr.Da,x?(0<zt&&0<Dn&&Je+Zt+ri.width>zt&&(Je<et&&zc(y,pt,et-Je,0,Sn,xr-1),_n++,Dn=0,Sn=xr,_e=De,Je=0,En=135<b?-De-Ee:De+Ee),yi=Dn===0?ie:Zt,Nv(a,fr,0,En),fr.S.h(Je+yi,En),Oe=Math.max(Oe,Je+yi+ri.width),De=Math.max(De,_e+(_n===0?0:Ee)+ri.height),Je+=yi+ri.width):(0<zt&&0<Dn&&En+Zt+ri.height>zt&&(En<et&&zc(y,pt,0,et-En,Sn,xr-1),_n++,Dn=0,Sn=xr,_e=Oe,En=0,Je=135<b?-Oe-Ee:Oe+Ee),yi=Dn===0?ie:Zt,Nv(a,fr,Je,0),fr.S.h(Je,En+yi),De=Math.max(De,En+yi+ri.height),Oe=Math.max(Oe,_e+(_n===0?0:Ee)+ri.width),En+=yi+ri.height),Dn++;switch(0<_n&&(x?(De+=Math.max(0,ht),Je<Oe&&zc(y,pt,Oe-Je,0,Sn,nt-1),0<we&&(Mt||Nf(y,we,0,0,nt-1),Oe+=we)):(Oe+=Math.max(0,ht),En<De&&zc(y,pt,0,De-En,Sn,nt-1),0<we&&(Mt||Nf(y,0,we,0,nt-1),De+=we))),we=Mt=0,pt){case Wd:x?Mt+=Oe/2-y.focus.x-Qt/2:we+=De/2-y.focus.y-Qt/2;break;case Of:0<_n?x?Mt+=Oe/2-y.focus.x-Qt/2:we+=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,we+=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,Oe+=Qt):(we-=Qt,De+=Qt);break;case iu:x?(Mt+=Oe-y.width+Qt,Oe+=Qt):(we+=De-y.height+Qt,De+=Qt);break;case hh:case ou:x?1<nt?Mt+=un+Zt/2-y.focus.x:Mt+=E[0].focus.x-y.focus.x+E[0].la.x:1<nt?we+=un+Zt/2-y.focus.y:we+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ch:x?Mt+=Oe+Zt/2-y.focus.x:we+=De+Zt/2-y.focus.y;break;case Cu:break;default:a=a.customAlignment(y,Mt,we,Oe,De),Mt=a[0],we=a[1],Oe=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:je+ht+Qt.la.y)):Qt.S.h(Qt.S.x+(135<b?(st?-Oe:-Qt.Da.width)+Qt.la.x-ht:yt+ht+Qt.la.x),Qt.S.y+Qt.la.y-we);x?(Oe=Ay(y,Oe,Mt),0>Mt&&(Mt=0),135<b&&(we+=De+ht),De=Math.max(Math.max(De,je),De+je+ht)):(135<b&&(Mt+=Oe+ht),Oe=Math.max(Math.max(Oe,yt),Oe+yt+ht),De=Ny(y,De,we),0>we&&(we=0)),y.la.h(Mt,we),y.Da.h(Oe,De)}}zr.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,yt=0,Mt=0,zt=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Qt=x[Zt],ie=Qt.Da,Ee=yt===0?0:ht;if(pt){var we=a.computeBusNodeSpacing(Qt)-st;Qt.S.h(b-(ie.width+we),zt+Ee),E=Math.max(E,ie.width+we),et=Math.max(et,zt+Ee+ie.height),zt+=Ee+ie.height}else we=a.computeBusNodeSpacing(Qt)-st,Qt.S.h(Mt+Ee,b-(ie.height+we)),et=Math.max(et,ie.height+we),E=Math.max(E,Mt+Ee+ie.width),Mt+=Ee+ie.width;yt++}for(yt=0,Qt=Mt,Zt=zt,pt?(Mt=b+st,zt=0):(Mt=0,zt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],we=Ee.Da;var je=yt===0?0:ht;if(pt){var Oe=a.computeBusNodeSpacing(Ee)-st;Ee.S.h(Mt+Oe,zt+je),E=Math.max(E,Mt+we.width+Oe),et=Math.max(et,zt+je+we.height),zt+=je+we.height}else Oe=a.computeBusNodeSpacing(Ee)-st,Ee.S.h(Mt+je,zt+Oe),E=Math.max(E,Mt+je+we.width),et=Math.max(et,zt+we.height+Oe),Mt+=je+we.width;yt++}return 1<nt&&nt%2===1&&(x=x[nt-1],nt=x.Da,a=a.computeBusLastRowSpacing(x,pt?Math.max(Math.abs(Zt),Math.abs(zt)):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(Zt,zt)+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),zt=b+st/2-x.focus.y-x.la.y,et=Math.max(et,zt+nt.height),0>zt&&(et-=zt),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,yt=0,Mt=0,zt=0,Zt=0;Zt<nt;Zt++)if(!(Zt%2!==0||1<nt&&Zt===nt-1)){var Qt=x[Zt],ie=Qt.Da,Ee=yt===0?0:ht;if(pt){var we=a.computeBusNodeSpacing(Qt)-st;zt-=Ee+ie.height,Qt.S.h(b-(ie.width+we),zt),E=Math.max(E,ie.width+we),et=Math.max(et,Math.abs(zt))}else we=a.computeBusNodeSpacing(Qt)-st,Mt-=Ee+ie.width,Qt.S.h(Mt,b-(ie.height+we)),et=Math.max(et,ie.height+we),E=Math.max(E,Math.abs(Mt));yt++}for(yt=0,Qt=Mt,Zt=zt,pt?(Mt=b+st,zt=0):(Mt=0,zt=b+st),ie=0;ie<nt;ie++)if(ie%2!==0){Ee=x[ie],we=Ee.Da;var je=yt===0?0:ht;if(pt){var Oe=a.computeBusNodeSpacing(Ee)-st;zt-=je+we.height,Ee.S.h(Mt+Oe,zt),E=Math.max(E,Mt+we.width+Oe),et=Math.max(et,Math.abs(zt))}else Oe=a.computeBusNodeSpacing(Ee)-st,Mt-=je+we.width,Ee.S.h(Mt,zt+Oe),et=Math.max(et,zt+we.height+Oe),E=Math.max(E,Math.abs(Mt));yt++}for(1<nt&&nt%2===1&&(ht=x[nt-1],yt=ht.Da,a=a.computeBusLastRowSpacing(ht,pt?Math.max(Math.abs(Zt),Math.abs(zt)):Math.max(Math.abs(Qt),Math.abs(Mt))),pt?(ht.S.h(b+st/2-ht.focus.x-ht.la.x,-et-yt.height-a),Mt=b+st/2-ht.focus.x-ht.la.x,E=Math.max(E,Mt+yt.width),0>Mt&&(E-=Mt),et=Math.max(et,Math.abs(Math.min(Zt,zt))+a+yt.height),0>ht.S.x&&(b=Av(y,ht.S.x,!1,b,st))):(ht.S.h(-E-yt.width-a,b+st/2-ht.focus.y-ht.la.y),E=Math.max(E,Math.abs(Math.min(Qt,Mt))+a+yt.width),zt=b+st/2-ht.focus.y-ht.la.y,et=Math.max(et,zt+yt.height),0>zt&&(et-=zt),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)}zr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},zr.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:Ae("Unhandled alignment value "+a.toString())}return new Me(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:Ae("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,yt=y.nodeSpacing;y=b;var Mt=E;b=et;var zt=nt,Zt=x.Yo,Qt=x.kp;nt=x.Da;var ie=pt?Math.max(zt,nt.height):Math.max(b,nt.width);if((Zt===null||ht!==hl(x))&&(Zt=Va(a,2),Qt=Va(a,2),pt?(Zt[0].h(0,0),Zt[1].h(0,nt.height),Qt[0].h(nt.width,0),Qt[1].h(Qt[0].x,Zt[1].y)):(Zt[0].h(0,0),Zt[1].h(nt.width,0),Qt[0].h(0,nt.height),Qt[1].h(Zt[1].x,Qt[0].y))),pt){if(zt=9999999,!(Mt===null||2>Mt.length||Zt===null||2>Zt.length))for(E=x=0;x<Mt.length&&E<Zt.length;){et=Mt[x];var Ee=Zt[E];ht=Ee.x,pt=Ee.y,ht+=b;var we=et;x+1<Mt.length&&(we=Mt[x+1]);var je=Ee;Ee=je.x,je=je.y,E+1<Zt.length&&(je=Zt[E+1],Ee=je.x,je=je.y,Ee+=b);var Oe=zt;et.y===pt?Oe=ht-et.x:et.y>pt&&et.y<je?Oe=ht+(et.y-pt)/(je-pt)*(Ee-ht)-et.x:pt>et.y&&pt<we.y&&(Oe=ht-(et.x+(pt-et.y)/(we.y-et.y)*(we.x-et.x))),Oe<zt&&(zt=Oe),we.y<=et.y?x++:je<=pt?E++:(we.y<=je&&x++,je<=we.y&&E++)}if(zt=b-zt,zt+=yt,x=Zt,E=zt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(yt=Va(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].y<y[0].y;)pt=x[et++],yt[b++].h(pt.x+E,pt.y);for(;ht<y.length;)pt=y[ht++],yt[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++],yt[b++].h(pt.x+E,pt.y);for(x=Va(a,b),ht=0;ht<b;ht++)x[ht].assign(yt[ht]);xl(a,yt),b=x}if(et=Qt,ht=zt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(yt=Va(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].y<et[0].y;)we=Mt[x++],yt[E++].h(we.x,we.y);for(;pt<et.length;)we=et[pt++],yt[E++].h(we.x+ht,we.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++],yt[E++].h(ht.x,ht.y);for(et=Va(a,E),x=0;x<E;x++)et[x].assign(yt[x]);xl(a,yt),E=et}return et=Math.max(0,zt)+nt.width,nt=ie,xl(a,y),xl(a,Zt),xl(a,Mt),xl(a,Qt),st[0]=b,st[1]=E,new on(zt,0,et,nt)}if(b=9999999,!(Mt===null||2>Mt.length||Zt===null||2>Zt.length))for(E=x=0;x<Mt.length&&E<Zt.length;)et=Mt[x],Ee=Zt[E],ht=Ee.x,pt=Ee.y,pt+=zt,we=et,x+1<Mt.length&&(we=Mt[x+1]),je=Ee,Ee=je.x,je=je.y,E+1<Zt.length&&(je=Zt[E+1],Ee=je.x,je=je.y,je+=zt),Oe=b,et.x===ht?Oe=pt-et.y:et.x>ht&&et.x<Ee?Oe=pt+(et.x-ht)/(Ee-ht)*(je-pt)-et.y:ht>et.x&&ht<we.x&&(Oe=pt-(et.y+(ht-et.x)/(we.x-et.x)*(we.y-et.y))),Oe<b&&(b=Oe),we.x<=et.x?x++:Ee<=ht?E++:(we.x<=Ee&&x++,Ee<=we.x&&E++);if(zt-=b,zt+=yt,x=Zt,E=zt,y===null||2>y.length||x===null||2>x.length)b=null;else{for(yt=Va(a,y.length+x.length),b=et=ht=0;et<x.length&&x[et].x<y[0].x;)pt=x[et++],yt[b++].h(pt.x,pt.y+E);for(;ht<y.length;)pt=y[ht++],yt[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++],yt[b++].h(pt.x,pt.y+E);for(x=Va(a,b),ht=0;ht<b;ht++)x[ht].assign(yt[ht]);xl(a,yt),b=x}if(et=Qt,ht=zt,Mt===null||2>Mt.length||et===null||2>et.length)E=null;else{for(yt=Va(a,Mt.length+et.length),E=pt=x=0;x<Mt.length&&Mt[x].x<et[0].x;)we=Mt[x++],yt[E++].h(we.x,we.y);for(;pt<et.length;)we=et[pt++],yt[E++].h(we.x,we.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++],yt[E++].h(ht.x,ht.y);for(et=Va(a,E),x=0;x<E;x++)et[x].assign(yt[x]);xl(a,yt),E=et}return et=ie,nt=Math.max(0,zt)+nt.height,xl(a,y),xl(a,Zt),xl(a,Mt),xl(a,Qt),st[0]=b,st[1]=E,new on(zt,0,et,nt)}function Va(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 Me;return a}function xl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}zr.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:Ae("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:Ae("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)}}}zr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},zr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},zr.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 Me(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Me(-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)}},zr.prototype.commitLayers=function(){},zr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},zr.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])}}zr.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=Qo;break;case 90:E=aa;break;case 180:E=Fa;break;default:E=ga}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?Fa:ga;if(nt===1||y===nt-1&&nt%2===1)switch(b){case 0:ht=Fa;break;case 90:ht=ga;break;case 180:ht=Qo;break;default:ht=aa}else y%2===0&&(ht=b===90||b===270?Qo:aa);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?Qo:aa,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?Fa:ga,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=Qo;break;case 90:b.fromSpot=aa;break;case 180:b.fromSpot=Fa;break;default:b.fromSpot=ga}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Fa;break;case 90:b.toSpot=ga;break;case 180:b.toSpot=Qo;break;default:b.toSpot=aa}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=Qo;break;case 90:b.toSpot=aa;break;case 180:b.toSpot=Fa;break;default:b.toSpot=ga}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Fa;break;case 90:b.fromSpot=ga;break;case 180:b.fromSpot=Qo;break;default:b.fromSpot=aa}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}zr.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},zr.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)},Ze.Object.defineProperties(zr.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()):Ae("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 dn(zr,"PathDefault",-1),nu=new dn(zr,"PathDestination",0),jf=new dn(zr,"PathSource",1),Ud=new dn(zr,"SortingForwards",10),Pg=new dn(zr,"SortingReverse",11),Cg=new dn(zr,"SortingAscending",12),kg=new dn(zr,"SortingDescending",13),Wd=new dn(zr,"AlignmentCenterSubtrees",20),Of=new dn(zr,"AlignmentCenterChildren",21),ru=new dn(zr,"AlignmentStart",22),iu=new dn(zr,"AlignmentEnd",23),hh=new dn(zr,"AlignmentBus",24),ou=new dn(zr,"AlignmentBusBranching",25),ch=new dn(zr,"AlignmentTopLeftBus",26),Cu=new dn(zr,"AlignmentBottomRightBus",27),Fv=new dn(zr,"CompactionNone",30),Eg=new dn(zr,"CompactionBlock",31),Dv=new dn(zr,"StyleLayered",40),Fy=new dn(zr,"StyleLastParents",41),Dy=new dn(zr,"StyleAlternating",42),By=new dn(zr,"StyleRootOnly",43),Bv=new dn(zr,"ArrangementVertical",50),Iy=new dn(zr,"ArrangementHorizontal",51),Iv=new dn(zr,"ArrangementFixedRoots",52),Ry=new dn(zr,"LayerIndividual",60),_y=new dn(zr,"LayerSiblings",61),Rv=new dn(zr,"LayerUniform",62);zr.className="TreeLayout",zr.PathDefault=Ov,zr.PathDestination=nu,zr.PathSource=jf,zr.SortingForwards=Ud,zr.SortingReverse=Pg,zr.SortingAscending=Cg,zr.SortingDescending=kg,zr.AlignmentCenterSubtrees=Wd,zr.AlignmentCenterChildren=Of,zr.AlignmentStart=ru,zr.AlignmentEnd=iu,zr.AlignmentBus=hh,zr.AlignmentBusBranching=ou,zr.AlignmentTopLeftBus=ch,zr.AlignmentBottomRightBus=Cu,zr.CompactionNone=Fv,zr.CompactionBlock=Eg,zr.StyleLayered=Dv,zr.StyleLastParents=Fy,zr.StyleAlternating=Dy,zr.StyleRootOnly=By,zr.ArrangementVertical=Bv,zr.ArrangementHorizontal=Iy,zr.ArrangementFixedRoots=Iv,zr.LayerIndividual=Ry,zr.LayerSiblings=_y,zr.LayerUniform=Rv;function Ff(a){xi.call(this,a)}tn(Ff,xi),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 Me(0,0),this.Da=new Cn(0,0),this.la=new Me(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=Oo,this.wr=!0,this.Dp=Oo}tn(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)},Ze.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 Me(0,0)}tn(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:Ae("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,yt;if(a.uh(),pt||ht){for(yt=2;4<a.pointsCount;)a.pv(2);var Mt=a.i(1),zt=a.i(2)}else{for(yt=1;3<a.pointsCount;)a.pv(1);Mt=a.i(0),zt=a.i(a.pointsCount-1)}var Zt=a.i(a.pointsCount-1);et===0?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Zt.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<Zt.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(yt,Mt.x,et),yt++,a.m(yt,b.right+nt,et),yt++,a.m(yt,b.right+nt+(E.x-st)/3,et),yt++,a.m(yt,b.right+nt+2*(E.x-st)/3,et),yt++,a.m(yt,b.right+nt+(E.x-st),et),yt++,a.m(yt,zt.x,et)):(pt&&(a.m(yt,b.right+nt/2,Mt.y),yt++),a.m(yt,b.right+nt/2,et),yt++,a.m(yt,b.right+nt+E.x-(pt?st/2:st),et),yt++,pt&&a.m(yt,a.i(yt-1).x,zt.y))):et===90?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Zt.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<Zt.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(yt,et,Mt.y),yt++,a.m(yt,et,b.bottom+nt),yt++,a.m(yt,et,b.bottom+nt+(E.y-st)/3),yt++,a.m(yt,et,b.bottom+nt+2*(E.y-st)/3),yt++,a.m(yt,et,b.bottom+nt+(E.y-st)),yt++,a.m(yt,et,zt.y)):(pt&&(a.m(yt,Mt.x,b.bottom+nt/2),yt++),a.m(yt,et,b.bottom+nt/2),yt++,a.m(yt,et,b.bottom+nt+E.y-(pt?st/2:st)),yt++,pt&&a.m(yt,zt.x,a.i(yt-1).y))):et===180?(x.alignment===iu?(et=b.bottom+E.y,E.y===0&&Mt.y>Zt.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<Zt.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(yt,Mt.x,et),yt++,a.m(yt,b.left-nt,et),yt++,a.m(yt,b.left-nt+(E.x+st)/3,et),yt++,a.m(yt,b.left-nt+2*(E.x+st)/3,et),yt++,a.m(yt,b.left-nt+(E.x+st),et),yt++,a.m(yt,zt.x,et)):(pt&&(a.m(yt,b.left-nt/2,Mt.y),yt++),a.m(yt,b.left-nt/2,et),yt++,a.m(yt,b.left-nt+E.x+(pt?st/2:st),et),yt++,pt&&a.m(yt,a.i(yt-1).x,zt.y))):et===270?(x.alignment===iu?(et=b.right+E.x,E.x===0&&Mt.x>Zt.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<Zt.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(yt,et,Mt.y),yt++,a.m(yt,et,b.top-nt),yt++,a.m(yt,et,b.top-nt+(E.y+st)/3),yt++,a.m(yt,et,b.top-nt+2*(E.y+st)/3),yt++,a.m(yt,et,b.top-nt+(E.y+st)),yt++,a.m(yt,et,zt.y)):(pt&&(a.m(yt,Mt.x,b.top-nt/2),yt++),a.m(yt,et,b.top-nt/2),yt++,a.m(yt,et,b.top-nt+E.y+(pt?st/2:st)),yt++,pt&&a.m(yt,zt.x,a.i(yt-1).y))):Ae("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()))}}},Ze.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",Oi.prototype.initializeStandardTools=function(){this.gb("Action",new _s,this.mouseDownTools),this.gb("Relinking",new fs,this.mouseDownTools),this.gb("LinkReshaping",new no,this.mouseDownTools),this.gb("Rotating",new Sa,this.mouseDownTools),this.gb("Resizing",new qo,this.mouseDownTools),this.gb("Linking",new ya,this.mouseMoveTools),this.gb("Dragging",new Ri,this.mouseMoveTools),this.gb("DragSelecting",new ks,this.mouseMoveTools),this.gb("Panning",new Ko,this.mouseMoveTools),this.gb("ContextMenu",new xa,this.mouseUpTools),this.gb("TextEditing",new Ci,this.mouseUpTools),this.gb("ClickCreating",new Vu,this.mouseUpTools),this.gb("ClickSelecting",new kh,this.mouseUpTools)},Fl("Horizontal",new dm),Fl("Spot",new gm),Fl("Table",new vm),Fl("Viewbox",new xm),Fl("TableRow",new ym),Fl("TableColumn",new Sm),Fl("Graduated",new Up),Fl("Grid",new Gp),dd.add("GraphLinksModel",Ao),dd.add("TreeModel",Os);var _v=bn.go,zy={get licenseKey(){return $e.licenseKey},set licenseKey(a){$e.licenseKey=a},get version(){return $e.version},Group:br,EnumValue:dn,List:yn,Set:mn,Map:qn,Point:Me,Size:Cn,Rect:on,Margin:Br,Spot:nr,Geometry:xn,PathFigure:Po,PathSegment:ei,InputEvent:sa,DiagramEvent:Bu,ChangedEvent:Bi,Model:Vn,GraphLinksModel:Zr,TreeModel:Ta,Binding:io,Transaction:Lo,UndoManager:Ii,CommandHandler:ke,Tool:qr,DraggingTool:Ri,DraggingInfo:yu,DraggingOptions:ct,LinkingBaseTool:Yi,LinkingTool:ya,RelinkingTool:fs,LinkReshapingTool:no,ResizingTool:qo,RotatingTool:Sa,ClickSelectingTool:kh,ActionTool:_s,ClickCreatingTool:Vu,HTMLInfo:Ll,ContextMenuTool:xa,DragSelectingTool:ks,PanningTool:Ko,TextEditingTool:Ci,ToolManager:Oi,Animation:Zo,AnimationManager:ts,AnimationTrigger:nl,Layer:Fo,Diagram:$e,Palette:Et,Overview:Ot,Brush:li,GraphObject:ze,Panel:vn,RowColumnDefinition:fo,Shape:Tr,TextBlock:Si,Picture:za,Part:tr,Adornment:ti,Node:Tn,Link:wn,Placeholder:Ca,Layout:ji,LayoutNetwork:xi,LayoutVertex:So,LayoutEdge:rs,GridLayout:_o,PanelLayout:yo,CircularLayout:_i,CircularNetwork:_d,CircularVertex:mg,CircularEdge:Sv,ForceDirectedLayout:Yo,ForceDirectedNetwork:Af,ForceDirectedVertex:vg,ForceDirectedEdge:yg,LayeredDigraphLayout:hi,LayeredDigraphNetwork:Gd,LayeredDigraphVertex:Ds,LayeredDigraphEdge:wg,TreeLayout:zr,TreeNetwork:Ff,TreeVertex:Ks,TreeEdge:Hd};typeof _v=="object"&&_v.version&&jn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _v?"debug ":"")+"version: "+_v.version+", replaced with version: "+zy.version),$e.prototype.go=zy,bn.go=zy,typeof fn.exports=="object"&&(fn.exports=typeof le.g!="undefined"?le.g.go:self.go)}();var ae=typeof le.g!="undefined"?le.g.go:self.go;const Re=typeof le.g!="undefined"?le.g.go:self.go,ot=Re.Group,_t=Re.EnumValue,Bt=Re.List,vt=Re.Set,gt=Re.Map,kt=Re.Point,bt=Re.Size,St=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,Pt=Re.Binding,At=Re.Transaction,Dt=Re.UndoManager,Ft=Re.CommandHandler,jt=Re.Tool,Nt=Re.DraggingTool,Gt=Re.DraggingInfo,Wt=Re.LinkingBaseTool,Jt=Re.LinkingTool,Ut=Re.RelinkingTool,Ht=Re.LinkReshapingTool,oe=Re.ResizingTool,se=Re.RotatingTool,fe=Re.ClickSelectingTool,Pe=Re.ActionTool,Yt=Re.ClickCreatingTool,ee=Re.HTMLInfo,ye=Re.ContextMenuTool,xe=Re.DragSelectingTool,be=Re.PanningTool,ce=Re.TextEditingTool,pe=Re.ToolManager,he=Re.Animation,Ce=Re.AnimationManager,de=Re.AnimationTrigger,Fe=Re.Layer,ge=Re.Diagram,Se=Re.Palette,re=Re.Overview,Kt=Re.Brush,wt=Re.GraphObject,Lt=Re.Panel,Xt=Re.RowColumnDefinition,ne=Re.Shape,It=Re.TextBlock,Rt=Re.TextBlockMetrics,Vt=Re.Picture,$t=Re.Part,ue=Re.Adornment,me=Re.Node,Le=Re.Link,Ne=Re.Placeholder,Be=Re.Layout,Xe=Re.LayoutNetwork,Qe=Re.LayoutVertex,qe=Re.LayoutEdge,He=Re.GridLayout,Ue=Re.PanelLayout,We=Re.CircularLayout,Ke=Re.CircularNetwork,rn=Re.CircularVertex,an=Re.CircularEdge,ln=Re.ForceDirectedLayout,gn=Re.ForceDirectedNetwork,Gn=Re.ForceDirectedVertex,Zn=Re.ForceDirectedEdge,Kn=Re.LayeredDigraphLayout,Pr=Re.LayeredDigraphNetwork,pr=Re.LayeredDigraphVertex,Er=Re.LayeredDigraphEdge,Mr=Re.TreeLayout,Fr=Re.TreeNetwork,vr=Re.TreeVertex,dr=Re.TreeEdge,Ur=Re.version},24334:function(fn,cn,le){var ae,Re;(function(ot,_t){fn.exports=_t(ot)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof le.g!="undefined"?le.g:this,function(ot){"use strict";ot=ot||{};var _t=ot.Base64,Bt="2.6.4",vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=function(Ut){for(var Ht={},oe=0,se=Ut.length;oe<se;oe++)Ht[Ut.charAt(oe)]=oe;return Ht}(vt),kt=String.fromCharCode,bt=function(Ut){if(Ut.length<2){var Ht=Ut.charCodeAt(0);return Ht<128?Ut:Ht<2048?kt(192|Ht>>>6)+kt(128|Ht&63):kt(224|Ht>>>12&15)+kt(128|Ht>>>6&63)+kt(128|Ht&63)}else{var Ht=65536+(Ut.charCodeAt(0)-55296)*1024+(Ut.charCodeAt(1)-56320);return kt(240|Ht>>>18&7)+kt(128|Ht>>>12&63)+kt(128|Ht>>>6&63)+kt(128|Ht&63)}},St=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Tt=function(Ut){return Ut.replace(St,bt)},mt=function(Ut){var Ht=[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),Ht>=2?"=":vt.charAt(oe>>>6&63),Ht>=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(Ht){return Ht=="+"?"-":"_"}).replace(/=/g,"")},tt=function(Ut,Ht){return Ht?z(ft(Ut)):ft(Ut)},at=function(Ut){return tt(Ut,!0)},it;ot.Uint8Array&&(it=function(Ut,Ht){for(var oe="",se=0,fe=Ut.length;se<fe;se+=3){var Pe=Ut[se],Yt=Ut[se+1],ee=Ut[se+2],ye=Pe<<16|Yt<<8|ee;oe+=vt.charAt(ye>>>18)+vt.charAt(ye>>>12&63)+(typeof Yt!="undefined"?vt.charAt(ye>>>6&63):"=")+(typeof ee!="undefined"?vt.charAt(ye&63):"=")}return Ht?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 Ht=(7&Ut.charCodeAt(0))<<18|(63&Ut.charCodeAt(1))<<12|(63&Ut.charCodeAt(2))<<6|63&Ut.charCodeAt(3),oe=Ht-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)},Pt=function(Ut){var Ht=Ut.length,oe=Ht%4,se=(Ht>0?gt[Ut.charAt(0)]<<18:0)|(Ht>1?gt[Ut.charAt(1)]<<12:0)|(Ht>2?gt[Ut.charAt(2)]<<6:0)|(Ht>3?gt[Ut.charAt(3)]:0),fe=[kt(se>>>16),kt(se>>>8&255),kt(se&255)];return fe.length-=[0,0,2,1][oe],fe.join("")},At=ot.atob&&typeof ot.atob=="function"?function(Ut){return ot.atob(Ut)}:function(Ut){return Ut.replace(/\S{1,4}/g,Pt)},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(Ht){return Ht=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Nt=function(Ut){return Ft(jt(Ut))},Gt;ot.Uint8Array&&(Gt=function(Ut){return Uint8Array.from(Dt(jt(Ut)),function(Ht){return Ht.charCodeAt(0)})});var Wt=function(){var Ut=ot.Base64;return ot.Base64=_t,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:Gt},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),fn.exports?fn.exports.Base64=ot.Base64:(ae=[],Re=function(){return ot.Base64}.apply(cn,ae),Re!==void 0&&(fn.exports=Re)),{Base64:ot.Base64}})},2859:function(fn,cn,le){"use strict";le.d(cn,{hP:function(){return re}});var ae=function(Kt,wt){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Lt,Xt){Lt.__proto__=Xt}||function(Lt,Xt){for(var ne in Xt)Object.prototype.hasOwnProperty.call(Xt,ne)&&(Lt[ne]=Xt[ne])})(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,Xt){return new(Lt||(Lt=Promise))(function(ne,It){function Rt(ue){try{$t(Xt.next(ue))}catch(me){It(me)}}function Vt(ue){try{$t(Xt.throw(ue))}catch(me){It(me)}}function $t(ue){var me;ue.done?ne(ue.value):(me=ue.value,me instanceof Lt?me:new Lt(function(Le){Le(me)})).then(Rt,Vt)}$t((Xt=Xt.apply(Kt,wt||[])).next())})}function _t(Kt,wt){var Lt,Xt,ne,It,Rt={label:0,sent:function(){if(1&ne[0])throw ne[1];return ne[1]},trys:[],ops:[]};return It={next:Vt(0),throw:Vt(1),return:Vt(2)},typeof Symbol=="function"&&(It[Symbol.iterator]=function(){return this}),It;function Vt($t){return function(ue){return function(me){if(Lt)throw new TypeError("Generator is already executing.");for(;Rt;)try{if(Lt=1,Xt&&(ne=2&me[0]?Xt.return:me[0]?Xt.throw||((ne=Xt.return)&&ne.call(Xt),0):Xt.next)&&!(ne=ne.call(Xt,me[1])).done)return ne;switch(Xt=0,ne&&(me=[2&me[0],ne.value]),me[0]){case 0:case 1:ne=me;break;case 4:return Rt.label++,{value:me[1],done:!1};case 5:Rt.label++,Xt=me[1],me=[0];continue;case 7:me=Rt.ops.pop(),Rt.trys.pop();continue;default:if(ne=Rt.trys,!((ne=ne.length>0&&ne[ne.length-1])||me[0]!==6&&me[0]!==2)){Rt=0;continue}if(me[0]===3&&(!ne||me[1]>ne[0]&&me[1]<ne[3])){Rt.label=me[1];break}if(me[0]===6&&Rt.label<ne[1]){Rt.label=ne[1],ne=me;break}if(ne&&Rt.label<ne[2]){Rt.label=ne[2],Rt.ops.push(me);break}ne[2]&&Rt.ops.pop(),Rt.trys.pop();continue}me=wt.call(Kt,Rt)}catch(Le){me=[6,Le],Xt=0}finally{Lt=ne=0}if(5&me[0])throw me[1];return{value:me[0]?me[1]:void 0,done:!0}}([$t,ue])}}}function Bt(){for(var Kt=0,wt=0,Lt=arguments.length;wt<Lt;wt++)Kt+=arguments[wt].length;var Xt=Array(Kt),ne=0;for(wt=0;wt<Lt;wt++)for(var It=arguments[wt],Rt=0,Vt=It.length;Rt<Vt;Rt++,ne++)Xt[ne]=It[Rt];return Xt}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 Xt=0,ne=Lt;Xt<ne.length;Xt++){var It=ne[Xt],Rt=It[0],Vt=It[1];wt.setAttribute(Rt,Vt)}},Kt.createRect=function(wt,Lt,Xt){var ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return ne.setAttribute("width",wt.toString()),ne.setAttribute("height",Lt.toString()),Xt&&Kt.setAttributes(ne,Xt),ne},Kt.createLine=function(wt,Lt,Xt,ne,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",Xt.toString()),Rt.setAttribute("y2",ne.toString()),It&&Kt.setAttributes(Rt,It),Rt},Kt.createPolygon=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Xt.setAttribute("points",wt),Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt.createCircle=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Xt.setAttribute("cx",(wt/2).toString()),Xt.setAttribute("cy",(wt/2).toString()),Xt.setAttribute("r",wt.toString()),Lt&&Kt.setAttributes(Xt,Lt),Xt},Kt.createEllipse=function(wt,Lt,Xt){var ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ne.setAttribute("cx",(wt/2).toString()),ne.setAttribute("cy",(Lt/2).toString()),ne.setAttribute("rx",(wt/2).toString()),ne.setAttribute("ry",(Lt/2).toString()),Xt&&Kt.setAttributes(ne,Xt),ne},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,Xt,ne,It,Rt,Vt){var $t=document.createElementNS("http://www.w3.org/2000/svg","marker");return Kt.setAttributes($t,[["id",wt],["orient",Lt],["markerWidth",Xt.toString()],["markerHeight",ne.toString()],["refX",It.toString()],["refY",Rt.toString()]]),$t.appendChild(Vt),$t},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 Xt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Xt.textContent=wt,Lt&&Kt.setAttributes(Xt,Lt),Xt},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 Xt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Xt.x=wt,Xt.y=Lt,Xt},Kt.createPath=function(wt,Lt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","path");return Xt.setAttribute("d",wt),Lt&&Kt.setAttributes(Xt,Lt),Xt},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,Xt){var ne=this;return new Promise(function(It){var Rt=Xt!==void 0?Xt:document.createElement("canvas");wt===null&&(ne.markersOnly=!0,ne.naturalSize=!1);var Vt=document.createElementNS("http://www.w3.org/2000/svg","svg");Vt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Vt.setAttribute("width",Lt.width.baseVal.valueAsString),Vt.setAttribute("height",Lt.height.baseVal.valueAsString),Vt.setAttribute("viewBox","0 0 "+Lt.viewBox.baseVal.width.toString()+" "+Lt.viewBox.baseVal.height.toString()),Vt.innerHTML=Lt.innerHTML,ne.naturalSize===!0?(Vt.width.baseVal.value=wt.naturalWidth,Vt.height.baseVal.value=wt.naturalHeight):ne.width!==void 0&&ne.height!==void 0&&(Vt.width.baseVal.value=ne.width,Vt.height.baseVal.value=ne.height),Rt.width=Vt.width.baseVal.value,Rt.height=Vt.height.baseVal.value;var $t=Vt.outerHTML,ue=Rt.getContext("2d");ne.markersOnly!==!0&&ue.drawImage(wt,0,0,Rt.width,Rt.height);var me=window.URL,Le=new Image(Rt.width,Rt.height);Le.setAttribute("crossOrigin","anonymous");var Ne=new Blob([$t],{type:"image/svg+xml"}),Be=me.createObjectURL(Ne);Le.onload=function(){ue.drawImage(Le,0,0),me.revokeObjectURL(Be);var Xe=Rt.toDataURL(ne.imageType,ne.imageQuality);It(Xe)},Le.src=Be})},Kt}(),bt=function(){},St=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,Xt,ne,It){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=wt,this.displayMode=Lt,this.markerItems=Xt,this.uiStyleSettings=ne,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 Xt=document.createElement("div");Xt.className=this.toolbarBlockStyleClass.name,Xt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Xt),this.addActionButton(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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(Xt,'<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 ne=document.createElement("div");ne.className=this.toolbarBlockStyleClass.name,ne.style.whiteSpace="nowrap",ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ne),this.addActionButton(ne,'<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(ne,'<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,Xt){var ne=this,It=document.createElement("div");switch(It.className=""+this.toolbarButtonStyleClass.name,It.innerHTML=Lt,It.setAttribute("data-action",Xt),It.addEventListener("click",function(){ne.actionToolbarButtonClicked(It,Xt)}),Xt){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(Xt){return Xt("marker",Lt)}),this.markerButtonOverflowBlock.style.display="none"},Kt.prototype.actionToolbarButtonClicked=function(wt,Lt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xt){return Xt("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(Xt){return Xt.getAttribute("data-type-name")===wt});Lt&&this.setActiveButton(Lt)},Kt.prototype.setCurrentMarker=function(wt){var Lt=this;this.currentMarker=wt,this.buttons.filter(function(Xt){return/delete|notes/.test(Xt.getAttribute("data-action"))}).forEach(function(Xt){Lt.currentMarker===void 0?(Xt.style.fillOpacity="0.4",Xt.style.pointerEvents="none"):(Xt.style.fillOpacity="1",Xt.style.pointerEvents="all")})},Kt}(),ft=function(){function Kt(wt,Lt,Xt,ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=wt,this.displayMode=Lt,this.uiStyleSettings=Xt,this.styles=ne,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,Xt,ne=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+" "+((Xt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xt!==void 0?Xt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(It){var Rt;It.uiStyleSettings=ne.uiStyleSettings;var Vt=document.createElement("div");Vt.className=ne.toolboxButtonStyleClass.name+" "+((Rt=ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Rt!==void 0?Rt:ne.toolboxButtonStyleColorsClass.name),Vt.innerHTML=It.icon,Vt.title=It.title,Vt.addEventListener("click",function(){ne.panelButtonClick(It)}),ne.panelButtons.push(Vt),ne.buttonRow.appendChild(Vt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Kt.prototype.panelButtonClick=function(wt){var Lt=this,Xt=-1;if(wt!==this.activePanel){Xt=this.panels.indexOf(wt),this.panelRow.innerHTML="";var ne=wt.getUi();ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ne),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 Vt,$t;It.className=Lt.toolboxButtonStyleClass.name+" "+(Rt===Xt?""+((Vt=Lt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:Lt.toolboxActiveButtonStyleColorsClass.name):""+(($t=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&$t!==void 0?$t:Lt.toolboxButtonStyleColorsClass.name))})},Kt}(),z=function(Kt,wt){this.title=Kt,this.icon=wt},tt=function(Kt){function wt(Lt,Xt,ne,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=Xt,Rt.currentColor=ne,Rt.setCurrentColor=Rt.setCurrentColor.bind(Rt),Rt.getColorBox=Rt.getColorBox.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.overflow="hidden",Xt.style.whiteSpace="nowrap",this.colors.forEach(function(ne){var It=Lt.getColorBox(ne);Xt.appendChild(It),Lt.colorBoxes.push(It)}),Xt},wt.prototype.getColorBox=function(Lt){var Xt=this,ne=this.uiStyleSettings.toolbarHeight/4,It=this.uiStyleSettings.toolbarHeight-ne,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(){Xt.setCurrentColor(Lt,Rt)});var Vt=document.createElement("div");return Vt.style.display="inline-block",Vt.style.width=It-2+"px",Vt.style.height=It-2+"px",Vt.style.backgroundColor=Lt,Vt.style.borderRadius=It/2+"px",Lt==="transparent"&&(Vt.style.fill=this.uiStyleSettings.toolboxAccentColor,Vt.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(Vt),Rt},wt.prototype.setCurrentColor=function(Lt,Xt){var ne=this;this.currentColor=Lt,this.colorBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Lt)},wt}(z),at=function(){function Kt(wt,Lt,Xt){this._state="new",this._isSelected=!1,this._container=wt,this._overlayContainer=Lt,this.globalSettings=Xt,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,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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 Xt=vt.createTransform();this._visual.transform.baseVal.appendItem(Xt)},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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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 ne=this.unrotatePoint(Lt);if(this.manipulationStartX=ne.x,this.manipulationStartY=ne.y,this.offsetX=ne.x-this.left,this.offsetY=ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xt)){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 Xt=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",Xt==="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 Xt=this.unrotatePoint(Lt);this.state==="creating"?this.resize(Lt):this.state==="move"?(this.left=this.manipulationStartLeft+(Xt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xt):this.state==="rotate"&&this.rotate(Lt)},wt.prototype.resize=function(Lt){var Xt=this.manipulationStartLeft,ne=this.manipulationStartWidth,It=this.manipulationStartTop,Rt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xt=this.manipulationStartLeft+Lt.x-this.manipulationStartX,ne=this.manipulationStartWidth+this.manipulationStartLeft-Xt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ne=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}ne>=0?(this.left=Xt,this.width=ne):(this.left=Xt+ne,this.width=-ne),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 Xt=Math.sign(Lt.x-this.centerX);this.rotationAngle=180*Math.atan((Lt.y-this.centerY)/(Lt.x-this.centerX))/Math.PI+90*Xt,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 Xt=this.container.getCTM(),ne=vt.createPoint(Lt.x,Lt.y);return{x:(ne=ne.matrixTransform(Xt)).x,y:ne.y}},wt.prototype.unrotatePoint=function(Lt){if(this.rotationAngle===0)return Lt;var Xt=this.container.getCTM();Xt=Xt.inverse();var ne=vt.createPoint(Lt.x,Lt.y);return{x:(ne=ne.matrixTransform(Xt)).x,y:ne.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,Xt=-Lt/2,ne=Xt,It=(this.width+this.CB_DISTANCE)/2-Lt/2,Rt=(this.height+this.CB_DISTANCE)/2-Lt/2,Vt=this.height+this.CB_DISTANCE-Lt/2,$t=this.width+this.CB_DISTANCE-Lt/2;this.positionGrip(this.controlGrips.topLeft.visual,Xt,ne),this.positionGrip(this.controlGrips.topCenter.visual,It,ne),this.positionGrip(this.controlGrips.topRight.visual,$t,ne),this.positionGrip(this.controlGrips.centerLeft.visual,Xt,Rt),this.positionGrip(this.controlGrips.centerRight.visual,$t,Rt),this.positionGrip(this.controlGrips.bottomLeft.visual,Xt,Vt),this.positionGrip(this.controlGrips.bottomCenter.visual,It,Vt),this.positionGrip(this.controlGrips.bottomRight.visual,$t,Vt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,It,ne-3*this.CB_DISTANCE)},wt.prototype.positionGrip=function(Lt,Xt,ne){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,ne),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 Xt=Lt;this.left=Xt.left,this.top=Xt.top,this.width=Xt.width,this.height=Xt.height,this.rotationAngle=Xt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ut.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xt.containerTransformMatrix))},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt);var ne=this.rotatePoint({x:this.left,y:this.top}),It=this.unrotatePoint({x:ne.x*Lt,y:ne.y*Xt});this.left=It.x,this.top=It.y,this.width=this.width*Lt,this.height=this.height*Xt,this.adjustControlBox()},wt}(at),Pt=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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 Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.opacity=Xt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.setSize()},wt.title="Rectangle marker",wt}(dt),At=function(Kt){function wt(Lt,Xt,ne,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=Xt,Rt.currentWidth=ne,Rt.setCurrentWidth=Rt.setCurrentWidth.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.widths.forEach(function(ne){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=ne===Lt.currentWidth?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentWidth(ne,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=ne.toString(),Rt.style.marginRight="5px",It.appendChild(Rt);var Vt=document.createElement("div");Vt.style.minHeight="20px",Vt.style.flexGrow="2",Vt.style.display="flex",Vt.style.alignItems="center";var $t=document.createElement("hr");$t.style.minWidth="20px",$t.style.border="0px",$t.style.borderTop=ne+"px solid "+Lt.uiStyleSettings.toolboxColor,$t.style.flexGrow="2",Vt.appendChild($t),It.appendChild(Vt),Lt.widthBoxes.push(It)}),Xt},wt.prototype.setCurrentWidth=function(Lt,Xt){var ne=this;this.currentWidth=Lt,this.widthBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},wt}(z),Dt=function(Kt){function wt(Lt,Xt,ne,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=Xt,Rt.currentStyle=ne,Rt.setCurrentStyle=Rt.setCurrentStyle.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.styles.forEach(function(ne){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=ne===Lt.currentStyle?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentStyle(ne,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.overflow="hidden";var Vt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Lt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ne!==""?'stroke-dasharray="'+ne+'"':"")+` />
|
|
</svg>`;Rt.innerHTML=Vt,It.appendChild(Rt),Lt.styleBoxes.push(It)}),Xt},wt.prototype.setCurrentStyle=function(Lt,Xt){var ne=this;this.currentStyle=Lt,this.styleBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},wt}(z),Ft=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.strokeColor=ne.defaultColor,It.strokeWidth=ne.defaultStrokeWidth,It.strokeDasharray=ne.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ne.defaultColorSet,ne.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ne.defaultStrokeDasharrays,ne.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}(Pt),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,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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(Xt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},wt.prototype.pointerUp=function(Lt){var Xt=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",Xt==="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,Xt,ne){var It=Lt.transform.baseVal.getItem(0);It.setTranslate(Xt,ne),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 Xt=Lt;this.x1=Xt.x1,this.y1=Xt.y1,this.x2=Xt.x2,this.y2=Xt.y2},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.x1=this.x1*Lt,this.y1=this.y1*Xt,this.x2=this.x2*Lt,this.y2=this.y2*Xt,this.adjustVisual(),this.adjustControlBox()},wt}(at),Gt=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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=ne.defaultColor,It.strokeWidth=ne.defaultStrokeWidth,It.strokeDasharray=ne.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ne.defaultColorSet,ne.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ne.defaultStrokeDasharrays,ne.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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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 Xt=Lt;this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.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,Xt,ne,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=Xt,Rt.currentFont=ne,Rt.setCurrentFont=Rt.setCurrentFont.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.overflow="hidden",Xt.style.flexGrow="2",this.fonts.forEach(function(ne){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=ne===Lt.currentFont?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentFont(ne,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.style.display="flex",Rt.style.minHeight="20px",Rt.style.flexGrow="2",Rt.style.fontFamily=ne,Rt.style.overflow="hidden";var Vt=document.createElement("div");Vt.style.whiteSpace="nowrap",Vt.style.overflow="hidden",Vt.style.textOverflow="ellipsis",Vt.innerHTML="The quick brown fox jumps over the lazy dog",Rt.appendChild(Vt),It.appendChild(Rt),Lt.fontBoxes.push(It)}),Xt},wt.prototype.setCurrentFont=function(Lt,Xt){var ne=this;this.currentFont=Lt,this.fontBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},wt}(z),Jt=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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=ne.defaultColor,It.fontFamily=ne.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",ne.defaultColorSet,ne.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.fontFamilyPanel=new Wt("Font",ne.defaultFontFamilies,ne.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 Xt=!1;return this.textElement.childNodes.forEach(function(ne){ne===Lt&&(Xt=!0)}),Xt},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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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(Xt){Lt.textElement.appendChild(vt.createTSpan(Xt.trim()===""?" ":Xt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},wt.prototype.getTextScale=function(){var Lt=this.textElement.getBBox(),Xt=1;if(Lt.width>0&&Lt.height>0){var ne=(1*this.width-this.width*this.padding*2/100)/Lt.width,It=(1*this.height-this.height*this.padding*2/100)/Lt.height;Xt=Math.min(ne,It)}return Xt},wt.prototype.getTextPosition=function(Lt){var Xt=this.textElement.getBBox(),ne=0,It=0;return Xt.width>0&&Xt.height>0&&(ne=(this.width-Xt.width*Lt)/2,It=this.height/2-Xt.height*Lt/2),{x:ne,y:It}},wt.prototype.sizeText=function(){var Lt=this.textElement.getBBox(),Xt=this.getTextScale(),ne=this.getTextPosition(Xt);ne.y-=Lt.y*Xt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ne.x+"px, "+ne.y+"px) scale("+Xt+", "+Xt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ne.x,ne.y),this.textElement.transform.baseVal.getItem(1).setScale(Xt,Xt))},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 Xt=this.state;Xt==="creating"&&(this._suppressMarkerCreateEvent=!0),Kt.prototype.pointerUp.call(this,Lt),this.setSize(),(Xt==="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(Xt){Xt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xt=Number.parseFloat(Lt.textEditor.style.fontSize);Lt.textEditor.clientWidth>=Number.parseInt(Lt.textEditor.style.maxWidth)&&Xt>.9;)Xt-=.1,Lt.textEditor.style.fontSize=Math.max(Xt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xt){Xt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xt){if(Xt.clipboardData){var ne=Xt.clipboardData.getData("text"),It=window.getSelection();if(!It.rangeCount)return!1;It.deleteFromDocument(),It.getRangeAt(0).insertNode(document.createTextNode(ne)),Xt.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(),Xt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ne=this.textElement.getBBox(),It={x:ne.width*Lt,y:ne.height*Lt};Xt.x-=It.x/2,Xt.y-=It.y/2,this.textEditor.style.top=Xt.y+"px",this.textEditor.style.left=Xt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xt.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,Xt){Kt.prototype.dblClick.call(this,Lt,Xt),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 Xt=Lt;this.color=Xt.color,this.fontFamily=Xt.fontFamily,this.padding=Xt.padding,this.text=Xt.text,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),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,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.color="transparent",It.lineWidth=3,It.drawing=!1,It.pixelRatio=1,It.color=ne.defaultColor,It.lineWidth=ne.defaultStrokeWidth,It.pixelRatio=ne.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",ne.defaultColorSet,ne.defaultColor),It.colorPanel.onColorChanged=It.setColor,It.lineWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.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,Xt){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,Xt)},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),Xt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ne=Xt[0],It=Xt[1],Rt=Xt[2],Vt=Xt[3],$t=!1,ue=0;ue<this.canvasElement.height;ue++)for(var me=0;me<this.canvasElement.width;me++)Lt.data[ue*this.canvasElement.width*4+4*me+3]>0&&($t=!0,ue<It&&(It=ue),me<ne&&(ne=me),ue>Vt&&(Vt=ue),me>Rt&&(Rt=me));if($t){this.left=ne/this.pixelRatio,this.top=It/this.pixelRatio,this.width=(Rt-ne)/this.pixelRatio,this.height=(Vt-It)/this.pixelRatio;var Le=document.createElement("canvas");Le.width=Rt-ne,Le.height=Vt-It,Le.getContext("2d").putImageData(this.canvasContext.getImageData(ne,It,Rt-ne,Vt-It),0,0),this.drawingImgUrl=Le.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,Xt){Kt.prototype.scale.call(this,Lt,Xt),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),Ht=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,ne||'<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=Xt,It.setCurrentType=It.setCurrentType.bind(It),It}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2";for(var ne=function(Vt){var $t="both";switch(Vt){case 0:$t="both";break;case 1:$t="start";break;case 2:$t="end";break;case 3:$t="none"}var ue=document.createElement("div");if(ue.style.display="flex",ue.style.flexGrow="2",ue.style.alignItems="center",ue.style.justifyContent="space-between",ue.style.padding="5px",ue.style.borderWidth="2px",ue.style.borderStyle="solid",ue.style.borderColor=$t===It.currentType?It.uiStyleSettings.toolboxAccentColor:"transparent",ue.addEventListener("click",function(){Lt.setCurrentType($t,ue)}),Xt.appendChild(ue),$t==="both"||$t==="start"){var me=document.createElement("div");me.style.display="flex",me.style.alignItems="center",me.style.minHeight="20px",me.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>`,me.style.marginLeft="5px",ue.appendChild(me)}var Le=document.createElement("div");Le.style.display="flex",Le.style.alignItems="center",Le.style.minHeight="20px",Le.style.flexGrow="2";var Ne=document.createElement("hr");if(Ne.style.minWidth="20px",Ne.style.border="0px",Ne.style.borderTop="3px solid "+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee"),Ne.style.flexGrow="2",Le.appendChild(Ne),ue.appendChild(Le),$t==="both"||$t==="end"){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.minHeight="20px",Be.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(It.uiStyleSettings!==void 0?It.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Be.style.marginRight="5px",ue.appendChild(Be)}It.typeBoxes.push(ue)},It=this,Rt=0;Rt<4;Rt++)ne(Rt);return Xt},wt.prototype.setCurrentType=function(Lt,Xt){var ne=this;this.currentType=Lt,this.typeBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},wt}(z),oe=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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 Ht("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,Xt){var ne=this.arrowBaseWidth+2*this.strokeWidth,It=this.arrowBaseHeight+2*this.strokeWidth;return Lt-ne/2+","+(Xt+It/2)+" "+Lt+","+(Xt-It/2)+" "+(Lt+ne/2)+","+(Xt+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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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 Xt=this.arrow1.transform.baseVal.getItem(0);Xt.setRotate(Lt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xt,0);var ne=this.arrow2.transform.baseVal.getItem(0);ne.setRotate(Lt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ne,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 Xt=Lt;this.arrowType=Xt.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}(Gt),se=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.fillColor=ne.defaultFillColor,It.strokeWidth=0,It.fillPanel=new tt("Color",ne.defaultColorSet,ne.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}(Pt),fe=function(Kt){function wt(Lt,Xt,ne,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=Xt,Rt.currentOpacity=ne,Rt.setCurrentOpacity=Rt.setCurrentOpacity.bind(Rt),Rt}return Re(wt,Kt),wt.prototype.getUi=function(){var Lt=this,Xt=document.createElement("div");return Xt.style.display="flex",Xt.style.overflow="hidden",Xt.style.flexGrow="2",Xt.style.justifyContent="space-between",this.opacities.forEach(function(ne){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=ne===Lt.currentOpacity?Lt.uiStyleSettings.toolboxAccentColor:"transparent",It.addEventListener("click",function(){Lt.setCurrentOpacity(ne,It)}),Xt.appendChild(It);var Rt=document.createElement("div");Rt.innerText=100*ne+"%",It.appendChild(Rt),Lt.opacityBoxes.push(It)}),Xt},wt.prototype.setCurrentOpacity=function(Lt,Xt){var ne=this;this.currentOpacity=Lt,this.opacityBoxes.forEach(function(It){It.style.borderColor=It===Xt?ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},wt}(z),Pe=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.setOpacity=It.setOpacity.bind(It),It.fillColor=ne.defaultHighlightColor,It.strokeWidth=0,It.opacity=ne.defaultHighlightOpacity,It.fillPanel=new tt("Color",ne.defaultColorSet,It.fillColor),It.fillPanel.onColorChanged=It.setFillColor,It.opacityPanel=new fe("Opacity",ne.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>',ee='<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>',ye=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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=ne.defaultStrokeColor,It.bgColor=ne.defaultFillColor,It.fontFamily=ne.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",ne.defaultColorSet,It.color,Yt),It.colorPanel.onColorChanged=It.setColor,It.bgColorPanel=new tt("Fill color",ne.defaultColorSet,It.bgColor,ee),It.bgColorPanel.onColorChanged=It.setBgColor,It.fontFamilyPanel=new Wt("Font",ne.defaultFontFamilies,ne.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,Xt){this.state==="new"&&Kt.prototype.pointerDown.call(this,Lt,Xt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Kt.prototype.pointerDown.call(this,Lt,Xt)},wt.prototype.pointerUp=function(Lt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Kt.prototype.pointerUp.call(this,Lt);else{var Xt=this.state==="creating";Kt.prototype.pointerUp.call(this,Lt),this.setTipPoints(Xt),this.positionTip()}},wt.prototype.manipulate=function(Lt){if(this.tipMoving){var Xt=this.unrotatePoint(Lt);this.tipPosition={x:Xt.x-this.manipulationStartLeft,y:Xt.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 Xt=Math.min(this.height/2,15),ne=this.height/5;Lt&&(this.tipPosition={x:Xt+ne/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))?(ne=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:0},this.tipBase2Position={x:Xt+ne,y:0}):(this.tipBase1Position={x:0,y:Xt},this.tipBase2Position={x:0,y:Xt+ne}):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))?(ne=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-ne,y:0},this.tipBase2Position={x:this.width-Xt,y:0}):(this.tipBase1Position={x:this.width,y:Xt},this.tipBase2Position={x:this.width,y:Xt+ne}):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))?(ne=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xt-ne,y:this.height},this.tipBase2Position={x:this.width-Xt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xt-ne},this.tipBase2Position={x:this.width,y:this.height-Xt}):It<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ne=this.width/5,Xt=Math.min(this.width/2,15),this.tipBase1Position={x:Xt,y:this.height},this.tipBase2Position={x:Xt+ne,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xt},this.tipBase2Position={x:0,y:this.height-Xt-ne})},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 Xt=Lt;this.bgColor=Xt.bgColor,this.tipPosition=Xt.tipPosition,Kt.prototype.restoreState.call(this,Lt),this.createTip(),this.setTipPoints()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),this.tipPosition={x:this.tipPosition.x*Lt,y:this.tipPosition.y*Xt},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),xe=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.fillColor="transparent",It.strokeColor="transparent",It.strokeWidth=0,It.strokeDasharray="",It.opacity=1,It.strokeColor=ne.defaultColor,It.strokeWidth=ne.defaultStrokeWidth,It.strokeDasharray=ne.defaultStrokeDasharray,It.fillColor=ne.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(ne.defaultColorSet,["transparent"]),ne.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ne.defaultColorSet,["transparent"]),It.fillColor,ee),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.opacityPanel=new fe("Opacity",ne.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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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 Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.opacity=Xt.opacity,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),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),be=function(Kt){function wt(Lt,Xt,ne){return Kt.call(this,Lt,Xt,ne)||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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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),Xt=this.tip1.transform.baseVal.getItem(0);Xt.setRotate(Lt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xt,0);var ne=this.tip2.transform.baseVal.getItem(0);ne.setRotate(Lt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ne,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}(Gt),ce=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||this;return It.strokePanel.colors=ne.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}(xe),pe=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}(),he=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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=ne.defaultColor,It.strokeWidth=ne.defaultStrokeWidth,It.strokeDasharray=ne.defaultStrokeDasharray,It.strokePanel=new tt("Line color",ne.defaultColorSet,ne.defaultColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.strokeWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ne.defaultStrokeDasharrays,ne.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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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(Xt)&&(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,Xt){this.curveX=this.curveX*Lt,this.curveY=this.curveY*Xt,Kt.prototype.scale.call(this,Lt,Xt)},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 Xt=Lt;this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.curveX=Xt.curveX,this.curveY=Xt.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,Xt,ne){var It=Kt.call(this,Lt,Xt,ne)||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=ne.defaultColor,It.strokeWidth=ne.defaultStrokeWidth,It.strokeDasharray=ne.defaultStrokeDasharray,It.fillColor=ne.defaultFillColor,It.textColor=ne.defaultStrokeColor,It.fontFamily=ne.defaultFontFamily,It.fontSize=ne.defaultCaptionFontSize,It.captionText=ne.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(ne.defaultColorSet,["transparent"]),It.strokeColor),It.strokePanel.onColorChanged=It.setStrokeColor,It.fillPanel=new tt("Fill color",Bt(ne.defaultColorSet,["transparent"]),It.fillColor,ee),It.fillPanel.onColorChanged=It.setFillColor,It.strokeWidthPanel=new At("Line width",ne.defaultStrokeWidths,ne.defaultStrokeWidth),It.strokeWidthPanel.onWidthChanged=It.setStrokeWidth,It.strokeStylePanel=new Dt("Line style",ne.defaultStrokeDasharrays,ne.defaultStrokeDasharray),It.strokeStylePanel.onStyleChanged=It.setStrokeDasharray,It.fontFamilyPanel=new Wt("Font",ne.defaultFontFamilies,ne.defaultFontFamily),It.fontFamilyPanel.onFontChanged=It.setFont,It.textColorPanel=new tt("Text color",ne.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,Xt){Kt.prototype.pointerDown.call(this,Lt,Xt),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(Xt){Xt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xt){Xt.key==="Enter"&&Lt.finishTextEditing(Lt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xt){Xt.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,Xt){Kt.prototype.dblClick.call(this,Lt,Xt),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 Xt=Lt;this.fillColor=Xt.fillColor,this.strokeColor=Xt.strokeColor,this.strokeWidth=Xt.strokeWidth,this.strokeDasharray=Xt.strokeDasharray,this.textColor=Xt.textColor,this.fontFamily=Xt.fontFamily,this.captionText=Xt.captionText,this.fontSize=Xt.fontSize,this.createVisual(),Kt.prototype.restoreState.call(this,Lt),this.setSize()},wt.prototype.scale=function(Lt,Xt){Kt.prototype.scale.call(this,Lt,Xt),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),de=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}(),Fe=function(Kt){function wt(Lt,Xt,ne){var It=Kt.call(this,Lt,!1)||this;return It.dataUrl=Xt,It.state=ne,It}return Re(wt,Kt),wt}(de),ge=function(Kt){function wt(Lt,Xt,ne){ne===void 0&&(ne=!1);var It=Kt.call(this,Lt,ne)||this;return It.marker=Xt,It}return Re(wt,Kt),wt}(de),Se=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 Xt=this[wt].indexOf(Lt);Xt>-1&&this[wt].splice(Xt,1)},Kt}(),re=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 pe,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 Se,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Kt.instanceCounter++,this.styles=new St(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,xe,Pe,ye,be,se,Gt,he,Ce]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,xe,Pe,ye]},enumerable:!1,configurable:!0}),Object.defineProperty(Kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ft,Ut,oe,Jt,Pe]},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(Xt){if(typeof Xt=="string"){var ne=Lt.ALL_MARKER_TYPES.find(function(It){return It.typeName===Xt});ne!==void 0&&Lt._availableMarkerTypes.push(ne)}else Lt._availableMarkerTypes.push(Xt)})},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&&bt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=bt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Lt){return Lt(new de(wt))})},Kt.prototype.render=function(){return ot(this,void 0,void 0,function(){var wt;return _t(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 Xt=!1;wt||this.eventListeners.beforeclose.forEach(function(ne){var It=new de(Lt,!0);ne(It),It.defaultPrevented&&(Xt=!0)}),Xt||(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(ne){return ne(new de(Lt))}),this.detachEvents(),this._isOpen=!1)}},Kt.prototype.addMarkersToToolbar=function(){for(var wt,Lt=[],Xt=0;Xt<arguments.length;Xt++)Lt[Xt]=arguments[Xt];(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,Xt=Lt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/wt;this.resize(Lt,Xt)},Kt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Kt.prototype.resize=function(wt,Lt){this._isResizing=!0;var Xt=wt/this.imageWidth,ne=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(Xt,ne),this._isResizing=!1},Kt.prototype.scaleMarkers=function(wt,Lt){var Xt,ne=this;this._currentMarker&&this._currentMarker instanceof Jt?this._currentMarker.scale(wt,Lt):(Xt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(It){It!==ne._currentMarker&&It.scale(wt,Lt)}),Xt!==void 0&&this.setCurrentMarker(Xt)},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=[],Xt=0;Xt<arguments.length;Xt++)Lt[Xt]=arguments[Xt];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(ne){var It=new ge(wt,wt._currentMarker,!0);ne(It),It.defaultPrevented&&(Lt=!0)}),!Lt){var Xt=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(ne){return ne(new ge(wt,Xt))})}}},Kt.prototype.clear=function(){var wt=this,Lt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Rt){var Vt=new ge(wt,void 0,!0);Rt(Vt),Vt.defaultPrevented&&(Lt=!0)}),!Lt)){this.setCurrentMarker();for(var Xt=function(Rt){var Vt=ne.markers[Rt];ne.setCurrentMarker(ne.markers[Rt]),ne._currentMarker.dispose(),ne.markerImage.removeChild(ne._currentMarker.container),ne.markers.splice(ne.markers.indexOf(ne._currentMarker),1),ne.eventListeners.markerdelete.forEach(function($t){return $t(new ge(wt,Vt))})},ne=this,It=this.markers.length-1;It>=0;It--)Xt(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(),Xt=this.undoRedoManager.getLastUndoStep();if(!Xt||Xt.width===Lt.width&&Xt.height===Lt.height){var ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Lt),ne<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(It){return It(new de(wt))})}else this.undoRedoManager.replaceLastUndoStep(Lt),this.eventListeners.statechange.forEach(function(It){return It(new de(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(Xt){return Xt(new de(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(Xt){return Xt(new de(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,Xt=this;return _t(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return wt=ne.sent(),Lt=this.getState(),this.eventListeners.render.forEach(function(It){return It(new Fe(Xt,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(Xt){return Lt.markers.push(Xt.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(Xt){var ne=Lt._availableMarkerTypes.find(function(Rt){return Rt.typeName===Xt.typeName});if(ne!==void 0){var It=Lt.addNewMarker(ne);It.restoreState(Xt),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(Xt){return Xt(new de(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,Xt=this;(Lt=typeof wt=="string"?this._availableMarkerTypes.find(function(ne){return ne.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(ne){return ne(new ge(Xt,Xt._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(Xt){return Xt(new ge(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(Xt){return Xt(new ge(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(Xt){return Xt(new ge(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(Xt){return Xt(new ge(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(Xt){return Xt.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(Xt){return Xt.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 Xt=this.markerImage.getBoundingClientRect();return{x:(wt-Xt.left)/this.zoomLevel,y:(Lt-Xt.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 de(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 de(wt))}))},Kt.instanceCounter=0,Kt}()},63727:function(fn,cn,le){"use strict";le.d(cn,{s:function(){return me},default:function(){return He}});var ae=le(71409),Re=le(89490),ot=le(62730),_t=le(11036),Bt=le(39224),vt=le(37463),gt=le(6551),kt=le(6089),bt=le(18929),St=le(59301),Tt=St.createContext({}),mt=Tt,xt=le(28788),ft=le(87075),z="__rc_cascader_search_mark__",tt=function(We,Ke,rn){var an=rn.label,ln=an===void 0?"":an;return Ke.some(function(gn){return String(gn[ln]).toLowerCase().includes(We.toLowerCase())})},at=function(We,Ke,rn,an){return Ke.map(function(ln){return ln[an.label]}).join(" / ")},it=function(We,Ke,rn,an,ln,gn){var Gn=ln.filter,Zn=Gn===void 0?tt:Gn,Kn=ln.render,Pr=Kn===void 0?at:Kn,pr=ln.limit,Er=pr===void 0?50:pr,Mr=ln.sort;return St.useMemo(function(){var Fr=[];if(!We)return[];function vr(dr,Ur){var qt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;dr.forEach(function(An){if(!(!Mr&&Er!==!1&&Er>0&&Fr.length>=Er)){var Xn=[].concat((0,ot.Z)(Ur),[An]),In=An[rn.children],Un=qt||An.disabled;if((!In||In.length===0||gn)&&Zn(We,Xn,{label:rn.label})){var Wn;Fr.push((0,Re.Z)((0,Re.Z)({},An),{},(Wn={disabled:Un},(0,ft.Z)(Wn,rn.label,Pr(We,Xn,an,rn)),(0,ft.Z)(Wn,z,Xn),(0,ft.Z)(Wn,rn.children,void 0),Wn)))}In&&vr(An[rn.children],Xn,Un)}})}return vr(Ke,[]),Mr&&Fr.sort(function(dr,Ur){return Mr(dr[z],Ur[z],We,rn)}),Er!==!1&&Er>0?Fr.slice(0,Er):Fr},[We,Ke,rn,an,Pr,gn,Zn,Mr,Er])},lt=it,ut="__RC_CASCADER_SPLIT__",dt="SHOW_PARENT",Pt="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||{},Ke=We.label,rn=We.value,an=We.children,ln=rn||"value";return{label:Ke||"label",value:ln,key:ln,children:an||"children"}}function Nt(Ue,We){var Ke,rn;return(Ke=Ue.isLeaf)!==null&&Ke!==void 0?Ke:!((rn=Ue[We.children])!==null&&rn!==void 0&&rn.length)}function Gt(Ue){var We=Ue.parentElement;if(We){var Ke=Ue.offsetTop-We.offsetTop;Ke-We.scrollTop<0?We.scrollTo({top:Ke}):Ke+Ue.offsetHeight-We.scrollTop>We.offsetHeight&&We.scrollTo({top:Ke+Ue.offsetHeight-We.offsetHeight})}}function Wt(Ue,We){return Ue.map(function(Ke){var rn;return(rn=Ke[z])===null||rn===void 0?void 0:rn.map(function(an){return an[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 Ht(Ue,We,Ke){var rn=new Set(Ue),an=We();return Ue.filter(function(ln){var gn=an[ln],Gn=gn?gn.parent:null,Zn=gn?gn.children:null;return gn&&gn.node.disabled?!0:Ke===Pt?!(Zn&&Zn.some(function(Kn){return Kn.key&&rn.has(Kn.key)})):!(Gn&&!Gn.node.disabled&&rn.has(Gn.key))})}function oe(Ue,We,Ke){for(var rn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,an=We,ln=[],gn=function(){var Kn,Pr,pr,Er=Ue[Gn],Mr=(Kn=an)===null||Kn===void 0?void 0:Kn.findIndex(function(vr){var dr=vr[Ke.value];return rn?String(dr)===String(Er):dr===Er}),Fr=Mr!==-1?(Pr=an)===null||Pr===void 0?void 0:Pr[Mr]:null;ln.push({value:(pr=Fr==null?void 0:Fr[Ke.value])!==null&&pr!==void 0?pr:Er,index:Mr,option:Fr}),an=Fr==null?void 0:Fr[Ke.children]},Gn=0;Gn<Ue.length;Gn+=1)gn();return ln}var se=function(Ue,We,Ke,rn,an){return St.useMemo(function(){var ln=an||function(gn){var Gn=rn?gn.slice(-1):gn,Zn=" / ";return Gn.every(function(Kn){return["string","number"].includes((0,xt.Z)(Kn))})?Gn.join(Zn):Gn.reduce(function(Kn,Pr,pr){var Er=St.isValidElement(Pr)?St.cloneElement(Pr,{key:pr}):Pr;return pr===0?[Er]:[].concat((0,ot.Z)(Kn),[Zn,Er])},[])};return Ue.map(function(gn){var Gn,Zn=oe(gn,We,Ke),Kn=ln(Zn.map(function(pr){var Er,Mr=pr.option,Fr=pr.value;return(Er=Mr==null?void 0:Mr[Ke.label])!==null&&Er!==void 0?Er:Fr}),Zn.map(function(pr){var Er=pr.option;return Er})),Pr=At(gn);return{label:Kn,value:Pr,key:Pr,valueCells:gn,disabled:(Gn=Zn[Zn.length-1])===null||Gn===void 0||(Gn=Gn.option)===null||Gn===void 0?void 0:Gn.disabled}})},[Ue,We,Ke,an,rn])};function fe(Ue,We){return St.useCallback(function(Ke){var rn=[],an=[];return Ke.forEach(function(ln){var gn=oe(ln,Ue,We);gn.every(function(Gn){return Gn.option})?an.push(ln):rn.push(ln)}),[an,rn]},[Ue,We])}var Pe=le(34061),Yt=function(Ue,We){var Ke=St.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),rn=St.useCallback(function(){return Ke.current.options!==Ue&&(Ke.current.options=Ue,Ke.current.info=(0,Pe.I8)(Ue,{fieldNames:We,initWrapper:function(ln){return(0,Re.Z)((0,Re.Z)({},ln),{},{pathKeyEntities:{}})},processEntity:function(ln,gn){var Gn=ln.nodes.map(function(Zn){return Zn[We.value]}).join(ut);gn.pathKeyEntities[Gn]=ln,ln.key=Gn}})),Ke.current.info.pathKeyEntities},[We,Ue]);return rn};function ee(Ue,We){var Ke=St.useMemo(function(){return We||[]},[We]),rn=Yt(Ke,Ue),an=St.useCallback(function(ln){var gn=rn();return ln.map(function(Gn){var Zn=gn[Gn].nodes;return Zn.map(function(Kn){return Kn[Ue.value]})})},[rn,Ue]);return[Ke,rn,an]}var ye=le(48736);function xe(Ue){return St.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 be=le(34643);function ce(Ue,We,Ke,rn,an,ln,gn,Gn){return function(Zn){if(!Ue)We(Zn);else{var Kn=At(Zn),Pr=Dt(Ke),pr=Dt(rn),Er=Pr.includes(Kn),Mr=an.some(function(Un){return At(Un)===Kn}),Fr=Ke,vr=an;if(Mr&&!Er)vr=an.filter(function(Un){return At(Un)!==Kn});else{var dr=Er?Pr.filter(function(Un){return Un!==Kn}):[].concat((0,ot.Z)(Pr),[Kn]),Ur=ln(),qt;if(Er){var An=(0,be.S)(dr,{checked:!1,halfCheckedKeys:pr},Ur);qt=An.checkedKeys}else{var Xn=(0,be.S)(dr,!0,Ur);qt=Xn.checkedKeys}var In=Ht(qt,ln,Gn);Fr=gn(In)}We([].concat((0,ot.Z)(vr),(0,ot.Z)(Fr)))}}}function pe(Ue,We,Ke,rn,an){return St.useMemo(function(){var ln=an(We),gn=(0,_t.Z)(ln,2),Gn=gn[0],Zn=gn[1];if(!Ue||!We.length)return[Gn,[],Zn];var Kn=Dt(Gn),Pr=Ke(),pr=(0,be.S)(Kn,!0,Pr),Er=pr.checkedKeys,Mr=pr.halfCheckedKeys;return[rn(Er),rn(Mr),Zn]},[Ue,We,Ke,rn,an])}var he=le(92310),Ce=le.n(he),de=St.memo(function(Ue){var We=Ue.children;return We},function(Ue,We){return!We.open}),Fe=de;function ge(Ue){var We,Ke=Ue.prefixCls,rn=Ue.checked,an=Ue.halfChecked,ln=Ue.disabled,gn=Ue.onClick,Gn=Ue.disableCheckbox,Zn=St.useContext(mt),Kn=Zn.checkable,Pr=typeof Kn!="boolean"?Kn:null;return St.createElement("span",{className:Ce()("".concat(Ke),(We={},(0,ft.Z)(We,"".concat(Ke,"-checked"),rn),(0,ft.Z)(We,"".concat(Ke,"-indeterminate"),!rn&&an),(0,ft.Z)(We,"".concat(Ke,"-disabled"),ln||Gn),We)),onClick:gn},Pr)}var Se="__cascader_fix_label__";function re(Ue){var We=Ue.prefixCls,Ke=Ue.multiple,rn=Ue.options,an=Ue.activeValue,ln=Ue.prevValuePath,gn=Ue.onToggleOpen,Gn=Ue.onSelect,Zn=Ue.onActive,Kn=Ue.checkedSet,Pr=Ue.halfCheckedSet,pr=Ue.loadingKeys,Er=Ue.isSelectable,Mr=Ue.disabled,Fr="".concat(We,"-menu"),vr="".concat(We,"-menu-item"),dr=St.useContext(mt),Ur=dr.fieldNames,qt=dr.changeOnSelect,An=dr.expandTrigger,Xn=dr.expandIcon,In=dr.loadingIcon,Un=dr.dropdownMenuColumnStyle,Wn=dr.optionRender,ir=An==="hover",Lr=function(tn){return Mr||tn},Rr=St.useMemo(function(){return rn.map(function(Ye){var tn,Ze=Ye.disabled,zn=Ye.disableCheckbox,Qn=Ye[z],Jn=(tn=Ye[Se])!==null&&tn!==void 0?tn:Ye[Ur.label],bn=Ye[Ur.value],Fn=Nt(Ye,Ur),cr=Qn?Qn.map(function(Mn){return Mn[Ur.value]}):[].concat((0,ot.Z)(ln),[bn]),wr=At(cr),Or=pr.includes(wr),Ae=Kn.has(wr),Ve=Pr.has(wr);return{disabled:Ze,label:Jn,value:bn,isLeaf:Fn,isLoading:Or,checked:Ae,halfChecked:Ve,option:Ye,disableCheckbox:zn,fullPath:cr,fullPathKey:wr}})},[rn,Kn,Ur,Pr,pr,ln]);return St.createElement("ul",{className:Fr,role:"menu"},Rr.map(function(Ye){var tn,Ze=Ye.disabled,zn=Ye.label,Qn=Ye.value,Jn=Ye.isLeaf,bn=Ye.isLoading,Fn=Ye.checked,cr=Ye.halfChecked,wr=Ye.option,Or=Ye.fullPath,Ae=Ye.fullPathKey,Ve=Ye.disableCheckbox,Mn=function(){if(!Lr(Ze)){var Pn=(0,ot.Z)(Or);ir&&Jn&&Pn.pop(),Zn(Pn)}},jn=function(){Er(wr)&&!Lr(Ze)&&Gn(Or,Jn)},en;return typeof wr.title=="string"?en=wr.title:typeof zn=="string"&&(en=zn),St.createElement("li",{key:Ae,className:Ce()(vr,(tn={},(0,ft.Z)(tn,"".concat(vr,"-expand"),!Jn),(0,ft.Z)(tn,"".concat(vr,"-active"),an===Qn||an===Ae),(0,ft.Z)(tn,"".concat(vr,"-disabled"),Lr(Ze)),(0,ft.Z)(tn,"".concat(vr,"-loading"),bn),tn)),style:Un,role:"menuitemcheckbox",title:en,"aria-checked":Fn,"data-path-key":Ae,onClick:function(){Mn(),!Ve&&(!Ke||Jn)&&jn()},onDoubleClick:function(){qt&&gn(!1)},onMouseEnter:function(){ir&&Mn()},onMouseDown:function(Pn){Pn.preventDefault()}},Ke&&St.createElement(ge,{prefixCls:"".concat(We,"-checkbox"),checked:Fn,halfChecked:cr,disabled:Lr(Ze)||Ve,disableCheckbox:Ve,onClick:function(Pn){Ve||(Pn.stopPropagation(),jn())}}),St.createElement("div",{className:"".concat(vr,"-content")},Wn?Wn(wr):zn),!bn&&Xn&&!Jn&&St.createElement("div",{className:"".concat(vr,"-expand-icon")},Xn),bn&&In&&St.createElement("div",{className:"".concat(vr,"-loading-icon")},In))}))}var Kt=function(We,Ke){var rn=St.useContext(mt),an=rn.values,ln=an[0],gn=St.useState([]),Gn=(0,_t.Z)(gn,2),Zn=Gn[0],Kn=Gn[1];return St.useEffect(function(){We||Kn(ln||[])},[Ke,ln]),[Zn,Kn]},wt=Kt,Lt=le(10228),Xt=function(Ue,We,Ke,rn,an,ln,gn){var Gn=gn.direction,Zn=gn.searchValue,Kn=gn.toggleOpen,Pr=gn.open,pr=Gn==="rtl",Er=St.useMemo(function(){for(var Un=-1,Wn=We,ir=[],Lr=[],Rr=rn.length,Ye=Wt(We,Ke),tn=function(bn){var Fn=Wn.findIndex(function(cr,wr){return(Ye[wr]?At(Ye[wr]):cr[Ke.value])===rn[bn]});if(Fn===-1)return 1;Un=Fn,ir.push(Un),Lr.push(rn[bn]),Wn=Wn[Un][Ke.children]},Ze=0;Ze<Rr&&Wn&&!tn(Ze);Ze+=1);for(var zn=We,Qn=0;Qn<ir.length-1;Qn+=1)zn=zn[ir[Qn]][Ke.children];return[Lr,Un,zn,Ye]},[rn,Ke,We]),Mr=(0,_t.Z)(Er,4),Fr=Mr[0],vr=Mr[1],dr=Mr[2],Ur=Mr[3],qt=function(Wn){an(Wn)},An=function(Wn){var ir=dr.length,Lr=vr;Lr===-1&&Wn<0&&(Lr=ir);for(var Rr=0;Rr<ir;Rr+=1){Lr=(Lr+Wn+ir)%ir;var Ye=dr[Lr];if(Ye&&!Ye.disabled){var tn=Fr.slice(0,-1).concat(Ur[Lr]?At(Ur[Lr]):Ye[Ke.value]);qt(tn);return}}},Xn=function(){if(Fr.length>1){var Wn=Fr.slice(0,-1);qt(Wn)}else Kn(!1)},In=function(){var Wn,ir=((Wn=dr[vr])===null||Wn===void 0?void 0:Wn[Ke.children])||[],Lr=ir.find(function(Ye){return!Ye.disabled});if(Lr){var Rr=[].concat((0,ot.Z)(Fr),[Lr[Ke.value]]);qt(Rr)}};St.useImperativeHandle(Ue,function(){return{onKeyDown:function(Wn){var ir=Wn.which;switch(ir){case Lt.Z.UP:case Lt.Z.DOWN:{var Lr=0;ir===Lt.Z.UP?Lr=-1:ir===Lt.Z.DOWN&&(Lr=1),Lr!==0&&An(Lr);break}case Lt.Z.LEFT:{if(Zn)break;pr?In():Xn();break}case Lt.Z.RIGHT:{if(Zn)break;pr?Xn():In();break}case Lt.Z.BACKSPACE:{Zn||Xn();break}case Lt.Z.ENTER:{if(Fr.length){var Rr=dr[vr],Ye=(Rr==null?void 0:Rr[z])||[];Ye.length?ln(Ye.map(function(tn){return tn[Ke.value]}),Ye[Ye.length-1]):ln(Fr,dr[vr])}break}case Lt.Z.ESC:Kn(!1),Pr&&Wn.stopPropagation()}},onKeyUp:function(){}}})},ne=St.forwardRef(function(Ue,We){var Ke,rn,an,ln=Ue.prefixCls,gn=Ue.multiple,Gn=Ue.searchValue,Zn=Ue.toggleOpen,Kn=Ue.notFoundContent,Pr=Ue.direction,pr=Ue.open,Er=Ue.disabled,Mr=St.useRef(null),Fr=Pr==="rtl",vr=St.useContext(mt),dr=vr.options,Ur=vr.values,qt=vr.halfValues,An=vr.fieldNames,Xn=vr.changeOnSelect,In=vr.onSelect,Un=vr.searchOptions,Wn=vr.dropdownPrefixCls,ir=vr.loadData,Lr=vr.expandTrigger,Rr=Wn||ln,Ye=St.useState([]),tn=(0,_t.Z)(Ye,2),Ze=tn[0],zn=tn[1],Qn=function(gr){if(!(!ir||Gn)){var ar=oe(gr,dr,An),lr=ar.map(function(Xr){var mi=Xr.option;return mi}),sn=lr[lr.length-1];if(sn&&!Nt(sn,An)){var Kr=At(gr);zn(function(Xr){return[].concat((0,ot.Z)(Xr),[Kr])}),ir(lr)}}};St.useEffect(function(){Ze.length&&Ze.forEach(function(Bn){var gr=Ft(Bn),ar=oe(gr,dr,An,!0).map(function(sn){var Kr=sn.option;return Kr}),lr=ar[ar.length-1];(!lr||lr[An.children]||Nt(lr,An))&&zn(function(sn){return sn.filter(function(Kr){return Kr!==Bn})})})},[dr,Ze,An]);var Jn=St.useMemo(function(){return new Set(Dt(Ur))},[Ur]),bn=St.useMemo(function(){return new Set(Dt(qt))},[qt]),Fn=wt(gn,pr),cr=(0,_t.Z)(Fn,2),wr=cr[0],Or=cr[1],Ae=function(gr){Or(gr),Qn(gr)},Ve=function(gr){if(Er)return!1;var ar=gr.disabled,lr=Nt(gr,An);return!ar&&(lr||Xn||gn)},Mn=function(gr,ar){var lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;In(gr),!gn&&(ar||Xn&&(Lr==="hover"||lr))&&Zn(!1)},jn=St.useMemo(function(){return Gn?Un:dr},[Gn,Un,dr]),en=St.useMemo(function(){for(var Bn=[{options:jn}],gr=jn,ar=Wt(gr,An),lr=function(){var Xr=wr[sn],mi=gr.find(function(On,rr){return(ar[rr]?At(ar[rr]):On[An.value])===Xr}),dn=mi==null?void 0:mi[An.children];if(!(dn!=null&&dn.length))return 1;gr=dn,Bn.push({options:dn})},sn=0;sn<wr.length&&!lr();sn+=1);return Bn},[jn,wr,An]),kn=function(gr,ar){Ve(ar)&&Mn(gr,Nt(ar,An),!0)};Xt(We,jn,An,wr,Ae,kn,{direction:Pr,searchValue:Gn,toggleOpen:Zn,open:pr}),St.useEffect(function(){if(!Gn)for(var Bn=0;Bn<wr.length;Bn+=1){var gr,ar=wr.slice(0,Bn+1),lr=At(ar),sn=(gr=Mr.current)===null||gr===void 0?void 0:gr.querySelector('li[data-path-key="'.concat(lr.replace(/\\{0,2}"/g,'\\"'),'"]'));sn&&Gt(sn)}},[wr,Gn]);var Pn=!((Ke=en[0])!==null&&Ke!==void 0&&(Ke=Ke.options)!==null&&Ke!==void 0&&Ke.length),Ln=[(rn={},(0,ft.Z)(rn,An.value,"__EMPTY__"),(0,ft.Z)(rn,Se,Kn),(0,ft.Z)(rn,"disabled",!0),rn)],$n=(0,Re.Z)((0,Re.Z)({},Ue),{},{multiple:!Pn&&gn,onSelect:Mn,onActive:Ae,onToggleOpen:Zn,checkedSet:Jn,halfCheckedSet:bn,loadingKeys:Ze,isSelectable:Ve}),Nn=Pn?[{options:Ln}]:en,Rn=Nn.map(function(Bn,gr){var ar=wr.slice(0,gr),lr=wr[gr];return St.createElement(re,(0,ae.Z)({key:gr},$n,{prefixCls:Rr,options:Bn.options,prevValuePath:ar,activeValue:lr}))});return St.createElement(Fe,{open:pr},St.createElement("div",{className:Ce()("".concat(Rr,"-menus"),(an={},(0,ft.Z)(an,"".concat(Rr,"-menu-empty"),Pn),(0,ft.Z)(an,"".concat(Rr,"-rtl"),Fr),an)),ref:Mr},Rn))}),It=ne,Rt=St.forwardRef(function(Ue,We){var Ke=(0,vt.lk)();return St.createElement(It,(0,ae.Z)({},Ue,Ke,{ref:We}))}),Vt=Rt,$t=le(70425);function ue(){}function me(Ue){var We,Ke=Ue,rn=Ke.prefixCls,an=rn===void 0?"rc-cascader":rn,ln=Ke.style,gn=Ke.className,Gn=Ke.options,Zn=Ke.checkable,Kn=Ke.defaultValue,Pr=Ke.value,pr=Ke.fieldNames,Er=Ke.changeOnSelect,Mr=Ke.onChange,Fr=Ke.showCheckedStrategy,vr=Ke.loadData,dr=Ke.expandTrigger,Ur=Ke.expandIcon,qt=Ur===void 0?">":Ur,An=Ke.loadingIcon,Xn=Ke.direction,In=Ke.notFoundContent,Un=In===void 0?"Not Found":In,Wn=Ke.disabled,ir=!!Zn,Lr=(0,$t.C8)(Kn,{value:Pr,postState:Ut}),Rr=(0,_t.Z)(Lr,2),Ye=Rr[0],tn=Rr[1],Ze=St.useMemo(function(){return jt(pr)},[JSON.stringify(pr)]),zn=ee(Ze,Gn),Qn=(0,_t.Z)(zn,3),Jn=Qn[0],bn=Qn[1],Fn=Qn[2],cr=fe(Jn,Ze),wr=pe(ir,Ye,bn,Fn,cr),Or=(0,_t.Z)(wr,3),Ae=Or[0],Ve=Or[1],Mn=Or[2],jn=(0,$t.zX)(function(Nn){if(tn(Nn),Mr){var Rn=Ut(Nn),Bn=Rn.map(function(lr){return oe(lr,Jn,Ze).map(function(sn){return sn.option})}),gr=ir?Rn:Rn[0],ar=ir?Bn:Bn[0];Mr(gr,ar)}}),en=ce(ir,jn,Ae,Ve,Mn,bn,Fn,Fr),kn=(0,$t.zX)(function(Nn){en(Nn)}),Pn=St.useMemo(function(){return{options:Jn,fieldNames:Ze,values:Ae,halfValues:Ve,changeOnSelect:Er,onSelect:kn,checkable:Zn,searchOptions:[],dropdownPrefixCls:void 0,loadData:vr,expandTrigger:dr,expandIcon:qt,loadingIcon:An,dropdownMenuColumnStyle:void 0}},[Jn,Ze,Ae,Ve,Er,kn,Zn,vr,dr,qt,An]),Ln="".concat(an,"-panel"),$n=!Jn.length;return St.createElement(mt.Provider,{value:Pn},St.createElement("div",{className:Ce()(Ln,(We={},(0,ft.Z)(We,"".concat(Ln,"-rtl"),Xn==="rtl"),(0,ft.Z)(We,"".concat(Ln,"-empty"),$n),We),gn),style:ln},$n?Un:St.createElement(It,{prefixCls:an,searchValue:"",multiple:ir,toggleOpen:ue,open:!0,direction:Xn,disabled:Wn})))}function Le(Ue){var We=Ue.onPopupVisibleChange,Ke=Ue.popupVisible,rn=Ue.popupClassName,an=Ue.popupPlacement;warning(!We,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Ke===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(rn===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(an===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ne(Ue,We){if(Ue){var Ke=function rn(an){for(var ln=0;ln<an.length;ln++){var gn=an[ln];if(gn[We==null?void 0:We.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(gn[We==null?void 0:We.children])&&rn(gn[We==null?void 0:We.children]))return!0}};Ke(Ue)}}var Be=null,Xe=["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=St.forwardRef(function(Ue,We){var Ke=Ue.id,rn=Ue.prefixCls,an=rn===void 0?"rc-cascader":rn,ln=Ue.fieldNames,gn=Ue.defaultValue,Gn=Ue.value,Zn=Ue.changeOnSelect,Kn=Ue.onChange,Pr=Ue.displayRender,pr=Ue.checkable,Er=Ue.autoClearSearchValue,Mr=Er===void 0?!0:Er,Fr=Ue.searchValue,vr=Ue.onSearch,dr=Ue.showSearch,Ur=Ue.expandTrigger,qt=Ue.options,An=Ue.dropdownPrefixCls,Xn=Ue.loadData,In=Ue.popupVisible,Un=Ue.open,Wn=Ue.popupClassName,ir=Ue.dropdownClassName,Lr=Ue.dropdownMenuColumnStyle,Rr=Ue.dropdownStyle,Ye=Ue.popupPlacement,tn=Ue.placement,Ze=Ue.onDropdownVisibleChange,zn=Ue.onPopupVisibleChange,Qn=Ue.expandIcon,Jn=Qn===void 0?">":Qn,bn=Ue.loadingIcon,Fn=Ue.children,cr=Ue.dropdownMatchSelectWidth,wr=cr===void 0?!1:cr,Or=Ue.showCheckedStrategy,Ae=Or===void 0?dt:Or,Ve=Ue.optionRender,Mn=(0,Bt.Z)(Ue,Xe),jn=(0,gt.ZP)(Ke),en=!!pr,kn=(0,bt.Z)(gn,{value:Gn,postState:Ut}),Pn=(0,_t.Z)(kn,2),Ln=Pn[0],$n=Pn[1],Nn=St.useMemo(function(){return jt(ln)},[JSON.stringify(ln)]),Rn=ee(Nn,qt),Bn=(0,_t.Z)(Rn,3),gr=Bn[0],ar=Bn[1],lr=Bn[2],sn=(0,bt.Z)("",{value:Fr,postState:function(Qi){return Qi||""}}),Kr=(0,_t.Z)(sn,2),Xr=Kr[0],mi=Kr[1],dn=function(Qi,Xi){mi(Qi),Xi.source!=="blur"&&vr&&vr(Qi)},On=xe(dr),rr=(0,_t.Z)(On,2),er=rr[0],hr=rr[1],Dr=lt(Xr,gr,Nn,An||an,hr,Zn||en),Gr=fe(gr,Nn),Jr=pe(en,Ln,ar,lr,Gr),$r=(0,_t.Z)(Jr,3),ii=$r[0],yn=$r[1],di=$r[2],mn=St.useMemo(function(){var Ui=Dt(ii),Qi=Ht(Ui,ar,Ae);return[].concat((0,ot.Z)(di),(0,ot.Z)(lr(Qi)))},[ii,ar,lr,di,Ae]),oi=se(mn,gr,Nn,en,Pr),Gi=(0,kt.Z)(function(Ui){if($n(Ui),Kn){var Qi=Ut(Ui),Xi=Qi.map(function(yr){return oe(yr,gr,Nn).map(function(Qr){return Qr.option})}),pi=en?Qi:Qi[0],sr=en?Xi:Xi[0];Kn(pi,sr)}}),bi=ce(en,Gi,ii,yn,di,ar,lr,Ae),Ai=(0,kt.Z)(function(Ui){(!en||Mr)&&mi(""),bi(Ui)}),ai=function(Qi,Xi){if(Xi.type==="clear"){Gi([]);return}var pi=Xi.values[0],sr=pi.valueCells;Ai(sr)},_r=Un!==void 0?Un:In,vi=ir||Wn,xo=tn||Ye,Fi=function(Qi){Ze==null||Ze(Qi),zn==null||zn(Qi)},qn=St.useMemo(function(){return{options:gr,fieldNames:Nn,values:ii,halfValues:yn,changeOnSelect:Zn,onSelect:Ai,checkable:pr,searchOptions:Dr,dropdownPrefixCls:An,loadData:Xn,expandTrigger:Ur,expandIcon:Jn,loadingIcon:bn,dropdownMenuColumnStyle:Lr,optionRender:Ve}},[gr,Nn,ii,yn,Zn,Ai,pr,Dr,An,Xn,Ur,Jn,bn,Lr,Ve]),Me=!(Xr?Dr:gr).length,zi=Xr&&hr.matchInputWidth||Me?{}:{minWidth:"auto"};return St.createElement(mt.Provider,{value:qn},St.createElement(vt.Ac,(0,ae.Z)({},Mn,{ref:We,id:jn,prefixCls:an,autoClearSearchValue:Mr,dropdownMatchSelectWidth:wr,dropdownStyle:(0,Re.Z)((0,Re.Z)({},zi),Rr),displayValues:oi,onDisplayValuesChange:ai,mode:en?"multiple":void 0,searchValue:Xr,onSearch:dn,showSearch:er,OptionList:Vt,emptyOptions:Me,open:_r,dropdownClassName:vi,placement:xo,onDropdownVisibleChange:Fi,getRawInputElement:function(){return Fn}})))});Qe.SHOW_PARENT=dt,Qe.SHOW_CHILD=Pt,Qe.Panel=me;var qe=Qe,He=qe},98535:function(fn,cn,le){"use strict";le.r(cn),le.d(cn,{Panel:function(){return Ut},default:function(){return Jt}});var ae=le(71409),Re=le(62730),ot=le(11036),_t=le(28788),Bt=le(92310),vt=le.n(Bt),gt=le(18929),kt=le(48736),bt=le(59301),St=le(39224),Tt=le(11592),mt=le(89490),xt=le(87075),ft=le(77900),z=le(10228),tt=bt.forwardRef(function(Ht,oe){var se=Ht.prefixCls,fe=Ht.forceRender,Pe=Ht.className,Yt=Ht.style,ee=Ht.children,ye=Ht.isActive,xe=Ht.role,be=Ht.classNames,ce=Ht.styles,pe=bt.useState(ye||fe),he=(0,ot.Z)(pe,2),Ce=he[0],de=he[1];return bt.useEffect(function(){(fe||ye)&&de(!0)},[fe,ye]),Ce?bt.createElement("div",{ref:oe,className:vt()("".concat(se,"-content"),(0,xt.Z)((0,xt.Z)({},"".concat(se,"-content-active"),ye),"".concat(se,"-content-inactive"),!ye),Pe),style:Yt,role:xe},bt.createElement("div",{className:vt()("".concat(se,"-content-box"),be==null?void 0:be.body),style:ce==null?void 0:ce.body},ee)):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=bt.forwardRef(function(Ht,oe){var se=Ht.showArrow,fe=se===void 0?!0:se,Pe=Ht.headerClass,Yt=Ht.isActive,ee=Ht.onItemClick,ye=Ht.forceRender,xe=Ht.className,be=Ht.classNames,ce=be===void 0?{}:be,pe=Ht.styles,he=pe===void 0?{}:pe,Ce=Ht.prefixCls,de=Ht.collapsible,Fe=Ht.accordion,ge=Ht.panelKey,Se=Ht.extra,re=Ht.header,Kt=Ht.expandIcon,wt=Ht.openMotion,Lt=Ht.destroyInactivePanel,Xt=Ht.children,ne=(0,St.Z)(Ht,it),It=de==="disabled",Rt=Se!=null&&typeof Se!="boolean",Vt=(0,xt.Z)((0,xt.Z)((0,xt.Z)({onClick:function(){ee==null||ee(ge)},onKeyDown:function(Xe){(Xe.key==="Enter"||Xe.keyCode===z.Z.ENTER||Xe.which===z.Z.ENTER)&&(ee==null||ee(ge))},role:Fe?"tab":"button"},"aria-expanded",Yt),"aria-disabled",It),"tabIndex",It?-1:0),$t=typeof Kt=="function"?Kt(Ht):bt.createElement("i",{className:"arrow"}),ue=$t&&bt.createElement("div",(0,ae.Z)({className:"".concat(Ce,"-expand-icon")},["header","icon"].includes(de)?Vt:{}),$t),me=vt()("".concat(Ce,"-item"),(0,xt.Z)((0,xt.Z)({},"".concat(Ce,"-item-active"),Yt),"".concat(Ce,"-item-disabled"),It),xe),Le=vt()(Pe,"".concat(Ce,"-header"),(0,xt.Z)({},"".concat(Ce,"-collapsible-").concat(de),!!de),ce.header),Ne=(0,mt.Z)({className:Le,style:he.header},["header","icon"].includes(de)?{}:Vt);return bt.createElement("div",(0,ae.Z)({},ne,{ref:oe,className:me}),bt.createElement("div",Ne,fe&&ue,bt.createElement("span",(0,ae.Z)({className:"".concat(Ce,"-header-text")},de==="header"?Vt:{}),re),Rt&&bt.createElement("div",{className:"".concat(Ce,"-extra")},Se)),bt.createElement(ft.default,(0,ae.Z)({visible:Yt,leavedClassName:"".concat(Ce,"-content-hidden")},wt,{forceRender:ye,removeOnLeave:Lt}),function(Be,Xe){var Qe=Be.className,qe=Be.style;return bt.createElement(at,{ref:Xe,prefixCls:Ce,className:Qe,classNames:ce,style:qe,styles:he,isActive:Yt,forceRender:ye,role:Fe?"tabpanel":void 0},Xt)}))}),ut=lt,dt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pt=function(oe,se){var fe=se.prefixCls,Pe=se.accordion,Yt=se.collapsible,ee=se.destroyInactivePanel,ye=se.onItemClick,xe=se.activeKey,be=se.openMotion,ce=se.expandIcon;return oe.map(function(pe,he){var Ce=pe.children,de=pe.label,Fe=pe.key,ge=pe.collapsible,Se=pe.onItemClick,re=pe.destroyInactivePanel,Kt=(0,St.Z)(pe,dt),wt=String(Fe!=null?Fe:he),Lt=ge!=null?ge:Yt,Xt=re!=null?re:ee,ne=function(Vt){Lt!=="disabled"&&(ye(Vt),Se==null||Se(Vt))},It=!1;return Pe?It=xe[0]===wt:It=xe.indexOf(wt)>-1,bt.createElement(ut,(0,ae.Z)({},Kt,{prefixCls:fe,key:wt,panelKey:wt,isActive:It,accordion:Pe,openMotion:be,expandIcon:ce,header:de,collapsible:Lt,onItemClick:ne,destroyInactivePanel:Xt}),Ce)})},At=function(oe,se,fe){if(!oe)return null;var Pe=fe.prefixCls,Yt=fe.accordion,ee=fe.collapsible,ye=fe.destroyInactivePanel,xe=fe.onItemClick,be=fe.activeKey,ce=fe.openMotion,pe=fe.expandIcon,he=oe.key||String(se),Ce=oe.props,de=Ce.header,Fe=Ce.headerClass,ge=Ce.destroyInactivePanel,Se=Ce.collapsible,re=Ce.onItemClick,Kt=!1;Yt?Kt=be[0]===he:Kt=be.indexOf(he)>-1;var wt=Se!=null?Se:ee,Lt=function(It){wt!=="disabled"&&(xe(It),re==null||re(It))},Xt={key:he,panelKey:he,header:de,headerClass:Fe,isActive:Kt,prefixCls:Pe,destroyInactivePanel:ge!=null?ge:ye,openMotion:ce,accordion:Yt,children:oe.props.children,onItemClick:Lt,expandIcon:pe,collapsible:wt};return typeof oe.type=="string"?oe:(Object.keys(Xt).forEach(function(ne){typeof Xt[ne]=="undefined"&&delete Xt[ne]}),bt.cloneElement(oe,Xt))};function Dt(Ht,oe,se){return Array.isArray(Ht)?Pt(Ht,se):(0,Tt.Z)(oe).map(function(fe,Pe){return At(fe,Pe,se)})}var Ft=Dt,jt=le(26112);function Nt(Ht){var oe=Ht;if(!Array.isArray(oe)){var se=(0,_t.Z)(oe);oe=se==="number"||se==="string"?[oe]:[]}return oe.map(function(fe){return String(fe)})}var Gt=bt.forwardRef(function(Ht,oe){var se=Ht.prefixCls,fe=se===void 0?"rc-collapse":se,Pe=Ht.destroyInactivePanel,Yt=Pe===void 0?!1:Pe,ee=Ht.style,ye=Ht.accordion,xe=Ht.className,be=Ht.children,ce=Ht.collapsible,pe=Ht.openMotion,he=Ht.expandIcon,Ce=Ht.activeKey,de=Ht.defaultActiveKey,Fe=Ht.onChange,ge=Ht.items,Se=vt()(fe,xe),re=(0,gt.Z)([],{value:Ce,onChange:function(Rt){return Fe==null?void 0:Fe(Rt)},defaultValue:de,postState:Nt}),Kt=(0,ot.Z)(re,2),wt=Kt[0],Lt=Kt[1],Xt=function(Rt){return Lt(function(){if(ye)return wt[0]===Rt?[]:[Rt];var Vt=wt.indexOf(Rt),$t=Vt>-1;return $t?wt.filter(function(ue){return ue!==Rt}):[].concat((0,Re.Z)(wt),[Rt])})};(0,kt.ZP)(!be,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var ne=Ft(ge,be,{prefixCls:fe,accordion:ye,openMotion:pe,expandIcon:he,collapsible:ce,destroyInactivePanel:Yt,onItemClick:Xt,activeKey:wt});return bt.createElement("div",(0,ae.Z)({ref:oe,className:Se,style:ee,role:ye?"tablist":void 0},(0,jt.Z)(Ht,{aria:!0,data:!0})),ne)}),Wt=Object.assign(Gt,{Panel:ut}),Jt=Wt,Ut=Wt.Panel},66042:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return Jt}});var ae=le(89490),Re=le(11036),ot=le(43403),_t=le(34280),Bt=le(59301),vt=Bt.createContext(null),gt=Bt.createContext({}),kt=vt,bt=le(87075),St=le(71409),Tt=le(92310),mt=le.n(Tt),xt=le(77900),ft=le(10228),z=le(26112),tt=le(39224),at=le(8654),it=["prefixCls","className","containerRef"],lt=function(Ht){var oe=Ht.prefixCls,se=Ht.className,fe=Ht.containerRef,Pe=(0,tt.Z)(Ht,it),Yt=Bt.useContext(gt),ee=Yt.panel,ye=(0,at.x1)(ee,fe);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(oe,"-content"),se),role:"dialog",ref:ye},(0,z.Z)(Ht,{aria:!0}),{"aria-modal":"true"},Pe))},ut=lt,dt=le(48736);function Pt(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,Ht){var oe,se,fe,Pe=Ut.prefixCls,Yt=Ut.open,ee=Ut.placement,ye=Ut.inline,xe=Ut.push,be=Ut.forceRender,ce=Ut.autoFocus,pe=Ut.keyboard,he=Ut.classNames,Ce=Ut.rootClassName,de=Ut.rootStyle,Fe=Ut.zIndex,ge=Ut.className,Se=Ut.id,re=Ut.style,Kt=Ut.motion,wt=Ut.width,Lt=Ut.height,Xt=Ut.children,ne=Ut.mask,It=Ut.maskClosable,Rt=Ut.maskMotion,Vt=Ut.maskClassName,$t=Ut.maskStyle,ue=Ut.afterOpenChange,me=Ut.onClose,Le=Ut.onMouseEnter,Ne=Ut.onMouseOver,Be=Ut.onMouseLeave,Xe=Ut.onClick,Qe=Ut.onKeyDown,qe=Ut.onKeyUp,He=Ut.styles,Ue=Ut.drawerRender,We=Bt.useRef(),Ke=Bt.useRef(),rn=Bt.useRef();Bt.useImperativeHandle(Ht,function(){return We.current});var an=function(Xn){var In=Xn.keyCode,Un=Xn.shiftKey;switch(In){case ft.Z.TAB:{if(In===ft.Z.TAB){if(!Un&&document.activeElement===rn.current){var Wn;(Wn=Ke.current)===null||Wn===void 0||Wn.focus({preventScroll:!0})}else if(Un&&document.activeElement===Ke.current){var ir;(ir=rn.current)===null||ir===void 0||ir.focus({preventScroll:!0})}}break}case ft.Z.ESC:{me&&pe&&(Xn.stopPropagation(),me(Xn));break}}};Bt.useEffect(function(){if(Yt&&ce){var An;(An=We.current)===null||An===void 0||An.focus({preventScroll:!0})}},[Yt]);var ln=Bt.useState(!1),gn=(0,Re.Z)(ln,2),Gn=gn[0],Zn=gn[1],Kn=Bt.useContext(kt),Pr;typeof xe=="boolean"?Pr=xe?{}:{distance:0}:Pr=xe||{};var pr=(oe=(se=(fe=Pr)===null||fe===void 0?void 0:fe.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(){Zn(!0)},pull:function(){Zn(!1)}}},[pr]);Bt.useEffect(function(){if(Yt){var An;Kn==null||(An=Kn.push)===null||An===void 0||An.call(Kn)}else{var Xn;Kn==null||(Xn=Kn.pull)===null||Xn===void 0||Xn.call(Kn)}},[Yt]),Bt.useEffect(function(){return function(){var An;Kn==null||(An=Kn.pull)===null||An===void 0||An.call(Kn)}},[]);var Mr=ne&&Bt.createElement(xt.default,(0,St.Z)({key:"mask"},Rt,{visible:Yt}),function(An,Xn){var In=An.className,Un=An.style;return Bt.createElement("div",{className:mt()("".concat(Pe,"-mask"),In,he==null?void 0:he.mask,Vt),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},Un),$t),He==null?void 0:He.mask),onClick:It&&Yt?me:void 0,ref:Xn})}),Fr=typeof Kt=="function"?Kt(ee):Kt,vr={};if(Gn&&pr)switch(ee){case"top":vr.transform="translateY(".concat(pr,"px)");break;case"bottom":vr.transform="translateY(".concat(-pr,"px)");break;case"left":vr.transform="translateX(".concat(pr,"px)");break;default:vr.transform="translateX(".concat(-pr,"px)");break}ee==="left"||ee==="right"?vr.width=Pt(wt):vr.height=Pt(Lt);var dr={onMouseEnter:Le,onMouseOver:Ne,onMouseLeave:Be,onClick:Xe,onKeyDown:Qe,onKeyUp:qe},Ur=Bt.createElement(xt.default,(0,St.Z)({key:"panel"},Fr,{visible:Yt,forceRender:be,onVisibleChanged:function(Xn){ue==null||ue(Xn)},removeOnLeave:!1,leavedClassName:"".concat(Pe,"-content-wrapper-hidden")}),function(An,Xn){var In=An.className,Un=An.style,Wn=Bt.createElement(ut,(0,St.Z)({id:Se,containerRef:Xn,prefixCls:Pe,className:mt()(ge,he==null?void 0:he.content),style:(0,ae.Z)((0,ae.Z)({},re),He==null?void 0:He.content)},(0,z.Z)(Ut,{aria:!0}),dr),Xt);return Bt.createElement("div",(0,St.Z)({className:mt()("".concat(Pe,"-content-wrapper"),he==null?void 0:he.wrapper,In),style:(0,ae.Z)((0,ae.Z)((0,ae.Z)({},vr),Un),He==null?void 0:He.wrapper)},(0,z.Z)(Ut,{data:!0})),Ue?Ue(Wn):Wn)}),qt=(0,ae.Z)({},de);return Fe&&(qt.zIndex=Fe),Bt.createElement(kt.Provider,{value:Er},Bt.createElement("div",{className:mt()(Pe,"".concat(Pe,"-").concat(ee),Ce,(0,bt.Z)((0,bt.Z)({},"".concat(Pe,"-open"),Yt),"".concat(Pe,"-inline"),ye)),style:qt,tabIndex:-1,ref:We,onKeyDown:an},Mr,Bt.createElement("div",{tabIndex:0,ref:Ke,style:Dt,"aria-hidden":"true","data-sentinel":"start"}),Ur,Bt.createElement("div",{tabIndex:0,ref:rn,style:Dt,"aria-hidden":"true","data-sentinel":"end"})))}var jt=Bt.forwardRef(Ft),Nt=jt,Gt=function(Ht){var oe=Ht.open,se=oe===void 0?!1:oe,fe=Ht.prefixCls,Pe=fe===void 0?"rc-drawer":fe,Yt=Ht.placement,ee=Yt===void 0?"right":Yt,ye=Ht.autoFocus,xe=ye===void 0?!0:ye,be=Ht.keyboard,ce=be===void 0?!0:be,pe=Ht.width,he=pe===void 0?378:pe,Ce=Ht.mask,de=Ce===void 0?!0:Ce,Fe=Ht.maskClosable,ge=Fe===void 0?!0:Fe,Se=Ht.getContainer,re=Ht.forceRender,Kt=Ht.afterOpenChange,wt=Ht.destroyOnClose,Lt=Ht.onMouseEnter,Xt=Ht.onMouseOver,ne=Ht.onMouseLeave,It=Ht.onClick,Rt=Ht.onKeyDown,Vt=Ht.onKeyUp,$t=Ht.panelRef,ue=Bt.useState(!1),me=(0,Re.Z)(ue,2),Le=me[0],Ne=me[1],Be=Bt.useState(!1),Xe=(0,Re.Z)(Be,2),Qe=Xe[0],qe=Xe[1];(0,_t.Z)(function(){qe(!0)},[]);var He=Qe?se:!1,Ue=Bt.useRef(),We=Bt.useRef();(0,_t.Z)(function(){He&&(We.current=document.activeElement)},[He]);var Ke=function(Gn){var Zn;if(Ne(Gn),Kt==null||Kt(Gn),!Gn&&We.current&&!((Zn=Ue.current)!==null&&Zn!==void 0&&Zn.contains(We.current))){var Kn;(Kn=We.current)===null||Kn===void 0||Kn.focus({preventScroll:!0})}},rn=Bt.useMemo(function(){return{panel:$t}},[$t]);if(!re&&!Le&&!He&&wt)return null;var an={onMouseEnter:Lt,onMouseOver:Xt,onMouseLeave:ne,onClick:It,onKeyDown:Rt,onKeyUp:Vt},ln=(0,ae.Z)((0,ae.Z)({},Ht),{},{open:He,prefixCls:Pe,placement:ee,autoFocus:xe,keyboard:ce,width:he,mask:de,maskClosable:ge,inline:Se===!1,afterOpenChange:Ke,ref:Ue},an);return Bt.createElement(gt.Provider,{value:rn},Bt.createElement(ot.Z,{open:He||re||Le,autoDestroy:!1,getContainer:Se,autoLock:de&&(He||Le)},Bt.createElement(Nt,ln)))},Wt=Gt,Jt=Wt},25930:function(fn,cn,le){"use strict";le.d(cn,{Cd:function(){return Gt}});var ae=le(71409),Re=le(89490),ot=le(39224),_t=le(59301),Bt=le(92310),vt=le.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,_t.useRef)([]),Ht=(0,_t.useRef)(null);return(0,_t.useEffect)(function(){var oe=Date.now(),se=!1;Ut.current.forEach(function(fe){if(fe){se=!0;var Pe=fe.style;Pe.transitionDuration=".3s, .3s, .3s, .06s",Ht.current&&oe-Ht.current<100&&(Pe.transitionDuration="0s, 0s")}}),se&&(Ht.current=Date.now())}),Ut.current},bt=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],St=function(Ut){var Ht=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Ht.className,se=Ht.percent,fe=Ht.prefixCls,Pe=Ht.strokeColor,Yt=Ht.strokeLinecap,ee=Ht.strokeWidth,ye=Ht.style,xe=Ht.trailColor,be=Ht.trailWidth,ce=Ht.transition,pe=(0,ot.Z)(Ht,bt);delete pe.gapPosition;var he=Array.isArray(se)?se:[se],Ce=Array.isArray(Pe)?Pe:[Pe],de=kt(),Fe=ee/2,ge=100-ee/2,Se="M ".concat(Yt==="round"?Fe:0,",").concat(Fe,`
|
|
L `).concat(Yt==="round"?ge:100,",").concat(Fe),re="0 0 100 ".concat(ee),Kt=0;return _t.createElement("svg",(0,ae.Z)({className:vt()("".concat(fe,"-line"),oe),viewBox:re,preserveAspectRatio:"none",style:ye},pe),_t.createElement("path",{className:"".concat(fe,"-line-trail"),d:Se,strokeLinecap:Yt,stroke:xe,strokeWidth:be||ee,fillOpacity:"0"}),he.map(function(wt,Lt){var Xt=1;switch(Yt){case"round":Xt=1-ee/100;break;case"square":Xt=1-ee/2/100;break;default:Xt=1;break}var ne={strokeDasharray:"".concat(wt*Xt,"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,_t.createElement("path",{key:Lt,className:"".concat(fe,"-line-path"),d:Se,strokeLinecap:Yt,stroke:It,strokeWidth:ee,fillOpacity:"0",ref:function(Vt){de[Lt]=Vt},style:ne})}))},Tt=St,mt=le(28788),xt=le(11036),ft=le(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=_t.useState(),Ht=(0,xt.Z)(Ut,2),oe=Ht[0],se=Ht[1];return _t.useEffect(function(){se("rc_progress_".concat(at()))},[]),Jt||oe},lt=function(Ut){var Ht=Ut.bg,oe=Ut.children;return _t.createElement("div",{style:{width:"100%",height:"100%",background:Ht}},oe)};function ut(Jt,Ut){return Object.keys(Jt).map(function(Ht){var oe=parseFloat(Ht),se="".concat(Math.floor(oe*Ut),"%");return"".concat(Jt[Ht]," ").concat(se)})}var dt=_t.forwardRef(function(Jt,Ut){var Ht=Jt.prefixCls,oe=Jt.color,se=Jt.gradientId,fe=Jt.radius,Pe=Jt.style,Yt=Jt.ptg,ee=Jt.strokeLinecap,ye=Jt.strokeWidth,xe=Jt.size,be=Jt.gapDegree,ce=oe&&(0,mt.Z)(oe)==="object",pe=ce?"#FFF":void 0,he=xe/2,Ce=_t.createElement("circle",{className:"".concat(Ht,"-circle-path"),r:fe,cx:he,cy:he,stroke:pe,strokeLinecap:ee,strokeWidth:ye,opacity:Yt===0?0:1,style:Pe,ref:Ut});if(!ce)return Ce;var de="".concat(se,"-conic"),Fe=be?"".concat(180+be/2,"deg"):"0deg",ge=ut(oe,(360-be)/360),Se=ut(oe,1),re="conic-gradient(from ".concat(Fe,", ").concat(ge.join(", "),")"),Kt="linear-gradient(to ".concat(be?"bottom":"top",", ").concat(Se.join(", "),")");return _t.createElement(_t.Fragment,null,_t.createElement("mask",{id:de},Ce),_t.createElement("foreignObject",{x:0,y:0,width:xe,height:xe,mask:"url(#".concat(de,")")},_t.createElement(lt,{bg:Kt},_t.createElement(lt,{bg:re}))))}),Pt=dt,At=100,Dt=function(Ut,Ht,oe,se,fe,Pe,Yt,ee,ye,xe){var be=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ce=oe/100*360*((360-Pe)/360),pe=Pe===0?0:{bottom:0,top:180,left:90,right:-90}[Yt],he=(100-se)/100*Ht;ye==="round"&&se!==100&&(he+=xe/2,he>=Ht&&(he=Ht-.01));var Ce=At/2;return{stroke:typeof ee=="string"?ee:void 0,strokeDasharray:"".concat(Ht,"px ").concat(Ut),strokeDashoffset:he+be,transform:"rotate(".concat(fe+ce+pe,"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 Ht=(0,Re.Z)((0,Re.Z)({},gt),Ut),oe=Ht.id,se=Ht.prefixCls,fe=Ht.steps,Pe=Ht.strokeWidth,Yt=Ht.trailWidth,ee=Ht.gapDegree,ye=ee===void 0?0:ee,xe=Ht.gapPosition,be=Ht.trailColor,ce=Ht.strokeLinecap,pe=Ht.style,he=Ht.className,Ce=Ht.strokeColor,de=Ht.percent,Fe=(0,ot.Z)(Ht,Ft),ge=At/2,Se=it(oe),re="".concat(Se,"-gradient"),Kt=ge-Pe/2,wt=Math.PI*2*Kt,Lt=ye>0?90+ye/2:-90,Xt=wt*((360-ye)/360),ne=(0,mt.Z)(fe)==="object"?fe:{count:fe,gap:2},It=ne.count,Rt=ne.gap,Vt=jt(de),$t=jt(Ce),ue=$t.find(function(qe){return qe&&(0,mt.Z)(qe)==="object"}),me=ue&&(0,mt.Z)(ue)==="object",Le=me?"butt":ce,Ne=Dt(wt,Xt,0,100,Lt,ye,xe,be,Le,Pe),Be=kt(),Xe=function(){var He=0;return Vt.map(function(Ue,We){var Ke=$t[We]||$t[$t.length-1],rn=Dt(wt,Xt,He,Ue,Lt,ye,xe,Ke,Le,Pe);return He+=Ue,_t.createElement(Pt,{key:We,color:Ke,ptg:Ue,radius:Kt,prefixCls:se,gradientId:re,style:rn,strokeLinecap:Le,strokeWidth:Pe,gapDegree:ye,ref:function(ln){Be[We]=ln},size:At})}).reverse()},Qe=function(){var He=Math.round(It*(Vt[0]/100)),Ue=100/It,We=0;return new Array(It).fill(null).map(function(Ke,rn){var an=rn<=He-1?$t[0]:be,ln=an&&(0,mt.Z)(an)==="object"?"url(#".concat(re,")"):void 0,gn=Dt(wt,Xt,We,Ue,Lt,ye,xe,an,"butt",Pe,Rt);return We+=(Xt-gn.strokeDashoffset+Rt)*100/Xt,_t.createElement("circle",{key:rn,className:"".concat(se,"-circle-path"),r:Kt,cx:ge,cy:ge,stroke:ln,strokeWidth:Pe,opacity:1,style:gn,ref:function(Zn){Be[rn]=Zn}})})};return _t.createElement("svg",(0,ae.Z)({className:vt()("".concat(se,"-circle"),he),viewBox:"0 0 ".concat(At," ").concat(At),style:pe,id:oe,role:"presentation"},Fe),!It&&_t.createElement("circle",{className:"".concat(se,"-circle-trail"),r:Kt,cx:ge,cy:ge,stroke:be,strokeLinecap:Le,strokeWidth:Yt||Pe,style:Ne}),It?Qe():Xe())},Gt=Nt,Wt={Line:Tt,Circle:Gt}},738:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return ut}});var ae=le(71409),Re=le(87075),ot=le(11036),_t=le(39224),Bt=le(92310),vt=le.n(Bt),gt=le(18929),kt=le(10228),bt=le(26112),St=le(59301);function Tt(dt,Pt){var At=dt.disabled,Dt=dt.prefixCls,Ft=dt.character,jt=dt.characterRender,Nt=dt.index,Gt=dt.count,Wt=dt.value,Jt=dt.allowHalf,Ut=dt.focused,Ht=dt.onHover,oe=dt.onClick,se=function(ce){Ht(ce,Nt)},fe=function(ce){oe(ce,Nt)},Pe=function(ce){ce.keyCode===kt.Z.ENTER&&oe(ce,Nt)},Yt=Nt+1,ee=new Set([Dt]);Wt===0&&Nt===0&&Ut?ee.add("".concat(Dt,"-focused")):Jt&&Wt+.5>=Yt&&Wt<Yt?(ee.add("".concat(Dt,"-half")),ee.add("".concat(Dt,"-active")),Ut&&ee.add("".concat(Dt,"-focused"))):(Yt<=Wt?ee.add("".concat(Dt,"-full")):ee.add("".concat(Dt,"-zero")),Yt===Wt&&Ut&&ee.add("".concat(Dt,"-focused")));var ye=typeof Ft=="function"?Ft(dt):Ft,xe=St.createElement("li",{className:vt()(Array.from(ee)),ref:Pt},St.createElement("div",{onClick:At?null:fe,onKeyDown:At?null:Pe,onMouseMove:At?null:se,role:"radio","aria-checked":Wt>Nt?"true":"false","aria-posinset":Nt+1,"aria-setsize":Gt,tabIndex:At?-1:0},St.createElement("div",{className:"".concat(Dt,"-first")},ye),St.createElement("div",{className:"".concat(Dt,"-second")},ye)));return jt&&(xe=jt(xe,dt)),xe}var mt=St.forwardRef(Tt);function xt(){var dt=St.useRef({});function Pt(Dt){return dt.current[Dt]}function At(Dt){return function(Ft){dt.current[Dt]=Ft}}return[Pt,At]}function ft(dt){var Pt=dt.pageXOffset,At="scrollLeft";if(typeof Pt!="number"){var Dt=dt.document;Pt=Dt.documentElement[At],typeof Pt!="number"&&(Pt=Dt.body[At])}return Pt}function z(dt){var Pt,At,Dt=dt.ownerDocument,Ft=Dt.body,jt=Dt&&Dt.documentElement,Nt=dt.getBoundingClientRect();return Pt=Nt.left,At=Nt.top,Pt-=jt.clientLeft||Ft.clientLeft||0,At-=jt.clientTop||Ft.clientTop||0,{left:Pt,top:At}}function tt(dt){var Pt=z(dt),At=dt.ownerDocument,Dt=At.defaultView||At.parentWindow;return Pt.left+=ft(Dt),Pt.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,Pt){var At=dt.prefixCls,Dt=At===void 0?"rc-rate":At,Ft=dt.className,jt=dt.defaultValue,Nt=dt.value,Gt=dt.count,Wt=Gt===void 0?5:Gt,Jt=dt.allowHalf,Ut=Jt===void 0?!1:Jt,Ht=dt.allowClear,oe=Ht===void 0?!0:Ht,se=dt.keyboard,fe=se===void 0?!0:se,Pe=dt.character,Yt=Pe===void 0?"\u2605":Pe,ee=dt.characterRender,ye=dt.disabled,xe=dt.direction,be=xe===void 0?"ltr":xe,ce=dt.tabIndex,pe=ce===void 0?0:ce,he=dt.autoFocus,Ce=dt.onHoverChange,de=dt.onChange,Fe=dt.onFocus,ge=dt.onBlur,Se=dt.onKeyDown,re=dt.onMouseLeave,Kt=(0,_t.Z)(dt,at),wt=xt(),Lt=(0,ot.Z)(wt,2),Xt=Lt[0],ne=Lt[1],It=St.useRef(null),Rt=function(){if(!ye){var dr;(dr=It.current)===null||dr===void 0||dr.focus()}};St.useImperativeHandle(Pt,function(){return{focus:Rt,blur:function(){if(!ye){var dr;(dr=It.current)===null||dr===void 0||dr.blur()}}}});var Vt=(0,gt.Z)(jt||0,{value:Nt}),$t=(0,ot.Z)(Vt,2),ue=$t[0],me=$t[1],Le=(0,gt.Z)(null),Ne=(0,ot.Z)(Le,2),Be=Ne[0],Xe=Ne[1],Qe=function(dr,Ur){var qt=be==="rtl",An=dr+1;if(Ut){var Xn=Xt(dr),In=tt(Xn),Un=Xn.clientWidth;(qt&&Ur-In>Un/2||!qt&&Ur-In<Un/2)&&(An-=.5)}return An},qe=function(dr){me(dr),de==null||de(dr)},He=St.useState(!1),Ue=(0,ot.Z)(He,2),We=Ue[0],Ke=Ue[1],rn=function(){Ke(!0),Fe==null||Fe()},an=function(){Ke(!1),ge==null||ge()},ln=St.useState(null),gn=(0,ot.Z)(ln,2),Gn=gn[0],Zn=gn[1],Kn=function(dr,Ur){var qt=Qe(Ur,dr.pageX);qt!==Be&&(Zn(qt),Xe(null)),Ce==null||Ce(qt)},Pr=function(dr){ye||(Zn(null),Xe(null),Ce==null||Ce(void 0)),dr&&(re==null||re(dr))},pr=function(dr,Ur){var qt=Qe(Ur,dr.pageX),An=!1;oe&&(An=qt===ue),Pr(),qe(An?0:qt),Xe(An?qt:null)},Er=function(dr){var Ur=dr.keyCode,qt=be==="rtl",An=Ut?.5:1;fe&&(Ur===kt.Z.RIGHT&&ue<Wt&&!qt?(qe(ue+An),dr.preventDefault()):Ur===kt.Z.LEFT&&ue>0&&!qt||Ur===kt.Z.RIGHT&&ue>0&&qt?(qe(ue-An),dr.preventDefault()):Ur===kt.Z.LEFT&&ue<Wt&&qt&&(qe(ue+An),dr.preventDefault())),Se==null||Se(dr)};St.useEffect(function(){he&&!ye&&Rt()},[]);var Mr=new Array(Wt).fill(0).map(function(vr,dr){return St.createElement(mt,{ref:ne(dr),index:dr,count:Wt,disabled:ye,prefixCls:"".concat(Dt,"-star"),allowHalf:Ut,value:Gn===null?ue:Gn,onClick:pr,onHover:Kn,key:vr||dr,character:Yt,characterRender:ee,focused:We})}),Fr=vt()(Dt,Ft,(0,Re.Z)((0,Re.Z)({},"".concat(Dt,"-disabled"),ye),"".concat(Dt,"-rtl"),be==="rtl"));return St.createElement("ul",(0,ae.Z)({className:Fr,onMouseLeave:Pr,tabIndex:ye?-1:pe,onFocus:ye?null:rn,onBlur:ye?null:an,onKeyDown:ye?null:Er,ref:It},(0,bt.Z)(Kt,{aria:!0,data:!0,attr:!0})),Mr)}var lt=St.forwardRef(it),ut=lt},6551:function(fn,cn,le){"use strict";le.d(cn,{ZP:function(){return gt}});var ae=le(11036),Re=le(59301),ot=le(47273),_t=0,Bt=(0,ot.Z)();function vt(){var kt;return Bt?(kt=_t,_t+=1):kt="TEST_OR_SSR",kt}function gt(kt){var bt=Re.useState(),St=(0,ae.Z)(bt,2),Tt=St[0],mt=St[1];return Re.useEffect(function(){mt("rc_select_".concat(vt()))},[]),kt||Tt}},37463:function(fn,cn,le){"use strict";le.d(cn,{Ac:function(){return Ke},Xo:function(){return an},Wx:function(){return gn},ZP:function(){return Or},lk:function(){return ut}});var ae=le(71409),Re=le(62730),ot=le(87075),_t=le(89490),Bt=le(11036),vt=le(39224),gt=le(28788),kt=le(18929),bt=le(48736),St=le(59301),Tt=le(92310),mt=le.n(Tt),xt=le(34280),ft=le(49658),z=le(8654),tt=function(Ve){var Mn=Ve.className,jn=Ve.customizeIcon,en=Ve.customizeIconProps,kn=Ve.children,Pn=Ve.onMouseDown,Ln=Ve.onClick,$n=typeof jn=="function"?jn(en):jn;return St.createElement("span",{className:Mn,onMouseDown:function(Rn){Rn.preventDefault(),Pn==null||Pn(Rn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ln,"aria-hidden":!0},$n!==void 0?$n:St.createElement("span",{className:mt()(Mn.split(/\s+/).map(function(Nn){return"".concat(Nn,"-icon")}))},kn))},at=tt,it=function(Ve,Mn,jn,en,kn){var Pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ln=arguments.length>6?arguments[6]:void 0,$n=arguments.length>7?arguments[7]:void 0,Nn=St.useMemo(function(){if((0,gt.Z)(en)==="object")return en.clearIcon;if(kn)return kn},[en,kn]),Rn=St.useMemo(function(){return!!(!Pn&&en&&(jn.length||Ln)&&!($n==="combobox"&&Ln===""))},[en,Pn,jn.length,Ln,$n]);return{allowClear:Rn,clearIcon:St.createElement(at,{className:"".concat(Ve,"-clear"),onMouseDown:Mn,customizeIcon:Nn},"\xD7")}},lt=St.createContext(null);function ut(){return St.useContext(lt)}function dt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ve=St.useState(!1),Mn=(0,Bt.Z)(Ve,2),jn=Mn[0],en=Mn[1],kn=St.useRef(null),Pn=function(){window.clearTimeout(kn.current)};St.useEffect(function(){return Pn},[]);var Ln=function(Nn,Rn){Pn(),kn.current=window.setTimeout(function(){en(Nn),Rn&&Rn()},Ae)};return[jn,Ln,Pn]}function Pt(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ve=St.useRef(null),Mn=St.useRef(null);St.useEffect(function(){return function(){window.clearTimeout(Mn.current)}},[]);function jn(en){(en||Ve.current===null)&&(Ve.current=en),window.clearTimeout(Mn.current),Mn.current=window.setTimeout(function(){Ve.current=null},Ae)}return[function(){return Ve.current},jn]}function At(Ae,Ve,Mn,jn){var en=St.useRef(null);en.current={open:Ve,triggerOpen:Mn,customizedTrigger:jn},St.useEffect(function(){function kn(Pn){var Ln;if(!((Ln=en.current)!==null&&Ln!==void 0&&Ln.customizedTrigger)){var $n=Pn.target;$n.shadowRoot&&Pn.composed&&($n=Pn.composedPath()[0]||$n),en.current.open&&Ae().filter(function(Nn){return Nn}).every(function(Nn){return!Nn.contains($n)&&Nn!==$n})&&en.current.triggerOpen(!1)}}return window.addEventListener("mousedown",kn),function(){return window.removeEventListener("mousedown",kn)}},[])}var Dt=le(10228);function Ft(Ae){return Ae&&![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(Ae)}var jt=le(26112),Nt=le(11780);function Gt(Ae,Ve,Mn){var jn=(0,_t.Z)((0,_t.Z)({},Ae),Mn?Ve:{});return Object.keys(Ve).forEach(function(en){var kn=Ve[en];typeof kn=="function"&&(jn[en]=function(){for(var Pn,Ln=arguments.length,$n=new Array(Ln),Nn=0;Nn<Ln;Nn++)$n[Nn]=arguments[Nn];return kn.apply(void 0,$n),(Pn=Ae[en])===null||Pn===void 0?void 0:Pn.call.apply(Pn,[Ae].concat($n))})}),jn}var Wt=Gt,Jt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ut=function(Ve,Mn){var jn=Ve.prefixCls,en=Ve.id,kn=Ve.inputElement,Pn=Ve.autoFocus,Ln=Ve.autoComplete,$n=Ve.editable,Nn=Ve.activeDescendantId,Rn=Ve.value,Bn=Ve.open,gr=Ve.attrs,ar=(0,vt.Z)(Ve,Jt),lr=kn||St.createElement("input",null),sn=lr,Kr=sn.ref,Xr=sn.props;return(0,bt.Kp)(!("maxLength"in lr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),lr=St.cloneElement(lr,(0,_t.Z)((0,_t.Z)((0,_t.Z)({type:"search"},Wt(ar,Xr,!0)),{},{id:en,ref:(0,z.sQ)(Mn,Kr),autoComplete:Ln||"off",autoFocus:Pn,className:mt()("".concat(jn,"-selection-search-input"),Xr==null?void 0:Xr.className),role:"combobox","aria-expanded":Bn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(en,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(en,"_list"),"aria-activedescendant":Bn?Nn:void 0},gr),{},{value:$n?Rn:"",readOnly:!$n,unselectable:$n?null:"on",style:(0,_t.Z)((0,_t.Z)({},Xr.style),{},{opacity:$n?null:0})})),lr},Ht=St.forwardRef(Ut),oe=Ht;function se(Ae){return Array.isArray(Ae)?Ae:Ae!==void 0?[Ae]:[]}var fe=typeof window!="undefined"&&window.document&&window.document.documentElement,Pe=fe;function Yt(Ae){return Ae!=null}function ee(Ae){return!Ae&&Ae!==0}function ye(Ae){return["string","number"].includes((0,gt.Z)(Ae))}function xe(Ae){var Ve=void 0;return Ae&&(ye(Ae.title)?Ve=Ae.title.toString():ye(Ae.label)&&(Ve=Ae.label.toString())),Ve}function be(Ae,Ve){Pe?St.useLayoutEffect(Ae,Ve):St.useEffect(Ae,Ve)}function ce(Ae){var Ve;return(Ve=Ae.key)!==null&&Ve!==void 0?Ve:Ae.value}var pe=function(Ve){Ve.preventDefault(),Ve.stopPropagation()},he=function(Ve){var Mn=Ve.id,jn=Ve.prefixCls,en=Ve.values,kn=Ve.open,Pn=Ve.searchValue,Ln=Ve.autoClearSearchValue,$n=Ve.inputRef,Nn=Ve.placeholder,Rn=Ve.disabled,Bn=Ve.mode,gr=Ve.showSearch,ar=Ve.autoFocus,lr=Ve.autoComplete,sn=Ve.activeDescendantId,Kr=Ve.tabIndex,Xr=Ve.removeIcon,mi=Ve.maxTagCount,dn=Ve.maxTagTextLength,On=Ve.maxTagPlaceholder,rr=On===void 0?function(Qr){return"+ ".concat(Qr.length," ...")}:On,er=Ve.tagRender,hr=Ve.onToggleOpen,Dr=Ve.onRemove,Gr=Ve.onInputChange,Jr=Ve.onInputPaste,$r=Ve.onInputKeyDown,ii=Ve.onInputMouseDown,yn=Ve.onInputCompositionStart,di=Ve.onInputCompositionEnd,mn=Ve.onInputBlur,oi=St.useRef(null),Gi=(0,St.useState)(0),bi=(0,Bt.Z)(Gi,2),Ai=bi[0],ai=bi[1],_r=(0,St.useState)(!1),vi=(0,Bt.Z)(_r,2),xo=vi[0],Fi=vi[1],qn="".concat(jn,"-selection"),Me=kn||Bn==="multiple"&&Ln===!1||Bn==="tags"?Pn:"",zi=Bn==="tags"||Bn==="multiple"&&Ln===!1||gr&&(kn||xo);be(function(){ai(oi.current.scrollWidth)},[Me]);var Ui=function(mr,Vr,Mi,kr,ur){return St.createElement("span",{title:xe(mr),className:mt()("".concat(qn,"-item"),(0,ot.Z)({},"".concat(qn,"-item-disabled"),Mi))},St.createElement("span",{className:"".concat(qn,"-item-content")},Vr),kr&&St.createElement(at,{className:"".concat(qn,"-item-remove"),onMouseDown:pe,onClick:ur,customizeIcon:Xr},"\xD7"))},Qi=function(mr,Vr,Mi,kr,ur,Cn){var Ar=function(Wi){pe(Wi),hr(!kn)};return St.createElement("span",{onMouseDown:Ar},er({label:Vr,value:mr,disabled:Mi,closable:kr,onClose:ur,isMaxTag:!!Cn}))},Xi=function(mr){var Vr=mr.disabled,Mi=mr.label,kr=mr.value,ur=!Rn&&!Vr,Cn=Mi;if(typeof dn=="number"&&(typeof Mi=="string"||typeof Mi=="number")){var Ar=String(Cn);Ar.length>dn&&(Cn="".concat(Ar.slice(0,dn),"..."))}var ci=function(Ei){Ei&&Ei.stopPropagation(),Dr(mr)};return typeof er=="function"?Qi(kr,Cn,Vr,ur,ci):Ui(mr,Cn,Vr,ur,ci)},pi=function(mr){if(!en.length)return null;var Vr=typeof rr=="function"?rr(mr):rr;return typeof er=="function"?Qi(void 0,Vr,!1,!1,void 0,!0):Ui({title:Vr},Vr,!1)},sr=St.createElement("div",{className:"".concat(qn,"-search"),style:{width:Ai},onFocus:function(){Fi(!0)},onBlur:function(){Fi(!1)}},St.createElement(oe,{ref:$n,open:kn,prefixCls:jn,id:Mn,inputElement:null,disabled:Rn,autoFocus:ar,autoComplete:lr,editable:zi,activeDescendantId:sn,value:Me,onKeyDown:$r,onMouseDown:ii,onChange:Gr,onPaste:Jr,onCompositionStart:yn,onCompositionEnd:di,onBlur:mn,tabIndex:Kr,attrs:(0,jt.Z)(Ve,!0)}),St.createElement("span",{ref:oi,className:"".concat(qn,"-search-mirror"),"aria-hidden":!0},Me,"\xA0")),yr=St.createElement(Nt.Z,{prefixCls:"".concat(qn,"-overflow"),data:en,renderItem:Xi,renderRest:pi,suffix:sr,itemKey:ce,maxCount:mi});return St.createElement("span",{className:"".concat(qn,"-wrap")},yr,!en.length&&!Me&&St.createElement("span",{className:"".concat(qn,"-placeholder")},Nn))},Ce=he,de=function(Ve){var Mn=Ve.inputElement,jn=Ve.prefixCls,en=Ve.id,kn=Ve.inputRef,Pn=Ve.disabled,Ln=Ve.autoFocus,$n=Ve.autoComplete,Nn=Ve.activeDescendantId,Rn=Ve.mode,Bn=Ve.open,gr=Ve.values,ar=Ve.placeholder,lr=Ve.tabIndex,sn=Ve.showSearch,Kr=Ve.searchValue,Xr=Ve.activeValue,mi=Ve.maxLength,dn=Ve.onInputKeyDown,On=Ve.onInputMouseDown,rr=Ve.onInputChange,er=Ve.onInputPaste,hr=Ve.onInputCompositionStart,Dr=Ve.onInputCompositionEnd,Gr=Ve.onInputBlur,Jr=Ve.title,$r=St.useState(!1),ii=(0,Bt.Z)($r,2),yn=ii[0],di=ii[1],mn=Rn==="combobox",oi=mn||sn,Gi=gr[0],bi=Kr||"";mn&&Xr&&!yn&&(bi=Xr),St.useEffect(function(){mn&&di(!1)},[mn,Xr]);var Ai=Rn!=="combobox"&&!Bn&&!sn?!1:!!bi,ai=Jr===void 0?xe(Gi):Jr,_r=St.useMemo(function(){return Gi?null:St.createElement("span",{className:"".concat(jn,"-selection-placeholder"),style:Ai?{visibility:"hidden"}:void 0},ar)},[Gi,Ai,ar,jn]);return St.createElement("span",{className:"".concat(jn,"-selection-wrap")},St.createElement("span",{className:"".concat(jn,"-selection-search")},St.createElement(oe,{ref:kn,prefixCls:jn,id:en,open:Bn,inputElement:Mn,disabled:Pn,autoFocus:Ln,autoComplete:$n,editable:oi,activeDescendantId:Nn,value:bi,onKeyDown:dn,onMouseDown:On,onChange:function(xo){di(!0),rr(xo)},onPaste:er,onCompositionStart:hr,onCompositionEnd:Dr,onBlur:Gr,tabIndex:lr,attrs:(0,jt.Z)(Ve,!0),maxLength:mn?mi:void 0})),!mn&&Gi?St.createElement("span",{className:"".concat(jn,"-selection-item"),title:ai,style:Ai?{visibility:"hidden"}:void 0},Gi.label):null,_r)},Fe=de,ge=function(Ve,Mn){var jn=(0,St.useRef)(null),en=(0,St.useRef)(!1),kn=Ve.prefixCls,Pn=Ve.open,Ln=Ve.mode,$n=Ve.showSearch,Nn=Ve.tokenWithEnter,Rn=Ve.disabled,Bn=Ve.prefix,gr=Ve.autoClearSearchValue,ar=Ve.onSearch,lr=Ve.onSearchSubmit,sn=Ve.onToggleOpen,Kr=Ve.onInputKeyDown,Xr=Ve.onInputBlur,mi=Ve.domRef;St.useImperativeHandle(Mn,function(){return{focus:function(ai){jn.current.focus(ai)},blur:function(){jn.current.blur()}}});var dn=Pt(0),On=(0,Bt.Z)(dn,2),rr=On[0],er=On[1],hr=function(ai){var _r=ai.which,vi=jn.current instanceof HTMLTextAreaElement;!vi&&Pn&&(_r===Dt.Z.UP||_r===Dt.Z.DOWN)&&ai.preventDefault(),Kr&&Kr(ai),_r===Dt.Z.ENTER&&Ln==="tags"&&!en.current&&!Pn&&(lr==null||lr(ai.target.value)),!(vi&&!Pn&&~[Dt.Z.UP,Dt.Z.DOWN,Dt.Z.LEFT,Dt.Z.RIGHT].indexOf(_r))&&Ft(_r)&&sn(!0)},Dr=function(){er(!0)},Gr=(0,St.useRef)(null),Jr=function(ai){ar(ai,!0,en.current)!==!1&&sn(!0)},$r=function(){en.current=!0},ii=function(ai){en.current=!1,Ln!=="combobox"&&Jr(ai.target.value)},yn=function(ai){var _r=ai.target.value;if(Nn&&Gr.current&&/[\r\n]/.test(Gr.current)){var vi=Gr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");_r=_r.replace(vi,Gr.current)}Gr.current=null,Jr(_r)},di=function(ai){var _r=ai.clipboardData,vi=_r==null?void 0:_r.getData("text");Gr.current=vi||""},mn=function(ai){var _r=ai.target;if(_r!==jn.current){var vi=document.body.style.msTouchAction!==void 0;vi?setTimeout(function(){jn.current.focus()}):jn.current.focus()}},oi=function(ai){var _r=rr();ai.target!==jn.current&&!_r&&!(Ln==="combobox"&&Rn)&&ai.preventDefault(),(Ln!=="combobox"&&(!$n||!_r)||!Pn)&&(Pn&&gr!==!1&&ar("",!0,!1),sn())},Gi={inputRef:jn,onInputKeyDown:hr,onInputMouseDown:Dr,onInputChange:yn,onInputPaste:di,onInputCompositionStart:$r,onInputCompositionEnd:ii,onInputBlur:Xr},bi=Ln==="multiple"||Ln==="tags"?St.createElement(Ce,(0,ae.Z)({},Ve,Gi)):St.createElement(Fe,(0,ae.Z)({},Ve,Gi));return St.createElement("div",{ref:mi,className:"".concat(kn,"-selector"),onClick:mn,onMouseDown:oi},Bn&&St.createElement("div",{className:"".concat(kn,"-prefix")},Bn),bi)},Se=St.forwardRef(ge),re=Se,Kt=le(65352),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 Mn=Ve===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"}}},Xt=function(Ve,Mn){var jn=Ve.prefixCls,en=Ve.disabled,kn=Ve.visible,Pn=Ve.children,Ln=Ve.popupElement,$n=Ve.animation,Nn=Ve.transitionName,Rn=Ve.dropdownStyle,Bn=Ve.dropdownClassName,gr=Ve.direction,ar=gr===void 0?"ltr":gr,lr=Ve.placement,sn=Ve.builtinPlacements,Kr=Ve.dropdownMatchSelectWidth,Xr=Ve.dropdownRender,mi=Ve.dropdownAlign,dn=Ve.getPopupContainer,On=Ve.empty,rr=Ve.getTriggerDOMNode,er=Ve.onPopupVisibleChange,hr=Ve.onPopupMouseEnter,Dr=(0,vt.Z)(Ve,wt),Gr="".concat(jn,"-dropdown"),Jr=Ln;Xr&&(Jr=Xr(Ln));var $r=St.useMemo(function(){return sn||Lt(Kr)},[sn,Kr]),ii=$n?"".concat(Gr,"-").concat($n):Nn,yn=typeof Kr=="number",di=St.useMemo(function(){return yn?null:Kr===!1?"minWidth":"width"},[Kr,yn]),mn=Rn;yn&&(mn=(0,_t.Z)((0,_t.Z)({},mn),{},{width:Kr}));var oi=St.useRef(null);return St.useImperativeHandle(Mn,function(){return{getPopupElement:function(){var bi;return(bi=oi.current)===null||bi===void 0?void 0:bi.popupElement}}}),St.createElement(Kt.Z,(0,ae.Z)({},Dr,{showAction:er?["click"]:[],hideAction:er?["click"]:[],popupPlacement:lr||(ar==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:$r,prefixCls:Gr,popupTransitionName:ii,popup:St.createElement("div",{onMouseEnter:hr},Jr),ref:oi,stretch:di,popupAlign:mi,popupVisible:kn,getPopupContainer:dn,popupClassName:mt()(Bn,(0,ot.Z)({},"".concat(Gr,"-empty"),On)),popupStyle:mn,getTriggerDOMNode:rr,onPopupVisibleChange:er}),Pn)},ne=St.forwardRef(Xt),It=ne,Rt=le(67900);function Vt(Ae,Ve){var Mn=Ae.key,jn;return"value"in Ae&&(jn=Ae.value),Mn!=null?Mn:jn!==void 0?jn:"rc-index-key-".concat(Ve)}function $t(Ae){return typeof Ae!="undefined"&&!Number.isNaN(Ae)}function ue(Ae,Ve){var Mn=Ae||{},jn=Mn.label,en=Mn.value,kn=Mn.options,Pn=Mn.groupLabel,Ln=jn||(Ve?"children":"label");return{label:Ln,value:en||"value",options:kn||"options",groupLabel:Pn||Ln}}function me(Ae){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Mn=Ve.fieldNames,jn=Ve.childrenAsData,en=[],kn=ue(Mn,!1),Pn=kn.label,Ln=kn.value,$n=kn.options,Nn=kn.groupLabel;function Rn(Bn,gr){Array.isArray(Bn)&&Bn.forEach(function(ar){if(gr||!($n in ar)){var lr=ar[Ln];en.push({key:Vt(ar,en.length),groupOption:gr,data:ar,label:ar[Pn],value:lr})}else{var sn=ar[Nn];sn===void 0&&jn&&(sn=ar.label),en.push({key:Vt(ar,en.length),group:!0,data:ar,label:sn}),Rn(ar[$n],!0)}})}return Rn(Ae,!1),en}function Le(Ae){var Ve=(0,_t.Z)({},Ae);return"props"in Ve||Object.defineProperty(Ve,"props",{get:function(){return(0,bt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ve}}),Ve}var Ne=function(Ve,Mn,jn){if(!Mn||!Mn.length)return null;var en=!1,kn=function Ln($n,Nn){var Rn=(0,Rt.Z)(Nn),Bn=Rn[0],gr=Rn.slice(1);if(!Bn)return[$n];var ar=$n.split(Bn);return en=en||ar.length>1,ar.reduce(function(lr,sn){return[].concat((0,Re.Z)(lr),(0,Re.Z)(Ln(sn,gr)))},[]).filter(Boolean)},Pn=kn(Ve,Mn);return en?typeof jn!="undefined"?Pn.slice(0,jn):Pn:null},Be=St.createContext(null),Xe=Be;function Qe(Ae){var Ve=Ae.visible,Mn=Ae.values;if(!Ve)return null;var jn=50;return St.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Mn.slice(0,jn).map(function(en){var kn=en.label,Pn=en.value;return["number","string"].includes((0,gt.Z)(kn))?kn:Pn}).join(", ")),Mn.length>jn?", ...":null)}var qe=["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"],He=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Ue=function(Ve){return Ve==="tags"||Ve==="multiple"},We=St.forwardRef(function(Ae,Ve){var Mn,jn=Ae.id,en=Ae.prefixCls,kn=Ae.className,Pn=Ae.showSearch,Ln=Ae.tagRender,$n=Ae.direction,Nn=Ae.omitDomProps,Rn=Ae.displayValues,Bn=Ae.onDisplayValuesChange,gr=Ae.emptyOptions,ar=Ae.notFoundContent,lr=ar===void 0?"Not Found":ar,sn=Ae.onClear,Kr=Ae.mode,Xr=Ae.disabled,mi=Ae.loading,dn=Ae.getInputElement,On=Ae.getRawInputElement,rr=Ae.open,er=Ae.defaultOpen,hr=Ae.onDropdownVisibleChange,Dr=Ae.activeValue,Gr=Ae.onActiveValueChange,Jr=Ae.activeDescendantId,$r=Ae.searchValue,ii=Ae.autoClearSearchValue,yn=Ae.onSearch,di=Ae.onSearchSplit,mn=Ae.tokenSeparators,oi=Ae.allowClear,Gi=Ae.prefix,bi=Ae.suffixIcon,Ai=Ae.clearIcon,ai=Ae.OptionList,_r=Ae.animation,vi=Ae.transitionName,xo=Ae.dropdownStyle,Fi=Ae.dropdownClassName,qn=Ae.dropdownMatchSelectWidth,Me=Ae.dropdownRender,zi=Ae.dropdownAlign,Ui=Ae.placement,Qi=Ae.builtinPlacements,Xi=Ae.getPopupContainer,pi=Ae.showAction,sr=pi===void 0?[]:pi,yr=Ae.onFocus,Qr=Ae.onBlur,mr=Ae.onKeyUp,Vr=Ae.onKeyDown,Mi=Ae.onMouseDown,kr=(0,vt.Z)(Ae,qe),ur=Ue(Kr),Cn=(Pn!==void 0?Pn:ur)||Kr==="combobox",Ar=(0,_t.Z)({},kr);He.forEach(function(Hi){delete Ar[Hi]}),Nn==null||Nn.forEach(function(Hi){delete Ar[Hi]});var ci=St.useState(!1),Wi=(0,Bt.Z)(ci,2),Ei=Wi[0],qi=Wi[1];St.useEffect(function(){qi((0,ft.Z)())},[]);var wo=St.useRef(null),to=St.useRef(null),To=St.useRef(null),bo=St.useRef(null),jo=St.useRef(null),on=St.useRef(!1),Wo=dt(),Js=(0,Bt.Z)(Wo,3),ia=Js[0],ja=Js[1],so=Js[2];St.useImperativeHandle(Ve,function(){var Hi,Ni;return{focus:(Hi=bo.current)===null||Hi===void 0?void 0:Hi.focus,blur:(Ni=bo.current)===null||Ni===void 0?void 0:Ni.blur,scrollTo:function(Sr){var $o;return($o=jo.current)===null||$o===void 0?void 0:$o.scrollTo(Sr)},nativeElement:wo.current||to.current}});var ls=St.useMemo(function(){var Hi;if(Kr!=="combobox")return $r;var Ni=(Hi=Rn[0])===null||Hi===void 0?void 0:Hi.value;return typeof Ni=="string"||typeof Ni=="number"?String(Ni):""},[$r,Kr,Rn]),zl=Kr==="combobox"&&typeof dn=="function"&&dn()||null,Ti=typeof On=="function"&&On(),Go=(0,z.x1)(to,Ti==null||(Mn=Ti.props)===null||Mn===void 0?void 0:Mn.ref),El=St.useState(!1),pa=(0,Bt.Z)(El,2),uu=pa[0],xs=pa[1];(0,xt.Z)(function(){xs(!0)},[]);var Br=(0,kt.Z)(!1,{defaultValue:er,value:rr}),Gl=(0,Bt.Z)(Br,2),hu=Gl[0],us=Gl[1],Jo=uu?hu:!1,Nu=!lr&&gr;(Xr||Nu&&Jo&&Kr==="combobox")&&(Jo=!1);var nr=Nu?!1:Jo,Wr=St.useCallback(function(Hi){var Ni=Hi!==void 0?Hi:!Jo;Xr||(us(Ni),Jo!==Ni&&(hr==null||hr(Ni)))},[Xr,Jo,us,hr]),ni=St.useMemo(function(){return(mn||[]).some(function(Hi){return[`
|
|
`,`\r
|
|
`].includes(Hi)})},[mn]),si=St.useContext(Xe)||{},gi=si.maxCount,Ki=si.rawValues,Ir=function(Ni,Da,Sr){if(!(ur&&$t(gi)&&(Ki==null?void 0:Ki.size)>=gi)){var $o=!0,Ge=Ni;Gr==null||Gr(null);var xn=Ne(Ni,mn,$t(gi)?gi-Ki.size:void 0),$s=Sr?null:xn;return Kr!=="combobox"&&$s&&(Ge="",di==null||di($s),Wr(!1),$o=!1),yn&&ls!==Ge&&yn(Ge,{source:Da?"typing":"effect"}),$o}},ws=function(Ni){!Ni||!Ni.trim()||yn(Ni,{source:"submit"})};St.useEffect(function(){!Jo&&!ur&&Kr!=="combobox"&&Ir("",!1,!1)},[Jo]),St.useEffect(function(){hu&&Xr&&us(!1),Xr&&!on.current&&ja(!1)},[Xr]);var oa=Pt(),Ho=(0,Bt.Z)(oa,2),lo=Ho[0],Ja=Ho[1],bs=St.useRef(!1),Oa=function(Ni){var Da=lo(),Sr=Ni.key,$o=Sr==="Enter";if($o&&(Kr!=="combobox"&&Ni.preventDefault(),Jo||Wr(!0)),Ja(!!ls),Sr==="Backspace"&&!Da&&ur&&!ls&&Rn.length){for(var Ge=(0,Re.Z)(Rn),xn=null,$s=Ge.length-1;$s>=0;$s-=1){var Wl=Ge[$s];if(!Wl.disabled){Ge.splice($s,1),xn=Wl;break}}xn&&Bn(Ge,{type:"remove",values:[xn]})}for(var hs=arguments.length,Qa=new Array(hs>1?hs-1:0),pl=1;pl<hs;pl++)Qa[pl-1]=arguments[pl];if(Jo&&(!$o||!bs.current)){var cu;$o&&(bs.current=!0),(cu=jo.current)===null||cu===void 0||cu.onKeyDown.apply(cu,[Ni].concat(Qa))}Vr==null||Vr.apply(void 0,[Ni].concat(Qa))},Ps=function(Ni){for(var Da=arguments.length,Sr=new Array(Da>1?Da-1:0),$o=1;$o<Da;$o++)Sr[$o-1]=arguments[$o];if(Jo){var Ge;(Ge=jo.current)===null||Ge===void 0||Ge.onKeyUp.apply(Ge,[Ni].concat(Sr))}Ni.key==="Enter"&&(bs.current=!1),mr==null||mr.apply(void 0,[Ni].concat(Sr))},Ml=function(Ni){var Da=Rn.filter(function(Sr){return Sr!==Ni});Bn(Da,{type:"remove",values:[Ni]})},Qs=function(){bs.current=!1},ju=St.useRef(!1),Xc=function(){ja(!0),Xr||(yr&&!ju.current&&yr.apply(void 0,arguments),sr.includes("focus")&&Wr(!0)),ju.current=!0},sc=function(){on.current=!0,ja(!1,function(){ju.current=!1,on.current=!1,Wr(!1)}),!Xr&&(ls&&(Kr==="tags"?yn(ls,{source:"submit"}):Kr==="multiple"&&yn("",{source:"blur"})),Qr&&Qr.apply(void 0,arguments))},dl=[];St.useEffect(function(){return function(){dl.forEach(function(Hi){return clearTimeout(Hi)}),dl.splice(0,dl.length)}},[]);var Ul=function(Ni){var Da,Sr=Ni.target,$o=(Da=To.current)===null||Da===void 0?void 0:Da.getPopupElement();if($o&&$o.contains(Sr)){var Ge=setTimeout(function(){var hs=dl.indexOf(Ge);if(hs!==-1&&dl.splice(hs,1),so(),!Ei&&!$o.contains(document.activeElement)){var Qa;(Qa=bo.current)===null||Qa===void 0||Qa.focus()}});dl.push(Ge)}for(var xn=arguments.length,$s=new Array(xn>1?xn-1:0),Wl=1;Wl<xn;Wl++)$s[Wl-1]=arguments[Wl];Mi==null||Mi.apply(void 0,[Ni].concat($s))},Is=St.useState({}),lc=(0,Bt.Z)(Is,2),uc=lc[1];function Yc(){uc({})}var Oo;Ti&&(Oo=function(Ni){Wr(Ni)}),At(function(){var Hi;return[wo.current,(Hi=To.current)===null||Hi===void 0?void 0:Hi.getPopupElement()]},nr,Wr,!!Ti);var Wf=St.useMemo(function(){return(0,_t.Z)((0,_t.Z)({},Ae),{},{notFoundContent:lr,open:Jo,triggerOpen:nr,id:jn,showSearch:Cn,multiple:ur,toggleOpen:Wr})},[Ae,lr,nr,Jo,jn,Cn,ur,Wr]),hc=!!bi||mi,Ou;hc&&(Ou=St.createElement(at,{className:mt()("".concat(en,"-arrow"),(0,ot.Z)({},"".concat(en,"-arrow-loading"),mi)),customizeIcon:bi,customizeIconProps:{loading:mi,searchValue:ls,open:Jo,focused:ia,showSearch:Cn}}));var Fu=function(){var Ni;sn==null||sn(),(Ni=bo.current)===null||Ni===void 0||Ni.focus(),Bn([],{type:"clear",values:Rn}),Ir("",!1,!1)},ga=it(en,Fu,Rn,oi,Ai,Xr,ls,Kr),Fa=ga.allowClear,Qo=ga.clearIcon,aa=St.createElement(ai,{ref:jo}),cc=mt()(en,kn,(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(en,"-focused"),ia),"".concat(en,"-multiple"),ur),"".concat(en,"-single"),!ur),"".concat(en,"-allow-clear"),oi),"".concat(en,"-show-arrow"),hc),"".concat(en,"-disabled"),Xr),"".concat(en,"-loading"),mi),"".concat(en,"-open"),Jo),"".concat(en,"-customize-input"),zl),"".concat(en,"-show-search"),Cn)),Du=St.createElement(It,{ref:To,disabled:Xr,prefixCls:en,visible:nr,popupElement:aa,animation:_r,transitionName:vi,dropdownStyle:xo,dropdownClassName:Fi,direction:$n,dropdownMatchSelectWidth:qn,dropdownRender:Me,dropdownAlign:zi,placement:Ui,builtinPlacements:Qi,getPopupContainer:Xi,empty:gr,getTriggerDOMNode:function(Ni){return to.current||Ni},onPopupVisibleChange:Oo,onPopupMouseEnter:Yc},Ti?St.cloneElement(Ti,{ref:Go}):St.createElement(re,(0,ae.Z)({},Ae,{domRef:to,prefixCls:en,inputElement:zl,ref:bo,id:jn,prefix:Gi,showSearch:Cn,autoClearSearchValue:ii,mode:Kr,activeDescendantId:Jr,tagRender:Ln,values:Rn,open:Jo,onToggleOpen:Wr,activeValue:Dr,searchValue:ls,onSearch:Ir,onSearchSubmit:ws,onRemove:Ml,tokenWithEnter:ni,onInputBlur:Qs}))),mo;return Ti?mo=Du:mo=St.createElement("div",(0,ae.Z)({className:cc},Ar,{ref:wo,onMouseDown:Ul,onKeyDown:Oa,onKeyUp:Ps,onFocus:Xc,onBlur:sc}),St.createElement(Qe,{visible:ia&&!Jo,values:Rn}),Du,Ou,Fa&&Qo),St.createElement(lt.Provider,{value:Wf},mo)}),Ke=We,rn=function(){return null};rn.isSelectOptGroup=!0;var an=rn,ln=function(){return null};ln.isSelectOption=!0;var gn=ln,Gn=le(80547),Zn=le(2738),Kn=le(65283);function Pr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var pr=["disabled","title","children","style","className"];function Er(Ae){return typeof Ae=="string"||typeof Ae=="number"}var Mr=function(Ve,Mn){var jn=ut(),en=jn.prefixCls,kn=jn.id,Pn=jn.open,Ln=jn.multiple,$n=jn.mode,Nn=jn.searchValue,Rn=jn.toggleOpen,Bn=jn.notFoundContent,gr=jn.onPopupScroll,ar=St.useContext(Xe),lr=ar.maxCount,sn=ar.flattenOptions,Kr=ar.onActiveValue,Xr=ar.defaultActiveFirstOption,mi=ar.onSelect,dn=ar.menuItemSelectedIcon,On=ar.rawValues,rr=ar.fieldNames,er=ar.virtual,hr=ar.direction,Dr=ar.listHeight,Gr=ar.listItemHeight,Jr=ar.optionRender,$r="".concat(en,"-item"),ii=(0,Gn.Z)(function(){return sn},[Pn,sn],function(pi,sr){return sr[0]&&pi[1]!==sr[1]}),yn=St.useRef(null),di=St.useMemo(function(){return Ln&&$t(lr)&&(On==null?void 0:On.size)>=lr},[Ln,lr,On==null?void 0:On.size]),mn=function(sr){sr.preventDefault()},oi=function(sr){var yr;(yr=yn.current)===null||yr===void 0||yr.scrollTo(typeof sr=="number"?{index:sr}:sr)},Gi=St.useCallback(function(pi){return $n==="combobox"?!1:On.has(pi)},[$n,(0,Re.Z)(On).toString(),On.size]),bi=function(sr){for(var yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Qr=ii.length,mr=0;mr<Qr;mr+=1){var Vr=(sr+mr*yr+Qr)%Qr,Mi=ii[Vr]||{},kr=Mi.group,ur=Mi.data;if(!kr&&!(ur!=null&&ur.disabled)&&(Gi(ur.value)||!di))return Vr}return-1},Ai=St.useState(function(){return bi(0)}),ai=(0,Bt.Z)(Ai,2),_r=ai[0],vi=ai[1],xo=function(sr){var yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;vi(sr);var Qr={source:yr?"keyboard":"mouse"},mr=ii[sr];if(!mr){Kr(null,-1,Qr);return}Kr(mr.value,sr,Qr)};(0,St.useEffect)(function(){xo(Xr!==!1?bi(0):-1)},[ii.length,Nn]);var Fi=St.useCallback(function(pi){return $n==="combobox"?String(pi).toLowerCase()===Nn.toLowerCase():On.has(pi)},[$n,Nn,(0,Re.Z)(On).toString(),On.size]);(0,St.useEffect)(function(){var pi=setTimeout(function(){if(!Ln&&Pn&&On.size===1){var yr=Array.from(On)[0],Qr=ii.findIndex(function(mr){var Vr=mr.data;return Nn?String(Vr.value).startsWith(Nn):Vr.value===yr});Qr!==-1&&(xo(Qr),oi(Qr))}});if(Pn){var sr;(sr=yn.current)===null||sr===void 0||sr.scrollTo(void 0)}return function(){return clearTimeout(pi)}},[Pn,Nn]);var qn=function(sr){sr!==void 0&&mi(sr,{selected:!On.has(sr)}),Ln||Rn(!1)};if(St.useImperativeHandle(Mn,function(){return{onKeyDown:function(sr){var yr=sr.which,Qr=sr.ctrlKey;switch(yr){case Dt.Z.N:case Dt.Z.P:case Dt.Z.UP:case Dt.Z.DOWN:{var mr=0;if(yr===Dt.Z.UP?mr=-1:yr===Dt.Z.DOWN?mr=1:Pr()&&Qr&&(yr===Dt.Z.N?mr=1:yr===Dt.Z.P&&(mr=-1)),mr!==0){var Vr=bi(_r+mr,mr);oi(Vr),xo(Vr,!0)}break}case Dt.Z.TAB:case Dt.Z.ENTER:{var Mi,kr=ii[_r];kr&&!(kr!=null&&(Mi=kr.data)!==null&&Mi!==void 0&&Mi.disabled)&&!di?qn(kr.value):qn(void 0),Pn&&sr.preventDefault();break}case Dt.Z.ESC:Rn(!1),Pn&&sr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(sr){oi(sr)}}}),ii.length===0)return St.createElement("div",{role:"listbox",id:"".concat(kn,"_list"),className:"".concat($r,"-empty"),onMouseDown:mn},Bn);var Me=Object.keys(rr).map(function(pi){return rr[pi]}),zi=function(sr){return sr.label};function Ui(pi,sr){var yr=pi.group;return{role:yr?"presentation":"option",id:"".concat(kn,"_list_").concat(sr)}}var Qi=function(sr){var yr=ii[sr];if(!yr)return null;var Qr=yr.data||{},mr=Qr.value,Vr=yr.group,Mi=(0,jt.Z)(Qr,!0),kr=zi(yr);return yr?St.createElement("div",(0,ae.Z)({"aria-label":typeof kr=="string"&&!Vr?kr:null},Mi,{key:sr},Ui(yr,sr),{"aria-selected":Fi(mr)}),mr):null},Xi={role:"listbox",id:"".concat(kn,"_list")};return St.createElement(St.Fragment,null,er&&St.createElement("div",(0,ae.Z)({},Xi,{style:{height:0,width:0,overflow:"hidden"}}),Qi(_r-1),Qi(_r),Qi(_r+1)),St.createElement(Kn.Z,{itemKey:"key",ref:yn,data:ii,height:Dr,itemHeight:Gr,fullHeight:!1,onMouseDown:mn,onScroll:gr,virtual:er,direction:hr,innerProps:er?null:Xi},function(pi,sr){var yr=pi.group,Qr=pi.groupOption,mr=pi.data,Vr=pi.label,Mi=pi.value,kr=mr.key;if(yr){var ur,Cn=(ur=mr.title)!==null&&ur!==void 0?ur:Er(Vr)?Vr.toString():void 0;return St.createElement("div",{className:mt()($r,"".concat($r,"-group"),mr.className),title:Cn},Vr!==void 0?Vr:kr)}var Ar=mr.disabled,ci=mr.title,Wi=mr.children,Ei=mr.style,qi=mr.className,wo=(0,vt.Z)(mr,pr),to=(0,Zn.Z)(wo,Me),To=Gi(Mi),bo=Ar||!To&&di,jo="".concat($r,"-option"),on=mt()($r,jo,qi,(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(jo,"-grouped"),Qr),"".concat(jo,"-active"),_r===sr&&!bo),"".concat(jo,"-disabled"),bo),"".concat(jo,"-selected"),To)),Wo=zi(pi),Js=!dn||typeof dn=="function"||To,ia=typeof Wo=="number"?Wo:Wo||Mi,ja=Er(ia)?ia.toString():void 0;return ci!==void 0&&(ja=ci),St.createElement("div",(0,ae.Z)({},(0,jt.Z)(to),er?{}:Ui(pi,sr),{"aria-selected":Fi(Mi),className:on,title:ja,onMouseMove:function(){_r===sr||bo||xo(sr)},onClick:function(){bo||qn(Mi)},style:Ei}),St.createElement("div",{className:"".concat(jo,"-content")},typeof Jr=="function"?Jr(pi,{index:sr}):ia),St.isValidElement(dn)||To,Js&&St.createElement(at,{className:"".concat($r,"-option-state"),customizeIcon:dn,customizeIconProps:{value:Mi,disabled:bo,isSelected:To}},To?"\u2713":null))}))},Fr=St.forwardRef(Mr),vr=Fr,dr=function(Ae,Ve){var Mn=St.useRef({values:new Map,options:new Map}),jn=St.useMemo(function(){var kn=Mn.current,Pn=kn.values,Ln=kn.options,$n=Ae.map(function(Bn){if(Bn.label===void 0){var gr;return(0,_t.Z)((0,_t.Z)({},Bn),{},{label:(gr=Pn.get(Bn.value))===null||gr===void 0?void 0:gr.label})}return Bn}),Nn=new Map,Rn=new Map;return $n.forEach(function(Bn){Nn.set(Bn.value,Bn),Rn.set(Bn.value,Ve.get(Bn.value)||Ln.get(Bn.value))}),Mn.current.values=Nn,Mn.current.options=Rn,$n},[Ae,Ve]),en=St.useCallback(function(kn){return Ve.get(kn)||Mn.current.options.get(kn)},[Ve]);return[jn,en]};function Ur(Ae,Ve){return se(Ae).join("").toUpperCase().includes(Ve)}var qt=function(Ae,Ve,Mn,jn,en){return St.useMemo(function(){if(!Mn||jn===!1)return Ae;var kn=Ve.options,Pn=Ve.label,Ln=Ve.value,$n=[],Nn=typeof jn=="function",Rn=Mn.toUpperCase(),Bn=Nn?jn:function(ar,lr){return en?Ur(lr[en],Rn):lr[kn]?Ur(lr[Pn!=="children"?Pn:"label"],Rn):Ur(lr[Ln],Rn)},gr=Nn?function(ar){return Le(ar)}:function(ar){return ar};return Ae.forEach(function(ar){if(ar[kn]){var lr=Bn(Mn,gr(ar));if(lr)$n.push(ar);else{var sn=ar[kn].filter(function(Kr){return Bn(Mn,gr(Kr))});sn.length&&$n.push((0,_t.Z)((0,_t.Z)({},ar),{},(0,ot.Z)({},kn,sn)))}return}Bn(Mn,gr(ar))&&$n.push(ar)}),$n},[Ae,jn,en,Mn,Ve])},An=le(6551),Xn=le(11592),In=["children","value"],Un=["children"];function Wn(Ae){var Ve=Ae,Mn=Ve.key,jn=Ve.props,en=jn.children,kn=jn.value,Pn=(0,vt.Z)(jn,In);return(0,_t.Z)({key:Mn,value:kn!==void 0?kn:Mn,children:en},Pn)}function ir(Ae){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Xn.Z)(Ae).map(function(Mn,jn){if(!St.isValidElement(Mn)||!Mn.type)return null;var en=Mn,kn=en.type.isSelectOptGroup,Pn=en.key,Ln=en.props,$n=Ln.children,Nn=(0,vt.Z)(Ln,Un);return Ve||!kn?Wn(Mn):(0,_t.Z)((0,_t.Z)({key:"__RC_SELECT_GRP__".concat(Pn===null?jn:Pn,"__"),label:Pn},Nn),{},{options:ir($n)})}).filter(function(Mn){return Mn})}var Lr=function(Ve,Mn,jn,en,kn){return St.useMemo(function(){var Pn=Ve,Ln=!Ve;Ln&&(Pn=ir(Mn));var $n=new Map,Nn=new Map,Rn=function(ar,lr,sn){sn&&typeof sn=="string"&&ar.set(lr[sn],lr)},Bn=function gr(ar){for(var lr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,sn=0;sn<ar.length;sn+=1){var Kr=ar[sn];!Kr[jn.options]||lr?($n.set(Kr[jn.value],Kr),Rn(Nn,Kr,jn.label),Rn(Nn,Kr,en),Rn(Nn,Kr,kn)):gr(Kr[jn.options],!0)}};return Bn(Pn),{options:Pn,valueOptions:$n,labelOptions:Nn}},[Ve,Mn,jn,en,kn])},Rr=Lr;function Ye(Ae){var Ve=St.useRef();Ve.current=Ae;var Mn=St.useCallback(function(){return Ve.current.apply(Ve,arguments)},[]);return Mn}function tn(Ae){var Ve=Ae.mode,Mn=Ae.options,jn=Ae.children,en=Ae.backfill,kn=Ae.allowClear,Pn=Ae.placeholder,Ln=Ae.getInputElement,$n=Ae.showSearch,Nn=Ae.onSearch,Rn=Ae.defaultOpen,Bn=Ae.autoFocus,gr=Ae.labelInValue,ar=Ae.value,lr=Ae.inputValue,sn=Ae.optionLabelProp,Kr=isMultiple(Ve),Xr=$n!==void 0?$n:Kr||Ve==="combobox",mi=Mn||convertChildrenToData(jn);if(warning(Ve!=="tags"||mi.every(function(er){return!er.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ve==="tags"||Ve==="combobox"){var dn=mi.some(function(er){return er.options?er.options.some(function(hr){return typeof("value"in hr?hr.value:hr.key)=="number"}):typeof("value"in er?er.value:er.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ve!=="combobox"||!sn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ve==="combobox"||!en,"`backfill` only works with `combobox` mode."),warning(Ve==="combobox"||!Ln,"`getInputElement` only work with `combobox` mode."),noteOnce(Ve!=="combobox"||!Ln||!kn||!Pn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Nn&&!Xr&&Ve!=="combobox"&&Ve!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Rn||Bn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ar!=null){var On=toArray(ar);warning(!gr||On.every(function(er){return _typeof(er)==="object"&&("key"in er||"value"in er)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Kr||Array.isArray(ar),"`value` should be array when `mode` is `multiple` or `tags`")}if(jn){var rr=null;toNodeArray(jn).some(function(er){if(!React.isValidElement(er)||!er.type)return!1;var hr=er,Dr=hr.type;if(Dr.isSelectOption)return!1;if(Dr.isSelectOptGroup){var Gr=toNodeArray(er.props.children).every(function(Jr){return!React.isValidElement(Jr)||!er.type||Jr.type.isSelectOption?!0:(rr=Jr.type,!1)});return!Gr}return rr=Dr,!0}),rr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(rr.displayName||rr.name||rr,"`.")),warning(lr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ze(Ae,Ve){if(Ae){var Mn=function jn(en){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pn=0;Pn<en.length;Pn++){var Ln=en[Pn];if(Ln[Ve==null?void 0:Ve.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!kn&&Array.isArray(Ln[Ve==null?void 0:Ve.options])&&jn(Ln[Ve==null?void 0:Ve.options],!0))break}};Mn(Ae)}}var zn=null,Qn=["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"],Jn=["inputValue"];function bn(Ae){return!Ae||(0,gt.Z)(Ae)!=="object"}var Fn=St.forwardRef(function(Ae,Ve){var Mn=Ae.id,jn=Ae.mode,en=Ae.prefixCls,kn=en===void 0?"rc-select":en,Pn=Ae.backfill,Ln=Ae.fieldNames,$n=Ae.inputValue,Nn=Ae.searchValue,Rn=Ae.onSearch,Bn=Ae.autoClearSearchValue,gr=Bn===void 0?!0:Bn,ar=Ae.onSelect,lr=Ae.onDeselect,sn=Ae.dropdownMatchSelectWidth,Kr=sn===void 0?!0:sn,Xr=Ae.filterOption,mi=Ae.filterSort,dn=Ae.optionFilterProp,On=Ae.optionLabelProp,rr=Ae.options,er=Ae.optionRender,hr=Ae.children,Dr=Ae.defaultActiveFirstOption,Gr=Ae.menuItemSelectedIcon,Jr=Ae.virtual,$r=Ae.direction,ii=Ae.listHeight,yn=ii===void 0?200:ii,di=Ae.listItemHeight,mn=di===void 0?20:di,oi=Ae.labelRender,Gi=Ae.value,bi=Ae.defaultValue,Ai=Ae.labelInValue,ai=Ae.onChange,_r=Ae.maxCount,vi=(0,vt.Z)(Ae,Qn),xo=(0,An.ZP)(Mn),Fi=Ue(jn),qn=!!(!rr&&hr),Me=St.useMemo(function(){return Xr===void 0&&jn==="combobox"?!1:Xr},[Xr,jn]),zi=St.useMemo(function(){return ue(Ln,qn)},[JSON.stringify(Ln),qn]),Ui=(0,kt.Z)("",{value:Nn!==void 0?Nn:$n,postState:function(ni){return ni||""}}),Qi=(0,Bt.Z)(Ui,2),Xi=Qi[0],pi=Qi[1],sr=Rr(rr,hr,zi,dn,On),yr=sr.valueOptions,Qr=sr.labelOptions,mr=sr.options,Vr=St.useCallback(function(Wr){var ni=se(Wr);return ni.map(function(si){var gi,Ki,Ir,ws,oa;if(bn(si))gi=si;else{var Ho;Ir=si.key,Ki=si.label,gi=(Ho=si.value)!==null&&Ho!==void 0?Ho:Ir}var lo=yr.get(gi);if(lo){var Ja;if(Ki===void 0&&(Ki=lo==null?void 0:lo[On||zi.label]),Ir===void 0&&(Ir=(Ja=lo==null?void 0:lo.key)!==null&&Ja!==void 0?Ja:gi),ws=lo==null?void 0:lo.disabled,oa=lo==null?void 0:lo.title,0)var bs}return{label:Ki,value:gi,key:Ir,disabled:ws,title:oa}})},[zi,On,yr]),Mi=(0,kt.Z)(bi,{value:Gi}),kr=(0,Bt.Z)(Mi,2),ur=kr[0],Cn=kr[1],Ar=St.useMemo(function(){var Wr,ni=Fi&&ur===null?[]:ur,si=Vr(ni);return jn==="combobox"&&ee((Wr=si[0])===null||Wr===void 0?void 0:Wr.value)?[]:si},[ur,Vr,jn,Fi]),ci=dr(Ar,yr),Wi=(0,Bt.Z)(ci,2),Ei=Wi[0],qi=Wi[1],wo=St.useMemo(function(){if(!jn&&Ei.length===1){var Wr=Ei[0];if(Wr.value===null&&(Wr.label===null||Wr.label===void 0))return[]}return Ei.map(function(ni){var si;return(0,_t.Z)((0,_t.Z)({},ni),{},{label:(si=typeof oi=="function"?oi(ni):ni.label)!==null&&si!==void 0?si:ni.value})})},[jn,Ei,oi]),to=St.useMemo(function(){return new Set(Ei.map(function(Wr){return Wr.value}))},[Ei]);St.useEffect(function(){if(jn==="combobox"){var Wr,ni=(Wr=Ei[0])===null||Wr===void 0?void 0:Wr.value;pi(Yt(ni)?String(ni):"")}},[Ei]);var To=Ye(function(Wr,ni){var si=ni!=null?ni:Wr;return(0,ot.Z)((0,ot.Z)({},zi.value,Wr),zi.label,si)}),bo=St.useMemo(function(){if(jn!=="tags")return mr;var Wr=(0,Re.Z)(mr),ni=function(gi){return yr.has(gi)};return(0,Re.Z)(Ei).sort(function(si,gi){return si.value<gi.value?-1:1}).forEach(function(si){var gi=si.value;ni(gi)||Wr.push(To(gi,si.label))}),Wr},[To,mr,yr,Ei,jn]),jo=qt(bo,zi,Xi,Me,dn),on=St.useMemo(function(){return jn!=="tags"||!Xi||jo.some(function(Wr){return Wr[dn||"value"]===Xi})||jo.some(function(Wr){return Wr[zi.value]===Xi})?jo:[To(Xi)].concat((0,Re.Z)(jo))},[To,dn,jn,jo,Xi,zi]),Wo=function Wr(ni){var si=(0,Re.Z)(ni).sort(function(gi,Ki){return mi(gi,Ki,{searchValue:Xi})});return si.map(function(gi){return Array.isArray(gi.options)?(0,_t.Z)((0,_t.Z)({},gi),{},{options:gi.options.length>0?Wr(gi.options):gi.options}):gi})},Js=St.useMemo(function(){return mi?Wo(on):on},[on,mi,Xi]),ia=St.useMemo(function(){return me(Js,{fieldNames:zi,childrenAsData:qn})},[Js,zi,qn]),ja=function(ni){var si=Vr(ni);if(Cn(si),ai&&(si.length!==Ei.length||si.some(function(Ir,ws){var oa;return((oa=Ei[ws])===null||oa===void 0?void 0:oa.value)!==(Ir==null?void 0:Ir.value)}))){var gi=Ai?si:si.map(function(Ir){return Ir.value}),Ki=si.map(function(Ir){return Le(qi(Ir.value))});ai(Fi?gi:gi[0],Fi?Ki:Ki[0])}},so=St.useState(null),ls=(0,Bt.Z)(so,2),zl=ls[0],Ti=ls[1],Go=St.useState(0),El=(0,Bt.Z)(Go,2),pa=El[0],uu=El[1],xs=Dr!==void 0?Dr:jn!=="combobox",Br=St.useCallback(function(Wr,ni){var si=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},gi=si.source,Ki=gi===void 0?"keyboard":gi;uu(ni),Pn&&jn==="combobox"&&Wr!==null&&Ki==="keyboard"&&Ti(String(Wr))},[Pn,jn]),Gl=function(ni,si,gi){var Ki=function(){var Ml,Qs=qi(ni);return[Ai?{label:Qs==null?void 0:Qs[zi.label],value:ni,key:(Ml=Qs==null?void 0:Qs.key)!==null&&Ml!==void 0?Ml:ni}:ni,Le(Qs)]};if(si&&ar){var Ir=Ki(),ws=(0,Bt.Z)(Ir,2),oa=ws[0],Ho=ws[1];ar(oa,Ho)}else if(!si&&lr&&gi!=="clear"){var lo=Ki(),Ja=(0,Bt.Z)(lo,2),bs=Ja[0],Oa=Ja[1];lr(bs,Oa)}},hu=Ye(function(Wr,ni){var si,gi=Fi?ni.selected:!0;gi?si=Fi?[].concat((0,Re.Z)(Ei),[Wr]):[Wr]:si=Ei.filter(function(Ki){return Ki.value!==Wr}),ja(si),Gl(Wr,gi),jn==="combobox"?Ti(""):(!Ue||gr)&&(pi(""),Ti(""))}),us=function(ni,si){ja(ni);var gi=si.type,Ki=si.values;(gi==="remove"||gi==="clear")&&Ki.forEach(function(Ir){Gl(Ir.value,!1,gi)})},Jo=function(ni,si){if(pi(ni),Ti(null),si.source==="submit"){var gi=(ni||"").trim();if(gi){var Ki=Array.from(new Set([].concat((0,Re.Z)(to),[gi])));ja(Ki),Gl(gi,!0),pi("")}return}si.source!=="blur"&&(jn==="combobox"&&ja(ni),Rn==null||Rn(ni))},Nu=function(ni){var si=ni;jn!=="tags"&&(si=ni.map(function(Ki){var Ir=Qr.get(Ki);return Ir==null?void 0:Ir.value}).filter(function(Ki){return Ki!==void 0}));var gi=Array.from(new Set([].concat((0,Re.Z)(to),(0,Re.Z)(si))));ja(gi),gi.forEach(function(Ki){Gl(Ki,!0)})},nr=St.useMemo(function(){var Wr=Jr!==!1&&Kr!==!1;return(0,_t.Z)((0,_t.Z)({},sr),{},{flattenOptions:ia,onActiveValue:Br,defaultActiveFirstOption:xs,onSelect:hu,menuItemSelectedIcon:Gr,rawValues:to,fieldNames:zi,virtual:Wr,direction:$r,listHeight:yn,listItemHeight:mn,childrenAsData:qn,maxCount:_r,optionRender:er})},[_r,sr,ia,Br,xs,hu,Gr,to,zi,Jr,Kr,$r,yn,mn,qn,er]);return St.createElement(Xe.Provider,{value:nr},St.createElement(Ke,(0,ae.Z)({},vi,{id:xo,prefixCls:kn,ref:Ve,omitDomProps:Jn,mode:jn,displayValues:wo,onDisplayValuesChange:us,direction:$r,searchValue:Xi,onSearch:Jo,autoClearSearchValue:gr,onSearchSplit:Nu,dropdownMatchSelectWidth:Kr,OptionList:vr,emptyOptions:!ia.length,activeValue:zl,activeDescendantId:"".concat(xo,"_list_").concat(pa)})))}),cr=Fn;cr.Option=gn,cr.OptGroup=an;var wr=cr,Or=wr},63158:function(fn,cn,le){"use strict";var ae=le(71409),Re=le(87075),ot=le(11036),_t=le(39224),Bt=le(59301),vt=le(92310),gt=le.n(vt),kt=le(18929),bt=le(10228),St=["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,Pt=mt.checkedChildren,At=mt.unCheckedChildren,Dt=mt.onClick,Ft=mt.onChange,jt=mt.onKeyDown,Nt=(0,_t.Z)(mt,St),Gt=(0,kt.Z)(!1,{value:it,defaultValue:lt}),Wt=(0,ot.Z)(Gt,2),Jt=Wt[0],Ut=Wt[1];function Ht(Pe,Yt){var ee=Jt;return ut||(ee=Pe,Ut(ee),Ft==null||Ft(ee,Yt)),ee}function oe(Pe){Pe.which===bt.Z.LEFT?Ht(!1,Pe):Pe.which===bt.Z.RIGHT&&Ht(!0,Pe),jt==null||jt(Pe)}function se(Pe){var Yt=Ht(!Jt,Pe);Dt==null||Dt(Yt,Pe)}var fe=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:fe,ref:xt,onKeyDown:oe,onClick:se}),dt,Bt.createElement("span",{className:"".concat(tt,"-inner")},Bt.createElement("span",{className:"".concat(tt,"-inner-checked")},Pt),Bt.createElement("span",{className:"".concat(tt,"-inner-unchecked")},At)))});Tt.displayName="Switch",cn.Z=Tt},22711:function(fn,cn,le){"use strict";le.r(cn),le.d(cn,{ResizableTextArea:function(){return Wt},default:function(){return oe}});var ae=le(71409),Re=le(87075),ot=le(89490),_t=le(62730),Bt=le(11036),vt=le(39224),gt=le(92310),kt=le.n(gt),bt=le(36901),St=le(66003),Tt=le(30292),mt=le(18929),xt=le(59301),ft=le(28788),z=le(29301),tt=le(34280),at=le(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 Pt(se){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=se.getAttribute("id")||se.getAttribute("data-reactid")||se.getAttribute("name");if(fe&&ut[Pe])return ut[Pe];var Yt=window.getComputedStyle(se),ee=Yt.getPropertyValue("box-sizing")||Yt.getPropertyValue("-moz-box-sizing")||Yt.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(Yt.getPropertyValue("padding-bottom"))+parseFloat(Yt.getPropertyValue("padding-top")),xe=parseFloat(Yt.getPropertyValue("border-bottom-width"))+parseFloat(Yt.getPropertyValue("border-top-width")),be=lt.map(function(pe){return"".concat(pe,":").concat(Yt.getPropertyValue(pe))}).join(";"),ce={sizingStyle:be,paddingSize:ye,borderSize:xe,boxSizing:ee};return fe&&Pe&&(ut[Pe]=ce),ce}function At(se){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=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 ee=Pt(se,fe),ye=ee.paddingSize,xe=ee.borderSize,be=ee.boxSizing,ce=ee.sizingStyle;dt.setAttribute("style","".concat(ce,";").concat(it)),dt.value=se.value||se.placeholder||"";var pe=void 0,he=void 0,Ce,de=dt.scrollHeight;if(be==="border-box"?de+=xe:be==="content-box"&&(de-=ye),Pe!==null||Yt!==null){dt.value=" ";var Fe=dt.scrollHeight-ye;Pe!==null&&(pe=Fe*Pe,be==="border-box"&&(pe=pe+ye+xe),de=Math.max(pe,de)),Yt!==null&&(he=Fe*Yt,be==="border-box"&&(he=he+ye+xe),Ce=de>he?"":"hidden",de=Math.min(he,de))}var ge={height:de,overflowY:Ce,resize:"none"};return pe&&(ge.minHeight=pe),he&&(ge.maxHeight=he),ge}var Dt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ft=0,jt=1,Nt=2,Gt=xt.forwardRef(function(se,fe){var Pe=se,Yt=Pe.prefixCls,ee=Pe.defaultValue,ye=Pe.value,xe=Pe.autoSize,be=Pe.onResize,ce=Pe.className,pe=Pe.style,he=Pe.disabled,Ce=Pe.onChange,de=Pe.onInternalAutoSize,Fe=(0,vt.Z)(Pe,Dt),ge=(0,mt.Z)(ee,{value:ye,postState:function(gn){return gn!=null?gn:""}}),Se=(0,Bt.Z)(ge,2),re=Se[0],Kt=Se[1],wt=function(gn){Kt(gn.target.value),Ce==null||Ce(gn)},Lt=xt.useRef();xt.useImperativeHandle(fe,function(){return{textArea:Lt.current}});var Xt=xt.useMemo(function(){return xe&&(0,ft.Z)(xe)==="object"?[xe.minRows,xe.maxRows]:[]},[xe]),ne=(0,Bt.Z)(Xt,2),It=ne[0],Rt=ne[1],Vt=!!xe,$t=function(){try{if(document.activeElement===Lt.current){var gn=Lt.current,Gn=gn.selectionStart,Zn=gn.selectionEnd,Kn=gn.scrollTop;Lt.current.setSelectionRange(Gn,Zn),Lt.current.scrollTop=Kn}}catch(Pr){}},ue=xt.useState(Nt),me=(0,Bt.Z)(ue,2),Le=me[0],Ne=me[1],Be=xt.useState(),Xe=(0,Bt.Z)(Be,2),Qe=Xe[0],qe=Xe[1],He=function(){Ne(Ft)};(0,tt.Z)(function(){Vt&&He()},[ye,It,Rt,Vt]),(0,tt.Z)(function(){if(Le===Ft)Ne(jt);else if(Le===jt){var ln=At(Lt.current,!1,It,Rt);Ne(Nt),qe(ln)}else $t()},[Le]);var Ue=xt.useRef(),We=function(){at.Z.cancel(Ue.current)},Ke=function(gn){Le===Nt&&(be==null||be(gn),xe&&(We(),Ue.current=(0,at.Z)(function(){He()})))};xt.useEffect(function(){return We},[]);var rn=Vt?Qe:null,an=(0,ot.Z)((0,ot.Z)({},pe),rn);return(Le===Ft||Le===jt)&&(an.overflowY="hidden",an.overflowX="hidden"),xt.createElement(z.Z,{onResize:Ke,disabled:!(xe||be)},xt.createElement("textarea",(0,ae.Z)({},Fe,{ref:Lt,style:an,className:kt()(Yt,ce,(0,Re.Z)({},"".concat(Yt,"-disabled"),he)),disabled:he,value:re,onChange:wt})))}),Wt=Gt,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,fe){var Pe,Yt=se.defaultValue,ee=se.value,ye=se.onFocus,xe=se.onBlur,be=se.onChange,ce=se.allowClear,pe=se.maxLength,he=se.onCompositionStart,Ce=se.onCompositionEnd,de=se.suffix,Fe=se.prefixCls,ge=Fe===void 0?"rc-textarea":Fe,Se=se.showCount,re=se.count,Kt=se.className,wt=se.style,Lt=se.disabled,Xt=se.hidden,ne=se.classNames,It=se.styles,Rt=se.onResize,Vt=se.onClear,$t=se.onPressEnter,ue=se.readOnly,me=se.autoSize,Le=se.onKeyDown,Ne=(0,vt.Z)(se,Jt),Be=(0,mt.Z)(Yt,{value:ee,defaultValue:Yt}),Xe=(0,Bt.Z)(Be,2),Qe=Xe[0],qe=Xe[1],He=Qe==null?"":String(Qe),Ue=xt.useState(!1),We=(0,Bt.Z)(Ue,2),Ke=We[0],rn=We[1],an=xt.useRef(!1),ln=xt.useState(null),gn=(0,Bt.Z)(ln,2),Gn=gn[0],Zn=gn[1],Kn=(0,xt.useRef)(null),Pr=(0,xt.useRef)(null),pr=function(){var cr;return(cr=Pr.current)===null||cr===void 0?void 0:cr.textArea},Er=function(){pr().focus()};(0,xt.useImperativeHandle)(fe,function(){var Fn;return{resizableTextArea:Pr.current,focus:Er,blur:function(){pr().blur()},nativeElement:((Fn=Kn.current)===null||Fn===void 0?void 0:Fn.nativeElement)||pr()}}),(0,xt.useEffect)(function(){rn(function(Fn){return!Lt&&Fn})},[Lt]);var Mr=xt.useState(null),Fr=(0,Bt.Z)(Mr,2),vr=Fr[0],dr=Fr[1];xt.useEffect(function(){if(vr){var Fn;(Fn=pr()).setSelectionRange.apply(Fn,(0,_t.Z)(vr))}},[vr]);var Ur=(0,St.Z)(re,Se),qt=(Pe=Ur.max)!==null&&Pe!==void 0?Pe:pe,An=Number(qt)>0,Xn=Ur.strategy(He),In=!!qt&&Xn>qt,Un=function(cr,wr){var Or=wr;!an.current&&Ur.exceedFormatter&&Ur.max&&Ur.strategy(wr)>Ur.max&&(Or=Ur.exceedFormatter(wr,{max:Ur.max}),wr!==Or&&dr([pr().selectionStart||0,pr().selectionEnd||0])),qe(Or),(0,Tt.rJ)(cr.currentTarget,cr,be,Or)},Wn=function(cr){an.current=!0,he==null||he(cr)},ir=function(cr){an.current=!1,Un(cr,cr.currentTarget.value),Ce==null||Ce(cr)},Lr=function(cr){Un(cr,cr.target.value)},Rr=function(cr){cr.key==="Enter"&&$t&&$t(cr),Le==null||Le(cr)},Ye=function(cr){rn(!0),ye==null||ye(cr)},tn=function(cr){rn(!1),xe==null||xe(cr)},Ze=function(cr){qe(""),Er(),(0,Tt.rJ)(pr(),cr,be)},zn=de,Qn;Ur.show&&(Ur.showFormatter?Qn=Ur.showFormatter({value:He,count:Xn,maxLength:qt}):Qn="".concat(Xn).concat(An?" / ".concat(qt):""),zn=xt.createElement(xt.Fragment,null,zn,xt.createElement("span",{className:kt()("".concat(ge,"-data-count"),ne==null?void 0:ne.count),style:It==null?void 0:It.count},Qn)));var Jn=function(cr){var wr;Rt==null||Rt(cr),(wr=pr())!==null&&wr!==void 0&&wr.style.height&&Zn(!0)},bn=!me&&!Se&&!ce;return xt.createElement(bt.BaseInput,{ref:Kn,value:He,allowClear:ce,handleReset:Ze,suffix:zn,prefixCls:ge,classNames:(0,ot.Z)((0,ot.Z)({},ne),{},{affixWrapper:kt()(ne==null?void 0:ne.affixWrapper,(0,Re.Z)((0,Re.Z)({},"".concat(ge,"-show-count"),Se),"".concat(ge,"-textarea-allow-clear"),ce))}),disabled:Lt,focused:Ke,className:kt()(Kt,In&&"".concat(ge,"-out-of-range")),style:(0,ot.Z)((0,ot.Z)({},wt),Gn&&!bn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qn=="string"?Qn:void 0}},hidden:Xt,readOnly:ue,onClear:Vt},xt.createElement(Wt,(0,ae.Z)({},Ne,{autoSize:me,maxLength:pe,onKeyDown:Rr,onChange:Lr,onFocus:Ye,onBlur:tn,onCompositionStart:Wn,onCompositionEnd:ir,className:kt()(ne==null?void 0:ne.textarea),style:(0,ot.Z)((0,ot.Z)({},It==null?void 0:It.textarea),{},{resize:wt==null?void 0:wt.resize}),disabled:Lt,prefixCls:ge,onResize:Jn,ref:Pr,readOnly:ue})))}),Ht=Ut,oe=Ht},639:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return ut}});var ae=le(71409),Re=le(87075),ot=le(89490),_t=le(11036),Bt=le(39224),vt=le(59301),gt=le(92310),kt=le.n(gt),bt=le(26112),St=le(30699),Tt=function(Pt){for(var At=Pt.prefixCls,Dt=Pt.level,Ft=Pt.isStart,jt=Pt.isEnd,Nt="".concat(At,"-indent-unit"),Gt=[],Wt=0;Wt<Dt;Wt+=1)Gt.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")},Gt)},mt=vt.memo(Tt),xt=le(65065),ft=le(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(Pt){var At,Dt,Ft,jt=Pt.eventKey,Nt=Pt.className,Gt=Pt.style,Wt=Pt.dragOver,Jt=Pt.dragOverGapTop,Ut=Pt.dragOverGapBottom,Ht=Pt.isLeaf,oe=Pt.isStart,se=Pt.isEnd,fe=Pt.expanded,Pe=Pt.selected,Yt=Pt.checked,ee=Pt.halfChecked,ye=Pt.loading,xe=Pt.domRef,be=Pt.active,ce=Pt.data,pe=Pt.onMouseMove,he=Pt.selectable,Ce=(0,Bt.Z)(Pt,z),de=vt.useContext(St.k),Fe=vt.useContext(St.y),ge=vt.useRef(null),Se=vt.useState(!1),re=(0,_t.Z)(Se,2),Kt=re[0],wt=re[1],Lt=!!(de.disabled||Pt.disabled||(At=Fe.nodeDisabled)!==null&&At!==void 0&&At.call(Fe,ce)),Xt=vt.useMemo(function(){return!de.checkable||Pt.checkable===!1?!1:de.checkable},[de.checkable,Pt.checkable]),ne=function(Xn){Lt||de.onNodeSelect(Xn,(0,ft.F)(Pt))},It=function(Xn){Lt||!Xt||Pt.disableCheckbox||de.onNodeCheck(Xn,(0,ft.F)(Pt),!Yt)},Rt=vt.useMemo(function(){return typeof he=="boolean"?he:de.selectable},[he,de.selectable]),Vt=function(Xn){de.onNodeClick(Xn,(0,ft.F)(Pt)),Rt?ne(Xn):It(Xn)},$t=function(Xn){de.onNodeDoubleClick(Xn,(0,ft.F)(Pt))},ue=function(Xn){de.onNodeMouseEnter(Xn,(0,ft.F)(Pt))},me=function(Xn){de.onNodeMouseLeave(Xn,(0,ft.F)(Pt))},Le=function(Xn){de.onNodeContextMenu(Xn,(0,ft.F)(Pt))},Ne=vt.useMemo(function(){return!!(de.draggable&&(!de.draggable.nodeDraggable||de.draggable.nodeDraggable(ce)))},[de.draggable,ce]),Be=function(Xn){Xn.stopPropagation(),wt(!0),de.onNodeDragStart(Xn,Pt);try{Xn.dataTransfer.setData("text/plain","")}catch(In){}},Xe=function(Xn){Xn.preventDefault(),Xn.stopPropagation(),de.onNodeDragEnter(Xn,Pt)},Qe=function(Xn){Xn.preventDefault(),Xn.stopPropagation(),de.onNodeDragOver(Xn,Pt)},qe=function(Xn){Xn.stopPropagation(),de.onNodeDragLeave(Xn,Pt)},He=function(Xn){Xn.stopPropagation(),wt(!1),de.onNodeDragEnd(Xn,Pt)},Ue=function(Xn){Xn.preventDefault(),Xn.stopPropagation(),wt(!1),de.onNodeDrop(Xn,Pt)},We=function(Xn){ye||de.onNodeExpand(Xn,(0,ft.F)(Pt))},Ke=vt.useMemo(function(){var An=(0,xt.Z)(de.keyEntities,jt)||{},Xn=An.children;return!!(Xn||[]).length},[de.keyEntities,jt]),rn=vt.useMemo(function(){return Ht===!1?!1:Ht||!de.loadData&&!Ke||de.loadData&&Pt.loaded&&!Ke},[Ht,de.loadData,Ke,Pt.loaded]);vt.useEffect(function(){ye||typeof de.loadData=="function"&&fe&&!rn&&!Pt.loaded&&de.onNodeLoad((0,ft.F)(Pt))},[ye,de.loadData,de.onNodeLoad,fe,rn,Pt]);var an=vt.useMemo(function(){var An;return(An=de.draggable)!==null&&An!==void 0&&An.icon?vt.createElement("span",{className:"".concat(de.prefixCls,"-draggable-icon")},de.draggable.icon):null},[de.draggable]),ln=function(Xn){var In=Pt.switcherIcon||de.switcherIcon;return typeof In=="function"?In((0,ot.Z)((0,ot.Z)({},Pt),{},{isLeaf:Xn})):In},gn=function(){if(rn){var Xn=ln(!0);return Xn!==!1?vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-switcher"),"".concat(de.prefixCls,"-switcher-noop"))},Xn):null}var In=ln(!1);return In!==!1?vt.createElement("span",{onClick:We,className:kt()("".concat(de.prefixCls,"-switcher"),"".concat(de.prefixCls,"-switcher_").concat(fe?tt:at))},In):null},Gn=vt.useMemo(function(){if(!Xt)return null;var An=typeof Xt!="boolean"?Xt:null;return vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-checkbox"),(0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(de.prefixCls,"-checkbox-checked"),Yt),"".concat(de.prefixCls,"-checkbox-indeterminate"),!Yt&&ee),"".concat(de.prefixCls,"-checkbox-disabled"),Lt||Pt.disableCheckbox)),onClick:It,role:"checkbox","aria-checked":ee?"mixed":Yt,"aria-disabled":Lt||Pt.disableCheckbox,"aria-label":"Select ".concat(typeof Pt.title=="string"?Pt.title:"tree node")},An)},[Xt,Yt,ee,Lt,Pt.disableCheckbox,Pt.title]),Zn=vt.useMemo(function(){return rn?null:fe?tt:at},[rn,fe]),Kn=vt.useMemo(function(){return vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-iconEle"),"".concat(de.prefixCls,"-icon__").concat(Zn||"docu"),(0,Re.Z)({},"".concat(de.prefixCls,"-icon_loading"),ye))})},[de.prefixCls,Zn,ye]),Pr=vt.useMemo(function(){var An=!!de.draggable,Xn=!Pt.disabled&&An&&de.dragOverNodeKey===jt;return Xn?de.dropIndicatorRender({dropPosition:de.dropPosition,dropLevelOffset:de.dropLevelOffset,indent:de.indent,prefixCls:de.prefixCls,direction:de.direction}):null},[de.dropPosition,de.dropLevelOffset,de.indent,de.prefixCls,de.direction,de.draggable,de.dragOverNodeKey,de.dropIndicatorRender]),pr=vt.useMemo(function(){var An=Pt.title,Xn=An===void 0?it:An,In="".concat(de.prefixCls,"-node-content-wrapper"),Un;if(de.showIcon){var Wn=Pt.icon||de.icon;Un=Wn?vt.createElement("span",{className:kt()("".concat(de.prefixCls,"-iconEle"),"".concat(de.prefixCls,"-icon__customize"))},typeof Wn=="function"?Wn(Pt):Wn):Kn}else de.loadData&&ye&&(Un=Kn);var ir;return typeof Xn=="function"?ir=Xn(ce):de.titleRender?ir=de.titleRender(ce):ir=Xn,vt.createElement("span",{ref:ge,title:typeof Xn=="string"?Xn:"",className:kt()(In,"".concat(In,"-").concat(Zn||"normal"),(0,Re.Z)({},"".concat(de.prefixCls,"-node-selected"),!Lt&&(Pe||Kt))),onMouseEnter:ue,onMouseLeave:me,onContextMenu:Le,onClick:Vt,onDoubleClick:$t},Un,vt.createElement("span",{className:"".concat(de.prefixCls,"-title")},ir),Pr)},[de.prefixCls,de.showIcon,Pt,de.icon,Kn,de.titleRender,ce,Zn,ue,me,Le,Vt,$t]),Er=(0,bt.Z)(Ce,{aria:!0,data:!0}),Mr=(0,xt.Z)(de.keyEntities,jt)||{},Fr=Mr.level,vr=se[se.length-1],dr=!Lt&&Ne,Ur=de.draggingNodeKey===jt,qt=he!==void 0?{"aria-selected":!!he}:void 0;return vt.createElement("div",(0,ae.Z)({ref:xe,role:"treeitem","aria-expanded":Ht?void 0:fe,className:kt()(Nt,"".concat(de.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(de.prefixCls,"-treenode-disabled"),Lt),"".concat(de.prefixCls,"-treenode-switcher-").concat(fe?"open":"close"),!Ht),"".concat(de.prefixCls,"-treenode-checkbox-checked"),Yt),"".concat(de.prefixCls,"-treenode-checkbox-indeterminate"),ee),"".concat(de.prefixCls,"-treenode-selected"),Pe),"".concat(de.prefixCls,"-treenode-loading"),ye),"".concat(de.prefixCls,"-treenode-active"),be),"".concat(de.prefixCls,"-treenode-leaf-last"),vr),"".concat(de.prefixCls,"-treenode-draggable"),Ne),"dragging",Ur),(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Ft,"drop-target",de.dropTargetKey===jt),"drop-container",de.dropContainerKey===jt),"drag-over",!Lt&&Wt),"drag-over-gap-top",!Lt&&Jt),"drag-over-gap-bottom",!Lt&&Ut),"filter-node",(Dt=de.filterTreeNode)===null||Dt===void 0?void 0:Dt.call(de,(0,ft.F)(Pt))),"".concat(de.prefixCls,"-treenode-leaf"),rn))),style:Gt,draggable:dr,onDragStart:dr?Be:void 0,onDragEnter:Ne?Xe:void 0,onDragOver:Ne?Qe:void 0,onDragLeave:Ne?qe:void 0,onDrop:Ne?Ue:void 0,onDragEnd:Ne?He:void 0,onMouseMove:pe},qt,Er),vt.createElement(mt,{prefixCls:de.prefixCls,level:Fr,isStart:oe,isEnd:se}),an,gn(),Gn,pr)};lt.isTreeNode=1;var ut=lt},30699:function(fn,cn,le){"use strict";le.d(cn,{k:function(){return Re},y:function(){return ot}});var ae=le(59301),Re=ae.createContext(null),ot=ae.createContext({})},62379:function(fn,cn,le){"use strict";le.d(cn,{OF:function(){return jt.Z},y6:function(){return at.y},ZP:function(){return Lt}});var ae=le(71409),Re=le(28788),ot=le(89490),_t=le(62730),Bt=le(16552),vt=le(19210),gt=le(90264),kt=le(46654),bt=le(37205),St=le(87075),Tt=le(92310),mt=le.n(Tt),xt=le(10228),ft=le(26112),z=le(48736),tt=le(59301),at=le(30699),it=function(ne){var It=ne.dropPosition,Rt=ne.dropLevelOffset,Vt=ne.indent,$t={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(It){case-1:$t.top=0,$t.left=-Rt*Vt;break;case 1:$t.bottom=0,$t.left=-Rt*Vt;break;case 0:$t.bottom=0,$t.left=Vt;break}return tt.createElement("div",{style:$t})},lt=it;function ut(Xt){if(Xt==null)throw new TypeError("Cannot destructure "+Xt)}var dt=le(11036),Pt=le(39224),At=le(34280),Dt=le(65283),Ft=le(77900),jt=le(639);function Nt(Xt,ne){var It=tt.useState(!1),Rt=(0,dt.Z)(It,2),Vt=Rt[0],$t=Rt[1];(0,At.Z)(function(){if(Vt)return Xt(),function(){ne()}},[Vt]),(0,At.Z)(function(){return $t(!0),function(){$t(!1)}},[])}var Gt=Nt,Wt=le(34061),Jt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ut=tt.forwardRef(function(Xt,ne){var It=Xt.className,Rt=Xt.style,Vt=Xt.motion,$t=Xt.motionNodes,ue=Xt.motionType,me=Xt.onMotionStart,Le=Xt.onMotionEnd,Ne=Xt.active,Be=Xt.treeNodeRequiredProps,Xe=(0,Pt.Z)(Xt,Jt),Qe=tt.useState(!0),qe=(0,dt.Z)(Qe,2),He=qe[0],Ue=qe[1],We=tt.useContext(at.k),Ke=We.prefixCls,rn=$t&&ue!=="hide";(0,At.Z)(function(){$t&&rn!==He&&Ue(rn)},[$t]);var an=function(){$t&&me()},ln=tt.useRef(!1),gn=function(){$t&&!ln.current&&(ln.current=!0,Le())};Gt(an,gn);var Gn=function(Kn){rn===Kn&&gn()};return $t?tt.createElement(Ft.default,(0,ae.Z)({ref:ne,visible:He},Vt,{motionAppear:ue==="show",onVisibleChanged:Gn}),function(Zn,Kn){var Pr=Zn.className,pr=Zn.style;return tt.createElement("div",{ref:Kn,className:mt()("".concat(Ke,"-treenode-motion"),Pr),style:pr},$t.map(function(Er){var Mr=Object.assign({},(ut(Er.data),Er.data)),Fr=Er.title,vr=Er.key,dr=Er.isStart,Ur=Er.isEnd;delete Mr.children;var qt=(0,Wt.H8)(vr,Be);return tt.createElement(jt.Z,(0,ae.Z)({},Mr,qt,{title:Fr,active:Ne,data:Er.data,key:vr,isStart:dr,isEnd:Ur}))}))}):tt.createElement(jt.Z,(0,ae.Z)({domRef:ne,className:It,style:Rt},Xe,{active:Ne}))}),Ht=Ut;function oe(){var Xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],It=Xt.length,Rt=ne.length;if(Math.abs(It-Rt)!==1)return{add:!1,key:null};function Vt($t,ue){var me=new Map;$t.forEach(function(Ne){me.set(Ne,!0)});var Le=ue.filter(function(Ne){return!me.has(Ne)});return Le.length===1?Le[0]:null}return It<Rt?{add:!0,key:Vt(Xt,ne)}:{add:!1,key:Vt(ne,Xt)}}function se(Xt,ne,It){var Rt=Xt.findIndex(function(me){return me.key===It}),Vt=Xt[Rt+1],$t=ne.findIndex(function(me){return me.key===It});if(Vt){var ue=ne.findIndex(function(me){return me.key===Vt.key});return ne.slice($t+1,ue)}return ne.slice($t+1)}var fe=["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"],Pe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Yt=function(){},ee="RC_TREE_MOTION_".concat(Math.random()),ye={key:ee},xe={key:ee,level:0,index:0,pos:"0",node:ye,nodes:[ye]},be={parent:null,children:[],pos:xe.pos,data:ye,title:null,key:ee,isStart:[],isEnd:[]};function ce(Xt,ne,It,Rt){return ne===!1||!It?Xt:Xt.slice(0,Math.ceil(It/Rt)+1)}function pe(Xt){var ne=Xt.key,It=Xt.pos;return(0,Wt.km)(ne,It)}function he(Xt){for(var ne=String(Xt.data.key),It=Xt;It.parent;)It=It.parent,ne="".concat(It.data.key," > ").concat(ne);return ne}var Ce=tt.forwardRef(function(Xt,ne){var It=Xt.prefixCls,Rt=Xt.data,Vt=Xt.selectable,$t=Xt.checkable,ue=Xt.expandedKeys,me=Xt.selectedKeys,Le=Xt.checkedKeys,Ne=Xt.loadedKeys,Be=Xt.loadingKeys,Xe=Xt.halfCheckedKeys,Qe=Xt.keyEntities,qe=Xt.disabled,He=Xt.dragging,Ue=Xt.dragOverNodeKey,We=Xt.dropPosition,Ke=Xt.motion,rn=Xt.height,an=Xt.itemHeight,ln=Xt.virtual,gn=Xt.scrollWidth,Gn=Xt.focusable,Zn=Xt.activeItem,Kn=Xt.focused,Pr=Xt.tabIndex,pr=Xt.onKeyDown,Er=Xt.onFocus,Mr=Xt.onBlur,Fr=Xt.onActiveChange,vr=Xt.onListChangeStart,dr=Xt.onListChangeEnd,Ur=(0,Pt.Z)(Xt,fe),qt=tt.useRef(null),An=tt.useRef(null);tt.useImperativeHandle(ne,function(){return{scrollTo:function(Ln){qt.current.scrollTo(Ln)},getIndentWidth:function(){return An.current.offsetWidth}}});var Xn=tt.useState(ue),In=(0,dt.Z)(Xn,2),Un=In[0],Wn=In[1],ir=tt.useState(Rt),Lr=(0,dt.Z)(ir,2),Rr=Lr[0],Ye=Lr[1],tn=tt.useState(Rt),Ze=(0,dt.Z)(tn,2),zn=Ze[0],Qn=Ze[1],Jn=tt.useState([]),bn=(0,dt.Z)(Jn,2),Fn=bn[0],cr=bn[1],wr=tt.useState(null),Or=(0,dt.Z)(wr,2),Ae=Or[0],Ve=Or[1],Mn=tt.useRef(Rt);Mn.current=Rt;function jn(){var Pn=Mn.current;Ye(Pn),Qn(Pn),cr([]),Ve(null),dr()}(0,At.Z)(function(){Wn(ue);var Pn=oe(Un,ue);if(Pn.key!==null)if(Pn.add){var Ln=Rr.findIndex(function(ar){var lr=ar.key;return lr===Pn.key}),$n=ce(se(Rr,Rt,Pn.key),ln,rn,an),Nn=Rr.slice();Nn.splice(Ln+1,0,be),Qn(Nn),cr($n),Ve("show")}else{var Rn=Rt.findIndex(function(ar){var lr=ar.key;return lr===Pn.key}),Bn=ce(se(Rt,Rr,Pn.key),ln,rn,an),gr=Rt.slice();gr.splice(Rn+1,0,be),Qn(gr),cr(Bn),Ve("hide")}else Rr!==Rt&&(Ye(Rt),Qn(Rt))},[ue,Rt]),tt.useEffect(function(){He||jn()},[He]);var en=Ke?zn:Rt,kn={expandedKeys:ue,selectedKeys:me,loadedKeys:Ne,loadingKeys:Be,checkedKeys:Le,halfCheckedKeys:Xe,dragOverNodeKey:Ue,dropPosition:We,keyEntities:Qe};return tt.createElement(tt.Fragment,null,Kn&&Zn&&tt.createElement("span",{style:Pe,"aria-live":"assertive"},he(Zn)),tt.createElement("div",null,tt.createElement("input",{style:Pe,disabled:Gn===!1||qe,tabIndex:Gn!==!1?Pr:null,onKeyDown:pr,onFocus:Er,onBlur:Mr,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:An,className:"".concat(It,"-indent-unit")}))),tt.createElement(Dt.Z,(0,ae.Z)({},Ur,{data:en,itemKey:pe,height:rn,fullHeight:!1,virtual:ln,itemHeight:an,scrollWidth:gn,prefixCls:"".concat(It,"-list"),ref:qt,role:"tree",onVisibleChange:function(Ln){Ln.every(function($n){return pe($n)!==ee})&&jn()}}),function(Pn){var Ln=Pn.pos,$n=Object.assign({},(ut(Pn.data),Pn.data)),Nn=Pn.title,Rn=Pn.key,Bn=Pn.isStart,gr=Pn.isEnd,ar=(0,Wt.km)(Rn,Ln);delete $n.key,delete $n.children;var lr=(0,Wt.H8)(ar,kn);return tt.createElement(Ht,(0,ae.Z)({},$n,lr,{title:Nn,active:!!Zn&&Rn===Zn.key,pos:Ln,data:Pn.data,isStart:Bn,isEnd:gr,motion:Ke,motionNodes:Rn===ee?Fn:null,motionType:Ae,onMotionStart:vr,onMotionEnd:jn,treeNodeRequiredProps:kn,onMouseMove:function(){Fr(null)}}))}))}),de=Ce,Fe=le(82661),ge=le(34643),Se=le(65065),re=10,Kt=function(Xt){(0,kt.Z)(It,Xt);var ne=(0,bt.Z)(It);function It(){var Rt;(0,Bt.Z)(this,It);for(var Vt=arguments.length,$t=new Array(Vt),ue=0;ue<Vt;ue++)$t[ue]=arguments[ue];return Rt=ne.call.apply(ne,[this].concat($t)),(0,St.Z)((0,gt.Z)(Rt),"destroyed",!1),(0,St.Z)((0,gt.Z)(Rt),"delayedDragEnterLogic",void 0),(0,St.Z)((0,gt.Z)(Rt),"loadingRetryTimes",{}),(0,St.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,St.Z)((0,gt.Z)(Rt),"dragStartMousePosition",null),(0,St.Z)((0,gt.Z)(Rt),"dragNodeProps",null),(0,St.Z)((0,gt.Z)(Rt),"currentMouseOverDroppableNodeKey",null),(0,St.Z)((0,gt.Z)(Rt),"listRef",tt.createRef()),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragStart",function(me,Le){var Ne=Rt.state,Be=Ne.expandedKeys,Xe=Ne.keyEntities,Qe=Rt.props.onDragStart,qe=Le.eventKey;Rt.dragNodeProps=Le,Rt.dragStartMousePosition={x:me.clientX,y:me.clientY};var He=(0,Fe._5)(Be,qe);Rt.setState({draggingNodeKey:qe,dragChildrenKeys:(0,Fe.wA)(qe,Xe),indent:Rt.listRef.current.getIndentWidth()}),Rt.setExpandedKeys(He),window.addEventListener("dragend",Rt.onWindowDragEnd),Qe==null||Qe({event:me,node:(0,Wt.F)(Le)})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnter",function(me,Le){var Ne=Rt.state,Be=Ne.expandedKeys,Xe=Ne.keyEntities,Qe=Ne.dragChildrenKeys,qe=Ne.flattenNodes,He=Ne.indent,Ue=Rt.props,We=Ue.onDragEnter,Ke=Ue.onExpand,rn=Ue.allowDrop,an=Ue.direction,ln=Le.pos,gn=Le.eventKey;if(Rt.currentMouseOverDroppableNodeKey!==gn&&(Rt.currentMouseOverDroppableNodeKey=gn),!Rt.dragNodeProps){Rt.resetDragState();return}var Gn=(0,Fe.OM)(me,Rt.dragNodeProps,Le,He,Rt.dragStartMousePosition,rn,qe,Xe,Be,an),Zn=Gn.dropPosition,Kn=Gn.dropLevelOffset,Pr=Gn.dropTargetKey,pr=Gn.dropContainerKey,Er=Gn.dropTargetPos,Mr=Gn.dropAllowed,Fr=Gn.dragOverNodeKey;if(Qe.includes(Pr)||!Mr){Rt.resetDragState();return}if(Rt.delayedDragEnterLogic||(Rt.delayedDragEnterLogic={}),Object.keys(Rt.delayedDragEnterLogic).forEach(function(vr){clearTimeout(Rt.delayedDragEnterLogic[vr])}),Rt.dragNodeProps.eventKey!==Le.eventKey&&(me.persist(),Rt.delayedDragEnterLogic[ln]=window.setTimeout(function(){if(Rt.state.draggingNodeKey!==null){var vr=(0,_t.Z)(Be),dr=(0,Se.Z)(Xe,Le.eventKey);dr&&(dr.children||[]).length&&(vr=(0,Fe.L0)(Be,Le.eventKey)),Rt.props.hasOwnProperty("expandedKeys")||Rt.setExpandedKeys(vr),Ke==null||Ke(vr,{node:(0,Wt.F)(Le),expanded:!0,nativeEvent:me.nativeEvent})}},800)),Rt.dragNodeProps.eventKey===Pr&&Kn===0){Rt.resetDragState();return}Rt.setState({dragOverNodeKey:Fr,dropPosition:Zn,dropLevelOffset:Kn,dropTargetKey:Pr,dropContainerKey:pr,dropTargetPos:Er,dropAllowed:Mr}),We==null||We({event:me,node:(0,Wt.F)(Le),expandedKeys:Be})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragOver",function(me,Le){var Ne=Rt.state,Be=Ne.dragChildrenKeys,Xe=Ne.flattenNodes,Qe=Ne.keyEntities,qe=Ne.expandedKeys,He=Ne.indent,Ue=Rt.props,We=Ue.onDragOver,Ke=Ue.allowDrop,rn=Ue.direction;if(Rt.dragNodeProps){var an=(0,Fe.OM)(me,Rt.dragNodeProps,Le,He,Rt.dragStartMousePosition,Ke,Xe,Qe,qe,rn),ln=an.dropPosition,gn=an.dropLevelOffset,Gn=an.dropTargetKey,Zn=an.dropContainerKey,Kn=an.dropTargetPos,Pr=an.dropAllowed,pr=an.dragOverNodeKey;Be.includes(Gn)||!Pr||(Rt.dragNodeProps.eventKey===Gn&&gn===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():ln===Rt.state.dropPosition&&gn===Rt.state.dropLevelOffset&&Gn===Rt.state.dropTargetKey&&Zn===Rt.state.dropContainerKey&&Kn===Rt.state.dropTargetPos&&Pr===Rt.state.dropAllowed&&pr===Rt.state.dragOverNodeKey||Rt.setState({dropPosition:ln,dropLevelOffset:gn,dropTargetKey:Gn,dropContainerKey:Zn,dropTargetPos:Kn,dropAllowed:Pr,dragOverNodeKey:pr}),We==null||We({event:me,node:(0,Wt.F)(Le)}))}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragLeave",function(me,Le){Rt.currentMouseOverDroppableNodeKey===Le.eventKey&&!me.currentTarget.contains(me.relatedTarget)&&(Rt.resetDragState(),Rt.currentMouseOverDroppableNodeKey=null);var Ne=Rt.props.onDragLeave;Ne==null||Ne({event:me,node:(0,Wt.F)(Le)})}),(0,St.Z)((0,gt.Z)(Rt),"onWindowDragEnd",function(me){Rt.onNodeDragEnd(me,null,!0),window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDragEnd",function(me,Le){var Ne=Rt.props.onDragEnd;Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),Ne==null||Ne({event:me,node:(0,Wt.F)(Le)}),Rt.dragNodeProps=null,window.removeEventListener("dragend",Rt.onWindowDragEnd)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDrop",function(me,Le){var Ne,Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Xe=Rt.state,Qe=Xe.dragChildrenKeys,qe=Xe.dropPosition,He=Xe.dropTargetKey,Ue=Xe.dropTargetPos,We=Xe.dropAllowed;if(We){var Ke=Rt.props.onDrop;if(Rt.setState({dragOverNodeKey:null}),Rt.cleanDragState(),He!==null){var rn=(0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(He,Rt.getTreeNodeRequiredProps())),{},{active:((Ne=Rt.getActiveItem())===null||Ne===void 0?void 0:Ne.key)===He,data:(0,Se.Z)(Rt.state.keyEntities,He).node}),an=Qe.includes(He);(0,z.ZP)(!an,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var ln=(0,Fe.yx)(Ue),gn={event:me,node:(0,Wt.F)(rn),dragNode:Rt.dragNodeProps?(0,Wt.F)(Rt.dragNodeProps):null,dragNodesKeys:[Rt.dragNodeProps.eventKey].concat(Qe),dropToGap:qe!==0,dropPosition:qe+Number(ln[ln.length-1])};Be||Ke==null||Ke(gn),Rt.dragNodeProps=null}}}),(0,St.Z)((0,gt.Z)(Rt),"cleanDragState",function(){var me=Rt.state.draggingNodeKey;me!==null&&Rt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Rt.dragStartMousePosition=null,Rt.currentMouseOverDroppableNodeKey=null}),(0,St.Z)((0,gt.Z)(Rt),"triggerExpandActionExpand",function(me,Le){var Ne=Rt.state,Be=Ne.expandedKeys,Xe=Ne.flattenNodes,Qe=Le.expanded,qe=Le.key,He=Le.isLeaf;if(!(He||me.shiftKey||me.metaKey||me.ctrlKey)){var Ue=Xe.filter(function(Ke){return Ke.key===qe})[0],We=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(qe,Rt.getTreeNodeRequiredProps())),{},{data:Ue.data}));Rt.setExpandedKeys(Qe?(0,Fe._5)(Be,qe):(0,Fe.L0)(Be,qe)),Rt.onNodeExpand(me,We)}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeClick",function(me,Le){var Ne=Rt.props,Be=Ne.onClick,Xe=Ne.expandAction;Xe==="click"&&Rt.triggerExpandActionExpand(me,Le),Be==null||Be(me,Le)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeDoubleClick",function(me,Le){var Ne=Rt.props,Be=Ne.onDoubleClick,Xe=Ne.expandAction;Xe==="doubleClick"&&Rt.triggerExpandActionExpand(me,Le),Be==null||Be(me,Le)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeSelect",function(me,Le){var Ne=Rt.state.selectedKeys,Be=Rt.state,Xe=Be.keyEntities,Qe=Be.fieldNames,qe=Rt.props,He=qe.onSelect,Ue=qe.multiple,We=Le.selected,Ke=Le[Qe.key],rn=!We;rn?Ue?Ne=(0,Fe.L0)(Ne,Ke):Ne=[Ke]:Ne=(0,Fe._5)(Ne,Ke);var an=Ne.map(function(ln){var gn=(0,Se.Z)(Xe,ln);return gn?gn.node:null}).filter(Boolean);Rt.setUncontrolledState({selectedKeys:Ne}),He==null||He(Ne,{event:"select",selected:rn,node:Le,selectedNodes:an,nativeEvent:me.nativeEvent})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeCheck",function(me,Le,Ne){var Be=Rt.state,Xe=Be.keyEntities,Qe=Be.checkedKeys,qe=Be.halfCheckedKeys,He=Rt.props,Ue=He.checkStrictly,We=He.onCheck,Ke=Le.key,rn,an={event:"check",node:Le,checked:Ne,nativeEvent:me.nativeEvent};if(Ue){var ln=Ne?(0,Fe.L0)(Qe,Ke):(0,Fe._5)(Qe,Ke),gn=(0,Fe._5)(qe,Ke);rn={checked:ln,halfChecked:gn},an.checkedNodes=ln.map(function(Er){return(0,Se.Z)(Xe,Er)}).filter(Boolean).map(function(Er){return Er.node}),Rt.setUncontrolledState({checkedKeys:ln})}else{var Gn=(0,ge.S)([].concat((0,_t.Z)(Qe),[Ke]),!0,Xe),Zn=Gn.checkedKeys,Kn=Gn.halfCheckedKeys;if(!Ne){var Pr=new Set(Zn);Pr.delete(Ke);var pr=(0,ge.S)(Array.from(Pr),{checked:!1,halfCheckedKeys:Kn},Xe);Zn=pr.checkedKeys,Kn=pr.halfCheckedKeys}rn=Zn,an.checkedNodes=[],an.checkedNodesPositions=[],an.halfCheckedKeys=Kn,Zn.forEach(function(Er){var Mr=(0,Se.Z)(Xe,Er);if(Mr){var Fr=Mr.node,vr=Mr.pos;an.checkedNodes.push(Fr),an.checkedNodesPositions.push({node:Fr,pos:vr})}}),Rt.setUncontrolledState({checkedKeys:Zn},!1,{halfCheckedKeys:Kn})}We==null||We(rn,an)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeLoad",function(me){var Le,Ne=me.key,Be=Rt.state.keyEntities,Xe=(0,Se.Z)(Be,Ne);if(!(Xe!=null&&(Le=Xe.children)!==null&&Le!==void 0&&Le.length)){var Qe=new Promise(function(qe,He){Rt.setState(function(Ue){var We=Ue.loadedKeys,Ke=We===void 0?[]:We,rn=Ue.loadingKeys,an=rn===void 0?[]:rn,ln=Rt.props,gn=ln.loadData,Gn=ln.onLoad;if(!gn||Ke.includes(Ne)||an.includes(Ne))return null;var Zn=gn(me);return Zn.then(function(){var Kn=Rt.state.loadedKeys,Pr=(0,Fe.L0)(Kn,Ne);Gn==null||Gn(Pr,{event:"load",node:me}),Rt.setUncontrolledState({loadedKeys:Pr}),Rt.setState(function(pr){return{loadingKeys:(0,Fe._5)(pr.loadingKeys,Ne)}}),qe()}).catch(function(Kn){if(Rt.setState(function(pr){return{loadingKeys:(0,Fe._5)(pr.loadingKeys,Ne)}}),Rt.loadingRetryTimes[Ne]=(Rt.loadingRetryTimes[Ne]||0)+1,Rt.loadingRetryTimes[Ne]>=re){var Pr=Rt.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Rt.setUncontrolledState({loadedKeys:(0,Fe.L0)(Pr,Ne)}),qe()}He(Kn)}),{loadingKeys:(0,Fe.L0)(an,Ne)}})});return Qe.catch(function(){}),Qe}}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseEnter",function(me,Le){var Ne=Rt.props.onMouseEnter;Ne==null||Ne({event:me,node:Le})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeMouseLeave",function(me,Le){var Ne=Rt.props.onMouseLeave;Ne==null||Ne({event:me,node:Le})}),(0,St.Z)((0,gt.Z)(Rt),"onNodeContextMenu",function(me,Le){var Ne=Rt.props.onRightClick;Ne&&(me.preventDefault(),Ne({event:me,node:Le}))}),(0,St.Z)((0,gt.Z)(Rt),"onFocus",function(){var me=Rt.props.onFocus;Rt.setState({focused:!0});for(var Le=arguments.length,Ne=new Array(Le),Be=0;Be<Le;Be++)Ne[Be]=arguments[Be];me==null||me.apply(void 0,Ne)}),(0,St.Z)((0,gt.Z)(Rt),"onBlur",function(){var me=Rt.props.onBlur;Rt.setState({focused:!1}),Rt.onActiveChange(null);for(var Le=arguments.length,Ne=new Array(Le),Be=0;Be<Le;Be++)Ne[Be]=arguments[Be];me==null||me.apply(void 0,Ne)}),(0,St.Z)((0,gt.Z)(Rt),"getTreeNodeRequiredProps",function(){var me=Rt.state,Le=me.expandedKeys,Ne=me.selectedKeys,Be=me.loadedKeys,Xe=me.loadingKeys,Qe=me.checkedKeys,qe=me.halfCheckedKeys,He=me.dragOverNodeKey,Ue=me.dropPosition,We=me.keyEntities;return{expandedKeys:Le||[],selectedKeys:Ne||[],loadedKeys:Be||[],loadingKeys:Xe||[],checkedKeys:Qe||[],halfCheckedKeys:qe||[],dragOverNodeKey:He,dropPosition:Ue,keyEntities:We}}),(0,St.Z)((0,gt.Z)(Rt),"setExpandedKeys",function(me){var Le=Rt.state,Ne=Le.treeData,Be=Le.fieldNames,Xe=(0,Wt.oH)(Ne,me,Be);Rt.setUncontrolledState({expandedKeys:me,flattenNodes:Xe},!0)}),(0,St.Z)((0,gt.Z)(Rt),"onNodeExpand",function(me,Le){var Ne=Rt.state.expandedKeys,Be=Rt.state,Xe=Be.listChanging,Qe=Be.fieldNames,qe=Rt.props,He=qe.onExpand,Ue=qe.loadData,We=Le.expanded,Ke=Le[Qe.key];if(!Xe){var rn=Ne.includes(Ke),an=!We;if((0,z.ZP)(We&&rn||!We&&!rn,"Expand state not sync with index check"),Ne=an?(0,Fe.L0)(Ne,Ke):(0,Fe._5)(Ne,Ke),Rt.setExpandedKeys(Ne),He==null||He(Ne,{node:Le,expanded:an,nativeEvent:me.nativeEvent}),an&&Ue){var ln=Rt.onNodeLoad(Le);ln&&ln.then(function(){var gn=(0,Wt.oH)(Rt.state.treeData,Ne,Qe);Rt.setUncontrolledState({flattenNodes:gn})}).catch(function(){var gn=Rt.state.expandedKeys,Gn=(0,Fe._5)(gn,Ke);Rt.setExpandedKeys(Gn)})}}}),(0,St.Z)((0,gt.Z)(Rt),"onListChangeStart",function(){Rt.setUncontrolledState({listChanging:!0})}),(0,St.Z)((0,gt.Z)(Rt),"onListChangeEnd",function(){setTimeout(function(){Rt.setUncontrolledState({listChanging:!1})})}),(0,St.Z)((0,gt.Z)(Rt),"onActiveChange",function(me){var Le=Rt.state.activeKey,Ne=Rt.props,Be=Ne.onActiveChange,Xe=Ne.itemScrollOffset,Qe=Xe===void 0?0:Xe;Le!==me&&(Rt.setState({activeKey:me}),me!==null&&Rt.scrollTo({key:me,offset:Qe}),Be==null||Be(me))}),(0,St.Z)((0,gt.Z)(Rt),"getActiveItem",function(){var me=Rt.state,Le=me.activeKey,Ne=me.flattenNodes;return Le===null?null:Ne.find(function(Be){var Xe=Be.key;return Xe===Le})||null}),(0,St.Z)((0,gt.Z)(Rt),"offsetActiveKey",function(me){var Le=Rt.state,Ne=Le.flattenNodes,Be=Le.activeKey,Xe=Ne.findIndex(function(He){var Ue=He.key;return Ue===Be});Xe===-1&&me<0&&(Xe=Ne.length),Xe=(Xe+me+Ne.length)%Ne.length;var Qe=Ne[Xe];if(Qe){var qe=Qe.key;Rt.onActiveChange(qe)}else Rt.onActiveChange(null)}),(0,St.Z)((0,gt.Z)(Rt),"onKeyDown",function(me){var Le=Rt.state,Ne=Le.activeKey,Be=Le.expandedKeys,Xe=Le.checkedKeys,Qe=Le.fieldNames,qe=Rt.props,He=qe.onKeyDown,Ue=qe.checkable,We=qe.selectable;switch(me.which){case xt.Z.UP:{Rt.offsetActiveKey(-1),me.preventDefault();break}case xt.Z.DOWN:{Rt.offsetActiveKey(1),me.preventDefault();break}}var Ke=Rt.getActiveItem();if(Ke&&Ke.data){var rn=Rt.getTreeNodeRequiredProps(),an=Ke.data.isLeaf===!1||!!(Ke.data[Qe.children]||[]).length,ln=(0,Wt.F)((0,ot.Z)((0,ot.Z)({},(0,Wt.H8)(Ne,rn)),{},{data:Ke.data,active:!0}));switch(me.which){case xt.Z.LEFT:{an&&Be.includes(Ne)?Rt.onNodeExpand({},ln):Ke.parent&&Rt.onActiveChange(Ke.parent.key),me.preventDefault();break}case xt.Z.RIGHT:{an&&!Be.includes(Ne)?Rt.onNodeExpand({},ln):Ke.children&&Ke.children.length&&Rt.onActiveChange(Ke.children[0].key),me.preventDefault();break}case xt.Z.ENTER:case xt.Z.SPACE:{Ue&&!ln.disabled&&ln.checkable!==!1&&!ln.disableCheckbox?Rt.onNodeCheck({},ln,!Xe.includes(Ne)):!Ue&&We&&!ln.disabled&&ln.selectable!==!1&&Rt.onNodeSelect({},ln);break}}}He==null||He(me)}),(0,St.Z)((0,gt.Z)(Rt),"setUncontrolledState",function(me){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Rt.destroyed){var Be=!1,Xe=!0,Qe={};Object.keys(me).forEach(function(qe){if(Rt.props.hasOwnProperty(qe)){Xe=!1;return}Be=!0,Qe[qe]=me[qe]}),Be&&(!Le||Xe)&&Rt.setState((0,ot.Z)((0,ot.Z)({},Qe),Ne))}}),(0,St.Z)((0,gt.Z)(Rt),"scrollTo",function(me){Rt.listRef.current.scrollTo(me)}),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 Vt=this.props,$t=Vt.activeKey,ue=Vt.itemScrollOffset,me=ue===void 0?0:ue;$t!==void 0&&$t!==this.state.activeKey&&(this.setState({activeKey:$t}),$t!==null&&this.scrollTo({key:$t,offset:me}))}},{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 Vt=this.state,$t=Vt.focused,ue=Vt.flattenNodes,me=Vt.keyEntities,Le=Vt.draggingNodeKey,Ne=Vt.activeKey,Be=Vt.dropLevelOffset,Xe=Vt.dropContainerKey,Qe=Vt.dropTargetKey,qe=Vt.dropPosition,He=Vt.dragOverNodeKey,Ue=Vt.indent,We=this.props,Ke=We.prefixCls,rn=We.className,an=We.style,ln=We.showLine,gn=We.focusable,Gn=We.tabIndex,Zn=Gn===void 0?0:Gn,Kn=We.selectable,Pr=We.showIcon,pr=We.icon,Er=We.switcherIcon,Mr=We.draggable,Fr=We.checkable,vr=We.checkStrictly,dr=We.disabled,Ur=We.motion,qt=We.loadData,An=We.filterTreeNode,Xn=We.height,In=We.itemHeight,Un=We.scrollWidth,Wn=We.virtual,ir=We.titleRender,Lr=We.dropIndicatorRender,Rr=We.onContextMenu,Ye=We.onScroll,tn=We.direction,Ze=We.rootClassName,zn=We.rootStyle,Qn=(0,ft.Z)(this.props,{aria:!0,data:!0}),Jn;Mr&&((0,Re.Z)(Mr)==="object"?Jn=Mr:typeof Mr=="function"?Jn={nodeDraggable:Mr}:Jn={});var bn={prefixCls:Ke,selectable:Kn,showIcon:Pr,icon:pr,switcherIcon:Er,draggable:Jn,draggingNodeKey:Le,checkable:Fr,checkStrictly:vr,disabled:dr,keyEntities:me,dropLevelOffset:Be,dropContainerKey:Xe,dropTargetKey:Qe,dropPosition:qe,dragOverNodeKey:He,indent:Ue,direction:tn,dropIndicatorRender:Lr,loadData:qt,filterTreeNode:An,titleRender:ir,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:bn},tt.createElement("div",{className:mt()(Ke,rn,Ze,(0,St.Z)((0,St.Z)((0,St.Z)({},"".concat(Ke,"-show-line"),ln),"".concat(Ke,"-focused"),$t),"".concat(Ke,"-active-focused"),Ne!==null)),style:zn},tt.createElement(de,(0,ae.Z)({ref:this.listRef,prefixCls:Ke,style:an,data:ue,disabled:dr,selectable:Kn,checkable:!!Fr,motion:Ur,dragging:Le!==null,height:Xn,itemHeight:In,virtual:Wn,focusable:gn,focused:$t,tabIndex:Zn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Rr,onScroll:Ye,scrollWidth:Un},this.getTreeNodeRequiredProps(),Qn))))}}],[{key:"getDerivedStateFromProps",value:function(Vt,$t){var ue=$t.prevProps,me={prevProps:Vt};function Le(Zn){return!ue&&Vt.hasOwnProperty(Zn)||ue&&ue[Zn]!==Vt[Zn]}var Ne,Be=$t.fieldNames;if(Le("fieldNames")&&(Be=(0,Wt.w$)(Vt.fieldNames),me.fieldNames=Be),Le("treeData")?Ne=Vt.treeData:Le("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ne=(0,Wt.zn)(Vt.children)),Ne){me.treeData=Ne;var Xe=(0,Wt.I8)(Ne,{fieldNames:Be});me.keyEntities=(0,ot.Z)((0,St.Z)({},ee,xe),Xe.keyEntities)}var Qe=me.keyEntities||$t.keyEntities;if(Le("expandedKeys")||ue&&Le("autoExpandParent"))me.expandedKeys=Vt.autoExpandParent||!ue&&Vt.defaultExpandParent?(0,Fe.r7)(Vt.expandedKeys,Qe):Vt.expandedKeys;else if(!ue&&Vt.defaultExpandAll){var qe=(0,ot.Z)({},Qe);delete qe[ee];var He=[];Object.keys(qe).forEach(function(Zn){var Kn=qe[Zn];Kn.children&&Kn.children.length&&He.push(Kn.key)}),me.expandedKeys=He}else!ue&&Vt.defaultExpandedKeys&&(me.expandedKeys=Vt.autoExpandParent||Vt.defaultExpandParent?(0,Fe.r7)(Vt.defaultExpandedKeys,Qe):Vt.defaultExpandedKeys);if(me.expandedKeys||delete me.expandedKeys,Ne||me.expandedKeys){var Ue=(0,Wt.oH)(Ne||$t.treeData,me.expandedKeys||$t.expandedKeys,Be);me.flattenNodes=Ue}if(Vt.selectable&&(Le("selectedKeys")?me.selectedKeys=(0,Fe.BT)(Vt.selectedKeys,Vt):!ue&&Vt.defaultSelectedKeys&&(me.selectedKeys=(0,Fe.BT)(Vt.defaultSelectedKeys,Vt))),Vt.checkable){var We;if(Le("checkedKeys")?We=(0,Fe.E6)(Vt.checkedKeys)||{}:!ue&&Vt.defaultCheckedKeys?We=(0,Fe.E6)(Vt.defaultCheckedKeys)||{}:Ne&&(We=(0,Fe.E6)(Vt.checkedKeys)||{checkedKeys:$t.checkedKeys,halfCheckedKeys:$t.halfCheckedKeys}),We){var Ke=We,rn=Ke.checkedKeys,an=rn===void 0?[]:rn,ln=Ke.halfCheckedKeys,gn=ln===void 0?[]:ln;if(!Vt.checkStrictly){var Gn=(0,ge.S)(an,!0,Qe);an=Gn.checkedKeys,gn=Gn.halfCheckedKeys}me.checkedKeys=an,me.halfCheckedKeys=gn}}return Le("loadedKeys")&&(me.loadedKeys=Vt.loadedKeys),me}}]),It}(tt.Component);(0,St.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,St.Z)(Kt,"TreeNode",jt.Z);var wt=Kt,Lt=wt},82661:function(fn,cn,le){"use strict";le.d(cn,{BT:function(){return tt},E6:function(){return lt},L0:function(){return St},OM:function(){return z},_5:function(){return bt},r7:function(){return ut},wA:function(){return mt},yx:function(){return Tt}});var ae=le(62730),Re=le(28788),ot=le(48736),_t=le(59301),Bt=le(639),vt=le(65065),gt=le(34061),kt=null;function bt(dt,Pt){if(!dt)return[];var At=dt.slice(),Dt=At.indexOf(Pt);return Dt>=0&&At.splice(Dt,1),At}function St(dt,Pt){var At=(dt||[]).slice();return At.indexOf(Pt)===-1&&At.push(Pt),At}function Tt(dt){return dt.split("-")}function mt(dt,Pt){var At=[],Dt=(0,vt.Z)(Pt,dt);function Ft(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];jt.forEach(function(Nt){var Gt=Nt.key,Wt=Nt.children;At.push(Gt),Ft(Wt)})}return Ft(Dt.children),At}function xt(dt){if(dt.parent){var Pt=Tt(dt.pos);return Number(Pt[Pt.length-1])===dt.parent.children.length-1}return!1}function ft(dt){var Pt=Tt(dt.pos);return Number(Pt[Pt.length-1])===0}function z(dt,Pt,At,Dt,Ft,jt,Nt,Gt,Wt,Jt){var Ut,Ht=dt.clientX,oe=dt.clientY,se=dt.target.getBoundingClientRect(),fe=se.top,Pe=se.height,Yt=(Jt==="rtl"?-1:1)*(((Ft==null?void 0:Ft.x)||0)-Ht),ee=(Yt-12)/Dt,ye=Wt.filter(function(Lt){var Xt;return(Xt=Gt[Lt])===null||Xt===void 0||(Xt=Xt.children)===null||Xt===void 0?void 0:Xt.length}),xe=(0,vt.Z)(Gt,At.eventKey);if(oe<fe+Pe/2){var be=Nt.findIndex(function(Lt){return Lt.key===xe.key}),ce=be<=0?0:be-1,pe=Nt[ce].key;xe=(0,vt.Z)(Gt,pe)}var he=xe.key,Ce=xe,de=xe.key,Fe=0,ge=0;if(!ye.includes(he))for(var Se=0;Se<ee&&xt(xe);Se+=1)xe=xe.parent,ge+=1;var re=Pt.data,Kt=xe.node,wt=!0;return ft(xe)&&xe.level===0&&oe<fe+Pe/2&&jt({dragNode:re,dropNode:Kt,dropPosition:-1})&&xe.key===At.eventKey?Fe=-1:(Ce.children||[]).length&&ye.includes(de)?jt({dragNode:re,dropNode:Kt,dropPosition:0})?Fe=0:wt=!1:ge===0?ee>-1.5?jt({dragNode:re,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1:jt({dragNode:re,dropNode:Kt,dropPosition:0})?Fe=0:jt({dragNode:re,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1:jt({dragNode:re,dropNode:Kt,dropPosition:1})?Fe=1:wt=!1,{dropPosition:Fe,dropLevelOffset:ge,dropTargetKey:xe.key,dropTargetPos:xe.pos,dragOverNodeKey:de,dropContainerKey:Fe===0?null:((Ut=xe.parent)===null||Ut===void 0?void 0:Ut.key)||null,dropAllowed:wt}}function tt(dt,Pt){if(dt){var At=Pt.multiple;return At?dt.slice():dt.length?[dt[0]]:dt}}var at=function(Pt){return Pt};function it(dt,Pt){if(!dt)return[];var At=Pt||{},Dt=At.processProps,Ft=Dt===void 0?at:Dt,jt=Array.isArray(dt)?dt:[dt];return jt.map(function(Nt){var Gt=Nt.children,Wt=_objectWithoutProperties(Nt,kt),Jt=it(Gt,Pt);return React.createElement(TreeNode,_extends({key:Wt.key},Ft(Wt)),Jt)})}function lt(dt){if(!dt)return null;var Pt;if(Array.isArray(dt))Pt={checkedKeys:dt,halfCheckedKeys:void 0};else if((0,Re.Z)(dt)==="object")Pt={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 Pt}function ut(dt,Pt){var At=new Set;function Dt(Ft){if(!At.has(Ft)){var jt=(0,vt.Z)(Pt,Ft);if(jt){At.add(Ft);var Nt=jt.parent,Gt=jt.node;Gt.disabled||Nt&&Dt(Nt.key)}}}return(dt||[]).forEach(function(Ft){Dt(Ft)}),(0,ae.Z)(At)}},34643:function(fn,cn,le){"use strict";le.d(cn,{S:function(){return gt}});var ae=le(48736),Re=le(65065);function ot(kt,bt){var St=new Set;return kt.forEach(function(Tt){bt.has(Tt)||St.add(Tt)}),St}function _t(kt){var bt=kt||{},St=bt.disabled,Tt=bt.disableCheckbox,mt=bt.checkable;return!!(St||Tt)||mt===!1}function Bt(kt,bt,St,Tt){for(var mt=new Set(kt),xt=new Set,ft=0;ft<=St;ft+=1){var z=bt.get(ft)||new Set;z.forEach(function(lt){var ut=lt.key,dt=lt.node,Pt=lt.children,At=Pt===void 0?[]:Pt;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=St;at>=0;at-=1){var it=bt.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 Pt=!0,At=!1;(ut.children||[]).filter(function(Dt){return!Tt(Dt.node)}).forEach(function(Dt){var Ft=Dt.key,jt=mt.has(Ft);Pt&&!jt&&(Pt=!1),!At&&(jt||xt.has(Ft))&&(At=!0)}),Pt&&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,bt,St,Tt,mt){for(var xt=new Set(kt),ft=new Set(bt),z=0;z<=Tt;z+=1){var tt=St.get(z)||new Set;tt.forEach(function(ut){var dt=ut.key,Pt=ut.node,At=ut.children,Dt=At===void 0?[]:At;!xt.has(dt)&&!ft.has(dt)&&!mt(Pt)&&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=St.get(it)||new Set;lt.forEach(function(ut){var dt=ut.parent,Pt=ut.node;if(!(mt(Pt)||!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,bt,St,Tt){var mt=[],xt;Tt?xt=Tt:xt=_t;var ft=new Set(kt.filter(function(it){var lt=!!(0,Re.Z)(St,it);return lt||mt.push(it),lt})),z=new Map,tt=0;Object.keys(St).forEach(function(it){var lt=St[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 bt===!0?at=Bt(ft,z,tt,xt):at=vt(ft,bt.halfCheckedKeys,z,tt,xt),at}},65065:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return ae}});function ae(Re,ot){return Re[ot]}},34061:function(fn,cn,le){"use strict";le.d(cn,{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=le(28788),Re=le(62730),ot=le(89490),_t=le(39224),Bt=le(11592),vt=le(2738),gt=le(48736),kt=le(65065),bt=["children"];function St(dt,Pt){return"".concat(dt,"-").concat(Pt)}function Tt(dt){return dt&&dt.type&&dt.type.isTreeNode}function mt(dt,Pt){return dt!=null?dt:Pt}function xt(dt){var Pt=dt||{},At=Pt.title,Dt=Pt._title,Ft=Pt.key,jt=Pt.children,Nt=At||"title";return{title:Nt,_title:Dt||[Nt],key:Ft||"key",children:jt||"children"}}function ft(dt,Pt){var At=new Map;function Dt(Ft){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Ft||[]).forEach(function(Nt){var Gt=Nt[Pt.key],Wt=Nt[Pt.children];warning(Gt!=null,"Tree node must have a certain key: [".concat(jt).concat(Gt,"]"));var Jt=String(Gt);warning(!At.has(Jt)||Gt===null||Gt===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 Pt(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,Gt=Nt.children,Wt=(0,_t.Z)(Nt,bt),Jt=(0,ot.Z)({key:jt},Wt),Ut=Pt(Gt);return Ut.length&&(Jt.children=Ut),Jt}).filter(function(Ft){return Ft})}return Pt(dt)}function tt(dt,Pt,At){var Dt=xt(At),Ft=Dt._title,jt=Dt.key,Nt=Dt.children,Gt=new Set(Pt===!0?[]:Pt),Wt=[];function Jt(Ut){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ut.map(function(oe,se){for(var fe=St(Ht?Ht.pos:"0",se),Pe=mt(oe[jt],fe),Yt,ee=0;ee<Ft.length;ee+=1){var ye=Ft[ee];if(oe[ye]!==void 0){Yt=oe[ye];break}}var xe=Object.assign((0,vt.Z)(oe,[].concat((0,Re.Z)(Ft),[jt,Nt])),{title:Yt,key:Pe,parent:Ht,pos:fe,children:null,data:oe,isStart:[].concat((0,Re.Z)(Ht?Ht.isStart:[]),[se===0]),isEnd:[].concat((0,Re.Z)(Ht?Ht.isEnd:[]),[se===Ut.length-1])});return Wt.push(xe),Pt===!0||Gt.has(Pe)?xe.children=Jt(oe[Nt]||[],xe):xe.children=[],xe})}return Jt(dt),Wt}function at(dt,Pt,At){var Dt={};(0,ae.Z)(At)==="object"?Dt=At:Dt={externalGetKey:At},Dt=Dt||{};var Ft=Dt,jt=Ft.childrenPropName,Nt=Ft.externalGetKey,Gt=Ft.fieldNames,Wt=xt(Gt),Jt=Wt.key,Ut=Wt.children,Ht=jt||Ut,oe;Nt?typeof Nt=="string"?oe=function(Pe){return Pe[Nt]}:typeof Nt=="function"&&(oe=function(Pe){return Nt(Pe)}):oe=function(Pe,Yt){return mt(Pe[Jt],Yt)};function se(fe,Pe,Yt,ee){var ye=fe?fe[Ht]:dt,xe=fe?St(Yt.pos,Pe):"0",be=fe?[].concat((0,Re.Z)(ee),[fe]):[];if(fe){var ce=oe(fe,xe),pe={node:fe,index:Pe,pos:xe,key:ce,parentPos:Yt.node?Yt.pos:null,level:Yt.level+1,nodes:be};Pt(pe)}ye&&ye.forEach(function(he,Ce){se(he,Ce,{node:fe,pos:xe,level:Yt?Yt.level+1:-1},be)})}se(null)}function it(dt){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At=Pt.initWrapper,Dt=Pt.processEntity,Ft=Pt.onProcessFinished,jt=Pt.externalGetKey,Nt=Pt.childrenPropName,Gt=Pt.fieldNames,Wt=arguments.length>2?arguments[2]:void 0,Jt=jt||Wt,Ut={},Ht={},oe={posEntities:Ut,keyEntities:Ht};return At&&(oe=At(oe)||oe),at(dt,function(se){var fe=se.node,Pe=se.index,Yt=se.pos,ee=se.key,ye=se.parentPos,xe=se.level,be=se.nodes,ce={node:fe,nodes:be,index:Pe,key:ee,pos:Yt,level:xe},pe=mt(ee,Yt);Ut[Yt]=ce,Ht[pe]=ce,ce.parent=Ut[ye],ce.parent&&(ce.parent.children=ce.parent.children||[],ce.parent.children.push(ce)),Dt&&Dt(ce,oe)},{externalGetKey:Jt,childrenPropName:Nt,fieldNames:Gt}),Ft&&Ft(oe),oe}function lt(dt,Pt){var At=Pt.expandedKeys,Dt=Pt.selectedKeys,Ft=Pt.loadedKeys,jt=Pt.loadingKeys,Nt=Pt.checkedKeys,Gt=Pt.halfCheckedKeys,Wt=Pt.dragOverNodeKey,Jt=Pt.dropPosition,Ut=Pt.keyEntities,Ht=(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:Gt.indexOf(dt)!==-1,pos:String(Ht?Ht.pos:""),dragOver:Wt===dt&&Jt===0,dragOverGapTop:Wt===dt&&Jt===-1,dragOverGapBottom:Wt===dt&&Jt===1};return oe}function ut(dt){var Pt=dt.data,At=dt.expanded,Dt=dt.selected,Ft=dt.checked,jt=dt.loaded,Nt=dt.loading,Gt=dt.halfChecked,Wt=dt.dragOver,Jt=dt.dragOverGapTop,Ut=dt.dragOverGapBottom,Ht=dt.pos,oe=dt.active,se=dt.eventKey,fe=(0,ot.Z)((0,ot.Z)({},Pt),{},{expanded:At,selected:Dt,checked:Ft,loaded:jt,loading:Nt,halfChecked:Gt,dragOver:Wt,dragOverGapTop:Jt,dragOverGapBottom:Ut,pos:Ht,active:oe,key:se});return"props"in fe||Object.defineProperty(fe,"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}}),fe}},90472:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return se}});var ae=le(71409),Re=le(16552),ot=le(19210),_t=le(90264),Bt=le(46654),vt=le(37205),gt=le(87075),kt=le(59301),bt=le(89490),St=le(39224),Tt=le(28788),mt=le(58676),xt=le(93195),ft=le(62730),z=le(92310),tt=le.n(z),at=le(26112),it=le(48736),lt=function(fe,Pe){if(fe&&Pe){var Yt=Array.isArray(Pe)?Pe:Pe.split(","),ee=fe.name||"",ye=fe.type||"",xe=ye.replace(/\/.*$/,"");return Yt.some(function(be){var ce=be.trim();if(/^\*(\/\*)?$/.test(be))return!0;if(ce.charAt(0)==="."){var pe=ee.toLowerCase(),he=ce.toLowerCase(),Ce=[he];return(he===".jpg"||he===".jpeg")&&(Ce=[".jpg",".jpeg"]),Ce.some(function(de){return pe.endsWith(de)})}return/\/\*$/.test(ce)?xe===ce.replace(/\/.*$/,""):ye===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(fe,Pe){var Yt="cannot ".concat(fe.method," ").concat(fe.action," ").concat(Pe.status,"'"),ee=new Error(Yt);return ee.status=Pe.status,ee.method=fe.method,ee.url=fe.action,ee}function dt(fe){var Pe=fe.responseText||fe.response;if(!Pe)return Pe;try{return JSON.parse(Pe)}catch(Yt){return Pe}}function Pt(fe){var Pe=new XMLHttpRequest;fe.onProgress&&Pe.upload&&(Pe.upload.onprogress=function(xe){xe.total>0&&(xe.percent=xe.loaded/xe.total*100),fe.onProgress(xe)});var Yt=new FormData;fe.data&&Object.keys(fe.data).forEach(function(ye){var xe=fe.data[ye];if(Array.isArray(xe)){xe.forEach(function(be){Yt.append("".concat(ye,"[]"),be)});return}Yt.append(ye,xe)}),fe.file instanceof Blob?Yt.append(fe.filename,fe.file,fe.file.name):Yt.append(fe.filename,fe.file),Pe.onerror=function(xe){fe.onError(xe)},Pe.onload=function(){return Pe.status<200||Pe.status>=300?fe.onError(ut(fe,Pe),dt(Pe)):fe.onSuccess(dt(Pe),Pe)},Pe.open(fe.method,fe.action,!0),fe.withCredentials&&"withCredentials"in Pe&&(Pe.withCredentials=!0);var ee=fe.headers||{};return ee["X-Requested-With"]!==null&&Pe.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ee).forEach(function(ye){ee[ye]!==null&&Pe.setRequestHeader(ye,ee[ye])}),Pe.send(Yt),{abort:function(){Pe.abort()}}}var At=function(){var fe=(0,xt.Z)((0,mt.Z)().mark(function Pe(Yt,ee){var ye,xe,be,ce,pe,he,Ce,de;return(0,mt.Z)().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:he=function(){return he=(0,xt.Z)((0,mt.Z)().mark(function re(Kt){return(0,mt.Z)().wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.abrupt("return",new Promise(function(Xt){Kt.file(function(ne){ee(ne)?(Kt.fullPath&&!ne.webkitRelativePath&&(Object.defineProperties(ne,{webkitRelativePath:{writable:!0}}),ne.webkitRelativePath=Kt.fullPath.replace(/^\//,""),Object.defineProperties(ne,{webkitRelativePath:{writable:!1}})),Xt(ne)):Xt(null)})}));case 1:case"end":return Lt.stop()}},re)})),he.apply(this,arguments)},pe=function(re){return he.apply(this,arguments)},ce=function(){return ce=(0,xt.Z)((0,mt.Z)().mark(function re(Kt){var wt,Lt,Xt,ne,It;return(0,mt.Z)().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:wt=Kt.createReader(),Lt=[];case 2:return Vt.next=5,new Promise(function($t){wt.readEntries($t,function(){return $t([])})});case 5:if(Xt=Vt.sent,ne=Xt.length,ne){Vt.next=9;break}return Vt.abrupt("break",12);case 9:for(It=0;It<ne;It++)Lt.push(Xt[It]);Vt.next=2;break;case 12:return Vt.abrupt("return",Lt);case 13:case"end":return Vt.stop()}},re)})),ce.apply(this,arguments)},be=function(re){return ce.apply(this,arguments)},ye=[],xe=[],Yt.forEach(function(Se){return xe.push(Se.webkitGetAsEntry())}),Ce=function(){var Se=(0,xt.Z)((0,mt.Z)().mark(function re(Kt,wt){var Lt,Xt;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,pe(Kt);case 6:Lt=It.sent,Lt&&ye.push(Lt),It.next=15;break;case 10:if(!Kt.isDirectory){It.next=15;break}return It.next=13,be(Kt);case 13:Xt=It.sent,xe.push.apply(xe,(0,ft.Z)(Xt));case 15:case"end":return It.stop()}},re)}));return function(Kt,wt){return Se.apply(this,arguments)}}(),de=0;case 9:if(!(de<xe.length)){ge.next=15;break}return ge.next=12,Ce(xe[de]);case 12:de++,ge.next=9;break;case 15:return ge.abrupt("return",ye);case 16:case"end":return ge.stop()}},Pe)}));return function(Yt,ee){return fe.apply(this,arguments)}}(),Dt=At,Ft=+new Date,jt=0;function Nt(){return"rc-upload-".concat(Ft,"-").concat(++jt)}var Gt=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Wt=function(fe){(0,Bt.Z)(Yt,fe);var Pe=(0,vt.Z)(Yt);function Yt(){var ee;(0,Re.Z)(this,Yt);for(var ye=arguments.length,xe=new Array(ye),be=0;be<ye;be++)xe[be]=arguments[be];return ee=Pe.call.apply(Pe,[this].concat(xe)),(0,gt.Z)((0,_t.Z)(ee),"state",{uid:Nt()}),(0,gt.Z)((0,_t.Z)(ee),"reqs",{}),(0,gt.Z)((0,_t.Z)(ee),"fileInput",void 0),(0,gt.Z)((0,_t.Z)(ee),"_isMounted",void 0),(0,gt.Z)((0,_t.Z)(ee),"onChange",function(ce){var pe=ee.props,he=pe.accept,Ce=pe.directory,de=ce.target.files,Fe=(0,ft.Z)(de).filter(function(ge){return!Ce||lt(ge,he)});ee.uploadFiles(Fe),ee.reset()}),(0,gt.Z)((0,_t.Z)(ee),"onClick",function(ce){var pe=ee.fileInput;if(pe){var he=ce.target,Ce=ee.props.onClick;if(he&&he.tagName==="BUTTON"){var de=pe.parentNode;de.focus(),he.blur()}pe.click(),Ce&&Ce(ce)}}),(0,gt.Z)((0,_t.Z)(ee),"onKeyDown",function(ce){ce.key==="Enter"&&ee.onClick(ce)}),(0,gt.Z)((0,_t.Z)(ee),"onFileDrop",function(){var ce=(0,xt.Z)((0,mt.Z)().mark(function pe(he){var Ce,de,Fe;return(0,mt.Z)().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(Ce=ee.props.multiple,he.preventDefault(),he.type!=="dragover"){Se.next=4;break}return Se.abrupt("return");case 4:if(!ee.props.directory){Se.next=11;break}return Se.next=7,Dt(Array.prototype.slice.call(he.dataTransfer.items),function(re){return lt(re,ee.props.accept)});case 7:de=Se.sent,ee.uploadFiles(de),Se.next=14;break;case 11:Fe=(0,ft.Z)(he.dataTransfer.files).filter(function(re){return lt(re,ee.props.accept)}),Ce===!1&&(Fe=Fe.slice(0,1)),ee.uploadFiles(Fe);case 14:case"end":return Se.stop()}},pe)}));return function(pe){return ce.apply(this,arguments)}}()),(0,gt.Z)((0,_t.Z)(ee),"uploadFiles",function(ce){var pe=(0,ft.Z)(ce),he=pe.map(function(Ce){return Ce.uid=Nt(),ee.processFile(Ce,pe)});Promise.all(he).then(function(Ce){var de=ee.props.onBatchStart;de==null||de(Ce.map(function(Fe){var ge=Fe.origin,Se=Fe.parsedFile;return{file:ge,parsedFile:Se}})),Ce.filter(function(Fe){return Fe.parsedFile!==null}).forEach(function(Fe){ee.post(Fe)})})}),(0,gt.Z)((0,_t.Z)(ee),"processFile",function(){var ce=(0,xt.Z)((0,mt.Z)().mark(function pe(he,Ce){var de,Fe,ge,Se,re,Kt,wt,Lt,Xt;return(0,mt.Z)().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(de=ee.props.beforeUpload,Fe=he,!de){It.next=14;break}return It.prev=3,It.next=6,de(he,Ce);case 6:Fe=It.sent,It.next=12;break;case 9:It.prev=9,It.t0=It.catch(3),Fe=!1;case 12:if(Fe!==!1){It.next=14;break}return It.abrupt("return",{origin:he,parsedFile:null,action:null,data:null});case 14:if(ge=ee.props.action,typeof ge!="function"){It.next=21;break}return It.next=18,ge(he);case 18:Se=It.sent,It.next=22;break;case 21:Se=ge;case 22:if(re=ee.props.data,typeof re!="function"){It.next=29;break}return It.next=26,re(he);case 26:Kt=It.sent,It.next=30;break;case 29:Kt=re;case 30:return wt=((0,Tt.Z)(Fe)==="object"||typeof Fe=="string")&&Fe?Fe:he,wt instanceof File?Lt=wt:Lt=new File([wt],he.name,{type:he.type}),Xt=Lt,Xt.uid=he.uid,It.abrupt("return",{origin:he,data:Kt,parsedFile:Xt,action:Se});case 35:case"end":return It.stop()}},pe,null,[[3,9]])}));return function(pe,he){return ce.apply(this,arguments)}}()),(0,gt.Z)((0,_t.Z)(ee),"saveFileInput",function(ce){ee.fileInput=ce}),ee}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(ye){var xe=this,be=ye.data,ce=ye.origin,pe=ye.action,he=ye.parsedFile;if(this._isMounted){var Ce=this.props,de=Ce.onStart,Fe=Ce.customRequest,ge=Ce.name,Se=Ce.headers,re=Ce.withCredentials,Kt=Ce.method,wt=ce.uid,Lt=Fe||Pt,Xt={action:pe,filename:ge,data:be,file:he,headers:Se,withCredentials:re,method:Kt||"post",onProgress:function(It){var Rt=xe.props.onProgress;Rt==null||Rt(It,he)},onSuccess:function(It,Rt){var Vt=xe.props.onSuccess;Vt==null||Vt(It,he,Rt),delete xe.reqs[wt]},onError:function(It,Rt){var Vt=xe.props.onError;Vt==null||Vt(It,Rt,he),delete xe.reqs[wt]}};de(ce),this.reqs[wt]=Lt(Xt)}}},{key:"reset",value:function(){this.setState({uid:Nt()})}},{key:"abort",value:function(ye){var xe=this.reqs;if(ye){var be=ye.uid?ye.uid:ye;xe[be]&&xe[be].abort&&xe[be].abort(),delete xe[be]}else Object.keys(xe).forEach(function(ce){xe[ce]&&xe[ce].abort&&xe[ce].abort(),delete xe[ce]})}},{key:"render",value:function(){var ye=this.props,xe=ye.component,be=ye.prefixCls,ce=ye.className,pe=ye.classNames,he=pe===void 0?{}:pe,Ce=ye.disabled,de=ye.id,Fe=ye.name,ge=ye.style,Se=ye.styles,re=Se===void 0?{}:Se,Kt=ye.multiple,wt=ye.accept,Lt=ye.capture,Xt=ye.children,ne=ye.directory,It=ye.openFileDialogOnClick,Rt=ye.onMouseEnter,Vt=ye.onMouseLeave,$t=ye.hasControlInside,ue=(0,St.Z)(ye,Gt),me=tt()((0,gt.Z)((0,gt.Z)((0,gt.Z)({},be,!0),"".concat(be,"-disabled"),Ce),ce,ce)),Le=ne?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Ne=Ce?{}:{onClick:It?this.onClick:function(){},onKeyDown:It?this.onKeyDown:function(){},onMouseEnter:Rt,onMouseLeave:Vt,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:$t?void 0:"0"};return kt.createElement(xe,(0,ae.Z)({},Ne,{className:me,role:$t?void 0:"button",style:ge}),kt.createElement("input",(0,ae.Z)({},(0,at.Z)(ue,{aria:!0,data:!0}),{id:de,name:Fe,disabled:Ce,type:"file",ref:this.saveFileInput,onClick:function(Xe){return Xe.stopPropagation()},key:this.state.uid,style:(0,bt.Z)({display:"none"},re.input),className:he.input,accept:wt},Le,{multiple:Kt,onChange:this.onChange},Lt!=null?{capture:Lt}:{})),Xt)}}]),Yt}(kt.Component),Jt=Wt;function Ut(){}var Ht=function(fe){(0,Bt.Z)(Yt,fe);var Pe=(0,vt.Z)(Yt);function Yt(){var ee;(0,Re.Z)(this,Yt);for(var ye=arguments.length,xe=new Array(ye),be=0;be<ye;be++)xe[be]=arguments[be];return ee=Pe.call.apply(Pe,[this].concat(xe)),(0,gt.Z)((0,_t.Z)(ee),"uploader",void 0),(0,gt.Z)((0,_t.Z)(ee),"saveUploader",function(ce){ee.uploader=ce}),ee}return(0,ot.Z)(Yt,[{key:"abort",value:function(ye){this.uploader.abort(ye)}},{key:"render",value:function(){return kt.createElement(Jt,(0,ae.Z)({},this.props,{ref:this.saveUploader}))}}]),Yt}(kt.Component);(0,gt.Z)(Ht,"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=Ht,se=oe},65283:function(fn,cn,le){"use strict";le.d(cn,{Z:function(){return re}});var ae=le(71409),Re=le(28788),ot=le(89490),_t=le(87075),Bt=le(11036),vt=le(39224),gt=le(92310),kt=le.n(gt),bt=le(29301),St=le(70425),Tt=le(34280),mt=le(59301),xt=le(4676),ft=mt.forwardRef(function(Kt,wt){var Lt=Kt.height,Xt=Kt.offsetY,ne=Kt.offsetX,It=Kt.children,Rt=Kt.prefixCls,Vt=Kt.onInnerResize,$t=Kt.innerProps,ue=Kt.rtl,me=Kt.extra,Le={},Ne={display:"flex",flexDirection:"column"};return Xt!==void 0&&(Le={height:Lt,position:"relative",overflow:"hidden"},Ne=(0,ot.Z)((0,ot.Z)({},Ne),{},(0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)({transform:"translateY(".concat(Xt,"px)")},ue?"marginRight":"marginLeft",-ne),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:Le},mt.createElement(bt.Z,{onResize:function(Xe){var Qe=Xe.offsetHeight;Qe&&Vt&&Vt()}},mt.createElement("div",(0,ae.Z)({style:Ne,className:kt()((0,_t.Z)({},"".concat(Rt,"-holder-inner"),Rt)),ref:wt},$t),It,me)))});ft.displayName="Filler";var z=ft;function tt(Kt){var wt=Kt.children,Lt=Kt.setRef,Xt=mt.useCallback(function(ne){Lt(ne)},[]);return mt.cloneElement(wt,{ref:Xt})}function at(Kt,wt,Lt,Xt,ne,It,Rt,Vt){var $t=Vt.getKey;return Kt.slice(wt,Lt+1).map(function(ue,me){var Le=wt+me,Ne=Rt(ue,Le,{style:{width:Xt},offsetX:ne}),Be=$t(ue);return mt.createElement(tt,{key:Be,setRef:function(Qe){return It(ue,Qe)}},Ne)})}function it(Kt,wt,Lt,Xt){var ne=Lt-Kt,It=wt-Lt,Rt=Math.min(ne,It)*2;if(Xt<=Rt){var Vt=Math.floor(Xt/2);return Xt%2?Lt+Vt+1:Lt-Vt}return ne>It?Lt-(Xt-It):Lt+(Xt-ne)}function lt(Kt,wt,Lt){var Xt=Kt.length,ne=wt.length,It,Rt;if(Xt===0&&ne===0)return null;Xt<ne?(It=Kt,Rt=wt):(It=wt,Rt=Kt);var Vt={__EMPTY_ITEM__:!0};function $t(Xe){return Xe!==void 0?Lt(Xe):Vt}for(var ue=null,me=Math.abs(Xt-ne)!==1,Le=0;Le<Rt.length;Le+=1){var Ne=$t(It[Le]),Be=$t(Rt[Le]);if(Ne!==Be){ue=Le,me=me||Ne!==$t(Rt[Le+1]);break}}return ue===null?null:{index:ue,multiple:me}}function ut(Kt,wt,Lt){var Xt=mt.useState(Kt),ne=(0,Bt.Z)(Xt,2),It=ne[0],Rt=ne[1],Vt=mt.useState(null),$t=(0,Bt.Z)(Vt,2),ue=$t[0],me=$t[1];return mt.useEffect(function(){var Le=lt(It||[],Kt||[],wt);(Le==null?void 0:Le.index)!==void 0&&(Lt==null||Lt(Le.index),me(Kt[Le.index])),Rt(Kt)},[Kt]),[ue]}var dt=le(16089),Pt=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),At=Pt,Dt=function(Kt,wt,Lt,Xt){var ne=(0,mt.useRef)(!1),It=(0,mt.useRef)(null);function Rt(){clearTimeout(It.current),ne.current=!0,It.current=setTimeout(function(){ne.current=!1},50)}var Vt=(0,mt.useRef)({top:Kt,bottom:wt,left:Lt,right:Xt});return Vt.current.top=Kt,Vt.current.bottom=wt,Vt.current.left=Lt,Vt.current.right=Xt,function($t,ue){var me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Le=$t?ue<0&&Vt.current.left||ue>0&&Vt.current.right:ue<0&&Vt.current.top||ue>0&&Vt.current.bottom;return me&&Le?(clearTimeout(It.current),ne.current=!1):(!Le||ne.current)&&Rt(),!ne.current&&Le}};function Ft(Kt,wt,Lt,Xt,ne,It,Rt){var Vt=(0,mt.useRef)(0),$t=(0,mt.useRef)(null),ue=(0,mt.useRef)(null),me=(0,mt.useRef)(!1),Le=Dt(wt,Lt,Xt,ne);function Ne(Ue,We){if(dt.Z.cancel($t.current),!Le(!1,We)){var Ke=Ue;if(!Ke._virtualHandled)Ke._virtualHandled=!0;else return;Vt.current+=We,ue.current=We,At||Ke.preventDefault(),$t.current=(0,dt.Z)(function(){var rn=me.current?10:1;Rt(Vt.current*rn,!1),Vt.current=0})}}function Be(Ue,We){Rt(We,!0),At||Ue.preventDefault()}var Xe=(0,mt.useRef)(null),Qe=(0,mt.useRef)(null);function qe(Ue){if(Kt){dt.Z.cancel(Qe.current),Qe.current=(0,dt.Z)(function(){Xe.current=null},2);var We=Ue.deltaX,Ke=Ue.deltaY,rn=Ue.shiftKey,an=We,ln=Ke;(Xe.current==="sx"||!Xe.current&&rn&&Ke&&!We)&&(an=Ke,ln=0,Xe.current="sx");var gn=Math.abs(an),Gn=Math.abs(ln);Xe.current===null&&(Xe.current=It&&gn>Gn?"x":"y"),Xe.current==="y"?Ne(Ue,ln):Be(Ue,an)}}function He(Ue){Kt&&(me.current=Ue.detail===ue.current)}return[qe,He]}function jt(Kt,wt,Lt,Xt){var ne=mt.useMemo(function(){return[new Map,[]]},[Kt,Lt.id,Xt]),It=(0,Bt.Z)(ne,2),Rt=It[0],Vt=It[1],$t=function(me){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me,Ne=Rt.get(me),Be=Rt.get(Le);if(Ne===void 0||Be===void 0)for(var Xe=Kt.length,Qe=Vt.length;Qe<Xe;Qe+=1){var qe,He=Kt[Qe],Ue=wt(He);Rt.set(Ue,Qe);var We=(qe=Lt.get(Ue))!==null&&qe!==void 0?qe:Xt;if(Vt[Qe]=(Vt[Qe-1]||0)+We,Ue===me&&(Ne=Qe),Ue===Le&&(Be=Qe),Ne!==void 0&&Be!==void 0)break}return{top:Vt[Ne-1]||0,bottom:Vt[Be]}};return $t}var Nt=le(16552),Gt=le(19210),Wt=function(){function Kt(){(0,Nt.Z)(this,Kt),(0,_t.Z)(this,"maps",void 0),(0,_t.Z)(this,"id",0),(0,_t.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Gt.Z)(Kt,[{key:"set",value:function(Lt,Xt){this.diffRecords.set(Lt,this.maps[Lt]),this.maps[Lt]=Xt,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 Ht(Kt,wt,Lt){var Xt=mt.useState(0),ne=(0,Bt.Z)(Xt,2),It=ne[0],Rt=ne[1],Vt=(0,mt.useRef)(new Map),$t=(0,mt.useRef)(new Jt),ue=(0,mt.useRef)(0);function me(){ue.current+=1}function Le(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;me();var Xe=function(){var He=!1;Vt.current.forEach(function(Ue,We){if(Ue&&Ue.offsetParent){var Ke=Ue.offsetHeight,rn=getComputedStyle(Ue),an=rn.marginTop,ln=rn.marginBottom,gn=Ut(an),Gn=Ut(ln),Zn=Ke+gn+Gn;$t.current.get(We)!==Zn&&($t.current.set(We,Zn),He=!0)}}),He&&Rt(function(Ue){return Ue+1})};if(Be)Xe();else{ue.current+=1;var Qe=ue.current;Promise.resolve().then(function(){Qe===ue.current&&Xe()})}}function Ne(Be,Xe){var Qe=Kt(Be),qe=Vt.current.get(Qe);Xe?(Vt.current.set(Qe,Xe),Le()):Vt.current.delete(Qe),!qe!=!Xe&&(Xe?wt==null||wt(Be):Lt==null||Lt(Be))}return(0,mt.useEffect)(function(){return me},[]),[Ne,Le,$t.current,It]}var oe=14/15;function se(Kt,wt,Lt){var Xt=(0,mt.useRef)(!1),ne=(0,mt.useRef)(0),It=(0,mt.useRef)(0),Rt=(0,mt.useRef)(null),Vt=(0,mt.useRef)(null),$t,ue=function(Be){if(Xt.current){var Xe=Math.ceil(Be.touches[0].pageX),Qe=Math.ceil(Be.touches[0].pageY),qe=ne.current-Xe,He=It.current-Qe,Ue=Math.abs(qe)>Math.abs(He);Ue?ne.current=Xe:It.current=Qe;var We=Lt(Ue,Ue?qe:He,!1,Be);We&&Be.preventDefault(),clearInterval(Vt.current),We&&(Vt.current=setInterval(function(){Ue?qe*=oe:He*=oe;var Ke=Math.floor(Ue?qe:He);(!Lt(Ue,Ke,!0)||Math.abs(Ke)<=.1)&&clearInterval(Vt.current)},16))}},me=function(){Xt.current=!1,$t()},Le=function(Be){$t(),Be.touches.length===1&&!Xt.current&&(Xt.current=!0,ne.current=Math.ceil(Be.touches[0].pageX),It.current=Math.ceil(Be.touches[0].pageY),Rt.current=Be.target,Rt.current.addEventListener("touchmove",ue,{passive:!1}),Rt.current.addEventListener("touchend",me,{passive:!0}))};$t=function(){Rt.current&&(Rt.current.removeEventListener("touchmove",ue),Rt.current.removeEventListener("touchend",me))},(0,Tt.Z)(function(){return Kt&&wt.current.addEventListener("touchstart",Le,{passive:!0}),function(){var Ne;(Ne=wt.current)===null||Ne===void 0||Ne.removeEventListener("touchstart",Le),$t(),clearInterval(Vt.current)}},[Kt])}function fe(Kt){return Math.floor(Math.pow(Kt,.5))}function Pe(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 Xt=wt.current;if(Kt&&Xt){var ne=!1,It,Rt,Vt=function(){dt.Z.cancel(It)},$t=function Ne(){Vt(),It=(0,dt.Z)(function(){Lt(Rt),Ne()})},ue=function(Be){if(!(Be.target.draggable||Be.button!==0)){var Xe=Be;Xe._virtualHandled||(Xe._virtualHandled=!0,ne=!0)}},me=function(){ne=!1,Vt()},Le=function(Be){if(ne){var Xe=Pe(Be,!1),Qe=Xt.getBoundingClientRect(),qe=Qe.top,He=Qe.bottom;if(Xe<=qe){var Ue=qe-Xe;Rt=-fe(Ue),$t()}else if(Xe>=He){var We=Xe-He;Rt=fe(We),$t()}else Vt()}};return Xt.addEventListener("mousedown",ue),Xt.ownerDocument.addEventListener("mouseup",me),Xt.ownerDocument.addEventListener("mousemove",Le),function(){Xt.removeEventListener("mousedown",ue),Xt.ownerDocument.removeEventListener("mouseup",me),Xt.ownerDocument.removeEventListener("mousemove",Le),Vt()}}},[Kt])}var ee=10;function ye(Kt,wt,Lt,Xt,ne,It,Rt,Vt){var $t=mt.useRef(),ue=mt.useState(null),me=(0,Bt.Z)(ue,2),Le=me[0],Ne=me[1];return(0,Tt.Z)(function(){if(Le&&Le.times<ee){if(!Kt.current){Ne(function(Ur){return(0,ot.Z)({},Ur)});return}It();var Be=Le.targetAlign,Xe=Le.originAlign,Qe=Le.index,qe=Le.offset,He=Kt.current.clientHeight,Ue=!1,We=Be,Ke=null;if(He){for(var rn=Be||Xe,an=0,ln=0,gn=0,Gn=Math.min(wt.length-1,Qe),Zn=0;Zn<=Gn;Zn+=1){var Kn=ne(wt[Zn]);ln=an;var Pr=Lt.get(Kn);gn=ln+(Pr===void 0?Xt:Pr),an=gn}for(var pr=rn==="top"?qe:He-qe,Er=Gn;Er>=0;Er-=1){var Mr=ne(wt[Er]),Fr=Lt.get(Mr);if(Fr===void 0){Ue=!0;break}if(pr-=Fr,pr<=0)break}switch(rn){case"top":Ke=ln-qe;break;case"bottom":Ke=gn-He+qe;break;default:{var vr=Kt.current.scrollTop,dr=vr+He;ln<vr?We="top":gn>dr&&(We="bottom")}}Ke!==null&&Rt(Ke),Ke!==Le.lastTop&&(Ue=!0)}Ue&&Ne((0,ot.Z)((0,ot.Z)({},Le),{},{times:Le.times+1,targetAlign:We,lastTop:Ke}))}},[Le,Kt.current]),function(Be){if(Be==null){Vt();return}if(dt.Z.cancel($t.current),typeof Be=="number")Rt(Be);else if(Be&&(0,Re.Z)(Be)==="object"){var Xe,Qe=Be.align;"index"in Be?Xe=Be.index:Xe=wt.findIndex(function(Ue){return ne(Ue)===Be.key});var qe=Be.offset,He=qe===void 0?0:qe;Ne({times:0,index:Xe,offset:He,originAlign:Qe})}}}var xe=mt.forwardRef(function(Kt,wt){var Lt=Kt.prefixCls,Xt=Kt.rtl,ne=Kt.scrollOffset,It=Kt.scrollRange,Rt=Kt.onStartMove,Vt=Kt.onStopMove,$t=Kt.onScroll,ue=Kt.horizontal,me=Kt.spinSize,Le=Kt.containerSize,Ne=Kt.style,Be=Kt.thumbStyle,Xe=Kt.showScrollBar,Qe=mt.useState(!1),qe=(0,Bt.Z)(Qe,2),He=qe[0],Ue=qe[1],We=mt.useState(null),Ke=(0,Bt.Z)(We,2),rn=Ke[0],an=Ke[1],ln=mt.useState(null),gn=(0,Bt.Z)(ln,2),Gn=gn[0],Zn=gn[1],Kn=!Xt,Pr=mt.useRef(),pr=mt.useRef(),Er=mt.useState(Xe),Mr=(0,Bt.Z)(Er,2),Fr=Mr[0],vr=Mr[1],dr=mt.useRef(),Ur=function(){Xe===!0||Xe===!1||(clearTimeout(dr.current),vr(!0),dr.current=setTimeout(function(){vr(!1)},3e3))},qt=It-Le||0,An=Le-me||0,Xn=mt.useMemo(function(){if(ne===0||qt===0)return 0;var Ze=ne/qt;return Ze*An},[ne,qt,An]),In=function(zn){zn.stopPropagation(),zn.preventDefault()},Un=mt.useRef({top:Xn,dragging:He,pageY:rn,startTop:Gn});Un.current={top:Xn,dragging:He,pageY:rn,startTop:Gn};var Wn=function(zn){Ue(!0),an(Pe(zn,ue)),Zn(Un.current.top),Rt(),zn.stopPropagation(),zn.preventDefault()};mt.useEffect(function(){var Ze=function(bn){bn.preventDefault()},zn=Pr.current,Qn=pr.current;return zn.addEventListener("touchstart",Ze,{passive:!1}),Qn.addEventListener("touchstart",Wn,{passive:!1}),function(){zn.removeEventListener("touchstart",Ze),Qn.removeEventListener("touchstart",Wn)}},[]);var ir=mt.useRef();ir.current=qt;var Lr=mt.useRef();Lr.current=An,mt.useEffect(function(){if(He){var Ze,zn=function(bn){var Fn=Un.current,cr=Fn.dragging,wr=Fn.pageY,Or=Fn.startTop;dt.Z.cancel(Ze);var Ae=Pr.current.getBoundingClientRect(),Ve=Le/(ue?Ae.width:Ae.height);if(cr){var Mn=(Pe(bn,ue)-wr)*Ve,jn=Or;!Kn&&ue?jn-=Mn:jn+=Mn;var en=ir.current,kn=Lr.current,Pn=kn?jn/kn:0,Ln=Math.ceil(Pn*en);Ln=Math.max(Ln,0),Ln=Math.min(Ln,en),Ze=(0,dt.Z)(function(){$t(Ln,ue)})}},Qn=function(){Ue(!1),Vt()};return window.addEventListener("mousemove",zn,{passive:!0}),window.addEventListener("touchmove",zn,{passive:!0}),window.addEventListener("mouseup",Qn,{passive:!0}),window.addEventListener("touchend",Qn,{passive:!0}),function(){window.removeEventListener("mousemove",zn),window.removeEventListener("touchmove",zn),window.removeEventListener("mouseup",Qn),window.removeEventListener("touchend",Qn),dt.Z.cancel(Ze)}}},[He]),mt.useEffect(function(){return Ur(),function(){clearTimeout(dr.current)}},[ne]),mt.useImperativeHandle(wt,function(){return{delayHidden:Ur}});var Rr="".concat(Lt,"-scrollbar"),Ye={position:"absolute",visibility:Fr?null:"hidden"},tn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ue?(Ye.height=8,Ye.left=0,Ye.right=0,Ye.bottom=0,tn.height="100%",tn.width=me,Kn?tn.left=Xn:tn.right=Xn):(Ye.width=8,Ye.top=0,Ye.bottom=0,Kn?Ye.right=0:Ye.left=0,tn.width="100%",tn.height=me,tn.top=Xn),mt.createElement("div",{ref:Pr,className:kt()(Rr,(0,_t.Z)((0,_t.Z)((0,_t.Z)({},"".concat(Rr,"-horizontal"),ue),"".concat(Rr,"-vertical"),!ue),"".concat(Rr,"-visible"),Fr)),style:(0,ot.Z)((0,ot.Z)({},Ye),Ne),onMouseDown:In,onMouseMove:Ur},mt.createElement("div",{ref:pr,className:kt()("".concat(Rr,"-thumb"),(0,_t.Z)({},"".concat(Rr,"-thumb-moving"),He)),style:(0,ot.Z)((0,ot.Z)({},tn),Be),onMouseDown:Wn}))}),be=xe,ce=20;function pe(){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 he=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ce=[],de={overflowY:"auto",overflowAnchor:"none"};function Fe(Kt,wt){var Lt=Kt.prefixCls,Xt=Lt===void 0?"rc-virtual-list":Lt,ne=Kt.className,It=Kt.height,Rt=Kt.itemHeight,Vt=Kt.fullHeight,$t=Vt===void 0?!0:Vt,ue=Kt.style,me=Kt.data,Le=Kt.children,Ne=Kt.itemKey,Be=Kt.virtual,Xe=Kt.direction,Qe=Kt.scrollWidth,qe=Kt.component,He=qe===void 0?"div":qe,Ue=Kt.onScroll,We=Kt.onVirtualScroll,Ke=Kt.onVisibleChange,rn=Kt.innerProps,an=Kt.extraRender,ln=Kt.styles,gn=Kt.showScrollBar,Gn=gn===void 0?"optional":gn,Zn=(0,vt.Z)(Kt,he),Kn=mt.useCallback(function(sr){return typeof Ne=="function"?Ne(sr):sr==null?void 0:sr[Ne]},[Ne]),Pr=Ht(Kn,null,null),pr=(0,Bt.Z)(Pr,4),Er=pr[0],Mr=pr[1],Fr=pr[2],vr=pr[3],dr=!!(Be!==!1&&It&&Rt),Ur=mt.useMemo(function(){return Object.values(Fr.maps).reduce(function(sr,yr){return sr+yr},0)},[Fr.id,Fr.maps]),qt=dr&&me&&(Math.max(Rt*me.length,Ur)>It||!!Qe),An=Xe==="rtl",Xn=kt()(Xt,(0,_t.Z)({},"".concat(Xt,"-rtl"),An),ne),In=me||Ce,Un=(0,mt.useRef)(),Wn=(0,mt.useRef)(),ir=(0,mt.useRef)(),Lr=(0,mt.useState)(0),Rr=(0,Bt.Z)(Lr,2),Ye=Rr[0],tn=Rr[1],Ze=(0,mt.useState)(0),zn=(0,Bt.Z)(Ze,2),Qn=zn[0],Jn=zn[1],bn=(0,mt.useState)(!1),Fn=(0,Bt.Z)(bn,2),cr=Fn[0],wr=Fn[1],Or=function(){wr(!0)},Ae=function(){wr(!1)},Ve={getKey:Kn};function Mn(sr){tn(function(yr){var Qr;typeof sr=="function"?Qr=sr(yr):Qr=sr;var mr=Dr(Qr);return Un.current.scrollTop=mr,mr})}var jn=(0,mt.useRef)({start:0,end:In.length}),en=(0,mt.useRef)(),kn=ut(In,Kn),Pn=(0,Bt.Z)(kn,1),Ln=Pn[0];en.current=Ln;var $n=mt.useMemo(function(){if(!dr)return{scrollHeight:void 0,start:0,end:In.length-1,offset:void 0};if(!qt){var sr;return{scrollHeight:((sr=Wn.current)===null||sr===void 0?void 0:sr.offsetHeight)||0,start:0,end:In.length-1,offset:void 0}}for(var yr=0,Qr,mr,Vr,Mi=In.length,kr=0;kr<Mi;kr+=1){var ur=In[kr],Cn=Kn(ur),Ar=Fr.get(Cn),ci=yr+(Ar===void 0?Rt:Ar);ci>=Ye&&Qr===void 0&&(Qr=kr,mr=yr),ci>Ye+It&&Vr===void 0&&(Vr=kr),yr=ci}return Qr===void 0&&(Qr=0,mr=0,Vr=Math.ceil(It/Rt)),Vr===void 0&&(Vr=In.length-1),Vr=Math.min(Vr+1,In.length-1),{scrollHeight:yr,start:Qr,end:Vr,offset:mr}},[qt,dr,Ye,In,vr,It]),Nn=$n.scrollHeight,Rn=$n.start,Bn=$n.end,gr=$n.offset;jn.current.start=Rn,jn.current.end=Bn,mt.useLayoutEffect(function(){var sr=Fr.getRecord();if(sr.size===1){var yr=Array.from(sr.keys())[0],Qr=sr.get(yr),mr=In[Rn];if(mr&&Qr===void 0){var Vr=Kn(mr);if(Vr===yr){var Mi=Fr.get(yr),kr=Mi-Rt;Mn(function(ur){return ur+kr})}}}Fr.resetRecord()},[Nn]);var ar=mt.useState({width:0,height:It}),lr=(0,Bt.Z)(ar,2),sn=lr[0],Kr=lr[1],Xr=function(yr){Kr({width:yr.offsetWidth,height:yr.offsetHeight})},mi=(0,mt.useRef)(),dn=(0,mt.useRef)(),On=mt.useMemo(function(){return pe(sn.width,Qe)},[sn.width,Qe]),rr=mt.useMemo(function(){return pe(sn.height,Nn)},[sn.height,Nn]),er=Nn-It,hr=(0,mt.useRef)(er);hr.current=er;function Dr(sr){var yr=sr;return Number.isNaN(hr.current)||(yr=Math.min(yr,hr.current)),yr=Math.max(yr,0),yr}var Gr=Ye<=0,Jr=Ye>=er,$r=Qn<=0,ii=Qn>=Qe,yn=Dt(Gr,Jr,$r,ii),di=function(){return{x:An?-Qn:Qn,y:Ye}},mn=(0,mt.useRef)(di()),oi=(0,St.zX)(function(sr){if(We){var yr=(0,ot.Z)((0,ot.Z)({},di()),sr);(mn.current.x!==yr.x||mn.current.y!==yr.y)&&(We(yr),mn.current=yr)}});function Gi(sr,yr){var Qr=sr;yr?((0,xt.flushSync)(function(){Jn(Qr)}),oi()):Mn(Qr)}function bi(sr){var yr=sr.currentTarget.scrollTop;yr!==Ye&&Mn(yr),Ue==null||Ue(sr),oi()}var Ai=function(yr){var Qr=yr,mr=Qe?Qe-sn.width:0;return Qr=Math.max(Qr,0),Qr=Math.min(Qr,mr),Qr},ai=(0,St.zX)(function(sr,yr){yr?((0,xt.flushSync)(function(){Jn(function(Qr){var mr=Qr+(An?-sr:sr);return Ai(mr)})}),oi()):Mn(function(Qr){var mr=Qr+sr;return mr})}),_r=Ft(dr,Gr,Jr,$r,ii,!!Qe,ai),vi=(0,Bt.Z)(_r,2),xo=vi[0],Fi=vi[1];se(dr,Un,function(sr,yr,Qr,mr){var Vr=mr;return yn(sr,yr,Qr)?!1:!Vr||!Vr._virtualHandled?(Vr&&(Vr._virtualHandled=!0),xo({preventDefault:function(){},deltaX:sr?yr:0,deltaY:sr?0:yr}),!0):!1}),Yt(qt,Un,function(sr){Mn(function(yr){return yr+sr})}),(0,Tt.Z)(function(){function sr(Qr){var mr=Gr&&Qr.detail<0,Vr=Jr&&Qr.detail>0;dr&&!mr&&!Vr&&Qr.preventDefault()}var yr=Un.current;return yr.addEventListener("wheel",xo,{passive:!1}),yr.addEventListener("DOMMouseScroll",Fi,{passive:!0}),yr.addEventListener("MozMousePixelScroll",sr,{passive:!1}),function(){yr.removeEventListener("wheel",xo),yr.removeEventListener("DOMMouseScroll",Fi),yr.removeEventListener("MozMousePixelScroll",sr)}},[dr,Gr,Jr]),(0,Tt.Z)(function(){if(Qe){var sr=Ai(Qn);Jn(sr),oi({x:sr})}},[sn.width,Qe]);var qn=function(){var yr,Qr;(yr=mi.current)===null||yr===void 0||yr.delayHidden(),(Qr=dn.current)===null||Qr===void 0||Qr.delayHidden()},Me=ye(Un,In,Fr,Rt,Kn,function(){return Mr(!0)},Mn,qn);mt.useImperativeHandle(wt,function(){return{nativeElement:ir.current,getScrollInfo:di,scrollTo:function(yr){function Qr(mr){return mr&&(0,Re.Z)(mr)==="object"&&("left"in mr||"top"in mr)}Qr(yr)?(yr.left!==void 0&&Jn(Ai(yr.left)),Me(yr.top)):Me(yr)}}}),(0,Tt.Z)(function(){if(Ke){var sr=In.slice(Rn,Bn+1);Ke(sr,In)}},[Rn,Bn,In]);var zi=jt(In,Kn,Fr,Rt),Ui=an==null?void 0:an({start:Rn,end:Bn,virtual:qt,offsetX:Qn,offsetY:gr,rtl:An,getSize:zi}),Qi=at(In,Rn,Bn,Qe,Qn,Er,Le,Ve),Xi=null;It&&(Xi=(0,ot.Z)((0,_t.Z)({},$t?"height":"maxHeight",It),de),dr&&(Xi.overflowY="hidden",Qe&&(Xi.overflowX="hidden"),cr&&(Xi.pointerEvents="none")));var pi={};return An&&(pi.dir="rtl"),mt.createElement("div",(0,ae.Z)({ref:ir,style:(0,ot.Z)((0,ot.Z)({},ue),{},{position:"relative"}),className:Xn},pi,Zn),mt.createElement(bt.Z,{onResize:Xr},mt.createElement(He,{className:"".concat(Xt,"-holder"),style:Xi,ref:Un,onScroll:bi,onMouseEnter:qn},mt.createElement(z,{prefixCls:Xt,height:Nn,offsetX:Qn,offsetY:gr,scrollWidth:Qe,onInnerResize:Mr,ref:Wn,innerProps:rn,rtl:An,extra:Ui},Qi))),qt&&Nn>It&&mt.createElement(be,{ref:mi,prefixCls:Xt,scrollOffset:Ye,scrollRange:Nn,rtl:An,onScroll:Gi,onStartMove:Or,onStopMove:Ae,spinSize:rr,containerSize:sn.height,style:ln==null?void 0:ln.verticalScrollBar,thumbStyle:ln==null?void 0:ln.verticalScrollBarThumb,showScrollBar:Gn}),qt&&Qe>sn.width&&mt.createElement(be,{ref:dn,prefixCls:Xt,scrollOffset:Qn,scrollRange:Qe,rtl:An,onScroll:Gi,onStartMove:Or,onStopMove:Ae,spinSize:On,containerSize:sn.width,horizontal:!0,style:ln==null?void 0:ln.horizontalScrollBar,thumbStyle:ln==null?void 0:ln.horizontalScrollBarThumb,showScrollBar:Gn}))}var ge=mt.forwardRef(Fe);ge.displayName="List";var Se=ge,re=Se},7062:function(fn,cn,le){var ae=le(19637),Re=le(97573),ot=[le(96627)];fn.exports=ae.createStore(Re,ot)},96627:function(fn,cn,le){fn.exports=ae;function ae(){return le(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(fn){return fn<10?"0"+fn:fn}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(fn){return rx_escapable.lastIndex=0,rx_escapable.test(fn)?'"'+fn.replace(rx_escapable,function(cn){var le=meta[cn];return typeof le=="string"?le:"\\u"+("0000"+cn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+fn+'"'}function str(fn,cn){var le,ae,Re,ot,_t=gap,Bt,vt=cn[fn];switch(vt&&typeof vt=="object"&&typeof vt.toJSON=="function"&&(vt=vt.toJSON(fn)),typeof rep=="function"&&(vt=rep.call(cn,fn,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,le=0;le<ot;le+=1)Bt[le]=str(le,vt)||"null";return Re=Bt.length===0?"[]":gap?`[
|
|
`+gap+Bt.join(`,
|
|
`+gap)+`
|
|
`+_t+"]":"["+Bt.join(",")+"]",gap=_t,Re}if(rep&&typeof rep=="object")for(ot=rep.length,le=0;le<ot;le+=1)typeof rep[le]=="string"&&(ae=rep[le],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)+`
|
|
`+_t+"}":"{"+Bt.join(",")+"}",gap=_t,Re}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(fn,cn,le){var ae;if(gap="",indent="",typeof le=="number")for(ae=0;ae<le;ae+=1)indent+=" ";else typeof le=="string"&&(indent=le);if(rep=cn,cn&&typeof cn!="function"&&(typeof cn!="object"||typeof cn.length!="number"))throw new Error("JSON.stringify");return str("",{"":fn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(fn,cn){var le,ae,Re=fn[cn];if(Re&&typeof Re=="object")for(le in Re)Object.prototype.hasOwnProperty.call(Re,le)&&(ae=walk(Re,le),ae!==void 0?Re[le]=ae:delete Re[le]);return reviver.call(fn,cn,Re)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(fn){return"\\u"+("0000"+fn.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(fn,cn,le){var ae=le(67039),Re=ae.slice,ot=ae.pluck,_t=ae.each,Bt=ae.bind,vt=ae.create,gt=ae.isList,kt=ae.isFunction,bt=ae.isObject;fn.exports={createStore:mt};var St={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 Pt="__storejs__test__";dt.write(Pt,Pt);var At=dt.read(Pt)===Pt;return dt.remove(Pt),At}catch(Dt){return!1}},_assignPluginFnProp:function(dt,Pt){var At=this[Pt];this[Pt]=function(){var Ft=Re(arguments,0),jt=this;function Nt(){if(At)return _t(arguments,function(Wt,Jt){Ft[Jt]=Wt}),At.apply(jt,Ft)}var Gt=[Nt].concat(Ft);return dt.apply(jt,Gt)}},_serialize:function(dt){return JSON.stringify(dt)},_deserialize:function(dt,Pt){if(!dt)return Pt;var At="";try{At=JSON.parse(dt)}catch(Dt){At=dt}return At!==void 0?At:Pt},_addStorage:function(dt){this.enabled||this._testStorage(dt)&&(this.storage=dt,this.enabled=!0)},_addPlugin:function(dt){var Pt=this;if(gt(dt)){_t(dt,function(Ft){Pt._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(!bt(Dt))throw new Error("Plugins must return an object of function properties");_t(Dt,function(Ft,jt){if(!kt(Ft))throw new Error("Bad plugin property: "+jt+" from plugin "+dt.name+". Plugins should only return functions.");Pt._assignPluginFnProp(Ft,jt)})}},addStorage:function(dt){Tt("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(dt)}},ut=vt(lt,St,{plugins:[]});return ut.raw={},_t(ut,function(dt,Pt){kt(dt)&&(ut.raw[Pt]=Bt(ut,dt))}),_t(xt,function(dt){ut._addStorage(dt)}),_t(ft,function(dt){ut._addPlugin(dt)}),ut}},67039:function(fn,cn,le){var ae=Bt(),Re=vt(),ot=gt(),_t=typeof window!="undefined"?window:le.g;fn.exports={assign:ae,create:Re,trim:ot,bind:kt,slice:bt,each:St,map:Tt,pluck:mt,isList:xt,isFunction:ft,isObject:z,Global:_t};function Bt(){return Object.assign?Object.assign:function(at,it,lt,ut){for(var dt=1;dt<arguments.length;dt++)St(Object(arguments[dt]),function(Pt,At){at[At]=Pt});return at}}function vt(){if(Object.create)return function(it,lt,ut,dt){var Pt=bt(arguments,1);return ae.apply(this,[Object.create(it)].concat(Pt))};{let at=function(){};var tt=at;return function(lt,ut,dt,Pt){var At=bt(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 bt(tt,at){return Array.prototype.slice.call(tt,at||0)}function St(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(fn,cn,le){fn.exports=[le(52496),le(16436),le(76673),le(35701),le(65578),le(65300)]},35701:function(fn,cn,le){var ae=le(67039),Re=ae.Global,ot=ae.trim;fn.exports={name:"cookieStorage",read:Bt,write:gt,each:vt,remove:kt,clearAll:bt};var _t=Re.document;function Bt(Tt){if(!Tt||!St(Tt))return null;var mt="(?:^|.*;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(_t.cookie.replace(new RegExp(mt),"$1"))}function vt(Tt){for(var mt=_t.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&&(_t.cookie=escape(Tt)+"="+escape(mt)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function kt(Tt){!Tt||!St(Tt)||(_t.cookie=escape(Tt)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function bt(){vt(function(Tt,mt){kt(mt)})}function St(Tt){return new RegExp("(?:^|;\\s*)"+escape(Tt).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(_t.cookie)}},52496:function(fn,cn,le){var ae=le(67039),Re=ae.Global;fn.exports={name:"localStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.localStorage}function _t(bt){return ot().getItem(bt)}function Bt(bt,St){return ot().setItem(bt,St)}function vt(bt){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);bt(_t(Tt),Tt)}}function gt(bt){return ot().removeItem(bt)}function kt(){return ot().clear()}},65300:function(fn){fn.exports={name:"memoryStorage",read:le,write:ae,each:Re,remove:ot,clearAll:_t};var cn={};function le(Bt){return cn[Bt]}function ae(Bt,vt){cn[Bt]=vt}function Re(Bt){for(var vt in cn)cn.hasOwnProperty(vt)&&Bt(cn[vt],vt)}function ot(Bt){delete cn[Bt]}function _t(Bt){cn={}}},16436:function(fn,cn,le){var ae=le(67039),Re=ae.Global;fn.exports={name:"oldFF-globalStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};var ot=Re.globalStorage;function _t(bt){return ot[bt]}function Bt(bt,St){ot[bt]=St}function vt(bt){for(var St=ot.length-1;St>=0;St--){var Tt=ot.key(St);bt(ot[Tt],Tt)}}function gt(bt){return ot.removeItem(bt)}function kt(){vt(function(bt,St){delete ot[bt]})}},76673:function(fn,cn,le){var ae=le(67039),Re=ae.Global;fn.exports={name:"oldIE-userDataStorage",write:gt,read:kt,each:bt,remove:St,clearAll:Tt};var ot="storejs",_t=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 bt(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 St(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(!_t||!_t.documentElement||!_t.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=_t.createElement("div"),tt=_t.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(fn,cn,le){var ae=le(67039),Re=ae.Global;fn.exports={name:"sessionStorage",read:_t,write:Bt,each:vt,remove:gt,clearAll:kt};function ot(){return Re.sessionStorage}function _t(bt){return ot().getItem(bt)}function Bt(bt,St){return ot().setItem(bt,St)}function vt(bt){for(var St=ot().length-1;St>=0;St--){var Tt=ot().key(St);bt(_t(Tt),Tt)}}function gt(bt){return ot().removeItem(bt)}function kt(){return ot().clear()}},93314:function(fn){"use strict";fn.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(fn){"use strict";fn.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(fn){"use strict";fn.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(fn){"use strict";fn.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(fn,cn,le){"use strict";le.d(cn,{Z:function(){return kt}});const ae=bt=>typeof bt=="object"&&bt!=null&&bt.nodeType===1,Re=(bt,St)=>(!St||bt!=="hidden")&&bt!=="visible"&&bt!=="clip",ot=(bt,St)=>{if(bt.clientHeight<bt.scrollHeight||bt.clientWidth<bt.scrollWidth){const Tt=getComputedStyle(bt,null);return Re(Tt.overflowY,St)||Re(Tt.overflowX,St)||(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)})(bt)}return!1},_t=(bt,St,Tt,mt,xt,ft,z,tt)=>ft<bt&&z>St||ft>bt&&z<St?0:ft<=bt&&tt<=Tt||z>=St&&tt>=Tt?ft-bt-mt:z>St&&tt<Tt||ft<bt&&tt>Tt?z-St+xt:0,Bt=bt=>{const St=bt.parentElement;return St==null?bt.getRootNode().host||null:St},vt=(bt,St)=>{var Tt,mt,xt,ft;if(typeof document=="undefined")return[];const{scrollMode:z,block:tt,inline:at,boundary:it,skipOverflowHiddenElements:lt}=St,ut=typeof it=="function"?it:be=>be!==it;if(!ae(bt))throw new TypeError("Invalid target");const dt=document.scrollingElement||document.documentElement,Pt=[];let At=bt;for(;ae(At)&&ut(At);){if(At=Bt(At),At===dt){Pt.push(At);break}At!=null&&At===document.body&&ot(At)&&!ot(document.documentElement)||At!=null&&ot(At,lt)&&Pt.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:Gt,width:Wt,top:Jt,right:Ut,bottom:Ht,left:oe}=bt.getBoundingClientRect(),{top:se,right:fe,bottom:Pe,left:Yt}=(be=>{const ce=window.getComputedStyle(be);return{top:parseFloat(ce.scrollMarginTop)||0,right:parseFloat(ce.scrollMarginRight)||0,bottom:parseFloat(ce.scrollMarginBottom)||0,left:parseFloat(ce.scrollMarginLeft)||0}})(bt);let ee=tt==="start"||tt==="nearest"?Jt-se:tt==="end"?Ht+Pe:Jt+Gt/2-se+Pe,ye=at==="center"?oe+Wt/2-Yt+fe:at==="end"?Ut+fe:oe-Yt;const xe=[];for(let be=0;be<Pt.length;be++){const ce=Pt[be],{height:pe,width:he,top:Ce,right:de,bottom:Fe,left:ge}=ce.getBoundingClientRect();if(z==="if-needed"&&Jt>=0&&oe>=0&&Ht<=Ft&&Ut<=Dt&&(ce===dt&&!ot(ce)||Jt>=Ce&&Ht<=Fe&&oe>=ge&&Ut<=de))return xe;const Se=getComputedStyle(ce),re=parseInt(Se.borderLeftWidth,10),Kt=parseInt(Se.borderTopWidth,10),wt=parseInt(Se.borderRightWidth,10),Lt=parseInt(Se.borderBottomWidth,10);let Xt=0,ne=0;const It="offsetWidth"in ce?ce.offsetWidth-ce.clientWidth-re-wt:0,Rt="offsetHeight"in ce?ce.offsetHeight-ce.clientHeight-Kt-Lt:0,Vt="offsetWidth"in ce?ce.offsetWidth===0?0:he/ce.offsetWidth:0,$t="offsetHeight"in ce?ce.offsetHeight===0?0:pe/ce.offsetHeight:0;if(dt===ce)Xt=tt==="start"?ee:tt==="end"?ee-Ft:tt==="nearest"?_t(Nt,Nt+Ft,Ft,Kt,Lt,Nt+ee,Nt+ee+Gt,Gt):ee-Ft/2,ne=at==="start"?ye:at==="center"?ye-Dt/2:at==="end"?ye-Dt:_t(jt,jt+Dt,Dt,re,wt,jt+ye,jt+ye+Wt,Wt),Xt=Math.max(0,Xt+Nt),ne=Math.max(0,ne+jt);else{Xt=tt==="start"?ee-Ce-Kt:tt==="end"?ee-Fe+Lt+Rt:tt==="nearest"?_t(Ce,Fe,pe,Kt,Lt+Rt,ee,ee+Gt,Gt):ee-(Ce+pe/2)+Rt/2,ne=at==="start"?ye-ge-re:at==="center"?ye-(ge+he/2)+It/2:at==="end"?ye-de+wt+It:_t(ge,de,he,re,wt+It,ye,ye+Wt,Wt);const{scrollLeft:ue,scrollTop:me}=ce;Xt=$t===0?0:Math.max(0,Math.min(me+Xt/$t,ce.scrollHeight-pe/$t+Rt)),ne=Vt===0?0:Math.max(0,Math.min(ue+ne/Vt,ce.scrollWidth-he/Vt+It)),ee+=me-Xt,ye+=ue-ne}xe.push({el:ce,top:Xt,left:ne})}return xe},gt=bt=>bt===!1?{block:"end",inline:"nearest"}:(St=>St===Object(St)&&Object.keys(St).length!==0)(bt)?bt:{block:"start",inline:"nearest"};function kt(bt,St){if(!bt.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})(bt))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}})(bt);if((xt=>typeof xt=="object"&&typeof xt.behavior=="function")(St))return St.behavior(vt(bt,St));const mt=typeof St=="boolean"||St==null?void 0:St.behavior;for(const{el:xt,top:ft,left:z}of vt(bt,gt(St))){const tt=ft-Tt.top+Tt.bottom,at=z-Tt.left+Tt.right;xt.scroll({top:tt,left:at,behavior:mt})}}}}]);
|